@eyepop.ai/eyepop-render-2d 3.7.2 → 3.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see eyepop.render2d.min.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Render2d=e():t.Render2d=e()}(self,()=>(()=>{var t={48:(t,e,r)=>{"use strict";const n=r(991),i=r(318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=c,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?a(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),a(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function y(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(t).length;default:if(i)return n?-1:H(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(l(t,o)===l(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(l(t,o+n)!==l(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(J(n))return s;t[r+s]=n}return s}function x(t,e,r,n){return V(H(e,t.length-r),t,r,n)}function E(t,e,r,n){return V(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return V(X(e),t,r,n)}function k(t,e,r,n){return V(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return h(t)},c.allocUnsafeSlow=function(t){return h(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(K(e,Uint8Array))i+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),l=this.slice(n,i),u=t.slice(e,r);for(let t=0;t<a;++t)if(l[t]!==u[t]){o=l[t],s=u[t];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return E(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const _=4096;function C(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function A(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Q[t[n]];return i}function L(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function N(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function $(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||R(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||R(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=Y(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Y(function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=Y(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Y(function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return $(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return $(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=c.isBuffer(t)?t:c.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const D={};function j(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function F(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function G(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw G(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),j("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const q=/[^+/0-9A-Za-z-_]/g;function H(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function X(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Y(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},66:(t,e,r)=>{t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){return i(e[s][1][t]||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o=void 0,s=0;s<n.length;s++)i(n[s]);return i}({"./aesprim":[function(t,e,r){!function(t,e){"use strict";e(void 0!==r?r:t.esprima={})}(this,function(t){"use strict";var e,r,n,i,o,s,a,c,l,u,h,f,p,d,y,g,m,b;function v(t,e){if(!t)throw new Error("ASSERT: "+e)}function w(t){return t>=48&&t<=57}function x(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function E(t){return"01234567".indexOf(t)>=0}function S(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function k(t){return 10===t||13===t||8232===t||8233===t}function I(t){return 64==t||36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&a.NonAsciiIdentifierStart.test(String.fromCharCode(t))}function T(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&a.NonAsciiIdentifierPart.test(String.fromCharCode(t))}function _(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function C(t){return"eval"===t||"arguments"===t}function O(t){if(u&&_(t))return!0;switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}}function A(t,e,r,n,i){var o;v("number"==typeof r,"Comment must have valid position"),m.lastCommentStart>=r||(m.lastCommentStart=r,o={type:t,value:e},b.range&&(o.range=[r,n]),b.loc&&(o.loc=i),b.comments.push(o),b.attachComment&&(b.leadingComments.push(o),b.trailingComments.push(o)))}function L(t){var e,r,n,i;for(e=h-t,r={start:{line:f,column:h-p-t}};h<d;)if(n=l.charCodeAt(h),++h,k(n))return b.comments&&(i=l.slice(e+t,h-1),r.end={line:f,column:h-p-1},A("Line",i,e,h-1,r)),13===n&&10===l.charCodeAt(h)&&++h,++f,void(p=h);b.comments&&(i=l.slice(e+t,h),r.end={line:f,column:h-p},A("Line",i,e,h,r))}function P(){var t,e,r,n;for(b.comments&&(t=h-2,e={start:{line:f,column:h-p-2}});h<d;)if(k(r=l.charCodeAt(h)))13===r&&10===l.charCodeAt(h+1)&&++h,++f,++h,p=h,h>=d&&V({},s.UnexpectedToken,"ILLEGAL");else if(42===r){if(47===l.charCodeAt(h+1))return++h,++h,void(b.comments&&(n=l.slice(t+2,h-2),e.end={line:f,column:h-p},A("Block",n,t,h,e)));++h}else++h;V({},s.UnexpectedToken,"ILLEGAL")}function R(){var t,e;for(e=0===h;h<d;)if(S(t=l.charCodeAt(h)))++h;else if(k(t))++h,13===t&&10===l.charCodeAt(h)&&++h,++f,p=h,e=!0;else if(47===t)if(47===(t=l.charCodeAt(h+1)))++h,++h,L(2),e=!0;else{if(42!==t)break;++h,++h,P()}else if(e&&45===t){if(45!==l.charCodeAt(h+1)||62!==l.charCodeAt(h+2))break;h+=3,L(3)}else{if(60!==t)break;if("!--"!==l.slice(h+1,h+4))break;++h,++h,++h,++h,L(4)}}function B(t){var e,r,n,i=0;for(r="u"===t?4:2,e=0;e<r;++e){if(!(h<d&&x(l[h])))return"";n=l[h++],i=16*i+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(i)}function N(){var t,e;for(t=l.charCodeAt(h++),e=String.fromCharCode(t),92===t&&(117!==l.charCodeAt(h)&&V({},s.UnexpectedToken,"ILLEGAL"),++h,(t=B("u"))&&"\\"!==t&&I(t.charCodeAt(0))||V({},s.UnexpectedToken,"ILLEGAL"),e=t);h<d&&T(t=l.charCodeAt(h));)++h,e+=String.fromCharCode(t),92===t&&(e=e.substr(0,e.length-1),117!==l.charCodeAt(h)&&V({},s.UnexpectedToken,"ILLEGAL"),++h,(t=B("u"))&&"\\"!==t&&T(t.charCodeAt(0))||V({},s.UnexpectedToken,"ILLEGAL"),e+=t);return e}function M(){var t,e;for(t=h++;h<d;){if(92===(e=l.charCodeAt(h)))return h=t,N();if(!T(e))break;++h}return l.slice(t,h)}function U(){var t,r,n,i,o=h,a=l.charCodeAt(h),c=l[h];switch(a){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++h,b.tokenize&&(40===a?b.openParenToken=b.tokens.length:123===a&&(b.openCurlyToken=b.tokens.length)),{type:e.Punctuator,value:String.fromCharCode(a),lineNumber:f,lineStart:p,start:o,end:h};default:if(61===(t=l.charCodeAt(h+1)))switch(a){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return h+=2,{type:e.Punctuator,value:String.fromCharCode(a)+String.fromCharCode(t),lineNumber:f,lineStart:p,start:o,end:h};case 33:case 61:return h+=2,61===l.charCodeAt(h)&&++h,{type:e.Punctuator,value:l.slice(o,h),lineNumber:f,lineStart:p,start:o,end:h}}}return">>>="===(i=l.substr(h,4))?(h+=4,{type:e.Punctuator,value:i,lineNumber:f,lineStart:p,start:o,end:h}):">>>"===(n=i.substr(0,3))||"<<="===n||">>="===n?(h+=3,{type:e.Punctuator,value:n,lineNumber:f,lineStart:p,start:o,end:h}):c===(r=n.substr(0,2))[1]&&"+-<>&|".indexOf(c)>=0||"=>"===r?(h+=2,{type:e.Punctuator,value:r,lineNumber:f,lineStart:p,start:o,end:h}):"<>=!+-*%&|^/".indexOf(c)>=0?(++h,{type:e.Punctuator,value:c,lineNumber:f,lineStart:p,start:o,end:h}):void V({},s.UnexpectedToken,"ILLEGAL")}function $(){var t,r,n;if(v(w((n=l[h]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),r=h,t="","."!==n){if(t=l[h++],n=l[h],"0"===t){if("x"===n||"X"===n)return++h,function(t){for(var r="";h<d&&x(l[h]);)r+=l[h++];return 0===r.length&&V({},s.UnexpectedToken,"ILLEGAL"),I(l.charCodeAt(h))&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.NumericLiteral,value:parseInt("0x"+r,16),lineNumber:f,lineStart:p,start:t,end:h}}(r);if(E(n))return function(t){for(var r="0"+l[h++];h<d&&E(l[h]);)r+=l[h++];return(I(l.charCodeAt(h))||w(l.charCodeAt(h)))&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.NumericLiteral,value:parseInt(r,8),octal:!0,lineNumber:f,lineStart:p,start:t,end:h}}(r);n&&w(n.charCodeAt(0))&&V({},s.UnexpectedToken,"ILLEGAL")}for(;w(l.charCodeAt(h));)t+=l[h++];n=l[h]}if("."===n){for(t+=l[h++];w(l.charCodeAt(h));)t+=l[h++];n=l[h]}if("e"===n||"E"===n)if(t+=l[h++],"+"!==(n=l[h])&&"-"!==n||(t+=l[h++]),w(l.charCodeAt(h)))for(;w(l.charCodeAt(h));)t+=l[h++];else V({},s.UnexpectedToken,"ILLEGAL");return I(l.charCodeAt(h))&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.NumericLiteral,value:parseFloat(t),lineNumber:f,lineStart:p,start:r,end:h}}function D(){var t,r,n,i;return g=null,R(),t=h,r=function(){var t,e,r,n;for(v("/"===(t=l[h]),"Regular expression literal must start with a slash"),e=l[h++],r=!1,n=!1;h<d;)if(e+=t=l[h++],"\\"===t)k((t=l[h++]).charCodeAt(0))&&V({},s.UnterminatedRegExp),e+=t;else if(k(t.charCodeAt(0)))V({},s.UnterminatedRegExp);else if(r)"]"===t&&(r=!1);else{if("/"===t){n=!0;break}"["===t&&(r=!0)}return n||V({},s.UnterminatedRegExp),{value:e.substr(1,e.length-2),literal:e}}(),n=function(){var t,e,r,n;for(e="",r="";h<d&&T((t=l[h]).charCodeAt(0));)if(++h,"\\"===t&&h<d)if("u"===(t=l[h])){if(n=++h,t=B("u"))for(r+=t,e+="\\u";n<h;++n)e+=l[n];else h=n,r+="u",e+="\\u";K({},s.UnexpectedToken,"ILLEGAL")}else e+="\\",K({},s.UnexpectedToken,"ILLEGAL");else r+=t,e+=t;return{value:r,literal:e}}(),i=function(t,e){var r;try{r=new RegExp(t,e)}catch(t){V({},s.InvalidRegExp)}return r}(r.value,n.value),b.tokenize?{type:e.RegularExpression,value:i,lineNumber:f,lineStart:p,start:t,end:h}:{literal:r.literal+n.literal,value:i,start:t,end:h}}function j(){var t,e,r,n;return R(),t=h,e={start:{line:f,column:h-p}},r=D(),e.end={line:f,column:h-p},b.tokenize||(b.tokens.length>0&&(n=b.tokens[b.tokens.length-1]).range[0]===t&&"Punctuator"===n.type&&("/"!==n.value&&"/="!==n.value||b.tokens.pop()),b.tokens.push({type:"RegularExpression",value:r.literal,range:[t,h],loc:e})),r}function F(){var t,r,i;return R(),h>=d?{type:e.EOF,lineNumber:f,lineStart:p,start:h,end:h}:I(t=l.charCodeAt(h))?(r=h,{type:1===(i=92===l.charCodeAt(h)?N():M()).length?e.Identifier:O(i)?e.Keyword:"null"===i?e.NullLiteral:"true"===i||"false"===i?e.BooleanLiteral:e.Identifier,value:i,lineNumber:f,lineStart:p,start:r,end:h}):40===t||41===t||59===t?U():39===t||34===t?function(){var t,r,n,i,o,a,c,u,y="",g=!1;for(c=f,u=p,v("'"===(t=l[h])||'"'===t,"String literal must starts with a quote"),r=h,++h;h<d;){if((n=l[h++])===t){t="";break}if("\\"===n)if((n=l[h++])&&k(n.charCodeAt(0)))++f,"\r"===n&&"\n"===l[h]&&++h,p=h;else switch(n){case"u":case"x":a=h,(o=B(n))?y+=o:(h=a,y+=n);break;case"n":y+="\n";break;case"r":y+="\r";break;case"t":y+="\t";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;default:E(n)?(0!==(i="01234567".indexOf(n))&&(g=!0),h<d&&E(l[h])&&(g=!0,i=8*i+"01234567".indexOf(l[h++]),"0123".indexOf(n)>=0&&h<d&&E(l[h])&&(i=8*i+"01234567".indexOf(l[h++]))),y+=String.fromCharCode(i)):y+=n}else{if(k(n.charCodeAt(0)))break;y+=n}}return""!==t&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.StringLiteral,value:y,octal:g,startLineNumber:c,startLineStart:u,lineNumber:f,lineStart:p,start:r,end:h}}():46===t?w(l.charCodeAt(h+1))?$():U():w(t)?$():b.tokenize&&47===t?function(){var t,e;if(!(t=b.tokens[b.tokens.length-1]))return j();if("Punctuator"===t.type){if("]"===t.value)return U();if(")"===t.value)return!(e=b.tokens[b.openParenToken-1])||"Keyword"!==e.type||"if"!==e.value&&"while"!==e.value&&"for"!==e.value&&"with"!==e.value?U():j();if("}"===t.value){if(b.tokens[b.openCurlyToken-3]&&"Keyword"===b.tokens[b.openCurlyToken-3].type){if(!(e=b.tokens[b.openCurlyToken-4]))return U()}else{if(!b.tokens[b.openCurlyToken-4]||"Keyword"!==b.tokens[b.openCurlyToken-4].type)return U();if(!(e=b.tokens[b.openCurlyToken-5]))return j()}return n.indexOf(e.value)>=0?U():j()}return j()}return"Keyword"===t.type?j():U()}():U()}function z(){var t,n,i;return R(),t={start:{line:f,column:h-p}},n=F(),t.end={line:f,column:h-p},n.type!==e.EOF&&(i=l.slice(n.start,n.end),b.tokens.push({type:r[n.type],value:i,range:[n.start,n.end],loc:t})),n}function G(){var t;return h=(t=g).end,f=t.lineNumber,p=t.lineStart,g=void 0!==b.tokens?z():F(),h=t.end,f=t.lineNumber,p=t.lineStart,t}function W(){var t,e,r;t=h,e=f,r=p,g=void 0!==b.tokens?z():F(),h=t,f=e,p=r}function q(t,e){this.line=t,this.column=e}function H(t,e,r,n){this.start=new q(t,e),this.end=new q(r,n)}function X(){var t,e,r,n;return t=h,e=f,r=p,R(),n=f!==e,h=t,f=e,p=r,n}function V(t,e){var r,n=Array.prototype.slice.call(arguments,2),i=e.replace(/%(\d)/g,function(t,e){return v(e<n.length,"Message reference must be in range"),n[e]});throw"number"==typeof t.lineNumber?((r=new Error("Line "+t.lineNumber+": "+i)).index=t.start,r.lineNumber=t.lineNumber,r.column=t.start-p+1):((r=new Error("Line "+f+": "+i)).index=h,r.lineNumber=f,r.column=h-p+1),r.description=i,r}function K(){try{V.apply(null,arguments)}catch(t){if(!b.errors)throw t;b.errors.push(t)}}function J(t){if(t.type===e.EOF&&V(t,s.UnexpectedEOS),t.type===e.NumericLiteral&&V(t,s.UnexpectedNumber),t.type===e.StringLiteral&&V(t,s.UnexpectedString),t.type===e.Identifier&&V(t,s.UnexpectedIdentifier),t.type===e.Keyword){if(function(t){switch(t){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}(t.value))V(t,s.UnexpectedReserved);else if(u&&_(t.value))return void K(t,s.StrictReservedWord);V(t,s.UnexpectedToken,t.value)}V(t,s.UnexpectedToken,t.value)}function Q(t){var r=G();r.type===e.Punctuator&&r.value===t||J(r)}function Y(t){var r=G();r.type===e.Keyword&&r.value===t||J(r)}function Z(t){return g.type===e.Punctuator&&g.value===t}function tt(t){return g.type===e.Keyword&&g.value===t}function et(){var t;59===l.charCodeAt(h)||Z(";")?G():(t=f,R(),f===t&&(g.type===e.EOF||Z("}")||J(g)))}function rt(t){return t.type===i.Identifier||t.type===i.MemberExpression}function nt(t,e){var r,n,i;return r=u,i=g,n=Tt(),e&&u&&C(t[0].name)&&K(e,s.StrictParamName),u=r,y.markEnd(y.createFunctionExpression(null,t,[],n),i)}function it(){var t,r;return r=g,(t=G()).type===e.StringLiteral||t.type===e.NumericLiteral?(u&&t.octal&&K(t,s.StrictOctalLiteral),y.markEnd(y.createLiteral(t),r)):y.markEnd(y.createIdentifier(t.value),r)}function ot(){var t,r,n,i,o,a;return a=g,(t=g).type===e.Identifier?(n=it(),"get"!==t.value||Z(":")?"set"!==t.value||Z(":")?(Q(":"),i=gt(),y.markEnd(y.createProperty("init",n,i),a)):(r=it(),Q("("),(t=g).type!==e.Identifier?(Q(")"),K(t,s.UnexpectedToken,t.value),i=nt([])):(o=[vt()],Q(")"),i=nt(o,t)),y.markEnd(y.createProperty("set",r,i),a)):(r=it(),Q("("),Q(")"),i=nt([]),y.markEnd(y.createProperty("get",r,i),a))):t.type!==e.EOF&&t.type!==e.Punctuator?(r=it(),Q(":"),i=gt(),y.markEnd(y.createProperty("init",r,i),a)):void J(t)}function st(){var t,r,n,a;if(Z("("))return function(){var t;return Q("("),t=mt(),Q(")"),t}();if(Z("["))return function(){var t,e=[];for(t=g,Q("[");!Z("]");)Z(",")?(G(),e.push(null)):(e.push(gt()),Z("]")||Q(","));return G(),y.markEnd(y.createArrayExpression(e),t)}();if(Z("{"))return function(){var t,e,r,n,a,c=[],l={},h=String;for(a=g,Q("{");!Z("}");)e=(t=ot()).key.type===i.Identifier?t.key.name:h(t.key.value),n="init"===t.kind?o.Data:"get"===t.kind?o.Get:o.Set,r="$"+e,Object.prototype.hasOwnProperty.call(l,r)?(l[r]===o.Data?u&&n===o.Data?K({},s.StrictDuplicateProperty):n!==o.Data&&K({},s.AccessorDataProperty):n===o.Data?K({},s.AccessorDataProperty):l[r]&n&&K({},s.AccessorGetSet),l[r]|=n):l[r]=n,c.push(t),Z("}")||Q(",");return Q("}"),y.markEnd(y.createObjectExpression(c),a)}();if(t=g.type,a=g,t===e.Identifier)n=y.createIdentifier(G().value);else if(t===e.StringLiteral||t===e.NumericLiteral)u&&g.octal&&K(g,s.StrictOctalLiteral),n=y.createLiteral(G());else if(t===e.Keyword){if(tt("function"))return function(){var t,e,r,n,i,o,a,c,l=null,h=[];return c=g,Y("function"),Z("(")||(t=g,l=vt(),u?C(t.value)&&K(t,s.StrictFunctionName):C(t.value)?(r=t,n=s.StrictFunctionName):_(t.value)&&(r=t,n=s.StrictReservedWord)),h=(i=_t(r)).params,e=i.stricted,r=i.firstRestricted,i.message&&(n=i.message),a=u,o=Tt(),u&&r&&V(r,n),u&&e&&K(e,n),u=a,y.markEnd(y.createFunctionExpression(l,h,[],o),c)}();tt("this")?(G(),n=y.createThisExpression()):J(G())}else t===e.BooleanLiteral?((r=G()).value="true"===r.value,n=y.createLiteral(r)):t===e.NullLiteral?((r=G()).value=null,n=y.createLiteral(r)):Z("/")||Z("/=")?(n=void 0!==b.tokens?y.createLiteral(j()):y.createLiteral(D()),W()):J(G());return y.markEnd(n,a)}function at(){var t=[];if(Q("("),!Z(")"))for(;h<d&&(t.push(gt()),!Z(")"));)Q(",");return Q(")"),t}function ct(){var t,r;return r=g,function(t){return t.type===e.Identifier||t.type===e.Keyword||t.type===e.BooleanLiteral||t.type===e.NullLiteral}(t=G())||J(t),y.markEnd(y.createIdentifier(t.value),r)}function lt(){return Q("."),ct()}function ut(){var t;return Q("["),t=mt(),Q("]"),t}function ht(){var t,e,r;return r=g,Y("new"),t=function(){var t,e,r,n;for(n=g,t=m.allowIn,e=tt("new")?ht():st(),m.allowIn=t;Z(".")||Z("[");)Z("[")?(r=ut(),e=y.createMemberExpression("[",e,r)):(r=lt(),e=y.createMemberExpression(".",e,r)),y.markEnd(e,n);return e}(),e=Z("(")?at():[],y.markEnd(y.createNewExpression(t,e),r)}function ft(){var t,r,n=g;return t=function(){var t,e,r,n,i;for(i=g,t=m.allowIn,m.allowIn=!0,e=tt("new")?ht():st(),m.allowIn=t;;){if(Z("."))n=lt(),e=y.createMemberExpression(".",e,n);else if(Z("("))r=at(),e=y.createCallExpression(e,r);else{if(!Z("["))break;n=ut(),e=y.createMemberExpression("[",e,n)}y.markEnd(e,i)}return e}(),g.type===e.Punctuator&&(!Z("++")&&!Z("--")||X()||(u&&t.type===i.Identifier&&C(t.name)&&K({},s.StrictLHSPostfix),rt(t)||K({},s.InvalidLHSInAssignment),r=G(),t=y.markEnd(y.createPostfixExpression(r.value,t),n))),t}function pt(){var t,r,n;return g.type!==e.Punctuator&&g.type!==e.Keyword?r=ft():Z("++")||Z("--")?(n=g,t=G(),r=pt(),u&&r.type===i.Identifier&&C(r.name)&&K({},s.StrictLHSPrefix),rt(r)||K({},s.InvalidLHSInAssignment),r=y.createUnaryExpression(t.value,r),r=y.markEnd(r,n)):Z("+")||Z("-")||Z("~")||Z("!")?(n=g,t=G(),r=pt(),r=y.createUnaryExpression(t.value,r),r=y.markEnd(r,n)):tt("delete")||tt("void")||tt("typeof")?(n=g,t=G(),r=pt(),r=y.createUnaryExpression(t.value,r),r=y.markEnd(r,n),u&&"delete"===r.operator&&r.argument.type===i.Identifier&&K({},s.StrictDelete)):r=ft(),r}function dt(t,r){var n=0;if(t.type!==e.Punctuator&&t.type!==e.Keyword)return 0;switch(t.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=r?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function yt(){var t,e,r,n,i;return i=g,t=function(){var t,e,r,n,i,o,s,a,c,l;if(t=g,c=pt(),0===(i=dt(n=g,m.allowIn)))return c;for(n.prec=i,G(),e=[t,g],o=[c,n,s=pt()];(i=dt(g,m.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,c=o.pop(),r=y.createBinaryExpression(a,c,s),e.pop(),t=e[e.length-1],y.markEnd(r,t),o.push(r);(n=G()).prec=i,o.push(n),e.push(g),r=pt(),o.push(r)}for(r=o[l=o.length-1],e.pop();l>1;)r=y.createBinaryExpression(o[l-1].value,o[l-2],r),l-=2,t=e.pop(),y.markEnd(r,t);return r}(),Z("?")&&(G(),e=m.allowIn,m.allowIn=!0,r=gt(),m.allowIn=e,Q(":"),n=gt(),t=y.createConditionalExpression(t,r,n),y.markEnd(t,i)),t}function gt(){var t,r,n,o,a,c;return t=g,a=g,o=r=yt(),g.type===e.Punctuator&&("="===(c=g.value)||"*="===c||"/="===c||"%="===c||"+="===c||"-="===c||"<<="===c||">>="===c||">>>="===c||"&="===c||"^="===c||"|="===c)&&(rt(r)||K({},s.InvalidLHSInAssignment),u&&r.type===i.Identifier&&C(r.name)&&K(t,s.StrictLHSAssignment),t=G(),n=gt(),o=y.markEnd(y.createAssignmentExpression(t.value,r,n),a)),o}function mt(){var t,e=g;if(t=gt(),Z(",")){for(t=y.createSequenceExpression([t]);h<d&&Z(",");)G(),t.expressions.push(gt());y.markEnd(t,e)}return t}function bt(){var t,e;return e=g,Q("{"),t=function(){for(var t,e=[];h<d&&!Z("}")&&void 0!==(t=Ot());)e.push(t);return e}(),Q("}"),y.markEnd(y.createBlockStatement(t),e)}function vt(){var t,r;return r=g,(t=G()).type!==e.Identifier&&J(t),y.markEnd(y.createIdentifier(t.value),r)}function wt(t){var e,r,n=null;return r=g,e=vt(),u&&C(e.name)&&K({},s.StrictVarName),"const"===t?(Q("="),n=gt()):Z("=")&&(G(),n=gt()),y.markEnd(y.createVariableDeclarator(e,n),r)}function xt(t){var e=[];do{if(e.push(wt(t)),!Z(","))break;G()}while(h<d);return e}function Et(){var t,e,r,n,i,o,a,c,l,u;return t=e=r=null,Y("for"),Q("("),Z(";")?G():(tt("var")||tt("let")?(m.allowIn=!1,u=g,c=G(),l=xt(),t=y.markEnd(y.createVariableDeclaration(l,c.value),u),m.allowIn=!0,1===t.declarations.length&&tt("in")&&(G(),n=t,i=mt(),t=null)):(m.allowIn=!1,t=mt(),m.allowIn=!0,tt("in")&&(rt(t)||K({},s.InvalidLHSInForIn),G(),n=t,i=mt(),t=null)),void 0===n&&Q(";")),void 0===n&&(Z(";")||(e=mt()),Q(";"),Z(")")||(r=mt())),Q(")"),a=m.inIteration,m.inIteration=!0,o=It(),m.inIteration=a,void 0===n?y.createForStatement(t,e,r,o):y.createForInStatement(n,i,o)}function St(){var t,e,r,n=[];for(r=g,tt("default")?(G(),t=null):(Y("case"),t=mt()),Q(":");h<d&&!(Z("}")||tt("default")||tt("case"));)e=It(),n.push(e);return y.markEnd(y.createSwitchCase(t,n),r)}function kt(){var t,e,r,n,i=[],o=null;return Y("try"),t=bt(),tt("catch")&&i.push((n=g,Y("catch"),Q("("),Z(")")&&J(g),e=vt(),u&&C(e.name)&&K({},s.StrictCatchVariable),Q(")"),r=bt(),y.markEnd(y.createCatchClause(e,r),n))),tt("finally")&&(G(),o=bt()),0!==i.length||o||V({},s.NoCatchOrFinally),y.createTryStatement(t,[],i,o)}function It(){var t,r,n,o,a,c,f,p,b,v=g.type;if(v===e.EOF&&J(g),v===e.Punctuator&&"{"===g.value)return bt();if(o=g,v===e.Punctuator)switch(g.value){case";":return y.markEnd((Q(";"),y.createEmptyStatement()),o);case"(":return y.markEnd(function(){var t=mt();return et(),y.createExpressionStatement(t)}(),o)}if(v===e.Keyword)switch(g.value){case"break":return y.markEnd(function(){var t,r=null;return Y("break"),59===l.charCodeAt(h)?(G(),m.inIteration||m.inSwitch||V({},s.IllegalBreak),y.createBreakStatement(null)):X()?(m.inIteration||m.inSwitch||V({},s.IllegalBreak),y.createBreakStatement(null)):(g.type===e.Identifier&&(t="$"+(r=vt()).name,Object.prototype.hasOwnProperty.call(m.labelSet,t)||V({},s.UnknownLabel,r.name)),et(),null!==r||m.inIteration||m.inSwitch||V({},s.IllegalBreak),y.createBreakStatement(r))}(),o);case"continue":return y.markEnd(function(){var t,r=null;return Y("continue"),59===l.charCodeAt(h)?(G(),m.inIteration||V({},s.IllegalContinue),y.createContinueStatement(null)):X()?(m.inIteration||V({},s.IllegalContinue),y.createContinueStatement(null)):(g.type===e.Identifier&&(t="$"+(r=vt()).name,Object.prototype.hasOwnProperty.call(m.labelSet,t)||V({},s.UnknownLabel,r.name)),et(),null!==r||m.inIteration||V({},s.IllegalContinue),y.createContinueStatement(r))}(),o);case"debugger":return y.markEnd((Y("debugger"),et(),y.createDebuggerStatement()),o);case"do":return y.markEnd((Y("do"),b=m.inIteration,m.inIteration=!0,f=It(),m.inIteration=b,Y("while"),Q("("),p=mt(),Q(")"),Z(";")&&G(),y.createDoWhileStatement(f,p)),o);case"for":return y.markEnd(Et(),o);case"function":return y.markEnd(Ct(),o);case"if":return y.markEnd(function(){var t,e,r;return Y("if"),Q("("),t=mt(),Q(")"),e=It(),tt("else")?(G(),r=It()):r=null,y.createIfStatement(t,e,r)}(),o);case"return":return y.markEnd((c=null,Y("return"),m.inFunctionBody||K({},s.IllegalReturn),32===l.charCodeAt(h)&&I(l.charCodeAt(h+1))?(c=mt(),et(),y.createReturnStatement(c)):X()?y.createReturnStatement(null):(Z(";")||Z("}")||g.type===e.EOF||(c=mt()),et(),y.createReturnStatement(c))),o);case"switch":return y.markEnd(function(){var t,e,r,n,i;if(Y("switch"),Q("("),t=mt(),Q(")"),Q("{"),e=[],Z("}"))return G(),y.createSwitchStatement(t,e);for(n=m.inSwitch,m.inSwitch=!0,i=!1;h<d&&!Z("}");)null===(r=St()).test&&(i&&V({},s.MultipleDefaultsInSwitch),i=!0),e.push(r);return m.inSwitch=n,Q("}"),y.createSwitchStatement(t,e)}(),o);case"throw":return y.markEnd(function(){var t;return Y("throw"),X()&&V({},s.NewlineAfterThrow),t=mt(),et(),y.createThrowStatement(t)}(),o);case"try":return y.markEnd(kt(),o);case"var":return y.markEnd((Y("var"),a=xt(),et(),y.createVariableDeclaration(a,"var")),o);case"while":return y.markEnd(function(){var t,e,r;return Y("while"),Q("("),t=mt(),Q(")"),r=m.inIteration,m.inIteration=!0,e=It(),m.inIteration=r,y.createWhileStatement(t,e)}(),o);case"with":return y.markEnd(function(){var t,e;return u&&(R(),K({},s.StrictModeWith)),Y("with"),Q("("),t=mt(),Q(")"),e=It(),y.createWithStatement(t,e)}(),o)}return(t=mt()).type===i.Identifier&&Z(":")?(G(),n="$"+t.name,Object.prototype.hasOwnProperty.call(m.labelSet,n)&&V({},s.Redeclaration,"Label",t.name),m.labelSet[n]=!0,r=It(),delete m.labelSet[n],y.markEnd(y.createLabeledStatement(t,r),o)):(et(),y.markEnd(y.createExpressionStatement(t),o))}function Tt(){var t,r,n,o,a,c,f,p,b=[];for(p=g,Q("{");h<d&&g.type===e.StringLiteral&&(r=g,t=Ot(),b.push(t),t.expression.type===i.Literal);)"use strict"===l.slice(r.start+1,r.end-1)?(u=!0,n&&K(n,s.StrictOctalLiteral)):!n&&r.octal&&(n=r);for(o=m.labelSet,a=m.inIteration,c=m.inSwitch,f=m.inFunctionBody,m.labelSet={},m.inIteration=!1,m.inSwitch=!1,m.inFunctionBody=!0;h<d&&!Z("}")&&void 0!==(t=Ot());)b.push(t);return Q("}"),m.labelSet=o,m.inIteration=a,m.inSwitch=c,m.inFunctionBody=f,y.markEnd(y.createBlockStatement(b),p)}function _t(t){var e,r,n,i,o,a,c=[];if(Q("("),!Z(")"))for(i={};h<d&&(r=g,e=vt(),o="$"+r.value,u?(C(r.value)&&(n=r,a=s.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(n=r,a=s.StrictParamDupe)):t||(C(r.value)?(t=r,a=s.StrictParamName):_(r.value)?(t=r,a=s.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(t=r,a=s.StrictParamDupe)),c.push(e),i[o]=!0,!Z(")"));)Q(",");return Q(")"),{params:c,stricted:n,firstRestricted:t,message:a}}function Ct(){var t,e,r,n,i,o,a,c,l,h;return l=g,Y("function"),r=g,t=vt(),u?C(r.value)&&K(r,s.StrictFunctionName):C(r.value)?(o=r,a=s.StrictFunctionName):_(r.value)&&(o=r,a=s.StrictReservedWord),h=(i=_t(o)).params,n=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),c=u,e=Tt(),u&&o&&V(o,a),u&&n&&K(n,a),u=c,y.markEnd(y.createFunctionDeclaration(t,h,[],e),l)}function Ot(){if(g.type===e.Keyword)switch(g.value){case"const":case"let":return t=g.value,n=g,Y(t),r=xt(t),et(),y.markEnd(y.createVariableDeclaration(r,t),n);case"function":return Ct();default:return It()}var t,r,n;if(g.type!==e.EOF)return It()}function At(){var t,r;return R(),W(),r=g,u=!1,t=function(){for(var t,r,n,o=[];h<d&&(r=g).type===e.StringLiteral&&(t=Ot(),o.push(t),t.expression.type===i.Literal);)"use strict"===l.slice(r.start+1,r.end-1)?(u=!0,n&&K(n,s.StrictOctalLiteral)):!n&&r.octal&&(n=r);for(;h<d&&void 0!==(t=Ot());)o.push(t);return o}(),y.markEnd(y.createProgram(t),r)}function Lt(){var t,e,r,n=[];for(t=0;t<b.tokens.length;++t)r={type:(e=b.tokens[t]).type,value:e.value},b.range&&(r.range=e.range),b.loc&&(r.loc=e.loc),n.push(r);b.tokens=n}(r={})[(e={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",r[e.EOF]="<end>",r[e.Identifier]="Identifier",r[e.Keyword]="Keyword",r[e.NullLiteral]="Null",r[e.NumericLiteral]="Numeric",r[e.Punctuator]="Punctuator",r[e.StringLiteral]="String",r[e.RegularExpression]="RegularExpression",n=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},o={Data:1,Get:2,Set:4},s={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},a={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},c={name:"SyntaxTree",processComment:function(t){var e,r;if(!(t.type===i.Program&&t.body.length>0)){for(b.trailingComments.length>0?b.trailingComments[0].range[0]>=t.range[1]?(r=b.trailingComments,b.trailingComments=[]):b.trailingComments.length=0:b.bottomRightStack.length>0&&b.bottomRightStack[b.bottomRightStack.length-1].trailingComments&&b.bottomRightStack[b.bottomRightStack.length-1].trailingComments[0].range[0]>=t.range[1]&&(r=b.bottomRightStack[b.bottomRightStack.length-1].trailingComments,delete b.bottomRightStack[b.bottomRightStack.length-1].trailingComments);b.bottomRightStack.length>0&&b.bottomRightStack[b.bottomRightStack.length-1].range[0]>=t.range[0];)e=b.bottomRightStack.pop();e?e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=t.range[0]&&(t.leadingComments=e.leadingComments,delete e.leadingComments):b.leadingComments.length>0&&b.leadingComments[b.leadingComments.length-1].range[1]<=t.range[0]&&(t.leadingComments=b.leadingComments,b.leadingComments=[]),r&&(t.trailingComments=r),b.bottomRightStack.push(t)}},markEnd:function(t,e){return b.range&&(t.range=[e.start,h]),b.loc&&(t.loc=new H(void 0===e.startLineNumber?e.lineNumber:e.startLineNumber,e.start-(void 0===e.startLineStart?e.lineStart:e.startLineStart),f,h-p),this.postProcess(t)),b.attachComment&&this.processComment(t),t},postProcess:function(t){return b.source&&(t.loc.source=b.source),t},createArrayExpression:function(t){return{type:i.ArrayExpression,elements:t}},createAssignmentExpression:function(t,e,r){return{type:i.AssignmentExpression,operator:t,left:e,right:r}},createBinaryExpression:function(t,e,r){return{type:"||"===t||"&&"===t?i.LogicalExpression:i.BinaryExpression,operator:t,left:e,right:r}},createBlockStatement:function(t){return{type:i.BlockStatement,body:t}},createBreakStatement:function(t){return{type:i.BreakStatement,label:t}},createCallExpression:function(t,e){return{type:i.CallExpression,callee:t,arguments:e}},createCatchClause:function(t,e){return{type:i.CatchClause,param:t,body:e}},createConditionalExpression:function(t,e,r){return{type:i.ConditionalExpression,test:t,consequent:e,alternate:r}},createContinueStatement:function(t){return{type:i.ContinueStatement,label:t}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(t,e){return{type:i.DoWhileStatement,body:t,test:e}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(t){return{type:i.ExpressionStatement,expression:t}},createForStatement:function(t,e,r,n){return{type:i.ForStatement,init:t,test:e,update:r,body:n}},createForInStatement:function(t,e,r){return{type:i.ForInStatement,left:t,right:e,body:r,each:!1}},createFunctionDeclaration:function(t,e,r,n){return{type:i.FunctionDeclaration,id:t,params:e,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(t,e,r,n){return{type:i.FunctionExpression,id:t,params:e,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createIdentifier:function(t){return{type:i.Identifier,name:t}},createIfStatement:function(t,e,r){return{type:i.IfStatement,test:t,consequent:e,alternate:r}},createLabeledStatement:function(t,e){return{type:i.LabeledStatement,label:t,body:e}},createLiteral:function(t){return{type:i.Literal,value:t.value,raw:l.slice(t.start,t.end)}},createMemberExpression:function(t,e,r){return{type:i.MemberExpression,computed:"["===t,object:e,property:r}},createNewExpression:function(t,e){return{type:i.NewExpression,callee:t,arguments:e}},createObjectExpression:function(t){return{type:i.ObjectExpression,properties:t}},createPostfixExpression:function(t,e){return{type:i.UpdateExpression,operator:t,argument:e,prefix:!1}},createProgram:function(t){return{type:i.Program,body:t}},createProperty:function(t,e,r){return{type:i.Property,key:e,value:r,kind:t}},createReturnStatement:function(t){return{type:i.ReturnStatement,argument:t}},createSequenceExpression:function(t){return{type:i.SequenceExpression,expressions:t}},createSwitchCase:function(t,e){return{type:i.SwitchCase,test:t,consequent:e}},createSwitchStatement:function(t,e){return{type:i.SwitchStatement,discriminant:t,cases:e}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(t){return{type:i.ThrowStatement,argument:t}},createTryStatement:function(t,e,r,n){return{type:i.TryStatement,block:t,guardedHandlers:e,handlers:r,finalizer:n}},createUnaryExpression:function(t,e){return"++"===t||"--"===t?{type:i.UpdateExpression,operator:t,argument:e,prefix:!0}:{type:i.UnaryExpression,operator:t,argument:e,prefix:!0}},createVariableDeclaration:function(t,e){return{type:i.VariableDeclaration,declarations:t,kind:e}},createVariableDeclarator:function(t,e){return{type:i.VariableDeclarator,id:t,init:e}},createWhileStatement:function(t,e){return{type:i.WhileStatement,test:t,body:e}},createWithStatement:function(t,e){return{type:i.WithStatement,object:t,body:e}}},t.version="1.2.2",t.tokenize=function(t,r){var n;"string"==typeof t||t instanceof String||(t=String(t)),y=c,h=0,f=(l=t).length>0?1:0,p=0,d=l.length,g=null,m={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},(r=r||{}).tokens=!0,b.tokens=[],b.tokenize=!0,b.openParenToken=-1,b.openCurlyToken=-1,b.range="boolean"==typeof r.range&&r.range,b.loc="boolean"==typeof r.loc&&r.loc,"boolean"==typeof r.comment&&r.comment&&(b.comments=[]),"boolean"==typeof r.tolerant&&r.tolerant&&(b.errors=[]);try{if(W(),g.type===e.EOF)return b.tokens;for(G();g.type!==e.EOF;)try{G()}catch(t){if(b.errors){b.errors.push(t);break}throw t}Lt(),n=b.tokens,void 0!==b.comments&&(n.comments=b.comments),void 0!==b.errors&&(n.errors=b.errors)}catch(t){throw t}finally{b={}}return n},t.parse=function(t,e){var r,n;n=String,"string"==typeof t||t instanceof String||(t=n(t)),y=c,h=0,f=(l=t).length>0?1:0,p=0,d=l.length,g=null,m={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},void 0!==e&&(b.range="boolean"==typeof e.range&&e.range,b.loc="boolean"==typeof e.loc&&e.loc,b.attachComment="boolean"==typeof e.attachComment&&e.attachComment,b.loc&&null!==e.source&&void 0!==e.source&&(b.source=n(e.source)),"boolean"==typeof e.tokens&&e.tokens&&(b.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(b.comments=[]),"boolean"==typeof e.tolerant&&e.tolerant&&(b.errors=[]),b.attachComment&&(b.range=!0,b.comments=[],b.bottomRightStack=[],b.trailingComments=[],b.leadingComments=[]));try{r=At(),void 0!==b.comments&&(r.comments=b.comments),void 0!==b.tokens&&(Lt(),r.tokens=b.tokens),void 0!==b.errors&&(r.errors=b.errors)}catch(t){throw t}finally{b={}}return r},t.Syntax=function(){var t,e={};for(t in"function"==typeof Object.create&&(e=Object.create(null)),i)i.hasOwnProperty(t)&&(e[t]=i[t]);return"function"==typeof Object.freeze&&Object.freeze(e),e}()})},{}],1:[function(t,e,r){(function(n){var i=function(){var t={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(t,r,n,i,o,s,a){i.ast||(i.ast=e,e.initialize());var c=s.length-1;switch(o){case 1:return i.ast.set({expression:{type:"root",value:s[c]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:s[c-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:s[c-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:s[c]}});break;case 15:i.ast.set({expression:{type:"identifier",value:s[c]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:s[c]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(s[c])}});break;case 24:s[c].length>1?i.ast.set({expression:{type:"union",value:s[c]}}):this.$=s[c];break;case 25:this.$=[s[c]];break;case 26:this.$=s[c-2].concat(s[c]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(s[c])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:s[c]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:s[c]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:s[c]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:s[c]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:s[c]}},i.ast.set(this.$);break;case 33:case 34:this.$=s[c]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],o=this.table,s="",a=0,c=0,l=0,u=i.slice.call(arguments,1);this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;i.push(h);var f=this.lexer.options&&this.lexer.options.ranges;function p(){var t;return"number"!=typeof(t=e.lexer.lex()||1)&&(t=e.symbols_[t]||t),t}"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var d,y,g,m,b,v,w,x,E,S={};;){if(g=r[r.length-1],this.defaultActions[g]?m=this.defaultActions[g]:(null==d&&(d=p()),m=o[g]&&o[g][d]),void 0===m||!m.length||!m[0]){var k;for(v in E=[],o[g])this.terminals_[v]&&v>2&&E.push("'"+this.terminals_[v]+"'");k=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:h,expected:E})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+d);switch(m[0]){case 1:r.push(d),n.push(this.lexer.yytext),i.push(this.lexer.yylloc),r.push(m[1]),d=null,y?(d=y,y=null):(c=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,l>0&&l--);break;case 2:if(w=this.productions_[m[1]][1],S.$=n[n.length-w],S._$={first_line:i[i.length-(w||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(w||1)].first_column,last_column:i[i.length-1].last_column},f&&(S._$.range=[i[i.length-(w||1)].range[0],i[i.length-1].range[1]]),void 0!==(b=this.performAction.apply(S,[s,c,a,this.yy,m[1],n,i].concat(u))))return b;w&&(r=r.slice(0,-1*w*2),n=n.slice(0,-1*w),i=i.slice(0,-1*w)),r.push(this.productions_[m[1]][0]),n.push(S.$),i.push(S._$),x=o[r[r.length-2]][r[r.length-1]],r.push(x);break;case 3:return!0}}return!0}},e={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(t){for(var e in t)this._node[e]=t[e];return this._node},node:function(t){return arguments.length&&(this._node=t),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var t=this._nodes;return this.initialize(),t}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((r=this._input.match(this.rules[i[o]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return e.yytext=e.yytext.substr(1,e.yyleng-2),32;case 11:return e.yytext=e.yytext.substr(1,e.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function n(){this.yy={}}return t.lexer=r,n.prototype=t,t.Parser=n,new n}();void 0!==t&&void 0!==r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},void 0!==e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:14,fs:12,path:13}],2:[function(t,e,r){e.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(t,e,r){var n=t("./dict"),i=t("fs"),o={lex:{macros:{esc:"\\\\",int:n.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[n.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[n.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[n.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(o.moduleInclude=i.readFileSync(t.resolve("../include/module.js")),o.actionInclude=i.readFileSync(t.resolve("../include/action.js"))),e.exports=o},{"./dict":2,fs:12}],4:[function(t,e,r){var n=t("./aesprim"),i=t("./slice"),o=t("static-eval"),s=t("underscore").uniq,a=function(){return this.initialize.apply(this,arguments)};function c(e,r,i){var o=t("./index"),s=p(n.parse(r).body[0].expression,{"@":e.value}),a=i.replace(/\{\{\s*value\s*\}\}/g,s),c=o.nodes(e.value,a);return c.forEach(function(t){t.path=e.path.concat(t.path.slice(1))}),c}function l(t){return Array.isArray(t)}function u(t){return function(e,r,n,i){var o=e.value,s=e.path,a=[],c=function(e,o){var s;l(e)?(e.forEach(function(t,e){a.length>=i||n(e,t,r)&&a.push({path:o.concat(e),value:t})}),e.forEach(function(e,r){a.length>=i||t&&c(e,o.concat(r))})):(s=e)&&!(s instanceof Array)&&s instanceof Object&&(this.keys(e).forEach(function(t){a.length>=i||n(t,e[t],r)&&a.push({path:o.concat(t),value:e[t]})}),this.keys(e).forEach(function(r){a.length>=i||t&&c(e[r],o.concat(r))}))}.bind(this);return c(o,s),a}}function h(t){return function(e,r,n){return this.descend(r,e.expression.value,t,n)}}function f(t){return function(e,r,n){return this.traverse(r,e.expression.value,t,n)}}function p(){try{return o.apply(this,arguments)}catch(t){}}function d(t){return t=t.filter(function(t){return t}),s(t,function(t){return t.path.map(function(t){return String(t).replace("-","--")}).join("-")})}function y(t){var e=String(t);return e.match(/^-?[0-9]+$/)?parseInt(e):null}a.prototype.initialize=function(){this.traverse=u(!0),this.descend=u()},a.prototype.keys=Object.keys,a.prototype.resolve=function(t){var e=[t.operation,t.scope,t.expression.type].join("-"),r=this._fns[e];if(!r)throw new Error("couldn't resolve key: "+e);return r.bind(this)},a.prototype.register=function(t,e){if(!e instanceof Function)throw new Error("handler must be a function");this._fns[t]=e},a.prototype._fns={"member-child-identifier":function(t,e){var r=t.expression.value,n=e.value;if(n instanceof Object&&r in n)return[{value:n[r],path:e.path.concat(r)}]},"member-descendant-identifier":f(function(t,e,r){return t==r}),"subscript-child-numeric_literal":h(function(t,e,r){return t===r}),"member-child-numeric_literal":h(function(t,e,r){return String(t)===String(r)}),"subscript-descendant-numeric_literal":f(function(t,e,r){return t===r}),"member-child-wildcard":h(function(){return!0}),"member-descendant-wildcard":f(function(){return!0}),"subscript-descendant-wildcard":f(function(){return!0}),"subscript-child-wildcard":h(function(){return!0}),"subscript-child-slice":function(t,e){if(l(e.value)){var r=t.expression.value.split(":").map(y),n=e.value.map(function(t,r){return{value:t,path:e.path.concat(r)}});return i.apply(null,[n].concat(r))}},"subscript-child-union":function(t,e){var r=[];return t.expression.value.forEach(function(t){var n={operation:"subscript",scope:"child",expression:t.expression},i=this.resolve(n)(n,e);i&&(r=r.concat(i))},this),d(r)},"subscript-descendant-union":function(e,r,n){var i=t(".."),o=this,s=[];return i.nodes(r,"$..*").slice(1).forEach(function(t){s.length>=n||e.expression.value.forEach(function(e){var r={operation:"subscript",scope:"child",expression:e.expression},n=o.resolve(r)(r,t);s=s.concat(n)})}),d(s)},"subscript-child-filter_expression":function(t,e,r){var i=t.expression.value.slice(2,-1),o=n.parse(i).body[0].expression;return this.descend(e,null,function(t,e){return p(o,{"@":e})},r)},"subscript-descendant-filter_expression":function(t,e,r){var i=t.expression.value.slice(2,-1),o=n.parse(i).body[0].expression;return this.traverse(e,null,function(t,e){return p(o,{"@":e})},r)},"subscript-child-script_expression":function(t,e){return c(e,t.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(t,e){return c(e,t.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(t,e){return c(e,t.expression.value.slice(1,-1),"$..value")}},a.prototype._fns["subscript-child-string_literal"]=a.prototype._fns["member-child-identifier"],a.prototype._fns["member-descendant-numeric_literal"]=a.prototype._fns["subscript-descendant-string_literal"]=a.prototype._fns["member-descendant-identifier"],e.exports=a},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(t,e,r){var n=t("assert"),i=t("./dict"),o=t("./parser"),s=t("./handlers"),a=function(){this.initialize.apply(this,arguments)};function c(t){return"[object String]"==Object.prototype.toString.call(t)}a.prototype.initialize=function(){this.parser=new o,this.handlers=new s},a.prototype.parse=function(t){return n.ok(c(t),"we need a path"),this.parser.parse(t)},a.prototype.parent=function(t,e){n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path");var r=this.nodes(t,e)[0];return r.path.pop(),this.value(t,r.path)},a.prototype.apply=function(t,e,r){n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),n.equal(typeof r,"function","fn needs to be function");var i=this.nodes(t,e).sort(function(t,e){return e.path.length-t.path.length});return i.forEach(function(e){var n=e.path.pop(),i=this.value(t,this.stringify(e.path)),o=e.value=r.call(t,i[n]);i[n]=o},this),i},a.prototype.value=function(t,e,r){if(n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),arguments.length>=3){var i=this.nodes(t,e).shift();if(!i)return this._vivify(t,e,r);var o=i.path.slice(-1).shift();this.parent(t,this.stringify(i.path))[o]=r}return this.query(t,this.stringify(e),1).shift()},a.prototype._vivify=function(t,e,r){var i=this;n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path");var o=this.parser.parse(e).map(function(t){return t.expression.value}),s=function(e,r){var n=e.pop(),o=i.value(t,e);o||(s(e.concat(),"string"==typeof n?{}:[]),o=i.value(t,e)),o[n]=r};return s(o,r),this.query(t,e)[0]},a.prototype.query=function(t,e,r){return n.ok(t instanceof Object,"obj needs to be an object"),n.ok(c(e),"we need a path"),this.nodes(t,e,r).map(function(t){return t.value})},a.prototype.paths=function(t,e,r){return n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),this.nodes(t,e,r).map(function(t){return t.path})},a.prototype.nodes=function(t,e,r){if(n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),0===r)return[];var i=this.parser.parse(e),o=this.handlers,s=[{path:["$"],value:t}],a=[];return i.length&&"root"==i[0].expression.type&&i.shift(),i.length?(i.forEach(function(t,e){if(!(a.length>=r)){var n=o.resolve(t),c=[];s.forEach(function(o){if(!(a.length>=r)){var s=n(t,o,r);e==i.length-1?a=a.concat(s||[]):c=c.concat(s||[])}}),s=c}}),r?a.slice(0,r):a):s},a.prototype.stringify=function(t){n.ok(t,"we need a path");var e="$",r={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(t=this._normalize(t)).forEach(function(t){if("root"!=t.expression.type){var n,i=[t.scope,t.operation].join("-"),o=r[i];if(n="string_literal"==t.expression.type?JSON.stringify(t.expression.value):t.expression.value,!o)throw new Error("couldn't find template "+i);e+=o.replace(/{{value}}/,n)}}),e},a.prototype._normalize=function(t){if(n.ok(t,"we need a path"),"string"==typeof t)return this.parser.parse(t);if(Array.isArray(t)&&"string"==typeof t[0]){var e=[{expression:{type:"root",value:"$"}}];return t.forEach(function(t,r){if("$"!=t||0!==r)if("string"==typeof t&&t.match("^"+i.identifier+"$"))e.push({operation:"member",scope:"child",expression:{value:t,type:"identifier"}});else{var n="number"==typeof t?"numeric_literal":"string_literal";e.push({operation:"subscript",scope:"child",expression:{value:t,type:n}})}}),e}if(Array.isArray(t)&&"object"==typeof t[0])return t;throw new Error("couldn't understand path "+t)},a.Handlers=s,a.Parser=o;var l=new a;l.JSONPath=a,e.exports=l},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(t,e,r){var n=t("./grammar"),i=t("../generated/parser"),o=function(){var t=new i.Parser,e=t.parseError;return t.yy.parseError=function(){t.yy.ast&&t.yy.ast.initialize(),e.apply(t,arguments)},t};o.grammar=n,e.exports=o},{"../generated/parser":1,"./grammar":3}],7:[function(t,e,r){function n(t){return String(t).match(/^[0-9]+$/)?parseInt(t):Number.isFinite(t)?parseInt(t,10):0}e.exports=function(t,e,r,i){if("string"==typeof e)throw new Error("start cannot be a string");if("string"==typeof r)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=t.length;if(0===i)throw new Error("step cannot be zero");if(i=i?n(i):1,r=r<0?o+r:r,e=n(0===(e=e<0?o+e:e)?0:e||(i>0?0:o-1)),r=n(0===r?0:r||(i>0?o:-1)),e=i>0?Math.max(0,e):Math.min(o,e),r=i>0?Math.min(r,o):Math.max(-1,r),i>0&&r<=e)return[];if(i<0&&e<=r)return[];for(var s=[],a=e;a!=r&&!(i<0&&a<=r||i>0&&a>=r);a+=i)s.push(t[a]);return s}},{}],8:[function(t,e,r){var n=t("util/"),i=Array.prototype.slice,o=Object.prototype.hasOwnProperty,s=e.exports=u;function a(t,e){return n.isUndefined(e)?""+e:n.isNumber(e)&&!isFinite(e)||n.isFunction(e)||n.isRegExp(e)?e.toString():e}function c(t,e){return n.isString(t)?t.length<e?t:t.slice(0,e):t}function l(t,e,r,n,i){throw new s.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function u(t,e){t||l(t,!0,e,"==",s.ok)}function h(t,e){if(t===e)return!0;if(n.isBuffer(t)&&n.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return n.isDate(t)&&n.isDate(e)?t.getTime()===e.getTime():n.isRegExp(t)&&n.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:n.isObject(t)||n.isObject(e)?function(t,e){if(n.isNullOrUndefined(t)||n.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(n.isPrimitive(t)||n.isPrimitive(e))return t===e;var r=f(t),o=f(e);if(r&&!o||!r&&o)return!1;if(r)return h(t=i.call(t),e=i.call(e));var s,a,c=y(t),l=y(e);if(c.length!=l.length)return!1;for(c.sort(),l.sort(),a=c.length-1;a>=0;a--)if(c[a]!=l[a])return!1;for(a=c.length-1;a>=0;a--)if(!h(t[s=c[a]],e[s]))return!1;return!0}(t,e):t==e}function f(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function p(t,e){return!(!t||!e)&&("[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e||!0===e.call({},t))}function d(t,e,r,i){var o;n.isString(r)&&(i=r,r=null);try{e()}catch(t){o=t}if(i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!o&&l(o,r,"Missing expected exception"+i),!t&&p(o,r)&&l(o,r,"Got unwanted exception"+i),t&&o&&r&&!p(o,r)||!t&&o)throw o}s.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return c(JSON.stringify(t.actual,a),128)+" "+t.operator+" "+c(JSON.stringify(t.expected,a),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=e.name,o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},n.inherits(s.AssertionError,Error),s.fail=l,s.ok=u,s.equal=function(t,e,r){t!=e&&l(t,e,r,"==",s.equal)},s.notEqual=function(t,e,r){t==e&&l(t,e,r,"!=",s.notEqual)},s.deepEqual=function(t,e,r){h(t,e)||l(t,e,r,"deepEqual",s.deepEqual)},s.notDeepEqual=function(t,e,r){h(t,e)&&l(t,e,r,"notDeepEqual",s.notDeepEqual)},s.strictEqual=function(t,e,r){t!==e&&l(t,e,r,"===",s.strictEqual)},s.notStrictEqual=function(t,e,r){t===e&&l(t,e,r,"!==",s.notStrictEqual)},s.throws=function(t,e,r){d.apply(this,[!0].concat(i.call(arguments)))},s.doesNotThrow=function(t,e){d.apply(this,[!1].concat(i.call(arguments)))},s.ifError=function(t){if(t)throw t};var y=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&&e.push(r);return e}},{"util/":11}],9:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],10:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],11:[function(t,e,n){(function(e,r){var i=/%[sdj%]/g;n.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),c=n[r];r<o;c=n[++r])y(c)||!w(c)?s+=" "+c:s+=" "+a(c);return s},n.deprecate=function(t,i){if(b(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,s={};function a(t,e){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(e)?r.showHidden=e:e&&n._extend(r,e),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),u(r,t,r.depth)}function c(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function l(t,e){return t}function u(t,e,r){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return m(i)||(i=u(t,i,r)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,e);if(o)return o;var s=Object.keys(e),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),E(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(e);if(0===s.length){if(S(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(v(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(E(e))return h(e)}var l,w="",k=!1,I=["{","}"];return p(e)&&(k=!0,I=["[","]"]),S(e)&&(w=" [Function"+(e.name?": "+e.name:"")+"]"),v(e)&&(w=" "+RegExp.prototype.toString.call(e)),x(e)&&(w=" "+Date.prototype.toUTCString.call(e)),E(e)&&(w=" "+h(e)),0!==s.length||k&&0!=e.length?r<0?v(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),l=k?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)_(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}(t,e,r,a,s):s.map(function(n){return f(t,e,r,a,n,k)}),t.seen.pop(),function(t,e,r){return t.reduce(function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(l,w,I)):I[0]+w+I[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),_(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=y(r)?u(t,c.value,null):u(t,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return"number"==typeof t}function m(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return w(t)&&"[object RegExp]"===k(t)}function w(t){return"object"==typeof t&&null!==t}function x(t){return w(t)&&"[object Date]"===k(t)}function E(t){return w(t)&&("[object Error]"===k(t)||t instanceof Error)}function S(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}n.debuglog=function(t){if(b(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=e.pid;s[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else s[t]=function(){};return s[t]},n.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=p,n.isBoolean=d,n.isNull=y,n.isNullOrUndefined=function(t){return null==t},n.isNumber=g,n.isString=m,n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=b,n.isRegExp=v,n.isObject=w,n.isDate=x,n.isError=E,n.isFunction=S,n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],e].join(" ")),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(t,e,r){},{}],13:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}r.resolve=function(){for(var r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,i="/"===s.charAt(0))}return(i?"/":"")+(r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"))||"."},r.normalize=function(t){var o=r.isAbsolute(t),s="/"===i(t,-1);return(t=e(n(t.split("/"),function(t){return!!t}),!o).join("/"))||o||(t="."),t&&s&&(t+="/"),(o?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),s=Math.min(i.length,o.length),a=s,c=0;c<s;c++)if(i[c]!==o[c]){a=c;break}var l=[];for(c=a;c<i.length;c++)l.push("..");return(l=l.concat(o.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===e?e=s:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=s+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i=function(t,e,r){return t.substr(e,r)}}).call(this,t("_process"))},{_process:14}],14:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,u=[],h=!1,f=-1;function p(){h&&l&&(h=!1,l.length?u=l.concat(u):f=-1,u.length&&d())}function d(){if(!h){var t=c(p);h=!0;for(var e=u.length;e;){for(l=u,u=[];++f<e;)l&&l[f].run();f=-1,e=u.length}l=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new y(t,e)),1!==u.length||h||c(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],15:[function(t,e,r){var n=t("escodegen").generate;e.exports=function(t,e){e||(e={});var r={},i=function t(i,o){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var s=t(i.argument);return"+"===i.operator?+s:"-"===i.operator?-s:"~"===i.operator?~s:"!"===i.operator?!s:r}if("ArrayExpression"===i.type){for(var a=[],c=0,l=i.elements.length;c<l;c++){if((m=t(i.elements[c]))===r)return r;a.push(m)}return a}if("ObjectExpression"===i.type){var u={};for(c=0;c<i.properties.length;c++){var h=null===(b=i.properties[c]).value?b.value:t(b.value);if(h===r)return r;u[b.key.value||b.key.name]=h}return u}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((l=t(i.left))===r)return r;var f=t(i.right);if(f===r)return r;var p=i.operator;return"=="===p?l==f:"==="===p?l===f:"!="===p?l!=f:"!=="===p?l!==f:"+"===p?l+f:"-"===p?l-f:"*"===p?l*f:"/"===p?l/f:"%"===p?l%f:"<"===p?l<f:"<="===p?l<=f:">"===p?l>f:">="===p?l>=f:"|"===p?l|f:"&"===p?l&f:"^"===p?l^f:"&&"===p?l&&f:"||"===p?l||f:r}if("Identifier"===i.type)return{}.hasOwnProperty.call(e,i.name)?e[i.name]:r;if("ThisExpression"===i.type)return{}.hasOwnProperty.call(e,"this")?e.this:r;if("CallExpression"===i.type){var d=t(i.callee);if(d===r)return r;if("function"!=typeof d)return r;var y=i.callee.object?t(i.callee.object):r;y===r&&(y=null);var g=[];for(c=0,l=i.arguments.length;c<l;c++){var m;if((m=t(i.arguments[c]))===r)return r;g.push(m)}return d.apply(y,g)}var b;if("MemberExpression"===i.type)return(u=t(i.object))===r||"function"==typeof u?r:"Identifier"===i.property.type?u[i.property.name]:(b=t(i.property))===r?r:u[b];if("ConditionalExpression"===i.type)return(s=t(i.test))===r?r:t(s?i.consequent:i.alternate);if("ExpressionStatement"===i.type)return(s=t(i.expression))===r?r:s;if("ReturnStatement"===i.type)return t(i.argument);if("FunctionExpression"===i.type){var v=i.body.body,w={};for(Object.keys(e).forEach(function(t){w[t]=e[t]}),c=0;c<i.params.length;c++){var x=i.params[c];if("Identifier"!=x.type)return r;e[x.name]=null}for(var c in v)if(t(v[c])===r)return r;e=w;var E=Object.keys(e),S=E.map(function(t){return e[t]});return Function(E.join(", "),"return "+n(i)).apply(null,S)}if("TemplateLiteral"===i.type){var k="";for(c=0;c<i.expressions.length;c++)k+=t(i.quasis[c]),k+=t(i.expressions[c]);return k+t(i.quasis[c])}if("TaggedTemplateExpression"===i.type){var I=t(i.tag),T=i.quasi,_=T.quasis.map(t),C=T.expressions.map(t);return I.apply(null,[_].concat(C))}return"TemplateElement"===i.type?i.value.cooked:r}(t);return i===r?void 0:i}},{escodegen:12}],jsonpath:[function(t,e,r){e.exports=t("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},295:(t,e,r)=>{"use strict";r.r(e),r.d(e,{ResizeObserver:()=>F,ResizeObserverEntry:()=>k,ResizeObserverSize:()=>l});var n,i=[],o=function(){return i.some(function(t){return t.activeTargets.length>0})},s="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(n||(n={}));var a,c=function(t){return Object.freeze(t)},l=function(t,e){this.inlineSize=t,this.blockSize=e,c(this)},u=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,c(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),h=function(t){return t instanceof SVGElement&&"getBBox"in t},f=function(t){if(h(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},p=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},d="undefined"!=typeof window?window:{},y=new WeakMap,g=/auto|scroll/,m=/^tb|vertical/,b=/msie|trident/i.test(d.navigator&&d.navigator.userAgent),v=function(t){return parseFloat(t||"0")},w=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new l((r?e:t)||0,(r?t:e)||0)},x=c({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new u(0,0,0,0)}),E=function(t,e){if(void 0===e&&(e=!1),y.has(t)&&!e)return y.get(t);if(f(t))return y.set(t,x),x;var r=getComputedStyle(t),n=h(t)&&t.ownerSVGElement&&t.getBBox(),i=!b&&"border-box"===r.boxSizing,o=m.test(r.writingMode||""),s=!n&&g.test(r.overflowY||""),a=!n&&g.test(r.overflowX||""),l=n?0:v(r.paddingTop),p=n?0:v(r.paddingRight),d=n?0:v(r.paddingBottom),E=n?0:v(r.paddingLeft),S=n?0:v(r.borderTopWidth),k=n?0:v(r.borderRightWidth),I=n?0:v(r.borderBottomWidth),T=E+p,_=l+d,C=(n?0:v(r.borderLeftWidth))+k,O=S+I,A=a?t.offsetHeight-O-t.clientHeight:0,L=s?t.offsetWidth-C-t.clientWidth:0,P=i?T+C:0,R=i?_+O:0,B=n?n.width:v(r.width)-P-L,N=n?n.height:v(r.height)-R-A,M=B+T+L+C,U=N+_+A+O,$=c({devicePixelContentBoxSize:w(Math.round(B*devicePixelRatio),Math.round(N*devicePixelRatio),o),borderBoxSize:w(M,U,o),contentBoxSize:w(B,N,o),contentRect:new u(E,l,B,N)});return y.set(t,$),$},S=function(t,e,r){var i=E(t,r),o=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(e){case n.DEVICE_PIXEL_CONTENT_BOX:return a;case n.BORDER_BOX:return o;default:return s}},k=function(t){var e=E(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=c([e.borderBoxSize]),this.contentBoxSize=c([e.contentBoxSize]),this.devicePixelContentBoxSize=c([e.devicePixelContentBoxSize])},I=function(t){if(f(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},T=function(){var t=1/0,e=[];i.forEach(function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach(function(e){var r=new k(e.target),i=I(e.target);n.push(r),e.lastReportedSize=S(e.target,e.observedBox),i<t&&(t=i)}),e.push(function(){r.callback.call(r.observer,n,r.observer)}),r.activeTargets.splice(0,r.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++)(0,n[r])();return t},_=function(t){i.forEach(function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach(function(r){r.isActive()&&(I(r.target)>t?e.activeTargets.push(r):e.skippedTargets.push(r))})})},C=[],O=0,A={attributes:!0,characterData:!0,childList:!0,subtree:!0},L=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],P=function(t){return void 0===t&&(t=0),Date.now()+t},R=!1,B=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!R){R=!0;var r,n=P(t);r=function(){var r=!1;try{r=function(){var t,e=0;for(_(e);o();)e=T(),_(e);return i.some(function(t){return t.skippedTargets.length>0})&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:s}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=s),window.dispatchEvent(t)),e>0}()}finally{if(R=!1,t=n-P(),!O)return;r?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!a){var e=0,r=document.createTextNode("");new MutationObserver(function(){return C.splice(0).forEach(function(t){return t()})}).observe(r,{characterData:!0}),a=function(){r.textContent="".concat(e?e--:e++)}}C.push(t),a()}(function(){requestAnimationFrame(r)})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,A)};document.body?e():d.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),L.forEach(function(e){return d.addEventListener(e,t.listener,!0)}))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),L.forEach(function(e){return d.removeEventListener(e,t.listener,!0)}),this.stopped=!0)},t}()),N=function(t){!O&&t>0&&B.start(),!(O+=t)&&B.stop()},M=function(){function t(t,e){this.target=t,this.observedBox=e||n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=S(this.target,this.observedBox,!0);return t=this.target,h(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),U=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},$=new WeakMap,D=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},j=function(){function t(){}return t.connect=function(t,e){var r=new U(t,e);$.set(t,r)},t.observe=function(t,e,r){var n=$.get(t),o=0===n.observationTargets.length;D(n.observationTargets,e)<0&&(o&&i.push(n),n.observationTargets.push(new M(e,r&&r.box)),N(1),B.schedule())},t.unobserve=function(t,e){var r=$.get(t),n=D(r.observationTargets,e),o=1===r.observationTargets.length;n>=0&&(o&&i.splice(i.indexOf(r),1),r.observationTargets.splice(n,1),N(-1))},t.disconnect=function(t){var e=this,r=$.get(t);r.observationTargets.slice().forEach(function(r){return e.unobserve(t,r.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),F=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");j.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");j.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");j.unobserve(this,t)},t.prototype.disconnect=function(){j.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}()},318:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,l=c>>1,u=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+t[e+h],h+=f,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+t[e+h],h+=f,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,l=8*o-i-1,u=(1<<l)-1,h=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[r+p]=255&s,p+=d,s/=256,l-=8);t[r+p-d]|=128*y}},949:(t,e,r)=>{"use strict";var n,i=r(48).hp,o=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,h=(t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of c(e))u.call(t,i)||i===r||s(t,i,{get:()=>e[i],enumerable:!(n=a(e,i))||n.enumerable});return t},f=(t,e,r)=>(r=null!=t?o(l(t)):{},h(!e&&t&&t.__esModule?r:s(r,"default",{value:t,enumerable:!0}),t)),p={};((t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})})(p,{BoxType:()=>b,DEFAULT_TARGET:()=>m,Render2d:()=>E,RenderBlur:()=>I,RenderBox:()=>v,RenderClasses:()=>H,RenderContour:()=>G,RenderFace:()=>T,RenderHand:()=>P,RenderKeyPoints:()=>W,RenderMask:()=>z,RenderPose:()=>N,RenderText:()=>q,RenderTrail:()=>F,Renderer2d:()=>k,default:()=>X}),t.exports=(n=p,h(s({},"__esModule",{value:!0}),n));var d=r(295),y=class t{constructor(e){this.scale=1,this.cornerWidth=.3,this.cornerPadding=.04,this.colors=t.defaultColors,"document"in globalThis&&"implementation"in globalThis.document&&new d.ResizeObserver(t=>{const r=t[0].contentRect;this.font=this.calculateFont(r.width,r.height),this.scale=this.calculateScale(e)}).observe(e.canvas),this.font=this.calculateFont(e.canvas.width,e.canvas.height),this.scale=this.calculateScale(e)}calculateFont(t,e){return Math.floor(Math.max(12,.035*Math.min(t,e)))+"px Times New Roman"}calculateScale(t){const e="undefined"==typeof screen?null:screen,r="undefined"==typeof window?null:window,n=e?.width??t.canvas.width,i=e?.height??t.canvas.height;return Math.max(t.canvas.width/n,t.canvas.height/i)*(r?.devicePixelRatio??1)}};y.defaultColors={primary_color:"#2fa7d7",secondary_color:"#94e0ff",right_color:"#000000",left_color:"#ffffff",opacity_color:"rgba(47, 167, 215, 0.2)",white:"#FFFFFF",black:"#111111",blank_color:"#000000"};var g=y,m="$..objects[?(@.category=='person')]",b=(t=>(t.Rich="rich",t.Simple="simple",t.SimpleSelected="simpleSelected",t))(b||{}),v=class t{constructor(t={}){this.target=m;const{showClass:e=!0,showConfidence:r=!1,showTrackId:n=!1,showNestedClasses:i=!1,target:o="$..objects.*",boxType:s="rich"}=t;this.target=o,this.showClass=e,this.showNestedClasses=i,this.showConfidence=r,this.showTrackId=n,this.boxType=s}start(t,e){this.context=t,this.style=e}draw(e,r,n,i,o,s,a){if("simple"===this.boxType)return void this.drawSimple(e,r,n,i,o,s,a);if("simpleSelected"===this.boxType)return void this.drawSimpleSelected(e,r,n,i,o,s,a);const c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");const u=r+e.x*i,h=n+e.y*o,f=e.width*i,p=e.height*o;e.objects&&e.objects.sort((t,e)=>t.category&&e.category?t.category.localeCompare(e.category):0);let d=Math.min(f,p);const y=Math.max(.0025*d,l.scale);c.beginPath(),c.rect(u,h,f,p),c.lineWidth=y,c.strokeStyle=l.colors.opacity_color,c.fillStyle=l.colors.opacity_color,c.fill(),c.stroke();let g=d*l.cornerWidth;g=Math.max(g,20*l.scale),g=Math.min(g,f-4*y),g=Math.min(g,p-4*y),this.createCornerPoints(u,h,f,p,g,l.scale).forEach(t=>{c.beginPath(),c.moveTo(t[0].x,t[0].y),c.lineTo(t[1].x,t[1].y),c.lineTo(t[2].x,t[2].y),c.strokeStyle=l.colors.primary_color,c.lineWidth=y,c.stroke()});let m=d*l.cornerPadding;m=Math.max(m,4*l.scale),g-=1.33*m,g=Math.min(g,f),g=Math.min(g,p),this.createCornerPoints(u,h,f,p,g,m,m/2).forEach(t=>{c.beginPath(),c.moveTo(t[0].x,t[0].y),c.lineTo(t[1].x,t[1].y),c.lineTo(t[2].x,t[2].y),c.strokeStyle=l.colors.secondary_color,c.lineWidth=y,c.stroke()}),m*=1.5;let b=e.width*i-2*m,v=e.height*o-2*m;v=Math.max(v,0),b=Math.max(b,0);let w=this.getMinFontSize(c,e,b,v,l),x="";if(this.showClass&&e.classLabel&&(x=e.classLabel,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showNestedClasses&&e?.classes){e.classes.sort((t,e)=>t.category.localeCompare(e.category));for(let s=0;s<e.classes.length;s++)x=e.classes[s]?.classLabel,x&&(x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}this.showTrackId&&e.trackId&&(x="ID: "+e.trackId,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showConfidence&&e.confidence&&(x=Math.round(100*e.confidence)+"%",x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}drawSimple(e,r,n,i,o,s,a){const c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");const u=r+e.x*i,h=n+e.y*o,f=e.width*i,p=e.height*o;e.objects&&e.objects.sort((t,e)=>t.category&&e.category?t.category.localeCompare(e.category):0);const d=l.scale;c.beginPath(),c.rect(u,h,f,p),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.stroke();let y=Math.min(c.canvas.width,c.canvas.height),g=Math.max(Math.min(f/25,y*l.cornerWidth),d),m=e.width*i-3*g,b=e.height*o-3*g;b=Math.max(b,0),m=Math.max(m,0);let v=this.getMinFontSize(c,e,m,b,l),w="";if(this.showClass&&e.classLabel&&(w=e.classLabel,w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v)),this.showNestedClasses&&e?.classes){e.classes.sort((t,e)=>t.category.localeCompare(e.category));for(let s=0;s<e.classes.length;s++)w=e.classes[s]?.classLabel,w&&(w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v))}this.showTrackId&&e.trackId&&(w="ID: "+e.trackId,w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v)),this.showConfidence&&e.confidence&&(w=Math.round(100*e.confidence)+"%",w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v))}drawSimpleSelected(e,r,n,i,o,s,a){const c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");const u=r+e.x*i,h=n+e.y*o,f=e.width*i,p=e.height*o;e.objects&&e.objects.sort((t,e)=>t.category&&e.category?t.category.localeCompare(e.category):0);const d=l.scale;c.beginPath(),c.rect(u,h,f,p),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.stroke();let y=Math.min(c.canvas.width,c.canvas.height),g=.005*y,m=Math.max(Math.min(f/25,y*l.cornerWidth),d);this.createCornerPoints(u,h,f,p,g,m).forEach(t=>{c.beginPath(),c.arc(t.x,t.y,g,0,2*Math.PI),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.fillStyle="white",c.fill(),c.stroke()}),this.createCenterPoints(u,h,f,p,g).forEach(t=>{c.beginPath(),c.arc(t.x,t.y,g,0,2*Math.PI),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.fillStyle="white",c.fill(),c.stroke()});let b=e.width*i-3*m,v=e.height*o-3*m;v=Math.max(v,0),b=Math.max(b,0);let w=this.getMinFontSize(c,e,b,v,l),x="";if(this.showClass&&e.classLabel&&(x=e.classLabel,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showNestedClasses&&e?.classes){e.classes.sort((t,e)=>t.category.localeCompare(e.category));for(let s=0;s<e.classes.length;s++)x=e.classes[s]?.classLabel,x&&(x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}this.showTrackId&&e.trackId&&(x="ID: "+e.trackId,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showConfidence&&e.confidence&&(x=Math.round(100*e.confidence)+"%",x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}createCornerPoints(t,e,r,n,i,o=1,s=1){const a=t+o,c=e+o,l=r-2*o,u=n-2*o,h=i-s;return[[{x:a+s,y:c+h},{x:a+s,y:c+s},{x:a+h,y:c+s}],[{x:a+s,y:c+u-h-s},{x:a+s,y:c+u-s},{x:a+h,y:c+u-s}],[{x:a+l-h-s,y:c+s},{x:a+l-s,y:c+s},{x:a+l-s,y:c+h}],[{x:a+l-h-s,y:c+u-s},{x:a+l-s,y:c+u-s},{x:a+l-s,y:c+u-h-s}]]}createCenterPoints(t,e,r,n,i){return[{x:t,y:e},{x:t+r,y:e},{x:t,y:e+n},{x:t+r,y:e+n},{x:t+r/2,y:e},{x:t+r/2,y:e+n},{x:t,y:e+n/2},{x:t+r,y:e+n/2}]}drawLabel(t,e,r,n,i,o,s,a,c,l,u=!1,h){e.fillStyle="#ffffff",e.textAlign="left",e.textBaseline="top",e.font=a.font;let f=e.measureText(t),p=c/f.width,d=a.font.split(" ")[1];if(h)e.font=`${h}px `+d;else{let t=parseInt(a.font.split(" ")[0]);u?t*=p:t=Math.min(t,t*p),e.font=`${t}px ${d}`}f=e.measureText(t);let y=r.x*i+s+1.5*l,g=r.y*n+o+1.5*l;return e.fillText(t,y,g),g+=l+f.actualBoundingBoxAscent+f.actualBoundingBoxDescent,l+f.actualBoundingBoxDescent}static toTitleCase(t){return t?t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):""}getMinFontSize(e,r,n,i,o,s=!1){let a="";if(this.showClass&&r.classLabel){const e=r.classLabel,n=`${t.toTitleCase(e)}`;n.length>a.length&&(a=n)}if(this.showNestedClasses&&r?.classes)for(let e=0;e<r.classes.length;e++){const n=r.classes[e].classLabel,i=`${t.toTitleCase(n)}`;i.length>a.length&&(a=i)}if(this.showTrackId&&r.trackId){const e=`ID: ${r.trackId}`,n=`${t.toTitleCase(e)}`;n.length>a.length&&(a=n)}if(this.showConfidence&&r.confidence){const e=`${Math.round(100*r.confidence)}%`,n=`${t.toTitleCase(e)}`;n.length>a.length&&(a=n)}return this.getFontSize(a,e,o,n,i,s)}getFontSize(t,e,r,n,i,o=!1){e.textAlign="left",e.textBaseline="top",e.font=r.font;let s=e.measureText(t),a=n/(s.actualBoundingBoxLeft+s.actualBoundingBoxRight),c=parseInt(r.font.split(" ")[0]);return o?c*=a:c=Math.min(c,c*a),c=Math.max(c,0),c}},w=f(r(66)),x=class t{constructor(e){this.target=m;const{context:r,rules:n}=e;this.context=r,n?Array.isArray(n)?this.rules=n:this.rules=[n]:this.rules=t.defaultRules,this.style=new g(r);for(let t=0;t<this.rules.length;t++)this.rules[t].start(this.context,this.style)}draw(t,e){const r=this.context.canvas.width/t.source_width,n=this.context.canvas.height/t.source_height,i=t;for(let o=0;o<this.rules.length;o++){const s=this.rules[o],a=w.query(t,s.target);for(let t=0;t<a.length;t++)s.draw(a[t],0,0,r,n,i,e)}}};x.defaultRules=[new v];var E,S,k=x,I=class{constructor(t={}){this.target=m;const{target:e=m}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=e+t.x*n,l=r+t.y*i,u=t.width*n,h=t.height*i;s.beginPath(),s.rect(c,l,u,h),s.lineWidth=a.scale,s.strokeStyle=a.colors.black,s.fillStyle=a.colors.black,s.fill(),s.stroke()}},T=class{constructor(t={}){this.target=m,this.showLabels=!1;const{showLabels:e=!1,target:r='$..objects[?(@.classLabel=="face")]'}=t;this.target=r,this.showLabels=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.meshs)for(let o=0;o<t.meshs.length;o++){const s=t.meshs[o];"3d-face-mesh"==s.category&&this.render3dFaceMesh(s,e,r,n,i)}this.renderExpressions(t,e,r,n,i)}renderExpressions(t,e,r,n,i){let o=[];if(t.classes)for(let e=0;e<t.classes.length;e++)if(t.classes[e].confidence>.95){const r=_.get(t.classes[e].classLabel);r&&o.push(r)}if(o.length>0){const s=o.join(", "),a=10,c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");c.beginPath(),c.lineWidth=l.scale,c.strokeStyle=l.colors.primary_color,c.fillStyle=l.colors.primary_color,c.font=l.font,c.textBaseline="hanging";const u=c.measureText(s),h=e+t.x*n,f=r+t.y*i;c.roundRect?c.roundRect(h,f,u.width+2*a,24,[0,0,20,0]):c.fillRect(h,f,u.width+2*a,24),c.fill(),this.showLabels&&(c.fillStyle=l.colors.secondary_color,c.fillText(s,Math.max(0,h)+a,Math.max(0,f))),c.closePath()}}render3dFaceMesh(t,e,r,n,i){const o=this.context,s=this.style;if(!o||!s)throw new Error("render() called before start()");const a=s.scale;o.lineWidth=a,o.strokeStyle=s.colors.primary_color,o.fillStyle=s.colors.primary_color,this.renderConnections(o,L,t,e,r,n,i),o.lineWidth=1.5*a,o.strokeStyle=s.colors.secondary_color,o.fillStyle=s.colors.secondary_color,this.renderConnections(o,A,t,e,r,n,i),o.lineWidth=1.5*a,o.strokeStyle=s.colors.right_color,o.fillStyle=s.colors.right_color,this.renderConnections(o,O,t,e,r,n,i),o.lineWidth=1.5*a,o.strokeStyle=s.colors.left_color,o.fillStyle=s.colors.left_color,this.renderConnections(o,C,t,e,r,n,i)}renderConnections(t,e,r,n,i,o,s){t.beginPath();for(let a=0;a<e.length;a++){let c=r.points[e[a][0]].x,l=r.points[e[a][1]].x,u=r.points[e[a][0]].y,h=r.points[e[a][1]].y;c=n+c*o,l=n+l*o,u=i+u*s,h=i+h*s,t.moveTo(c,u),t.lineTo(l,h)}t.stroke()}},_=new Map([["happy","happy"],["neutral","neutral"],["sad","sad"],["surprise","surprise"],["angry","angry"],["fear","fear"],["disgust","disgust"]]),C=[[474,475],[475,476],[476,477],[477,474]],O=[[469,470],[470,471],[471,472],[472,469]],A=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308],[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362],[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336],[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133],[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107],[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],L=[[127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]],P=class{constructor(t={}){this.target=m;const{target:e='$..objects[?(@.classLabel=="hand circumference")]'}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.keyPoints){let o=this.getFillColor(t);for(let s=0;s<t.keyPoints.length;s++){const a=t.keyPoints[s];a.category==R&&this.renderKeyPoints(a,o,Math.max(t.width,t.height),e,r,n,i)}}}renderKeyPoints(t,e,r,n,i,o,s){const a=new Map;let c=1,l=-1;for(let e=0;e<t.points.length;e++){const r=t.points[e];a.set(r.classLabel,r),r.z&&(r.z>c&&(c=r.z),r.z<l&&(l=r.z))}const u=this.context,h=this.style;if(!u||!h)throw new Error("render() called before start()");for(var f=0;f<B.length;f++){const t=B[f],e=a.get(t[0]),r=a.get(t[1]);if(!e||!e.x)continue;if(!r||!r.x)continue;const c=n+e.x*o,l=i+e.y*s,p=n+r.x*o,d=i+r.y*s;u.beginPath(),u.lineWidth=h.scale,u.strokeStyle=h.colors.primary_color,u.fillStyle=h.colors.primary_color,u.moveTo(c,l),u.lineTo(p,d),u.stroke(),u.closePath()}const p=2*h.scale,d=Math.min(2*p,r/100);for(f=0;f<t.points.length;f++){const r=t.points[f],a=n+r.x*o,y=i+r.y*s,g=d-((r.z??0*Math.max(o,s))-l)*(d-p)/(c-l);u.beginPath(),u.arc(a,y,g,0,2*Math.PI,!1),u.fillStyle=e,u.fill(),u.strokeStyle=h.colors.secondary_color,u.stroke()}}getFillColor(t){const e=this.style;if(!e)throw new Error("render() called before start()");let r=e.colors.primary_color;if(t.classes)for(let n=0;n<t.classes.length;n++)if(t.classes[n].category==R){if("right"==t.classes[n].classLabel){r=e.colors.right_color;break}if("left"==t.classes[n].classLabel){r=e.colors.left_color;break}}return r}},R="3d-hand-points",B=[["wrist","thumb cmc"],["thumb cmc","thumb mcp"],["thumb mcp","thumb ip"],["thumb ip","thumb tip"],["wrist","index finger mcp"],["index finger mcp","index finger pip"],["index finger pip","index finger dip"],["index finger dip","index finger tip"],["wrist","middle finger mcp"],["middle finger mcp","middle finger pip"],["middle finger pip","middle finger dip"],["middle finger dip","middle finger tip"],["wrist","ring finger mcp"],["ring finger mcp","ring finger pip"],["ring finger pip","ring finger dip"],["ring finger dip","ring finger tip"],["wrist","pinky mcp"],["pinky mcp","pinky pip"],["pinky pip","pinky dip"],["pinky dip","pinky tip"],["index finger mcp","middle finger mcp"],["middle finger mcp","ring finger mcp"],["ring finger mcp","pinky mcp"]],N=class{constructor(t={}){this.target=m;const{target:e='$..objects[?(@.category=="person")]'}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.keyPoints)for(let o=0;o<t.keyPoints.length;o++){const s=t.keyPoints[o];s.category==M?this.renderPose(s,$,Math.max(t.width,t.height),e,r,n,i):s.category==U&&this.renderPose(s,D,Math.max(t.width,t.height),e,r,n,i)}}renderPose(t,e,r,n,i,o,s){const a=new Map;let c=1,l=-1;for(let e=0;e<t.points.length;e++){const r=t.points[e];a.set(r.classLabel,r),r.z&&(r.z>c&&(c=r.z),r.z<l&&(l=r.z))}const u=this.context,h=this.style;if(!u||!h)throw new Error("render() called before start()");for(var f=0;f<e.length;f++){const t=e[f],r=a.get(t[0]),c=a.get(t[1]);if(!r||!r.x)continue;if(!c||!c.x)continue;const l=n+r.x*o,p=i+r.y*s,d=n+c.x*o,y=i+c.y*s;u.beginPath(),u.lineWidth=1*h.scale,u.strokeStyle=h.colors.primary_color,u.fillStyle=h.colors.primary_color,u.moveTo(l,p),u.lineTo(d,y),u.stroke(),u.closePath()}const p=2*h.scale,d=Math.min(2*p,r/100);for(f=0;f<t.points.length;f++){const e=t.points[f],r=n+e.x*o,a=i+e.y*s,y=d-((e.z??0*Math.max(o,s))-l)*(d-p)/(c-l);u.beginPath(),u.arc(r,a,y,0,2*Math.PI,!1),e.classLabel.includes("left")?u.fillStyle=h.colors.left_color:e.classLabel.includes("right")?u.fillStyle=h.colors.right_color:u.fillStyle=h.colors.primary_color,u.fill(),u.strokeStyle=h.colors.secondary_color,u.stroke()}}},M="2d-body-points",U="3d-body-points",$=[["left shoulder","right shoulder"],["left hip","right hip"],["left shoulder","left elbow"],["left elbow","left wrist"],["left shoulder","right hip"],["left hip","left knee"],["left knee","left ankle"],["right shoulder","right elbow"],["right elbow","right wrist"],["right shoulder","left hip"],["right hip","right knee"],["right knee","right ankle"]],D=[["mouth (right)","mouth (left)"],["right ear","right eye (outer)"],["right eye (outer)","right eye"],["right eye","right eye (inner)"],["right eye (inner)","nose"],["nose","left eye (inner)"],["left eye (inner)","left eye"],["left eye","left eye (outer)"],["left eye (outer)","left ear"],["right shoulder","left shoulder"],["left shoulder","right hip"],["left hip","right hip"],["left hip","right shoulder"],["right shoulder","right elbow"],["right elbow","right wrist"],["right wrist","right thumb"],["right wrist","right pinky"],["right wrist","right index"],["right pinky","right index"],["left shoulder","left elbow"],["left elbow","left wrist"],["left wrist","left thumb"],["left wrist","left pinky"],["left wrist","left index"],["left pinky","left index"],["right hip","right knee"],["right knee","right ankle"],["right ankle","right foot index"],["right ankle","right heel"],["right heel","right foot index"],["left hip","left knee"],["left knee","left ankle"],["left ankle","left foot index"],["left ankle","left heel"],["left heel","left foot index"]],j=f(r(66)),F=class{constructor(t={}){this.target=m;const{target:e="$..objects[?(@.trackId)]",trailLengthSeconds:r=1,traceDetails:n}=t;this.target=e,this.trailLengthNanos=1e3*r*1e3*1e3,this.traceDetails=n,this.lastTrim=0,this.traces=new Map}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(!t.trackId||void 0===o.timestamp)return;const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=[];if(this.traceDetails){const e=j.query(t,this.traceDetails);if(e&&e.length)for(let t=0;t<e.length;t++){const r=e[t];if("x"in r&&"y"in r)if("width"in r&&"height"in r){const t=r,e={x:t.x+t.width/2,y:t.y+t.height/2};c.push(e)}else c.push(r)}}else{const e={x:t.x+t.width/2,y:t.y+t.height/2};c.push(e)}const l={points:c,timestamp:o.timestamp,next:this.traces.get(t.trackId)??null};this.traces.set(t.trackId,l);const u=t.width*n/40;let h=0;for(let t=l;null!=t;t=t.next){h+=1;const c=o.timestamp-t.timestamp;if(c<this.trailLengthNanos){const o=1-c/this.trailLengthNanos;this.drawTraceEntry(t.points,u,o,e,r,n,i,s,a)}else t.next=null}o.timestamp-this.lastTrim>1e10&&this.traces.forEach((t,e)=>{o.timestamp-t.timestamp>this.trailLengthNanos&&this.traces.delete(e)})}drawTraceEntry(t,e,r,n,i,o,s,a,c){a.globalAlpha=r,a.fillStyle=c.colors.secondary_color,a.strokeStyle=c.colors.secondary_color;for(let c=0;c<t.length;c++){const l=t[c];a.beginPath(),a.globalAlpha=r,a.arc(l.x*o+n,l.y*s+i,e*r,0,2*Math.PI,!1),a.fill(),a.stroke()}}},z=class{constructor(t={}){this.target=m;const{target:e="$..objects[?(@.mask)]"}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,o,s){if(!t.mask)return;const a=this.context,c=this.style;if(!a||!c)throw new Error("render() called before start()");const l=i.from(t.mask.bitmap,"base64"),u=new OffscreenCanvas(t.mask.width,t.mask.height),h=u.getContext("2d");if(!h)throw new Error("cannot render a mask without offscreen context");const f=h.createImageData(1,1),p=f.data;p[0]=80,p[1]=80,p[2]=80,p[3]=128;for(let e=0;e<t.mask.height;e++){const r=e*t.mask.stride;for(let n=0;n<t.mask.stride;n++){const i=l[r+n];for(let r=0;r<8;r++){const o=8*n+r;if(o>=t.mask.width)break;i>>7-r%8&1&&h.putImageData(f,o,e)}}}const d=u.transferToImageBitmap();a.drawImage(d,t.x+e,t.y+r,t.width*n,t.height*o)}},G=class{constructor(t={}){this.target=m;const{target:e="$..objects[?(@.contours)]"}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(!t.contours||!t.contours.length)return;const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=Math.max(1,Math.max(s.canvas.width,s.canvas.height)/360);for(let o=0;o<t.contours.length;o++){const l=t.contours[o];if(l.points.length<2)continue;s.beginPath(),s.lineWidth=c,s.strokeStyle=a.colors.primary_color,s.fillStyle=a.colors.opacity_color;let u=l.points[l.points.length-1];s.moveTo(u.x*n+e,u.y*i+r);for(let t=0;t<l.points.length;t++)u=l.points[t],s.lineTo(u.x*n+e,u.y*i+r);if(s.closePath(),s.stroke(),l.cutouts&&l.cutouts.length)for(let t=0;t<l.cutouts.length;t++){const o=l.cutouts[t];if(!(o.length<2)){u=o[o.length-1],s.moveTo(u.x*n+e,u.y*i+r);for(let t=0;t<o.length;t++)u=o[t],s.lineTo(u.x*n+e,u.y*i+r);s.closePath(),s.stroke()}}s.fill()}}},W=class{constructor(t={}){this.target=m,this.showLabels=!1;const{showLabels:e=!1,target:r="$..objects[?(@.keyPoints)]"}=t;this.target=r,this.showLabels=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.keyPoints){const o=this.style;if(!o)throw new Error("render() called before start()");let s=o.colors.primary_color;for(let o=0;o<t.keyPoints.length;o++){const a=t.keyPoints[o];this.renderKeyPoints(a,s,Math.max(t.width,t.height),e,r,n,i)}}}renderKeyPoints(t,e,r,n,i,o,s){let a=1,c=-1;for(let e=0;e<t.points.length;e++){const r=t.points[e];r.z&&(r.z>a&&(a=r.z),r.z<c&&(c=r.z))}const l=this.context,u=this.style;if(!l||!u)throw new Error("render() called before start()");const h=Math.min(4,r/100);for(var f=0;f<t.points.length;f++){const r=t.points[f],p=n+r.x*o,d=i+r.y*s,y=h-((r.z??0*Math.max(o,s))-c)*(h-2)/(a-c);if(l.beginPath(),l.arc(p,d,y,0,2*Math.PI,!1),l.fillStyle=e,l.fill(),l.strokeStyle=u.colors.secondary_color,l.stroke(),!this.showLabels)continue;let g;g=void 0===r.visible?r.classLabel:`${r.classLabel} (${r.visible?"visible":"invisible"})`,l.font=u.font,l.fillStyle="#ffffff",l.textAlign="left",l.textBaseline="top";const m=l.measureText(g);let b=r.x*o+n+y,v=r.y*s+i-(y+m.actualBoundingBoxAscent+m.actualBoundingBoxDescent);l.fillText(g,b,v)}}},q=class{constructor(t={}){this.target=m,this.fitToBounds=!0,this.textPadding=.1;const{target:e="$..objects[?(@.texts)]",fitToBounds:r=!0,textPadding:n=.1}=t;this.target=e,this.fitToBounds=r,this.textPadding=Math.max(.02,Math.min(.2,n))}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(!t||t.width<=0||t.height<=0||!t.texts||0===t.texts.length)return;const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=t.width*n,l=t.height*i;let u=Math.min(s.canvas.width,s.canvas.height)*this.textPadding*a.cornerPadding;u=Math.min(u,c*this.textPadding,l*this.textPadding);const h=c-2*u,f=l-2*u;let p=this.getMinFontSize(s,t,h,f,a,this.fitToBounds),d="";const y=a.font.split(" ")[1];s.font=`${p}px ${y}`;let g=0;const m=[];for(let e=0;e<t.texts.length;e++){if(d=t.texts[e]?.text||"",!d)continue;const r=s.measureText(d),n=r.actualBoundingBoxAscent+r.actualBoundingBoxDescent;g+=n,m.push({text:d,width:r.width,height:n})}const b=.2*p;t.texts.length>1&&(g+=b*(t.texts.length-1));let v=t.y*i+r+(l-g)/2;for(let r=0;r<m.length;r++){const i=m[r];let o=t.x*n+e+(c-i.width)/2;this.drawText(i.text,s,o,v,a,p),v+=i.height+b}}drawText(t,e,r,n,i,o){e.fillStyle="#ffffff",e.textAlign="left",e.textBaseline="top";let s=i.font.split(" ")[1];e.font=`${o}px ${s}`,e.fillText(t,r,n)}static toTitleCase(t){return t?t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):""}getMinFontSize(t,e,r,n,i,o=!1){const s=(e.texts||[]).map(t=>t?.text||"").filter(t=>t),a=s.length;if(0===a)return parseInt(i.font.split(" ")[0]);const c=parseInt(i.font.split(" ")[0]);if(!o)return c;try{const e=i.font.split(" ")[1];if(1===a){const i=.9*n;let o=Math.floor(i);t.font=`${o}px ${e}`;const a=t.measureText(s[0]);return a.width>r&&(o=Math.floor(o*(r/a.width)*.95)),Math.max(5,o)}const o=.9*n,c=(o-(a-1)*(a>1?.1*o/(a-1):0))/a;let l=Math.floor(c);t.font=`${l}px ${e}`;let u=0;for(const e of s){const r=t.measureText(e).width;u=Math.max(u,r)}return u>r&&(l=Math.floor(l*(r/u)*.95)),Math.max(5,l)}catch(t){return Math.min(n/(a+1),r/10)}}},H=class{constructor(t={}){this.target="$",this.classProperties={};const{showConfidence:e=!1,classProperties:r={},target:n="$",labelSizePercentage:i=.05}=t;this.target=n,this.showConfidence=e,this.classProperties=r,this.labelSizePercentage=i}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o,s){const a=this.context,c=this.style;if(!a||!c)throw new Error("render() called before start()");const l=a?.canvas,u=l?.width??640,h=l?.height??480,f=Math.min(u,h)*this.labelSizePercentage,p=.3*f,d=2.4*f,y=1.3*f;let g=h-d,m=p;if(t.classes){let e=0;t.classes.forEach(t=>{let r=t.classLabel;c.font=`${y}px serif`,a.font=c.font;const n=a?.measureText(r),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent+2*p*.5;e=Math.max(i,e)}),t.classes.forEach(t=>{let r=t.classLabel;const n=this.classProperties?.[t.classLabel],i=n?.disabled??!1;c.colors.primary_color=n?.color??"#009dff",i&&(a.globalAlpha=n?.disabledOpacity??.5),this.showConfidence&&t.confidence&&(r+=` ${Math.round(100*t.confidence)}%`);const o=a.measureText(r).width+2*p*.5,s=e/2;this.drawLabel(r,a,m,g,c,i,.5*p,d,o,e,s),m+=o+p,m+o>.9*u-p&&(m=p,g-=d)})}}drawLabel(t,e,r,n,i,o,s,a,c,l,u){e.font=i.font,e.fillStyle=i.colors.primary_color,e.globalAlpha=o?.5:1,e.strokeStyle="#ffffff",e.setLineDash([l/10,l/10]),e.lineWidth=l/20,e.beginPath(),e.moveTo(r+u,n-l/2),e.lineTo(r+c-u,n-l/2),e.quadraticCurveTo(r+c,n-l/2,r+c,n-l/2+u),e.lineTo(r+c,n+l/2-u),e.quadraticCurveTo(r+c,n+l/2,r+c-u,n+l/2),e.lineTo(r+u,n+l/2),e.quadraticCurveTo(r,n+l/2,r,n+l/2-u),e.lineTo(r,n-l/2+u),e.quadraticCurveTo(r,n-l/2,r+u,n-l/2),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#ffffff",e.textAlign="left",e.textBaseline="middle",e.fillText(t,r+s,n)}};(S=E||(E={})).renderer=function(t,e=void 0){return new k({context:t,rules:e})},S.renderBlur=function(t={}){return new I(t)},S.renderBox=function(t={}){return new v(t)},S.renderClasses=function(t={}){return new H(t)},S.renderMask=function(t={}){return new z(t)},S.renderContour=function(t={}){return new G(t)},S.renderFace=function(t={}){return new T(t)},S.renderKeypoints=function(t={}){return new W(t)},S.renderHand=function(t={}){return new P(t)},S.renderPose=function(t={}){return new N(t)},S.renderText=function(t={}){return new q(t)},S.renderTrail=function(t={}){return new F(t)};var X=E},991:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],c=o[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),u=0,h=c>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[u++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(l(t,a,a+s>c?c:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(c(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n=r(949);return n.default})());
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Render2d=e():t.Render2d=e()}(self,()=>(()=>{var t={48(t,e,r){"use strict";const n=r(991),i=r(318),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=c,e.IS=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,c.prototype),e}function c(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return l(t,e,r)}function l(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!c.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|y(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(K(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return f(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(K(t,ArrayBuffer)||t&&K(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(K(t,SharedArrayBuffer)||t&&K(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return c.from(n,e,r);const i=function(t){if(c.isBuffer(t)){const e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||J(t.length)?a(0):f(t):"Buffer"===t.type&&Array.isArray(t.data)?f(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return c.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return u(t),a(t<0?0:0|d(t))}function f(t){const e=t.length<0?0:0|d(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,c.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function y(t,e){if(c.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||K(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(t).length;default:if(i)return n?-1:H(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return A(this,e,r);case"utf8":case"utf-8":return T(this,e,r);case"ascii":return C(this,e,r);case"latin1":case"binary":return O(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=c.from(e,n)),c.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,c=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,c/=2,r/=2}function l(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(l(t,o)===l(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+c>a&&(r=a-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(l(t,o+n)!==l(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(J(n))return s;t[r+s]=n}return s}function x(t,e,r,n){return V(H(e,t.length-r),t,r,n)}function E(t,e,r,n){return V(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return V(X(e),t,r,n)}function k(t,e,r,n){return V(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function T(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,c;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(c=(31&e)<<6|63&r,c>127&&(o=c));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(c=(15&e)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(c=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_));return r}(n)}c.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(t,e,r){return l(t,e,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},c.allocUnsafe=function(t){return h(t)},c.allocUnsafeSlow=function(t){return h(t)},c.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==c.prototype},c.compare=function(t,e){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(t)||!c.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},c.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return c.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=c.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if(K(e,Uint8Array))i+e.length>n.length?(c.isBuffer(e)||(e=c.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!c.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)m(this,e,e+1);return this},c.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)m(this,e,e+3),m(this,e+1,e+2);return this},c.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)m(this,e,e+7),m(this,e+1,e+6),m(this,e+2,e+5),m(this,e+3,e+4);return this},c.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?T(this,0,t):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(t){if(!c.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===c.compare(this,t)},c.prototype.inspect=function(){let t="";const r=e.IS;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(t,e,r,n,i){if(K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),l=this.slice(n,i),u=t.slice(e,r);for(let t=0;t<a;++t)if(l[t]!==u[t]){o=l[t],s=u[t];break}return o<s?-1:s<o?1:0},c.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},c.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},c.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},c.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return x(this,t,e,r);case"ascii":case"latin1":case"binary":return E(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const _=4096;function C(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function O(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function A(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=Q[t[n]];return i}function L(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function R(t,e,r,n,i,o){if(!c.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function N(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function M(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function $(t,e,r,n,o){return e=+e,r>>>=0,o||M(t,0,r,8),i.write(t,e,r,n,52,8),r+8}c.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},c.prototype.readBigUInt64LE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),c.prototype.readBigUInt64BE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),c.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},c.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},c.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},c.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},c.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},c.prototype.readBigInt64LE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),c.prototype.readBigInt64BE=Y(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||W(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),c.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!0,23,4)},c.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!1,23,4)},c.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!0,52,8)},c.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||R(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||R(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,255,0),this[e]=255&t,e+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigUInt64LE=Y(function(t,e=0){return B(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Y(function(t,e=0){return N(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},c.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},c.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},c.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},c.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},c.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||R(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},c.prototype.writeBigInt64LE=Y(function(t,e=0){return B(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Y(function(t,e=0){return N(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(t,e,r){return U(this,t,e,!0,r)},c.prototype.writeFloatBE=function(t,e,r){return U(this,t,e,!1,r)},c.prototype.writeDoubleLE=function(t,e,r){return $(this,t,e,!0,r)},c.prototype.writeDoubleBE=function(t,e,r){return $(this,t,e,!1,r)},c.prototype.copy=function(t,e,r,n){if(!c.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},c.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!c.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=c.isBuffer(t)?t:c.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const D={};function j(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function F(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||W(e,t.length-(r+1))}(n,i,o)}function G(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function W(t,e,r){if(Math.floor(t)!==t)throw G(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),j("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const q=/[^+/0-9A-Za-z-_]/g;function H(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function X(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function K(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function J(t){return t!=t}const Q=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function Y(t){return"undefined"==typeof BigInt?Z:t}function Z(){throw new Error("BigInt not supported")}},66(t,e,r){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){return i(e[s][1][t]||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o=void 0,s=0;s<n.length;s++)i(n[s]);return i}({"./aesprim":[function(t,e,r){!function(t,e){"use strict";e(void 0!==r?r:t.esprima={})}(this,function(t){"use strict";var e,r,n,i,o,s,a,c,l,u,h,f,p,d,y,g,m,b;function v(t,e){if(!t)throw new Error("ASSERT: "+e)}function w(t){return t>=48&&t<=57}function x(t){return"0123456789abcdefABCDEF".indexOf(t)>=0}function E(t){return"01234567".indexOf(t)>=0}function S(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0}function k(t){return 10===t||13===t||8232===t||8233===t}function I(t){return 64==t||36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&a.NonAsciiIdentifierStart.test(String.fromCharCode(t))}function T(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&a.NonAsciiIdentifierPart.test(String.fromCharCode(t))}function _(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function C(t){return"eval"===t||"arguments"===t}function O(t){if(u&&_(t))return!0;switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}}function A(t,e,r,n,i){var o;v("number"==typeof r,"Comment must have valid position"),m.lastCommentStart>=r||(m.lastCommentStart=r,o={type:t,value:e},b.range&&(o.range=[r,n]),b.loc&&(o.loc=i),b.comments.push(o),b.attachComment&&(b.leadingComments.push(o),b.trailingComments.push(o)))}function L(t){var e,r,n,i;for(e=h-t,r={start:{line:f,column:h-p-t}};h<d;)if(n=l.charCodeAt(h),++h,k(n))return b.comments&&(i=l.slice(e+t,h-1),r.end={line:f,column:h-p-1},A("Line",i,e,h-1,r)),13===n&&10===l.charCodeAt(h)&&++h,++f,void(p=h);b.comments&&(i=l.slice(e+t,h),r.end={line:f,column:h-p},A("Line",i,e,h,r))}function P(){var t,e,r,n;for(b.comments&&(t=h-2,e={start:{line:f,column:h-p-2}});h<d;)if(k(r=l.charCodeAt(h)))13===r&&10===l.charCodeAt(h+1)&&++h,++f,++h,p=h,h>=d&&V({},s.UnexpectedToken,"ILLEGAL");else if(42===r){if(47===l.charCodeAt(h+1))return++h,++h,void(b.comments&&(n=l.slice(t+2,h-2),e.end={line:f,column:h-p},A("Block",n,t,h,e)));++h}else++h;V({},s.UnexpectedToken,"ILLEGAL")}function R(){var t,e;for(e=0===h;h<d;)if(S(t=l.charCodeAt(h)))++h;else if(k(t))++h,13===t&&10===l.charCodeAt(h)&&++h,++f,p=h,e=!0;else if(47===t)if(47===(t=l.charCodeAt(h+1)))++h,++h,L(2),e=!0;else{if(42!==t)break;++h,++h,P()}else if(e&&45===t){if(45!==l.charCodeAt(h+1)||62!==l.charCodeAt(h+2))break;h+=3,L(3)}else{if(60!==t)break;if("!--"!==l.slice(h+1,h+4))break;++h,++h,++h,++h,L(4)}}function B(t){var e,r,n,i=0;for(r="u"===t?4:2,e=0;e<r;++e){if(!(h<d&&x(l[h])))return"";n=l[h++],i=16*i+"0123456789abcdef".indexOf(n.toLowerCase())}return String.fromCharCode(i)}function N(){var t,e;for(t=l.charCodeAt(h++),e=String.fromCharCode(t),92===t&&(117!==l.charCodeAt(h)&&V({},s.UnexpectedToken,"ILLEGAL"),++h,(t=B("u"))&&"\\"!==t&&I(t.charCodeAt(0))||V({},s.UnexpectedToken,"ILLEGAL"),e=t);h<d&&T(t=l.charCodeAt(h));)++h,e+=String.fromCharCode(t),92===t&&(e=e.substr(0,e.length-1),117!==l.charCodeAt(h)&&V({},s.UnexpectedToken,"ILLEGAL"),++h,(t=B("u"))&&"\\"!==t&&T(t.charCodeAt(0))||V({},s.UnexpectedToken,"ILLEGAL"),e+=t);return e}function M(){var t,e;for(t=h++;h<d;){if(92===(e=l.charCodeAt(h)))return h=t,N();if(!T(e))break;++h}return l.slice(t,h)}function U(){var t,r,n,i,o=h,a=l.charCodeAt(h),c=l[h];switch(a){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++h,b.tokenize&&(40===a?b.openParenToken=b.tokens.length:123===a&&(b.openCurlyToken=b.tokens.length)),{type:e.Punctuator,value:String.fromCharCode(a),lineNumber:f,lineStart:p,start:o,end:h};default:if(61===(t=l.charCodeAt(h+1)))switch(a){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return h+=2,{type:e.Punctuator,value:String.fromCharCode(a)+String.fromCharCode(t),lineNumber:f,lineStart:p,start:o,end:h};case 33:case 61:return h+=2,61===l.charCodeAt(h)&&++h,{type:e.Punctuator,value:l.slice(o,h),lineNumber:f,lineStart:p,start:o,end:h}}}return">>>="===(i=l.substr(h,4))?(h+=4,{type:e.Punctuator,value:i,lineNumber:f,lineStart:p,start:o,end:h}):">>>"===(n=i.substr(0,3))||"<<="===n||">>="===n?(h+=3,{type:e.Punctuator,value:n,lineNumber:f,lineStart:p,start:o,end:h}):c===(r=n.substr(0,2))[1]&&"+-<>&|".indexOf(c)>=0||"=>"===r?(h+=2,{type:e.Punctuator,value:r,lineNumber:f,lineStart:p,start:o,end:h}):"<>=!+-*%&|^/".indexOf(c)>=0?(++h,{type:e.Punctuator,value:c,lineNumber:f,lineStart:p,start:o,end:h}):void V({},s.UnexpectedToken,"ILLEGAL")}function $(){var t,r,n;if(v(w((n=l[h]).charCodeAt(0))||"."===n,"Numeric literal must start with a decimal digit or a decimal point"),r=h,t="","."!==n){if(t=l[h++],n=l[h],"0"===t){if("x"===n||"X"===n)return++h,function(t){for(var r="";h<d&&x(l[h]);)r+=l[h++];return 0===r.length&&V({},s.UnexpectedToken,"ILLEGAL"),I(l.charCodeAt(h))&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.NumericLiteral,value:parseInt("0x"+r,16),lineNumber:f,lineStart:p,start:t,end:h}}(r);if(E(n))return function(t){for(var r="0"+l[h++];h<d&&E(l[h]);)r+=l[h++];return(I(l.charCodeAt(h))||w(l.charCodeAt(h)))&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.NumericLiteral,value:parseInt(r,8),octal:!0,lineNumber:f,lineStart:p,start:t,end:h}}(r);n&&w(n.charCodeAt(0))&&V({},s.UnexpectedToken,"ILLEGAL")}for(;w(l.charCodeAt(h));)t+=l[h++];n=l[h]}if("."===n){for(t+=l[h++];w(l.charCodeAt(h));)t+=l[h++];n=l[h]}if("e"===n||"E"===n)if(t+=l[h++],"+"!==(n=l[h])&&"-"!==n||(t+=l[h++]),w(l.charCodeAt(h)))for(;w(l.charCodeAt(h));)t+=l[h++];else V({},s.UnexpectedToken,"ILLEGAL");return I(l.charCodeAt(h))&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.NumericLiteral,value:parseFloat(t),lineNumber:f,lineStart:p,start:r,end:h}}function D(){var t,r,n,i;return g=null,R(),t=h,r=function(){var t,e,r,n;for(v("/"===(t=l[h]),"Regular expression literal must start with a slash"),e=l[h++],r=!1,n=!1;h<d;)if(e+=t=l[h++],"\\"===t)k((t=l[h++]).charCodeAt(0))&&V({},s.UnterminatedRegExp),e+=t;else if(k(t.charCodeAt(0)))V({},s.UnterminatedRegExp);else if(r)"]"===t&&(r=!1);else{if("/"===t){n=!0;break}"["===t&&(r=!0)}return n||V({},s.UnterminatedRegExp),{value:e.substr(1,e.length-2),literal:e}}(),n=function(){var t,e,r,n;for(e="",r="";h<d&&T((t=l[h]).charCodeAt(0));)if(++h,"\\"===t&&h<d)if("u"===(t=l[h])){if(n=++h,t=B("u"))for(r+=t,e+="\\u";n<h;++n)e+=l[n];else h=n,r+="u",e+="\\u";K({},s.UnexpectedToken,"ILLEGAL")}else e+="\\",K({},s.UnexpectedToken,"ILLEGAL");else r+=t,e+=t;return{value:r,literal:e}}(),i=function(t,e){var r;try{r=new RegExp(t,e)}catch(t){V({},s.InvalidRegExp)}return r}(r.value,n.value),b.tokenize?{type:e.RegularExpression,value:i,lineNumber:f,lineStart:p,start:t,end:h}:{literal:r.literal+n.literal,value:i,start:t,end:h}}function j(){var t,e,r,n;return R(),t=h,e={start:{line:f,column:h-p}},r=D(),e.end={line:f,column:h-p},b.tokenize||(b.tokens.length>0&&(n=b.tokens[b.tokens.length-1]).range[0]===t&&"Punctuator"===n.type&&("/"!==n.value&&"/="!==n.value||b.tokens.pop()),b.tokens.push({type:"RegularExpression",value:r.literal,range:[t,h],loc:e})),r}function F(){var t,r,i;return R(),h>=d?{type:e.EOF,lineNumber:f,lineStart:p,start:h,end:h}:I(t=l.charCodeAt(h))?(r=h,{type:1===(i=92===l.charCodeAt(h)?N():M()).length?e.Identifier:O(i)?e.Keyword:"null"===i?e.NullLiteral:"true"===i||"false"===i?e.BooleanLiteral:e.Identifier,value:i,lineNumber:f,lineStart:p,start:r,end:h}):40===t||41===t||59===t?U():39===t||34===t?function(){var t,r,n,i,o,a,c,u,y="",g=!1;for(c=f,u=p,v("'"===(t=l[h])||'"'===t,"String literal must starts with a quote"),r=h,++h;h<d;){if((n=l[h++])===t){t="";break}if("\\"===n)if((n=l[h++])&&k(n.charCodeAt(0)))++f,"\r"===n&&"\n"===l[h]&&++h,p=h;else switch(n){case"u":case"x":a=h,(o=B(n))?y+=o:(h=a,y+=n);break;case"n":y+="\n";break;case"r":y+="\r";break;case"t":y+="\t";break;case"b":y+="\b";break;case"f":y+="\f";break;case"v":y+="\v";break;default:E(n)?(0!==(i="01234567".indexOf(n))&&(g=!0),h<d&&E(l[h])&&(g=!0,i=8*i+"01234567".indexOf(l[h++]),"0123".indexOf(n)>=0&&h<d&&E(l[h])&&(i=8*i+"01234567".indexOf(l[h++]))),y+=String.fromCharCode(i)):y+=n}else{if(k(n.charCodeAt(0)))break;y+=n}}return""!==t&&V({},s.UnexpectedToken,"ILLEGAL"),{type:e.StringLiteral,value:y,octal:g,startLineNumber:c,startLineStart:u,lineNumber:f,lineStart:p,start:r,end:h}}():46===t?w(l.charCodeAt(h+1))?$():U():w(t)?$():b.tokenize&&47===t?function(){var t,e;if(!(t=b.tokens[b.tokens.length-1]))return j();if("Punctuator"===t.type){if("]"===t.value)return U();if(")"===t.value)return!(e=b.tokens[b.openParenToken-1])||"Keyword"!==e.type||"if"!==e.value&&"while"!==e.value&&"for"!==e.value&&"with"!==e.value?U():j();if("}"===t.value){if(b.tokens[b.openCurlyToken-3]&&"Keyword"===b.tokens[b.openCurlyToken-3].type){if(!(e=b.tokens[b.openCurlyToken-4]))return U()}else{if(!b.tokens[b.openCurlyToken-4]||"Keyword"!==b.tokens[b.openCurlyToken-4].type)return U();if(!(e=b.tokens[b.openCurlyToken-5]))return j()}return n.indexOf(e.value)>=0?U():j()}return j()}return"Keyword"===t.type?j():U()}():U()}function z(){var t,n,i;return R(),t={start:{line:f,column:h-p}},n=F(),t.end={line:f,column:h-p},n.type!==e.EOF&&(i=l.slice(n.start,n.end),b.tokens.push({type:r[n.type],value:i,range:[n.start,n.end],loc:t})),n}function G(){var t;return h=(t=g).end,f=t.lineNumber,p=t.lineStart,g=void 0!==b.tokens?z():F(),h=t.end,f=t.lineNumber,p=t.lineStart,t}function W(){var t,e,r;t=h,e=f,r=p,g=void 0!==b.tokens?z():F(),h=t,f=e,p=r}function q(t,e){this.line=t,this.column=e}function H(t,e,r,n){this.start=new q(t,e),this.end=new q(r,n)}function X(){var t,e,r,n;return t=h,e=f,r=p,R(),n=f!==e,h=t,f=e,p=r,n}function V(t,e){var r,n=Array.prototype.slice.call(arguments,2),i=e.replace(/%(\d)/g,function(t,e){return v(e<n.length,"Message reference must be in range"),n[e]});throw"number"==typeof t.lineNumber?((r=new Error("Line "+t.lineNumber+": "+i)).index=t.start,r.lineNumber=t.lineNumber,r.column=t.start-p+1):((r=new Error("Line "+f+": "+i)).index=h,r.lineNumber=f,r.column=h-p+1),r.description=i,r}function K(){try{V.apply(null,arguments)}catch(t){if(!b.errors)throw t;b.errors.push(t)}}function J(t){if(t.type===e.EOF&&V(t,s.UnexpectedEOS),t.type===e.NumericLiteral&&V(t,s.UnexpectedNumber),t.type===e.StringLiteral&&V(t,s.UnexpectedString),t.type===e.Identifier&&V(t,s.UnexpectedIdentifier),t.type===e.Keyword){if(function(t){switch(t){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}(t.value))V(t,s.UnexpectedReserved);else if(u&&_(t.value))return void K(t,s.StrictReservedWord);V(t,s.UnexpectedToken,t.value)}V(t,s.UnexpectedToken,t.value)}function Q(t){var r=G();r.type===e.Punctuator&&r.value===t||J(r)}function Y(t){var r=G();r.type===e.Keyword&&r.value===t||J(r)}function Z(t){return g.type===e.Punctuator&&g.value===t}function tt(t){return g.type===e.Keyword&&g.value===t}function et(){var t;59===l.charCodeAt(h)||Z(";")?G():(t=f,R(),f===t&&(g.type===e.EOF||Z("}")||J(g)))}function rt(t){return t.type===i.Identifier||t.type===i.MemberExpression}function nt(t,e){var r,n,i;return r=u,i=g,n=Tt(),e&&u&&C(t[0].name)&&K(e,s.StrictParamName),u=r,y.markEnd(y.createFunctionExpression(null,t,[],n),i)}function it(){var t,r;return r=g,(t=G()).type===e.StringLiteral||t.type===e.NumericLiteral?(u&&t.octal&&K(t,s.StrictOctalLiteral),y.markEnd(y.createLiteral(t),r)):y.markEnd(y.createIdentifier(t.value),r)}function ot(){var t,r,n,i,o,a;return a=g,(t=g).type===e.Identifier?(n=it(),"get"!==t.value||Z(":")?"set"!==t.value||Z(":")?(Q(":"),i=gt(),y.markEnd(y.createProperty("init",n,i),a)):(r=it(),Q("("),(t=g).type!==e.Identifier?(Q(")"),K(t,s.UnexpectedToken,t.value),i=nt([])):(o=[vt()],Q(")"),i=nt(o,t)),y.markEnd(y.createProperty("set",r,i),a)):(r=it(),Q("("),Q(")"),i=nt([]),y.markEnd(y.createProperty("get",r,i),a))):t.type!==e.EOF&&t.type!==e.Punctuator?(r=it(),Q(":"),i=gt(),y.markEnd(y.createProperty("init",r,i),a)):void J(t)}function st(){var t,r,n,a;if(Z("("))return function(){var t;return Q("("),t=mt(),Q(")"),t}();if(Z("["))return function(){var t,e=[];for(t=g,Q("[");!Z("]");)Z(",")?(G(),e.push(null)):(e.push(gt()),Z("]")||Q(","));return G(),y.markEnd(y.createArrayExpression(e),t)}();if(Z("{"))return function(){var t,e,r,n,a,c=[],l={},h=String;for(a=g,Q("{");!Z("}");)e=(t=ot()).key.type===i.Identifier?t.key.name:h(t.key.value),n="init"===t.kind?o.Data:"get"===t.kind?o.Get:o.Set,r="$"+e,Object.prototype.hasOwnProperty.call(l,r)?(l[r]===o.Data?u&&n===o.Data?K({},s.StrictDuplicateProperty):n!==o.Data&&K({},s.AccessorDataProperty):n===o.Data?K({},s.AccessorDataProperty):l[r]&n&&K({},s.AccessorGetSet),l[r]|=n):l[r]=n,c.push(t),Z("}")||Q(",");return Q("}"),y.markEnd(y.createObjectExpression(c),a)}();if(t=g.type,a=g,t===e.Identifier)n=y.createIdentifier(G().value);else if(t===e.StringLiteral||t===e.NumericLiteral)u&&g.octal&&K(g,s.StrictOctalLiteral),n=y.createLiteral(G());else if(t===e.Keyword){if(tt("function"))return function(){var t,e,r,n,i,o,a,c,l=null,h=[];return c=g,Y("function"),Z("(")||(t=g,l=vt(),u?C(t.value)&&K(t,s.StrictFunctionName):C(t.value)?(r=t,n=s.StrictFunctionName):_(t.value)&&(r=t,n=s.StrictReservedWord)),h=(i=_t(r)).params,e=i.stricted,r=i.firstRestricted,i.message&&(n=i.message),a=u,o=Tt(),u&&r&&V(r,n),u&&e&&K(e,n),u=a,y.markEnd(y.createFunctionExpression(l,h,[],o),c)}();tt("this")?(G(),n=y.createThisExpression()):J(G())}else t===e.BooleanLiteral?((r=G()).value="true"===r.value,n=y.createLiteral(r)):t===e.NullLiteral?((r=G()).value=null,n=y.createLiteral(r)):Z("/")||Z("/=")?(n=void 0!==b.tokens?y.createLiteral(j()):y.createLiteral(D()),W()):J(G());return y.markEnd(n,a)}function at(){var t=[];if(Q("("),!Z(")"))for(;h<d&&(t.push(gt()),!Z(")"));)Q(",");return Q(")"),t}function ct(){var t,r;return r=g,function(t){return t.type===e.Identifier||t.type===e.Keyword||t.type===e.BooleanLiteral||t.type===e.NullLiteral}(t=G())||J(t),y.markEnd(y.createIdentifier(t.value),r)}function lt(){return Q("."),ct()}function ut(){var t;return Q("["),t=mt(),Q("]"),t}function ht(){var t,e,r;return r=g,Y("new"),t=function(){var t,e,r,n;for(n=g,t=m.allowIn,e=tt("new")?ht():st(),m.allowIn=t;Z(".")||Z("[");)Z("[")?(r=ut(),e=y.createMemberExpression("[",e,r)):(r=lt(),e=y.createMemberExpression(".",e,r)),y.markEnd(e,n);return e}(),e=Z("(")?at():[],y.markEnd(y.createNewExpression(t,e),r)}function ft(){var t,r,n=g;return t=function(){var t,e,r,n,i;for(i=g,t=m.allowIn,m.allowIn=!0,e=tt("new")?ht():st(),m.allowIn=t;;){if(Z("."))n=lt(),e=y.createMemberExpression(".",e,n);else if(Z("("))r=at(),e=y.createCallExpression(e,r);else{if(!Z("["))break;n=ut(),e=y.createMemberExpression("[",e,n)}y.markEnd(e,i)}return e}(),g.type===e.Punctuator&&(!Z("++")&&!Z("--")||X()||(u&&t.type===i.Identifier&&C(t.name)&&K({},s.StrictLHSPostfix),rt(t)||K({},s.InvalidLHSInAssignment),r=G(),t=y.markEnd(y.createPostfixExpression(r.value,t),n))),t}function pt(){var t,r,n;return g.type!==e.Punctuator&&g.type!==e.Keyword?r=ft():Z("++")||Z("--")?(n=g,t=G(),r=pt(),u&&r.type===i.Identifier&&C(r.name)&&K({},s.StrictLHSPrefix),rt(r)||K({},s.InvalidLHSInAssignment),r=y.createUnaryExpression(t.value,r),r=y.markEnd(r,n)):Z("+")||Z("-")||Z("~")||Z("!")?(n=g,t=G(),r=pt(),r=y.createUnaryExpression(t.value,r),r=y.markEnd(r,n)):tt("delete")||tt("void")||tt("typeof")?(n=g,t=G(),r=pt(),r=y.createUnaryExpression(t.value,r),r=y.markEnd(r,n),u&&"delete"===r.operator&&r.argument.type===i.Identifier&&K({},s.StrictDelete)):r=ft(),r}function dt(t,r){var n=0;if(t.type!==e.Punctuator&&t.type!==e.Keyword)return 0;switch(t.value){case"||":n=1;break;case"&&":n=2;break;case"|":n=3;break;case"^":n=4;break;case"&":n=5;break;case"==":case"!=":case"===":case"!==":n=6;break;case"<":case">":case"<=":case">=":case"instanceof":n=7;break;case"in":n=r?7:0;break;case"<<":case">>":case">>>":n=8;break;case"+":case"-":n=9;break;case"*":case"/":case"%":n=11}return n}function yt(){var t,e,r,n,i;return i=g,t=function(){var t,e,r,n,i,o,s,a,c,l;if(t=g,c=pt(),0===(i=dt(n=g,m.allowIn)))return c;for(n.prec=i,G(),e=[t,g],o=[c,n,s=pt()];(i=dt(g,m.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)s=o.pop(),a=o.pop().value,c=o.pop(),r=y.createBinaryExpression(a,c,s),e.pop(),t=e[e.length-1],y.markEnd(r,t),o.push(r);(n=G()).prec=i,o.push(n),e.push(g),r=pt(),o.push(r)}for(r=o[l=o.length-1],e.pop();l>1;)r=y.createBinaryExpression(o[l-1].value,o[l-2],r),l-=2,t=e.pop(),y.markEnd(r,t);return r}(),Z("?")&&(G(),e=m.allowIn,m.allowIn=!0,r=gt(),m.allowIn=e,Q(":"),n=gt(),t=y.createConditionalExpression(t,r,n),y.markEnd(t,i)),t}function gt(){var t,r,n,o,a,c;return t=g,a=g,o=r=yt(),g.type===e.Punctuator&&("="===(c=g.value)||"*="===c||"/="===c||"%="===c||"+="===c||"-="===c||"<<="===c||">>="===c||">>>="===c||"&="===c||"^="===c||"|="===c)&&(rt(r)||K({},s.InvalidLHSInAssignment),u&&r.type===i.Identifier&&C(r.name)&&K(t,s.StrictLHSAssignment),t=G(),n=gt(),o=y.markEnd(y.createAssignmentExpression(t.value,r,n),a)),o}function mt(){var t,e=g;if(t=gt(),Z(",")){for(t=y.createSequenceExpression([t]);h<d&&Z(",");)G(),t.expressions.push(gt());y.markEnd(t,e)}return t}function bt(){var t,e;return e=g,Q("{"),t=function(){for(var t,e=[];h<d&&!Z("}")&&void 0!==(t=Ot());)e.push(t);return e}(),Q("}"),y.markEnd(y.createBlockStatement(t),e)}function vt(){var t,r;return r=g,(t=G()).type!==e.Identifier&&J(t),y.markEnd(y.createIdentifier(t.value),r)}function wt(t){var e,r,n=null;return r=g,e=vt(),u&&C(e.name)&&K({},s.StrictVarName),"const"===t?(Q("="),n=gt()):Z("=")&&(G(),n=gt()),y.markEnd(y.createVariableDeclarator(e,n),r)}function xt(t){var e=[];do{if(e.push(wt(t)),!Z(","))break;G()}while(h<d);return e}function Et(){var t,e,r,n,i,o,a,c,l,u;return t=e=r=null,Y("for"),Q("("),Z(";")?G():(tt("var")||tt("let")?(m.allowIn=!1,u=g,c=G(),l=xt(),t=y.markEnd(y.createVariableDeclaration(l,c.value),u),m.allowIn=!0,1===t.declarations.length&&tt("in")&&(G(),n=t,i=mt(),t=null)):(m.allowIn=!1,t=mt(),m.allowIn=!0,tt("in")&&(rt(t)||K({},s.InvalidLHSInForIn),G(),n=t,i=mt(),t=null)),void 0===n&&Q(";")),void 0===n&&(Z(";")||(e=mt()),Q(";"),Z(")")||(r=mt())),Q(")"),a=m.inIteration,m.inIteration=!0,o=It(),m.inIteration=a,void 0===n?y.createForStatement(t,e,r,o):y.createForInStatement(n,i,o)}function St(){var t,e,r,n=[];for(r=g,tt("default")?(G(),t=null):(Y("case"),t=mt()),Q(":");h<d&&!(Z("}")||tt("default")||tt("case"));)e=It(),n.push(e);return y.markEnd(y.createSwitchCase(t,n),r)}function kt(){var t,e,r,n,i=[],o=null;return Y("try"),t=bt(),tt("catch")&&i.push((n=g,Y("catch"),Q("("),Z(")")&&J(g),e=vt(),u&&C(e.name)&&K({},s.StrictCatchVariable),Q(")"),r=bt(),y.markEnd(y.createCatchClause(e,r),n))),tt("finally")&&(G(),o=bt()),0!==i.length||o||V({},s.NoCatchOrFinally),y.createTryStatement(t,[],i,o)}function It(){var t,r,n,o,a,c,f,p,b,v=g.type;if(v===e.EOF&&J(g),v===e.Punctuator&&"{"===g.value)return bt();if(o=g,v===e.Punctuator)switch(g.value){case";":return y.markEnd((Q(";"),y.createEmptyStatement()),o);case"(":return y.markEnd(function(){var t=mt();return et(),y.createExpressionStatement(t)}(),o)}if(v===e.Keyword)switch(g.value){case"break":return y.markEnd(function(){var t,r=null;return Y("break"),59===l.charCodeAt(h)?(G(),m.inIteration||m.inSwitch||V({},s.IllegalBreak),y.createBreakStatement(null)):X()?(m.inIteration||m.inSwitch||V({},s.IllegalBreak),y.createBreakStatement(null)):(g.type===e.Identifier&&(t="$"+(r=vt()).name,Object.prototype.hasOwnProperty.call(m.labelSet,t)||V({},s.UnknownLabel,r.name)),et(),null!==r||m.inIteration||m.inSwitch||V({},s.IllegalBreak),y.createBreakStatement(r))}(),o);case"continue":return y.markEnd(function(){var t,r=null;return Y("continue"),59===l.charCodeAt(h)?(G(),m.inIteration||V({},s.IllegalContinue),y.createContinueStatement(null)):X()?(m.inIteration||V({},s.IllegalContinue),y.createContinueStatement(null)):(g.type===e.Identifier&&(t="$"+(r=vt()).name,Object.prototype.hasOwnProperty.call(m.labelSet,t)||V({},s.UnknownLabel,r.name)),et(),null!==r||m.inIteration||V({},s.IllegalContinue),y.createContinueStatement(r))}(),o);case"debugger":return y.markEnd((Y("debugger"),et(),y.createDebuggerStatement()),o);case"do":return y.markEnd((Y("do"),b=m.inIteration,m.inIteration=!0,f=It(),m.inIteration=b,Y("while"),Q("("),p=mt(),Q(")"),Z(";")&&G(),y.createDoWhileStatement(f,p)),o);case"for":return y.markEnd(Et(),o);case"function":return y.markEnd(Ct(),o);case"if":return y.markEnd(function(){var t,e,r;return Y("if"),Q("("),t=mt(),Q(")"),e=It(),tt("else")?(G(),r=It()):r=null,y.createIfStatement(t,e,r)}(),o);case"return":return y.markEnd((c=null,Y("return"),m.inFunctionBody||K({},s.IllegalReturn),32===l.charCodeAt(h)&&I(l.charCodeAt(h+1))?(c=mt(),et(),y.createReturnStatement(c)):X()?y.createReturnStatement(null):(Z(";")||Z("}")||g.type===e.EOF||(c=mt()),et(),y.createReturnStatement(c))),o);case"switch":return y.markEnd(function(){var t,e,r,n,i;if(Y("switch"),Q("("),t=mt(),Q(")"),Q("{"),e=[],Z("}"))return G(),y.createSwitchStatement(t,e);for(n=m.inSwitch,m.inSwitch=!0,i=!1;h<d&&!Z("}");)null===(r=St()).test&&(i&&V({},s.MultipleDefaultsInSwitch),i=!0),e.push(r);return m.inSwitch=n,Q("}"),y.createSwitchStatement(t,e)}(),o);case"throw":return y.markEnd(function(){var t;return Y("throw"),X()&&V({},s.NewlineAfterThrow),t=mt(),et(),y.createThrowStatement(t)}(),o);case"try":return y.markEnd(kt(),o);case"var":return y.markEnd((Y("var"),a=xt(),et(),y.createVariableDeclaration(a,"var")),o);case"while":return y.markEnd(function(){var t,e,r;return Y("while"),Q("("),t=mt(),Q(")"),r=m.inIteration,m.inIteration=!0,e=It(),m.inIteration=r,y.createWhileStatement(t,e)}(),o);case"with":return y.markEnd(function(){var t,e;return u&&(R(),K({},s.StrictModeWith)),Y("with"),Q("("),t=mt(),Q(")"),e=It(),y.createWithStatement(t,e)}(),o)}return(t=mt()).type===i.Identifier&&Z(":")?(G(),n="$"+t.name,Object.prototype.hasOwnProperty.call(m.labelSet,n)&&V({},s.Redeclaration,"Label",t.name),m.labelSet[n]=!0,r=It(),delete m.labelSet[n],y.markEnd(y.createLabeledStatement(t,r),o)):(et(),y.markEnd(y.createExpressionStatement(t),o))}function Tt(){var t,r,n,o,a,c,f,p,b=[];for(p=g,Q("{");h<d&&g.type===e.StringLiteral&&(r=g,t=Ot(),b.push(t),t.expression.type===i.Literal);)"use strict"===l.slice(r.start+1,r.end-1)?(u=!0,n&&K(n,s.StrictOctalLiteral)):!n&&r.octal&&(n=r);for(o=m.labelSet,a=m.inIteration,c=m.inSwitch,f=m.inFunctionBody,m.labelSet={},m.inIteration=!1,m.inSwitch=!1,m.inFunctionBody=!0;h<d&&!Z("}")&&void 0!==(t=Ot());)b.push(t);return Q("}"),m.labelSet=o,m.inIteration=a,m.inSwitch=c,m.inFunctionBody=f,y.markEnd(y.createBlockStatement(b),p)}function _t(t){var e,r,n,i,o,a,c=[];if(Q("("),!Z(")"))for(i={};h<d&&(r=g,e=vt(),o="$"+r.value,u?(C(r.value)&&(n=r,a=s.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(n=r,a=s.StrictParamDupe)):t||(C(r.value)?(t=r,a=s.StrictParamName):_(r.value)?(t=r,a=s.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(t=r,a=s.StrictParamDupe)),c.push(e),i[o]=!0,!Z(")"));)Q(",");return Q(")"),{params:c,stricted:n,firstRestricted:t,message:a}}function Ct(){var t,e,r,n,i,o,a,c,l,h;return l=g,Y("function"),r=g,t=vt(),u?C(r.value)&&K(r,s.StrictFunctionName):C(r.value)?(o=r,a=s.StrictFunctionName):_(r.value)&&(o=r,a=s.StrictReservedWord),h=(i=_t(o)).params,n=i.stricted,o=i.firstRestricted,i.message&&(a=i.message),c=u,e=Tt(),u&&o&&V(o,a),u&&n&&K(n,a),u=c,y.markEnd(y.createFunctionDeclaration(t,h,[],e),l)}function Ot(){if(g.type===e.Keyword)switch(g.value){case"const":case"let":return t=g.value,n=g,Y(t),r=xt(t),et(),y.markEnd(y.createVariableDeclaration(r,t),n);case"function":return Ct();default:return It()}var t,r,n;if(g.type!==e.EOF)return It()}function At(){var t,r;return R(),W(),r=g,u=!1,t=function(){for(var t,r,n,o=[];h<d&&(r=g).type===e.StringLiteral&&(t=Ot(),o.push(t),t.expression.type===i.Literal);)"use strict"===l.slice(r.start+1,r.end-1)?(u=!0,n&&K(n,s.StrictOctalLiteral)):!n&&r.octal&&(n=r);for(;h<d&&void 0!==(t=Ot());)o.push(t);return o}(),y.markEnd(y.createProgram(t),r)}function Lt(){var t,e,r,n=[];for(t=0;t<b.tokens.length;++t)r={type:(e=b.tokens[t]).type,value:e.value},b.range&&(r.range=e.range),b.loc&&(r.loc=e.loc),n.push(r);b.tokens=n}(r={})[(e={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",r[e.EOF]="<end>",r[e.Identifier]="Identifier",r[e.Keyword]="Keyword",r[e.NullLiteral]="Null",r[e.NumericLiteral]="Numeric",r[e.Punctuator]="Punctuator",r[e.StringLiteral]="String",r[e.RegularExpression]="RegularExpression",n=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},o={Data:1,Get:2,Set:4},s={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},a={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]")},c={name:"SyntaxTree",processComment:function(t){var e,r;if(!(t.type===i.Program&&t.body.length>0)){for(b.trailingComments.length>0?b.trailingComments[0].range[0]>=t.range[1]?(r=b.trailingComments,b.trailingComments=[]):b.trailingComments.length=0:b.bottomRightStack.length>0&&b.bottomRightStack[b.bottomRightStack.length-1].trailingComments&&b.bottomRightStack[b.bottomRightStack.length-1].trailingComments[0].range[0]>=t.range[1]&&(r=b.bottomRightStack[b.bottomRightStack.length-1].trailingComments,delete b.bottomRightStack[b.bottomRightStack.length-1].trailingComments);b.bottomRightStack.length>0&&b.bottomRightStack[b.bottomRightStack.length-1].range[0]>=t.range[0];)e=b.bottomRightStack.pop();e?e.leadingComments&&e.leadingComments[e.leadingComments.length-1].range[1]<=t.range[0]&&(t.leadingComments=e.leadingComments,delete e.leadingComments):b.leadingComments.length>0&&b.leadingComments[b.leadingComments.length-1].range[1]<=t.range[0]&&(t.leadingComments=b.leadingComments,b.leadingComments=[]),r&&(t.trailingComments=r),b.bottomRightStack.push(t)}},markEnd:function(t,e){return b.range&&(t.range=[e.start,h]),b.loc&&(t.loc=new H(void 0===e.startLineNumber?e.lineNumber:e.startLineNumber,e.start-(void 0===e.startLineStart?e.lineStart:e.startLineStart),f,h-p),this.postProcess(t)),b.attachComment&&this.processComment(t),t},postProcess:function(t){return b.source&&(t.loc.source=b.source),t},createArrayExpression:function(t){return{type:i.ArrayExpression,elements:t}},createAssignmentExpression:function(t,e,r){return{type:i.AssignmentExpression,operator:t,left:e,right:r}},createBinaryExpression:function(t,e,r){return{type:"||"===t||"&&"===t?i.LogicalExpression:i.BinaryExpression,operator:t,left:e,right:r}},createBlockStatement:function(t){return{type:i.BlockStatement,body:t}},createBreakStatement:function(t){return{type:i.BreakStatement,label:t}},createCallExpression:function(t,e){return{type:i.CallExpression,callee:t,arguments:e}},createCatchClause:function(t,e){return{type:i.CatchClause,param:t,body:e}},createConditionalExpression:function(t,e,r){return{type:i.ConditionalExpression,test:t,consequent:e,alternate:r}},createContinueStatement:function(t){return{type:i.ContinueStatement,label:t}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(t,e){return{type:i.DoWhileStatement,body:t,test:e}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(t){return{type:i.ExpressionStatement,expression:t}},createForStatement:function(t,e,r,n){return{type:i.ForStatement,init:t,test:e,update:r,body:n}},createForInStatement:function(t,e,r){return{type:i.ForInStatement,left:t,right:e,body:r,each:!1}},createFunctionDeclaration:function(t,e,r,n){return{type:i.FunctionDeclaration,id:t,params:e,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(t,e,r,n){return{type:i.FunctionExpression,id:t,params:e,defaults:r,body:n,rest:null,generator:!1,expression:!1}},createIdentifier:function(t){return{type:i.Identifier,name:t}},createIfStatement:function(t,e,r){return{type:i.IfStatement,test:t,consequent:e,alternate:r}},createLabeledStatement:function(t,e){return{type:i.LabeledStatement,label:t,body:e}},createLiteral:function(t){return{type:i.Literal,value:t.value,raw:l.slice(t.start,t.end)}},createMemberExpression:function(t,e,r){return{type:i.MemberExpression,computed:"["===t,object:e,property:r}},createNewExpression:function(t,e){return{type:i.NewExpression,callee:t,arguments:e}},createObjectExpression:function(t){return{type:i.ObjectExpression,properties:t}},createPostfixExpression:function(t,e){return{type:i.UpdateExpression,operator:t,argument:e,prefix:!1}},createProgram:function(t){return{type:i.Program,body:t}},createProperty:function(t,e,r){return{type:i.Property,key:e,value:r,kind:t}},createReturnStatement:function(t){return{type:i.ReturnStatement,argument:t}},createSequenceExpression:function(t){return{type:i.SequenceExpression,expressions:t}},createSwitchCase:function(t,e){return{type:i.SwitchCase,test:t,consequent:e}},createSwitchStatement:function(t,e){return{type:i.SwitchStatement,discriminant:t,cases:e}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(t){return{type:i.ThrowStatement,argument:t}},createTryStatement:function(t,e,r,n){return{type:i.TryStatement,block:t,guardedHandlers:e,handlers:r,finalizer:n}},createUnaryExpression:function(t,e){return"++"===t||"--"===t?{type:i.UpdateExpression,operator:t,argument:e,prefix:!0}:{type:i.UnaryExpression,operator:t,argument:e,prefix:!0}},createVariableDeclaration:function(t,e){return{type:i.VariableDeclaration,declarations:t,kind:e}},createVariableDeclarator:function(t,e){return{type:i.VariableDeclarator,id:t,init:e}},createWhileStatement:function(t,e){return{type:i.WhileStatement,test:t,body:e}},createWithStatement:function(t,e){return{type:i.WithStatement,object:t,body:e}}},t.version="1.2.2",t.tokenize=function(t,r){var n;"string"==typeof t||t instanceof String||(t=String(t)),y=c,h=0,f=(l=t).length>0?1:0,p=0,d=l.length,g=null,m={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},(r=r||{}).tokens=!0,b.tokens=[],b.tokenize=!0,b.openParenToken=-1,b.openCurlyToken=-1,b.range="boolean"==typeof r.range&&r.range,b.loc="boolean"==typeof r.loc&&r.loc,"boolean"==typeof r.comment&&r.comment&&(b.comments=[]),"boolean"==typeof r.tolerant&&r.tolerant&&(b.errors=[]);try{if(W(),g.type===e.EOF)return b.tokens;for(G();g.type!==e.EOF;)try{G()}catch(t){if(b.errors){b.errors.push(t);break}throw t}Lt(),n=b.tokens,void 0!==b.comments&&(n.comments=b.comments),void 0!==b.errors&&(n.errors=b.errors)}catch(t){throw t}finally{b={}}return n},t.parse=function(t,e){var r,n;n=String,"string"==typeof t||t instanceof String||(t=n(t)),y=c,h=0,f=(l=t).length>0?1:0,p=0,d=l.length,g=null,m={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},b={},void 0!==e&&(b.range="boolean"==typeof e.range&&e.range,b.loc="boolean"==typeof e.loc&&e.loc,b.attachComment="boolean"==typeof e.attachComment&&e.attachComment,b.loc&&null!==e.source&&void 0!==e.source&&(b.source=n(e.source)),"boolean"==typeof e.tokens&&e.tokens&&(b.tokens=[]),"boolean"==typeof e.comment&&e.comment&&(b.comments=[]),"boolean"==typeof e.tolerant&&e.tolerant&&(b.errors=[]),b.attachComment&&(b.range=!0,b.comments=[],b.bottomRightStack=[],b.trailingComments=[],b.leadingComments=[]));try{r=At(),void 0!==b.comments&&(r.comments=b.comments),void 0!==b.tokens&&(Lt(),r.tokens=b.tokens),void 0!==b.errors&&(r.errors=b.errors)}catch(t){throw t}finally{b={}}return r},t.Syntax=function(){var t,e={};for(t in"function"==typeof Object.create&&(e=Object.create(null)),i)i.hasOwnProperty(t)&&(e[t]=i[t]);return"function"==typeof Object.freeze&&Object.freeze(e),e}()})},{}],1:[function(t,e,r){(function(n){var i=function(){var t={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(t,r,n,i,o,s,a){i.ast||(i.ast=e,e.initialize());var c=s.length-1;switch(o){case 1:return i.ast.set({expression:{type:"root",value:s[c]}}),i.ast.unshift(),i.ast.yield();case 2:return i.ast.set({expression:{type:"root",value:s[c-1]}}),i.ast.unshift(),i.ast.yield();case 3:return i.ast.unshift(),i.ast.yield();case 4:return i.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:s[c-1]}}),i.ast.unshift(),i.ast.yield();case 5:case 6:case 11:case 13:case 18:case 21:case 22:case 23:break;case 7:i.ast.set({operation:"member"}),i.ast.push();break;case 8:i.ast.set({operation:"subscript"}),i.ast.push();break;case 9:case 19:i.ast.set({scope:"child"});break;case 10:case 20:i.ast.set({scope:"descendant"});break;case 12:i.ast.set({scope:"child",operation:"member"});break;case 14:i.ast.set({expression:{type:"wildcard",value:s[c]}});break;case 15:i.ast.set({expression:{type:"identifier",value:s[c]}});break;case 16:i.ast.set({expression:{type:"script_expression",value:s[c]}});break;case 17:i.ast.set({expression:{type:"numeric_literal",value:parseInt(s[c])}});break;case 24:s[c].length>1?i.ast.set({expression:{type:"union",value:s[c]}}):this.$=s[c];break;case 25:this.$=[s[c]];break;case 26:this.$=s[c-2].concat(s[c]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(s[c])}},i.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:s[c]}},i.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:s[c]}},i.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:s[c]}},i.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:s[c]}},i.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:s[c]}},i.ast.set(this.$);break;case 33:case 34:this.$=s[c]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){var e=this,r=[0],n=[null],i=[],o=this.table,s="",a=0,c=0,l=0,u=i.slice.call(arguments,1);this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var h=this.lexer.yylloc;i.push(h);var f=this.lexer.options&&this.lexer.options.ranges;function p(){var t;return"number"!=typeof(t=e.lexer.lex()||1)&&(t=e.symbols_[t]||t),t}"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var d,y,g,m,b,v,w,x,E,S={};;){if(g=r[r.length-1],this.defaultActions[g]?m=this.defaultActions[g]:(null==d&&(d=p()),m=o[g]&&o[g][d]),void 0===m||!m.length||!m[0]){var k;for(v in E=[],o[g])this.terminals_[v]&&v>2&&E.push("'"+this.terminals_[v]+"'");k=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[d]||d)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==d?"end of input":"'"+(this.terminals_[d]||d)+"'"),this.parseError(k,{text:this.lexer.match,token:this.terminals_[d]||d,line:this.lexer.yylineno,loc:h,expected:E})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+d);switch(m[0]){case 1:r.push(d),n.push(this.lexer.yytext),i.push(this.lexer.yylloc),r.push(m[1]),d=null,y?(d=y,y=null):(c=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,h=this.lexer.yylloc,l>0&&l--);break;case 2:if(w=this.productions_[m[1]][1],S.$=n[n.length-w],S._$={first_line:i[i.length-(w||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(w||1)].first_column,last_column:i[i.length-1].last_column},f&&(S._$.range=[i[i.length-(w||1)].range[0],i[i.length-1].range[1]]),void 0!==(b=this.performAction.apply(S,[s,c,a,this.yy,m[1],n,i].concat(u))))return b;w&&(r=r.slice(0,-1*w*2),n=n.slice(0,-1*w),i=i.slice(0,-1*w)),r.push(this.productions_[m[1]][0]),n.push(S.$),i.push(S._$),x=o[r[r.length-2]][r[r.length-1]],r.push(x);break;case 3:return!0}}return!0}},e={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(t){for(var e in t)this._node[e]=t[e];return this._node},node:function(t){return arguments.length&&(this._node=t),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var t=this._nodes;return this.initialize(),t}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===n.length?this.yylloc.first_column:0)+n[n.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,n,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((r=this._input.match(this.rules[i[o]]))&&(!e||r[0].length>e[0].length)){if(e=r,n=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,r,n){switch(r){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return e.yytext=e.yytext.substr(1,e.yyleng-2),32;case 11:return e.yytext=e.yytext.substr(1,e.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};function n(){this.yy={}}return t.lexer=r,n.prototype=t,t.Parser=n,new n}();void 0!==t&&void 0!==r&&(r.parser=i,r.Parser=i.Parser,r.parse=function(){return i.parse.apply(i,arguments)},r.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),n.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return r.parser.parse(i)},void 0!==e&&t.main===e&&r.main(n.argv.slice(1)))}).call(this,t("_process"))},{_process:14,fs:12,path:13}],2:[function(t,e,r){e.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(t,e,r){var n=t("./dict"),i=t("fs"),o={lex:{macros:{esc:"\\\\",int:n.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[n.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[n.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[n.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(o.moduleInclude=i.readFileSync(t.resolve("../include/module.js")),o.actionInclude=i.readFileSync(t.resolve("../include/action.js"))),e.exports=o},{"./dict":2,fs:12}],4:[function(t,e,r){var n=t("./aesprim"),i=t("./slice"),o=t("static-eval"),s=t("underscore").uniq,a=function(){return this.initialize.apply(this,arguments)};function c(e,r,i){var o=t("./index"),s=p(n.parse(r).body[0].expression,{"@":e.value}),a=i.replace(/\{\{\s*value\s*\}\}/g,s),c=o.nodes(e.value,a);return c.forEach(function(t){t.path=e.path.concat(t.path.slice(1))}),c}function l(t){return Array.isArray(t)}function u(t){return function(e,r,n,i){var o=e.value,s=e.path,a=[],c=function(e,o){var s;l(e)?(e.forEach(function(t,e){a.length>=i||n(e,t,r)&&a.push({path:o.concat(e),value:t})}),e.forEach(function(e,r){a.length>=i||t&&c(e,o.concat(r))})):(s=e)&&!(s instanceof Array)&&s instanceof Object&&(this.keys(e).forEach(function(t){a.length>=i||n(t,e[t],r)&&a.push({path:o.concat(t),value:e[t]})}),this.keys(e).forEach(function(r){a.length>=i||t&&c(e[r],o.concat(r))}))}.bind(this);return c(o,s),a}}function h(t){return function(e,r,n){return this.descend(r,e.expression.value,t,n)}}function f(t){return function(e,r,n){return this.traverse(r,e.expression.value,t,n)}}function p(){try{return o.apply(this,arguments)}catch(t){}}function d(t){return t=t.filter(function(t){return t}),s(t,function(t){return t.path.map(function(t){return String(t).replace("-","--")}).join("-")})}function y(t){var e=String(t);return e.match(/^-?[0-9]+$/)?parseInt(e):null}a.prototype.initialize=function(){this.traverse=u(!0),this.descend=u()},a.prototype.keys=Object.keys,a.prototype.resolve=function(t){var e=[t.operation,t.scope,t.expression.type].join("-"),r=this._fns[e];if(!r)throw new Error("couldn't resolve key: "+e);return r.bind(this)},a.prototype.register=function(t,e){if(!e instanceof Function)throw new Error("handler must be a function");this._fns[t]=e},a.prototype._fns={"member-child-identifier":function(t,e){var r=t.expression.value,n=e.value;if(n instanceof Object&&r in n)return[{value:n[r],path:e.path.concat(r)}]},"member-descendant-identifier":f(function(t,e,r){return t==r}),"subscript-child-numeric_literal":h(function(t,e,r){return t===r}),"member-child-numeric_literal":h(function(t,e,r){return String(t)===String(r)}),"subscript-descendant-numeric_literal":f(function(t,e,r){return t===r}),"member-child-wildcard":h(function(){return!0}),"member-descendant-wildcard":f(function(){return!0}),"subscript-descendant-wildcard":f(function(){return!0}),"subscript-child-wildcard":h(function(){return!0}),"subscript-child-slice":function(t,e){if(l(e.value)){var r=t.expression.value.split(":").map(y),n=e.value.map(function(t,r){return{value:t,path:e.path.concat(r)}});return i.apply(null,[n].concat(r))}},"subscript-child-union":function(t,e){var r=[];return t.expression.value.forEach(function(t){var n={operation:"subscript",scope:"child",expression:t.expression},i=this.resolve(n)(n,e);i&&(r=r.concat(i))},this),d(r)},"subscript-descendant-union":function(e,r,n){var i=t(".."),o=this,s=[];return i.nodes(r,"$..*").slice(1).forEach(function(t){s.length>=n||e.expression.value.forEach(function(e){var r={operation:"subscript",scope:"child",expression:e.expression},n=o.resolve(r)(r,t);s=s.concat(n)})}),d(s)},"subscript-child-filter_expression":function(t,e,r){var i=t.expression.value.slice(2,-1),o=n.parse(i).body[0].expression;return this.descend(e,null,function(t,e){return p(o,{"@":e})},r)},"subscript-descendant-filter_expression":function(t,e,r){var i=t.expression.value.slice(2,-1),o=n.parse(i).body[0].expression;return this.traverse(e,null,function(t,e){return p(o,{"@":e})},r)},"subscript-child-script_expression":function(t,e){return c(e,t.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(t,e){return c(e,t.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(t,e){return c(e,t.expression.value.slice(1,-1),"$..value")}},a.prototype._fns["subscript-child-string_literal"]=a.prototype._fns["member-child-identifier"],a.prototype._fns["member-descendant-numeric_literal"]=a.prototype._fns["subscript-descendant-string_literal"]=a.prototype._fns["member-descendant-identifier"],e.exports=a},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(t,e,r){var n=t("assert"),i=t("./dict"),o=t("./parser"),s=t("./handlers"),a=function(){this.initialize.apply(this,arguments)};function c(t){return"[object String]"==Object.prototype.toString.call(t)}a.prototype.initialize=function(){this.parser=new o,this.handlers=new s},a.prototype.parse=function(t){return n.ok(c(t),"we need a path"),this.parser.parse(t)},a.prototype.parent=function(t,e){n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path");var r=this.nodes(t,e)[0];return r.path.pop(),this.value(t,r.path)},a.prototype.apply=function(t,e,r){n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),n.equal(typeof r,"function","fn needs to be function");var i=this.nodes(t,e).sort(function(t,e){return e.path.length-t.path.length});return i.forEach(function(e){var n=e.path.pop(),i=this.value(t,this.stringify(e.path)),o=e.value=r.call(t,i[n]);i[n]=o},this),i},a.prototype.value=function(t,e,r){if(n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),arguments.length>=3){var i=this.nodes(t,e).shift();if(!i)return this._vivify(t,e,r);var o=i.path.slice(-1).shift();this.parent(t,this.stringify(i.path))[o]=r}return this.query(t,this.stringify(e),1).shift()},a.prototype._vivify=function(t,e,r){var i=this;n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path");var o=this.parser.parse(e).map(function(t){return t.expression.value}),s=function(e,r){var n=e.pop(),o=i.value(t,e);o||(s(e.concat(),"string"==typeof n?{}:[]),o=i.value(t,e)),o[n]=r};return s(o,r),this.query(t,e)[0]},a.prototype.query=function(t,e,r){return n.ok(t instanceof Object,"obj needs to be an object"),n.ok(c(e),"we need a path"),this.nodes(t,e,r).map(function(t){return t.value})},a.prototype.paths=function(t,e,r){return n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),this.nodes(t,e,r).map(function(t){return t.path})},a.prototype.nodes=function(t,e,r){if(n.ok(t instanceof Object,"obj needs to be an object"),n.ok(e,"we need a path"),0===r)return[];var i=this.parser.parse(e),o=this.handlers,s=[{path:["$"],value:t}],a=[];return i.length&&"root"==i[0].expression.type&&i.shift(),i.length?(i.forEach(function(t,e){if(!(a.length>=r)){var n=o.resolve(t),c=[];s.forEach(function(o){if(!(a.length>=r)){var s=n(t,o,r);e==i.length-1?a=a.concat(s||[]):c=c.concat(s||[])}}),s=c}}),r?a.slice(0,r):a):s},a.prototype.stringify=function(t){n.ok(t,"we need a path");var e="$",r={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(t=this._normalize(t)).forEach(function(t){if("root"!=t.expression.type){var n,i=[t.scope,t.operation].join("-"),o=r[i];if(n="string_literal"==t.expression.type?JSON.stringify(t.expression.value):t.expression.value,!o)throw new Error("couldn't find template "+i);e+=o.replace(/{{value}}/,n)}}),e},a.prototype._normalize=function(t){if(n.ok(t,"we need a path"),"string"==typeof t)return this.parser.parse(t);if(Array.isArray(t)&&"string"==typeof t[0]){var e=[{expression:{type:"root",value:"$"}}];return t.forEach(function(t,r){if("$"!=t||0!==r)if("string"==typeof t&&t.match("^"+i.identifier+"$"))e.push({operation:"member",scope:"child",expression:{value:t,type:"identifier"}});else{var n="number"==typeof t?"numeric_literal":"string_literal";e.push({operation:"subscript",scope:"child",expression:{value:t,type:n}})}}),e}if(Array.isArray(t)&&"object"==typeof t[0])return t;throw new Error("couldn't understand path "+t)},a.Handlers=s,a.Parser=o;var l=new a;l.JSONPath=a,e.exports=l},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(t,e,r){var n=t("./grammar"),i=t("../generated/parser"),o=function(){var t=new i.Parser,e=t.parseError;return t.yy.parseError=function(){t.yy.ast&&t.yy.ast.initialize(),e.apply(t,arguments)},t};o.grammar=n,e.exports=o},{"../generated/parser":1,"./grammar":3}],7:[function(t,e,r){function n(t){return String(t).match(/^[0-9]+$/)?parseInt(t):Number.isFinite(t)?parseInt(t,10):0}e.exports=function(t,e,r,i){if("string"==typeof e)throw new Error("start cannot be a string");if("string"==typeof r)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=t.length;if(0===i)throw new Error("step cannot be zero");if(i=i?n(i):1,r=r<0?o+r:r,e=n(0===(e=e<0?o+e:e)?0:e||(i>0?0:o-1)),r=n(0===r?0:r||(i>0?o:-1)),e=i>0?Math.max(0,e):Math.min(o,e),r=i>0?Math.min(r,o):Math.max(-1,r),i>0&&r<=e)return[];if(i<0&&e<=r)return[];for(var s=[],a=e;a!=r&&!(i<0&&a<=r||i>0&&a>=r);a+=i)s.push(t[a]);return s}},{}],8:[function(t,e,r){var n=t("util/"),i=Array.prototype.slice,o=Object.prototype.hasOwnProperty,s=e.exports=u;function a(t,e){return n.isUndefined(e)?""+e:n.isNumber(e)&&!isFinite(e)||n.isFunction(e)||n.isRegExp(e)?e.toString():e}function c(t,e){return n.isString(t)?t.length<e?t:t.slice(0,e):t}function l(t,e,r,n,i){throw new s.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function u(t,e){t||l(t,!0,e,"==",s.ok)}function h(t,e){if(t===e)return!0;if(n.isBuffer(t)&&n.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}return n.isDate(t)&&n.isDate(e)?t.getTime()===e.getTime():n.isRegExp(t)&&n.isRegExp(e)?t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase:n.isObject(t)||n.isObject(e)?function(t,e){if(n.isNullOrUndefined(t)||n.isNullOrUndefined(e))return!1;if(t.prototype!==e.prototype)return!1;if(n.isPrimitive(t)||n.isPrimitive(e))return t===e;var r=f(t),o=f(e);if(r&&!o||!r&&o)return!1;if(r)return h(t=i.call(t),e=i.call(e));var s,a,c=y(t),l=y(e);if(c.length!=l.length)return!1;for(c.sort(),l.sort(),a=c.length-1;a>=0;a--)if(c[a]!=l[a])return!1;for(a=c.length-1;a>=0;a--)if(!h(t[s=c[a]],e[s]))return!1;return!0}(t,e):t==e}function f(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function p(t,e){return!(!t||!e)&&("[object RegExp]"==Object.prototype.toString.call(e)?e.test(t):t instanceof e||!0===e.call({},t))}function d(t,e,r,i){var o;n.isString(r)&&(i=r,r=null);try{e()}catch(t){o=t}if(i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!o&&l(o,r,"Missing expected exception"+i),!t&&p(o,r)&&l(o,r,"Got unwanted exception"+i),t&&o&&r&&!p(o,r)||!t&&o)throw o}s.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return c(JSON.stringify(t.actual,a),128)+" "+t.operator+" "+c(JSON.stringify(t.expected,a),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=e.name,o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},n.inherits(s.AssertionError,Error),s.fail=l,s.ok=u,s.equal=function(t,e,r){t!=e&&l(t,e,r,"==",s.equal)},s.notEqual=function(t,e,r){t==e&&l(t,e,r,"!=",s.notEqual)},s.deepEqual=function(t,e,r){h(t,e)||l(t,e,r,"deepEqual",s.deepEqual)},s.notDeepEqual=function(t,e,r){h(t,e)&&l(t,e,r,"notDeepEqual",s.notDeepEqual)},s.strictEqual=function(t,e,r){t!==e&&l(t,e,r,"===",s.strictEqual)},s.notStrictEqual=function(t,e,r){t===e&&l(t,e,r,"!==",s.notStrictEqual)},s.throws=function(t,e,r){d.apply(this,[!0].concat(i.call(arguments)))},s.doesNotThrow=function(t,e){d.apply(this,[!1].concat(i.call(arguments)))},s.ifError=function(t){if(t)throw t};var y=Object.keys||function(t){var e=[];for(var r in t)o.call(t,r)&&e.push(r);return e}},{"util/":11}],9:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],10:[function(t,e,r){e.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},{}],11:[function(t,e,n){(function(e,r){var i=/%[sdj%]/g;n.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),c=n[r];r<o;c=n[++r])y(c)||!w(c)?s+=" "+c:s+=" "+a(c);return s},n.deprecate=function(t,i){if(b(r.process))return function(){return n.deprecate(t,i).apply(this,arguments)};if(!0===e.noDeprecation)return t;var o=!1;return function(){if(!o){if(e.throwDeprecation)throw new Error(i);e.traceDeprecation?console.trace(i):console.error(i),o=!0}return t.apply(this,arguments)}};var o,s={};function a(t,e){var r={seen:[],stylize:l};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),d(e)?r.showHidden=e:e&&n._extend(r,e),b(r.showHidden)&&(r.showHidden=!1),b(r.depth)&&(r.depth=2),b(r.colors)&&(r.colors=!1),b(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),u(r,t,r.depth)}function c(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function l(t,e){return t}function u(t,e,r){if(t.customInspect&&e&&S(e.inspect)&&e.inspect!==n.inspect&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return m(i)||(i=u(t,i,r)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return g(e)?t.stylize(""+e,"number"):d(e)?t.stylize(""+e,"boolean"):y(e)?t.stylize("null","null"):void 0}(t,e);if(o)return o;var s=Object.keys(e),a=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(e)),E(e)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(e);if(0===s.length){if(S(e)){var c=e.name?": "+e.name:"";return t.stylize("[Function"+c+"]","special")}if(v(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(x(e))return t.stylize(Date.prototype.toString.call(e),"date");if(E(e))return h(e)}var l,w="",k=!1,I=["{","}"];return p(e)&&(k=!0,I=["[","]"]),S(e)&&(w=" [Function"+(e.name?": "+e.name:"")+"]"),v(e)&&(w=" "+RegExp.prototype.toString.call(e)),x(e)&&(w=" "+Date.prototype.toUTCString.call(e)),E(e)&&(w=" "+h(e)),0!==s.length||k&&0!=e.length?r<0?v(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),l=k?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)_(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach(function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))}),o}(t,e,r,a,s):s.map(function(n){return f(t,e,r,a,n,k)}),t.seen.pop(),function(t,e,r){return t.reduce(function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(l,w,I)):I[0]+w+I[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,c;if((c=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=c.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):c.set&&(a=t.stylize("[Setter]","special")),_(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(c.value)<0?(a=y(r)?u(t,c.value,null):u(t,c.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n")):a=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function p(t){return Array.isArray(t)}function d(t){return"boolean"==typeof t}function y(t){return null===t}function g(t){return"number"==typeof t}function m(t){return"string"==typeof t}function b(t){return void 0===t}function v(t){return w(t)&&"[object RegExp]"===k(t)}function w(t){return"object"==typeof t&&null!==t}function x(t){return w(t)&&"[object Date]"===k(t)}function E(t){return w(t)&&("[object Error]"===k(t)||t instanceof Error)}function S(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function I(t){return t<10?"0"+t.toString(10):t.toString(10)}n.debuglog=function(t){if(b(o)&&(o=e.env.NODE_DEBUG||""),t=t.toUpperCase(),!s[t])if(new RegExp("\\b"+t+"\\b","i").test(o)){var r=e.pid;s[t]=function(){var e=n.format.apply(n,arguments);console.error("%s %d: %s",t,r,e)}}else s[t]=function(){};return s[t]},n.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},n.isArray=p,n.isBoolean=d,n.isNull=y,n.isNullOrUndefined=function(t){return null==t},n.isNumber=g,n.isString=m,n.isSymbol=function(t){return"symbol"==typeof t},n.isUndefined=b,n.isRegExp=v,n.isObject=w,n.isDate=x,n.isError=E,n.isFunction=S,n.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},n.isBuffer=t("./support/isBuffer");var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function _(t,e){return Object.prototype.hasOwnProperty.call(t,e)}n.log=function(){var t,e;console.log("%s - %s",(t=new Date,e=[I(t.getHours()),I(t.getMinutes()),I(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],e].join(" ")),n.format.apply(n,arguments))},n.inherits=t("inherits"),n._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}}).call(this,t("_process"),void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(t,e,r){},{}],13:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}r.resolve=function(){for(var r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,i="/"===s.charAt(0))}return(i?"/":"")+(r=e(n(r.split("/"),function(t){return!!t}),!i).join("/"))||"."},r.normalize=function(t){var o=r.isAbsolute(t),s="/"===i(t,-1);return(t=e(n(t.split("/"),function(t){return!!t}),!o).join("/"))||o||(t="."),t&&s&&(t+="/"),(o?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),s=Math.min(i.length,o.length),a=s,c=0;c<s;c++)if(i[c]!==o[c]){a=c;break}var l=[];for(c=a;c<i.length;c++)l.push("..");return(l=l.concat(o.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===e?e=s:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=s+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i=function(t,e,r){return t.substr(e,r)}}).call(this,t("_process"))},{_process:14}],14:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var l,u=[],h=!1,f=-1;function p(){h&&l&&(h=!1,l.length?u=l.concat(u):f=-1,u.length&&d())}function d(){if(!h){var t=c(p);h=!0;for(var e=u.length;e;){for(l=u,u=[];++f<e;)l&&l[f].run();f=-1,e=u.length}l=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{return i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function g(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new y(t,e)),1!==u.length||h||c(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=g,o.addListener=g,o.once=g,o.off=g,o.removeListener=g,o.removeAllListeners=g,o.emit=g,o.prependListener=g,o.prependOnceListener=g,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],15:[function(t,e,r){var n=t("escodegen").generate;e.exports=function(t,e){e||(e={});var r={},i=function t(i,o){if("Literal"===i.type)return i.value;if("UnaryExpression"===i.type){var s=t(i.argument);return"+"===i.operator?+s:"-"===i.operator?-s:"~"===i.operator?~s:"!"===i.operator?!s:r}if("ArrayExpression"===i.type){for(var a=[],c=0,l=i.elements.length;c<l;c++){if((m=t(i.elements[c]))===r)return r;a.push(m)}return a}if("ObjectExpression"===i.type){var u={};for(c=0;c<i.properties.length;c++){var h=null===(b=i.properties[c]).value?b.value:t(b.value);if(h===r)return r;u[b.key.value||b.key.name]=h}return u}if("BinaryExpression"===i.type||"LogicalExpression"===i.type){if((l=t(i.left))===r)return r;var f=t(i.right);if(f===r)return r;var p=i.operator;return"=="===p?l==f:"==="===p?l===f:"!="===p?l!=f:"!=="===p?l!==f:"+"===p?l+f:"-"===p?l-f:"*"===p?l*f:"/"===p?l/f:"%"===p?l%f:"<"===p?l<f:"<="===p?l<=f:">"===p?l>f:">="===p?l>=f:"|"===p?l|f:"&"===p?l&f:"^"===p?l^f:"&&"===p?l&&f:"||"===p?l||f:r}if("Identifier"===i.type)return{}.hasOwnProperty.call(e,i.name)?e[i.name]:r;if("ThisExpression"===i.type)return{}.hasOwnProperty.call(e,"this")?e.this:r;if("CallExpression"===i.type){var d=t(i.callee);if(d===r)return r;if("function"!=typeof d)return r;var y=i.callee.object?t(i.callee.object):r;y===r&&(y=null);var g=[];for(c=0,l=i.arguments.length;c<l;c++){var m;if((m=t(i.arguments[c]))===r)return r;g.push(m)}return d.apply(y,g)}var b;if("MemberExpression"===i.type)return(u=t(i.object))===r||"function"==typeof u?r:"Identifier"===i.property.type?u[i.property.name]:(b=t(i.property))===r?r:u[b];if("ConditionalExpression"===i.type)return(s=t(i.test))===r?r:t(s?i.consequent:i.alternate);if("ExpressionStatement"===i.type)return(s=t(i.expression))===r?r:s;if("ReturnStatement"===i.type)return t(i.argument);if("FunctionExpression"===i.type){var v=i.body.body,w={};for(Object.keys(e).forEach(function(t){w[t]=e[t]}),c=0;c<i.params.length;c++){var x=i.params[c];if("Identifier"!=x.type)return r;e[x.name]=null}for(var c in v)if(t(v[c])===r)return r;e=w;var E=Object.keys(e),S=E.map(function(t){return e[t]});return Function(E.join(", "),"return "+n(i)).apply(null,S)}if("TemplateLiteral"===i.type){var k="";for(c=0;c<i.expressions.length;c++)k+=t(i.quasis[c]),k+=t(i.expressions[c]);return k+t(i.quasis[c])}if("TaggedTemplateExpression"===i.type){var I=t(i.tag),T=i.quasi,_=T.quasis.map(t),C=T.expressions.map(t);return I.apply(null,[_].concat(C))}return"TemplateElement"===i.type?i.value.cooked:r}(t);return i===r?void 0:i}},{escodegen:12}],jsonpath:[function(t,e,r){e.exports=t("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")},295(t,e,r){"use strict";r.r(e),r.d(e,{ResizeObserver:()=>F,ResizeObserverEntry:()=>k,ResizeObserverSize:()=>l});var n,i=[],o=function(){return i.some(function(t){return t.activeTargets.length>0})},s="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(n||(n={}));var a,c=function(t){return Object.freeze(t)},l=function(t,e){this.inlineSize=t,this.blockSize=e,c(this)},u=function(){function t(t,e,r,n){return this.x=t,this.y=e,this.width=r,this.height=n,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,c(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}(),h=function(t){return t instanceof SVGElement&&"getBBox"in t},f=function(t){if(h(t)){var e=t.getBBox(),r=e.width,n=e.height;return!r&&!n}var i=t,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||t.getClientRects().length)},p=function(t){var e;if(t instanceof Element)return!0;var r=null===(e=null==t?void 0:t.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(r&&t instanceof r.Element)},d="undefined"!=typeof window?window:{},y=new WeakMap,g=/auto|scroll/,m=/^tb|vertical/,b=/msie|trident/i.test(d.navigator&&d.navigator.userAgent),v=function(t){return parseFloat(t||"0")},w=function(t,e,r){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=!1),new l((r?e:t)||0,(r?t:e)||0)},x=c({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new u(0,0,0,0)}),E=function(t,e){if(void 0===e&&(e=!1),y.has(t)&&!e)return y.get(t);if(f(t))return y.set(t,x),x;var r=getComputedStyle(t),n=h(t)&&t.ownerSVGElement&&t.getBBox(),i=!b&&"border-box"===r.boxSizing,o=m.test(r.writingMode||""),s=!n&&g.test(r.overflowY||""),a=!n&&g.test(r.overflowX||""),l=n?0:v(r.paddingTop),p=n?0:v(r.paddingRight),d=n?0:v(r.paddingBottom),E=n?0:v(r.paddingLeft),S=n?0:v(r.borderTopWidth),k=n?0:v(r.borderRightWidth),I=n?0:v(r.borderBottomWidth),T=E+p,_=l+d,C=(n?0:v(r.borderLeftWidth))+k,O=S+I,A=a?t.offsetHeight-O-t.clientHeight:0,L=s?t.offsetWidth-C-t.clientWidth:0,P=i?T+C:0,R=i?_+O:0,B=n?n.width:v(r.width)-P-L,N=n?n.height:v(r.height)-R-A,M=B+T+L+C,U=N+_+A+O,$=c({devicePixelContentBoxSize:w(Math.round(B*devicePixelRatio),Math.round(N*devicePixelRatio),o),borderBoxSize:w(M,U,o),contentBoxSize:w(B,N,o),contentRect:new u(E,l,B,N)});return y.set(t,$),$},S=function(t,e,r){var i=E(t,r),o=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(e){case n.DEVICE_PIXEL_CONTENT_BOX:return a;case n.BORDER_BOX:return o;default:return s}},k=function(t){var e=E(t);this.target=t,this.contentRect=e.contentRect,this.borderBoxSize=c([e.borderBoxSize]),this.contentBoxSize=c([e.contentBoxSize]),this.devicePixelContentBoxSize=c([e.devicePixelContentBoxSize])},I=function(t){if(f(t))return 1/0;for(var e=0,r=t.parentNode;r;)e+=1,r=r.parentNode;return e},T=function(){var t=1/0,e=[];i.forEach(function(r){if(0!==r.activeTargets.length){var n=[];r.activeTargets.forEach(function(e){var r=new k(e.target),i=I(e.target);n.push(r),e.lastReportedSize=S(e.target,e.observedBox),i<t&&(t=i)}),e.push(function(){r.callback.call(r.observer,n,r.observer)}),r.activeTargets.splice(0,r.activeTargets.length)}});for(var r=0,n=e;r<n.length;r++)(0,n[r])();return t},_=function(t){i.forEach(function(e){e.activeTargets.splice(0,e.activeTargets.length),e.skippedTargets.splice(0,e.skippedTargets.length),e.observationTargets.forEach(function(r){r.isActive()&&(I(r.target)>t?e.activeTargets.push(r):e.skippedTargets.push(r))})})},C=[],O=0,A={attributes:!0,characterData:!0,childList:!0,subtree:!0},L=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],P=function(t){return void 0===t&&(t=0),Date.now()+t},R=!1,B=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var e=this;if(void 0===t&&(t=250),!R){R=!0;var r,n=P(t);r=function(){var r=!1;try{r=function(){var t,e=0;for(_(e);o();)e=T(),_(e);return i.some(function(t){return t.skippedTargets.length>0})&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:s}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=s),window.dispatchEvent(t)),e>0}()}finally{if(R=!1,t=n-P(),!O)return;r?e.run(1e3):t>0?e.run(t):e.start()}},function(t){if(!a){var e=0,r=document.createTextNode("");new MutationObserver(function(){return C.splice(0).forEach(function(t){return t()})}).observe(r,{characterData:!0}),a=function(){r.textContent="".concat(e?e--:e++)}}C.push(t),a()}(function(){requestAnimationFrame(r)})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,e=function(){return t.observer&&t.observer.observe(document.body,A)};document.body?e():d.addEventListener("DOMContentLoaded",e)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),L.forEach(function(e){return d.addEventListener(e,t.listener,!0)}))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),L.forEach(function(e){return d.removeEventListener(e,t.listener,!0)}),this.stopped=!0)},t}()),N=function(t){!O&&t>0&&B.start(),!(O+=t)&&B.stop()},M=function(){function t(t,e){this.target=t,this.observedBox=e||n.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,e=S(this.target,this.observedBox,!0);return t=this.target,h(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}(),U=function(t,e){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=e},$=new WeakMap,D=function(t,e){for(var r=0;r<t.length;r+=1)if(t[r].target===e)return r;return-1},j=function(){function t(){}return t.connect=function(t,e){var r=new U(t,e);$.set(t,r)},t.observe=function(t,e,r){var n=$.get(t),o=0===n.observationTargets.length;D(n.observationTargets,e)<0&&(o&&i.push(n),n.observationTargets.push(new M(e,r&&r.box)),N(1),B.schedule())},t.unobserve=function(t,e){var r=$.get(t),n=D(r.observationTargets,e),o=1===r.observationTargets.length;n>=0&&(o&&i.splice(i.indexOf(r),1),r.observationTargets.splice(n,1),N(-1))},t.disconnect=function(t){var e=this,r=$.get(t);r.observationTargets.slice().forEach(function(r){return e.unobserve(t,r.target)}),r.activeTargets.splice(0,r.activeTargets.length)},t}(),F=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");j.connect(this,t)}return t.prototype.observe=function(t,e){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");j.observe(this,t,e)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!p(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");j.unobserve(this,t)},t.prototype.disconnect=function(){j.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}()},318(t,e){e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,c=(1<<a)-1,l=c>>1,u=-7,h=r?i-1:0,f=r?-1:1,p=t[e+h];for(h+=f,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+t[e+h],h+=f,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=n;u>0;s=256*s+t[e+h],h+=f,u-=8);if(0===o)o=1-l;else{if(o===c)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=l}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,c,l=8*o-i-1,u=(1<<l)-1,h=u>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=u):(s=Math.floor(Math.log(e)/Math.LN2),e*(c=Math.pow(2,-s))<1&&(s--,c*=2),(e+=s+h>=1?f/c:f*Math.pow(2,1-h))*c>=2&&(s++,c/=2),s+h>=u?(a=0,s=u):s+h>=1?(a=(e*c-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,l+=i;l>0;t[r+p]=255&s,p+=d,s/=256,l-=8);t[r+p-d]|=128*y}},949(t,e,r){"use strict";var n,i=r(48).hp,o=Object.create,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,l=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,h=(t,e,r,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let i of c(e))u.call(t,i)||i===r||s(t,i,{get:()=>e[i],enumerable:!(n=a(e,i))||n.enumerable});return t},f=(t,e,r)=>(r=null!=t?o(l(t)):{},h(!e&&t&&t.__esModule?r:s(r,"default",{value:t,enumerable:!0}),t)),p={};((t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})})(p,{BoxType:()=>b,DEFAULT_TARGET:()=>m,Render2d:()=>E,RenderBlur:()=>I,RenderBox:()=>v,RenderClasses:()=>H,RenderContour:()=>G,RenderFace:()=>T,RenderHand:()=>P,RenderKeyPoints:()=>W,RenderMask:()=>z,RenderPose:()=>N,RenderText:()=>q,RenderTrail:()=>F,Renderer2d:()=>k,default:()=>X}),t.exports=(n=p,h(s({},"__esModule",{value:!0}),n));var d=r(295),y=class t{constructor(e){this.scale=1,this.cornerWidth=.3,this.cornerPadding=.04,this.colors=t.defaultColors,"document"in globalThis&&"implementation"in globalThis.document&&new d.ResizeObserver(t=>{const r=t[0].contentRect;this.font=this.calculateFont(r.width,r.height),this.scale=this.calculateScale(e)}).observe(e.canvas),this.font=this.calculateFont(e.canvas.width,e.canvas.height),this.scale=this.calculateScale(e)}calculateFont(t,e){return Math.floor(Math.max(12,.035*Math.min(t,e)))+"px Times New Roman"}calculateScale(t){const e="undefined"==typeof screen?null:screen,r="undefined"==typeof window?null:window,n=e?.width??t.canvas.width,i=e?.height??t.canvas.height;return Math.max(t.canvas.width/n,t.canvas.height/i)*(r?.devicePixelRatio??1)}};y.defaultColors={primary_color:"#2fa7d7",secondary_color:"#94e0ff",right_color:"#000000",left_color:"#ffffff",opacity_color:"rgba(47, 167, 215, 0.2)",white:"#FFFFFF",black:"#111111",blank_color:"#000000"};var g=y,m="$..objects[?(@.category=='person')]",b=(t=>(t.Rich="rich",t.Simple="simple",t.SimpleSelected="simpleSelected",t))(b||{}),v=class t{constructor(t={}){this.target=m;const{showClass:e=!0,showConfidence:r=!1,showTrackId:n=!1,showNestedClasses:i=!1,target:o="$..objects.*",boxType:s="rich"}=t;this.target=o,this.showClass=e,this.showNestedClasses=i,this.showConfidence=r,this.showTrackId=n,this.boxType=s}start(t,e){this.context=t,this.style=e}draw(e,r,n,i,o,s,a){if("simple"===this.boxType)return void this.drawSimple(e,r,n,i,o,s,a);if("simpleSelected"===this.boxType)return void this.drawSimpleSelected(e,r,n,i,o,s,a);const c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");const u=r+e.x*i,h=n+e.y*o,f=e.width*i,p=e.height*o;e.objects&&e.objects.sort((t,e)=>t.category&&e.category?t.category.localeCompare(e.category):0);let d=Math.min(f,p);const y=Math.max(.0025*d,l.scale);c.beginPath(),c.rect(u,h,f,p),c.lineWidth=y,c.strokeStyle=l.colors.opacity_color,c.fillStyle=l.colors.opacity_color,c.fill(),c.stroke();let g=d*l.cornerWidth;g=Math.max(g,20*l.scale),g=Math.min(g,f-4*y),g=Math.min(g,p-4*y),this.createCornerPoints(u,h,f,p,g,l.scale).forEach(t=>{c.beginPath(),c.moveTo(t[0].x,t[0].y),c.lineTo(t[1].x,t[1].y),c.lineTo(t[2].x,t[2].y),c.strokeStyle=l.colors.primary_color,c.lineWidth=y,c.stroke()});let m=d*l.cornerPadding;m=Math.max(m,4*l.scale),g-=1.33*m,g=Math.min(g,f),g=Math.min(g,p),this.createCornerPoints(u,h,f,p,g,m,m/2).forEach(t=>{c.beginPath(),c.moveTo(t[0].x,t[0].y),c.lineTo(t[1].x,t[1].y),c.lineTo(t[2].x,t[2].y),c.strokeStyle=l.colors.secondary_color,c.lineWidth=y,c.stroke()}),m*=1.5;let b=e.width*i-2*m,v=e.height*o-2*m;v=Math.max(v,0),b=Math.max(b,0);let w=this.getMinFontSize(c,e,b,v,l),x="";if(this.showClass&&e.classLabel&&(x=e.classLabel,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showNestedClasses&&e?.classes){e.classes.sort((t,e)=>t.category.localeCompare(e.category));for(let s=0;s<e.classes.length;s++)x=e.classes[s]?.classLabel,x&&(x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}this.showTrackId&&e.trackId&&(x="ID: "+e.trackId,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showConfidence&&e.confidence&&(x=Math.round(100*e.confidence)+"%",x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}drawSimple(e,r,n,i,o,s,a){const c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");const u=r+e.x*i,h=n+e.y*o,f=e.width*i,p=e.height*o;e.objects&&e.objects.sort((t,e)=>t.category&&e.category?t.category.localeCompare(e.category):0);const d=l.scale;c.beginPath(),c.rect(u,h,f,p),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.stroke();let y=Math.min(c.canvas.width,c.canvas.height),g=Math.max(Math.min(f/25,y*l.cornerWidth),d),m=e.width*i-3*g,b=e.height*o-3*g;b=Math.max(b,0),m=Math.max(m,0);let v=this.getMinFontSize(c,e,m,b,l),w="";if(this.showClass&&e.classLabel&&(w=e.classLabel,w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v)),this.showNestedClasses&&e?.classes){e.classes.sort((t,e)=>t.category.localeCompare(e.category));for(let s=0;s<e.classes.length;s++)w=e.classes[s]?.classLabel,w&&(w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v))}this.showTrackId&&e.trackId&&(w="ID: "+e.trackId,w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v)),this.showConfidence&&e.confidence&&(w=Math.round(100*e.confidence)+"%",w=t.toTitleCase(w),n+=this.drawLabel(w,c,e,o,i,n,r,l,m,g,!1,v))}drawSimpleSelected(e,r,n,i,o,s,a){const c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");const u=r+e.x*i,h=n+e.y*o,f=e.width*i,p=e.height*o;e.objects&&e.objects.sort((t,e)=>t.category&&e.category?t.category.localeCompare(e.category):0);const d=l.scale;c.beginPath(),c.rect(u,h,f,p),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.stroke();let y=Math.min(c.canvas.width,c.canvas.height),g=.005*y,m=Math.max(Math.min(f/25,y*l.cornerWidth),d);this.createCornerPoints(u,h,f,p,g,m).forEach(t=>{c.beginPath(),c.arc(t.x,t.y,g,0,2*Math.PI),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.fillStyle="white",c.fill(),c.stroke()}),this.createCenterPoints(u,h,f,p,g).forEach(t=>{c.beginPath(),c.arc(t.x,t.y,g,0,2*Math.PI),c.lineWidth=4*d,c.strokeStyle=a||l.colors.primary_color,c.fillStyle="white",c.fill(),c.stroke()});let b=e.width*i-3*m,v=e.height*o-3*m;v=Math.max(v,0),b=Math.max(b,0);let w=this.getMinFontSize(c,e,b,v,l),x="";if(this.showClass&&e.classLabel&&(x=e.classLabel,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showNestedClasses&&e?.classes){e.classes.sort((t,e)=>t.category.localeCompare(e.category));for(let s=0;s<e.classes.length;s++)x=e.classes[s]?.classLabel,x&&(x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}this.showTrackId&&e.trackId&&(x="ID: "+e.trackId,x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w)),this.showConfidence&&e.confidence&&(x=Math.round(100*e.confidence)+"%",x=t.toTitleCase(x),n+=this.drawLabel(x,c,e,o,i,n,r,l,b,m,!1,w))}createCornerPoints(t,e,r,n,i,o=1,s=1){const a=t+o,c=e+o,l=r-2*o,u=n-2*o,h=i-s;return[[{x:a+s,y:c+h},{x:a+s,y:c+s},{x:a+h,y:c+s}],[{x:a+s,y:c+u-h-s},{x:a+s,y:c+u-s},{x:a+h,y:c+u-s}],[{x:a+l-h-s,y:c+s},{x:a+l-s,y:c+s},{x:a+l-s,y:c+h}],[{x:a+l-h-s,y:c+u-s},{x:a+l-s,y:c+u-s},{x:a+l-s,y:c+u-h-s}]]}createCenterPoints(t,e,r,n,i){return[{x:t,y:e},{x:t+r,y:e},{x:t,y:e+n},{x:t+r,y:e+n},{x:t+r/2,y:e},{x:t+r/2,y:e+n},{x:t,y:e+n/2},{x:t+r,y:e+n/2}]}drawLabel(t,e,r,n,i,o,s,a,c,l,u=!1,h){e.fillStyle="#ffffff",e.textAlign="left",e.textBaseline="top",e.font=a.font;let f=e.measureText(t),p=c/f.width,d=a.font.split(" ")[1];if(h)e.font=`${h}px `+d;else{let t=parseInt(a.font.split(" ")[0]);u?t*=p:t=Math.min(t,t*p),e.font=`${t}px ${d}`}f=e.measureText(t);let y=r.x*i+s+1.5*l,g=r.y*n+o+1.5*l;return e.fillText(t,y,g),g+=l+f.actualBoundingBoxAscent+f.actualBoundingBoxDescent,l+f.actualBoundingBoxDescent}static toTitleCase(t){return t?t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):""}getMinFontSize(e,r,n,i,o,s=!1){let a="";if(this.showClass&&r.classLabel){const e=r.classLabel,n=`${t.toTitleCase(e)}`;n.length>a.length&&(a=n)}if(this.showNestedClasses&&r?.classes)for(let e=0;e<r.classes.length;e++){const n=r.classes[e].classLabel,i=`${t.toTitleCase(n)}`;i.length>a.length&&(a=i)}if(this.showTrackId&&r.trackId){const e=`ID: ${r.trackId}`,n=`${t.toTitleCase(e)}`;n.length>a.length&&(a=n)}if(this.showConfidence&&r.confidence){const e=`${Math.round(100*r.confidence)}%`,n=`${t.toTitleCase(e)}`;n.length>a.length&&(a=n)}return this.getFontSize(a,e,o,n,i,s)}getFontSize(t,e,r,n,i,o=!1){e.textAlign="left",e.textBaseline="top",e.font=r.font;let s=e.measureText(t),a=n/(s.actualBoundingBoxLeft+s.actualBoundingBoxRight),c=parseInt(r.font.split(" ")[0]);return o?c*=a:c=Math.min(c,c*a),c=Math.max(c,0),c}},w=f(r(66)),x=class t{constructor(e){this.target=m;const{context:r,rules:n}=e;this.context=r,n?Array.isArray(n)?this.rules=n:this.rules=[n]:this.rules=t.defaultRules,this.style=new g(r);for(let t=0;t<this.rules.length;t++)this.rules[t].start(this.context,this.style)}draw(t,e){const r=this.context.canvas.width/t.source_width,n=this.context.canvas.height/t.source_height,i=t;for(let o=0;o<this.rules.length;o++){const s=this.rules[o],a=w.query(t,s.target);for(let t=0;t<a.length;t++)s.draw(a[t],0,0,r,n,i,e)}}};x.defaultRules=[new v];var E,S,k=x,I=class{constructor(t={}){this.target=m;const{target:e=m}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=e+t.x*n,l=r+t.y*i,u=t.width*n,h=t.height*i;s.beginPath(),s.rect(c,l,u,h),s.lineWidth=a.scale,s.strokeStyle=a.colors.black,s.fillStyle=a.colors.black,s.fill(),s.stroke()}},T=class{constructor(t={}){this.target=m,this.showLabels=!1;const{showLabels:e=!1,target:r='$..objects[?(@.classLabel=="face")]'}=t;this.target=r,this.showLabels=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.meshs)for(let o=0;o<t.meshs.length;o++){const s=t.meshs[o];"3d-face-mesh"==s.category&&this.render3dFaceMesh(s,e,r,n,i)}this.renderExpressions(t,e,r,n,i)}renderExpressions(t,e,r,n,i){let o=[];if(t.classes)for(let e=0;e<t.classes.length;e++)if(t.classes[e].confidence>.95){const r=_.get(t.classes[e].classLabel);r&&o.push(r)}if(o.length>0){const s=o.join(", "),a=10,c=this.context,l=this.style;if(!c||!l)throw new Error("render() called before start()");c.beginPath(),c.lineWidth=l.scale,c.strokeStyle=l.colors.primary_color,c.fillStyle=l.colors.primary_color,c.font=l.font,c.textBaseline="hanging";const u=c.measureText(s),h=e+t.x*n,f=r+t.y*i;c.roundRect?c.roundRect(h,f,u.width+2*a,24,[0,0,20,0]):c.fillRect(h,f,u.width+2*a,24),c.fill(),this.showLabels&&(c.fillStyle=l.colors.secondary_color,c.fillText(s,Math.max(0,h)+a,Math.max(0,f))),c.closePath()}}render3dFaceMesh(t,e,r,n,i){const o=this.context,s=this.style;if(!o||!s)throw new Error("render() called before start()");const a=s.scale;o.lineWidth=a,o.strokeStyle=s.colors.primary_color,o.fillStyle=s.colors.primary_color,this.renderConnections(o,L,t,e,r,n,i),o.lineWidth=1.5*a,o.strokeStyle=s.colors.secondary_color,o.fillStyle=s.colors.secondary_color,this.renderConnections(o,A,t,e,r,n,i),o.lineWidth=1.5*a,o.strokeStyle=s.colors.right_color,o.fillStyle=s.colors.right_color,this.renderConnections(o,O,t,e,r,n,i),o.lineWidth=1.5*a,o.strokeStyle=s.colors.left_color,o.fillStyle=s.colors.left_color,this.renderConnections(o,C,t,e,r,n,i)}renderConnections(t,e,r,n,i,o,s){t.beginPath();for(let a=0;a<e.length;a++){let c=r.points[e[a][0]].x,l=r.points[e[a][1]].x,u=r.points[e[a][0]].y,h=r.points[e[a][1]].y;c=n+c*o,l=n+l*o,u=i+u*s,h=i+h*s,t.moveTo(c,u),t.lineTo(l,h)}t.stroke()}},_=new Map([["happy","happy"],["neutral","neutral"],["sad","sad"],["surprise","surprise"],["angry","angry"],["fear","fear"],["disgust","disgust"]]),C=[[474,475],[475,476],[476,477],[477,474]],O=[[469,470],[470,471],[471,472],[472,469]],A=[[61,146],[146,91],[91,181],[181,84],[84,17],[17,314],[314,405],[405,321],[321,375],[375,291],[61,185],[185,40],[40,39],[39,37],[37,0],[0,267],[267,269],[269,270],[270,409],[409,291],[78,95],[95,88],[88,178],[178,87],[87,14],[14,317],[317,402],[402,318],[318,324],[324,308],[78,191],[191,80],[80,81],[81,82],[82,13],[13,312],[312,311],[311,310],[310,415],[415,308],[263,249],[249,390],[390,373],[373,374],[374,380],[380,381],[381,382],[382,362],[263,466],[466,388],[388,387],[387,386],[386,385],[385,384],[384,398],[398,362],[276,283],[283,282],[282,295],[295,285],[300,293],[293,334],[334,296],[296,336],[33,7],[7,163],[163,144],[144,145],[145,153],[153,154],[154,155],[155,133],[33,246],[246,161],[161,160],[160,159],[159,158],[158,157],[157,173],[173,133],[46,53],[53,52],[52,65],[65,55],[70,63],[63,105],[105,66],[66,107],[10,338],[338,297],[297,332],[332,284],[284,251],[251,389],[389,356],[356,454],[454,323],[323,361],[361,288],[288,397],[397,365],[365,379],[379,378],[378,400],[400,377],[377,152],[152,148],[148,176],[176,149],[149,150],[150,136],[136,172],[172,58],[58,132],[132,93],[93,234],[234,127],[127,162],[162,21],[21,54],[54,103],[103,67],[67,109],[109,10]],L=[[127,34],[34,139],[139,127],[11,0],[0,37],[37,11],[232,231],[231,120],[120,232],[72,37],[37,39],[39,72],[128,121],[121,47],[47,128],[232,121],[121,128],[128,232],[104,69],[69,67],[67,104],[175,171],[171,148],[148,175],[118,50],[50,101],[101,118],[73,39],[39,40],[40,73],[9,151],[151,108],[108,9],[48,115],[115,131],[131,48],[194,204],[204,211],[211,194],[74,40],[40,185],[185,74],[80,42],[42,183],[183,80],[40,92],[92,186],[186,40],[230,229],[229,118],[118,230],[202,212],[212,214],[214,202],[83,18],[18,17],[17,83],[76,61],[61,146],[146,76],[160,29],[29,30],[30,160],[56,157],[157,173],[173,56],[106,204],[204,194],[194,106],[135,214],[214,192],[192,135],[203,165],[165,98],[98,203],[21,71],[71,68],[68,21],[51,45],[45,4],[4,51],[144,24],[24,23],[23,144],[77,146],[146,91],[91,77],[205,50],[50,187],[187,205],[201,200],[200,18],[18,201],[91,106],[106,182],[182,91],[90,91],[91,181],[181,90],[85,84],[84,17],[17,85],[206,203],[203,36],[36,206],[148,171],[171,140],[140,148],[92,40],[40,39],[39,92],[193,189],[189,244],[244,193],[159,158],[158,28],[28,159],[247,246],[246,161],[161,247],[236,3],[3,196],[196,236],[54,68],[68,104],[104,54],[193,168],[168,8],[8,193],[117,228],[228,31],[31,117],[189,193],[193,55],[55,189],[98,97],[97,99],[99,98],[126,47],[47,100],[100,126],[166,79],[79,218],[218,166],[155,154],[154,26],[26,155],[209,49],[49,131],[131,209],[135,136],[136,150],[150,135],[47,126],[126,217],[217,47],[223,52],[52,53],[53,223],[45,51],[51,134],[134,45],[211,170],[170,140],[140,211],[67,69],[69,108],[108,67],[43,106],[106,91],[91,43],[230,119],[119,120],[120,230],[226,130],[130,247],[247,226],[63,53],[53,52],[52,63],[238,20],[20,242],[242,238],[46,70],[70,156],[156,46],[78,62],[62,96],[96,78],[46,53],[53,63],[63,46],[143,34],[34,227],[227,143],[123,117],[117,111],[111,123],[44,125],[125,19],[19,44],[236,134],[134,51],[51,236],[216,206],[206,205],[205,216],[154,153],[153,22],[22,154],[39,37],[37,167],[167,39],[200,201],[201,208],[208,200],[36,142],[142,100],[100,36],[57,212],[212,202],[202,57],[20,60],[60,99],[99,20],[28,158],[158,157],[157,28],[35,226],[226,113],[113,35],[160,159],[159,27],[27,160],[204,202],[202,210],[210,204],[113,225],[225,46],[46,113],[43,202],[202,204],[204,43],[62,76],[76,77],[77,62],[137,123],[123,116],[116,137],[41,38],[38,72],[72,41],[203,129],[129,142],[142,203],[64,98],[98,240],[240,64],[49,102],[102,64],[64,49],[41,73],[73,74],[74,41],[212,216],[216,207],[207,212],[42,74],[74,184],[184,42],[169,170],[170,211],[211,169],[170,149],[149,176],[176,170],[105,66],[66,69],[69,105],[122,6],[6,168],[168,122],[123,147],[147,187],[187,123],[96,77],[77,90],[90,96],[65,55],[55,107],[107,65],[89,90],[90,180],[180,89],[101,100],[100,120],[120,101],[63,105],[105,104],[104,63],[93,137],[137,227],[227,93],[15,86],[86,85],[85,15],[129,102],[102,49],[49,129],[14,87],[87,86],[86,14],[55,8],[8,9],[9,55],[100,47],[47,121],[121,100],[145,23],[23,22],[22,145],[88,89],[89,179],[179,88],[6,122],[122,196],[196,6],[88,95],[95,96],[96,88],[138,172],[172,136],[136,138],[215,58],[58,172],[172,215],[115,48],[48,219],[219,115],[42,80],[80,81],[81,42],[195,3],[3,51],[51,195],[43,146],[146,61],[61,43],[171,175],[175,199],[199,171],[81,82],[82,38],[38,81],[53,46],[46,225],[225,53],[144,163],[163,110],[110,144],[52,65],[65,66],[66,52],[229,228],[228,117],[117,229],[34,127],[127,234],[234,34],[107,108],[108,69],[69,107],[109,108],[108,151],[151,109],[48,64],[64,235],[235,48],[62,78],[78,191],[191,62],[129,209],[209,126],[126,129],[111,35],[35,143],[143,111],[117,123],[123,50],[50,117],[222,65],[65,52],[52,222],[19,125],[125,141],[141,19],[221,55],[55,65],[65,221],[3,195],[195,197],[197,3],[25,7],[7,33],[33,25],[220,237],[237,44],[44,220],[70,71],[71,139],[139,70],[122,193],[193,245],[245,122],[247,130],[130,33],[33,247],[71,21],[21,162],[162,71],[170,169],[169,150],[150,170],[188,174],[174,196],[196,188],[216,186],[186,92],[92,216],[2,97],[97,167],[167,2],[141,125],[125,241],[241,141],[164,167],[167,37],[37,164],[72,38],[38,12],[12,72],[38,82],[82,13],[13,38],[63,68],[68,71],[71,63],[226,35],[35,111],[111,226],[101,50],[50,205],[205,101],[206,92],[92,165],[165,206],[209,198],[198,217],[217,209],[165,167],[167,97],[97,165],[220,115],[115,218],[218,220],[133,112],[112,243],[243,133],[239,238],[238,241],[241,239],[214,135],[135,169],[169,214],[190,173],[173,133],[133,190],[171,208],[208,32],[32,171],[125,44],[44,237],[237,125],[86,87],[87,178],[178,86],[85,86],[86,179],[179,85],[84,85],[85,180],[180,84],[83,84],[84,181],[181,83],[201,83],[83,182],[182,201],[137,93],[93,132],[132,137],[76,62],[62,183],[183,76],[61,76],[76,184],[184,61],[57,61],[61,185],[185,57],[212,57],[57,186],[186,212],[214,207],[207,187],[187,214],[34,143],[143,156],[156,34],[79,239],[239,237],[237,79],[123,137],[137,177],[177,123],[44,1],[1,4],[4,44],[201,194],[194,32],[32,201],[64,102],[102,129],[129,64],[213,215],[215,138],[138,213],[59,166],[166,219],[219,59],[242,99],[99,97],[97,242],[2,94],[94,141],[141,2],[75,59],[59,235],[235,75],[24,110],[110,228],[228,24],[25,130],[130,226],[226,25],[23,24],[24,229],[229,23],[22,23],[23,230],[230,22],[26,22],[22,231],[231,26],[112,26],[26,232],[232,112],[189,190],[190,243],[243,189],[221,56],[56,190],[190,221],[28,56],[56,221],[221,28],[27,28],[28,222],[222,27],[29,27],[27,223],[223,29],[30,29],[29,224],[224,30],[247,30],[30,225],[225,247],[238,79],[79,20],[20,238],[166,59],[59,75],[75,166],[60,75],[75,240],[240,60],[147,177],[177,215],[215,147],[20,79],[79,166],[166,20],[187,147],[147,213],[213,187],[112,233],[233,244],[244,112],[233,128],[128,245],[245,233],[128,114],[114,188],[188,128],[114,217],[217,174],[174,114],[131,115],[115,220],[220,131],[217,198],[198,236],[236,217],[198,131],[131,134],[134,198],[177,132],[132,58],[58,177],[143,35],[35,124],[124,143],[110,163],[163,7],[7,110],[228,110],[110,25],[25,228],[356,389],[389,368],[368,356],[11,302],[302,267],[267,11],[452,350],[350,349],[349,452],[302,303],[303,269],[269,302],[357,343],[343,277],[277,357],[452,453],[453,357],[357,452],[333,332],[332,297],[297,333],[175,152],[152,377],[377,175],[347,348],[348,330],[330,347],[303,304],[304,270],[270,303],[9,336],[336,337],[337,9],[278,279],[279,360],[360,278],[418,262],[262,431],[431,418],[304,408],[408,409],[409,304],[310,415],[415,407],[407,310],[270,409],[409,410],[410,270],[450,348],[348,347],[347,450],[422,430],[430,434],[434,422],[313,314],[314,17],[17,313],[306,307],[307,375],[375,306],[387,388],[388,260],[260,387],[286,414],[414,398],[398,286],[335,406],[406,418],[418,335],[364,367],[367,416],[416,364],[423,358],[358,327],[327,423],[251,284],[284,298],[298,251],[281,5],[5,4],[4,281],[373,374],[374,253],[253,373],[307,320],[320,321],[321,307],[425,427],[427,411],[411,425],[421,313],[313,18],[18,421],[321,405],[405,406],[406,321],[320,404],[404,405],[405,320],[315,16],[16,17],[17,315],[426,425],[425,266],[266,426],[377,400],[400,369],[369,377],[322,391],[391,269],[269,322],[417,465],[465,464],[464,417],[386,257],[257,258],[258,386],[466,260],[260,388],[388,466],[456,399],[399,419],[419,456],[284,332],[332,333],[333,284],[417,285],[285,8],[8,417],[346,340],[340,261],[261,346],[413,441],[441,285],[285,413],[327,460],[460,328],[328,327],[355,371],[371,329],[329,355],[392,439],[439,438],[438,392],[382,341],[341,256],[256,382],[429,420],[420,360],[360,429],[364,394],[394,379],[379,364],[277,343],[343,437],[437,277],[443,444],[444,283],[283,443],[275,440],[440,363],[363,275],[431,262],[262,369],[369,431],[297,338],[338,337],[337,297],[273,375],[375,321],[321,273],[450,451],[451,349],[349,450],[446,342],[342,467],[467,446],[293,334],[334,282],[282,293],[458,461],[461,462],[462,458],[276,353],[353,383],[383,276],[308,324],[324,325],[325,308],[276,300],[300,293],[293,276],[372,345],[345,447],[447,372],[352,345],[345,340],[340,352],[274,1],[1,19],[19,274],[456,248],[248,281],[281,456],[436,427],[427,425],[425,436],[381,256],[256,252],[252,381],[269,391],[391,393],[393,269],[200,199],[199,428],[428,200],[266,330],[330,329],[329,266],[287,273],[273,422],[422,287],[250,462],[462,328],[328,250],[258,286],[286,384],[384,258],[265,353],[353,342],[342,265],[387,259],[259,257],[257,387],[424,431],[431,430],[430,424],[342,353],[353,276],[276,342],[273,335],[335,424],[424,273],[292,325],[325,307],[307,292],[366,447],[447,345],[345,366],[271,303],[303,302],[302,271],[423,266],[266,371],[371,423],[294,455],[455,460],[460,294],[279,278],[278,294],[294,279],[271,272],[272,304],[304,271],[432,434],[434,427],[427,432],[272,407],[407,408],[408,272],[394,430],[430,431],[431,394],[395,369],[369,400],[400,395],[334,333],[333,299],[299,334],[351,417],[417,168],[168,351],[352,280],[280,411],[411,352],[325,319],[319,320],[320,325],[295,296],[296,336],[336,295],[319,403],[403,404],[404,319],[330,348],[348,349],[349,330],[293,298],[298,333],[333,293],[323,454],[454,447],[447,323],[15,16],[16,315],[315,15],[358,429],[429,279],[279,358],[14,15],[15,316],[316,14],[285,336],[336,9],[9,285],[329,349],[349,350],[350,329],[374,380],[380,252],[252,374],[318,402],[402,403],[403,318],[6,197],[197,419],[419,6],[318,319],[319,325],[325,318],[367,364],[364,365],[365,367],[435,367],[367,397],[397,435],[344,438],[438,439],[439,344],[272,271],[271,311],[311,272],[195,5],[5,281],[281,195],[273,287],[287,291],[291,273],[396,428],[428,199],[199,396],[311,271],[271,268],[268,311],[283,444],[444,445],[445,283],[373,254],[254,339],[339,373],[282,334],[334,296],[296,282],[449,347],[347,346],[346,449],[264,447],[447,454],[454,264],[336,296],[296,299],[299,336],[338,10],[10,151],[151,338],[278,439],[439,455],[455,278],[292,407],[407,415],[415,292],[358,371],[371,355],[355,358],[340,345],[345,372],[372,340],[346,347],[347,280],[280,346],[442,443],[443,282],[282,442],[19,94],[94,370],[370,19],[441,442],[442,295],[295,441],[248,419],[419,197],[197,248],[263,255],[255,359],[359,263],[440,275],[275,274],[274,440],[300,383],[383,368],[368,300],[351,412],[412,465],[465,351],[263,467],[467,466],[466,263],[301,368],[368,389],[389,301],[395,378],[378,379],[379,395],[412,351],[351,419],[419,412],[436,426],[426,322],[322,436],[2,164],[164,393],[393,2],[370,462],[462,461],[461,370],[164,0],[0,267],[267,164],[302,11],[11,12],[12,302],[268,12],[12,13],[13,268],[293,300],[300,301],[301,293],[446,261],[261,340],[340,446],[330,266],[266,425],[425,330],[426,423],[423,391],[391,426],[429,355],[355,437],[437,429],[391,327],[327,326],[326,391],[440,457],[457,438],[438,440],[341,382],[382,362],[362,341],[459,457],[457,461],[461,459],[434,430],[430,394],[394,434],[414,463],[463,362],[362,414],[396,369],[369,262],[262,396],[354,461],[461,457],[457,354],[316,403],[403,402],[402,316],[315,404],[404,403],[403,315],[314,405],[405,404],[404,314],[313,406],[406,405],[405,313],[421,418],[418,406],[406,421],[366,401],[401,361],[361,366],[306,408],[408,407],[407,306],[291,409],[409,408],[408,291],[287,410],[410,409],[409,287],[432,436],[436,410],[410,432],[434,416],[416,411],[411,434],[264,368],[368,383],[383,264],[309,438],[438,457],[457,309],[352,376],[376,401],[401,352],[274,275],[275,4],[4,274],[421,428],[428,262],[262,421],[294,327],[327,358],[358,294],[433,416],[416,367],[367,433],[289,455],[455,439],[439,289],[462,370],[370,326],[326,462],[2,326],[326,370],[370,2],[305,460],[460,455],[455,305],[254,449],[449,448],[448,254],[255,261],[261,446],[446,255],[253,450],[450,449],[449,253],[252,451],[451,450],[450,252],[256,452],[452,451],[451,256],[341,453],[453,452],[452,341],[413,464],[464,463],[463,413],[441,413],[413,414],[414,441],[258,442],[442,441],[441,258],[257,443],[443,442],[442,257],[259,444],[444,443],[443,259],[260,445],[445,444],[444,260],[467,342],[342,445],[445,467],[459,458],[458,250],[250,459],[289,392],[392,290],[290,289],[290,328],[328,460],[460,290],[376,433],[433,435],[435,376],[250,290],[290,392],[392,250],[411,416],[416,433],[433,411],[341,463],[463,464],[464,341],[453,464],[464,465],[465,453],[357,465],[465,412],[412,357],[343,412],[412,399],[399,343],[360,363],[363,440],[440,360],[437,399],[399,456],[456,437],[420,456],[456,363],[363,420],[401,435],[435,288],[288,401],[372,383],[383,353],[353,372],[339,255],[255,249],[249,339],[448,261],[261,255],[255,448],[133,243],[243,190],[190,133],[133,155],[155,112],[112,133],[33,246],[246,247],[247,33],[33,130],[130,25],[25,33],[398,384],[384,286],[286,398],[362,398],[398,414],[414,362],[362,463],[463,341],[341,362],[263,359],[359,467],[467,263],[263,249],[249,255],[255,263],[466,467],[467,260],[260,466],[75,60],[60,166],[166,75],[238,239],[239,79],[79,238],[162,127],[127,139],[139,162],[72,11],[11,37],[37,72],[121,232],[232,120],[120,121],[73,72],[72,39],[39,73],[114,128],[128,47],[47,114],[233,232],[232,128],[128,233],[103,104],[104,67],[67,103],[152,175],[175,148],[148,152],[119,118],[118,101],[101,119],[74,73],[73,40],[40,74],[107,9],[9,108],[108,107],[49,48],[48,131],[131,49],[32,194],[194,211],[211,32],[184,74],[74,185],[185,184],[191,80],[80,183],[183,191],[185,40],[40,186],[186,185],[119,230],[230,118],[118,119],[210,202],[202,214],[214,210],[84,83],[83,17],[17,84],[77,76],[76,146],[146,77],[161,160],[160,30],[30,161],[190,56],[56,173],[173,190],[182,106],[106,194],[194,182],[138,135],[135,192],[192,138],[129,203],[203,98],[98,129],[54,21],[21,68],[68,54],[5,51],[51,4],[4,5],[145,144],[144,23],[23,145],[90,77],[77,91],[91,90],[207,205],[205,187],[187,207],[83,201],[201,18],[18,83],[181,91],[91,182],[182,181],[180,90],[90,181],[181,180],[16,85],[85,17],[17,16],[205,206],[206,36],[36,205],[176,148],[148,140],[140,176],[165,92],[92,39],[39,165],[245,193],[193,244],[244,245],[27,159],[159,28],[28,27],[30,247],[247,161],[161,30],[174,236],[236,196],[196,174],[103,54],[54,104],[104,103],[55,193],[193,8],[8,55],[111,117],[117,31],[31,111],[221,189],[189,55],[55,221],[240,98],[98,99],[99,240],[142,126],[126,100],[100,142],[219,166],[166,218],[218,219],[112,155],[155,26],[26,112],[198,209],[209,131],[131,198],[169,135],[135,150],[150,169],[114,47],[47,217],[217,114],[224,223],[223,53],[53,224],[220,45],[45,134],[134,220],[32,211],[211,140],[140,32],[109,67],[67,108],[108,109],[146,43],[43,91],[91,146],[231,230],[230,120],[120,231],[113,226],[226,247],[247,113],[105,63],[63,52],[52,105],[241,238],[238,242],[242,241],[124,46],[46,156],[156,124],[95,78],[78,96],[96,95],[70,46],[46,63],[63,70],[116,143],[143,227],[227,116],[116,123],[123,111],[111,116],[1,44],[44,19],[19,1],[3,236],[236,51],[51,3],[207,216],[216,205],[205,207],[26,154],[154,22],[22,26],[165,39],[39,167],[167,165],[199,200],[200,208],[208,199],[101,36],[36,100],[100,101],[43,57],[57,202],[202,43],[242,20],[20,99],[99,242],[56,28],[28,157],[157,56],[124,35],[35,113],[113,124],[29,160],[160,27],[27,29],[211,204],[204,210],[210,211],[124,113],[113,46],[46,124],[106,43],[43,204],[204,106],[96,62],[62,77],[77,96],[227,137],[137,116],[116,227],[73,41],[41,72],[72,73],[36,203],[203,142],[142,36],[235,64],[64,240],[240,235],[48,49],[49,64],[64,48],[42,41],[41,74],[74,42],[214,212],[212,207],[207,214],[183,42],[42,184],[184,183],[210,169],[169,211],[211,210],[140,170],[170,176],[176,140],[104,105],[105,69],[69,104],[193,122],[122,168],[168,193],[50,123],[123,187],[187,50],[89,96],[96,90],[90,89],[66,65],[65,107],[107,66],[179,89],[89,180],[180,179],[119,101],[101,120],[120,119],[68,63],[63,104],[104,68],[234,93],[93,227],[227,234],[16,15],[15,85],[85,16],[209,129],[129,49],[49,209],[15,14],[14,86],[86,15],[107,55],[55,9],[9,107],[120,100],[100,121],[121,120],[153,145],[145,22],[22,153],[178,88],[88,179],[179,178],[197,6],[6,196],[196,197],[89,88],[88,96],[96,89],[135,138],[138,136],[136,135],[138,215],[215,172],[172,138],[218,115],[115,219],[219,218],[41,42],[42,81],[81,41],[5,195],[195,51],[51,5],[57,43],[43,61],[61,57],[208,171],[171,199],[199,208],[41,81],[81,38],[38,41],[224,53],[53,225],[225,224],[24,144],[144,110],[110,24],[105,52],[52,66],[66,105],[118,229],[229,117],[117,118],[227,34],[34,234],[234,227],[66,107],[107,69],[69,66],[10,109],[109,151],[151,10],[219,48],[48,235],[235,219],[183,62],[62,191],[191,183],[142,129],[129,126],[126,142],[116,111],[111,143],[143,116],[118,117],[117,50],[50,118],[223,222],[222,52],[52,223],[94,19],[19,141],[141,94],[222,221],[221,65],[65,222],[196,3],[3,197],[197,196],[45,220],[220,44],[44,45],[156,70],[70,139],[139,156],[188,122],[122,245],[245,188],[139,71],[71,162],[162,139],[149,170],[170,150],[150,149],[122,188],[188,196],[196,122],[206,216],[216,92],[92,206],[164,2],[2,167],[167,164],[242,141],[141,241],[241,242],[0,164],[164,37],[37,0],[11,72],[72,12],[12,11],[12,38],[38,13],[13,12],[70,63],[63,71],[71,70],[31,226],[226,111],[111,31],[36,101],[101,205],[205,36],[203,206],[206,165],[165,203],[126,209],[209,217],[217,126],[98,165],[165,97],[97,98],[237,220],[220,218],[218,237],[237,239],[239,241],[241,237],[210,214],[214,169],[169,210],[140,171],[171,32],[32,140],[241,125],[125,237],[237,241],[179,86],[86,178],[178,179],[180,85],[85,179],[179,180],[181,84],[84,180],[180,181],[182,83],[83,181],[181,182],[194,201],[201,182],[182,194],[177,137],[137,132],[132,177],[184,76],[76,183],[183,184],[185,61],[61,184],[184,185],[186,57],[57,185],[185,186],[216,212],[212,186],[186,216],[192,214],[214,187],[187,192],[139,34],[34,156],[156,139],[218,79],[79,237],[237,218],[147,123],[123,177],[177,147],[45,44],[44,4],[4,45],[208,201],[201,32],[32,208],[98,64],[64,129],[129,98],[192,213],[213,138],[138,192],[235,59],[59,219],[219,235],[141,242],[242,97],[97,141],[97,2],[2,141],[141,97],[240,75],[75,235],[235,240],[229,24],[24,228],[228,229],[31,25],[25,226],[226,31],[230,23],[23,229],[229,230],[231,22],[22,230],[230,231],[232,26],[26,231],[231,232],[233,112],[112,232],[232,233],[244,189],[189,243],[243,244],[189,221],[221,190],[190,189],[222,28],[28,221],[221,222],[223,27],[27,222],[222,223],[224,29],[29,223],[223,224],[225,30],[30,224],[224,225],[113,247],[247,225],[225,113],[99,60],[60,240],[240,99],[213,147],[147,215],[215,213],[60,20],[20,166],[166,60],[192,187],[187,213],[213,192],[243,112],[112,244],[244,243],[244,233],[233,245],[245,244],[245,128],[128,188],[188,245],[188,114],[114,174],[174,188],[134,131],[131,220],[220,134],[174,217],[217,236],[236,174],[236,198],[198,134],[134,236],[215,177],[177,58],[58,215],[156,143],[143,124],[124,156],[25,110],[110,7],[7,25],[31,228],[228,25],[25,31],[264,356],[356,368],[368,264],[0,11],[11,267],[267,0],[451,452],[452,349],[349,451],[267,302],[302,269],[269,267],[350,357],[357,277],[277,350],[350,452],[452,357],[357,350],[299,333],[333,297],[297,299],[396,175],[175,377],[377,396],[280,347],[347,330],[330,280],[269,303],[303,270],[270,269],[151,9],[9,337],[337,151],[344,278],[278,360],[360,344],[424,418],[418,431],[431,424],[270,304],[304,409],[409,270],[272,310],[310,407],[407,272],[322,270],[270,410],[410,322],[449,450],[450,347],[347,449],[432,422],[422,434],[434,432],[18,313],[313,17],[17,18],[291,306],[306,375],[375,291],[259,387],[387,260],[260,259],[424,335],[335,418],[418,424],[434,364],[364,416],[416,434],[391,423],[423,327],[327,391],[301,251],[251,298],[298,301],[275,281],[281,4],[4,275],[254,373],[373,253],[253,254],[375,307],[307,321],[321,375],[280,425],[425,411],[411,280],[200,421],[421,18],[18,200],[335,321],[321,406],[406,335],[321,320],[320,405],[405,321],[314,315],[315,17],[17,314],[423,426],[426,266],[266,423],[396,377],[377,369],[369,396],[270,322],[322,269],[269,270],[413,417],[417,464],[464,413],[385,386],[386,258],[258,385],[248,456],[456,419],[419,248],[298,284],[284,333],[333,298],[168,417],[417,8],[8,168],[448,346],[346,261],[261,448],[417,413],[413,285],[285,417],[326,327],[327,328],[328,326],[277,355],[355,329],[329,277],[309,392],[392,438],[438,309],[381,382],[382,256],[256,381],[279,429],[429,360],[360,279],[365,364],[364,379],[379,365],[355,277],[277,437],[437,355],[282,443],[443,283],[283,282],[281,275],[275,363],[363,281],[395,431],[431,369],[369,395],[299,297],[297,337],[337,299],[335,273],[273,321],[321,335],[348,450],[450,349],[349,348],[359,446],[446,467],[467,359],[283,293],[293,282],[282,283],[250,458],[458,462],[462,250],[300,276],[276,383],[383,300],[292,308],[308,325],[325,292],[283,276],[276,293],[293,283],[264,372],[372,447],[447,264],[346,352],[352,340],[340,346],[354,274],[274,19],[19,354],[363,456],[456,281],[281,363],[426,436],[436,425],[425,426],[380,381],[381,252],[252,380],[267,269],[269,393],[393,267],[421,200],[200,428],[428,421],[371,266],[266,329],[329,371],[432,287],[287,422],[422,432],[290,250],[250,328],[328,290],[385,258],[258,384],[384,385],[446,265],[265,342],[342,446],[386,387],[387,257],[257,386],[422,424],[424,430],[430,422],[445,342],[342,276],[276,445],[422,273],[273,424],[424,422],[306,292],[292,307],[307,306],[352,366],[366,345],[345,352],[268,271],[271,302],[302,268],[358,423],[423,371],[371,358],[327,294],[294,460],[460,327],[331,279],[279,294],[294,331],[303,271],[271,304],[304,303],[436,432],[432,427],[427,436],[304,272],[272,408],[408,304],[395,394],[394,431],[431,395],[378,395],[395,400],[400,378],[296,334],[334,299],[299,296],[6,351],[351,168],[168,6],[376,352],[352,411],[411,376],[307,325],[325,320],[320,307],[285,295],[295,336],[336,285],[320,319],[319,404],[404,320],[329,330],[330,349],[349,329],[334,293],[293,333],[333,334],[366,323],[323,447],[447,366],[316,15],[15,315],[315,316],[331,358],[358,279],[279,331],[317,14],[14,316],[316,317],[8,285],[285,9],[9,8],[277,329],[329,350],[350,277],[253,374],[374,252],[252,253],[319,318],[318,403],[403,319],[351,6],[6,419],[419,351],[324,318],[318,325],[325,324],[397,367],[367,365],[365,397],[288,435],[435,397],[397,288],[278,344],[344,439],[439,278],[310,272],[272,311],[311,310],[248,195],[195,281],[281,248],[375,273],[273,291],[291,375],[175,396],[396,199],[199,175],[312,311],[311,268],[268,312],[276,283],[283,445],[445,276],[390,373],[373,339],[339,390],[295,282],[282,296],[296,295],[448,449],[449,346],[346,448],[356,264],[264,454],[454,356],[337,336],[336,299],[299,337],[337,338],[338,151],[151,337],[294,278],[278,455],[455,294],[308,292],[292,415],[415,308],[429,358],[358,355],[355,429],[265,340],[340,372],[372,265],[352,346],[346,280],[280,352],[295,442],[442,282],[282,295],[354,19],[19,370],[370,354],[285,441],[441,295],[295,285],[195,248],[248,197],[197,195],[457,440],[440,274],[274,457],[301,300],[300,368],[368,301],[417,351],[351,465],[465,417],[251,301],[301,389],[389,251],[394,395],[395,379],[379,394],[399,412],[412,419],[419,399],[410,436],[436,322],[322,410],[326,2],[2,393],[393,326],[354,370],[370,461],[461,354],[393,164],[164,267],[267,393],[268,302],[302,12],[12,268],[312,268],[268,13],[13,312],[298,293],[293,301],[301,298],[265,446],[446,340],[340,265],[280,330],[330,425],[425,280],[322,426],[426,391],[391,322],[420,429],[429,437],[437,420],[393,391],[391,326],[326,393],[344,440],[440,438],[438,344],[458,459],[459,461],[461,458],[364,434],[434,394],[394,364],[428,396],[396,262],[262,428],[274,354],[354,457],[457,274],[317,316],[316,402],[402,317],[316,315],[315,403],[403,316],[315,314],[314,404],[404,315],[314,313],[313,405],[405,314],[313,421],[421,406],[406,313],[323,366],[366,361],[361,323],[292,306],[306,407],[407,292],[306,291],[291,408],[408,306],[291,287],[287,409],[409,291],[287,432],[432,410],[410,287],[427,434],[434,411],[411,427],[372,264],[264,383],[383,372],[459,309],[309,457],[457,459],[366,352],[352,401],[401,366],[1,274],[274,4],[4,1],[418,421],[421,262],[262,418],[331,294],[294,358],[358,331],[435,433],[433,367],[367,435],[392,289],[289,439],[439,392],[328,462],[462,326],[326,328],[94,2],[2,370],[370,94],[289,305],[305,455],[455,289],[339,254],[254,448],[448,339],[359,255],[255,446],[446,359],[254,253],[253,449],[449,254],[253,252],[252,450],[450,253],[252,256],[256,451],[451,252],[256,341],[341,452],[452,256],[414,413],[413,463],[463,414],[286,441],[441,414],[414,286],[286,258],[258,441],[441,286],[258,257],[257,442],[442,258],[257,259],[259,443],[443,257],[259,260],[260,444],[444,259],[260,467],[467,445],[445,260],[309,459],[459,250],[250,309],[305,289],[289,290],[290,305],[305,290],[290,460],[460,305],[401,376],[376,435],[435,401],[309,250],[250,392],[392,309],[376,411],[411,433],[433,376],[453,341],[341,464],[464,453],[357,453],[453,465],[465,357],[343,357],[357,412],[412,343],[437,343],[343,399],[399,437],[344,360],[360,440],[440,344],[420,437],[437,456],[456,420],[360,420],[420,363],[363,360],[361,401],[401,288],[288,361],[265,372],[372,353],[353,265],[390,339],[339,249],[249,390],[339,448],[448,255],[255,339]],P=class{constructor(t={}){this.target=m;const{target:e='$..objects[?(@.classLabel=="hand circumference")]'}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.keyPoints){let o=this.getFillColor(t);for(let s=0;s<t.keyPoints.length;s++){const a=t.keyPoints[s];a.category==R&&this.renderKeyPoints(a,o,Math.max(t.width,t.height),e,r,n,i)}}}renderKeyPoints(t,e,r,n,i,o,s){const a=new Map;let c=1,l=-1;for(let e=0;e<t.points.length;e++){const r=t.points[e];a.set(r.classLabel,r),r.z&&(r.z>c&&(c=r.z),r.z<l&&(l=r.z))}const u=this.context,h=this.style;if(!u||!h)throw new Error("render() called before start()");for(var f=0;f<B.length;f++){const t=B[f],e=a.get(t[0]),r=a.get(t[1]);if(!e||!e.x)continue;if(!r||!r.x)continue;const c=n+e.x*o,l=i+e.y*s,p=n+r.x*o,d=i+r.y*s;u.beginPath(),u.lineWidth=h.scale,u.strokeStyle=h.colors.primary_color,u.fillStyle=h.colors.primary_color,u.moveTo(c,l),u.lineTo(p,d),u.stroke(),u.closePath()}const p=2*h.scale,d=Math.min(2*p,r/100);for(f=0;f<t.points.length;f++){const r=t.points[f],a=n+r.x*o,y=i+r.y*s,g=d-((r.z??0*Math.max(o,s))-l)*(d-p)/(c-l);u.beginPath(),u.arc(a,y,g,0,2*Math.PI,!1),u.fillStyle=e,u.fill(),u.strokeStyle=h.colors.secondary_color,u.stroke()}}getFillColor(t){const e=this.style;if(!e)throw new Error("render() called before start()");let r=e.colors.primary_color;if(t.classes)for(let n=0;n<t.classes.length;n++)if(t.classes[n].category==R){if("right"==t.classes[n].classLabel){r=e.colors.right_color;break}if("left"==t.classes[n].classLabel){r=e.colors.left_color;break}}return r}},R="3d-hand-points",B=[["wrist","thumb cmc"],["thumb cmc","thumb mcp"],["thumb mcp","thumb ip"],["thumb ip","thumb tip"],["wrist","index finger mcp"],["index finger mcp","index finger pip"],["index finger pip","index finger dip"],["index finger dip","index finger tip"],["wrist","middle finger mcp"],["middle finger mcp","middle finger pip"],["middle finger pip","middle finger dip"],["middle finger dip","middle finger tip"],["wrist","ring finger mcp"],["ring finger mcp","ring finger pip"],["ring finger pip","ring finger dip"],["ring finger dip","ring finger tip"],["wrist","pinky mcp"],["pinky mcp","pinky pip"],["pinky pip","pinky dip"],["pinky dip","pinky tip"],["index finger mcp","middle finger mcp"],["middle finger mcp","ring finger mcp"],["ring finger mcp","pinky mcp"]],N=class{constructor(t={}){this.target=m;const{target:e='$..objects[?(@.category=="person")]'}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.keyPoints)for(let o=0;o<t.keyPoints.length;o++){const s=t.keyPoints[o];s.category==M?this.renderPose(s,$,Math.max(t.width,t.height),e,r,n,i):s.category==U&&this.renderPose(s,D,Math.max(t.width,t.height),e,r,n,i)}}renderPose(t,e,r,n,i,o,s){const a=new Map;let c=1,l=-1;for(let e=0;e<t.points.length;e++){const r=t.points[e];a.set(r.classLabel,r),r.z&&(r.z>c&&(c=r.z),r.z<l&&(l=r.z))}const u=this.context,h=this.style;if(!u||!h)throw new Error("render() called before start()");for(var f=0;f<e.length;f++){const t=e[f],r=a.get(t[0]),c=a.get(t[1]);if(!r||!r.x)continue;if(!c||!c.x)continue;const l=n+r.x*o,p=i+r.y*s,d=n+c.x*o,y=i+c.y*s;u.beginPath(),u.lineWidth=1*h.scale,u.strokeStyle=h.colors.primary_color,u.fillStyle=h.colors.primary_color,u.moveTo(l,p),u.lineTo(d,y),u.stroke(),u.closePath()}const p=2*h.scale,d=Math.min(2*p,r/100);for(f=0;f<t.points.length;f++){const e=t.points[f],r=n+e.x*o,a=i+e.y*s,y=d-((e.z??0*Math.max(o,s))-l)*(d-p)/(c-l);u.beginPath(),u.arc(r,a,y,0,2*Math.PI,!1),e.classLabel.includes("left")?u.fillStyle=h.colors.left_color:e.classLabel.includes("right")?u.fillStyle=h.colors.right_color:u.fillStyle=h.colors.primary_color,u.fill(),u.strokeStyle=h.colors.secondary_color,u.stroke()}}},M="2d-body-points",U="3d-body-points",$=[["left shoulder","right shoulder"],["left hip","right hip"],["left shoulder","left elbow"],["left elbow","left wrist"],["left shoulder","right hip"],["left hip","left knee"],["left knee","left ankle"],["right shoulder","right elbow"],["right elbow","right wrist"],["right shoulder","left hip"],["right hip","right knee"],["right knee","right ankle"]],D=[["mouth (right)","mouth (left)"],["right ear","right eye (outer)"],["right eye (outer)","right eye"],["right eye","right eye (inner)"],["right eye (inner)","nose"],["nose","left eye (inner)"],["left eye (inner)","left eye"],["left eye","left eye (outer)"],["left eye (outer)","left ear"],["right shoulder","left shoulder"],["left shoulder","right hip"],["left hip","right hip"],["left hip","right shoulder"],["right shoulder","right elbow"],["right elbow","right wrist"],["right wrist","right thumb"],["right wrist","right pinky"],["right wrist","right index"],["right pinky","right index"],["left shoulder","left elbow"],["left elbow","left wrist"],["left wrist","left thumb"],["left wrist","left pinky"],["left wrist","left index"],["left pinky","left index"],["right hip","right knee"],["right knee","right ankle"],["right ankle","right foot index"],["right ankle","right heel"],["right heel","right foot index"],["left hip","left knee"],["left knee","left ankle"],["left ankle","left foot index"],["left ankle","left heel"],["left heel","left foot index"]],j=f(r(66)),F=class{constructor(t={}){this.target=m;const{target:e="$..objects[?(@.trackId)]",trailLengthSeconds:r=1,traceDetails:n}=t;this.target=e,this.trailLengthNanos=1e3*r*1e3*1e3,this.traceDetails=n,this.lastTrim=0,this.traces=new Map}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(!t.trackId||void 0===o.timestamp)return;const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=[];if(this.traceDetails){const e=j.query(t,this.traceDetails);if(e&&e.length)for(let t=0;t<e.length;t++){const r=e[t];if("x"in r&&"y"in r)if("width"in r&&"height"in r){const t=r,e={x:t.x+t.width/2,y:t.y+t.height/2};c.push(e)}else c.push(r)}}else{const e={x:t.x+t.width/2,y:t.y+t.height/2};c.push(e)}const l={points:c,timestamp:o.timestamp,next:this.traces.get(t.trackId)??null};this.traces.set(t.trackId,l);const u=t.width*n/40;let h=0;for(let t=l;null!=t;t=t.next){h+=1;const c=o.timestamp-t.timestamp;if(c<this.trailLengthNanos){const o=1-c/this.trailLengthNanos;this.drawTraceEntry(t.points,u,o,e,r,n,i,s,a)}else t.next=null}o.timestamp-this.lastTrim>1e10&&this.traces.forEach((t,e)=>{o.timestamp-t.timestamp>this.trailLengthNanos&&this.traces.delete(e)})}drawTraceEntry(t,e,r,n,i,o,s,a,c){a.globalAlpha=r,a.fillStyle=c.colors.secondary_color,a.strokeStyle=c.colors.secondary_color;for(let c=0;c<t.length;c++){const l=t[c];a.beginPath(),a.globalAlpha=r,a.arc(l.x*o+n,l.y*s+i,e*r,0,2*Math.PI,!1),a.fill(),a.stroke()}}},z=class{constructor(t={}){this.target=m;const{target:e="$..objects[?(@.mask)]"}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,o,s){if(!t.mask)return;const a=this.context,c=this.style;if(!a||!c)throw new Error("render() called before start()");const l=i.from(t.mask.bitmap,"base64"),u=new OffscreenCanvas(t.mask.width,t.mask.height),h=u.getContext("2d");if(!h)throw new Error("cannot render a mask without offscreen context");const f=h.createImageData(1,1),p=f.data;p[0]=80,p[1]=80,p[2]=80,p[3]=128;for(let e=0;e<t.mask.height;e++){const r=e*t.mask.stride;for(let n=0;n<t.mask.stride;n++){const i=l[r+n];for(let r=0;r<8;r++){const o=8*n+r;if(o>=t.mask.width)break;i>>7-r%8&1&&h.putImageData(f,o,e)}}}const d=u.transferToImageBitmap();a.drawImage(d,t.x+e,t.y+r,t.width*n,t.height*o)}},G=class{constructor(t={}){this.target=m;const{target:e="$..objects[?(@.contours)]"}=t;this.target=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(!t.contours||!t.contours.length)return;const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=Math.max(1,Math.max(s.canvas.width,s.canvas.height)/360);for(let o=0;o<t.contours.length;o++){const l=t.contours[o];if(l.points.length<2)continue;s.beginPath(),s.lineWidth=c,s.strokeStyle=a.colors.primary_color,s.fillStyle=a.colors.opacity_color;let u=l.points[l.points.length-1];s.moveTo(u.x*n+e,u.y*i+r);for(let t=0;t<l.points.length;t++)u=l.points[t],s.lineTo(u.x*n+e,u.y*i+r);if(s.closePath(),s.stroke(),l.cutouts&&l.cutouts.length)for(let t=0;t<l.cutouts.length;t++){const o=l.cutouts[t];if(!(o.length<2)){u=o[o.length-1],s.moveTo(u.x*n+e,u.y*i+r);for(let t=0;t<o.length;t++)u=o[t],s.lineTo(u.x*n+e,u.y*i+r);s.closePath(),s.stroke()}}s.fill()}}},W=class{constructor(t={}){this.target=m,this.showLabels=!1;const{showLabels:e=!1,target:r="$..objects[?(@.keyPoints)]"}=t;this.target=r,this.showLabels=e}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(t.keyPoints){const o=this.style;if(!o)throw new Error("render() called before start()");let s=o.colors.primary_color;for(let o=0;o<t.keyPoints.length;o++){const a=t.keyPoints[o];this.renderKeyPoints(a,s,Math.max(t.width,t.height),e,r,n,i)}}}renderKeyPoints(t,e,r,n,i,o,s){let a=1,c=-1;for(let e=0;e<t.points.length;e++){const r=t.points[e];r.z&&(r.z>a&&(a=r.z),r.z<c&&(c=r.z))}const l=this.context,u=this.style;if(!l||!u)throw new Error("render() called before start()");const h=Math.min(4,r/100);for(var f=0;f<t.points.length;f++){const r=t.points[f],p=n+r.x*o,d=i+r.y*s,y=h-((r.z??0*Math.max(o,s))-c)*(h-2)/(a-c);if(l.beginPath(),l.arc(p,d,y,0,2*Math.PI,!1),l.fillStyle=e,l.fill(),l.strokeStyle=u.colors.secondary_color,l.stroke(),!this.showLabels)continue;let g;g=void 0===r.visible?r.classLabel:`${r.classLabel} (${r.visible?"visible":"invisible"})`,l.font=u.font,l.fillStyle="#ffffff",l.textAlign="left",l.textBaseline="top";const m=l.measureText(g);let b=r.x*o+n+y,v=r.y*s+i-(y+m.actualBoundingBoxAscent+m.actualBoundingBoxDescent);l.fillText(g,b,v)}}},q=class{constructor(t={}){this.target=m,this.fitToBounds=!0,this.textPadding=.1;const{target:e="$..objects[?(@.texts)]",fitToBounds:r=!0,textPadding:n=.1}=t;this.target=e,this.fitToBounds=r,this.textPadding=Math.max(.02,Math.min(.2,n))}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o){if(!t||t.width<=0||t.height<=0||!t.texts||0===t.texts.length)return;const s=this.context,a=this.style;if(!s||!a)throw new Error("render() called before start()");const c=t.width*n,l=t.height*i;let u=Math.min(s.canvas.width,s.canvas.height)*this.textPadding*a.cornerPadding;u=Math.min(u,c*this.textPadding,l*this.textPadding);const h=c-2*u,f=l-2*u;let p=this.getMinFontSize(s,t,h,f,a,this.fitToBounds),d="";const y=a.font.split(" ")[1];s.font=`${p}px ${y}`;let g=0;const m=[];for(let e=0;e<t.texts.length;e++){if(d=t.texts[e]?.text||"",!d)continue;const r=s.measureText(d),n=r.actualBoundingBoxAscent+r.actualBoundingBoxDescent;g+=n,m.push({text:d,width:r.width,height:n})}const b=.2*p;t.texts.length>1&&(g+=b*(t.texts.length-1));let v=t.y*i+r+(l-g)/2;for(let r=0;r<m.length;r++){const i=m[r];let o=t.x*n+e+(c-i.width)/2;this.drawText(i.text,s,o,v,a,p),v+=i.height+b}}drawText(t,e,r,n,i,o){e.fillStyle="#ffffff",e.textAlign="left",e.textBaseline="top";let s=i.font.split(" ")[1];e.font=`${o}px ${s}`,e.fillText(t,r,n)}static toTitleCase(t){return t?t.replace(/\w\S*/g,function(t){return t.charAt(0).toUpperCase()+t.substr(1).toLowerCase()}):""}getMinFontSize(t,e,r,n,i,o=!1){const s=(e.texts||[]).map(t=>t?.text||"").filter(t=>t),a=s.length;if(0===a)return parseInt(i.font.split(" ")[0]);const c=parseInt(i.font.split(" ")[0]);if(!o)return c;try{const e=i.font.split(" ")[1];if(1===a){const i=.9*n;let o=Math.floor(i);t.font=`${o}px ${e}`;const a=t.measureText(s[0]);return a.width>r&&(o=Math.floor(o*(r/a.width)*.95)),Math.max(5,o)}const o=.9*n,c=(o-(a-1)*(a>1?.1*o/(a-1):0))/a;let l=Math.floor(c);t.font=`${l}px ${e}`;let u=0;for(const e of s){const r=t.measureText(e).width;u=Math.max(u,r)}return u>r&&(l=Math.floor(l*(r/u)*.95)),Math.max(5,l)}catch(t){return Math.min(n/(a+1),r/10)}}},H=class{constructor(t={}){this.target="$",this.classProperties={};const{showConfidence:e=!1,classProperties:r={},target:n="$",labelSizePercentage:i=.05}=t;this.target=n,this.showConfidence=e,this.classProperties=r,this.labelSizePercentage=i}start(t,e){this.context=t,this.style=e}draw(t,e,r,n,i,o,s){const a=this.context,c=this.style;if(!a||!c)throw new Error("render() called before start()");const l=a?.canvas,u=l?.width??640,h=l?.height??480,f=Math.min(u,h)*this.labelSizePercentage,p=.3*f,d=2.4*f,y=1.3*f;let g=h-d,m=p;if(t.classes){let e=0;t.classes.forEach(t=>{let r=t.classLabel;c.font=`${y}px serif`,a.font=c.font;const n=a?.measureText(r),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent+2*p*.5;e=Math.max(i,e)}),t.classes.forEach(t=>{let r=t.classLabel;const n=this.classProperties?.[t.classLabel],i=n?.disabled??!1;c.colors.primary_color=n?.color??"#009dff",i&&(a.globalAlpha=n?.disabledOpacity??.5),this.showConfidence&&t.confidence&&(r+=` ${Math.round(100*t.confidence)}%`);const o=a.measureText(r).width+2*p*.5,s=e/2;this.drawLabel(r,a,m,g,c,i,.5*p,d,o,e,s),m+=o+p,m+o>.9*u-p&&(m=p,g-=d)})}}drawLabel(t,e,r,n,i,o,s,a,c,l,u){e.font=i.font,e.fillStyle=i.colors.primary_color,e.globalAlpha=o?.5:1,e.strokeStyle="#ffffff",e.setLineDash([l/10,l/10]),e.lineWidth=l/20,e.beginPath(),e.moveTo(r+u,n-l/2),e.lineTo(r+c-u,n-l/2),e.quadraticCurveTo(r+c,n-l/2,r+c,n-l/2+u),e.lineTo(r+c,n+l/2-u),e.quadraticCurveTo(r+c,n+l/2,r+c-u,n+l/2),e.lineTo(r+u,n+l/2),e.quadraticCurveTo(r,n+l/2,r,n+l/2-u),e.lineTo(r,n-l/2+u),e.quadraticCurveTo(r,n-l/2,r+u,n-l/2),e.closePath(),e.fill(),e.stroke(),e.fillStyle="#ffffff",e.textAlign="left",e.textBaseline="middle",e.fillText(t,r+s,n)}};(S=E||(E={})).renderer=function(t,e=void 0){return new k({context:t,rules:e})},S.renderBlur=function(t={}){return new I(t)},S.renderBox=function(t={}){return new v(t)},S.renderClasses=function(t={}){return new H(t)},S.renderMask=function(t={}){return new z(t)},S.renderContour=function(t={}){return new G(t)},S.renderFace=function(t={}){return new T(t)},S.renderKeypoints=function(t={}){return new W(t)},S.renderHand=function(t={}){return new P(t)},S.renderPose=function(t={}){return new N(t)},S.renderText=function(t={}){return new q(t)},S.renderTrail=function(t={}){return new F(t)};var X=E},991(t,e){"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],c=o[1],l=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,c)),u=0,h=c>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],l[u++]=e>>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===c&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,l[u++]=255&e),1===c&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(l(t,a,a+s>c?c:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function l(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(c(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n=r(949);return n.default})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eyepop.ai/eyepop-render-2d",
3
- "version": "3.7.2",
3
+ "version": "3.9.0",
4
4
  "description": "The Node.js / Typescript library for 2d rendering of EyePop.ai's inference API",
5
5
  "keywords": [
6
6
  "AI",
@@ -31,7 +31,7 @@
31
31
  "dev": "tsup && webpack; npx chokidar '**/*.ts' -i 'dist' -c 'npx tsup && webpack'"
32
32
  },
33
33
  "dependencies": {
34
- "@eyepop.ai/eyepop": "3.7.2",
34
+ "@eyepop.ai/eyepop": "3.9.0",
35
35
  "@juggle/resize-observer": "^3.4.0",
36
36
  "@types/jsonpath": "^0.2.4",
37
37
  "canvas": "3.2.0",