diff --git a/bundle.js b/bundle.js index fa6c3f8..cdc811d 100644 --- a/bundle.js +++ b/bundle.js @@ -1,2 +1,2 @@ /*! For license information please see bundle.js.LICENSE.txt */ -(()=>{var e,t,n={8363:(e,t)=>{"use strict";t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?o===t.replace(/\/.*$/,""):i===t}))}return!0}},9742:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,o=s(e),a=o[0],l=o[1],c=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,l)),u=0,h=l>0?a-4:a;for(n=0;n>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,c[u++]=255&t),1===l&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,r=e.length,i=r%3,o=[],a=16383,s=0,c=r-i;sc?c:s+a));return 1===i?(t=e[r-1],o.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],o.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,r){for(var i,o,a=[],s=t;s>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8764:(e,t,n)=>{"use strict";const r=n(9742),i=n(645),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=l,t.h2=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,n)}function c(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!l.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|m(e,t);let r=s(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if($(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer))return p(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return p(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return l.from(r,t,n);const i=function(e){if(l.isBuffer(e)){const t=0|f(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||K(e.length)?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return l.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return u(e),s(e<0?0:0|f(e))}function d(e){const t=e.length<0?0:0|f(e.length),n=s(t);for(let r=0;r=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return X(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return Y(e).length;default:if(i)return r?-1:X(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return O(this,t,n);case"utf8":case"utf-8":return k(this,t,n);case"ascii":return C(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return S(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function b(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,n,r,i){let o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(o=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!l.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},l.byteLength=m,l.prototype._isBuffer=!0,l.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(e+=" ... "),""},o&&(l.prototype[o]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if($(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return T(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":case"latin1":case"binary":return E(this,e,t,n);case"base64":return x(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function C(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,n,r,i){G(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function M(e,t,n,r,i){G(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function L(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,o){return t=+t,n>>>=0,o||L(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function F(e,t,n,r,o){return t=+t,n>>>=0,o||L(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||P(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||P(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=Z((function(e){z(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||V(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||N(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,255,0),this[t]=255&e,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigUInt64LE=Z((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeBigUInt64BE=Z((function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);N(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},l.prototype.writeBigInt64LE=Z((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeBigInt64BE=Z((function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),l.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function G(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new U.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){z(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||V(t,e.length-(n+1))}(r,i,o)}function z(e,t){if("number"!=typeof e)throw new U.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,n){if(Math.floor(e)!==e)throw z(e,n),new U.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new U.ERR_BUFFER_OUT_OF_BOUNDS;throw new U.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=H(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function X(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function Y(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function q(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function Z(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},1924:(e,t,n)=>{"use strict";var r=n(210),i=n(5559),o=i(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i(n):n}},5559:(e,t,n)=>{"use strict";var r=n(8612),i=n(210),o=n(7771),a=i("%TypeError%"),s=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),c=i("%Reflect.apply%",!0)||r.call(l,s),u=i("%Object.defineProperty%",!0),h=i("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=c(r,l,arguments);return o(t,1+h(0,e.length-(arguments.length-1)),!0)};var d=function(){return c(r,s,arguments)};u?u(e.exports,"apply",{value:d}):e.exports.apply=d},2889:(e,t,n)=>{"use strict";n.d(t,{Z:()=>O});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o),s=n(1667),l=n.n(s),c=new URL(n(7211),n.b),u=new URL(n(4576),n.b),h=new URL(n(1024),n.b),d=new URL(n(9653),n.b),p=new URL(n(4231),n.b),f=new URL(n(7263),n.b),m=new URL(n(1380),n.b),g=new URL(n(9242),n.b),b=new URL(n(4104),n.b),v=new URL(n(9700),n.b),y=a()(i()),T=l()(c),_=l()(u),E=l()(h),x=l()(d),w=l()(p),S=l()(f),k=l()(m),A=l()(g),C=l()(b),I=l()(v);y.push([e.id,`/*!\n * Bootstrap v4.6.2 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors\n * Copyright 2011-2022 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#007bff;--secondary:#6c757d;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--breakpoint-xs:0;--breakpoint-sm:576px;--breakpoint-md:768px;--breakpoint-lg:992px;--breakpoint-xl:1200px;--font-family-sans-serif:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-family-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0)}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus:not(:focus-visible){outline:0 !important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}a{color:#007bff;text-decoration:none;background-color:rgba(0,0,0,0)}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([class]){color:inherit;text-decoration:none}a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto;-ms-overflow-style:scrollbar}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit;text-align:-webkit-match-parent}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none !important}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:2.5rem}.h2,h2{font-size:2rem}.h3,h3{font-size:1.75rem}.h4,h4{font-size:1.5rem}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}.lead{font-size:1.25rem;font-weight:300}.display-1{font-size:6rem;font-weight:300;line-height:1.2}.display-2{font-size:5.5rem;font-weight:300;line-height:1.2}.display-3{font-size:4.5rem;font-weight:300;line-height:1.2}.display-4{font-size:3.5rem;font-weight:300;line-height:1.2}hr{margin-top:1rem;margin-bottom:1rem;border:0;border-top:1px solid rgba(0,0,0,.1)}.small,small{font-size:.875em;font-weight:400}.mark,mark{padding:.2em;background-color:#fcf8e3}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline-item{display:inline-block}.list-inline-item:not(:last-child){margin-right:.5rem}.initialism{font-size:90%;text-transform:uppercase}.blockquote{margin-bottom:1rem;font-size:1.25rem}.blockquote-footer{display:block;font-size:.875em;color:#6c757d}.blockquote-footer::before{content:"— "}.img-fluid{max-width:100%;height:auto}.img-thumbnail{padding:.25rem;background-color:#fff;border:1px solid #dee2e6;border-radius:.25rem;max-width:100%;height:auto}.figure{display:inline-block}.figure-img{margin-bottom:.5rem;line-height:1}.figure-caption{font-size:90%;color:#6c757d}code{font-size:87.5%;color:#e83e8c;word-wrap:break-word}a>code{color:inherit}kbd{padding:.2rem .4rem;font-size:87.5%;color:#fff;background-color:#212529;border-radius:.2rem}kbd kbd{padding:0;font-size:100%;font-weight:700}pre{display:block;font-size:87.5%;color:#212529}pre code{font-size:inherit;color:inherit;word-break:normal}.pre-scrollable{max-height:340px;overflow-y:scroll}.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl{width:100%;padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media(min-width: 576px){.container,.container-sm{max-width:540px}}@media(min-width: 768px){.container,.container-md,.container-sm{max-width:720px}}@media(min-width: 992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media(min-width: 1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}.row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-15px;margin-left:-15px}.no-gutters{margin-right:0;margin-left:0}.no-gutters>.col,.no-gutters>[class*=col-]{padding-right:0;padding-left:0}.col,.col-1,.col-10,.col-11,.col-12,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-auto,.col-lg,.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-auto,.col-md,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-auto,.col-sm,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-auto,.col-xl,.col-xl-1,.col-xl-10,.col-xl-11,.col-xl-12,.col-xl-2,.col-xl-3,.col-xl-4,.col-xl-5,.col-xl-6,.col-xl-7,.col-xl-8,.col-xl-9,.col-xl-auto{position:relative;width:100%;padding-right:15px;padding-left:15px}.col{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-first{-ms-flex-order:-1;order:-1}.order-last{-ms-flex-order:13;order:13}.order-0{-ms-flex-order:0;order:0}.order-1{-ms-flex-order:1;order:1}.order-2{-ms-flex-order:2;order:2}.order-3{-ms-flex-order:3;order:3}.order-4{-ms-flex-order:4;order:4}.order-5{-ms-flex-order:5;order:5}.order-6{-ms-flex-order:6;order:6}.order-7{-ms-flex-order:7;order:7}.order-8{-ms-flex-order:8;order:8}.order-9{-ms-flex-order:9;order:9}.order-10{-ms-flex-order:10;order:10}.order-11{-ms-flex-order:11;order:11}.order-12{-ms-flex-order:12;order:12}.offset-1{margin-left:8.333333%}.offset-2{margin-left:16.666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.333333%}.offset-5{margin-left:41.666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.333333%}.offset-8{margin-left:66.666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.333333%}.offset-11{margin-left:91.666667%}@media(min-width: 576px){.col-sm{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-sm-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-sm-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-sm-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-sm-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-sm-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-sm-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-sm-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-sm-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-sm-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-sm-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-sm-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-sm-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-sm-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-sm-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-sm-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-sm-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-sm-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-sm-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-sm-first{-ms-flex-order:-1;order:-1}.order-sm-last{-ms-flex-order:13;order:13}.order-sm-0{-ms-flex-order:0;order:0}.order-sm-1{-ms-flex-order:1;order:1}.order-sm-2{-ms-flex-order:2;order:2}.order-sm-3{-ms-flex-order:3;order:3}.order-sm-4{-ms-flex-order:4;order:4}.order-sm-5{-ms-flex-order:5;order:5}.order-sm-6{-ms-flex-order:6;order:6}.order-sm-7{-ms-flex-order:7;order:7}.order-sm-8{-ms-flex-order:8;order:8}.order-sm-9{-ms-flex-order:9;order:9}.order-sm-10{-ms-flex-order:10;order:10}.order-sm-11{-ms-flex-order:11;order:11}.order-sm-12{-ms-flex-order:12;order:12}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.333333%}.offset-sm-2{margin-left:16.666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.333333%}.offset-sm-5{margin-left:41.666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.333333%}.offset-sm-8{margin-left:66.666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.333333%}.offset-sm-11{margin-left:91.666667%}}@media(min-width: 768px){.col-md{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-md-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-md-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-md-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-md-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-md-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-md-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-md-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-md-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-md-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-md-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-md-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-md-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-md-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-md-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-md-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-md-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-md-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-md-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-md-first{-ms-flex-order:-1;order:-1}.order-md-last{-ms-flex-order:13;order:13}.order-md-0{-ms-flex-order:0;order:0}.order-md-1{-ms-flex-order:1;order:1}.order-md-2{-ms-flex-order:2;order:2}.order-md-3{-ms-flex-order:3;order:3}.order-md-4{-ms-flex-order:4;order:4}.order-md-5{-ms-flex-order:5;order:5}.order-md-6{-ms-flex-order:6;order:6}.order-md-7{-ms-flex-order:7;order:7}.order-md-8{-ms-flex-order:8;order:8}.order-md-9{-ms-flex-order:9;order:9}.order-md-10{-ms-flex-order:10;order:10}.order-md-11{-ms-flex-order:11;order:11}.order-md-12{-ms-flex-order:12;order:12}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.333333%}.offset-md-2{margin-left:16.666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.333333%}.offset-md-5{margin-left:41.666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.333333%}.offset-md-8{margin-left:66.666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.333333%}.offset-md-11{margin-left:91.666667%}}@media(min-width: 992px){.col-lg{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-lg-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-lg-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-lg-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-lg-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-lg-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-lg-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-lg-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-lg-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-lg-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-lg-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-lg-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-lg-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-lg-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-lg-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-lg-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-lg-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-lg-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-lg-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-lg-first{-ms-flex-order:-1;order:-1}.order-lg-last{-ms-flex-order:13;order:13}.order-lg-0{-ms-flex-order:0;order:0}.order-lg-1{-ms-flex-order:1;order:1}.order-lg-2{-ms-flex-order:2;order:2}.order-lg-3{-ms-flex-order:3;order:3}.order-lg-4{-ms-flex-order:4;order:4}.order-lg-5{-ms-flex-order:5;order:5}.order-lg-6{-ms-flex-order:6;order:6}.order-lg-7{-ms-flex-order:7;order:7}.order-lg-8{-ms-flex-order:8;order:8}.order-lg-9{-ms-flex-order:9;order:9}.order-lg-10{-ms-flex-order:10;order:10}.order-lg-11{-ms-flex-order:11;order:11}.order-lg-12{-ms-flex-order:12;order:12}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.333333%}.offset-lg-2{margin-left:16.666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.333333%}.offset-lg-5{margin-left:41.666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.333333%}.offset-lg-8{margin-left:66.666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.333333%}.offset-lg-11{margin-left:91.666667%}}@media(min-width: 1200px){.col-xl{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;max-width:100%}.row-cols-xl-1>*{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.row-cols-xl-2>*{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.row-cols-xl-3>*{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.row-cols-xl-4>*{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.row-cols-xl-5>*{-ms-flex:0 0 20%;flex:0 0 20%;max-width:20%}.row-cols-xl-6>*{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-auto{-ms-flex:0 0 auto;flex:0 0 auto;width:auto;max-width:100%}.col-xl-1{-ms-flex:0 0 8.333333%;flex:0 0 8.333333%;max-width:8.333333%}.col-xl-2{-ms-flex:0 0 16.666667%;flex:0 0 16.666667%;max-width:16.666667%}.col-xl-3{-ms-flex:0 0 25%;flex:0 0 25%;max-width:25%}.col-xl-4{-ms-flex:0 0 33.333333%;flex:0 0 33.333333%;max-width:33.333333%}.col-xl-5{-ms-flex:0 0 41.666667%;flex:0 0 41.666667%;max-width:41.666667%}.col-xl-6{-ms-flex:0 0 50%;flex:0 0 50%;max-width:50%}.col-xl-7{-ms-flex:0 0 58.333333%;flex:0 0 58.333333%;max-width:58.333333%}.col-xl-8{-ms-flex:0 0 66.666667%;flex:0 0 66.666667%;max-width:66.666667%}.col-xl-9{-ms-flex:0 0 75%;flex:0 0 75%;max-width:75%}.col-xl-10{-ms-flex:0 0 83.333333%;flex:0 0 83.333333%;max-width:83.333333%}.col-xl-11{-ms-flex:0 0 91.666667%;flex:0 0 91.666667%;max-width:91.666667%}.col-xl-12{-ms-flex:0 0 100%;flex:0 0 100%;max-width:100%}.order-xl-first{-ms-flex-order:-1;order:-1}.order-xl-last{-ms-flex-order:13;order:13}.order-xl-0{-ms-flex-order:0;order:0}.order-xl-1{-ms-flex-order:1;order:1}.order-xl-2{-ms-flex-order:2;order:2}.order-xl-3{-ms-flex-order:3;order:3}.order-xl-4{-ms-flex-order:4;order:4}.order-xl-5{-ms-flex-order:5;order:5}.order-xl-6{-ms-flex-order:6;order:6}.order-xl-7{-ms-flex-order:7;order:7}.order-xl-8{-ms-flex-order:8;order:8}.order-xl-9{-ms-flex-order:9;order:9}.order-xl-10{-ms-flex-order:10;order:10}.order-xl-11{-ms-flex-order:11;order:11}.order-xl-12{-ms-flex-order:12;order:12}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.333333%}.offset-xl-2{margin-left:16.666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.333333%}.offset-xl-5{margin-left:41.666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.333333%}.offset-xl-8{margin-left:66.666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.333333%}.offset-xl-11{margin-left:91.666667%}}.table{width:100%;margin-bottom:1rem;color:#212529}.table td,.table th{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}.table thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table tbody+tbody{border-top:2px solid #dee2e6}.table-sm td,.table-sm th{padding:.3rem}.table-bordered{border:1px solid #dee2e6}.table-bordered td,.table-bordered th{border:1px solid #dee2e6}.table-bordered thead td,.table-bordered thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212529;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#b8daff}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#7abaff}.table-hover .table-primary:hover{background-color:#9fcdff}.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#9fcdff}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d6d8db}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b3b7bb}.table-hover .table-secondary:hover{background-color:#c8cbcf}.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#c8cbcf}.table-success,.table-success>td,.table-success>th{background-color:#c3e6cb}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#8fd19e}.table-hover .table-success:hover{background-color:#b1dfbb}.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#b1dfbb}.table-info,.table-info>td,.table-info>th{background-color:#bee5eb}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#86cfda}.table-hover .table-info:hover{background-color:#abdde5}.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#abdde5}.table-warning,.table-warning>td,.table-warning>th{background-color:#ffeeba}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#ffdf7e}.table-hover .table-warning:hover{background-color:#ffe8a1}.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#ffe8a1}.table-danger,.table-danger>td,.table-danger>th{background-color:#f5c6cb}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#ed969e}.table-hover .table-danger:hover{background-color:#f1b0b7}.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#f1b0b7}.table-light,.table-light>td,.table-light>th{background-color:#fdfdfe}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fbfcfc}.table-hover .table-light:hover{background-color:#ececf6}.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#ececf6}.table-dark,.table-dark>td,.table-dark>th{background-color:#c6c8ca}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#95999c}.table-hover .table-dark:hover{background-color:#b9bbbe}.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b9bbbe}.table-active,.table-active>td,.table-active>th{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover{background-color:rgba(0,0,0,.075)}.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th{color:#fff;background-color:#343a40;border-color:#454d55}.table .thead-light th{color:#495057;background-color:#e9ecef;border-color:#dee2e6}.table-dark{color:#fff;background-color:#343a40}.table-dark td,.table-dark th,.table-dark thead th{border-color:#454d55}.table-dark.table-bordered{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:rgba(255,255,255,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:rgba(255,255,255,.075)}@media(max-width: 575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered{border:0}}@media(max-width: 767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered{border:0}}@media(max-width: 991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered{border:0}}@media(max-width: 1199.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered{border:0}.form-control{display:block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;background-clip:padding-box;border:1px solid #ced4da;border-radius:.25rem;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.form-control{transition:none}}.form-control::-ms-expand{background-color:rgba(0,0,0,0);border:0}.form-control:focus{color:#495057;background-color:#fff;border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.form-control::-webkit-input-placeholder{color:#6c757d;opacity:1}.form-control::-moz-placeholder{color:#6c757d;opacity:1}.form-control:-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::-ms-input-placeholder{color:#6c757d;opacity:1}.form-control::placeholder{color:#6c757d;opacity:1}.form-control:disabled,.form-control[readonly]{background-color:#e9ecef;opacity:1}input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{-webkit-appearance:none;-moz-appearance:none;appearance:none}select.form-control:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 #495057}select.form-control:focus::-ms-value{color:#495057;background-color:#fff}.form-control-file,.form-control-range{display:block;width:100%}.col-form-label{padding-top:calc(.375rem + 1px);padding-bottom:calc(.375rem + 1px);margin-bottom:0;font-size:inherit;line-height:1.5}.col-form-label-lg{padding-top:calc(.5rem + 1px);padding-bottom:calc(.5rem + 1px);font-size:1.25rem;line-height:1.5}.col-form-label-sm{padding-top:calc(.25rem + 1px);padding-bottom:calc(.25rem + 1px);font-size:.875rem;line-height:1.5}.form-control-plaintext{display:block;width:100%;padding:.375rem 0;margin-bottom:0;font-size:1rem;line-height:1.5;color:#212529;background-color:rgba(0,0,0,0);border:solid rgba(0,0,0,0);border-width:1px 0}.form-control-plaintext.form-control-lg,.form-control-plaintext.form-control-sm{padding-right:0;padding-left:0}.form-control-sm{height:calc(1.5em + .5rem + 2px);padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.form-control-lg{height:calc(1.5em + 1rem + 2px);padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}select.form-control[multiple],select.form-control[size]{height:auto}textarea.form-control{height:auto}.form-group{margin-bottom:1rem}.form-text{display:block;margin-top:.25rem}.form-row{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-right:-5px;margin-left:-5px}.form-row>.col,.form-row>[class*=col-]{padding-right:5px;padding-left:5px}.form-check{position:relative;display:block;padding-left:1.25rem}.form-check-input{position:absolute;margin-top:.3rem;margin-left:-1.25rem}.form-check-input:disabled~.form-check-label,.form-check-input[disabled]~.form-check-label{color:#6c757d}.form-check-label{margin-bottom:0}.form-check-inline{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;padding-left:0;margin-right:.75rem}.form-check-inline .form-check-input{position:static;margin-top:0;margin-right:.3125rem;margin-left:0}.valid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#28a745}.valid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(40,167,69,.9);border-radius:.25rem}.form-row>.col>.valid-tooltip,.form-row>[class*=col-]>.valid-tooltip{left:5px}.is-valid~.valid-feedback,.is-valid~.valid-tooltip,.was-validated :valid~.valid-feedback,.was-validated :valid~.valid-tooltip{display:block}.form-control.is-valid,.was-validated .form-control:valid{border-color:#28a745;padding-right:calc(1.5em + .75rem) !important;background-image:url(${T});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-valid:focus,.was-validated .form-control:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.was-validated select.form-control:valid,select.form-control.is-valid{padding-right:3rem !important;background-position:right 1.5rem center}.was-validated textarea.form-control:valid,textarea.form-control.is-valid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-valid,.was-validated .custom-select:valid{border-color:#28a745;padding-right:calc(.75em + 2.3125rem) !important;background:url(${_}) right .75rem center/8px 10px no-repeat,#fff url(${T}) center right 1.75rem/calc(0.75em + 0.375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-valid:focus,.was-validated .custom-select:valid:focus{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.form-check-input.is-valid~.form-check-label,.was-validated .form-check-input:valid~.form-check-label{color:#28a745}.form-check-input.is-valid~.valid-feedback,.form-check-input.is-valid~.valid-tooltip,.was-validated .form-check-input:valid~.valid-feedback,.was-validated .form-check-input:valid~.valid-tooltip{display:block}.custom-control-input.is-valid~.custom-control-label,.was-validated .custom-control-input:valid~.custom-control-label{color:#28a745}.custom-control-input.is-valid~.custom-control-label::before,.was-validated .custom-control-input:valid~.custom-control-label::before{border-color:#28a745}.custom-control-input.is-valid:checked~.custom-control-label::before,.was-validated .custom-control-input:valid:checked~.custom-control-label::before{border-color:#34ce57;background-color:#34ce57}.custom-control-input.is-valid:focus~.custom-control-label::before,.was-validated .custom-control-input:valid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.custom-control-input.is-valid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:valid:focus:not(:checked)~.custom-control-label::before{border-color:#28a745}.custom-file-input.is-valid~.custom-file-label,.was-validated .custom-file-input:valid~.custom-file-label{border-color:#28a745}.custom-file-input.is-valid:focus~.custom-file-label,.was-validated .custom-file-input:valid:focus~.custom-file-label{border-color:#28a745;box-shadow:0 0 0 .2rem rgba(40,167,69,.25)}.invalid-feedback{display:none;width:100%;margin-top:.25rem;font-size:.875em;color:#dc3545}.invalid-tooltip{position:absolute;top:100%;left:0;z-index:5;display:none;max-width:100%;padding:.25rem .5rem;margin-top:.1rem;font-size:.875rem;line-height:1.5;color:#fff;background-color:rgba(220,53,69,.9);border-radius:.25rem}.form-row>.col>.invalid-tooltip,.form-row>[class*=col-]>.invalid-tooltip{left:5px}.is-invalid~.invalid-feedback,.is-invalid~.invalid-tooltip,.was-validated :invalid~.invalid-feedback,.was-validated :invalid~.invalid-tooltip{display:block}.form-control.is-invalid,.was-validated .form-control:invalid{border-color:#dc3545;padding-right:calc(1.5em + .75rem) !important;background-image:url(${E});background-repeat:no-repeat;background-position:right calc(.375em + .1875rem) center;background-size:calc(.75em + .375rem) calc(.75em + .375rem)}.form-control.is-invalid:focus,.was-validated .form-control:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.was-validated select.form-control:invalid,select.form-control.is-invalid{padding-right:3rem !important;background-position:right 1.5rem center}.was-validated textarea.form-control:invalid,textarea.form-control.is-invalid{padding-right:calc(1.5em + .75rem);background-position:top calc(.375em + .1875rem) right calc(.375em + .1875rem)}.custom-select.is-invalid,.was-validated .custom-select:invalid{border-color:#dc3545;padding-right:calc(.75em + 2.3125rem) !important;background:url(${_}) right .75rem center/8px 10px no-repeat,#fff url(${E}) center right 1.75rem/calc(0.75em + 0.375rem) calc(.75em + .375rem) no-repeat}.custom-select.is-invalid:focus,.was-validated .custom-select:invalid:focus{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-check-input.is-invalid~.form-check-label,.was-validated .form-check-input:invalid~.form-check-label{color:#dc3545}.form-check-input.is-invalid~.invalid-feedback,.form-check-input.is-invalid~.invalid-tooltip,.was-validated .form-check-input:invalid~.invalid-feedback,.was-validated .form-check-input:invalid~.invalid-tooltip{display:block}.custom-control-input.is-invalid~.custom-control-label,.was-validated .custom-control-input:invalid~.custom-control-label{color:#dc3545}.custom-control-input.is-invalid~.custom-control-label::before,.was-validated .custom-control-input:invalid~.custom-control-label::before{border-color:#dc3545}.custom-control-input.is-invalid:checked~.custom-control-label::before,.was-validated .custom-control-input:invalid:checked~.custom-control-label::before{border-color:#e4606d;background-color:#e4606d}.custom-control-input.is-invalid:focus~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.custom-control-input.is-invalid:focus:not(:checked)~.custom-control-label::before,.was-validated .custom-control-input:invalid:focus:not(:checked)~.custom-control-label::before{border-color:#dc3545}.custom-file-input.is-invalid~.custom-file-label,.was-validated .custom-file-input:invalid~.custom-file-label{border-color:#dc3545}.custom-file-input.is-invalid:focus~.custom-file-label,.was-validated .custom-file-input:invalid:focus~.custom-file-label{border-color:#dc3545;box-shadow:0 0 0 .2rem rgba(220,53,69,.25)}.form-inline{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center}.form-inline .form-check{width:100%}@media(min-width: 576px){.form-inline label{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-bottom:0}.form-inline .form-group{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex-align:center;align-items:center;margin-bottom:0}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-plaintext{display:inline-block}.form-inline .custom-select,.form-inline .input-group{width:auto}.form-inline .form-check{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:auto;padding-left:0}.form-inline .form-check-input{position:relative;-ms-flex-negative:0;flex-shrink:0;margin-top:0;margin-right:.25rem;margin-left:0}.form-inline .custom-control{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.form-inline .custom-control-label{margin-bottom:0}}.btn{display:inline-block;font-weight:400;color:#212529;text-align:center;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:rgba(0,0,0,0);border:1px solid rgba(0,0,0,0);padding:.375rem .75rem;font-size:1rem;line-height:1.5;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.btn{transition:none}}.btn:hover{color:#212529;text-decoration:none}.btn.focus,.btn:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.btn.disabled,.btn:disabled{opacity:.65}.btn:not(:disabled):not(.disabled){cursor:pointer}a.btn.disabled,fieldset:disabled a.btn{pointer-events:none}.btn-primary{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:hover{color:#fff;background-color:#0069d9;border-color:#0062cc}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#0069d9;border-color:#0062cc;box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-primary.disabled,.btn-primary:disabled{color:#fff;background-color:#007bff;border-color:#007bff}.btn-primary:not(:disabled):not(.disabled).active,.btn-primary:not(:disabled):not(.disabled):active,.show>.btn-primary.dropdown-toggle{color:#fff;background-color:#0062cc;border-color:#005cbf}.btn-primary:not(:disabled):not(.disabled).active:focus,.btn-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(38,143,255,.5)}.btn-secondary{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:hover{color:#fff;background-color:#5a6268;border-color:#545b62}.btn-secondary.focus,.btn-secondary:focus{color:#fff;background-color:#5a6268;border-color:#545b62;box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-secondary.disabled,.btn-secondary:disabled{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-secondary:not(:disabled):not(.disabled).active,.btn-secondary:not(:disabled):not(.disabled):active,.show>.btn-secondary.dropdown-toggle{color:#fff;background-color:#545b62;border-color:#4e555b}.btn-secondary:not(:disabled):not(.disabled).active:focus,.btn-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(130,138,145,.5)}.btn-success{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:hover{color:#fff;background-color:#218838;border-color:#1e7e34}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#218838;border-color:#1e7e34;box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-success.disabled,.btn-success:disabled{color:#fff;background-color:#28a745;border-color:#28a745}.btn-success:not(:disabled):not(.disabled).active,.btn-success:not(:disabled):not(.disabled):active,.show>.btn-success.dropdown-toggle{color:#fff;background-color:#1e7e34;border-color:#1c7430}.btn-success:not(:disabled):not(.disabled).active:focus,.btn-success:not(:disabled):not(.disabled):active:focus,.show>.btn-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(72,180,97,.5)}.btn-info{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:hover{color:#fff;background-color:#138496;border-color:#117a8b}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#138496;border-color:#117a8b;box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-info.disabled,.btn-info:disabled{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-info:not(:disabled):not(.disabled).active,.btn-info:not(:disabled):not(.disabled):active,.show>.btn-info.dropdown-toggle{color:#fff;background-color:#117a8b;border-color:#10707f}.btn-info:not(:disabled):not(.disabled).active:focus,.btn-info:not(:disabled):not(.disabled):active:focus,.show>.btn-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(58,176,195,.5)}.btn-warning{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:hover{color:#212529;background-color:#e0a800;border-color:#d39e00}.btn-warning.focus,.btn-warning:focus{color:#212529;background-color:#e0a800;border-color:#d39e00;box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-warning.disabled,.btn-warning:disabled{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-warning:not(:disabled):not(.disabled).active,.btn-warning:not(:disabled):not(.disabled):active,.show>.btn-warning.dropdown-toggle{color:#212529;background-color:#d39e00;border-color:#c69500}.btn-warning:not(:disabled):not(.disabled).active:focus,.btn-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(222,170,12,.5)}.btn-danger{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:hover{color:#fff;background-color:#c82333;border-color:#bd2130}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c82333;border-color:#bd2130;box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-danger.disabled,.btn-danger:disabled{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-danger:not(:disabled):not(.disabled).active,.btn-danger:not(:disabled):not(.disabled):active,.show>.btn-danger.dropdown-toggle{color:#fff;background-color:#bd2130;border-color:#b21f2d}.btn-danger:not(:disabled):not(.disabled).active:focus,.btn-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(225,83,97,.5)}.btn-light{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:hover{color:#212529;background-color:#e2e6ea;border-color:#dae0e5}.btn-light.focus,.btn-light:focus{color:#212529;background-color:#e2e6ea;border-color:#dae0e5;box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-light.disabled,.btn-light:disabled{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-light:not(:disabled):not(.disabled).active,.btn-light:not(:disabled):not(.disabled):active,.show>.btn-light.dropdown-toggle{color:#212529;background-color:#dae0e5;border-color:#d3d9df}.btn-light:not(:disabled):not(.disabled).active:focus,.btn-light:not(:disabled):not(.disabled):active:focus,.show>.btn-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(216,217,219,.5)}.btn-dark{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:hover{color:#fff;background-color:#23272b;border-color:#1d2124}.btn-dark.focus,.btn-dark:focus{color:#fff;background-color:#23272b;border-color:#1d2124;box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-dark.disabled,.btn-dark:disabled{color:#fff;background-color:#343a40;border-color:#343a40}.btn-dark:not(:disabled):not(.disabled).active,.btn-dark:not(:disabled):not(.disabled):active,.show>.btn-dark.dropdown-toggle{color:#fff;background-color:#1d2124;border-color:#171a1d}.btn-dark:not(:disabled):not(.disabled).active:focus,.btn-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(82,88,93,.5)}.btn-outline-primary{color:#007bff;border-color:#007bff}.btn-outline-primary:hover{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary.focus,.btn-outline-primary:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-primary.disabled,.btn-outline-primary:disabled{color:#007bff;background-color:rgba(0,0,0,0)}.btn-outline-primary:not(:disabled):not(.disabled).active,.btn-outline-primary:not(:disabled):not(.disabled):active,.show>.btn-outline-primary.dropdown-toggle{color:#fff;background-color:#007bff;border-color:#007bff}.btn-outline-primary:not(:disabled):not(.disabled).active:focus,.btn-outline-primary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-primary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.btn-outline-secondary{color:#6c757d;border-color:#6c757d}.btn-outline-secondary:hover{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary.focus,.btn-outline-secondary:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-secondary.disabled,.btn-outline-secondary:disabled{color:#6c757d;background-color:rgba(0,0,0,0)}.btn-outline-secondary:not(:disabled):not(.disabled).active,.btn-outline-secondary:not(:disabled):not(.disabled):active,.show>.btn-outline-secondary.dropdown-toggle{color:#fff;background-color:#6c757d;border-color:#6c757d}.btn-outline-secondary:not(:disabled):not(.disabled).active:focus,.btn-outline-secondary:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-secondary.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.btn-outline-success{color:#28a745;border-color:#28a745}.btn-outline-success:hover{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success.focus,.btn-outline-success:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-success.disabled,.btn-outline-success:disabled{color:#28a745;background-color:rgba(0,0,0,0)}.btn-outline-success:not(:disabled):not(.disabled).active,.btn-outline-success:not(:disabled):not(.disabled):active,.show>.btn-outline-success.dropdown-toggle{color:#fff;background-color:#28a745;border-color:#28a745}.btn-outline-success:not(:disabled):not(.disabled).active:focus,.btn-outline-success:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-success.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.btn-outline-info{color:#17a2b8;border-color:#17a2b8}.btn-outline-info:hover{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info.focus,.btn-outline-info:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-info.disabled,.btn-outline-info:disabled{color:#17a2b8;background-color:rgba(0,0,0,0)}.btn-outline-info:not(:disabled):not(.disabled).active,.btn-outline-info:not(:disabled):not(.disabled):active,.show>.btn-outline-info.dropdown-toggle{color:#fff;background-color:#17a2b8;border-color:#17a2b8}.btn-outline-info:not(:disabled):not(.disabled).active:focus,.btn-outline-info:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-info.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.btn-outline-warning{color:#ffc107;border-color:#ffc107}.btn-outline-warning:hover{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning.focus,.btn-outline-warning:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-warning.disabled,.btn-outline-warning:disabled{color:#ffc107;background-color:rgba(0,0,0,0)}.btn-outline-warning:not(:disabled):not(.disabled).active,.btn-outline-warning:not(:disabled):not(.disabled):active,.show>.btn-outline-warning.dropdown-toggle{color:#212529;background-color:#ffc107;border-color:#ffc107}.btn-outline-warning:not(:disabled):not(.disabled).active:focus,.btn-outline-warning:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-warning.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.btn-outline-danger{color:#dc3545;border-color:#dc3545}.btn-outline-danger:hover{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger.focus,.btn-outline-danger:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-danger.disabled,.btn-outline-danger:disabled{color:#dc3545;background-color:rgba(0,0,0,0)}.btn-outline-danger:not(:disabled):not(.disabled).active,.btn-outline-danger:not(:disabled):not(.disabled):active,.show>.btn-outline-danger.dropdown-toggle{color:#fff;background-color:#dc3545;border-color:#dc3545}.btn-outline-danger:not(:disabled):not(.disabled).active:focus,.btn-outline-danger:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-danger.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.btn-outline-light{color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:hover{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light.focus,.btn-outline-light:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-light.disabled,.btn-outline-light:disabled{color:#f8f9fa;background-color:rgba(0,0,0,0)}.btn-outline-light:not(:disabled):not(.disabled).active,.btn-outline-light:not(:disabled):not(.disabled):active,.show>.btn-outline-light.dropdown-toggle{color:#212529;background-color:#f8f9fa;border-color:#f8f9fa}.btn-outline-light:not(:disabled):not(.disabled).active:focus,.btn-outline-light:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-light.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.btn-outline-dark{color:#343a40;border-color:#343a40}.btn-outline-dark:hover{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark.focus,.btn-outline-dark:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-outline-dark.disabled,.btn-outline-dark:disabled{color:#343a40;background-color:rgba(0,0,0,0)}.btn-outline-dark:not(:disabled):not(.disabled).active,.btn-outline-dark:not(:disabled):not(.disabled):active,.show>.btn-outline-dark.dropdown-toggle{color:#fff;background-color:#343a40;border-color:#343a40}.btn-outline-dark:not(:disabled):not(.disabled).active:focus,.btn-outline-dark:not(:disabled):not(.disabled):active:focus,.show>.btn-outline-dark.dropdown-toggle:focus{box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.btn-link{font-weight:400;color:#007bff;text-decoration:none}.btn-link:hover{color:#0056b3;text-decoration:underline}.btn-link.focus,.btn-link:focus{text-decoration:underline}.btn-link.disabled,.btn-link:disabled{color:#6c757d;pointer-events:none}.btn-group-lg>.btn,.btn-lg{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.btn-group-sm>.btn,.btn-sm{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:.5rem}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{transition:opacity .15s linear}@media(prefers-reduced-motion: reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{position:relative;height:0;overflow:hidden;transition:height .35s ease}@media(prefers-reduced-motion: reduce){.collapsing{transition:none}}.collapsing.width{width:0;height:auto;transition:width .35s ease}@media(prefers-reduced-motion: reduce){.collapsing.width{transition:none}}.dropdown,.dropleft,.dropright,.dropup{position:relative}.dropdown-toggle{white-space:nowrap}.dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid;border-right:.3em solid rgba(0,0,0,0);border-bottom:0;border-left:.3em solid rgba(0,0,0,0)}.dropdown-toggle:empty::after{margin-left:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-menu-left{right:auto;left:0}.dropdown-menu-right{right:0;left:auto}@media(min-width: 576px){.dropdown-menu-sm-left{right:auto;left:0}.dropdown-menu-sm-right{right:0;left:auto}}@media(min-width: 768px){.dropdown-menu-md-left{right:auto;left:0}.dropdown-menu-md-right{right:0;left:auto}}@media(min-width: 992px){.dropdown-menu-lg-left{right:auto;left:0}.dropdown-menu-lg-right{right:0;left:auto}}@media(min-width: 1200px){.dropdown-menu-xl-left{right:auto;left:0}.dropdown-menu-xl-right{right:0;left:auto}}.dropup .dropdown-menu{top:auto;bottom:100%;margin-top:0;margin-bottom:.125rem}.dropup .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:0;border-right:.3em solid rgba(0,0,0,0);border-bottom:.3em solid;border-left:.3em solid rgba(0,0,0,0)}.dropup .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-menu{top:0;right:auto;left:100%;margin-top:0;margin-left:.125rem}.dropright .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:"";border-top:.3em solid rgba(0,0,0,0);border-right:0;border-bottom:.3em solid rgba(0,0,0,0);border-left:.3em solid}.dropright .dropdown-toggle:empty::after{margin-left:0}.dropright .dropdown-toggle::after{vertical-align:0}.dropleft .dropdown-menu{top:0;right:100%;left:auto;margin-top:0;margin-right:.125rem}.dropleft .dropdown-toggle::after{display:inline-block;margin-left:.255em;vertical-align:.255em;content:""}.dropleft .dropdown-toggle::after{display:none}.dropleft .dropdown-toggle::before{display:inline-block;margin-right:.255em;vertical-align:.255em;content:"";border-top:.3em solid rgba(0,0,0,0);border-right:.3em solid;border-bottom:.3em solid rgba(0,0,0,0)}.dropleft .dropdown-toggle:empty::after{margin-left:0}.dropleft .dropdown-toggle::before{vertical-align:0}.dropdown-menu[x-placement^=bottom],.dropdown-menu[x-placement^=left],.dropdown-menu[x-placement^=right],.dropdown-menu[x-placement^=top]{right:auto;bottom:auto}.dropdown-divider{height:0;margin:.5rem 0;overflow:hidden;border-top:1px solid #e9ecef}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:rgba(0,0,0,0);border:0}.dropdown-item:focus,.dropdown-item:hover{color:#16181b;text-decoration:none;background-color:#e9ecef}.dropdown-item.active,.dropdown-item:active{color:#fff;text-decoration:none;background-color:#007bff}.dropdown-item.disabled,.dropdown-item:disabled{color:#adb5bd;pointer-events:none;background-color:rgba(0,0,0,0)}.dropdown-menu.show{display:block}.dropdown-header{display:block;padding:.5rem 1.5rem;margin-bottom:0;font-size:.875rem;color:#6c757d;white-space:nowrap}.dropdown-item-text{display:block;padding:.25rem 1.5rem;color:#212529}.btn-group,.btn-group-vertical{position:relative;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;-ms-flex:1 1 auto;flex:1 1 auto}.btn-group-vertical>.btn:hover,.btn-group>.btn:hover{z-index:1}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus{z-index:1}.btn-toolbar{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-pack:start;justify-content:flex-start}.btn-toolbar .input-group{width:auto}.btn-group>.btn-group:not(:first-child),.btn-group>.btn:not(:first-child){margin-left:-1px}.btn-group>.btn-group:not(:last-child)>.btn,.btn-group>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:not(:first-child)>.btn,.btn-group>.btn:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.dropdown-toggle-split{padding-right:.5625rem;padding-left:.5625rem}.dropdown-toggle-split::after,.dropright .dropdown-toggle-split::after,.dropup .dropdown-toggle-split::after{margin-left:0}.dropleft .dropdown-toggle-split::before{margin-right:0}.btn-group-sm>.btn+.dropdown-toggle-split,.btn-sm+.dropdown-toggle-split{padding-right:.375rem;padding-left:.375rem}.btn-group-lg>.btn+.dropdown-toggle-split,.btn-lg+.dropdown-toggle-split{padding-right:.75rem;padding-left:.75rem}.btn-group-vertical{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:center;justify-content:center}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group{width:100%}.btn-group-vertical>.btn-group:not(:first-child),.btn-group-vertical>.btn:not(:first-child){margin-top:-1px}.btn-group-vertical>.btn-group:not(:last-child)>.btn,.btn-group-vertical>.btn:not(:last-child):not(.dropdown-toggle){border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:not(:first-child)>.btn,.btn-group-vertical>.btn:not(:first-child){border-top-left-radius:0;border-top-right-radius:0}.btn-group-toggle>.btn,.btn-group-toggle>.btn-group>.btn{margin-bottom:0}.btn-group-toggle>.btn input[type=checkbox],.btn-group-toggle>.btn input[type=radio],.btn-group-toggle>.btn-group>.btn input[type=checkbox],.btn-group-toggle>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0, 0, 0, 0);pointer-events:none}.input-group{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:stretch;align-items:stretch;width:100%}.input-group>.custom-file,.input-group>.custom-select,.input-group>.form-control,.input-group>.form-control-plaintext{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;width:1%;min-width:0;margin-bottom:0}.input-group>.custom-file+.custom-file,.input-group>.custom-file+.custom-select,.input-group>.custom-file+.form-control,.input-group>.custom-select+.custom-file,.input-group>.custom-select+.custom-select,.input-group>.custom-select+.form-control,.input-group>.form-control+.custom-file,.input-group>.form-control+.custom-select,.input-group>.form-control+.form-control,.input-group>.form-control-plaintext+.custom-file,.input-group>.form-control-plaintext+.custom-select,.input-group>.form-control-plaintext+.form-control{margin-left:-1px}.input-group>.custom-file .custom-file-input:focus~.custom-file-label,.input-group>.custom-select:focus,.input-group>.form-control:focus{z-index:3}.input-group>.custom-file .custom-file-input:focus{z-index:4}.input-group>.custom-select:not(:first-child),.input-group>.form-control:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.input-group>.custom-file{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.input-group>.custom-file:not(:last-child) .custom-file-label,.input-group>.custom-file:not(:last-child) .custom-file-label::after{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.custom-file:not(:first-child) .custom-file-label{border-top-left-radius:0;border-bottom-left-radius:0}.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label,.input-group:not(.has-validation)>.custom-file:not(:last-child) .custom-file-label::after,.input-group:not(.has-validation)>.custom-select:not(:last-child),.input-group:not(.has-validation)>.form-control:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label,.input-group.has-validation>.custom-file:nth-last-child(n+3) .custom-file-label::after,.input-group.has-validation>.custom-select:nth-last-child(n+3),.input-group.has-validation>.form-control:nth-last-child(n+3){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-append,.input-group-prepend{display:-ms-flexbox;display:flex}.input-group-append .btn,.input-group-prepend .btn{position:relative;z-index:2}.input-group-append .btn:focus,.input-group-prepend .btn:focus{z-index:3}.input-group-append .btn+.btn,.input-group-append .btn+.input-group-text,.input-group-append .input-group-text+.btn,.input-group-append .input-group-text+.input-group-text,.input-group-prepend .btn+.btn,.input-group-prepend .btn+.input-group-text,.input-group-prepend .input-group-text+.btn,.input-group-prepend .input-group-text+.input-group-text{margin-left:-1px}.input-group-prepend{margin-right:-1px}.input-group-append{margin-left:-1px}.input-group-text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.375rem .75rem;margin-bottom:0;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;text-align:center;white-space:nowrap;background-color:#e9ecef;border:1px solid #ced4da;border-radius:.25rem}.input-group-text input[type=checkbox],.input-group-text input[type=radio]{margin-top:0}.input-group-lg>.custom-select,.input-group-lg>.form-control:not(textarea){height:calc(1.5em + 1rem + 2px)}.input-group-lg>.custom-select,.input-group-lg>.form-control,.input-group-lg>.input-group-append>.btn,.input-group-lg>.input-group-append>.input-group-text,.input-group-lg>.input-group-prepend>.btn,.input-group-lg>.input-group-prepend>.input-group-text{padding:.5rem 1rem;font-size:1.25rem;line-height:1.5;border-radius:.3rem}.input-group-sm>.custom-select,.input-group-sm>.form-control:not(textarea){height:calc(1.5em + .5rem + 2px)}.input-group-sm>.custom-select,.input-group-sm>.form-control,.input-group-sm>.input-group-append>.btn,.input-group-sm>.input-group-append>.input-group-text,.input-group-sm>.input-group-prepend>.btn,.input-group-sm>.input-group-prepend>.input-group-text{padding:.25rem .5rem;font-size:.875rem;line-height:1.5;border-radius:.2rem}.input-group-lg>.custom-select,.input-group-sm>.custom-select{padding-right:1.75rem}.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.btn,.input-group.has-validation>.input-group-append:nth-last-child(n+3)>.input-group-text,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.btn,.input-group:not(.has-validation)>.input-group-append:not(:last-child)>.input-group-text,.input-group>.input-group-append:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group>.input-group-append:last-child>.input-group-text:not(:last-child),.input-group>.input-group-prepend>.btn,.input-group>.input-group-prepend>.input-group-text{border-top-right-radius:0;border-bottom-right-radius:0}.input-group>.input-group-append>.btn,.input-group>.input-group-append>.input-group-text,.input-group>.input-group-prepend:first-child>.btn:not(:first-child),.input-group>.input-group-prepend:first-child>.input-group-text:not(:first-child),.input-group>.input-group-prepend:not(:first-child)>.btn,.input-group>.input-group-prepend:not(:first-child)>.input-group-text{border-top-left-radius:0;border-bottom-left-radius:0}.custom-control{position:relative;z-index:1;display:block;min-height:1.5rem;padding-left:1.5rem;-webkit-print-color-adjust:exact;color-adjust:exact;print-color-adjust:exact}.custom-control-inline{display:-ms-inline-flexbox;display:inline-flex;margin-right:1rem}.custom-control-input{position:absolute;left:0;z-index:-1;width:1rem;height:1.25rem;opacity:0}.custom-control-input:checked~.custom-control-label::before{color:#fff;border-color:#007bff;background-color:#007bff}.custom-control-input:focus~.custom-control-label::before{box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-control-input:focus:not(:checked)~.custom-control-label::before{border-color:#80bdff}.custom-control-input:not(:disabled):active~.custom-control-label::before{color:#fff;background-color:#b3d7ff;border-color:#b3d7ff}.custom-control-input:disabled~.custom-control-label,.custom-control-input[disabled]~.custom-control-label{color:#6c757d}.custom-control-input:disabled~.custom-control-label::before,.custom-control-input[disabled]~.custom-control-label::before{background-color:#e9ecef}.custom-control-label{position:relative;margin-bottom:0;vertical-align:top}.custom-control-label::before{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;pointer-events:none;content:"";background-color:#fff;border:1px solid #adb5bd}.custom-control-label::after{position:absolute;top:.25rem;left:-1.5rem;display:block;width:1rem;height:1rem;content:"";background:50%/50% 50% no-repeat}.custom-checkbox .custom-control-label::before{border-radius:.25rem}.custom-checkbox .custom-control-input:checked~.custom-control-label::after{background-image:url(${x})}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::before{border-color:#007bff;background-color:#007bff}.custom-checkbox .custom-control-input:indeterminate~.custom-control-label::after{background-image:url(${w})}.custom-checkbox .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-checkbox .custom-control-input:disabled:indeterminate~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-radio .custom-control-label::before{border-radius:50%}.custom-radio .custom-control-input:checked~.custom-control-label::after{background-image:url(${S})}.custom-radio .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-switch{padding-left:2.25rem}.custom-switch .custom-control-label::before{left:-2.25rem;width:1.75rem;pointer-events:all;border-radius:.5rem}.custom-switch .custom-control-label::after{top:calc(.25rem + 2px);left:calc(-2.25rem + 2px);width:calc(1rem - 4px);height:calc(1rem - 4px);background-color:#adb5bd;border-radius:.5rem;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:transform .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-transform .15s ease-in-out}@media(prefers-reduced-motion: reduce){.custom-switch .custom-control-label::after{transition:none}}.custom-switch .custom-control-input:checked~.custom-control-label::after{background-color:#fff;-webkit-transform:translateX(0.75rem);transform:translateX(0.75rem)}.custom-switch .custom-control-input:disabled:checked~.custom-control-label::before{background-color:rgba(0,123,255,.5)}.custom-select{display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);padding:.375rem 1.75rem .375rem .75rem;font-size:1rem;font-weight:400;line-height:1.5;color:#495057;vertical-align:middle;background:#fff url(${_}) right .75rem center/8px 10px no-repeat;border:1px solid #ced4da;border-radius:.25rem;-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-select:focus::-ms-value{color:#495057;background-color:#fff}.custom-select[multiple],.custom-select[size]:not([size="1"]){height:auto;padding-right:.75rem;background-image:none}.custom-select:disabled{color:#6c757d;background-color:#e9ecef}.custom-select::-ms-expand{display:none}.custom-select:-moz-focusring{color:rgba(0,0,0,0);text-shadow:0 0 0 #495057}.custom-select-sm{height:calc(1.5em + .5rem + 2px);padding-top:.25rem;padding-bottom:.25rem;padding-left:.5rem;font-size:.875rem}.custom-select-lg{height:calc(1.5em + 1rem + 2px);padding-top:.5rem;padding-bottom:.5rem;padding-left:1rem;font-size:1.25rem}.custom-file{position:relative;display:inline-block;width:100%;height:calc(1.5em + .75rem + 2px);margin-bottom:0}.custom-file-input{position:relative;z-index:2;width:100%;height:calc(1.5em + .75rem + 2px);margin:0;overflow:hidden;opacity:0}.custom-file-input:focus~.custom-file-label{border-color:#80bdff;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.custom-file-input:disabled~.custom-file-label,.custom-file-input[disabled]~.custom-file-label{background-color:#e9ecef}.custom-file-input:lang(en)~.custom-file-label::after{content:"Browse"}.custom-file-input~.custom-file-label[data-browse]::after{content:attr(data-browse)}.custom-file-label{position:absolute;top:0;right:0;left:0;z-index:1;height:calc(1.5em + .75rem + 2px);padding:.375rem .75rem;overflow:hidden;font-weight:400;line-height:1.5;color:#495057;background-color:#fff;border:1px solid #ced4da;border-radius:.25rem}.custom-file-label::after{position:absolute;top:0;right:0;bottom:0;z-index:3;display:block;height:calc(1.5em + .75rem);padding:.375rem .75rem;line-height:1.5;color:#495057;content:"Browse";background-color:#e9ecef;border-left:inherit;border-radius:0 .25rem .25rem 0}.custom-range{width:100%;height:1.4rem;padding:0;background-color:rgba(0,0,0,0);-webkit-appearance:none;-moz-appearance:none;appearance:none}.custom-range:focus{outline:0}.custom-range:focus::-webkit-slider-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-moz-range-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range:focus::-ms-thumb{box-shadow:0 0 0 1px #fff,0 0 0 .2rem rgba(0,123,255,.25)}.custom-range::-moz-focus-outer{border:0}.custom-range::-webkit-slider-thumb{width:1rem;height:1rem;margin-top:-0.25rem;background-color:#007bff;border:0;border-radius:1rem;-webkit-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.custom-range::-webkit-slider-thumb{-webkit-transition:none;transition:none}}.custom-range::-webkit-slider-thumb:active{background-color:#b3d7ff}.custom-range::-webkit-slider-runnable-track{width:100%;height:.5rem;color:rgba(0,0,0,0);cursor:pointer;background-color:#dee2e6;border-color:rgba(0,0,0,0);border-radius:1rem}.custom-range::-moz-range-thumb{width:1rem;height:1rem;background-color:#007bff;border:0;border-radius:1rem;-moz-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;-moz-appearance:none;appearance:none}@media(prefers-reduced-motion: reduce){.custom-range::-moz-range-thumb{-moz-transition:none;transition:none}}.custom-range::-moz-range-thumb:active{background-color:#b3d7ff}.custom-range::-moz-range-track{width:100%;height:.5rem;color:rgba(0,0,0,0);cursor:pointer;background-color:#dee2e6;border-color:rgba(0,0,0,0);border-radius:1rem}.custom-range::-ms-thumb{width:1rem;height:1rem;margin-top:0;margin-right:.2rem;margin-left:.2rem;background-color:#007bff;border:0;border-radius:1rem;-ms-transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;appearance:none}@media(prefers-reduced-motion: reduce){.custom-range::-ms-thumb{-ms-transition:none;transition:none}}.custom-range::-ms-thumb:active{background-color:#b3d7ff}.custom-range::-ms-track{width:100%;height:.5rem;color:rgba(0,0,0,0);cursor:pointer;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0);border-width:.5rem}.custom-range::-ms-fill-lower{background-color:#dee2e6;border-radius:1rem}.custom-range::-ms-fill-upper{margin-right:15px;background-color:#dee2e6;border-radius:1rem}.custom-range:disabled::-webkit-slider-thumb{background-color:#adb5bd}.custom-range:disabled::-webkit-slider-runnable-track{cursor:default}.custom-range:disabled::-moz-range-thumb{background-color:#adb5bd}.custom-range:disabled::-moz-range-track{cursor:default}.custom-range:disabled::-ms-thumb{background-color:#adb5bd}.custom-control-label::before,.custom-file-label,.custom-select{transition:background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.custom-control-label::before,.custom-file-label,.custom-select{transition:none}}.nav{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding-left:0;margin-bottom:0;list-style:none}.nav-link{display:block;padding:.5rem 1rem}.nav-link:focus,.nav-link:hover{text-decoration:none}.nav-link.disabled{color:#6c757d;pointer-events:none;cursor:default}.nav-tabs{border-bottom:1px solid #dee2e6}.nav-tabs .nav-link{margin-bottom:-1px;background-color:rgba(0,0,0,0);border:1px solid rgba(0,0,0,0);border-top-left-radius:.25rem;border-top-right-radius:.25rem}.nav-tabs .nav-link:focus,.nav-tabs .nav-link:hover{isolation:isolate;border-color:#e9ecef #e9ecef #dee2e6}.nav-tabs .nav-link.disabled{color:#6c757d;background-color:rgba(0,0,0,0);border-color:rgba(0,0,0,0)}.nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active{color:#495057;background-color:#fff;border-color:#dee2e6 #dee2e6 #fff}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.nav-pills .nav-link{background:0 0;border:0;border-radius:.25rem}.nav-pills .nav-link.active,.nav-pills .show>.nav-link{color:#fff;background-color:#007bff}.nav-fill .nav-item,.nav-fill>.nav-link{-ms-flex:1 1 auto;flex:1 1 auto;text-align:center}.nav-justified .nav-item,.nav-justified>.nav-link{-ms-flex-preferred-size:0;flex-basis:0;-ms-flex-positive:1;flex-grow:1;text-align:center}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.navbar{position:relative;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;padding:.5rem 1rem}.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.navbar-brand{display:inline-block;padding-top:.3125rem;padding-bottom:.3125rem;margin-right:1rem;font-size:1.25rem;line-height:inherit;white-space:nowrap}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-nav{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;list-style:none}.navbar-nav .nav-link{padding-right:0;padding-left:0}.navbar-nav .dropdown-menu{position:static;float:none}.navbar-text{display:inline-block;padding-top:.5rem;padding-bottom:.5rem}.navbar-collapse{-ms-flex-preferred-size:100%;flex-basis:100%;-ms-flex-positive:1;flex-grow:1;-ms-flex-align:center;align-items:center}.navbar-toggler{padding:.25rem .75rem;font-size:1.25rem;line-height:1;background-color:rgba(0,0,0,0);border:1px solid rgba(0,0,0,0);border-radius:.25rem}.navbar-toggler:focus,.navbar-toggler:hover{text-decoration:none}.navbar-toggler-icon{display:inline-block;width:1.5em;height:1.5em;vertical-align:middle;content:"";background:50%/100% 100% no-repeat}.navbar-nav-scroll{max-height:75vh;overflow-y:auto}@media(max-width: 575.98px){.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 576px){.navbar-expand-sm{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-sm .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-sm .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-sm .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-sm>.container,.navbar-expand-sm>.container-fluid,.navbar-expand-sm>.container-lg,.navbar-expand-sm>.container-md,.navbar-expand-sm>.container-sm,.navbar-expand-sm>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-sm .navbar-nav-scroll{overflow:visible}.navbar-expand-sm .navbar-collapse{display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-sm .navbar-toggler{display:none}}@media(max-width: 767.98px){.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 768px){.navbar-expand-md{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-md .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-md .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-md .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-md>.container,.navbar-expand-md>.container-fluid,.navbar-expand-md>.container-lg,.navbar-expand-md>.container-md,.navbar-expand-md>.container-sm,.navbar-expand-md>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-md .navbar-nav-scroll{overflow:visible}.navbar-expand-md .navbar-collapse{display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-md .navbar-toggler{display:none}}@media(max-width: 991.98px){.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 992px){.navbar-expand-lg{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-lg .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-lg .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-lg .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-lg>.container,.navbar-expand-lg>.container-fluid,.navbar-expand-lg>.container-lg,.navbar-expand-lg>.container-md,.navbar-expand-lg>.container-sm,.navbar-expand-lg>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-lg .navbar-nav-scroll{overflow:visible}.navbar-expand-lg .navbar-collapse{display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-lg .navbar-toggler{display:none}}@media(max-width: 1199.98px){.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{padding-right:0;padding-left:0}}@media(min-width: 1200px){.navbar-expand-xl{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand-xl .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand-xl .navbar-nav .dropdown-menu{position:absolute}.navbar-expand-xl .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand-xl>.container,.navbar-expand-xl>.container-fluid,.navbar-expand-xl>.container-lg,.navbar-expand-xl>.container-md,.navbar-expand-xl>.container-sm,.navbar-expand-xl>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand-xl .navbar-nav-scroll{overflow:visible}.navbar-expand-xl .navbar-collapse{display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand-xl .navbar-toggler{display:none}}.navbar-expand{-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:start;justify-content:flex-start}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{padding-right:0;padding-left:0}.navbar-expand .navbar-nav{-ms-flex-direction:row;flex-direction:row}.navbar-expand .navbar-nav .dropdown-menu{position:absolute}.navbar-expand .navbar-nav .nav-link{padding-right:.5rem;padding-left:.5rem}.navbar-expand>.container,.navbar-expand>.container-fluid,.navbar-expand>.container-lg,.navbar-expand>.container-md,.navbar-expand>.container-sm,.navbar-expand>.container-xl{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.navbar-expand .navbar-nav-scroll{overflow:visible}.navbar-expand .navbar-collapse{display:-ms-flexbox !important;display:flex !important;-ms-flex-preferred-size:auto;flex-basis:auto}.navbar-expand .navbar-toggler{display:none}.navbar-light .navbar-brand{color:rgba(0,0,0,.9)}.navbar-light .navbar-brand:focus,.navbar-light .navbar-brand:hover{color:rgba(0,0,0,.9)}.navbar-light .navbar-nav .nav-link{color:rgba(0,0,0,.5)}.navbar-light .navbar-nav .nav-link:focus,.navbar-light .navbar-nav .nav-link:hover{color:rgba(0,0,0,.7)}.navbar-light .navbar-nav .nav-link.disabled{color:rgba(0,0,0,.3)}.navbar-light .navbar-nav .active>.nav-link,.navbar-light .navbar-nav .nav-link.active,.navbar-light .navbar-nav .nav-link.show,.navbar-light .navbar-nav .show>.nav-link{color:rgba(0,0,0,.9)}.navbar-light .navbar-toggler{color:rgba(0,0,0,.5);border-color:rgba(0,0,0,.1)}.navbar-light .navbar-toggler-icon{background-image:url(${k})}.navbar-light .navbar-text{color:rgba(0,0,0,.5)}.navbar-light .navbar-text a{color:rgba(0,0,0,.9)}.navbar-light .navbar-text a:focus,.navbar-light .navbar-text a:hover{color:rgba(0,0,0,.9)}.navbar-dark .navbar-brand{color:#fff}.navbar-dark .navbar-brand:focus,.navbar-dark .navbar-brand:hover{color:#fff}.navbar-dark .navbar-nav .nav-link{color:rgba(255,255,255,.5)}.navbar-dark .navbar-nav .nav-link:focus,.navbar-dark .navbar-nav .nav-link:hover{color:rgba(255,255,255,.75)}.navbar-dark .navbar-nav .nav-link.disabled{color:rgba(255,255,255,.25)}.navbar-dark .navbar-nav .active>.nav-link,.navbar-dark .navbar-nav .nav-link.active,.navbar-dark .navbar-nav .nav-link.show,.navbar-dark .navbar-nav .show>.nav-link{color:#fff}.navbar-dark .navbar-toggler{color:rgba(255,255,255,.5);border-color:rgba(255,255,255,.1)}.navbar-dark .navbar-toggler-icon{background-image:url(${A})}.navbar-dark .navbar-text{color:rgba(255,255,255,.5)}.navbar-dark .navbar-text a{color:#fff}.navbar-dark .navbar-text a:focus,.navbar-dark .navbar-text a:hover{color:#fff}.card{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-width:0;word-wrap:break-word;background-color:#fff;background-clip:border-box;border:1px solid rgba(0,0,0,.125);border-radius:.25rem}.card>hr{margin-right:0;margin-left:0}.card>.list-group{border-top:inherit;border-bottom:inherit}.card>.list-group:first-child{border-top-width:0;border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card>.list-group:last-child{border-bottom-width:0;border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card>.card-header+.list-group,.card>.list-group+.card-footer{border-top:0}.card-body{-ms-flex:1 1 auto;flex:1 1 auto;min-height:1px;padding:1.25rem}.card-title{margin-bottom:.75rem}.card-subtitle{margin-top:-0.375rem;margin-bottom:0}.card-text:last-child{margin-bottom:0}.card-link:hover{text-decoration:none}.card-link+.card-link{margin-left:1.25rem}.card-header{padding:.75rem 1.25rem;margin-bottom:0;background-color:rgba(0,0,0,.03);border-bottom:1px solid rgba(0,0,0,.125)}.card-header:first-child{border-radius:calc(.25rem - 1px) calc(.25rem - 1px) 0 0}.card-footer{padding:.75rem 1.25rem;background-color:rgba(0,0,0,.03);border-top:1px solid rgba(0,0,0,.125)}.card-footer:last-child{border-radius:0 0 calc(.25rem - 1px) calc(.25rem - 1px)}.card-header-tabs{margin-right:-0.625rem;margin-bottom:-0.75rem;margin-left:-0.625rem;border-bottom:0}.card-header-pills{margin-right:-0.625rem;margin-left:-0.625rem}.card-img-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:1.25rem;border-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom,.card-img-top{-ms-flex-negative:0;flex-shrink:0;width:100%}.card-img,.card-img-top{border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.card-img,.card-img-bottom{border-bottom-right-radius:calc(.25rem - 1px);border-bottom-left-radius:calc(.25rem - 1px)}.card-deck .card{margin-bottom:15px}@media(min-width: 576px){.card-deck{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap;margin-right:-15px;margin-left:-15px}.card-deck .card{-ms-flex:1 0 0%;flex:1 0 0%;margin-right:15px;margin-bottom:0;margin-left:15px}}.card-group>.card{margin-bottom:15px}@media(min-width: 576px){.card-group{display:-ms-flexbox;display:flex;-ms-flex-flow:row wrap;flex-flow:row wrap}.card-group>.card{-ms-flex:1 0 0%;flex:1 0 0%;margin-bottom:0}.card-group>.card+.card{margin-left:0;border-left:0}.card-group>.card:not(:last-child){border-top-right-radius:0;border-bottom-right-radius:0}.card-group>.card:not(:last-child) .card-header,.card-group>.card:not(:last-child) .card-img-top{border-top-right-radius:0}.card-group>.card:not(:last-child) .card-footer,.card-group>.card:not(:last-child) .card-img-bottom{border-bottom-right-radius:0}.card-group>.card:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.card-group>.card:not(:first-child) .card-header,.card-group>.card:not(:first-child) .card-img-top{border-top-left-radius:0}.card-group>.card:not(:first-child) .card-footer,.card-group>.card:not(:first-child) .card-img-bottom{border-bottom-left-radius:0}}.card-columns .card{margin-bottom:.75rem}@media(min-width: 576px){.card-columns{-webkit-column-count:3;-moz-column-count:3;column-count:3;-webkit-column-gap:1.25rem;-moz-column-gap:1.25rem;column-gap:1.25rem;orphans:1;widows:1}.card-columns .card{display:inline-block;width:100%}}.accordion{overflow-anchor:none}.accordion>.card{overflow:hidden}.accordion>.card:not(:last-of-type){border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.accordion>.card:not(:first-of-type){border-top-left-radius:0;border-top-right-radius:0}.accordion>.card>.card-header{border-radius:0;margin-bottom:-1px}.breadcrumb{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:.75rem 1rem;margin-bottom:1rem;list-style:none;background-color:#e9ecef;border-radius:.25rem}.breadcrumb-item+.breadcrumb-item{padding-left:.5rem}.breadcrumb-item+.breadcrumb-item::before{float:left;padding-right:.5rem;color:#6c757d;content:"/"}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:underline}.breadcrumb-item+.breadcrumb-item:hover::before{text-decoration:none}.breadcrumb-item.active{color:#6c757d}.pagination{display:-ms-flexbox;display:flex;padding-left:0;list-style:none;border-radius:.25rem}.page-link{position:relative;display:block;padding:.5rem .75rem;margin-left:-1px;line-height:1.25;color:#007bff;background-color:#fff;border:1px solid #dee2e6}.page-link:hover{z-index:2;color:#0056b3;text-decoration:none;background-color:#e9ecef;border-color:#dee2e6}.page-link:focus{z-index:3;outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.25)}.page-item:first-child .page-link{margin-left:0;border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.page-item:last-child .page-link{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.page-item.active .page-link{z-index:3;color:#fff;background-color:#007bff;border-color:#007bff}.page-item.disabled .page-link{color:#6c757d;pointer-events:none;cursor:auto;background-color:#fff;border-color:#dee2e6}.pagination-lg .page-link{padding:.75rem 1.5rem;font-size:1.25rem;line-height:1.5}.pagination-lg .page-item:first-child .page-link{border-top-left-radius:.3rem;border-bottom-left-radius:.3rem}.pagination-lg .page-item:last-child .page-link{border-top-right-radius:.3rem;border-bottom-right-radius:.3rem}.pagination-sm .page-link{padding:.25rem .5rem;font-size:.875rem;line-height:1.5}.pagination-sm .page-item:first-child .page-link{border-top-left-radius:.2rem;border-bottom-left-radius:.2rem}.pagination-sm .page-item:last-child .page-link{border-top-right-radius:.2rem;border-bottom-right-radius:.2rem}.badge{display:inline-block;padding:.25em .4em;font-size:75%;font-weight:700;line-height:1;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25rem;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out}@media(prefers-reduced-motion: reduce){.badge{transition:none}}a.badge:focus,a.badge:hover{text-decoration:none}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.badge-pill{padding-right:.6em;padding-left:.6em;border-radius:10rem}.badge-primary{color:#fff;background-color:#007bff}a.badge-primary:focus,a.badge-primary:hover{color:#fff;background-color:#0062cc}a.badge-primary.focus,a.badge-primary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(0,123,255,.5)}.badge-secondary{color:#fff;background-color:#6c757d}a.badge-secondary:focus,a.badge-secondary:hover{color:#fff;background-color:#545b62}a.badge-secondary.focus,a.badge-secondary:focus{outline:0;box-shadow:0 0 0 .2rem rgba(108,117,125,.5)}.badge-success{color:#fff;background-color:#28a745}a.badge-success:focus,a.badge-success:hover{color:#fff;background-color:#1e7e34}a.badge-success.focus,a.badge-success:focus{outline:0;box-shadow:0 0 0 .2rem rgba(40,167,69,.5)}.badge-info{color:#fff;background-color:#17a2b8}a.badge-info:focus,a.badge-info:hover{color:#fff;background-color:#117a8b}a.badge-info.focus,a.badge-info:focus{outline:0;box-shadow:0 0 0 .2rem rgba(23,162,184,.5)}.badge-warning{color:#212529;background-color:#ffc107}a.badge-warning:focus,a.badge-warning:hover{color:#212529;background-color:#d39e00}a.badge-warning.focus,a.badge-warning:focus{outline:0;box-shadow:0 0 0 .2rem rgba(255,193,7,.5)}.badge-danger{color:#fff;background-color:#dc3545}a.badge-danger:focus,a.badge-danger:hover{color:#fff;background-color:#bd2130}a.badge-danger.focus,a.badge-danger:focus{outline:0;box-shadow:0 0 0 .2rem rgba(220,53,69,.5)}.badge-light{color:#212529;background-color:#f8f9fa}a.badge-light:focus,a.badge-light:hover{color:#212529;background-color:#dae0e5}a.badge-light.focus,a.badge-light:focus{outline:0;box-shadow:0 0 0 .2rem rgba(248,249,250,.5)}.badge-dark{color:#fff;background-color:#343a40}a.badge-dark:focus,a.badge-dark:hover{color:#fff;background-color:#1d2124}a.badge-dark.focus,a.badge-dark:focus{outline:0;box-shadow:0 0 0 .2rem rgba(52,58,64,.5)}.jumbotron{padding:2rem 1rem;margin-bottom:2rem;background-color:#e9ecef;border-radius:.3rem}@media(min-width: 576px){.jumbotron{padding:4rem 2rem}}.jumbotron-fluid{padding-right:0;padding-left:0;border-radius:0}.alert{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border:1px solid rgba(0,0,0,0);border-radius:.25rem}.alert-heading{color:inherit}.alert-link{font-weight:700}.alert-dismissible{padding-right:4rem}.alert-dismissible .close{position:absolute;top:0;right:0;z-index:2;padding:.75rem 1.25rem;color:inherit}.alert-primary{color:#004085;background-color:#cce5ff;border-color:#b8daff}.alert-primary hr{border-top-color:#9fcdff}.alert-primary .alert-link{color:#002752}.alert-secondary{color:#383d41;background-color:#e2e3e5;border-color:#d6d8db}.alert-secondary hr{border-top-color:#c8cbcf}.alert-secondary .alert-link{color:#202326}.alert-success{color:#155724;background-color:#d4edda;border-color:#c3e6cb}.alert-success hr{border-top-color:#b1dfbb}.alert-success .alert-link{color:#0b2e13}.alert-info{color:#0c5460;background-color:#d1ecf1;border-color:#bee5eb}.alert-info hr{border-top-color:#abdde5}.alert-info .alert-link{color:#062c33}.alert-warning{color:#856404;background-color:#fff3cd;border-color:#ffeeba}.alert-warning hr{border-top-color:#ffe8a1}.alert-warning .alert-link{color:#533f03}.alert-danger{color:#721c24;background-color:#f8d7da;border-color:#f5c6cb}.alert-danger hr{border-top-color:#f1b0b7}.alert-danger .alert-link{color:#491217}.alert-light{color:#818182;background-color:#fefefe;border-color:#fdfdfe}.alert-light hr{border-top-color:#ececf6}.alert-light .alert-link{color:#686868}.alert-dark{color:#1b1e21;background-color:#d6d8d9;border-color:#c6c8ca}.alert-dark hr{border-top-color:#b9bbbe}.alert-dark .alert-link{color:#040505}@-webkit-keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:1rem 0}to{background-position:0 0}}.progress{display:-ms-flexbox;display:flex;height:1rem;overflow:hidden;line-height:0;font-size:.75rem;background-color:#e9ecef;border-radius:.25rem}.progress-bar{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden;color:#fff;text-align:center;white-space:nowrap;background-color:#007bff;transition:width .6s ease}@media(prefers-reduced-motion: reduce){.progress-bar{transition:none}}.progress-bar-striped{background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-size:1rem 1rem}.progress-bar-animated{-webkit-animation:1s linear infinite progress-bar-stripes;animation:1s linear infinite progress-bar-stripes}@media(prefers-reduced-motion: reduce){.progress-bar-animated{-webkit-animation:none;animation:none}}.media{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.media-body{-ms-flex:1;flex:1}.list-group{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding-left:0;margin-bottom:0;border-radius:.25rem}.list-group-item-action{width:100%;color:#495057;text-align:inherit}.list-group-item-action:focus,.list-group-item-action:hover{z-index:1;color:#495057;text-decoration:none;background-color:#f8f9fa}.list-group-item-action:active{color:#212529;background-color:#e9ecef}.list-group-item{position:relative;display:block;padding:.75rem 1.25rem;background-color:#fff;border:1px solid rgba(0,0,0,.125)}.list-group-item:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.list-group-item:last-child{border-bottom-right-radius:inherit;border-bottom-left-radius:inherit}.list-group-item.disabled,.list-group-item:disabled{color:#6c757d;pointer-events:none;background-color:#fff}.list-group-item.active{z-index:2;color:#fff;background-color:#007bff;border-color:#007bff}.list-group-item+.list-group-item{border-top-width:0}.list-group-item+.list-group-item.active{margin-top:-1px;border-top-width:1px}.list-group-horizontal{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal>.list-group-item.active{margin-top:0}.list-group-horizontal>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}@media(min-width: 576px){.list-group-horizontal-sm{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-sm>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-sm>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-sm>.list-group-item.active{margin-top:0}.list-group-horizontal-sm>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-sm>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media(min-width: 768px){.list-group-horizontal-md{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-md>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-md>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-md>.list-group-item.active{margin-top:0}.list-group-horizontal-md>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-md>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media(min-width: 992px){.list-group-horizontal-lg{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-lg>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-lg>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-lg>.list-group-item.active{margin-top:0}.list-group-horizontal-lg>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-lg>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}@media(min-width: 1200px){.list-group-horizontal-xl{-ms-flex-direction:row;flex-direction:row}.list-group-horizontal-xl>.list-group-item:first-child{border-bottom-left-radius:.25rem;border-top-right-radius:0}.list-group-horizontal-xl>.list-group-item:last-child{border-top-right-radius:.25rem;border-bottom-left-radius:0}.list-group-horizontal-xl>.list-group-item.active{margin-top:0}.list-group-horizontal-xl>.list-group-item+.list-group-item{border-top-width:1px;border-left-width:0}.list-group-horizontal-xl>.list-group-item+.list-group-item.active{margin-left:-1px;border-left-width:1px}}.list-group-flush{border-radius:0}.list-group-flush>.list-group-item{border-width:0 0 1px}.list-group-flush>.list-group-item:last-child{border-bottom-width:0}.list-group-item-primary{color:#004085;background-color:#b8daff}.list-group-item-primary.list-group-item-action:focus,.list-group-item-primary.list-group-item-action:hover{color:#004085;background-color:#9fcdff}.list-group-item-primary.list-group-item-action.active{color:#fff;background-color:#004085;border-color:#004085}.list-group-item-secondary{color:#383d41;background-color:#d6d8db}.list-group-item-secondary.list-group-item-action:focus,.list-group-item-secondary.list-group-item-action:hover{color:#383d41;background-color:#c8cbcf}.list-group-item-secondary.list-group-item-action.active{color:#fff;background-color:#383d41;border-color:#383d41}.list-group-item-success{color:#155724;background-color:#c3e6cb}.list-group-item-success.list-group-item-action:focus,.list-group-item-success.list-group-item-action:hover{color:#155724;background-color:#b1dfbb}.list-group-item-success.list-group-item-action.active{color:#fff;background-color:#155724;border-color:#155724}.list-group-item-info{color:#0c5460;background-color:#bee5eb}.list-group-item-info.list-group-item-action:focus,.list-group-item-info.list-group-item-action:hover{color:#0c5460;background-color:#abdde5}.list-group-item-info.list-group-item-action.active{color:#fff;background-color:#0c5460;border-color:#0c5460}.list-group-item-warning{color:#856404;background-color:#ffeeba}.list-group-item-warning.list-group-item-action:focus,.list-group-item-warning.list-group-item-action:hover{color:#856404;background-color:#ffe8a1}.list-group-item-warning.list-group-item-action.active{color:#fff;background-color:#856404;border-color:#856404}.list-group-item-danger{color:#721c24;background-color:#f5c6cb}.list-group-item-danger.list-group-item-action:focus,.list-group-item-danger.list-group-item-action:hover{color:#721c24;background-color:#f1b0b7}.list-group-item-danger.list-group-item-action.active{color:#fff;background-color:#721c24;border-color:#721c24}.list-group-item-light{color:#818182;background-color:#fdfdfe}.list-group-item-light.list-group-item-action:focus,.list-group-item-light.list-group-item-action:hover{color:#818182;background-color:#ececf6}.list-group-item-light.list-group-item-action.active{color:#fff;background-color:#818182;border-color:#818182}.list-group-item-dark{color:#1b1e21;background-color:#c6c8ca}.list-group-item-dark.list-group-item-action:focus,.list-group-item-dark.list-group-item-action:hover{color:#1b1e21;background-color:#b9bbbe}.list-group-item-dark.list-group-item-action.active{color:#fff;background-color:#1b1e21;border-color:#1b1e21}.close{float:right;font-size:1.5rem;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.5}.close:hover{color:#000;text-decoration:none}.close:not(:disabled):not(.disabled):focus,.close:not(:disabled):not(.disabled):hover{opacity:.75}button.close{padding:0;background-color:rgba(0,0,0,0);border:0}a.close.disabled{pointer-events:none}.toast{-ms-flex-preferred-size:350px;flex-basis:350px;max-width:350px;font-size:.875rem;background-color:rgba(255,255,255,.85);background-clip:padding-box;border:1px solid rgba(0,0,0,.1);box-shadow:0 .25rem .75rem rgba(0,0,0,.1);opacity:0;border-radius:.25rem}.toast:not(:last-child){margin-bottom:.75rem}.toast.showing{opacity:1}.toast.show{display:block;opacity:1}.toast.hide{display:none}.toast-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:.25rem .75rem;color:#6c757d;background-color:rgba(255,255,255,.85);background-clip:padding-box;border-bottom:1px solid rgba(0,0,0,.05);border-top-left-radius:calc(.25rem - 1px);border-top-right-radius:calc(.25rem - 1px)}.toast-body{padding:.75rem}.modal-open{overflow:hidden}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal{position:fixed;top:0;left:0;z-index:1050;display:none;width:100%;height:100%;overflow:hidden;outline:0}.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}.modal.fade .modal-dialog{transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;transition:transform .3s ease-out,-webkit-transform .3s ease-out;-webkit-transform:translate(0, -50px);transform:translate(0, -50px)}@media(prefers-reduced-motion: reduce){.modal.fade .modal-dialog{transition:none}}.modal.show .modal-dialog{-webkit-transform:none;transform:none}.modal.modal-static .modal-dialog{-webkit-transform:scale(1.02);transform:scale(1.02)}.modal-dialog-scrollable{display:-ms-flexbox;display:flex;max-height:calc(100% - 1rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 1rem);overflow:hidden}.modal-dialog-scrollable .modal-footer,.modal-dialog-scrollable .modal-header{-ms-flex-negative:0;flex-shrink:0}.modal-dialog-scrollable .modal-body{overflow-y:auto}.modal-dialog-centered{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;min-height:calc(100% - 1rem)}.modal-dialog-centered::before{display:block;height:calc(100vh - 1rem);height:-webkit-min-content;height:-moz-min-content;height:min-content;content:""}.modal-dialog-centered.modal-dialog-scrollable{-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;height:100%}.modal-dialog-centered.modal-dialog-scrollable .modal-content{max-height:none}.modal-dialog-centered.modal-dialog-scrollable::before{content:none}.modal-content{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}.modal-backdrop{position:fixed;top:0;left:0;z-index:1040;width:100vw;height:100vh;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop.show{opacity:.5}.modal-header{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start;-ms-flex-pack:justify;justify-content:space-between;padding:1rem 1rem;border-bottom:1px solid #dee2e6;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.modal-header .close{padding:1rem 1rem;margin:-1rem -1rem -1rem auto}.modal-title{margin-bottom:0;line-height:1.5}.modal-body{position:relative;-ms-flex:1 1 auto;flex:1 1 auto;padding:1rem}.modal-footer{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;padding:.75rem;border-top:1px solid #dee2e6;border-bottom-right-radius:calc(.3rem - 1px);border-bottom-left-radius:calc(.3rem - 1px)}.modal-footer>*{margin:.25rem}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media(min-width: 576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-scrollable{max-height:calc(100% - 3.5rem)}.modal-dialog-scrollable .modal-content{max-height:calc(100vh - 3.5rem)}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}.modal-dialog-centered::before{height:calc(100vh - 3.5rem);height:-webkit-min-content;height:-moz-min-content;height:min-content}.modal-sm{max-width:300px}}@media(min-width: 992px){.modal-lg,.modal-xl{max-width:800px}}@media(min-width: 1200px){.modal-xl{max-width:1140px}}.tooltip{position:absolute;z-index:1070;display:block;margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;opacity:0}.tooltip.show{opacity:.9}.tooltip .arrow{position:absolute;display:block;width:.8rem;height:.4rem}.tooltip .arrow::before{position:absolute;content:"";border-color:rgba(0,0,0,0);border-style:solid}.bs-tooltip-auto[x-placement^=top],.bs-tooltip-top{padding:.4rem 0}.bs-tooltip-auto[x-placement^=top] .arrow,.bs-tooltip-top .arrow{bottom:0}.bs-tooltip-auto[x-placement^=top] .arrow::before,.bs-tooltip-top .arrow::before{top:0;border-width:.4rem .4rem 0;border-top-color:#000}.bs-tooltip-auto[x-placement^=right],.bs-tooltip-right{padding:0 .4rem}.bs-tooltip-auto[x-placement^=right] .arrow,.bs-tooltip-right .arrow{left:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=right] .arrow::before,.bs-tooltip-right .arrow::before{right:0;border-width:.4rem .4rem .4rem 0;border-right-color:#000}.bs-tooltip-auto[x-placement^=bottom],.bs-tooltip-bottom{padding:.4rem 0}.bs-tooltip-auto[x-placement^=bottom] .arrow,.bs-tooltip-bottom .arrow{top:0}.bs-tooltip-auto[x-placement^=bottom] .arrow::before,.bs-tooltip-bottom .arrow::before{bottom:0;border-width:0 .4rem .4rem;border-bottom-color:#000}.bs-tooltip-auto[x-placement^=left],.bs-tooltip-left{padding:0 .4rem}.bs-tooltip-auto[x-placement^=left] .arrow,.bs-tooltip-left .arrow{right:0;width:.4rem;height:.8rem}.bs-tooltip-auto[x-placement^=left] .arrow::before,.bs-tooltip-left .arrow::before{left:0;border-width:.4rem 0 .4rem .4rem;border-left-color:#000}.tooltip-inner{max-width:200px;padding:.25rem .5rem;color:#fff;text-align:center;background-color:#000;border-radius:.25rem}.popover{position:absolute;top:0;left:0;z-index:1060;display:block;max-width:276px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-style:normal;font-weight:400;line-height:1.5;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;white-space:normal;word-spacing:normal;line-break:auto;font-size:.875rem;word-wrap:break-word;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem}.popover .arrow{position:absolute;display:block;width:1rem;height:.5rem;margin:0 .3rem}.popover .arrow::after,.popover .arrow::before{position:absolute;display:block;content:"";border-color:rgba(0,0,0,0);border-style:solid}.bs-popover-auto[x-placement^=top],.bs-popover-top{margin-bottom:.5rem}.bs-popover-auto[x-placement^=top]>.arrow,.bs-popover-top>.arrow{bottom:calc(-0.5rem - 1px)}.bs-popover-auto[x-placement^=top]>.arrow::before,.bs-popover-top>.arrow::before{bottom:0;border-width:.5rem .5rem 0;border-top-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=top]>.arrow::after,.bs-popover-top>.arrow::after{bottom:1px;border-width:.5rem .5rem 0;border-top-color:#fff}.bs-popover-auto[x-placement^=right],.bs-popover-right{margin-left:.5rem}.bs-popover-auto[x-placement^=right]>.arrow,.bs-popover-right>.arrow{left:calc(-0.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=right]>.arrow::before,.bs-popover-right>.arrow::before{left:0;border-width:.5rem .5rem .5rem 0;border-right-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=right]>.arrow::after,.bs-popover-right>.arrow::after{left:1px;border-width:.5rem .5rem .5rem 0;border-right-color:#fff}.bs-popover-auto[x-placement^=bottom],.bs-popover-bottom{margin-top:.5rem}.bs-popover-auto[x-placement^=bottom]>.arrow,.bs-popover-bottom>.arrow{top:calc(-0.5rem - 1px)}.bs-popover-auto[x-placement^=bottom]>.arrow::before,.bs-popover-bottom>.arrow::before{top:0;border-width:0 .5rem .5rem .5rem;border-bottom-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=bottom]>.arrow::after,.bs-popover-bottom>.arrow::after{top:1px;border-width:0 .5rem .5rem .5rem;border-bottom-color:#fff}.bs-popover-auto[x-placement^=bottom] .popover-header::before,.bs-popover-bottom .popover-header::before{position:absolute;top:0;left:50%;display:block;width:1rem;margin-left:-0.5rem;content:"";border-bottom:1px solid #f7f7f7}.bs-popover-auto[x-placement^=left],.bs-popover-left{margin-right:.5rem}.bs-popover-auto[x-placement^=left]>.arrow,.bs-popover-left>.arrow{right:calc(-0.5rem - 1px);width:.5rem;height:1rem;margin:.3rem 0}.bs-popover-auto[x-placement^=left]>.arrow::before,.bs-popover-left>.arrow::before{right:0;border-width:.5rem 0 .5rem .5rem;border-left-color:rgba(0,0,0,.25)}.bs-popover-auto[x-placement^=left]>.arrow::after,.bs-popover-left>.arrow::after{right:1px;border-width:.5rem 0 .5rem .5rem;border-left-color:#fff}.popover-header{padding:.5rem .75rem;margin-bottom:0;font-size:1rem;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-top-left-radius:calc(.3rem - 1px);border-top-right-radius:calc(.3rem - 1px)}.popover-header:empty{display:none}.popover-body{padding:.5rem .75rem;color:#212529}.carousel{position:relative}.carousel.pointer-event{-ms-touch-action:pan-y;touch-action:pan-y}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner::after{display:block;clear:both;content:""}.carousel-item{position:relative;display:none;float:left;width:100%;margin-right:-100%;-webkit-backface-visibility:hidden;backface-visibility:hidden;transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;transition:transform .6s ease-in-out,-webkit-transform .6s ease-in-out}@media(prefers-reduced-motion: reduce){.carousel-item{transition:none}}.carousel-item-next,.carousel-item-prev,.carousel-item.active{display:block}.active.carousel-item-right,.carousel-item-next:not(.carousel-item-left){-webkit-transform:translateX(100%);transform:translateX(100%)}.active.carousel-item-left,.carousel-item-prev:not(.carousel-item-right){-webkit-transform:translateX(-100%);transform:translateX(-100%)}.carousel-fade .carousel-item{opacity:0;transition-property:opacity;-webkit-transform:none;transform:none}.carousel-fade .carousel-item-next.carousel-item-left,.carousel-fade .carousel-item-prev.carousel-item-right,.carousel-fade .carousel-item.active{z-index:1;opacity:1}.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{z-index:0;opacity:0;transition:opacity 0s .6s}@media(prefers-reduced-motion: reduce){.carousel-fade .active.carousel-item-left,.carousel-fade .active.carousel-item-right{transition:none}}.carousel-control-next,.carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:15%;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}@media(prefers-reduced-motion: reduce){.carousel-control-next,.carousel-control-prev{transition:none}}.carousel-control-next:focus,.carousel-control-next:hover,.carousel-control-prev:focus,.carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.carousel-control-prev{left:0}.carousel-control-next{right:0}.carousel-control-next-icon,.carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.carousel-control-prev-icon{background-image:url(${C})}.carousel-control-next-icon{background-image:url(${I})}.carousel-indicators{position:absolute;right:0;bottom:0;left:0;z-index:15;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;padding-left:0;margin-right:15%;margin-left:15%;list-style:none}.carousel-indicators li{box-sizing:content-box;-ms-flex:0 1 auto;flex:0 1 auto;width:30px;height:3px;margin-right:3px;margin-left:3px;text-indent:-999px;cursor:pointer;background-color:#fff;background-clip:padding-box;border-top:10px solid rgba(0,0,0,0);border-bottom:10px solid rgba(0,0,0,0);opacity:.5;transition:opacity .6s ease}@media(prefers-reduced-motion: reduce){.carousel-indicators li{transition:none}}.carousel-indicators .active{opacity:1}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center}@-webkit-keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-border{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.spinner-border{display:inline-block;width:2rem;height:2rem;vertical-align:-0.125em;border:.25em solid currentcolor;border-right-color:rgba(0,0,0,0);border-radius:50%;-webkit-animation:.75s linear infinite spinner-border;animation:.75s linear infinite spinner-border}.spinner-border-sm{width:1rem;height:1rem;border-width:.2em}@-webkit-keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}@keyframes spinner-grow{0%{-webkit-transform:scale(0);transform:scale(0)}50%{opacity:1;-webkit-transform:none;transform:none}}.spinner-grow{display:inline-block;width:2rem;height:2rem;vertical-align:-0.125em;background-color:currentcolor;border-radius:50%;opacity:0;-webkit-animation:.75s linear infinite spinner-grow;animation:.75s linear infinite spinner-grow}.spinner-grow-sm{width:1rem;height:1rem}@media(prefers-reduced-motion: reduce){.spinner-border,.spinner-grow{-webkit-animation-duration:1.5s;animation-duration:1.5s}}.align-baseline{vertical-align:baseline !important}.align-top{vertical-align:top !important}.align-middle{vertical-align:middle !important}.align-bottom{vertical-align:bottom !important}.align-text-bottom{vertical-align:text-bottom !important}.align-text-top{vertical-align:text-top !important}.bg-primary{background-color:#007bff !important}a.bg-primary:focus,a.bg-primary:hover,button.bg-primary:focus,button.bg-primary:hover{background-color:#0062cc !important}.bg-secondary{background-color:#6c757d !important}a.bg-secondary:focus,a.bg-secondary:hover,button.bg-secondary:focus,button.bg-secondary:hover{background-color:#545b62 !important}.bg-success{background-color:#28a745 !important}a.bg-success:focus,a.bg-success:hover,button.bg-success:focus,button.bg-success:hover{background-color:#1e7e34 !important}.bg-info{background-color:#17a2b8 !important}a.bg-info:focus,a.bg-info:hover,button.bg-info:focus,button.bg-info:hover{background-color:#117a8b !important}.bg-warning{background-color:#ffc107 !important}a.bg-warning:focus,a.bg-warning:hover,button.bg-warning:focus,button.bg-warning:hover{background-color:#d39e00 !important}.bg-danger{background-color:#dc3545 !important}a.bg-danger:focus,a.bg-danger:hover,button.bg-danger:focus,button.bg-danger:hover{background-color:#bd2130 !important}.bg-light{background-color:#f8f9fa !important}a.bg-light:focus,a.bg-light:hover,button.bg-light:focus,button.bg-light:hover{background-color:#dae0e5 !important}.bg-dark{background-color:#343a40 !important}a.bg-dark:focus,a.bg-dark:hover,button.bg-dark:focus,button.bg-dark:hover{background-color:#1d2124 !important}.bg-white{background-color:#fff !important}.bg-transparent{background-color:rgba(0,0,0,0) !important}.border{border:1px solid #dee2e6 !important}.border-top{border-top:1px solid #dee2e6 !important}.border-right{border-right:1px solid #dee2e6 !important}.border-bottom{border-bottom:1px solid #dee2e6 !important}.border-left{border-left:1px solid #dee2e6 !important}.border-0{border:0 !important}.border-top-0{border-top:0 !important}.border-right-0{border-right:0 !important}.border-bottom-0{border-bottom:0 !important}.border-left-0{border-left:0 !important}.border-primary{border-color:#007bff !important}.border-secondary{border-color:#6c757d !important}.border-success{border-color:#28a745 !important}.border-info{border-color:#17a2b8 !important}.border-warning{border-color:#ffc107 !important}.border-danger{border-color:#dc3545 !important}.border-light{border-color:#f8f9fa !important}.border-dark{border-color:#343a40 !important}.border-white{border-color:#fff !important}.rounded-sm{border-radius:.2rem !important}.rounded{border-radius:.25rem !important}.rounded-top{border-top-left-radius:.25rem !important;border-top-right-radius:.25rem !important}.rounded-right{border-top-right-radius:.25rem !important;border-bottom-right-radius:.25rem !important}.rounded-bottom{border-bottom-right-radius:.25rem !important;border-bottom-left-radius:.25rem !important}.rounded-left{border-top-left-radius:.25rem !important;border-bottom-left-radius:.25rem !important}.rounded-lg{border-radius:.3rem !important}.rounded-circle{border-radius:50% !important}.rounded-pill{border-radius:50rem !important}.rounded-0{border-radius:0 !important}.clearfix::after{display:block;clear:both;content:""}.d-none{display:none !important}.d-inline{display:inline !important}.d-inline-block{display:inline-block !important}.d-block{display:block !important}.d-table{display:table !important}.d-table-row{display:table-row !important}.d-table-cell{display:table-cell !important}.d-flex{display:-ms-flexbox !important;display:flex !important}.d-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}@media(min-width: 576px){.d-sm-none{display:none !important}.d-sm-inline{display:inline !important}.d-sm-inline-block{display:inline-block !important}.d-sm-block{display:block !important}.d-sm-table{display:table !important}.d-sm-table-row{display:table-row !important}.d-sm-table-cell{display:table-cell !important}.d-sm-flex{display:-ms-flexbox !important;display:flex !important}.d-sm-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 768px){.d-md-none{display:none !important}.d-md-inline{display:inline !important}.d-md-inline-block{display:inline-block !important}.d-md-block{display:block !important}.d-md-table{display:table !important}.d-md-table-row{display:table-row !important}.d-md-table-cell{display:table-cell !important}.d-md-flex{display:-ms-flexbox !important;display:flex !important}.d-md-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 992px){.d-lg-none{display:none !important}.d-lg-inline{display:inline !important}.d-lg-inline-block{display:inline-block !important}.d-lg-block{display:block !important}.d-lg-table{display:table !important}.d-lg-table-row{display:table-row !important}.d-lg-table-cell{display:table-cell !important}.d-lg-flex{display:-ms-flexbox !important;display:flex !important}.d-lg-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media(min-width: 1200px){.d-xl-none{display:none !important}.d-xl-inline{display:inline !important}.d-xl-inline-block{display:inline-block !important}.d-xl-block{display:block !important}.d-xl-table{display:table !important}.d-xl-table-row{display:table-row !important}.d-xl-table-cell{display:table-cell !important}.d-xl-flex{display:-ms-flexbox !important;display:flex !important}.d-xl-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}@media print{.d-print-none{display:none !important}.d-print-inline{display:inline !important}.d-print-inline-block{display:inline-block !important}.d-print-block{display:block !important}.d-print-table{display:table !important}.d-print-table-row{display:table-row !important}.d-print-table-cell{display:table-cell !important}.d-print-flex{display:-ms-flexbox !important;display:flex !important}.d-print-inline-flex{display:-ms-inline-flexbox !important;display:inline-flex !important}}.embed-responsive{position:relative;display:block;width:100%;padding:0;overflow:hidden}.embed-responsive::before{display:block;content:""}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-21by9::before{padding-top:42.857143%}.embed-responsive-16by9::before{padding-top:56.25%}.embed-responsive-4by3::before{padding-top:75%}.embed-responsive-1by1::before{padding-top:100%}.flex-row{-ms-flex-direction:row !important;flex-direction:row !important}.flex-column{-ms-flex-direction:column !important;flex-direction:column !important}.flex-row-reverse{-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-column-reverse{-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.flex-fill{-ms-flex:1 1 auto !important;flex:1 1 auto !important}.flex-grow-0{-ms-flex-positive:0 !important;flex-grow:0 !important}.flex-grow-1{-ms-flex-positive:1 !important;flex-grow:1 !important}.flex-shrink-0{-ms-flex-negative:0 !important;flex-shrink:0 !important}.flex-shrink-1{-ms-flex-negative:1 !important;flex-shrink:1 !important}.justify-content-start{-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-end{-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-center{-ms-flex-pack:center !important;justify-content:center !important}.justify-content-between{-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-start{-ms-flex-align:start !important;align-items:flex-start !important}.align-items-end{-ms-flex-align:end !important;align-items:flex-end !important}.align-items-center{-ms-flex-align:center !important;align-items:center !important}.align-items-baseline{-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-stretch{-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}@media(min-width: 576px){.flex-sm-row{-ms-flex-direction:row !important;flex-direction:row !important}.flex-sm-column{-ms-flex-direction:column !important;flex-direction:column !important}.flex-sm-row-reverse{-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-sm-column-reverse{-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-sm-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-sm-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-sm-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.flex-sm-fill{-ms-flex:1 1 auto !important;flex:1 1 auto !important}.flex-sm-grow-0{-ms-flex-positive:0 !important;flex-grow:0 !important}.flex-sm-grow-1{-ms-flex-positive:1 !important;flex-grow:1 !important}.flex-sm-shrink-0{-ms-flex-negative:0 !important;flex-shrink:0 !important}.flex-sm-shrink-1{-ms-flex-negative:1 !important;flex-shrink:1 !important}.justify-content-sm-start{-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-sm-end{-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-sm-center{-ms-flex-pack:center !important;justify-content:center !important}.justify-content-sm-between{-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-sm-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-sm-start{-ms-flex-align:start !important;align-items:flex-start !important}.align-items-sm-end{-ms-flex-align:end !important;align-items:flex-end !important}.align-items-sm-center{-ms-flex-align:center !important;align-items:center !important}.align-items-sm-baseline{-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-sm-stretch{-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-sm-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-sm-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-sm-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-sm-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-sm-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-sm-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-sm-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-sm-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-sm-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-sm-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-sm-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-sm-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}@media(min-width: 768px){.flex-md-row{-ms-flex-direction:row !important;flex-direction:row !important}.flex-md-column{-ms-flex-direction:column !important;flex-direction:column !important}.flex-md-row-reverse{-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-md-column-reverse{-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-md-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-md-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-md-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.flex-md-fill{-ms-flex:1 1 auto !important;flex:1 1 auto !important}.flex-md-grow-0{-ms-flex-positive:0 !important;flex-grow:0 !important}.flex-md-grow-1{-ms-flex-positive:1 !important;flex-grow:1 !important}.flex-md-shrink-0{-ms-flex-negative:0 !important;flex-shrink:0 !important}.flex-md-shrink-1{-ms-flex-negative:1 !important;flex-shrink:1 !important}.justify-content-md-start{-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-md-end{-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-md-center{-ms-flex-pack:center !important;justify-content:center !important}.justify-content-md-between{-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-md-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-md-start{-ms-flex-align:start !important;align-items:flex-start !important}.align-items-md-end{-ms-flex-align:end !important;align-items:flex-end !important}.align-items-md-center{-ms-flex-align:center !important;align-items:center !important}.align-items-md-baseline{-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-md-stretch{-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-md-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-md-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-md-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-md-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-md-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-md-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-md-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-md-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-md-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-md-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-md-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-md-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}@media(min-width: 992px){.flex-lg-row{-ms-flex-direction:row !important;flex-direction:row !important}.flex-lg-column{-ms-flex-direction:column !important;flex-direction:column !important}.flex-lg-row-reverse{-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-lg-column-reverse{-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-lg-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-lg-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-lg-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.flex-lg-fill{-ms-flex:1 1 auto !important;flex:1 1 auto !important}.flex-lg-grow-0{-ms-flex-positive:0 !important;flex-grow:0 !important}.flex-lg-grow-1{-ms-flex-positive:1 !important;flex-grow:1 !important}.flex-lg-shrink-0{-ms-flex-negative:0 !important;flex-shrink:0 !important}.flex-lg-shrink-1{-ms-flex-negative:1 !important;flex-shrink:1 !important}.justify-content-lg-start{-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-lg-end{-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-lg-center{-ms-flex-pack:center !important;justify-content:center !important}.justify-content-lg-between{-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-lg-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-lg-start{-ms-flex-align:start !important;align-items:flex-start !important}.align-items-lg-end{-ms-flex-align:end !important;align-items:flex-end !important}.align-items-lg-center{-ms-flex-align:center !important;align-items:center !important}.align-items-lg-baseline{-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-lg-stretch{-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-lg-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-lg-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-lg-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-lg-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-lg-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-lg-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-lg-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-lg-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-lg-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-lg-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-lg-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-lg-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}@media(min-width: 1200px){.flex-xl-row{-ms-flex-direction:row !important;flex-direction:row !important}.flex-xl-column{-ms-flex-direction:column !important;flex-direction:column !important}.flex-xl-row-reverse{-ms-flex-direction:row-reverse !important;flex-direction:row-reverse !important}.flex-xl-column-reverse{-ms-flex-direction:column-reverse !important;flex-direction:column-reverse !important}.flex-xl-wrap{-ms-flex-wrap:wrap !important;flex-wrap:wrap !important}.flex-xl-nowrap{-ms-flex-wrap:nowrap !important;flex-wrap:nowrap !important}.flex-xl-wrap-reverse{-ms-flex-wrap:wrap-reverse !important;flex-wrap:wrap-reverse !important}.flex-xl-fill{-ms-flex:1 1 auto !important;flex:1 1 auto !important}.flex-xl-grow-0{-ms-flex-positive:0 !important;flex-grow:0 !important}.flex-xl-grow-1{-ms-flex-positive:1 !important;flex-grow:1 !important}.flex-xl-shrink-0{-ms-flex-negative:0 !important;flex-shrink:0 !important}.flex-xl-shrink-1{-ms-flex-negative:1 !important;flex-shrink:1 !important}.justify-content-xl-start{-ms-flex-pack:start !important;justify-content:flex-start !important}.justify-content-xl-end{-ms-flex-pack:end !important;justify-content:flex-end !important}.justify-content-xl-center{-ms-flex-pack:center !important;justify-content:center !important}.justify-content-xl-between{-ms-flex-pack:justify !important;justify-content:space-between !important}.justify-content-xl-around{-ms-flex-pack:distribute !important;justify-content:space-around !important}.align-items-xl-start{-ms-flex-align:start !important;align-items:flex-start !important}.align-items-xl-end{-ms-flex-align:end !important;align-items:flex-end !important}.align-items-xl-center{-ms-flex-align:center !important;align-items:center !important}.align-items-xl-baseline{-ms-flex-align:baseline !important;align-items:baseline !important}.align-items-xl-stretch{-ms-flex-align:stretch !important;align-items:stretch !important}.align-content-xl-start{-ms-flex-line-pack:start !important;align-content:flex-start !important}.align-content-xl-end{-ms-flex-line-pack:end !important;align-content:flex-end !important}.align-content-xl-center{-ms-flex-line-pack:center !important;align-content:center !important}.align-content-xl-between{-ms-flex-line-pack:justify !important;align-content:space-between !important}.align-content-xl-around{-ms-flex-line-pack:distribute !important;align-content:space-around !important}.align-content-xl-stretch{-ms-flex-line-pack:stretch !important;align-content:stretch !important}.align-self-xl-auto{-ms-flex-item-align:auto !important;align-self:auto !important}.align-self-xl-start{-ms-flex-item-align:start !important;align-self:flex-start !important}.align-self-xl-end{-ms-flex-item-align:end !important;align-self:flex-end !important}.align-self-xl-center{-ms-flex-item-align:center !important;align-self:center !important}.align-self-xl-baseline{-ms-flex-item-align:baseline !important;align-self:baseline !important}.align-self-xl-stretch{-ms-flex-item-align:stretch !important;align-self:stretch !important}}.float-left{float:left !important}.float-right{float:right !important}.float-none{float:none !important}@media(min-width: 576px){.float-sm-left{float:left !important}.float-sm-right{float:right !important}.float-sm-none{float:none !important}}@media(min-width: 768px){.float-md-left{float:left !important}.float-md-right{float:right !important}.float-md-none{float:none !important}}@media(min-width: 992px){.float-lg-left{float:left !important}.float-lg-right{float:right !important}.float-lg-none{float:none !important}}@media(min-width: 1200px){.float-xl-left{float:left !important}.float-xl-right{float:right !important}.float-xl-none{float:none !important}}.user-select-all{-webkit-user-select:all !important;-moz-user-select:all !important;user-select:all !important}.user-select-auto{-webkit-user-select:auto !important;-moz-user-select:auto !important;-ms-user-select:auto !important;user-select:auto !important}.user-select-none{-webkit-user-select:none !important;-moz-user-select:none !important;-ms-user-select:none !important;user-select:none !important}.overflow-auto{overflow:auto !important}.overflow-hidden{overflow:hidden !important}.position-static{position:static !important}.position-relative{position:relative !important}.position-absolute{position:absolute !important}.position-fixed{position:fixed !important}.position-sticky{position:-webkit-sticky !important;position:sticky !important}.fixed-top{position:fixed;top:0;right:0;left:0;z-index:1030}.fixed-bottom{position:fixed;right:0;bottom:0;left:0;z-index:1030}@supports(position: -webkit-sticky) or (position: sticky){.sticky-top{position:-webkit-sticky;position:sticky;top:0;z-index:1020}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;overflow:visible;clip:auto;white-space:normal}.shadow-sm{box-shadow:0 .125rem .25rem rgba(0,0,0,.075) !important}.shadow{box-shadow:0 .5rem 1rem rgba(0,0,0,.15) !important}.shadow-lg{box-shadow:0 1rem 3rem rgba(0,0,0,.175) !important}.shadow-none{box-shadow:none !important}.w-25{width:25% !important}.w-50{width:50% !important}.w-75{width:75% !important}.w-100{width:100% !important}.w-auto{width:auto !important}.h-25{height:25% !important}.h-50{height:50% !important}.h-75{height:75% !important}.h-100{height:100% !important}.h-auto{height:auto !important}.mw-100{max-width:100% !important}.mh-100{max-height:100% !important}.min-vw-100{min-width:100vw !important}.min-vh-100{min-height:100vh !important}.vw-100{width:100vw !important}.vh-100{height:100vh !important}.m-0{margin:0 !important}.mt-0,.my-0{margin-top:0 !important}.mr-0,.mx-0{margin-right:0 !important}.mb-0,.my-0{margin-bottom:0 !important}.ml-0,.mx-0{margin-left:0 !important}.m-1{margin:.25rem !important}.mt-1,.my-1{margin-top:.25rem !important}.mr-1,.mx-1{margin-right:.25rem !important}.mb-1,.my-1{margin-bottom:.25rem !important}.ml-1,.mx-1{margin-left:.25rem !important}.m-2{margin:.5rem !important}.mt-2,.my-2{margin-top:.5rem !important}.mr-2,.mx-2{margin-right:.5rem !important}.mb-2,.my-2{margin-bottom:.5rem !important}.ml-2,.mx-2{margin-left:.5rem !important}.m-3{margin:1rem !important}.mt-3,.my-3{margin-top:1rem !important}.mr-3,.mx-3{margin-right:1rem !important}.mb-3,.my-3{margin-bottom:1rem !important}.ml-3,.mx-3{margin-left:1rem !important}.m-4{margin:1.5rem !important}.mt-4,.my-4{margin-top:1.5rem !important}.mr-4,.mx-4{margin-right:1.5rem !important}.mb-4,.my-4{margin-bottom:1.5rem !important}.ml-4,.mx-4{margin-left:1.5rem !important}.m-5{margin:3rem !important}.mt-5,.my-5{margin-top:3rem !important}.mr-5,.mx-5{margin-right:3rem !important}.mb-5,.my-5{margin-bottom:3rem !important}.ml-5,.mx-5{margin-left:3rem !important}.p-0{padding:0 !important}.pt-0,.py-0{padding-top:0 !important}.pr-0,.px-0{padding-right:0 !important}.pb-0,.py-0{padding-bottom:0 !important}.pl-0,.px-0{padding-left:0 !important}.p-1{padding:.25rem !important}.pt-1,.py-1{padding-top:.25rem !important}.pr-1,.px-1{padding-right:.25rem !important}.pb-1,.py-1{padding-bottom:.25rem !important}.pl-1,.px-1{padding-left:.25rem !important}.p-2{padding:.5rem !important}.pt-2,.py-2{padding-top:.5rem !important}.pr-2,.px-2{padding-right:.5rem !important}.pb-2,.py-2{padding-bottom:.5rem !important}.pl-2,.px-2{padding-left:.5rem !important}.p-3{padding:1rem !important}.pt-3,.py-3{padding-top:1rem !important}.pr-3,.px-3{padding-right:1rem !important}.pb-3,.py-3{padding-bottom:1rem !important}.pl-3,.px-3{padding-left:1rem !important}.p-4{padding:1.5rem !important}.pt-4,.py-4{padding-top:1.5rem !important}.pr-4,.px-4{padding-right:1.5rem !important}.pb-4,.py-4{padding-bottom:1.5rem !important}.pl-4,.px-4{padding-left:1.5rem !important}.p-5{padding:3rem !important}.pt-5,.py-5{padding-top:3rem !important}.pr-5,.px-5{padding-right:3rem !important}.pb-5,.py-5{padding-bottom:3rem !important}.pl-5,.px-5{padding-left:3rem !important}.m-n1{margin:-0.25rem !important}.mt-n1,.my-n1{margin-top:-0.25rem !important}.mr-n1,.mx-n1{margin-right:-0.25rem !important}.mb-n1,.my-n1{margin-bottom:-0.25rem !important}.ml-n1,.mx-n1{margin-left:-0.25rem !important}.m-n2{margin:-0.5rem !important}.mt-n2,.my-n2{margin-top:-0.5rem !important}.mr-n2,.mx-n2{margin-right:-0.5rem !important}.mb-n2,.my-n2{margin-bottom:-0.5rem !important}.ml-n2,.mx-n2{margin-left:-0.5rem !important}.m-n3{margin:-1rem !important}.mt-n3,.my-n3{margin-top:-1rem !important}.mr-n3,.mx-n3{margin-right:-1rem !important}.mb-n3,.my-n3{margin-bottom:-1rem !important}.ml-n3,.mx-n3{margin-left:-1rem !important}.m-n4{margin:-1.5rem !important}.mt-n4,.my-n4{margin-top:-1.5rem !important}.mr-n4,.mx-n4{margin-right:-1.5rem !important}.mb-n4,.my-n4{margin-bottom:-1.5rem !important}.ml-n4,.mx-n4{margin-left:-1.5rem !important}.m-n5{margin:-3rem !important}.mt-n5,.my-n5{margin-top:-3rem !important}.mr-n5,.mx-n5{margin-right:-3rem !important}.mb-n5,.my-n5{margin-bottom:-3rem !important}.ml-n5,.mx-n5{margin-left:-3rem !important}.m-auto{margin:auto !important}.mt-auto,.my-auto{margin-top:auto !important}.mr-auto,.mx-auto{margin-right:auto !important}.mb-auto,.my-auto{margin-bottom:auto !important}.ml-auto,.mx-auto{margin-left:auto !important}@media(min-width: 576px){.m-sm-0{margin:0 !important}.mt-sm-0,.my-sm-0{margin-top:0 !important}.mr-sm-0,.mx-sm-0{margin-right:0 !important}.mb-sm-0,.my-sm-0{margin-bottom:0 !important}.ml-sm-0,.mx-sm-0{margin-left:0 !important}.m-sm-1{margin:.25rem !important}.mt-sm-1,.my-sm-1{margin-top:.25rem !important}.mr-sm-1,.mx-sm-1{margin-right:.25rem !important}.mb-sm-1,.my-sm-1{margin-bottom:.25rem !important}.ml-sm-1,.mx-sm-1{margin-left:.25rem !important}.m-sm-2{margin:.5rem !important}.mt-sm-2,.my-sm-2{margin-top:.5rem !important}.mr-sm-2,.mx-sm-2{margin-right:.5rem !important}.mb-sm-2,.my-sm-2{margin-bottom:.5rem !important}.ml-sm-2,.mx-sm-2{margin-left:.5rem !important}.m-sm-3{margin:1rem !important}.mt-sm-3,.my-sm-3{margin-top:1rem !important}.mr-sm-3,.mx-sm-3{margin-right:1rem !important}.mb-sm-3,.my-sm-3{margin-bottom:1rem !important}.ml-sm-3,.mx-sm-3{margin-left:1rem !important}.m-sm-4{margin:1.5rem !important}.mt-sm-4,.my-sm-4{margin-top:1.5rem !important}.mr-sm-4,.mx-sm-4{margin-right:1.5rem !important}.mb-sm-4,.my-sm-4{margin-bottom:1.5rem !important}.ml-sm-4,.mx-sm-4{margin-left:1.5rem !important}.m-sm-5{margin:3rem !important}.mt-sm-5,.my-sm-5{margin-top:3rem !important}.mr-sm-5,.mx-sm-5{margin-right:3rem !important}.mb-sm-5,.my-sm-5{margin-bottom:3rem !important}.ml-sm-5,.mx-sm-5{margin-left:3rem !important}.p-sm-0{padding:0 !important}.pt-sm-0,.py-sm-0{padding-top:0 !important}.pr-sm-0,.px-sm-0{padding-right:0 !important}.pb-sm-0,.py-sm-0{padding-bottom:0 !important}.pl-sm-0,.px-sm-0{padding-left:0 !important}.p-sm-1{padding:.25rem !important}.pt-sm-1,.py-sm-1{padding-top:.25rem !important}.pr-sm-1,.px-sm-1{padding-right:.25rem !important}.pb-sm-1,.py-sm-1{padding-bottom:.25rem !important}.pl-sm-1,.px-sm-1{padding-left:.25rem !important}.p-sm-2{padding:.5rem !important}.pt-sm-2,.py-sm-2{padding-top:.5rem !important}.pr-sm-2,.px-sm-2{padding-right:.5rem !important}.pb-sm-2,.py-sm-2{padding-bottom:.5rem !important}.pl-sm-2,.px-sm-2{padding-left:.5rem !important}.p-sm-3{padding:1rem !important}.pt-sm-3,.py-sm-3{padding-top:1rem !important}.pr-sm-3,.px-sm-3{padding-right:1rem !important}.pb-sm-3,.py-sm-3{padding-bottom:1rem !important}.pl-sm-3,.px-sm-3{padding-left:1rem !important}.p-sm-4{padding:1.5rem !important}.pt-sm-4,.py-sm-4{padding-top:1.5rem !important}.pr-sm-4,.px-sm-4{padding-right:1.5rem !important}.pb-sm-4,.py-sm-4{padding-bottom:1.5rem !important}.pl-sm-4,.px-sm-4{padding-left:1.5rem !important}.p-sm-5{padding:3rem !important}.pt-sm-5,.py-sm-5{padding-top:3rem !important}.pr-sm-5,.px-sm-5{padding-right:3rem !important}.pb-sm-5,.py-sm-5{padding-bottom:3rem !important}.pl-sm-5,.px-sm-5{padding-left:3rem !important}.m-sm-n1{margin:-0.25rem !important}.mt-sm-n1,.my-sm-n1{margin-top:-0.25rem !important}.mr-sm-n1,.mx-sm-n1{margin-right:-0.25rem !important}.mb-sm-n1,.my-sm-n1{margin-bottom:-0.25rem !important}.ml-sm-n1,.mx-sm-n1{margin-left:-0.25rem !important}.m-sm-n2{margin:-0.5rem !important}.mt-sm-n2,.my-sm-n2{margin-top:-0.5rem !important}.mr-sm-n2,.mx-sm-n2{margin-right:-0.5rem !important}.mb-sm-n2,.my-sm-n2{margin-bottom:-0.5rem !important}.ml-sm-n2,.mx-sm-n2{margin-left:-0.5rem !important}.m-sm-n3{margin:-1rem !important}.mt-sm-n3,.my-sm-n3{margin-top:-1rem !important}.mr-sm-n3,.mx-sm-n3{margin-right:-1rem !important}.mb-sm-n3,.my-sm-n3{margin-bottom:-1rem !important}.ml-sm-n3,.mx-sm-n3{margin-left:-1rem !important}.m-sm-n4{margin:-1.5rem !important}.mt-sm-n4,.my-sm-n4{margin-top:-1.5rem !important}.mr-sm-n4,.mx-sm-n4{margin-right:-1.5rem !important}.mb-sm-n4,.my-sm-n4{margin-bottom:-1.5rem !important}.ml-sm-n4,.mx-sm-n4{margin-left:-1.5rem !important}.m-sm-n5{margin:-3rem !important}.mt-sm-n5,.my-sm-n5{margin-top:-3rem !important}.mr-sm-n5,.mx-sm-n5{margin-right:-3rem !important}.mb-sm-n5,.my-sm-n5{margin-bottom:-3rem !important}.ml-sm-n5,.mx-sm-n5{margin-left:-3rem !important}.m-sm-auto{margin:auto !important}.mt-sm-auto,.my-sm-auto{margin-top:auto !important}.mr-sm-auto,.mx-sm-auto{margin-right:auto !important}.mb-sm-auto,.my-sm-auto{margin-bottom:auto !important}.ml-sm-auto,.mx-sm-auto{margin-left:auto !important}}@media(min-width: 768px){.m-md-0{margin:0 !important}.mt-md-0,.my-md-0{margin-top:0 !important}.mr-md-0,.mx-md-0{margin-right:0 !important}.mb-md-0,.my-md-0{margin-bottom:0 !important}.ml-md-0,.mx-md-0{margin-left:0 !important}.m-md-1{margin:.25rem !important}.mt-md-1,.my-md-1{margin-top:.25rem !important}.mr-md-1,.mx-md-1{margin-right:.25rem !important}.mb-md-1,.my-md-1{margin-bottom:.25rem !important}.ml-md-1,.mx-md-1{margin-left:.25rem !important}.m-md-2{margin:.5rem !important}.mt-md-2,.my-md-2{margin-top:.5rem !important}.mr-md-2,.mx-md-2{margin-right:.5rem !important}.mb-md-2,.my-md-2{margin-bottom:.5rem !important}.ml-md-2,.mx-md-2{margin-left:.5rem !important}.m-md-3{margin:1rem !important}.mt-md-3,.my-md-3{margin-top:1rem !important}.mr-md-3,.mx-md-3{margin-right:1rem !important}.mb-md-3,.my-md-3{margin-bottom:1rem !important}.ml-md-3,.mx-md-3{margin-left:1rem !important}.m-md-4{margin:1.5rem !important}.mt-md-4,.my-md-4{margin-top:1.5rem !important}.mr-md-4,.mx-md-4{margin-right:1.5rem !important}.mb-md-4,.my-md-4{margin-bottom:1.5rem !important}.ml-md-4,.mx-md-4{margin-left:1.5rem !important}.m-md-5{margin:3rem !important}.mt-md-5,.my-md-5{margin-top:3rem !important}.mr-md-5,.mx-md-5{margin-right:3rem !important}.mb-md-5,.my-md-5{margin-bottom:3rem !important}.ml-md-5,.mx-md-5{margin-left:3rem !important}.p-md-0{padding:0 !important}.pt-md-0,.py-md-0{padding-top:0 !important}.pr-md-0,.px-md-0{padding-right:0 !important}.pb-md-0,.py-md-0{padding-bottom:0 !important}.pl-md-0,.px-md-0{padding-left:0 !important}.p-md-1{padding:.25rem !important}.pt-md-1,.py-md-1{padding-top:.25rem !important}.pr-md-1,.px-md-1{padding-right:.25rem !important}.pb-md-1,.py-md-1{padding-bottom:.25rem !important}.pl-md-1,.px-md-1{padding-left:.25rem !important}.p-md-2{padding:.5rem !important}.pt-md-2,.py-md-2{padding-top:.5rem !important}.pr-md-2,.px-md-2{padding-right:.5rem !important}.pb-md-2,.py-md-2{padding-bottom:.5rem !important}.pl-md-2,.px-md-2{padding-left:.5rem !important}.p-md-3{padding:1rem !important}.pt-md-3,.py-md-3{padding-top:1rem !important}.pr-md-3,.px-md-3{padding-right:1rem !important}.pb-md-3,.py-md-3{padding-bottom:1rem !important}.pl-md-3,.px-md-3{padding-left:1rem !important}.p-md-4{padding:1.5rem !important}.pt-md-4,.py-md-4{padding-top:1.5rem !important}.pr-md-4,.px-md-4{padding-right:1.5rem !important}.pb-md-4,.py-md-4{padding-bottom:1.5rem !important}.pl-md-4,.px-md-4{padding-left:1.5rem !important}.p-md-5{padding:3rem !important}.pt-md-5,.py-md-5{padding-top:3rem !important}.pr-md-5,.px-md-5{padding-right:3rem !important}.pb-md-5,.py-md-5{padding-bottom:3rem !important}.pl-md-5,.px-md-5{padding-left:3rem !important}.m-md-n1{margin:-0.25rem !important}.mt-md-n1,.my-md-n1{margin-top:-0.25rem !important}.mr-md-n1,.mx-md-n1{margin-right:-0.25rem !important}.mb-md-n1,.my-md-n1{margin-bottom:-0.25rem !important}.ml-md-n1,.mx-md-n1{margin-left:-0.25rem !important}.m-md-n2{margin:-0.5rem !important}.mt-md-n2,.my-md-n2{margin-top:-0.5rem !important}.mr-md-n2,.mx-md-n2{margin-right:-0.5rem !important}.mb-md-n2,.my-md-n2{margin-bottom:-0.5rem !important}.ml-md-n2,.mx-md-n2{margin-left:-0.5rem !important}.m-md-n3{margin:-1rem !important}.mt-md-n3,.my-md-n3{margin-top:-1rem !important}.mr-md-n3,.mx-md-n3{margin-right:-1rem !important}.mb-md-n3,.my-md-n3{margin-bottom:-1rem !important}.ml-md-n3,.mx-md-n3{margin-left:-1rem !important}.m-md-n4{margin:-1.5rem !important}.mt-md-n4,.my-md-n4{margin-top:-1.5rem !important}.mr-md-n4,.mx-md-n4{margin-right:-1.5rem !important}.mb-md-n4,.my-md-n4{margin-bottom:-1.5rem !important}.ml-md-n4,.mx-md-n4{margin-left:-1.5rem !important}.m-md-n5{margin:-3rem !important}.mt-md-n5,.my-md-n5{margin-top:-3rem !important}.mr-md-n5,.mx-md-n5{margin-right:-3rem !important}.mb-md-n5,.my-md-n5{margin-bottom:-3rem !important}.ml-md-n5,.mx-md-n5{margin-left:-3rem !important}.m-md-auto{margin:auto !important}.mt-md-auto,.my-md-auto{margin-top:auto !important}.mr-md-auto,.mx-md-auto{margin-right:auto !important}.mb-md-auto,.my-md-auto{margin-bottom:auto !important}.ml-md-auto,.mx-md-auto{margin-left:auto !important}}@media(min-width: 992px){.m-lg-0{margin:0 !important}.mt-lg-0,.my-lg-0{margin-top:0 !important}.mr-lg-0,.mx-lg-0{margin-right:0 !important}.mb-lg-0,.my-lg-0{margin-bottom:0 !important}.ml-lg-0,.mx-lg-0{margin-left:0 !important}.m-lg-1{margin:.25rem !important}.mt-lg-1,.my-lg-1{margin-top:.25rem !important}.mr-lg-1,.mx-lg-1{margin-right:.25rem !important}.mb-lg-1,.my-lg-1{margin-bottom:.25rem !important}.ml-lg-1,.mx-lg-1{margin-left:.25rem !important}.m-lg-2{margin:.5rem !important}.mt-lg-2,.my-lg-2{margin-top:.5rem !important}.mr-lg-2,.mx-lg-2{margin-right:.5rem !important}.mb-lg-2,.my-lg-2{margin-bottom:.5rem !important}.ml-lg-2,.mx-lg-2{margin-left:.5rem !important}.m-lg-3{margin:1rem !important}.mt-lg-3,.my-lg-3{margin-top:1rem !important}.mr-lg-3,.mx-lg-3{margin-right:1rem !important}.mb-lg-3,.my-lg-3{margin-bottom:1rem !important}.ml-lg-3,.mx-lg-3{margin-left:1rem !important}.m-lg-4{margin:1.5rem !important}.mt-lg-4,.my-lg-4{margin-top:1.5rem !important}.mr-lg-4,.mx-lg-4{margin-right:1.5rem !important}.mb-lg-4,.my-lg-4{margin-bottom:1.5rem !important}.ml-lg-4,.mx-lg-4{margin-left:1.5rem !important}.m-lg-5{margin:3rem !important}.mt-lg-5,.my-lg-5{margin-top:3rem !important}.mr-lg-5,.mx-lg-5{margin-right:3rem !important}.mb-lg-5,.my-lg-5{margin-bottom:3rem !important}.ml-lg-5,.mx-lg-5{margin-left:3rem !important}.p-lg-0{padding:0 !important}.pt-lg-0,.py-lg-0{padding-top:0 !important}.pr-lg-0,.px-lg-0{padding-right:0 !important}.pb-lg-0,.py-lg-0{padding-bottom:0 !important}.pl-lg-0,.px-lg-0{padding-left:0 !important}.p-lg-1{padding:.25rem !important}.pt-lg-1,.py-lg-1{padding-top:.25rem !important}.pr-lg-1,.px-lg-1{padding-right:.25rem !important}.pb-lg-1,.py-lg-1{padding-bottom:.25rem !important}.pl-lg-1,.px-lg-1{padding-left:.25rem !important}.p-lg-2{padding:.5rem !important}.pt-lg-2,.py-lg-2{padding-top:.5rem !important}.pr-lg-2,.px-lg-2{padding-right:.5rem !important}.pb-lg-2,.py-lg-2{padding-bottom:.5rem !important}.pl-lg-2,.px-lg-2{padding-left:.5rem !important}.p-lg-3{padding:1rem !important}.pt-lg-3,.py-lg-3{padding-top:1rem !important}.pr-lg-3,.px-lg-3{padding-right:1rem !important}.pb-lg-3,.py-lg-3{padding-bottom:1rem !important}.pl-lg-3,.px-lg-3{padding-left:1rem !important}.p-lg-4{padding:1.5rem !important}.pt-lg-4,.py-lg-4{padding-top:1.5rem !important}.pr-lg-4,.px-lg-4{padding-right:1.5rem !important}.pb-lg-4,.py-lg-4{padding-bottom:1.5rem !important}.pl-lg-4,.px-lg-4{padding-left:1.5rem !important}.p-lg-5{padding:3rem !important}.pt-lg-5,.py-lg-5{padding-top:3rem !important}.pr-lg-5,.px-lg-5{padding-right:3rem !important}.pb-lg-5,.py-lg-5{padding-bottom:3rem !important}.pl-lg-5,.px-lg-5{padding-left:3rem !important}.m-lg-n1{margin:-0.25rem !important}.mt-lg-n1,.my-lg-n1{margin-top:-0.25rem !important}.mr-lg-n1,.mx-lg-n1{margin-right:-0.25rem !important}.mb-lg-n1,.my-lg-n1{margin-bottom:-0.25rem !important}.ml-lg-n1,.mx-lg-n1{margin-left:-0.25rem !important}.m-lg-n2{margin:-0.5rem !important}.mt-lg-n2,.my-lg-n2{margin-top:-0.5rem !important}.mr-lg-n2,.mx-lg-n2{margin-right:-0.5rem !important}.mb-lg-n2,.my-lg-n2{margin-bottom:-0.5rem !important}.ml-lg-n2,.mx-lg-n2{margin-left:-0.5rem !important}.m-lg-n3{margin:-1rem !important}.mt-lg-n3,.my-lg-n3{margin-top:-1rem !important}.mr-lg-n3,.mx-lg-n3{margin-right:-1rem !important}.mb-lg-n3,.my-lg-n3{margin-bottom:-1rem !important}.ml-lg-n3,.mx-lg-n3{margin-left:-1rem !important}.m-lg-n4{margin:-1.5rem !important}.mt-lg-n4,.my-lg-n4{margin-top:-1.5rem !important}.mr-lg-n4,.mx-lg-n4{margin-right:-1.5rem !important}.mb-lg-n4,.my-lg-n4{margin-bottom:-1.5rem !important}.ml-lg-n4,.mx-lg-n4{margin-left:-1.5rem !important}.m-lg-n5{margin:-3rem !important}.mt-lg-n5,.my-lg-n5{margin-top:-3rem !important}.mr-lg-n5,.mx-lg-n5{margin-right:-3rem !important}.mb-lg-n5,.my-lg-n5{margin-bottom:-3rem !important}.ml-lg-n5,.mx-lg-n5{margin-left:-3rem !important}.m-lg-auto{margin:auto !important}.mt-lg-auto,.my-lg-auto{margin-top:auto !important}.mr-lg-auto,.mx-lg-auto{margin-right:auto !important}.mb-lg-auto,.my-lg-auto{margin-bottom:auto !important}.ml-lg-auto,.mx-lg-auto{margin-left:auto !important}}@media(min-width: 1200px){.m-xl-0{margin:0 !important}.mt-xl-0,.my-xl-0{margin-top:0 !important}.mr-xl-0,.mx-xl-0{margin-right:0 !important}.mb-xl-0,.my-xl-0{margin-bottom:0 !important}.ml-xl-0,.mx-xl-0{margin-left:0 !important}.m-xl-1{margin:.25rem !important}.mt-xl-1,.my-xl-1{margin-top:.25rem !important}.mr-xl-1,.mx-xl-1{margin-right:.25rem !important}.mb-xl-1,.my-xl-1{margin-bottom:.25rem !important}.ml-xl-1,.mx-xl-1{margin-left:.25rem !important}.m-xl-2{margin:.5rem !important}.mt-xl-2,.my-xl-2{margin-top:.5rem !important}.mr-xl-2,.mx-xl-2{margin-right:.5rem !important}.mb-xl-2,.my-xl-2{margin-bottom:.5rem !important}.ml-xl-2,.mx-xl-2{margin-left:.5rem !important}.m-xl-3{margin:1rem !important}.mt-xl-3,.my-xl-3{margin-top:1rem !important}.mr-xl-3,.mx-xl-3{margin-right:1rem !important}.mb-xl-3,.my-xl-3{margin-bottom:1rem !important}.ml-xl-3,.mx-xl-3{margin-left:1rem !important}.m-xl-4{margin:1.5rem !important}.mt-xl-4,.my-xl-4{margin-top:1.5rem !important}.mr-xl-4,.mx-xl-4{margin-right:1.5rem !important}.mb-xl-4,.my-xl-4{margin-bottom:1.5rem !important}.ml-xl-4,.mx-xl-4{margin-left:1.5rem !important}.m-xl-5{margin:3rem !important}.mt-xl-5,.my-xl-5{margin-top:3rem !important}.mr-xl-5,.mx-xl-5{margin-right:3rem !important}.mb-xl-5,.my-xl-5{margin-bottom:3rem !important}.ml-xl-5,.mx-xl-5{margin-left:3rem !important}.p-xl-0{padding:0 !important}.pt-xl-0,.py-xl-0{padding-top:0 !important}.pr-xl-0,.px-xl-0{padding-right:0 !important}.pb-xl-0,.py-xl-0{padding-bottom:0 !important}.pl-xl-0,.px-xl-0{padding-left:0 !important}.p-xl-1{padding:.25rem !important}.pt-xl-1,.py-xl-1{padding-top:.25rem !important}.pr-xl-1,.px-xl-1{padding-right:.25rem !important}.pb-xl-1,.py-xl-1{padding-bottom:.25rem !important}.pl-xl-1,.px-xl-1{padding-left:.25rem !important}.p-xl-2{padding:.5rem !important}.pt-xl-2,.py-xl-2{padding-top:.5rem !important}.pr-xl-2,.px-xl-2{padding-right:.5rem !important}.pb-xl-2,.py-xl-2{padding-bottom:.5rem !important}.pl-xl-2,.px-xl-2{padding-left:.5rem !important}.p-xl-3{padding:1rem !important}.pt-xl-3,.py-xl-3{padding-top:1rem !important}.pr-xl-3,.px-xl-3{padding-right:1rem !important}.pb-xl-3,.py-xl-3{padding-bottom:1rem !important}.pl-xl-3,.px-xl-3{padding-left:1rem !important}.p-xl-4{padding:1.5rem !important}.pt-xl-4,.py-xl-4{padding-top:1.5rem !important}.pr-xl-4,.px-xl-4{padding-right:1.5rem !important}.pb-xl-4,.py-xl-4{padding-bottom:1.5rem !important}.pl-xl-4,.px-xl-4{padding-left:1.5rem !important}.p-xl-5{padding:3rem !important}.pt-xl-5,.py-xl-5{padding-top:3rem !important}.pr-xl-5,.px-xl-5{padding-right:3rem !important}.pb-xl-5,.py-xl-5{padding-bottom:3rem !important}.pl-xl-5,.px-xl-5{padding-left:3rem !important}.m-xl-n1{margin:-0.25rem !important}.mt-xl-n1,.my-xl-n1{margin-top:-0.25rem !important}.mr-xl-n1,.mx-xl-n1{margin-right:-0.25rem !important}.mb-xl-n1,.my-xl-n1{margin-bottom:-0.25rem !important}.ml-xl-n1,.mx-xl-n1{margin-left:-0.25rem !important}.m-xl-n2{margin:-0.5rem !important}.mt-xl-n2,.my-xl-n2{margin-top:-0.5rem !important}.mr-xl-n2,.mx-xl-n2{margin-right:-0.5rem !important}.mb-xl-n2,.my-xl-n2{margin-bottom:-0.5rem !important}.ml-xl-n2,.mx-xl-n2{margin-left:-0.5rem !important}.m-xl-n3{margin:-1rem !important}.mt-xl-n3,.my-xl-n3{margin-top:-1rem !important}.mr-xl-n3,.mx-xl-n3{margin-right:-1rem !important}.mb-xl-n3,.my-xl-n3{margin-bottom:-1rem !important}.ml-xl-n3,.mx-xl-n3{margin-left:-1rem !important}.m-xl-n4{margin:-1.5rem !important}.mt-xl-n4,.my-xl-n4{margin-top:-1.5rem !important}.mr-xl-n4,.mx-xl-n4{margin-right:-1.5rem !important}.mb-xl-n4,.my-xl-n4{margin-bottom:-1.5rem !important}.ml-xl-n4,.mx-xl-n4{margin-left:-1.5rem !important}.m-xl-n5{margin:-3rem !important}.mt-xl-n5,.my-xl-n5{margin-top:-3rem !important}.mr-xl-n5,.mx-xl-n5{margin-right:-3rem !important}.mb-xl-n5,.my-xl-n5{margin-bottom:-3rem !important}.ml-xl-n5,.mx-xl-n5{margin-left:-3rem !important}.m-xl-auto{margin:auto !important}.mt-xl-auto,.my-xl-auto{margin-top:auto !important}.mr-xl-auto,.mx-xl-auto{margin-right:auto !important}.mb-xl-auto,.my-xl-auto{margin-bottom:auto !important}.ml-xl-auto,.mx-xl-auto{margin-left:auto !important}}.stretched-link::after{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:auto;content:"";background-color:rgba(0,0,0,0)}.text-monospace{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace !important}.text-justify{text-align:justify !important}.text-wrap{white-space:normal !important}.text-nowrap{white-space:nowrap !important}.text-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.text-left{text-align:left !important}.text-right{text-align:right !important}.text-center{text-align:center !important}@media(min-width: 576px){.text-sm-left{text-align:left !important}.text-sm-right{text-align:right !important}.text-sm-center{text-align:center !important}}@media(min-width: 768px){.text-md-left{text-align:left !important}.text-md-right{text-align:right !important}.text-md-center{text-align:center !important}}@media(min-width: 992px){.text-lg-left{text-align:left !important}.text-lg-right{text-align:right !important}.text-lg-center{text-align:center !important}}@media(min-width: 1200px){.text-xl-left{text-align:left !important}.text-xl-right{text-align:right !important}.text-xl-center{text-align:center !important}}.text-lowercase{text-transform:lowercase !important}.text-uppercase{text-transform:uppercase !important}.text-capitalize{text-transform:capitalize !important}.font-weight-light{font-weight:300 !important}.font-weight-lighter{font-weight:lighter !important}.font-weight-normal{font-weight:400 !important}.font-weight-bold{font-weight:700 !important}.font-weight-bolder{font-weight:bolder !important}.font-italic{font-style:italic !important}.text-white{color:#fff !important}.text-primary{color:#007bff !important}a.text-primary:focus,a.text-primary:hover{color:#0056b3 !important}.text-secondary{color:#6c757d !important}a.text-secondary:focus,a.text-secondary:hover{color:#494f54 !important}.text-success{color:#28a745 !important}a.text-success:focus,a.text-success:hover{color:#19692c !important}.text-info{color:#17a2b8 !important}a.text-info:focus,a.text-info:hover{color:#0f6674 !important}.text-warning{color:#ffc107 !important}a.text-warning:focus,a.text-warning:hover{color:#ba8b00 !important}.text-danger{color:#dc3545 !important}a.text-danger:focus,a.text-danger:hover{color:#a71d2a !important}.text-light{color:#f8f9fa !important}a.text-light:focus,a.text-light:hover{color:#cbd3da !important}.text-dark{color:#343a40 !important}a.text-dark:focus,a.text-dark:hover{color:#121416 !important}.text-body{color:#212529 !important}.text-muted{color:#6c757d !important}.text-black-50{color:rgba(0,0,0,.5) !important}.text-white-50{color:rgba(255,255,255,.5) !important}.text-hide{font:0/0 a;color:rgba(0,0,0,0);text-shadow:none;background-color:rgba(0,0,0,0);border:0}.text-decoration-none{text-decoration:none !important}.text-break{word-break:break-word !important;word-wrap:break-word !important}.text-reset{color:inherit !important}.visible{visibility:visible !important}.invisible{visibility:hidden !important}@media print{*,::after,::before{text-shadow:none !important;box-shadow:none !important}a:not(.btn){text-decoration:underline}abbr[title]::after{content:" (" attr(title) ")"}pre{white-space:pre-wrap !important}blockquote,pre{border:1px solid #adb5bd;page-break-inside:avoid}img,tr{page-break-inside:avoid}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}@page{size:a3}body{min-width:992px !important}.container{min-width:992px !important}.navbar{display:none}.badge{border:1px solid #000}.table{border-collapse:collapse !important}.table td,.table th{background-color:#fff !important}.table-bordered td,.table-bordered th{border:1px solid #dee2e6 !important}.table-dark{color:inherit}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#dee2e6}.table .thead-dark th{color:inherit;border-color:#dee2e6}}`,""]);const O=y},1647:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,".App-logo{height:40vmin;pointer-events:none}@media(prefers-reduced-motion: no-preference){.App-logo{animation:App-logo-spin infinite 20s linear}}#overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.8);z-index:2;cursor:pointer}#overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:#fff;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.z0{z-index:0}.sort-table-icon{color:#bdbdbd}.sort-table-icon:hover{color:#333;cursor:pointer}.App-header{background-color:#282c34;min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:calc(10px + 2vmin);color:#fff}.table thead th{vertical-align:middle !important;border-bottom:2px solid #dee2e6}.sticky-table-header{position:sticky;top:0}.App-link{color:#61dafb}.pointer{cursor:pointer}@keyframes App-logo-spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}",""]);const s=a},8358:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(8081),i=n.n(r),o=n(3645),a=n.n(o)()(i());a.push([e.id,'body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}',""]);const s=a},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),i&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=i):u[4]="".concat(i)),t.push(u))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},2296:(e,t,n)=>{"use strict";var r=n(1044)(),i=n(210),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(e){o=!1}var a=i("%SyntaxError%"),s=i("%TypeError%"),l=n(7296);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new s("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new s("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new s("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new s("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new s("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new s("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!l&&l(e,t);if(o)o(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===r&&h?h.enumerable:!r,value:n,writable:null===i&&h?h.writable:!i});else{if(!u&&(r||i||c))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},9187:e=>{"use strict";function t(e,t,r){r=r||2;var o,a,s,l,h,d,f,m=t&&t.length,g=m?t[0]*r:e.length,b=n(e,0,g,r,!0),v=[];if(!b||b.next===b.prev)return v;if(m&&(b=function(e,t,r,i){var o,a,s,l=[];for(o=0,a=t.length;o80*r){o=s=e[0],a=l=e[1];for(var y=r;ys&&(s=h),d>l&&(l=d);f=0!==(f=Math.max(s-o,l-a))?32767/f:0}return i(b,v,r,o,a,f,0),v}function n(e,t,n,r,i){var o,a;if(i===k(e,t,n,r)>0)for(o=t;o=t;o-=r)a=x(o,e[o],e[o+1],a);return a&&b(a,a.next)&&(w(a),a=a.next),a}function r(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(w(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function i(e,t,n,c,u,h,p){if(e){!p&&h&&function(e,t,n,r){var i=e;do{0===i.z&&(i.z=d(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,c=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(a>1)}(i)}(e,c,u,h);for(var f,m,g=e;e.prev!==e.next;)if(f=e.prev,m=e.next,h?a(e,c,u,h):o(e))t.push(f.i/n|0),t.push(e.i/n|0),t.push(m.i/n|0),w(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?i(e=s(r(e),t,n),t,n,c,u,h,2):2===p&&l(e,t,n,c,u,h):i(r(e),t,n,c,u,h,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(g(t,n,r)>=0)return!1;for(var i=t.x,o=n.x,a=r.x,s=t.y,l=n.y,c=r.y,u=io?i>a?i:a:o>a?o:a,p=s>l?s>c?s:c:l>c?l:c,m=r.next;m!==t;){if(m.x>=u&&m.x<=d&&m.y>=h&&m.y<=p&&f(i,s,o,l,a,c,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}function a(e,t,n,r){var i=e.prev,o=e,a=e.next;if(g(i,o,a)>=0)return!1;for(var s=i.x,l=o.x,c=a.x,u=i.y,h=o.y,p=a.y,m=sl?s>c?s:c:l>c?l:c,y=u>h?u>p?u:p:h>p?h:p,T=d(m,b,t,n,r),_=d(v,y,t,n,r),E=e.prevZ,x=e.nextZ;E&&E.z>=T&&x&&x.z<=_;){if(E.x>=m&&E.x<=v&&E.y>=b&&E.y<=y&&E!==i&&E!==a&&f(s,u,l,h,c,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;if(E=E.prevZ,x.x>=m&&x.x<=v&&x.y>=b&&x.y<=y&&x!==i&&x!==a&&f(s,u,l,h,c,p,x.x,x.y)&&g(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;E&&E.z>=T;){if(E.x>=m&&E.x<=v&&E.y>=b&&E.y<=y&&E!==i&&E!==a&&f(s,u,l,h,c,p,E.x,E.y)&&g(E.prev,E,E.next)>=0)return!1;E=E.prevZ}for(;x&&x.z<=_;){if(x.x>=m&&x.x<=v&&x.y>=b&&x.y<=y&&x!==i&&x!==a&&f(s,u,l,h,c,p,x.x,x.y)&&g(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function s(e,t,n){var i=e;do{var o=i.prev,a=i.next.next;!b(o,a)&&v(o,i,i.next,a)&&_(o,a)&&_(a,o)&&(t.push(o.i/n|0),t.push(i.i/n|0),t.push(a.i/n|0),w(i),w(i.next),i=e=a),i=i.next}while(i!==e);return r(i)}function l(e,t,n,o,a,s){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=E(l,c);return l=r(l,l.next),u=r(u,u.next),i(l,t,n,o,a,s,0),void i(u,t,n,o,a,s,0)}c=c.next}l=l.next}while(l!==e)}function c(e,t){return e.x-t.x}function u(e,t){var n=function(e,t){var n,r=t,i=e.x,o=e.y,a=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var s=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=i&&s>a&&(a=s,n=r.x=r.x&&r.x>=u&&i!==r.x&&f(on.x||r.x===n.x&&h(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(e,t);if(!n)return t;var i=E(n,e);return r(i,i.next),r(n,n.next)}function h(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function d(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,n=e;do{(t.x=(e-a)*(o-s)&&(e-a)*(r-s)>=(n-a)*(t-s)&&(n-a)*(o-s)>=(i-a)*(r-s)}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&v(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(_(e,t)&&_(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||b(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function v(e,t,n,r){var i=T(g(e,t,n)),o=T(g(e,t,r)),a=T(g(n,r,e)),s=T(g(n,r,t));return i!==o&&a!==s||!(0!==i||!y(e,n,t))||!(0!==o||!y(e,r,t))||!(0!==a||!y(n,e,r))||!(0!==s||!y(n,t,r))}function y(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function _(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function E(e,t){var n=new S(e.i,e.x,e.y),r=new S(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function x(e,t,n,r){var i=new S(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function w(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function S(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function k(e,t,n,r){for(var i=0,o=t,a=n-r;o0&&(r+=e[i-1].length,n.holes.push(r))}return n}},6713:function(e,t,n){var r;!function(i){var o=i.Promise,a=o&&"resolve"in o&&"reject"in o&&"all"in o&&"race"in o&&function(){var e;return new o((function(t){e=t})),"function"==typeof e}();t?(t.Promise=a?o:k,t.Polyfill=k):void 0===(r=function(){return a?o:k}.call(t,n,t,e))||(e.exports=r);var s="pending",l="sealed",c="fulfilled",u="rejected",h=function(){};function d(e){return"[object Array]"===Object.prototype.toString.call(e)}var p,f="undefined"!=typeof setImmediate?setImmediate:setTimeout,m=[];function g(){for(var e=0;e{"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function i(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,r,o,a){if("function"!=typeof r)throw new TypeError("The listener must be a function");var s=new i(r,o||e,a),l=n?n+t:t;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],s]:e._events[l].push(s):(e._events[l]=s,e._eventsCount++),e}function a(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function s(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),s.prototype.eventNames=function(){var e,r,i=[];if(0===this._eventsCount)return i;for(r in e=this._events)t.call(e,r)&&i.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},s.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var i=0,o=r.length,a=new Array(o);i{"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r{"use strict";var r=n(7648);e.exports=Function.prototype.bind||r},210:(e,t,n)=>{"use strict";var r,i=SyntaxError,o=Function,a=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new a},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,h=n(1405)(),d=n(8185)(),p=Object.getPrototypeOf||(d?function(e){return e.__proto__}:null),f={},m="undefined"!=typeof Uint8Array&&p?p(Uint8Array):r,g={"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":h&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h&&p?p(p([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h&&p?p((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h&&p?p((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h&&p?p(""[Symbol.iterator]()):r,"%Symbol%":h?Symbol:r,"%SyntaxError%":i,"%ThrowTypeError%":u,"%TypedArray%":m,"%TypeError%":a,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet};if(p)try{null.error}catch(e){var b=p(p(e));g["%Error.prototype%"]=b}var v=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&p&&(n=p(i.prototype))}return g[t]=n,n},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=n(8612),_=n(8824),E=T.call(Function.call,Array.prototype.concat),x=T.call(Function.apply,Array.prototype.splice),w=T.call(Function.call,String.prototype.replace),S=T.call(Function.call,String.prototype.slice),k=T.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,I=function(e,t){var n,r=e;if(_(y,r)&&(r="%"+(n=y[r])[0]+"%"),_(g,r)){var o=g[r];if(o===f&&(o=v(r)),void 0===o&&!t)throw new a("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new i("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new a('"allowMissing" argument must be a boolean');if(null===k(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=S(e,0,1),n=S(e,-1);if("%"===t&&"%"!==n)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var r=[];return w(e,A,(function(e,t,n,i){r[r.length]=n?w(i,C,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=I("%"+r+"%",t),s=o.name,c=o.value,u=!1,h=o.alias;h&&(r=h[0],x(n,E([0,1],h)));for(var d=1,p=!0;d=n.length){var v=l(c,f);c=(p=!!v)&&"get"in v&&!("originalValue"in v.get)?v.get:c[f]}else p=_(c,f),c=c[f];p&&!u&&(g[s]=c)}}return c}},7296:(e,t,n)=>{"use strict";var r=n(210)("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},1044:(e,t,n)=>{"use strict";var r=n(210)("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(e){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},8185:e=>{"use strict";var t={foo:{}},n=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof n)}},1405:(e,t,n)=>{"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n(5419);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},8824:(e,t,n)=>{"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=n(8612);e.exports=o.call(r,i)},7637:e=>{var t;window,t=function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),window.higlassTracks=window.higlassTracks||{},window.higlassTracksByType=window.higlassTracksByType||{},window.higlassDataFetchersByType=window.higlassDataFetchersByType||{};var r=function(){return Math.random().toString(36).substring(2,8)};t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.pluginType,i=void 0===n?"track":n;"track"===i?function(e){for(var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t,i=r();window.higlassTracks[i];)i=r();e.name=i,window.higlassTracks[e.name]=e,window.higlassTracksByType[e.config.type]&&!n?console.warn("A track with the same type ("+e.config.type+") was already registered. To override it, set force to true."):window.higlassTracksByType[e.config.type]=e}(e,t):"dataFetcher"===i&&function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).force,n=void 0!==t&&t;window.higlassDataFetchersByType[e.config.type]&&!n?console.warn("A data fetcher with the same type ("+e.config.type+") was already registered. To override it, set force to true."):window.higlassDataFetchersByType[e.config.type]=e}(e,t)}}])},e.exports=t()},1722:(e,t,n)=>{e.exports=n(2063)},2063:(e,t,n)=>{var r=n(533),i=n(3162);t.encode=function(e){var t=i.parse(e);return new Buffer(t).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").substring(0,22)},t.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/")+"==";return i.unparse(new Buffer(t,"base64"))},t.v4=function(){return r(null,new Buffer(16)).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").substring(0,22)},t.nice=function(){var e=r(null,new Buffer(16));return e[0]=127&e[0],e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").substring(0,22)}},1216:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,i=t;return[i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],"-",i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]],i[e[r++]]].join("")}},1519:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},533:(e,t,n)=>{var r=n(1519),i=n(1216);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var a=(e=e||{}).random||(e.rng||r)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t)for(var s=0;s<16;++s)t[o+s]=a[s];return t||i(a)}},7949:function(e,t,n){function r(){return r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},r.apply(this,arguments)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function o(e){var t=c();return function(){var n,r=h(e);if(t){var i=h(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return a(e)}(this,n)}}function a(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function s(e){var t="function"==typeof Map?new Map:void 0;return s=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return l(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),u(r,e)},s(e)}function l(e,t,n){return(l=c()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&u(i,n.prototype),i}).apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;ne&&"object"==typeof e&&"default"in e?e:{default:e};function p(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const n in e)if("default"!==n){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}return t.default=e,Object.freeze(t)}const m=u(n),g=u(l),b=p(c);var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function T(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var _,E,x,w,S={exports:{}};S.exports=function(){if(w)return x;w=1;var e=E?_:(E=1,_="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,x=function(){function r(t,n,r,i,o,a){if(a!==e){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function i(){return r}r.isRequired=r;var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o}}()();var k="http://www.w3.org/1999/xhtml";const A={svg:"http://www.w3.org/2000/svg",xhtml:k,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function C(e){var t=e+="",n=t.indexOf(":");return n>=0&&"xmlns"!==(t=e.slice(0,n))&&(e=e.slice(n+1)),A.hasOwnProperty(t)?{space:A[t],local:e}:e}function I(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===k&&t.documentElement.namespaceURI===k?t.createElement(e):t.createElementNS(n,e)}}function O(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function D(e){var t=C(e);return(t.local?O:I)(t)}function P(){}function N(e){return null==e?P:function(){return this.querySelector(e)}}function R(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function M(){return[]}function L(e){return null==e?M:function(){return this.querySelectorAll(e)}}function B(e){return function(){return this.matches(e)}}function F(e){return function(t){return t.matches(e)}}var U=Array.prototype.find;function j(){return this.firstElementChild}var H=Array.prototype.filter;function G(){return this.children}function z(e){return new Array(e.length)}function V(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}function W(e,t,n,r,i,o){for(var a,s=0,l=t.length,c=o.length;st?1:e>=t?0:NaN}function $(e){return function(){this.removeAttribute(e)}}function K(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Q(e,t){return function(){this.setAttribute(e,t)}}function Z(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function J(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}}function ee(e,t){return function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function te(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function ne(e){return function(){this.style.removeProperty(e)}}function re(e,t,n){return function(){this.style.setProperty(e,t,n)}}function ie(e,t,n){return function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function oe(e,t){return e.style.getPropertyValue(t)||te(e).getComputedStyle(e,null).getPropertyValue(t)}function ae(e){return function(){delete this[e]}}function se(e,t){return function(){this[e]=t}}function le(e,t){return function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}}function ce(e){return e.trim().split(/^|\s+/)}function ue(e){return e.classList||new he(e)}function he(e){this._node=e,this._names=ce(e.getAttribute("class")||"")}function de(e,t){for(var n=ue(e),r=-1,i=t.length;++r=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};var Re=[null];function Me(e,t){this._groups=e,this._parents=t}function Le(){return new Me([[document.documentElement]],Re)}function Be(e){return"string"==typeof e?new Me([[document.querySelector(e)]],[document.documentElement]):new Me([[e]],Re)}Me.prototype=Le.prototype={constructor:Me,select:function(e){"function"!=typeof e&&(e=N(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i=_&&(_=T+1);!(y=b[_])&&++_=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(e){function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}e||(e=q);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o1?this.each((null==t?ne:"function"==typeof t?ie:re)(e,t,null==n?"":n)):oe(this.node(),e)},property:function(e,t){return arguments.length>1?this.each((null==t?ae:"function"==typeof t?le:se)(e,t)):this.node()[e]},classed:function(e,t){var n=ce(e+"");if(arguments.length<2){for(var r=ue(this.node()),i=-1,o=n.length;++i=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}}))}(e+""),a=o.length;if(!(arguments.length<2)){for(s=t?Oe:Ie,r=0;rGe(e,t)))},select:Be,selectAll:function(e){return"string"==typeof e?new Me([document.querySelectorAll(e)],[document.documentElement]):new Me([null==e?[]:R(e)],Re)},selection:Le,selector:N,selectorAll:L,style:oe,window:te},Symbol.toStringTag,{value:"Module"}));function Ve(e,t){return et?1:e>=t?0:NaN}function We(e){let t=e,n=e;function r(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)<0?r=o+1:i=o}return r}return 1===e.length&&(t=(t,n)=>e(t)-n,n=function(e){return(t,n)=>Ve(e(t),n)}(e)),{left:r,center:function(e,n,i,o){null==i&&(i=0),null==o&&(o=e.length);const a=r(e,n,i,o-1);return a>i&&t(e[a-1],n)>-t(e[a],n)?a-1:a},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[o],t)>0?i=o:r=o+1}return r}}}function Xe(e){return null===e?NaN:+e}const Ye=We(Ve),qe=Ye.right,$e=Ye.left,Ke=We(Xe).center,Qe=qe;function Ze(e,t){let n=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&++n;else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i=+i)>=i&&++n}return n}function Je(e){return 0|e.length}function et(e){return!(e>0)}function tt(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function nt(e,t){let n,r=0,i=0,o=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(n=t-i,i+=n/++r,o+=n*(t-i));else{let a=-1;for(let s of e)null!=(s=t(s,++a,e))&&(s=+s)>=s&&(n=s-i,i+=n/++r,o+=n*(s-i))}if(r>1)return o/(r-1)}function rt(e,t){const n=nt(e,t);return n?Math.sqrt(n):n}function it(e,t){let n,r;if(void 0===t)for(const t of e)null!=t&&(void 0===n?t>=t&&(n=r=t):(n>t&&(n=t),r=o&&(n=r=o):(n>o&&(n=o),r0){for(o=e[--i];i>0&&(t=o,n=e[--i],o=t+n,r=n-(o-t),!r););i>0&&(r<0&&e[i-1]<0||r>0&&e[i-1]>0)&&(n=2*r,t=o+n,n==t-o&&(o=t))}return o}}]),e}();let at=function(e){i(n,e);var t=o(n);function n(e,r=ht){var i;if(d(this,n),i=t.call(this),Object.defineProperties(a(i),{_intern:{value:new Map},_key:{value:r}}),null!=e)for(const[t,n]of e)i.set(t,n);return i}return f(n,[{key:"get",value:function(e){return r(h(n.prototype),"get",this).call(this,lt(this,e))}},{key:"has",value:function(e){return r(h(n.prototype),"has",this).call(this,lt(this,e))}},{key:"set",value:function(e,t){return r(h(n.prototype),"set",this).call(this,ct(this,e),t)}},{key:"delete",value:function(e){return r(h(n.prototype),"delete",this).call(this,ut(this,e))}}]),n}(s(Map)),st=function(e){i(n,e);var t=o(n);function n(e,r=ht){var i;if(d(this,n),i=t.call(this),Object.defineProperties(a(i),{_intern:{value:new Map},_key:{value:r}}),null!=e)for(const t of e)i.add(t);return i}return f(n,[{key:"has",value:function(e){return r(h(n.prototype),"has",this).call(this,lt(this,e))}},{key:"add",value:function(e){return r(h(n.prototype),"add",this).call(this,ct(this,e))}},{key:"delete",value:function(e){return r(h(n.prototype),"delete",this).call(this,ut(this,e))}}]),n}(s(Set));function lt({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function ct({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function ut({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(n),e.delete(r)),n}function ht(e){return null!==e&&"object"==typeof e?e.valueOf():e}function dt(e){return e}function pt(e,...t){return gt(e,dt,dt,t)}function ft(e,t,...n){return gt(e,dt,t,n)}function mt(e){if(1!==e.length)throw new Error("duplicate key");return e[0]}function gt(e,t,n,r){return function e(i,o){if(o>=r.length)return n(i);const a=new at,s=r[o++];let l=-1;for(const e of i){const t=s(e,++l,i),n=a.get(t);n?n.push(e):a.set(t,[e])}for(const[t,n]of a)a.set(t,e(n,o));return t(a)}(e,0)}function bt(e,t){return Array.from(t,(t=>e[t]))}function vt(e,...t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");e=Array.from(e);let[n=Ve]=t;if(1===n.length||t.length>1){const r=Uint32Array.from(e,((e,t)=>t));return t.length>1?(t=t.map((t=>e.map(t))),r.sort(((e,n)=>{for(const r of t){const t=Ve(r[e],r[n]);if(t)return t}}))):(n=e.map(n),r.sort(((e,t)=>Ve(n[e],n[t])))),bt(e,r)}return e.sort(n)}var yt=Array.prototype.slice;function Tt(e){return function(){return e}}var _t=Math.sqrt(50),Et=Math.sqrt(10),xt=Math.sqrt(2);function wt(e,t,n){var r,i,o,a,s=-1;if(n=+n,(e=+e)==(t=+t)&&n>0)return[e];if((r=t0){let n=Math.round(e/a),r=Math.round(t/a);for(n*at&&--r,o=new Array(i=r-n+1);++st&&--r,o=new Array(i=r-n+1);++s=0?(o>=_t?10:o>=Et?5:o>=xt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=_t?10:o>=Et?5:o>=xt?2:1)}function kt(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=_t?i*=10:o>=Et?i*=5:o>=xt&&(i*=2),t0?(e=Math.floor(e/i)*i,t=Math.ceil(t/i)*i):i<0&&(e=Math.ceil(e*i)/i,t=Math.floor(t*i)/i),r=i}}function Ct(e){return Math.ceil(Math.log(Ze(e))/Math.LN2)+1}function It(){var e=dt,t=it,n=Ct;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,s=new Array(a);for(i=0;i=u)if(e>=u&&t===it){const e=St(c,u,n);isFinite(e)&&(e>0?u=(Math.floor(u/e)+1)*e:e<0&&(u=(Math.ceil(u*-e)+1)/-e))}else h.pop()}for(var d=h.length;h[0]<=c;)h.shift(),--d;for(;h[d-1]>u;)h.pop(),--d;var p,f=new Array(d+1);for(i=0;i<=d;++i)(p=f[i]=[]).x0=i>0?h[i-1]:c,p.x1=i=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n=i)&&(n=i)}return n}function Dt(e,t){let n;if(void 0===t)for(const t of e)null!=t&&(n>t||void 0===n&&t>=t)&&(n=t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function Pt(e,t,n=0,r=e.length-1,i=Ve){for(;r>n;){if(r-n>600){const o=r-n+1,a=t-n+1,s=Math.log(o),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);Pt(e,t,Math.max(n,Math.floor(t-a*l/o+c)),Math.min(r,Math.floor(t+(o-a)*l/o+c)),i)}const o=e[t];let a=n,s=r;for(Nt(e,n,t),i(e[r],o)>0&&Nt(e,n,r);a0;)--s}0===i(e[n],o)?Nt(e,n,s):(++s,Nt(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Nt(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function Rt(e,t,n){if(r=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(yield t);else{let n=-1;for(let r of e)null!=(r=t(r,++n,e))&&(r=+r)>=r&&(yield r)}}(e,n))).length){if((t=+t)<=0||r<2)return Dt(e);if(t>=1)return Ot(e);var r,i=(r-1)*t,o=Math.floor(i),a=Ot(Pt(e,o).subarray(0,o+1));return a+(Dt(e.subarray(o+1))-a)*(i-o)}}function Mt(e,t,n=Xe){if(r=e.length){if((t=+t)<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e);return a+(+n(e[o+1],o+1,e)-a)*(i-o)}}function Lt(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n=o)&&(n=o,r=i);return r}function Bt(e,t){let n=0,r=0;if(void 0===t)for(let t of e)null!=t&&(t=+t)>=t&&(++n,r+=t);else{let i=-1;for(let o of e)null!=(o=t(o,++i,e))&&(o=+o)>=o&&(++n,r+=o)}if(n)return r/n}function Ft(e,t){return Rt(e,.5,t)}function Ut(e){return Array.from(function*(e){for(const t of e)yield*t}(e))}function jt(e,t){let n,r=-1,i=-1;if(void 0===t)for(const t of e)++i,null!=t&&(n>t||void 0===n&&t>=t)&&(n=t,r=i);else for(let o of e)null!=(o=t(o,++i,e))&&(n>o||void 0===n&&o>=o)&&(n=o,r=i);return r}function Ht(e,t){return[e,t]}function Gt(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((t-e)/n)),o=new Array(i);++re(...t)}(e.pop()),n=(e=e.map(tt)).map(Je),r=e.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||n.some(et))return o;for(;;){o.push(i.map(((t,n)=>e[n][t])));let a=r;for(;++i[a]===n[a];){if(0===a)return t?o.map(t):o;i[a--]=0}}},cumsum:function(e,t){var n=0,r=0;return Float64Array.from(e,void 0===t?e=>n+=+e||0:i=>n+=+t(i,r++,e)||0)},descending:function(e,t){return te?1:t>=e?0:NaN},deviation:rt,extent:it,Adder:ot,fsum:function(e,t){const n=new ot;if(void 0===t)for(let t of e)(t=+t)&&n.add(t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&n.add(i)}return+n},fcumsum:function(e,t){const n=new ot;let r=-1;return Float64Array.from(e,void 0===t?e=>n.add(+e||0):i=>n.add(+t(i,++r,e)||0))},group:pt,groups:function(e,...t){return gt(e,Array.from,dt,t)},index:function(e,...t){return gt(e,dt,mt,t)},indexes:function(e,...t){return gt(e,Array.from,mt,t)},rollup:ft,rollups:function(e,t,...n){return gt(e,Array.from,t,n)},groupSort:function(e,t,n){return(1===t.length?vt(ft(e,t,n),(([e,t],[n,r])=>Ve(t,r)||Ve(e,n))):vt(pt(e,n),(([e,n],[r,i])=>t(n,i)||Ve(e,r)))).map((([e])=>e))},bin:It,histogram:It,thresholdFreedmanDiaconis:function(e,t,n){return Math.ceil((n-t)/(2*(Rt(e,.75)-Rt(e,.25))*Math.pow(Ze(e),-1/3)))},thresholdScott:function(e,t,n){return Math.ceil((n-t)/(3.5*rt(e)*Math.pow(Ze(e),-1/3)))},thresholdSturges:Ct,max:Ot,maxIndex:Lt,mean:Bt,median:Ft,merge:Ut,min:Dt,minIndex:jt,nice:At,pairs:function(e,t=Ht){const n=[];let r,i=!1;for(const o of e)i&&n.push(t(r,o)),r=o,i=!0;return n},permute:bt,quantile:Rt,quantileSorted:Mt,quickselect:Pt,range:Gt,least:function(e,t=Ve){let n,r=!1;if(1===t.length){let i;for(const o of e){const e=t(o);(r?Ve(e,i)<0:0===Ve(e,e))&&(n=o,i=e,r=!0)}}else for(const i of e)(r?t(i,n)<0:0===t(i,i))&&(n=i,r=!0);return n},leastIndex:zt,greatest:function(e,t=Ve){let n,r=!1;if(1===t.length){let i;for(const o of e){const e=t(o);(r?Ve(e,i)>0:0===Ve(e,e))&&(n=o,i=e,r=!0)}}else for(const i of e)(r?t(i,n)>0:0===t(i,i))&&(n=i,r=!0);return n},greatestIndex:function(e,t=Ve){if(1===t.length)return Lt(e,t);let n,r=-1,i=-1;for(const o of e)++i,(r<0?0===t(o,o):t(o,n)>0)&&(n=o,r=i);return r},scan:function(e,t){const n=zt(e,t);return n<0?void 0:n},shuffle:Vt,shuffler:Wt,sum:Xt,ticks:wt,tickIncrement:St,tickStep:kt,transpose:Yt,variance:nt,zip:function(){return Yt(arguments)},every:function(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(!t(r,++n,e))return!1;return!0},some:function(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");let n=-1;for(const r of e)if(t(r,++n,e))return!0;return!1},filter:function(e,t){if("function"!=typeof t)throw new TypeError("test is not a function");const n=[];let r=-1;for(const i of e)t(i,++r,e)&&n.push(i);return n},map:function(e,t){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof t)throw new TypeError("mapper is not a function");return Array.from(e,((n,r)=>t(n,r,e)))},reduce:function(e,t,n){if("function"!=typeof t)throw new TypeError("reducer is not a function");const r=e[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:n}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)n=t(n,o,++a,e);return n},reverse:function(e){if("function"!=typeof e[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(e).reverse()},sort:vt,difference:function(e,...t){e=new Set(e);for(const n of t)for(const t of n)e.delete(t);return e},disjoint:function(e,t){const n=t[Symbol.iterator](),r=new Set;for(const t of e){if(r.has(t))return!1;let e,i;for(;({value:e,done:i}=n.next())&&!i;){if(Object.is(t,e))return!1;r.add(e)}}return!0},intersection:function(e,...t){e=new Set(e),t=t.map($t);e:for(const n of e)for(const r of t)if(!r.has(n)){e.delete(n);continue e}return e},subset:function(e,t){return Kt(t,e)},superset:Kt,union:function(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t},InternMap:at,InternSet:st},Symbol.toStringTag,{value:"Module"}));function Zt(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function Jt(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const en=Symbol("implicit");function tn(){var e=new at,t=[],n=[],r=en;function i(i){let o=e.get(i);if(void 0===o){if(r!==en)return r;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new at;for(const r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return tn(t,n).unknown(r)},Zt.apply(i,arguments),i}function nn(){var e,t,n=tn().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function h(){var n=r().length,h=a>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===n?Sn(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===n?Sn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=fn.exec(e))?new Cn(t[1],t[2],t[3],1):(t=mn.exec(e))?new Cn(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=gn.exec(e))?Sn(t[1],t[2],t[3],t[4]):(t=bn.exec(e))?Sn(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=vn.exec(e))?Pn(t[1],t[2]/100,t[3]/100,1):(t=yn.exec(e))?Pn(t[1],t[2]/100,t[3]/100,t[4]):Tn.hasOwnProperty(e)?wn(Tn[e]):"transparent"===e?new Cn(NaN,NaN,NaN,0):null}function wn(e){return new Cn(e>>16&255,e>>8&255,255&e,1)}function Sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Cn(e,t,n,r)}function kn(e){return e instanceof sn||(e=xn(e)),e?new Cn((e=e.rgb()).r,e.g,e.b,e.opacity):new Cn}function An(e,t,n,r){return 1===arguments.length?kn(e):new Cn(e,t,n,null==r?1:r)}function Cn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function In(){return"#"+Dn(this.r)+Dn(this.g)+Dn(this.b)}function On(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===e?")":", "+e+")")}function Dn(e){return((e=Math.max(0,Math.min(255,Math.round(e)||0)))<16?"0":"")+e.toString(16)}function Pn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Mn(e,t,n,r)}function Nn(e){if(e instanceof Mn)return new Mn(e.h,e.s,e.l,e.opacity);if(e instanceof sn||(e=xn(e)),!e)return new Mn;if(e instanceof Mn)return e;var t=(e=e.rgb()).r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(a=t===o?(n-r)/s+6*(n0&&l<1?0:a,new Mn(a,s,l,e.opacity)}function Rn(e,t,n,r){return 1===arguments.length?Nn(e):new Mn(e,t,n,null==r?1:r)}function Mn(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Ln(e,t,n){return 255*(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)}on(sn,xn,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:_n,formatHex:_n,formatHsl:function(){return Nn(this).formatHsl()},formatRgb:En,toString:En}),on(Cn,An,an(sn,{brighter:function(e){return e=null==e?cn:Math.pow(cn,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=null==e?ln:Math.pow(ln,e),new Cn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:In,formatHex:In,formatRgb:On,toString:On})),on(Mn,Rn,an(sn,{brighter:function(e){return e=null==e?cn:Math.pow(cn,e),new Mn(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=null==e?ln:Math.pow(ln,e),new Mn(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+360*(this.h<0),t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Cn(Ln(e>=240?e-240:e+120,i,r),Ln(e,i,r),Ln(e<120?e+240:e-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return(1===(e=isNaN(e)?1:Math.max(0,Math.min(1,e)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===e?")":", "+e+")")}}));const Bn=Math.PI/180,Fn=180/Math.PI,Un=.96422,jn=1,Hn=.82521,Gn=4/29,zn=6/29,Vn=3*zn*zn,Wn=zn*zn*zn;function Xn(e){if(e instanceof qn)return new qn(e.l,e.a,e.b,e.opacity);if(e instanceof tr)return nr(e);e instanceof Cn||(e=kn(e));var t,n,r=Zn(e.r),i=Zn(e.g),o=Zn(e.b),a=$n((.2225045*r+.7168786*i+.0606169*o)/jn);return r===i&&i===o?t=n=a:(t=$n((.4360747*r+.3850649*i+.1430804*o)/Un),n=$n((.0139322*r+.0971045*i+.7141733*o)/Hn)),new qn(116*a-16,500*(t-a),200*(a-n),e.opacity)}function Yn(e,t,n,r){return 1===arguments.length?Xn(e):new qn(e,t,n,null==r?1:r)}function qn(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function $n(e){return e>Wn?Math.pow(e,1/3):e/Vn+Gn}function Kn(e){return e>zn?e*e*e:Vn*(e-Gn)}function Qn(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function Zn(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Jn(e){if(e instanceof tr)return new tr(e.h,e.c,e.l,e.opacity);if(e instanceof qn||(e=Xn(e)),0===e.a&&0===e.b)return new tr(NaN,0()=>e;function mr(e){return 1==(e=+e)?gr:function(t,n){return n-t?function(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}(t,n,e):fr(isNaN(t)?n:t)}}function gr(e,t){var n=t-e;return n?function(e,t){return function(n){return e+n*t}}(e,n):fr(isNaN(e)?t:e)}const br=function e(t){var n=mr(t);function r(e,t){var r=n((e=An(e)).r,(t=An(t)).r),i=n(e.g,t.g),o=n(e.b,t.b),a=gr(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=o(t),e.opacity=a(t),e+""}}return r.gamma=e,r}(1);function vr(e,t){t||(t=[]);var n,r=e?Math.min(t.length,e.length):0,i=t.slice();return function(o){for(n=0;no&&(i=t.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:_r(n,r)})),o=wr.lastIndex;return o180?t+=360:t-e>180&&(e+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_r(e,t)})):t&&n.push(i(n)+"rotate("+t+r)}(o.rotate,a.rotate,s,l),function(e,t,n,o){e!==t?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_r(e,t)}):t&&n.push(i(n)+"skewX("+t+r)}(o.skewX,a.skewX,s,l),function(e,t,n,r,o,a){if(e!==n||t!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:_r(e,n)},{i:s-2,x:_r(t,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(e){for(var t,n=-1,r=l.length;++nt&&(n=e,e=t,t=n),c=function(n){return Math.max(e,Math.min(t,n))}),r=l>2?Gr:Hr,i=o=null,h}function h(t){return null==t||isNaN(t=+t)?n:(i||(i=r(a.map(e),s,l)))(e(c(t)))}return h.invert=function(n){return c(t((o||(o=r(s,a.map(e),_r)))(n)))},h.domain=function(e){return arguments.length?(a=Array.from(e,Br),u()):a.slice()},h.range=function(e){return arguments.length?(s=Array.from(e),u()):s.slice()},h.rangeRound=function(e){return s=Array.from(e),l=Ar,u()},h.clamp=function(e){return arguments.length?(c=!!e||Ur,u()):c!==Ur},h.interpolate=function(e){return arguments.length?(l=e,u()):l},h.unknown=function(e){return arguments.length?(n=e,h):n},function(n,r){return e=n,t=r,u()}}function Wr(){return Vr()(Ur,Ur)}function Xr(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Yr(e){return(e=Xr(Math.abs(e)))?e[1]:NaN}var qr,$r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Kr(e){if(!(t=$r.exec(e)))throw new Error("invalid format: "+e);var t;return new Qr({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Qr(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Zr(e,t){var n=Xr(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Kr.prototype=Qr.prototype,Qr.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Jr={"%":(e,t)=>(100*e).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Zr(100*e,t),r:Zr,s:function(e,t){var n=Xr(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(qr=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Xr(e,Math.max(0,t+o-1))[0]},X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function ei(e){return e}var ti,ni,ri,ii=Array.prototype.map,oi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ai(e){var t,n,r=void 0===e.grouping||void 0===e.thousands?ei:(t=ii.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,o=[],a=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(n)}),i=void 0===e.currency?"":e.currency[0]+"",o=void 0===e.currency?"":e.currency[1]+"",a=void 0===e.decimal?".":e.decimal+"",s=void 0===e.numerals?ei:function(e){return function(t){return t.replace(/[0-9]/g,(function(t){return e[+t]}))}}(ii.call(e.numerals,String)),l=void 0===e.percent?"%":e.percent+"",c=void 0===e.minus?"−":e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var t=(e=Kr(e)).fill,n=e.align,h=e.sign,d=e.symbol,p=e.zero,f=e.width,m=e.comma,g=e.precision,b=e.trim,v=e.type;"n"===v?(m=!0,v="g"):Jr[v]||(void 0===g&&(g=12),b=!0,v="g"),(p||"0"===t&&"="===n)&&(p=!0,t="0",n="=");var y="$"===d?i:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",T="$"===d?o:/[%p]/.test(v)?l:"",_=Jr[v],E=/[defgprs%]/.test(v);function x(e){var i,o,l,d=y,x=T;if("c"===v)x=_(e)+x,e="";else{var w=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:_(Math.abs(e),g),b&&(e=function(e){e:for(var t,n=e.length,r=1,i=-1;r0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),w&&0==+e&&"+"!==h&&(w=!1),d=(w?"("===h?h:c:"-"===h||"("===h?"":h)+d,x=("s"===v?oi[8+qr/3]:"")+x+(w&&"("===h?")":""),E)for(i=-1,o=e.length;++i(l=e.charCodeAt(i))||l>57){x=(46===l?a+e.slice(i+1):e.slice(i))+x,e=e.slice(0,i);break}}m&&!p&&(e=r(e,1/0));var S=d.length+e.length+x.length,k=S>1)+d+e+x+k.slice(S);break;default:e=k+d+e+x}return s(e)}return g=void 0===g?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),x.toString=function(){return e+""},x}return{format:h,formatPrefix:function(e,t){var n=h(((e=Kr(e)).type="f",e)),r=3*Math.max(-8,Math.min(8,Math.floor(Yr(t)/3))),i=Math.pow(10,-r),o=oi[8+r/3];return function(e){return n(i*e)+o}}}}function si(e){return ti=ai(e),ni=ti.format,ri=ti.formatPrefix,ti}function li(e){return Math.max(0,-Yr(Math.abs(e)))}function ci(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Yr(t)/3)))-Yr(Math.abs(e)))}function ui(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Yr(t)-Yr(e))+1}si({thousands:",",grouping:[3],currency:["$",""]});const hi=Object.freeze(Object.defineProperty({__proto__:null,formatDefaultLocale:si,get format(){return ni},get formatPrefix(){return ri},formatLocale:ai,formatSpecifier:Kr,FormatSpecifier:Qr,precisionFixed:li,precisionPrefix:ci,precisionRound:ui},Symbol.toStringTag,{value:"Module"}));function di(e,t,n,r){var i,o=kt(e,t,n);switch((r=Kr(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(e),Math.abs(t));return null!=r.precision||isNaN(i=ci(o,a))||(r.precision=i),ri(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ui(o,Math.max(Math.abs(e),Math.abs(t))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=li(o))||(r.precision=i-2*("%"===r.type))}return ni(r)}function pi(e){var t=e.domain;return e.ticks=function(e){var n=t();return wt(n[0],n[n.length-1],null==e?10:e)},e.tickFormat=function(e,n){var r=t();return di(r[0],r[r.length-1],null==e?10:e,n)},e.nice=function(n){null==n&&(n=10);var r,i,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c0;){if((i=St(l,c,n))===r)return o[a]=l,o[s]=c,t(o);if(i>0)l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i;else{if(!(i<0))break;l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i}r=i}return e},e}function fi(){var e=Wr();return e.copy=function(){return zr(e,fi())},Zt.apply(e,arguments),pi(e)}function mi(e,t){var n,r=0,i=(e=e.slice()).length-1,o=e[r],a=e[i];return a-e(-t,n)}function Ei(e){const t=e(gi,bi),n=t.domain;let r,i,o=10;function a(){return r=function(e){return e===Math.E?Math.log:10===e&&Math.log10||2===e&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}(o),i=function(e){return 10===e?Ti:e===Math.E?Math.exp:t=>Math.pow(e,t)}(o),n()[0]<0?(r=_i(r),i=_i(i),e(vi,yi)):e(gi,bi),t}return t.base=function(e){return arguments.length?(o=+e,a()):o},t.domain=function(e){return arguments.length?(n(e),a()):n()},t.ticks=e=>{const t=n();let a=t[0],s=t[t.length-1];const l=s0){for(;h<=d;++h)for(c=1;cs)break;f.push(u)}}else for(;h<=d;++h)for(c=o-1;c>=1;--c)if(u=h>0?c/i(-h):c*i(h),!(us)break;f.push(u)}2*f.length{if(null==e&&(e=10),null==n&&(n=10===o?"s":","),"function"!=typeof n&&(o%1||null!=(n=Kr(n)).precision||(n.trim=!0),n=ni(n)),e===1/0)return n;const a=Math.max(1,o*e/t.ticks().length);return e=>{let t=e/i(Math.round(r(e)));return t*on(mi(n(),{floor:e=>i(Math.floor(r(e))),ceil:e=>i(Math.ceil(r(e)))})),t}function xi(){const e=Ei(Vr()).domain([1,10]);return e.copy=()=>zr(e,xi()).base(e.base()),Zt.apply(e,arguments),e}function wi(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Si(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function ki(e){var t=1,n=e(wi(t),Si(t));return n.constant=function(n){return arguments.length?e(wi(t=+n),Si(t)):t},pi(n)}function Ai(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function Ci(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Ii(e){return e<0?-e*e:e*e}function Oi(e){var t=e(Ur,Ur),n=1;return t.exponent=function(t){return arguments.length?1===(n=+t)?e(Ur,Ur):.5===n?e(Ci,Ii):e(Ai(n),Ai(1/n)):n},pi(t)}function Di(){var e=Oi(Vr());return e.copy=function(){return zr(e,Di()).exponent(e.exponent())},Zt.apply(e,arguments),e}function Pi(e){return Math.sign(e)*e*e}function Ni(){var e,t=[],n=[],r=[];function i(){var e=0,i=Math.max(1,n.length);for(r=new Array(i-1);++e0?r[i-1]:t[0],i(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{const t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),null==n?1:Math.floor(n)),e),i.range=(n,r,o)=>{const a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n0))return a;let s;do{a.push(s=new Date(+n)),t(n,o),e(n)}while(sLi((t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)}),((e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););})),n&&(i.count=(t,r)=>(Ri.setTime(+t),Mi.setTime(+r),e(Ri),e(Mi),Math.floor(n(Ri,Mi))),i.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?t=>r(t)%e==0:t=>i.count(0,t)%e==0):i:null)),i}const Bi=Li((()=>{}),((e,t)=>{e.setTime(+e+t)}),((e,t)=>t-e));Bi.every=e=>(e=Math.floor(e),isFinite(e)&&e>0?e>1?Li((t=>{t.setTime(Math.floor(t/e)*e)}),((t,n)=>{t.setTime(+t+n*e)}),((t,n)=>(n-t)/e)):Bi:null),Bi.range;const Fi=1e3,Ui=6e4,ji=36e5,Hi=864e5,Gi=6048e5,zi=2592e6,Vi=31536e6,Wi=Li((e=>{e.setTime(e-e.getMilliseconds())}),((e,t)=>{e.setTime(+e+t*Fi)}),((e,t)=>(t-e)/Fi),(e=>e.getUTCSeconds()));Wi.range;const Xi=Li((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fi)}),((e,t)=>{e.setTime(+e+t*Ui)}),((e,t)=>(t-e)/Ui),(e=>e.getMinutes()));Xi.range;const Yi=Li((e=>{e.setUTCSeconds(0,0)}),((e,t)=>{e.setTime(+e+t*Ui)}),((e,t)=>(t-e)/Ui),(e=>e.getUTCMinutes()));Yi.range;const qi=Li((e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Fi-e.getMinutes()*Ui)}),((e,t)=>{e.setTime(+e+t*ji)}),((e,t)=>(t-e)/ji),(e=>e.getHours()));qi.range;const $i=Li((e=>{e.setUTCMinutes(0,0,0)}),((e,t)=>{e.setTime(+e+t*ji)}),((e,t)=>(t-e)/ji),(e=>e.getUTCHours()));$i.range;const Ki=Li((e=>e.setHours(0,0,0,0)),((e,t)=>e.setDate(e.getDate()+t)),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ui)/Hi),(e=>e.getDate()-1));Ki.range;const Qi=Li((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Hi),(e=>e.getUTCDate()-1));Qi.range;const Zi=Li((e=>{e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+t)}),((e,t)=>(t-e)/Hi),(e=>Math.floor(e/Hi)));function Ji(e){return Li((t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)}),((e,t)=>{e.setDate(e.getDate()+7*t)}),((e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ui)/Gi))}Zi.range;const eo=Ji(0),to=Ji(1),no=Ji(2),ro=Ji(3),io=Ji(4),oo=Ji(5),ao=Ji(6);function so(e){return Li((t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCDate(e.getUTCDate()+7*t)}),((e,t)=>(t-e)/Gi))}eo.range,to.range,no.range,ro.range,io.range,oo.range,ao.range;const lo=so(0),co=so(1),uo=so(2),ho=so(3),po=so(4),fo=so(5),mo=so(6);lo.range,co.range,uo.range,ho.range,po.range,fo.range,mo.range;const go=Li((e=>{e.setDate(1),e.setHours(0,0,0,0)}),((e,t)=>{e.setMonth(e.getMonth()+t)}),((e,t)=>t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())),(e=>e.getMonth()));go.range;const bo=Li((e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)}),((e,t)=>t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())),(e=>e.getUTCMonth()));bo.range;const vo=Li((e=>{e.setMonth(0,1),e.setHours(0,0,0,0)}),((e,t)=>{e.setFullYear(e.getFullYear()+t)}),((e,t)=>t.getFullYear()-e.getFullYear()),(e=>e.getFullYear()));vo.every=e=>isFinite(e=Math.floor(e))&&e>0?Li((t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)}),((t,n)=>{t.setFullYear(t.getFullYear()+n*e)})):null,vo.range;const yo=Li((e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),((e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)}),((e,t)=>t.getUTCFullYear()-e.getUTCFullYear()),(e=>e.getUTCFullYear()));function To(e,t,n,r,i,o){const a=[[Wi,1,Fi],[Wi,5,5e3],[Wi,15,15e3],[Wi,30,3e4],[o,1,Ui],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,ji],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,Hi],[r,2,1728e5],[n,1,Gi],[t,1,zi],[t,3,7776e6],[e,1,Vi]];function s(t,n,r){const i=Math.abs(n-t)/r,o=We((([,,e])=>e)).right(a,i);if(o===a.length)return e.every(kt(t/Vi,n/Vi,r));if(0===o)return Bi.every(Math.max(kt(t,n,r),1));const[s,l]=a[i/a[o-1][2]isFinite(e=Math.floor(e))&&e>0?Li((t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),((t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)})):null,yo.range;const[_o,Eo]=To(yo,bo,lo,Zi,$i,Yi),[xo,wo]=To(vo,go,eo,Ki,qi,Xi);function So(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function ko(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Ao(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}var Co,Io,Oo,Do={"-":"",_:" ",0:"0"},Po=/^\s*\d+/,No=/^%/,Ro=/[\\^$*+?|[\]().{}]/g;function Mo(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[e.toLowerCase(),t])))}function Uo(e,t,n){var r=Po.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function jo(e,t,n){var r=Po.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Ho(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Go(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function zo(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Vo(e,t,n){var r=Po.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Wo(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Xo(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Yo(e,t,n){var r=Po.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function qo(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function $o(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function Ko(e,t,n){var r=Po.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Qo(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function Zo(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Jo(e,t,n){var r=Po.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function ea(e,t,n){var r=Po.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function ta(e,t,n){var r=Po.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function na(e,t,n){var r=No.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ra(e,t,n){var r=Po.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function ia(e,t,n){var r=Po.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function oa(e,t){return Mo(e.getDate(),t,2)}function aa(e,t){return Mo(e.getHours(),t,2)}function sa(e,t){return Mo(e.getHours()%12||12,t,2)}function la(e,t){return Mo(1+Ki.count(vo(e),e),t,3)}function ca(e,t){return Mo(e.getMilliseconds(),t,3)}function ua(e,t){return ca(e,t)+"000"}function ha(e,t){return Mo(e.getMonth()+1,t,2)}function da(e,t){return Mo(e.getMinutes(),t,2)}function pa(e,t){return Mo(e.getSeconds(),t,2)}function fa(e){var t=e.getDay();return 0===t?7:t}function ma(e,t){return Mo(eo.count(vo(e)-1,e),t,2)}function ga(e){var t=e.getDay();return t>=4||0===t?io(e):io.ceil(e)}function ba(e,t){return e=ga(e),Mo(io.count(vo(e),e)+(4===vo(e).getDay()),t,2)}function va(e){return e.getDay()}function ya(e,t){return Mo(to.count(vo(e)-1,e),t,2)}function Ta(e,t){return Mo(e.getFullYear()%100,t,2)}function _a(e,t){return Mo((e=ga(e)).getFullYear()%100,t,2)}function Ea(e,t){return Mo(e.getFullYear()%1e4,t,4)}function xa(e,t){var n=e.getDay();return Mo((e=n>=4||0===n?io(e):io.ceil(e)).getFullYear()%1e4,t,4)}function wa(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Mo(t/60|0,"0",2)+Mo(t%60,"0",2)}function Sa(e,t){return Mo(e.getUTCDate(),t,2)}function ka(e,t){return Mo(e.getUTCHours(),t,2)}function Aa(e,t){return Mo(e.getUTCHours()%12||12,t,2)}function Ca(e,t){return Mo(1+Qi.count(yo(e),e),t,3)}function Ia(e,t){return Mo(e.getUTCMilliseconds(),t,3)}function Oa(e,t){return Ia(e,t)+"000"}function Da(e,t){return Mo(e.getUTCMonth()+1,t,2)}function Pa(e,t){return Mo(e.getUTCMinutes(),t,2)}function Na(e,t){return Mo(e.getUTCSeconds(),t,2)}function Ra(e){var t=e.getUTCDay();return 0===t?7:t}function Ma(e,t){return Mo(lo.count(yo(e)-1,e),t,2)}function La(e){var t=e.getUTCDay();return t>=4||0===t?po(e):po.ceil(e)}function Ba(e,t){return e=La(e),Mo(po.count(yo(e),e)+(4===yo(e).getUTCDay()),t,2)}function Fa(e){return e.getUTCDay()}function Ua(e,t){return Mo(co.count(yo(e)-1,e),t,2)}function ja(e,t){return Mo(e.getUTCFullYear()%100,t,2)}function Ha(e,t){return Mo((e=La(e)).getUTCFullYear()%100,t,2)}function Ga(e,t){return Mo(e.getUTCFullYear()%1e4,t,4)}function za(e,t){var n=e.getUTCDay();return Mo((e=n>=4||0===n?po(e):po.ceil(e)).getUTCFullYear()%1e4,t,4)}function Va(){return"+0000"}function Wa(){return"%"}function Xa(e){return+e}function Ya(e){return Math.floor(+e/1e3)}function qa(e){return new Date(e)}function $a(e){return e instanceof Date?+e:+new Date(+e)}function Ka(e,t,n,r,i,o,a,s,l,c){var u=Wr(),h=u.invert,d=u.domain,p=c(".%L"),f=c(":%S"),m=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),v=c("%b %d"),y=c("%B"),T=c("%Y");function _(e){return(l(e)=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Xa,s:Ya,S:pa,u:fa,U:ma,V:ba,w:va,W:ya,x:null,X:null,y:Ta,Y:Ea,Z:wa,"%":Wa},T={a:function(e){return a[e.getUTCDay()]},A:function(e){return o[e.getUTCDay()]},b:function(e){return l[e.getUTCMonth()]},B:function(e){return s[e.getUTCMonth()]},c:null,d:Sa,e:Sa,f:Oa,g:Ha,G:za,H:ka,I:Aa,j:Ca,L:Ia,m:Da,M:Pa,p:function(e){return i[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Xa,s:Ya,S:Na,u:Ra,U:Ma,V:Ba,w:Fa,W:Ua,x:null,X:null,y:ja,Y:Ga,Z:Va,"%":Wa},_={a:function(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=h.exec(t.slice(n));return r?(e.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=b.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=m.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,n,r){return w(e,t,n,r)},d:$o,e:$o,f:ta,g:Wo,G:Vo,H:Qo,I:Qo,j:Ko,L:ea,m:qo,M:Zo,p:function(e,t,n){var r=c.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1},q:Yo,Q:ra,s:ia,S:Jo,u:jo,U:Ho,V:Go,w:Uo,W:zo,x:function(e,t,r){return w(e,n,t,r)},X:function(e,t,n){return w(e,r,t,n)},y:Wo,Y:Vo,Z:Xo,"%":na};function E(e,t){return function(n){var r,i,o,a=[],s=-1,l=0,c=e.length;for(n instanceof Date||(n=new Date(+n));++s53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=ko(Ao(o.y,0,1))).getUTCDay(),r=i>4||0===i?co.ceil(r):co(r),r=Qi.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=So(Ao(o.y,0,1))).getDay(),r=i>4||0===i?to.ceil(r):to(r),r=Ki.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?ko(Ao(o.y,0,1)).getUTCDay():So(Ao(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ko(o)):So(o)}}function w(e,t,n,r){for(var i,o,a=0,s=t.length,l=n.length;a=l)return-1;if(37===(i=t.charCodeAt(a++))){if(i=t.charAt(a++),!(o=_[i in Do?t.charAt(a++):i])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return y.x=E(n,y),y.X=E(r,y),y.c=E(t,y),T.x=E(n,T),T.X=E(r,T),T.c=E(t,T),{format:function(e){var t=E(e+="",y);return t.toString=function(){return e},t},parse:function(e){var t=x(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=E(e+="",T);return t.toString=function(){return e},t},utcParse:function(e){var t=x(e+="",!0);return t.toString=function(){return e},t}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Io=Co.format,Co.parse,Oo=Co.utcFormat,Co.utcParse;const ns=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:nn,scalePoint:function(){return rn(nn.apply(null,arguments).paddingInner(1))},scaleIdentity:function e(t){var n;function r(e){return null==e||isNaN(e=+e)?n:e}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,Br),r):t.slice()},r.unknown=function(e){return arguments.length?(n=e,r):n},r.copy=function(){return e(t).unknown(n)},t=arguments.length?Array.from(t,Br):[0,1],pi(r)},scaleLinear:fi,scaleLog:xi,scaleSymlog:function e(){var t=ki(Vr());return t.copy=function(){return zr(t,e()).constant(t.constant())},Zt.apply(t,arguments)},scaleOrdinal:tn,scaleImplicit:en,scalePow:Di,scaleSqrt:function(){return Di.apply(null,arguments).exponent(.5)},scaleRadial:function e(){var t,n=Wr(),r=[0,1],i=!1;function o(e){var r=function(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}(n(e));return isNaN(r)?t:i?Math.round(r):r}return o.invert=function(e){return n.invert(Pi(e))},o.domain=function(e){return arguments.length?(n.domain(e),o):n.domain()},o.range=function(e){return arguments.length?(n.range((r=Array.from(e,Br)).map(Pi)),o):r.slice()},o.rangeRound=function(e){return o.range(e).round(!0)},o.round=function(e){return arguments.length?(i=!!e,o):i},o.clamp=function(e){return arguments.length?(n.clamp(e),o):n.clamp()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e(n.domain(),r).round(i).clamp(n.clamp()).unknown(t)},Zt.apply(o,arguments),pi(o)},scaleQuantile:Ni,scaleQuantize:function e(){var t,n=0,r=1,i=1,o=[.5],a=[0,1];function s(e){return null!=e&&e<=e?a[Qe(o,e,0,i)]:t}function l(){var e=-1;for(o=new Array(i);++e=i?[o[i-1],r]:[o[t-1],o[t]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return o.slice()},s.copy=function(){return e().domain([n,r]).range(a).unknown(t)},Zt.apply(pi(s),arguments)},scaleThreshold:function e(){var t,n=[.5],r=[0,1],i=1;function o(e){return null!=e&&e<=e?r[Qe(n,e,0,i)]:t}return o.domain=function(e){return arguments.length?(n=Array.from(e),i=Math.min(n.length,r.length-1),o):n.slice()},o.range=function(e){return arguments.length?(r=Array.from(e),i=Math.min(n.length,r.length-1),o):r.slice()},o.invertExtent=function(e){var t=r.indexOf(e);return[n[t-1],n[t]]},o.unknown=function(e){return arguments.length?(t=e,o):t},o.copy=function(){return e().domain(n).range(r).unknown(t)},Zt.apply(o,arguments)},scaleTime:function(){return Zt.apply(Ka(xo,wo,vo,go,eo,Ki,qi,Xi,Wi,Io).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},scaleUtc:function(){return Zt.apply(Ka(_o,Eo,yo,bo,lo,Qi,$i,Yi,Wi,Oo).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},scaleSequential:function e(){var t=pi(Qa()(Ur));return t.copy=function(){return Za(t,e())},Jt.apply(t,arguments)},scaleSequentialLog:function e(){var t=Ei(Qa()).domain([1,10]);return t.copy=function(){return Za(t,e()).base(t.base())},Jt.apply(t,arguments)},scaleSequentialPow:Ja,scaleSequentialSqrt:function(){return Ja.apply(null,arguments).exponent(.5)},scaleSequentialSymlog:function e(){var t=ki(Qa());return t.copy=function(){return Za(t,e()).constant(t.constant())},Jt.apply(t,arguments)},scaleSequentialQuantile:function e(){var t=[],n=Ur;function r(e){if(null!=e&&!isNaN(e=+e))return n((Qe(t,e,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let n of e)null==n||isNaN(n=+n)||t.push(n);return t.sort(Ve),r},r.interpolator=function(e){return arguments.length?(n=e,r):n},r.range=function(){return t.map(((e,r)=>n(r/(t.length-1))))},r.quantiles=function(e){return Array.from({length:e+1},((n,r)=>Rt(t,r/e)))},r.copy=function(){return e(n).domain(t)},Jt.apply(r,arguments)},scaleDiverging:function e(){var t=pi(es()(Ur));return t.copy=function(){return Za(t,e())},Jt.apply(t,arguments)},scaleDivergingLog:function e(){var t=Ei(es()).domain([.1,1,10]);return t.copy=function(){return Za(t,e()).base(t.base())},Jt.apply(t,arguments)},scaleDivergingPow:ts,scaleDivergingSqrt:function(){return ts.apply(null,arguments).exponent(.5)},scaleDivergingSymlog:function e(){var t=ki(es());return t.copy=function(){return Za(t,e()).constant(t.constant())},Jt.apply(t,arguments)},tickFormat:di},Symbol.toStringTag,{value:"Module"}));var rs,is={exports:{}},os={},as=new Uint8Array(16);function ss(){if(!rs&&!(rs="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rs(as)}const ls=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function cs(e){return"string"==typeof e&&ls.test(e)}for(var us,hs,ds=[],ps=0;ps<256;++ps)ds.push((ps+256).toString(16).substr(1));function fs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ds[e[t+0]]+ds[e[t+1]]+ds[e[t+2]]+ds[e[t+3]]+"-"+ds[e[t+4]]+ds[e[t+5]]+"-"+ds[e[t+6]]+ds[e[t+7]]+"-"+ds[e[t+8]]+ds[e[t+9]]+"-"+ds[e[t+10]]+ds[e[t+11]]+ds[e[t+12]]+ds[e[t+13]]+ds[e[t+14]]+ds[e[t+15]]).toLowerCase();if(!cs(n))throw TypeError("Stringified UUID is invalid");return n}var ms=0,gs=0;function bs(e){if(!cs(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function vs(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function Ts(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function _s(e,t,n,r,i,o){return Ts((a=Ts(Ts(t,e),Ts(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function Es(e,t,n,r,i,o,a){return _s(t&n|~t&r,e,t,i,o,a)}function xs(e,t,n,r,i,o,a){return _s(t&r|n&~r,e,t,i,o,a)}function ws(e,t,n,r,i,o,a){return _s(t^n^r,e,t,i,o,a)}function Ss(e,t,n,r,i,o,a){return _s(n^(t|~r),e,t,i,o,a)}const ks=vs("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>i%32&255,a=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>32-t}const Is=vs("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i>>0;y=v,v=b,b=Cs(g,30)>>>0,g=m,m=E}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+b>>>0,n[3]=n[3]+v>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));var Os=T(Object.freeze(Object.defineProperty({__proto__:null,v1:function(e,t,n){var r=t&&n||0,i=t||new Array(16),o=(e=e||{}).node||us,a=void 0!==e.clockseq?e.clockseq:hs;if(null==o||null==a){var s=e.random||(e.rng||ss)();null==o&&(o=us=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=hs=16383&(s[6]<<8|s[7]))}var l=void 0!==e.msecs?e.msecs:Date.now(),c=void 0!==e.nsecs?e.nsecs:gs+1,u=l-ms+(c-gs)/1e4;if(u<0&&void 0===e.clockseq&&(a=a+1&16383),(u<0||l>ms)&&void 0===e.nsecs&&(c=0),c>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");ms=l,gs=c,hs=a;var h=(1e4*(268435455&(l+=122192928e5))+c)%4294967296;i[r++]=h>>>24&255,i[r++]=h>>>16&255,i[r++]=h>>>8&255,i[r++]=255&h;var d=l/4294967296*1e4&268435455;i[r++]=d>>>8&255,i[r++]=255&d,i[r++]=d>>>24&15|16,i[r++]=d>>>16&255,i[r++]=a>>>8|128,i[r++]=255&a;for(var p=0;p<6;++p)i[r+p]=o[p];return t||fs(i)},v3:ks,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||ss)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return fs(r)},v5:Is,NIL:"00000000-0000-0000-0000-000000000000",version:function(e){if(!cs(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)},validate:cs,stringify:fs,parse:bs},Symbol.toStringTag,{value:"Module"}))),Ds="undefined"!=typeof Buffer?e=>Buffer.from(e).toString("base64"):e=>btoa(String.fromCharCode(...e)),Ps="undefined"!=typeof Buffer?e=>Buffer.from(e,"base64"):e=>Uint8Array.from(atob(e),(e=>e.charCodeAt(0)));os.encode=function(e){var t=Os.parse(e);return Ds(t).replace(/\+/g,"-").replace(/\//g,"_").substring(0,22)},os.decode=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/")+"==";return Os.stringify(Ps(t))},os.v4=function(){var e=Os.v4(null,new Uint8Array(16));return Ds(e).replace(/\+/g,"-").replace(/\//g,"_").substring(0,22)},os.nice=function(){var e=Os.v4(null,new Uint8Array(16));return e[0]=127&e[0],Ds(e).replace(/\+/g,"-").replace(/\//g,"_").substring(0,22)},is.exports=os;const Ns=y(is.exports);var Rs={exports:{}},Ms={},Ls={exports:{}};!function(e,t){var n="__lodash_hash_undefined__",r=1,i=2,o=9007199254740991,a="[object Arguments]",s="[object Array]",l="[object AsyncFunction]",c="[object Boolean]",u="[object Date]",h="[object Error]",d="[object Function]",p="[object GeneratorFunction]",f="[object Map]",m="[object Number]",g="[object Null]",b="[object Object]",v="[object Promise]",y="[object Proxy]",T="[object RegExp]",_="[object Set]",E="[object String]",x="[object Symbol]",w="[object Undefined]",S="[object WeakMap]",k="[object ArrayBuffer]",A="[object DataView]",C=/^\[object .+?Constructor\]$/,I=/^(?:0|[1-9]\d*)$/,O={};O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O[a]=O[s]=O[k]=O[c]=O[A]=O[u]=O[h]=O[d]=O[f]=O[m]=O[b]=O[T]=O[_]=O[E]=O[S]=!1;var D="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,P="object"==typeof self&&self&&self.Object===Object&&self,N=D||P||Function("return this")(),R=t&&!t.nodeType&&t,M=R&&e&&!e.nodeType&&e,L=M&&M.exports===R,B=L&&D.process,F=function(){try{return B&&B.binding&&B.binding("util")}catch(e){}}(),U=F&&F.isTypedArray;function j(e,t){for(var n=-1,r=null==e?0:e.length;++nc))return!1;var h=s.get(e);if(h&&s.get(t))return h==t;var d=-1,p=!0,f=n&i?new ke:void 0;for(s.set(e,t),s.set(t,e);++d-1},we.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Se.prototype.clear=function(){this.size=0,this.__data__={hash:new xe,map:new(he||we),string:new xe}},Se.prototype.delete=function(e){var t=Be(this,e).delete(e);return this.size-=t?1:0,t},Se.prototype.get=function(e){return Be(this,e).get(e)},Se.prototype.has=function(e){return Be(this,e).has(e)},Se.prototype.set=function(e,t){var n=Be(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},ke.prototype.add=ke.prototype.push=function(e){return this.__data__.set(e,n),this},ke.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new we,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof we){var r=n.__data__;if(!he||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Se(r)}return n.set(e,t),this.size=n.size,this};var Ue=se?function(e){return null==e?[]:(e=Object(e),function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n-1&&e%1==0&&e-1&&e%1==0&&e<=o}function $e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ke(e){return null!=e&&"object"==typeof e}var Qe=U?function(e){return function(t){return e(t)}}(U):function(e){return Ke(e)&&qe(e.length)&&!!O[Oe(e)]};function Ze(e){return null!=(t=e)&&qe(t.length)&&!Ye(t)?Ce(e):Re(e);var t}e.exports=function(e,t){return Pe(e,t)}}(Ls,Ls.exports);var Bs,Fs={exports:{}};Bs=Fs,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;rt&&(t=n);return t}function Xs(e){return{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:Boolean(e.moved),static:Boolean(e.static),isDraggable:e.isDraggable,isResizable:e.isResizable}}function Ys(e,t){return!(e===t||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function qs(e,t,n){for(var r=nl(e),i=ol(e,t),o=Array(e.length),a=0,s=i.length;at.y+t.h)break;Ys(t,a)&&Ks(e,a,n+t[i],r)}}t[r]=n}function Qs(e,t,n,r,i){var o="horizontal"===n;if("vertical"===n)for(t.y=Math.min(Ws(e),t.y);t.y>0&&!el(e,t);)t.y--;else if(o)for(t.y=Math.min(Ws(e),t.y);t.x>0&&!el(e,t);)t.x--;for(var a=void 0;a=el(e,t);)o?Ks(i,t,a.x+a.w,"x"):Ks(i,t,a.y+a.h,"y"),o&&t.x+t.w>r&&(t.x=r-t.w,t.y++);return t}function Zs(e,t){for(var n=nl(e),r=0,i=e.length;rt.cols&&(o.x=t.cols-o.w),o.x<0&&(o.x=0,o.w=t.cols),o.static)for(;el(n,o);)o.y++;else n.push(o)}return e}function Js(e,t){for(var n=0,r=e.length;n=r:"horizontal"===a&&"number"==typeof n&&l>=n)&&(u=u.reverse());var h=tl(u,t);if(o&&h.length)return t.i,t.x=l,t.y=c,t.moved=!1,e;for(var d=0,p=h.length;dt.y||e.y===t.y&&e.x>t.x?1:e.y===t.y&&e.x===t.x?0:-1}))}function sl(e){return[].concat(e).sort((function(e,t){return e.x>t.x||e.x===t.x&&e.y>t.y?1:-1}))}function ll(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Layout",n=["x","y","w","h"];if(!Array.isArray(e))throw new Error(t+" must be an array!");for(var r=0,i=e.length;r1?t-1:0),r=1;r2?n-2:0),i=2;i0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window||void 0===window.document)return"";var t=window.document.documentElement.style;if(e in t)return"";for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{})}function ce(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)"+t+"(?!\\S)"))||(e.className+=" "+t)}function ue(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)"+t+"(?!\\S)","g"),"")}function he(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"==typeof r?r:ve(r);var i=ye(e);if("string"==typeof r){var o=i.ownerDocument,a=o.defaultView,s=void 0;if(!((s="parent"===r?i.parentNode:o.querySelector(r))instanceof a.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var l=a.getComputedStyle(i),c=a.getComputedStyle(s);r={left:-i.offsetLeft+D(c.paddingLeft)+D(l.marginLeft),top:-i.offsetTop+D(c.paddingTop)+D(l.marginTop),right:J(s)-Q(i)-i.offsetLeft+D(c.paddingRight)-D(l.marginRight),bottom:Z(s)-K(i)-i.offsetTop+D(c.paddingBottom)-D(l.marginBottom)}}return O(r.right)&&(t=Math.min(t,r.right)),O(r.bottom)&&(n=Math.min(n,r.bottom)),O(r.left)&&(t=Math.max(t,r.left)),O(r.top)&&(n=Math.max(n,r.top)),[t,n]}function de(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function pe(e){return"both"===e.props.axis||"x"===e.props.axis}function fe(e){return"both"===e.props.axis||"y"===e.props.axis}function me(e,t,n){var r="number"==typeof t?ie(e,t):null;if("number"==typeof t&&!r)return null;var i=ye(n);return ee(r||e,n.props.offsetParent||i.offsetParent||i.ownerDocument.body)}function ge(e,t,n){var r=e.state,i=!O(r.lastX),o=ye(e);return i?{node:o,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:o,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}}function be(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function ve(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function ye(t){var n=e.findDOMNode(t);if(!n)throw new Error(": Unmounted during event!");return n}function Te(){}var _e={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}},Ee=_e.mouse,xe=function(n){function r(){var t,n,i;F(this,r);for(var o=arguments.length,a=Array(o),s=0;s not mounted on DragStart!");var r=n.ownerDocument;if(!(i.props.disabled||!(t.target instanceof r.defaultView.Node)||i.props.handle&&!Y(t.target,i.props.handle,n)||i.props.cancel&&Y(t.target,i.props.cancel,n))){var o=oe(t);i.setState({touchIdentifier:o});var a=me(t,o,i);if(null!=a){var s=a.x,l=a.y,c=ge(i,s,l);Te("calling",i.props.onStart),!1!==i.props.onStart(t,c)&&(i.props.enableUserSelectHack&&ae(r),i.setState({dragging:!0,lastX:s,lastY:l}),q(r,Ee.move,i.handleDrag),q(r,Ee.stop,i.handleDragStop))}}},i.handleDrag=function(e){"touchmove"===e.type&&e.preventDefault();var t=me(e,i.state.touchIdentifier,i);if(null!=t){var n=t.x,r=t.y;if(Array.isArray(i.props.grid)){var o=n-i.state.lastX,a=r-i.state.lastY,s=de(i.props.grid,o,a),l=V(s,2);if(o=l[0],a=l[1],!o&&!a)return;n=i.state.lastX+o,r=i.state.lastY+a}var c=ge(i,n,r);if(!1!==i.props.onDrag(e,c))i.setState({lastX:n,lastY:r});else try{i.handleDragStop(new MouseEvent("mouseup"))}catch(e){var u=document.createEvent("MouseEvents");u.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),i.handleDragStop(u)}}},i.handleDragStop=function(t){if(i.state.dragging){var n=me(t,i.state.touchIdentifier,i);if(null!=n){var r=n.x,o=n.y,a=ge(i,r,o),s=e.findDOMNode(i);s&&i.props.enableUserSelectHack&&se(s.ownerDocument),i.setState({dragging:!1,lastX:NaN,lastY:NaN}),i.props.onStop(t,a),s&&($(s.ownerDocument,Ee.move,i.handleDrag),$(s.ownerDocument,Ee.stop,i.handleDragStop))}}},i.onMouseDown=function(e){return Ee=_e.mouse,i.handleDragStart(e)},i.onMouseUp=function(e){return Ee=_e.mouse,i.handleDragStop(e)},i.onTouchStart=function(e){return Ee=_e.touch,i.handleDragStart(e)},i.onTouchEnd=function(e){return Ee=_e.touch,i.handleDragStop(e)},z(i,n)}return G(r,n),U(r,[{key:"componentWillUnmount",value:function(){var t=e.findDOMNode(this);if(t){var n=t.ownerDocument;$(n,_e.mouse.move,this.handleDrag),$(n,_e.touch.move,this.handleDrag),$(n,_e.mouse.stop,this.handleDragStop),$(n,_e.touch.stop,this.handleDragStop),this.props.enableUserSelectHack&&se(n)}}},{key:"render",value:function(){return t.cloneElement(t.Children.only(this.props.children),{style:le(this.props.children.props.style),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}]),r}(t.Component);xe.displayName="DraggableCore",xe.propTypes={allowAnyClick:k.bool,disabled:k.bool,enableUserSelectHack:k.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:k.arrayOf(k.number),scale:k.number,handle:k.string,cancel:k.string,onStart:k.func,onDrag:k.func,onStop:k.func,onMouseDown:k.func,className:P,style:P,transform:P},xe.defaultProps={allowAnyClick:!1,cancel:null,disabled:!1,enableUserSelectHack:!0,offsetParent:null,handle:null,grid:null,transform:null,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){}};var we=function(n){function r(e){F(this,r);var t=z(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return t.onDragStart=function(e,n){if(!1===t.props.onStart(e,be(t,n)))return!1;t.setState({dragging:!0,dragged:!0})},t.onDrag=function(e,n){if(!t.state.dragging)return!1;var r=be(t,n),i={x:r.x,y:r.y};if(t.props.bounds){var o=i.x,a=i.y;i.x+=t.state.slackX,i.y+=t.state.slackY;var s=he(t,i.x,i.y),l=V(s,2),c=l[0],u=l[1];i.x=c,i.y=u,i.slackX=t.state.slackX+(o-i.x),i.slackY=t.state.slackY+(a-i.y),r.x=i.x,r.y=i.y,r.deltaX=i.x-t.state.x,r.deltaY=i.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(i)},t.onDragStop=function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,be(t,n)))return!1;var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var i=t.props.position,o=i.x,a=i.y;r.x=o,r.y=a}t.setState(r)},t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return G(r,n),U(r,[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&e.findDOMNode(this)instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillReceiveProps",value:function(e){!e.position||this.props.position&&e.position.x===this.props.position.x&&e.position.y===this.props.position.y||this.setState({x:e.position.x,y:e.position.y})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"render",value:function(){var e,n={},r=null,i=!Boolean(this.props.position)||this.state.dragging,o=this.props.position||this.props.defaultPosition,a={x:pe(this)&&i?this.state.x:o.x,y:fe(this)&&i?this.state.y:o.y};this.state.isElementSVG?r=ne(a,this.props.positionOffset):n=te(a,this.props.positionOffset);var s=this.props,l=s.defaultClassName,c=s.defaultClassNameDragging,u=s.defaultClassNameDragged,h=t.Children.only(this.props.children),d=A(h.props.className||"",l,(j(e={},c,this.state.dragging),j(e,u,this.state.dragged),e));return t.createElement(xe,H({},this.props,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(h,{className:d,style:H({},h.props.style,n),transform:r}))}}]),r}(t.Component);return we.displayName="Draggable",we.propTypes=H({},xe.propTypes,{axis:k.oneOf(["both","x","y","none"]),bounds:k.oneOfType([k.shape({left:k.number,right:k.number,top:k.number,bottom:k.number}),k.string,k.oneOf([!1])]),defaultClassName:k.string,defaultClassNameDragging:k.string,defaultClassNameDragged:k.string,defaultPosition:k.shape({x:k.number,y:k.number}),positionOffset:k.shape({x:k.oneOfType([k.number,k.string]),y:k.oneOfType([k.number,k.string])}),position:k.shape({x:k.number,y:k.number}),className:P,style:P,transform:P}),we.defaultProps=H({},xe.defaultProps,{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},position:null,scale:1}),we.default=we,we.DraggableCore=xe,we}(g.default,m.default)}(ul);var hl={exports:{}},dl={},pl={exports:{}},fl={};function ml(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"==typeof window)return"";var r=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!r)return"";if(n in r)return"";for(var i=0;i<_l.length;i++)if(xl(n,_l[i])in r)return _l[i];return""}function xl(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r: Unmounted during event!");return t}var Hl={},Gl={};function zl(e){return(zl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.default=function(){},Object.defineProperty(Hl,"__esModule",{value:!0}),Hl.default=void 0;var Vl=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==zl(e)&&"function"!=typeof e)return{default:e};var n=Zl(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}(m.default),Wl=Ql(S.exports),Xl=Ql(g.default),Yl=vl,ql=Bl,$l=yl,Kl=Ql(Gl);function Ql(e){return e&&e.__esModule?e:{default:e}}function Zl(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Zl=function(e){return e?n:t})(e)}function Jl(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ec(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ec(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ec(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,Yl.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,Yl.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var i=(0,Yl.getTouchIdentifier)(t);e.setState({touchIdentifier:i});var o=(0,ql.getControlPosition)(t,i,oc(e));if(null!=o){var a=o.x,s=o.y,l=(0,ql.createCoreData)(oc(e),a,s);(0,Kl.default)("DraggableCore: handleDragStart: %j",l),(0,Kl.default)("calling",e.props.onStart),!1!==e.props.onStart(t,l)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,Yl.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:a,lastY:s}),(0,Yl.addEvent)(r,uc.move,e.handleDrag),(0,Yl.addEvent)(r,uc.stop,e.handleDragStop))}}})),sc(oc(e),"handleDrag",(function(t){var n=(0,ql.getControlPosition)(t,e.state.touchIdentifier,oc(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX,a=i-e.state.lastY,s=Jl((0,ql.snapToGrid)(e.props.grid,o,a),2);if(o=s[0],a=s[1],!o&&!a)return;r=e.state.lastX+o,i=e.state.lastY+a}var l=(0,ql.createCoreData)(oc(e),r,i);if((0,Kl.default)("DraggableCore: handleDrag: %j",l),!1!==e.props.onDrag(t,l)&&!1!==e.mounted)e.setState({lastX:r,lastY:i});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(t){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}})),sc(oc(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,ql.getControlPosition)(t,e.state.touchIdentifier,oc(e));if(null!=n){var r=n.x,i=n.y;if(Array.isArray(e.props.grid)){var o=r-e.state.lastX||0,a=i-e.state.lastY||0,s=Jl((0,ql.snapToGrid)(e.props.grid,o,a),2);o=s[0],a=s[1],r=e.state.lastX+o,i=e.state.lastY+a}var l=(0,ql.createCoreData)(oc(e),r,i);if(!1===e.props.onStop(t,l)||!1===e.mounted)return!1;var c=e.findDOMNode();c&&e.props.enableUserSelectHack&&(0,Yl.removeUserSelectStyles)(c.ownerDocument),(0,Kl.default)("DraggableCore: handleDragStop: %j",l),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),c&&((0,Kl.default)("DraggableCore: Removing handlers"),(0,Yl.removeEvent)(c.ownerDocument,uc.move,e.handleDrag),(0,Yl.removeEvent)(c.ownerDocument,uc.stop,e.handleDragStop))}}})),sc(oc(e),"onMouseDown",(function(t){return uc=cc,e.handleDragStart(t)})),sc(oc(e),"onMouseUp",(function(t){return uc=cc,e.handleDragStop(t)})),sc(oc(e),"onTouchStart",(function(t){return uc=lc,e.handleDragStart(t)})),sc(oc(e),"onTouchEnd",(function(t){return uc=lc,e.handleDragStop(t)})),e}return t=o,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,Yl.addEvent)(e,lc.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,Yl.removeEvent)(t,cc.move,this.handleDrag),(0,Yl.removeEvent)(t,lc.move,this.handleDrag),(0,Yl.removeEvent)(t,cc.stop,this.handleDragStop),(0,Yl.removeEvent)(t,lc.stop,this.handleDragStop),(0,Yl.removeEvent)(e,lc.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Yl.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current:Xl.default.findDOMNode(this)}},{key:"render",value:function(){return Vl.cloneElement(Vl.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&tc(t.prototype,n),r&&tc(t,r),Object.defineProperty(t,"prototype",{writable:!1}),o}(Vl.Component);Hl.default=hc,sc(hc,"displayName","DraggableCore"),sc(hc,"propTypes",{allowAnyClick:Wl.default.bool,disabled:Wl.default.bool,enableUserSelectHack:Wl.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Wl.default.arrayOf(Wl.default.number),handle:Wl.default.string,cancel:Wl.default.string,nodeRef:Wl.default.object,onStart:Wl.default.func,onDrag:Wl.default.func,onStop:Wl.default.func,onMouseDown:Wl.default.func,scale:Wl.default.number,className:$l.dontSetMe,style:$l.dontSetMe,transform:$l.dontSetMe}),sc(hc,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1}),function(e){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"DraggableCore",{enumerable:!0,get:function(){return c.default}}),e.default=void 0;var n=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!==t(e)&&"function"!=typeof e)return{default:e};var r=p(n);if(r&&r.has(e))return r.get(e);var i={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var s=o?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(i,a,s):i[a]=e[a]}return i.default=e,r&&r.set(e,i),i}(m.default),r=d(S.exports),i=d(g.default),o=d(bl),a=vl,s=Bl,l=yl,c=d(Hl),u=d(Gl),h=["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"];function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(){return f=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=p,l=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,u.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:y({},n)})}}],(r=[{key:"componentDidMount",value:function(){void 0!==window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props;t.axis,t.bounds;var r=t.children,i=t.defaultPosition,l=t.defaultClassName,u=t.defaultClassNameDragging,d=t.defaultClassNameDragged,p=t.position,m=t.positionOffset;t.scale;var g=b(t,h),v={},T=null,_=!Boolean(p)||this.state.dragging,E=p||i,x={x:(0,s.canDragX)(this)&&_?this.state.x:E.x,y:(0,s.canDragY)(this)&&_?this.state.y:E.y};this.state.isElementSVG?T=(0,a.createSVGTransform)(x,m):v=(0,a.createCSSTransform)(x,m);var w=(0,o.default)(r.props.className||"",l,(I(e={},u,this.state.dragging),I(e,d,this.state.dragged),e));return n.createElement(c.default,f({},g,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),n.cloneElement(n.Children.only(r),{className:w,style:y(y({},r.props.style),v),transform:T}))}}])&&E(t.prototype,r),l&&E(t,l),Object.defineProperty(t,"prototype",{writable:!1}),p}(n.Component);e.default=O,I(O,"displayName","Draggable"),I(O,"propTypes",y(y({},c.default.propTypes),{},{axis:r.default.oneOf(["both","x","y","none"]),bounds:r.default.oneOfType([r.default.shape({left:r.default.number,right:r.default.number,top:r.default.number,bottom:r.default.number}),r.default.string,r.default.oneOf([!1])]),defaultClassName:r.default.string,defaultClassNameDragging:r.default.string,defaultClassNameDragged:r.default.string,defaultPosition:r.default.shape({x:r.default.number,y:r.default.number}),positionOffset:r.default.shape({x:r.default.oneOfType([r.default.number,r.default.string]),y:r.default.oneOfType([r.default.number,r.default.string])}),position:r.default.shape({x:r.default.number,y:r.default.number}),className:l.dontSetMe,style:l.dontSetMe,transform:l.dontSetMe})),I(O,"defaultProps",y(y({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))}(fl);var dc=fl.default,pc=fl.DraggableCore;pl.exports=dc,pl.exports.default=dc,pl.exports.DraggableCore=pc;var fc,mc={__esModule:!0,cloneElement:function(e,t){return t.style&&e.props.style&&(t.style=vc(vc({},e.props.style),t.style)),t.className&&e.props.className&&(t.className=e.props.className+" "+t.className),gc.default.cloneElement(e,t)}},gc=(fc=m.default)&&fc.__esModule?fc:{default:fc};function bc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function vc(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"]);return(0,Sc.cloneElement)(n,Ic(Ic({},a),{},{className:(r?r+" ":"")+"react-resizable",children:[].concat(n.props.children,o.map((function(t){return xc.default.createElement(wc.DraggableCore,Ac({},i,{key:"resizableHandle-"+t,onStop:e.resizeHandler("onResizeStop",t),onStart:e.resizeHandler("onResizeStart",t),onDrag:e.resizeHandler("onResize",t)}),e.renderResizeHandle(t))})))}))},t}(xc.default.Component);dl.default=Pc,Dc(Pc,"propTypes",kc.resizableProps),Dc(Pc,"defaultProps",{handleSize:[20,20],lockAspectRatio:!1,axis:"both",minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1});var Nc={__esModule:!0,default:void 0},Rc=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=Uc();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}(m.default),Mc=Fc(S.exports),Lc=Fc(dl),Bc=Tc;function Fc(e){return e&&e.__esModule?e:{default:e}}function Uc(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return Uc=function(){return e},e}function jc(){return jc=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"]);return Rc.createElement(Lc.default,{axis:c,draggableOpts:o,handle:t,handleSize:n,height:this.state.height,lockAspectRatio:l,maxConstraints:s,minConstraints:a,onResizeStart:r,onResize:this.onResize,onResizeStop:i,resizeHandles:u,transformScale:d,width:this.state.width},Rc.createElement("div",jc({},p,{style:Gc(Gc({},h),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},t;var n,r}(Rc.Component);Nc.default=Wc,Vc(Wc,"propTypes",Gc(Gc({},Bc.resizableProps),{},{children:Mc.default.element})),hl.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},hl.exports.Resizable=dl.default,hl.exports.ResizableBox=Nc.default,cl.__esModule=!0;var Xc=Object.assign||function(e){for(var t=1;te.w||n>e.maxW?new Error("minWidth larger than item width/maxWidth"):void 0},maxW:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxWidth not Number"):ne.h||n>e.maxH?new Error("minHeight larger than item height/maxHeight"):void 0},maxH:function(e,t){var n=e[t];return"number"!=typeof n?new Error("maxHeight not Number"):n0){var m=1/0,g=1/0;f.forEach((function(e){e.x>d.x&&(m=Math.min(m,e.x)),e.y>d.y&&(g=Math.min(g,e.y))})),Number.isFinite(m)&&(d.w=m-d.x),Number.isFinite(g)&&(d.h=g-d.y)}}p||(d.w=t,d.h=n);var b={w:d.w,h:d.h,x:d.x,y:d.y,static:!0,i:e};this.props.onResize(s,l,d,b,i,o),this.setState({layout:(0,su.compact)(s,this.compactType(),u),activeDrag:b})}},t.prototype.onResizeStop=function(e,t,n,r){var i=r.e,o=r.node,a=this.state,s=a.layout,l=a.oldResizeItem,c=this.props.cols,u=(0,su.getLayoutItem)(s,e);this.props.onResizeStop(s,l,u,null,i,o);var h=(0,su.compact)(s,this.compactType(),c),d=this.state.oldLayout;this.setState({activeDrag:null,layout:h,oldResizeItem:null,oldLayout:null}),this.onLayoutMaybeChanged(h,d)},t.prototype.placeholder=function(){var e=this.state.activeDrag;if(!e)return null;var t=this.props,n=t.width,r=t.cols,i=t.margin,o=t.containerPadding,a=t.rowHeight,s=t.maxRows,l=t.useCSSTransforms;return ru.default.createElement(lu.default,{w:e.w,h:e.h,x:e.x,y:e.y,i:e.i,className:"react-grid-placeholder",containerWidth:n,cols:r,margin:i,containerPadding:o||i,maxRows:s,rowHeight:a,isDraggable:!1,isResizable:!1,useCSSTransforms:l},ru.default.createElement("div",null))},t.prototype.processGridItem=function(e){if(e&&e.key){var t=(0,su.getLayoutItem)(this.state.layout,String(e.key));if(!t)return null;var n=this.props,r=n.width,i=n.cols,o=n.margin,a=n.containerPadding,s=n.rowHeight,l=n.maxRows,c=n.isDraggable,u=n.isResizable,h=n.useCSSTransforms,d=n.draggableCancel,p=n.draggableHandle,f=this.state.mounted,m=Boolean(!t.static&&c&&(t.isDraggable||null==t.isDraggable)),g=Boolean(!t.static&&u&&(t.isResizable||null==t.isResizable));return ru.default.createElement(lu.default,{containerWidth:r,cols:i,margin:o,containerPadding:a||o,maxRows:l,rowHeight:s,cancel:d,handle:p,onDragStop:this.onDragStop,onDragStart:this.onDragStart,onDrag:this.onDrag,onResizeStart:this.onResizeStart,onResize:this.onResize,onResizeStop:this.onResizeStop,isDraggable:m,isResizable:g,useCSSTransforms:h&&f,usePercentages:!f,w:t.w,h:t.h,x:t.x,y:t.y,i:t.i,minH:t.minH,minW:t.minW,maxH:t.maxH,maxW:t.maxW,static:t.static},e)}},t.prototype.render=function(){var e=this,t=this.props,n=t.className,r=t.style,i=(0,au.default)("react-grid-layout",n),o=nu({height:this.containerHeight()},r);return ru.default.createElement("div",{className:i,style:o},ru.default.Children.map(this.props.children,(function(t){return e.processGridItem(t)})),this.placeholder())},t}(ru.default.Component);uu.displayName="ReactGridLayout",uu.propTypes={className:iu.default.string,style:iu.default.object,width:iu.default.number,autoSize:iu.default.bool,cols:iu.default.number,draggableCancel:iu.default.string,draggableHandle:iu.default.string,verticalCompact:function(e){e.verticalCompact},compactType:iu.default.oneOf(["vertical","horizontal"]),layout:function(e){var t=e.layout;void 0!==t&&(0,su.validateLayout)(t,"layout")},margin:iu.default.arrayOf(iu.default.number),containerPadding:iu.default.arrayOf(iu.default.number),rowHeight:iu.default.number,maxRows:iu.default.number,isDraggable:iu.default.bool,isResizable:iu.default.bool,preventCollision:iu.default.bool,useCSSTransforms:iu.default.bool,onLayoutChange:iu.default.func,onDragStart:iu.default.func,onDrag:iu.default.func,onDragStop:iu.default.func,onResizeStart:iu.default.func,onResize:iu.default.func,onResizeStop:iu.default.func,children:function(e,t){var n=e[t],r={};ru.default.Children.forEach(n,(function(e){if(r[e.key])throw new Error('Duplicate child key "'+e.key+'" found! This will cause problems in ReactGridLayout.');r[e.key]=!0}))}},uu.defaultProps={autoSize:!0,cols:12,className:"",style:{},draggableHandle:"",draggableCancel:"",containerPadding:null,rowHeight:150,maxRows:1/0,layout:[],margin:[10,10],isDraggable:!0,isResizable:!0,useCSSTransforms:!0,verticalCompact:!0,compactType:"vertical",preventCollision:!1,onLayoutChange:su.noop,onDragStart:su.noop,onDrag:su.noop,onDragStop:su.noop,onResizeStart:su.noop,onResize:su.noop,onResizeStop:su.noop};var hu=function(){this.state={activeDrag:null,layout:(0,su.synchronizeLayoutWithChildren)(this.props.layout,this.props.children,this.props.cols,this.compactType()),mounted:!1,oldDragItem:null,oldLayout:null,oldResizeItem:null}};Ms.default=uu;var du={},pu={__esModule:!0,getBreakpointFromWidth:function(e,t){for(var n=mu(e),r=n[0],i=1,o=n.length;ie[a]&&(r=a)}return r},getColsFromBreakpoint:function(e,t){if(!t[e])throw new Error("ResponsiveReactGridLayout: `cols` entry for breakpoint "+e+" is missing!");return t[e]},findOrGenerateResponsiveLayout:function(e,t,n,r,i,o){if(e[n])return(0,fu.cloneLayout)(e[n]);for(var a=e[r],s=mu(t),l=s.slice(s.indexOf(n)),c=0,u=l.length;c=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["breakpoint","breakpoints","cols","layouts","onBreakpointChange","onLayoutChange","onWidthChange"]);return bu.default.createElement(Eu.default,gu({},t,{onLayoutChange:this.onLayoutChange,layout:this.state.layout,cols:this.state.cols}))},t}(bu.default.Component);ku.propTypes={breakpoint:vu.default.string,breakpoints:vu.default.object,cols:vu.default.object,layouts:function(e,t){if("[object Object]"!==Su(e[t]))throw new Error("Layout property must be an object. Received: "+Su(e[t]));Object.keys(e[t]).forEach((function(t){if(!(t in e.breakpoints))throw new Error("Each key in layouts must align with a key in breakpoints.");(0,Tu.validateLayout)(e.layouts[t],"layouts."+t)}))},width:vu.default.number.isRequired,onBreakpointChange:vu.default.func,onLayoutChange:vu.default.func,onWidthChange:vu.default.func},ku.defaultProps={breakpoints:{lg:1200,md:996,sm:768,xs:480,xxs:0},cols:{lg:12,md:10,sm:6,xs:4,xxs:2},layouts:{},onBreakpointChange:Tu.noop,onLayoutChange:Tu.noop,onWidthChange:Tu.noop},du.default=ku;var Au={__esModule:!0},Cu=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["measureBeforeMount"]);return n&&!this.mounted?Iu.default.createElement("div",{className:this.props.className,style:this.props.style}):Iu.default.createElement(e,Cu({},r,this.state))},n}(Iu.default.Component),t.defaultProps={measureBeforeMount:!1},t.propTypes={measureBeforeMount:Ou.default.bool},n};var Iu=Pu(m.default),Ou=Pu(S.exports),Du=Pu(g.default);function Pu(e){return e&&e.__esModule?e:{default:e}}function Nu(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}!function(e){e.exports=Ms.default,e.exports.utils=Us,e.exports.Responsive=du.default,e.exports.Responsive.utils=pu,e.exports.WidthProvider=Au.default}(Rs);const Ru=Rs.exports;var Mu={exports:{}};!function(e,t){"undefined"!=typeof window&&window,e.exports=function(){if("undefined"==typeof window)return null;var e="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),t=e.requestAnimationFrame||e.mozRequestAnimationFrame||e.webkitRequestAnimationFrame||function(t){return e.setTimeout(t,20)},n=e.cancelAnimationFrame||e.mozCancelAnimationFrame||e.webkitCancelAnimationFrame||function(t){e.clearTimeout(t)};function r(e,t){var n=Object.prototype.toString.call(e),r="[object Array]"===n||"[object NodeList]"===n||"[object HTMLCollection]"===n||"[object Object]"===n||"undefined"!=typeof jQuery&&e instanceof jQuery||"undefined"!=typeof Elements&&e instanceof Elements,i=0,o=e.length;if(r)for(;i=l&&(h+=i.value),"max"===i.mode&&c<=l&&(h+=i.value),u[d]||(u[d]=""),h&&-1===(" "+u[d]+" ").indexOf(" "+h+" ")&&(u[d]+=" "+h));for(var e in p)p.hasOwnProperty(e)&&(u[p[e]]?this.element.setAttribute(p[e],u[p[e]].substr(1)):this.element.removeAttribute(p[e]))}}function l(t,n){t.elementQueriesSetupInformation||(t.elementQueriesSetupInformation=new s(t,n)),t.elementQueriesSensor||(t.elementQueriesSensor=new e(t,(function(){t.elementQueriesSetupInformation.call()})))}function c(e,i,o,a){if(void 0===n[e]){n[e]=[];var s=r.length;t.innerHTML+="\n"+e+" {animation: 0.1s element-queries;}",t.innerHTML+="\n"+e+" > .resize-sensor {min-width: "+s+"px;}",r.push(e)}n[e].push({mode:i,property:o,value:a})}function u(e){var t;if(document.querySelectorAll&&(t=e?e.querySelectorAll.bind(e):document.querySelectorAll.bind(document)),t||"undefined"==typeof $$||(t=$$),t||"undefined"==typeof jQuery||(t=jQuery),!t)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return t}function h(e){var t=u(e);for(var r in n)if(n.hasOwnProperty(r))for(var i=t(r,e),o=0,a=i.length;or[e].minWidth&&(l=e);if(l||(l=o),a!==l)if(s[l])n[a].style.display="none",n[l].style.display="block",a=l;else{var c=new Image;c.onload=function(){n[l].src=i[l],n[a].style.display="none",n[l].style.display="block",s[l]=!0,a=l},c.src=i[l]}else n[l].src=i[l]}a=o,t.resizeSensorInstance=new e(t,d),d()}function p(){for(var e=u()("[data-responsive-image],[responsive-image]"),t=0,n=e.length;t img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img {width: 100%;}",t.innerHTML+="\n@keyframes element-queries { 0% { visibility: inherit; } }",document.getElementsByTagName("head")[0].appendChild(t),v=!0);for(var i=0,o=document.styleSheets.length;i\s{0,}<").replace(/-1?(a+=l[o]+n[s],i=!0,(n[s].search(/-->/)>-1||n[s].search(/\]>/)>-1||n[s].search(/!DOCTYPE/)>-1)&&(i=!1)):n[s].search(/-->/)>-1||n[s].search(/\]>/)>-1?(a+=n[s],i=!1):/^<\w/.exec(n[s-1])&&/^<\/\w/.exec(n[s])&&/^<[\w:\-\.\,]+/.exec(n[s-1])==/^<\/[\w:\-\.\,]+/.exec(n[s])[0].replace("/","")?(a+=n[s],i||o--):n[s].search(/<\w/)>-1&&-1==n[s].search(/<\//)&&-1==n[s].search(/\/>/)?a=a+=i?n[s]:l[o++]+n[s]:n[s].search(/<\w/)>-1&&n[s].search(/<\//)>-1?a=a+=i?n[s]:l[o]+n[s]:n[s].search(/<\//)>-1?a=a+=i?n[s]:l[--o]+n[s]:n[s].search(/\/>/)>-1?a=a+=i?n[s]:l[o]+n[s]:n[s].search(/<\?/)>-1||n[s].search(/xmlns\:/)>-1||n[s].search(/xmlns\=/)>-1?a+=l[o]+n[s]:a+=n[s];return"\n"==a[0]?a.slice(1):a},Uu.prototype.json=function(e,t){return t=t||this.step,"undefined"==typeof JSON?e:"string"==typeof e?JSON.stringify(JSON.parse(e),null,t):"object"==typeof e?JSON.stringify(e,null,t):e},Uu.prototype.css=function(e,t){var n=e.replace(/\s{1,}/g," ").replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split("~::~"),r=n.length,i=0,o="",a=0,s=t?Fu(t):this.shift;for(a=0;a/g,"").replace(/[ \r\n\t]{1,}xmlns/g," xmlns")).replace(/>\s{0,}<")},Uu.prototype.jsonmin=function(e){return"undefined"==typeof JSON?e:JSON.stringify(JSON.parse(e),null,0)},Uu.prototype.cssmin=function(e,t){return(t?e:e.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"")).replace(/\s{1,}/g," ").replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/")},Uu.prototype.sqlmin=function(e){return e.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")")};var Gu=new Uu,zu={},Vu=Object.prototype.hasOwnProperty;function Wu(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(e){return null}}function Xu(e){try{return encodeURIComponent(e)}catch(e){return null}}zu.stringify=function(e,t){t=t||"";var n,r,i=[];for(r in"string"!=typeof t&&(t="?"),e)if(Vu.call(e,r)){if((n=e[r])||null!=n&&!isNaN(n)||(n=""),r=Xu(r),n=Xu(n),null===r||null===n)continue;i.push(r+"="+n)}return i.length?t+i.join("&"):""},zu.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=Wu(t[1]),o=Wu(t[2]);null===i||null===o||i in r||(r[i]=o)}return r};var Yu=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e},qu=zu,$u=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,Ku=/[\n\r\t]/g,Qu=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,Zu=/:\d+$/,Ju=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,eh=/^[a-zA-Z]:/;function th(e){return(e||"").toString().replace($u,"")}var nh=[["#","hash"],["?","query"],function(e,t){return oh(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],rh={hash:1,query:1};function ih(e){var t,n=("undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).location||{},r={},i=typeof(e=e||n);if("blob:"===e.protocol)r=new sh(unescape(e.pathname),{});else if("string"===i)for(t in r=new sh(e,{}),rh)delete r[t];else if("object"===i){for(t in e)t in rh||(r[t]=e[t]);void 0===r.slashes&&(r.slashes=Qu.test(e.href))}return r}function oh(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function ah(e,t){e=(e=th(e)).replace(Ku,""),t=t||{};var n,r=Ju.exec(e),i=r[1]?r[1].toLowerCase():"",o=!!r[2],a=!!r[3],s=0;return o?a?(n=r[2]+r[3]+r[4],s=r[2].length+r[3].length):(n=r[2]+r[4],s=r[2].length):a?(n=r[3]+r[4],s=r[3].length):n=r[4],"file:"===i?s>=2&&(n=n.slice(2)):oh(i)?n=r[4]:i?o&&(n=n.slice(2)):s>=2&&oh(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||oh(i),slashesCount:s,rest:n}}function sh(e,t,n){if(e=(e=th(e)).replace(Ku,""),!(this instanceof sh))return new sh(e,t,n);var r,i,o,a,s,l,c=nh.slice(),u=typeof t,h=this,d=0;for("object"!==u&&"string"!==u&&(n=t,t=null),n&&"function"!=typeof n&&(n=qu.parse),r=!(i=ah(e||"",t=ih(t))).protocol&&!i.slashes,h.slashes=i.slashes||r&&t.slashes,h.protocol=i.protocol||t.protocol||"",e=i.rest,("file:"===i.protocol&&(2!==i.slashesCount||eh.test(e))||!i.slashes&&(i.protocol||i.slashesCount<2||!oh(h.protocol)))&&(c[3]=[/(.*)/,"pathname"]);d{try{return new window.BroadcastChannel("pub-sub-es")}catch(e){return{postMessage:()=>{}}}})(),uh=(e,t)=>t?e.toLowerCase():e,hh=(e,{caseInsensitive:t}={})=>(n,r,i=1/0)=>{const o=uh(n,t);return e[o]||(e[o]=[],e.__times__[o]=[]),e[o].push(r),e.__times__[o].push(+i||1/0),{event:o,handler:r}},dh=(e,{caseInsensitive:t}={})=>(n,r)=>{"object"==typeof n&&(r=n.handler,n=n.event);const i=uh(n,t);if(!e[i])return;const o=e[i].indexOf(r);-1===o||o>=e[i].length||(e[i].splice(o,1),e.__times__[i].splice(o,1))},ph=(e,t)=>()=>{e.forEach((e=>e(t)))},fh=(e,{isGlobal:t,caseInsensitive:n,async:r}={})=>{const i=dh(e);return(o,a,s={})=>{const l=uh(o,n);if(!e[l])return;const c=[...e[l]];if(c.forEach(((t,n)=>{--e.__times__[l][n]<1&&i(l,t)})),r||s.async?setTimeout(ph(c,a),0):ph(c,a)(),t&&!s.isNoGlobalBroadcast)try{ch.postMessage({event:l,news:a})}catch(e){if(!(e instanceof DOMException))throw e;console.warn(`Could not broadcast '${l}' globally. Payload is not clonable.`)}}},mh=e=>()=>{Object.keys(e).filter((e=>"_"!==e[0])).forEach((t=>{e[t]=void 0,e.__times__[t]=void 0,delete e[t],delete e.__times__[t]}))},gh=({async:e=!1,caseInsensitive:t=!1,stack:n={__times__:{}}}={})=>(n.__times__||(n.__times__={}),{publish:fh(n,{async:e,caseInsensitive:t}),subscribe:hh(n,{caseInsensitive:t}),unsubscribe:dh(n,{caseInsensitive:t}),clear:mh(n),stack:n}),bh={__times__:{}},vh={publish:fh(bh,{isGlobal:!0}),subscribe:hh(bh),unsubscribe:dh(bh),stack:bh};ch.onmessage=({data:{event:e,news:t}})=>vh.publish(e,t,!0);const yh={"context-menu":"_context-menu_18ock_1","context-menu-dark":"_context-menu-dark_18ock_12","context-menu-icon":"_context-menu-icon_18ock_17","context-menu-item":"_context-menu-item_18ock_27","context-menu-hr":"_context-menu-hr_18ock_38","play-icon":"_play-icon_18ock_45","context-menu-span":"_context-menu-span_18ock_52","context-menu-thumbnail":"_context-menu-thumbnail_18ock_60","context-menu-thumbnail-inline":"_context-menu-thumbnail-inline_18ock_65"};function Th(e){return m.default.createElement("div",{"data-menu-item-for":"string"==typeof e.children?e.children:null,className:yh["context-menu-item"],onClick:t=>e.onClick(t),onMouseEnter:t=>e.onMouseEnter(t),onMouseLeave:t=>e.onMouseLeave(t),role:"button",tabIndex:0},m.default.createElement("span",{className:yh["context-menu-span"]},e.children))}Th.defaultProps={onMouseEnter:()=>{},onMouseLeave:()=>{}},Th.propTypes={children:S.exports.node.isRequired,onClick:S.exports.func.isRequired,onMouseEnter:S.exports.func,onMouseLeave:S.exports.func};var _h={value:()=>{}};function Eh(){for(var e,t=0,n=arguments.length,r={};t=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var n,r,i=new Array(n),o=0;o()=>e;function Dh(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:o,x:a,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}function Ph(e){return!e.ctrlKey&&!e.button}function Nh(){return this.parentNode}function Rh(e,t){return null==t?{x:e.x,y:e.y}:t}function Mh(){return navigator.maxTouchPoints||"ontouchstart"in this}function Lh(){var e,t,n,r,i=Ph,o=Nh,a=Rh,s=Mh,l={},c=Eh("start","drag","end"),u=0,h=0;function d(e){e.on("mousedown.drag",p).filter(s).on("touchstart.drag",g).on("touchmove.drag",b).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(a,s){if(!r&&i.call(this,a,s)){var l=y(this,o.call(this,a,s),a,s,"mouse");l&&(Be(a.view).on("mousemove.drag",f,!0).on("mouseup.drag",m,!0),Ch(a.view),kh(a),n=!1,e=a.clientX,t=a.clientY,l("start",a))}}function f(r){if(Ah(r),!n){var i=r.clientX-e,o=r.clientY-t;n=i*i+o*o>h}l.mouse("drag",r)}function m(e){Be(e.view).on("mousemove.drag mouseup.drag",null),Ih(e.view,n),Ah(e),l.mouse("end",e)}function g(e,t){if(i.call(this,e,t)){var n,r,a=e.changedTouches,s=o.call(this,e,t),l=a.length;for(n=0;n=0&&t._call.call(null,e),t=t._next;--jh}()}finally{jh=0,function(){for(var e,t,n=Fh,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:Fh=t);Uh=e,td(r)}(),Wh=0}}function ed(){var e=Yh.now(),t=e-Vh;t>zh&&(Xh-=t,Vh=e)}function td(e){jh||(Hh&&(Hh=clearTimeout(Hh)),e-Wh>24?(e<1/0&&(Hh=setTimeout(Jh,e-Yh.now()-Xh)),Gh&&(Gh=clearInterval(Gh))):(Gh||(Vh=Yh.now(),Gh=setInterval(ed,zh)),jh=1,qh(Jh)))}function nd(e,t,n){var r=new Qh;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}Qh.prototype=Zh.prototype={constructor:Qh,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?$h():+n)+(null==t?0:+t),this._next||Uh===this||(Uh?Uh._next=this:Fh=this,Uh=this),this._call=e,this._time=n,td()},stop:function(){this._call&&(this._call=null,this._time=1/0,td())}};var rd=Eh("start","end","cancel","interrupt"),id=[],od=0,ad=1,sd=2,ld=3,cd=4,ud=5,hd=6;function dd(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(e){n.state=ad,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(o){var c,u,h,d;if(n.state!==ad)return l();for(c in i)if((d=i[c]).name===n.name){if(d.state===ld)return nd(a);d.state===cd?(d.state=hd,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+cod)throw new Error("too late; already scheduled");return n}function fd(e,t){var n=md(e,t);if(n.state>ld)throw new Error("too late; already running");return n}function md(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function gd(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>sd&&n.state=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?pd:fd;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=C(e),r="transform"===n?Rr:Td;return this.attrTween(e,"function"==typeof t?(n.local?kd:Sd)(n,r,yd(this,"attr."+e,t)):null==t?(n.local?Ed:_d)(n):(n.local?wd:xd)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=C(e);return this.tween(n,(r.local?Ad:Cd)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?Nr:Td;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=oe(this,e),a=(this.style.removeProperty(e),oe(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,Rd(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=oe(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=oe(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,yd(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=fd(this,e),c=l.on,u=null==l.value[a]?o||(o=Rd(t)):void 0;c===n&&i===u||(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=oe(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(yd(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=md(this.node(),n).tween,o=0,a=i.length;o()=>e;function Gd(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function zd(e){e.preventDefault(),e.stopImmediatePropagation()}var Vd={name:"drag"},Wd={name:"space"},Xd={name:"handle"},Yd={name:"center"};const{abs:qd,max:$d,min:Kd}=Math;function Qd(e){return[+e[0],+e[1]]}function Zd(e){return[Qd(e[0]),Qd(e[1])]}var Jd={name:"x",handles:["w","e"].map(sp),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},ep={name:"y",handles:["n","s"].map(sp),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},tp={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(sp),input:function(e){return null==e?null:Zd(e)},output:function(e){return e}},np={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},rp={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ip={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},op={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},ap={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function sp(e){return{type:e}}function lp(e){return!e.ctrlKey&&!e.button}function cp(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function up(){return navigator.maxTouchPoints||"ontouchstart"in this}function hp(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function dp(){return mp(Jd)}function pp(){return mp(ep)}function fp(){return mp(tp)}function mp(e){var t,n=cp,r=lp,i=up,o=!0,a=Eh("start","brush","end"),s=6;function l(t){var n=t.property("__brush",m).selectAll(".overlay").data([sp("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",np.overlay).merge(n).each((function(){var e=hp(this).extent;Be(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])})),t.selectAll(".selection").data([sp("selection")]).enter().append("rect").attr("class","selection").attr("cursor",np.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,(function(e){return e.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(e){return"handle handle--"+e.type})).attr("cursor",(function(e){return np[e.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",f).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var e=Be(this),t=hp(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",(function(e){return"e"===e.type[e.type.length-1]?t[1][0]-s/2:t[0][0]-s/2})).attr("y",(function(e){return"s"===e.type[0]?t[1][1]-s/2:t[0][1]-s/2})).attr("width",(function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+s:s})).attr("height",(function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+s:s}))):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new h(e,t,n):r}function h(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function d(n){if((!t||n.touches)&&r.apply(this,arguments)){var i,a,s,l,h,d,p,f,m,g,b,v=this,y=n.target.__data__.type,T="selection"===(o&&n.metaKey?y="overlay":y)?Vd:o&&n.altKey?Yd:Xd,_=e===ep?null:op[y],E=e===Jd?null:ap[y],x=hp(v),w=x.extent,S=x.selection,k=w[0][0],A=w[0][1],C=w[1][0],I=w[1][1],O=0,D=0,P=_&&E&&o&&n.shiftKey,N=Array.from(n.touches||[n],(e=>{const t=e.identifier;return(e=Ge(e,v)).point0=e.slice(),e.identifier=t,e}));if("overlay"===y){S&&(m=!0);const t=[N[0],N[1]||N[0]];x.selection=S=[[i=e===ep?k:Kd(t[0][0],t[1][0]),s=e===Jd?A:Kd(t[0][1],t[1][1])],[h=e===ep?C:$d(t[0][0],t[1][0]),p=e===Jd?I:$d(t[0][1],t[1][1])]],N.length>1&&U()}else i=S[0][0],s=S[0][1],h=S[1][0],p=S[1][1];a=i,l=s,d=h,f=p;var R=Be(v).attr("pointer-events","none"),M=R.selectAll(".overlay").attr("cursor",np[y]);gd(v);var L=u(v,arguments,!0).beforestart();if(n.touches)L.moved=F,L.ended=j;else{var B=Be(n.view).on("mousemove.brush",F,!0).on("mouseup.brush",j,!0);o&&B.on("keydown.brush",(function(e){switch(e.keyCode){case 16:P=_&&E;break;case 18:T===Xd&&(_&&(h=d-O*_,i=a+O*_),E&&(p=f-D*E,s=l+D*E),T=Yd,U());break;case 32:T!==Xd&&T!==Yd||(_<0?h=d-O:_>0&&(i=a-O),E<0?p=f-D:E>0&&(s=l-D),T=Wd,M.attr("cursor",np.selection),U());break;default:return}zd(e)}),!0).on("keyup.brush",(function(e){switch(e.keyCode){case 16:P&&(g=b=P=!1,U());break;case 18:T===Yd&&(_<0?h=d:_>0&&(i=a),E<0?p=f:E>0&&(s=l),T=Xd,U());break;case 32:T===Wd&&(e.altKey?(_&&(h=d-O*_,i=a+O*_),E&&(p=f-D*E,s=l+D*E),T=Yd):(_<0?h=d:_>0&&(i=a),E<0?p=f:E>0&&(s=l),T=Xd),M.attr("cursor",np[y]),U());break;default:return}zd(e)}),!0),Ch(n.view)}c.call(v),L.start(n,T.name)}function F(e){for(const t of e.changedTouches||[e])for(const e of N)e.identifier===t.identifier&&(e.cur=Ge(t,v));if(P&&!g&&!b&&1===N.length){const e=N[0];qd(e.cur[0]-e[0])>qd(e.cur[1]-e[1])?b=!0:g=!0}for(const e of N)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);m=!0,zd(e),U(e)}function U(e){const t=N[0],n=t.point0;var r;switch(O=t[0]-n[0],D=t[1]-n[1],T){case Wd:case Vd:_&&(O=$d(k-i,Kd(C-h,O)),a=i+O,d=h+O),E&&(D=$d(A-s,Kd(I-p,D)),l=s+D,f=p+D);break;case Xd:N[1]?(_&&(a=$d(k,Kd(C,N[0][0])),d=$d(k,Kd(C,N[1][0])),_=1),E&&(l=$d(A,Kd(I,N[0][1])),f=$d(A,Kd(I,N[1][1])),E=1)):(_<0?(O=$d(k-i,Kd(C-i,O)),a=i+O,d=h):_>0&&(O=$d(k-h,Kd(C-h,O)),a=i,d=h+O),E<0?(D=$d(A-s,Kd(I-s,D)),l=s+D,f=p):E>0&&(D=$d(A-p,Kd(I-p,D)),l=s,f=p+D));break;case Yd:_&&(a=$d(k,Kd(C,i-O*_)),d=$d(k,Kd(C,h+O*_))),E&&(l=$d(A,Kd(I,s-D*E)),f=$d(A,Kd(I,p+D*E)))}de.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:this.active.collection;return this.refs[e].sort(Lp)}}]),e}();function Lp(e,t){return e.node.sortableInfo.index-t.node.sortableInfo.index}function Bp(e,t){return Object.keys(e).reduce((function(n,r){return-1===t.indexOf(r)&&(n[r]=e[r]),n}),{})}var Fp={end:["touchend","touchcancel","mouseup"],move:["touchmove","mousemove"],start:["touchstart","mousedown"]},Up=function(){if("undefined"==typeof window||"undefined"==typeof document)return"";var e=window.getComputedStyle(document.documentElement,"")||["-moz-hidden-iframe"],t=(Array.prototype.slice.call(e).join("").match(/-(moz|webkit|ms)-/)||""===e.OLink&&["","o"])[1];return"ms"===t?"ms":t&&t.length?t[0].toUpperCase()+t.substr(1):""}();function jp(e,t){Object.keys(t).forEach((function(n){e.style[n]=t[n]}))}function Hp(e,t){e.style["".concat(Up,"Transform")]=null==t?"":"translate3d(".concat(t.x,"px,").concat(t.y,"px,0)")}function Gp(e,t){e.style["".concat(Up,"TransitionDuration")]=null==t?"":"".concat(t,"ms")}function zp(e,t){for(;e;){if(t(e))return e;e=e.parentNode}return null}function Vp(e,t,n){return Math.max(e,Math.min(n,t))}function Wp(e){return"px"===e.substr(-2)?parseFloat(e):0}function Xp(e,t){var n=t.displayName||t.name;return n?"".concat(e,"(").concat(n,")"):e}function Yp(e,t){var n=e.getBoundingClientRect();return{top:n.top+t.top,left:n.left+t.left}}function qp(e){return e.touches&&e.touches.length?{x:e.touches[0].pageX,y:e.touches[0].pageY}:e.changedTouches&&e.changedTouches.length?{x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY}:{x:e.pageX,y:e.pageY}}function $p(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{left:0,top:0};if(e){var r={left:n.left+e.offsetLeft,top:n.top+e.offsetTop};return e.parentNode===t?r:$p(e.parentNode,t,r)}}function Kp(e){var t=e.lockOffset,n=e.width,r=e.height,i=t,o=t,a="px";if("string"==typeof t){var s=/^[+-]?\d*(?:\.\d*)?(px|%)$/.exec(t);Np(null!==s,'lockOffset value should be a number or a string of a number followed by "px" or "%". Given %s',t),i=parseFloat(t),o=parseFloat(t),a=s[1]}return Np(isFinite(i)&&isFinite(o),"lockOffset value should be a finite. Given %s",t),"%"===a&&(i=i*n/100,o=o*r/100),{x:i,y:o}}function Qp(e){return e instanceof HTMLElement?function(e){var t=window.getComputedStyle(e),n=/(auto|scroll)/;return["overflow","overflowX","overflowY"].find((function(e){return n.test(t[e])}))}(e)?e:Qp(e.parentNode):null}var Zp=27,Jp=32,ef=37,tf=38,nf=39,rf=40,of={Anchor:"A",Button:"BUTTON",Canvas:"CANVAS",Input:"INPUT",Option:"OPTION",Textarea:"TEXTAREA",Select:"SELECT"};function af(e){var t,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return r=t=function(t){function r(){return Sp(this,r),Ip(this,Op(r).apply(this,arguments))}return Pp(r,t),Ap(r,[{key:"componentDidMount",value:function(){l.findDOMNode(this).sortableHandle=!0}},{key:"getWrappedInstance",value:function(){return Np(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableHandle() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=i.withRef?"wrappedInstance":null;return n.createElement(e,bp({ref:t},this.props))}}]),r}(n.Component),xp(t,"displayName",Xp("sortableHandle",e)),r}function sf(e){return null!=e.sortableHandle}var lf=function(){function e(t,n){Sp(this,e),this.container=t,this.onScrollCallback=n}return Ap(e,[{key:"clear",value:function(){null!=this.interval&&(clearInterval(this.interval),this.interval=null)}},{key:"update",value:function(e){var t=this,n=e.translate,r=e.minTranslate,i=e.maxTranslate,o=e.width,a=e.height,s={x:0,y:0},l={x:1,y:1},c=10,u=10,h=this.container,d=h.scrollTop,p=h.scrollLeft,f=h.scrollHeight,m=h.scrollWidth,g=0===d,b=f-d-h.clientHeight==0,v=0===p,y=m-p-h.clientWidth==0;n.y>=i.y-a/2&&!b?(s.y=1,l.y=u*Math.abs((i.y-a/2-n.y)/a)):n.x>=i.x-o/2&&!y?(s.x=1,l.x=c*Math.abs((i.x-o/2-n.x)/o)):n.y<=r.y+a/2&&!g?(s.y=-1,l.y=u*Math.abs((n.y-a/2-r.y)/a)):n.x<=r.x+o/2&&!v&&(s.x=-1,l.x=c*Math.abs((n.x-o/2-r.x)/o)),this.interval&&(this.clear(),this.isAutoScrolling=!1),0===s.x&&0===s.y||(this.interval=setInterval((function(){t.isAutoScrolling=!0;var e={left:l.x*s.x,top:l.y*s.y};t.container.scrollTop+=e.top,t.container.scrollLeft+=e.left,t.onScrollCallback(e)}),5))}}]),e}();var cf={axis:S.exports.oneOf(["x","y","xy"]),contentWindow:S.exports.any,disableAutoscroll:S.exports.bool,distance:S.exports.number,getContainer:S.exports.func,getHelperDimensions:S.exports.func,helperClass:S.exports.string,helperContainer:S.exports.oneOfType([S.exports.func,"undefined"==typeof HTMLElement?S.exports.any:S.exports.instanceOf(HTMLElement)]),hideSortableGhost:S.exports.bool,keyboardSortingTransitionDuration:S.exports.number,lockAxis:S.exports.string,lockOffset:S.exports.oneOfType([S.exports.number,S.exports.string,S.exports.arrayOf(S.exports.oneOfType([S.exports.number,S.exports.string]))]),lockToContainerEdges:S.exports.bool,onSortEnd:S.exports.func,onSortMove:S.exports.func,onSortOver:S.exports.func,onSortStart:S.exports.func,pressDelay:S.exports.number,pressThreshold:S.exports.number,keyCodes:S.exports.shape({lift:S.exports.arrayOf(S.exports.number),drop:S.exports.arrayOf(S.exports.number),cancel:S.exports.arrayOf(S.exports.number),up:S.exports.arrayOf(S.exports.number),down:S.exports.arrayOf(S.exports.number)}),shouldCancelStart:S.exports.func,transitionDuration:S.exports.number,updateBeforeSortStart:S.exports.func,useDragHandle:S.exports.bool,useWindowAsScrollContainer:S.exports.bool},uf={lift:[Jp],drop:[Jp],cancel:[Zp],up:[tf,ef],down:[rf,nf]},hf={axis:"y",disableAutoscroll:!1,distance:0,getHelperDimensions:function(e){var t=e.node;return{height:t.offsetHeight,width:t.offsetWidth}},hideSortableGhost:!0,lockOffset:"50%",lockToContainerEdges:!1,pressDelay:0,pressThreshold:5,keyCodes:uf,shouldCancelStart:function(e){return-1!==[of.Input,of.Textarea,of.Select,of.Option,of.Button].indexOf(e.target.tagName)||!!zp(e.target,(function(e){return"true"===e.contentEditable}))},transitionDuration:300,useWindowAsScrollContainer:!1},df=Object.keys(cf);var pf={index:S.exports.number.isRequired,collection:S.exports.oneOfType([S.exports.number,S.exports.string]),disabled:S.exports.bool},ff=Object.keys(pf);function mf(e){var t,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return r=t=function(t){function r(){return Sp(this,r),Ip(this,Op(r).apply(this,arguments))}return Pp(r,t),Ap(r,[{key:"componentDidMount",value:function(){this.register()}},{key:"componentDidUpdate",value:function(e){this.node&&(e.index!==this.props.index&&(this.node.sortableInfo.index=this.props.index),e.disabled!==this.props.disabled&&(this.node.sortableInfo.disabled=this.props.disabled)),e.collection!==this.props.collection&&(this.unregister(e.collection),this.register())}},{key:"componentWillUnmount",value:function(){this.unregister()}},{key:"register",value:function(){var e=this.props,t=e.collection,n=e.disabled,r=e.index,i=l.findDOMNode(this);i.sortableInfo={collection:t,disabled:n,index:r,manager:this.context.manager},this.node=i,this.ref={node:i},this.context.manager.add(t,this.ref)}},{key:"unregister",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.collection;this.context.manager.remove(e,this.ref)}},{key:"getWrappedInstance",value:function(){return Np(i.withRef,"To access the wrapped instance, you need to pass in {withRef: true} as the second argument of the SortableElement() call"),this.refs.wrappedInstance}},{key:"render",value:function(){var t=i.withRef?"wrappedInstance":null;return n.createElement(e,bp({ref:t},Bp(this.props,ff)))}}]),r}(n.Component),xp(t,"displayName",Xp("sortableElement",e)),xp(t,"contextTypes",{manager:S.exports.object.isRequired}),xp(t,"propTypes",pf),xp(t,"defaultProps",{collection:0}),r}const gf=We((e=>e.pos)).left,bf=(e,t)=>{if(!t||!t.cumPositions||!t.cumPositions.length)return null;let n=gf(t.cumPositions,e);const r=t.cumPositions[t.cumPositions.length-1].chr,i=t.chromLengths[r];n-=n>0&&1;let o=Math.floor(e-t.cumPositions[n].pos),a=0;return o<0&&(a=o-1,o=1),n===t.cumPositions.length-1&&o>i&&(a=o-i,o=i),[t.cumPositions[n].chr,o,a,n]},vf=(e,t)=>n=>n%e*t+Math.floor(n/e),yf=e=>e,Tf=(e,t,n=yf)=>e.map(((e,r)=>e+t[n(r)])),_f=(e,t)=>{if("http://www.w3.org/2000/svg"===e.namespaceURI){const n=e.getAttribute("class");return n&&!!n.match(new RegExp(`(\\s|^)${t}(\\s|$)`))}return e.classList?e.classList.contains(t):!!e.className.match(new RegExp(`(\\s|^)${t}(\\s|$)`))},Ef=(e,t,n)=>n.chrPositions[e].pos+t,xf=e=>{const t=new e.constructor(e.type,e);return t.sourceUid=e.sourceUid,t.forwarded=e.forwarded,t},wf=(e,t=!1)=>{const n=e.map(((t,n)=>n*(255/(e.length-1)))),r=fi().domain(n).range(e),i=Gt(t?255:254,-1,-1).map(r).map((e=>{const t=An(e);return[t.r,t.g,t.b,255*t.opacity]}));return i.length<256&&i.push([255,255,255,0]),i},Sf="move",kf="select",Af=3e3,Cf="locationListenerPrefix",If="http://higlass.io/api/v1",Of=["top","left","right","bottom","center","whole","gallery"],Df=Symbol("Light theme"),Pf=Symbol("Dark theme"),Nf=Df,Rf={PIXI:b},Mf={"multitrack-header":"_multitrack-header_1yz7l_1","multitrack-header-focus":"_multitrack-header-focus_1yz7l_2","multitrack-header-squeazed":"_multitrack-header-squeazed_1yz7l_3","multitrack-header-dark":"_multitrack-header-dark_1yz7l_20","multitrack-header-id":"_multitrack-header-id_1yz7l_30","multitrack-header-left":"_multitrack-header-left_1yz7l_39","multitrack-header-grabber":"_multitrack-header-grabber_1yz7l_44","multitrack-header-grabber-squeazed":"_multitrack-header-grabber-squeazed_1yz7l_45","multitrack-header-search":"_multitrack-header-search_1yz7l_80","multitrack-header-nav-list":"_multitrack-header-nav-list_1yz7l_102","multitrack-header-icon":"_multitrack-header-icon_1yz7l_107","multitrack-header-icon-squeazed":"_multitrack-header-icon-squeazed_1yz7l_108","mouse-tool-selection":"_mouse-tool-selection_1yz7l_136"},Lf=[{id:"cog",paths:["M466.895 305.125c-26.863-46.527-10.708-106.152 36.076-133.244l-50.313-87.146c-14.375 8.427-31.088 13.259-48.923 13.259-53.768 0-97.354-43.873-97.354-97.995h-100.629c0.133 16.705-4.037 33.641-12.979 49.126-26.862 46.528-86.578 62.351-133.431 35.379l-50.312 87.146c14.485 8.236 27.025 20.294 35.943 35.739 26.819 46.454 10.756 105.96-35.854 133.112l50.313 87.146c14.325-8.348 30.958-13.127 48.7-13.127 53.598 0 97.072 43.596 97.35 97.479h100.627c-0.043-16.537 4.136-33.285 12.983-48.609 26.818-46.453 86.388-62.297 133.207-35.506l50.313-87.145c-14.39-8.233-26.846-20.249-35.717-35.614zM256 359.666c-57.254 0-103.668-46.412-103.668-103.667 0-57.254 46.413-103.667 103.668-103.667s103.666 46.413 103.666 103.667c-0.001 57.255-46.412 103.667-103.666 103.667z"],viewBox:"0 0 512 512"},{id:"cross",paths:["M507.331 411.33c-0.002-0.002-0.004-0.004-0.006-0.005l-155.322-155.325 155.322-155.325c0.002-0.002 0.004-0.003 0.006-0.005 1.672-1.673 2.881-3.627 3.656-5.708 2.123-5.688 0.912-12.341-3.662-16.915l-73.373-73.373c-4.574-4.573-11.225-5.783-16.914-3.66-2.080 0.775-4.035 1.984-5.709 3.655 0 0.002-0.002 0.003-0.004 0.005l-155.324 155.326-155.324-155.325c-0.002-0.002-0.003-0.003-0.005-0.005-1.673-1.671-3.627-2.88-5.707-3.655-5.69-2.124-12.341-0.913-16.915 3.66l-73.374 73.374c-4.574 4.574-5.784 11.226-3.661 16.914 0.776 2.080 1.985 4.036 3.656 5.708 0.002 0.001 0.003 0.003 0.005 0.005l155.325 155.324-155.325 155.326c-0.001 0.002-0.003 0.003-0.004 0.005-1.671 1.673-2.88 3.627-3.657 5.707-2.124 5.688-0.913 12.341 3.661 16.915l73.374 73.373c4.575 4.574 11.226 5.784 16.915 3.661 2.080-0.776 4.035-1.985 5.708-3.656 0.001-0.002 0.003-0.003 0.005-0.005l155.324-155.325 155.324 155.325c0.002 0.001 0.004 0.003 0.006 0.004 1.674 1.672 3.627 2.881 5.707 3.657 5.689 2.123 12.342 0.913 16.914-3.661l73.373-73.374c4.574-4.574 5.785-11.227 3.662-16.915-0.776-2.080-1.985-4.034-3.657-5.707z"],viewBox:"0 0 512 512"},{id:"enlarge",paths:["M512 0h-208l80 80-96 96 48 48 96-96 80 80z","M512 512v-208l-80 80-96-96-48 48 96 96-80 80z","M0 512h208l-80-80 96-96-48-48-96 96-80-80z","M0 0v208l80-80 96 96 48-48-96-96 80-80z"],viewBox:"0 0 512 512"},{id:"minus",paths:["M0 208v96c0 8.836 7.164 16 16 16h480c8.836 0 16-7.164 16-16v-96c0-8.836-7.164-16-16-16h-480c-8.836 0-16 7.164-16 16z"],viewBox:"0 0 512 512"},{id:"move",paths:["M512,260.096L405.5,161.79v49.155H301.061v-104.45h49.149L251.904,0L160.77,106.495h49.15v104.45H106.495V161.79L0,260.096l106.495,91.135v-49.149h104.45v104.45H161.79L251.904,512l98.306-106.5h-49.149V301.061H405.5v49.149L512,260.096z"],viewBox:"0 0 512 512"},{id:"play",paths:["M96 64l320 192-320 192z"],viewBox:"0 0 512 512"},{id:"plus",paths:["M496 192h-176v-176c0-8.836-7.164-16-16-16h-96c-8.836 0-16 7.164-16 16v176h-176c-8.836 0-16 7.164-16 16v96c0 8.836 7.164 16 16 16h176v176c0 8.836 7.164 16 16 16h96c8.836 0 16-7.164 16-16v-176h176c8.836 0 16-7.164 16-16v-96c0-8.836-7.164-16-16-16z"],viewBox:"0 0 512 512"},{id:"copy",paths:["M607.5 672v-448.5h-351v448.5h351zM607.5 160.5c34.5 0 64.5 28.5 64.5 63v448.5c0 34.5-30 64.5-64.5 64.5h-351c-34.5 0-64.5-30-64.5-64.5v-448.5c0-34.5 30-63 64.5-63h351zM511.5 31.5v64.5h-384v448.5h-63v-448.5c0-34.5 28.5-64.5 63-64.5h384z"],viewBox:"0 0 712 712"},{id:"select",viewBox:"0 0 16 16",paths:["M2 14h2v1H1v-3h1v2zm8 1H6v-1h4v1zm5 0h-3v-1h2v-2h1v3zm0-5h-1V6h1v4zM2 10H1V6h1v4zm13-6h-1V2h-2V1h3v3zM4 2H2v2H1V1h3v1zm6 0H6V1h4.03L10 2z"]},{id:"check_square_o",viewBox:"0 0 1792 1792",paths:["M1472 930v318q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-10 10-23 10-3 0-9-2-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-254q0-13 9-22l64-64q10-10 23-10 6 0 12 3 20 8 20 29zm231-489l-814 814q-24 24-57 24t-57-24l-430-430q-24-24-24-57t24-57l110-110q24-24 57-24t57 24l263 263 647-647q24-24 57-24t57 24l110 110q24 24 24 57t-24 57z"]},{id:"square_o",viewBox:"0 0 1792 1792",paths:["M1312 256h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-832q0-66-47-113t-113-47zm288 160v832q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q119 0 203.5 84.5t84.5 203.5z"]},{id:"file_o",viewBox:"0 0 1792 1792",paths:["M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280z"]},{id:"folder_o",viewBox:"0 0 1792 1792",paths:["M1600 1312v-704q0-40-28-68t-68-28h-704q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v960q0 40 28 68t68 28h1216q40 0 68-28t28-68zm128-704v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z"]},{id:"folder_open_o",viewBox:"0 0 1792 1792",paths:["M1845 931q0-35-53-35h-1088q-40 0-85.5 21.5t-71.5 52.5l-294 363q-18 24-18 40 0 35 53 35h1088q40 0 86-22t71-53l294-363q18-22 18-39zm-1141-163h768v-160q0-40-28-68t-68-28h-576q-40 0-68-28t-28-68v-64q0-40-28-68t-68-28h-320q-40 0-68 28t-28 68v853l256-315q44-53 116-87.5t140-34.5zm1269 163q0 62-46 120l-295 363q-43 53-116 87.5t-140 34.5h-1088q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h544q92 0 158 66t66 158v160h192q54 0 99 24.5t67 70.5q15 32 15 68z"]},{id:"chevron_right",viewBox:"0 0 1792 1792",paths:["M1363 877l-742 742q-19 19-45 19t-45-19l-166-166q-19-19-19-45t19-45l531-531-531-531q-19-19-19-45t19-45l166-166q19-19 45-19t45 19l742 742q19 19 19 45t-19 45z"]},{id:"chevron_down",viewBox:"0 0 1792 1792",paths:["M1683 808l-742 741q-19 19-45 19t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19 45-19t45 19l531 531 531-531q19-19 45-19t45 19l166 165q19 19 19 45.5t-19 45.5z"]}],Bf=new DOMParser,Ff=Bf.parseFromString('',"text/xml").documentElement,Uf=Bf.parseFromString('\n\n \n \n \n \n \n \n\n',"text/xml").documentElement,jf=Bf.parseFromString('\n\n line\n \n \n \n \n\n',"text/xml").documentElement,Hf=Bf.parseFromString('\n\n \x3c!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch --\x3e\n 2d-tiles-icon\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',"text/xml").documentElement,Gf=Bf.parseFromString('\n\n \x3c!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch --\x3e\n 2d-heatmap\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',"text/xml").documentElement,zf='\n\n \x3c!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch --\x3e\n axis-1d\n Created with Sketch.\n \n \n \n \n\n',Vf=Bf.parseFromString(zf,"text/xml").documentElement,Wf=Be(Bf.parseFromString(zf,"text/xml").documentElement).style("transform","rotate(90deg)").node(),Xf=Bf.parseFromString('\n\n \x3c!-- Generator: Sketch 41 (35326) - http://www.bohemiancoding.com/sketch --\x3e\n gene-annotations\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',"text/xml").documentElement,Yf='\n\n \x3c!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch --\x3e\n 1d-tiles-icon\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',qf=Bf.parseFromString(Yf,"text/xml").documentElement,$f=Be(Bf.parseFromString(Yf,"text/xml").documentElement).style("transform","rotate(90deg)").node(),Kf=Bf.parseFromString('\n\n \x3c!-- Generator: Sketch 42 (36781) - http://www.bohemiancoding.com/sketch --\x3e\n arrowhead-domains\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n',"text/xml").documentElement;function Qf({theStyle:e,onClick:t}){return m.default.createElement("svg",{className:Mf[e],viewBox:"0 0 12 13",onClick:t,xmlns:"http://www.w3.org/2000/svg"},m.default.createElement("g",{fill:"none",stroke:"#6c6c6c",strokeWidth:"2"},m.default.createElement("path",{d:"M11.29 11.71l-4-4"}),m.default.createElement("circle",{cx:"5",cy:"5",r:"4"})))}const Zf={type:"osm-tiles",datatype:["map-tiles"],local:!0,orientation:"2d",hidden:!0,name:"OSM Tiles",thumbnail:Ff,availableOptions:["minPos","maxPos","maxZoom","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","name"],defaultOptions:{minPos:-180,maxPos:180,maxZoom:19,labelPosition:"bottomRight",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0}},Jf={type:"mapbox-tiles",datatype:["map-tiles"],local:!0,orientation:"2d",hidden:!0,name:"Mapbox Tiles",thumbnail:Ff,availableOptions:["style","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","name"],defaultOptions:{style:"mapbox.streets",labelPosition:"bottomRight",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0}},em=[Zf,{...Zf,type:"osm"},Jf,{...Jf,type:"mapbox"},{type:"left-axis",datatype:["axis"],local:!0,orientation:"1d-vertical",name:"Left Axis",thumbnail:Wf,availableOptions:["minWidth"],defaultOptions:{minWidth:100}},{type:"top-axis",datatype:["axis"],local:!0,orientation:"1d-horizontal",name:"Top Axis",thumbnail:Vf,defaultOptions:{}},{type:"horizontal-rule",datatype:["x-coord"],local:!0,orientation:"whole",name:"Horizontal Rule",thumbnail:null,availableOptions:["color"],defaultOptions:{color:"black"}},{type:"vertical-rule",datatype:["y-coord"],local:!0,orientation:"whole",name:"Vertical Rule",thumbnail:null,availableOptions:["color"],defaultOptions:{color:"black"}},{type:"cross-rule",datatype:["xy-coord"],local:!0,orientation:"whole",name:"Cross Rule",thumbnail:null,availableOptions:["color"],defaultOptions:{color:"black"}},{type:"simple-svg",datatype:[],local:!1,orientation:"2d",exportable:!0,availableOptions:["minWidth","minHeight"],defaultOptions:{minWidth:100,minHeight:100}},{type:"heatmap",datatype:["matrix"],local:!1,orientation:"2d",thumbnail:Gf,exportable:!0,availableOptions:["backgroundColor","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundOpacity","colorRange","colorbarBackgroundColor","maxZoom","minWidth","minHeight","dataTransform","colorbarPosition","trackBorderWidth","trackBorderColor","heatmapValueScaling","showMousePosition","mousePositionColor","showTooltip","extent","zeroValueColor"],defaultOptions:{backgroundColor:"#eeeeee",labelPosition:"bottomRight",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,colorRange:["white","rgba(245,166,35,1.0)","rgba(208,2,27,1.0)","black"],colorbarBackgroundColor:"#ffffff",maxZoom:null,minWidth:100,minHeight:100,colorbarPosition:"topRight",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log",showMousePosition:!1,mousePositionColor:"#000000",showTooltip:!1,extent:"full",zeroValueColor:null},defaultOptionsByTheme:{[Pf]:{backgroundColor:"#000000",colorRange:["black","rgba(208,2,27,1.0)","rgba(245,166,35,1.0)","white"],colorbarBackgroundColor:"#000000",labelColor:"#ffffff",labelBackgroundColor:"#000000",trackBorderColor:"#ffffff",mousePositionColor:"#ffffff"}}},{type:"linear-heatmap",aliases:["horizontal-heatmap","vertical-heatmap"],datatype:["matrix"],local:!1,orientation:"1d-horizontal",rotatable:!0,thumbnail:Gf,defaultOptions:{backgroundColor:"#eeeeee",labelPosition:"bottomRight",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,labelColor:"black",colorRange:["white","rgba(245,166,35,1.0)","rgba(208,2,27,1.0)","black"],maxZoom:null,minWidth:100,minHeight:40,trackBorderWidth:0,trackBorderColor:"black"},availableOptions:["backgroundColor","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundOpacity","colorRange","maxZoom","minWidth","minHeight","dataTransform","oneDHeatmapFlipped","colorbarPosition","trackBorderWidth","trackBorderColor","heatmapValueScaling"]},{type:"line",aliases:["horizontal-line","vertical-line"],datatype:["vector"],local:!1,orientation:"1d-horizontal",rotatable:!0,thumbnail:jf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundColor","labelBackgroundOpacity","axisLabelFormatting","axisPositionHorizontal","axisMargin","lineStrokeWidth","lineStrokeColor","valueScaling","valueScaleMin","valueScaleMax","trackBorderWidth","trackBorderColor","trackType","showMousePosition","showTooltip","mousePositionColor","aggregationMode","minHeight"],defaultOptions:{labelColor:"black",labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelBackgroundColor:"white",labelShowResolution:!1,labelShowAssembly:!0,axisLabelFormatting:"scientific",axisPositionHorizontal:"right",lineStrokeColor:"blue",lineStrokeWidth:1,valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",labelTextOpacity:.4,showMousePosition:!1,minHeight:20,mousePositionColor:"#000000",showTooltip:!1},defaultOptionsByTheme:{[Pf]:{labelColor:"#ffffff",labelBackgroundColor:"#000000",trackBorderColor:"#ffffff",mousePositionColor:"#ffffff"}}},{type:"1d-heatmap",aliases:["horizontal-1d-heatmap","vertical-1d-heatmap"],datatype:["vector"],local:!1,orientation:"1d-horizontal",rotatable:!0,thumbnail:Uf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundOpacity","axisPositionHorizontal","axisMargin","colorRange","valueScaling","trackBorderWidth","trackBorderColor","trackType","showMousePosition","showTooltip","mousePositionColor","aggregationMode"],defaultOptions:{labelColor:"black",labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!1,labelShowAssembly:!0,axisPositionHorizontal:"right",colorRange:["white","rgba(245,166,35,1.0)","rgba(208,2,27,1.0)","black"],valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",labelTextOpacity:.4,showMousePosition:!1,mousePositionColor:"#000000",showTooltip:!1}},{type:"vector-heatmap",aliases:["horizontal-vector-heatmap","vertical-vector-heatmap"],datatype:["vector"],local:!1,orientation:"1d-horizontal",rotatable:!0,minHeight:1,thumbnail:null,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","valueScaling","labelTextOpacity","labelBackgroundOpacity","colorRange","trackBorderWidth","trackBorderColor","trackType","heatmapValueScaling"],defaultOptions:{labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!1,labelShowAssembly:!0,labelColor:"black",labelTextOpacity:.4,valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log"}},{type:"multivec",aliases:["horizontal-multivec","vertical-multivec"],datatype:["multivec"],local:!1,orientation:"1d-horizontal",rotatable:!0,thumbnail:null,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","minHeight","valueScaling","labelTextOpacity","labelBackgroundOpacity","colorRange","trackBorderWidth","trackBorderColor","trackType","heatmapValueScaling","selectRows","selectRowsAggregationMode","selectRowsAggregationWithRelativeHeight","selectRowsAggregationMethod","colorbarBackgroundColor","colorbarPosition","zeroValueColor"],defaultOptions:{labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!0,labelShowAssembly:!0,labelColor:"black",labelTextOpacity:.4,minHeight:100,valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",heatmapValueScaling:"log",selectRows:null,selectRowsAggregationMode:"mean",selectRowsAggregationWithRelativeHeight:!0,selectRowsAggregationMethod:"client",colorbarBackgroundColor:"#ffffff",colorbarPosition:"topRight",zeroValueColor:null},defaultOptionsByTheme:{[Pf]:{colorbarBackgroundColor:"#000000"}}},{type:"point",aliases:["horizontal-point","vertical-point"],datatype:["vector"],local:!1,orientation:"1d-horizontal",rotatable:!0,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundOpacity","axisLabelFormatting","axisPositionHorizontal","axisMargin","pointColor","pointSize","valueScaling","trackBorderWidth","trackBorderColor"],defaultOptions:{labelColor:"black",labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!1,labelShowAssembly:!0,axisLabelFormatting:"scientific",axisPositionHorizontal:"right",pointColor:"red",pointSize:3,valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",labelTextOpacity:.4}},{type:"divergent-bar",aliases:["horizontal-divergent-bar","vertical-divergent-bar"],datatype:["vector"],local:!1,orientation:"1d-horizontal",rotatable:!0,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundOpacity","axisLabelFormatting","axisPositionHorizontal","axisMargin","barFillColorTop","barFillColorBottom","valueScaling","trackBorderWidth","trackBorderColor","barOpacity"],defaultOptions:{labelColor:"black",labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!1,labelShowAssembly:!0,axisPositionHorizontal:"right",axisLabelFormatting:"scientific",barFillColorBottom:"red",barFillColorTop:"green",valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",labelTextOpacity:.4,barOpacity:1}},{type:"bar",aliases:["horizontal-bar","vertical-bar"],datatype:["vector"],local:!1,orientation:"1d-horizontal",rotatable:!0,availableOptions:["align","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelShowResolution","labelShowAssembly","labelColor","labelTextOpacity","labelBackgroundOpacity","axisLabelFormatting","axisPositionHorizontal","axisMargin","barFillColor","colorRange","colorRangeGradient","valueScaling","valueScaleMin","valueScaleMax","trackBorderWidth","trackBorderColor","barOpacity","showMousePosition","showTooltip","aggregationMode","zeroLineVisible","zeroLineColor","zeroLineOpacity"],defaultOptions:{align:"bottom",labelColor:"[glyph-color]",labelPosition:"topLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,labelShowResolution:!1,labelShowAssembly:!0,axisLabelFormatting:"scientific",axisPositionHorizontal:"right",barFillColor:"darkgreen",valueScaling:"linear",trackBorderWidth:0,trackBorderColor:"black",labelTextOpacity:.4,barOpacity:1}},{type:"2d-tiles",datatype:["matrix"],local:!1,orientation:"2d",name:"2D Tile Outlines",thumbnail:Hf},{type:"1d-value-interval",aliases:["horizontal-1d-value-interval","vertical-1d-value-interval"],datatype:["bed-value"],local:!1,orientation:["1d-horizontal"],rotatable:!0,name:"1D Rectangles",availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundOpacity","axisPositionHorizontal","axisMargin"],defaultOptions:{labelColor:"black",labelPosition:"bottomLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,axisPositionHorizontal:"left",lineStrokeColor:"blue",valueScaling:"linear"}},{type:"stacked-interval",aliases:["top-stacked-interval","left-stacked-interval"],datatype:["stacked-interval"],local:!1,orientation:"1d-horizontal",rotatable:!0,thumbnail:"horizontal-stacked-interval.png",availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundOpacity"]},{type:"viewport-projection-vertical",datatype:["1d-projection"],local:!0,hidden:!0,projection:!0,orientation:"1d-vertical",name:"Viewport Projection",thumbnail:"viewport-projection-center.png",availableOptions:["projectionFillColor","projectionStrokeColor","strokeWidth"],defaultOptions:{projectionFillColor:"#777",projectionStrokeColor:"#777",projectionFillOpacity:.3,projectionStrokeOpacity:.7,strokeWidth:1}},{type:"viewport-projection-horizontal",datatype:["1d-projection"],local:!0,hidden:!0,projection:!0,orientation:"1d-horizontal",name:"Viewport Projection",thumbnail:"viewport-projection-center.png",availableOptions:["projectionFillColor","projectionStrokeColor","strokeWidth"],defaultOptions:{projectionFillColor:"#777",projectionStrokeColor:"#777",projectionFillOpacity:.3,projectionStrokeOpacity:.7,strokeWidth:1}},{type:"viewport-projection-center",datatype:["2d-projection"],local:!0,hidden:!0,projection:!0,orientation:"2d",name:"Viewport Projection",thumbnail:"viewport-projection-center.png",availableOptions:["projectionFillColor","projectionStrokeColor","strokeWidth"],defaultOptions:{projectionFillColor:"#777",projectionStrokeColor:"#777",projectionFillOpacity:.3,projectionStrokeOpacity:.7,strokeWidth:1}},{type:"gene-annotations",aliases:["horizontal-gene-annotations","vertical-gene-annotations"],datatype:["gene-annotation"],local:!1,defaultHeight:90,defaultWidth:90,rotatable:!0,orientation:"1d-horizontal",name:"Gene Annotations",thumbnail:Xf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundColor","labelBackgroundOpacity","minHeight","plusStrandColor","minusStrandColor","trackBorderWidth","trackBorderColor","showMousePosition","mousePositionColor","fontSize","geneAnnotationHeight","geneLabelPosition","geneStrandSpacing"],defaultOptions:{fontSize:10,labelColor:"black",labelBackgroundColor:"#ffffff",labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:24,plusStrandColor:"blue",minusStrandColor:"red",trackBorderWidth:0,trackBorderColor:"black",showMousePosition:!1,mousePositionColor:"#000000",geneAnnotationHeight:16,geneLabelPosition:"outside",geneStrandSpacing:4},defaultOptionsByTheme:{[Pf]:{labelColor:"#ffffff",labelBackgroundColor:"#000000",trackBorderColor:"#ffffff",mousePositionColor:"#ffffff",plusStrandColor:"#40a0ff"}}},{type:"arrowhead-domains",datatype:["arrowhead-domains"],local:!1,orientation:"2d",name:"Arrowhead Domains",thumbnail:Kf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundOpacity","trackBorderWidth","trackBorderColor"],defaultOptions:{labelColor:"black",labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,trackBorderWidth:0,trackBorderColor:"black"}},{type:"linear-2d-rectangle-domains",aliases:["horizontal-2d-rectangle-domains","vertical-2d-rectangle-domains"],datatype:["2d-rectangle-domains"],local:!1,orientation:"1d-horizontal",rotatable:!0,name:"Horizontal 2D Rectangle Domains",thumbnail:Kf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundOpacity","trackBorderWidth","trackBorderColor","rectangleDomainFillColor","rectangleDomainStrokeColor","rectangleDomainOpacity","minSquareSize"],defaultOptions:{labelColor:"black",labelPosition:"bottomLeft",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,trackBorderWidth:0,trackBorderColor:"black",rectangleDomainFillColor:"grey",rectangleDomainStrokeColor:"black",rectangleDomainOpacity:.6,minSquareSize:"none"}},{type:"2d-rectangle-domains",datatype:["2d-rectangle-domains"],local:!1,orientation:"2d",name:"2D Rectangle Domains",thumbnail:Kf,availableOptions:["flipDiagonal","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundOpacity","trackBorderWidth","trackBorderColor","rectangleDomainFillColor","rectangleDomainFillOpacity","rectangleDomainStrokeColor","rectangleDomainOpacity","minSquareSize"],defaultOptions:{flipDiagonal:"none",labelColor:"black",labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,trackBorderWidth:0,trackBorderColor:"black",rectangleDomainFillColor:"grey",rectangleDomainFillOpacity:.4,rectangleDomainStrokeColor:"black",rectangleDomainOpacity:.6,minSquareSize:"none"}},{type:"horizontal-1d-annotations",datatype:["nothing"],local:!1,orientation:"1d-horizontal",name:"Horizontal 1D Annotations",thumbnail:null,availableOptions:["fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokePos","regions"],defaultOptions:{fill:"red",fillOpacity:.2,stroke:"red",strokeOpacity:0,strokeWidth:1,regions:[],strokePos:[]}},{type:"vertical-1d-annotations",datatype:["nothing"],local:!1,orientation:"1d-vertical",name:"Vertical 1D Annotations",thumbnail:null,availableOptions:["fill","fillOpacity","stroke","strokeOpacity","regions"],defaultOptions:{fill:"red",fillOpacity:"0.2",stroke:"red",strokeOpacity:"0",regions:[]}},{type:"2d-annotations",datatype:["2d-annotations"],local:!1,orientation:"2d",name:"2D Annotations",thumbnail:Kf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor","labelTextOpacity","labelBackgroundOpacity","trackBorderWidth","trackBorderColor","rectangleDomainFillColor","rectangleDomainStrokeColor","rectangleDomainOpacity","minSquareSize","isClickable","hoverColor","selectColor","exclude","trackBorderBgWidth","trackBorderBgColor","trackBorderBgAlpha"],defaultOptions:{labelColor:"black",labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,trackBorderWidth:0,trackBorderColor:"black",rectangleDomainFillColor:"grey",rectangleDomainStrokeColor:"black",rectangleDomainOpacity:.6,minSquareSize:"none",isClickable:!1,hoverColor:"orange",selectColor:"fuchsia",exclude:[],trackBorderBgWidth:0,trackBorderBgColor:"black",trackBorderBgAlpha:.33}},{type:"square-markers",datatype:["bedpe"],local:!1,orientation:"2d",name:"Square Markers",thumbnail:Kf,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","labelColor"],defaultOptions:{labelColor:"black",labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,trackBorderWidth:0,trackBorderColor:"black"}},{type:"combined",datatype:"any",local:!0,orientation:"any"},{type:"horizontal-chromosome-grid",datatype:["chromsizes"],local:!1,orientation:"1d-horizontal",name:"Chromosome Grid",chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",thumbnail:null,availableOptions:["lineStrokeWidth","lineStrokeColor","showMousePosition"],defaultOptions:{lineStrokeWidth:1,lineStrokeColor:"grey",showMousePosition:!1}},{type:"vertical-chromosome-grid",datatype:["chromsizes"],local:!1,orientation:"1d-vertical",name:"Chromosome Grid",chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",thumbnail:null,availableOptions:["lineStrokeWidth","lineStrokeColor","showMousePosition"],defaultOptions:{lineStrokeWidth:1,lineStrokeColor:"grey",showMousePosition:!1}},{type:"2d-chromosome-grid",datatype:["chromsizes"],local:!1,orientation:"2d",name:"Chromosome Grid",chromInfoPath:"//s3.amazonaws.com/pkerp/data/hg19/chromSizes.tsv",thumbnail:null,availableOptions:["lineStrokeWidth","lineStrokeColor"],defaultOptions:{lineStrokeWidth:1,lineStrokeColor:"grey"}},{type:"2d-chromosome-annotations",datatype:["chromsizes"],local:!0,orientation:"2d",name:"2D Chromosome Annotations",thumbnail:null,hidden:!0},{type:"2d-chromosome-labels",datatype:["chromsizes"],local:!0,orientation:"2d",name:"Pairwise Chromosome Labels",thumbnail:null},{type:"chromosome-labels",aliases:["horizontal-chromosome-labels","vertical-chromosome-labels"],datatype:["chromsizes"],orientation:"1d-horizontal",rotatable:!0,minHeight:35,defaultHeight:30,name:"Chromosome Axis",thumbnail:null,availableOptions:["color","stroke","fontSize","fontIsLeftAligned","showMousePosition","mousePositionColor","tickPositions","tickFormat","reverseOrientation"],defaultOptions:{color:"#808080",stroke:"#ffffff",fontSize:12,fontIsLeftAligned:!1,showMousePosition:!1,mousePositionColor:"#000000",reverseOrientation:!1},defaultOptionsByTheme:{[Pf]:{color:"#808080",stroke:"#000000",mousePositionColor:"#ffffff"}}},{type:"vertical-1d-tiles",datatype:["1d-tiles"],local:!1,orientation:"1d-vertical",name:"Vertical 1D Tile Outlines",thumbnail:$f},{type:"horizontal-1d-tiles",datatype:["vector","stacked-interval","gene-annotation"],local:!1,orientation:"1d-horizontal",name:"Horizontal 1D Tile Outlines",thumbnail:qf},{type:"osm-2d-tile-ids",datatype:["map-tiles"],local:!1,orientation:"2d",name:"OSM Tile Outlines",thumbnail:Hf,availableOptions:["minPos","maxPos","maxZoom","labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","name"],defaultOptions:{minPos:-180,maxPos:180,maxZoom:19,labelPosition:"bottomRight",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0}},{type:"raster-tiles",datatype:["map-tiles"],local:!0,orientation:"2d",hidden:!0,name:"Raster Tiles",thumbnail:Ff,availableOptions:["labelPosition","labelLeftMargin","labelRightMargin","labelTopMargin","labelBottomMargin","name"],defaultOptions:{labelPosition:"bottomRight",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0}},{type:"image-tiles",datatype:["image-tiles"],local:!0,orientation:"2d",hidden:!0,name:"Image Tiles",thumbnail:null},{type:"bedlike",datatype:["bedlike"],aliases:["vertical-bedlike"],local:!1,orientation:"1d-horizontal",rotatable:!0,name:"BED-like track",thumbnail:null,availableOptions:["alternating","annotationHeight","annotationStyle","fillColor","fillOpacity","fontColor","fontSize","minusStrandColor","plusStrandColor","labelBottomMargin","labelColor","labelLeftMargin","labelPosition","labelRightMargin","labelTopMargin","labelTextOpacity","labelBackgroundOpacity","maxAnnotationHeight","minHeight","trackBorderWidth","trackBorderColor","valueColumn","colorEncoding","colorRange","colorEncodingRange","separatePlusMinusStrands","showTexts","axisPositionHorizontal","axisMargin"],defaultOptions:{alternating:!1,annotationStyle:"box",fillColor:"blue",fillOpacity:.3,fontSize:"10",axisPositionHorizontal:"right",labelColor:"black",labelPosition:"hidden",labelLeftMargin:0,labelRightMargin:0,labelTopMargin:0,labelBottomMargin:0,minHeight:20,maxAnnotationHeight:null,trackBorderWidth:0,trackBorderColor:"black",valueColumn:null,colorEncoding:"itemRgb",showTexts:!1,colorRange:["#000000","#652537","#bf5458","#fba273","#ffffe0"],colorEncodingRange:!1,separatePlusMinusStrands:!0,annotationHeight:16}},{type:"empty",datatype:[],orientation:"1d-horizontal",name:"Empty track",thumbnail:null,availableOptions:[],defaultOptions:{}}],tm=e=>{const t={};return em.filter((t=>t.orientation===e||!("1d-vertical"!==e||"1d-horizontal"!==t.orientation||!t.rotatable))).forEach((e=>{let n=e.datatype;Array.isArray(e.datatype)||(n=[n]),n.forEach((n=>{n in t||(t[n]=[]),t[n].push(e)}))})),t.none=[],t},nm=[[0,0,0,255],[35,0,0,255],[52,0,0,255],[60,0,0,255],[63,1,0,255],[64,2,0,255],[68,5,0,255],[69,6,0,255],[72,8,0,255],[74,10,0,255],[77,12,0,255],[78,14,0,255],[81,16,0,255],[83,17,0,255],[85,19,0,255],[86,20,0,255],[89,22,0,255],[91,24,0,255],[92,25,0,255],[94,26,0,255],[95,28,0,255],[98,30,0,255],[100,31,0,255],[102,33,0,255],[103,34,0,255],[105,35,0,255],[106,36,0,255],[108,38,0,255],[109,39,0,255],[111,40,0,255],[112,42,0,255],[114,43,0,255],[115,44,0,255],[117,45,0,255],[119,47,0,255],[119,47,0,255],[120,48,0,255],[122,49,0,255],[123,51,0,255],[125,52,0,255],[125,52,0,255],[126,53,0,255],[128,54,0,255],[129,56,0,255],[129,56,0,255],[131,57,0,255],[132,58,0,255],[134,59,0,255],[134,59,0,255],[136,61,0,255],[137,62,0,255],[137,62,0,255],[139,63,0,255],[139,63,0,255],[140,65,0,255],[142,66,0,255],[142,66,0,255],[143,67,0,255],[143,67,0,255],[145,68,0,255],[145,68,0,255],[146,70,0,255],[146,70,0,255],[148,71,0,255],[148,71,0,255],[149,72,0,255],[149,72,0,255],[151,73,0,255],[151,73,0,255],[153,75,0,255],[153,75,0,255],[154,76,0,255],[154,76,0,255],[154,76,0,255],[156,77,0,255],[156,77,0,255],[157,79,0,255],[157,79,0,255],[159,80,0,255],[159,80,0,255],[159,80,0,255],[160,81,0,255],[160,81,0,255],[162,82,0,255],[162,82,0,255],[163,84,0,255],[163,84,0,255],[165,85,0,255],[165,85,0,255],[166,86,0,255],[166,86,0,255],[166,86,0,255],[168,87,0,255],[168,87,0,255],[170,89,0,255],[170,89,0,255],[171,90,0,255],[171,90,0,255],[173,91,0,255],[173,91,0,255],[174,93,0,255],[174,93,0,255],[176,94,0,255],[176,94,0,255],[177,95,0,255],[177,95,0,255],[179,96,0,255],[179,96,0,255],[180,98,0,255],[182,99,0,255],[182,99,0,255],[183,100,0,255],[183,100,0,255],[185,102,0,255],[185,102,0,255],[187,103,0,255],[187,103,0,255],[188,104,0,255],[188,104,0,255],[190,105,0,255],[191,107,0,255],[191,107,0,255],[193,108,0,255],[193,108,0,255],[194,109,0,255],[196,110,0,255],[196,110,0,255],[197,112,0,255],[197,112,0,255],[199,113,0,255],[200,114,0,255],[200,114,0,255],[202,116,0,255],[202,116,0,255],[204,117,0,255],[205,118,0,255],[205,118,0,255],[207,119,0,255],[208,121,0,255],[208,121,0,255],[210,122,0,255],[211,123,0,255],[211,123,0,255],[213,124,0,255],[214,126,0,255],[214,126,0,255],[216,127,0,255],[217,128,0,255],[217,128,0,255],[219,130,0,255],[221,131,0,255],[221,131,0,255],[222,132,0,255],[224,133,0,255],[224,133,0,255],[225,135,0,255],[227,136,0,255],[227,136,0,255],[228,137,0,255],[230,138,0,255],[230,138,0,255],[231,140,0,255],[233,141,0,255],[233,141,0,255],[234,142,0,255],[236,144,0,255],[236,144,0,255],[238,145,0,255],[239,146,0,255],[241,147,0,255],[241,147,0,255],[242,149,0,255],[244,150,0,255],[244,150,0,255],[245,151,0,255],[247,153,0,255],[247,153,0,255],[248,154,0,255],[250,155,0,255],[251,156,0,255],[251,156,0,255],[253,158,0,255],[255,159,0,255],[255,159,0,255],[255,160,0,255],[255,161,0,255],[255,163,0,255],[255,163,0,255],[255,164,0,255],[255,165,0,255],[255,167,0,255],[255,167,0,255],[255,168,0,255],[255,169,0,255],[255,169,0,255],[255,170,0,255],[255,172,0,255],[255,173,0,255],[255,173,0,255],[255,174,0,255],[255,175,0,255],[255,177,0,255],[255,178,0,255],[255,179,0,255],[255,181,0,255],[255,181,0,255],[255,182,0,255],[255,183,0,255],[255,184,0,255],[255,187,7,255],[255,188,10,255],[255,189,14,255],[255,191,18,255],[255,192,21,255],[255,193,25,255],[255,195,29,255],[255,197,36,255],[255,198,40,255],[255,200,43,255],[255,202,51,255],[255,204,54,255],[255,206,61,255],[255,207,65,255],[255,210,72,255],[255,211,76,255],[255,214,83,255],[255,216,91,255],[255,219,98,255],[255,221,105,255],[255,223,109,255],[255,225,116,255],[255,228,123,255],[255,232,134,255],[255,234,142,255],[255,237,149,255],[255,239,156,255],[255,240,160,255],[255,243,167,255],[255,246,174,255],[255,248,182,255],[255,249,185,255],[255,252,193,255],[255,253,196,255],[255,255,204,255],[255,255,207,255],[255,255,211,255],[255,255,218,255],[255,255,222,255],[255,255,225,255],[255,255,229,255],[255,255,233,255],[255,255,236,255],[255,255,240,255],[255,255,244,255],[255,255,247,255],[255,255,255,0]],rm=em.reduce(((e,t)=>{if(e[t.type]=t,t.aliases)for(const n of t.aliases)e[n]=t;return e}),{}),im=em.reduce(((e,t)=>{for(let n=0;n{const n=tm(t);let r=new Set(Object.values(n).flatMap((e=>e)));for(const t of e){const e=new Set(t);r=new Set([...r].filter((t=>t.datatype.filter((t=>e.has(t))).length>0)))}return[...r]},sm=Object.freeze(Object.defineProperty({__proto__:null,THEME_LIGHT:Df,THEME_DARK:Pf,THEME_DEFAULT:Nf,GLOBALS:Rf,DATATYPE_TO_TRACK_TYPE:tm,HEATED_OBJECT_MAP:nm,TRACKS_INFO:em,TRACKS_INFO_BY_TYPE:rm,POSITIONS_BY_DATATYPE:im,DEFAULT_TRACKS_FOR_DATATYPE:om,AVAILABLE_TRACK_TYPES:am,NUM_PRECOMP_SUBSETS_PER_1D_TTILE:8,NUM_PRECOMP_SUBSETS_PER_2D_TTILE:8,DEFAULT_VIEW_MARGIN:0,DEFAULT_VIEW_PADDING:5,DEFAULT_CONTAINER_PADDING_X:10,DEFAULT_CONTAINER_PADDING_Y:10,MAX_CLICK_DELAY:300,MOUSE_TOOL_MOVE:Sf,MOUSE_TOOL_SELECT:kf,TILE_FETCH_DEBOUNCE:100,ZOOM_DEBOUNCE:10,SHORT_DRAG_TIMEOUT:110,LONG_DRAG_TIMEOUT:Af,LOCATION_LISTENER_PREFIX:Cf,ZOOM_TRANSITION_DURATION:1e3,DEFAULT_SERVER:If,VIEW_HEADER_MED_WIDTH_SEARCH_BAR:400,VIEW_HEADER_MIN_WIDTH_SEARCH_BAR:300,TRACK_LOCATIONS:Of,MIN_HORIZONTAL_HEIGHT:20,MIN_VERTICAL_WIDTH:20},Symbol.toStringTag,{value:"Module"})),lm=e=>{const t=xn(e);return Rf.PIXI.utils.rgb2hex([t.r/255,t.g/255,t.b/255])},cm=e=>{if("transparent"===e)return[255,255,255,0];const t=xn(e);return[t.r,t.g,t.b,255]},um=(e,t,n)=>{const r=bf(e,n),i=bf(t,n);return[r[0],Math.round(r[1]),i[0],Math.round(i[1])]},hm=(e,t,n)=>{let r;return hm.cancel=()=>{clearTimeout(r),r=null},(...i)=>{const o=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||e(...i)}),t),o&&e(...i)}},dm=e=>(e+16**6).toString(16).substr(-6),pm=e=>{const t={};return e.forEach((e=>{t[e[0]]=e[1]})),t},fm=e=>{const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push([n,e[n]]);return t};function mm(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(n);return t}function gm(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(e[n]);return t}function bm(e,t){const n="string"==typeof t?new Blob([t],{type:"application/octet-stream"}):t;if(window.navigator.msSaveOrOpenBlob)window.navigator.msSaveBlob(n,e);else{const t=window.document.createElement("a");t.href=window.URL.createObjectURL(n),t.download=e,document.body.appendChild(t),t.click(),document.body.removeChild(t),URL.revokeObjectURL(t.href)}}const vm=e=>(e.center=e.center||[],e.left=e.left||[],e.right=e.right||[],e.top=e.top||[],e.bottom=e.bottom||[],e.whole=e.whole||[],e.gallery=e.gallery||[],["top","bottom","gallery"].map((t=>e[t])).forEach((e=>e.forEach((e=>{const t=rm[e.type],n=t&&t.defaultOptions||{},r=e.options?{...n,...e.options}:n;void 0!==r.minHeight&&void 0===e.height&&(e.height=r.minHeight),void 0===e.height&&(e.height=t&&t.defaultHeight||20)})))),["left","right","gallery"].map((t=>e[t])).forEach((e=>e.forEach((e=>{const t=rm[e.type],n=t&&t.defaultOptions||{},r=e.options?{...n,...e.options}:n;void 0!==r.minWidth&&void 0===e.width&&(e.width=r.minWidth),void 0===e.width&&(e.width=t&&t.defaultWidth||20)})))),e),ym=e=>t=>Array.prototype.reduce.call(t,e),Tm=ym(((e,t)=>e.concat(t))),_m=(e,t)=>{t.dispatchEvent(xf(e))};const Em=(e,t,n)=>{if(0===n.length)return;if(1===n.length)return n[0];let r=n[0];const i=void 0!==om[e]?om[e][t]:void 0;return void 0!==i&&(r=n.find((e=>e.type===i))||r),r};var xm={},wm={};function Sm(e){return new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+'] || ""'})).join(",")+"}")}function km(e){var t=Object.create(null),n=[];return e.forEach((function(e){for(var r in e)r in t||n.push(t[r]=r)})),n}function Am(e,t){var n=e+"",r=n.length;return r9999?"+"+Am(t,6):Am(t,4))+"-"+Am(e.getUTCMonth()+1,2)+"-"+Am(e.getUTCDate(),2)+(o?"T"+Am(n,2)+":"+Am(r,2)+":"+Am(i,2)+"."+Am(o,3)+"Z":i?"T"+Am(n,2)+":"+Am(r,2)+":"+Am(i,2)+"Z":r||n?"T"+Am(n,2)+":"+Am(r,2)+"Z":"")}function Im(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,i=[],o=e.length,a=0,s=0,l=o<=0,c=!1;function u(){if(l)return wm;if(c)return c=!1,xm;var t,r,i=a;if(34===e.charCodeAt(i)){for(;a++=o?l=!0:10===(r=e.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(i+1,t-1).replace(/""/g,'"')}for(;aqm[e]?Promise.resolve(qm[e]):t(e),Km=e=>fetch(e,{credentials:"same-origin"}).then((e=>e.text())).then((e=>(e=>0===e.length?null:Qg(jm(e)))(e))).catch((e=>{console.error("Could not retrieve or parse chrom info.",e)})),Qm={get:e=>{return $m(t=e,Km).then((e=>(qm[t]=e,qm[t])));var t}};let Zm=function(){function e(t){d(this,e),this.customEventHandlers={},this.registeredEls={},this.pubSub=t}return f(e,[{key:"getEventHandler",value:function(e){return this.customEventHandlers[e]?this.customEventHandlers[e]:t=>this.pubSub.publish(e,t)}},{key:"unregister",value:function(e,t){(this.registeredEls[e]||this.registeredEls[e]===t)&&(this.registeredEls[e].removeEventListener(e,this.registeredEls[e].__handler__),this.registeredEls[e]=void 0,delete this.registeredEls[e])}},{key:"register",value:function(e,t,n=!1){t&&this.registeredEls[e]!==t&&(this.registeredEls[e]&&this.unregister(this.registeredEls[e]),this.registeredEls[e]=t,this.registeredEls[e].__handler__=this.getEventHandler(e),this.registeredEls[e].addEventListener(e,this.registeredEls[e].__handler__,{capture:n,passive:!1}))}}]),e}();const Jm=e=>new Zm(e);let eg=!1;const tg={listen:()=>{if(eg)return;const[e,t]=wg(),n=[String.fromCharCode(..."102117110099116105111110040041123115101108102046099111110115111108101046108111103040039".match(/.{1,3}/g).map((e=>+e))).toLowerCase(),String.fromCharCode(..."072".match(/.{1,3}/g).map((e=>+e))),String.fromCharCode(..."105".match(/.{1,3}/g).map((e=>+e))).toLowerCase(),String.fromCharCode(..."071".match(/.{1,3}/g).map((e=>+e))),String.fromCharCode(..."108097115115".match(/.{1,3}/g).map((e=>+e))).toLowerCase(),String.fromCharCode(..."032118".match(/.{1,3}/g).map((e=>+e))).toLowerCase(),String.fromCharCode(...t.match(/.{1,3}/g).map((e=>+e))).toLowerCase(),String.fromCharCode(..."058032104116116112058047047104105103108097115115046105111039041125".match(/.{1,3}/g).map((e=>+e))).toLowerCase()].join(""),r=e=>e.charAt(0).toUpperCase()+e.slice(1),i=e=>e.slice(0,6)+e.charAt(6).toUpperCase()+e.slice(7,12)+e.slice(12).toUpperCase(),o=e[String.fromCharCode(..."085082076".match(/.{1,3}/g).map((e=>+e)))],a=e[r(String.fromCharCode(..."066076079066".match(/.{1,3}/g).map((e=>+e))).toLowerCase())],s=e[r(String.fromCharCode(..."087111114107101114".match(/.{1,3}/g).map((e=>+e))).toLowerCase())],l=i(String.fromCharCode(..."099114101097116101079098106101099116085082076".match(/.{1,3}/g).map((e=>+e))).toLowerCase()),c=i(String.fromCharCode(..."114101118111107101079098106101099116085082076".match(/.{1,3}/g).map((e=>+e))).toLowerCase()),u=o[l](new a([`(${n})()`],{type:"application/javascript"}));new s(u),o[c](u),eg=!0}};function ng(e,t,n,r,i,o,a=!1,s=!1,l=null,c=null,u=null){let h=null;"log"===n?h=xi().range([254,0]).domain(r):("linear"!==n&&console.warn("Unknown value scale type:",n," Defaulting to linear"),h=fi().range([254,0]).domain(r));const{selectedRows:d=null,selectedRowsAggregationMode:p=null,selectedRowsAggregationWithRelativeHeight:f=null,selectedRowsAggregationMethod:m=null}=u||{};let g,b=e;l&&d&&(b=xb(d,f)*l[1]);let v=0;const y=l?l[1]:Math.sqrt(e),T=new Uint8ClampedArray(4*b),_=(e,t)=>{v=255,a&&Math.floor(e/y)e%y||Number.isNaN(+t)||(v=(e=>{const t=h(e);return Number.isNaN(t)?254:Math.max(0,Math.min(254,Math.floor(t)))})(t+i)),(v<0||v>255)&&console.warn("out of bounds rgbIdx:",v," (should be 0 <= rgbIdx <= 255)"),g=c&&!Number.isNaN(+t)&&0==+t?c:o[v],T[4*e]=g[0],T[4*e+1]=g[1],T[4*e+2]=g[2],T[4*e+3]=g[3]};let E;try{if(d)!function(e,t,n,r,i,o,a){let s,l,c,u,h,d,p;for(i&&(s=Eb(i),l=(n,r)=>s(r.map((r=>e[r*t[1]+n])))),h=0;h+e)).filter((e=>!Number.isNaN(e))),e[n].tilesetUid=i[0],"dense"in e[n]){const t=ig(e[n].dense);let r;r="float16"===e[n].dtype?og(new Uint16Array(t)):new Float32Array(t);const i=2===e[n].tilePos.length?new _b(r):new Tb(r);e[n].dense=r,e[n].denseDataExtrema=i,e[n].minNonZero=i.minNonZeroInTile,e[n].maxNonZero=i.maxNonZeroInTile}}return e}function sg(e,t,n,r,i,o){const a={"content-type":"application/json"};r&&(a.Authorization=r),fetch(e,{credentials:"same-origin",headers:a,...o&&Object.keys(o).length>0?{method:"POST",body:JSON.stringify(o)}:{}}).then((e=>e.json())).then((e=>{i(ag(e,t,n))})).catch((e=>console.warn("err:",e)))}const lg=Ns.nice();let cg=0,ug=null;const hg=e=>{ug=e};const dg=((e,t,n)=>{let r,i=[],o={},a=0;const s=()=>{r=null,i=[],o={}},l=(t,...n)=>{e({sessionId:lg,requests:i},...n),s()},c=(e,...t)=>{clearTimeout(r),r=setTimeout((()=>{a>0&&(l(e,...t),a=0)}),100)};c.cancel=()=>{clearTimeout(r),s()},c.immediate=()=>{e({sessionId:lg,requests:i})};let u=!1;return(e,...t)=>{(e=>{const t=o[e.id];t&&i[t]?i[t].ids=i[t].ids.concat(e.ids):(o[e.id]=i.length,i.push(e))})(e),u?a++:(l(e,...t),c(e,...t),u=!0,a=0,setTimeout((()=>{u=!1}),100))}})((function(e,t){const n=e.requests,r=[],i={},o={};for(const e of n){i[e.server]||(i[e.server]={},o[e.server]=[]);for(const t of e.ids)if(i[e.server][t]=!0,e.options){const n=t.indexOf("."),r=t.substring(0,n),i=t.substring(n+1),a=o[e.server].find((e=>e.tilesetUid===r));a?a.tileIds.push(i):o[e.server].push({tilesetUid:r,tileIds:[i],options:e.options})}}const a=Object.keys(i);for(const e of a){const n=Object.keys(i[e]),a=o[e];for(let i=0;i`d=${e}`)).join("&"),l=`${e}/tiles/?${s}&s=${lg}`,c=new Promise(((n,r)=>{t.publish("requestSent",l);const i={};i.outUrl=l,i.server=e,i.theseTileIds=o,i.authHeader=ug,sg(i.outUrl,i.server,i.theseTileIds,i.authHeader,n,a),t.publish("requestReceived",l)}));r.push(c)}}Promise.all(r).then((e=>{const t={};for(const n of e){const e=Object.keys(n);for(const r of e)t[`${n[r].server}/${r}`]=n[r]}for(const e of n){const n={},{server:r}=e;for(const i of e.ids)n[i]=t[`${r}/${i}`];e.done(n)}}))}));function pg(e,t,n,r){cg+=1,r.publish("requestSent",e);let i=null;if("text"===n)i=null;else{if("json"!==n)throw new Error(`fetch either "text" or "json", not "${n}"`);i="application/json"}const o={};return i&&(o["Content-Type"]=i),ug&&(o.Authorization=ug),fetch(e,{credentials:"same-origin",headers:o}).then((e=>{if(!e.ok)throw Error(e.statusText);return e[n]()})).then((e=>(t(void 0,e),e))).catch((n=>(console.error(`Could not fetch ${e}`,n),t(n,void 0),n))).finally((()=>{r.publish("requestReceived",e),cg-=1}))}async function fg(e,t,n){return e.indexOf("hg19")>=0&&await sb(1),pg(e,t,"json",n)}const mg={calculateResolution:(e,t)=>e.resolutions?e.resolutions.map((e=>+e)).sort(((e,t)=>t-e))[t]:e.max_width/(2**t*+e.bins_per_dimension),calculateTileAndPosInTile:function(e,t,n,r,i){let o=null;const a=e.bins_per_dimension||256;o=e.resolutions?e.resolutions[r]*a:t/2**r;const s=Math.floor((i-n)/o);return[s,Math.floor(a*(i-s*o)/o)]},calculateTiles:(e,t,n,r,i,o)=>{const a=Math.min(e,i),s=o/2**a;return Gt(Math.max(0,Math.floor((t.domain()[0]-n)/s)),Math.min(2**a,Math.ceil((t.domain()[1]-n-1e-7)/s)))},calculateTilesFromResolution:(e,t,n,r,i)=>{const o=e*(i||256);r||(r=Number.MAX_VALUE);let a=Gt(Math.max(0,Math.floor((t.domain()[0]-n)/o)),Math.ceil(Math.min(r,t.domain()[1]-n-1e-7)/o));return a.length>20&&(console.warn(`Too many visible tiles: ${a.length} truncating to 20`),a=a.slice(0,20)),a},calculateTileWidth:(e,t,n)=>e.resolutions?e.resolutions.map((e=>+e)).sort(((e,t)=>t-e))[t]*n:e.max_width/2**t,calculateZoomLevel:(e,t,n,r)=>{const i=e.range()[1]-e.range()[0],o=Math.max((n-t)/(e.domain()[1]-e.domain()[0]),1),a=Math.max(0,Math.ceil(Math.log(i/384)/Math.LN2));let s=Math.round(Math.log(o)/Math.LN2)+a,l=0;return r&&(l=Math.floor(Math.log(256)/Math.log(2)-Math.log(r)/Math.log(2))),s+=l,s},calculateZoomLevelFromResolutions:(e,t)=>{const n=e.map((e=>+e)).sort(((e,t)=>t-e)),r=t.range()[1]-t.range()[0],i=n.map((e=>(t.domain()[1]-t.domain()[0])/e)).map((e=>e/r)),o=i.filter((e=>e<1));return 0===o.length?0:i.indexOf(o[o.length-1])},fetchTilesDebounced:dg,json:fg,text:function(e,t,n){return pg(e,t,"text",n)},tileDataToPixData:(e,t,n,r,i,o,a,s,l,c)=>{const{tileData:u}=e;if(u.dense){if(e.mirrored&&!e.isMirrored&&e.tileData.tilePos.length>0&&e.tileData.tilePos[0]===e.tileData.tilePos[1]){e.tileData.dense=e.tileData.dense.slice();const t=Math.floor(Math.sqrt(e.tileData.dense.length));for(let n=0;n{const o=`${cb(e)}/tileset_info/?d=${t}&s=${lg}`;i.publish("requestSent",o),fg(o,((t,a)=>{i.publish("requestReceived",o),t?r?r(`Error retrieving tilesetInfo from: ${e}`):console.warn("Error retrieving: ",o):n(a)}),i)}},gg=Object.freeze(Object.defineProperty({__proto__:null,chromInfo:Qm,createDomEvent:Jm,ElementResizeListener:tg,tileProxy:mg,get requestsInFlight(){return cg},setTileProxyAuthHeader:hg,getTileProxyAuthHeader:()=>ug,get authHeader(){return ug},tileResponseToData:ag},Symbol.toStringTag,{value:"Module"})),bg=e=>(tg.listen(),[e.clientWidth,e.clientHeight]),vg=(e,t)=>{let n=null;const r=e=>(e.uid===t&&(n=e),"combined"===e.type.substr(0,8)&&e.contents.forEach(r),null);return Object.keys(e).map((t=>e[t])).filter((e=>e.filter)).reduce(((e,t)=>e.concat(t)),[]).forEach(r),n},yg=(e,t,n)=>{const r=t?e[t]:Object.values(e)[0];if(!r)return void(t?console.warn(`Could't find view with id "${t}"`):console.warn("No views available."));let i=r.trackRenderer.trackDefObjects[n];return i?i=i.trackObject:Object.values(r.trackRenderer.trackDefObjects).map((e=>e.trackObject)).filter((e=>e.childTracks)).forEach((e=>{e.createdTracks[n]&&(i=e.createdTracks[n])})),i},Tg=(e,t,n=!0,r=null)=>e.forEach((e=>{"combined"===e.type?n&&(Tg(e.contents,t,n,r),t(e,r)):t(e,r)})),_g=(e,t,n=!0)=>(Object.keys(e).forEach((r=>{Tg(e[r],t,n,r)})),[]),Eg=(e,t)=>{let n=null;return _g(e,((e,r)=>{e.uid===t&&(n=r)})),n},xg=e=>t=>Array.prototype.map.call(t,e),wg=()=>[window,xg((e=>e.charCodeAt(0)))("1.12.4").map((e=>e<=999?`00${e}`.slice(-3):e)).join("")],Sg=(e,t=1,n=100,r=0,i=0,o=0,a=100)=>{const s=document.createElement("canvas");s.width=t,s.height=n;const l=s.getContext("2d"),c=l.createLinearGradient(r,i,o,a);return e.forEach((e=>{c.addColorStop(e.from,e.color)})),l.fillStyle=c,l.fillRect(0,0,t,n),s},kg=(e,t)=>{let n=e;for(;n&&n!==t&&"HTML"!==n.tagName;)n=n.parentNode;return n===t},Ag=e=>parseInt(e.replace(/^#/,""),16),Cg=()=>{};let Ig=function(){function e(t){d(this,e),this.context=t;const{tracks:n,createTrackObject:r}=t;this.childTracks=n.map(r),this.createdTracks={},this.uid=Ns.nice(),this.childTracks.forEach(((e,t)=>{this.createdTracks[n[t].uid]=e}));for(let e=0;e{if(r.add(e.uid),e.uid in this.createdTracks)n.push(this.createdTracks[e.uid]);else{const r=t(e);r.setPosition(this.position),r.setDimensions(this.dimensions),n.push(r),r.zoomed(this._xScale,this._yScale),this.createdTracks[e.uid]=r}})),this.childTracks=n;const i=new Set(Object.keys(this.createdTracks));return[...new Set([...i].filter((e=>!r.has(e))))].forEach((e=>{this.createdTracks[e].remove(),delete this.createdTracks[e]})),this}},{key:"setPosition",value:function(e){this.position=e;for(let t=0;te.minValue)).map((e=>e.minValue())).filter((e=>e));return Math.min(...e)}for(const t of this.childTracks)t.minValue&&t.minValue(e)}},{key:"maxValue",value:function(e){if(0===arguments.length){const e=this.childTracks.filter((e=>e.maxValue)).map((e=>e.maxValue())).filter((e=>e));return Math.max(...e)}for(const t of this.childTracks)t.maxValue&&t.maxValue(e)}},{key:"respondsToPosition",value:function(e,t){return e>=this.position[0]&&e<=this.dimensions[0]+this.position[0]&&t>=this.position[1]&&t<=this.dimensions[1]+this.position[1]}},{key:"stopHover",value:function(){for(const e of this.childTracks)e.stopHover&&e.stopHover()}},{key:"getMouseOverHtml",value:function(e,t){let n="";for(const r of this.childTracks)if(r.getMouseOverHtml){const i=r.getMouseOverHtml(e,t);i&&i.length&&(n+=i,n+="
")}return n}}]),e}();const Og=(e,t)=>t===e||t instanceof Ig&&Object.keys(t.createdTracks).map((e=>t.createdTracks[e])).some((t=>Og(e,t))),Dg=(e,t,n,r,i,o,a=!1)=>a?e>=n&&e<=r||t>=i&&t<=o:e>=n&&e<=r&&t>=i&&t<=o,Pg=e=>xg((t=>e[t]))(Object.keys(e)),Ng=(e,t)=>e>t?e:t;function Rg(e){let t=Number.MIN_SAFE_INTEGER;for(let n=0;n-1e-7||r>t&&(t=r)}return t}const Mg=(e,t)=>e-1e-7||r{const n=+t;if(Number.isNaN(n)){const n=e.shape[0],r=e.shape[1],i=t.shape[0],o=t.shape[1];if(n!==i||r!==o)return void console.warn("Cannot assign source to target ndarray as the dimensions do not match",n,i,r,o);if(1===e.dimension)for(let n=0;nMath.abs(this.stride[1]))?[1,0]:[0,1]}})"):3===t&&i.push("var s0=Math.abs(this.stride[0]),s1=Math.abs(this.stride[1]),s2=Math.abs(this.stride[2]);if(s0>s1){if(s1>s2){return [2,1,0];}else if(s0>s2){return [1,2,0];}else{return [1,0,2];}}else if(s0>s2){return [2,0,1];}else if(s2>s1){return [0,1,2];}else{return [0,2,1];}}})")):i.push("ORDER})")),i.push("proto.set=function "+n+"_set("+a.join(",")+",v){"),r?i.push("return this.data.set("+s+",v)}"):i.push("return this.data["+s+"]=v}"),i.push("proto.get=function "+n+"_get("+a.join(",")+"){"),r?i.push("return this.data.get("+s+")}"):i.push("return this.data["+s+"]}"),i.push("proto.index=function "+n+"_index(",a.join(),"){return "+s+"}"),i.push("proto.hi=function "+n+"_hi("+a.join(",")+"){return new "+n+"(this.data,"+o.map((function(e){return["(typeof i",e,"!=='number'||i",e,"<0)?this.shape[",e,"]:i",e,"|0"].join("")})).join(",")+","+o.map((function(e){return"this.stride["+e+"]"})).join(",")+",this.offset)}");var u=o.map((function(e){return"a"+e+"=this.shape["+e+"]"})),h=o.map((function(e){return"c"+e+"=this.stride["+e+"]"}));i.push("proto.lo=function "+n+"_lo("+a.join(",")+"){var b=this.offset,d=0,"+u.join(",")+","+h.join(","));for(var d=0;d=0){d=i"+d+"|0;b+=c"+d+"*d;a"+d+"-=d}");for(i.push("return new "+n+"(this.data,"+o.map((function(e){return"a"+e})).join(",")+","+o.map((function(e){return"c"+e})).join(",")+",b)}"),i.push("proto.step=function "+n+"_step("+a.join(",")+"){var "+o.map((function(e){return"a"+e+"=this.shape["+e+"]"})).join(",")+","+o.map((function(e){return"b"+e+"=this.stride["+e+"]"})).join(",")+",c=this.offset,d=0,ceil=Math.ceil"),d=0;d=0){c=(c+this.stride["+d+"]*i"+d+")|0}else{a.push(this.shape["+d+"]);b.push(this.stride["+d+"])}");return i.push("var ctor=CTOR_LIST[a.length+1];return ctor(this.data,a,b,c)}"),i.push("return function construct_"+n+"(data,shape,stride,offset){return new "+n+"(data,"+o.map((function(e){return"shape["+e+"]"})).join(",")+","+o.map((function(e){return"stride["+e+"]"})).join(",")+",offset)}"),new Function("CTOR_LIST","ORDER",i.join("\n"))(Wg[e],zg)}var Wg={float32:[],float64:[],int8:[],int16:[],int32:[],uint8:[],uint16:[],uint32:[],array:[],uint8_clamped:[],bigint64:[],biguint64:[],buffer:[],generic:[]};var Xg=function(e,t,n,r){if(void 0===e)return(0,Wg.array[0])([]);"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var i=t.length;if(void 0===n){n=new Array(i);for(var o=i-1,a=1;o>=0;--o)n[o]=a,a*=t[o]}if(void 0===r)for(r=0,o=0;o{const t=e.shape.reduce(((e,t)=>e*t),1),n=new Array(t);if(1===e.dimension){let t=0;for(let r=0;r1===e.shape.length?e:Xg(Yg(e)),$g=e=>{const t=e.split("."),n=t.slice(1).join("").length;return+t.join("")/10**n},Kg=(e,t)=>e||t;function Qg(e){const t=[],n={},r={};let i=0;for(let o=0;o{const t=document.createElement("g"),n=document.createElement("text");return 0===e.anchor.x?n.setAttribute("text-anchor","start"):1===e.anchor.x?n.setAttribute("text-anchor","end"):n.setAttribute("text-anchor","middle"),n.setAttribute("font-family",e.style.fontFamily),n.setAttribute("font-size",e.style.fontSize),t.setAttribute("transform",`scale(${e.scale.x},1)`),n.setAttribute("fill",e.style.fill),n.innerHTML=e.text,t.appendChild(n),t.setAttribute("transform",`translate(${e.x},${e.y})scale(${e.scale.x},1)`),t},Jg=(e,t)=>{e.select(".selection").attr("fill",null).attr("fill-opacity",null).attr("stroke",null).classed(t,!0)},eb=e=>{const t=e.toString(16);return 1===t.length?`0${t}`:t},tb=(e,t)=>[e.invert((e.range()[0]+e.range()[1])/2),t.invert((t.range()[0]+t.range()[1])/2),e.invert(1)-e.invert(0)],nb=(e,t,n)=>{if(null===n||!e||!t)return;const r=e.domain()[0],i=e.domain()[1],o=t.domain()[0],a=t.domain()[1];return[...um(r,i,n),...um(o,a,n)]},rb=(e,t=!1,n=!1)=>{const r=t?e.pMasked:e.pForeground||e.pMain,i=((e,t,n,r,i,o,a,s,l)=>{e.publish("app.animateOnMouseMove",!0);const c=n.mousePositionColor?Ag(n.mousePositionColor):11184810,u=n.mousePositionAlpha||1,h=new Rf.PIXI.Graphics,d=()=>{h.clear()},p=(e,t,n)=>{if(n||d(),h.lineStyle(1,c,u),t){const t=s?i()[0]:0;h.moveTo(0,e),h.lineTo(o()[0]+t,e)}else{const t=s?i()[1]:0;h.moveTo(e,0),h.lineTo(e,o()[1]+t)}},f=e=>{if(e.noHoveredTracks)return d(),h;let t,n;e.isFromVerticalTrack?(t=e.dataY,n=e.dataY):(t=e.dataX,n=e.isFrom2dTrack?e.dataY:e.dataX);const o=s?i():[0,0],l=a()?r()[0](n)+o[1]:r()[0](t)+o[0];return p(l),s&&p(r()[1](n)+o[1],!0,!0),h};return t.push(e.subscribe("app.mouseMove",f)),t.push(e.subscribe("app.mouseLeave",d)),t.push(e.subscribe("blur",d)),l&&t.push(vh.subscribe("higlass.mouseMove",f)),h})(e.pubSub,e.pubSubs,e.options,(()=>[e.xScale(),e.yScale()]),e.getPosition.bind(e),e.getDimensions.bind(e),e.getProp("flipText"),t,n);return r.addChild(i),()=>{r.removeChild(i)}},ib=(e,t)=>e+t,ob=(e,t,n,r,i,o)=>{const a=document.createElement("line");return a.setAttribute("x1",e),a.setAttribute("x2",n),a.setAttribute("y1",t),a.setAttribute("y2",r),i&&a.setAttribute("stroke-width",i),o&&a.setAttribute("stroke",o),a},ab=(e,t,n)=>{let r,i=0;const o=(...t)=>{clearTimeout(r),r=setTimeout((()=>{i>0&&(e(...t),i=0)}),n)};o.cancel=()=>{clearTimeout(r),r=null},o.immediate=(...t)=>{e(...t)};let a=!1;return(n,...r)=>{a?i++:(e(...r),o(...r),a=!0,i=0,setTimeout((()=>{a=!1}),t))}},sb=e=>new Promise((t=>{setTimeout(t,e)})),lb=()=>{},cb=e=>(e||"").replace(/\/$/,""),ub=(e,t,n=0,r=1e-6)=>i=>{let o=255;return i>r&&(o=Math.max(0,Math.min(255,Math.floor(e(i+n))))),t[o]},hb=e=>{let t=[];for(let n=0;nt[0]?e.left?mb(e.left,t):fb(e,"left",t):e.right?mb(e.right,t):fb(e,"right",t)}function gb(e,t){if(!t)return!1;if(t.interval[0]<=e&&t.interval[1]>=e)return!0;let n,r=!1;return["left","right"].forEach((i=>{n=t[i],n&&n.max>e&&(r=r||gb(e,n))})),r}function bb(e,t){if(!t)return!1;if(n=t.interval,r=e,n[0]===r[0]&&n[1]===r[1]||n[0]r[0]||n[0]r[1]||r[0]n[0]||r[0]n[1])return!0;var n,r;let i,o=!1;return["left","right"].forEach((n=>{i=t[n],i&&i.max>=e[0]&&(o=o||bb(e,i))})),o}function vb(e){return e?1+Math.max(vb(e.left),vb(e.right)):0}function yb(e){e.sort(((e,t)=>t.to-t.from-(e.to-e.from)));const t=[[]],n=[new pb];for(let r=0;ri&&(i=n.interval[1],r=n);return r},pb.prototype._removeHelper=function(e,t){if(t)if(t.interval[0]===e[0]&&t.interval[1]===e[1]){if(t.left&&t.right){let e=t.left;for(;e.left;)e=e.left;const n=e.interval;e.interval=t.interval,t.interval=n,this._removeHelper(e.interval,t)}else{let e="left";t.right&&(e="right");const n=t.parentNode;n?(n.left===t?n.left=t[e]:n.right=t[e],t[e]&&(t[e].parentNode=n)):(this.root=t[e],this.root&&(this.root.parentNode=null))}const e=t.parentNode;if(e){let n=this.findMax(e);const r=n.interval[1];for(;n;)n.max===t.interval[1]?(n.max=r,n=n.parentNode):n=!1}}else this._removeHelper(e,t.left),this._removeHelper(e,t.right)},pb.prototype.remove=function(e){return this._removeHelper(e,this.root)};let Tb=function(){function e(t){d(this,e),this.epsilon=1e-6,this.data=t,this.tileSize=this.data.length,this.paddedTileSize=2**Math.ceil(Math.log2(this.tileSize)),this.numSubsets=Math.min(8,this.paddedTileSize),this.subsetSize=this.paddedTileSize/this.numSubsets,this.subsetMinimums=this.computeSubsetNonZeroMinimums(),this.subsetMaximums=this.computeSubsetNonZeroMaximums(),this.minNonZeroInTile=this.getMinNonZeroInTile(),this.maxNonZeroInTile=this.getMaxNonZeroInTile()}return f(e,[{key:"getMinNonZeroInSubset",value:function(e){const t=e[0],n=e[1];let r=Number.MAX_SAFE_INTEGER;if(0===t&&n===this.tileSize)return this.minNonZeroInTile;const i=Math.ceil(t/this.subsetSize),o=Math.floor((n-1)/this.subsetSize);return i>=o?this.minNonZero(this.data,t,n):(to*this.subsetSize&&(r=Math.min(r,this.minNonZero(this.data,o*this.subsetSize,n))),r)}},{key:"getMaxNonZeroInSubset",value:function(e){const t=e[0],n=e[1];let r=Number.MIN_SAFE_INTEGER;if(0===t&&n===this.tileSize)return this.maxNonZeroInTile;const i=Math.ceil(t/this.subsetSize),o=Math.floor((n-1)/this.subsetSize);return i>=o?this.maxNonZero(this.data,t,n):(to*this.subsetSize&&(r=Math.max(r,this.maxNonZero(this.data,o*this.subsetSize,n))),r)}},{key:"computeSubsetNonZeroMinimums",value:function(){const e=[];for(let t=0;t-this.epsilon||r-this.epsilon||r>n&&(n=r))}e.push(n)}return e}},{key:"getMinNonZeroInTile",value:function(){return Math.min(...this.subsetMinimums)}},{key:"getMaxNonZeroInTile",value:function(){return Math.max(...this.subsetMaximums)}},{key:"minNonZero",value:function(e,t,n){let r=Number.MAX_SAFE_INTEGER;for(let i=t;i-this.epsilon||t-this.epsilon||t>r&&(r=t)}return r}}]),e}(),_b=function(){function e(t){d(this,e),this.epsilon=1e-6,this.tileSize=Math.sqrt(t.length),Number.isSafeInteger(this.tileSize)||console.error("The DenseDataExtrema2D module only works for data of quadratic length."),this.numSubsets=Math.min(8,this.tileSize),this.subsetSize=this.tileSize/this.numSubsets;const n=Xg(Array.from(t),[this.tileSize,this.tileSize]);this.subsetMinimums=this.computeSubsetNonZeroMinimums(n),this.subsetMaximums=this.computeSubsetNonZeroMaximums(n),this.minNonZeroInTile=this.getMinNonZeroInTile(),this.maxNonZeroInTile=this.getMaxNonZeroInTile()}return f(e,[{key:"getMinNonZeroInSubset",value:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=Math.floor(n/this.subsetSize),a=Math.floor(t/this.subsetSize),s=Math.ceil((i+1)/this.subsetSize)-o,l=Math.ceil((r+1)/this.subsetSize)-a;return this.getMinNonZeroInNdarraySubset(this.subsetMinimums,o,a,l,s)}},{key:"getMaxNonZeroInSubset",value:function(e){const t=e[0],n=e[1],r=e[2],i=e[3],o=Math.floor(n/this.subsetSize),a=Math.floor(t/this.subsetSize),s=Math.ceil((i+1)/this.subsetSize)-o,l=Math.ceil((r+1)/this.subsetSize)-a;return this.getMaxNonZeroInNdarraySubset(this.subsetMaximums,o,a,l,s)}},{key:"computeSubsetNonZeroMinimums",value:function(e){let t=new Array(this.numSubsets**2);t=Xg(t,[this.numSubsets,this.numSubsets]);for(let n=0;n-this.epsilon||i-this.epsilon||i>o&&(o=i)}return o}},{key:"mirrorPrecomputedExtrema",value:function(){for(let e=1;e{let t;switch(e?e.toLowerCase():e){case"mean":t=Bt;break;case"sum":t=Xt;break;case"variance":t=nt;break;case"deviation":t=rt;break;default:t=Bt,console.warn("Encountered an unsupported selectedRowsAggregationMode option.")}return t},xb=(e,t)=>e.reduce(((e,n)=>e+(Array.isArray(n)&&t?n.length:1)),0),wb=e=>{switch(e.type){case"heatmap":case"horizontal-1d-heatmap":case"horizontal-bar":case"horizontal-line":case"horizontal-point":case"vertical-1d-heatmap":case"vertical-bar":case"vertical-line":case"vertical-point":case"horizontal-1d-tiles":case"vertical-1d-tiles":case"2d-tiles":case"horizontal-gene-annotations":case"vertical-gene-annotations":case"horizontal-heatmap":case"vertical-heatmap":case"osm-tiles":case"mapbox-tiles":case"horizontal-multivec":return!0;case"combined":return e.contents.map((e=>wb(e))).reduce(Kg,!1);default:return!1}},Sb=(e,t,n)=>{let r=t,i=n;return n||(i=t,r=Object.values(e.state.views)[0].uid),e.tiledPlots[r].trackRenderer.getTrackObject(i)},kb=(e,t)=>e.tiledPlots[t].trackRenderer;var Ab,Cb,Ib={},Ob=Object.prototype.toString,Db=function(e){var t=Ob.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===Ob.call(e.callee)),n};var Pb=Array.prototype.slice,Nb=Db,Rb=Object.keys,Mb=Rb?function(e){return Rb(e)}:function(){if(Cb)return Ab;var e;if(Cb=1,!Object.keys){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Db,i=Object.prototype.propertyIsEnumerable,o=!i.call({toString:null},"toString"),a=i.call((function(){}),"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(e){var t=e.constructor;return t&&t.prototype===e},c={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},u=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!c["$"+e]&&t.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{l(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();e=function(e){var i=null!==e&&"object"==typeof e,c="[object Function]"===n.call(e),h=r(e),d=i&&"[object String]"===n.call(e),p=[];if(!i&&!c&&!h)throw new TypeError("Object.keys called on a non-object");var f=a&&c;if(d&&e.length>0&&!t.call(e,0))for(var m=0;m0)for(var g=0;g1&&"boolean"!=typeof t)throw new Kb('"allowMissing" argument must be a boolean');if(null===mv(/^%?[^%]*%?$/,e))throw new qb("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=fv(e,0,1),n=fv(e,-1);if("%"===t&&"%"!==n)throw new qb("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new qb("invalid intrinsic syntax, expected opening `%`");var r=[];return pv(e,gv,(function(e,t,n,i){r[r.length]=n?pv(i,bv,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",i=vv("%"+r+"%",t),o=i.name,a=i.value,s=!1,l=i.alias;l&&(r=l[0],dv(n,hv([0,1],l)));for(var c=1,u=!0;c=n.length){var f=Zb(a,h);a=(u=!!f)&&"get"in f&&!("originalValue"in f.get)?f.get:a[h]}else u=uv(a,h),a=a[h];u&&!s&&(ov[o]=a)}}return a},Tv=yv("%Object.defineProperty%",!0),_v=function(){if(Tv)try{return Tv({},"a",{value:1}),!0}catch(e){return!1}return!1};_v.hasArrayLengthDefineBug=function(){if(!_v())return null;try{return 1!==Tv([],"length",{value:1}).length}catch(e){return!0}};var Ev=_v,xv=Fb,wv="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),Sv=Object.prototype.toString,kv=Array.prototype.concat,Av=Object.defineProperty,Cv=Ev(),Iv=Av&&Cv,Ov=function(e,t,n,r){var i;(!(t in e)||"function"==typeof(i=r)&&"[object Function]"===Sv.call(i)&&r())&&(Iv?Av(e,t,{configurable:!0,enumerable:!1,value:n,writable:!0}):e[t]=n)},Dv=function(e,t){var n=arguments.length>2?arguments[2]:{},r=xv(t);wv&&(r=kv.call(r,Object.getOwnPropertySymbols(t)));for(var i=0;i-1?Mv(n):n},Fv=Fb,Uv=Ub(),jv=Bv,Hv=Object,Gv=jv("Array.prototype.push"),zv=jv("Object.prototype.propertyIsEnumerable"),Vv=Uv?Object.getOwnPropertySymbols:null,Wv=function(e,t){if(null==e)throw new TypeError("target must be an object");var n=Hv(e);if(1===arguments.length)return n;for(var r=1;r-1e3&&e<1e3||zy.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-Yy(-e):Yy(e);if(r!==e){var i=String(r),o=Uy.call(t,i.length+1);return jy.call(i,n,"$&_")+"."+jy.call(jy.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return jy.call(t,n,"$&_")}var nT=xy,rT=nT.custom,iT=uT(rT)?rT:null,oT=function e(t,n,r,i){var o=n||{};if(fT(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(fT(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!fT(o,"customInspect")||o.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(fT(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(fT(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return bT(t,o);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?tT(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?tT(t,c):c}var u=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return lT(t)?"[Array]":"[Object]";var h,d=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=Wy.call(Array(e.indent+1)," ")}return{base:n,prev:Wy.call(Array(t+1),n)}}(o,r);if(void 0===i)i=[];else if(gT(i,t)>=0)return"[Circular]";function p(t,n,a){if(n&&(i=Xy.call(i)).push(n),a){var s={depth:o.depth};return fT(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),e(t,s,r+1,i)}return e(t,o,r+1,i)}if("function"==typeof t&&!cT(t)){var f=function(e){if(e.name)return e.name;var t=Fy.call(By.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),m=xT(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(m.length>0?" { "+Wy.call(m,", ")+" }":"")}if(uT(t)){var g=Qy?jy.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Ky.call(t);return"object"!=typeof t||Qy?g:yT(g)}if((h=t)&&"object"==typeof h&&("undefined"!=typeof HTMLElement&&h instanceof HTMLElement||"string"==typeof h.nodeName&&"function"==typeof h.getAttribute)){for(var b="<"+Gy.call(String(t.nodeName)),v=t.attributes||[],y=0;y"}if(lT(t)){if(0===t.length)return"[]";var T=xT(t,p);return d&&!function(e){for(var t=0;t=0)return!1;return!0}(T)?"["+ET(T,d)+"]":"[ "+Wy.call(T,", ")+" ]"}if(function(e){return!("[object Error]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}(t)){var _=xT(t,p);return"cause"in Error.prototype||!("cause"in t)||Jy.call(t,"cause")?0===_.length?"["+String(t)+"]":"{ ["+String(t)+"] "+Wy.call(_,", ")+" }":"{ ["+String(t)+"] "+Wy.call(Vy.call("[cause]: "+p(t.cause),_),", ")+" }"}if("object"==typeof t&&a){if(iT&&"function"==typeof t[iT]&&nT)return nT(t,{depth:u-r});if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!ky||!e||"object"!=typeof e)return!1;try{ky.call(e);try{Oy.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var E=[];return Ay&&Ay.call(t,(function(e,n){E.push(p(n,t,!0)+" => "+p(e,t))})),_T("Map",ky.call(t),E,d)}if(function(e){if(!Oy||!e||"object"!=typeof e)return!1;try{Oy.call(e);try{ky.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var x=[];return Dy&&Dy.call(t,(function(e){x.push(p(e,t))})),_T("Set",Oy.call(t),x,d)}if(function(e){if(!Py||!e||"object"!=typeof e)return!1;try{Py.call(e,Py);try{Ny.call(e,Ny)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return TT("WeakMap");if(function(e){if(!Ny||!e||"object"!=typeof e)return!1;try{Ny.call(e,Ny);try{Py.call(e,Py)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return TT("WeakSet");if(function(e){if(!Ry||!e||"object"!=typeof e)return!1;try{return Ry.call(e),!0}catch(e){}return!1}(t))return TT("WeakRef");if(function(e){return!("[object Number]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}(t))return yT(p(Number(t)));if(function(e){if(!e||"object"!=typeof e||!qy)return!1;try{return qy.call(e),!0}catch(e){}return!1}(t))return yT(p(qy.call(t)));if(function(e){return!("[object Boolean]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}(t))return yT(My.call(t));if(function(e){return!("[object String]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}(t))return yT(p(String(t)));if(!function(e){return!("[object Date]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}(t)&&!cT(t)){var w=xT(t,p),S=eT?eT(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",A=!S&&Zy&&Object(t)===t&&Zy in t?Uy.call(mT(t),8,-1):k?"Object":"",C=(S||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(A||k?"["+Wy.call(Vy.call([],A||[],k||[]),": ")+"] ":"");return 0===w.length?C+"{}":d?C+"{"+ET(w,d)+"}":C+"{ "+Wy.call(w,", ")+" }"}return String(t)};function aT(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function sT(e){return jy.call(String(e),/"/g,""")}function lT(e){return!("[object Array]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}function cT(e){return!("[object RegExp]"!==mT(e)||Zy&&"object"==typeof e&&Zy in e)}function uT(e){if(Qy)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Ky)return!1;try{return Ky.call(e),!0}catch(e){}return!1}var hT,dT,pT=Object.prototype.hasOwnProperty||function(e){return e in this};function fT(e,t){return pT.call(e,t)}function mT(e){return Ly.call(e)}function gT(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return bT(Uy.call(e,0,t.maxStringLength),t)+r}return aT(jy.call(jy.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,vT),"single",t)}function vT(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Hy.call(t.toString(16))}function yT(e){return"Object("+e+")"}function TT(e){return e+" { ? }"}function _T(e,t,n,r){return e+" ("+t+") {"+(r?ET(n,r):Wy.call(n,", "))+"}"}function ET(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+Wy.call(e,","+n)+"\n"+t.prev}function xT(e,t){var n=lT(e),r=[];if(n){r.length=e.length;for(var i=0;i=0&&t["[[EndIndex]]"]>=t["[[StartIndex]]"]&&String(parseInt(t["[[StartIndex]]"],10))===String(t["[[StartIndex]]"])&&String(parseInt(t["[[EndIndex]]"],10))===String(t["[[EndIndex]]"])}}function o_(){if(VT)return zT;VT=1;var e=yv,t=e("%TypeError%"),n=e("%SyntaxError%"),r=Yb,i={"Property Descriptor":function(e){var n={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var i in e)if(r(e,i)&&!n[i])return!1;var o=r(e,"[[Value]]"),a=r(e,"[[Get]]")||r(e,"[[Set]]");if(o&&a)throw new t("Property Descriptors may not be both accessor and data descriptors");return!0},"Match Record":i_(),"Iterator Record":function(e){return r(e,"[[Iterator]]")&&r(e,"[[NextMethod]]")&&r(e,"[[Done]]")},"PromiseCapability Record":function(e){return e&&r(e,"[[Resolve]]")&&"function"==typeof e["[[Resolve]]"]&&r(e,"[[Reject]]")&&"function"==typeof e["[[Reject]]"]&&r(e,"[[Promise]]")&&e["[[Promise]]"]&&"function"==typeof e["[[Promise]]"].then},"AsyncGeneratorRequest Record":function(e){return e&&r(e,"[[Completion]]")&&r(e,"[[Capability]]")&&i["PromiseCapability Record"](e["[[Capability]]"])}};return zT=function(e,r,o,a){var s=i[r];if("function"!=typeof s)throw new n("unknown record type: "+r);if("Object"!==e(a)||!s(a))throw new t(o+" must be a "+r)}}function a_(){if(qT)return YT;qT=1;var e=o_(),t=XT?WT:(XT=1,WT=function(e){if(void 0===e)return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}),n=cy();return YT=function(r){return void 0!==r&&e(n,"Property Descriptor","Desc",r),t(r)}}function s_(){if(ZT)return QT;ZT=1;var e=Yb,t=o_(),n=cy();return QT=function(r){return void 0!==r&&(t(n,"Property Descriptor","Desc",r),!(!e(r,"[[Value]]")&&!e(r,"[[Writable]]")))}}function l_(){if(e_)return JT;e_=1;var e=yy;return JT=function(t,n){return t===n?0!==t||1/t==1/n:e(t)&&e(n)}}var c_,u_,h_=function(e){return!!e},d_={exports:{}},p_=Function.prototype.toString,f_="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof f_&&"function"==typeof Object.defineProperty)try{c_=Object.defineProperty({},"length",{get:function(){throw u_}}),u_={},f_((function(){throw 42}),null,c_)}catch(e){e!==u_&&(f_=null)}else f_=null;var m_=/^\s*class\b/,g_=function(e){try{var t=p_.call(e);return m_.test(t)}catch(e){return!1}},b_=function(e){try{return!g_(e)&&(p_.call(e),!0)}catch(e){return!1}},v_=Object.prototype.toString,y_="function"==typeof Symbol&&!!Symbol.toStringTag,T_=!(0 in[,]),__=function(){return!1};if("object"==typeof document){var E_=document.all;v_.call(E_)===v_.call(document.all)&&(__=function(e){if((T_||!e)&&(void 0===e||"object"==typeof e))try{var t=v_.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}var x_,w_,S_,k_,A_,C_=f_?function(e){if(__(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{f_(e,null,c_)}catch(e){if(e!==u_)return!1}return!g_(e)&&b_(e)}:function(e){if(__(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(y_)return b_(e);if(g_(e))return!1;var t=v_.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&b_(e)};function I_(){if(w_)return x_;w_=1;var e=Yb,t=yv("%TypeError%"),n=cy(),r=h_,i=d_.exports;return x_=function(o){if("Object"!==n(o))throw new t("ToPropertyDescriptor requires an object");var a={};if(e(o,"enumerable")&&(a["[[Enumerable]]"]=r(o.enumerable)),e(o,"configurable")&&(a["[[Configurable]]"]=r(o.configurable)),e(o,"value")&&(a["[[Value]]"]=o.value),e(o,"writable")&&(a["[[Writable]]"]=r(o.writable)),e(o,"get")){var s=o.get;if(void 0!==s&&!i(s))throw new t("getter must be a function");a["[[Get]]"]=s}if(e(o,"set")){var l=o.set;if(void 0!==l&&!i(l))throw new t("setter must be a function");a["[[Set]]"]=l}if((e(a,"[[Get]]")||e(a,"[[Set]]"))&&(e(a,"[[Value]]")||e(a,"[[Writable]]")))throw new t("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return a}}function O_(){if(k_)return S_;k_=1;var e=yv("%TypeError%"),t=function(){if(FT)return BT;FT=1;var e=Yb,t=yv("%TypeError%");return BT=function(n,r){if("Object"!==n.Type(r))return!1;var i={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var o in r)if(e(r,o)&&!i[o])return!1;if(n.IsDataDescriptor(r)&&n.IsAccessorDescriptor(r))throw new t("Property Descriptors may not be both accessor and data descriptors");return!0}}(),n=r_(),r=a_(),i=function(){if(KT)return $T;KT=1;var e=Yb,t=o_(),n=cy();return $T=function(r){return void 0!==r&&(t(n,"Property Descriptor","Desc",r),!(!e(r,"[[Get]]")&&!e(r,"[[Set]]")))}}(),o=s_(),a=wT(),s=l_(),l=I_(),c=cy();return S_=function(u,h,d){if("Object"!==c(u))throw new e("Assertion failed: Type(O) is not Object");if(!a(h))throw new e("Assertion failed: IsPropertyKey(P) is not true");var p=t({Type:c,IsDataDescriptor:o,IsAccessorDescriptor:i},d)?d:l(d);if(!t({Type:c,IsDataDescriptor:o,IsAccessorDescriptor:i},p))throw new e("Assertion failed: Desc is not a valid Property Descriptor");return n(o,s,r,u,h,p)}}!function(e){e.exports=C_}(d_);var D_,P_,N_,R_,M_=yv,L_=M_("%Symbol.species%",!0),B_=M_("%TypeError%"),F_=function(){if(my)return fy;my=1;var e=yv,t=e("%Array.prototype%"),n=e("%RangeError%"),r=e("%SyntaxError%"),i=e("%TypeError%"),o=Ey(),a=Math.pow(2,32)-1,s=function(){if(py)return dy;py=1;var e={foo:{}},t=Object;return dy=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof t)}}()(),l=e("%Object.setPrototypeOf%",!0)||(s?function(e,t){return e.__proto__=t,e}:null);return fy=function(e){if(!o(e)||e<0)throw new i("Assertion failed: `length` must be an integer Number >= 0");if(e>a)throw new n("length is greater than (2**32 - 1)");var s=arguments.length>1?arguments[1]:t,c=[];if(s!==t){if(!l)throw new r("ArrayCreate: a `proto` argument that is not `Array.prototype` is not supported in an environment that does not support setting the [[Prototype]]");l(c,s)}return 0!==e&&(c.length=e),c},fy}(),U_=PT,j_=MT(),H_=function(){if(A_)return t_.exports;A_=1;var e=(LT||(LT=1,function(e){e.exports=yv}(n_)),n_.exports)("%Reflect.construct%",!0),t=O_();try{t({},"",{"[[Get]]":function(){}})}catch(e){t=null}if(t&&e){var n={},r={};t(r,"length",{"[[Get]]":function(){throw n},"[[Enumerable]]":!0}),t_.exports=function(t){try{e(t,r)}catch(e){return e===n}}}else t_.exports=function(e){return"function"==typeof e&&!!e.prototype};return t_.exports}(),G_=Ey(),z_=cy(),V_=function(e,t){if(!G_(t)||t<0)throw new B_("Assertion failed: length must be an integer >= 0");if(!j_(e))return F_(t);var n=U_(e,"constructor");if(L_&&"Object"===z_(n)&&null===(n=U_(n,L_))&&(n=void 0),void 0===n)return F_(t);if(!H_(n))throw new B_("C must be a constructor");return new n(t)},W_=yv,X_=W_("%Math%"),Y_=W_("%Number%").MAX_SAFE_INTEGER||X_.pow(2,53)-1;function q_(){if(P_)return D_;P_=1;var e=yv,t=Bv,n=e("%TypeError%"),r=MT(),i=e("%Reflect.apply%",!0)||t("%Function.prototype.apply%");return D_=function(e,t){var o=arguments.length>2?arguments[2]:[];if(!r(o))throw new n("Assertion failed: optional `argumentsList`, if provided, must be a List");return i(e,t,o)},D_}var $_,K_,Q_,Z_,J_=Ub,eE=function(){return J_()&&!!Symbol.toStringTag},tE=Bv,nE=eE();if(nE){$_=tE("Object.prototype.hasOwnProperty"),K_=tE("RegExp.prototype.exec"),Q_={};var rE=function(){throw Q_};Z_={toString:rE,valueOf:rE},"symbol"==typeof Symbol.toPrimitive&&(Z_[Symbol.toPrimitive]=rE)}var iE,oE,aE,sE,lE,cE,uE,hE,dE,pE,fE,mE,gE,bE,vE,yE,TE,_E,EE=tE("Object.prototype.toString"),xE=Object.getOwnPropertyDescriptor,wE=nE?function(e){if(!e||"object"!=typeof e)return!1;var t=xE(e,"lastIndex");if(!t||!$_(t,"value"))return!1;try{K_(e,Z_)}catch(e){return e===Q_}}:function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===EE(e)};function SE(){if(sE)return aE;sE=1;var e=yv,t=function(){if(R_)return N_;R_=1;var e=yv("%Object.getOwnPropertyDescriptor%",!0);if(e)try{e([],"length")}catch(t){e=null}return N_=e}(),n=e("%TypeError%"),r=Bv("Object.prototype.propertyIsEnumerable"),i=Yb,o=MT(),a=wT(),s=function(){if(oE)return iE;oE=1;var e=yv("%Symbol.match%",!0),t=wE,n=h_;return iE=function(r){if(!r||"object"!=typeof r)return!1;if(e){var i=r[e];if(void 0!==i)return n(i)}return t(r)}}(),l=I_(),c=cy();return aE=function(e,u){if("Object"!==c(e))throw new n("Assertion failed: O must be an Object");if(!a(u))throw new n("Assertion failed: P must be a Property Key");if(i(e,u)){if(!t){var h=o(e)&&"length"===u,d=s(e)&&"lastIndex"===u;return{"[[Configurable]]":!(h||d),"[[Enumerable]]":r(e,u),"[[Value]]":e[u],"[[Writable]]":!0}}return l(t(e,u))}}}function kE(){return cE?lE:(cE=1,lE=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e})}function AE(){if(pE)return dE;pE=1;var e=yv("%TypeError%"),t=r_(),n=a_(),r=SE(),i=s_(),o=function(){if(hE)return uE;hE=1;var e=yv,t=e("%Object.preventExtensions%",!0),n=e("%Object.isExtensible%",!0),r=kE();return uE=t?function(e){return!r(e)&&n(e)}:function(e){return!r(e)}}(),a=wT(),s=l_(),l=cy();return dE=function(c,u,h){if("Object"!==l(c))throw new e("Assertion failed: Type(O) is not Object");if(!a(u))throw new e("Assertion failed: IsPropertyKey(P) is not true");var d=r(c,u),p=!d||o(c);return!(d&&!d["[[Configurable]]"]||!p)&&t(i,s,n,c,u,{"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":h,"[[Writable]]":!0})}}function CE(){if(mE)return fE;mE=1;var e=yv("%TypeError%"),t=AE(),n=wT(),r=cy();return fE=function(i,o,a){if("Object"!==r(i))throw new e("Assertion failed: Type(O) is not Object");if(!n(o))throw new e("Assertion failed: IsPropertyKey(P) is not true");var s=t(i,o,a);if(!s)throw new e("unable to create data property");return s}}function IE(){if(bE)return gE;bE=1;var e=yv("%TypeError%"),t=wT(),n=cy();return gE=function(r,i){if("Object"!==n(r))throw new e("Assertion failed: `O` must be an Object");if(!t(i))throw new e("Assertion failed: `P` must be a Property Key");return i in r}}function OE(){if(_E)return TE;_E=1;var e=Date.prototype.getDay,t=Object.prototype.toString,n=eE();return TE=function(r){return"object"==typeof r&&null!==r&&(n?function(t){try{return e.call(t),!0}catch(e){return!1}}(r):"[object Date]"===t.call(r))}}var DE,PE,NE,RE,ME,LE,BE,FE,UE,jE={exports:{}};function HE(){if(DE)return jE.exports;DE=1;var e=Object.prototype.toString;if(Gb()){var t=Symbol.prototype.toString,n=/^Symbol\(.*\)$/;jE.exports=function(r){if("symbol"==typeof r)return!0;if("[object Symbol]"!==e.call(r))return!1;try{return function(e){return"symbol"==typeof e.valueOf()&&n.test(t.call(e))}(r)}catch(e){return!1}}}else jE.exports=function(e){return!1};return jE.exports}function GE(){if(NE)return PE;NE=1;var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator,t=yE?vE:(yE=1,vE=function(e){return null===e||"function"!=typeof e&&"object"!=typeof e}),n=C_,r=OE(),i=HE();return PE=function(o){if(t(o))return o;var a,s="default";if(arguments.length>1&&(arguments[1]===String?s="string":arguments[1]===Number&&(s="number")),e&&(Symbol.toPrimitive?a=function(e,t){var r=e[t];if(null!=r){if(!n(r))throw new TypeError(r+" returned for property "+t+" of object "+e+" is not a function");return r}}(o,Symbol.toPrimitive):i(o)&&(a=Symbol.prototype.valueOf)),void 0!==a){var l=a.call(o,s);if(t(l))return l;throw new TypeError("unable to convert exotic object to primitive")}return"default"===s&&(r(o)||i(o))&&(s="string"),function(e,r){if(null==e)throw new TypeError("Cannot call method on "+e);if("string"!=typeof r||"number"!==r&&"string"!==r)throw new TypeError('hint must be "string" or "number"');var i,o,a,s="string"===r?["toString","valueOf"]:["valueOf","toString"];for(a=0;a1?e(t,arguments[1]):e(t)},RE}(),KE=function(){if(UE)return FE;UE=1;var e=yv,t=e("%Number%"),n=e("%RegExp%"),r=e("%TypeError%"),i=e("%parseInt%"),o=Bv,a=function(){if(BE)return LE;BE=1;var e=yv,t=wE,n=Bv("RegExp.prototype.exec"),r=e("%TypeError%");return LE=function(e){if(!t(e))throw new r("`regex` must be a RegExp");return function(t){return null!==n(e,t)}}}(),s=o("String.prototype.slice"),l=a(/^0b[01]+$/i),c=a(/^0o[0-7]+$/i),u=a(/^[-+]0x[0-9a-f]+$/i),h=a(new n("["+["…","​","￾"].join("")+"]","g")),d=["\t\n\v\f\r   ᠎    ","          \u2028","\u2029\ufeff"].join(""),p=new RegExp("(^["+d+"]+)|(["+d+"]+$)","g"),f=o("String.prototype.replace"),m=cy();return FE=function e(n){if("String"!==m(n))throw new r("Assertion failed: `argument` is not a String");if(l(n))return t(i(s(n,2),2));if(c(n))return t(i(s(n,2),8));if(h(n)||u(n))return NaN;var o=f(n,p,"");return o!==n?e(o):t(n)}}(),QE=ly,ZE=vy,JE=yy,ex=_y,tx=function(e){var t=function(e){var t=qE(e)?e:$E(e,YE);if("symbol"==typeof t)throw new XE("Cannot convert a Symbol value to a number");if("bigint"==typeof t)throw new XE("Conversion from 'BigInt' to 'number' is not allowed.");return"string"==typeof t?KE(t):YE(t)}(e);if(JE(t)||0===t)return 0;if(!ex(t))return t;var n=ZE(QE(t));return 0===n?0:function(e){return e>=0?1:-1}(t)*n},nx=Y_,rx=tx,ix=function(e){var t=rx(e);return t<=0?0:t>nx?nx:t};function ox(){if(VE)return zE;VE=1;var e=yv("%TypeError%"),t=PT,n=ix,r=cy();return zE=function(i){if("Object"!==r(i))throw new e("Assertion failed: `obj` must be an Object");return n(t(i,"length"))}}var ax=yv,sx=ax("%String%"),lx=ax("%TypeError%"),cx=function(e){if("symbol"==typeof e)throw new lx("Cannot convert a Symbol value to a string");return sx(e)},ux=yv("%TypeError%"),hx=Y_,dx=q_(),px=CE(),fx=PT,mx=IE(),gx=MT(),bx=ox(),vx=cx,yx={exports:{}},Tx=yv("%TypeError%"),_x=function(e,t){if(null==e)throw new Tx(t||"Cannot call method on "+e);return e};!function(e){e.exports=_x}(yx);var Ex,xx,wx,Sx,kx=yv("%Object%"),Ax=yx.exports,Cx=function(e){return Ax(e),kx(e)},Ix=V_,Ox=function e(t,n,r,i,o){var a;arguments.length>5&&(a=arguments[5]);for(var s=i,l=0;l0&&(h=gx(u)),h)s=e(t,u,bx(u),s,o-1);else{if(s>=hx)throw new ux("index too large");px(t,vx(s),u),s+=1}}l+=1}return s},Dx=PT,Px=tx,Nx=ix,Rx=Cx,Mx=function(){var e=Rx(this),t=Nx(Dx(e,"length")),n=1;arguments.length>0&&void 0!==arguments[0]&&(n=Px(arguments[0]));var r=Ix(e,0);return Ox(r,e,t,0,n),r},Lx=Mx,Bx=function(){return Array.prototype.flat||Lx};var Fx=Pv,Ux=Nv.exports,jx=Mx,Hx=Bx,Gx=Hx(),zx=function(){if(Sx)return wx;Sx=1;var e=Pv,t=function(){if(xx)return Ex;xx=1;var e=Yb,t="function"==typeof Symbol&&"symbol"==typeof Symbol.unscopables,n=t&&Array.prototype[Symbol.unscopables],r=TypeError;return Ex=function(i){if("string"!=typeof i||!i)throw new r("method must be a non-empty string");if(!e(Array.prototype,i))throw new r("method must be on Array.prototype");t&&(n[i]=!0)}}(),n=Bx;return wx=function(){var r=n();return e(Array.prototype,{flat:r},{flat:function(){return Array.prototype.flat!==r}}),t("flat"),r}}(),Vx=Ux(Gx);Fx(Vx,{getPolyfill:Hx,implementation:jx,shim:zx});var Wx=Vx,Xx={},Yx={exports:{}},qx=function(e){return e!=e},$x=function(e,t){return 0===e&&0===t?1/e==1/t:e===t||!(!qx(e)||!qx(t))},Kx=$x,Qx=function(){return"function"==typeof Object.is?Object.is:Kx},Zx=Qx,Jx=Pv,ew=Pv,tw=$x,nw=Qx,rw=function(){var e=Zx();return Jx(Object,{is:e},{is:function(){return Object.is!==e}}),e},iw=(0,Nv.exports)(nw(),Object);ew(iw,{getPolyfill:nw,implementation:tw,shim:rw});var ow=iw;!function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if((0,n.default)(e,t))return!0;if(!e||!t||"object"!==o(e)||"object"!==o(t))return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;i.sort(),a.sort();for(var s=0;s0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(e){this.children=e},enumerable:!1,configurable:!0}),t}(OS);kS.NodeWithChildren=MS;var LS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=IS.ElementType.CDATA,t}return AS(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 4},enumerable:!1,configurable:!0}),t}(MS);kS.CDATA=LS;var BS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=IS.ElementType.Root,t}return AS(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 9},enumerable:!1,configurable:!0}),t}(MS);kS.Document=BS;var FS=function(e){function t(t,n,r,i){void 0===r&&(r=[]),void 0===i&&(i="script"===t?IS.ElementType.Script:"style"===t?IS.ElementType.Style:IS.ElementType.Tag);var o=e.call(this,r)||this;return o.name=t,o.attribs=n,o.type=i,o}return AS(t,e),Object.defineProperty(t.prototype,"nodeType",{get:function(){return 1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(e){this.name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var e=this;return Object.keys(this.attribs).map((function(t){var n,r;return{name:t,value:e.attribs[t],namespace:null===(n=e["x-attribsNamespace"])||void 0===n?void 0:n[t],prefix:null===(r=e["x-attribsPrefix"])||void 0===r?void 0:r[t]}}))},enumerable:!1,configurable:!0}),t}(MS);function US(e){return(0,IS.isTag)(e)}function jS(e){return e.type===IS.ElementType.CDATA}function HS(e){return e.type===IS.ElementType.Text}function GS(e){return e.type===IS.ElementType.Comment}function zS(e){return e.type===IS.ElementType.Directive}function VS(e){return e.type===IS.ElementType.Root}function WS(e,t){var n;if(void 0===t&&(t=!1),HS(e))n=new PS(e.data);else if(GS(e))n=new NS(e.data);else if(US(e)){var r=t?XS(e.children):[],i=new FS(e.name,CS({},e.attribs),r);r.forEach((function(e){return e.parent=i})),null!=e.namespace&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]=CS({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]=CS({},e["x-attribsPrefix"])),n=i}else if(jS(e)){r=t?XS(e.children):[];var o=new LS(r);r.forEach((function(e){return e.parent=o})),n=o}else if(VS(e)){r=t?XS(e.children):[];var a=new BS(r);r.forEach((function(e){return e.parent=a})),e["x-mode"]&&(a["x-mode"]=e["x-mode"]),n=a}else{if(!zS(e))throw new Error("Not implemented yet: ".concat(e.type));var s=new RS(e.name,e.data);null!=e["x-name"]&&(s["x-name"]=e["x-name"],s["x-publicId"]=e["x-publicId"],s["x-systemId"]=e["x-systemId"]),n=s}return n.startIndex=e.startIndex,n.endIndex=e.endIndex,null!=e.sourceCodeLocation&&(n.sourceCodeLocation=e.sourceCodeLocation),n}function XS(e){for(var t=e.map((function(e){return WS(e,!0)})),n=1;n䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map((function(e){return e.charCodeAt(0)})));var QS={};Object.defineProperty(QS,"__esModule",{value:!0}),QS.default=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((function(e){return e.charCodeAt(0)})));var ZS={};(function(e){var t;Object.defineProperty(e,"__esModule",{value:!0}),e.replaceCodePoint=e.fromCodePoint=void 0;var n=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function r(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=n.get(e))&&void 0!==t?t:e}e.fromCodePoint=null!==(t=String.fromCodePoint)&&void 0!==t?t:function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+String.fromCharCode(e)},e.replaceCodePoint=r,e.default=function(t){return(0,e.fromCodePoint)(r(t))}})(ZS),function(e){var t=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXML=e.decodeHTMLStrict=e.decodeHTML=e.determineBranch=e.BinTrieFlags=e.fromCodePoint=e.replaceCodePoint=e.decodeCodePoint=e.xmlDecodeTree=e.htmlDecodeTree=void 0;var n=t(KS);e.htmlDecodeTree=n.default;var r=t(QS);e.xmlDecodeTree=r.default;var i=t(ZS);e.decodeCodePoint=i.default;var o,a,s,l,c=ZS;function u(e){return function(t,n){for(var r="",a=0,l=0;(l=t.indexOf("&",l))>=0;)if(r+=t.slice(a,l),a=l,l+=1,t.charCodeAt(l)!==o.NUM){for(var c=0,u=1,d=0,p=e[d];l>14)-1))break;d+=m}}0!==c&&(r+=1==(m=(e[c]&s.VALUE_LENGTH)>>14)?String.fromCharCode(e[c]&~s.VALUE_LENGTH):2===m?String.fromCharCode(e[c+1]):String.fromCharCode(e[c+1],e[c+2]),a=l-u+1)}else{var g=l+1,b=10,v=t.charCodeAt(g);(v|o.To_LOWER_BIT)===o.LOWER_X&&(b=16,l+=1,g+=1);do{v=t.charCodeAt(++l)}while(v>=o.ZERO&&v<=o.NINE||16===b&&(v|o.To_LOWER_BIT)>=o.LOWER_A&&(v|o.To_LOWER_BIT)<=o.LOWER_F);if(g!==l){var y=t.substring(g,l),T=parseInt(y,b);if(t.charCodeAt(l)===o.SEMI)l+=1;else if(n)continue;r+=(0,i.default)(T),a=l}}return r+t.slice(a)}}function h(e,t,n,r){var i=(t&s.BRANCH_LENGTH)>>7,o=t&s.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){var a=r-o;return a<0||a>=i?-1:e[n+a]-1}for(var l=n,c=l+i-1;l<=c;){var u=l+c>>>1,h=e[u];if(hr))return e[u+i];c=u-1}}return-1}Object.defineProperty(e,"replaceCodePoint",{enumerable:!0,get:function(){return c.replaceCodePoint}}),Object.defineProperty(e,"fromCodePoint",{enumerable:!0,get:function(){return c.fromCodePoint}}),(a=o||(o={}))[a.NUM=35]="NUM",a[a.SEMI=59]="SEMI",a[a.ZERO=48]="ZERO",a[a.NINE=57]="NINE",a[a.LOWER_A=97]="LOWER_A",a[a.LOWER_F=102]="LOWER_F",a[a.LOWER_X=120]="LOWER_X",a[a.To_LOWER_BIT=32]="To_LOWER_BIT",(l=s=e.BinTrieFlags||(e.BinTrieFlags={}))[l.VALUE_LENGTH=49152]="VALUE_LENGTH",l[l.BRANCH_LENGTH=16256]="BRANCH_LENGTH",l[l.JUMP_TABLE=127]="JUMP_TABLE",e.determineBranch=h;var d=u(n.default),p=u(r.default);e.decodeHTML=function(e){return d(e,!1)},e.decodeHTMLStrict=function(e){return d(e,!0)},e.decodeXML=function(e){return p(e,!0)}}($S);var JS={},ek={};function tk(e){for(var t=1;t$\x80-\uFFFF]/g;var t=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]);function n(n){for(var r,i="",o=0;null!==(r=e.xmlReplacer.exec(n));){var a=r.index,s=n.charCodeAt(a),l=t.get(s);void 0!==l?(i+=n.substring(o,a)+l,o=a+1):(i+="".concat(n.substring(o,a),"&#x").concat((0,e.getCodePoint)(n,a).toString(16),";"),o=e.xmlReplacer.lastIndex+=Number(55296==(64512&s)))}return i+n.substr(o)}function r(e,t){return function(n){for(var r,i=0,o="";r=e.exec(n);)i!==r.index&&(o+=n.substring(i,r.index)),o+=t.get(r[0].charCodeAt(0)),i=r.index+1;return o+n.substring(i)}}e.getCodePoint=null!=String.prototype.codePointAt?function(e,t){return e.codePointAt(t)}:function(e,t){return 55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t)},e.encodeXML=n,e.escape=n,e.escapeUTF8=r(/[&<>'"]/g,t),e.escapeAttribute=r(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),e.escapeText=r(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))}(nk);var rk=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(JS,"__esModule",{value:!0}),JS.encodeNonAsciiHTML=JS.encodeHTML=void 0;var ik=rk(ek),ok=nk,ak=/[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g;function sk(e,t){for(var n,r="",i=0;null!==(n=e.exec(t));){var o=n.index;r+=t.substring(i,o);var a=t.charCodeAt(o),s=ik.default.get(a);if("object"==typeof s){if(o+1");case pk.Comment:return function(e){return"\x3c!--".concat(e.data,"--\x3e")}(e);case pk.CDATA:return function(e){return"")}(e);case pk.Script:case pk.Style:case pk.Tag:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=mk.elementNames.get(e.name))&&void 0!==n?n:e.name,e.parent&&_k.has(e.parent.name)&&(t=ck(ck({},t),{xmlMode:!1}))),!t.xmlMode&&Ek.has(e.name)&&(t=ck(ck({},t),{xmlMode:"foreign"}));var r="<".concat(e.name),i=function(e,t){var n;if(e){var r=!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)?bk:t.xmlMode||"utf8"!==t.encodeEntities?fk.encodeXML:fk.escapeAttribute;return Object.keys(e).map((function(n){var i,o,a=null!==(i=e[n])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(n=null!==(o=mk.attributeNames.get(n))&&void 0!==o?o:n),t.emptyAttrs||t.xmlMode||""!==a?"".concat(n,'="').concat(r(a),'"'):n})).join(" ")}}(e.attribs,t);return i&&(r+=" ".concat(i)),0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&vk.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=yk(e.children,t)),!t.xmlMode&&vk.has(e.name)||(r+=""))),r}(e,t);case pk.Text:return function(e,t){var n,r=e.data||"";return!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)||!t.xmlMode&&e.parent&&gk.has(e.parent.name)||(r=t.xmlMode||"utf8"!==t.encodeEntities?(0,fk.encodeXML)(r):(0,fk.escapeText)(r)),r}(e,t)}}YS.render=yk,YS.default=yk;var _k=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),Ek=new Set(["svg","math"]);var xk=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ES,"__esModule",{value:!0}),ES.innerText=ES.textContent=ES.getText=ES.getInnerHTML=ES.getOuterHTML=void 0;var wk=xS,Sk=xk(YS),kk=wS;function Ak(e,t){return(0,Sk.default)(e,t)}ES.getOuterHTML=Ak,ES.getInnerHTML=function(e,t){return(0,wk.hasChildren)(e)?e.children.map((function(e){return Ak(e,t)})).join(""):""},ES.getText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,wk.isTag)(t)?"br"===t.name?"\n":e(t.children):(0,wk.isCDATA)(t)?e(t.children):(0,wk.isText)(t)?t.data:""},ES.textContent=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,wk.hasChildren)(t)&&!(0,wk.isComment)(t)?e(t.children):(0,wk.isText)(t)?t.data:""},ES.innerText=function e(t){return Array.isArray(t)?t.map(e).join(""):(0,wk.hasChildren)(t)&&(t.type===kk.ElementType.Tag||(0,wk.isCDATA)(t))?e(t.children):(0,wk.isText)(t)?t.data:""};var Ck={};Object.defineProperty(Ck,"__esModule",{value:!0}),Ck.prevElementSibling=Ck.nextElementSibling=Ck.getName=Ck.hasAttrib=Ck.getAttributeValue=Ck.getSiblings=Ck.getParent=Ck.getChildren=void 0;var Ik=xS;function Ok(e){return(0,Ik.hasChildren)(e)?e.children:[]}function Dk(e){return e.parent||null}Ck.getChildren=Ok,Ck.getParent=Dk,Ck.getSiblings=function(e){var t=Dk(e);if(null!=t)return Ok(t);for(var n=[e],r=e.prev,i=e.next;null!=r;)n.unshift(r),r=r.prev;for(;null!=i;)n.push(i),i=i.next;return n},Ck.getAttributeValue=function(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]},Ck.hasAttrib=function(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]},Ck.getName=function(e){return e.name},Ck.nextElementSibling=function(e){for(var t=e.next;null!==t&&!(0,Ik.isTag)(t);)t=t.next;return t},Ck.prevElementSibling=function(e){for(var t=e.prev;null!==t&&!(0,Ik.isTag)(t);)t=t.prev;return t};var Pk={};function Nk(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Object.defineProperty(Pk,"__esModule",{value:!0}),Pk.prepend=Pk.prependChild=Pk.append=Pk.appendChild=Pk.replaceElement=Pk.removeElement=void 0,Pk.removeElement=Nk,Pk.replaceElement=function(e,t){var n=t.prev=e.prev;n&&(n.next=t);var r=t.next=e.next;r&&(r.prev=t);var i=t.parent=e.parent;if(i){var o=i.children;o[o.lastIndexOf(e)]=t,e.parent=null}},Pk.appendChild=function(e,t){if(Nk(t),t.next=null,t.parent=e,e.children.push(t)>1){var n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null},Pk.append=function(e,t){Nk(t);var n=e.parent,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){var i=n.children;i.splice(i.lastIndexOf(r),0,t)}}else n&&n.children.push(t)},Pk.prependChild=function(e,t){if(Nk(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){var n=e.children[1];n.prev=t,t.next=n}else t.next=null},Pk.prepend=function(e,t){Nk(t);var n=e.parent;if(n){var r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t};var Rk={};Object.defineProperty(Rk,"__esModule",{value:!0}),Rk.findAll=Rk.existsOne=Rk.findOne=Rk.findOneChild=Rk.find=Rk.filter=void 0;var Mk=xS;function Lk(e,t,n,r){for(var i=[],o=0,a=t;o0){var l=Lk(e,s.children,n,r);if(i.push.apply(i,l),(r-=l.length)<=0)break}}return i}Rk.filter=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),Array.isArray(t)||(t=[t]),Lk(e,t,n,r)},Rk.find=Lk,Rk.findOneChild=function(e,t){return t.find(e)},Rk.findOne=function e(t,n,r){void 0===r&&(r=!0);for(var i=null,o=0;o0&&(i=e(t,a.children,!0)))}return i},Rk.existsOne=function e(t,n){return n.some((function(n){return(0,Mk.isTag)(n)&&(t(n)||n.children.length>0&&e(t,n.children))}))},Rk.findAll=function(e,t){for(var n,r,i=[],o=t.filter(Mk.isTag);r=o.shift();){var a=null===(n=r.children)||void 0===n?void 0:n.filter(Mk.isTag);a&&a.length>0&&o.unshift.apply(o,a),e(r)&&i.push(r)}return i};var Bk={};Object.defineProperty(Bk,"__esModule",{value:!0}),Bk.getElementsByTagType=Bk.getElementsByTagName=Bk.getElementById=Bk.getElements=Bk.testElement=void 0;var Fk=xS,Uk=Rk,jk={tag_name:function(e){return"function"==typeof e?function(t){return(0,Fk.isTag)(t)&&e(t.name)}:"*"===e?Fk.isTag:function(t){return(0,Fk.isTag)(t)&&t.name===e}},tag_type:function(e){return"function"==typeof e?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return"function"==typeof e?function(t){return(0,Fk.isText)(t)&&e(t.data)}:function(t){return(0,Fk.isText)(t)&&t.data===e}}};function Hk(e,t){return"function"==typeof t?function(n){return(0,Fk.isTag)(n)&&t(n.attribs[e])}:function(n){return(0,Fk.isTag)(n)&&n.attribs[e]===t}}function Gk(e,t){return function(n){return e(n)||t(n)}}function zk(e){var t=Object.keys(e).map((function(t){var n=e[t];return Object.prototype.hasOwnProperty.call(jk,t)?jk[t](n):Hk(t,n)}));return 0===t.length?null:t.reduce(Gk)}Bk.testElement=function(e,t){var n=zk(e);return!n||n(t)},Bk.getElements=function(e,t,n,r){void 0===r&&(r=1/0);var i=zk(e);return i?(0,Uk.filter)(i,t,n,r):[]},Bk.getElementById=function(e,t,n){return void 0===n&&(n=!0),Array.isArray(t)||(t=[t]),(0,Uk.findOne)(Hk("id",e),t,n)},Bk.getElementsByTagName=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,Uk.filter)(jk.tag_name(e),t,n,r)},Bk.getElementsByTagType=function(e,t,n,r){return void 0===n&&(n=!0),void 0===r&&(r=1/0),(0,Uk.filter)(jk.tag_type(e),t,n,r)};var Vk={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueSort=e.compareDocumentPosition=e.DocumentPosition=e.removeSubsets=void 0;var t,n,r=xS;function i(e,n){var i=[],o=[];if(e===n)return 0;for(var a=(0,r.hasChildren)(e)?e:e.parent;a;)i.unshift(a),a=a.parent;for(a=(0,r.hasChildren)(n)?n:n.parent;a;)o.unshift(a),a=a.parent;for(var s=Math.min(i.length,o.length),l=0;lu.indexOf(d)?c===n?t.FOLLOWING|t.CONTAINED_BY:t.FOLLOWING:c===e?t.PRECEDING|t.CONTAINS:t.PRECEDING}e.removeSubsets=function(e){for(var t=e.length;--t>=0;){var n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(var r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e},(n=t=e.DocumentPosition||(e.DocumentPosition={}))[n.DISCONNECTED=1]="DISCONNECTED",n[n.PRECEDING=2]="PRECEDING",n[n.FOLLOWING=4]="FOLLOWING",n[n.CONTAINS=8]="CONTAINS",n[n.CONTAINED_BY=16]="CONTAINED_BY",e.compareDocumentPosition=i,e.uniqueSort=function(e){return(e=e.filter((function(e,t,n){return!n.includes(e,t+1)}))).sort((function(e,n){var r=i(e,n);return r&t.PRECEDING?-1:r&t.FOLLOWING?1:0})),e}}(Vk);var Wk={};Object.defineProperty(Wk,"__esModule",{value:!0}),Wk.getFeed=void 0;var Xk=ES,Yk=Bk;Wk.getFeed=function(e){var t=Qk(eA,e);return t?"feed"===t.name?function(e){var t,n=e.children,r={type:"atom",items:(0,Yk.getElementsByTagName)("entry",n).map((function(e){var t,n=e.children,r={media:Kk(n)};Jk(r,"id","id",n),Jk(r,"title","title",n);var i=null===(t=Qk("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);var o=Zk("summary",n)||Zk("content",n);o&&(r.description=o);var a=Zk("updated",n);return a&&(r.pubDate=new Date(a)),r}))};Jk(r,"id","id",n),Jk(r,"title","title",n);var i=null===(t=Qk("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i),Jk(r,"description","subtitle",n);var o=Zk("updated",n);return o&&(r.updated=new Date(o)),Jk(r,"author","email",n,!0),r}(t):function(e){var t,n,r=null!==(n=null===(t=Qk("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],i={type:e.name.substr(0,3),id:"",items:(0,Yk.getElementsByTagName)("item",e.children).map((function(e){var t=e.children,n={media:Kk(t)};Jk(n,"id","guid",t),Jk(n,"title","title",t),Jk(n,"link","link",t),Jk(n,"description","description",t);var r=Zk("pubDate",t);return r&&(n.pubDate=new Date(r)),n}))};Jk(i,"title","title",r),Jk(i,"link","link",r),Jk(i,"description","description",r);var o=Zk("lastBuildDate",r);return o&&(i.updated=new Date(o)),Jk(i,"author","managingEditor",r,!0),i}(t):null};var qk=["url","type","lang"],$k=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Kk(e){return(0,Yk.getElementsByTagName)("media:content",e).map((function(e){for(var t=e.attribs,n={medium:t.medium,isDefault:!!t.isDefault},r=0,i=qk;re.length-3)return!1;var r=e.charCodeAt(n+1);return(r>=t.LowerA&&r<=t.LowerZ||r>=t.UpperA&&r<=t.UpperZ||r===t.Exclamation)&&e.includes(">",n+2)}})(hA),Object.defineProperty(uA,"__esModule",{value:!0}),uA.toggleClass=uA.removeClass=uA.addClass=uA.hasClass=uA.removeAttr=uA.val=uA.data=uA.prop=uA.attr=void 0;var dA=TS,pA=hA,fA=_S,mA=Object.prototype.hasOwnProperty,gA=/\s+/,bA="data-",vA={null:null,true:!0,false:!1},yA=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,TA=/^{[^]*}$|^\[[^]*]$/;function _A(e,t,n){var r;if(e&&(0,pA.isTag)(e))return null!==(r=e.attribs)&&void 0!==r||(e.attribs={}),t?mA.call(e.attribs,t)?!n&&yA.test(t)?t:e.attribs[t]:"option"===e.name&&"value"===t?(0,dA.text)(e.children):"input"!==e.name||"radio"!==e.attribs.type&&"checkbox"!==e.attribs.type||"value"!==t?void 0:"on":e.attribs}function EA(e,t,n){null===n?AA(e,t):e.attribs[t]="".concat(n)}function xA(e,t,n){return t in e?e[t]:!n&&yA.test(t)?void 0!==_A(e,t,!1):_A(e,t,n)}function wA(e,t,n,r){t in e?e[t]=n:EA(e,t,!r&&yA.test(t)?n?"":null:"".concat(n))}function SA(e,t,n){var r,i=e;null!==(r=i.data)&&void 0!==r||(i.data={}),"object"==typeof t?Object.assign(i.data,t):"string"==typeof t&&void 0!==n&&(i.data[t]=n)}function kA(e,t){var n,r,i;null==t?r=(n=Object.keys(e.attribs).filter((function(e){return e.startsWith(bA)}))).map((function(e){return(0,pA.camelCase)(e.slice(bA.length))})):(n=[bA+(0,pA.cssCase)(t)],r=[t]);for(var o=0;o1?this:_A(this[0],e,this.options.xmlMode)},uA.prop=function(e,t){var n,r=this;if("string"==typeof e&&void 0===t){var i=this[0];if(!i||!(0,pA.isTag)(i))return;switch(e){case"style":var o=this.css(),a=Object.keys(o);return a.forEach((function(e,t){o[t]=e})),o.length=a.length,o;case"tagName":case"nodeName":return i.name.toUpperCase();case"href":case"src":var s=null===(n=i.attribs)||void 0===n?void 0:n[e];return"undefined"==typeof URL||("href"!==e||"a"!==i.tagName&&"link"!==i.name)&&("src"!==e||"img"!==i.tagName&&"iframe"!==i.tagName&&"audio"!==i.tagName&&"video"!==i.tagName&&"source"!==i.tagName)||void 0===s||!this.options.baseURI?s:new URL(s,this.options.baseURI).href;case"innerText":return(0,fA.innerText)(i);case"textContent":return(0,fA.textContent)(i);case"outerHTML":return this.clone().wrap("").parent().html();case"innerHTML":return this.html();default:return xA(i,e,this.options.xmlMode)}}if("object"==typeof e||void 0!==t){if("function"==typeof t){if("object"==typeof e)throw new Error("Bad combination of arguments.");return(0,pA.domEach)(this,(function(n,i){(0,pA.isTag)(n)&&wA(n,e,t.call(n,i,xA(n,e,r.options.xmlMode)),r.options.xmlMode)}))}return(0,pA.domEach)(this,(function(n){(0,pA.isTag)(n)&&("object"==typeof e?Object.keys(e).forEach((function(t){var i=e[t];wA(n,t,i,r.options.xmlMode)})):wA(n,e,t,r.options.xmlMode))}))}},uA.data=function(e,t){var n,r=this[0];if(r&&(0,pA.isTag)(r)){var i=r;return null!==(n=i.data)&&void 0!==n||(i.data={}),e?"object"==typeof e||void 0!==t?((0,pA.domEach)(this,(function(n){(0,pA.isTag)(n)&&("object"==typeof e?SA(n,e):SA(n,e,t))})),this):mA.call(i.data,e)?i.data[e]:kA(i,e):kA(i)}},uA.val=function(e){var t=0===arguments.length,n=this[0];if(!n||!(0,pA.isTag)(n))return t?void 0:this;switch(n.name){case"textarea":return this.text(e);case"select":var r=this.find("option:selected");if(!t){if(null==this.attr("multiple")&&"object"==typeof e)return this;this.find("option").removeAttr("selected");for(var i="object"!=typeof e?[e]:e,o=0;o-1;){var i=r+e.length;if((0===r||gA.test(n[r-1]))&&(i===n.length||gA.test(n[i])))return!0}return!1}))},uA.addClass=function e(t){if("function"==typeof t)return(0,pA.domEach)(this,(function(n,r){if((0,pA.isTag)(n)){var i=n.attribs.class||"";e.call([n],t.call(n,r,i))}}));if(!t||"string"!=typeof t)return this;for(var n=t.split(gA),r=this.length,i=0;i=0&&(t.splice(s,1),o=!0,a--)}o&&(e.attribs.class=t.join(" "))}}))},uA.toggleClass=function e(t,n){if("function"==typeof t)return(0,pA.domEach)(this,(function(r,i){(0,pA.isTag)(r)&&e.call([r],t.call(r,i,r.attribs.class||"",n),n)}));if(!t||"string"!=typeof t)return this;for(var r=t.split(gA),i=r.length,o="boolean"==typeof n?n?1:-1:0,a=this.length,s=0;s=0&&h<0?c.push(r[u]):o<=0&&h>=0&&c.splice(h,1)}l.attribs.class=c.join(" ")}}return this};var IA,OA,DA={},PA={};(OA=IA||(IA={})).Attribute="attribute",OA.Pseudo="pseudo",OA.PseudoElement="pseudo-element",OA.Tag="tag",OA.Universal="universal",OA.Adjacent="adjacent",OA.Child="child",OA.Descendant="descendant",OA.Parent="parent",OA.Sibling="sibling",OA.ColumnCombinator="column-combinator";var NA,RA;(RA=NA||(NA={})).Any="any",RA.Element="element",RA.End="end",RA.Equals="equals",RA.Exists="exists",RA.Hyphen="hyphen",RA.Not="not",RA.Start="start";const MA=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,LA=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,BA=new Map([[126,NA.Element],[94,NA.Start],[36,NA.End],[42,NA.Any],[33,NA.Not],[124,NA.Hyphen]]),FA=new Set(["has","not","matches","is","where","host","host-context"]);function UA(e){switch(e.type){case IA.Adjacent:case IA.Child:case IA.Descendant:case IA.Parent:case IA.Sibling:case IA.ColumnCombinator:return!0;default:return!1}}const jA=new Set(["contains","icontains"]);function HA(e,t,n){const r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function GA(e){return e.replace(LA,HA)}function zA(e){return 39===e||34===e}function VA(e){return 32===e||9===e||10===e||12===e||13===e}function WA(e,t,n){let r=[];function i(e){const r=t.slice(n+e).match(MA);if(!r)throw new Error(`Expected name, found ${t.slice(n)}`);const[i]=r;return n+=e+i.length,GA(i)}function o(e){for(n+=e;n0&&n0&&UA(r[r.length-1]))throw new Error("Did not expect successive traversals.")}function c(e){r.length>0&&r[r.length-1].type===IA.Descendant?r[r.length-1].type=e:(l(),r.push({type:e}))}function u(e,t){r.push({type:IA.Attribute,name:e,action:t,value:i(1),namespace:null,ignoreCase:"quirks"})}function h(){if(r.length&&r[r.length-1].type===IA.Descendant&&r.pop(),0===r.length)throw new Error("Empty sub-selector");e.push(r)}if(o(0),t.length===n)return n;e:for(;ne.charCodeAt(0)))),$A=new Set(YA.map((e=>e.charCodeAt(0)))),KA=new Set([...YA,"~","^","$","*","+","!","|",":","[","]"," ","."].map((e=>e.charCodeAt(0))));function QA(e){return e.map((e=>e.map(ZA).join(""))).join(", ")}function ZA(e,t,n){switch(e.type){case IA.Child:return 0===t?"> ":" > ";case IA.Parent:return 0===t?"< ":" < ";case IA.Sibling:return 0===t?"~ ":" ~ ";case IA.Adjacent:return 0===t?"+ ":" + ";case IA.Descendant:return" ";case IA.ColumnCombinator:return 0===t?"|| ":" || ";case IA.Universal:return"*"===e.namespace&&t+10?r+e.slice(n):e}const nC=T(Object.freeze(Object.defineProperty({__proto__:null,isTraversal:UA,parse:function(e){const t=[],n=WA(t,`${e}`,0);if(n>=1)):e.type===sC.SelectorType.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?r=0:Array.isArray(e.data)?(r=Math.min.apply(Math,e.data.map((function(e){return Math.min.apply(Math,e.map(uC))}))))<0&&(r=0):r=2:r=3),r}aC.default=function(e){for(var t=e.map(uC),n=1;n=0&&r=o.length&&a.test(n)&&e(t)}},exists:function(e,t,n){var r=t.name,i=n.adapter;return function(t){return i.hasAttrib(t,r)&&e(t)}},start:function(e,t,n){var r=n.adapter,i=t.name,o=t.value,a=o.length;return 0===a?fC.default.falseFunc:vC(t,n)?(o=o.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return null!=n&&n.length>=a&&n.substr(0,a).toLowerCase()===o&&e(t)}):function(t){var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.startsWith(o))&&e(t)}},end:function(e,t,n){var r=n.adapter,i=t.name,o=t.value,a=-o.length;return 0===a?fC.default.falseFunc:vC(t,n)?(o=o.toLowerCase(),function(t){var n;return(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.substr(a).toLowerCase())===o&&e(t)}):function(t){var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.endsWith(o))&&e(t)}},any:function(e,t,n){var r=n.adapter,i=t.name,o=t.value;if(""===o)return fC.default.falseFunc;if(vC(t,n)){var a=new RegExp(gC(o),"i");return function(t){var n=r.getAttributeValue(t,i);return null!=n&&n.length>=o.length&&a.test(n)&&e(t)}}return function(t){var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.includes(o))&&e(t)}},not:function(e,t,n){var r=n.adapter,i=t.name,o=t.value;return""===o?function(t){return!!r.getAttributeValue(t,i)&&e(t)}:vC(t,n)?(o=o.toLowerCase(),function(t){var n=r.getAttributeValue(t,i);return(null==n||n.length!==o.length||n.toLowerCase()!==o)&&e(t)}):function(t){return r.getAttributeValue(t,i)!==o&&e(t)}}};var yC={},TC={},_C={},EC={};Object.defineProperty(EC,"__esModule",{value:!0}),EC.parse=void 0;var xC=new Set([9,10,12,13,32]),wC="0".charCodeAt(0),SC="9".charCodeAt(0);EC.parse=function(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];var t=0,n=0,r=o(),i=a();if(t=wC&&e.charCodeAt(t)<=SC;)r=10*r+(e.charCodeAt(t)-wC),t++;return t===n?null:r}function s(){for(;t=n};var r=Math.abs(t),i=(n%r+r)%r;return t>1?function(e){return e>=n&&e%r===i}:function(e){return e<=n&&e%r===i}},kC.generate=function(e){var t=e[0],n=e[1]-1,r=0;if(t<0){var i=-t,o=(n%i+i)%i;return function(){var e=o+i*r++;return e>n?null:e}}return 0===t?n<0?function(){return null}:function(){return 0==r++?n:null}:(n<0&&(n+=t*Math.ceil(-n/t)),function(){return t*r+++n})},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequence=e.generate=e.compile=e.parse=void 0;var t=EC;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return t.parse}});var n=kC;Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return n.compile}}),Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return n.generate}}),e.default=function(e){return(0,n.compile)((0,t.parse)(e))},e.sequence=function(e){return(0,n.generate)((0,t.parse)(e))}}(_C),function(e){var t=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.filters=void 0;var n=t(_C),r=t(iC);function i(e,t){return function(n){var r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}function o(e){return function(t,n,i){var o=i.adapter[e];return"function"!=typeof o?r.default.falseFunc:function(e){return o(e)&&t(e)}}}e.filters={contains:function(e,t,n){var r=n.adapter;return function(n){return e(n)&&r.getText(n).includes(t)}},icontains:function(e,t,n){var r=n.adapter,i=t.toLowerCase();return function(t){return e(t)&&r.getText(t).toLowerCase().includes(i)}},"nth-child":function(e,t,o){var a=o.adapter,s=o.equals,l=(0,n.default)(t);return l===r.default.falseFunc?r.default.falseFunc:l===r.default.trueFunc?i(e,a):function(t){for(var n=a.getSiblings(t),r=0,i=0;i=0&&!s(t,n[i]);i--)a.isTag(n[i])&&r++;return l(r)&&e(t)}},"nth-of-type":function(e,t,o){var a=o.adapter,s=o.equals,l=(0,n.default)(t);return l===r.default.falseFunc?r.default.falseFunc:l===r.default.trueFunc?i(e,a):function(t){for(var n=a.getSiblings(t),r=0,i=0;i=0;i--){var o=n[i];if(s(t,o))break;a.isTag(o)&&a.getName(o)===a.getName(t)&&r++}return l(r)&&e(t)}},root:function(e,t,n){var r=n.adapter;return function(t){var n=r.getParent(t);return(null==n||!r.isTag(n))&&e(t)}},scope:function(t,n,r,i){var o=r.equals;return i&&0!==i.length?1===i.length?function(e){return o(i[0],e)&&t(e)}:function(e){return i.includes(e)&&t(e)}:e.filters.root(t,n,r)},hover:o("isHovered"),visited:o("isVisited"),active:o("isActive")}}(TC);var IC={};Object.defineProperty(IC,"__esModule",{value:!0}),IC.verifyPseudoArgs=IC.pseudos=void 0,IC.pseudos={empty:function(e,t){var n=t.adapter;return!n.getChildren(e).some((function(e){return n.isTag(e)||""!==n.getText(e)}))},"first-child":function(e,t){var n=t.adapter,r=t.equals;if(n.prevElementSibling)return null==n.prevElementSibling(e);var i=n.getSiblings(e).find((function(e){return n.isTag(e)}));return null!=i&&r(e,i)},"last-child":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),o=i.length-1;o>=0;o--){if(r(e,i[o]))return!0;if(n.isTag(i[o]))break}return!1},"first-of-type":function(e,t){for(var n=t.adapter,r=t.equals,i=n.getSiblings(e),o=n.getName(e),a=0;a=0;a--){var s=i[a];if(r(e,s))return!0;if(n.isTag(s)&&n.getName(s)===o)break}return!1},"only-of-type":function(e,t){var n=t.adapter,r=t.equals,i=n.getName(e);return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)||n.getName(t)!==i}))},"only-child":function(e,t){var n=t.adapter,r=t.equals;return n.getSiblings(e).every((function(t){return r(e,t)||!n.isTag(t)}))}},IC.verifyPseudoArgs=function(e,t,n,r){if(null===n){if(e.length>r)throw new Error("Pseudo-class :".concat(t," requires an argument"))}else if(e.length===r)throw new Error("Pseudo-class :".concat(t," doesn't have any arguments"))};var OC={};Object.defineProperty(OC,"__esModule",{value:!0}),OC.aliases=void 0,OC.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var DC={};(function(e){var t=v&&v.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i0&&(0,GC.isTraversal)(s[0])&&s[0].type!==jC.SelectorType.Descendant);else{if(!i||s.some(XC))continue;s.unshift(YC)}s.unshift($C)}}(e,t,o);else if(e.some((function(e){return e.length>0&&(0,GC.isTraversal)(e[0])})))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");var a=!1,s=e.map((function(e){if(e.length>=2){var n=e[0],r=e[1];n.type!==jC.SelectorType.Pseudo||"scope"!==n.name||(i&&r.type===jC.SelectorType.Descendant?e[1]=qC:r.type!==jC.SelectorType.Adjacent&&r.type!==jC.SelectorType.Sibling||(a=!0))}return function(e,t,n){var r;return e.reduce((function(e,r){return e===HC.default.falseFunc?HC.default.falseFunc:(0,zC.compileGeneralSelector)(e,r,t,n,KC)}),null!==(r=t.rootFunc)&&void 0!==r?r:HC.default.trueFunc)}(e,t,o)})).reduce(QC,HC.default.falseFunc);return s.shouldTestNextSiblings=a,s}function QC(e,t){return t===HC.default.falseFunc||e===HC.default.trueFunc?e:e===HC.default.falseFunc||t===HC.default.trueFunc?t:function(n){return e(n)||t(n)}}oC.compileToken=KC,function(e){var t=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=v&&v.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),r=v&&v.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=v&&v.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.aliases=e.pseudos=e.filters=e.is=e.selectOne=e.selectAll=e.prepareContext=e._compileToken=e._compileUnsafe=e.compile=void 0;var o=r(_S),a=i(iC),s=oC,l=DC,c=function(e,t){return e===t},u={adapter:o,equals:c};function h(e){var t,n,r,i,a=null!=e?e:u;return null!==(t=a.adapter)&&void 0!==t||(a.adapter=o),null!==(n=a.equals)&&void 0!==n||(a.equals=null!==(i=null===(r=a.adapter)||void 0===r?void 0:r.equals)&&void 0!==i?i:c),a}function d(e){return function(t,n,r){var i=h(n);return e(t,i,r)}}function p(e){return function(t,n,r){var i=h(r);"function"!=typeof t&&(t=(0,s.compileUnsafe)(t,i,n));var o=f(n,i.adapter,t.shouldTestNextSiblings);return e(t,o,i)}}function f(e,t,n){return void 0===n&&(n=!1),n&&(e=function(e,t){for(var n=Array.isArray(e)?e.slice(0):[e],r=n.length,i=0;i=0?r+1:1/0:0;case"lt":return isFinite(r)?r>=0?Math.min(r,n):1/0:0;case"gt":return isFinite(r)?1/0:0;case"odd":return 2*n;case"even":return 2*n-1;case"last":case"not":return 1/0}}})(JC),Object.defineProperty(ZC,"__esModule",{value:!0}),ZC.groupSelectors=ZC.getDocumentRoot=void 0;var eI=JC;ZC.getDocumentRoot=function(e){for(;e.parent;)e=e.parent;return e},ZC.groupSelectors=function(e){for(var t=[],n=[],r=0,i=e;r0&&e.some((0,s._compileToken)(i,n))||o.some((function(t){return b(t,e,n).length>0}))}function g(e,t,n){if(0===t.length)return[];var r,i=(0,u.groupSelectors)(e),o=i[0],a=i[1];if(o.length){var s=E(t,o,n);if(0===a.length)return s;s.length&&(r=new Set(s))}for(var c=0;c0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)1&&o.length>1?n.reduce((function(e,t){return t(e)}),o):o)}}}DA.find=function(e){var t;if(!e)return this._make([]);var n=this.toArray();if("string"!=typeof e){var r=(0,sI.isCheerio)(e)?e.toArray():[e];return this._make(r.filter((function(e){return n.some((function(t){return(0,lI.contains)(t,e)}))})))}var i=uI.test(e)?n:this.children().toArray(),o={context:n,root:null===(t=this._root)||void 0===t?void 0:t[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(aI.select(e,i,o))};var dI=hI((function(e,t){for(var n,r=[],i=0;i0})},DA.first=function(){return this.length>1?this._make(this[0]):this},DA.last=function(){return this.length>0?this._make(this[this.length-1]):this},DA.eq=function(e){var t;return 0==(e=+e)&&this.length<=1?this:(e<0&&(e=this.length+e),this._make(null!==(t=this[e])&&void 0!==t?t:[]))},DA.get=function(e){return null==e?this.toArray():this[e<0?this.length+e:e]},DA.toArray=function(){return Array.prototype.slice.call(this)},DA.index=function(e){var t,n;return null==e?(t=this.parent().children(),n=this[0]):"string"==typeof e?(t=this._make(e),n=this[0]):(t=this,n=(0,sI.isCheerio)(e)?e[0]:e),Array.prototype.indexOf.call(t,n)},DA.slice=function(e,t){return this._make(Array.prototype.slice.call(this,e,t))},DA.end=function(){var e;return null!==(e=this.prevObject)&&void 0!==e?e:this._make([])},DA.add=function(e,t){var n=this._make(e,t),r=(0,cI.uniqueSort)(iI(iI([],this.get(),!0),n.get(),!0));return this._make(r)},DA.addBack=function(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this};var vI={},yI={};Object.defineProperty(yI,"__esModule",{value:!0}),yI.update=yI.getParse=void 0;var TI=_S,_I=xS;function EI(e,t){var n=Array.isArray(e)?e:[e];t?t.children=n:t=null;for(var r=0;r=e.length?null:e[t+n],u=0;u-1&&(d.children.splice(p,1),i===d&&t>p&&s[0]--)}h.parent=i,h.prev&&(h.prev.next=null!==(o=h.next)&&void 0!==o?o:null),h.next&&(h.next.prev=null!==(a=h.prev)&&void 0!==a?a:null),h.prev=0===u?l:r[u-1],h.next=u===r.length-1?c:r[u+1]}return l&&(l.next=r[0]),c&&(c.prev=r[r.length-1]),e.splice.apply(e,s)}function DI(e){return function(t){for(var n=this.length-1,r=this.parents().last(),i=0;i0&&void 0!==t&&(n[t]+=";".concat(s))}else n[t=o.slice(0,a).trim()]=o.slice(a+1).trim()}return n}(e.attribs.style);if("string"==typeof t)return n[t];if(Array.isArray(t)){var r={};return t.forEach((function(e){null!=n[e]&&(r[e]=n[e])})),r}return n}}PI.css=function(e,t){return null!=e&&null!=t||"object"==typeof e&&!Array.isArray(e)?(0,NI.domEach)(this,(function(n,r){(0,NI.isTag)(n)&&RI(n,e,t,r)})):0!==this.length?MI(this[0],e):void 0};var LI={};Object.defineProperty(LI,"__esModule",{value:!0}),LI.serializeArray=LI.serialize=void 0;var BI=hA,FI="input,select,textarea,keygen",UI=/%20/g,jI=/\r?\n/g;LI.serialize=function(){return this.serializeArray().map((function(e){return"".concat(encodeURIComponent(e.name),"=").concat(encodeURIComponent(e.value))})).join("&").replace(UI,"+")},LI.serializeArray=function(){var e=this;return this.map((function(t,n){var r=e._make(n);return(0,BI.isTag)(n)&&"form"===n.name?r.find(FI).toArray():r.filter(FI).toArray()})).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((function(t,n){var r,i=e._make(n),o=i.attr("name"),a=null!==(r=i.val())&&void 0!==r?r:"";return Array.isArray(a)?a.map((function(e){return{name:o,value:e.replace(jI,"\r\n")}})):{name:o,value:a.replace(jI,"\r\n")}})).toArray()};var HI=v&&v.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),GI=v&&v.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),zI=v&&v.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&HI(t,e,n);return GI(t,e),t};Object.defineProperty(cA,"__esModule",{value:!0}),cA.Cheerio=void 0;var VI=zI(uA),WI=zI(DA),XI=zI(vI),YI=zI(PI),qI=zI(LI),$I=function(e,t,n){if(this.length=0,this.options=n,this._root=t,e){for(var r=0;r=55296&&e<=57343},e.isSurrogatePair=function(e){return e>=56320&&e<=57343},e.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},e.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},e.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||t.has(e)}}(uO);var hO,dO,pO={};hO=pO,Object.defineProperty(hO,"__esModule",{value:!0}),hO.ERR=void 0,(dO=hO.ERR||(hO.ERR={})).controlCharacterInInputStream="control-character-in-input-stream",dO.noncharacterInInputStream="noncharacter-in-input-stream",dO.surrogateInInputStream="surrogate-in-input-stream",dO.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",dO.endTagWithAttributes="end-tag-with-attributes",dO.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",dO.unexpectedSolidusInTag="unexpected-solidus-in-tag",dO.unexpectedNullCharacter="unexpected-null-character",dO.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",dO.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",dO.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",dO.missingEndTagName="missing-end-tag-name",dO.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",dO.unknownNamedCharacterReference="unknown-named-character-reference",dO.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",dO.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",dO.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",dO.eofBeforeTagName="eof-before-tag-name",dO.eofInTag="eof-in-tag",dO.missingAttributeValue="missing-attribute-value",dO.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",dO.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",dO.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",dO.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",dO.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",dO.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",dO.missingDoctypePublicIdentifier="missing-doctype-public-identifier",dO.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",dO.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",dO.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",dO.cdataInHtmlContent="cdata-in-html-content",dO.incorrectlyOpenedComment="incorrectly-opened-comment",dO.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",dO.eofInDoctype="eof-in-doctype",dO.nestedComment="nested-comment",dO.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",dO.eofInComment="eof-in-comment",dO.incorrectlyClosedComment="incorrectly-closed-comment",dO.eofInCdata="eof-in-cdata",dO.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",dO.nullCharacterReference="null-character-reference",dO.surrogateCharacterReference="surrogate-character-reference",dO.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",dO.controlCharacterReference="control-character-reference",dO.noncharacterCharacterReference="noncharacter-character-reference",dO.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",dO.missingDoctypeName="missing-doctype-name",dO.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",dO.duplicateAttribute="duplicate-attribute",dO.nonConformingDoctype="non-conforming-doctype",dO.missingDoctype="missing-doctype",dO.misplacedDoctype="misplaced-doctype",dO.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",dO.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",dO.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",dO.openElementsLeftAfterEof="open-elements-left-after-eof",dO.abandonedHeadElementChild="abandoned-head-element-child",dO.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",dO.nestedNoscriptInHead="nested-noscript-in-head",dO.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text",Object.defineProperty(cO,"__esModule",{value:!0}),cO.Preprocessor=void 0;const fO=uO,mO=pO;let gO=function(){function e(t){d(this,e),this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}return f(e,[{key:"col",get:function(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}},{key:"offset",get:function(){return this.droppedBufferSize+this.pos}},{key:"getError",value:function(e){const{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}},{key:"_err",value:function(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}},{key:"_addGap",value:function(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}},{key:"_processSurrogate",value:function(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if((0,fO.isSurrogatePair)(t))return this.pos++,this._addGap(),(0,fO.getSurrogatePairCodePoint)(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,fO.CODE_POINTS.EOF;return this._err(mO.ERR.surrogateInInputStream),e}},{key:"willDropParsedChunk",value:function(){return this.pos>this.bufferWaterline}},{key:"dropParsedChunk",value:function(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}},{key:"write",value:function(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}},{key:"insertHtmlAtCurrentPos",value:function(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}},{key:"startsWith",value:function(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,fO.CODE_POINTS.EOF;const n=this.html.charCodeAt(t);return n===fO.CODE_POINTS.CARRIAGE_RETURN?fO.CODE_POINTS.LINE_FEED:n}},{key:"advance",value:function(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,fO.CODE_POINTS.EOF;let e=this.html.charCodeAt(this.pos);return e===fO.CODE_POINTS.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,fO.CODE_POINTS.LINE_FEED):e===fO.CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,(0,fO.isSurrogate)(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===fO.CODE_POINTS.LINE_FEED||e===fO.CODE_POINTS.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}},{key:"_checkForProblematicCharacters",value:function(e){(0,fO.isControlCodePoint)(e)?this._err(mO.ERR.controlCharacterInInputStream):(0,fO.isUndefinedCodePoint)(e)&&this._err(mO.ERR.noncharacterInInputStream)}},{key:"retreat",value:function(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}}(bO);var vO={};(function(e){var t,n,r,i,o,a,s,l;Object.defineProperty(e,"__esModule",{value:!0}),e.hasUnescapedText=e.isNumberedHeader=e.SPECIAL_ELEMENTS=e.getTagID=e.TAG_ID=e.TAG_NAMES=e.DOCUMENT_MODE=e.ATTRS=e.NS=void 0,(n=t=e.NS||(e.NS={})).HTML="http://www.w3.org/1999/xhtml",n.MATHML="http://www.w3.org/1998/Math/MathML",n.SVG="http://www.w3.org/2000/svg",n.XLINK="http://www.w3.org/1999/xlink",n.XML="http://www.w3.org/XML/1998/namespace",n.XMLNS="http://www.w3.org/2000/xmlns/",(r=e.ATTRS||(e.ATTRS={})).TYPE="type",r.ACTION="action",r.ENCODING="encoding",r.PROMPT="prompt",r.NAME="name",r.COLOR="color",r.FACE="face",r.SIZE="size",(i=e.DOCUMENT_MODE||(e.DOCUMENT_MODE={})).NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks",(a=o=e.TAG_NAMES||(e.TAG_NAMES={})).A="a",a.ADDRESS="address",a.ANNOTATION_XML="annotation-xml",a.APPLET="applet",a.AREA="area",a.ARTICLE="article",a.ASIDE="aside",a.B="b",a.BASE="base",a.BASEFONT="basefont",a.BGSOUND="bgsound",a.BIG="big",a.BLOCKQUOTE="blockquote",a.BODY="body",a.BR="br",a.BUTTON="button",a.CAPTION="caption",a.CENTER="center",a.CODE="code",a.COL="col",a.COLGROUP="colgroup",a.DD="dd",a.DESC="desc",a.DETAILS="details",a.DIALOG="dialog",a.DIR="dir",a.DIV="div",a.DL="dl",a.DT="dt",a.EM="em",a.EMBED="embed",a.FIELDSET="fieldset",a.FIGCAPTION="figcaption",a.FIGURE="figure",a.FONT="font",a.FOOTER="footer",a.FOREIGN_OBJECT="foreignObject",a.FORM="form",a.FRAME="frame",a.FRAMESET="frameset",a.H1="h1",a.H2="h2",a.H3="h3",a.H4="h4",a.H5="h5",a.H6="h6",a.HEAD="head",a.HEADER="header",a.HGROUP="hgroup",a.HR="hr",a.HTML="html",a.I="i",a.IMG="img",a.IMAGE="image",a.INPUT="input",a.IFRAME="iframe",a.KEYGEN="keygen",a.LABEL="label",a.LI="li",a.LINK="link",a.LISTING="listing",a.MAIN="main",a.MALIGNMARK="malignmark",a.MARQUEE="marquee",a.MATH="math",a.MENU="menu",a.META="meta",a.MGLYPH="mglyph",a.MI="mi",a.MO="mo",a.MN="mn",a.MS="ms",a.MTEXT="mtext",a.NAV="nav",a.NOBR="nobr",a.NOFRAMES="noframes",a.NOEMBED="noembed",a.NOSCRIPT="noscript",a.OBJECT="object",a.OL="ol",a.OPTGROUP="optgroup",a.OPTION="option",a.P="p",a.PARAM="param",a.PLAINTEXT="plaintext",a.PRE="pre",a.RB="rb",a.RP="rp",a.RT="rt",a.RTC="rtc",a.RUBY="ruby",a.S="s",a.SCRIPT="script",a.SECTION="section",a.SELECT="select",a.SOURCE="source",a.SMALL="small",a.SPAN="span",a.STRIKE="strike",a.STRONG="strong",a.STYLE="style",a.SUB="sub",a.SUMMARY="summary",a.SUP="sup",a.TABLE="table",a.TBODY="tbody",a.TEMPLATE="template",a.TEXTAREA="textarea",a.TFOOT="tfoot",a.TD="td",a.TH="th",a.THEAD="thead",a.TITLE="title",a.TR="tr",a.TRACK="track",a.TT="tt",a.U="u",a.UL="ul",a.SVG="svg",a.VAR="var",a.WBR="wbr",a.XMP="xmp",(l=s=e.TAG_ID||(e.TAG_ID={}))[l.UNKNOWN=0]="UNKNOWN",l[l.A=1]="A",l[l.ADDRESS=2]="ADDRESS",l[l.ANNOTATION_XML=3]="ANNOTATION_XML",l[l.APPLET=4]="APPLET",l[l.AREA=5]="AREA",l[l.ARTICLE=6]="ARTICLE",l[l.ASIDE=7]="ASIDE",l[l.B=8]="B",l[l.BASE=9]="BASE",l[l.BASEFONT=10]="BASEFONT",l[l.BGSOUND=11]="BGSOUND",l[l.BIG=12]="BIG",l[l.BLOCKQUOTE=13]="BLOCKQUOTE",l[l.BODY=14]="BODY",l[l.BR=15]="BR",l[l.BUTTON=16]="BUTTON",l[l.CAPTION=17]="CAPTION",l[l.CENTER=18]="CENTER",l[l.CODE=19]="CODE",l[l.COL=20]="COL",l[l.COLGROUP=21]="COLGROUP",l[l.DD=22]="DD",l[l.DESC=23]="DESC",l[l.DETAILS=24]="DETAILS",l[l.DIALOG=25]="DIALOG",l[l.DIR=26]="DIR",l[l.DIV=27]="DIV",l[l.DL=28]="DL",l[l.DT=29]="DT",l[l.EM=30]="EM",l[l.EMBED=31]="EMBED",l[l.FIELDSET=32]="FIELDSET",l[l.FIGCAPTION=33]="FIGCAPTION",l[l.FIGURE=34]="FIGURE",l[l.FONT=35]="FONT",l[l.FOOTER=36]="FOOTER",l[l.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",l[l.FORM=38]="FORM",l[l.FRAME=39]="FRAME",l[l.FRAMESET=40]="FRAMESET",l[l.H1=41]="H1",l[l.H2=42]="H2",l[l.H3=43]="H3",l[l.H4=44]="H4",l[l.H5=45]="H5",l[l.H6=46]="H6",l[l.HEAD=47]="HEAD",l[l.HEADER=48]="HEADER",l[l.HGROUP=49]="HGROUP",l[l.HR=50]="HR",l[l.HTML=51]="HTML",l[l.I=52]="I",l[l.IMG=53]="IMG",l[l.IMAGE=54]="IMAGE",l[l.INPUT=55]="INPUT",l[l.IFRAME=56]="IFRAME",l[l.KEYGEN=57]="KEYGEN",l[l.LABEL=58]="LABEL",l[l.LI=59]="LI",l[l.LINK=60]="LINK",l[l.LISTING=61]="LISTING",l[l.MAIN=62]="MAIN",l[l.MALIGNMARK=63]="MALIGNMARK",l[l.MARQUEE=64]="MARQUEE",l[l.MATH=65]="MATH",l[l.MENU=66]="MENU",l[l.META=67]="META",l[l.MGLYPH=68]="MGLYPH",l[l.MI=69]="MI",l[l.MO=70]="MO",l[l.MN=71]="MN",l[l.MS=72]="MS",l[l.MTEXT=73]="MTEXT",l[l.NAV=74]="NAV",l[l.NOBR=75]="NOBR",l[l.NOFRAMES=76]="NOFRAMES",l[l.NOEMBED=77]="NOEMBED",l[l.NOSCRIPT=78]="NOSCRIPT",l[l.OBJECT=79]="OBJECT",l[l.OL=80]="OL",l[l.OPTGROUP=81]="OPTGROUP",l[l.OPTION=82]="OPTION",l[l.P=83]="P",l[l.PARAM=84]="PARAM",l[l.PLAINTEXT=85]="PLAINTEXT",l[l.PRE=86]="PRE",l[l.RB=87]="RB",l[l.RP=88]="RP",l[l.RT=89]="RT",l[l.RTC=90]="RTC",l[l.RUBY=91]="RUBY",l[l.S=92]="S",l[l.SCRIPT=93]="SCRIPT",l[l.SECTION=94]="SECTION",l[l.SELECT=95]="SELECT",l[l.SOURCE=96]="SOURCE",l[l.SMALL=97]="SMALL",l[l.SPAN=98]="SPAN",l[l.STRIKE=99]="STRIKE",l[l.STRONG=100]="STRONG",l[l.STYLE=101]="STYLE",l[l.SUB=102]="SUB",l[l.SUMMARY=103]="SUMMARY",l[l.SUP=104]="SUP",l[l.TABLE=105]="TABLE",l[l.TBODY=106]="TBODY",l[l.TEMPLATE=107]="TEMPLATE",l[l.TEXTAREA=108]="TEXTAREA",l[l.TFOOT=109]="TFOOT",l[l.TD=110]="TD",l[l.TH=111]="TH",l[l.THEAD=112]="THEAD",l[l.TITLE=113]="TITLE",l[l.TR=114]="TR",l[l.TRACK=115]="TRACK",l[l.TT=116]="TT",l[l.U=117]="U",l[l.UL=118]="UL",l[l.SVG=119]="SVG",l[l.VAR=120]="VAR",l[l.WBR=121]="WBR",l[l.XMP=122]="XMP";const c=new Map([[o.A,s.A],[o.ADDRESS,s.ADDRESS],[o.ANNOTATION_XML,s.ANNOTATION_XML],[o.APPLET,s.APPLET],[o.AREA,s.AREA],[o.ARTICLE,s.ARTICLE],[o.ASIDE,s.ASIDE],[o.B,s.B],[o.BASE,s.BASE],[o.BASEFONT,s.BASEFONT],[o.BGSOUND,s.BGSOUND],[o.BIG,s.BIG],[o.BLOCKQUOTE,s.BLOCKQUOTE],[o.BODY,s.BODY],[o.BR,s.BR],[o.BUTTON,s.BUTTON],[o.CAPTION,s.CAPTION],[o.CENTER,s.CENTER],[o.CODE,s.CODE],[o.COL,s.COL],[o.COLGROUP,s.COLGROUP],[o.DD,s.DD],[o.DESC,s.DESC],[o.DETAILS,s.DETAILS],[o.DIALOG,s.DIALOG],[o.DIR,s.DIR],[o.DIV,s.DIV],[o.DL,s.DL],[o.DT,s.DT],[o.EM,s.EM],[o.EMBED,s.EMBED],[o.FIELDSET,s.FIELDSET],[o.FIGCAPTION,s.FIGCAPTION],[o.FIGURE,s.FIGURE],[o.FONT,s.FONT],[o.FOOTER,s.FOOTER],[o.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[o.FORM,s.FORM],[o.FRAME,s.FRAME],[o.FRAMESET,s.FRAMESET],[o.H1,s.H1],[o.H2,s.H2],[o.H3,s.H3],[o.H4,s.H4],[o.H5,s.H5],[o.H6,s.H6],[o.HEAD,s.HEAD],[o.HEADER,s.HEADER],[o.HGROUP,s.HGROUP],[o.HR,s.HR],[o.HTML,s.HTML],[o.I,s.I],[o.IMG,s.IMG],[o.IMAGE,s.IMAGE],[o.INPUT,s.INPUT],[o.IFRAME,s.IFRAME],[o.KEYGEN,s.KEYGEN],[o.LABEL,s.LABEL],[o.LI,s.LI],[o.LINK,s.LINK],[o.LISTING,s.LISTING],[o.MAIN,s.MAIN],[o.MALIGNMARK,s.MALIGNMARK],[o.MARQUEE,s.MARQUEE],[o.MATH,s.MATH],[o.MENU,s.MENU],[o.META,s.META],[o.MGLYPH,s.MGLYPH],[o.MI,s.MI],[o.MO,s.MO],[o.MN,s.MN],[o.MS,s.MS],[o.MTEXT,s.MTEXT],[o.NAV,s.NAV],[o.NOBR,s.NOBR],[o.NOFRAMES,s.NOFRAMES],[o.NOEMBED,s.NOEMBED],[o.NOSCRIPT,s.NOSCRIPT],[o.OBJECT,s.OBJECT],[o.OL,s.OL],[o.OPTGROUP,s.OPTGROUP],[o.OPTION,s.OPTION],[o.P,s.P],[o.PARAM,s.PARAM],[o.PLAINTEXT,s.PLAINTEXT],[o.PRE,s.PRE],[o.RB,s.RB],[o.RP,s.RP],[o.RT,s.RT],[o.RTC,s.RTC],[o.RUBY,s.RUBY],[o.S,s.S],[o.SCRIPT,s.SCRIPT],[o.SECTION,s.SECTION],[o.SELECT,s.SELECT],[o.SOURCE,s.SOURCE],[o.SMALL,s.SMALL],[o.SPAN,s.SPAN],[o.STRIKE,s.STRIKE],[o.STRONG,s.STRONG],[o.STYLE,s.STYLE],[o.SUB,s.SUB],[o.SUMMARY,s.SUMMARY],[o.SUP,s.SUP],[o.TABLE,s.TABLE],[o.TBODY,s.TBODY],[o.TEMPLATE,s.TEMPLATE],[o.TEXTAREA,s.TEXTAREA],[o.TFOOT,s.TFOOT],[o.TD,s.TD],[o.TH,s.TH],[o.THEAD,s.THEAD],[o.TITLE,s.TITLE],[o.TR,s.TR],[o.TRACK,s.TRACK],[o.TT,s.TT],[o.U,s.U],[o.UL,s.UL],[o.SVG,s.SVG],[o.VAR,s.VAR],[o.WBR,s.WBR],[o.XMP,s.XMP]]);e.getTagID=function(e){var t;return null!==(t=c.get(e))&&void 0!==t?t:s.UNKNOWN};const u=s;e.SPECIAL_ELEMENTS={[t.HTML]:new Set([u.ADDRESS,u.APPLET,u.AREA,u.ARTICLE,u.ASIDE,u.BASE,u.BASEFONT,u.BGSOUND,u.BLOCKQUOTE,u.BODY,u.BR,u.BUTTON,u.CAPTION,u.CENTER,u.COL,u.COLGROUP,u.DD,u.DETAILS,u.DIR,u.DIV,u.DL,u.DT,u.EMBED,u.FIELDSET,u.FIGCAPTION,u.FIGURE,u.FOOTER,u.FORM,u.FRAME,u.FRAMESET,u.H1,u.H2,u.H3,u.H4,u.H5,u.H6,u.HEAD,u.HEADER,u.HGROUP,u.HR,u.HTML,u.IFRAME,u.IMG,u.INPUT,u.LI,u.LINK,u.LISTING,u.MAIN,u.MARQUEE,u.MENU,u.META,u.NAV,u.NOEMBED,u.NOFRAMES,u.NOSCRIPT,u.OBJECT,u.OL,u.P,u.PARAM,u.PLAINTEXT,u.PRE,u.SCRIPT,u.SECTION,u.SELECT,u.SOURCE,u.STYLE,u.SUMMARY,u.TABLE,u.TBODY,u.TD,u.TEMPLATE,u.TEXTAREA,u.TFOOT,u.TH,u.THEAD,u.TITLE,u.TR,u.TRACK,u.UL,u.WBR,u.XMP]),[t.MATHML]:new Set([u.MI,u.MO,u.MN,u.MS,u.MTEXT,u.ANNOTATION_XML]),[t.SVG]:new Set([u.TITLE,u.FOREIGN_OBJECT,u.DESC]),[t.XLINK]:new Set,[t.XML]:new Set,[t.XMLNS]:new Set},e.isNumberedHeader=function(e){return e===u.H1||e===u.H2||e===u.H3||e===u.H4||e===u.H5||e===u.H6};const h=new Set([o.STYLE,o.SCRIPT,o.XMP,o.IFRAME,o.NOEMBED,o.NOFRAMES,o.PLAINTEXT]);e.hasUnescapedText=function(e,t){return h.has(e)||t&&e===o.NOSCRIPT}})(vO),Object.defineProperty(lO,"__esModule",{value:!0}),lO.Tokenizer=lO.TokenizerMode=void 0;const yO=cO,TO=uO,_O=bO,EO=$S,xO=pO,wO=vO,SO=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var kO,AO;function CO(e){return e>=TO.CODE_POINTS.DIGIT_0&&e<=TO.CODE_POINTS.DIGIT_9}function IO(e){return e>=TO.CODE_POINTS.LATIN_CAPITAL_A&&e<=TO.CODE_POINTS.LATIN_CAPITAL_Z}function OO(e){return function(e){return e>=TO.CODE_POINTS.LATIN_SMALL_A&&e<=TO.CODE_POINTS.LATIN_SMALL_Z}(e)||IO(e)}function DO(e){return OO(e)||CO(e)}function PO(e){return e>=TO.CODE_POINTS.LATIN_CAPITAL_A&&e<=TO.CODE_POINTS.LATIN_CAPITAL_F}function NO(e){return e>=TO.CODE_POINTS.LATIN_SMALL_A&&e<=TO.CODE_POINTS.LATIN_SMALL_F}function RO(e){return e+32}function MO(e){return e===TO.CODE_POINTS.SPACE||e===TO.CODE_POINTS.LINE_FEED||e===TO.CODE_POINTS.TABULATION||e===TO.CODE_POINTS.FORM_FEED}function LO(e){return MO(e)||e===TO.CODE_POINTS.SOLIDUS||e===TO.CODE_POINTS.GREATER_THAN_SIGN}(AO=kO||(kO={}))[AO.DATA=0]="DATA",AO[AO.RCDATA=1]="RCDATA",AO[AO.RAWTEXT=2]="RAWTEXT",AO[AO.SCRIPT_DATA=3]="SCRIPT_DATA",AO[AO.PLAINTEXT=4]="PLAINTEXT",AO[AO.TAG_OPEN=5]="TAG_OPEN",AO[AO.END_TAG_OPEN=6]="END_TAG_OPEN",AO[AO.TAG_NAME=7]="TAG_NAME",AO[AO.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",AO[AO.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",AO[AO.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",AO[AO.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",AO[AO.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",AO[AO.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",AO[AO.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",AO[AO.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",AO[AO.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",AO[AO.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",AO[AO.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",AO[AO.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",AO[AO.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",AO[AO.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",AO[AO.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",AO[AO.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",AO[AO.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",AO[AO.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",AO[AO.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",AO[AO.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",AO[AO.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",AO[AO.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",AO[AO.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",AO[AO.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",AO[AO.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",AO[AO.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",AO[AO.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",AO[AO.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",AO[AO.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",AO[AO.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",AO[AO.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",AO[AO.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",AO[AO.BOGUS_COMMENT=40]="BOGUS_COMMENT",AO[AO.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",AO[AO.COMMENT_START=42]="COMMENT_START",AO[AO.COMMENT_START_DASH=43]="COMMENT_START_DASH",AO[AO.COMMENT=44]="COMMENT",AO[AO.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",AO[AO.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",AO[AO.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",AO[AO.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",AO[AO.COMMENT_END_DASH=49]="COMMENT_END_DASH",AO[AO.COMMENT_END=50]="COMMENT_END",AO[AO.COMMENT_END_BANG=51]="COMMENT_END_BANG",AO[AO.DOCTYPE=52]="DOCTYPE",AO[AO.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",AO[AO.DOCTYPE_NAME=54]="DOCTYPE_NAME",AO[AO.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",AO[AO.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",AO[AO.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",AO[AO.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",AO[AO.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",AO[AO.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",AO[AO.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",AO[AO.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",AO[AO.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",AO[AO.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",AO[AO.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",AO[AO.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",AO[AO.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",AO[AO.CDATA_SECTION=68]="CDATA_SECTION",AO[AO.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",AO[AO.CDATA_SECTION_END=70]="CDATA_SECTION_END",AO[AO.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",AO[AO.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",AO[AO.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",AO[AO.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",AO[AO.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",AO[AO.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",AO[AO.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",AO[AO.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END",lO.TokenizerMode={DATA:kO.DATA,RCDATA:kO.RCDATA,RAWTEXT:kO.RAWTEXT,SCRIPT_DATA:kO.SCRIPT_DATA,PLAINTEXT:kO.PLAINTEXT,CDATA_SECTION:kO.CDATA_SECTION};let BO=function(){function e(t,n){d(this,e),this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=kO.DATA,this.returnState=kO.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yO.Preprocessor(n),this.currentLocation=this.getCurrentLocation(-1)}return f(e,[{key:"_err",value:function(e){var t,n;null===(n=(t=this.handler).onParseError)||void 0===n||n.call(t,this.preprocessor.getError(e))}},{key:"getCurrentLocation",value:function(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}},{key:"_runParsingLoop",value:function(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}},{key:"write",value:function(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}},{key:"_ensureHibernation",value:function(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}},{key:"_reconsumeInState",value:function(e,t){this.state=e,this._callState(t)}},{key:"_advanceBy",value:function(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(xO.ERR.endTagWithAttributes),e.selfClosing&&this._err(xO.ERR.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}},{key:"emitCurrentComment",value:function(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}},{key:"emitCurrentDoctype",value:function(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}},{key:"_emitCurrentCharacterToken",value:function(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case _O.TokenType.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case _O.TokenType.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case _O.TokenType.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}},{key:"_emitEOFToken",value:function(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:_O.TokenType.EOF,location:e}),this.active=!1}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(e){const t=MO(e)?_O.TokenType.WHITESPACE_CHARACTER:e===TO.CODE_POINTS.NULL?_O.TokenType.NULL_CHARACTER:_O.TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}},{key:"_emitChars",value:function(e){this._appendCharToCurrentCharacterToken(_O.TokenType.CHARACTER,e)}},{key:"_matchNamedCharacterReference",value:function(e){let t=null,n=0,r=!1;for(let o=0,a=EO.htmlDecodeTree[0];o>=0&&(o=(0,EO.determineBranch)(EO.htmlDecodeTree,a,o+1,e),!(o<0));e=this._consume()){n+=1,a=EO.htmlDecodeTree[o];const s=a&EO.BinTrieFlags.VALUE_LENGTH;if(s){const a=(s>>14)-1;if(e!==TO.CODE_POINTS.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((i=this.preprocessor.peek(1))===TO.CODE_POINTS.EQUALS_SIGN||DO(i))?(t=[TO.CODE_POINTS.AMPERSAND],o+=a):(t=0===a?[EO.htmlDecodeTree[o]&~EO.BinTrieFlags.VALUE_LENGTH]:1===a?[EO.htmlDecodeTree[++o]]:[EO.htmlDecodeTree[++o],EO.htmlDecodeTree[++o]],n=0,r=e!==TO.CODE_POINTS.SEMICOLON),0===a){this._consume();break}}}var i;return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(xO.ERR.missingSemicolonAfterCharacterReference),this._unconsume(1),t}},{key:"_isCharacterReferenceInAttribute",value:function(){return this.returnState===kO.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===kO.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===kO.ATTRIBUTE_VALUE_UNQUOTED}},{key:"_flushCodePointConsumedAsCharacterReference",value:function(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}},{key:"_callState",value:function(e){switch(this.state){case kO.DATA:this._stateData(e);break;case kO.RCDATA:this._stateRcdata(e);break;case kO.RAWTEXT:this._stateRawtext(e);break;case kO.SCRIPT_DATA:this._stateScriptData(e);break;case kO.PLAINTEXT:this._statePlaintext(e);break;case kO.TAG_OPEN:this._stateTagOpen(e);break;case kO.END_TAG_OPEN:this._stateEndTagOpen(e);break;case kO.TAG_NAME:this._stateTagName(e);break;case kO.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case kO.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case kO.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case kO.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case kO.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case kO.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case kO.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case kO.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case kO.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case kO.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case kO.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case kO.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case kO.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case kO.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case kO.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case kO.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case kO.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case kO.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case kO.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case kO.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case kO.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case kO.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case kO.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case kO.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case kO.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case kO.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case kO.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case kO.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case kO.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case kO.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case kO.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case kO.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case kO.BOGUS_COMMENT:this._stateBogusComment(e);break;case kO.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case kO.COMMENT_START:this._stateCommentStart(e);break;case kO.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case kO.COMMENT:this._stateComment(e);break;case kO.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case kO.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case kO.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case kO.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case kO.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case kO.COMMENT_END:this._stateCommentEnd(e);break;case kO.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case kO.DOCTYPE:this._stateDoctype(e);break;case kO.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case kO.DOCTYPE_NAME:this._stateDoctypeName(e);break;case kO.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case kO.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case kO.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case kO.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case kO.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case kO.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case kO.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case kO.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case kO.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case kO.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case kO.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case kO.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case kO.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case kO.CDATA_SECTION:this._stateCdataSection(e);break;case kO.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case kO.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case kO.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case kO.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case kO.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case kO.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case kO.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case kO.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case kO.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case kO.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}},{key:"_stateData",value:function(e){switch(e){case TO.CODE_POINTS.LESS_THAN_SIGN:this.state=kO.TAG_OPEN;break;case TO.CODE_POINTS.AMPERSAND:this.returnState=kO.DATA,this.state=kO.CHARACTER_REFERENCE;break;case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this._emitCodePoint(e);break;case TO.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateRcdata",value:function(e){switch(e){case TO.CODE_POINTS.AMPERSAND:this.returnState=kO.RCDATA,this.state=kO.CHARACTER_REFERENCE;break;case TO.CODE_POINTS.LESS_THAN_SIGN:this.state=kO.RCDATA_LESS_THAN_SIGN;break;case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this._emitChars(TO.REPLACEMENT_CHARACTER);break;case TO.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateRawtext",value:function(e){switch(e){case TO.CODE_POINTS.LESS_THAN_SIGN:this.state=kO.RAWTEXT_LESS_THAN_SIGN;break;case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this._emitChars(TO.REPLACEMENT_CHARACTER);break;case TO.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateScriptData",value:function(e){switch(e){case TO.CODE_POINTS.LESS_THAN_SIGN:this.state=kO.SCRIPT_DATA_LESS_THAN_SIGN;break;case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this._emitChars(TO.REPLACEMENT_CHARACTER);break;case TO.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_statePlaintext",value:function(e){switch(e){case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this._emitChars(TO.REPLACEMENT_CHARACTER);break;case TO.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateTagOpen",value:function(e){if(OO(e))this._createStartTagToken(),this.state=kO.TAG_NAME,this._stateTagName(e);else switch(e){case TO.CODE_POINTS.EXCLAMATION_MARK:this.state=kO.MARKUP_DECLARATION_OPEN;break;case TO.CODE_POINTS.SOLIDUS:this.state=kO.END_TAG_OPEN;break;case TO.CODE_POINTS.QUESTION_MARK:this._err(xO.ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=kO.BOGUS_COMMENT,this._stateBogusComment(e);break;case TO.CODE_POINTS.EOF:this._err(xO.ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(xO.ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=kO.DATA,this._stateData(e)}}},{key:"_stateEndTagOpen",value:function(e){if(OO(e))this._createEndTagToken(),this.state=kO.TAG_NAME,this._stateTagName(e);else switch(e){case TO.CODE_POINTS.GREATER_THAN_SIGN:this._err(xO.ERR.missingEndTagName),this.state=kO.DATA;break;case TO.CODE_POINTS.EOF:this._err(xO.ERR.eofBeforeTagName),this._emitChars("");break;case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this.state=kO.SCRIPT_DATA_ESCAPED,this._emitChars(TO.REPLACEMENT_CHARACTER);break;case TO.CODE_POINTS.EOF:this._err(xO.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=kO.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}},{key:"_stateScriptDataEscapedLessThanSign",value:function(e){e===TO.CODE_POINTS.SOLIDUS?this.state=kO.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:OO(e)?(this._emitChars("<"),this.state=kO.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=kO.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}},{key:"_stateScriptDataEscapedEndTagOpen",value:function(e){OO(e)?(this.state=kO.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case TO.CODE_POINTS.NULL:this._err(xO.ERR.unexpectedNullCharacter),this.state=kO.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(TO.REPLACEMENT_CHARACTER);break;case TO.CODE_POINTS.EOF:this._err(xO.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=kO.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}},{key:"_stateScriptDataDoubleEscapedLessThanSign",value:function(e){e===TO.CODE_POINTS.SOLIDUS?(this.state=kO.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=kO.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}},{key:"_stateScriptDataDoubleEscapeEnd",value:function(e){if(this.preprocessor.startsWith(TO.SEQUENCES.SCRIPT,!1)&&LO(this.preprocessor.peek(TO.SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e1114111)this._err(xO.ERR.characterReferenceOutsideUnicodeRange),this.charRefCode=TO.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,TO.isSurrogate)(this.charRefCode))this._err(xO.ERR.surrogateCharacterReference),this.charRefCode=TO.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,TO.isUndefinedCodePoint)(this.charRefCode))this._err(xO.ERR.noncharacterCharacterReference);else if((0,TO.isControlCodePoint)(this.charRefCode)||this.charRefCode===TO.CODE_POINTS.CARRIAGE_RETURN){this._err(xO.ERR.controlCharacterReference);const e=SO.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}]),e}();lO.Tokenizer=BO;var FO={};Object.defineProperty(FO,"__esModule",{value:!0}),FO.OpenElementStack=void 0;const UO=vO,jO=new Set([UO.TAG_ID.DD,UO.TAG_ID.DT,UO.TAG_ID.LI,UO.TAG_ID.OPTGROUP,UO.TAG_ID.OPTION,UO.TAG_ID.P,UO.TAG_ID.RB,UO.TAG_ID.RP,UO.TAG_ID.RT,UO.TAG_ID.RTC]),HO=new Set([...jO,UO.TAG_ID.CAPTION,UO.TAG_ID.COLGROUP,UO.TAG_ID.TBODY,UO.TAG_ID.TD,UO.TAG_ID.TFOOT,UO.TAG_ID.TH,UO.TAG_ID.THEAD,UO.TAG_ID.TR]),GO=new Map([[UO.TAG_ID.APPLET,UO.NS.HTML],[UO.TAG_ID.CAPTION,UO.NS.HTML],[UO.TAG_ID.HTML,UO.NS.HTML],[UO.TAG_ID.MARQUEE,UO.NS.HTML],[UO.TAG_ID.OBJECT,UO.NS.HTML],[UO.TAG_ID.TABLE,UO.NS.HTML],[UO.TAG_ID.TD,UO.NS.HTML],[UO.TAG_ID.TEMPLATE,UO.NS.HTML],[UO.TAG_ID.TH,UO.NS.HTML],[UO.TAG_ID.ANNOTATION_XML,UO.NS.MATHML],[UO.TAG_ID.MI,UO.NS.MATHML],[UO.TAG_ID.MN,UO.NS.MATHML],[UO.TAG_ID.MO,UO.NS.MATHML],[UO.TAG_ID.MS,UO.NS.MATHML],[UO.TAG_ID.MTEXT,UO.NS.MATHML],[UO.TAG_ID.DESC,UO.NS.SVG],[UO.TAG_ID.FOREIGN_OBJECT,UO.NS.SVG],[UO.TAG_ID.TITLE,UO.NS.SVG]]),zO=[UO.TAG_ID.H1,UO.TAG_ID.H2,UO.TAG_ID.H3,UO.TAG_ID.H4,UO.TAG_ID.H5,UO.TAG_ID.H6],VO=[UO.TAG_ID.TR,UO.TAG_ID.TEMPLATE,UO.TAG_ID.HTML],WO=[UO.TAG_ID.TBODY,UO.TAG_ID.TFOOT,UO.TAG_ID.THEAD,UO.TAG_ID.TEMPLATE,UO.TAG_ID.HTML],XO=[UO.TAG_ID.TABLE,UO.TAG_ID.TEMPLATE,UO.TAG_ID.HTML],YO=[UO.TAG_ID.TD,UO.TAG_ID.TH];let qO=function(){function e(t,n,r){d(this,e),this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=UO.TAG_ID.UNKNOWN,this.current=t}return f(e,[{key:"currentTmplContentOrNode",get:function(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}},{key:"_indexOf",value:function(e){return this.items.lastIndexOf(e,this.stackTop)}},{key:"_isInTemplate",value:function(){return this.currentTagId===UO.TAG_ID.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===UO.NS.HTML}},{key:"_updateCurrentElement",value:function(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}},{key:"push",value:function(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}},{key:"pop",value:function(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}},{key:"replace",value:function(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}},{key:"insertAfter",value:function(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}},{key:"popUntilTagNamePopped",value:function(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==UO.NS.HTML);this.shortenToLength(t<0?0:t)}},{key:"shortenToLength",value:function(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}},{key:"clearBackTo",value:function(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}},{key:"clearBackToTableContext",value:function(){this.clearBackTo(XO,UO.NS.HTML)}},{key:"clearBackToTableBodyContext",value:function(){this.clearBackTo(WO,UO.NS.HTML)}},{key:"clearBackToTableRowContext",value:function(){this.clearBackTo(VO,UO.NS.HTML)}},{key:"remove",value:function(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}},{key:"tryPeekProperlyNestedBodyElement",value:function(){return this.stackTop>=1&&this.tagIDs[1]===UO.TAG_ID.BODY?this.items[1]:null}},{key:"contains",value:function(e){return this._indexOf(e)>-1}},{key:"getCommonAncestor",value:function(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}},{key:"isRootHtmlElementCurrent",value:function(){return 0===this.stackTop&&this.tagIDs[0]===UO.TAG_ID.HTML}},{key:"hasInScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===UO.NS.HTML)return!0;if(GO.get(n)===r)return!1}return!0}},{key:"hasNumberedHeaderInScope",value:function(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if((0,UO.isNumberedHeader)(t)&&n===UO.NS.HTML)return!0;if(GO.get(t)===n)return!1}return!0}},{key:"hasInListItemScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===UO.NS.HTML)return!0;if((n===UO.TAG_ID.UL||n===UO.TAG_ID.OL)&&r===UO.NS.HTML||GO.get(n)===r)return!1}return!0}},{key:"hasInButtonScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===UO.NS.HTML)return!0;if(n===UO.TAG_ID.BUTTON&&r===UO.NS.HTML||GO.get(n)===r)return!1}return!0}},{key:"hasInTableScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===UO.NS.HTML){if(n===e)return!0;if(n===UO.TAG_ID.TABLE||n===UO.TAG_ID.TEMPLATE||n===UO.TAG_ID.HTML)return!1}}return!0}},{key:"hasTableBodyContextInTableScope",value:function(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===UO.NS.HTML){if(t===UO.TAG_ID.TBODY||t===UO.TAG_ID.THEAD||t===UO.TAG_ID.TFOOT)return!0;if(t===UO.TAG_ID.TABLE||t===UO.TAG_ID.HTML)return!1}}return!0}},{key:"hasInSelectScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===UO.NS.HTML){if(n===e)return!0;if(n!==UO.TAG_ID.OPTION&&n!==UO.TAG_ID.OPTGROUP)return!1}}return!0}},{key:"generateImpliedEndTags",value:function(){for(;jO.has(this.currentTagId);)this.pop()}},{key:"generateImpliedEndTagsThoroughly",value:function(){for(;HO.has(this.currentTagId);)this.pop()}},{key:"generateImpliedEndTagsWithExclusion",value:function(e){for(;this.currentTagId!==e&&HO.has(this.currentTagId);)this.pop()}}]),e}();FO.OpenElementStack=qO;var $O={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingElementList=e.EntryType=void 0;var t,n;(n=t=e.EntryType||(e.EntryType={}))[n.Marker=0]="Marker",n[n.Element=1]="Element";const r={type:t.Marker};let i=function(){function e(t){d(this,e),this.treeAdapter=t,this.entries=[],this.bookmark=null}return f(e,[{key:"_getNoahArkConditionCandidates",value:function(e,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])));let i=0;for(let e=0;er.get(e.name)===e.value))&&(i+=1,i>=3&&this.entries.splice(t.idx,1))}}},{key:"insertMarker",value:function(){this.entries.unshift(r)}},{key:"pushElement",value:function(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:t.Element,element:e,token:n})}},{key:"insertElementAfterBookmark",value:function(e,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:t.Element,element:e,token:n})}},{key:"removeEntry",value:function(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}},{key:"clearToLastMarker",value:function(){const e=this.entries.indexOf(r);e>=0?this.entries.splice(0,e+1):this.entries.length=0}},{key:"getElementEntryInScopeWithTagName",value:function(e){const n=this.entries.find((n=>n.type===t.Marker||this.treeAdapter.getTagName(n.element)===e));return n&&n.type===t.Element?n:null}},{key:"getElementEntry",value:function(e){return this.entries.find((n=>n.type===t.Element&&n.element===e))}}]),e}();e.FormattingElementList=i}($O);var KO={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTreeAdapter=void 0;const t=vO;function n(e){return{nodeName:"#text",value:e,parentNode:null}}e.defaultTreeAdapter={createDocument:()=>({nodeName:"#document",mode:t.DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(t,n,r,i){const o=t.childNodes.find((e=>"#documentType"===e.nodeName));if(o)o.name=n,o.publicId=r,o.systemId=i;else{const o={nodeName:"#documentType",name:n,publicId:r,systemId:i,parentNode:null};e.defaultTreeAdapter.appendChild(t,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(t,r){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(e.defaultTreeAdapter.isTextNode(n))return void(n.value+=r)}e.defaultTreeAdapter.appendChild(t,n(r))},insertTextBefore(t,r,i){const o=t.childNodes[t.childNodes.indexOf(i)-1];o&&e.defaultTreeAdapter.isTextNode(o)?o.value+=r:e.defaultTreeAdapter.insertBefore(t,n(r),i)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;re.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}}(KO);var QO={};Object.defineProperty(QO,"__esModule",{value:!0}),QO.getDocumentMode=QO.isConforming=void 0;const ZO=vO,JO="html",eD=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],tD=[...eD,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],nD=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),rD=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],iD=[...rD,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function oD(e,t){return t.some((t=>e.startsWith(t)))}QO.isConforming=function(e){return e.name===JO&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},QO.getDocumentMode=function(e){if(e.name!==JO)return ZO.DOCUMENT_MODE.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return ZO.DOCUMENT_MODE.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),nD.has(n))return ZO.DOCUMENT_MODE.QUIRKS;let e=null===t?tD:eD;if(oD(n,e))return ZO.DOCUMENT_MODE.QUIRKS;if(e=null===t?rD:iD,oD(n,e))return ZO.DOCUMENT_MODE.LIMITED_QUIRKS}return ZO.DOCUMENT_MODE.NO_QUIRKS};var aD={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIntegrationPoint=e.adjustTokenSVGTagName=e.adjustTokenXMLAttrs=e.adjustTokenSVGAttrs=e.adjustTokenMathMLAttrs=e.causesExit=e.SVG_TAG_NAMES_ADJUSTMENT_MAP=void 0;const t=vO,n={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},r=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),i=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:t.NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:t.NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:t.NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:t.NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:t.NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:t.NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:t.NS.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:t.NS.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:t.NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:t.NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:t.NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:t.NS.XMLNS}]]);e.SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e])));const o=new Set([t.TAG_ID.B,t.TAG_ID.BIG,t.TAG_ID.BLOCKQUOTE,t.TAG_ID.BODY,t.TAG_ID.BR,t.TAG_ID.CENTER,t.TAG_ID.CODE,t.TAG_ID.DD,t.TAG_ID.DIV,t.TAG_ID.DL,t.TAG_ID.DT,t.TAG_ID.EM,t.TAG_ID.EMBED,t.TAG_ID.H1,t.TAG_ID.H2,t.TAG_ID.H3,t.TAG_ID.H4,t.TAG_ID.H5,t.TAG_ID.H6,t.TAG_ID.HEAD,t.TAG_ID.HR,t.TAG_ID.I,t.TAG_ID.IMG,t.TAG_ID.LI,t.TAG_ID.LISTING,t.TAG_ID.MENU,t.TAG_ID.META,t.TAG_ID.NOBR,t.TAG_ID.OL,t.TAG_ID.P,t.TAG_ID.PRE,t.TAG_ID.RUBY,t.TAG_ID.S,t.TAG_ID.SMALL,t.TAG_ID.SPAN,t.TAG_ID.STRONG,t.TAG_ID.STRIKE,t.TAG_ID.SUB,t.TAG_ID.SUP,t.TAG_ID.TABLE,t.TAG_ID.TT,t.TAG_ID.U,t.TAG_ID.UL,t.TAG_ID.VAR]);e.causesExit=function(e){const n=e.tagID;return n===t.TAG_ID.FONT&&e.attrs.some((({name:e})=>e===t.ATTRS.COLOR||e===t.ATTRS.SIZE||e===t.ATTRS.FACE))||o.has(n)},e.adjustTokenMathMLAttrs=function(e){for(let t=0;t0&&this._setContextModes(e,t)}},{key:"onItemPop",value:function(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}},{key:"_setContextModes",value:function(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===mD.NS.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}},{key:"_switchToTextParsing",value:function(e,t){this._insertElement(e,mD.NS.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=TD.TEXT}},{key:"switchToPlaintextParsing",value:function(){this.insertionMode=TD.TEXT,this.originalInsertionMode=TD.IN_BODY,this.tokenizer.state=sD.TokenizerMode.PLAINTEXT}},{key:"_getAdjustedCurrentElement",value:function(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}},{key:"_findFormInFragmentContext",value:function(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===mD.TAG_NAMES.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}},{key:"_initTokenizerForFragmentParsing",value:function(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===mD.NS.HTML)switch(this.fragmentContextID){case mD.TAG_ID.TITLE:case mD.TAG_ID.TEXTAREA:this.tokenizer.state=sD.TokenizerMode.RCDATA;break;case mD.TAG_ID.STYLE:case mD.TAG_ID.XMP:case mD.TAG_ID.IFRAME:case mD.TAG_ID.NOEMBED:case mD.TAG_ID.NOFRAMES:case mD.TAG_ID.NOSCRIPT:this.tokenizer.state=sD.TokenizerMode.RAWTEXT;break;case mD.TAG_ID.SCRIPT:this.tokenizer.state=sD.TokenizerMode.SCRIPT_DATA;break;case mD.TAG_ID.PLAINTEXT:this.tokenizer.state=sD.TokenizerMode.PLAINTEXT}}},{key:"_setDocumentType",value:function(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}},{key:"_attachElementToTree",value:function(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&Object.assign(Object.assign({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}},{key:"_appendElement",value:function(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}},{key:"_insertElement",value:function(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}},{key:"_insertFakeElement",value:function(e,t){const n=this.treeAdapter.createElement(e,mD.NS.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}},{key:"_insertTemplate",value:function(e){const t=this.treeAdapter.createElement(e.tagName,mD.NS.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}},{key:"_insertFakeRootElement",value:function(){const e=this.treeAdapter.createElement(mD.TAG_NAMES.HTML,mD.NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,mD.TAG_ID.HTML)}},{key:"_appendCommentNode",value:function(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}},{key:"_insertCharacters",value:function(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,o=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}},{key:"_adoptNodes",value:function(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}},{key:"_setEndLocation",value:function(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===gD.TokenType.END_TAG&&r===t.tagName?{endTag:Object.assign({},n),endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}},{key:"shouldProcessStartTagTokenInForeignContent",value:function(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==mD.TAG_ID.SVG||this.treeAdapter.getTagName(t)!==mD.TAG_NAMES.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==mD.NS.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===mD.TAG_ID.MGLYPH||e.tagID===mD.TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(n,t,mD.NS.HTML))}},{key:"_processToken",value:function(e){switch(e.type){case gD.TokenType.CHARACTER:this.onCharacter(e);break;case gD.TokenType.NULL_CHARACTER:this.onNullCharacter(e);break;case gD.TokenType.COMMENT:this.onComment(e);break;case gD.TokenType.DOCTYPE:this.onDoctype(e);break;case gD.TokenType.START_TAG:this._processStartTag(e);break;case gD.TokenType.END_TAG:this.onEndTag(e);break;case gD.TokenType.EOF:this.onEof(e);break;case gD.TokenType.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}},{key:"_isIntegrationPoint",value:function(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return dD.isIntegrationPoint(e,r,i,n)}},{key:"_reconstructActiveFormattingElements",value:function(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===cD.EntryType.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}},{key:"_closeTableCell",value:function(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=TD.IN_ROW}},{key:"_closePElement",value:function(){this.openElements.generateImpliedEndTagsWithExclusion(mD.TAG_ID.P),this.openElements.popUntilTagNamePopped(mD.TAG_ID.P)}},{key:"_resetInsertionMode",value:function(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case mD.TAG_ID.TR:return void(this.insertionMode=TD.IN_ROW);case mD.TAG_ID.TBODY:case mD.TAG_ID.THEAD:case mD.TAG_ID.TFOOT:return void(this.insertionMode=TD.IN_TABLE_BODY);case mD.TAG_ID.CAPTION:return void(this.insertionMode=TD.IN_CAPTION);case mD.TAG_ID.COLGROUP:return void(this.insertionMode=TD.IN_COLUMN_GROUP);case mD.TAG_ID.TABLE:return void(this.insertionMode=TD.IN_TABLE);case mD.TAG_ID.BODY:return void(this.insertionMode=TD.IN_BODY);case mD.TAG_ID.FRAMESET:return void(this.insertionMode=TD.IN_FRAMESET);case mD.TAG_ID.SELECT:return void this._resetInsertionModeForSelect(e);case mD.TAG_ID.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case mD.TAG_ID.HTML:return void(this.insertionMode=this.headElement?TD.AFTER_HEAD:TD.BEFORE_HEAD);case mD.TAG_ID.TD:case mD.TAG_ID.TH:if(e>0)return void(this.insertionMode=TD.IN_CELL);break;case mD.TAG_ID.HEAD:if(e>0)return void(this.insertionMode=TD.IN_HEAD)}this.insertionMode=TD.IN_BODY}},{key:"_resetInsertionModeForSelect",value:function(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===mD.TAG_ID.TEMPLATE)break;if(e===mD.TAG_ID.TABLE)return void(this.insertionMode=TD.IN_SELECT_IN_TABLE)}this.insertionMode=TD.IN_SELECT}},{key:"_isElementCausesFosterParenting",value:function(e){return xD.has(e)}},{key:"_shouldFosterParentOnInsertion",value:function(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}},{key:"_findFosterParentingLocation",value:function(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case mD.TAG_ID.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===mD.NS.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case mD.TAG_ID.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}},{key:"_fosterParentElement",value:function(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}},{key:"_isSpecialElement",value:function(e,t){const n=this.treeAdapter.getNamespaceURI(e);return mD.SPECIAL_ELEMENTS[n].has(t)}},{key:"onCharacter",value:function(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case TD.INITIAL:MD(this,e);break;case TD.BEFORE_HTML:LD(this,e);break;case TD.BEFORE_HEAD:BD(this,e);break;case TD.IN_HEAD:jD(this,e);break;case TD.IN_HEAD_NO_SCRIPT:HD(this,e);break;case TD.AFTER_HEAD:GD(this,e);break;case TD.IN_BODY:case TD.IN_CAPTION:case TD.IN_CELL:case TD.IN_TEMPLATE:WD(this,e);break;case TD.TEXT:case TD.IN_SELECT:case TD.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case TD.IN_TABLE:case TD.IN_TABLE_BODY:case TD.IN_ROW:eP(this,e);break;case TD.IN_TABLE_TEXT:oP(this,e);break;case TD.IN_COLUMN_GROUP:cP(this,e);break;case TD.AFTER_BODY:vP(this,e);break;case TD.AFTER_AFTER_BODY:yP(this,e)}}},{key:"onNullCharacter",value:function(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=fD.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case TD.INITIAL:MD(this,e);break;case TD.BEFORE_HTML:LD(this,e);break;case TD.BEFORE_HEAD:BD(this,e);break;case TD.IN_HEAD:jD(this,e);break;case TD.IN_HEAD_NO_SCRIPT:HD(this,e);break;case TD.AFTER_HEAD:GD(this,e);break;case TD.TEXT:this._insertCharacters(e);break;case TD.IN_TABLE:case TD.IN_TABLE_BODY:case TD.IN_ROW:eP(this,e);break;case TD.IN_COLUMN_GROUP:cP(this,e);break;case TD.AFTER_BODY:vP(this,e);break;case TD.AFTER_AFTER_BODY:yP(this,e)}}},{key:"onComment",value:function(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)ND(this,e);else switch(this.insertionMode){case TD.INITIAL:case TD.BEFORE_HTML:case TD.BEFORE_HEAD:case TD.IN_HEAD:case TD.IN_HEAD_NO_SCRIPT:case TD.AFTER_HEAD:case TD.IN_BODY:case TD.IN_TABLE:case TD.IN_CAPTION:case TD.IN_COLUMN_GROUP:case TD.IN_TABLE_BODY:case TD.IN_ROW:case TD.IN_CELL:case TD.IN_SELECT:case TD.IN_SELECT_IN_TABLE:case TD.IN_TEMPLATE:case TD.IN_FRAMESET:case TD.AFTER_FRAMESET:ND(this,e);break;case TD.IN_TABLE_TEXT:aP(this,e);break;case TD.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case TD.AFTER_AFTER_BODY:case TD.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}},{key:"onDoctype",value:function(e){switch(this.skipNextNewLine=!1,this.insertionMode){case TD.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?mD.DOCUMENT_MODE.QUIRKS:hD.getDocumentMode(t);hD.isConforming(t)||e._err(t,pD.ERR.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=TD.BEFORE_HTML}(this,e);break;case TD.BEFORE_HEAD:case TD.IN_HEAD:case TD.IN_HEAD_NO_SCRIPT:case TD.AFTER_HEAD:this._err(e,pD.ERR.misplacedDoctype);break;case TD.IN_TABLE_TEXT:aP(this,e)}}},{key:"onStartTag",value:function(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,pD.ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}},{key:"_processStartTag",value:function(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(dD.causesExit(t))TP(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===mD.NS.MATHML?dD.adjustTokenMathMLAttrs(t):r===mD.NS.SVG&&(dD.adjustTokenSVGTagName(t),dD.adjustTokenSVGAttrs(t)),dD.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}},{key:"_startTagOutsideForeignContent",value:function(e){switch(this.insertionMode){case TD.INITIAL:MD(this,e);break;case TD.BEFORE_HTML:!function(e,t){t.tagID===mD.TAG_ID.HTML?(e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.BEFORE_HEAD):LD(e,t)}(this,e);break;case TD.BEFORE_HEAD:!function(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.HEAD:e._insertElement(t,mD.NS.HTML),e.headElement=e.openElements.current,e.insertionMode=TD.IN_HEAD;break;default:BD(e,t)}}(this,e);break;case TD.IN_HEAD:FD(this,e);break;case TD.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.BASEFONT:case mD.TAG_ID.BGSOUND:case mD.TAG_ID.HEAD:case mD.TAG_ID.LINK:case mD.TAG_ID.META:case mD.TAG_ID.NOFRAMES:case mD.TAG_ID.STYLE:FD(e,t);break;case mD.TAG_ID.NOSCRIPT:e._err(t,pD.ERR.nestedNoscriptInHead);break;default:HD(e,t)}}(this,e);break;case TD.AFTER_HEAD:!function(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.BODY:e._insertElement(t,mD.NS.HTML),e.framesetOk=!1,e.insertionMode=TD.IN_BODY;break;case mD.TAG_ID.FRAMESET:e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.IN_FRAMESET;break;case mD.TAG_ID.BASE:case mD.TAG_ID.BASEFONT:case mD.TAG_ID.BGSOUND:case mD.TAG_ID.LINK:case mD.TAG_ID.META:case mD.TAG_ID.NOFRAMES:case mD.TAG_ID.SCRIPT:case mD.TAG_ID.STYLE:case mD.TAG_ID.TEMPLATE:case mD.TAG_ID.TITLE:e._err(t,pD.ERR.abandonedHeadElementChild),e.openElements.push(e.headElement,mD.TAG_ID.HEAD),FD(e,t),e.openElements.remove(e.headElement);break;case mD.TAG_ID.HEAD:e._err(t,pD.ERR.misplacedStartTagForHeadElement);break;default:GD(e,t)}}(this,e);break;case TD.IN_BODY:KD(this,e);break;case TD.IN_TABLE:tP(this,e);break;case TD.IN_TABLE_TEXT:aP(this,e);break;case TD.IN_CAPTION:!function(e,t){const n=t.tagID;sP.has(n)?e.openElements.hasInTableScope(mD.TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(mD.TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=TD.IN_TABLE,tP(e,t)):KD(e,t)}(this,e);break;case TD.IN_COLUMN_GROUP:lP(this,e);break;case TD.IN_TABLE_BODY:uP(this,e);break;case TD.IN_ROW:dP(this,e);break;case TD.IN_CELL:!function(e,t){const n=t.tagID;sP.has(n)?(e.openElements.hasInTableScope(mD.TAG_ID.TD)||e.openElements.hasInTableScope(mD.TAG_ID.TH))&&(e._closeTableCell(),dP(e,t)):KD(e,t)}(this,e);break;case TD.IN_SELECT:fP(this,e);break;case TD.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===mD.TAG_ID.CAPTION||n===mD.TAG_ID.TABLE||n===mD.TAG_ID.TBODY||n===mD.TAG_ID.TFOOT||n===mD.TAG_ID.THEAD||n===mD.TAG_ID.TR||n===mD.TAG_ID.TD||n===mD.TAG_ID.TH?(e.openElements.popUntilTagNamePopped(mD.TAG_ID.SELECT),e._resetInsertionMode(),e._processStartTag(t)):fP(e,t)}(this,e);break;case TD.IN_TEMPLATE:!function(e,t){switch(t.tagID){case mD.TAG_ID.BASE:case mD.TAG_ID.BASEFONT:case mD.TAG_ID.BGSOUND:case mD.TAG_ID.LINK:case mD.TAG_ID.META:case mD.TAG_ID.NOFRAMES:case mD.TAG_ID.SCRIPT:case mD.TAG_ID.STYLE:case mD.TAG_ID.TEMPLATE:case mD.TAG_ID.TITLE:FD(e,t);break;case mD.TAG_ID.CAPTION:case mD.TAG_ID.COLGROUP:case mD.TAG_ID.TBODY:case mD.TAG_ID.TFOOT:case mD.TAG_ID.THEAD:e.tmplInsertionModeStack[0]=TD.IN_TABLE,e.insertionMode=TD.IN_TABLE,tP(e,t);break;case mD.TAG_ID.COL:e.tmplInsertionModeStack[0]=TD.IN_COLUMN_GROUP,e.insertionMode=TD.IN_COLUMN_GROUP,lP(e,t);break;case mD.TAG_ID.TR:e.tmplInsertionModeStack[0]=TD.IN_TABLE_BODY,e.insertionMode=TD.IN_TABLE_BODY,uP(e,t);break;case mD.TAG_ID.TD:case mD.TAG_ID.TH:e.tmplInsertionModeStack[0]=TD.IN_ROW,e.insertionMode=TD.IN_ROW,dP(e,t);break;default:e.tmplInsertionModeStack[0]=TD.IN_BODY,e.insertionMode=TD.IN_BODY,KD(e,t)}}(this,e);break;case TD.AFTER_BODY:!function(e,t){t.tagID===mD.TAG_ID.HTML?KD(e,t):vP(e,t)}(this,e);break;case TD.IN_FRAMESET:!function(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.FRAMESET:e._insertElement(t,mD.NS.HTML);break;case mD.TAG_ID.FRAME:e._appendElement(t,mD.NS.HTML),t.ackSelfClosing=!0;break;case mD.TAG_ID.NOFRAMES:FD(e,t)}}(this,e);break;case TD.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.NOFRAMES:FD(e,t)}}(this,e);break;case TD.AFTER_AFTER_BODY:!function(e,t){t.tagID===mD.TAG_ID.HTML?KD(e,t):yP(e,t)}(this,e);break;case TD.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.NOFRAMES:FD(e,t)}}(this,e)}}},{key:"onEndTag",value:function(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===mD.TAG_ID.P||t.tagID===mD.TAG_ID.BR)return TP(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===mD.NS.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}},{key:"_endTagOutsideForeignContent",value:function(e){switch(this.insertionMode){case TD.INITIAL:MD(this,e);break;case TD.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==mD.TAG_ID.HTML&&n!==mD.TAG_ID.HEAD&&n!==mD.TAG_ID.BODY&&n!==mD.TAG_ID.BR||LD(e,t)}(this,e);break;case TD.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===mD.TAG_ID.HEAD||n===mD.TAG_ID.BODY||n===mD.TAG_ID.HTML||n===mD.TAG_ID.BR?BD(e,t):e._err(t,pD.ERR.endTagWithoutMatchingOpenElement)}(this,e);break;case TD.IN_HEAD:!function(e,t){switch(t.tagID){case mD.TAG_ID.HEAD:e.openElements.pop(),e.insertionMode=TD.AFTER_HEAD;break;case mD.TAG_ID.BODY:case mD.TAG_ID.BR:case mD.TAG_ID.HTML:jD(e,t);break;case mD.TAG_ID.TEMPLATE:UD(e,t);break;default:e._err(t,pD.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case TD.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case mD.TAG_ID.NOSCRIPT:e.openElements.pop(),e.insertionMode=TD.IN_HEAD;break;case mD.TAG_ID.BR:HD(e,t);break;default:e._err(t,pD.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case TD.AFTER_HEAD:!function(e,t){switch(t.tagID){case mD.TAG_ID.BODY:case mD.TAG_ID.HTML:case mD.TAG_ID.BR:GD(e,t);break;case mD.TAG_ID.TEMPLATE:UD(e,t);break;default:e._err(t,pD.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case TD.IN_BODY:ZD(this,e);break;case TD.TEXT:!function(e,t){var n;t.tagID===mD.TAG_ID.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case TD.IN_TABLE:nP(this,e);break;case TD.IN_TABLE_TEXT:aP(this,e);break;case TD.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case mD.TAG_ID.CAPTION:case mD.TAG_ID.TABLE:e.openElements.hasInTableScope(mD.TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(mD.TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=TD.IN_TABLE,n===mD.TAG_ID.TABLE&&nP(e,t));break;case mD.TAG_ID.BODY:case mD.TAG_ID.COL:case mD.TAG_ID.COLGROUP:case mD.TAG_ID.HTML:case mD.TAG_ID.TBODY:case mD.TAG_ID.TD:case mD.TAG_ID.TFOOT:case mD.TAG_ID.TH:case mD.TAG_ID.THEAD:case mD.TAG_ID.TR:break;default:ZD(e,t)}}(this,e);break;case TD.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case mD.TAG_ID.COLGROUP:e.openElements.currentTagId===mD.TAG_ID.COLGROUP&&(e.openElements.pop(),e.insertionMode=TD.IN_TABLE);break;case mD.TAG_ID.TEMPLATE:UD(e,t);break;case mD.TAG_ID.COL:break;default:cP(e,t)}}(this,e);break;case TD.IN_TABLE_BODY:hP(this,e);break;case TD.IN_ROW:pP(this,e);break;case TD.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case mD.TAG_ID.TD:case mD.TAG_ID.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=TD.IN_ROW);break;case mD.TAG_ID.TABLE:case mD.TAG_ID.TBODY:case mD.TAG_ID.TFOOT:case mD.TAG_ID.THEAD:case mD.TAG_ID.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),pP(e,t));break;case mD.TAG_ID.BODY:case mD.TAG_ID.CAPTION:case mD.TAG_ID.COL:case mD.TAG_ID.COLGROUP:case mD.TAG_ID.HTML:break;default:ZD(e,t)}}(this,e);break;case TD.IN_SELECT:mP(this,e);break;case TD.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===mD.TAG_ID.CAPTION||n===mD.TAG_ID.TABLE||n===mD.TAG_ID.TBODY||n===mD.TAG_ID.TFOOT||n===mD.TAG_ID.THEAD||n===mD.TAG_ID.TR||n===mD.TAG_ID.TD||n===mD.TAG_ID.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(mD.TAG_ID.SELECT),e._resetInsertionMode(),e.onEndTag(t)):mP(e,t)}(this,e);break;case TD.IN_TEMPLATE:!function(e,t){t.tagID===mD.TAG_ID.TEMPLATE&&UD(e,t)}(this,e);break;case TD.AFTER_BODY:bP(this,e);break;case TD.IN_FRAMESET:!function(e,t){t.tagID!==mD.TAG_ID.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===mD.TAG_ID.FRAMESET||(e.insertionMode=TD.AFTER_FRAMESET))}(this,e);break;case TD.AFTER_FRAMESET:!function(e,t){t.tagID===mD.TAG_ID.HTML&&(e.insertionMode=TD.AFTER_AFTER_FRAMESET)}(this,e);break;case TD.AFTER_AFTER_BODY:yP(this,e)}}},{key:"onEof",value:function(e){switch(this.insertionMode){case TD.INITIAL:MD(this,e);break;case TD.BEFORE_HTML:LD(this,e);break;case TD.BEFORE_HEAD:BD(this,e);break;case TD.IN_HEAD:jD(this,e);break;case TD.IN_HEAD_NO_SCRIPT:HD(this,e);break;case TD.AFTER_HEAD:GD(this,e);break;case TD.IN_BODY:case TD.IN_TABLE:case TD.IN_CAPTION:case TD.IN_COLUMN_GROUP:case TD.IN_TABLE_BODY:case TD.IN_ROW:case TD.IN_CELL:case TD.IN_SELECT:case TD.IN_SELECT_IN_TABLE:JD(this,e);break;case TD.TEXT:!function(e,t){e._err(t,pD.ERR.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case TD.IN_TABLE_TEXT:aP(this,e);break;case TD.IN_TEMPLATE:gP(this,e);break;case TD.AFTER_BODY:case TD.IN_FRAMESET:case TD.AFTER_FRAMESET:case TD.AFTER_AFTER_BODY:case TD.AFTER_AFTER_FRAMESET:RD(this,e)}}},{key:"onWhitespaceCharacter",value:function(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===fD.CODE_POINTS.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case TD.IN_HEAD:case TD.IN_HEAD_NO_SCRIPT:case TD.AFTER_HEAD:case TD.TEXT:case TD.IN_COLUMN_GROUP:case TD.IN_SELECT:case TD.IN_SELECT_IN_TABLE:case TD.IN_FRAMESET:case TD.AFTER_FRAMESET:this._insertCharacters(e);break;case TD.IN_BODY:case TD.IN_CAPTION:case TD.IN_CELL:case TD.IN_TEMPLATE:case TD.AFTER_BODY:case TD.AFTER_AFTER_BODY:case TD.AFTER_AFTER_FRAMESET:VD(this,e);break;case TD.IN_TABLE:case TD.IN_TABLE_BODY:case TD.IN_ROW:eP(this,e);break;case TD.IN_TABLE_TEXT:iP(this,e)}}}],[{key:"parse",value:function(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}},{key:"getFragmentParser",value:function(e,t){const n=Object.assign(Object.assign({},wD),t);null!=e||(e=n.treeAdapter.createElement(mD.TAG_NAMES.TEMPLATE,mD.NS.HTML,[]));const r=n.treeAdapter.createElement("documentmock",mD.NS.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===mD.TAG_ID.TEMPLATE&&i.tmplInsertionModeStack.unshift(TD.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}}]),e}();function kD(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):QD(e,t),n}function AD(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function CD(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&o>=yD;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=ID(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function ID(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function OD(e,t,n){const r=e.treeAdapter.getTagName(t),i=(0,mD.getTagID)(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const r=e.treeAdapter.getNamespaceURI(t);i===mD.TAG_ID.TEMPLATE&&r===mD.NS.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function DD(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function PD(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function MD(e,t){e._err(t,pD.ERR.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,mD.DOCUMENT_MODE.QUIRKS),e.insertionMode=TD.BEFORE_HTML,e._processToken(t)}function LD(e,t){e._insertFakeRootElement(),e.insertionMode=TD.BEFORE_HEAD,e._processToken(t)}function BD(e,t){e._insertFakeElement(mD.TAG_NAMES.HEAD,mD.TAG_ID.HEAD),e.headElement=e.openElements.current,e.insertionMode=TD.IN_HEAD,e._processToken(t)}function FD(e,t){switch(t.tagID){case mD.TAG_ID.HTML:KD(e,t);break;case mD.TAG_ID.BASE:case mD.TAG_ID.BASEFONT:case mD.TAG_ID.BGSOUND:case mD.TAG_ID.LINK:case mD.TAG_ID.META:e._appendElement(t,mD.NS.HTML),t.ackSelfClosing=!0;break;case mD.TAG_ID.TITLE:e._switchToTextParsing(t,sD.TokenizerMode.RCDATA);break;case mD.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,sD.TokenizerMode.RAWTEXT):(e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.IN_HEAD_NO_SCRIPT);break;case mD.TAG_ID.NOFRAMES:case mD.TAG_ID.STYLE:e._switchToTextParsing(t,sD.TokenizerMode.RAWTEXT);break;case mD.TAG_ID.SCRIPT:e._switchToTextParsing(t,sD.TokenizerMode.SCRIPT_DATA);break;case mD.TAG_ID.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=TD.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(TD.IN_TEMPLATE);break;case mD.TAG_ID.HEAD:e._err(t,pD.ERR.misplacedStartTagForHeadElement);break;default:jD(e,t)}}function UD(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==mD.TAG_ID.TEMPLATE&&e._err(t,pD.ERR.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(mD.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,pD.ERR.endTagWithoutMatchingOpenElement)}function jD(e,t){e.openElements.pop(),e.insertionMode=TD.AFTER_HEAD,e._processToken(t)}function HD(e,t){const n=t.type===gD.TokenType.EOF?pD.ERR.openElementsLeftAfterEof:pD.ERR.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=TD.IN_HEAD,e._processToken(t)}function GD(e,t){e._insertFakeElement(mD.TAG_NAMES.BODY,mD.TAG_ID.BODY),e.insertionMode=TD.IN_BODY,zD(e,t)}function zD(e,t){switch(t.type){case gD.TokenType.CHARACTER:WD(e,t);break;case gD.TokenType.WHITESPACE_CHARACTER:VD(e,t);break;case gD.TokenType.COMMENT:ND(e,t);break;case gD.TokenType.START_TAG:KD(e,t);break;case gD.TokenType.END_TAG:ZD(e,t);break;case gD.TokenType.EOF:JD(e,t)}}function VD(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function WD(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function XD(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,mD.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function YD(e){const t=(0,gD.getTokenAttr)(e,mD.ATTRS.TYPE);return null!=t&&t.toLowerCase()===bD}function qD(e,t){e._switchToTextParsing(t,sD.TokenizerMode.RAWTEXT)}function $D(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML)}function KD(e,t){switch(t.tagID){case mD.TAG_ID.I:case mD.TAG_ID.S:case mD.TAG_ID.B:case mD.TAG_ID.U:case mD.TAG_ID.EM:case mD.TAG_ID.TT:case mD.TAG_ID.BIG:case mD.TAG_ID.CODE:case mD.TAG_ID.FONT:case mD.TAG_ID.SMALL:case mD.TAG_ID.STRIKE:case mD.TAG_ID.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case mD.TAG_ID.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(mD.TAG_NAMES.A);n&&(PD(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case mD.TAG_ID.H1:case mD.TAG_ID.H2:case mD.TAG_ID.H3:case mD.TAG_ID.H4:case mD.TAG_ID.H5:case mD.TAG_ID.H6:!function(e,t){e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),(0,mD.isNumberedHeader)(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,mD.NS.HTML)}(e,t);break;case mD.TAG_ID.P:case mD.TAG_ID.DL:case mD.TAG_ID.OL:case mD.TAG_ID.UL:case mD.TAG_ID.DIV:case mD.TAG_ID.DIR:case mD.TAG_ID.NAV:case mD.TAG_ID.MAIN:case mD.TAG_ID.MENU:case mD.TAG_ID.ASIDE:case mD.TAG_ID.CENTER:case mD.TAG_ID.FIGURE:case mD.TAG_ID.FOOTER:case mD.TAG_ID.HEADER:case mD.TAG_ID.HGROUP:case mD.TAG_ID.DIALOG:case mD.TAG_ID.DETAILS:case mD.TAG_ID.ADDRESS:case mD.TAG_ID.ARTICLE:case mD.TAG_ID.SECTION:case mD.TAG_ID.SUMMARY:case mD.TAG_ID.FIELDSET:case mD.TAG_ID.BLOCKQUOTE:case mD.TAG_ID.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._insertElement(t,mD.NS.HTML)}(e,t);break;case mD.TAG_ID.LI:case mD.TAG_ID.DD:case mD.TAG_ID.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.tagIDs[t];if(n===mD.TAG_ID.LI&&r===mD.TAG_ID.LI||(n===mD.TAG_ID.DD||n===mD.TAG_ID.DT)&&(r===mD.TAG_ID.DD||r===mD.TAG_ID.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==mD.TAG_ID.ADDRESS&&r!==mD.TAG_ID.DIV&&r!==mD.TAG_ID.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._insertElement(t,mD.NS.HTML)}(e,t);break;case mD.TAG_ID.BR:case mD.TAG_ID.IMG:case mD.TAG_ID.WBR:case mD.TAG_ID.AREA:case mD.TAG_ID.EMBED:case mD.TAG_ID.KEYGEN:XD(e,t);break;case mD.TAG_ID.HR:!function(e,t){e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._appendElement(t,mD.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case mD.TAG_ID.RB:case mD.TAG_ID.RTC:!function(e,t){e.openElements.hasInScope(mD.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,mD.NS.HTML)}(e,t);break;case mD.TAG_ID.RT:case mD.TAG_ID.RP:!function(e,t){e.openElements.hasInScope(mD.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(mD.TAG_ID.RTC),e._insertElement(t,mD.NS.HTML)}(e,t);break;case mD.TAG_ID.PRE:case mD.TAG_ID.LISTING:!function(e,t){e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._insertElement(t,mD.NS.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case mD.TAG_ID.XMP:!function(e,t){e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,sD.TokenizerMode.RAWTEXT)}(e,t);break;case mD.TAG_ID.SVG:!function(e,t){e._reconstructActiveFormattingElements(),dD.adjustTokenSVGAttrs(t),dD.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,mD.NS.SVG):e._insertElement(t,mD.NS.SVG),t.ackSelfClosing=!0}(e,t);break;case mD.TAG_ID.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case mD.TAG_ID.BASE:case mD.TAG_ID.LINK:case mD.TAG_ID.META:case mD.TAG_ID.STYLE:case mD.TAG_ID.TITLE:case mD.TAG_ID.SCRIPT:case mD.TAG_ID.BGSOUND:case mD.TAG_ID.BASEFONT:case mD.TAG_ID.TEMPLATE:FD(e,t);break;case mD.TAG_ID.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case mD.TAG_ID.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._insertElement(t,mD.NS.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case mD.TAG_ID.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(mD.TAG_ID.NOBR)&&(PD(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,mD.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case mD.TAG_ID.MATH:!function(e,t){e._reconstructActiveFormattingElements(),dD.adjustTokenMathMLAttrs(t),dD.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,mD.NS.MATHML):e._insertElement(t,mD.NS.MATHML),t.ackSelfClosing=!0}(e,t);break;case mD.TAG_ID.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==mD.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._insertElement(t,mD.NS.HTML),e.framesetOk=!1,e.insertionMode=TD.IN_TABLE}(e,t);break;case mD.TAG_ID.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,mD.NS.HTML),YD(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case mD.TAG_ID.PARAM:case mD.TAG_ID.TRACK:case mD.TAG_ID.SOURCE:!function(e,t){e._appendElement(t,mD.NS.HTML),t.ackSelfClosing=!0}(e,t);break;case mD.TAG_ID.IMAGE:!function(e,t){t.tagName=mD.TAG_NAMES.IMG,t.tagID=mD.TAG_ID.IMG,XD(e,t)}(e,t);break;case mD.TAG_ID.BUTTON:!function(e,t){e.openElements.hasInScope(mD.TAG_ID.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(mD.TAG_ID.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML),e.framesetOk=!1}(e,t);break;case mD.TAG_ID.APPLET:case mD.TAG_ID.OBJECT:case mD.TAG_ID.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case mD.TAG_ID.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,sD.TokenizerMode.RAWTEXT)}(e,t);break;case mD.TAG_ID.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===TD.IN_TABLE||e.insertionMode===TD.IN_CAPTION||e.insertionMode===TD.IN_TABLE_BODY||e.insertionMode===TD.IN_ROW||e.insertionMode===TD.IN_CELL?TD.IN_SELECT_IN_TABLE:TD.IN_SELECT}(e,t);break;case mD.TAG_ID.OPTION:case mD.TAG_ID.OPTGROUP:!function(e,t){e.openElements.currentTagId===mD.TAG_ID.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,mD.NS.HTML)}(e,t);break;case mD.TAG_ID.NOEMBED:qD(e,t);break;case mD.TAG_ID.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.IN_FRAMESET)}(e,t);break;case mD.TAG_ID.TEXTAREA:!function(e,t){e._insertElement(t,mD.NS.HTML),e.skipNextNewLine=!0,e.tokenizer.state=sD.TokenizerMode.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=TD.TEXT}(e,t);break;case mD.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?qD(e,t):$D(e,t);break;case mD.TAG_ID.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(mD.TAG_ID.P)&&e._closePElement(),e._insertElement(t,mD.NS.HTML),e.tokenizer.state=sD.TokenizerMode.PLAINTEXT}(e,t);break;case mD.TAG_ID.COL:case mD.TAG_ID.TH:case mD.TAG_ID.TD:case mD.TAG_ID.TR:case mD.TAG_ID.HEAD:case mD.TAG_ID.FRAME:case mD.TAG_ID.TBODY:case mD.TAG_ID.TFOOT:case mD.TAG_ID.THEAD:case mD.TAG_ID.CAPTION:case mD.TAG_ID.COLGROUP:break;default:$D(e,t)}}function QD(e,t){const n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const i=e.openElements.items[t],o=e.openElements.tagIDs[t];if(r===o&&(r!==mD.TAG_ID.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,o))break}}function ZD(e,t){switch(t.tagID){case mD.TAG_ID.A:case mD.TAG_ID.B:case mD.TAG_ID.I:case mD.TAG_ID.S:case mD.TAG_ID.U:case mD.TAG_ID.EM:case mD.TAG_ID.TT:case mD.TAG_ID.BIG:case mD.TAG_ID.CODE:case mD.TAG_ID.FONT:case mD.TAG_ID.NOBR:case mD.TAG_ID.SMALL:case mD.TAG_ID.STRIKE:case mD.TAG_ID.STRONG:PD(e,t);break;case mD.TAG_ID.P:!function(e){e.openElements.hasInButtonScope(mD.TAG_ID.P)||e._insertFakeElement(mD.TAG_NAMES.P,mD.TAG_ID.P),e._closePElement()}(e);break;case mD.TAG_ID.DL:case mD.TAG_ID.UL:case mD.TAG_ID.OL:case mD.TAG_ID.DIR:case mD.TAG_ID.DIV:case mD.TAG_ID.NAV:case mD.TAG_ID.PRE:case mD.TAG_ID.MAIN:case mD.TAG_ID.MENU:case mD.TAG_ID.ASIDE:case mD.TAG_ID.BUTTON:case mD.TAG_ID.CENTER:case mD.TAG_ID.FIGURE:case mD.TAG_ID.FOOTER:case mD.TAG_ID.HEADER:case mD.TAG_ID.HGROUP:case mD.TAG_ID.DIALOG:case mD.TAG_ID.ADDRESS:case mD.TAG_ID.ARTICLE:case mD.TAG_ID.DETAILS:case mD.TAG_ID.SECTION:case mD.TAG_ID.SUMMARY:case mD.TAG_ID.LISTING:case mD.TAG_ID.FIELDSET:case mD.TAG_ID.BLOCKQUOTE:case mD.TAG_ID.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case mD.TAG_ID.LI:!function(e){e.openElements.hasInListItemScope(mD.TAG_ID.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(mD.TAG_ID.LI),e.openElements.popUntilTagNamePopped(mD.TAG_ID.LI))}(e);break;case mD.TAG_ID.DD:case mD.TAG_ID.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case mD.TAG_ID.H1:case mD.TAG_ID.H2:case mD.TAG_ID.H3:case mD.TAG_ID.H4:case mD.TAG_ID.H5:case mD.TAG_ID.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case mD.TAG_ID.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(mD.TAG_NAMES.BR,mD.TAG_ID.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case mD.TAG_ID.BODY:!function(e,t){if(e.openElements.hasInScope(mD.TAG_ID.BODY)&&(e.insertionMode=TD.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case mD.TAG_ID.HTML:!function(e,t){e.openElements.hasInScope(mD.TAG_ID.BODY)&&(e.insertionMode=TD.AFTER_BODY,bP(e,t))}(e,t);break;case mD.TAG_ID.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(mD.TAG_ID.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(mD.TAG_ID.FORM):n&&e.openElements.remove(n))}(e);break;case mD.TAG_ID.APPLET:case mD.TAG_ID.OBJECT:case mD.TAG_ID.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case mD.TAG_ID.TEMPLATE:UD(e,t);break;default:QD(e,t)}}function JD(e,t){e.tmplInsertionModeStack.length>0?gP(e,t):RD(e,t)}function eP(e,t){if(xD.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=TD.IN_TABLE_TEXT,t.type){case gD.TokenType.CHARACTER:oP(e,t);break;case gD.TokenType.WHITESPACE_CHARACTER:iP(e,t)}else rP(e,t)}function tP(e,t){switch(t.tagID){case mD.TAG_ID.TD:case mD.TAG_ID.TH:case mD.TAG_ID.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(mD.TAG_NAMES.TBODY,mD.TAG_ID.TBODY),e.insertionMode=TD.IN_TABLE_BODY,uP(e,t)}(e,t);break;case mD.TAG_ID.STYLE:case mD.TAG_ID.SCRIPT:case mD.TAG_ID.TEMPLATE:FD(e,t);break;case mD.TAG_ID.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(mD.TAG_NAMES.COLGROUP,mD.TAG_ID.COLGROUP),e.insertionMode=TD.IN_COLUMN_GROUP,lP(e,t)}(e,t);break;case mD.TAG_ID.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,mD.NS.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case mD.TAG_ID.TABLE:!function(e,t){e.openElements.hasInTableScope(mD.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(mD.TAG_ID.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case mD.TAG_ID.TBODY:case mD.TAG_ID.TFOOT:case mD.TAG_ID.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.IN_TABLE_BODY}(e,t);break;case mD.TAG_ID.INPUT:!function(e,t){YD(t)?e._appendElement(t,mD.NS.HTML):rP(e,t),t.ackSelfClosing=!0}(e,t);break;case mD.TAG_ID.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.IN_CAPTION}(e,t);break;case mD.TAG_ID.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,mD.NS.HTML),e.insertionMode=TD.IN_COLUMN_GROUP}(e,t);break;default:rP(e,t)}}function nP(e,t){switch(t.tagID){case mD.TAG_ID.TABLE:e.openElements.hasInTableScope(mD.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(mD.TAG_ID.TABLE),e._resetInsertionMode());break;case mD.TAG_ID.TEMPLATE:UD(e,t);break;case mD.TAG_ID.BODY:case mD.TAG_ID.CAPTION:case mD.TAG_ID.COL:case mD.TAG_ID.COLGROUP:case mD.TAG_ID.HTML:case mD.TAG_ID.TBODY:case mD.TAG_ID.TD:case mD.TAG_ID.TFOOT:case mD.TAG_ID.TH:case mD.TAG_ID.THEAD:case mD.TAG_ID.TR:break;default:rP(e,t)}}function rP(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,zD(e,t),e.fosterParentingEnabled=n}function iP(e,t){e.pendingCharacterTokens.push(t)}function oP(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function aP(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===mD.TAG_ID.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===mD.TAG_ID.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===mD.TAG_ID.OPTGROUP&&e.openElements.pop();break;case mD.TAG_ID.OPTION:e.openElements.currentTagId===mD.TAG_ID.OPTION&&e.openElements.pop();break;case mD.TAG_ID.SELECT:e.openElements.hasInSelectScope(mD.TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(mD.TAG_ID.SELECT),e._resetInsertionMode());break;case mD.TAG_ID.TEMPLATE:UD(e,t)}}function gP(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(mD.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):RD(e,t)}function bP(e,t){var n;if(t.tagID===mD.TAG_ID.HTML){if(e.fragmentContext||(e.insertionMode=TD.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===mD.TAG_ID.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else vP(e,t)}function vP(e,t){e.insertionMode=TD.IN_BODY,zD(e,t)}function yP(e,t){e.insertionMode=TD.IN_BODY,zD(e,t)}function TP(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==mD.NS.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}var _P={};Object.defineProperty(_P,"__esModule",{value:!0}),_P.serializeOuter=_P.serialize=void 0;const EP=vO,xP=nk,wP=KO,SP=new Set([EP.TAG_NAMES.AREA,EP.TAG_NAMES.BASE,EP.TAG_NAMES.BASEFONT,EP.TAG_NAMES.BGSOUND,EP.TAG_NAMES.BR,EP.TAG_NAMES.COL,EP.TAG_NAMES.EMBED,EP.TAG_NAMES.FRAME,EP.TAG_NAMES.HR,EP.TAG_NAMES.IMG,EP.TAG_NAMES.INPUT,EP.TAG_NAMES.KEYGEN,EP.TAG_NAMES.LINK,EP.TAG_NAMES.META,EP.TAG_NAMES.PARAM,EP.TAG_NAMES.SOURCE,EP.TAG_NAMES.TRACK,EP.TAG_NAMES.WBR]);function kP(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===EP.NS.HTML&&SP.has(t.treeAdapter.getTagName(e))}const AP={treeAdapter:wP.defaultTreeAdapter,scriptingEnabled:!0};function CP(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===EP.TAG_NAMES.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===EP.NS.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(const e of i)n+=IP(e,t);return n}function IP(e,t){return t.treeAdapter.isElementNode(e)?function(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${function(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case EP.NS.XML:n+=`xml:${r.name}`;break;case EP.NS.XMLNS:"xmlns"!==r.name&&(n+="xmlns:"),n+=r.name;break;case EP.NS.XLINK:n+=`xlink:${r.name}`;break;default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${(0,xP.escapeAttribute)(r.value)}"`}return n}(e,t)}>${kP(e,t)?"":`${CP(e,t)}`}`}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),o=i&&n.isElementNode(i)&&n.getTagName(i);return o&&n.getNamespaceURI(i)===EP.NS.HTML&&(0,EP.hasUnescapedText)(o,t.scriptingEnabled)?r:(0,xP.escapeText)(r)}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return``}(e,t):""}_P.serialize=function(e,t){const n=Object.assign(Object.assign({},AP),t);return kP(e,n)?"":CP(e,n)},_P.serializeOuter=function(e,t){return IP(e,Object.assign(Object.assign({},AP),t))},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseFragment=e.parse=e.TokenizerMode=e.Tokenizer=e.Token=e.html=e.foreignContent=e.ErrorCodes=e.serializeOuter=e.serialize=e.Parser=e.defaultTreeAdapter=void 0;const t=sO;var n=KO;Object.defineProperty(e,"defaultTreeAdapter",{enumerable:!0,get:function(){return n.defaultTreeAdapter}});var r=sO;Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return r.Parser}});var i=_P;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return i.serialize}}),Object.defineProperty(e,"serializeOuter",{enumerable:!0,get:function(){return i.serializeOuter}});var o=pO;Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return o.ERR}}),e.foreignContent=aD,e.html=vO,e.Token=bO;var a=lO;Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return a.Tokenizer}}),Object.defineProperty(e,"TokenizerMode",{enumerable:!0,get:function(){return a.TokenizerMode}}),e.parse=function(e,n){return t.Parser.parse(e,n)},e.parseFragment=function(e,n,r){"string"==typeof e&&(r=n,n=e,e=null);const i=t.Parser.getFragmentParser(e,r);return i.tokenizer.write(n,!0),i.getFragment()}}(aO);var OP={},DP={},PP={},NP={},RP={},MP={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isUndefinedCodePoint=e.isControlCodePoint=e.getSurrogatePairCodePoint=e.isSurrogatePair=e.isSurrogate=e.SEQUENCES=e.CODE_POINTS=e.REPLACEMENT_CHARACTER=void 0;const t=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]);var n;e.REPLACEMENT_CHARACTER="�",(n=e.CODE_POINTS||(e.CODE_POINTS={}))[n.EOF=-1]="EOF",n[n.NULL=0]="NULL",n[n.TABULATION=9]="TABULATION",n[n.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",n[n.LINE_FEED=10]="LINE_FEED",n[n.FORM_FEED=12]="FORM_FEED",n[n.SPACE=32]="SPACE",n[n.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",n[n.QUOTATION_MARK=34]="QUOTATION_MARK",n[n.NUMBER_SIGN=35]="NUMBER_SIGN",n[n.AMPERSAND=38]="AMPERSAND",n[n.APOSTROPHE=39]="APOSTROPHE",n[n.HYPHEN_MINUS=45]="HYPHEN_MINUS",n[n.SOLIDUS=47]="SOLIDUS",n[n.DIGIT_0=48]="DIGIT_0",n[n.DIGIT_9=57]="DIGIT_9",n[n.SEMICOLON=59]="SEMICOLON",n[n.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",n[n.EQUALS_SIGN=61]="EQUALS_SIGN",n[n.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",n[n.QUESTION_MARK=63]="QUESTION_MARK",n[n.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",n[n.LATIN_CAPITAL_F=70]="LATIN_CAPITAL_F",n[n.LATIN_CAPITAL_X=88]="LATIN_CAPITAL_X",n[n.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",n[n.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",n[n.GRAVE_ACCENT=96]="GRAVE_ACCENT",n[n.LATIN_SMALL_A=97]="LATIN_SMALL_A",n[n.LATIN_SMALL_F=102]="LATIN_SMALL_F",n[n.LATIN_SMALL_X=120]="LATIN_SMALL_X",n[n.LATIN_SMALL_Z=122]="LATIN_SMALL_Z",n[n.REPLACEMENT_CHARACTER=65533]="REPLACEMENT_CHARACTER",e.SEQUENCES={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"},e.isSurrogate=function(e){return e>=55296&&e<=57343},e.isSurrogatePair=function(e){return e>=56320&&e<=57343},e.getSurrogatePairCodePoint=function(e,t){return 1024*(e-55296)+9216+t},e.isControlCodePoint=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},e.isUndefinedCodePoint=function(e){return e>=64976&&e<=65007||t.has(e)}}(MP);var LP={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ERR=void 0,function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"}(e.ERR||(e.ERR={}))})(LP),Object.defineProperty(RP,"__esModule",{value:!0}),RP.Preprocessor=void 0;const BP=MP,FP=LP;let UP=function(){function e(t){d(this,e),this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}return f(e,[{key:"col",get:function(){return this.pos-this.lineStartPos+Number(this.lastGapPos!==this.pos)}},{key:"offset",get:function(){return this.droppedBufferSize+this.pos}},{key:"getError",value:function(e){const{line:t,col:n,offset:r}=this;return{code:e,startLine:t,endLine:t,startCol:n,endCol:n,startOffset:r,endOffset:r}}},{key:"_err",value:function(e){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(e)))}},{key:"_addGap",value:function(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}},{key:"_processSurrogate",value:function(e){if(this.pos!==this.html.length-1){const t=this.html.charCodeAt(this.pos+1);if((0,BP.isSurrogatePair)(t))return this.pos++,this._addGap(),(0,BP.getSurrogatePairCodePoint)(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,BP.CODE_POINTS.EOF;return this._err(FP.ERR.surrogateInInputStream),e}},{key:"willDropParsedChunk",value:function(){return this.pos>this.bufferWaterline}},{key:"dropParsedChunk",value:function(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}},{key:"write",value:function(e,t){this.html.length>0?this.html+=e:this.html=e,this.endOfChunkHit=!1,this.lastChunkWritten=t}},{key:"insertHtmlAtCurrentPos",value:function(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1),this.endOfChunkHit=!1}},{key:"startsWith",value:function(e,t){if(this.pos+e.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(t)return this.html.startsWith(e,this.pos);for(let t=0;t=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,BP.CODE_POINTS.EOF;const n=this.html.charCodeAt(t);return n===BP.CODE_POINTS.CARRIAGE_RETURN?BP.CODE_POINTS.LINE_FEED:n}},{key:"advance",value:function(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,BP.CODE_POINTS.EOF;let e=this.html.charCodeAt(this.pos);return e===BP.CODE_POINTS.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,BP.CODE_POINTS.LINE_FEED):e===BP.CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,(0,BP.isSurrogate)(e)&&(e=this._processSurrogate(e)),null===this.handler.onParseError||e>31&&e<127||e===BP.CODE_POINTS.LINE_FEED||e===BP.CODE_POINTS.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}},{key:"_checkForProblematicCharacters",value:function(e){(0,BP.isControlCodePoint)(e)?this._err(FP.ERR.controlCharacterInInputStream):(0,BP.isUndefinedCodePoint)(e)&&this._err(FP.ERR.noncharacterInInputStream)}},{key:"retreat",value:function(e){for(this.pos-=e;this.pos=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}}(jP);var HP={};(function(e){var t,n,r,i,o,a,s,l;Object.defineProperty(e,"__esModule",{value:!0}),e.hasUnescapedText=e.isNumberedHeader=e.SPECIAL_ELEMENTS=e.getTagID=e.TAG_ID=e.TAG_NAMES=e.DOCUMENT_MODE=e.ATTRS=e.NS=void 0,(n=t=e.NS||(e.NS={})).HTML="http://www.w3.org/1999/xhtml",n.MATHML="http://www.w3.org/1998/Math/MathML",n.SVG="http://www.w3.org/2000/svg",n.XLINK="http://www.w3.org/1999/xlink",n.XML="http://www.w3.org/XML/1998/namespace",n.XMLNS="http://www.w3.org/2000/xmlns/",(r=e.ATTRS||(e.ATTRS={})).TYPE="type",r.ACTION="action",r.ENCODING="encoding",r.PROMPT="prompt",r.NAME="name",r.COLOR="color",r.FACE="face",r.SIZE="size",(i=e.DOCUMENT_MODE||(e.DOCUMENT_MODE={})).NO_QUIRKS="no-quirks",i.QUIRKS="quirks",i.LIMITED_QUIRKS="limited-quirks",(a=o=e.TAG_NAMES||(e.TAG_NAMES={})).A="a",a.ADDRESS="address",a.ANNOTATION_XML="annotation-xml",a.APPLET="applet",a.AREA="area",a.ARTICLE="article",a.ASIDE="aside",a.B="b",a.BASE="base",a.BASEFONT="basefont",a.BGSOUND="bgsound",a.BIG="big",a.BLOCKQUOTE="blockquote",a.BODY="body",a.BR="br",a.BUTTON="button",a.CAPTION="caption",a.CENTER="center",a.CODE="code",a.COL="col",a.COLGROUP="colgroup",a.DD="dd",a.DESC="desc",a.DETAILS="details",a.DIALOG="dialog",a.DIR="dir",a.DIV="div",a.DL="dl",a.DT="dt",a.EM="em",a.EMBED="embed",a.FIELDSET="fieldset",a.FIGCAPTION="figcaption",a.FIGURE="figure",a.FONT="font",a.FOOTER="footer",a.FOREIGN_OBJECT="foreignObject",a.FORM="form",a.FRAME="frame",a.FRAMESET="frameset",a.H1="h1",a.H2="h2",a.H3="h3",a.H4="h4",a.H5="h5",a.H6="h6",a.HEAD="head",a.HEADER="header",a.HGROUP="hgroup",a.HR="hr",a.HTML="html",a.I="i",a.IMG="img",a.IMAGE="image",a.INPUT="input",a.IFRAME="iframe",a.KEYGEN="keygen",a.LABEL="label",a.LI="li",a.LINK="link",a.LISTING="listing",a.MAIN="main",a.MALIGNMARK="malignmark",a.MARQUEE="marquee",a.MATH="math",a.MENU="menu",a.META="meta",a.MGLYPH="mglyph",a.MI="mi",a.MO="mo",a.MN="mn",a.MS="ms",a.MTEXT="mtext",a.NAV="nav",a.NOBR="nobr",a.NOFRAMES="noframes",a.NOEMBED="noembed",a.NOSCRIPT="noscript",a.OBJECT="object",a.OL="ol",a.OPTGROUP="optgroup",a.OPTION="option",a.P="p",a.PARAM="param",a.PLAINTEXT="plaintext",a.PRE="pre",a.RB="rb",a.RP="rp",a.RT="rt",a.RTC="rtc",a.RUBY="ruby",a.S="s",a.SCRIPT="script",a.SECTION="section",a.SELECT="select",a.SOURCE="source",a.SMALL="small",a.SPAN="span",a.STRIKE="strike",a.STRONG="strong",a.STYLE="style",a.SUB="sub",a.SUMMARY="summary",a.SUP="sup",a.TABLE="table",a.TBODY="tbody",a.TEMPLATE="template",a.TEXTAREA="textarea",a.TFOOT="tfoot",a.TD="td",a.TH="th",a.THEAD="thead",a.TITLE="title",a.TR="tr",a.TRACK="track",a.TT="tt",a.U="u",a.UL="ul",a.SVG="svg",a.VAR="var",a.WBR="wbr",a.XMP="xmp",(l=s=e.TAG_ID||(e.TAG_ID={}))[l.UNKNOWN=0]="UNKNOWN",l[l.A=1]="A",l[l.ADDRESS=2]="ADDRESS",l[l.ANNOTATION_XML=3]="ANNOTATION_XML",l[l.APPLET=4]="APPLET",l[l.AREA=5]="AREA",l[l.ARTICLE=6]="ARTICLE",l[l.ASIDE=7]="ASIDE",l[l.B=8]="B",l[l.BASE=9]="BASE",l[l.BASEFONT=10]="BASEFONT",l[l.BGSOUND=11]="BGSOUND",l[l.BIG=12]="BIG",l[l.BLOCKQUOTE=13]="BLOCKQUOTE",l[l.BODY=14]="BODY",l[l.BR=15]="BR",l[l.BUTTON=16]="BUTTON",l[l.CAPTION=17]="CAPTION",l[l.CENTER=18]="CENTER",l[l.CODE=19]="CODE",l[l.COL=20]="COL",l[l.COLGROUP=21]="COLGROUP",l[l.DD=22]="DD",l[l.DESC=23]="DESC",l[l.DETAILS=24]="DETAILS",l[l.DIALOG=25]="DIALOG",l[l.DIR=26]="DIR",l[l.DIV=27]="DIV",l[l.DL=28]="DL",l[l.DT=29]="DT",l[l.EM=30]="EM",l[l.EMBED=31]="EMBED",l[l.FIELDSET=32]="FIELDSET",l[l.FIGCAPTION=33]="FIGCAPTION",l[l.FIGURE=34]="FIGURE",l[l.FONT=35]="FONT",l[l.FOOTER=36]="FOOTER",l[l.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",l[l.FORM=38]="FORM",l[l.FRAME=39]="FRAME",l[l.FRAMESET=40]="FRAMESET",l[l.H1=41]="H1",l[l.H2=42]="H2",l[l.H3=43]="H3",l[l.H4=44]="H4",l[l.H5=45]="H5",l[l.H6=46]="H6",l[l.HEAD=47]="HEAD",l[l.HEADER=48]="HEADER",l[l.HGROUP=49]="HGROUP",l[l.HR=50]="HR",l[l.HTML=51]="HTML",l[l.I=52]="I",l[l.IMG=53]="IMG",l[l.IMAGE=54]="IMAGE",l[l.INPUT=55]="INPUT",l[l.IFRAME=56]="IFRAME",l[l.KEYGEN=57]="KEYGEN",l[l.LABEL=58]="LABEL",l[l.LI=59]="LI",l[l.LINK=60]="LINK",l[l.LISTING=61]="LISTING",l[l.MAIN=62]="MAIN",l[l.MALIGNMARK=63]="MALIGNMARK",l[l.MARQUEE=64]="MARQUEE",l[l.MATH=65]="MATH",l[l.MENU=66]="MENU",l[l.META=67]="META",l[l.MGLYPH=68]="MGLYPH",l[l.MI=69]="MI",l[l.MO=70]="MO",l[l.MN=71]="MN",l[l.MS=72]="MS",l[l.MTEXT=73]="MTEXT",l[l.NAV=74]="NAV",l[l.NOBR=75]="NOBR",l[l.NOFRAMES=76]="NOFRAMES",l[l.NOEMBED=77]="NOEMBED",l[l.NOSCRIPT=78]="NOSCRIPT",l[l.OBJECT=79]="OBJECT",l[l.OL=80]="OL",l[l.OPTGROUP=81]="OPTGROUP",l[l.OPTION=82]="OPTION",l[l.P=83]="P",l[l.PARAM=84]="PARAM",l[l.PLAINTEXT=85]="PLAINTEXT",l[l.PRE=86]="PRE",l[l.RB=87]="RB",l[l.RP=88]="RP",l[l.RT=89]="RT",l[l.RTC=90]="RTC",l[l.RUBY=91]="RUBY",l[l.S=92]="S",l[l.SCRIPT=93]="SCRIPT",l[l.SECTION=94]="SECTION",l[l.SELECT=95]="SELECT",l[l.SOURCE=96]="SOURCE",l[l.SMALL=97]="SMALL",l[l.SPAN=98]="SPAN",l[l.STRIKE=99]="STRIKE",l[l.STRONG=100]="STRONG",l[l.STYLE=101]="STYLE",l[l.SUB=102]="SUB",l[l.SUMMARY=103]="SUMMARY",l[l.SUP=104]="SUP",l[l.TABLE=105]="TABLE",l[l.TBODY=106]="TBODY",l[l.TEMPLATE=107]="TEMPLATE",l[l.TEXTAREA=108]="TEXTAREA",l[l.TFOOT=109]="TFOOT",l[l.TD=110]="TD",l[l.TH=111]="TH",l[l.THEAD=112]="THEAD",l[l.TITLE=113]="TITLE",l[l.TR=114]="TR",l[l.TRACK=115]="TRACK",l[l.TT=116]="TT",l[l.U=117]="U",l[l.UL=118]="UL",l[l.SVG=119]="SVG",l[l.VAR=120]="VAR",l[l.WBR=121]="WBR",l[l.XMP=122]="XMP";const c=new Map([[o.A,s.A],[o.ADDRESS,s.ADDRESS],[o.ANNOTATION_XML,s.ANNOTATION_XML],[o.APPLET,s.APPLET],[o.AREA,s.AREA],[o.ARTICLE,s.ARTICLE],[o.ASIDE,s.ASIDE],[o.B,s.B],[o.BASE,s.BASE],[o.BASEFONT,s.BASEFONT],[o.BGSOUND,s.BGSOUND],[o.BIG,s.BIG],[o.BLOCKQUOTE,s.BLOCKQUOTE],[o.BODY,s.BODY],[o.BR,s.BR],[o.BUTTON,s.BUTTON],[o.CAPTION,s.CAPTION],[o.CENTER,s.CENTER],[o.CODE,s.CODE],[o.COL,s.COL],[o.COLGROUP,s.COLGROUP],[o.DD,s.DD],[o.DESC,s.DESC],[o.DETAILS,s.DETAILS],[o.DIALOG,s.DIALOG],[o.DIR,s.DIR],[o.DIV,s.DIV],[o.DL,s.DL],[o.DT,s.DT],[o.EM,s.EM],[o.EMBED,s.EMBED],[o.FIELDSET,s.FIELDSET],[o.FIGCAPTION,s.FIGCAPTION],[o.FIGURE,s.FIGURE],[o.FONT,s.FONT],[o.FOOTER,s.FOOTER],[o.FOREIGN_OBJECT,s.FOREIGN_OBJECT],[o.FORM,s.FORM],[o.FRAME,s.FRAME],[o.FRAMESET,s.FRAMESET],[o.H1,s.H1],[o.H2,s.H2],[o.H3,s.H3],[o.H4,s.H4],[o.H5,s.H5],[o.H6,s.H6],[o.HEAD,s.HEAD],[o.HEADER,s.HEADER],[o.HGROUP,s.HGROUP],[o.HR,s.HR],[o.HTML,s.HTML],[o.I,s.I],[o.IMG,s.IMG],[o.IMAGE,s.IMAGE],[o.INPUT,s.INPUT],[o.IFRAME,s.IFRAME],[o.KEYGEN,s.KEYGEN],[o.LABEL,s.LABEL],[o.LI,s.LI],[o.LINK,s.LINK],[o.LISTING,s.LISTING],[o.MAIN,s.MAIN],[o.MALIGNMARK,s.MALIGNMARK],[o.MARQUEE,s.MARQUEE],[o.MATH,s.MATH],[o.MENU,s.MENU],[o.META,s.META],[o.MGLYPH,s.MGLYPH],[o.MI,s.MI],[o.MO,s.MO],[o.MN,s.MN],[o.MS,s.MS],[o.MTEXT,s.MTEXT],[o.NAV,s.NAV],[o.NOBR,s.NOBR],[o.NOFRAMES,s.NOFRAMES],[o.NOEMBED,s.NOEMBED],[o.NOSCRIPT,s.NOSCRIPT],[o.OBJECT,s.OBJECT],[o.OL,s.OL],[o.OPTGROUP,s.OPTGROUP],[o.OPTION,s.OPTION],[o.P,s.P],[o.PARAM,s.PARAM],[o.PLAINTEXT,s.PLAINTEXT],[o.PRE,s.PRE],[o.RB,s.RB],[o.RP,s.RP],[o.RT,s.RT],[o.RTC,s.RTC],[o.RUBY,s.RUBY],[o.S,s.S],[o.SCRIPT,s.SCRIPT],[o.SECTION,s.SECTION],[o.SELECT,s.SELECT],[o.SOURCE,s.SOURCE],[o.SMALL,s.SMALL],[o.SPAN,s.SPAN],[o.STRIKE,s.STRIKE],[o.STRONG,s.STRONG],[o.STYLE,s.STYLE],[o.SUB,s.SUB],[o.SUMMARY,s.SUMMARY],[o.SUP,s.SUP],[o.TABLE,s.TABLE],[o.TBODY,s.TBODY],[o.TEMPLATE,s.TEMPLATE],[o.TEXTAREA,s.TEXTAREA],[o.TFOOT,s.TFOOT],[o.TD,s.TD],[o.TH,s.TH],[o.THEAD,s.THEAD],[o.TITLE,s.TITLE],[o.TR,s.TR],[o.TRACK,s.TRACK],[o.TT,s.TT],[o.U,s.U],[o.UL,s.UL],[o.SVG,s.SVG],[o.VAR,s.VAR],[o.WBR,s.WBR],[o.XMP,s.XMP]]);e.getTagID=function(e){var t;return null!==(t=c.get(e))&&void 0!==t?t:s.UNKNOWN};const u=s;e.SPECIAL_ELEMENTS={[t.HTML]:new Set([u.ADDRESS,u.APPLET,u.AREA,u.ARTICLE,u.ASIDE,u.BASE,u.BASEFONT,u.BGSOUND,u.BLOCKQUOTE,u.BODY,u.BR,u.BUTTON,u.CAPTION,u.CENTER,u.COL,u.COLGROUP,u.DD,u.DETAILS,u.DIR,u.DIV,u.DL,u.DT,u.EMBED,u.FIELDSET,u.FIGCAPTION,u.FIGURE,u.FOOTER,u.FORM,u.FRAME,u.FRAMESET,u.H1,u.H2,u.H3,u.H4,u.H5,u.H6,u.HEAD,u.HEADER,u.HGROUP,u.HR,u.HTML,u.IFRAME,u.IMG,u.INPUT,u.LI,u.LINK,u.LISTING,u.MAIN,u.MARQUEE,u.MENU,u.META,u.NAV,u.NOEMBED,u.NOFRAMES,u.NOSCRIPT,u.OBJECT,u.OL,u.P,u.PARAM,u.PLAINTEXT,u.PRE,u.SCRIPT,u.SECTION,u.SELECT,u.SOURCE,u.STYLE,u.SUMMARY,u.TABLE,u.TBODY,u.TD,u.TEMPLATE,u.TEXTAREA,u.TFOOT,u.TH,u.THEAD,u.TITLE,u.TR,u.TRACK,u.UL,u.WBR,u.XMP]),[t.MATHML]:new Set([u.MI,u.MO,u.MN,u.MS,u.MTEXT,u.ANNOTATION_XML]),[t.SVG]:new Set([u.TITLE,u.FOREIGN_OBJECT,u.DESC]),[t.XLINK]:new Set,[t.XML]:new Set,[t.XMLNS]:new Set},e.isNumberedHeader=function(e){return e===u.H1||e===u.H2||e===u.H3||e===u.H4||e===u.H5||e===u.H6};const h=new Set([o.STYLE,o.SCRIPT,o.XMP,o.IFRAME,o.NOEMBED,o.NOFRAMES,o.PLAINTEXT]);e.hasUnescapedText=function(e,t){return h.has(e)||t&&e===o.NOSCRIPT}})(HP),Object.defineProperty(NP,"__esModule",{value:!0}),NP.Tokenizer=NP.TokenizerMode=void 0;const GP=RP,zP=MP,VP=jP,WP=$S,XP=LP,YP=HP,qP=new Map([[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);var $P;function KP(e){return e>=zP.CODE_POINTS.DIGIT_0&&e<=zP.CODE_POINTS.DIGIT_9}function QP(e){return e>=zP.CODE_POINTS.LATIN_CAPITAL_A&&e<=zP.CODE_POINTS.LATIN_CAPITAL_Z}function ZP(e){return function(e){return e>=zP.CODE_POINTS.LATIN_SMALL_A&&e<=zP.CODE_POINTS.LATIN_SMALL_Z}(e)||QP(e)}function JP(e){return ZP(e)||KP(e)}function eN(e){return e>=zP.CODE_POINTS.LATIN_CAPITAL_A&&e<=zP.CODE_POINTS.LATIN_CAPITAL_F}function tN(e){return e>=zP.CODE_POINTS.LATIN_SMALL_A&&e<=zP.CODE_POINTS.LATIN_SMALL_F}function nN(e){return e+32}function rN(e){return e===zP.CODE_POINTS.SPACE||e===zP.CODE_POINTS.LINE_FEED||e===zP.CODE_POINTS.TABULATION||e===zP.CODE_POINTS.FORM_FEED}function iN(e){return rN(e)||e===zP.CODE_POINTS.SOLIDUS||e===zP.CODE_POINTS.GREATER_THAN_SIGN}(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.NAMED_CHARACTER_REFERENCE=72]="NAMED_CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=73]="AMBIGUOUS_AMPERSAND",e[e.NUMERIC_CHARACTER_REFERENCE=74]="NUMERIC_CHARACTER_REFERENCE",e[e.HEXADEMICAL_CHARACTER_REFERENCE_START=75]="HEXADEMICAL_CHARACTER_REFERENCE_START",e[e.HEXADEMICAL_CHARACTER_REFERENCE=76]="HEXADEMICAL_CHARACTER_REFERENCE",e[e.DECIMAL_CHARACTER_REFERENCE=77]="DECIMAL_CHARACTER_REFERENCE",e[e.NUMERIC_CHARACTER_REFERENCE_END=78]="NUMERIC_CHARACTER_REFERENCE_END"})($P||($P={})),NP.TokenizerMode={DATA:$P.DATA,RCDATA:$P.RCDATA,RAWTEXT:$P.RAWTEXT,SCRIPT_DATA:$P.SCRIPT_DATA,PLAINTEXT:$P.PLAINTEXT,CDATA_SECTION:$P.CDATA_SECTION};let oN=function(){function e(t,n){d(this,e),this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=$P.DATA,this.returnState=$P.DATA,this.charRefCode=-1,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new GP.Preprocessor(n),this.currentLocation=this.getCurrentLocation(-1)}return f(e,[{key:"_err",value:function(e){var t,n;null===(n=(t=this.handler).onParseError)||void 0===n||n.call(t,this.preprocessor.getError(e))}},{key:"getCurrentLocation",value:function(e){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-e,startOffset:this.preprocessor.offset-e,endLine:-1,endCol:-1,endOffset:-1}:null}},{key:"_runParsingLoop",value:function(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this._callState(e)}this.inLoop=!1}}},{key:"pause",value:function(){this.paused=!0}},{key:"resume",value:function(e){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,this.inLoop||(this._runParsingLoop(),this.paused||null==e||e())}},{key:"write",value:function(e,t,n){this.active=!0,this.preprocessor.write(e,t),this._runParsingLoop(),this.paused||null==n||n()}},{key:"insertHtmlAtCurrentPos",value:function(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e),this._runParsingLoop()}},{key:"_ensureHibernation",value:function(){return!!this.preprocessor.endOfChunkHit&&(this._unconsume(this.consumedAfterSnapshot),this.active=!1,!0)}},{key:"_consume",value:function(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}},{key:"_unconsume",value:function(e){this.consumedAfterSnapshot-=e,this.preprocessor.retreat(e)}},{key:"_reconsumeInState",value:function(e,t){this.state=e,this._callState(t)}},{key:"_advanceBy",value:function(e){this.consumedAfterSnapshot+=e;for(let t=0;t0&&this._err(XP.ERR.endTagWithAttributes),e.selfClosing&&this._err(XP.ERR.endTagWithTrailingSolidus),this.handler.onEndTag(e)),this.preprocessor.dropParsedChunk()}},{key:"emitCurrentComment",value:function(e){this.prepareToken(e),this.handler.onComment(e),this.preprocessor.dropParsedChunk()}},{key:"emitCurrentDoctype",value:function(e){this.prepareToken(e),this.handler.onDoctype(e),this.preprocessor.dropParsedChunk()}},{key:"_emitCurrentCharacterToken",value:function(e){if(this.currentCharacterToken){switch(e&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=e.startLine,this.currentCharacterToken.location.endCol=e.startCol,this.currentCharacterToken.location.endOffset=e.startOffset),this.currentCharacterToken.type){case VP.TokenType.CHARACTER:this.handler.onCharacter(this.currentCharacterToken);break;case VP.TokenType.NULL_CHARACTER:this.handler.onNullCharacter(this.currentCharacterToken);break;case VP.TokenType.WHITESPACE_CHARACTER:this.handler.onWhitespaceCharacter(this.currentCharacterToken)}this.currentCharacterToken=null}}},{key:"_emitEOFToken",value:function(){const e=this.getCurrentLocation(0);e&&(e.endLine=e.startLine,e.endCol=e.startCol,e.endOffset=e.startOffset),this._emitCurrentCharacterToken(e),this.handler.onEof({type:VP.TokenType.EOF,location:e}),this.active=!1}},{key:"_appendCharToCurrentCharacterToken",value:function(e,t){if(this.currentCharacterToken){if(this.currentCharacterToken.type===e)return void(this.currentCharacterToken.chars+=t);this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk()}this._createCharacterToken(e,t)}},{key:"_emitCodePoint",value:function(e){const t=rN(e)?VP.TokenType.WHITESPACE_CHARACTER:e===zP.CODE_POINTS.NULL?VP.TokenType.NULL_CHARACTER:VP.TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(t,String.fromCodePoint(e))}},{key:"_emitChars",value:function(e){this._appendCharToCurrentCharacterToken(VP.TokenType.CHARACTER,e)}},{key:"_matchNamedCharacterReference",value:function(e){let t=null,n=0,r=!1;for(let o=0,a=WP.htmlDecodeTree[0];o>=0&&(o=(0,WP.determineBranch)(WP.htmlDecodeTree,a,o+1,e),!(o<0));e=this._consume()){n+=1,a=WP.htmlDecodeTree[o];const s=a&WP.BinTrieFlags.VALUE_LENGTH;if(s){const a=(s>>14)-1;if(e!==zP.CODE_POINTS.SEMICOLON&&this._isCharacterReferenceInAttribute()&&((i=this.preprocessor.peek(1))===zP.CODE_POINTS.EQUALS_SIGN||JP(i))?(t=[zP.CODE_POINTS.AMPERSAND],o+=a):(t=0===a?[WP.htmlDecodeTree[o]&~WP.BinTrieFlags.VALUE_LENGTH]:1===a?[WP.htmlDecodeTree[++o]]:[WP.htmlDecodeTree[++o],WP.htmlDecodeTree[++o]],n=0,r=e!==zP.CODE_POINTS.SEMICOLON),0===a){this._consume();break}}}var i;return this._unconsume(n),r&&!this.preprocessor.endOfChunkHit&&this._err(XP.ERR.missingSemicolonAfterCharacterReference),this._unconsume(1),t}},{key:"_isCharacterReferenceInAttribute",value:function(){return this.returnState===$P.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===$P.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===$P.ATTRIBUTE_VALUE_UNQUOTED}},{key:"_flushCodePointConsumedAsCharacterReference",value:function(e){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(e):this._emitCodePoint(e)}},{key:"_callState",value:function(e){switch(this.state){case $P.DATA:this._stateData(e);break;case $P.RCDATA:this._stateRcdata(e);break;case $P.RAWTEXT:this._stateRawtext(e);break;case $P.SCRIPT_DATA:this._stateScriptData(e);break;case $P.PLAINTEXT:this._statePlaintext(e);break;case $P.TAG_OPEN:this._stateTagOpen(e);break;case $P.END_TAG_OPEN:this._stateEndTagOpen(e);break;case $P.TAG_NAME:this._stateTagName(e);break;case $P.RCDATA_LESS_THAN_SIGN:this._stateRcdataLessThanSign(e);break;case $P.RCDATA_END_TAG_OPEN:this._stateRcdataEndTagOpen(e);break;case $P.RCDATA_END_TAG_NAME:this._stateRcdataEndTagName(e);break;case $P.RAWTEXT_LESS_THAN_SIGN:this._stateRawtextLessThanSign(e);break;case $P.RAWTEXT_END_TAG_OPEN:this._stateRawtextEndTagOpen(e);break;case $P.RAWTEXT_END_TAG_NAME:this._stateRawtextEndTagName(e);break;case $P.SCRIPT_DATA_LESS_THAN_SIGN:this._stateScriptDataLessThanSign(e);break;case $P.SCRIPT_DATA_END_TAG_OPEN:this._stateScriptDataEndTagOpen(e);break;case $P.SCRIPT_DATA_END_TAG_NAME:this._stateScriptDataEndTagName(e);break;case $P.SCRIPT_DATA_ESCAPE_START:this._stateScriptDataEscapeStart(e);break;case $P.SCRIPT_DATA_ESCAPE_START_DASH:this._stateScriptDataEscapeStartDash(e);break;case $P.SCRIPT_DATA_ESCAPED:this._stateScriptDataEscaped(e);break;case $P.SCRIPT_DATA_ESCAPED_DASH:this._stateScriptDataEscapedDash(e);break;case $P.SCRIPT_DATA_ESCAPED_DASH_DASH:this._stateScriptDataEscapedDashDash(e);break;case $P.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataEscapedLessThanSign(e);break;case $P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:this._stateScriptDataEscapedEndTagOpen(e);break;case $P.SCRIPT_DATA_ESCAPED_END_TAG_NAME:this._stateScriptDataEscapedEndTagName(e);break;case $P.SCRIPT_DATA_DOUBLE_ESCAPE_START:this._stateScriptDataDoubleEscapeStart(e);break;case $P.SCRIPT_DATA_DOUBLE_ESCAPED:this._stateScriptDataDoubleEscaped(e);break;case $P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:this._stateScriptDataDoubleEscapedDash(e);break;case $P.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:this._stateScriptDataDoubleEscapedDashDash(e);break;case $P.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:this._stateScriptDataDoubleEscapedLessThanSign(e);break;case $P.SCRIPT_DATA_DOUBLE_ESCAPE_END:this._stateScriptDataDoubleEscapeEnd(e);break;case $P.BEFORE_ATTRIBUTE_NAME:this._stateBeforeAttributeName(e);break;case $P.ATTRIBUTE_NAME:this._stateAttributeName(e);break;case $P.AFTER_ATTRIBUTE_NAME:this._stateAfterAttributeName(e);break;case $P.BEFORE_ATTRIBUTE_VALUE:this._stateBeforeAttributeValue(e);break;case $P.ATTRIBUTE_VALUE_DOUBLE_QUOTED:this._stateAttributeValueDoubleQuoted(e);break;case $P.ATTRIBUTE_VALUE_SINGLE_QUOTED:this._stateAttributeValueSingleQuoted(e);break;case $P.ATTRIBUTE_VALUE_UNQUOTED:this._stateAttributeValueUnquoted(e);break;case $P.AFTER_ATTRIBUTE_VALUE_QUOTED:this._stateAfterAttributeValueQuoted(e);break;case $P.SELF_CLOSING_START_TAG:this._stateSelfClosingStartTag(e);break;case $P.BOGUS_COMMENT:this._stateBogusComment(e);break;case $P.MARKUP_DECLARATION_OPEN:this._stateMarkupDeclarationOpen(e);break;case $P.COMMENT_START:this._stateCommentStart(e);break;case $P.COMMENT_START_DASH:this._stateCommentStartDash(e);break;case $P.COMMENT:this._stateComment(e);break;case $P.COMMENT_LESS_THAN_SIGN:this._stateCommentLessThanSign(e);break;case $P.COMMENT_LESS_THAN_SIGN_BANG:this._stateCommentLessThanSignBang(e);break;case $P.COMMENT_LESS_THAN_SIGN_BANG_DASH:this._stateCommentLessThanSignBangDash(e);break;case $P.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:this._stateCommentLessThanSignBangDashDash(e);break;case $P.COMMENT_END_DASH:this._stateCommentEndDash(e);break;case $P.COMMENT_END:this._stateCommentEnd(e);break;case $P.COMMENT_END_BANG:this._stateCommentEndBang(e);break;case $P.DOCTYPE:this._stateDoctype(e);break;case $P.BEFORE_DOCTYPE_NAME:this._stateBeforeDoctypeName(e);break;case $P.DOCTYPE_NAME:this._stateDoctypeName(e);break;case $P.AFTER_DOCTYPE_NAME:this._stateAfterDoctypeName(e);break;case $P.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._stateAfterDoctypePublicKeyword(e);break;case $P.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:this._stateBeforeDoctypePublicIdentifier(e);break;case $P.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypePublicIdentifierDoubleQuoted(e);break;case $P.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypePublicIdentifierSingleQuoted(e);break;case $P.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:this._stateAfterDoctypePublicIdentifier(e);break;case $P.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:this._stateBetweenDoctypePublicAndSystemIdentifiers(e);break;case $P.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._stateAfterDoctypeSystemKeyword(e);break;case $P.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:this._stateBeforeDoctypeSystemIdentifier(e);break;case $P.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:this._stateDoctypeSystemIdentifierDoubleQuoted(e);break;case $P.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:this._stateDoctypeSystemIdentifierSingleQuoted(e);break;case $P.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:this._stateAfterDoctypeSystemIdentifier(e);break;case $P.BOGUS_DOCTYPE:this._stateBogusDoctype(e);break;case $P.CDATA_SECTION:this._stateCdataSection(e);break;case $P.CDATA_SECTION_BRACKET:this._stateCdataSectionBracket(e);break;case $P.CDATA_SECTION_END:this._stateCdataSectionEnd(e);break;case $P.CHARACTER_REFERENCE:this._stateCharacterReference(e);break;case $P.NAMED_CHARACTER_REFERENCE:this._stateNamedCharacterReference(e);break;case $P.AMBIGUOUS_AMPERSAND:this._stateAmbiguousAmpersand(e);break;case $P.NUMERIC_CHARACTER_REFERENCE:this._stateNumericCharacterReference(e);break;case $P.HEXADEMICAL_CHARACTER_REFERENCE_START:this._stateHexademicalCharacterReferenceStart(e);break;case $P.HEXADEMICAL_CHARACTER_REFERENCE:this._stateHexademicalCharacterReference(e);break;case $P.DECIMAL_CHARACTER_REFERENCE:this._stateDecimalCharacterReference(e);break;case $P.NUMERIC_CHARACTER_REFERENCE_END:this._stateNumericCharacterReferenceEnd(e);break;default:throw new Error("Unknown state")}}},{key:"_stateData",value:function(e){switch(e){case zP.CODE_POINTS.LESS_THAN_SIGN:this.state=$P.TAG_OPEN;break;case zP.CODE_POINTS.AMPERSAND:this.returnState=$P.DATA,this.state=$P.CHARACTER_REFERENCE;break;case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this._emitCodePoint(e);break;case zP.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateRcdata",value:function(e){switch(e){case zP.CODE_POINTS.AMPERSAND:this.returnState=$P.RCDATA,this.state=$P.CHARACTER_REFERENCE;break;case zP.CODE_POINTS.LESS_THAN_SIGN:this.state=$P.RCDATA_LESS_THAN_SIGN;break;case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this._emitChars(zP.REPLACEMENT_CHARACTER);break;case zP.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateRawtext",value:function(e){switch(e){case zP.CODE_POINTS.LESS_THAN_SIGN:this.state=$P.RAWTEXT_LESS_THAN_SIGN;break;case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this._emitChars(zP.REPLACEMENT_CHARACTER);break;case zP.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateScriptData",value:function(e){switch(e){case zP.CODE_POINTS.LESS_THAN_SIGN:this.state=$P.SCRIPT_DATA_LESS_THAN_SIGN;break;case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this._emitChars(zP.REPLACEMENT_CHARACTER);break;case zP.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_statePlaintext",value:function(e){switch(e){case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this._emitChars(zP.REPLACEMENT_CHARACTER);break;case zP.CODE_POINTS.EOF:this._emitEOFToken();break;default:this._emitCodePoint(e)}}},{key:"_stateTagOpen",value:function(e){if(ZP(e))this._createStartTagToken(),this.state=$P.TAG_NAME,this._stateTagName(e);else switch(e){case zP.CODE_POINTS.EXCLAMATION_MARK:this.state=$P.MARKUP_DECLARATION_OPEN;break;case zP.CODE_POINTS.SOLIDUS:this.state=$P.END_TAG_OPEN;break;case zP.CODE_POINTS.QUESTION_MARK:this._err(XP.ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=$P.BOGUS_COMMENT,this._stateBogusComment(e);break;case zP.CODE_POINTS.EOF:this._err(XP.ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break;default:this._err(XP.ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=$P.DATA,this._stateData(e)}}},{key:"_stateEndTagOpen",value:function(e){if(ZP(e))this._createEndTagToken(),this.state=$P.TAG_NAME,this._stateTagName(e);else switch(e){case zP.CODE_POINTS.GREATER_THAN_SIGN:this._err(XP.ERR.missingEndTagName),this.state=$P.DATA;break;case zP.CODE_POINTS.EOF:this._err(XP.ERR.eofBeforeTagName),this._emitChars("");break;case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this.state=$P.SCRIPT_DATA_ESCAPED,this._emitChars(zP.REPLACEMENT_CHARACTER);break;case zP.CODE_POINTS.EOF:this._err(XP.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=$P.SCRIPT_DATA_ESCAPED,this._emitCodePoint(e)}}},{key:"_stateScriptDataEscapedLessThanSign",value:function(e){e===zP.CODE_POINTS.SOLIDUS?this.state=$P.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ZP(e)?(this._emitChars("<"),this.state=$P.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(e)):(this._emitChars("<"),this.state=$P.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(e))}},{key:"_stateScriptDataEscapedEndTagOpen",value:function(e){ZP(e)?(this.state=$P.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(e)):(this._emitChars("");break;case zP.CODE_POINTS.NULL:this._err(XP.ERR.unexpectedNullCharacter),this.state=$P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(zP.REPLACEMENT_CHARACTER);break;case zP.CODE_POINTS.EOF:this._err(XP.ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break;default:this.state=$P.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(e)}}},{key:"_stateScriptDataDoubleEscapedLessThanSign",value:function(e){e===zP.CODE_POINTS.SOLIDUS?(this.state=$P.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=$P.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(e))}},{key:"_stateScriptDataDoubleEscapeEnd",value:function(e){if(this.preprocessor.startsWith(zP.SEQUENCES.SCRIPT,!1)&&iN(this.preprocessor.peek(zP.SEQUENCES.SCRIPT.length))){this._emitCodePoint(e);for(let e=0;e1114111)this._err(XP.ERR.characterReferenceOutsideUnicodeRange),this.charRefCode=zP.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,zP.isSurrogate)(this.charRefCode))this._err(XP.ERR.surrogateCharacterReference),this.charRefCode=zP.CODE_POINTS.REPLACEMENT_CHARACTER;else if((0,zP.isUndefinedCodePoint)(this.charRefCode))this._err(XP.ERR.noncharacterCharacterReference);else if((0,zP.isControlCodePoint)(this.charRefCode)||this.charRefCode===zP.CODE_POINTS.CARRIAGE_RETURN){this._err(XP.ERR.controlCharacterReference);const e=qP.get(this.charRefCode);void 0!==e&&(this.charRefCode=e)}this._flushCodePointConsumedAsCharacterReference(this.charRefCode),this._reconsumeInState(this.returnState,e)}}]),e}();NP.Tokenizer=oN;var aN={};Object.defineProperty(aN,"__esModule",{value:!0}),aN.OpenElementStack=void 0;const sN=HP,lN=new Set([sN.TAG_ID.DD,sN.TAG_ID.DT,sN.TAG_ID.LI,sN.TAG_ID.OPTGROUP,sN.TAG_ID.OPTION,sN.TAG_ID.P,sN.TAG_ID.RB,sN.TAG_ID.RP,sN.TAG_ID.RT,sN.TAG_ID.RTC]),cN=new Set([...lN,sN.TAG_ID.CAPTION,sN.TAG_ID.COLGROUP,sN.TAG_ID.TBODY,sN.TAG_ID.TD,sN.TAG_ID.TFOOT,sN.TAG_ID.TH,sN.TAG_ID.THEAD,sN.TAG_ID.TR]),uN=new Map([[sN.TAG_ID.APPLET,sN.NS.HTML],[sN.TAG_ID.CAPTION,sN.NS.HTML],[sN.TAG_ID.HTML,sN.NS.HTML],[sN.TAG_ID.MARQUEE,sN.NS.HTML],[sN.TAG_ID.OBJECT,sN.NS.HTML],[sN.TAG_ID.TABLE,sN.NS.HTML],[sN.TAG_ID.TD,sN.NS.HTML],[sN.TAG_ID.TEMPLATE,sN.NS.HTML],[sN.TAG_ID.TH,sN.NS.HTML],[sN.TAG_ID.ANNOTATION_XML,sN.NS.MATHML],[sN.TAG_ID.MI,sN.NS.MATHML],[sN.TAG_ID.MN,sN.NS.MATHML],[sN.TAG_ID.MO,sN.NS.MATHML],[sN.TAG_ID.MS,sN.NS.MATHML],[sN.TAG_ID.MTEXT,sN.NS.MATHML],[sN.TAG_ID.DESC,sN.NS.SVG],[sN.TAG_ID.FOREIGN_OBJECT,sN.NS.SVG],[sN.TAG_ID.TITLE,sN.NS.SVG]]),hN=[sN.TAG_ID.H1,sN.TAG_ID.H2,sN.TAG_ID.H3,sN.TAG_ID.H4,sN.TAG_ID.H5,sN.TAG_ID.H6],dN=[sN.TAG_ID.TR,sN.TAG_ID.TEMPLATE,sN.TAG_ID.HTML],pN=[sN.TAG_ID.TBODY,sN.TAG_ID.TFOOT,sN.TAG_ID.THEAD,sN.TAG_ID.TEMPLATE,sN.TAG_ID.HTML],fN=[sN.TAG_ID.TABLE,sN.TAG_ID.TEMPLATE,sN.TAG_ID.HTML],mN=[sN.TAG_ID.TD,sN.TAG_ID.TH];let gN=function(){function e(t,n,r){d(this,e),this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=sN.TAG_ID.UNKNOWN,this.current=t}return f(e,[{key:"currentTmplContentOrNode",get:function(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}},{key:"_indexOf",value:function(e){return this.items.lastIndexOf(e,this.stackTop)}},{key:"_isInTemplate",value:function(){return this.currentTagId===sN.TAG_ID.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===sN.NS.HTML}},{key:"_updateCurrentElement",value:function(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}},{key:"push",value:function(e,t){this.stackTop++,this.items[this.stackTop]=e,this.current=e,this.tagIDs[this.stackTop]=t,this.currentTagId=t,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(e,t,!0)}},{key:"pop",value:function(){const e=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!0)}},{key:"replace",value:function(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&(this.current=t)}},{key:"insertAfter",value:function(e,t,n){const r=this._indexOf(e)+1;this.items.splice(r,0,t),this.tagIDs.splice(r,0,n),this.stackTop++,r===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,r===this.stackTop)}},{key:"popUntilTagNamePopped",value:function(e){let t=this.stackTop+1;do{t=this.tagIDs.lastIndexOf(e,t-1)}while(t>0&&this.treeAdapter.getNamespaceURI(this.items[t])!==sN.NS.HTML);this.shortenToLength(t<0?0:t)}},{key:"shortenToLength",value:function(e){for(;this.stackTop>=e;){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,this.stackTop=0;n--)if(e.includes(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===t)return n;return-1}},{key:"clearBackTo",value:function(e,t){const n=this._indexOfTagNames(e,t);this.shortenToLength(n+1)}},{key:"clearBackToTableContext",value:function(){this.clearBackTo(fN,sN.NS.HTML)}},{key:"clearBackToTableBodyContext",value:function(){this.clearBackTo(pN,sN.NS.HTML)}},{key:"clearBackToTableRowContext",value:function(){this.clearBackTo(dN,sN.NS.HTML)}},{key:"remove",value:function(e){const t=this._indexOf(e);t>=0&&(t===this.stackTop?this.pop():(this.items.splice(t,1),this.tagIDs.splice(t,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(e,!1)))}},{key:"tryPeekProperlyNestedBodyElement",value:function(){return this.stackTop>=1&&this.tagIDs[1]===sN.TAG_ID.BODY?this.items[1]:null}},{key:"contains",value:function(e){return this._indexOf(e)>-1}},{key:"getCommonAncestor",value:function(e){const t=this._indexOf(e)-1;return t>=0?this.items[t]:null}},{key:"isRootHtmlElementCurrent",value:function(){return 0===this.stackTop&&this.tagIDs[0]===sN.TAG_ID.HTML}},{key:"hasInScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===sN.NS.HTML)return!0;if(uN.get(n)===r)return!1}return!0}},{key:"hasNumberedHeaderInScope",value:function(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e],n=this.treeAdapter.getNamespaceURI(this.items[e]);if((0,sN.isNumberedHeader)(t)&&n===sN.NS.HTML)return!0;if(uN.get(t)===n)return!1}return!0}},{key:"hasInListItemScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===sN.NS.HTML)return!0;if((n===sN.TAG_ID.UL||n===sN.TAG_ID.OL)&&r===sN.NS.HTML||uN.get(n)===r)return!1}return!0}},{key:"hasInButtonScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t],r=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&r===sN.NS.HTML)return!0;if(n===sN.TAG_ID.BUTTON&&r===sN.NS.HTML||uN.get(n)===r)return!1}return!0}},{key:"hasInTableScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===sN.NS.HTML){if(n===e)return!0;if(n===sN.TAG_ID.TABLE||n===sN.TAG_ID.TEMPLATE||n===sN.TAG_ID.HTML)return!1}}return!0}},{key:"hasTableBodyContextInTableScope",value:function(){for(let e=this.stackTop;e>=0;e--){const t=this.tagIDs[e];if(this.treeAdapter.getNamespaceURI(this.items[e])===sN.NS.HTML){if(t===sN.TAG_ID.TBODY||t===sN.TAG_ID.THEAD||t===sN.TAG_ID.TFOOT)return!0;if(t===sN.TAG_ID.TABLE||t===sN.TAG_ID.HTML)return!1}}return!0}},{key:"hasInSelectScope",value:function(e){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];if(this.treeAdapter.getNamespaceURI(this.items[t])===sN.NS.HTML){if(n===e)return!0;if(n!==sN.TAG_ID.OPTION&&n!==sN.TAG_ID.OPTGROUP)return!1}}return!0}},{key:"generateImpliedEndTags",value:function(){for(;lN.has(this.currentTagId);)this.pop()}},{key:"generateImpliedEndTagsThoroughly",value:function(){for(;cN.has(this.currentTagId);)this.pop()}},{key:"generateImpliedEndTagsWithExclusion",value:function(e){for(;this.currentTagId!==e&&cN.has(this.currentTagId);)this.pop()}}]),e}();aN.OpenElementStack=gN;var bN={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.FormattingElementList=e.EntryType=void 0;var t,n;(n=t=e.EntryType||(e.EntryType={}))[n.Marker=0]="Marker",n[n.Element=1]="Element";const r={type:t.Marker};let i=function(){function e(t){d(this,e),this.treeAdapter=t,this.entries=[],this.bookmark=null}return f(e,[{key:"_getNoahArkConditionCandidates",value:function(e,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(e),a=this.treeAdapter.getNamespaceURI(e);for(let e=0;e[e.name,e.value])));let i=0;for(let e=0;er.get(e.name)===e.value))&&(i+=1,i>=3&&this.entries.splice(t.idx,1))}}},{key:"insertMarker",value:function(){this.entries.unshift(r)}},{key:"pushElement",value:function(e,n){this._ensureNoahArkCondition(e),this.entries.unshift({type:t.Element,element:e,token:n})}},{key:"insertElementAfterBookmark",value:function(e,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:t.Element,element:e,token:n})}},{key:"removeEntry",value:function(e){const t=this.entries.indexOf(e);t>=0&&this.entries.splice(t,1)}},{key:"clearToLastMarker",value:function(){const e=this.entries.indexOf(r);e>=0?this.entries.splice(0,e+1):this.entries.length=0}},{key:"getElementEntryInScopeWithTagName",value:function(e){const n=this.entries.find((n=>n.type===t.Marker||this.treeAdapter.getTagName(n.element)===e));return n&&n.type===t.Element?n:null}},{key:"getElementEntry",value:function(e){return this.entries.find((n=>n.type===t.Element&&n.element===e))}}]),e}();e.FormattingElementList=i}(bN);var vN={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTreeAdapter=void 0;const t=HP;function n(e){return{nodeName:"#text",value:e,parentNode:null}}e.defaultTreeAdapter={createDocument:()=>({nodeName:"#document",mode:t.DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}),createDocumentFragment:()=>({nodeName:"#document-fragment",childNodes:[]}),createElement:(e,t,n)=>({nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}),createCommentNode:e=>({nodeName:"#comment",data:e,parentNode:null}),appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent:e=>e.content,setDocumentType(t,n,r,i){const o=t.childNodes.find((e=>"#documentType"===e.nodeName));if(o)o.name=n,o.publicId=r,o.systemId=i;else{const o={nodeName:"#documentType",name:n,publicId:r,systemId:i,parentNode:null};e.defaultTreeAdapter.appendChild(t,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode:e=>e.mode,detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(t,r){if(t.childNodes.length>0){const n=t.childNodes[t.childNodes.length-1];if(e.defaultTreeAdapter.isTextNode(n))return void(n.value+=r)}e.defaultTreeAdapter.appendChild(t,n(r))},insertTextBefore(t,r,i){const o=t.childNodes[t.childNodes.indexOf(i)-1];o&&e.defaultTreeAdapter.isTextNode(o)?o.value+=r:e.defaultTreeAdapter.insertBefore(t,n(r),i)},adoptAttributes(e,t){const n=new Set(e.attrs.map((e=>e.name)));for(let r=0;re.childNodes[0],getChildNodes:e=>e.childNodes,getParentNode:e=>e.parentNode,getAttrList:e=>e.attrs,getTagName:e=>e.tagName,getNamespaceURI:e=>e.namespaceURI,getTextNodeContent:e=>e.value,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName:e=>e.name,getDocumentTypeNodePublicId:e=>e.publicId,getDocumentTypeNodeSystemId:e=>e.systemId,isTextNode:e=>"#text"===e.nodeName,isCommentNode:e=>"#comment"===e.nodeName,isDocumentTypeNode:e=>"#documentType"===e.nodeName,isElementNode:e=>Object.prototype.hasOwnProperty.call(e,"tagName"),setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}}(vN);var yN={};Object.defineProperty(yN,"__esModule",{value:!0}),yN.getDocumentMode=yN.isConforming=void 0;const TN=HP,_N="html",EN=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],xN=[...EN,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],wN=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),SN=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],kN=[...SN,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function AN(e,t){return t.some((t=>e.startsWith(t)))}yN.isConforming=function(e){return e.name===_N&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},yN.getDocumentMode=function(e){if(e.name!==_N)return TN.DOCUMENT_MODE.QUIRKS;const{systemId:t}=e;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return TN.DOCUMENT_MODE.QUIRKS;let{publicId:n}=e;if(null!==n){if(n=n.toLowerCase(),wN.has(n))return TN.DOCUMENT_MODE.QUIRKS;let e=null===t?xN:EN;if(AN(n,e))return TN.DOCUMENT_MODE.QUIRKS;if(e=null===t?SN:kN,AN(n,e))return TN.DOCUMENT_MODE.LIMITED_QUIRKS}return TN.DOCUMENT_MODE.NO_QUIRKS};var CN={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isIntegrationPoint=e.adjustTokenSVGTagName=e.adjustTokenXMLAttrs=e.adjustTokenSVGAttrs=e.adjustTokenMathMLAttrs=e.causesExit=e.SVG_TAG_NAMES_ADJUSTMENT_MAP=void 0;const t=HP,n={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},r=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map((e=>[e.toLowerCase(),e]))),i=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:t.NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:t.NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:t.NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:t.NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:t.NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:t.NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:t.NS.XLINK}],["xml:base",{prefix:"xml",name:"base",namespace:t.NS.XML}],["xml:lang",{prefix:"xml",name:"lang",namespace:t.NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:t.NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:t.NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:t.NS.XMLNS}]]);e.SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map((e=>[e.toLowerCase(),e])));const o=new Set([t.TAG_ID.B,t.TAG_ID.BIG,t.TAG_ID.BLOCKQUOTE,t.TAG_ID.BODY,t.TAG_ID.BR,t.TAG_ID.CENTER,t.TAG_ID.CODE,t.TAG_ID.DD,t.TAG_ID.DIV,t.TAG_ID.DL,t.TAG_ID.DT,t.TAG_ID.EM,t.TAG_ID.EMBED,t.TAG_ID.H1,t.TAG_ID.H2,t.TAG_ID.H3,t.TAG_ID.H4,t.TAG_ID.H5,t.TAG_ID.H6,t.TAG_ID.HEAD,t.TAG_ID.HR,t.TAG_ID.I,t.TAG_ID.IMG,t.TAG_ID.LI,t.TAG_ID.LISTING,t.TAG_ID.MENU,t.TAG_ID.META,t.TAG_ID.NOBR,t.TAG_ID.OL,t.TAG_ID.P,t.TAG_ID.PRE,t.TAG_ID.RUBY,t.TAG_ID.S,t.TAG_ID.SMALL,t.TAG_ID.SPAN,t.TAG_ID.STRONG,t.TAG_ID.STRIKE,t.TAG_ID.SUB,t.TAG_ID.SUP,t.TAG_ID.TABLE,t.TAG_ID.TT,t.TAG_ID.U,t.TAG_ID.UL,t.TAG_ID.VAR]);e.causesExit=function(e){const n=e.tagID;return n===t.TAG_ID.FONT&&e.attrs.some((({name:e})=>e===t.ATTRS.COLOR||e===t.ATTRS.SIZE||e===t.ATTRS.FACE))||o.has(n)},e.adjustTokenMathMLAttrs=function(e){for(let t=0;t0&&this._setContextModes(e,t)}},{key:"onItemPop",value:function(e,t){var n,r;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(e,this.currentToken),null===(r=(n=this.treeAdapter).onItemPop)||void 0===r||r.call(n,e,this.openElements.current),t){let e,t;0===this.openElements.stackTop&&this.fragmentContext?(e=this.fragmentContext,t=this.fragmentContextID):({current:e,currentTagId:t}=this.openElements),this._setContextModes(e,t)}}},{key:"_setContextModes",value:function(e,t){const n=e===this.document||this.treeAdapter.getNamespaceURI(e)===BN.NS.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(t,e)}},{key:"_switchToTextParsing",value:function(e,t){this._insertElement(e,BN.NS.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=GN.TEXT}},{key:"switchToPlaintextParsing",value:function(){this.insertionMode=GN.TEXT,this.originalInsertionMode=GN.IN_BODY,this.tokenizer.state=IN.TokenizerMode.PLAINTEXT}},{key:"_getAdjustedCurrentElement",value:function(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}},{key:"_findFormInFragmentContext",value:function(){let e=this.fragmentContext;for(;e;){if(this.treeAdapter.getTagName(e)===BN.TAG_NAMES.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e)}}},{key:"_initTokenizerForFragmentParsing",value:function(){if(this.fragmentContext&&this.treeAdapter.getNamespaceURI(this.fragmentContext)===BN.NS.HTML)switch(this.fragmentContextID){case BN.TAG_ID.TITLE:case BN.TAG_ID.TEXTAREA:this.tokenizer.state=IN.TokenizerMode.RCDATA;break;case BN.TAG_ID.STYLE:case BN.TAG_ID.XMP:case BN.TAG_ID.IFRAME:case BN.TAG_ID.NOEMBED:case BN.TAG_ID.NOFRAMES:case BN.TAG_ID.NOSCRIPT:this.tokenizer.state=IN.TokenizerMode.RAWTEXT;break;case BN.TAG_ID.SCRIPT:this.tokenizer.state=IN.TokenizerMode.SCRIPT_DATA;break;case BN.TAG_ID.PLAINTEXT:this.tokenizer.state=IN.TokenizerMode.PLAINTEXT}}},{key:"_setDocumentType",value:function(e){const t=e.name||"",n=e.publicId||"",r=e.systemId||"";if(this.treeAdapter.setDocumentType(this.document,t,n,r),e.location){const t=this.treeAdapter.getChildNodes(this.document).find((e=>this.treeAdapter.isDocumentTypeNode(e)));t&&this.treeAdapter.setNodeSourceCodeLocation(t,e.location)}}},{key:"_attachElementToTree",value:function(e,t){if(this.options.sourceCodeLocationInfo){const n=t&&Object.assign(Object.assign({},t),{startTag:t});this.treeAdapter.setNodeSourceCodeLocation(e,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(t,e)}}},{key:"_appendElement",value:function(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location)}},{key:"_insertElement",value:function(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n,e.location),this.openElements.push(n,e.tagID)}},{key:"_insertFakeElement",value:function(e,t){const n=this.treeAdapter.createElement(e,BN.NS.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,t)}},{key:"_insertTemplate",value:function(e){const t=this.treeAdapter.createElement(e.tagName,BN.NS.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t,e.location),this.openElements.push(t,e.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}},{key:"_insertFakeRootElement",value:function(){const e=this.treeAdapter.createElement(BN.TAG_NAMES.HTML,BN.NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(e,null),this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e,BN.TAG_ID.HTML)}},{key:"_appendCommentNode",value:function(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,e.location)}},{key:"_insertCharacters",value:function(e){let t,n;if(this._shouldFosterParentOnInsertion()?(({parent:t,beforeElement:n}=this._findFosterParentingLocation()),n?this.treeAdapter.insertTextBefore(t,e.chars,n):this.treeAdapter.insertText(t,e.chars)):(t=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(t,e.chars)),!e.location)return;const r=this.treeAdapter.getChildNodes(t),i=n?r.lastIndexOf(n):r.length,o=r[i-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:t,endCol:n,endOffset:r}=e.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:t,endCol:n,endOffset:r})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,e.location)}},{key:"_adoptNodes",value:function(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n)}},{key:"_setEndLocation",value:function(e,t){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,r=this.treeAdapter.getTagName(e),i=t.type===FN.TokenType.END_TAG&&r===t.tagName?{endTag:Object.assign({},n),endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(e,i)}}},{key:"shouldProcessStartTagTokenInForeignContent",value:function(e){if(!this.currentNotInHTML)return!1;let t,n;return 0===this.openElements.stackTop&&this.fragmentContext?(t=this.fragmentContext,n=this.fragmentContextID):({current:t,currentTagId:n}=this.openElements),(e.tagID!==BN.TAG_ID.SVG||this.treeAdapter.getTagName(t)!==BN.TAG_NAMES.ANNOTATION_XML||this.treeAdapter.getNamespaceURI(t)!==BN.NS.MATHML)&&(this.tokenizer.inForeignNode||(e.tagID===BN.TAG_ID.MGLYPH||e.tagID===BN.TAG_ID.MALIGNMARK)&&!this._isIntegrationPoint(n,t,BN.NS.HTML))}},{key:"_processToken",value:function(e){switch(e.type){case FN.TokenType.CHARACTER:this.onCharacter(e);break;case FN.TokenType.NULL_CHARACTER:this.onNullCharacter(e);break;case FN.TokenType.COMMENT:this.onComment(e);break;case FN.TokenType.DOCTYPE:this.onDoctype(e);break;case FN.TokenType.START_TAG:this._processStartTag(e);break;case FN.TokenType.END_TAG:this.onEndTag(e);break;case FN.TokenType.EOF:this.onEof(e);break;case FN.TokenType.WHITESPACE_CHARACTER:this.onWhitespaceCharacter(e)}}},{key:"_isIntegrationPoint",value:function(e,t,n){const r=this.treeAdapter.getNamespaceURI(t),i=this.treeAdapter.getAttrList(t);return RN.isIntegrationPoint(e,r,i,n)}},{key:"_reconstructActiveFormattingElements",value:function(){const e=this.activeFormattingElements.entries.length;if(e){const t=this.activeFormattingElements.entries.findIndex((e=>e.type===DN.EntryType.Marker||this.openElements.contains(e.element)));for(let n=t<0?e-1:t-1;n>=0;n--){const e=this.activeFormattingElements.entries[n];this._insertElement(e.token,this.treeAdapter.getNamespaceURI(e.element)),e.element=this.openElements.current}}}},{key:"_closeTableCell",value:function(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=GN.IN_ROW}},{key:"_closePElement",value:function(){this.openElements.generateImpliedEndTagsWithExclusion(BN.TAG_ID.P),this.openElements.popUntilTagNamePopped(BN.TAG_ID.P)}},{key:"_resetInsertionMode",value:function(){for(let e=this.openElements.stackTop;e>=0;e--)switch(0===e&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[e]){case BN.TAG_ID.TR:return void(this.insertionMode=GN.IN_ROW);case BN.TAG_ID.TBODY:case BN.TAG_ID.THEAD:case BN.TAG_ID.TFOOT:return void(this.insertionMode=GN.IN_TABLE_BODY);case BN.TAG_ID.CAPTION:return void(this.insertionMode=GN.IN_CAPTION);case BN.TAG_ID.COLGROUP:return void(this.insertionMode=GN.IN_COLUMN_GROUP);case BN.TAG_ID.TABLE:return void(this.insertionMode=GN.IN_TABLE);case BN.TAG_ID.BODY:return void(this.insertionMode=GN.IN_BODY);case BN.TAG_ID.FRAMESET:return void(this.insertionMode=GN.IN_FRAMESET);case BN.TAG_ID.SELECT:return void this._resetInsertionModeForSelect(e);case BN.TAG_ID.TEMPLATE:return void(this.insertionMode=this.tmplInsertionModeStack[0]);case BN.TAG_ID.HTML:return void(this.insertionMode=this.headElement?GN.AFTER_HEAD:GN.BEFORE_HEAD);case BN.TAG_ID.TD:case BN.TAG_ID.TH:if(e>0)return void(this.insertionMode=GN.IN_CELL);break;case BN.TAG_ID.HEAD:if(e>0)return void(this.insertionMode=GN.IN_HEAD)}this.insertionMode=GN.IN_BODY}},{key:"_resetInsertionModeForSelect",value:function(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.tagIDs[t];if(e===BN.TAG_ID.TEMPLATE)break;if(e===BN.TAG_ID.TABLE)return void(this.insertionMode=GN.IN_SELECT_IN_TABLE)}this.insertionMode=GN.IN_SELECT}},{key:"_isElementCausesFosterParenting",value:function(e){return VN.has(e)}},{key:"_shouldFosterParentOnInsertion",value:function(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}},{key:"_findFosterParentingLocation",value:function(){for(let e=this.openElements.stackTop;e>=0;e--){const t=this.openElements.items[e];switch(this.openElements.tagIDs[e]){case BN.TAG_ID.TEMPLATE:if(this.treeAdapter.getNamespaceURI(t)===BN.NS.HTML)return{parent:this.treeAdapter.getTemplateContent(t),beforeElement:null};break;case BN.TAG_ID.TABLE:{const n=this.treeAdapter.getParentNode(t);return n?{parent:n,beforeElement:t}:{parent:this.openElements.items[e-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}},{key:"_fosterParentElement",value:function(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e)}},{key:"_isSpecialElement",value:function(e,t){const n=this.treeAdapter.getNamespaceURI(e);return BN.SPECIAL_ELEMENTS[n].has(t)}},{key:"onCharacter",value:function(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){e._insertCharacters(t),e.framesetOk=!1}(this,e);else switch(this.insertionMode){case GN.INITIAL:nR(this,e);break;case GN.BEFORE_HTML:rR(this,e);break;case GN.BEFORE_HEAD:iR(this,e);break;case GN.IN_HEAD:sR(this,e);break;case GN.IN_HEAD_NO_SCRIPT:lR(this,e);break;case GN.AFTER_HEAD:cR(this,e);break;case GN.IN_BODY:case GN.IN_CAPTION:case GN.IN_CELL:case GN.IN_TEMPLATE:dR(this,e);break;case GN.TEXT:case GN.IN_SELECT:case GN.IN_SELECT_IN_TABLE:this._insertCharacters(e);break;case GN.IN_TABLE:case GN.IN_TABLE_BODY:case GN.IN_ROW:_R(this,e);break;case GN.IN_TABLE_TEXT:kR(this,e);break;case GN.IN_COLUMN_GROUP:OR(this,e);break;case GN.AFTER_BODY:UR(this,e);break;case GN.AFTER_AFTER_BODY:jR(this,e)}}},{key:"onNullCharacter",value:function(e){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode)!function(e,t){t.chars=LN.REPLACEMENT_CHARACTER,e._insertCharacters(t)}(this,e);else switch(this.insertionMode){case GN.INITIAL:nR(this,e);break;case GN.BEFORE_HTML:rR(this,e);break;case GN.BEFORE_HEAD:iR(this,e);break;case GN.IN_HEAD:sR(this,e);break;case GN.IN_HEAD_NO_SCRIPT:lR(this,e);break;case GN.AFTER_HEAD:cR(this,e);break;case GN.TEXT:this._insertCharacters(e);break;case GN.IN_TABLE:case GN.IN_TABLE_BODY:case GN.IN_ROW:_R(this,e);break;case GN.IN_COLUMN_GROUP:OR(this,e);break;case GN.AFTER_BODY:UR(this,e);break;case GN.AFTER_AFTER_BODY:jR(this,e)}}},{key:"onComment",value:function(e){if(this.skipNextNewLine=!1,this.currentNotInHTML)eR(this,e);else switch(this.insertionMode){case GN.INITIAL:case GN.BEFORE_HTML:case GN.BEFORE_HEAD:case GN.IN_HEAD:case GN.IN_HEAD_NO_SCRIPT:case GN.AFTER_HEAD:case GN.IN_BODY:case GN.IN_TABLE:case GN.IN_CAPTION:case GN.IN_COLUMN_GROUP:case GN.IN_TABLE_BODY:case GN.IN_ROW:case GN.IN_CELL:case GN.IN_SELECT:case GN.IN_SELECT_IN_TABLE:case GN.IN_TEMPLATE:case GN.IN_FRAMESET:case GN.AFTER_FRAMESET:eR(this,e);break;case GN.IN_TABLE_TEXT:AR(this,e);break;case GN.AFTER_BODY:!function(e,t){e._appendCommentNode(t,e.openElements.items[0])}(this,e);break;case GN.AFTER_AFTER_BODY:case GN.AFTER_AFTER_FRAMESET:!function(e,t){e._appendCommentNode(t,e.document)}(this,e)}}},{key:"onDoctype",value:function(e){switch(this.skipNextNewLine=!1,this.insertionMode){case GN.INITIAL:!function(e,t){e._setDocumentType(t);const n=t.forceQuirks?BN.DOCUMENT_MODE.QUIRKS:NN.getDocumentMode(t);NN.isConforming(t)||e._err(t,MN.ERR.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=GN.BEFORE_HTML}(this,e);break;case GN.BEFORE_HEAD:case GN.IN_HEAD:case GN.IN_HEAD_NO_SCRIPT:case GN.AFTER_HEAD:this._err(e,MN.ERR.misplacedDoctype);break;case GN.IN_TABLE_TEXT:AR(this,e)}}},{key:"onStartTag",value:function(e){this.skipNextNewLine=!1,this.currentToken=e,this._processStartTag(e),e.selfClosing&&!e.ackSelfClosing&&this._err(e,MN.ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}},{key:"_processStartTag",value:function(e){this.shouldProcessStartTagTokenInForeignContent(e)?function(e,t){if(RN.causesExit(t))HR(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===BN.NS.MATHML?RN.adjustTokenMathMLAttrs(t):r===BN.NS.SVG&&(RN.adjustTokenSVGTagName(t),RN.adjustTokenSVGAttrs(t)),RN.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}(this,e):this._startTagOutsideForeignContent(e)}},{key:"_startTagOutsideForeignContent",value:function(e){switch(this.insertionMode){case GN.INITIAL:nR(this,e);break;case GN.BEFORE_HTML:!function(e,t){t.tagID===BN.TAG_ID.HTML?(e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.BEFORE_HEAD):rR(e,t)}(this,e);break;case GN.BEFORE_HEAD:!function(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.HEAD:e._insertElement(t,BN.NS.HTML),e.headElement=e.openElements.current,e.insertionMode=GN.IN_HEAD;break;default:iR(e,t)}}(this,e);break;case GN.IN_HEAD:oR(this,e);break;case GN.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.BASEFONT:case BN.TAG_ID.BGSOUND:case BN.TAG_ID.HEAD:case BN.TAG_ID.LINK:case BN.TAG_ID.META:case BN.TAG_ID.NOFRAMES:case BN.TAG_ID.STYLE:oR(e,t);break;case BN.TAG_ID.NOSCRIPT:e._err(t,MN.ERR.nestedNoscriptInHead);break;default:lR(e,t)}}(this,e);break;case GN.AFTER_HEAD:!function(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.BODY:e._insertElement(t,BN.NS.HTML),e.framesetOk=!1,e.insertionMode=GN.IN_BODY;break;case BN.TAG_ID.FRAMESET:e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.IN_FRAMESET;break;case BN.TAG_ID.BASE:case BN.TAG_ID.BASEFONT:case BN.TAG_ID.BGSOUND:case BN.TAG_ID.LINK:case BN.TAG_ID.META:case BN.TAG_ID.NOFRAMES:case BN.TAG_ID.SCRIPT:case BN.TAG_ID.STYLE:case BN.TAG_ID.TEMPLATE:case BN.TAG_ID.TITLE:e._err(t,MN.ERR.abandonedHeadElementChild),e.openElements.push(e.headElement,BN.TAG_ID.HEAD),oR(e,t),e.openElements.remove(e.headElement);break;case BN.TAG_ID.HEAD:e._err(t,MN.ERR.misplacedStartTagForHeadElement);break;default:cR(e,t)}}(this,e);break;case GN.IN_BODY:bR(this,e);break;case GN.IN_TABLE:ER(this,e);break;case GN.IN_TABLE_TEXT:AR(this,e);break;case GN.IN_CAPTION:!function(e,t){const n=t.tagID;CR.has(n)?e.openElements.hasInTableScope(BN.TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(BN.TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=GN.IN_TABLE,ER(e,t)):bR(e,t)}(this,e);break;case GN.IN_COLUMN_GROUP:IR(this,e);break;case GN.IN_TABLE_BODY:DR(this,e);break;case GN.IN_ROW:NR(this,e);break;case GN.IN_CELL:!function(e,t){const n=t.tagID;CR.has(n)?(e.openElements.hasInTableScope(BN.TAG_ID.TD)||e.openElements.hasInTableScope(BN.TAG_ID.TH))&&(e._closeTableCell(),NR(e,t)):bR(e,t)}(this,e);break;case GN.IN_SELECT:MR(this,e);break;case GN.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===BN.TAG_ID.CAPTION||n===BN.TAG_ID.TABLE||n===BN.TAG_ID.TBODY||n===BN.TAG_ID.TFOOT||n===BN.TAG_ID.THEAD||n===BN.TAG_ID.TR||n===BN.TAG_ID.TD||n===BN.TAG_ID.TH?(e.openElements.popUntilTagNamePopped(BN.TAG_ID.SELECT),e._resetInsertionMode(),e._processStartTag(t)):MR(e,t)}(this,e);break;case GN.IN_TEMPLATE:!function(e,t){switch(t.tagID){case BN.TAG_ID.BASE:case BN.TAG_ID.BASEFONT:case BN.TAG_ID.BGSOUND:case BN.TAG_ID.LINK:case BN.TAG_ID.META:case BN.TAG_ID.NOFRAMES:case BN.TAG_ID.SCRIPT:case BN.TAG_ID.STYLE:case BN.TAG_ID.TEMPLATE:case BN.TAG_ID.TITLE:oR(e,t);break;case BN.TAG_ID.CAPTION:case BN.TAG_ID.COLGROUP:case BN.TAG_ID.TBODY:case BN.TAG_ID.TFOOT:case BN.TAG_ID.THEAD:e.tmplInsertionModeStack[0]=GN.IN_TABLE,e.insertionMode=GN.IN_TABLE,ER(e,t);break;case BN.TAG_ID.COL:e.tmplInsertionModeStack[0]=GN.IN_COLUMN_GROUP,e.insertionMode=GN.IN_COLUMN_GROUP,IR(e,t);break;case BN.TAG_ID.TR:e.tmplInsertionModeStack[0]=GN.IN_TABLE_BODY,e.insertionMode=GN.IN_TABLE_BODY,DR(e,t);break;case BN.TAG_ID.TD:case BN.TAG_ID.TH:e.tmplInsertionModeStack[0]=GN.IN_ROW,e.insertionMode=GN.IN_ROW,NR(e,t);break;default:e.tmplInsertionModeStack[0]=GN.IN_BODY,e.insertionMode=GN.IN_BODY,bR(e,t)}}(this,e);break;case GN.AFTER_BODY:!function(e,t){t.tagID===BN.TAG_ID.HTML?bR(e,t):UR(e,t)}(this,e);break;case GN.IN_FRAMESET:!function(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.FRAMESET:e._insertElement(t,BN.NS.HTML);break;case BN.TAG_ID.FRAME:e._appendElement(t,BN.NS.HTML),t.ackSelfClosing=!0;break;case BN.TAG_ID.NOFRAMES:oR(e,t)}}(this,e);break;case GN.AFTER_FRAMESET:!function(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.NOFRAMES:oR(e,t)}}(this,e);break;case GN.AFTER_AFTER_BODY:!function(e,t){t.tagID===BN.TAG_ID.HTML?bR(e,t):jR(e,t)}(this,e);break;case GN.AFTER_AFTER_FRAMESET:!function(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.NOFRAMES:oR(e,t)}}(this,e)}}},{key:"onEndTag",value:function(e){this.skipNextNewLine=!1,this.currentToken=e,this.currentNotInHTML?function(e,t){if(t.tagID===BN.TAG_ID.P||t.tagID===BN.TAG_ID.BR)return HR(e),void e._endTagOutsideForeignContent(t);for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===BN.NS.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}(this,e):this._endTagOutsideForeignContent(e)}},{key:"_endTagOutsideForeignContent",value:function(e){switch(this.insertionMode){case GN.INITIAL:nR(this,e);break;case GN.BEFORE_HTML:!function(e,t){const n=t.tagID;n!==BN.TAG_ID.HTML&&n!==BN.TAG_ID.HEAD&&n!==BN.TAG_ID.BODY&&n!==BN.TAG_ID.BR||rR(e,t)}(this,e);break;case GN.BEFORE_HEAD:!function(e,t){const n=t.tagID;n===BN.TAG_ID.HEAD||n===BN.TAG_ID.BODY||n===BN.TAG_ID.HTML||n===BN.TAG_ID.BR?iR(e,t):e._err(t,MN.ERR.endTagWithoutMatchingOpenElement)}(this,e);break;case GN.IN_HEAD:!function(e,t){switch(t.tagID){case BN.TAG_ID.HEAD:e.openElements.pop(),e.insertionMode=GN.AFTER_HEAD;break;case BN.TAG_ID.BODY:case BN.TAG_ID.BR:case BN.TAG_ID.HTML:sR(e,t);break;case BN.TAG_ID.TEMPLATE:aR(e,t);break;default:e._err(t,MN.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case GN.IN_HEAD_NO_SCRIPT:!function(e,t){switch(t.tagID){case BN.TAG_ID.NOSCRIPT:e.openElements.pop(),e.insertionMode=GN.IN_HEAD;break;case BN.TAG_ID.BR:lR(e,t);break;default:e._err(t,MN.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case GN.AFTER_HEAD:!function(e,t){switch(t.tagID){case BN.TAG_ID.BODY:case BN.TAG_ID.HTML:case BN.TAG_ID.BR:cR(e,t);break;case BN.TAG_ID.TEMPLATE:aR(e,t);break;default:e._err(t,MN.ERR.endTagWithoutMatchingOpenElement)}}(this,e);break;case GN.IN_BODY:yR(this,e);break;case GN.TEXT:!function(e,t){var n;t.tagID===BN.TAG_ID.SCRIPT&&(null===(n=e.scriptHandler)||void 0===n||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}(this,e);break;case GN.IN_TABLE:xR(this,e);break;case GN.IN_TABLE_TEXT:AR(this,e);break;case GN.IN_CAPTION:!function(e,t){const n=t.tagID;switch(n){case BN.TAG_ID.CAPTION:case BN.TAG_ID.TABLE:e.openElements.hasInTableScope(BN.TAG_ID.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(BN.TAG_ID.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=GN.IN_TABLE,n===BN.TAG_ID.TABLE&&xR(e,t));break;case BN.TAG_ID.BODY:case BN.TAG_ID.COL:case BN.TAG_ID.COLGROUP:case BN.TAG_ID.HTML:case BN.TAG_ID.TBODY:case BN.TAG_ID.TD:case BN.TAG_ID.TFOOT:case BN.TAG_ID.TH:case BN.TAG_ID.THEAD:case BN.TAG_ID.TR:break;default:yR(e,t)}}(this,e);break;case GN.IN_COLUMN_GROUP:!function(e,t){switch(t.tagID){case BN.TAG_ID.COLGROUP:e.openElements.currentTagId===BN.TAG_ID.COLGROUP&&(e.openElements.pop(),e.insertionMode=GN.IN_TABLE);break;case BN.TAG_ID.TEMPLATE:aR(e,t);break;case BN.TAG_ID.COL:break;default:OR(e,t)}}(this,e);break;case GN.IN_TABLE_BODY:PR(this,e);break;case GN.IN_ROW:RR(this,e);break;case GN.IN_CELL:!function(e,t){const n=t.tagID;switch(n){case BN.TAG_ID.TD:case BN.TAG_ID.TH:e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=GN.IN_ROW);break;case BN.TAG_ID.TABLE:case BN.TAG_ID.TBODY:case BN.TAG_ID.TFOOT:case BN.TAG_ID.THEAD:case BN.TAG_ID.TR:e.openElements.hasInTableScope(n)&&(e._closeTableCell(),RR(e,t));break;case BN.TAG_ID.BODY:case BN.TAG_ID.CAPTION:case BN.TAG_ID.COL:case BN.TAG_ID.COLGROUP:case BN.TAG_ID.HTML:break;default:yR(e,t)}}(this,e);break;case GN.IN_SELECT:LR(this,e);break;case GN.IN_SELECT_IN_TABLE:!function(e,t){const n=t.tagID;n===BN.TAG_ID.CAPTION||n===BN.TAG_ID.TABLE||n===BN.TAG_ID.TBODY||n===BN.TAG_ID.TFOOT||n===BN.TAG_ID.THEAD||n===BN.TAG_ID.TR||n===BN.TAG_ID.TD||n===BN.TAG_ID.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(BN.TAG_ID.SELECT),e._resetInsertionMode(),e.onEndTag(t)):LR(e,t)}(this,e);break;case GN.IN_TEMPLATE:!function(e,t){t.tagID===BN.TAG_ID.TEMPLATE&&aR(e,t)}(this,e);break;case GN.AFTER_BODY:FR(this,e);break;case GN.IN_FRAMESET:!function(e,t){t.tagID!==BN.TAG_ID.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagId===BN.TAG_ID.FRAMESET||(e.insertionMode=GN.AFTER_FRAMESET))}(this,e);break;case GN.AFTER_FRAMESET:!function(e,t){t.tagID===BN.TAG_ID.HTML&&(e.insertionMode=GN.AFTER_AFTER_FRAMESET)}(this,e);break;case GN.AFTER_AFTER_BODY:jR(this,e)}}},{key:"onEof",value:function(e){switch(this.insertionMode){case GN.INITIAL:nR(this,e);break;case GN.BEFORE_HTML:rR(this,e);break;case GN.BEFORE_HEAD:iR(this,e);break;case GN.IN_HEAD:sR(this,e);break;case GN.IN_HEAD_NO_SCRIPT:lR(this,e);break;case GN.AFTER_HEAD:cR(this,e);break;case GN.IN_BODY:case GN.IN_TABLE:case GN.IN_CAPTION:case GN.IN_COLUMN_GROUP:case GN.IN_TABLE_BODY:case GN.IN_ROW:case GN.IN_CELL:case GN.IN_SELECT:case GN.IN_SELECT_IN_TABLE:TR(this,e);break;case GN.TEXT:!function(e,t){e._err(t,MN.ERR.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}(this,e);break;case GN.IN_TABLE_TEXT:AR(this,e);break;case GN.IN_TEMPLATE:BR(this,e);break;case GN.AFTER_BODY:case GN.IN_FRAMESET:case GN.AFTER_FRAMESET:case GN.AFTER_AFTER_BODY:case GN.AFTER_AFTER_FRAMESET:tR(this,e)}}},{key:"onWhitespaceCharacter",value:function(e){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,e.chars.charCodeAt(0)===LN.CODE_POINTS.LINE_FEED)){if(1===e.chars.length)return;e.chars=e.chars.substr(1)}if(this.tokenizer.inForeignNode)this._insertCharacters(e);else switch(this.insertionMode){case GN.IN_HEAD:case GN.IN_HEAD_NO_SCRIPT:case GN.AFTER_HEAD:case GN.TEXT:case GN.IN_COLUMN_GROUP:case GN.IN_SELECT:case GN.IN_SELECT_IN_TABLE:case GN.IN_FRAMESET:case GN.AFTER_FRAMESET:this._insertCharacters(e);break;case GN.IN_BODY:case GN.IN_CAPTION:case GN.IN_CELL:case GN.IN_TEMPLATE:case GN.AFTER_BODY:case GN.AFTER_AFTER_BODY:case GN.AFTER_AFTER_FRAMESET:hR(this,e);break;case GN.IN_TABLE:case GN.IN_TABLE_BODY:case GN.IN_ROW:_R(this,e);break;case GN.IN_TABLE_TEXT:SR(this,e)}}}],[{key:"parse",value:function(e,t){const n=new this(t);return n.tokenizer.write(e,!0),n.document}},{key:"getFragmentParser",value:function(e,t){const n=Object.assign(Object.assign({},WN),t);null!=e||(e=n.treeAdapter.createElement(BN.TAG_NAMES.TEMPLATE,BN.NS.HTML,[]));const r=n.treeAdapter.createElement("documentmock",BN.NS.HTML,[]),i=new this(n,r,e);return i.fragmentContextID===BN.TAG_ID.TEMPLATE&&i.tmplInsertionModeStack.unshift(GN.IN_TEMPLATE),i._initTokenizerForFragmentParsing(),i._insertFakeRootElement(),i._resetInsertionMode(),i._findFormInFragmentContext(),i}}]),e}();function YN(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):vR(e,t),n}function qN(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(r<0?0:r),e.activeFormattingElements.removeEntry(t)),n}function $N(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,a=i;a!==n;o++,a=i){i=e.openElements.getCommonAncestor(a);const n=e.activeFormattingElements.getElementEntry(a),s=n&&o>=HN;!n||s?(s&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(a)):(a=KN(e,n),r===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function KN(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function QN(e,t,n){const r=e.treeAdapter.getTagName(t),i=(0,BN.getTagID)(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const r=e.treeAdapter.getNamespaceURI(t);i===BN.TAG_ID.TEMPLATE&&r===BN.NS.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ZN(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function JN(e,t){for(let n=0;n=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const n=e.openElements.items[0],r=e.treeAdapter.getNodeSourceCodeLocation(n);if(r&&!r.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){const n=e.openElements.items[1],r=e.treeAdapter.getNodeSourceCodeLocation(n);r&&!r.endTag&&e._setEndLocation(n,t)}}}}function nR(e,t){e._err(t,MN.ERR.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,BN.DOCUMENT_MODE.QUIRKS),e.insertionMode=GN.BEFORE_HTML,e._processToken(t)}function rR(e,t){e._insertFakeRootElement(),e.insertionMode=GN.BEFORE_HEAD,e._processToken(t)}function iR(e,t){e._insertFakeElement(BN.TAG_NAMES.HEAD,BN.TAG_ID.HEAD),e.headElement=e.openElements.current,e.insertionMode=GN.IN_HEAD,e._processToken(t)}function oR(e,t){switch(t.tagID){case BN.TAG_ID.HTML:bR(e,t);break;case BN.TAG_ID.BASE:case BN.TAG_ID.BASEFONT:case BN.TAG_ID.BGSOUND:case BN.TAG_ID.LINK:case BN.TAG_ID.META:e._appendElement(t,BN.NS.HTML),t.ackSelfClosing=!0;break;case BN.TAG_ID.TITLE:e._switchToTextParsing(t,IN.TokenizerMode.RCDATA);break;case BN.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?e._switchToTextParsing(t,IN.TokenizerMode.RAWTEXT):(e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.IN_HEAD_NO_SCRIPT);break;case BN.TAG_ID.NOFRAMES:case BN.TAG_ID.STYLE:e._switchToTextParsing(t,IN.TokenizerMode.RAWTEXT);break;case BN.TAG_ID.SCRIPT:e._switchToTextParsing(t,IN.TokenizerMode.SCRIPT_DATA);break;case BN.TAG_ID.TEMPLATE:e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=GN.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(GN.IN_TEMPLATE);break;case BN.TAG_ID.HEAD:e._err(t,MN.ERR.misplacedStartTagForHeadElement);break;default:sR(e,t)}}function aR(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==BN.TAG_ID.TEMPLATE&&e._err(t,MN.ERR.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(BN.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,MN.ERR.endTagWithoutMatchingOpenElement)}function sR(e,t){e.openElements.pop(),e.insertionMode=GN.AFTER_HEAD,e._processToken(t)}function lR(e,t){const n=t.type===FN.TokenType.EOF?MN.ERR.openElementsLeftAfterEof:MN.ERR.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=GN.IN_HEAD,e._processToken(t)}function cR(e,t){e._insertFakeElement(BN.TAG_NAMES.BODY,BN.TAG_ID.BODY),e.insertionMode=GN.IN_BODY,uR(e,t)}function uR(e,t){switch(t.type){case FN.TokenType.CHARACTER:dR(e,t);break;case FN.TokenType.WHITESPACE_CHARACTER:hR(e,t);break;case FN.TokenType.COMMENT:eR(e,t);break;case FN.TokenType.START_TAG:bR(e,t);break;case FN.TokenType.END_TAG:yR(e,t);break;case FN.TokenType.EOF:TR(e,t)}}function hR(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function dR(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function pR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,BN.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function fR(e){const t=(0,FN.getTokenAttr)(e,BN.ATTRS.TYPE);return null!=t&&t.toLowerCase()===UN}function mR(e,t){e._switchToTextParsing(t,IN.TokenizerMode.RAWTEXT)}function gR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML)}function bR(e,t){switch(t.tagID){case BN.TAG_ID.I:case BN.TAG_ID.S:case BN.TAG_ID.B:case BN.TAG_ID.U:case BN.TAG_ID.EM:case BN.TAG_ID.TT:case BN.TAG_ID.BIG:case BN.TAG_ID.CODE:case BN.TAG_ID.FONT:case BN.TAG_ID.SMALL:case BN.TAG_ID.STRIKE:case BN.TAG_ID.STRONG:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case BN.TAG_ID.A:!function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(BN.TAG_NAMES.A);n&&(JN(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case BN.TAG_ID.H1:case BN.TAG_ID.H2:case BN.TAG_ID.H3:case BN.TAG_ID.H4:case BN.TAG_ID.H5:case BN.TAG_ID.H6:!function(e,t){e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),(0,BN.isNumberedHeader)(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,BN.NS.HTML)}(e,t);break;case BN.TAG_ID.P:case BN.TAG_ID.DL:case BN.TAG_ID.OL:case BN.TAG_ID.UL:case BN.TAG_ID.DIV:case BN.TAG_ID.DIR:case BN.TAG_ID.NAV:case BN.TAG_ID.MAIN:case BN.TAG_ID.MENU:case BN.TAG_ID.ASIDE:case BN.TAG_ID.CENTER:case BN.TAG_ID.FIGURE:case BN.TAG_ID.FOOTER:case BN.TAG_ID.HEADER:case BN.TAG_ID.HGROUP:case BN.TAG_ID.DIALOG:case BN.TAG_ID.DETAILS:case BN.TAG_ID.ADDRESS:case BN.TAG_ID.ARTICLE:case BN.TAG_ID.SECTION:case BN.TAG_ID.SUMMARY:case BN.TAG_ID.FIELDSET:case BN.TAG_ID.BLOCKQUOTE:case BN.TAG_ID.FIGCAPTION:!function(e,t){e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._insertElement(t,BN.NS.HTML)}(e,t);break;case BN.TAG_ID.LI:case BN.TAG_ID.DD:case BN.TAG_ID.DT:!function(e,t){e.framesetOk=!1;const n=t.tagID;for(let t=e.openElements.stackTop;t>=0;t--){const r=e.openElements.tagIDs[t];if(n===BN.TAG_ID.LI&&r===BN.TAG_ID.LI||(n===BN.TAG_ID.DD||n===BN.TAG_ID.DT)&&(r===BN.TAG_ID.DD||r===BN.TAG_ID.DT)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r);break}if(r!==BN.TAG_ID.ADDRESS&&r!==BN.TAG_ID.DIV&&r!==BN.TAG_ID.P&&e._isSpecialElement(e.openElements.items[t],r))break}e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._insertElement(t,BN.NS.HTML)}(e,t);break;case BN.TAG_ID.BR:case BN.TAG_ID.IMG:case BN.TAG_ID.WBR:case BN.TAG_ID.AREA:case BN.TAG_ID.EMBED:case BN.TAG_ID.KEYGEN:pR(e,t);break;case BN.TAG_ID.HR:!function(e,t){e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._appendElement(t,BN.NS.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}(e,t);break;case BN.TAG_ID.RB:case BN.TAG_ID.RTC:!function(e,t){e.openElements.hasInScope(BN.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,BN.NS.HTML)}(e,t);break;case BN.TAG_ID.RT:case BN.TAG_ID.RP:!function(e,t){e.openElements.hasInScope(BN.TAG_ID.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(BN.TAG_ID.RTC),e._insertElement(t,BN.NS.HTML)}(e,t);break;case BN.TAG_ID.PRE:case BN.TAG_ID.LISTING:!function(e,t){e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._insertElement(t,BN.NS.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}(e,t);break;case BN.TAG_ID.XMP:!function(e,t){e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,IN.TokenizerMode.RAWTEXT)}(e,t);break;case BN.TAG_ID.SVG:!function(e,t){e._reconstructActiveFormattingElements(),RN.adjustTokenSVGAttrs(t),RN.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,BN.NS.SVG):e._insertElement(t,BN.NS.SVG),t.ackSelfClosing=!0}(e,t);break;case BN.TAG_ID.HTML:!function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}(e,t);break;case BN.TAG_ID.BASE:case BN.TAG_ID.LINK:case BN.TAG_ID.META:case BN.TAG_ID.STYLE:case BN.TAG_ID.TITLE:case BN.TAG_ID.SCRIPT:case BN.TAG_ID.BGSOUND:case BN.TAG_ID.BASEFONT:case BN.TAG_ID.TEMPLATE:oR(e,t);break;case BN.TAG_ID.BODY:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}(e,t);break;case BN.TAG_ID.FORM:!function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._insertElement(t,BN.NS.HTML),n||(e.formElement=e.openElements.current))}(e,t);break;case BN.TAG_ID.NOBR:!function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(BN.TAG_ID.NOBR)&&(JN(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,BN.NS.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}(e,t);break;case BN.TAG_ID.MATH:!function(e,t){e._reconstructActiveFormattingElements(),RN.adjustTokenMathMLAttrs(t),RN.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,BN.NS.MATHML):e._insertElement(t,BN.NS.MATHML),t.ackSelfClosing=!0}(e,t);break;case BN.TAG_ID.TABLE:!function(e,t){e.treeAdapter.getDocumentMode(e.document)!==BN.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._insertElement(t,BN.NS.HTML),e.framesetOk=!1,e.insertionMode=GN.IN_TABLE}(e,t);break;case BN.TAG_ID.INPUT:!function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,BN.NS.HTML),fR(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}(e,t);break;case BN.TAG_ID.PARAM:case BN.TAG_ID.TRACK:case BN.TAG_ID.SOURCE:!function(e,t){e._appendElement(t,BN.NS.HTML),t.ackSelfClosing=!0}(e,t);break;case BN.TAG_ID.IMAGE:!function(e,t){t.tagName=BN.TAG_NAMES.IMG,t.tagID=BN.TAG_ID.IMG,pR(e,t)}(e,t);break;case BN.TAG_ID.BUTTON:!function(e,t){e.openElements.hasInScope(BN.TAG_ID.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(BN.TAG_ID.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML),e.framesetOk=!1}(e,t);break;case BN.TAG_ID.APPLET:case BN.TAG_ID.OBJECT:case BN.TAG_ID.MARQUEE:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}(e,t);break;case BN.TAG_ID.IFRAME:!function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,IN.TokenizerMode.RAWTEXT)}(e,t);break;case BN.TAG_ID.SELECT:!function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===GN.IN_TABLE||e.insertionMode===GN.IN_CAPTION||e.insertionMode===GN.IN_TABLE_BODY||e.insertionMode===GN.IN_ROW||e.insertionMode===GN.IN_CELL?GN.IN_SELECT_IN_TABLE:GN.IN_SELECT}(e,t);break;case BN.TAG_ID.OPTION:case BN.TAG_ID.OPTGROUP:!function(e,t){e.openElements.currentTagId===BN.TAG_ID.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,BN.NS.HTML)}(e,t);break;case BN.TAG_ID.NOEMBED:mR(e,t);break;case BN.TAG_ID.FRAMESET:!function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.IN_FRAMESET)}(e,t);break;case BN.TAG_ID.TEXTAREA:!function(e,t){e._insertElement(t,BN.NS.HTML),e.skipNextNewLine=!0,e.tokenizer.state=IN.TokenizerMode.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=GN.TEXT}(e,t);break;case BN.TAG_ID.NOSCRIPT:e.options.scriptingEnabled?mR(e,t):gR(e,t);break;case BN.TAG_ID.PLAINTEXT:!function(e,t){e.openElements.hasInButtonScope(BN.TAG_ID.P)&&e._closePElement(),e._insertElement(t,BN.NS.HTML),e.tokenizer.state=IN.TokenizerMode.PLAINTEXT}(e,t);break;case BN.TAG_ID.COL:case BN.TAG_ID.TH:case BN.TAG_ID.TD:case BN.TAG_ID.TR:case BN.TAG_ID.HEAD:case BN.TAG_ID.FRAME:case BN.TAG_ID.TBODY:case BN.TAG_ID.TFOOT:case BN.TAG_ID.THEAD:case BN.TAG_ID.CAPTION:case BN.TAG_ID.COLGROUP:break;default:gR(e,t)}}function vR(e,t){const n=t.tagName,r=t.tagID;for(let t=e.openElements.stackTop;t>0;t--){const i=e.openElements.items[t],o=e.openElements.tagIDs[t];if(r===o&&(r!==BN.TAG_ID.UNKNOWN||e.treeAdapter.getTagName(i)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=t&&e.openElements.shortenToLength(t);break}if(e._isSpecialElement(i,o))break}}function yR(e,t){switch(t.tagID){case BN.TAG_ID.A:case BN.TAG_ID.B:case BN.TAG_ID.I:case BN.TAG_ID.S:case BN.TAG_ID.U:case BN.TAG_ID.EM:case BN.TAG_ID.TT:case BN.TAG_ID.BIG:case BN.TAG_ID.CODE:case BN.TAG_ID.FONT:case BN.TAG_ID.NOBR:case BN.TAG_ID.SMALL:case BN.TAG_ID.STRIKE:case BN.TAG_ID.STRONG:JN(e,t);break;case BN.TAG_ID.P:!function(e){e.openElements.hasInButtonScope(BN.TAG_ID.P)||e._insertFakeElement(BN.TAG_NAMES.P,BN.TAG_ID.P),e._closePElement()}(e);break;case BN.TAG_ID.DL:case BN.TAG_ID.UL:case BN.TAG_ID.OL:case BN.TAG_ID.DIR:case BN.TAG_ID.DIV:case BN.TAG_ID.NAV:case BN.TAG_ID.PRE:case BN.TAG_ID.MAIN:case BN.TAG_ID.MENU:case BN.TAG_ID.ASIDE:case BN.TAG_ID.BUTTON:case BN.TAG_ID.CENTER:case BN.TAG_ID.FIGURE:case BN.TAG_ID.FOOTER:case BN.TAG_ID.HEADER:case BN.TAG_ID.HGROUP:case BN.TAG_ID.DIALOG:case BN.TAG_ID.ADDRESS:case BN.TAG_ID.ARTICLE:case BN.TAG_ID.DETAILS:case BN.TAG_ID.SECTION:case BN.TAG_ID.SUMMARY:case BN.TAG_ID.LISTING:case BN.TAG_ID.FIELDSET:case BN.TAG_ID.BLOCKQUOTE:case BN.TAG_ID.FIGCAPTION:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case BN.TAG_ID.LI:!function(e){e.openElements.hasInListItemScope(BN.TAG_ID.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(BN.TAG_ID.LI),e.openElements.popUntilTagNamePopped(BN.TAG_ID.LI))}(e);break;case BN.TAG_ID.DD:case BN.TAG_ID.DT:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}(e,t);break;case BN.TAG_ID.H1:case BN.TAG_ID.H2:case BN.TAG_ID.H3:case BN.TAG_ID.H4:case BN.TAG_ID.H5:case BN.TAG_ID.H6:!function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}(e);break;case BN.TAG_ID.BR:!function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(BN.TAG_NAMES.BR,BN.TAG_ID.BR),e.openElements.pop(),e.framesetOk=!1}(e);break;case BN.TAG_ID.BODY:!function(e,t){if(e.openElements.hasInScope(BN.TAG_ID.BODY)&&(e.insertionMode=GN.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}(e,t);break;case BN.TAG_ID.HTML:!function(e,t){e.openElements.hasInScope(BN.TAG_ID.BODY)&&(e.insertionMode=GN.AFTER_BODY,FR(e,t))}(e,t);break;case BN.TAG_ID.FORM:!function(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(BN.TAG_ID.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(BN.TAG_ID.FORM):n&&e.openElements.remove(n))}(e);break;case BN.TAG_ID.APPLET:case BN.TAG_ID.OBJECT:case BN.TAG_ID.MARQUEE:!function(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}(e,t);break;case BN.TAG_ID.TEMPLATE:aR(e,t);break;default:vR(e,t)}}function TR(e,t){e.tmplInsertionModeStack.length>0?BR(e,t):tR(e,t)}function _R(e,t){if(VN.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=GN.IN_TABLE_TEXT,t.type){case FN.TokenType.CHARACTER:kR(e,t);break;case FN.TokenType.WHITESPACE_CHARACTER:SR(e,t)}else wR(e,t)}function ER(e,t){switch(t.tagID){case BN.TAG_ID.TD:case BN.TAG_ID.TH:case BN.TAG_ID.TR:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(BN.TAG_NAMES.TBODY,BN.TAG_ID.TBODY),e.insertionMode=GN.IN_TABLE_BODY,DR(e,t)}(e,t);break;case BN.TAG_ID.STYLE:case BN.TAG_ID.SCRIPT:case BN.TAG_ID.TEMPLATE:oR(e,t);break;case BN.TAG_ID.COL:!function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(BN.TAG_NAMES.COLGROUP,BN.TAG_ID.COLGROUP),e.insertionMode=GN.IN_COLUMN_GROUP,IR(e,t)}(e,t);break;case BN.TAG_ID.FORM:!function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,BN.NS.HTML),e.formElement=e.openElements.current,e.openElements.pop())}(e,t);break;case BN.TAG_ID.TABLE:!function(e,t){e.openElements.hasInTableScope(BN.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(BN.TAG_ID.TABLE),e._resetInsertionMode(),e._processStartTag(t))}(e,t);break;case BN.TAG_ID.TBODY:case BN.TAG_ID.TFOOT:case BN.TAG_ID.THEAD:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.IN_TABLE_BODY}(e,t);break;case BN.TAG_ID.INPUT:!function(e,t){fR(t)?e._appendElement(t,BN.NS.HTML):wR(e,t),t.ackSelfClosing=!0}(e,t);break;case BN.TAG_ID.CAPTION:!function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.IN_CAPTION}(e,t);break;case BN.TAG_ID.COLGROUP:!function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,BN.NS.HTML),e.insertionMode=GN.IN_COLUMN_GROUP}(e,t);break;default:wR(e,t)}}function xR(e,t){switch(t.tagID){case BN.TAG_ID.TABLE:e.openElements.hasInTableScope(BN.TAG_ID.TABLE)&&(e.openElements.popUntilTagNamePopped(BN.TAG_ID.TABLE),e._resetInsertionMode());break;case BN.TAG_ID.TEMPLATE:aR(e,t);break;case BN.TAG_ID.BODY:case BN.TAG_ID.CAPTION:case BN.TAG_ID.COL:case BN.TAG_ID.COLGROUP:case BN.TAG_ID.HTML:case BN.TAG_ID.TBODY:case BN.TAG_ID.TD:case BN.TAG_ID.TFOOT:case BN.TAG_ID.TH:case BN.TAG_ID.THEAD:case BN.TAG_ID.TR:break;default:wR(e,t)}}function wR(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,uR(e,t),e.fosterParentingEnabled=n}function SR(e,t){e.pendingCharacterTokens.push(t)}function kR(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function AR(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n0&&e.openElements.currentTagId===BN.TAG_ID.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===BN.TAG_ID.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===BN.TAG_ID.OPTGROUP&&e.openElements.pop();break;case BN.TAG_ID.OPTION:e.openElements.currentTagId===BN.TAG_ID.OPTION&&e.openElements.pop();break;case BN.TAG_ID.SELECT:e.openElements.hasInSelectScope(BN.TAG_ID.SELECT)&&(e.openElements.popUntilTagNamePopped(BN.TAG_ID.SELECT),e._resetInsertionMode());break;case BN.TAG_ID.TEMPLATE:aR(e,t)}}function BR(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(BN.TAG_ID.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):tR(e,t)}function FR(e,t){var n;if(t.tagID===BN.TAG_ID.HTML){if(e.fragmentContext||(e.insertionMode=GN.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===BN.TAG_ID.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(null===(n=e.treeAdapter.getNodeSourceCodeLocation(r))||void 0===n?void 0:n.endTag)&&e._setEndLocation(r,t)}}else UR(e,t)}function UR(e,t){e.insertionMode=GN.IN_BODY,uR(e,t)}function jR(e,t){e.insertionMode=GN.IN_BODY,uR(e,t)}function HR(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==BN.NS.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}var GR={};Object.defineProperty(GR,"__esModule",{value:!0}),GR.serializeOuter=GR.serialize=void 0;const zR=HP,VR=nk,WR=vN,XR=new Set([zR.TAG_NAMES.AREA,zR.TAG_NAMES.BASE,zR.TAG_NAMES.BASEFONT,zR.TAG_NAMES.BGSOUND,zR.TAG_NAMES.BR,zR.TAG_NAMES.COL,zR.TAG_NAMES.EMBED,zR.TAG_NAMES.FRAME,zR.TAG_NAMES.HR,zR.TAG_NAMES.IMG,zR.TAG_NAMES.INPUT,zR.TAG_NAMES.KEYGEN,zR.TAG_NAMES.LINK,zR.TAG_NAMES.META,zR.TAG_NAMES.PARAM,zR.TAG_NAMES.SOURCE,zR.TAG_NAMES.TRACK,zR.TAG_NAMES.WBR]);function YR(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===zR.NS.HTML&&XR.has(t.treeAdapter.getTagName(e))}const qR={treeAdapter:WR.defaultTreeAdapter,scriptingEnabled:!0};function $R(e,t){let n="";const r=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===zR.TAG_NAMES.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===zR.NS.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(r);if(i)for(const e of i)n+=KR(e,t);return n}function KR(e,t){return t.treeAdapter.isElementNode(e)?function(e,t){const n=t.treeAdapter.getTagName(e);return`<${n}${function(e,{treeAdapter:t}){let n="";for(const r of t.getAttrList(e)){if(n+=" ",r.namespace)switch(r.namespace){case zR.NS.XML:n+=`xml:${r.name}`;break;case zR.NS.XMLNS:"xmlns"!==r.name&&(n+="xmlns:"),n+=r.name;break;case zR.NS.XLINK:n+=`xlink:${r.name}`;break;default:n+=`${r.prefix}:${r.name}`}else n+=r.name;n+=`="${(0,VR.escapeAttribute)(r.value)}"`}return n}(e,t)}>${YR(e,t)?"":`${$R(e,t)}`}`}(e,t):t.treeAdapter.isTextNode(e)?function(e,t){const{treeAdapter:n}=t,r=n.getTextNodeContent(e),i=n.getParentNode(e),o=i&&n.isElementNode(i)&&n.getTagName(i);return o&&n.getNamespaceURI(i)===zR.NS.HTML&&(0,zR.hasUnescapedText)(o,t.scriptingEnabled)?r:(0,VR.escapeText)(r)}(e,t):t.treeAdapter.isCommentNode(e)?function(e,{treeAdapter:t}){return`\x3c!--${t.getCommentNodeContent(e)}--\x3e`}(e,t):t.treeAdapter.isDocumentTypeNode(e)?function(e,{treeAdapter:t}){return``}(e,t):""}GR.serialize=function(e,t){const n=Object.assign(Object.assign({},qR),t);return YR(e,n)?"":$R(e,n)},GR.serializeOuter=function(e,t){return KR(e,Object.assign(Object.assign({},qR),t))},function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.parseFragment=e.parse=e.TokenizerMode=e.Tokenizer=e.Token=e.html=e.foreignContent=e.ErrorCodes=e.serializeOuter=e.serialize=e.Parser=e.defaultTreeAdapter=void 0;const t=PP;var n=vN;Object.defineProperty(e,"defaultTreeAdapter",{enumerable:!0,get:function(){return n.defaultTreeAdapter}});var r=PP;Object.defineProperty(e,"Parser",{enumerable:!0,get:function(){return r.Parser}});var i=GR;Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return i.serialize}}),Object.defineProperty(e,"serializeOuter",{enumerable:!0,get:function(){return i.serializeOuter}});var o=LP;Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:function(){return o.ERR}}),e.foreignContent=CN,e.html=HP,e.Token=jP;var a=NP;Object.defineProperty(e,"Tokenizer",{enumerable:!0,get:function(){return a.Tokenizer}}),Object.defineProperty(e,"TokenizerMode",{enumerable:!0,get:function(){return a.TokenizerMode}}),e.parse=function(e,n){return t.Parser.parse(e,n)},e.parseFragment=function(e,n,r){"string"==typeof e&&(r=n,n=e,e=null);const i=t.Parser.getFragmentParser(e,r);return i.tokenizer.write(n,!0),i.getFragment()}}(DP),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.adapter=e.serializeDoctypeContent=void 0;const t=DP,n=xS;function r(e){return new n.Text(e)}function i(e){const t=e.includes('"')?"'":'"';return t+e+t}function o(e,t,n){let r="!DOCTYPE ";return e&&(r+=e),t?r+=` PUBLIC ${i(t)}`:n&&(r+=" SYSTEM"),n&&(r+=` ${i(n)}`),r}e.serializeDoctypeContent=o,e.adapter={isCommentNode:n.isComment,isElementNode:n.isTag,isTextNode:n.isText,createDocument(){const e=new n.Document([]);return e["x-mode"]=t.html.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment:()=>new n.Document([]),createElement(e,t,r){const i=Object.create(null),o=Object.create(null),a=Object.create(null);for(let e=0;enew n.Comment(e),appendChild(e,t){const n=e.children[e.children.length-1];n&&(n.next=t,t.prev=n),e.children.push(t),t.parent=e},insertBefore(e,t,n){const r=e.children.indexOf(n),{prev:i}=n;i&&(i.next=t,t.prev=i),n.prev=t,t.next=n,e.children.splice(r,0,t),t.parent=e},setTemplateContent(t,n){e.adapter.appendChild(t,n)},getTemplateContent:e=>e.children[0],setDocumentType(t,r,i,a){const s=o(r,i,a);let l=t.children.find((e=>(0,n.isDirective)(e)&&"!doctype"===e.name));l?l.data=null!=s?s:null:(l=new n.ProcessingInstruction("!doctype",s),e.adapter.appendChild(t,l)),l["x-name"]=null!=r?r:void 0,l["x-publicId"]=null!=i?i:void 0,l["x-systemId"]=null!=a?a:void 0},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode:e=>e["x-mode"],detachNode(e){if(e.parent){const t=e.parent.children.indexOf(e),{prev:n,next:r}=e;e.prev=null,e.next=null,n&&(n.next=r),r&&(r.prev=n),e.parent.children.splice(t,1),e.parent=null}},insertText(t,i){const o=t.children[t.children.length-1];o&&(0,n.isText)(o)?o.data+=i:e.adapter.appendChild(t,r(i))},insertTextBefore(t,i,o){const a=t.children[t.children.indexOf(o)-1];a&&(0,n.isText)(a)?a.data+=i:e.adapter.insertBefore(t,r(i),o)},adoptAttributes(e,t){for(let n=0;ne.children[0],getChildNodes:e=>e.children,getParentNode:e=>e.parent,getAttrList:e=>e.attributes,getTagName:e=>e.name,getNamespaceURI:e=>e.namespace,getTextNodeContent:e=>e.data,getCommentNodeContent:e=>e.data,getDocumentTypeNodeName(e){var t;return null!==(t=e["x-name"])&&void 0!==t?t:""},getDocumentTypeNodePublicId(e){var t;return null!==(t=e["x-publicId"])&&void 0!==t?t:""},getDocumentTypeNodeSystemId(e){var t;return null!==(t=e["x-systemId"])&&void 0!==t?t:""},isDocumentTypeNode:e=>(0,n.isDirective)(e)&&"!doctype"===e.name,setNodeSourceCodeLocation(e,t){t&&(e.startIndex=t.startOffset,e.endIndex=t.endOffset),e.sourceCodeLocation=t},getNodeSourceCodeLocation:e=>e.sourceCodeLocation,updateNodeSourceCodeLocation(e,t){null!=t.endOffset&&(e.endIndex=t.endOffset),e.sourceCodeLocation=Object.assign(Object.assign({},e.sourceCodeLocation),t)}}}(OP);var QR=v&&v.__spreadArray||function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i=t.Zero&&e<=t.Nine}(n=t||(t={}))[n.Tab=9]="Tab",n[n.NewLine=10]="NewLine",n[n.FormFeed=12]="FormFeed",n[n.CarriageReturn=13]="CarriageReturn",n[n.Space=32]="Space",n[n.ExclamationMark=33]="ExclamationMark",n[n.Num=35]="Num",n[n.Amp=38]="Amp",n[n.SingleQuote=39]="SingleQuote",n[n.DoubleQuote=34]="DoubleQuote",n[n.Dash=45]="Dash",n[n.Slash=47]="Slash",n[n.Zero=48]="Zero",n[n.Nine=57]="Nine",n[n.Semi=59]="Semi",n[n.Lt=60]="Lt",n[n.Eq=61]="Eq",n[n.Gt=62]="Gt",n[n.Questionmark=63]="Questionmark",n[n.UpperA=65]="UpperA",n[n.LowerA=97]="LowerA",n[n.UpperF=70]="UpperF",n[n.LowerF=102]="LowerF",n[n.UpperZ=90]="UpperZ",n[n.LowerZ=122]="LowerZ",n[n.LowerX=120]="LowerX",n[n.OpeningSquareBracket=91]="OpeningSquareBracket",(i=r||(r={}))[i.Text=1]="Text",i[i.BeforeTagName=2]="BeforeTagName",i[i.InTagName=3]="InTagName",i[i.InSelfClosingTag=4]="InSelfClosingTag",i[i.BeforeClosingTagName=5]="BeforeClosingTagName",i[i.InClosingTagName=6]="InClosingTagName",i[i.AfterClosingTagName=7]="AfterClosingTagName",i[i.BeforeAttributeName=8]="BeforeAttributeName",i[i.InAttributeName=9]="InAttributeName",i[i.AfterAttributeName=10]="AfterAttributeName",i[i.BeforeAttributeValue=11]="BeforeAttributeValue",i[i.InAttributeValueDq=12]="InAttributeValueDq",i[i.InAttributeValueSq=13]="InAttributeValueSq",i[i.InAttributeValueNq=14]="InAttributeValueNq",i[i.BeforeDeclaration=15]="BeforeDeclaration",i[i.InDeclaration=16]="InDeclaration",i[i.InProcessingInstruction=17]="InProcessingInstruction",i[i.BeforeComment=18]="BeforeComment",i[i.CDATASequence=19]="CDATASequence",i[i.InSpecialComment=20]="InSpecialComment",i[i.InCommentLike=21]="InCommentLike",i[i.BeforeSpecialS=22]="BeforeSpecialS",i[i.SpecialStartSequence=23]="SpecialStartSequence",i[i.InSpecialTag=24]="InSpecialTag",i[i.BeforeEntity=25]="BeforeEntity",i[i.BeforeNumericEntity=26]="BeforeNumericEntity",i[i.InNamedEntity=27]="InNamedEntity",i[i.InNumericEntity=28]="InNumericEntity",i[i.InHexEntity=29]="InHexEntity",(a=o=e.QuoteType||(e.QuoteType={}))[a.NoValue=0]="NoValue",a[a.Unquoted=1]="Unquoted",a[a.Single=2]="Single",a[a.Double=3]="Double";var h={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101])},d=function(){function e(e,t){var n=e.xmlMode,i=void 0!==n&&n,o=e.decodeEntities,a=void 0===o||o;this.cbs=t,this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.sequenceIndex=0,this.trieIndex=0,this.trieCurrent=0,this.entityResult=0,this.entityExcess=0,this.xmlMode=i,this.decodeEntities=a,this.entityTrie=i?s.xmlDecodeTree:s.htmlDecodeTree}return e.prototype.reset=function(){this.state=r.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=r.Text,this.currentSequence=void 0,this.running=!0,this.offset=0},e.prototype.write=function(e){this.offset+=this.buffer.length,this.buffer=e,this.parse()},e.prototype.end=function(){this.running&&this.finish()},e.prototype.pause=function(){this.running=!1},e.prototype.resume=function(){this.running=!0,this.indexthis.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=r.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&e===t.Amp&&(this.state=r.BeforeEntity)},e.prototype.stateSpecialStartSequence=function(e){var t=this.sequenceIndex===this.currentSequence.length;if(t?c(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.isSpecial=!1;this.sequenceIndex=0,this.state=r.InTagName,this.stateInTagName(e)},e.prototype.stateInSpecialTag=function(e){if(this.sequenceIndex===this.currentSequence.length){if(e===t.Gt||l(e)){var n=this.index-this.currentSequence.length;if(this.sectionStart=t.LowerA&&e<=t.LowerZ||e>=t.UpperA&&e<=t.UpperZ}(e)},e.prototype.startSpecial=function(e,t){this.isSpecial=!0,this.currentSequence=e,this.sequenceIndex=t,this.state=r.SpecialStartSequence},e.prototype.stateBeforeTagName=function(e){if(e===t.ExclamationMark)this.state=r.BeforeDeclaration,this.sectionStart=this.index+1;else if(e===t.Questionmark)this.state=r.InProcessingInstruction,this.sectionStart=this.index+1;else if(this.isTagStartChar(e)){var n=32|e;this.sectionStart=this.index,this.xmlMode||n!==h.TitleEnd[2]?this.state=this.xmlMode||n!==h.ScriptEnd[2]?r.InTagName:r.BeforeSpecialS:this.startSpecial(h.TitleEnd,3)}else e===t.Slash?this.state=r.BeforeClosingTagName:(this.state=r.Text,this.stateText(e))},e.prototype.stateInTagName=function(e){c(e)&&(this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateBeforeClosingTagName=function(e){l(e)||(e===t.Gt?this.state=r.Text:(this.state=this.isTagStartChar(e)?r.InClosingTagName:r.InSpecialComment,this.sectionStart=this.index))},e.prototype.stateInClosingTagName=function(e){(e===t.Gt||l(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=r.AfterClosingTagName,this.stateAfterClosingTagName(e))},e.prototype.stateAfterClosingTagName=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeAttributeName=function(e){e===t.Gt?(this.cbs.onopentagend(this.index),this.isSpecial?(this.state=r.InSpecialTag,this.sequenceIndex=0):this.state=r.Text,this.baseState=this.state,this.sectionStart=this.index+1):e===t.Slash?this.state=r.InSelfClosingTag:l(e)||(this.state=r.InAttributeName,this.sectionStart=this.index)},e.prototype.stateInSelfClosingTag=function(e){e===t.Gt?(this.cbs.onselfclosingtag(this.index),this.state=r.Text,this.baseState=r.Text,this.sectionStart=this.index+1,this.isSpecial=!1):l(e)||(this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e))},e.prototype.stateInAttributeName=function(e){(e===t.Eq||c(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.sectionStart=-1,this.state=r.AfterAttributeName,this.stateAfterAttributeName(e))},e.prototype.stateAfterAttributeName=function(e){e===t.Eq?this.state=r.BeforeAttributeValue:e===t.Slash||e===t.Gt?(this.cbs.onattribend(o.NoValue,this.index),this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e)):l(e)||(this.cbs.onattribend(o.NoValue,this.index),this.state=r.InAttributeName,this.sectionStart=this.index)},e.prototype.stateBeforeAttributeValue=function(e){e===t.DoubleQuote?(this.state=r.InAttributeValueDq,this.sectionStart=this.index+1):e===t.SingleQuote?(this.state=r.InAttributeValueSq,this.sectionStart=this.index+1):l(e)||(this.sectionStart=this.index,this.state=r.InAttributeValueNq,this.stateInAttributeValueNoQuotes(e))},e.prototype.handleInAttributeValue=function(e,n){e===n||!this.decodeEntities&&this.fastForwardTo(n)?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===t.DoubleQuote?o.Double:o.Single,this.index),this.state=r.BeforeAttributeName):this.decodeEntities&&e===t.Amp&&(this.baseState=this.state,this.state=r.BeforeEntity)},e.prototype.stateInAttributeValueDoubleQuotes=function(e){this.handleInAttributeValue(e,t.DoubleQuote)},e.prototype.stateInAttributeValueSingleQuotes=function(e){this.handleInAttributeValue(e,t.SingleQuote)},e.prototype.stateInAttributeValueNoQuotes=function(e){l(e)||e===t.Gt?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(o.Unquoted,this.index),this.state=r.BeforeAttributeName,this.stateBeforeAttributeName(e)):this.decodeEntities&&e===t.Amp&&(this.baseState=this.state,this.state=r.BeforeEntity)},e.prototype.stateBeforeDeclaration=function(e){e===t.OpeningSquareBracket?(this.state=r.CDATASequence,this.sequenceIndex=0):this.state=e===t.Dash?r.BeforeComment:r.InDeclaration},e.prototype.stateInDeclaration=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.ondeclaration(this.sectionStart,this.index),this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateInProcessingInstruction=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeComment=function(e){e===t.Dash?(this.state=r.InCommentLike,this.currentSequence=h.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=r.InDeclaration},e.prototype.stateInSpecialComment=function(e){(e===t.Gt||this.fastForwardTo(t.Gt))&&(this.cbs.oncomment(this.sectionStart,this.index,0),this.state=r.Text,this.sectionStart=this.index+1)},e.prototype.stateBeforeSpecialS=function(e){var t=32|e;t===h.ScriptEnd[3]?this.startSpecial(h.ScriptEnd,4):t===h.StyleEnd[3]?this.startSpecial(h.StyleEnd,4):(this.state=r.InTagName,this.stateInTagName(e))},e.prototype.stateBeforeEntity=function(e){this.entityExcess=1,this.entityResult=0,e===t.Num?this.state=r.BeforeNumericEntity:e===t.Amp||(this.trieIndex=0,this.trieCurrent=this.entityTrie[0],this.state=r.InNamedEntity,this.stateInNamedEntity(e))},e.prototype.stateInNamedEntity=function(e){if(this.entityExcess+=1,this.trieIndex=(0,s.determineBranch)(this.entityTrie,this.trieCurrent,this.trieIndex+1,e),this.trieIndex<0)return this.emitNamedEntity(),void this.index--;this.trieCurrent=this.entityTrie[this.trieIndex];var n=this.trieCurrent&s.BinTrieFlags.VALUE_LENGTH;if(n){var r=(n>>14)-1;if(this.allowLegacyEntity()||e===t.Semi){var i=this.index-this.entityExcess+1;i>this.sectionStart&&this.emitPartial(this.sectionStart,i),this.entityResult=this.trieIndex,this.trieIndex+=r,this.entityExcess=0,this.sectionStart=this.index+1,0===r&&this.emitNamedEntity()}else this.trieIndex+=r}},e.prototype.emitNamedEntity=function(){if(this.state=this.baseState,0!==this.entityResult)switch((this.entityTrie[this.entityResult]&s.BinTrieFlags.VALUE_LENGTH)>>14){case 1:this.emitCodePoint(this.entityTrie[this.entityResult]&~s.BinTrieFlags.VALUE_LENGTH);break;case 2:this.emitCodePoint(this.entityTrie[this.entityResult+1]);break;case 3:this.emitCodePoint(this.entityTrie[this.entityResult+1]),this.emitCodePoint(this.entityTrie[this.entityResult+2])}},e.prototype.stateBeforeNumericEntity=function(e){(32|e)===t.LowerX?(this.entityExcess++,this.state=r.InHexEntity):(this.state=r.InNumericEntity,this.stateInNumericEntity(e))},e.prototype.emitNumericEntity=function(e){var t=this.index-this.entityExcess-1;t+2+Number(this.state===r.InHexEntity)!==this.index&&(t>this.sectionStart&&this.emitPartial(this.sectionStart,t),this.sectionStart=this.index+Number(e),this.emitCodePoint((0,s.replaceCodePoint)(this.entityResult))),this.state=this.baseState},e.prototype.stateInNumericEntity=function(e){e===t.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=10*this.entityResult+(e-t.Zero),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.stateInHexEntity=function(e){e===t.Semi?this.emitNumericEntity(!0):u(e)?(this.entityResult=16*this.entityResult+(e-t.Zero),this.entityExcess++):function(e){return e>=t.UpperA&&e<=t.UpperF||e>=t.LowerA&&e<=t.LowerF}(e)?(this.entityResult=16*this.entityResult+((32|e)-t.LowerA+10),this.entityExcess++):(this.allowLegacyEntity()?this.emitNumericEntity(!1):this.state=this.baseState,this.index--)},e.prototype.allowLegacyEntity=function(){return!this.xmlMode&&(this.baseState===r.Text||this.baseState===r.InSpecialTag)},e.prototype.cleanup=function(){this.running&&this.sectionStart!==this.index&&(this.state===r.Text||this.state===r.InSpecialTag&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):this.state!==r.InAttributeValueDq&&this.state!==r.InAttributeValueSq&&this.state!==r.InAttributeValueNq||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))},e.prototype.shouldContinue=function(){return this.index0&&o.has(this.stack[this.stack.length-1]);){var a=this.stack.pop();null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,a,!0)}this.isVoidElement(e)||(this.stack.push(e),bM.has(e)?this.foreignContext.push(!0):vM.has(e)&&this.foreignContext.push(!1)),null===(i=(r=this.cbs).onopentagname)||void 0===i||i.call(r,e),this.cbs.onopentag&&(this.attribs={})},e.prototype.endOpenTag=function(e){var t,n;this.startIndex=this.openTagStart,this.attribs&&(null===(n=(t=this.cbs).onopentag)||void 0===n||n.call(t,this.tagname,this.attribs,e),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""},e.prototype.onopentagend=function(e){this.endIndex=e,this.endOpenTag(!1),this.startIndex=e+1},e.prototype.onclosetag=function(e,t){var n,r,i,o,a,s;this.endIndex=t;var l=this.getSlice(e,t);if(this.lowerCaseTagNames&&(l=l.toLowerCase()),(bM.has(l)||vM.has(l))&&this.foreignContext.pop(),this.isVoidElement(l))this.options.xmlMode||"br"!==l||(null===(r=(n=this.cbs).onopentagname)||void 0===r||r.call(n,"br"),null===(o=(i=this.cbs).onopentag)||void 0===o||o.call(i,"br",{},!0),null===(s=(a=this.cbs).onclosetag)||void 0===s||s.call(a,"br",!1));else{var c=this.stack.lastIndexOf(l);if(-1!==c)if(this.cbs.onclosetag)for(var u=this.stack.length-c;u--;)this.cbs.onclosetag(this.stack.pop(),0!==u);else this.stack.length=c;else this.options.xmlMode||"p"!==l||(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=t+1},e.prototype.onselfclosingtag=function(e){this.endIndex=e,this.options.xmlMode||this.options.recognizeSelfClosing||this.foreignContext[this.foreignContext.length-1]?(this.closeCurrentTag(!1),this.startIndex=e+1):this.onopentagend(e)},e.prototype.closeCurrentTag=function(e){var t,n,r=this.tagname;this.endOpenTag(e),this.stack[this.stack.length-1]===r&&(null===(n=(t=this.cbs).onclosetag)||void 0===n||n.call(t,r,!e),this.stack.pop())},e.prototype.onattribname=function(e,t){this.startIndex=e;var n=this.getSlice(e,t);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n},e.prototype.onattribdata=function(e,t){this.attribvalue+=this.getSlice(e,t)},e.prototype.onattribentity=function(e){this.attribvalue+=(0,cM.fromCodePoint)(e)},e.prototype.onattribend=function(e,t){var n,r;this.endIndex=t,null===(r=(n=this.cbs).onattribute)||void 0===r||r.call(n,this.attribname,this.attribvalue,e===lM.QuoteType.Double?'"':e===lM.QuoteType.Single?"'":e===lM.QuoteType.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""},e.prototype.getInstructionName=function(e){var t=e.search(yM),n=t<0?e:e.substr(0,t);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n},e.prototype.ondeclaration=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(n);this.cbs.onprocessinginstruction("!".concat(r),"!".concat(n))}this.startIndex=t+1},e.prototype.onprocessinginstruction=function(e,t){this.endIndex=t;var n=this.getSlice(e,t);if(this.cbs.onprocessinginstruction){var r=this.getInstructionName(n);this.cbs.onprocessinginstruction("?".concat(r),"?".concat(n))}this.startIndex=t+1},e.prototype.oncomment=function(e,t,n){var r,i,o,a;this.endIndex=t,null===(i=(r=this.cbs).oncomment)||void 0===i||i.call(r,this.getSlice(e,t-n)),null===(a=(o=this.cbs).oncommentend)||void 0===a||a.call(o),this.startIndex=t+1},e.prototype.oncdata=function(e,t,n){var r,i,o,a,s,l,c,u,h,d;this.endIndex=t;var p=this.getSlice(e,t-n);this.options.xmlMode||this.options.recognizeCDATA?(null===(i=(r=this.cbs).oncdatastart)||void 0===i||i.call(r),null===(a=(o=this.cbs).ontext)||void 0===a||a.call(o,p),null===(l=(s=this.cbs).oncdataend)||void 0===l||l.call(s)):(null===(u=(c=this.cbs).oncomment)||void 0===u||u.call(c,"[CDATA[".concat(p,"]]")),null===(d=(h=this.cbs).oncommentend)||void 0===d||d.call(h)),this.startIndex=t+1},e.prototype.onend=function(){var e,t;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(var n=this.stack.length;n>0;this.cbs.onclosetag(this.stack[--n],!0));}null===(t=(e=this.cbs).onend)||void 0===t||t.call(e)},e.prototype.reset=function(){var e,t,n,r;null===(t=(e=this.cbs).onreset)||void 0===t||t.call(e),this.tokenizer.reset(),this.tagname="",this.attribname="",this.attribs=null,this.stack.length=0,this.startIndex=0,this.endIndex=0,null===(r=(n=this.cbs).onparserinit)||void 0===r||r.call(n,this),this.buffers.length=0,this.bufferOffset=0,this.writeIndex=0,this.ended=!1},e.prototype.parseComplete=function(e){this.reset(),this.end(e)},e.prototype.getSlice=function(e,t){for(;e-this.bufferOffset>=this.buffers[0].length;)this.shiftBuffer();for(var n=this.buffers[0].slice(e-this.bufferOffset,t-this.bufferOffset);t-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,t-this.bufferOffset);return n},e.prototype.shiftBuffer=function(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()},e.prototype.write=function(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,new Error(".write() after done!")):(this.buffers.push(e),this.tokenizer.running&&(this.tokenizer.write(e),this.writeIndex++))},e.prototype.end=function(e){var t,n;this.ended?null===(n=(t=this.cbs).onerror)||void 0===n||n.call(t,Error(".end() after done!")):(e&&this.write(e),this.ended=!0,this.tokenizer.end())},e.prototype.pause=function(){this.tokenizer.pause()},e.prototype.resume=function(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex0&&void 0!==arguments[0]?arguments[0]:{})};var AM=IM(ay),CM=IM(EM);function IM(e){return e&&e.__esModule?e:{default:e}}var OM={};function DM(e){e.adapter&&(0,CM.default)(e.adapter),(0,AM.default)(OM,e)}var PM={},NM={exports:{}};!function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){function t(t,n){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}((function(e,t){return"object"==typeof e&&null!==e&&"object"==typeof t&&null!==t&&Object.keys(t).every((function(r){if(!e.propertyIsEnumerable(r))return!1;var i=t[r],o=e[r];return!!("object"==typeof i&&null!==i?n(o,i):o===i)}))}));t.default=n,e.exports=t.default}(NM,NM.exports);var RM={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.adapter)return(0,t.default)(e.adapter),e.adapter;var r=(0,n.get)().adapter;return(0,t.default)(r),r};var t=function(e){return e&&e.__esModule?e:{default:e}}(EM),n=_M})(RM),Object.defineProperty(PM,"__esModule",{value:!0});var MM=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};PM.propsOfNode=WM,PM.childrenOfNode=XM,PM.hasClassName=function(e,t){var n=WM(e).className||"";return n=String(n).replace(/\s/g," "),(0,HM.default)(t)?t.test(n):(" "+String(n)+" ").indexOf(" "+String(t)+" ")>-1},PM.treeForEach=YM,PM.treeFilter=qM,PM.findParentNode=function(e,t){return qM(e,(function(e){return!!e.rendered&&-1!==XM(e).indexOf(t)}))[0]||null},PM.pathToNode=KM,PM.parentsOfNode=function(e,t){return(KM(e,t)||[]).reverse()},PM.nodeHasId=function(e,t){return WM(e).id===t},PM.nodeMatchesObjectProps=function(e,t){return(0,UM.default)(WM(e),function(e){return(0,FM.default)(e).reduce((function(e,t){var n=MM(t,2),r=n[0],i=n[1];return(0,LM.default)({},e,function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},r,function(e){return void 0!==e?e:QM}(i)))}),{})}(t))},PM.getTextFromNode=function e(t){return JM(t,{recurse:e,getCustom:function(e){var t=e.type;return"<"+String(t.displayName||(0,jM.default)(t))+" />"}})},PM.getTextFromHostNodes=function e(t,n){return JM(t,{recurse:function(){function t(t){return e(t,n)}return t}(),handleHostNodes:function(e){return[].concat(n.nodeToHostNode(e,!0)).map(ZM).join("")}})},PM.getHTMLFromHostNodes=function e(t,n){return JM(t,{recurse:function(){function t(t){return e(t,n)}return t}(),handleHostNodes:function(e){return[].concat(n.nodeToHostNode(e,!0)).map(eL).join("")},nullRenderReturnsNull:!0})};var LM=zM(ay),BM=zM(Wx),FM=zM(Tw),UM=zM(NM.exports),jM=zM(Yw),HM=zM(wE),GM=zM(RM);function zM(e){return e&&e.__esModule?e:{default:e}}function VM(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:{};return console.warn("getAdapter from Utils is deprecated; please use ./getAdapter instead"),(0,g.default)(e)},e.makeOptions=function(e){var t=(0,f.get)(),n=t.attachTo,r=t.hydrateIn,o=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["attachTo","hydrateIn"]);T(n,r);var a=e.attachTo,s=e.hydrateIn;T(a,s);var l=s||r||n||a||void 0,c=s||r||void 0,u=(0,i.default)({},l&&{attachTo:l},c&&{hydrateIn:c});return(0,i.default)({},o,e,u)},e.isCustomComponent=function(e,t){return(0,b.default)(t),t.isCustomComponent?!!t.isCustomComponent(e):"function"==typeof e},e.isCustomComponentElement=function(e,t){return t.isCustomComponentElement?!!t.isCustomComponentElement(e):!!e&&t.isValidElement(e)&&"function"==typeof e.type},e.propsOfNode=_,e.typeOfNode=function(e){return e?e.type:null},e.nodeHasType=function(e,t){if(!t||!e)return!1;var n=(0,g.default)();return n.displayNameOfNode?n.displayNameOfNode(e)===t:!!e.type&&("string"==typeof e.type?e.type===t:("function"==typeof e.type?(0,l.default)(e.type)===t:e.type.name===t)||e.type.displayName===t)},e.nodeMatches=A,e.nodeEqual=C,e.containsChildrenSubArray=function(e,t,n){var r=(0,m.childrenOfNode)(t);return r.some((function(t,i){return function(e,t,n){return t.length===n.length&&t.every((function(t,r){return e(t,n[r])}))}(e,r.slice(i,i+n.length),n)}))},e.childrenToSimplifiedArray=I,e.isReactElementAlike=function(e,t){return t.isValidElement(e)||O(e)||Array.isArray(e)},e.withSetStateAllowed=function(e){var t=!1;void 0===globalThis.document&&(t=!0,globalThis.document={}),e(),t&&(globalThis.document=void 0,delete globalThis.document)},e.AND=function(e){var t=e.slice().reverse();return function(e){return t.every((function(t){return t(e)}))}},e.displayNameOfNode=function(e){if(!e)return null;var t=e.type;return t?t.displayName||("function"==typeof t?(0,l.default)(t):t.name||t):null},e.sym=function(e){return"function"==typeof Symbol?Symbol.for("enzyme."+String(e)):e},e.privateSet=function(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0})},e.cloneElement=function(e,t,n){return e.createElement(t.type,(0,i.default)({},t.props,n))},e.spyMethod=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0,i=e[t],o=(0,c.default)(e,t),a=void 0;return o&&(a=Object.getOwnPropertyDescriptor(e,t)),Object.defineProperty(e,t,{configurable:!0,enumerable:!a||!!a.enumerable,value:n(i)||function(){for(var e=arguments.length,t=Array(e),n=0;n2&&void 0!==arguments[2]?arguments[2]:a.default,!0)}function C(e,t){return k(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:a.default,!1)}function I(e){for(var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=function(e){var t=[],n=function(e){null!==e&&!1!==e&&void 0!==e&&t.push(e)};return Array.isArray(e)?e.forEach(n):n(e),t}(e),r=[],i=0;i"'`]/g,oL=RegExp(iL.source),aL="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,sL="object"==typeof self&&self&&self.Object===Object&&self,lL=aL||sL||Function("return this")();var cL,uL=(cL={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},function(e){return null==cL?void 0:cL[e]}),hL=Object.prototype.toString,dL=lL.Symbol,pL=dL?dL.prototype:void 0,fL=pL?pL.toString:void 0;function mL(e){if("string"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&hL.call(e)==rL}(e))return fL?fL.call(e):"";var t=e+"";return"0"==t&&1/e==-nL?"-0":t}var gL=function(e){return(e=null==(t=e)?"":mL(t))&&oL.test(e)?e.replace(iL,uL):e;var t},bL=String.prototype.valueOf,vL=Object.prototype.toString,yL=eE(),TL=function(e){return"string"==typeof e||"object"==typeof e&&(yL?function(e){try{return bL.call(e),!0}catch(e){return!1}}(e):"[object String]"===vL.call(e))},_L=Number.prototype.toString,EL=Object.prototype.toString,xL=eE(),wL=Bv,SL=wL("Boolean.prototype.toString"),kL=wL("Object.prototype.toString"),AL=eE();Object.defineProperty(tL,"__esModule",{value:!0});var CL="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};tL.typeName=HL,tL.spaces=GL,tL.indent=zL,tL.debugNode=WL,tL.debugNodes=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.map((function(e){return WL(e,void 0,t)})).join("\n\n\n")};var IL=UL(gL),OL=UL(Yw),DL=UL(TL),PL=UL((function(e){return"number"==typeof e||"object"==typeof e&&(xL?function(e){try{return _L.call(e),!0}catch(e){return!1}}(e):"[object Number]"===EL.call(e))})),NL=UL(C_),RL=UL((function(e){return"boolean"==typeof e||null!==e&&"object"==typeof e&&(AL&&Symbol.toStringTag in e?function(e){try{return SL(e),!0}catch(e){return!1}}(e):"[object Boolean]"===kL(e))})),ML=UL(oT),LL=UL(Yb),BL=PM,FL=UL(RM);function UL(e){return e&&e.__esModule?e:{default:e}}var jL=Function.bind.call(Function.call,Boolean.prototype.valueOf);function HL(e){return(0,FL.default)().displayNameOfNode?(0,FL.default)().displayNameOfNode(e)||"Component":"function"==typeof e.type?e.type.displayName||(0,OL.default)(e.type)||"Component":e.type}function GL(e){return Array(e+1).join(" ")}function zL(e,t){return t.split("\n").map((function(t){return""+String(GL(e))+String(t)})).join("\n")}function VL(e,t){var n=(0,BL.propsOfNode)(e);return Object.keys(n).filter((function(e){return"children"!==e})).map((function(e){return String(e)+"="+String(function(e,t){return(0,DL.default)(e)?(0,ML.default)(String(e),{quoteStyle:"double"}):(0,PL.default)(e)?"{"+String((0,ML.default)(Number(e)))+"}":(0,RL.default)(e)?"{"+String((0,ML.default)(jL(e)))+"}":(0,NL.default)(e)?"{"+String((0,ML.default)(e))+"}":"object"===(void 0===e?"undefined":CL(e))?t.verbose?"{"+String((0,ML.default)(e))+"}":"{{...}}":"{["+(void 0===e?"undefined":CL(e))+"]}"}(n[e],t))})).join(" ")}function WL(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof e||"number"==typeof e)return(0,IL.default)(e);if("function"==typeof e){var r=(0,OL.default)(e);return"[function"+(r?" "+String(r):"")+"]"}if(!e)return"";if(!(0,FL.default)().isValidElement(e)&&!function(e){return(0,LL.default)(e,"nodeType")&&"string"==typeof e.nodeType&&(0,LL.default)(e,"type")&&(0,LL.default)(e,"key")&&(0,LL.default)(e,"ref")&&(0,LL.default)(e,"instance")&&(0,LL.default)(e,"rendered")}(e))return"{"+String((0,ML.default)(e))+"}";var i=(0,BL.childrenOfNode)(e).map((function(e){return WL(e,t,n)})).filter(Boolean),o=HL(e),a=n.ignoreProps?"":VL(e,n),s=a?" ":"",l=i.length?">":" ",c=function(e,t){return e.length?"\n"+String(e.map((function(e){return zL(t,e)})).join("\n"))+"\n":""}(i,t),u=i.length?"":"/>";return"<"+String(o)+s+String(a)+l+String(c)+u}var XL={},YL={},qL={};Object.defineProperty(qL,"__esModule",{value:!0});var $L=function(e){return JSON.stringify(e)},KL=function(e){var t=e.body,n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var l=a.value,c=void 0;if("universalSelector"===l.type)c="*";else if("typeSelector"===l.type)c=l.name;else if("idSelector"===l.type)c="#"+l.name;else if("classSelector"===l.type)c="."+l.name;else if("attributePresenceSelector"===l.type)c="["+l.name+"]";else if("attributeValueSelector"===l.type)c="["+l.name+l.operator+$L(l.value)+"]";else if("pseudoClassSelector"===l.type)c=":"+l.name,l.parameters.length&&(c+="("+l.parameters.map($L).join(", ")+")");else{if("pseudoElementSelector"!==l.type)throw new Error("Unknown token.");c="::"+l.name}n.push(c)}}catch(e){i=!0,o=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw o}}return n.join("")};qL.default=function(){return{generate:function(e){var t=[],n=!0,r=!1,i=void 0;try{for(var o,a=e[Symbol.iterator]();!(n=(o=a.next()).done);n=!0){var s=o.value;if("selector"===s.type)t.push(KL(s));else if("descendantCombinator"===s.type)t.push(" ");else if("childCombinator"===s.type)t.push(" > ");else if("adjacentSiblingCombinator"===s.type)t.push(" + ");else{if("generalSiblingCombinator"!==s.type)throw new Error("Unknown token.");t.push(" ~ ")}}}catch(e){r=!0,i=e}finally{try{!n&&a.return&&a.return()}finally{if(r)throw i}}return t.join("")}}};var QL={},ZL={exports:{}};!function(e){var t,n;t=v,n=function(){function e(t,n,r){return this.id=++e.highestId,this.name=t,this.symbols=n,this.postprocess=r,this}function t(e,t,n,r){this.rule=e,this.dot=t,this.reference=n,this.data=[],this.wantedBy=r,this.isComplete=this.dot===e.symbols.length}function n(e,t){this.grammar=e,this.index=t,this.states=[],this.wants={},this.scannable=[],this.completed={}}function r(e,t){this.rules=e,this.start=t||this.rules[0].name;var n=this.byName={};this.rules.forEach((function(e){n.hasOwnProperty(e.name)||(n[e.name]=[]),n[e.name].push(e)}))}function i(){this.reset("")}function o(e,t,o){if(e instanceof r){var a=e;o=t}else a=r.fromCompiled(e,t);for(var s in this.grammar=a,this.options={keepHistory:!1,lexer:a.lexer||new i},o||{})this.options[s]=o[s];this.lexer=this.options.lexer,this.lexerState=void 0;var l=new n(a,0);this.table=[l],l.wants[a.start]=[],l.predict(a.start),l.process(),this.current=0}function a(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return e.toString();if(e.type)return"%"+e.type;if(e.test)return"<"+String(e.test)+">";throw new Error("Unknown symbol type: "+e)}}return e.highestId=0,e.prototype.toString=function(e){var t=void 0===e?this.symbols.map(a).join(" "):this.symbols.slice(0,e).map(a).join(" ")+" ● "+this.symbols.slice(e).map(a).join(" ");return this.name+" → "+t},t.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},t.prototype.nextState=function(e){var n=new t(this.rule,this.dot+1,this.reference,this.wantedBy);return n.left=this,n.right=e,n.isComplete&&(n.data=n.build(),n.right=void 0),n},t.prototype.build=function(){var e=[],t=this;do{e.push(t.right.data),t=t.left}while(t.left);return e.reverse(),e},t.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,o.fail))},n.prototype.process=function(e){for(var t=this.states,n=this.wants,r=this.completed,i=0;i0&&t.push(" ^ "+r+" more lines identical to this"),r=0,t.push(" "+a)),n=a}},o.prototype.getSymbolDisplay=function(e){return function(e){var t=typeof e;if("string"===t)return e;if("object"===t){if(e.literal)return JSON.stringify(e.literal);if(e instanceof RegExp)return"character matching "+e;if(e.type)return e.type+" token";if(e.test)return"token matching "+String(e.test);throw new Error("Unknown symbol type: "+e)}}(e)},o.prototype.buildFirstStateStack=function(e,t){if(-1!==t.indexOf(e))return null;if(0===e.wantedBy.length)return[e];var n=e.wantedBy[0],r=[e].concat(t),i=this.buildFirstStateStack(n,r);return null===i?null:[e].concat(i)},o.prototype.save=function(){var e=this.table[this.current];return e.lexerState=this.lexerState,e},o.prototype.restore=function(e){var t=e.index;this.current=t,this.table[t]=e,this.table.splice(t+1),this.lexerState=e.lexerState,this.results=this.finish()},o.prototype.rewind=function(e){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[e])},o.prototype.finish=function(){var e=[],t=this.grammar.start;return this.table[this.table.length-1].states.forEach((function(n){n.rule.name===t&&n.dot===n.rule.symbols.length&&0===n.reference&&n.data!==o.fail&&e.push(n)})),e.map((function(e){return e.data}))},{Parser:o,Grammar:r,Rule:e}},e.exports?e.exports=n():t.nearley=n()}(ZL);var JL={exports:{}},eB=9007199254740991,tB="[object Arguments]",nB="[object Function]",rB="[object GeneratorFunction]",iB="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis,oB="object"==typeof self&&self&&self.Object===Object&&self,aB=iB||oB||Function("return this")();function sB(e,t){for(var n=-1,r=t.length,i=e.length;++n0&&n(s)?t>1?fB(s,t-1,n,r,i):sB(i,s):r||(i[i.length]=s)}return i}function mB(e){return gB(e)||function(e){return function(e){return function(e){return!!e&&"object"==typeof e}(e)&&function(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=eB}(e.length)&&!function(e){var t=function(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}(e)?uB.call(e):"";return t==nB||t==rB}(e)}(e)}(e)&&cB.call(e,"callee")&&(!dB.call(e,"callee")||uB.call(e)==tB)}(e)||!!(pB&&e&&e[pB])}var gB=Array.isArray;var bB=function(e){return e&&e.length?fB(e,Infinity):[]};(function(e){!function(){function t(e){return e[0]}var n=bB,r=function(e){return e=e.filter((function(e){return null!==e})),n(e)},i={" ":"descendantCombinator","+":"adjacentSiblingCombinator",">":"childCombinator","~":"generalSiblingCombinator"},o=function(e,t,r){var i=n(e).join(""),o=parseFloat(i);return isNaN(o)?r:o},a=function(e,t,n){return"true"===e[0]||"false"!==e[0]&&n},s=function(e,t,n){return"NaN"===e[0]?NaN:"undefined"!==e[0]?"null"===e[0]?null:n:void 0},l={Lexer:void 0,ParserRules:[{name:"combinator",symbols:["selector"]},{name:"combinator",symbols:["combinator","_",/[>+~ ]/,"_","selector"],postprocess:function(e){return(Array.isArray(e[0])?e[0]:[e[0]]).concat({type:i[e[2]]}).concat(e[4])}},{name:"selector",symbols:["selectorBody"],postprocess:function(e){return{type:"selector",body:e[0]}}},{name:"selectorBody$ebnf$1",symbols:["typeSelector"],postprocess:t},{name:"selectorBody$ebnf$1",symbols:[],postprocess:function(e){return null}},{name:"selectorBody$ebnf$2",symbols:[]},{name:"selectorBody$ebnf$2",symbols:["selectorBody$ebnf$2","simpleSelector"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"selectorBody",symbols:["selectorBody$ebnf$1","selectorBody$ebnf$2"],postprocess:function(e,t,n){var i=r(e);return i.length?i:n}},{name:"selectorBody$ebnf$3",symbols:[]},{name:"selectorBody$ebnf$3",symbols:["selectorBody$ebnf$3","simpleSelector"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"selectorBody",symbols:["universalSelector","selectorBody$ebnf$3"],postprocess:r},{name:"simpleSelector",symbols:["idSelector"]},{name:"simpleSelector",symbols:["classSelector"]},{name:"simpleSelector",symbols:["attributeValueSelector"]},{name:"simpleSelector",symbols:["attributePresenceSelector"]},{name:"simpleSelector",symbols:["pseudoClassSelector"]},{name:"simpleSelector",symbols:["pseudoElementSelector"]},{name:"typeSelector",symbols:["attributeName"],postprocess:function(e){return{type:"typeSelector",name:e[0]}}},{name:"className$ebnf$1",symbols:[{literal:"-"}],postprocess:t},{name:"className$ebnf$1",symbols:[],postprocess:function(e){return null}},{name:"className$ebnf$2",symbols:[]},{name:"className$ebnf$2",symbols:["className$ebnf$2",/[_a-zA-Z0-9-]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"className",symbols:["className$ebnf$1",/[_a-zA-Z]/,"className$ebnf$2"],postprocess:function(e){return(e[0]||"")+e[1]+e[2].join("")}},{name:"attributeName$ebnf$1",symbols:[]},{name:"attributeName$ebnf$1",symbols:["attributeName$ebnf$1",/[_a-zA-Z()0-9-]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"attributeName",symbols:[/[_a-z()A-Z]/,"attributeName$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}},{name:"classSelector",symbols:[{literal:"."},"className"],postprocess:function(e){return{type:"classSelector",name:e[1]}}},{name:"idSelector",symbols:[{literal:"#"},"attributeName"],postprocess:function(e){return{type:"idSelector",name:e[1]}}},{name:"universalSelector",symbols:[{literal:"*"}],postprocess:function(e){return{type:"universalSelector"}}},{name:"attributePresenceSelector",symbols:[{literal:"["},"attributeName",{literal:"]"}],postprocess:function(e){return{type:"attributePresenceSelector",name:e[1]}}},{name:"attributeOperator",symbols:[{literal:"="}]},{name:"attributeOperator$string$1",symbols:[{literal:"~"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$1"]},{name:"attributeOperator$string$2",symbols:[{literal:"|"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$2"]},{name:"attributeOperator$string$3",symbols:[{literal:"^"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$3"]},{name:"attributeOperator$string$4",symbols:[{literal:"$"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$4"]},{name:"attributeOperator$string$5",symbols:[{literal:"*"},{literal:"="}],postprocess:function(e){return e.join("")}},{name:"attributeOperator",symbols:["attributeOperator$string$5"]},{name:"attributeValueSelector",symbols:[{literal:"["},"attributeName","attributeOperator","attributeValue",{literal:"]"}],postprocess:function(e){return{type:"attributeValueSelector",name:e[1],value:e[3],operator:e[2][0]}}},{name:"attributeValue",symbols:["falsyPrimitiveStrings"],postprocess:t},{name:"attributeValue",symbols:["numericValue"],postprocess:t},{name:"attributeValue",symbols:["sqstring"],postprocess:t},{name:"attributeValue",symbols:["dqstring"],postprocess:t},{name:"falsyPrimitiveStrings$string$1",symbols:[{literal:"f"},{literal:"a"},{literal:"l"},{literal:"s"},{literal:"e"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$1"],postprocess:a},{name:"falsyPrimitiveStrings$string$2",symbols:[{literal:"t"},{literal:"r"},{literal:"u"},{literal:"e"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$2"],postprocess:a},{name:"falsyPrimitiveStrings$string$3",symbols:[{literal:"N"},{literal:"a"},{literal:"N"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$3"],postprocess:s},{name:"falsyPrimitiveStrings$string$4",symbols:[{literal:"n"},{literal:"u"},{literal:"l"},{literal:"l"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$4"],postprocess:s},{name:"falsyPrimitiveStrings$string$5",symbols:[{literal:"u"},{literal:"n"},{literal:"d"},{literal:"e"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"e"},{literal:"d"}],postprocess:function(e){return e.join("")}},{name:"falsyPrimitiveStrings",symbols:["falsyPrimitiveStrings$string$5"],postprocess:s},{name:"numericValue",symbols:["int",{literal:"."},"int"],postprocess:o},{name:"numericValue",symbols:[{literal:"+"},"int",{literal:"."},"int"],postprocess:o},{name:"numericValue",symbols:[{literal:"-"},"int",{literal:"."},"int"],postprocess:o},{name:"numericValue",symbols:[{literal:"-"},"int"],postprocess:o},{name:"numericValue",symbols:["int"],postprocess:o},{name:"numericValue",symbols:[{literal:"+"},"int"],postprocess:o},{name:"numericValue$string$1",symbols:[{literal:"I"},{literal:"n"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"i"},{literal:"t"},{literal:"y"}],postprocess:function(e){return e.join("")}},{name:"numericValue",symbols:["numericValue$string$1"],postprocess:o},{name:"numericValue$string$2",symbols:[{literal:"+"},{literal:"I"},{literal:"n"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"i"},{literal:"t"},{literal:"y"}],postprocess:function(e){return e.join("")}},{name:"numericValue",symbols:["numericValue$string$2"],postprocess:o},{name:"numericValue$string$3",symbols:[{literal:"-"},{literal:"I"},{literal:"n"},{literal:"f"},{literal:"i"},{literal:"n"},{literal:"i"},{literal:"t"},{literal:"y"}],postprocess:function(e){return e.join("")}},{name:"numericValue",symbols:["numericValue$string$3"],postprocess:o},{name:"int$ebnf$1",symbols:[/[0-9]/]},{name:"int$ebnf$1",symbols:["int$ebnf$1",/[0-9]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"int",symbols:["int$ebnf$1"]},{name:"classParameters",symbols:[]},{name:"classParameters",symbols:["classParameter"]},{name:"classParameters",symbols:["classParameters",{literal:","},"_","classParameter"],postprocess:(0,3,function(e){return e[0].concat([e[3]])})},{name:"classParameter$ebnf$1",symbols:[/[^()"', ]/]},{name:"classParameter$ebnf$1",symbols:["classParameter$ebnf$1",/[^()"', ]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"classParameter",symbols:["classParameter$ebnf$1"],postprocess:function(e){return e[0].join("")}},{name:"classParameter",symbols:["sqstring"],postprocess:t},{name:"classParameter",symbols:["dqstring"],postprocess:t},{name:"pseudoElementSelector$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:function(e){return e.join("")}},{name:"pseudoElementSelector",symbols:["pseudoElementSelector$string$1","pseudoClassSelectorName"],postprocess:function(e){return{type:"pseudoElementSelector",name:e[1]}}},{name:"pseudoClassSelector",symbols:[{literal:":"},"pseudoClassSelectorName"],postprocess:function(e){return{type:"pseudoClassSelector",name:e[1]}}},{name:"pseudoClassSelector",symbols:[{literal:":"},"pseudoClassSelectorName",{literal:"("},"classParameters",{literal:")"}],postprocess:function(e){return{type:"pseudoClassSelector",name:e[1],parameters:e[3]}}},{name:"pseudoClassSelectorName$ebnf$1",symbols:[/[a-zA-Z0-9-_]/]},{name:"pseudoClassSelectorName$ebnf$1",symbols:["pseudoClassSelectorName$ebnf$1",/[a-zA-Z0-9-_]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"pseudoClassSelectorName",symbols:[/[a-zA-Z]/,"pseudoClassSelectorName$ebnf$1"],postprocess:function(e){return e[0]+e[1].join("")}},{name:"dqstring$ebnf$1",symbols:[]},{name:"dqstring$ebnf$1",symbols:["dqstring$ebnf$1","dstrchar"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"dqstring",symbols:[{literal:'"'},"dqstring$ebnf$1",{literal:'"'}],postprocess:function(e){return e[1].join("")}},{name:"dstrchar",symbols:[/[^"]/],postprocess:t},{name:"dstrchar$string$1",symbols:[{literal:"\\"},{literal:'"'}],postprocess:function(e){return e.join("")}},{name:"dstrchar",symbols:["dstrchar$string$1"],postprocess:function(e){return'"'}},{name:"sqstring$ebnf$1",symbols:[]},{name:"sqstring$ebnf$1",symbols:["sqstring$ebnf$1","sstrchar"],postprocess:function(e){return e[0].concat([e[1]])}},{name:"sqstring",symbols:[{literal:"'"},"sqstring$ebnf$1",{literal:"'"}],postprocess:function(e){return e[1].join("")}},{name:"sstrchar",symbols:[/[^']/],postprocess:t},{name:"sstrchar$string$1",symbols:[{literal:"\\"},{literal:"'"}],postprocess:function(e){return e.join("")}},{name:"sstrchar",symbols:["sstrchar$string$1"],postprocess:function(e){return"'"}},{name:"_$ebnf$1",symbols:[]},{name:"_$ebnf$1",symbols:["_$ebnf$1",/[ ]/],postprocess:function(e){return e[0].concat([e[1]])}},{name:"_",symbols:["_$ebnf$1"],postprocess:function(e){return null}}],ParserStart:"combinator"};e.exports=l}()})(JL),Object.defineProperty(QL,"__esModule",{value:!0});var vB=ZL.exports,yB=function(e){return e&&e.__esModule?e:{default:e}}(JL.exports);QL.default=function(){return{parse:function(e){var t=new vB.Parser(yB.default.ParserRules,yB.default.ParserStart).feed(e).results;if(0===t.length)throw new Error("Found no parsings.");if(t.length>1)throw new Error("Ambiguous results.");return t[0]}}},Object.defineProperty(YL,"__esModule",{value:!0}),YL.createParser=YL.createGenerator=void 0;var TB=EB(qL),_B=EB(QL);function EB(e){return e&&e.__esModule?e:{default:e}}YL.createGenerator=TB.default,YL.createParser=_B.default;var xB=yx.exports,wB=Bv,SB=wB("Object.prototype.propertyIsEnumerable"),kB=wB("Array.prototype.push"),AB=function(e){var t=xB(e),n=[];for(var r in t)SB(t,r)&&kB(n,t[r]);return n},CB=AB,IB=function(){return"function"==typeof Object.values?Object.values:CB},OB=IB,DB=Pv,PB=Pv,NB=AB,RB=IB,MB=function(){var e=OB();return DB(Object,{values:e},{values:function(){return Object.values!==e}}),e},LB=(0,Nv.exports)(RB(),Object);PB(LB,{getPolyfill:RB,implementation:NB,shim:MB});var BB,FB,UB=LB,jB=V_,HB=q_(),GB=CE(),zB=PT,VB=IE(),WB=d_.exports,XB=ox(),YB=h_,qB=Cx,$B=cx,KB=Bv,QB=TL,ZB=Object("a"),JB="a"!==ZB[0]||!(0 in ZB),eF=KB("String.prototype.split"),tF=function(e){var t,n=qB(this),r=JB&&QB(n)?eF(n,""):n,i=XB(r);if(!WB(e))throw new TypeError("Array.prototype.filter callback must be a function");arguments.length>1&&(t=arguments[1]);for(var o=jB(n,0),a=0,s=0;a0){if((0,xF.default)(e).some((function(e){return void 0===e})))throw new TypeError("Enzyme::Props can’t have `undefined` values. Try using ‘findWhere()’ instead.");return function(t){return(0,CF.nodeMatchesObjectProps)(t,e)}}throw new TypeError("Enzyme::Selector does not support an array, null, or empty object as a selector")}throw new TypeError("Enzyme::Selector expects a string, object, or valid element type (Component Constructor)")}function iU(e,t,n){return e.reduce((function(e,r){var i=(0,CF.findParentNode)(n,r);if(!i)return e;var o=(0,CF.childrenOfNode)(i),a=o.indexOf(r),s=o[a+1];return s?(t(s)&&e.push(s),e):e}),[])}function oU(e,t,n){return JF((function(e,r){var i=(0,CF.findParentNode)(n,r);if(!i)return e;var o=(0,CF.childrenOfNode)(i),a=o.indexOf(r),s=o.slice(a+1);return e.concat(s.filter(t))}),e)}function aU(e,t){return JF((function(e,n){return e.concat((0,CF.childrenOfNode)(n).filter(t))}),e)}function sU(e,t){return JF((function(e,n){return e.concat((0,CF.treeFilter)(n,t))}),(0,wF.default)(e.map(CF.childrenOfNode)))}function lU(e,t){if("string"!=typeof e){var n=(0,AF.default)(e);if(n.length>0)return(0,wF.default)(n.map((function(e){return lU(e.tag,t)})))}if("function"==typeof e||"object"===(void 0===e?"undefined":TF(e)))return(0,CF.treeFilter)(t,rU(e));var r=[];if("string"!=typeof e)throw new TypeError("Enzyme::Selector expects a string, object, or Component Constructor");for(var i=eU(e),o=0;o2&&void 0!==arguments[2]?arguments[2]:c.treeFilter;return e.flatMap((function(e){return n(e.getNodeInternal(),t)}))}function S(e,t){return e.wrap(e.getNodesInternal().filter(t).filter(Boolean))}function k(e){if(1!==e[v].length)throw new Error("getRootNodeInternal(wrapper) can only be called when wrapper wraps one node");return e[v]!==e?e[T][0]:e[v][f]}function A(e,t){return(0,c.parentsOfNode)(t,k(e))}function C(e,t){t?Array.isArray(t)?((0,a.privateSet)(e,f,t[0]),(0,a.privateSet)(e,m,t)):((0,a.privateSet)(e,f,t),(0,a.privateSet)(e,m,[t])):((0,a.privateSet)(e,f,null),(0,a.privateSet)(e,m,[])),(0,a.privateSet)(e,"length",e[m].length)}var I=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(p(this,e),!globalThis.window&&!globalThis.document)throw new Error("It looks like you called `mount()` without a globalThis document being loaded.");var o=(0,a.makeOptions)(i);if(n)(0,a.privateSet)(this,g,n[g]),(0,a.privateSet)(this,v,n),C(this,t),(0,a.privateSet)(this,T,n[m]),(0,a.privateSet)(this,y,n[y]),(0,a.privateSet)(this,E,[]);else{var l=(0,s.default)(o);if(!l.isValidElement(t))throw new TypeError("ReactWrapper can only wrap valid elements");var c=l.createRenderer((0,r.default)({mode:"mount"},o));if((0,a.privateSet)(this,g,c),c.render(t,o.context),(0,a.privateSet)(this,v,this),C(this,this[g].getNode()),(0,a.privateSet)(this,y,o),(0,a.privateSet)(this,E,[]),(0,a.isCustomComponent)(o.wrappingComponent,l)){if("function"!=typeof this[g].getWrappingComponentRenderer)throw new TypeError("your adapter does not support `wrappingComponent`. Try upgrading it!");(0,a.privateSet)(this,_,new O(this,this[g].getWrappingComponentRenderer())),this[E].push(this[_])}}(0,a.privateSet)(this,b,t),(0,a.privateSet)(this,x,null)}return n(e,[{key:"root",value:function(){return this[v]}},{key:"getNodeInternal",value:function(){if(1!==this.length)throw new Error("ReactWrapper::getNode() can only be called when wrapping one node");return this[m][0]}},{key:"getNodesInternal",value:function(){return this[m]}},{key:"getElement",value:function(){var e=this;return this.single("getElement",(function(){return(0,s.default)(e[y]).nodeToElement(e[f])}))}},{key:"getElements",value:function(){var e=this;return this[m].map((function(t){return(0,s.default)(e[y]).nodeToElement(t)}))}},{key:"getNode",value:function(){throw new Error("ReactWrapper::getNode() is no longer supported. Use ReactWrapper::instance() instead")}},{key:"getNodes",value:function(){throw new Error("ReactWrapper::getNodes() is no longer supported.")}},{key:"getDOMNode",value:function(){var e=(0,s.default)(this[y]);return this.single("getDOMNode",(function(t){return e.nodeToHostNode(t,!0)}))}},{key:"ref",value:function(e){if(this[v]!==this)throw new Error("ReactWrapper::ref(refname) can only be called on the root");return this.instance().refs[e]}},{key:"instance",value:function(){var e=this;return this.single("instance",(function(){return e[f].instance}))}},{key:"getWrappingComponent",value:function(){if(this[v]!==this)throw new Error("ReactWrapper::getWrappingComponent() can only be called on the root");if(!this[y].wrappingComponent)throw new Error("ReactWrapper::getWrappingComponent() can only be called on a wrapper that was originally passed a `wrappingComponent` option");return this[_]}},{key:"update",value:function(){var e=this,t=this[v];return this!==t?t.update():(C(this,this[g].getNode()),this[E].forEach((function(t){if(t!==e[x]){t[x]=e;try{t.update()}finally{t[x]=null}}})),this)}},{key:"unmount",value:function(){var e=this;if(this[v]!==this)throw new Error("ReactWrapper::unmount() can only be called on the root");return this.single("unmount",(function(){e[g].unmount(),e.update()})),this}},{key:"mount",value:function(){var e=this;if(this[v]!==this)throw new Error("ReactWrapper::mount() can only be called on the root");return this[g].render(this[b],this[y].context,(function(){return e.update()})),this}},{key:"setProps",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this[v]!==this)throw new Error("ReactWrapper::setProps() can only be called on the root");if(arguments.length>1&&"function"!=typeof n)throw new TypeError("ReactWrapper::setProps() expects a function as its second argument");var r=(0,s.default)(this[y]);return this[b]=(0,a.cloneElement)(r,this[b],e),this[g].render(this[b],null,(function(){t.update(),n&&n()})),this}},{key:"setState",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(null===this.instance()||"class"!==this.getNodeInternal().nodeType)throw new Error("ReactWrapper::setState() can only be called on class components");if(arguments.length>1&&"function"!=typeof n)throw new TypeError("ReactWrapper::setState() expects a function as its second argument");return this.instance().setState(e,(function(){if(t.update(),n){var e=(0,s.default)(t[y]),r=t.instance();e.invokeSetStateCallback?e.invokeSetStateCallback(r,n):n.call(r)}})),this}},{key:"setContext",value:function(e){var t=this;if(this[v]!==this)throw new Error("ReactWrapper::setContext() can only be called on the root");if(!this[y].context)throw new Error("ReactWrapper::setContext() can only be called on a wrapper that was originally passed a context option");return this[g].render(this[b],e,(function(){return t.update()})),this}},{key:"contains",value:function(e){var t=(0,s.default)(this[y]);return w(this,Array.isArray(e)?function(n){return(0,a.containsChildrenSubArray)(a.nodeEqual,n,e.map((function(e){return t.elementToNode(e)})))}:function(n){return(0,a.nodeEqual)(t.elementToNode(e),n)}).length>0}},{key:"containsMatchingElement",value:function(e){var t=(0,s.default)(this[y]).elementToNode(e);return w(this,(function(e){return(0,a.nodeMatches)(t,e,(function(e,t){return e<=t}))})).length>0}},{key:"containsAllMatchingElements",value:function(e){var t=this;if(!Array.isArray(e))throw new TypeError("nodes should be an Array");return e.every((function(e){return t.containsMatchingElement(e)}))}},{key:"containsAnyMatchingElements",value:function(e){var t=this;return Array.isArray(e)&&e.some((function(e){return t.containsMatchingElement(e)}))}},{key:"equals",value:function(e){var t=this;return this.single("equals",(function(){return(0,a.nodeEqual)(t.getNodeInternal(),e)}))}},{key:"matchesElement",value:function(e){var t=this;return this.single("matchesElement",(function(){var n=(0,s.default)(t[y]).elementToNode(e);return(0,a.nodeMatches)(n,t.getNodeInternal(),(function(e,t){return e<=t}))}))}},{key:"find",value:function(e){return this.wrap((0,u.reduceTreesBySelector)(e,this.getNodesInternal()))}},{key:"is",value:function(e){var t=(0,u.buildPredicate)(e);return this.single("is",(function(e){return t(e)}))}},{key:"isEmptyRender",value:function(){var e=this.getNodeInternal();return(0,a.renderedDive)(e)}},{key:"filterWhere",value:function(e){var t=this;return S(this,(function(n){return e(t.wrap(n))}))}},{key:"filter",value:function(e){return S(this,(0,u.buildPredicate)(e))}},{key:"not",value:function(e){var t=(0,u.buildPredicate)(e);return S(this,(function(e){return!t(e)}))}},{key:"text",value:function(){var e=(0,s.default)(this[y]);return this.single("text",(function(t){return(0,c.getTextFromHostNodes)(t,e)}))}},{key:"html",value:function(){var e=(0,s.default)(this[y]);return this.single("html",(function(t){return(0,c.getHTMLFromHostNodes)(t,e)}))}},{key:"render",value:function(){var e=this.html();return(0,a.loadCheerioRoot)(e)}},{key:"simulate",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.single("simulate",(function(r){return t[g].simulateEvent(r,e,n),t[v].update(),t}))}},{key:"simulateError",value:function(e){var t=this;if(this[v]===this)throw new Error("ReactWrapper::simulateError() may not be called on the root");return this.single("simulateError",(function(n){if("host"===n.nodeType)throw new Error("ReactWrapper::simulateError() can only be called on custom components");var r=t[g];if("function"!=typeof r.simulateError)throw new TypeError("your adapter does not support `simulateError`. Try upgrading it!");var i=k(t),o=[n].concat(A(t,n));return r.simulateError(o,i,e),t[v].update(),t}))}},{key:"props",value:function(){return this.single("props",c.propsOfNode)}},{key:"state",value:function(e){var t=this,n=this[v]===this?this[g].getNode():this.getNodeInternal();if(null===this.instance()||"class"!==n.nodeType)throw new Error("ReactWrapper::state() can only be called on class components");var r=this.single("state",(function(){return t.instance().state}));if(void 0!==e){if(null==r)throw new TypeError('ReactWrapper::state("'+String(e)+'") requires that `state` not be `null` or `undefined`');return r[e]}return r}},{key:"context",value:function(e){var t=this;if(this[v]!==this)throw new Error("ReactWrapper::context() can only be called on the root");var n=this.single("context",(function(){return t.instance()}));if(null===n)throw new Error("ReactWrapper::context() can only be called on components with instances");var r=n.context;return void 0!==e?r[e]:r}},{key:"children",value:function(e){var t=this.flatMap((function(e){return(0,c.childrenOfNode)(e.getNodeInternal())}));return e?t.filter(e):t}},{key:"childAt",value:function(e){var t=this;return this.single("childAt",(function(){return t.children().at(e)}))}},{key:"parents",value:function(e){var t=this;return this.single("parents",(function(n){var r=t.wrap(A(t,n));return e?r.filter(e):r}))}},{key:"parent",value:function(){return this.flatMap((function(e){return[e.parents().get(0)]}))}},{key:"closest",value:function(e){if(this.is(e))return this;var t=this.parents().filter(e);return t.length>0?t.first():this.findWhere((function(){return!1}))}},{key:"prop",value:function(e){return this.props()[e]}},{key:"invoke",value:function(e){var t=this;return this.single("invoke",(function(){var n=t.prop(e);if("function"!=typeof n)throw new TypeError("ReactWrapper::invoke() requires the name of a prop whose value is a function");return function(){for(var e=arguments.length,r=Array(e),i=0;i1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduce((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduce((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"reduceRight",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"slice",value:function(e,t){return this.wrap(this.getNodesInternal().slice(e,t))}},{key:"some",value:function(e){if(this[v]===this)throw new Error("ReactWrapper::some() can not be called on the root");var t=(0,u.buildPredicate)(e);return this.getNodesInternal().some(t)}},{key:"someWhere",value:function(e){var t=this;return this.getNodesInternal().some((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"every",value:function(e){var t=(0,u.buildPredicate)(e);return this.getNodesInternal().every(t)}},{key:"everyWhere",value:function(e){var t=this;return this.getNodesInternal().every((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"flatMap",value:function(e){var t=this,n=this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)})),r=(0,i.default)(n,1);return this.wrap(r.filter(Boolean))}},{key:"findWhere",value:function(e){var t=this;return w(this,(function(n){var r=t.wrap(n);return r.length>0&&e(r)}))}},{key:"get",value:function(e){return this.getElements()[e]}},{key:"at",value:function(e){var t=this.getNodesInternal();return e0&&void 0!==arguments[0]?arguments[0]:null;return arguments.length>0?this.find(e).exists():this.length>0}},{key:"single",value:function(e,t){var n="string"==typeof e?e:"unknown",r="function"==typeof t?t:e;if(1!==this.length)throw new Error("Method “"+n+"” is meant to be run on 1 node. "+String(this.length)+" found instead.");return r.call(this,this.getNodeInternal())}},{key:"wrap",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[v];if(t instanceof e)return t;for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return(0,l.debugNodes)(this.getNodesInternal(),e)}},{key:"tap",value:function(e){return e(this),this}},{key:"detach",value:function(){if(this[v]!==this)throw new Error("ReactWrapper::detach() can only be called on the root");if(!this[y].attachTo)throw new Error("ReactWrapper::detach() can only be called on when the `attachTo` option was passed into `mount()`.");this[g].unmount()}},{key:"hostNodes",value:function(){return this.filterWhere((function(e){return"string"==typeof e.type()}))}}]),e}(),O=function(e){function t(e,n){p(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,n.getNode(),e));return(0,a.privateSet)(r,v,r),(0,a.privateSet)(r,g,n),r[E].push(e),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"getWrappingComponent",value:function(){throw new TypeError("ReactWrapper::getWrappingComponent() can only be called on the root")}}]),t}(I);function D(e,t){Object.defineProperty(I.prototype,e,{get:function(){throw new Error("\n Attempted to access ReactWrapper::"+String(e)+", which was previously a private property on\n Enzyme ReactWrapper instances, but is no longer and should not be relied upon.\n "+String(t)+"\n ")},enumerable:!1,configurable:!1})}a.ITERATOR_SYMBOL&&Object.defineProperty(I.prototype,a.ITERATOR_SYMBOL,{configurable:!0,value:function(){var e,t=this[m][a.ITERATOR_SYMBOL](),n=(0,s.default)(this[y]);return d(e={},a.ITERATOR_SYMBOL,(function(){return this})),d(e,"next",(function(){var e=t.next();return e.done?{done:!0}:{done:!1,value:n.nodeToElement(e.value)}})),e}}),D("node","Consider using the getElement() method instead."),D("nodes","Consider using the getElements() method instead."),D("renderer",""),D("options",""),D("complexSelector",""),e.default=I}(Ib);var cU={};!function(e){Object.defineProperty(e,"__esModule",{value:!0});var t=function e(t,n,r){null===t&&(t=Function.prototype);var i=Object.getOwnPropertyDescriptor(t,n);if(void 0===i){var o=Object.getPrototypeOf(t);return null===o?void 0:e(o,n,r)}if("value"in i)return i.value;var a=i.get;return void 0!==a?a.call(r):void 0},n=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:h.treeFilter;return e.flatMap((function(e){return n(e.getNodeInternal(),t)}))}function D(e,t){return e.wrap(e.getNodesInternal().filter(t).filter(Boolean))}function P(e){var t=e.options,n=t.lifecycles,r=void 0===n?{}:n,o=t.enableComponentDidUpdateOnSetState,a=t.supportPrevContextArgumentOfComponentDidUpdate,s=void 0!==o,l=void 0!==a,c=s||l?(0,i.default)({},s&&{onSetState:!!o},l&&{prevContext:!!a}):null,u=r.getDerivedStateFromProps,h=!!u&&{hasShouldComponentUpdateBug:!!u.hasShouldComponentUpdateBug};return(0,i.default)({},r,{setState:(0,i.default)({},r.setState),getChildContext:(0,i.default)({calledByRenderer:!0},r.getChildContext)},c&&{componentDidUpdate:c},{getDerivedStateFromProps:h})}function N(e){return"host"===e.nodeType?e:e.rendered}function R(e){if(1!==e[_].length)throw new Error("getRootNodeInternal(wrapper) can only be called when wrapper wraps one node");return e[_]!==e?e[w][0]:e[_][b]}function M(e,t){return(0,h.parentsOfNode)(t,R(e))}function L(e,t){Array.isArray(t)?((0,l.privateSet)(e,b,t[0]),(0,l.privateSet)(e,v,t)):((0,l.privateSet)(e,b,t),(0,l.privateSet)(e,v,[t])),(0,l.privateSet)(e,"length",e[v].length)}function B(e,t,n,r){return!(0,s.default)(e,t)||!(0,s.default)(n,r)}function F(e){return e&&e.isPureReactComponent}function U(e,t,n,i,o){var a=t[y];if("parent"===e.options.legacyContextMode)if(o)(0,l.privateSet)(t,S,o.getLastReturnValue()),o.restore();else if("function"==typeof n.getChildContext){var s=function(e,t,n){var i=e.instance,o=e.type,a=(0,l.displayNameOfNode)(e);if("object"!==r(o.childContextTypes))return console.warn(String(a)+".getChildContext(): childContextTypes must be defined in order to use getChildContext()."),{};var s=i.getChildContext();return Object.keys(s).forEach((function(e){if(!(e in o.childContextTypes))throw new Error(String(a)+'.getChildContext(): key "'+String(e)+'" is not defined in childContextTypes.')})),"function"==typeof n.checkPropTypes&&n.checkPropTypes(o.childContextTypes,s,"child context",t),s}(i,[t[b]].concat(M(t,t[b])),a);(0,l.privateSet)(t,S,s)}else(0,l.privateSet)(t,S,null)}function j(e,t){if("function"==typeof e.type.getDerivedStateFromProps)var n=e.instance,r=(0,l.spyMethod)(n,"shouldComponentUpdate",(function(e){return function(){n.state=t;for(var r=arguments.length,o=Array(r),a=0;a1&&void 0!==arguments[1]?arguments[1]:{},n=(0,i.default)({},e[E],t,{context:t.context||(0,i.default)({},e[E].context,e[_][S])});return(0,l.privateSet)(n,I,e[_][I]),n}var V=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};m(this,e),function(e){var t=e.lifecycleExperimental,n=e.disableLifecycleMethods,r=e.enableComponentDidUpdateOnSetState,i=e.supportPrevContextArgumentOfComponentDidUpdate,o=e.lifecycles;if(void 0!==t&&"boolean"!=typeof t)throw new Error("lifecycleExperimental must be either true or false if provided");if(void 0!==n&&"boolean"!=typeof n)throw new Error("disableLifecycleMethods must be either true or false if provided");if(null!=t&&null!=n&&t===n)throw new Error("lifecycleExperimental and disableLifecycleMethods cannot be set to the same value");if(void 0!==r&&o.componentDidUpdate&&o.componentDidUpdate.onSetState!==r)throw new TypeError("the legacy enableComponentDidUpdateOnSetState option should be matched by `lifecycles: { componentDidUpdate: { onSetState: true } }`, for compatibility");if(void 0!==i&&o.componentDidUpdate&&o.componentDidUpdate.prevContext!==i)throw new TypeError("the legacy supportPrevContextArgumentOfComponentDidUpdate option should be matched by `lifecycles: { componentDidUpdate: { prevContext: true } }`, for compatibility")}(o);var a=function(e,t,n,r){var o=(0,l.makeOptions)(n),a=(0,c.default)(n);if((0,l.privateSet)(o,I,n[I]),t||!(0,l.isCustomComponent)(o.wrappingComponent,a))return o;if("function"!=typeof a.wrapWithWrappingComponent)throw new TypeError("your adapter does not support `wrappingComponent`. Try upgrading it!");var s=a.wrapWithWrappingComponent(e,o),u=s.node,h=s.RootFinder,d=new X(u,r,h),p=G(d,a),f=p.legacyContext,m=p.providerValues;return(0,l.privateSet)(r,k,d),(0,i.default)({},o,g({context:(0,i.default)({},o.context,f)},I,m))}(t,n,o,this),s=(0,c.default)(a),u=P(s);if(n)(0,l.privateSet)(this,_,n),(0,l.privateSet)(this,T,null),(0,l.privateSet)(this,y,n[y]),L(this,t),(0,l.privateSet)(this,E,n[E]),(0,l.privateSet)(this,w,n[v]),(0,l.privateSet)(this,I,null);else{if(!s.isValidElement(t))throw new TypeError("ShallowWrapper can only wrap valid elements");var h=u.getChildContext.calledByRenderer?function(e,t){return(0,l.isCustomComponentElement)(e,t)&&e.type.prototype&&"function"==typeof e.type.prototype.getChildContext?(0,l.spyMethod)(e.type.prototype,"getChildContext"):null}(t,s):null;(0,l.privateSet)(this,_,this),(0,l.privateSet)(this,T,t);var d=s.createRenderer((0,i.default)({mode:"shallow"},a));(0,l.privateSet)(this,y,d);var p=new Map(a[I]||[]);this[y].render(t,a.context,{providerValues:p});var b=this[y].getNode();L(this,N(b)),(0,l.privateSet)(this,E,a),(0,l.privateSet)(this,I,p);var S=b.instance;S&&!a.disableLifecycleMethods&&(u.componentDidUpdate.onSetState&&!S[x]&&((0,l.privateSet)(S,x,S.setState),S.setState=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return r.setState.apply(r,f(null==t?[e]:[e,t]))}),"function"==typeof S.componentDidMount&&this[y].batchedUpdates((function(){S.componentDidMount()})),U(s,this,S,b,h))}}return n(e,[{key:"root",value:function(){return this[_]}},{key:"getNodeInternal",value:function(){if(1!==this.length)throw new Error("ShallowWrapper::getNode() can only be called when wrapping one node");return this[_]===this&&this.update(),this[b]}},{key:"getNodesInternal",value:function(){return this[_]===this&&1===this.length&&this.update(),this[v]}},{key:"getElement",value:function(){var e=this;return this.single("getElement",(function(t){return(0,c.default)(e[E]).nodeToElement(t)}))}},{key:"getElements",value:function(){var e=this;return this.getNodesInternal().map((function(t){return(0,c.default)(e[E]).nodeToElement(t)}))}},{key:"getNode",value:function(){throw new Error("ShallowWrapper::getNode() is no longer supported. Use ShallowWrapper::getElement() instead")}},{key:"getNodes",value:function(){throw new Error("ShallowWrapper::getNodes() is no longer supported. Use ShallowWrapper::getElements() instead")}},{key:"instance",value:function(){if(this[_]!==this)throw new Error("ShallowWrapper::instance() can only be called on the root");return this[y].getNode().instance}},{key:"getWrappingComponent",value:function(){if(this[_]!==this)throw new Error("ShallowWrapper::getWrappingComponent() can only be called on the root");if(!this[E].wrappingComponent)throw new Error("ShallowWrapper::getWrappingComponent() can only be called on a wrapper that was originally passed a `wrappingComponent` option");return this[k]}},{key:"update",value:function(){if(this[_]!==this)throw new Error("ShallowWrapper::update() can only be called on the root");if(1!==this.length)throw new Error("ShallowWrapper::update() can only be called when wrapping one node");return L(this,N(this[y].getNode())),this}},{key:"unmount",value:function(){return this[y].unmount(),this[_][k]&&this[_][k].unmount(),this}},{key:"rerender",value:function(e,t){var n=this,r=(0,c.default)(this[E]);return this.single("rerender",(function(){(0,l.withSetStateAllowed)((function(){var o=n[y].getNode(),a=o.instance||{},c=o.type||{},u=a.state,h=a.props||n[T].props,d=a.context||n[E].context,p=t||d;t&&(n[E]=(0,i.default)({},n[E],{context:p})),n[y].batchedUpdates((function(){var t=P(r),f=!0,m=void 0,g=void 0;if(!n[E].disableLifecycleMethods&&a){if("function"==typeof a.shouldComponentUpdate){var b=t.getDerivedStateFromProps;b&&b.hasShouldComponentUpdateBug&&j(o,u),m=(0,l.spyMethod)(a,"shouldComponentUpdate")}t.getChildContext.calledByRenderer&&"function"==typeof a.getChildContext&&(g=(0,l.spyMethod)(a,"getChildContext"))}if(!m&&F(a)&&(f=B(h,e,u,a.state)),e&&(n[T]=(0,l.cloneElement)(r,n[T],e)),n[y].render(n[T],p,{providerValues:n[I]}),m&&(f=m.getLastReturnValue(),m.restore()),f&&!n[E].disableLifecycleMethods&&a)if(U(r,n,a,o,g),t.getSnapshotBeforeUpdate){var v=void 0;"function"==typeof a.getSnapshotBeforeUpdate&&(v=a.getSnapshotBeforeUpdate(h,u)),!t.componentDidUpdate||"function"!=typeof a.componentDidUpdate||u&&!(0,s.default)(u,n.instance().state)&&"function"!=typeof c.getDerivedStateFromProps||a.componentDidUpdate(h,u,v)}else t.componentDidUpdate&&"function"==typeof a.componentDidUpdate&&(t.componentDidUpdate.prevContext?a.componentDidUpdate(h,u,d):u&&!(0,s.default)(n.instance().state,u)||a.componentDidUpdate(h,u));else(0,s.default)(e,a.props)||(a.props=(Object.freeze||Object)((0,i.default)({},a.props,e)));n.update()}))}))})),this}},{key:"setProps",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this[_]!==this)throw new Error("ShallowWrapper::setProps() can only be called on the root");if(arguments.length>1&&"function"!=typeof t)throw new TypeError("ReactWrapper::setProps() expects a function as its second argument");return this.rerender(e),t&&t(),this}},{key:"setState",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(this[_]!==this)throw new Error("ShallowWrapper::setState() can only be called on the root");if(null===this.instance()||"class"!==this[y].getNode().nodeType)throw new Error("ShallowWrapper::setState() can only be called on class components");if(arguments.length>1&&"function"!=typeof n)throw new TypeError("ReactWrapper::setState() expects a function as its second argument");return this.single("setState",(function(){(0,l.withSetStateAllowed)((function(){var r=(0,c.default)(t[E]),o=P(r),a=t[y].getNode(),s=a.instance,u=s.props,h=s.state,d=s.context,p="function"==typeof e?e.call(s,h,u):e,f=!o.setState.skipsComponentDidUpdateOnNullish||null!=p,m=void 0,g=void 0,b=!0;if(!t[E].disableLifecycleMethods&&s){if(o.componentDidUpdate&&o.componentDidUpdate.onSetState&&"function"==typeof s.shouldComponentUpdate){var v=o.getDerivedStateFromProps;v&&v.hasShouldComponentUpdateBug&&j(a,e),m=(0,l.spyMethod)(s,"shouldComponentUpdate")}o.getChildContext.calledByRenderer&&"function"==typeof s.getChildContext&&(g=(0,l.spyMethod)(s,"getChildContext"))}if(!m&&F(s)&&(b=B(u,s.props,h,(0,i.default)({},h,p))),s[x]?s[x](p):s.setState(p),m&&(b=m.getLastReturnValue(),m.restore()),f&&b&&!t[E].disableLifecycleMethods&&(U(r,t,s,a,g),o.componentDidUpdate&&o.componentDidUpdate.onSetState))if(o.getSnapshotBeforeUpdate&&"function"==typeof s.getSnapshotBeforeUpdate){var T=s.getSnapshotBeforeUpdate(u,h);"function"==typeof s.componentDidUpdate&&s.componentDidUpdate(u,h,T)}else"function"==typeof s.componentDidUpdate&&(o.componentDidUpdate.prevContext?s.componentDidUpdate(u,h,d):s.componentDidUpdate(u,h));t.update(),n&&(r.invokeSetStateCallback?r.invokeSetStateCallback(s,n):n.call(s))}))})),this}},{key:"setContext",value:function(e){if(this[_]!==this)throw new Error("ShallowWrapper::setContext() can only be called on the root");if(!this[E].context)throw new Error("ShallowWrapper::setContext() can only be called on a wrapper that was originally passed a context option");return this.rerender(null,e)}},{key:"contains",value:function(e){var t=(0,c.default)(this[E]);if(!(0,l.isReactElementAlike)(e,t))throw new Error("ShallowWrapper::contains() can only be called with a ReactElement (or an array of them), a string, or a number as an argument.");return O(this,Array.isArray(e)?function(n){return(0,l.containsChildrenSubArray)(l.nodeEqual,n,e.map((function(e){return t.elementToNode(e)})))}:function(n){return(0,l.nodeEqual)(t.elementToNode(e),n)}).length>0}},{key:"containsMatchingElement",value:function(e){var t=(0,c.default)(this[E]).elementToNode(e);return O(this,(function(e){return(0,l.nodeMatches)(t,e,(function(e,t){return e<=t}))})).length>0}},{key:"containsAllMatchingElements",value:function(e){var t=this;if(!Array.isArray(e))throw new TypeError("nodes should be an Array");return e.every((function(e){return t.containsMatchingElement(e)}))}},{key:"containsAnyMatchingElements",value:function(e){var t=this;return Array.isArray(e)&&e.some((function(e){return t.containsMatchingElement(e)}))}},{key:"equals",value:function(e){var t=this;return this.single("equals",(function(){return(0,l.nodeEqual)(t.getNodeInternal(),e)}))}},{key:"matchesElement",value:function(e){var t=this;return this.single("matchesElement",(function(){var n=(0,c.default)(t[E]).elementToNode(e);return(0,l.nodeMatches)(n,t.getNodeInternal(),(function(e,t){return e<=t}))}))}},{key:"find",value:function(e){return this.wrap((0,d.reduceTreesBySelector)(e,this.getNodesInternal()))}},{key:"is",value:function(e){var t=(0,d.buildPredicate)(e);return this.single("is",(function(e){return t(e)}))}},{key:"isEmptyRender",value:function(){return this.getNodesInternal().every((function(e){return(0,l.isEmptyValue)(e)}))}},{key:"filterWhere",value:function(e){var t=this;return D(this,(function(n){return e(t.wrap(n))}))}},{key:"filter",value:function(e){return D(this,(0,d.buildPredicate)(e))}},{key:"not",value:function(e){var t=(0,d.buildPredicate)(e);return D(this,(function(e){return!t(e)}))}},{key:"text",value:function(){return this.single("text",h.getTextFromNode)}},{key:"html",value:function(){var e=this;return this.single("html",(function(t){if(null===e.type())return null;var n=(0,c.default)(e[E]);return n.createRenderer((0,i.default)({},e[E],{mode:"string"})).render(n.nodeToElement(t))}))}},{key:"render",value:function(){var e=this.html();return(0,l.loadCheerioRoot)(e)}},{key:"simulate",value:function(e){for(var t=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i0?t.first():this.findWhere((function(){return!1}))}},{key:"shallow",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.single("shallow",(function(n){var r=z(e,t);return e.wrap((0,c.default)(e[E]).nodeToElement(n),null,r)}))}},{key:"prop",value:function(e){return this.props()[e]}},{key:"invoke",value:function(e){var t=this;return this.single("invoke",(function(){var n=t.prop(e);if("function"!=typeof n)throw new TypeError("ShallowWrapper::invoke() requires the name of a prop whose value is a function");return function(){var e=n.apply(void 0,arguments);return t[_].update(),e}}))}},{key:"renderProp",value:function(e){var t=this,n=(0,c.default)(this[E]);if("function"!=typeof n.wrap)throw new RangeError("your adapter does not support `wrap`. Try upgrading it!");return this.single("renderProp",(function(i){if("host"===i.nodeType)throw new TypeError("ShallowWrapper::renderProp() can only be called on custom components");if("string"!=typeof e)throw new TypeError("ShallowWrapper::renderProp(): `propName` must be a string");var o=t.props();if(!(0,a.default)(o,e))throw new Error("ShallowWrapper::renderProp(): no prop called “"+String(e)+"“ found");var s=o[e];if("function"!=typeof s)throw new TypeError("ShallowWrapper::renderProp(): expected prop “"+String(e)+"“ to contain a function, but it holds “"+(void 0===s?"undefined":r(s))+"“");return function(){var e=s.apply(void 0,arguments),r=n.wrap(e);return t.wrap(r,null,t[E])}}))}},{key:"key",value:function(){return this.single("key",(function(e){return void 0===e.key?null:e.key}))}},{key:"type",value:function(){return this.single("type",(function(e){return(0,l.typeOfNode)(e)}))}},{key:"name",value:function(){var e=(0,c.default)(this[E]);return this.single("name",(function(t){return e.displayNameOfNode?e.displayNameOfNode(t):(0,l.displayNameOfNode)(t)}))}},{key:"hasClass",value:function(e){return"string"==typeof e&&-1!==e.indexOf(".")&&console.warn("It looks like you're calling `ShallowWrapper::hasClass()` with a CSS selector. hasClass() expects a class name, not a CSS selector."),this.single("hasClass",(function(t){return(0,h.hasClassName)(t,e)}))}},{key:"forEach",value:function(e){var t=this;return this.getNodesInternal().forEach((function(n,r){return e.call(t,t.wrap(n),r)})),this}},{key:"map",value:function(e){var t=this;return this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"reduce",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduce((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduce((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"reduceRight",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return arguments.length>1?this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,n,t.wrap(r),i)}),n):this.getNodesInternal().reduceRight((function(n,r,i){return e.call(t,1===i?t.wrap(n):n,t.wrap(r),i)}))}},{key:"slice",value:function(e,t){return this.wrap(this.getNodesInternal().slice(e,t))}},{key:"some",value:function(e){if(this[_]===this)throw new Error("ShallowWrapper::some() can not be called on the root");var t=(0,d.buildPredicate)(e);return this.getNodesInternal().some(t)}},{key:"someWhere",value:function(e){var t=this;return this.getNodesInternal().some((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"every",value:function(e){var t=(0,d.buildPredicate)(e);return this.getNodesInternal().every(t)}},{key:"everyWhere",value:function(e){var t=this;return this.getNodesInternal().every((function(n,r){return e.call(t,t.wrap(n),r)}))}},{key:"flatMap",value:function(e){var t=this,n=this.getNodesInternal().map((function(n,r){return e.call(t,t.wrap(n),r)})),r=(0,o.default)(n,1);return this.wrap(r.filter(Boolean))}},{key:"findWhere",value:function(e){var t=this;return O(this,(function(n){var r=t.wrap(n);return r.length>0&&e(r)}))}},{key:"get",value:function(e){return this.getElements()[e]}},{key:"at",value:function(e){var t=this.getNodesInternal();return e0&&void 0!==arguments[0]?arguments[0]:null;return arguments.length>0?this.find(e).exists():this.length>0}},{key:"single",value:function(e,t){var n="string"==typeof e?e:"unknown",r="function"==typeof t?t:e;if(1!==this.length)throw new Error("Method “"+n+"” is meant to be run on 1 node. "+String(this.length)+" found instead.");return r.call(this,this.getNodeInternal())}},{key:"wrap",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this[_];if(t instanceof e)return t;for(var r=arguments.length,i=Array(r>2?r-2:0),o=2;o0&&void 0!==arguments[0]?arguments[0]:{};return(0,u.debugNodes)(this.getNodesInternal(),e)}},{key:"tap",value:function(e){return e(this),this}},{key:"dive",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,c.default)(this[E]),r="dive";return this.single(r,(function(r){if(r&&"host"===r.nodeType)throw new TypeError("ShallowWrapper::dive() can not be called on Host Components");var i=(0,c.default)(e[E]).nodeToElement(r);if(!(0,l.isCustomComponentElement)(i,n))throw new TypeError("ShallowWrapper::dive() can only be called on components");var o=z(e,t);return e.wrap(i,null,o)}))}},{key:"hostNodes",value:function(){return this.filterWhere((function(e){return"string"==typeof e.type()}))}}]),e}();function W(e){var t=(0,c.default)(e[E]),n=e[A],r=n[y].getNode(),o=G(e,t),a=o.legacyContext,s=o.providerValues,l=n[I];if(n.setContext((0,i.default)({},e[A][E].context,a)),n[I]=new Map([].concat(f(l),f(s))),"function"==typeof t.isContextConsumer&&t.isContextConsumer(r.type)){var u=r.type,h=t.getProviderFromConsumer(u);s.get(h)!==l.get(h)&&n.rerender()}}var X=function(e){function r(e,t,n){m(this,r);var i=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return(0,l.privateSet)(i,A,t),(0,l.privateSet)(i,C,n),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,e),n(r,[{key:"rerender",value:function(){for(var e,n=arguments.length,i=Array(n),o=0;o1&&void 0!==arguments[1]?arguments[1]:{},o=(0,n.default)(i).createRenderer((0,t.default)({mode:"string"},i)).render(e,i.context);return(0,r.loadCheerioRoot)(o)};var t=i(ay),n=i(RM),r=Xx;function i(e){return e&&e.__esModule?e:{default:e}}}(dU);var pU=TU(Ib),fU=TU(cU),mU=TU(kM),gU=TU(uU),bU=TU(hU),vU=TU(dU),yU=_M;function TU(e){return e&&e.__esModule?e:{default:e}}var _U={render:vU.default,shallow:bU.default,mount:gU.default,ShallowWrapper:fU.default,ReactWrapper:pU.default,configure:yU.merge,EnzymeAdapter:mU.default};const EU=(e,t)=>{(e=>{for(const t of e.iterateOverTracks())if(kb(e,t.viewId,t.trackId).activeTransitions>0)return!0;return!1})(e)?setTimeout((()=>{EU(e,t)}),100):t()},xU=e=>{cg>0?setTimeout((()=>xU(e)),100):e()},wU=(e,t)=>{(e=>{for(const t of e.iterateOverTracks()){let n=Sb(e,t.viewId,t.trackId);if(t.track.server||t.track.tilesetUid||t.track.data&&"divided"===t.track.data.type){if(!(t.track.data&&"divided"===t.track.data.type||t.track.server&&t.track.tilesetUid))throw Error('"server" and "tilesetUid" belong together');if(n.originalTrack&&(n=n.originalTrack),!n.tilesetInfo&&!n.chromInfo)return!0;if(n.fetching&&n.fetching.size)return!0}}return!1})(e)?setTimeout((()=>{wU(e,t)}),100):t()},SU=(e,t,n,r,i={})=>{const{style:o="width:800px; background-color: lightgreen;",bounded:a=!1,extendedDelay:s=!1}=i;t&&(t.unmount(),t.detach()),e&&globalThis.document.body.removeChild(e);const l=globalThis.document.createElement("div");globalThis.document.body.appendChild(l),l.setAttribute("style",o),l.setAttribute("id","simple-hg-component");const c=_U.mount(m.default.createElement(xoe,{options:{bounded:a},viewConfig:n}),{attachTo:l});return c.update(),xU((()=>{if(s){const e=()=>setTimeout((()=>{r()}),1e3);wU(c.instance(),e)}else wU(c.instance(),r)})),[l,c]};var kU,AU,CU=0,IU=0,OU=0,DU=1e3,PU=0,NU=0,RU=0,MU="object"==typeof performance&&performance.now?performance:Date,LU="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function BU(){return NU||(LU(FU),NU=MU.now()+RU)}function FU(){NU=0}function UU(){this._call=this._time=this._next=null}function jU(e,t,n){var r=new UU;return r.restart(e,t,n),r}function HU(){NU=(PU=MU.now())+RU,CU=IU=0;try{!function(){BU(),++CU;for(var e,t=kU;t;)(e=NU-t._time)>=0&&t._call.call(void 0,e),t=t._next;--CU}()}finally{CU=0,function(){for(var e,t,n=kU,r=1/0;n;)n._call?(r>n._time&&(r=n._time),e=n,n=n._next):(t=n._next,n._next=null,n=e?e._next=t:kU=t);AU=e,zU(r)}(),NU=0}}function GU(){var e=MU.now(),t=e-PU;t>DU&&(RU-=t,PU=e)}function zU(e){CU||(IU&&(IU=clearTimeout(IU)),e-NU>24?(e<1/0&&(IU=setTimeout(HU,e-MU.now()-RU)),OU&&(OU=clearInterval(OU))):(OU||(PU=MU.now(),OU=setInterval(GU,DU)),CU=1,LU(HU)))}function VU(e,t,n){var r=new UU;return t=null==t?0:+t,r.restart((n=>{r.stop(),e(n+t)}),t,n),r}UU.prototype=jU.prototype={constructor:UU,restart:function(e,t,n){if("function"!=typeof e)throw new TypeError("callback is not a function");n=(null==n?BU():+n)+(null==t?0:+t),this._next||AU===this||(AU?AU._next=this:kU=this,AU=this),this._call=e,this._time=n,zU()},stop:function(){this._call&&(this._call=null,this._time=1/0,zU())}};var WU=Eh("start","end","cancel","interrupt"),XU=[],YU=0,qU=1,$U=2,KU=3,QU=4,ZU=5,JU=6;function ej(e,t,n,r,i,o){var a=e.__transition;if(a){if(n in a)return}else e.__transition={};!function(e,t,n){var r,i=e.__transition;function o(e){n.state=qU,n.timer.restart(a,n.delay,n.time),n.delay<=e&&a(e-n.delay)}function a(o){var c,u,h,d;if(n.state!==qU)return l();for(c in i)if((d=i[c]).name===n.name){if(d.state===KU)return VU(a);d.state===QU?(d.state=JU,d.timer.stop(),d.on.call("interrupt",e,e.__data__,d.index,d.group),delete i[c]):+cYU)throw new Error("too late; already scheduled");return n}function nj(e,t){var n=rj(e,t);if(n.state>KU)throw new Error("too late; already running");return n}function rj(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function ij(e,t){var n,r,i,o=e.__transition,a=!0;if(o){for(i in t=null==t?null:t+"",o)(n=o[i]).name===t?(r=n.state>$U&&n.state=0&&(e=e.slice(0,t)),!e||"start"===e}))}(t)?tj:nj;return function(){var a=o(this,e),s=a.on;s!==r&&(i=(r=s).copy()).on(t,n),a.on=i}}(n,e,t))},attr:function(e,t){var n=C(e),r="transform"===n?Rr:lj;return this.attrTween(e,"function"==typeof t?(n.local?fj:pj)(n,r,sj(this,"attr."+e,t)):null==t?(n.local?uj:cj)(n):(n.local?dj:hj)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=C(e);return this.tween(n,(r.local?mj:gj)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?Nr:lj;return null==t?this.styleTween(e,function(e,t){var n,r,i;return function(){var o=oe(this,e),a=(this.style.removeProperty(e),oe(this,e));return o===a?null:o===n&&a===r?i:i=t(n=o,r=a)}}(e,r)).on("end.style."+e,Ej(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,i,o;return function(){var a=oe(this,e),s=n(this),l=s+"";return null==s&&(this.style.removeProperty(e),l=s=oe(this,e)),a===l?null:a===r&&l===i?o:(i=l,o=t(r=a,s))}}(e,r,sj(this,"style."+e,t))).each(function(e,t){var n,r,i,o,a="style."+t,s="end."+a;return function(){var l=nj(this,e),c=l.on,u=null==l.value[a]?o||(o=Ej(t)):void 0;c===n&&i===u||(r=(n=c).copy()).on(s,i=u),l.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,i,o=n+"";return function(){var a=oe(this,e);return a===o?null:a===r?i:i=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,function(e,t,n){var r,i;function o(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}(e,o,n)),r}return o._value=t,o}(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(sj(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,function(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&function(e){return function(t){this.textContent=e.call(this,t)}}(r)),t}return r._value=e,r}(e))},remove:function(){return this.on("end.remove",(e=this._id,function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}));var e},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,i=rj(this.node(),n).tween,o=0,a=i.length;oqU&&n.name===t)return new wj([[e]],Oj,t,+r);return null},interrupt:ij},Symbol.toStringTag,{value:"Module"})),Pj=e=>()=>e;function Nj(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Rj(e,t,n){this.k=e,this.x=t,this.y=n}Rj.prototype={constructor:Rj,scale:function(e){return 1===e?this:new Rj(this.k*e,this.x,this.y)},translate:function(e,t){return 0===e&0===t?this:new Rj(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Mj=new Rj(1,0,0);function Lj(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Mj;return e.__zoom}function Bj(e){e.stopImmediatePropagation()}function Fj(e){e.preventDefault(),e.stopImmediatePropagation()}function Uj(e){return!(e.ctrlKey&&"wheel"!==e.type||e.button)}function jj(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e).hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]:[[0,0],[e.clientWidth,e.clientHeight]]}function Hj(){return this.__zoom||Mj}function Gj(e){return-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function zj(){return navigator.maxTouchPoints||"ontouchstart"in this}function Vj(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],o=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function Wj(){var e,t,n,r=Uj,i=jj,o=Vj,a=Gj,s=zj,l=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,h=Lr,d=Eh("start","zoom","end"),p=500,f=150,m=0,g=10;function b(e){e.property("__zoom",Hj).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",S).on("dblclick.zoom",k).filter(s).on("touchstart.zoom",A).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",I).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(e,t){return(t=Math.max(l[0],Math.min(l[1],t)))===e.k?e:new Rj(t,e.x,e.y)}function y(e,t,n){var r=t[0]-n[0]*e.k,i=t[1]-n[1]*e.k;return r===e.x&&i===e.y?e:new Rj(e.k,r,i)}function T(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function _(e,t,n,r){e.on("start.zoom",(function(){E(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){E(this,arguments).event(r).end()})).tween("zoom",(function(){var e=this,o=arguments,a=E(e,o).event(r),s=i.apply(e,o),l=null==n?T(s):"function"==typeof n?n.apply(e,o):n,c=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),u=e.__zoom,d="function"==typeof t?t.apply(e,o):t,p=h(u.invert(l).concat(c/u.k),d.invert(l).concat(c/d.k));return function(e){if(1===e)e=d;else{var t=p(e),n=c/t[2];e=new Rj(n,l[0]-t[0]*n,l[1]-t[1]*n)}a.zoom(null,e)}}))}function E(e,t,n){return!n&&e.__zooming||new x(e,t)}function x(e,t){this.that=e,this.args=t,this.active=0,this.sourceEvent=null,this.extent=i.apply(e,t),this.taps=0}function w(e,...t){if(r.apply(this,arguments)){var n=E(this,t).event(e),i=this.__zoom,s=Math.max(l[0],Math.min(l[1],i.k*Math.pow(2,a.apply(this,arguments)))),u=Ge(e);if(n.wheel)n.mouse[0][0]===u[0]&&n.mouse[0][1]===u[1]||(n.mouse[1]=i.invert(n.mouse[0]=u)),clearTimeout(n.wheel);else{if(i.k===s)return;n.mouse=[u,i.invert(u)],ij(this),n.start()}Fj(e),n.wheel=setTimeout((function(){n.wheel=null,n.end()}),f),n.zoom("mouse",o(y(v(i,s),n.mouse[0],n.mouse[1]),n.extent,c))}}function S(e,...t){if(!n&&r.apply(this,arguments)){var i=e.currentTarget,a=E(this,t,!0).event(e),s=Be(e.view).on("mousemove.zoom",(function(e){if(Fj(e),!a.moved){var t=e.clientX-u,n=e.clientY-h;a.moved=t*t+n*n>m}a.event(e).zoom("mouse",o(y(a.that.__zoom,a.mouse[0]=Ge(e,i),a.mouse[1]),a.extent,c))}),!0).on("mouseup.zoom",(function(e){s.on("mousemove.zoom mouseup.zoom",null),Ih(e.view,a.moved),Fj(e),a.event(e).end()}),!0),l=Ge(e,i),u=e.clientX,h=e.clientY;Ch(e.view),Bj(e),a.mouse=[l,this.__zoom.invert(l)],ij(this),a.start()}}function k(e,...t){if(r.apply(this,arguments)){var n=this.__zoom,a=Ge(e.changedTouches?e.changedTouches[0]:e,this),s=n.invert(a),l=n.k*(e.shiftKey?.5:2),h=o(y(v(n,l),a,s),i.apply(this,t),c);Fj(e),u>0?Be(this).transition().duration(u).call(_,h,a,e):Be(this).call(b.transform,h,a,e)}}function A(n,...i){if(r.apply(this,arguments)){var o,a,s,l,c=n.touches,u=c.length,h=E(this,i,n.changedTouches.length===u).event(n);for(Bj(n),a=0;ae:this.tickFormat=ni(".2");nthis.tickValues.length;){const e=this.axisTexts.pop();this.pAxis.removeChild(e),e.destroy(!0)}}},{key:"calculateAxisTickValues",value:function(e,t){const n=Math.max(Math.ceil(t/40),1);let r=e.ticks(n);return r.length<1&&(r=e.ticks(n+1),r.length>1&&(r=[r[0]])),r}},{key:"drawAxisLeft",value:function(e,t){this.startAxis(t),this.createAxisTexts(e,t);const n=this.pAxis;this.track.getTheme()===Pf&&n.lineStyle(n.lineWidth||n._lineStyle.width,lm("#ffffff")),n.moveTo(0,0),n.lineTo(-5,0),n.moveTo(0,t),n.lineTo(-5,t);for(let t=0;t=0;e--)this.axisTexts[e].visible=!0;for(let e=this.axisTexts.length-1;e>=0;e--){if(!this.axisTexts[e].visible)continue;let t=e-1;for(;t>=0&&this.axisTexts[e].y+this.axisTexts[e].height/2>this.axisTexts[t].y-this.axisTexts[t].height/2;)this.axisTexts[t].visible=!1,t-=1}}},{key:"exportVerticalAxis",value:function(e){const t=document.createElement("g");t.setAttribute("class","axis-vertical");let n="black";this.track&&this.track.options.lineStrokeColor&&(n=this.track.options.lineStrokeColor),this.track.getTheme()===Pf&&(n="#cccccc");const r=document.createElement("path");return r.setAttribute("fill","transparent"),r.setAttribute("stroke",n),r.setAttribute("id","axis-line"),r.setAttribute("d",`M0,0 L0,${e}`),t.appendChild(r),t}},{key:"createAxisSVGLine",value:function(){let e="black";this.track&&this.track.options.lineStrokeColor&&(e=this.track.options.lineStrokeColor),this.track.getTheme()===Pf&&(e="#cccccc");const t=document.createElement("path");return t.setAttribute("id","tick-mark"),t.setAttribute("fill","transparent"),t.setAttribute("stroke",e),t}},{key:"createAxisSVGText",value:function(e){const t=document.createElement("text");return t.innerHTML=e,t.setAttribute("id","axis-text"),t.setAttribute("text-anchor","middle"),t.setAttribute("font-family",this.axisTextFontFamily),t.setAttribute("font-size",this.axisTextFontSize),t.setAttribute("dy",this.axisTextFontSize/2-2),t}},{key:"exportAxisLeftSVG",value:function(e,t){const n=this.exportVerticalAxis(t),r=this.createAxisSVGLine();n.appendChild(r),r.setAttribute("d","M0,0 L5,0");const i=this.createAxisSVGLine();n.appendChild(i),i.setAttribute("d",`M0,${t} L5,${t}`);for(let t=0;t{const n=[];for(let r=e;r{if(void 0===n&&(n=Number.MAX_SAFE_INTEGER),e.resolutions)return((e,t)=>{const n=e.map((e=>+e)).sort(((e,t)=>t-e)),r=t.range()[1]-t.range()[0],i=n.map((e=>(t.domain()[1]-t.domain()[0])/e)).map((e=>e/r)),o=i.filter((e=>e<1));return 0===o.length?0:i.indexOf(o[o.length-1])})(e.resolutions,t,e.min_pos[0],e.max_pos[0]);const r=((e,t,n,r)=>{const i=e.range()[1]-e.range()[0],o=Math.max((n-t)/(e.domain()[1]-e.domain()[0]),1),a=Math.max(0,Math.ceil(Math.log(i/384)/Math.LN2));let s=Math.round(Math.log(o)/Math.LN2)+a,l=0;return r&&(l=Math.floor(Math.log(256)/Math.log(2)-Math.log(r)/Math.log(2))),s+=l,s})(t,e.min_pos[0],e.max_pos[0],e.bins_per_dimension||e.tile_size),i=Math.min(r,n);return Math.max(i,0)};const Kj={calculate1DVisibleTiles:(e,t)=>{if(!e)return[];const n=$j(e,t,e.max_zoom);if(e.resolutions){return((e,t,n,r=Number.MAX_VALUE,i=256)=>{const o=e*i,a=Math.max(0,Math.floor((t.domain()[0]-n)/o)),s=Math.ceil(Math.min(r,t.domain()[1]-n-1e-7)/o);let l=qj(a,s);return l.length>20&&(console.warn(`Too many visible tiles: ${l.length} truncating to 20`),l=l.slice(0,20)),l})(e.resolutions.map((e=>+e)).sort(((e,t)=>t-e))[n],t,e.min_pos[0],e.max_pos[0]).map((e=>[n,e]))}return((e,t,n,r,i,o)=>{const a=Math.min(e,i),s=o/2**a;return qj(Math.max(0,Math.floor((t.domain()[0]-n)/s)),Math.min(2**a,Math.ceil((t.domain()[1]-n-1e-7)/s)))})(n,t,e.min_pos[0],e.max_pos[0],e.max_zoom,e.max_width).map((e=>[n,e]))},calculate1DZoomLevel:$j,drawAxis:(e,t)=>{if(e.axis||(e.axis=new Yj(e),e.pBase.addChild(e.axis.pAxis)),!e.options.axisPositionVertical&&!e.options.axisPositionHorizontal)return void e.axis.clearAxis();if(e.options.axisPositionVertical&&"hidden"===e.options.axisPositionVertical)return void e.axis.clearAxis();if(e.options.axisPositionHorizontal&&"hidden"===e.options.axisPositionHorizontal)return void e.axis.clearAxis();const n=e.options.axisMargin||0;"left"===e.options.axisPositionHorizontal||"top"===e.options.axisPositionVertical?(e.axis.pAxis.position.x=e.position[0]+n,e.axis.pAxis.position.y=e.position[1],e.axis.drawAxisRight(t,e.dimensions[1])):"outsideLeft"===e.options.axisPositionHorizontal||"outsideTop"===e.options.axisPositionVertical?(e.axis.pAxis.position.x=e.position[0]+n,e.axis.pAxis.position.y=e.position[1],e.axis.drawAxisLeft(t,e.dimensions[1])):"right"===e.options.axisPositionHorizontal||"bottom"===e.options.axisPositionVertical?(e.axis.pAxis.position.x=e.position[0]+e.dimensions[0]-n,e.axis.pAxis.position.y=e.position[1],e.axis.drawAxisLeft(t,e.dimensions[1])):"outsideRight"!==e.options.axisPositionHorizontal&&"outsideBottom"!==e.options.axisPositionVertical||(e.axis.pAxis.position.x=e.position[0]+e.dimensions[0]-n,e.axis.pAxis.position.y=e.position[1],e.axis.drawAxisRight(t,e.dimensions[1]))},movedY:(e,t)=>{const n=e.valueScaleTransform,{y:r,k:i}=n;r+t/i>-(i-1)*e.dimensions[1]&&r+t/i<0&&(e.valueScaleTransform=n.translate(0,t/i)),Object.values(e.fetchedTiles).forEach((t=>{t.graphics.position.y=e.valueScaleTransform.y})),e.animate()},getTilePosAndDimensions:(e,t)=>{const n=+t.split(".")[0],r=+t.split(".")[1],i=e.max_width/2**n;return{tileX:e.min_pos[0]+r*i,tileWidth:i}},stretchRects:function(e,t){Object.values(e.fetchedTiles).forEach((n=>{if(!n.drawnAtScale)return;const r=n.drawnAtScale.range(),i=e._xScale.range();if(r[0]!==i[0]||r[1]!==i[1])return void e.renderTile(n);const o=(n.drawnAtScale.domain()[1]-n.drawnAtScale.domain()[0])/(e._xScale.domain()[1]-e._xScale.domain()[0]);if(o>2||o<.5)e.renderTile(n);else{const r=e._xScale.domain().map(n.drawnAtScale)[0];for(const e of t)e(n).scale.x=o,e(n).x=-r*o}}))},zoomedY:(e,t,n,r)=>{const i=n.k,o=n.y,a=(e-o)/i,s=Math.max(i/t,1);let l=i*a+o-s*a;return l=Math.max(l,-(s-1)*r),l=Math.min(l,0),Mj.translate(0,l).scale(s)}},Qj=Object.freeze(Object.defineProperty({__proto__:null,absToChr:bf,accessorTransposition:vf,addArrays:Tf,addClass:(e,t)=>{if("http://www.w3.org/2000/svg"===e.namespaceURI){if(!_f(e,t)){const n=e.getAttribute("class")||"";e.setAttribute("class",`${n} ${t}`)}}else e.classList?e.classList.add(t):_f(e,t)||(e.className+=` ${t}`)},base64ToCanvas:(e,t,n)=>{const r=document.createElement("canvas");return new Promise(((i,o)=>{const a=new window.Image;a.onload=()=>{r.width=t||a.width,r.height=n||a.height,r.getContext("2d").drawImage(a,0,0),i(r)},a.onerror=()=>{o(new Error("Could not convert base64 to canvas"))},a.src=`data:image/png;base64,${e}`}))},chromInfoBisector:gf,chrToAbs:Ef,cloneEvent:xf,colorDomainToRgbaArray:wf,colorToHex:lm,colorToRgba:cm,dataToGenomicLoci:um,debounce:hm,decToHexStr:dm,dictFromTuples:pm,dictItems:fm,dictKeys:mm,dictValues:gm,download:bm,fillInMinWidths:vm,flatten:Tm,forEach:e=>t=>Array.prototype.forEach.call(t,e),forwardEvent:_m,genomeLociToPixels:(e,t)=>[Ef(e[0],e[1],t),Ef(e[2],e[3],t)],genomicRangeToChromosomeChunks:function(e,t,n,r,i){const{chr:o,pos:a}=t,{chr:s,pos:l}=n,c=[];if(o===s){const e=o,t=Math.floor(a/r),n=Math.min(t+i,Math.ceil(l/r));c.push([e,t,n])}else{let t=i;const n=e.findIndex((([e])=>e===o)),u=e.findIndex((([e])=>e===s));for(let i=n;i<=u;i++){let o,s;const[h,d]=e[i];i{const r=e.state.views[t];if(!r)return null;let i=null;const o=e=>(e.uid===n&&(i=e),"combined"===e.type.substr(0,8)&&e.contents.forEach(o),null),a=r.tracks;return Object.keys(a).map((e=>a[e])).filter((e=>e.filter)).reduce(((e,t)=>e.concat(t)),[]).forEach(o),i},getTrackObjById:yg,getTrackPositionByUid:Eg,getXylofon:wg,gradient:Sg,hasClass:_f,hasParent:kg,hexStrToInt:Ag,intoTheVoid:Cg,isTrackOrChildTrack:Og,isWithin:Dg,latToY:(e,t)=>{let n=e*Math.PI/180;return r=n,n=Math.log(Math.tan((r+Math.PI/2)/2)),2**t*(Math.PI-n)/(2*Math.PI);var r},loadChromInfos:e=>Pg(e).map((e=>e.chromInfoPath)).forEach((e=>Qm.get(e))),lngToX:(e,t)=>2**t*(e+180)/360,map:xg,max:Ng,maxNonZero:Rg,min:Mg,minNonZero:Lg,mod:(e,t)=>(e%t+t)%t,ndarrayAssign:Bg,ndarrayFlatten:qg,ndarrayToList:Yg,numericifyVersion:$g,objVals:Pg,or:Kg,parseChromsizesRows:Qg,pixiTextToSvg:Zg,q:e=>{try{const t=e.split(".");return e=>{let n=e;return t.forEach((e=>{n=n[e]})),n}}catch(e){return}},reduce:ym,rangeQuery2d:(e,t,n,r,i,o,a=0,s=0,l)=>{const c=o?i:r,u=o?r:i,h=o?s:a,d=o?a:s,p=Math.max(0,+c[0]||0),f=Math.max(0,+c[1]||0),m=Math.max(0,+u[0]||0),g=Math.max(0,+u[1]||0);let b=[];ArrayBuffer.isView(l)||console.warn("Not supported yet");try{const r=new l.constructor(l.length);let i=0+d;for(let o=m;o[r.chrPositions[e].pos+ +t,r.chrPositions[e].pos+ +n],removeClass:(e,t)=>{const n=new RegExp(`(\\s|^)${t}(\\s|$)`);if("http://www.w3.org/2000/svg"===e.namespaceURI){const t=e.getAttribute("class")||"";e.setAttribute("class",t.replace(n," "))}else e.classList?e.classList.remove(t):_f(e,t)&&(e.className=e.className.replace(n," "))},resetD3BrushStyle:Jg,rgbToHex:(e,t,n)=>`#${eb(e)}${eb(t)}${eb(n)}`,scalesCenterAndK:tb,scalesToGenomeLoci:nb,showMousePosition:rb,some:e=>t=>Array.prototype.some.call(t,e),sum:ib,svgLine:ob,throttleAndDebounce:ab,tileToCanvas:(e,t=256,n=256)=>{const r=document.createElement("canvas");r.width=t,r.height=n;const i=r.getContext("2d");i.fillStyle="transparent",i.fillRect(0,0,r.width,r.height);const o=new ImageData(e,r.width,r.height);return i.putImageData(o,0,0),r},timeout:sb,totalTrackPixelHeight:e=>{if(!e.tracks)return 0;let t=0;return e.tracks.top&&(t+=e.tracks.top.map((e=>e.height)).reduce(((e,t)=>e+t),0)),e.tracks.center&&(t+=e.tracks.center.map((e=>e.height)).reduce(((e,t)=>e+t),0)),e.tracks.bottom&&(t+=e.tracks.bottom.map((e=>e.height)).reduce(((e,t)=>e+t),0)),t},toVoid:lb,trimTrailingSlash:cb,valueToColor:ub,expandCombinedTracks:hb,segmentsToRows:yb,visitPositionedTracks:_g,visitTracks:Tg,DenseDataExtrema1D:Tb,DenseDataExtrema2D:_b,getAggregationFunction:Eb,selectedItemsToSize:xb,IS_TRACK_RANGE_SELECTABLE:wb,getTrackObjectFromHGC:Sb,getTrackRenderer:kb,getTiledPlot:(e,t)=>e.tiledPlots[t],changeOptions:(e,t,n,r)=>{for(const{viewId:i,trackId:o,track:a}of e.instance().iterateOverTracks())i===t&&o===n&&(a.options={...a.options,...r});e.setState(e.instance().state)},waitForJsonComplete:xU,waitForTilesLoaded:wU,waitForTransitionsFinished:EU,mountHGComponent:SU,mountHGComponentAsync:async function(e,t,n,r){let i;return await new Promise((o=>{i=SU(e,t,n,o,r)})),i},removeHGComponent:e=>{e&&(g.default.unmountComponentAtNode(e),document.body.removeChild(e))},trackUtils:Kj},Symbol.toStringTag,{value:"Module"})),{Provider:Zj,Consumer:Jj}=m.default.createContext({close:lb,open:lb}),eH=e=>m.default.forwardRef(((t,n)=>m.default.createElement(Jj,null,(r=>m.default.createElement(e,{ref:n,...t,theme:r}))))),tH="_track-control_w7hx2_1",nH="_track-control-vertical_w7hx2_2",rH="_track-control-dark_w7hx2_15",iH="_track-control-active_w7hx2_16 _track-control_w7hx2_1",oH="_track-control-left_w7hx2_24",aH="_track-control-padding-right_w7hx2_48",sH="_track-control-button_w7hx2_52",lH="_track-control-button-vertical_w7hx2_81",cH=e=>gl({[iH]:e.isVisible,[tH]:!e.isVisible,[oH]:e.isAlignLeft,[nH]:e.isVertical,[aH]:e.paddingRight,[rH]:e.theme===Pf}),uH=e=>gl("no-zoom",sH,{[lH]:e.isVertical});let hH=null,dH=null;function pH(e){let t,n;return e&&hH&&!Object.keys(e).some((t=>hH[t]!==e[t]))||(hH=e,dH=af((()=>m.default.createElement("svg",{className:uH(e),style:{height:"20px",width:"20px",...e.imgStyleMove}},m.default.createElement("title",null,"Move track"),m.default.createElement("use",{xlinkHref:"#move"}))))),m.default.createElement("div",{className:cH(e)},e.isMoveable&&m.default.createElement(dH,null),m.default.createElement("svg",{ref:e=>{t=e},className:uH(e),onClick:()=>{e.onConfigTrackMenuOpened(e.uid,t.getBoundingClientRect())},style:{height:"20px",width:"20px",...e.imgStyleSettings}},m.default.createElement("title",null,"Configure track"),m.default.createElement("use",{xlinkHref:"#cog"})),e.onAddSeries&&m.default.createElement("svg",{className:uH(e),onClick:()=>e.onAddSeries(e.uid),style:{height:"20px",width:"20px",...e.imgStyleAdd}},m.default.createElement("title",null,"Add series"),m.default.createElement("use",{xlinkHref:"#plus"})),m.default.createElement("svg",{ref:e=>{n=e},className:uH(e),onClick:()=>{e.onCloseTrackMenuOpened(e.uid,n.getBoundingClientRect())},style:{height:"20px",width:"20px",...e.imgStyleClose}},m.default.createElement("title",null,"Close track"),m.default.createElement("use",{xlinkHref:"#cross"})))}pH.propTypes={imgStyleAdd:S.exports.object,imgStyleClose:S.exports.object,imgStyleMove:S.exports.object,imgStyleSettings:S.exports.object,isAlignLeft:S.exports.bool,isMoveable:S.exports.bool,isVertical:S.exports.bool,isVisible:S.exports.bool,onConfigTrackMenuOpened:S.exports.func,onCloseTrackMenuOpened:S.exports.func,onAddSeries:S.exports.func,paddingRight:S.exports.bool,theme:S.exports.symbol.isRequired,uid:S.exports.string};const fH=eH(pH),mH={"center-track":"_center-track_fiu64_1","center-track-container":"_center-track-container_fiu64_6"},gH={"track-range-selection":"_track-range-selection_5bcsr_1","track-range-selection-active":"_track-range-selection-active_5bcsr_8 _track-range-selection_5bcsr_1","track-range-selection-active-primary":"_track-range-selection-active-primary_5bcsr_14 _track-range-selection-active_5bcsr_8 _track-range-selection_5bcsr_1","track-range-selection-active-secondary":"_track-range-selection-active-secondary_5bcsr_18 _track-range-selection-active_5bcsr_8 _track-range-selection_5bcsr_1","track-range-selection-group-inactive":"_track-range-selection-group-inactive_5bcsr_22","track-range-selection-group-brush-selection":"_track-range-selection-group-brush-selection_5bcsr_26"},bH={pointerEvents:"all"};function vH(e){return e&&e.sourceEvent}let yH=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={isVisible:!1},r.brushBehaviorX=dp().on("brush",r.brushedX.bind(a(r))).on("end",r.brushedXEnded.bind(a(r))),r.brushBehaviorY=pp().on("brush",r.brushedY.bind(a(r))).on("end",r.brushedYEnded.bind(a(r))),r.brushBehaviorXY=fp().on("start",r.brushStarted.bind(a(r))).on("brush",r.brushedXY.bind(a(r))).on("end",r.brushedXYEnded.bind(a(r))),r}return f(n,[{key:"componentDidMount",value:function(){this.props.isRangeSelectionActive&&this.addBrush2d()}},{key:"shouldComponentUpdate",value:function(e,t){if(this.rangeSelectionTriggeredXY){if(this.rangeSelectionTriggeredXY=!1,this.rangeSelectionTriggeredXYEnd){const t=e.rangeSelection[0]||null;this.moveBrushXY([t,e.rangeSelection[1]],!0),this.rangeSelectionTriggeredXYEnd=!1}return this.state!==t}if(this.props.rangeSelection!==e.rangeSelection){const n=e.rangeSelection[0]||null;this.props.is1dRangeSelection?(this.rangeSelectionTriggeredX||this.moveBrushX(n,e.rangeSelectionEnd),this.rangeSelectionTriggeredXEnd&&this.moveBrushX(n,e.rangeSelectionEnd,!0),this.rangeSelectionTriggeredY||this.moveBrushY(n,e.rangeSelectionEnd),this.rangeSelectionTriggeredYEnd&&this.moveBrushY(n,e.rangeSelectionEnd,!0),this.rangeSelectionTriggeredX=!1,this.rangeSelectionTriggeredXEnd=!1,this.rangeSelectionTriggeredY=!1,this.rangeSelectionTriggeredYEnd=!1):this.moveBrushXY([n,e.rangeSelection[1]],e.rangeSelectionEnd);const r=this.props.is1dRangeSelection&&!e.is1dRangeSelection&&null===n;return this.state!==t||r}return!0}},{key:"componentDidUpdate",value:function(){this.props.isRangeSelectionActive?this.addBrush2d():(this.removeBrush1d(),this.removeBrush2d())}},{key:"addBrush1d",value:function(){this.brushElX&&this.brushElY&&(this.brushElXOld!==this.brushElX||this.brushElYOld!==this.brushElY)&&(this.brushElXOld&&this.brushElXOld.on(".brush",null),this.brushElYOld&&this.brushElYOld.on(".brush",null),this.brushElX.call(this.brushBehaviorX),this.brushElY.call(this.brushBehaviorY),Jg(this.brushElX,gH["track-range-selection-group-brush-selection"]),Jg(this.brushElY,gH["track-range-selection-group-brush-selection"]),this.brushElXOld=this.brushElX,this.brushElYOld=this.brushElY,this.brushIs1dBound=!0)}},{key:"addBrush2d",value:function(){this.brushElXY&&this.brushElXYOld!==this.brushElXY&&(this.brushElXYOld&&this.brushElXYOld.on(".brush",null),this.brushElXY.call(this.brushBehaviorXY),this.brushElXYOld=this.brushElXY,this.brushIs2dBound=!0,Jg(this.brushElXY,gH["track-range-selection-group-brush-selection"]))}},{key:"brushedX",value:function(e){const t=this.rangeSelectionMoved;this.rangeSelectionMoved=!1,vH(e)&&this.props.onRangeSelectionX&&this.props.is1dRangeSelection&&!t&&(this.rangeSelectionTriggeredX=!0,this.props.onRangeSelectionX(e.selection))}},{key:"brushedXEnded",value:function(e){const t=this.rangeSelectionMovedEnd;this.rangeSelectionMovedEnd=!1,vH(e)&&this.props.onRangeSelectionX&&this.props.is1dRangeSelection&&!t&&(this.rangeSelectionTriggeredX=!0,this.rangeSelectionTriggeredXEnd=!0,this.props.onRangeSelectionXEnd(e.selection))}},{key:"brushedY",value:function(e){const t=this.rangeSelectionMoved;this.rangeSelectionMoved=!1,vH(e)&&this.props.onRangeSelectionY&&this.props.is1dRangeSelection&&!t&&(this.rangeSelectionTriggeredY=!0,this.props.onRangeSelectionY(e.selection))}},{key:"brushedYEnded",value:function(e){const t=this.rangeSelectionMovedEnd;this.rangeSelectionMovedEnd=!1,vH(e)&&this.props.onRangeSelectionY&&this.props.is1dRangeSelection&&!t&&(this.rangeSelectionTriggeredY=!0,this.rangeSelectionTriggeredYEnd=!0,this.props.onRangeSelectionYEnd(e.selection))}},{key:"brushedXY",value:function(e){const t=this.rangeSelectionMoved;this.rangeSelectionMoved=!1,vH(e)&&this.props.onRangeSelectionXY&&!t&&!this.props.is1dRangeSelection&&(this.rangeSelectionTriggeredXY=!0,this.props.onRangeSelectionXY([[e.selection[0][0],e.selection[1][0]],[e.selection[0][1],e.selection[1][1]]]))}},{key:"brushedXYEnded",value:function(e){if(this.props.is1dRangeSelection)return;const t=this.rangeSelectionMovedEnd;this.rangeSelectionMovedEnd=!1,e.selection&&e.sourceEvent&&this.props.onRangeSelectionXY&&!t&&(this.rangeSelectionTriggeredXY=!0,this.rangeSelectionTriggeredXYEnd=!0,this.props.onRangeSelectionXYEnd([[e.selection[0][0],e.selection[1][0]],[e.selection[0][1],e.selection[1][1]]])),e.selection||(this.rangeSelectionTriggeredXY=!0,this.props.onRangeSelectionReset())}},{key:"brushStarted",value:function(e){vH(e)&&this.props.onRangeSelectionStart()}},{key:"moveBrushX",value:function(e,t=!1){if(!this.brushEl)return;this.brushIs2dBound&&(this.removeBrush2d(),this.addBrush1d());const n=e?[this.props.scaleX(e[0]),this.props.scaleX(e[1])]:null;this.rangeSelectionMoved=!0,this.rangeSelectionMovedEnd=!0,t?this.brushElX.transition().call(this.brushBehaviorX.move,n):this.brushElX.call(this.brushBehaviorX.move,n)}},{key:"moveBrushY",value:function(e,t=!1){if(!this.brushEl)return;this.brushIs2dBound&&(this.removeBrush2d(),this.addBrush1d());const n=e?[this.props.scaleY(e[0]),this.props.scaleY(e[1])]:null;this.rangeSelectionMoved=!0,this.rangeSelectionMovedEnd=!0,t?this.brushElY.transition().call(this.brushBehaviorY.move,n):this.brushElY.call(this.brushBehaviorY.move,n)}},{key:"moveBrushXY",value:function(e,t=!1){if(!this.brushEl)return;const n=[[this.props.scaleX(e[0][0]),this.props.scaleY(e[1][0])],[this.props.scaleX(e[0][1]),this.props.scaleY(e[1][1])]];this.rangeSelectionMoved=!0,this.rangeSelectionMovedEnd=!0,t?this.brushElXY.transition().call(this.brushBehaviorXY.move,n):this.brushElXY.call(this.brushBehaviorXY.move,n)}},{key:"mouseEnterHandler",value:function(){this.props.isRangeSelectionActive||this.setState({isVisible:!0})}},{key:"mouseLeaveHandler",value:function(){this.setState({isVisible:!1})}},{key:"removeBrush1d",value:function(){this.brushIs1dBound&&(this.brushElX&&(this.brushElX.call(this.brushBehaviorX.move,null),this.brushElX.on(".brush",null)),this.brushElY&&(this.brushElY.call(this.brushBehaviorY.move,null),this.brushElY.on(".brush",null)),this.brushIs1dBound=!1)}},{key:"removeBrush2d",value:function(){this.brushIs2dBound&&this.brushElXY&&(this.brushElXY.call(this.brushBehaviorXY.move,null),this.brushElXY.on(".brush",null),this.brushElXYOld=void 0,this.brushIs2dBound=!1,this.props.is1dRangeSelection||this.props.onRangeSelectionReset())}},{key:"render",value:function(){const e=this.props.tracks.map((e=>wb(e))).reduce(Kg,!1),t=this.props.tracks.some((e=>e.contents?e.contents.some((e=>"heatmap"===e.type&&"topRight"===e.options.colorbarPosition)):"heatmap"===e.type&&"topRight"===e.options.colorbarPosition));let n="track-range-selection";this.props.isRangeSelectionActive&&(n+=this.props.is1dRangeSelection?"-active-secondary":"-active-primary");const r=gl(!this.props.is1dRangeSelection&&gH["track-range-selection-group-inactive"]),i=gl(this.props.is1dRangeSelection&&gH["track-range-selection-group-inactive"]);return m.default.createElement("div",{className:gl(this.props.className,mH["center-track"]),onMouseEnter:this.mouseEnterHandler.bind(this),onMouseLeave:this.mouseLeaveHandler.bind(this),style:{height:this.props.height,width:this.props.width}},e&&m.default.createElement("svg",{className:gH[n],style:{height:this.props.height,width:this.props.width},xmlns:"http://www.w3.org/2000/svg"},m.default.createElement("g",{ref:e=>{this.brushElX=Be(e)},className:r}),m.default.createElement("g",{ref:e=>{this.brushElY=Be(e)},className:r}),m.default.createElement("g",{ref:e=>{this.brushElXY=Be(e)},className:i})),this.props.editable&&m.default.createElement(fH,{imgStyleAdd:bH,imgStyleClose:bH,imgStyleMove:bH,imgStyleSettings:bH,isMoveable:!1,isVisible:this.state.isVisible||this.props.uid===this.props.configTrackMenuId,onAddSeries:this.props.onAddSeries,onCloseTrackMenuOpened:this.props.onCloseTrackMenuOpened,onConfigTrackMenuOpened:this.props.onConfigTrackMenuOpened,paddingRight:t,uid:this.props.uid}))}}]),n}(m.default.Component);yH.defaultProps={className:"center-track",configTrackMenuId:null,is1dRangeSelection:!1,rangeSelectionEnd:S.exports.bool,isRangeSelectionActive:!1,scaleX:e=>e,scaleY:e=>e},yH.propTypes={className:S.exports.string,configTrackMenuId:S.exports.string,editable:S.exports.bool,height:S.exports.number.isRequired,is1dRangeSelection:S.exports.bool,isRangeSelectionActive:S.exports.bool,onAddSeries:S.exports.func.isRequired,onCloseTrackMenuOpened:S.exports.func.isRequired,onConfigTrackMenuOpened:S.exports.func.isRequired,onRangeSelectionX:S.exports.func.isRequired,onRangeSelectionXEnd:S.exports.func.isRequired,onRangeSelectionY:S.exports.func.isRequired,onRangeSelectionYEnd:S.exports.func.isRequired,onRangeSelectionXY:S.exports.func.isRequired,onRangeSelectionXYEnd:S.exports.func.isRequired,onRangeSelectionReset:S.exports.func.isRequired,onRangeSelectionStart:S.exports.func.isRequired,rangeSelection:S.exports.array.isRequired,rangeSelectionEnd:S.exports.bool,scaleX:S.exports.func,scaleY:S.exports.func,tracks:S.exports.array.isRequired,uid:S.exports.string.isRequired,width:S.exports.number.isRequired};const TH={__fake__:!0,publish:lb,subscribe:lb,unsubscribe:lb},{Provider:_H,Consumer:EH}=m.default.createContext(TH),xH=e=>m.default.forwardRef(((t,n)=>m.default.createElement(EH,null,(r=>m.default.createElement(e,{ref:n,...t,pubSub:r}))))),wH="_drag-listening-div-active_19gkt_1";let SH=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={dragOnTop:!1},r}return f(n,[{key:"render",value:function(){let e="red";return this.props.enabled&&this.state.dragOnTop?e="green":this.props.enabled&&(e="blue"),m.default.createElement("div",{className:gl("DragListeningDiv",{[wH]:this.props.enabled}),onDragEnter:()=>{this.setState({dragOnTop:!0})},onDragLeave:()=>{this.setState({dragOnTop:!1})},onDragOver:e=>{e.preventDefault()},onDrop:()=>{if(!this.props.enabled)return;const e=this.props.draggingHappening,t={type:this.props.defaultTrackType,uid:Ns.nice(),tilesetUid:e.tilesetUid,server:e.server};this.props.onTrackDropped(t),this.props.pubSub.publish("trackDropped",t)},style:{background:e,opacity:.6,...this.props.style}})}}]),n}(m.default.Component);SH.defaultProps={enabled:!1,style:{},draggingHappening:{},onTrackDropped:()=>{}},SH.propTypes={enabled:S.exports.bool,style:S.exports.object,defaultTrackType:S.exports.object,draggingHappening:S.exports.object,onTrackDropped:S.exports.func,position:S.exports.string.isRequired,pubSub:S.exports.object.isRequired};const kH=xH(SH),AH="_gallery-tracks_fbxxi_1",CH="_gallery-track_fbxxi_1",IH="_gallery-sub-track_fbxxi_18",OH="_gallery-invisible-track_fbxxi_19",DH={"tiled-plot":"_tiled-plot_1y7td_1",horizontalList:"_horizontalList_1y7td_7",list:"_list_1y7td_14",stylizedList:"_stylizedList_1y7td_21",stylizedItem:"_stylizedItem_1y7td_28",stylizedHelper:"_stylizedHelper_1y7td_39",horizontalItem:"_horizontalItem_1y7td_44","resizable-track":"_resizable-track_1y7td_55",domain:"_domain_1y7td_60"},PH={pointerEvents:"all"};let NH=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={hovering:!1},r}return f(n,[{key:"mouseEnterHandler",value:function(){this.setState({hovering:!0})}},{key:"mouseLeaveHandler",value:function(){this.setState({hovering:!1})}},{key:"render",value:function(){return m.default.createElement("div",{className:gl("gallery-tracks",AH)},this.props.tracks&&this.props.tracks.map(((e,t)=>m.default.createElement("div",{key:e.uid||t,className:CH,onMouseLeave:this.mouseLeaveHandler.bind(this),style:{top:e.height*t,right:e.height*t,bottom:e.height*t,left:e.height*t}},m.default.createElement("div",{className:IH,onMouseEnter:this.mouseEnterHandler.bind(this),style:{top:0,right:0,left:0,height:e.height}}),m.default.createElement("div",{className:IH,onMouseEnter:this.mouseEnterHandler.bind(this),style:{top:0,right:0,bottom:0,width:e.height}}),m.default.createElement("div",{className:IH,onMouseEnter:this.mouseEnterHandler.bind(this),style:{right:0,bottom:0,left:0,height:e.height}}),m.default.createElement("div",{className:IH,onMouseEnter:this.mouseEnterHandler.bind(this),style:{top:0,bottom:0,left:0,width:e.height}}),m.default.createElement("div",{className:OH,onMouseLeave:this.mouseLeaveHandler.bind(this),style:{top:e.height,right:e.height,bottom:e.height,left:e.height}}),this.props.editable&&m.default.createElement(fH,{configMenuVisible:!0,imgStyleAdd:PH,imgStyleClose:PH,imgStyleMove:PH,imgStyleSettings:PH,isMoveable:!1,isVisible:this.state.hovering,onCloseTrackMenuOpened:this.props.onCloseTrackMenuOpened,onConfigTrackMenuOpened:this.props.onConfigTrackMenuOpened,uid:e.uid||t})))))}}]),n}(m.default.Component);NH.propTypes={editable:S.exports.bool,onCloseTrackMenuOpened:S.exports.func.isRequired,onConfigTrackMenuOpened:S.exports.func.isRequired,tracks:S.exports.array};let RH=function(){function e(t){d(this,e),this.context=t;const{id:n,pubSub:r,getTheme:i}=t;this.pubSub=r||TH,this.id=n,this._xScale=fi(),this._yScale=fi(),this._refXScale=fi(),this._refYScale=fi(),this.position=[0,0],this.dimensions=[1,1],this.options={},this.pubSubs=[],this.getTheme=i||(()=>{}),this.pubSubs.push(this.pubSub.subscribe("app.mouseMove",this.defaultMouseMoveHandler.bind(this)))}return f(e,[{key:"isWithin",value:function(e,t){let n=e,r=t,i=this.position[0],o=this.position[1];return this.isLeftModified&&(n=t,r=e,i=this.position[1],o=this.position[0]),Dg(n,r,i,this.dimensions[0]+i,o,this.dimensions[1]+o)}},{key:"getProp",value:function(e){return()=>this[e]}},{key:"getData",value:function(){}},{key:"click",value:function(e,t,n){return{type:"generic",event:n,payload:null}}},{key:"clickOutside",value:function(){}},{key:"getDimensions",value:function(){return this.dimensions}},{key:"setDimensions",value:function(e){this.dimensions=e,this._xScale.range([0,this.dimensions[0]]),this._yScale.range([0,this.dimensions[1]])}},{key:"refXScale",value:function(e){return arguments.length?(this._refXScale=e,this):this._refXScale}},{key:"refYScale",value:function(e){return arguments.length?(this._refYScale=e,this):this._refYScale}},{key:"xScale",value:function(e){return arguments.length?(this._xScale=e,this):this._xScale}},{key:"yScale",value:function(e){return arguments.length?(this._yScale=e,this):this._yScale}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t)}},{key:"refScalesChanged",value:function(e,t){this._refXScale=e,this._refYScale=t}},{key:"draw",value:function(){}},{key:"getPosition",value:function(){return this.position}},{key:"setPosition",value:function(e){this.position=e}},{key:"defaultMouseMoveHandler",value:function(e){}},{key:"remove",value:function(){this.pubSubs.forEach((e=>this.pubSub.unsubscribe(e))),this.pubSubs=[]}},{key:"rerender",value:function(){}},{key:"respondsToPosition",value:function(e,t){return this.isWithin(e,t)}},{key:"zoomedY",value:function(e,t){}},{key:"movedY",value:function(e){}}]),e}();function MH(e,t){const n=e.map((e=>+e)).sort(((e,t)=>t-e));return function(e,t){const n=ci(t,e);return ri(`.${n}`,e)(e)}(n[t],n[n.length-1])}let LH=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{scene:o}=e;i.scene=o,i.delayDrawing=!1,i.pBase=new Rf.PIXI.Graphics,i.pMasked=new Rf.PIXI.Graphics,i.pMask=new Rf.PIXI.Graphics,i.pMain=new Rf.PIXI.Graphics,i.pBorder=new Rf.PIXI.Graphics,i.pBackground=new Rf.PIXI.Graphics,i.pForeground=new Rf.PIXI.Graphics,i.pLabel=new Rf.PIXI.Graphics,i.pMobile=new Rf.PIXI.Graphics,i.pAxis=new Rf.PIXI.Graphics,i.pMouseOver=new Rf.PIXI.Graphics,i.scene.addChild(i.pBase),i.pBase.addChild(i.pMasked),i.pMasked.addChild(i.pBackground),i.pMasked.addChild(i.pMain),i.pMasked.addChild(i.pMask),i.pMasked.addChild(i.pMobile),i.pMasked.addChild(i.pBorder),i.pMasked.addChild(i.pLabel),i.pMasked.addChild(i.pForeground),i.pMasked.addChild(i.pMouseOver),i.pBase.addChild(i.pAxis),i.pMasked.mask=i.pMask,i.prevOptions="",i.options=Object.assign(i.options,r);const a=i.getName();return i.labelTextFontFamily="Arial",i.labelTextFontSize=12,i.labelXOffset=0,i.labelText=new Rf.PIXI.Text(a,{fontSize:`${i.labelTextFontSize}px`,fontFamily:i.labelTextFontFamily,fill:"black"}),i.pLabel.addChild(i.labelText),i.errorText=new Rf.PIXI.Text("",{fontSize:"12px",fontFamily:"Arial",fill:"red"}),i.errorText.anchor.x=.5,i.errorText.anchor.y=.5,i.pLabel.addChild(i.errorText),i}return f(n,[{key:"setLabelText",value:function(){}},{key:"setPosition",value:function(e){this.position=e,this.drawBorder(),this.drawLabel(),this.drawBackground(),this.setMask(this.position,this.dimensions),this.setForeground()}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e),this.drawBorder(),this.drawLabel(),this.drawBackground(),this.setMask(this.position,this.dimensions),this.setForeground()}},{key:"setMask",value:function(e,t){this.pMask.clear(),this.pMask.beginFill(),this.pMask.drawRect(e[0],e[1],t[0],t[1]),this.pMask.endFill()}},{key:"setForeground",value:function(){this.pForeground.position.y=this.position[1],this.pForeground.position.x=this.position[0]}},{key:"remove",value:function(){this.pBase.clear(),this.scene.removeChild(this.pBase)}},{key:"drawBorder",value:function(){const e=this.pBorder;if(e.clear(),!this.options||!this.options.trackBorderWidth)return;const t=lm(this.options.trackBorderColor?this.options.trackBorderColor:"white");e.lineStyle(this.options.trackBorderWidth,t),e.drawRect(this.position[0],this.position[1],this.dimensions[0],this.dimensions[1])}},{key:"drawError",value:function(){if(this.errorText.x=this.position[0]+this.dimensions[0]/2,this.errorText.y=this.position[1]+this.dimensions[1]/2,this.errorText.text=this.errorTextText,this.errorTextText&&this.errorTextText.length){const e=this.pBorder;e.clear(),e.lineStyle(1,lm("red")),e.drawRect(this.position[0],this.position[1],this.dimensions[0],this.dimensions[1])}}},{key:"drawBackground",value:function(){const e=this.pBackground;if(e.clear(),!this.options||!this.options.backgroundColor)return;let t=1,n=this.options.backgroundColor;"transparent"===this.options.backgroundColor&&(t=0,n="white");const r=lm(n);e.beginFill(r,t),e.drawRect(this.position[0],this.position[1],this.dimensions[0],this.dimensions[1])}},{key:"getLabelColor",value:function(){return this.options.labelColor&&"[glyph-color]"!==this.options.labelColor?this.options.labelColor:this.options.lineStrokeColor||this.options.barFillColor||"black"}},{key:"getName",value:function(){return this.options.name?this.options.name:this.tilesetInfo&&this.tilesetInfo.name||""}},{key:"drawLabel",value:function(){if(!this.labelText)return;const e=this.pLabel;if(e.clear(),!this.options||!this.options.labelPosition||"hidden"===this.options.labelPosition)return void(this.labelText.alpha=0);e.beginFill(lm(this.options.labelBackgroundColor||"white"),+this.options.labelBackgroundOpacity>=0?+this.options.labelBackgroundOpacity:.5);const t=lm(this.getLabelColor());if(this.dimensions[0]<0)return;let n=this.options.labelShowAssembly&&this.tilesetInfo&&this.tilesetInfo.coordSystem?`${this.tilesetInfo.coordSystem} | `:"";if(n+=this.getName(),this.options.labelShowResolution&&this.tilesetInfo&&this.tilesetInfo.max_width&&this.tilesetInfo.bins_per_dimension?n+=`\n[Current data resolution: ${function(e,t,n,r){const i=t/(2**e*n);if(!Number.isNaN(i)){const e=ci(t/(2**r*n),i);return ri(`.${e}`,i)(i)}return console.warn("NaN resolution, screen is probably too small."),""}(this.calculateZoomLevel(),this.tilesetInfo.max_width,this.tilesetInfo.bins_per_dimension,this.tilesetInfo.max_zoom)}]`:this.options.labelShowResolution&&this.tilesetInfo&&this.tilesetInfo.resolutions&&(n+=`\n[Current data resolution: ${MH(this.tilesetInfo.resolutions,this.calculateZoomLevel())}]`),this.options&&this.options.dataTransform){let e=null;if(this.tilesetInfo&&this.tilesetInfo.transforms)for(const t of this.tilesetInfo.transforms)t.value===this.options.dataTransform&&(e=t);e?n+=`\n[Transform: ${e.name}]`:"None"===this.options.dataTransform?n+="\n[Transform: None ]":n+="\n[Transform: Default ]"}this.labelText.text=n,this.labelText.style={fontSize:`${this.labelTextFontSize}px`,fontFamily:this.labelTextFontFamily,fill:t},this.labelText.alpha=void 0!==this.options.labelTextOpacity?this.options.labelTextOpacity:1,this.labelText.visible=!0,this.flipText&&(this.labelText.scale.x=-1);const r=+this.options.labelLeftMargin||0,i=+this.options.labelRightMargin||0,o=+this.options.labelTopMargin||0,a=+this.options.labelBottomMargin||0;"topLeft"===this.options.labelPosition?(this.labelText.x=this.position[0]+r+this.labelXOffset,this.labelText.y=this.position[1]+o,this.labelText.anchor.x=.5,this.labelText.anchor.y=0,this.labelText.x+=this.labelText.width/2,e.drawRect(this.position[0]+r+this.labelXOffset,this.position[1]+o,this.labelText.width+2,this.labelText.height+2)):"bottomLeft"===this.options.labelPosition&&!this.flipText||"topRight"===this.options.labelPosition&&this.flipText?(this.labelText.x=this.position[0]+(r||o),this.labelText.y=this.position[1]+this.dimensions[1]-(a||i),this.labelText.anchor.x=.5,this.labelText.anchor.y=1,this.labelText.x+=this.labelText.width/2+this.labelXOffset,e.drawRect(this.position[0]+(r||o)+this.labelXOffset,this.position[1]+this.dimensions[1]-this.labelText.height-2-(a||i),this.labelText.width+2,this.labelText.height+2)):"topRight"===this.options.labelPosition&&!this.flipText||"bottomLeft"===this.options.labelPosition&&this.flipText?(this.labelText.x=this.position[0]+this.dimensions[0]-(i||a),this.labelText.y=this.position[1]+(o||r),this.labelText.anchor.x=.5,this.labelText.anchor.y=0,this.labelText.x-=this.labelText.width/2+this.labelXOffset,e.drawRect(this.position[0]+this.dimensions[0]-this.labelText.width-2-(i||a)-this.labelXOffset,this.position[1]+(o||r),this.labelText.width+2,this.labelText.height+2)):"bottomRight"===this.options.labelPosition?(this.labelText.x=this.position[0]+this.dimensions[0]-i,this.labelText.y=this.position[1]+this.dimensions[1]-a,this.labelText.anchor.x=.5,this.labelText.anchor.y=1,this.labelText.x-=this.labelText.width/2+this.labelXOffset,e.drawRect(this.position[0]+this.dimensions[0]-this.labelText.width-2-i-this.labelXOffset,this.position[1]+this.dimensions[1]-this.labelText.height-2-a,this.labelText.width+2,this.labelText.height+2)):"outerLeft"===this.options.labelPosition&&!this.flipText||"outerTop"===this.options.labelPosition&&this.flipText?(this.labelText.x=this.position[0],this.labelText.y=this.position[1]+this.dimensions[1]/2,this.labelText.anchor.x=.5,this.labelText.anchor.y=.5,this.labelText.x-=this.labelText.width/2+3):"outerTop"===this.options.labelPosition&&!this.flipText||"outerLeft"===this.options.labelPosition&&this.flipText?(this.labelText.x=this.position[0]+this.dimensions[0]/2,this.labelText.y=this.position[1],this.labelText.anchor.x=.5,this.labelText.anchor.y=.5,this.labelText.y-=this.labelText.height/2+3):"outerBottom"===this.options.labelPosition&&!this.flipText||"outerRight"===this.options.labelPosition&&this.flipText?(this.labelText.x=this.position[0]+this.dimensions[0]/2,this.labelText.y=this.position[1]+this.dimensions[1],this.labelText.anchor.x=.5,this.labelText.anchor.y=.5,this.labelText.y+=this.labelText.height/2+3):"outerRight"===this.options.labelPosition&&!this.flipText||"outerBottom"===this.options.labelPosition&&this.flipText?(this.labelText.x=this.position[0]+this.dimensions[0],this.labelText.y=this.position[1]+this.dimensions[1]/2,this.labelText.anchor.x=.5,this.labelText.anchor.y=.5,this.labelText.x+=this.labelText.width/2+3):this.labelText.visible=!1,"outerLeft"===this.options.labelPosition||"outerRight"===this.options.labelPosition||"outerTop"===this.options.labelPosition||"outerBottom"===this.options.labelPosition?this.pLabel.setParent(this.pBase):this.pLabel.setParent(this.pMasked)}},{key:"rerender",value:function(e){this.options=e,this.draw(),this.drawBackground(),this.drawLabel(),this.drawError(),this.drawBorder()}},{key:"draw",value:function(){this.drawError()}},{key:"exportSVG",value:function(){const e=document.createElement("g"),t=document.createElement("rect");t.setAttribute("x",`${this.position[0]}`),t.setAttribute("y",`${this.position[1]}`),t.setAttribute("width",`${this.dimensions[0]}`),t.setAttribute("height",`${this.dimensions[1]}`),this.options&&this.options.backgroundColor?t.setAttribute("fill",this.options.backgroundColor):t.setAttribute("fill-opacity","0");const n=document.createElement("g");n.setAttribute("class","g-clipped"),e.appendChild(n),n.appendChild(t);const r=document.createElement("g");n.setAttribute("class","g-track"),n.appendChild(r);const i=document.createElement("g");n.setAttribute("class","g-labels"),n.appendChild(i);const o=document.createElementNS("http://www.w3.org/2000/svg","clipPath");e.appendChild(o);const a=document.createElementNS("http://www.w3.org/2000/svg","polygon");o.appendChild(a),a.setAttribute("points",`${this.position[0]},${this.position[1]} ${this.position[0]+this.dimensions[0]},${this.position[1]} ${this.position[0]+this.dimensions[0]},${this.position[1]+this.dimensions[1]} ${this.position[0]},${this.position[1]+this.dimensions[1]} `);const s=Ns.nice();o.setAttribute("id",s),n.setAttribute("style",`clip-path:url(#${s});`);const l=this.labelText.text.split("\n");let c=0;const u=(this.labelTextFontSize+2)*l.length+3;.5===this.labelText.anchor.y?c=u/2:1===this.labelText.anchor.y&&(c=-u);for(let e=0;enew e(t,n))))):console.error("No dataconfig provided")}return f(e,[{key:"registerFileUrl",value:async function({server:e,url:t,filetype:n,coordSystem:r}){const i=`${cb(e)}/register_url/`,o={fileurl:t,filetype:n,coordSystem:r};return fetch(i,{method:"POST",body:JSON.stringify(o),headers:{"Content-Type":"application/json; charset=utf-8"}})}},{key:"tilesetInfo",value:function(e){return this.dataConfig.server&&this.dataConfig.url&&this.dataConfig.filetype?this.registerFileUrl(this.dataConfig).then((e=>e.json())).then((t=>{this.dataConfig.tilesetUid=t.uid,this.tilesetInfoAfterRegister(e)})).catch((e=>{console.error("Error registering url",e)})):new Promise((()=>{this.tilesetInfoAfterRegister(e)}))}},{key:"tilesetInfoAfterRegister",value:function(e){if(this.dataConfig.children){const t=this.dataConfig.children.map((e=>new Promise((t=>{e.tilesetInfo(t)}))));Promise.all(t).then((t=>{e(t[0])}))}else this.dataConfig.server&&this.dataConfig.tilesetUid?mg.trackInfo(this.dataConfig.server,this.dataConfig.tilesetUid,(t=>{this.dataConfig.tilesetInfo=t[this.dataConfig.tilesetUid],e(t[this.dataConfig.tilesetUid],this.dataConfig.tilesetUid)}),(t=>{this.tilesetInfoLoading=!1,e({error:t})}),this.pubSub):(console.warn("No dataConfig children, server or tilesetUid:",this.dataConfig),e(null))}},{key:"fullTileId",value:function(e,t){return`${e}.${t}`}},{key:"fetchTilesDebounced",value:function(e,t){if("horizontal-section"===this.dataConfig.type)this.fetchHorizontalSection(e,t);else if("vertical-section"===this.dataConfig.type)this.fetchHorizontalSection(e,t,!0);else if(!this.dataConfig.children&&this.dataConfig.tilesetUid)new Promise((e=>{mg.fetchTilesDebounced({id:Ns.nice(),server:this.dataConfig.server,done:e,ids:t.map((e=>`${this.dataConfig.tilesetUid}.${e}`)),options:this.dataConfig.options},this.pubSub,!0)})).then((n=>{const r=gm(n)[0].tilesetUid,i={};for(let e=0;enew Promise((n=>{e.fetchTilesDebounced(n,t)}),this.pubSub,!0)));Promise.all(n).then((n=>{if("divided"===this.dataConfig.type){const r=this.makeDivided(n,t);e(r)}else console.warn("Unimplemented dataConfig type. Returning first data source.",this.dataConfig),e(n[0])}))}}},{key:"divideData",value:function(e,t){const n=new Float32Array(e.length);for(let r=0;r+e)).sort(((e,t)=>t-e));l=mg.calculateTilesFromResolution(e[o],s,this.dataConfig.tilesetInfo.min_pos[n?1:0],this.dataConfig.tilesetInfo.max_pos[n?1:0])}else l=mg.calculateTiles(o,s,this.dataConfig.tilesetInfo.min_pos[n?1:0],this.dataConfig.tilesetInfo.max_pos[n?1:0],this.dataConfig.tilesetInfo.max_zoom,this.dataConfig.tilesetInfo.max_width);const c=[a,l[0]].sort(((e,t)=>e-t));c[0]===a?i.push(!1):i.push(!0);const u=`${o}.${c[0]}.${c[1]}`;r.push(u)}new Promise((e=>{mg.fetchTilesDebounced({id:Ns.nice(),server:this.dataConfig.server,done:e,ids:r.map((e=>`${this.dataConfig.tilesetUid}.${e}`))},this.pubSub,!0)})).then((n=>{const o=gm(n)[0].tilesetUid,a={};for(let e=0;e=0;)e[t]=0}var XH=0,YH=29,qH=256,$H=qH+1+YH,KH=30,QH=19,ZH=2*$H+1,JH=15,eG=16,tG=7,nG=256,rG=16,iG=17,oG=18,aG=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],sG=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],lG=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cG=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],uG=new Array(2*($H+2));WH(uG);var hG=new Array(2*KH);WH(hG);var dG=new Array(512);WH(dG);var pG=new Array(256);WH(pG);var fG=new Array(YH);WH(fG);var mG,gG,bG,vG=new Array(KH);function yG(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function TG(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _G(e){return e<256?dG[e]:dG[256+(e>>>7)]}function EG(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function xG(e,t,n){e.bi_valid>eG-n?(e.bi_buf|=t<>eG-e.bi_valid,e.bi_valid+=n-eG):(e.bi_buf|=t<>>=1,n<<=1}while(--t>0);return n>>>1}function kG(e,t,n){var r,i,o=new Array(JH+1),a=0;for(r=1;r<=JH;r++)o[r]=a=a+n[r-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=SG(o[s]++,s))}}function AG(e){var t;for(t=0;t<$H;t++)e.dyn_ltree[2*t]=0;for(t=0;t8?EG(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function IG(e,t,n,r){var i=2*t,o=2*n;return e[i]>1;n>=1;n--)OG(e,o,n);i=l;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],OG(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,OG(e,o,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,a,s,l=t.dyn_tree,c=t.max_code,u=t.stat_desc.static_tree,h=t.stat_desc.has_stree,d=t.stat_desc.extra_bits,p=t.stat_desc.extra_base,f=t.stat_desc.max_length,m=0;for(o=0;o<=JH;o++)e.bl_count[o]=0;for(l[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nf&&(o=f,m++),l[2*r+1]=o,r>c||(e.bl_count[o]++,a=0,r>=p&&(a=d[r-p]),s=l[2*r],e.opt_len+=s*(o+a),h&&(e.static_len+=s*(u[2*r+1]+a)));if(0!==m){do{for(o=f-1;0===e.bl_count[o];)o--;e.bl_count[o]--,e.bl_count[o+1]+=2,e.bl_count[f]--,m-=2}while(m>0);for(o=f;0!==o;o--)for(r=e.bl_count[o];0!==r;)(i=e.heap[--n])>c||(l[2*i+1]!==o&&(e.opt_len+=(o-l[2*i+1])*l[2*i],l[2*i+1]=o),r--)}}(e,t),kG(o,c,e.bl_count)}function NG(e,t,n){var r,i,o=-1,a=t[1],s=0,l=7,c=4;for(0===a&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s>=7;r0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return zH;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return VH;for(t=32;t=3&&0===e.bl_tree[2*cG[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t?LG(e,t,n,r):4===e.strategy||o===i?(xG(e,2+(r?1:0),3),DG(e,uG,hG)):(xG(e,4+(r?1:0),3),function(e,t,n,r){var i;for(xG(e,t-257,5),xG(e,n-1,5),xG(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(pG[n]+qH+1)]++,e.dyn_dtree[2*_G(t)]++),e.last_lit===e.lit_bufsize-1},HH._tr_align=function(e){xG(e,2,3),wG(e,nG,uG),function(e){16===e.bi_valid?(EG(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)};var BG=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){n-=a=n>2e3?2e3:n;do{o=o+(i=i+t[r++]|0)|0}while(--a);i%=65521,o%=65521}return i|o<<16|0};var FG=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var UG,jG=function(e,t,n,r){var i=FG,o=r+n;e^=-1;for(var a=r;a>>8^i[255&(e^t[a])];return-1^e},HG={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},GG=FH,zG=HH,VG=BG,WG=jG,XG=HG,YG=0,qG=4,$G=0,KG=-2,QG=-1,ZG=4,JG=2,ez=8,tz=9,nz=286,rz=30,iz=19,oz=2*nz+1,az=15,sz=3,lz=258,cz=lz+sz+1,uz=42,hz=103,dz=113,pz=666,fz=1,mz=2,gz=3,bz=4;function vz(e,t){return e.msg=XG[t],t}function yz(e){return(e<<1)-(e>4?9:0)}function Tz(e){for(var t=e.length;--t>=0;)e[t]=0}function _z(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(GG.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function Ez(e,t){zG._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,_z(e.strm)}function xz(e,t){e.pending_buf[e.pending++]=t}function wz(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Sz(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,l=e.strstart>e.w_size-cz?e.strstart-(e.w_size-cz):0,c=e.window,u=e.w_mask,h=e.prev,d=e.strstart+lz,p=c[o+a-1],f=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===f&&c[n+a-1]===p&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&oa){if(e.match_start=t,a=r,r>=s)break;p=c[o+a-1],f=c[o+a]}}}while((t=h[t&u])>l&&0!=--i);return a<=e.lookahead?a:e.lookahead}function kz(e){var t,n,r,i,o,a,s,l,c,u,h=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=h+(h-cz)){GG.arraySet(e.window,e.window,h,h,0),e.match_start-=h,e.strstart-=h,e.block_start-=h,t=n=e.hash_size;do{r=e.head[--t],e.head[t]=r>=h?r-h:0}while(--n);t=n=h;do{r=e.prev[--t],e.prev[t]=r>=h?r-h:0}while(--n);i+=h}if(0===e.strm.avail_in)break;if(a=e.strm,s=e.window,l=e.strstart+e.lookahead,c=i,u=void 0,(u=a.avail_in)>c&&(u=c),n=0===u?0:(a.avail_in-=u,GG.arraySet(s,a.input,a.next_in,u,l),1===a.state.wrap?a.adler=VG(a.adler,s,u,l):2===a.state.wrap&&(a.adler=WG(a.adler,s,u,l)),a.next_in+=u,a.total_in+=u,u),e.lookahead+=n,e.lookahead+e.insert>=sz)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<=sz&&(e.ins_h=(e.ins_h<=sz)if(r=zG._tr_tally(e,e.strstart-e.match_start,e.match_length-sz),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=sz){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<=sz&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=sz-1)),e.prev_length>=sz&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-sz,r=zG._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-sz),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<15&&(a=2,r-=16),i<1||i>tz||n!==ez||r<8||r>15||t<0||t>9||o<0||o>ZG)return vz(e,KG);8===r&&(r=9);var s=new Oz;return e.state=s,s.strm=e,s.wrap=a,s.gzhead=null,s.w_bits=r,s.w_size=1<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(kz(e),0===e.lookahead&&t===YG)return fz;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,Ez(e,!1),0===e.strm.avail_out))return fz;if(e.strstart-e.block_start>=e.w_size-cz&&(Ez(e,!1),0===e.strm.avail_out))return fz}return e.insert=0,t===qG?(Ez(e,!0),0===e.strm.avail_out?gz:bz):(e.strstart>e.block_start&&(Ez(e,!1),e.strm.avail_out),fz)})),new Iz(4,4,8,4,Az),new Iz(4,5,16,8,Az),new Iz(4,6,32,32,Az),new Iz(4,4,16,16,Cz),new Iz(8,16,32,32,Cz),new Iz(8,16,128,128,Cz),new Iz(8,32,128,256,Cz),new Iz(32,128,258,1024,Cz),new Iz(32,258,258,4096,Cz)],jH.deflateInit=function(e,t){return Nz(e,t,ez,15,8,0)},jH.deflateInit2=Nz,jH.deflateReset=Pz,jH.deflateResetKeep=Dz,jH.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?KG:(e.state.gzhead=t,$G):KG},jH.deflate=function(e,t){var n,r,i,o;if(!e||!e.state||t>5||t<0)return e?vz(e,KG):KG;if(r=e.state,!e.output||!e.input&&0!==e.avail_in||r.status===pz&&t!==qG)return vz(e,0===e.avail_out?-5:KG);if(r.strm=e,n=r.last_flush,r.last_flush=t,r.status===uz)if(2===r.wrap)e.adler=0,xz(r,31),xz(r,139),xz(r,8),r.gzhead?(xz(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xz(r,255&r.gzhead.time),xz(r,r.gzhead.time>>8&255),xz(r,r.gzhead.time>>16&255),xz(r,r.gzhead.time>>24&255),xz(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),xz(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xz(r,255&r.gzhead.extra.length),xz(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=WG(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xz(r,0),xz(r,0),xz(r,0),xz(r,0),xz(r,0),xz(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),xz(r,3),r.status=dz);else{var a=ez+(r.w_bits-8<<4)<<8;a|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(a|=32),a+=31-a%31,r.status=dz,wz(r,a),0!==r.strstart&&(wz(r,e.adler>>>16),wz(r,65535&e.adler)),e.adler=1}if(69===r.status)if(r.gzhead.extra){for(i=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>i&&(e.adler=WG(e.adler,r.pending_buf,r.pending-i,i)),_z(e),i=r.pending,r.pending!==r.pending_buf_size));)xz(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>i&&(e.adler=WG(e.adler,r.pending_buf,r.pending-i,i)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=WG(e.adler,r.pending_buf,r.pending-i,i)),_z(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexi&&(e.adler=WG(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){i=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>i&&(e.adler=WG(e.adler,r.pending_buf,r.pending-i,i)),_z(e),i=r.pending,r.pending===r.pending_buf_size)){o=1;break}o=r.gzindexi&&(e.adler=WG(e.adler,r.pending_buf,r.pending-i,i)),0===o&&(r.status=hz)}else r.status=hz;if(r.status===hz&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&_z(e),r.pending+2<=r.pending_buf_size&&(xz(r,255&e.adler),xz(r,e.adler>>8&255),e.adler=0,r.status=dz)):r.status=dz),0!==r.pending){if(_z(e),0===e.avail_out)return r.last_flush=-1,$G}else if(0===e.avail_in&&yz(t)<=yz(n)&&t!==qG)return vz(e,-5);if(r.status===pz&&0!==e.avail_in)return vz(e,-5);if(0!==e.avail_in||0!==r.lookahead||t!==YG&&r.status!==pz){var s=2===r.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(kz(e),0===e.lookahead)){if(t===YG)return fz;break}if(e.match_length=0,n=zG._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Ez(e,!1),0===e.strm.avail_out))return fz}return e.insert=0,t===qG?(Ez(e,!0),0===e.strm.avail_out?gz:bz):e.last_lit&&(Ez(e,!1),0===e.strm.avail_out)?fz:mz}(r,t):3===r.strategy?function(e,t){for(var n,r,i,o,a=e.window;;){if(e.lookahead<=lz){if(kz(e),e.lookahead<=lz&&t===YG)return fz;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=sz&&e.strstart>0&&(r=a[i=e.strstart-1])===a[++i]&&r===a[++i]&&r===a[++i]){o=e.strstart+lz;do{}while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=sz?(n=zG._tr_tally(e,1,e.match_length-sz),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=zG._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Ez(e,!1),0===e.strm.avail_out))return fz}return e.insert=0,t===qG?(Ez(e,!0),0===e.strm.avail_out?gz:bz):e.last_lit&&(Ez(e,!1),0===e.strm.avail_out)?fz:mz}(r,t):UG[r.level].func(r,t);if(s!==gz&&s!==bz||(r.status=pz),s===fz||s===gz)return 0===e.avail_out&&(r.last_flush=-1),$G;if(s===mz&&(1===t?zG._tr_align(r):5!==t&&(zG._tr_stored_block(r,0,0,!1),3===t&&(Tz(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),_z(e),0===e.avail_out))return r.last_flush=-1,$G}return t!==qG?$G:r.wrap<=0?1:(2===r.wrap?(xz(r,255&e.adler),xz(r,e.adler>>8&255),xz(r,e.adler>>16&255),xz(r,e.adler>>24&255),xz(r,255&e.total_in),xz(r,e.total_in>>8&255),xz(r,e.total_in>>16&255),xz(r,e.total_in>>24&255)):(wz(r,e.adler>>>16),wz(r,65535&e.adler)),_z(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?$G:1)},jH.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==uz&&69!==t&&73!==t&&91!==t&&t!==hz&&t!==dz&&t!==pz?vz(e,KG):(e.state=null,t===dz?vz(e,-3):$G):KG},jH.deflateSetDictionary=function(e,t){var n,r,i,o,a,s,l,c,u=t.length;if(!e||!e.state)return KG;if(2===(o=(n=e.state).wrap)||1===o&&n.status!==uz||n.lookahead)return KG;for(1===o&&(e.adler=VG(e.adler,t,u,0)),n.wrap=0,u>=n.w_size&&(0===o&&(Tz(n.head),n.strstart=0,n.block_start=0,n.insert=0),c=new GG.Buf8(n.w_size),GG.arraySet(c,t,u-n.w_size,n.w_size,0),t=c,u=n.w_size),a=e.avail_in,s=e.next_in,l=e.input,e.avail_in=u,e.next_in=0,e.input=t,kz(n);n.lookahead>=sz;){r=n.strstart,i=n.lookahead-(sz-1);do{n.ins_h=(n.ins_h<=252?6:Uz>=248?5:Uz>=240?4:Uz>=224?3:Uz>=192?2:1;function jz(e,t){if(t<65534&&(e.subarray&&Bz||!e.subarray&&Lz))return String.fromCharCode.apply(null,Mz.shrinkBuf(e,t));for(var n="",r=0;r>>6,t[o++]=128|63&n):n<65536?(t[o++]=224|n>>>12,t[o++]=128|n>>>6&63,t[o++]=128|63&n):(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63,t[o++]=128|n>>>6&63,t[o++]=128|63&n);return t},Rz.buf2binstring=function(e){return jz(e,e.length)},Rz.binstring2buf=function(e){for(var t=new Mz.Buf8(e.length),n=0,r=t.length;n4)s[r++]=65533,n+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&n1?s[r++]=65533:i<65536?s[r++]=i:(i-=65536,s[r++]=55296|i>>10&1023,s[r++]=56320|1023&i)}return jz(s,r)},Rz.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0||0===n?t:n+Fz[e[n]]>t?n:t};var Hz=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Gz=jH,zz=FH,Vz=Rz,Wz=HG,Xz=Hz,Yz=Object.prototype.toString,qz=0,$z=-1,Kz=0,Qz=8;function Zz(e){if(!(this instanceof Zz))return new Zz(e);this.options=zz.assign({level:$z,method:Qz,chunkSize:16384,windowBits:15,memLevel:8,strategy:Kz,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xz,this.strm.avail_out=0;var n=Gz.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==qz)throw new Error(Wz[n]);if(t.header&&Gz.deflateSetHeader(this.strm,t.header),t.dictionary){var r;if(r="string"==typeof t.dictionary?Vz.string2buf(t.dictionary):"[object ArrayBuffer]"===Yz.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=Gz.deflateSetDictionary(this.strm,r))!==qz)throw new Error(Wz[n]);this._dict_set=!0}}function Jz(e,t){var n=new Zz(t);if(n.push(e,!0),n.err)throw n.msg||Wz[n.err];return n.result}Zz.prototype.push=function(e,t){var n,r,i=this.strm,o=this.options.chunkSize;if(this.ended)return!1;r=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=Vz.string2buf(e):"[object ArrayBuffer]"===Yz.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new zz.Buf8(o),i.next_out=0,i.avail_out=o),1!==(n=Gz.deflate(i,r))&&n!==qz)return this.onEnd(n),this.ended=!0,!1;0!==i.avail_out&&(0!==i.avail_in||4!==r&&2!==r)||("string"===this.options.to?this.onData(Vz.buf2binstring(zz.shrinkBuf(i.output,i.next_out))):this.onData(zz.shrinkBuf(i.output,i.next_out)))}while((i.avail_in>0||0===i.avail_out)&&1!==n);return 4===r?(n=Gz.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===qz):2!==r||(this.onEnd(qz),i.avail_out=0,!0)},Zz.prototype.onData=function(e){this.chunks.push(e)},Zz.prototype.onEnd=function(e){e===qz&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=zz.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},UH.Deflate=Zz,UH.deflate=Jz,UH.deflateRaw=function(e,t){return(t=t||{}).raw=!0,Jz(e,t)},UH.gzip=function(e,t){return(t=t||{}).gzip=!0,Jz(e,t)};var eV={},tV={},nV=FH,rV=15,iV=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],oV=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],aV=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],sV=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],lV=FH,cV=BG,uV=jG,hV=function(e,t){var n,r,i,o,a,s,l,c,u,h,d,p,f,m,g,b,v,y,T,_,E,x,w,S,k;n=e.state,r=e.next_in,S=e.input,i=r+(e.avail_in-5),o=e.next_out,k=e.output,a=o-(t-e.avail_out),s=o+(e.avail_out-257),l=n.dmax,c=n.wsize,u=n.whave,h=n.wnext,d=n.window,p=n.hold,f=n.bits,m=n.lencode,g=n.distcode,b=(1<>>=T=y>>>24,f-=T,0==(T=y>>>16&255))k[o++]=65535&y;else{if(!(16&T)){if(0==(64&T)){y=m[(65535&y)+(p&(1<>>=T,f-=T),f<15&&(p+=S[r++]<>>=T=y>>>24,f-=T,!(16&(T=y>>>16&255))){if(0==(64&T)){y=g[(65535&y)+(p&(1<l){e.msg="invalid distance too far back",n.mode=30;break e}if(p>>>=T,f-=T,E>(T=o-a)){if((T=E-T)>u&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,w=d,0===h){if(x+=c-T,T<_){_-=T;do{k[o++]=d[x++]}while(--T);x=o-E,w=k}}else if(h2;)k[o++]=w[x++],k[o++]=w[x++],k[o++]=w[x++],_-=3;_&&(k[o++]=w[x++],_>1&&(k[o++]=w[x++]))}else{x=o-E;do{k[o++]=k[x++],k[o++]=k[x++],k[o++]=k[x++],_-=3}while(_>2);_&&(k[o++]=k[x++],_>1&&(k[o++]=k[x++]))}break}}break}}while(r>3,p&=(1<<(f-=_<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r=1&&0===O[_];_--);if(E>_&&(E=_),0===_)return i[o++]=20971520,i[o++]=20971520,s.bits=1,0;for(T=1;T<_&&0===O[T];T++);for(E0&&(0===e||1!==_))return-1;for(D[1]=0,v=1;v852||2===e&&k>592)return 1;for(;;){f=v-w,a[y]p?(m=P[N+a[y]],g=C[I+a[y]]):(m=96,g=0),l=1<>w)+(c-=l)]=f<<24|m<<16|g|0}while(0!==c);for(l=1<>=1;if(0!==l?(A&=l-1,A+=l):A=0,y++,0==--O[v]){if(v===_)break;v=t[n+a[y]]}if(v>E&&(A&h)!==u){for(0===w&&(w=E),d+=T,S=1<<(x=v-w);x+w<_&&!((S-=O[x+w])<=0);)x++,S<<=1;if(k+=1<852||2===e&&k>592)return 1;i[u=A&h]=E<<24|x<<16|d-o|0}}return 0!==A&&(i[d+A]=v-w<<24|64<<16|0),s.bits=E,0},pV=1,fV=2,mV=0,gV=-2,bV=1,vV=12,yV=30,TV=852,_V=592;function EV(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function xV(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new lV.Buf16(320),this.work=new lV.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function wV(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=bV,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new lV.Buf32(TV),t.distcode=t.distdyn=new lV.Buf32(_V),t.sane=1,t.back=-1,mV):gV}function SV(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,wV(e)):gV}function kV(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?gV:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,SV(e))):gV}function AV(e,t){var n,r;return e?(r=new xV,e.state=r,r.window=null,(n=kV(e,t))!==mV&&(e.state=null),n):gV}var CV,IV,OV=!0;function DV(e){if(OV){var t;for(CV=new lV.Buf32(512),IV=new lV.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(dV(pV,e.lens,0,288,CV,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;dV(fV,e.lens,0,32,IV,0,e.work,{bits:5}),OV=!1}e.lencode=CV,e.lenbits=9,e.distcode=IV,e.distbits=5}function PV(e,t,n,r){var i,o=e.state;return null===o.window&&(o.wsize=1<=o.wsize?(lV.arraySet(o.window,t,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((i=o.wsize-o.wnext)>r&&(i=r),lV.arraySet(o.window,t,n-r,i,o.wnext),(r-=i)?(lV.arraySet(o.window,t,n-r,r,0),o.wnext=r,o.whave=o.wsize):(o.wnext+=i,o.wnext===o.wsize&&(o.wnext=0),o.whave>>8&255,n.check=uV(n.check,A,2,0),c=0,u=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=yV;break}if(8!=(15&c)){e.msg="unknown compression method",n.mode=yV;break}if(u-=4,E=8+(15&(c>>>=4)),0===n.wbits)n.wbits=E;else if(E>n.wbits){e.msg="invalid window size",n.mode=yV;break}n.dmax=1<>8&1),512&n.flags&&(A[0]=255&c,A[1]=c>>>8&255,n.check=uV(n.check,A,2,0)),c=0,u=0,n.mode=3;case 3:for(;u<32;){if(0===s)break e;s--,c+=r[o++]<>>8&255,A[2]=c>>>16&255,A[3]=c>>>24&255,n.check=uV(n.check,A,4,0)),c=0,u=0,n.mode=4;case 4:for(;u<16;){if(0===s)break e;s--,c+=r[o++]<>8),512&n.flags&&(A[0]=255&c,A[1]=c>>>8&255,n.check=uV(n.check,A,2,0)),c=0,u=0,n.mode=5;case 5:if(1024&n.flags){for(;u<16;){if(0===s)break e;s--,c+=r[o++]<>>8&255,n.check=uV(n.check,A,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((p=n.length)>s&&(p=s),p&&(n.head&&(E=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),lV.arraySet(n.head.extra,r,o,p,E)),512&n.flags&&(n.check=uV(n.check,r,p,o)),s-=p,o+=p,n.length-=p),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===s)break e;p=0;do{E=r[o+p++],n.head&&E&&n.length<65536&&(n.head.name+=String.fromCharCode(E))}while(E&&p>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=vV;break;case 10:for(;u<32;){if(0===s)break e;s--,c+=r[o++]<>>=7&u,u-=7&u,n.mode=27;break}for(;u<3;){if(0===s)break e;s--,c+=r[o++]<>>=1)){case 0:n.mode=14;break;case 1:if(DV(n),n.mode=20,6===t){c>>>=2,u-=2;break e}break;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=yV}c>>>=2,u-=2;break;case 14:for(c>>>=7&u,u-=7&u;u<32;){if(0===s)break e;s--,c+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=yV;break}if(n.length=65535&c,c=0,u=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(p=n.length){if(p>s&&(p=s),p>l&&(p=l),0===p)break e;lV.arraySet(i,r,o,p,a),s-=p,o+=p,l-=p,a+=p,n.length-=p;break}n.mode=vV;break;case 17:for(;u<14;){if(0===s)break e;s--,c+=r[o++]<>>=5,u-=5,n.ndist=1+(31&c),c>>>=5,u-=5,n.ncode=4+(15&c),c>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=yV;break}n.have=0,n.mode=18;case 18:for(;n.have>>=3,u-=3}for(;n.have<19;)n.lens[C[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,w={bits:n.lenbits},x=dV(0,n.lens,0,19,n.lencode,0,n.work,w),n.lenbits=w.bits,x){e.msg="invalid code lengths set",n.mode=yV;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,v=65535&k,!((g=k>>>24)<=u);){if(0===s)break e;s--,c+=r[o++]<>>=g,u-=g,n.lens[n.have++]=v;else{if(16===v){for(S=g+2;u>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=yV;break}E=n.lens[n.have-1],p=3+(3&c),c>>>=2,u-=2}else if(17===v){for(S=g+3;u>>=g)),c>>>=3,u-=3}else{for(S=g+7;u>>=g)),c>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=yV;break}for(;p--;)n.lens[n.have++]=E}}if(n.mode===yV)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=yV;break}if(n.lenbits=9,w={bits:n.lenbits},x=dV(pV,n.lens,0,n.nlen,n.lencode,0,n.work,w),n.lenbits=w.bits,x){e.msg="invalid literal/lengths set",n.mode=yV;break}if(n.distbits=6,n.distcode=n.distdyn,w={bits:n.distbits},x=dV(fV,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,w),n.distbits=w.bits,x){e.msg="invalid distances set",n.mode=yV;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(s>=6&&l>=258){e.next_out=a,e.avail_out=l,e.next_in=o,e.avail_in=s,n.hold=c,n.bits=u,hV(e,d),a=e.next_out,i=e.output,l=e.avail_out,o=e.next_in,r=e.input,s=e.avail_in,c=n.hold,u=n.bits,n.mode===vV&&(n.back=-1);break}for(n.back=0;b=(k=n.lencode[c&(1<>>16&255,v=65535&k,!((g=k>>>24)<=u);){if(0===s)break e;s--,c+=r[o++]<>y)])>>>16&255,v=65535&k,!(y+(g=k>>>24)<=u);){if(0===s)break e;s--,c+=r[o++]<>>=y,u-=y,n.back+=y}if(c>>>=g,u-=g,n.back+=g,n.length=v,0===b){n.mode=26;break}if(32&b){n.back=-1,n.mode=vV;break}if(64&b){e.msg="invalid literal/length code",n.mode=yV;break}n.extra=15&b,n.mode=22;case 22:if(n.extra){for(S=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;b=(k=n.distcode[c&(1<>>16&255,v=65535&k,!((g=k>>>24)<=u);){if(0===s)break e;s--,c+=r[o++]<>y)])>>>16&255,v=65535&k,!(y+(g=k>>>24)<=u);){if(0===s)break e;s--,c+=r[o++]<>>=y,u-=y,n.back+=y}if(c>>>=g,u-=g,n.back+=g,64&b){e.msg="invalid distance code",n.mode=yV;break}n.offset=v,n.extra=15&b,n.mode=24;case 24:if(n.extra){for(S=n.extra;u>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=yV;break}n.mode=25;case 25:if(0===l)break e;if(p=d-l,n.offset>p){if((p=n.offset-p)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=yV;break}p>n.wnext?(p-=n.wnext,f=n.wsize-p):f=n.wnext-p,p>n.length&&(p=n.length),m=n.window}else m=i,f=a-n.offset,p=n.length;p>l&&(p=l),l-=p,n.length-=p;do{i[a++]=m[f++]}while(--p);0===n.length&&(n.mode=21);break;case 26:if(0===l)break e;i[a++]=n.length,l--,n.mode=21;break;case 27:if(n.wrap){for(;u<32;){if(0===s)break e;s--,c|=r[o++]<=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new UV,this.strm.avail_out=0;var n=RV.inflateInit2(this.strm,t.windowBits);if(n!==BV.Z_OK)throw new Error(FV[n]);if(this.header=new jV,RV.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=LV.string2buf(t.dictionary):"[object ArrayBuffer]"===HV.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=RV.inflateSetDictionary(this.strm,t.dictionary))!==BV.Z_OK))throw new Error(FV[n])}function zV(e,t){var n=new GV(t);if(n.push(e,!0),n.err)throw n.msg||FV[n.err];return n.result}GV.prototype.push=function(e,t){var n,r,i,o,a,s=this.strm,l=this.options.chunkSize,c=this.options.dictionary,u=!1;if(this.ended)return!1;r=t===~~t?t:!0===t?BV.Z_FINISH:BV.Z_NO_FLUSH,"string"==typeof e?s.input=LV.binstring2buf(e):"[object ArrayBuffer]"===HV.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new MV.Buf8(l),s.next_out=0,s.avail_out=l),(n=RV.inflate(s,BV.Z_NO_FLUSH))===BV.Z_NEED_DICT&&c&&(n=RV.inflateSetDictionary(this.strm,c)),n===BV.Z_BUF_ERROR&&!0===u&&(n=BV.Z_OK,u=!1),n!==BV.Z_STREAM_END&&n!==BV.Z_OK)return this.onEnd(n),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&n!==BV.Z_STREAM_END&&(0!==s.avail_in||r!==BV.Z_FINISH&&r!==BV.Z_SYNC_FLUSH)||("string"===this.options.to?(i=LV.utf8border(s.output,s.next_out),o=s.next_out-i,a=LV.buf2string(s.output,i),s.next_out=o,s.avail_out=l-o,o&&MV.arraySet(s.output,s.output,i,o,0),this.onData(a)):this.onData(MV.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(u=!0)}while((s.avail_in>0||0===s.avail_out)&&n!==BV.Z_STREAM_END);return n===BV.Z_STREAM_END&&(r=BV.Z_FINISH),r===BV.Z_FINISH?(n=RV.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===BV.Z_OK):r!==BV.Z_SYNC_FLUSH||(this.onEnd(BV.Z_OK),s.avail_out=0,!0)},GV.prototype.onData=function(e){this.chunks.push(e)},GV.prototype.onEnd=function(e){e===BV.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=MV.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},eV.Inflate=GV,eV.inflate=zV,eV.inflateRaw=function(e,t){return(t=t||{}).raw=!0,zV(e,t)},eV.ungzip=zV;var VV={};(0,FH.assign)(VV,UH,eV,NV);var WV=VV;const XV=["JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"];function YV(e){let t=/^\s*/.exec(e);return null!==t?t[0].length:0}var qV=function(e){if("string"!=typeof e)throw new TypeError("input must be a string");let t,n,r,i,o,a,s,l=[],c="LOCUS",u="DEFINITION",h="ACCESSION",d="VERSION",p="KEYWORDS",f="SOURCE",m="ORGANISM",g="REFERENCE",b="FEATURES",v="ORIGIN",y="//",T=e.split(/\r?\n/),_=!1;for(let e of T){if(null===e)break;let n=O(e),o=P(e),a=R(e),s=N(e);if(n===y||s?(r=n,i=null):a&&(i=n),""!==e.trim()&&";"!==n){if(!_&&r!==c)break;switch(r){case c:_=!0,S(e);break;case b:C(e,n,o);break;case v:w(e,n);break;case u:case h:case d:case p:D(r,e,r.toLowerCase());break;case f:i===m?D(i,e,"organism"):D(n,e,"source");break;case g:if(n===g){const e=t.references||[];t.references=e,e.push({})}A(e,i);break;case y:E()}}}return l[l.length-1]!==t&&E(),l;function E(){(function(){if(t&&t.features)for(let e=0;e{const t=qV(e),n=function(e){for(let t=e.length-1;t>0;t--){const n=Math.floor(Math.random()*(t+1)),r=e[t];e[t]=e[n],e[n]=r}return e}(t[0].features.filter((e=>"source"!==e.type)).sort(((e,t)=>e.start-t.start)));return[t,n]};let QV=function(){function e(t){if(d(this,e),this.dataConfig=t,this.trackUid=Ns.nice(),t.url){const e=".gz"===t.url.slice(t.url.length-3);this.errorTxt="",this.dataPromise=fetch(t.url,{mode:"cors",redirect:"follow",method:"GET"}).then((t=>e?t.arrayBuffer():t.text())).then((t=>{const n=e?WV.inflate(t,{to:"string"}):t;[this.gbJson,this.cdss]=KV(n)}))}else t.text&&(this.dataPromise=new Promise(((e,n)=>{[this.gbJson,this.cdss]=KV(t.text),e()})))}return f(e,[{key:"tilesetInfo",value:function(e){return this.tilesetInfoLoading=!0,this.dataPromise.then((()=>{this.tilesetInfoLoading=!1;let t={};return t={tile_size:1024,max_zoom:Math.ceil(Math.log(this.gbJson[0].size/1024)/Math.log(2)),max_width:this.gbJson[0].size,min_pos:[0],max_pos:[this.gbJson[0].size]},e&&e(t),t})).catch((t=>{this.tilesetInfoLoading=!1,e&&e({error:`Error parsing genbank: ${t}`})}))}},{key:"fetchTilesDebounced",value:function(e,t){const n={},r=[],i=[];for(const e of t){const t=e.split("."),n=parseInt(t[0],10),o=parseInt(t[1],10);Number.isNaN(o)||Number.isNaN(n)?console.warn("Invalid tile zoom or position:",n,o):(r.push(e),i.push(this.tile(n,o)))}return Promise.all(i).then((t=>{for(let e=0;e{const r=+n.max_width/2**+e,i=n.min_pos[0]+t*r,o=n.min_pos[0]+(t+1)*r,a=this.cdss.filter((e=>e.end>i&&e.start1===e.strand)),s),c=$V(a.filter((e=>1!==e.strand)),s);l.forEach((e=>{e.strand="+"})),c.forEach((e=>{e.strand="-"}));let u=[];for(let e=0;e=20);e++)this.cdss[e].end>=i&&this.cdss[e].start<=o&&u.push(this.cdss[e]);return u=[...u,...l,...c],u.map((e=>function(e){const t=e.end-e.start,n=1===e.strand?"+":"-",r=Ns.nice();return"filler"===e.type?{xStart:e.start,xEnd:e.end,strand:e.strand,fields:[],type:"filler",uid:r}:{xStart:e.start,xEnd:e.end,strand:n,chrOffset:0,importance:e.end-e.start,uid:r,type:e.type,fields:["chrom",e.start,e.end,e.name,t,n,"","",e.type,e.name,e.start.toString(),e.end.toString(),e.start.toString(),e.end.toString()]}}(e)))}))}}]),e}(),ZV=function(){function e(t){d(this,e),this.dataConfig=t,this.tilesetInfoData=Object.values(this.dataConfig.tilesetInfo)[0]}return f(e,[{key:"tilesetInfo",value:function(e){this.tilesetInfoLoading=!1,e(this.tilesetInfoData)}},{key:"fetchTilesDebounced",value:function(e,t){this.tilesData={};for(const e of Object.keys(this.dataConfig.tiles)){const t=`localtile.${e.split(".").slice(1).join(".")}`;this.tilesData[t]=this.dataConfig.tiles[e]}const n={},r=t.map((e=>`localtile.${e}`));ag(this.tilesData,"",r);for(const e of t)n[e]=this.tilesData[`localtile.${e}`];e(n)}},{key:"tile",value:function(e,t){}}]),e}();const JV=new(function(){function e(){d(this,e),this.taskList=[],this.taskHandle=null,this.requestIdleCallbackTimeout=300}return f(e,[{key:"enqueueTask",value:function(e,t,n=null){null===n?this.taskList.push({handler:e,data:t}):(this.taskList=this.taskList.filter((e=>e.trackId!==n)),this.taskList.push({handler:e,data:t,trackId:n})),this.taskHandle||(this.taskHandle=requestIdleCallback(this.runTaskQueue.bind(this),{timeout:this.requestIdleCallbackTimeout}))}},{key:"runTaskQueue",value:function(e){for(;(e.timeRemaining()>0||e.didTimeout)&&this.taskList.length;){const e=this.taskList.shift();null===e.data?e.handler():e.handler(e.data)}this.taskList.length?this.taskHandle=requestIdleCallback(this.runTaskQueue.bind(this),{timeout:this.requestIdleCallbackTimeout}):this.taskHandle=0}}]),e}());let eW=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{pubSub:o,dataConfig:s,handleTilesetInfoReceived:l,animate:c,onValueScaleChanged:u}=e;return i.renderVersion=1,i.visibleTiles=new Set,i.visibleTileIds=new Set,i.renderingTiles=new Set,i.fetching=new Set,i.scale={},i.fetchedTiles={},i.tileGraphics={},i.maxZoom=0,i.medianVisibleValue=null,i.backgroundTaskScheduler=JV,i.continuousScaling="requestIdleCallback"in window,i.valueScaleMin=null,i.fixedValueScaleMin=null,i.valueScaleMax=null,i.fixedValueScaleMax=null,i.listeners={},i.pubSub=o,i.animate=c,i.onValueScaleChanged=u,i.prevValueScale=null,e.dataFetcher?i.dataFetcher=e.dataFetcher:i.dataFetcher=new BH(s,i.pubSub),i.tilesetInfo=null,i.uuid=Ns.nice(),i.trackNotFoundText=new Rf.PIXI.Text("",{fontSize:"12px",fontFamily:"Arial",fill:"black"}),i.pLabel.addChild(i.trackNotFoundText),i.refreshTilesDebounced=ab(i.refreshTiles.bind(a(i)),10,10),i.dataFetcher.tilesetInfo(((e,t)=>{if(e){if(i.tilesetInfo=e,i.dataFetcher.dataConfig.tilesetUid||(i.dataFetcher.dataConfig.tilesetUid=t),i.tilesetUid=i.dataFetcher.dataConfig.tilesetUid,i.server=i.dataFetcher.dataConfig.server||"unknown",i.tilesetInfo&&i.tilesetInfo.chromsizes&&(i.chromInfo=Qg(i.tilesetInfo.chromsizes)),"error"in i.tilesetInfo)return console.warn("Error retrieving tilesetInfo:",s,i.tilesetInfo.error),i.tilesetInfo=null,void i.setError(i.tilesetInfo.error);i.tilesetInfo.resolutions?i.maxZoom=i.tilesetInfo.resolutions.length:i.maxZoom=+i.tilesetInfo.max_zoom,i.options&&i.options.maxZoom&&(i.options.maxZoom>=0?i.maxZoom=Math.min(i.options.maxZoom,i.maxZoom):console.error("Invalid maxZoom on track:",a(i))),i.refreshTiles(),l&&l(e),i.options||(i.options={}),i.options.name=i.options.name||e.name,i.checkValueScaleLimits(),i.draw(),i.drawLabel(),i.animate()}})),i}return f(n,[{key:"setError",value:function(e){this.errorTextText=e,this.draw(),this.animate()}},{key:"setFixedValueScaleMin",value:function(e){Number.isNaN(+e)?this.fixedValueScaleMin=null:this.fixedValueScaleMin=+e}},{key:"setFixedValueScaleMax",value:function(e){Number.isNaN(+e)?this.fixedValueScaleMax=null:this.fixedValueScaleMax=+e}},{key:"checkValueScaleLimits",value:function(){this.valueScaleMin=void 0!==this.options.valueScaleMin?+this.options.valueScaleMin:null,null!==this.fixedValueScaleMin&&(this.valueScaleMin=this.fixedValueScaleMin),this.valueScaleMax=void 0!==this.options.valueScaleMax?+this.options.valueScaleMax:null,null!==this.fixedValueScaleMax&&(this.valueScaleMax=this.fixedValueScaleMax)}},{key:"on",value:function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)}},{key:"off",value:function(e,t){const n=this.listeners[e].indexOf(t);-1===n||n>=this.listeners[e].length||this.listeners[e].splice(n,1)}},{key:"rerender",value:function(e){r(h(n.prototype),"rerender",this).call(this,e),this.renderVersion+=1,this.tilesetInfo&&(this.checkValueScaleLimits(),this.tilesetInfo.resolutions?this.maxZoom=this.tilesetInfo.resolutions.length:this.maxZoom=+this.tilesetInfo.max_zoom,this.options&&this.options.maxZoom&&(this.options.maxZoom>=0?this.maxZoom=Math.min(this.options.maxZoom,this.maxZoom):console.error("Invalid maxZoom on track:",this)))}},{key:"visibleAndFetchedIds",value:function(){return Object.keys(this.fetchedTiles).filter((e=>this.visibleTileIds.has(e)))}},{key:"visibleAndFetchedTiles",value:function(){return this.visibleAndFetchedIds().map((e=>this.fetchedTiles[e]))}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e),mirrored:e.mirrored}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.tileId)))}},{key:"removeOldTiles",value:function(){this.calculateVisibleTiles();const e=[...new Set(Object.keys(this.fetchedTiles))].filter((e=>!this.visibleTileIds.has(e)));this.removeTiles(e)}},{key:"refreshTiles",value:function(){if(!this.tilesetInfo)return;this.calculateVisibleTiles();const e=new Set(Object.keys(this.fetchedTiles)),t=[...this.visibleTiles].filter((t=>!this.fetching.has(t.remoteId)&&!e.has(t.tileId)));for(let e=0;e0;)if(n-=1,r=r.map((e=>Math.floor(e/2))),`${t}.${n}.${r.join(".")}`in this.fetchedTiles)return!0;return!1}},{key:"parentTileId",value:function(e){const t=e.tileData.zoomLevel-1,n=e.tileData.tilePos.map((e=>Math.floor(e/2)));return`${e.tileData.tilesetUid}.${t}.${n.join(".")}`}},{key:"removeTiles",value:function(e){e.length&&this.areAllVisibleTilesLoaded()&&!this.renderingTiles.size&&(e.forEach((e=>{const t=e;this.destroyTile(this.fetchedTiles[t]),t in this.tileGraphics&&(this.pMain.removeChild(this.tileGraphics[t]),delete this.tileGraphics[t]),delete this.fetchedTiles[t]})),this.synchronizeTilesAndGraphics(),this.draw())}},{key:"zoomed",value:function(e,t,n=1,r=0,i=0){this.xScale(e),this.yScale(t),this.refreshTilesDebounced(),this.pMobile.position.x=r,this.pMobile.position.y=this.position[1],this.pMobile.scale.x=n,this.pMobile.scale.y=1}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e)}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e)}},{key:"areAllVisibleTilesLoaded",value:function(){const e=new Set(Object.keys(this.fetchedTiles)),t=[...this.visibleTileIds];for(let n=0;ne.tileData)))}},{key:"loadTileData",value:function(e,t){let n=this.lruCache.get(e.tileId);return n||(n=t(e.data,e.type),this.lruCache.put(e.tileId,n)),n}},{key:"fetchNewTiles",value:function(e){if(e.length>0){const t=[...new Set(e.map((e=>e.remoteId)))];this.dataFetcher.fetchTilesDebounced(this.receivedTiles.bind(this),t)}}},{key:"receivedTiles",value:function(e){for(let t=0;tNumber.isNaN(+e))).forEach((e=>{this.fetchedTiles[n].tileData[e]=r[e]}))}else this.fetchedTiles[n].tileData={...e[this.visibleTiles[t].remoteId]};this.fetchedTiles[n].tileData.error&&console.warn("Error in loaded tile",n,this.fetchedTiles[n].tileData)}}for(const t in e)if(e[t]){const n=e[t].tilePositionId;this.fetching.has(n)&&this.fetching.delete(n)}this.synchronizeTilesAndGraphics(),this.draw(),this.drawLabel(),this.valueScale&&(this.prevValueScale&&JSON.stringify(this.valueScale.domain())===JSON.stringify(this.prevValueScale.domain())||(this.prevValueScale=this.valueScale.copy(),this.onValueScaleChanged&&this.onValueScaleChanged())),this.animate(),this.areAllVisibleTilesLoaded()&&this.pubSub&&this.pubSub.publish("TiledPixiTrack.tilesLoaded",{uuid:this.uuid})}},{key:"draw",value:function(){if(this.delayDrawing)return;this.tilesetInfo?this.trackNotFoundText.visible=!1:(this.dataFetcher.tilesetInfoLoading?this.trackNotFoundText.text="Loading...":this.trackNotFoundText.text=`Tileset info not found. Server: [${this.server}] tilesetUid: [${this.tilesetUid}]`,[this.trackNotFoundText.x,this.trackNotFoundText.y]=this.position,this.flipText&&(this.trackNotFoundText.anchor.x=1,this.trackNotFoundText.scale.x=-1),this.trackNotFoundText.visible=!0),this.pubSub&&this.pubSub.publish("TiledPixiTrack.tilesDrawnStart",{uuid:this.uuid});const e=Object.values(this.fetchedTiles).map((e=>e.tileData&&e.tileData.error&&`${e.tileId}: ${e.tileData.error}`)).filter((e=>e));e.length?this.errorTextText=e.join("\n"):this.errorTextText="",r(h(n.prototype),"draw",this).call(this),Object.keys(this.fetchedTiles).forEach((e=>{this.drawTile(this.fetchedTiles[e])})),this.pubSub&&this.pubSub.publish("TiledPixiTrack.tilesDrawnEnd",{uuid:this.uuid})}},{key:"drawTile",value:function(){}},{key:"calculateMedianVisibleValue",value:function(){this.areAllVisibleTilesLoaded()&&this.allTilesLoaded();let e=this.visibleAndFetchedIds();0===e.length&&(e=Object.keys(this.fetchedTiles));const t=[].concat(...e.filter((e=>this.fetchedTiles[e].tileData.dense)).map((e=>Array.from(this.fetchedTiles[e].tileData.dense)))).filter((e=>e>0));return this.medianVisibleValue=Ft(t),this.medianVisibleValue}},{key:"allVisibleValues",value:function(){return[].concat(...this.visibleAndFetchedIds().map((e=>Array.from(this.fetchedTiles[e].tileData.dense))))}},{key:"minVisibleValue",value:function(e=!1){return this.minVisibleValueInTiles(e)}},{key:"minVisibleValueInTiles",value:function(e=!1){let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));let n=Math.min(...t.map((e=>this.fetchedTiles[e].tileData.minNonZero)));return n===Number.MAX_SAFE_INTEGER&&(n=null),e?n:null!==this.valueScaleMin?this.valueScaleMin:n}},{key:"maxVisibleValue",value:function(e=!1){return this.maxVisibleValueInTiles(e)}},{key:"maxVisibleValueInTiles",value:function(e=!1){let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));let n=Math.max(...t.map((e=>this.fetchedTiles[e].tileData.maxNonZero)));return n===Number.MIN_SAFE_INTEGER&&(n=null),e?n:null!==this.valueScaleMax?this.valueScaleMax:n}},{key:"makeValueScale",value:function(e,t,n,r){let i=null,o=0,a=r;null==a&&(a=6);let s=Math.min(this.dimensions[1]-a,a),l=Math.max(this.dimensions[1]-a,a);if(this.dimensions[1]-awt(e,t,n),[n,0]}if("setquantile"===this.options.valueScaling){const e=this.dimensions[1]-a,t=a,n=new Set(this.allVisibleValues()),r=Ni().domain([...n]).range(Gt(e,t,(t-e)/256));return r.ticks=n=>wt(e,t,n),[r,0]}i=fi().domain([e,n]).range([l,s])}return[i,o]}}]),n}(LH);const tW=10,nW=10,rW=nW;let iW=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n);const o={...e};o.onValueScaleChanged=()=>{e.onValueScaleChanged(),i.drawColorbar()},i=t.call(this,o,r);const{pubSub:s,animate:l,svgElement:c,onTrackOptionsChanged:u,onMouseMoveZoom:h,isShowGlobalMousePosition:p,isValueScaleLocked:f}=e;return i.pubSub=s,i.is2d=!0,i.animate=l,i.uid=Ns.nice(),i.scaleBrush=pp(),i.onTrackOptionsChanged=u,i.isShowGlobalMousePosition=p,i.isValueScaleLocked=f,i.pColorbarArea=new Rf.PIXI.Graphics,i.pMasked.addChild(i.pColorbarArea),i.pColorbar=new Rf.PIXI.Graphics,i.pColorbarArea.addChild(i.pColorbar),i.axis=new Yj(a(i)),i.pColorbarArea.addChild(i.axis.pAxis),i.colorScale=nm,r&&r.colorRange&&(i.colorScale=wf(r.colorRange)),i.gBase=Be(c).append("g"),i.gMain=i.gBase.append("g"),i.gColorscaleBrush=i.gMain.append("g"),i.brushing=!1,i.prevOptions="",i.prevIndUpperLeftTile="",i.onMouseMoveZoom=h,i.setDataLensSize(11),i.dataLens=new Float32Array(i.dataLensSize**2),i.mouseMoveHandlerBound=i.mouseMoveHandler.bind(a(i)),i.onMouseMoveZoom&&i.pubSubs.push(i.pubSub.subscribe("app.mouseMove",i.mouseMoveHandlerBound)),i.options&&i.options.showMousePosition&&!i.hideMousePosition&&(i.hideMousePosition=rb(a(i),i.is2d,i.isShowGlobalMousePosition())),i.prevOptions=JSON.stringify(r),i}return f(n,[{key:"mouseMoveHandler",value:function(e){this.isWithin(e.x,e.y)&&(this.mouseX=e.x,this.mouseY=e.y,this.mouseMoveZoomHandler())}},{key:"mouseMoveZoomHandler",value:function(e=this.mouseX,t=this.mouseY){if(void 0===e||void 0===t||!this.areAllVisibleTilesLoaded())return;if(!this.tilesetInfo)return;const n=e-this.position[0],r=t-this.position[1];let i,o;try{o=this.getVisibleRectangleData(n-this.dataLensPadding,r-this.dataLensPadding,this.dataLensSize,this.dataLensSize),i=o.get(this.dataLensPadding,this.dataLensPadding)}catch(e){return}const a=this.dataLensSize;let s;try{s=ub(this.limitedValueScale,this.colorScale,this.valueScale.domain()[0])}catch(e){return}if(!s)return;const l=Math.round(this._xScale.invert(n)),c=Math.round(this._yScale.invert(r));let u=[l,c],h=[Math.round(this._xScale.invert(n-this.dataLensPadding)),Math.round(this._xScale.invert(n+this.dataLensPadding))],d=[Math.round(this._yScale.invert(r-this.dataLensPadding)),Math.round(this._yScale.invert(r+this.dataLensPadding))];this.chromInfo&&(u=u.map((e=>bf(e,this.chromInfo).slice(0,2))),h=h.map((e=>bf(e,this.chromInfo).slice(0,2))),d=d.map((e=>bf(e,this.chromInfo).slice(0,2)))),this.onMouseMoveZoom({trackId:this.id,data:i,absX:e,absY:t,relX:n,relY:r,dataX:l,dataY:c,orientation:"2d",dataLens:o,dim:a,toRgb:s,center:u,xRange:h,yRange:d,isGenomicCoords:!!this.chromInfo})}},{key:"scheduleRerender",value:function(){this.backgroundTaskScheduler.enqueueTask(this.handleRerender.bind(this),null,this.uuid)}},{key:"handleRerender",value:function(){this.rerender(this.options,!0)}},{key:"getAbsTileDim",value:function(e,t,n){const{tileX:r,tileY:i,tileWidth:o,tileHeight:a}=this.getTilePosAndDimensions(e,t),s={};return s.width=this._refXScale(r+o)-this._refXScale(r),s.height=this._refYScale(i+a)-this._refYScale(i),n?(s.x=this._refXScale(i),s.y=this._refYScale(r)):(s.x=this._refXScale(r),s.y=this._refYScale(i)),s}},{key:"updateValueScale",value:function(){let e=this.minValue(),t=this.maxValue();const n=1e-6;if(null!=e&&null!=t&&Math.abs(e-t)0?["log",xi().range([254,0]).domain([t+0,r+0])]:["linear",fi().range([254,0]).domain([t,r])]}(this.options&&this.options.heatmapValueScaling||"log",e,this.medianVisibleValue,t,"log");return this.valueScale=i,this.limitedValueScale=this.valueScale.copy(),this.options&&void 0!==this.options.scaleStartPercent&&void 0!==this.options.scaleEndPercent&&this.limitedValueScale.domain([this.valueScale.domain()[0]+(this.valueScale.domain()[1]-this.valueScale.domain()[0])*this.options.scaleStartPercent,this.valueScale.domain()[0]+(this.valueScale.domain()[1]-this.valueScale.domain()[0])*this.options.scaleEndPercent]),[r,i]}},{key:"rerender",value:function(e,t){r(h(n.prototype),"rerender",this).call(this,e,t),this.updateValueScale();const i=JSON.stringify(e);this.drawColorbar(),(t||i!==this.prevOptions)&&(this.prevOptions=i,this.options=e,r(h(n.prototype),"rerender",this).call(this,e,t),this.calculateVisibleTiles(),e&&e.colorRange&&(this.colorScale=wf(e.colorRange)),this.visibleAndFetchedTiles().forEach((e=>this.renderTile(e))),this.hideMousePosition&&(this.hideMousePosition(),this.hideMousePosition=void 0),this.options&&this.options.showMousePosition&&!this.hideMousePosition&&(this.hideMousePosition=rb(this,this.is2d,this.isShowGlobalMousePosition())))}},{key:"drawLabel",value:function(){this.options.labelPosition===this.options.colorbarPosition?this.labelXOffset=75:this.labelXOffset=0,r(h(n.prototype),"drawLabel",this).call(this)}},{key:"tileDataToCanvas",value:function(e){const t=document.createElement("canvas");t.width=this.binsPerTile(),t.height=this.binsPerTile();const n=t.getContext("2d");n.fillStyle="transparent",n.fillRect(0,0,t.width,t.height);const r=new ImageData(e,t.width,t.height);return n.putImageData(r,0,0),t}},{key:"exportData",value:function(){if(this.tilesetInfo){const e=this.getVisibleRectangleData(0,0,this.dimensions[0],this.dimensions[1]),t={bounds:[this._xScale.domain(),this._yScale.domain()],dimensions:e.shape,data:qg(e)};bm("data.json",JSON.stringify(t))}}},{key:"setSpriteProperties",value:function(e,t,n,r){const i=this.getAbsTileDim(t,n,r);e.width=i.width,e.height=i.height,e.x=i.x,e.y=i.y,r&&n[0]!==n[1]&&(e.rotation=-Math.PI/2,e.scale.x=-1*Math.abs(e.scale.x))}},{key:"refXScale",value:function(e){r(h(n.prototype),"refXScale",this).call(this,e),this.draw()}},{key:"refYScale",value:function(e){r(h(n.prototype),"refYScale",this).call(this,e),this.draw()}},{key:"draw",value:function(){r(h(n.prototype),"draw",this).call(this)}},{key:"newBrushOptions",value:function(e){const t=JSON.parse(JSON.stringify(this.options)),n=this.valueScale.copy().range([this.colorbarHeight,0]),r=n.invert(e[0]),i=(n.invert(e[1])-n.domain()[0])/(n.domain()[1]-n.domain()[0]),o=(r-n.domain()[0])/(n.domain()[1]-n.domain()[0]);return t.scaleStartPercent=i.toFixed(5),t.scaleEndPercent=o.toFixed(5),t}},{key:"brushStart",value:function(){this.brushing=!0}},{key:"brushMoved",value:function(e){if(!e.selection)return;const t=this.newBrushOptions(e.selection),n=JSON.stringify(t);this.gColorscaleBrush.selectAll(".handle--custom").attr("y",(t=>"n"===t.type?e.selection[0]:e.selection[1]-2)),n!==this.prevOptions&&(this.prevOptions=n,this.rerender(t,!0),this.onTrackOptionsChanged(t),this.isValueScaleLocked()&&this.onValueScaleChanged())}},{key:"brushEnd",value:function(){this.brushing=!1}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.drawColorbar()}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e),this.drawColorbar()}},{key:"removeColorbar",value:function(){this.pColorbarArea.visible=!1,this.scaleBrush.on(".brush")&&this.gColorscaleBrush.call(this.scaleBrush.move,null),this.gColorscaleBrush.on(".brush",null),this.gColorscaleBrush.selectAll("rect").remove()}},{key:"drawColorbar",value:function(){if(this.pColorbar.clear(),!this.options||!this.options.colorbarPosition||"hidden"===this.options.colorbarPosition)return void this.removeColorbar();if(this.pColorbarArea.visible=!0,!this.valueScale)return;if(Number.isNaN(+this.valueScale.domain()[0])||Number.isNaN(+this.valueScale.domain()[1]))return;const e=Math.min(this.dimensions[1]/2,200);if(this.colorbarHeight=e-20,this.colorbarHeight<0)return void this.removeColorbar();if(this.valueScale.domain()[1]===this.valueScale.domain()[0])return void this.removeColorbar();const t=this.valueScale.copy().range([this.colorbarHeight,0]);"topLeft"===this.options.colorbarPosition||"bottomLeft"===this.options.colorbarPosition?this.scaleBrush.extent([[4,0],[rW,this.colorbarHeight]]):this.scaleBrush.extent([[0,0],[6,this.colorbarHeight]]),"topLeft"===this.options.colorbarPosition&&([this.pColorbarArea.x,this.pColorbarArea.y]=this.position,this.pColorbar.y=nW,this.axis.pAxis.y=nW,this.axis.pAxis.x=25,this.pColorbar.x=15,this.gColorscaleBrush.attr("transform",`translate(${this.pColorbarArea.x+4},${this.pColorbarArea.y+this.pColorbar.y-1})`)),"topRight"===this.options.colorbarPosition&&(this.pColorbarArea.x=this.position[0]+this.dimensions[0]-75,this.pColorbarArea.y=this.position[1],this.pColorbar.y=nW,this.axis.pAxis.y=nW,this.axis.pAxis.x=50,this.pColorbar.x=50,this.gColorscaleBrush.attr("transform",`translate(${this.pColorbarArea.x+this.pColorbar.x+tW+2},${this.pColorbarArea.y+this.pColorbar.y-1})`)),"bottomRight"===this.options.colorbarPosition&&(this.pColorbarArea.x=this.position[0]+this.dimensions[0]-75,this.pColorbarArea.y=this.position[1]+this.dimensions[1]-e,this.pColorbar.y=nW,this.axis.pAxis.y=nW,this.axis.pAxis.x=50,this.pColorbar.x=50,this.gColorscaleBrush.attr("transform",`translate(${this.pColorbarArea.x+this.pColorbar.x+tW+1},${this.pColorbarArea.y+this.pColorbar.y-1})`)),"bottomLeft"===this.options.colorbarPosition&&(this.pColorbarArea.x=this.position[0],this.pColorbarArea.y=this.position[1]+this.dimensions[1]-e,this.pColorbar.y=nW,this.axis.pAxis.y=nW,this.axis.pAxis.x=25,this.pColorbar.x=15,this.gColorscaleBrush.attr("transform",`translate(${this.pColorbarArea.x+2},${this.pColorbarArea.y+this.pColorbar.y-1})`)),this.pColorbarArea.clear(),this.pColorbarArea.beginFill(lm(this.options.colorbarBackgroundColor||"white"),+this.options.colorbarBackgroundOpacity>=0?+this.options.colorbarBackgroundOpacity:.6),this.pColorbarArea.drawRect(0,0,75,e),this.options?(this.options.scaleStartPercent||(this.options.scaleStartPercent=0),this.options.scaleEndPercent||(this.options.scaleEndPercent=1)):this.options={scaleStartPercent:0,scaleEndPercent:1};const n=t.domain()[1]-t.domain()[0],r=t(this.options.scaleStartPercent*n+t.domain()[0]),i=t(this.options.scaleEndPercent*n+t.domain()[0]);this.brushing||(this.scaleBrush.on("start",this.brushStart.bind(this)).on("brush",this.brushMoved.bind(this)).on("end",this.brushEnd.bind(this)).handleSize(0),this.gColorscaleBrush.on(".brush",null),this.gColorscaleBrush.call(this.scaleBrush),this.northHandle=this.gColorscaleBrush.selectAll(".handle--custom").data([{type:"n"},{type:"s"}]).enter().append("rect").classed("handle--custom",!0).attr("cursor","ns-resize").attr("width",rW).attr("height",4).style("fill","#666").style("stroke","white"),this.flipText&&this.northHandle.attr("cursor","ew-resize"),this.gColorscaleBrush.call(this.scaleBrush.move,[i,r]));const o=fi().domain([0,255]).range([0,this.colorbarHeight]);for(let e=0;e{const t=e.mirrored?[e.tileData.tilePos[1],e.tileData.tilePos[0]]:e.tileData.tilePos,{tileX:n,tileY:r,tileWidth:i,tileHeight:a}=this.getTilePosAndDimensions(e.tileData.zoomLevel,t,this.binsPerTile()),s=Math.floor(n/o),l=Math.floor((n+i)/o),c=Math.floor(r/o),m=Math.floor((r+a)/o);let g=Math.max(u,s)-s,b=Math.max(h,c)-c;const v=Math.min(u+d,l)-s,y=Math.min(h+p,m)-c,T=Math.max(s-u,0),_=Math.max(c-h,0),E=v-g,x=y-b;if(!(E<0||x<0)){if(e.mirrored&&g>b){const e=g;g=b,b=e}Bg(f.hi(_+x,T+E).lo(_,T),e.dataArray.hi(b+x,g+E).lo(b,g))}})),f}},{key:"initTile",value:function(e){r(h(n.prototype),"initTile",this).call(this,e),e.tileData.dense.length===this.binsPerTile()**2&&(e.dataArray=Xg(Array.from(e.tileData.dense),[this.binsPerTile(),this.binsPerTile()]),this.continuousScaling&&e.tileData.tilePos[0]===e.tileData.tilePos[1]&&e.mirrored&&(e.tileData.denseDataExtrema.mirrorPrecomputedExtrema(),r(h(n.prototype),"initTile",this).call(this,e))),null!==this.scale.minValue&&null!==this.scale.maxValue&&this.renderTile(e)}},{key:"updateTile",value:function(e){e.scale&&this.scale&&this.scale.minValue===e.scale.minValue&&this.scale.maxValue===e.scale.maxValue||(this.renderTile(e),this.drawColorbar())}},{key:"destroyTile",value:function(e){e.sprite.destroy(!0),e.canvas=null,e.sprite=null,e.texture=null}},{key:"pixDataFunction",value:function(e,t){if(t){const{graphics:n}=e,r=this.tileDataToCanvas(t.pixData);e.sprite&&e.sprite.destroy(!0);const i="4"===Rf.PIXI.VERSION[0]?Rf.PIXI.Texture.fromCanvas(r,Rf.PIXI.SCALE_MODES.NEAREST):Rf.PIXI.Texture.from(r,{scaleMode:Rf.PIXI.SCALE_MODES.NEAREST}),o=new Rf.PIXI.Sprite(i);e.sprite=o,e.texture=i,e.canvas=r,this.setSpriteProperties(e.sprite,e.tileData.zoomLevel,e.tileData.tilePos,e.mirrored),n.removeChildren(),n.addChild(e.sprite)}this.renderingTiles.delete(e.tileId)}},{key:"renderTile",value:function(e){const[t]=this.updateValueScale();if(this.renderingTiles.add(e.tileId),this.tilesetInfo.tile_size&&e.tileData.dense.lengththis.pixDataFunction(e,t)),this.mirrorTiles()&&!e.mirrored&&e.tileData.tilePos[0]===e.tileData.tilePos[1],"upper-right"===this.options.extent&&e.tileData.tilePos[0]===e.tileData.tilePos[1],this.options.zeroValueColor?cm(this.options.zeroValueColor):void 0,{selectedRows:this.options.selectRows,selectedRowsAggregationMode:this.options.selectRowsAggregationMode,selectedRowsAggregationWithRelativeHeight:this.options.selectRowsAggregationWithRelativeHeight,selectedRowsAggregationMethod:this.options.selectRowsAggregationMethod})}},{key:"remove",value:function(){this.gMain.remove(),this.gMain=null,r(h(n.prototype),"remove",this).call(this)}},{key:"refScalesChanged",value:function(e,t){r(h(n.prototype),"refScalesChanged",this).call(this,e,t),Pg(this.fetchedTiles).filter((e=>e.sprite)).forEach((e=>this.setSpriteProperties(e.sprite,e.tileData.zoomLevel,e.tileData.tilePos,e.mirrored)))}},{key:"superSVG",value:function(){return r(h(n.prototype),"exportSVG",this).call(this)}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t);const i=document.createElement("g");e.appendChild(i),i.setAttribute("transform",`translate(${this.pMain.position.x},${this.pMain.position.y}) scale(${this.pMain.scale.x},${this.pMain.scale.y})`);for(const e of this.visibleAndFetchedTiles()){const t=180*e.sprite.rotation/Math.PI,n=document.createElement("g");n.setAttribute("transform",`translate(${e.sprite.x},${e.sprite.y}) rotate(${t}) scale(${e.sprite.scale.x},${e.sprite.scale.y})`);const r=document.createElement("image");r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.canvas.toDataURL()),r.setAttribute("width",e.canvas.width),r.setAttribute("height",e.canvas.height),r.setAttribute("style","image-rendering: pixelated"),n.appendChild(r),i.appendChild(n)}const o=this.exportColorBarSVG();return e.appendChild(o),[t,t]}},{key:"getVisiblePartOfUppLeftTile",value:function(){const e=this.visibleAndFetchedTiles().map((e=>{const t=e.mirrored?[e.tileData.tilePos[1],e.tileData.tilePos[0]]:e.tileData.tilePos;return[t[0],t[1],e.tileId]}));if(0===e.length)return null;let t=e[0];for(let n=0;ne.tileId===t[2]))[0],o=this.getIndicesOfVisibleDataInTile(i),a=o[0],s=o[1],l=a-a%r,c=s-s%r;return[i.tileId,l,c]}},{key:"getIndicesOfVisibleDataInTile",value:function(e){const t=this._xScale.range(),n=this._yScale.range(),r=e.mirrored?[e.tileData.tilePos[1],e.tileData.tilePos[0]]:e.tileData.tilePos,{tileX:i,tileY:o,tileWidth:a,tileHeight:s}=this.getTilePosAndDimensions(e.tileData.zoomLevel,r,this.binsPerTile()),l=fi().domain([0,this.binsPerTile()]).range([i,i+a]),c=Math.max(0,Math.round(l.invert(this._xScale.invert(t[0])))-1),u=Math.min(this.binsPerTile(),Math.round(l.invert(this._xScale.invert(t[1])))),h=fi().domain([0,this.binsPerTile()]).range([o,o+s]),d=Math.max(0,Math.round(h.invert(this._yScale.invert(n[0])))-1),p=Math.min(this.binsPerTile(),Math.round(h.invert(this._yScale.invert(n[1]))));return e.mirrored&&r[0]!==r[1]?[d,c,p,u]:[c,d,u,p]}},{key:"minVisibleValue",value:function(e=!1){const t=this.visibleAndFetchedTiles().map((e=>{if(void 0===e.tileData.denseDataExtrema)return null;const t=this.getIndicesOfVisibleDataInTile(e);return e.tileData.denseDataExtrema.getMinNonZeroInSubset(t)}));if(0===t.length&&null===this.valueScaleMax)return null;const i=Math.min.apply(null,t);return i===Number.MAX_SAFE_INTEGER?r(h(n.prototype),"minVisibleValue",this).call(this,e):e?i:null!==this.valueScaleMin?this.valueScaleMin:i}},{key:"maxVisibleValue",value:function(e=!1){const t=this.visibleAndFetchedTiles().map((e=>{if(void 0===e.tileData.denseDataExtrema)return null;const t=this.getIndicesOfVisibleDataInTile(e);return e.tileData.denseDataExtrema.getMaxNonZeroInSubset(t)}));if(0===t.length&&null===this.valueScaleMax)return null;const i=Math.max.apply(null,t);return i===Number.MIN_SAFE_INTEGER?r(h(n.prototype),"maxVisibleValue",this).call(this,e):e?i:null!==this.valueScaleMax?this.valueScaleMax:i}},{key:"zoomed",value:function(e,t,i,o,a){if(this.brushing)return;r(h(n.prototype),"zoomed",this).call(this,e,t),this.pMain.position.x=o,this.pMain.position.y=a,this.pMain.scale.x=i,this.pMain.scale.y=i;const s=this.isValueScaleLocked();if(this.continuousScaling&&void 0!==this.minValue()&&void 0!==this.maxValue()){const e=JSON.stringify(this.getVisiblePartOfUppLeftTile());if(null===this.valueScaleMin&&null===this.valueScaleMax&&!s&&e!==this.prevIndUpperLeftTile){const t=this.minVisibleValue(),n=this.maxVisibleValue(),r=1e-6;null!==t&&null!==n&&(Math.abs(this.minValue()-t)>r||Math.abs(this.maxValue()-n)>r)&&(this.minValue(t),this.maxValue(n),this.scheduleRerender()),this.prevIndUpperLeftTile=e}s&&this.onValueScaleChanged()}this.mouseMoveZoomHandler()}},{key:"addTileId",value:function(e,t,n,r,i,o=!1){const a=[t,n,r];a.mirrored=o,a.dataTransform=i,e.push(a)}},{key:"tilesToId",value:function(e,t,n){const r=e,i=t,o=this.options&&this.options.dataTransform||"default",a=[];for(let e=0;e=i[t]?"lower-left"!==this.options.extent&&this.addTileId(a,n,i[t],r[e],o,!0):"upper-right"!==this.options.extent&&this.addTileId(a,n,r[e],i[t],o),r[e]===i[t]&&"lower-left"===this.options.extent&&this.addTileId(a,n,r[e],i[t],o)):this.addTileId(a,n,r[e],i[t],o);return a}},{key:"calculateVisibleTiles",value:function(){if(this.tilesetInfo){if(this.zoomLevel=this.calculateZoomLevel(),this.tilesetInfo.resolutions){const e=this.tilesetInfo.resolutions.map((e=>+e)).sort(((e,t)=>t-e));this.xTiles=mg.calculateTilesFromResolution(e[this.zoomLevel],this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),this.yTiles=mg.calculateTilesFromResolution(e[this.zoomLevel],this._yScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0])}else this.xTiles=mg.calculateTiles(this.zoomLevel,this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width),this.yTiles=mg.calculateTiles(this.zoomLevel,this._yScale,this.options.reverseYAxis?-this.tilesetInfo.max_pos[1]:this.tilesetInfo.min_pos[1],this.options.reverseYAxis?-this.tilesetInfo.min_pos[1]:this.tilesetInfo.max_pos[1],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width1||this.tilesetInfo.max_width);this.setVisibleTiles(this.tilesToId(this.xTiles,this.yTiles,this.zoomLevel))}}},{key:"mirrorTiles",value:function(){return!(this.tilesetInfo.mirror_tiles&&(!1===this.tilesetInfo.mirror_tiles||"false"===this.tilesetInfo.mirror_tiles))}},{key:"getMouseOverHtml",value:function(e,t){if(!this.options||!this.options.showTooltip)return"";if(!this.tilesetInfo)return"";const n=mg.calculateResolution(this.tilesetInfo,this.zoomLevel),r=Math.max(this.tilesetInfo.max_pos[1]-this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[0]-this.tilesetInfo.min_pos[0]),i=Math.ceil(Math.log(r/n)/Math.log(10));this.setDataLensSize(1);const o=this._xScale.invert(e),a=this._yScale.invert(t);let s="Position: ";if(this.chromInfo){const e=bf(o,this.chromInfo),t=bf(a,this.chromInfo),n=e=>ni(`.${i}s`)(e);s+=`${e[0]}:${n(e[1])} & ${t[0]}:${n(t[1])}`,s+="
"}let l=null;try{l=this.getVisibleRectangleData(e,t,1,1).get(0,0)}catch(e){return""}return this.options&&"log"===this.options.heatmapValueScaling?l>0?`${s}Value: 1e${ni(".3f")(Math.log(l)/Math.log(10))}`:0===l?`${s}Value: 0`:`${s}Value: N/A`:`${s}Value: ${ni(".3f")(l)}`}},{key:"getTilePosAndDimensions",value:function(e,t,n){const r=n||this.binsPerTile();if(this.tilesetInfo.resolutions){const n=this.tilesetInfo.resolutions.map((e=>+e)).sort(((e,t)=>t-e))[e],i=n*r,o=i;return{tileX:n*r*t[0],tileY:n*r*t[1],tileWidth:i,tileHeight:o}}const i=t[0],o=t[1],a=this.tilesetInfo.min_pos[0],s=this.options.reverseYAxis?-this.tilesetInfo.max_pos[1]:this.tilesetInfo.min_pos[1],l=this.tilesetInfo.max_width/2**e,c=this.tilesetInfo.max_width/2**e;return{tileX:a+i*l,tileY:s+o*c,tileWidth:l,tileHeight:c}}},{key:"calculateZoomLevel",value:function(){const e=this.tilesetInfo.min_pos[0],t=this.tilesetInfo.max_pos[0],n=this.tilesetInfo.min_pos[1],r=this.tilesetInfo.max_pos[1];let i=null;if(this.tilesetInfo.resolutions){const o=mg.calculateZoomLevelFromResolutions(this.tilesetInfo.resolutions,this._xScale,e,t),a=mg.calculateZoomLevelFromResolutions(this.tilesetInfo.resolutions,this._yScale,n,r);i=Math.min(o,a)}else{const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.binsPerTile()),t=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1],this.binsPerTile());i=Math.max(e,t),i=Math.min(i,this.maxZoom)}return this.options&&this.options.maxZoom&&(this.options.maxZoom>=0?i=Math.min(this.options.maxZoom,i):console.error("Invalid maxZoom on track:",this)),i}},{key:"tileToLocalId",value:function(e){return e.dataTransform&&"default"!==e.dataTransform?`${e.join(".")}.${e.mirrored}.${e.dataTransform}`:`${e.join(".")}.${e.mirrored}`}},{key:"tileToRemoteId",value:function(e){return e.dataTransform&&"default"!==e.dataTransform?`${e.join(".")}.${e.dataTransform}`:`${e.join(".")}`}},{key:"localToRemoteId",value:function(e){const t=e.split(".");return t.slice(0,t.length-1).join(".")}}]),n}(eW);function oW(e){if(!e.graphics)return;const t=e.graphics,{tileX:n,tileY:r,tileWidth:i}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos);e.drawnAtScale=this._xScale.copy();const o=1/((this._xScale(1)-this._xScale(0))/(this._refXScale(1)-this._refXScale(0))),a=1/((this._yScale(1)-this._yScale(0))/(this._refYScale(1)-this._refYScale(0)));e.text.scale.x=o,e.text.scale.y=a;const s=this._xScale(i)-this._xScale(0);if(e.textGraphics.scale.x=s/256,e.textGraphics.scale.y=s/256,t.clear(),t.lineStyle(4*o,255,1),t.beginFill(16740363,.4),t.alpha=.5,e.mirrored){const o=this._refXScale(r+i)-this._refXScale(r),a=this._refYScale(n+i)-this._refYScale(n);e.textGraphics.position.x=this._refXScale(r)+o/2,e.textGraphics.position.y=this._refYScale(n)+a/2,t.drawRect(this._refXScale(r),this._refYScale(n),o,a)}else{const o=this._refXScale(n+i)-this._refXScale(n),a=this._refYScale(r+i)-this._refYScale(r);e.textGraphics.position.x=this._refXScale(n)+o/2,e.textGraphics.position.y=this._refYScale(r)+a/2,t.drawRect(this._refXScale(n),this._refYScale(r),o,a)}}function aW(e){const t=e.graphics;e.textGraphics=new Rf.PIXI.Graphics,e.mirrored?e.text=new Rf.PIXI.Text(`${e.tileData.zoomLevel}/${[e.tileData.tilePos[1],e.tileData.tilePos[0]].join("/")}`,{fontFamily:"Arial",fontSize:24,fill:16715792,align:"center"}):e.text=new Rf.PIXI.Text(`${e.tileData.zoomLevel}/${e.tileData.tilePos.join("/")}`,{fontFamily:"Arial",fontSize:24,fill:16715792,align:"center"}),e.textGraphics.addChild(e.text),e.text.anchor.x=.5,e.text.anchor.y=.5,t.addChild(e.textGraphics)}let sW=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"areAllVisibleTilesLoaded",value:function(){return!0}},{key:"initTile",value:function(e){aW.bind(this)(e),this.drawTile(e)}},{key:"destroyTile",value:function(e,t){}},{key:"drawTile",value:function(e){oW.bind(this)(e)}},{key:"fetchNewTiles",value:function(e){e.forEach((e=>{const t=e.remoteId.split("."),n={zoomLevel:t[0],tilePos:t.slice(1,t.length).map((e=>+e))};this.fetchedTiles[e.tileId]=e,this.fetchedTiles[e.tileId].tileData=n,this.fetching.has(e.remoteId)&&this.fetching.delete(e.remoteId)})),this.synchronizeTilesAndGraphics()}}]),n}(iW);let lW=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{onMouseMoveZoom:o,isValueScaleLocked:s,getLockGroupExtrema:l}=e;return i.onMouseMoveZoom=o,i.isValueScaleLocked=s,i.getLockGroupExtrema=l,i.onMouseMoveZoom&&i.pubSubs.push(i.pubSub.subscribe("app.mouseMove",i.mouseMoveHandler.bind(a(i)))),i}return f(n,[{key:"initTile",value:function(e){r(h(n.prototype),"initTile",this).call(this,e)}},{key:"tileToLocalId",value:function(e){return`${e.join(".")}`}},{key:"tileToRemoteId",value:function(e){return`${e.join(".")}`}},{key:"relevantScale",value:function(){return null}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e)}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.tileId)))}},{key:"calculateVisibleTiles",value:function(){if(!this.tilesetInfo)return;if(this.zoomLevel=this.calculateZoomLevel(),this.tilesetInfo.resolutions){const e=this.tilesetInfo.resolutions.map((e=>+e)).sort(((e,t)=>t-e)),t=mg.calculateTilesFromResolution(e[this.zoomLevel],this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]).map((e=>[this.zoomLevel,e]));return void this.setVisibleTiles(t)}const e=mg.calculateTiles(this.zoomLevel,this.relevantScale(),this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width).map((e=>[this.zoomLevel,e]));this.setVisibleTiles(e)}},{key:"getTilePosAndDimensions",value:function(e,t,n){const r=t[0],i=t[0];if(this.tilesetInfo.resolutions){const r=n||1024,i=this.tilesetInfo.resolutions.map((e=>+e)).sort(((e,t)=>t-e))[e],o=i*r,a=o;return{tileX:i*r*t[0],tileY:i*r*t[1],tileWidth:o,tileHeight:a}}const o=this.tilesetInfo.max_width/2**e,a=this.tilesetInfo.max_width/2**e;return{tileX:this.tilesetInfo.min_pos[0]+r*o,tileY:this.tilesetInfo.min_pos[1]+i*a,tileWidth:o,tileHeight:a}}},{key:"updateTile",value:function(e){}},{key:"scheduleRerender",value:function(){this.backgroundTaskScheduler.enqueueTask(this.handleRerender.bind(this),null,this.uuid)}},{key:"handleRerender",value:function(){this.rerender(this.options,!1)}},{key:"getIndicesOfVisibleDataInTile",value:function(e){const t=this._xScale.range();if(!this.tilesetInfo)return[null,null];const{tileX:n,tileWidth:r}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos,this.tilesetInfo.bins_per_dimension||this.tilesetInfo.tile_size),i=fi().domain([0,this.tilesetInfo.tile_size||this.tilesetInfo.bins_per_dimension]).range([n,n+r]);return[Math.max(0,Math.round(i.invert(this._xScale.invert(t[0])))),Math.min(e.tileData.dense.length,Math.round(i.invert(this._xScale.invert(t[1]))))]}},{key:"minVisibleValue",value:function(e=!1){let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));const n=t.map((e=>this.fetchedTiles[e])).map((e=>{const t=this.getIndicesOfVisibleDataInTile(e);return e.tileData.denseDataExtrema.getMinNonZeroInSubset(t)})),r=Math.min(...n);return e?r:null!==this.valueScaleMin?this.valueScaleMin:r}},{key:"maxVisibleValue",value:function(e=!1){let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));const n=t.map((e=>this.fetchedTiles[e])).map((e=>{const t=this.getIndicesOfVisibleDataInTile(e);return e.tileData.denseDataExtrema.getMaxNonZeroInSubset(t)})),r=Math.max(...n);return e?r:null!==this.valueScaleMax?this.valueScaleMax:r}},{key:"getAggregatedVisibleValue",value:function(e="max"){const t="min"===e?Math.min:Math.max,n="min"===e?1/0:-1/0;let r=this.visibleAndFetchedIds();0===r.length&&(r=Object.keys(this.fetchedTiles));const i=this._xScale.range();return r.map((e=>this.fetchedTiles[e])).map((t=>{if(!t.tileData.tilePos)return"min"===e?this.minVisibleValue():this.maxVisibleValue();const{tileX:n,tileWidth:r}=this.getTilePosAndDimensions(t.tileData.zoomLevel,t.tileData.tilePos,this.tilesetInfo.bins_per_dimension||this.tilesetInfo.tile_size),o=fi().domain([0,this.tilesetInfo.tile_size||this.tilesetInfo.bins_per_dimension]).range([n,n+r]),a=Math.max(0,Math.round(o.invert(this._xScale.invert(i[0])))),s=Math.min(t.tileData.dense.length,Math.round(o.invert(this._xScale.invert(i[1]))));return t.tileData.dense.slice(a,s)})).reduce(((e,n)=>t(e,...n)),n)}},{key:"getDataAtPos",value:function(e){let t;if(!this.tilesetInfo)return t;const n=this.calculateZoomLevel(),r=mg.calculateTileWidth(this.tilesetInfo,n,this.tilesetInfo.tile_size),i=this._xScale.invert(e)/r,o=this.tileToLocalId([n,Math.floor(i)]),a=this.fetchedTiles[o];if(!a)return t;const s=this.tilesetInfo.tile_size*(i-Math.floor(i));return a.tileData.dense?a.tileData.dense[Math.floor(s)]:null}},{key:"mouseMoveHandler",value:function({x:e,y:t}={}){this.isWithin(e,t)&&(this.mouseX=e,this.mouseY=t,this.mouseMoveZoomHandler())}},{key:"mouseMoveZoomHandler",value:function(){}},{key:"zoomed",value:function(...e){r(h(n.prototype),"zoomed",this).call(this,...e),this.mouseMoveZoomHandler()}}]),n}(eW),cW=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{animate:o,isShowGlobalMousePosition:s}=e;return i.constIndicator=new Rf.PIXI.Graphics,i.pMain.addChild(i.constIndicator),i.axis=new Yj(a(i)),i.pBase.addChild(i.axis.pAxis),i.animate=o,i.options=r,i.isShowGlobalMousePosition=s,i.pubSubs=[],i.options.showMousePosition&&!i.hideMousePosition&&(i.hideMousePosition=rb(a(i),i.is2d,i.isShowGlobalMousePosition())),i}return f(n,[{key:"rerender",value:function(e,t){const i=JSON.stringify(e);(t||i!==this.prevOptions)&&(r(h(n.prototype),"rerender",this).call(this,e,t),this.prevOptions=i,this.options=e,this.options.showMousePosition&&!this.hideMousePosition&&(this.hideMousePosition=rb(this,this.is2d,this.isShowGlobalMousePosition())),!this.options.showMousePosition&&this.hideMousePosition&&(this.hideMousePosition(),this.hideMousePosition=void 0))}},{key:"calculateZoomLevel",value:function(){if(this.tilesetInfo.resolutions)return mg.calculateZoomLevelFromResolutions(this.tilesetInfo.resolutions,this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]-2);const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.bins_per_dimension||this.tilesetInfo.tile_size);let t=Math.min(e,this.maxZoom);return t=Math.max(t,0),t}},{key:"relevantScale",value:function(){return this._xScale}},{key:"draw",value:function(){r(h(n.prototype),"draw",this).call(this),this.drawConstIndicator()}},{key:"drawAxis",value:function(e){if(!this.options.axisPositionVertical&&!this.options.axisPositionHorizontal)return void this.axis.clearAxis();if(this.options.axisPositionVertical&&"hidden"===this.options.axisPositionVertical)return void this.axis.clearAxis();if(this.options.axisPositionHorizontal&&"hidden"===this.options.axisPositionHorizontal)return void this.axis.clearAxis();const t=this.options.axisMargin||0;"left"===this.options.axisPositionHorizontal||"top"===this.options.axisPositionVertical?(this.axis.pAxis.position.x=this.position[0]+t,this.axis.pAxis.position.y=this.position[1],this.axis.drawAxisRight(e,this.dimensions[1])):"outsideLeft"===this.options.axisPositionHorizontal||"outsideTop"===this.options.axisPositionVertical?(this.axis.pAxis.position.x=this.position[0]+t,this.axis.pAxis.position.y=this.position[1],this.axis.drawAxisLeft(e,this.dimensions[1])):"right"===this.options.axisPositionHorizontal||"bottom"===this.options.axisPositionVertical?(this.axis.pAxis.position.x=this.position[0]+this.dimensions[0]-t,this.axis.pAxis.position.y=this.position[1],this.axis.drawAxisLeft(e,this.dimensions[1])):"outsideRight"!==this.options.axisPositionHorizontal&&"outsideBottom"!==this.options.axisPositionVertical||(this.axis.pAxis.position.x=this.position[0]+this.dimensions[0]-t,this.axis.pAxis.position.y=this.position[1],this.axis.drawAxisRight(e,this.dimensions[1]))}},{key:"mouseMoveZoomHandler",value:function(e=this.mouseX,t=this.mouseY){if(void 0===e||!this.areAllVisibleTilesLoaded()||!this.tilesetInfo)return;let n=0,r=0,i="1d-horizontal";this.isLeftModified?(n=t-this.position[1],r=e-this.position[0],i="1d-vertical"):(n=e-this.position[0],r=t-this.position[1]);const o=e-this.position[0],a=t-this.position[1],s=this._xScale.invert(n),l=this._yScale.invert(r),c=this.getDataAtPos(n);c&&this.onMouseMoveZoom({trackId:this.id,data:c,absX:e,absY:t,relX:o,relY:a,dataX:s,dataY:l,orientation:i})}},{key:"drawConstIndicator",value:function(){if(this.constIndicator){for(this.constIndicator.clear();this.constIndicator.children[0];)this.constIndicator.removeChild(this.constIndicator.children[0]);this.options.constIndicators&&this.valueScale&&this.options.constIndicators.forEach((({color:e="black",opacity:t=1,label:n=null,labelColor:r="black",labelOpacity:i=1,labelPosition:o="leftTop",labelSize:a=12,value:s=0}={})=>{const l=lm(e),c=lm(r);this.constIndicator.beginFill(l,t);const u=this.valueScale(s);let h=0,d=0;if(n){const e=new Rf.PIXI.Text(n,{fontFamily:"Arial",fontSize:a,fill:c});switch(e.alpha=i,o){case"right":e.anchor.x=1,e.anchor.y=.5,e.x=this.position[0]+this.dimensions[0]-6,e.y=u,d=e.width+8;break;case"rightBottom":e.anchor.x=1,e.anchor.y=0,e.x=this.position[0]+this.dimensions[0]-6,e.y=u;break;case"rightTop":e.anchor.x=1,e.anchor.y=1,e.x=this.position[0]+this.dimensions[0]-6,e.y=u;break;case"left":e.anchor.x=0,e.anchor.y=.5,e.x=this.position[0]+2,e.y=u,h=e.width+4;break;case"leftBottom":e.anchor.x=0,e.anchor.y=0,e.x=this.position[0]+2,e.y=u;break;default:e.anchor.x=0,e.anchor.y=1,e.x=this.position[0]+2,e.y=u}this.constIndicator.addChild(e)}this.constIndicator.drawRect(this.position[0]+h,u,this.dimensions[0]-d,1)}))}}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t),t.setAttribute("class","horizontal-tiled-1d-track");const i=document.createElement("g");return e.appendChild(i),this.options.constIndicators&&this.options.constIndicators.forEach((({color:e="black",opacity:t=1,label:n=null,labelColor:r="black",labelOpacity:o=1,labelPosition:a="leftTop",labelSize:s=12,value:l=0}={})=>{const c=this.valueScale(l);if(n){const e=document.createElement("text");switch(e.textContent=n,e.setAttribute("x",this.position[0]),e.setAttribute("y",c),e.setAttribute("style",`font-family: 'Arial'; font-size: ${s}px; fill: ${r}; fill-opacity: ${o};`),a){case"rightBottom":e.setAttribute("x",this.position[0]+this.dimensions[0]-6),e.setAttribute("y",c+s+2),e.setAttribute("text-anchor","end");break;case"right":case"rightTop":e.setAttribute("x",this.position[0]+this.dimensions[0]-6),e.setAttribute("y",c-2),e.setAttribute("text-anchor","end");break;case"leftBottom":e.setAttribute("x",this.position[0]+2),e.setAttribute("y",c+s+2);break;default:e.setAttribute("x",this.position[0]+2),e.setAttribute("y",c-2)}i.appendChild(e)}const u=document.createElement("line");u.setAttribute("x1",this.position[0]),u.setAttribute("y1",c),u.setAttribute("x2",this.dimensions[0]),u.setAttribute("y2",c),u.setAttribute("stroke",e),u.setAttribute("stroke-opacity",t),i.appendChild(u)})),[t,e]}}]),n}(lW),uW=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).pMain=i.pMobile,i}return f(n,[{key:"areAllVisibleTilesLoaded",value:function(){return!0}},{key:"initTile",value:function(e){const t=e.graphics;e.textGraphics=new Rf.PIXI.Graphics,e.text=new Rf.PIXI.Text(`${e.tileData.zoomLevel}/${e.tileData.tilePos.join("/")}`,{fontFamily:"Arial",fontSize:32,fill:16715792,align:"center"}),e.textGraphics.addChild(e.text),e.text.anchor.x=.5,e.text.anchor.y=.5,t.addChild(e.textGraphics),this.drawTile(e)}},{key:"destroyTile",value:function(e){}},{key:"drawTile",value:function(e){if(r(h(n.prototype),"drawTile",this).call(this,e),!e.graphics)return;const t=e.graphics,{tileX:i,tileWidth:o}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos),a=1/((this._xScale(1)-this._xScale(0))/(this._refXScale(1)-this._refXScale(0)));e.text.scale.x=a,t.clear();const s=this.dimensions[1],l=this._refXScale(i+o)-this._refXScale(i);e.textGraphics.position.x=this._refXScale(i)+l/2,e.textGraphics.position.y=s/2;const c=this._refXScale(i);t.lineStyle(4*a,255,1),t.beginFill(16740363,.4),t.alpha=.5,t.moveTo(c,0),t.lineTo(c,s),t.moveTo(c+l,0),t.lineTo(c+l,s),t.lineStyle(0,255,1),t.drawRect(c,0,l,s)}}]),n}(cW),hW=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._yScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]);return Math.min(e,this.maxZoom)}},{key:"relevantScale",value:function(){return this._yScale}},{key:"zoomed",value:function(e,t){r(h(n.prototype),"zoomed",this).call(this,e,t);const i=(t(1)-t(0))/(this._refYScale(1)-this._refYScale(0)),o=this.position[0],a=t(0)+this.position[1]-this._refYScale(1)*i;this.pMain.position.x=o,this.pMain.position.y=a,this.pMain.scale.x=1,this.pMain.scale.y=i}}]),n}(lW),dW=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"areAllVisibleTilesLoaded",value:function(){return!0}},{key:"initTile",value:function(e){const t=e.graphics;e.textGraphics=new Rf.PIXI.Graphics,e.text=new Rf.PIXI.Text(`${e.tileData.zoomLevel}/${e.tileData.tilePos.join("/")}`,{fontFamily:"Arial",fontSize:32,fill:16715792,align:"center"}),e.textGraphics.addChild(e.text),e.text.anchor.x=.5,e.text.anchor.y=.5,e.text.rotation=-Math.PI/2,t.addChild(e.textGraphics),this.drawTile(e,t)}},{key:"destroyTile",value:function(e,t){}},{key:"drawTile",value:function(e){if(r(h(n.prototype),"drawTile",this).call(this,e),!e.graphics)return;const t=e.graphics,{tileY:i,tileHeight:o}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos),a=1/((this._yScale(1)-this._yScale(0))/(this._refYScale(1)-this._refYScale(0)));e.text.scale.x=a,t.clear(),t.lineStyle(4*a,255,1),t.beginFill(16740363,.4),t.alpha=.5;const s=this.dimensions[0],l=this._refYScale(i+o)-this._refYScale(i);e.textGraphics.position.x=s/2,e.textGraphics.position.y=this._refYScale(i)+l/2,t.drawRect(0,this._refYScale(i),s,l)}},{key:"fetchNewTiles",value:function(e){e.forEach((e=>{const t=e.remoteId.split("."),n={zoomLevel:t[1],tilePos:t.slice(2,t.length).map((e=>+e))};this.fetchedTiles[e.tileId]=e,this.fetchedTiles[e.tileId].tileData=n,this.fetching.has(e.remoteId)&&this.fetching.delete(e.remoteId)})),this.synchronizeTilesAndGraphics()}}]),n}(hW);var pW=Array.prototype.slice;function fW(e){return e}var mW=1,gW=2,bW=3,vW=4,yW=1e-6;function TW(e){return"translate("+e+",0)"}function _W(e){return"translate(0,"+e+")"}function EW(e){return t=>+e(t)}function xW(e,t){return t=Math.max(0,e.bandwidth()-2*t)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function wW(){return!this.__axis}function SW(e,t){var n=[],r=null,i=null,o=6,a=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,c=e===mW||e===vW?-1:1,u=e===vW||e===gW?"x":"y",h=e===mW||e===bW?TW:_W;function d(d){var p=null==r?t.ticks?t.ticks.apply(t,n):t.domain():r,f=null==i?t.tickFormat?t.tickFormat.apply(t,n):fW:i,m=Math.max(o,0)+s,g=t.range(),b=+g[0]+l,v=+g[g.length-1]+l,y=(t.bandwidth?xW:EW)(t.copy(),l),T=d.selection?d.selection():d,_=T.selectAll(".domain").data([null]),E=T.selectAll(".tick").data(p,t).order(),x=E.exit(),w=E.enter().append("g").attr("class","tick"),S=E.select("line"),k=E.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(w),S=S.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),k=k.merge(w.append("text").attr("fill","currentColor").attr(u,c*m).attr("dy",e===mW?"0em":e===bW?"0.71em":"0.32em")),d!==T&&(_=_.transition(d),E=E.transition(d),S=S.transition(d),k=k.transition(d),x=x.transition(d).attr("opacity",yW).attr("transform",(function(e){return isFinite(e=y(e))?h(e+l):this.getAttribute("transform")})),w.attr("opacity",yW).attr("transform",(function(e){var t=this.parentNode.__axis;return h((t&&isFinite(t=t(e))?t:y(e))+l)}))),x.remove(),_.attr("d",e===vW||e===gW?a?"M"+c*a+","+b+"H"+l+"V"+v+"H"+c*a:"M"+l+","+b+"V"+v:a?"M"+b+","+c*a+"V"+l+"H"+v+"V"+c*a:"M"+b+","+l+"H"+v),E.attr("opacity",1).attr("transform",(function(e){return h(y(e)+l)})),S.attr(u+"2",c*o),k.attr(u,c*m).text(f),T.filter(wW).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===gW?"start":e===vW?"end":"middle"),T.each((function(){this.__axis=y}))}return d.scale=function(e){return arguments.length?(t=e,d):t},d.ticks=function(){return n=pW.call(arguments),d},d.tickArguments=function(e){return arguments.length?(n=null==e?[]:pW.call(e),d):n.slice()},d.tickValues=function(e){return arguments.length?(r=null==e?null:pW.call(e),d):r&&r.slice()},d.tickFormat=function(e){return arguments.length?(i=e,d):i},d.tickSize=function(e){return arguments.length?(o=a=+e,d):o},d.tickSizeInner=function(e){return arguments.length?(o=+e,d):o},d.tickSizeOuter=function(e){return arguments.length?(a=+e,d):a},d.tickPadding=function(e){return arguments.length?(s=+e,d):s},d.offset=function(e){return arguments.length?(l=+e,d):l},d}function kW(e){return SW(mW,e)}function AW(e){return SW(vW,e)}const CW=Object.freeze(Object.defineProperty({__proto__:null,axisTop:kW,axisRight:function(e){return SW(gW,e)},axisBottom:function(e){return SW(bW,e)},axisLeft:AW},Symbol.toStringTag,{value:"Module"}));let IW=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{svgElement:o}=e;return i.gMain=Be(o).append("g"),i.clipUid=Ns.nice(),i.clipRect=i.gMain.append("clipPath").attr("id",`track-bounds-${i.clipUid}`).append("rect"),i.gMain.attr("clip-path",`url(#track-bounds-${i.clipUid})`),i}return f(n,[{key:"setPosition",value:function(e){this.position=e,this.gMain.attr("transform",`translate(${this.position[0]},${this.position[1]})`),this.draw()}},{key:"setDimensions",value:function(e){this.dimensions=e,this._xScale.range([0,this.dimensions[0]]),this._yScale.range([0,this.dimensions[1]]),e[0]>=0&&e[1]>=0?(this.clipRect.attr("width",e[0]),this.clipRect.attr("height",e[1])):(this.clipRect.attr("width",0),this.clipRect.attr("height",0)),this.draw()}},{key:"remove",value:function(){this.gMain.remove(),this.gMain=null}},{key:"draw",value:function(){return this}}]),n}(RH),OW=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).axis=kW(i._xScale),i.gAxis=i.gMain.append("g"),i.tilesetInfo=!0,i}return f(n,[{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e),this.axis.ticks(Math.ceil(this.dimensions[0]/150)),this.gAxis.attr("transform",`translate(0,${e[1]})`)}},{key:"draw",value:function(){return this.axis.scale(this._xScale),this.gAxis.call(this.axis),this}},{key:"zoomed",value:function(e,t){r(h(n.prototype),"zoomed",this).call(this,e,t),this.draw()}}]),n}(IW),DW=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).axis=AW(i._yScale),i.gAxis=i.gMain.append("g"),i.tilesetInfo=!0,i}return f(n,[{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e),this.axis.ticks(Math.ceil(this.dimensions[1]/150)),this.gAxis.attr("transform",`translate(${e[0]},0)`)}},{key:"draw",value:function(){return this.axis.scale(this._yScale),this.gAxis.call(this.axis),this}},{key:"zoomed",value:function(e,t){r(h(n.prototype),"zoomed",this).call(this,e,t),this.draw()}}]),n}(IW);var PW={},NW={};function RW(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),16711935&e&&(t-=8),252645135&e&&(t-=4),858993459&e&&(t-=2),1431655765&e&&(t-=1),t}NW.INT_BITS=32,NW.INT_MAX=2147483647,NW.INT_MIN=-1<<31,NW.sign=function(e){return(e>0)-(e<0)},NW.abs=function(e){var t=e>>31;return(e^t)-t},NW.min=function(e,t){return t^(e^t)&-(e65535)<<4,t|=n=((e>>>=t)>255)<<3,t|=n=((e>>>=n)>15)<<2,(t|=n=((e>>>=n)>3)<<1)|(e>>>=n)>>1},NW.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0},NW.popCount=function(e){return 16843009*((e=(858993459&(e-=e>>>1&1431655765))+(e>>>2&858993459))+(e>>>4)&252645135)>>>24},NW.countTrailingZeros=RW,NW.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,1+((e|=e>>>8)|e>>>16)},NW.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},NW.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var MW=new Array(256);function LW(e,t,n){var r=0|e[n];if(r<=0)return[];var i,o=new Array(r);if(n===e.length-1)for(i=0;i>>=1;n;n>>>=1)r<<=1,r|=1&n,--i;e[t]=r<>>8&255]<<16|MW[e>>>16&255]<<8|MW[e>>>24&255]},NW.interleave2=function(e,t){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e&=65535)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t&=65535)|t<<8))|t<<4))|t<<2))|t<<1))<<1},NW.deinterleave2=function(e,t){return(e=65535&((e=16711935&((e=252645135&((e=858993459&((e=e>>>t&1431655765)|e>>>1))|e>>>2))|e>>>4))|e>>>16))<<16>>16},NW.interleave3=function(e,t,n){return e=1227133513&((e=3272356035&((e=251719695&((e=4278190335&((e&=1023)|e<<16))|e<<8))|e<<4))|e<<2),(e|=(t=1227133513&((t=3272356035&((t=251719695&((t=4278190335&((t&=1023)|t<<16))|t<<8))|t<<4))|t<<2))<<1)|(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<2},NW.deinterleave3=function(e,t){return(e=1023&((e=4278190335&((e=251719695&((e=3272356035&((e=e>>>t&1227133513)|e>>>2))|e>>>4))|e>>>8))|e>>>16))<<22>>22},NW.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>RW(e)+1};for(var BW=function(e,t){switch(void 0===t&&(t=0),typeof e){case"number":if(e>0)return function(e,t){var n,r;for(n=new Array(e),r=0;r0?i-4:i;for(n=0;n>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===o&&(t=HW[e.charCodeAt(n)]<<2|HW[e.charCodeAt(n+1)]>>4,a[s++]=255&t),1===o&&(t=HW[e.charCodeAt(n)]<<10|HW[e.charCodeAt(n+1)]<<4|HW[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a},fromByteArray:function(e){for(var t,n=e.length,r=n%3,i=[],o=16383,a=0,s=n-r;as?s:a+o));return 1===r?(t=e[n-1],i.push(jW[t>>2]+jW[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(jW[t>>10]+jW[t>>4&63]+jW[t<<2&63]+"=")),i.join("")}},jW=[],HW=[],GW="undefined"!=typeof Uint8Array?Uint8Array:Array,zW="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",VW=0;VW<64;++VW)jW[VW]=zW[VW],HW[zW.charCodeAt(VW)]=VW;function WW(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function XW(e,t,n){for(var r,i=[],o=t;o>18&63]+jW[a>>12&63]+jW[a>>6&63]+jW[63&a]);var a;return i.join("")}HW["-".charCodeAt(0)]=62,HW["_".charCodeAt(0)]=63;var YW={read:function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},write:function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}};!function(e){const t=UW,n=YW,r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=c,e.SlowBuffer=function(e){return+e!=e&&(e=0),c.alloc(+e)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function l(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return p(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|v(e,t);let r=l(n);const i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(Z(e,Uint8Array)){const t=new Uint8Array(e);return g(t.buffer,t.byteOffset,t.byteLength)}return m(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(Z(e,ArrayBuffer)||e&&Z(e.buffer,ArrayBuffer))return g(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(Z(e,SharedArrayBuffer)||e&&Z(e.buffer,SharedArrayBuffer)))return g(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const i=function(e){if(c.isBuffer(e)){const t=0|b(e.length),n=l(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?l(0):m(e):"Buffer"===e.type&&Array.isArray(e.data)?m(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function h(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function p(e){return h(e),l(e<0?0:0|b(e))}function m(e){const t=e.length<0?0:0|b(e.length),n=l(t);for(let r=0;r=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function v(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||Z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return K(e).length;default:if(i)return r?-1:$(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return N(this,t,n);case"utf8":case"utf-8":return I(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function T(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function _(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),J(n=+n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,r,i){let o,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let r=-1;for(o=n;os&&(n=s-l),o=n;o>=0;o--){let n=!0;for(let r=0;ri&&(r=i):r=i;const o=t.length;let a;for(r>o/2&&(r=o/2),a=0;a>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function C(e,n,r){return 0===n&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function I(e,t,n){n=Math.min(e.length,n);const r=[];let i=t;for(;i239?4:t>223?3:t>191?2:1;if(i+a<=n){let n,r,s,l;switch(a){case 1:t<128&&(o=t);break;case 2:n=e[i+1],128==(192&n)&&(l=(31&t)<<6|63&n,l>127&&(o=l));break;case 3:n=e[i+1],r=e[i+2],128==(192&n)&&128==(192&r)&&(l=(15&t)<<12|(63&n)<<6|63&r,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(l=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let n="",r=0;for(;rr.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,i)}i+=t.length}return r},c.byteLength=v,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tn&&(t+=" ... "),""},r&&(c.prototype[r]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,i){if(Z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(o,a),l=this.slice(r,i),u=e.slice(t,n);for(let e=0;e>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return x(this,e,t,n);case"utf8":case"utf-8":return w(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function D(e,t,n){let r="";n=Math.min(e.length,n);for(let i=t;ir)&&(n=r);let i="";for(let r=t;rn)throw new RangeError("Trying to access beyond buffer length")}function L(e,t,n,r,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function B(e,t,n,r,i){W(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function F(e,t,n,r,i){W(t,r,i,e,n,7);let o=Number(t&BigInt(4294967295));e[n+7]=o,o>>=8,e[n+6]=o,o>>=8,e[n+5]=o,o>>=8,e[n+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,r,i,o){return t=+t,r>>>=0,o||U(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function H(e,t,r,i,o){return t=+t,r>>>=0,o||U(e,0,r,8),n.write(e,t,r,i,52,8),r+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],i=1,o=0;for(;++o>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=te((function(e){X(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(i)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],i=1,o=0;for(;++o=i&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,i=1,o=this[e+--r];for(;r>0&&(i*=256);)o+=this[e+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=te((function(e){X(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||Y(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<>>=0,t||M(e,4,this.length),n.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),n.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),n.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),n.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[t]=255&e;++o>>=0,n>>>=0,r||L(this,e,t,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=te((function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=te((function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let i=0,o=1,a=0;for(this[t]=255&e;++i>0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);L(this,e,t,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=te((function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=te((function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return H(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return H(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function W(e,t,n,r,i,o){if(e>n||e3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new G.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,n){X(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||Y(t,e.length-(n+1))}(r,i,o)}function X(e,t){if("number"!=typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function Y(e,t,n){if(Math.floor(e)!==e)throw X(e,n),new G.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}z("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),z("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),z("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=V(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=V(i)),i+="n"),r+=` It must be ${t}. Received ${i}`,r}),RangeError);const q=/[^+/0-9A-Za-z-_]/g;function $(e,t){let n;t=t||1/0;const r=e.length;let i=null;const o=[];for(let a=0;a55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function K(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(q,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,r){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function Z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const ee=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t}();function te(e){return"undefined"==typeof BigInt?ne:e}function ne(){throw new Error("BigInt not supported")}}(FW);var qW=NW,$W=BW,KW=FW.Buffer;globalThis.__TYPEDARRAY_POOL||(globalThis.__TYPEDARRAY_POOL={UINT8:$W([32,0]),UINT16:$W([32,0]),UINT32:$W([32,0]),BIGUINT64:$W([32,0]),INT8:$W([32,0]),INT16:$W([32,0]),INT32:$W([32,0]),BIGINT64:$W([32,0]),FLOAT:$W([32,0]),DOUBLE:$W([32,0]),DATA:$W([32,0]),UINT8C:$W([32,0]),BUFFER:$W([32,0])});var QW="undefined"!=typeof Uint8ClampedArray,ZW="undefined"!=typeof BigUint64Array,JW="undefined"!=typeof BigInt64Array,eX=globalThis.__TYPEDARRAY_POOL;eX.UINT8C||(eX.UINT8C=$W([32,0])),eX.BIGUINT64||(eX.BIGUINT64=$W([32,0])),eX.BIGINT64||(eX.BIGINT64=$W([32,0])),eX.BUFFER||(eX.BUFFER=$W([32,0]));var tX=eX.DATA,nX=eX.BUFFER;function rX(e){if(e){var t=e.length||e.byteLength,n=qW.log2(t);tX[n].push(e)}}function iX(e){e=qW.nextPow2(e);var t=qW.log2(e),n=tX[t];return n.length>0?n.pop():new ArrayBuffer(e)}function oX(e){return new Uint8Array(iX(e),0,e)}function aX(e){return new Uint16Array(iX(2*e),0,e)}function sX(e){return new Uint32Array(iX(4*e),0,e)}function lX(e){return new Int8Array(iX(e),0,e)}function cX(e){return new Int16Array(iX(2*e),0,e)}function uX(e){return new Int32Array(iX(4*e),0,e)}function hX(e){return new Float32Array(iX(4*e),0,e)}function dX(e){return new Float64Array(iX(8*e),0,e)}function pX(e){return QW?new Uint8ClampedArray(iX(e),0,e):oX(e)}function fX(e){return ZW?new BigUint64Array(iX(8*e),0,e):null}function mX(e){return JW?new BigInt64Array(iX(8*e),0,e):null}function gX(e){return new DataView(iX(e),0,e)}function bX(e){e=qW.nextPow2(e);var t=qW.log2(e),n=nX[t];return n.length>0?n.pop():new KW(e)}PW.free=function(e){if(KW.isBuffer(e))nX[qW.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength,n=0|qW.log2(t);tX[n].push(e)}},PW.freeUint8=PW.freeUint16=PW.freeUint32=PW.freeBigUint64=PW.freeInt8=PW.freeInt16=PW.freeInt32=PW.freeBigInt64=PW.freeFloat32=PW.freeFloat=PW.freeFloat64=PW.freeDouble=PW.freeUint8Clamped=PW.freeDataView=function(e){rX(e.buffer)},PW.freeArrayBuffer=rX,PW.freeBuffer=function(e){nX[qW.log2(e.length)].push(e)},PW.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return iX(e);switch(t){case"uint8":return oX(e);case"uint16":return aX(e);case"uint32":return sX(e);case"int8":return lX(e);case"int16":return cX(e);case"int32":return uX(e);case"float":case"float32":return hX(e);case"double":case"float64":return dX(e);case"uint8_clamped":return pX(e);case"bigint64":return mX(e);case"biguint64":return fX(e);case"buffer":return bX(e);case"data":case"dataview":return gX(e);default:return null}return null},PW.mallocArrayBuffer=iX,PW.mallocUint8=oX,PW.mallocUint16=aX,PW.mallocUint32=sX,PW.mallocInt8=lX,PW.mallocInt16=cX,PW.mallocInt32=uX,PW.mallocFloat32=PW.mallocFloat=hX,PW.mallocFloat64=PW.mallocDouble=dX,PW.mallocUint8Clamped=pX,PW.mallocBigUint64=fX,PW.mallocBigInt64=mX,PW.mallocDataView=gX,PW.mallocBuffer=bX,PW.clearCache=function(){for(var e=0;e<32;++e)eX.UINT8[e].length=0,eX.UINT16[e].length=0,eX.UINT32[e].length=0,eX.INT8[e].length=0,eX.INT16[e].length=0,eX.INT32[e].length=0,eX.FLOAT[e].length=0,eX.DOUBLE[e].length=0,eX.BIGUINT64[e].length=0,eX.BIGINT64[e].length=0,eX.UINT8C[e].length=0,tX[e].length=0,nX[e].length=0};var vX=32;function yX(e,t,n){for(var r=2*(e+1),i=e+1;i<=t;++i){for(var o=n[r++],a=n[r++],s=i,l=r-2;s-- >e;){var c=n[l-2],u=n[l-1];if(cn[t+1])}function SX(e,t,n,r){var i=r[e*=2];return i>1,s=a-r,l=a+r,c=i,u=s,h=a,d=l,p=o,f=e+1,m=t-1,g=0;wX(c,u,n)&&(g=c,c=u,u=g),wX(d,p,n)&&(g=d,d=p,p=g),wX(c,h,n)&&(g=c,c=h,h=g),wX(u,h,n)&&(g=u,u=h,h=g),wX(c,d,n)&&(g=c,c=d,d=g),wX(h,d,n)&&(g=h,h=d,d=g),wX(u,p,n)&&(g=u,u=p,p=g),wX(u,h,n)&&(g=u,u=h,h=g),wX(d,p,n)&&(g=d,d=p,p=g);for(var b=n[2*u],v=n[2*u+1],y=n[2*d],T=n[2*d+1],_=2*c,E=2*h,x=2*p,w=2*i,S=2*a,k=2*o,A=0;A<2;++A){var C=n[_+A],I=n[E+A],O=n[x+A];n[w+A]=C,n[S+A]=I,n[k+A]=O}_X(s,e,n),_X(l,t,n);for(var D=f;D<=m;++D)if(SX(D,b,v,n))D!==f&&TX(D,f,n),++f;else if(!SX(D,y,T,n))for(;;){if(SX(m,y,T,n)){SX(m,b,v,n)?(EX(D,f,m,n),++f,--m):(TX(D,m,n),--m);break}if(--m>>1;OX(UX,v);var y=0,T=0;for(f=0;f=DX)jX(MX,LX,T--,_=_-DX|0);else if(_>=0)jX(NX,RX,y--,_);else if(_<=-DX){_=-_-DX|0;for(var E=0;E>>1;OX(UX,v);var y=0,T=0,_=0;for(f=0;f>1==UX[2*f+3]>>1&&(x=2,f+=1),E<0){for(var w=-(E>>1)-1,S=0;S<_;++S)if(void 0!==(k=t(BX[S],w)))return k;if(0!==x)for(S=0;S>1)-1,0===x?jX(NX,RX,y--,w):1===x?jX(MX,LX,T--,w):2===x&&jX(BX,FX,_--,w)}},scanBipartite:function(e,t,n,r,i,o,a,s,l,c,u,h){var d=0,p=2*e,f=t,m=t+e,g=1,b=1;r?b=DX:g=DX;for(var v=i;v>>1;OX(UX,E);var x=0;for(v=0;v=DX?(S=!r,y-=DX):(S=!!r,y-=1),S)HX(NX,RX,x++,y);else{var k=h[y],A=p*y,C=u[A+t+1],I=u[A+t+1+e];e:for(var O=0;O>>1;OX(UX,y);var T=0;for(m=0;m=DX)NX[T++]=g-DX;else{var E=u[g-=1],x=d*g,w=c[x+t+1],S=c[x+t+1+e];e:for(var k=0;k=0;--k)if(NX[k]===g){for(O=k+1;O"+eY+"-"+JX+"){"),e?(o(!0,!1),i.push("}else{"),o(!1,!1)):(i.push("if(fp){"),o(!0,!0),i.push("}else{"),o(!0,!1),i.push("}}else{if(fp){"),o(!1,!0),i.push("}else{"),o(!1,!1),i.push("}")),i.push("}}return "+t);var a=n.join("")+i.join("");return new Function(a)()}GX.partial=sY(!1),GX.full=sY(!0);var lY=function(e,t){var n="abcdef".split("").concat(t),r=[];return e.indexOf("lo")>=0&&r.push("lo=e[k+n]"),e.indexOf("hi")>=0&&r.push("hi=e[k+o]"),n.push(cY.replace("_",r.join()).replace("$",e)),Function.apply(void 0,n)},cY="for(var j=2*a,k=j*c,l=k,m=c,n=b,o=a+b,p=c;d>p;++p,k+=j){var _;if($)if(m===p)m+=1,l+=j;else{for(var s=0;j>s;++s){var t=e[k+s];e[k+s]=e[l],e[l++]=t}var u=f[p];f[p]=f[m],f[m++]=u}}return m";var uY=function(e,t,n,r,i,o){if(r<=n+1)return n;for(var a=n,s=r,l=r+n>>>1,c=2*e,u=l,h=i[c*l+t];a=g?(u=m,h=g):f>=v?(u=p,h=f):(u=b,h=v):g>=v?(u=m,h=g):v>=f?(u=p,h=f):(u=b,h=v);for(var y=c*(s-1),T=c*u,_=0;_n&&i[h+t]>c;--u,h-=a){for(var d=h,p=h+a,f=0;f0;){var d=(u-=1)*PY,p=RY[d],f=RY[d+1],m=RY[d+2],g=RY[d+3],b=RY[d+4],v=RY[d+5],y=u*NY,T=MY[y],_=MY[y+1],E=1&v,x=!!(16&v),w=i,S=o,k=s,A=l;if(E&&(w=s,S=l,k=i,A=o),!(2&v&&f>=(m=CY(e,p,f,m,w,S,_))||4&v&&(f=IY(e,p,f,m,w,S,T))>=m)){var C=m-f,I=b-g;if(x){if(e*C*(C+I)=p0)&&!(p1>=hi)",["p0","p1"]),AY=EY("lo===p0",["p0"]),CY=EY("lo>>1;if(!(a<=0)){var s,l=HY.mallocDouble(2*a*i),c=HY.mallocInt32(i);if((i=WY(e,a,l,c))>0){if(1===a&&r)GY.init(i),s=GY.sweepComplete(a,n,0,i,l,c,0,i,l,c);else{var u=HY.mallocDouble(2*a*o),h=HY.mallocInt32(o);(o=WY(t,a,u,h))>0&&(GY.init(i+o),s=1===a?GY.sweepBipartite(a,n,0,i,l,c,0,o,u,h):zY(a,n,r,i,l,c,o,u,h),HY.free(u),HY.free(h))}HY.free(l),HY.free(c)}return s}}}function YY(e,t){UY.push([e,t])}var qY={exports:{}},$Y=function(e,t,n){var r=e*t,i=KY*e,o=i-(i-e),a=e-o,s=KY*t,l=s-(s-t),c=t-l,u=a*c-(r-o*l-a*l-o*c);return n?(n[0]=u,n[1]=r,n):[u,r]},KY=+(Math.pow(2,27)+1);var QY=function(e,t){var n=0|e.length,r=0|t.length;if(1===n&&1===r)return function(e,t){var n=e+t,r=n-e,i=e-(n-r)+(t-r);return i?[i,n]:[n]}(e[0],t[0]);var i,o,a=new Array(n+r),s=0,l=0,c=0,u=Math.abs,h=e[l],d=u(h),p=t[c],f=u(p);d=r?(i=h,(l+=1)=r?(i=h,(l+=1)0){if(o<=0)return a;r=i+o}else{if(!(i<0))return a;if(o>=0)return a;r=-(i+o)}var s=33306690738754716e-32*r;return a>=s||a<=-s?a:c(e,t,n)},function(e,t,n,r){var i=e[0]-r[0],o=t[0]-r[0],a=n[0]-r[0],s=e[1]-r[1],l=t[1]-r[1],c=n[1]-r[1],h=e[2]-r[2],d=t[2]-r[2],p=n[2]-r[2],f=o*c,m=a*l,g=a*s,b=i*c,v=i*l,y=o*s,T=h*(f-m)+d*(g-b)+p*(v-y),_=7771561172376103e-31*((Math.abs(f)+Math.abs(m))*Math.abs(h)+(Math.abs(g)+Math.abs(b))*Math.abs(d)+(Math.abs(v)+Math.abs(y))*Math.abs(p));return T>_||-T>_?T:u(e,t,n,r)}];function d(e){var t=h[e.length];return t||(t=h[e.length]=l(e.length)),t.apply(void 0,e)}function p(e,t,n,r,i,o,a){return function(t,n,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return r(t,n);case 3:return i(t,n,s);case 4:return o(t,n,s,l);case 5:return a(t,n,s,l,c)}for(var u=new Array(arguments.length),h=0;h0;){var g=(l+i-1)%i;if((y=e[g])[1]!==r)break;var b=y[0];f=Math.min(f,b),m=Math.max(m,b),l=g}if(0===l)return f<=n&&n<=m?0:1;a=l+1}for(var v=e[(l+i-1)%i][1];s+1t.importance-e.importance)),this.options&&this.options.valueColumn)t=[e.tileData.map((e=>({value:e})))];else{const r=e.tileData.map((e=>{const t=+e.chrOffset;return{from:+e.fields[1]+t,to:+e.fields[2]+t,value:e,text:e.fields[3],strand:e.fields.length>=6&&"-"===e.fields[5]?"-":"+"}}));t=yb(r.filter((e=>"+"===e.strand))),n=yb(r.filter((e=>"-"===e.strand)))}e.plusStrandRows=t,e.minusStrandRows=n,this.options.showTexts&&e.tileData.forEach(((t,n)=>{const r=t.fields;if(t.importance||(t.importance=Math.random()),e.textWidths={},e.textHeights={},n>=(+this.options.maxTexts||50))return;const i=new Rf.PIXI.Text(r[3],{...oq,fontSize:+this.options.fontSize||oq.fontSize});this.flipText&&(i.scale.x=-1),i.anchor.x=.5,i.anchor.y=.5,e.texts[t.uid]=i,e.textGraphics.addChild(i)}))}e.initialized=!0}},{key:"removeTileRects",value:function(e){const t=+e.tileId.split(".")[0];e.rectGraphics.clear(),e.rendered=!1,e.tileData&&e.tileData.length&&e.tileData.forEach(((n,r)=>{this.drawnRects[t]&&this.drawnRects[t][n.uid]&&this.drawnRects[t][n.uid][2]===e.tileId&&delete this.drawnRects[t][n.uid]}))}},{key:"destroyTile",value:function(e){this.removeTileRects(e),e.graphics.removeChild(e.textGraphics),e.graphics.removeChild(e.rectGraphics)}},{key:"removeTiles",value:function(e){r(h(n.prototype),"removeTiles",this).call(this,e)}},{key:"drawTile",value:function(e){this.options&&this.options.valueColumn&&this.valueScale&&this.drawAxis(this.valueScale)}},{key:"rerender",value:function(e,t){r(h(n.prototype),"rerender",this).call(this,e,t),this.valueScale=null,this.drawnRects={},this.options.colorRange?this.colorScale=wf(this.options.colorRange):this.colorScale=nm;for(const e of this.visibleAndFetchedTiles())this.destroyTile(e),this.initTile(e),this.renderTile(e)}},{key:"updateTile",value:function(e){this.areAllVisibleTilesLoaded()&&this.renderTile(e)}},{key:"allVisibleRects",value:function(){const e={};Object.values(this.fetchedTiles).forEach((t=>{if(t.plusStrandRows)for(const n of t.plusStrandRows[0])e[n.value.uid]||(e[n.value.uid]=n)}));const t=Object.values(e).sort(((e,t)=>e.from-t.from));let n=0,r=0;for(let e=0;e=0&&t.length;e--)t[e].staggeredStartPosition=(r+n-e)%2;return e}},{key:"drawSegmentStyle",value:function(e,t,n,r,i,o){const a=.1,s=r+i/2,l=[t,r,t+.2,r,t+.2,s-a,n-.2,s-a,n-.2,r,n,r,n,r+i,n-.2,r+i,n-.2,s+a,t+.2,s+a,t+.2,r+i,t,r+i];return e.rectGraphics.drawPolygon(l),l}},{key:"drawPoly",value:function(e,t,n,r,i,o){let a=null;return"segment"===this.options.annotationStyle?this.drawSegmentStyle(e,t,n,r,i,o):(("+"===o||"-"===o)&&n-t<8?(a=[t,r,t+i/2,r+i/2,t,r+i],"+"===o||(a=[n,r,n-i/2,r+i/2,n,r+i]),e.rectGraphics.drawPolygon(a)):(a="+"===o?[t,r,n-i/2,r,n,r+i/2,n-i/2,r+i,t,r+i]:"-"===o?[t+i/2,r,n,r,n,r+i,t+i/2,r+i,t,r+i/2]:[t,r,n,r,n,r+i,t,r+i],e.rectGraphics.drawPolygon(a)),a)}},{key:"setValueScale",value:function(){if(this.valueScale=null,this.options&&this.options.valueColumn){const e=this.options.colorEncodingRange?+this.options.colorEncodingRange[0]:this.minVisibleValueInTiles(+this.options.valueColumn),t=this.options.colorEncodingRange?+this.options.colorEncodingRange[1]:this.maxVisibleValueInTiles(+this.options.valueColumn);this.options.valueColumn&&([this.valueScale]=this.makeValueScale(e,this.calculateMedianVisibleValue(+this.options.valueColumn),t))}}},{key:"setColorValueScale",value:function(){if(this.colorValueScale=null,this.options&&this.options.colorEncoding&&"itemRgb"!==this.options.colorEncoding){const e=this.options.colorEncodingRange?+this.options.colorEncodingRange[0]:this.minVisibleValueInTiles(+this.options.colorEncoding),t=this.options.colorEncodingRange?+this.options.colorEncodingRange[1]:this.maxVisibleValueInTiles(+this.options.colorEncoding);this.colorValueScale=fi().domain([e,t]).range([0,255])}}},{key:"renderRows",value:function(e,t,n,r,i,o){const a=+e.tileId.split(".")[0];this.initialize();const s=nn().domain(Gt(n)).range([r,i]).paddingInner(.3);this.allVisibleRects();let l=null;this.options.staggered&&(l=this.allVisibleRects());for(let n=0;n=(+this.options.maxTexts||50))continue;if(!e.texts[i.uid])continue;const _=e.texts[i.uid];_.position.x=this._xScale(p),_.position.y=b+m/2,_.nominalY=b+m/2,T&&(_.alreadyDrawn=!0);const E=void 0!==this.options.fontColor?lm(this.options.fontColor):o;if(_.style={...oq,fill:E,fontSize:+this.options.fontSize||oq.fontSize},!(c[3]in e.textWidths)){_.updateTransform();const t=_.getBounds().width,n=_.getBounds().height,r=5;e.textWidths[c[3]]=t,e.textHeights[c[3]]=n-r}}}},{key:"renderTile",value:function(e){let t=e.plusStrandRows?e.plusStrandRows.length:1,n=e.minusStrandRows?e.minusStrandRows.length:1;for(const e of this.visibleAndFetchedTiles()){if(!e.initialized)return;(e.plusStrandRows||e.minusStrandRows)&&(t=Math.max(e.plusStrandRows.length,t),n=Math.max(e.minusStrandRows.length,n))}if(e.rendered&&this.removeTileRects(e),e.drawnAtScale=this._xScale.copy(),e.rendered=!0,this.setValueScale(),this.setColorValueScale(),e.tileData&&e.tileData.length){const r=this.options.plusStrandColor||this.options.fillColor||"blue",i=this.options.minusStrandColor||this.options.fillColor||"purple",o=0;let a=0;a=this.options.separatePlusMinusStrands?t*this.dimensions[1]/(t+n)-o/2:this.dimensions[1],this.renderRows(e,e.plusStrandRows,t,0,a,r),this.renderRows(e,e.minusStrandRows,n,this.options.separatePlusMinusStrands?a+o/2:0,this.dimensions[1],i)}Kj.stretchRects(this,[e=>e.rectGraphics])}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]);let t=Math.min(e,this.maxZoom);return t=Math.max(t,0),t}},{key:"minVisibleValueInTiles",value:function(e){let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));let n=Math.min.apply(null,t.map((e=>this.fetchedTiles[e])).filter((e=>e.tileData&&e.tileData.length)).map((t=>Math.min.apply(null,t.tileData.sort(((e,t)=>t.importance-e.importance)).slice(0,iq).map((t=>+t.fields[e-1])).filter((e=>!Number.isNaN(e)))))));return n===Number.MAX_SAFE_INTEGER&&(n=null),n}},{key:"maxVisibleValueInTiles",value:function(e){let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));let n=Math.max.apply(null,t.map((e=>this.fetchedTiles[e])).filter((e=>e.tileData&&e.tileData.length)).map((t=>Math.max.apply(null,t.tileData.sort(((e,t)=>t.importance-e.importance)).slice(0,iq).map((t=>+t.fields[e-1])).filter((e=>!Number.isNaN(e)))))));return n===Number.MIN_SAFE_INTEGER&&(n=null),n}},{key:"calculateMedianVisibleValue",value:function(e){this.areAllVisibleTilesLoaded()&&this.allTilesLoaded();let t=this.visibleAndFetchedIds();0===t.length&&(t=Object.keys(this.fetchedTiles));const n=[].concat(...t.map((e=>this.fetchedTiles[e])).filter((e=>e.tileData&&e.tileData.length)).map((t=>t.tileData.sort(((e,t)=>t.importance-e.importance)).slice(0,iq).map((t=>+t.fields[e-1]))))).filter((e=>e>0));this.medianVisibleValue=Ft(n)}},{key:"draw",value:function(){r(h(n.prototype),"draw",this).call(this),this.allTexts=[],this.allBoxes=[];for(const e in this.fetchedTiles){const t=this.fetchedTiles[e];if(t.rectGraphics.scale.y=this.vertK,t.rectGraphics.position.y=this.vertY,!t.drawnAtScale)return;Kj.stretchRects(this,[e=>e.rectGraphics]);const n=this.parentInFetched(t);t.initialized&&t.tileData&&t.tileData.length&&t.tileData.forEach((e=>{if(!t.texts)return;const r=e.fields,i=r[3],o=t.texts[e.uid];if(!o)return;const a=+e.chrOffset,s=(+r[1]+a+(+r[2]+a))/2;if(o.position.x=this._xScale(s),o.position.y=o.nominalY*(this.vertK*this.prevK)+this.vertY,n||o.alreadyDrawn)o.visible=!1;else{o.visible=!0;const n=3;this.allBoxes.push([o.position.x-n,o.position.y-t.textHeights[r[3]]/2,o.position.x+t.textWidths[r[3]]+n,o.position.y+t.textHeights[r[3]]/2]),this.allTexts.push({importance:e.importance,text:o,caption:i,strand:r[5]})}}))}this.hideOverlaps(this.allBoxes,this.allTexts)}},{key:"hideOverlaps",value:function(e,t){jY(e,((e,n)=>{t[e].importance>t[n].importance?t[e].text.visible&&(t[n].text.visible=!1):t[n].text.visible&&(t[e].text.visible=!1)}))}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),[this.pMain.position.x,this.pMain.position.y]=this.position}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e)}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.refreshTiles(),this.draw()}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t);const i=document.createElement("g");i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`),e.appendChild(i);const o=document.createElement("g"),a=document.createElement("g");i.appendChild(o),i.appendChild(a);for(const e of this.visibleAndFetchedTiles())e.tileData.length&&e.tileData.forEach((t=>{const n=+e.tileId.split(".")[0],r=document.createElement("g");if(r.setAttribute("transform",`translate(${e.rectGraphics.position.x},${e.rectGraphics.position.y})scale(${e.rectGraphics.scale.x},${e.rectGraphics.scale.y})`),o.appendChild(r),this.drawnRects[n]&&t.uid in this.drawnRects[n]){const i=this.drawnRects[n][t.uid][0],o=document.createElement("path");let s=`M ${i[0]} ${i[1]}`;for(let e=2;e{const n=this.valueScaleTransform,{y:r,k:i}=n,o=this.dimensions[1];r+e/i>-(i-1)*o&&r+e/i<0&&(this.valueScaleTransform=n.translate(0,e/i)),t.rectGraphics.position.y=this.valueScaleTransform.y,this.vertY=this.valueScaleTransform.y})),this.animate()}},{key:"zoomedY",value:function(e,t){const n=Kj.zoomedY(e,t,this.valueScaleTransform,this.dimensions[1]);this.valueScaleTransform=n;let r=n.k;const i=n.y;let o=!1;r/=this.prevK,(r>1.5||r<1/1.5)&&(this.prevK*=r,r=1,o=!0),this.vertK=r,this.vertY=i,Object.values(this.fetchedTiles).forEach((e=>{o&&this.renderTile(e),e.rectGraphics.scale.y=r,e.rectGraphics.position.y=i})),this.draw(),this.animate()}},{key:"getMouseOverHtml",value:function(e,t){if(!this.tilesetInfo)return"";const n=this.calculateZoomLevel(),r=[e,t];if(this.drawnRects[n]){const e=Object.values(this.drawnRects[n]);for(let t=0;t{i instanceof HTMLElement?((e,t,n,r,i,{fill:o=0,fillOpacity:a=0,stroke:s=0,strokeWidth:l=0,strokeOpacity:c=0}={})=>{const u=document.createElement("rect");u.setAttribute("x",e),u.setAttribute("y",t),u.setAttribute("width",n),u.setAttribute("height",r),u.setAttribute("fill",`#${dm(o)}`),u.setAttribute("fill-opacity",a),u.setAttribute("stroke",`#${dm(s)}`),u.setAttribute("stroke-opacity",c),u.setAttribute("stroke-width",l),i.appendChild(u)})(e,t,n,r,i,o):((e,t,n,r,i)=>{i.drawRect(e,t,n,r)})(e,t,n,r,i)},lq=(e,t,n,r,i,o,a,s,{isVertical:l=!1,svg:c=null}={})=>{let u=t,h=n,d=r,p=i;const f=2*s.width>r?r/2:s.width,m=2*s.width>i?i/2:s.width,g=c||e,b={fill:0,fillOpacity:0,stroke:0,strokeOpacity:0,strokeWidth:1};if(s.positions&&s.positions.length?(e.lineStyle(1,0,0),e.beginFill(s.color,s.opacity),b.fill=s.color,b.fillOpacity=s.opacity,b.stroke=0,b.strokeOpacity=0,b.strokeWidth=1,s.positions.forEach((e=>{"top"===e&&!l||"left"===e&&l?sq(t-f,n-m,r+2*f,m,g,b):"bottom"===e&&!l||"right"===e&&l?sq(t-f,n+i,r+2*f,m,g,b):"left"===e&&!l||"top"===e&&l?sq(t-f,n-m,f,i+2*m,g,b):("right"===e&&!l||"bottom"===e&&l)&&sq(t+r,n-m,f,i+2*m,g,b)}))):s.width>0&&s.opacity>0&&(e.lineStyle(s.width,s.color,s.opacity),e.beginFill(0,0),b.fill=0,b.fillOpacity=0,b.stroke=s.color,b.strokeOpacity=s.opacity,b.strokeWidth=s.width,sq(t-f,n-m,r+2*f,i+2*m,g,b)),a.positions&&a.positions.length){e.lineStyle(1,0,0),e.beginFill(a.color,a.opacity);const o=2*a.width>r?r/2:a.width,s=2*a.width>i?i/2:a.width;b.fill=a.color,b.fillOpacity=a.opacity,b.stroke=0,b.strokeOpacity=0,b.strokeWidth=1,a.positions.forEach((e=>{"top"===e&&!l||"left"===e&&l?(sq(t,n,r,s,g,b),h+=s,p-=s):"bottom"===e&&!l||"right"===e&&l?(sq(t,n+i-s,r,s,g,b),p-=s):"left"===e&&!l||"top"===e&&l?(sq(t,n,o,i,g,b),u+=o,d-=o):("right"===e&&!l||"bottom"===e&&l)&&(sq(t+r-o,n,o,i,g,b),d-=o)}))}else e.lineStyle(a.width,a.color,a.opacity),b.stroke=a.color,b.strokeOpacity=a.opacity,b.strokeWidth=a.width;e.beginFill(o.color,o.opacity),b.fill=o.color,b.fillOpacity=o.opacity,sq(u,h,d,p,g,b)};let cq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).options=r||{},i.drawnRects={},i}return f(n,[{key:"drawHorizontalOverlay",value:function(e,t,n,r=0,i,o,a,s){if(!n||n.length<2)return;let l=this.position[0]+t.left+this._xScale(n[0]);const c=this.position[1]+t.top,u=t.height;let h=this._xScale(n[1])-this._xScale(n[0]);h=4?n[2]:n[0]);const u=this.position[1]+t.top,h=this.position[1]+t.top+t.height;if(c>h)return;c=4?n[3]:n[1])-c+t.top+this.position[1];p<0||(c+p>h&&(p+=h-(c+p)),p{"1d-horizontal"!==n.orientation&&"2d"!==n.orientation||this.options.extent.forEach((r=>this.drawHorizontalOverlay(t,n.position,r,s,i,o,a,e))),"1d-vertical"!==n.orientation&&"2d"!==n.orientation||this.options.extent.forEach((r=>this.drawVerticalOverlay(t,n.position,r,l,i,o,a,e)))}))}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.draw()}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e),this.draw()}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t);const i=document.createElement("g");return e.appendChild(i),this.draw({svg:i}),[t,e]}}]),n}(LH),uq=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"stopHover",value:function(){this.pMouseOver.clear(),this.animate()}},{key:"getMouseOverHtml",value:function(e){if(!this.tilesetInfo||!this.options.showTooltip||!this.valueScale)return"";const t=this.getDataAtPos(e);let n="";t&&(n=ni(".3f")(t));const r=this.pMouseOver,i=this.valueScale(t);r.clear(),r.beginFill(0,.5),r.lineStyle(1,0,1);return r.drawRect(e-2,i-2,4,4),this.animate(),`${n}`}},{key:"initTile",value:function(e){if(r(h(n.prototype),"initTile",this).call(this,e),e.tileData&&e.tileData.dense){if(e.xValues=new Array(e.tileData.dense.length),e.yValues=new Array(e.tileData.dense.length),this.isValueScaleLocked()){const e=this.getLockGroupExtrema();null!==e&&(this.minValue(e[0]),this.maxValue(e[1]))}this.drawTile(e)}else console.warn("emptyTile:",e)}},{key:"rerender",value:function(e,t){r(h(n.prototype),"rerender",this).call(this,e,t),this.options=e,r(h(n.prototype),"draw",this).call(this),this.visibleAndFetchedTiles().forEach((e=>{this.renderTile(e)}))}},{key:"renderTile",value:function(e){this.drawTile(e),this.drawAxis(this.valueScale)}},{key:"drawTile",value:function(e){if(r(h(n.prototype),"drawTile",this).call(this,e),!e.graphics)return;if(!e.tileData||!e.tileData.dense)return;const t=e.graphics,{tileX:i,tileWidth:o}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos),a=e.tileData.dense;if(0===a.length)return;const[s,l]=this.makeValueScale(this.minValue(),this.medianVisibleValue,this.maxValue());if(this.valueScale=s,t.clear(),this.drawAxis(this.valueScale),"log"===this.options.valueScaling&&this.valueScale.domain()[1]<0)return void console.warn("Negative values present when using a log scale",this.valueScale.domain());const c=lm(this.options.lineStrokeColor?this.options.lineStrokeColor:"blue");this.tilesetInfo.tile_size||this.tilesetInfo.bins_per_dimension||console.warn("No tileset_info.tile_size or tileset_info.bins_per_dimension",this.tilesetInfo);const u=this.tilesetInfo.tile_size||this.tilesetInfo.bins_per_dimension,d=fi().domain([0,u]).range([i,i+o]),p=this.options.lineStrokeWidth?this.options.lineStrokeWidth:1;t.lineStyle(p,c,1),e.segments=[];let f=[];for(let t=0;t1&&e.segments.push(f),f=[];else{if(d(t)>this.tilesetInfo.max_pos[0])break;f.push([n,r])}}f.length>1&&e.segments.push(f);for(const n of e.segments){const e=n[0],r=n.slice(1);t.moveTo(e[0],e[1]);for(const e of r)t.lineTo(e[0],e[1])}}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0],this.pMouseOver.position.y=this.position[1],this.pMouseOver.position.x=this.position[0]}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.refreshTiles(),this.draw();const n=this.isValueScaleLocked();if(this.continuousScaling&&void 0!==this.minValue()&&void 0!==this.maxValue()){if(null===this.valueScaleMin&&null===this.valueScaleMax&&!n){const e=this.minVisibleValue(),t=this.maxVisibleValue(),n=1e-6;null!==e&&null!==t&&(Math.abs(this.minValue()-e)>n||Math.abs(this.maxValue()-t)>n)&&(this.minValue(e),this.maxValue(t),this.scheduleRerender())}n&&this.onValueScaleChanged()}}},{key:"superSVG",value:function(){return r(h(n.prototype),"exportSVG",this).call(this)}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t),t.setAttribute("class","exported-line-track");const i=document.createElement("g");e.appendChild(i),i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`);const o=this.options.lineStrokeColor?this.options.lineStrokeColor:"blue";this.visibleAndFetchedTiles().forEach((e=>{const t=document.createElement("path");t.setAttribute("fill","transparent"),t.setAttribute("stroke",o);let n="";for(const t of e.segments){const e=t[0],r=t.slice(1);n+=`M${e[0]} ${e[1]}`;for(const e of r)n+=`L${e[0]} ${e[1]}`}t.setAttribute("d",n),i.appendChild(t)}));const a=document.createElement("g");if(a.setAttribute("id","axis"),t.appendChild(a),a.setAttribute("transform",`translate(${this.axis.pAxis.position.x}, ${this.axis.pAxis.position.y})`),"left"===this.options.axisPositionHorizontal||"top"===this.options.axisPositionVertical){const e=this.axis.exportAxisLeftSVG(this.valueScale,this.dimensions[1]);a.appendChild(e)}else if("right"===this.options.axisPositionHorizontal||"bottom"===this.options.axisPositionVertical){const e=this.axis.exportAxisRightSVG(this.valueScale,this.dimensions[1]);a.appendChild(e)}return[t,e]}},{key:"tileToLocalId",value:function(e){return this.options.aggregationMode&&"mean"!==this.options.aggregationMode?`${e.join(".")}.${this.options.aggregationMode}`:`${e.join(".")}`}},{key:"tileToRemoteId",value:function(e){return this.tileToLocalId(e)}}]),n}(cW),hq=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"initTile",value:function(e){e.barXValues=new Array(e.tileData.dense.length),e.barYValues=new Array(e.tileData.dense.length),e.barWidths=new Array(e.tileData.dense.length),e.barHeights=new Array(e.tileData.dense.length),r(h(n.prototype),"initTile",this).call(this,e)}},{key:"drawTile",value:function(e){if(!e.graphics)return;if(!e.tileData||!e.tileData.dense)return;const t=e.graphics,{tileX:n,tileWidth:r}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos),i=e.tileData.dense;if(0===i.length)return;let o=0;if(this.valueScale=null,"log"===this.options.valueScaling){let e=this.medianVisibleValue;this.medianVisibleValue||(e=this.minValue()),this.valueScale=xi().domain([e,this.maxValue()+e]).range([this.dimensions[1],0]),o=e}else this.valueScale=fi().domain([this.minValue(),this.maxValue()]).range([this.dimensions[1],0]);if(t.clear(),this.drawAxis(this.valueScale),"log"===this.options.valueScaling&&this.valueScale.domain()[1]<0)return void console.warn("Negative values present when using a log scale",this.valueScale.domain());const a=lm(this.options.lineStrokeColor?this.options.lineStrokeColor:"blue"),s=fi().domain([0,this.tilesetInfo.tile_size]).range([n,n+r]);t.lineStyle(0,a,1);const l=this.options.pointSize?this.options.pointSize:3,c=lm(this.options.pointColor?this.options.pointColor:"red");t.beginFill(c,1),e.drawnAtScale=this._xScale.copy();for(let n=0;nthis.tilesetInfo.max_pos[0])break;t.drawRect(r-l/2/this.pMain.scale.x,a-l/2/this.pMain.scale.y,l/this.pMain.scale.x,l/this.pMain.scale.y)}}},{key:"draw",value:function(){r(h(n.prototype),"draw",this).call(this);for(const e of gm(this.fetchedTiles)){const t=(e.drawnAtScale.domain()[1]-e.drawnAtScale.domain()[0])/(this._xScale.domain()[1]-this._xScale.domain()[0]),n=this._xScale.domain().map(e.drawnAtScale)[0];e.graphics.scale.x=t,e.graphics.position.x=-n*t}}},{key:"zoomed",value:function(e,t,i,o,a){r(h(n.prototype),"zoomed",this).call(this,e,t)}},{key:"exportSVG",value:function(){let e=null,t=null;[t,e]=r(h(n.prototype),"superSVG",this).call(this),t.setAttribute("class","exported-line-track");const i=document.createElement("g");e.appendChild(i),i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`);for(const e of this.visibleAndFetchedTiles())for(let t=0;t{const n=xb(e,t);return function(e){let t=0;const n=[];return e.forEach((e=>{t+=+e||0,n.push(t)})),Float64Array.from(n)}(e.map((e=>(Array.isArray(e)&&t?e.length:1)/n)))};let pq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).pMain=i.pMobile,i.continuousScaling=!1,i.updateDataFetcher(r),i}return f(n,[{key:"updateDataFetcher",value:function(e){if(e&&e.selectRows&&"server"===e.selectRowsAggregationMethod){const{pubSub:t,dataFetcher:n}=this,r=n.dataConfig.options,i={aggGroups:e.selectRows,aggFunc:e.selectRowsAggregationMode};if(JSON.stringify(r)!==JSON.stringify(i)){const e={...n.dataConfig,options:i};this.dataFetcher=new n.constructor(e,t),this.dataFetcher.dataConfig.tilesetUid&&this.fetchNewTiles(Object.keys(this.fetchedTiles).map((e=>({tileId:e,remoteId:e}))))}}}},{key:"rerender",value:function(e,t){this.updateDataFetcher(e),r(h(n.prototype),"rerender",this).call(this,e,t),e.selectRows&&(this.selectRowsCumWeights=dq(e.selectRows,e.selectRowsAggregationWithRelativeHeight))}},{key:"tileDataToCanvas",value:function(e){const t=document.createElement("canvas");this.options.selectRows&&this.tilesetInfo.shape?(t.width=this.tilesetInfo.shape[0],t.height=xb(this.options.selectRows,this.options.selectRowsAggregationWithRelativeHeight)):this.tilesetInfo.shape?(t.width=this.tilesetInfo.shape[0],t.height=this.tilesetInfo.shape[1]):(t.width=this.tilesetInfo.tile_size,t.height=1);const n=t.getContext("2d");if(n.fillStyle="transparent",n.fillRect(0,0,t.width,t.height),0!==e.length&&e.length===4*t.width*t.height){const r=new ImageData(e,t.width,t.height);n.putImageData(r,0,0)}else console.warn("HorizontalMultivecTrack: pixData has an incorrect length.");return t}},{key:"setSpriteProperties",value:function(e,t,n){const{tileX:r,tileWidth:i}=this.getTilePosAndDimensions(t,n,this.tilesetInfo.tile_size),o=r+i;e.width=this._refXScale(o)-this._refXScale(r),e.height=this.dimensions[1],e.x=this._refXScale(r),e.y=0}},{key:"leftTrackZoomed",value:function(e,t,n,r,i){const o=this._xScale(0)-n*this._refXScale(0);this.pMobile.position.x=o+this.position[0],this.pMobile.position.y=this.position[1],this.pMobile.scale.x=n,this.pMobile.scale.y=1}},{key:"zoomed",value:function(e,t,i,o){r(h(n.prototype),"zoomed",this).call(this,e,t),this.pMain.position.x=o,this.pMain.position.y=this.position[1],this.pMain.scale.x=i,this.pMain.scale.y=1,this.drawColorbar()}},{key:"calculateVisibleTiles",value:function(){if(!this.tilesetInfo)return;if(this.zoomLevel=this.calculateZoomLevel(),this.tilesetInfo.resolutions){const e=this.tilesetInfo.resolutions.map((e=>+e)).sort(((e,t)=>t-e));this.xTiles=mg.calculateTilesFromResolution(e[this.zoomLevel],this._xScale,this.tilesetInfo.min_pos[0],null,this.tilesetInfo.tile_size)}else this.xTiles=mg.calculateTiles(this.zoomLevel,this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width);const e=this.xTiles.map((e=>[this.zoomLevel,e]));this.setVisibleTiles(e)}},{key:"calculateZoomLevel",value:function(){if(!this.tilesetInfo)return;const e=this.tilesetInfo.min_pos[0];let t=null;return t=this.tilesetInfo.resolutions?mg.calculateZoomLevelFromResolutions(this.tilesetInfo.resolutions,this._xScale,e):mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),t}},{key:"tileToLocalId",value:function(e){return e.join(".")}},{key:"tileToRemoteId",value:function(e){return e.join(".")}},{key:"getTilePosAtPosition",value:function(e,t){if(!this.tilesetInfo)return;const n=this.calculateZoomLevel(),r=mg.calculateTileWidth(this.tilesetInfo,n,this.tilesetInfo.tile_size),i=this._xScale.invert(e)/r;return[n,Math.floor(i)]}},{key:"getVisibleData",value:function(e,t){const n=this.calculateZoomLevel(),r=mg.calculateTileWidth(this.tilesetInfo,n,this.tilesetInfo.tile_size),i=this._xScale.invert(e)/r;let o=this.tilesetInfo.shape?this.tilesetInfo.shape[1]:1;this.options.selectRows&&(o=xb(this.options.selectRows,this.options.selectRowsAggregationWithRelativeHeight));let a=this.tilesetInfo.tile_size*(i-Math.floor(i));const s=t/this.dimensions[1],l=s*o;let c,u=Math.floor(l);this.options.selectRows&&(this.options.selectRowsAggregationWithRelativeHeight&&(u=this.selectRowsCumWeights.findIndex(((e,t)=>s<=e&&(t===this.selectRowsCumWeights.length-1||this.selectRowsCumWeights[t+1]>=s)))),c=this.options.selectRows[u]);const h=this.tileToLocalId([n,Math.floor(i)]),d=this.fetchedTiles[h];let p="";if(d){this.tilesetInfo.shape||(a=d.tileData.dense.length*(i-Math.floor(i)));let e=null;if(e=this.tilesetInfo.shape?Array.isArray(c)&&"client"===this.options.selectRowsAggregationMethod?c.map((e=>this.tilesetInfo.shape[0]*e+Math.floor(a))):c&&"client"===this.options.selectRowsAggregationMethod?this.tilesetInfo.shape[0]*c+Math.floor(a):this.tilesetInfo.shape[0]*u+Math.floor(a):d.tileData.dense.length*u+Math.floor(a),Array.isArray(e)){const t=Eb(this.options.selectRowsAggregationMode),n=e.map((e=>d.tileData.dense[e]));p=ni(".3f")(t(n)),p+="
",p+=`${e.length}-item ${this.options.selectRowsAggregationMode}`}else p=ni(".3f")(d.tileData.dense[e]),Array.isArray(c)&&(p+="
",p+=`${c.length}-item ${this.options.selectRowsAggregationMode}`)}if(this.tilesetInfo.row_infos){p+="
";let e="";this.options.selectRows&&!Array.isArray(c)?e=this.tilesetInfo.row_infos[c]:u>=0&&u"),i=this.options.colorRange[parseInt(n[0],10)-1],o=n[1];if(Number.isNaN(i)||"NaN"===i||void 0===i||"undefined"===i)return"";r=` ${o}`}else r+=`Data value: ${this.getVisibleData(e,t)}
`,r+=`Zoom level: ${n[0]} tile position: ${n[1]}`;return r}}]),n}(iW);const fq=lm("#FFFFFF");let mq=function(e){i(n,e);var t=o(n);function n(...e){var r;return d(this,n),(r=t.call(this,...e)).zeroLine=new Rf.PIXI.Graphics,r.pMain.addChild(r.zeroLine),r.valueScaleTransform=Mj,r.options&&r.options.colorRange&&(r.options.colorRangeGradient?r.setColorGradient(r.options.colorRange):r.setColorScale(r.options.colorRange)),r.initialized=!0,r}return f(n,[{key:"setColorScale",value:function(e){e&&(this.colorScale=wf(e),this.colorScale=this.colorScale.map((e=>e.map((e=>e/255)))))}},{key:"setColorGradient",value:function(e){if(!e)return;const t=e.length-1;this.colorGradientColors="bottom"===this.options.align?e.slice().reverse().map(((e,n)=>({from:n/t,color:e}))):e.map(((e,n)=>({from:n/t,color:e})))}},{key:"initTile",value:function(e){this.initialized&&r(h(n.prototype),"initTile",this).call(this,e)}},{key:"updateTile",value:function(e){e.valueScale&&this.scale&&this.scale.minValue===e.scale.minValue&&this.scale.maxValue===e.scale.maxValue||this.renderTile(e)}},{key:"renderTile",value:function(e){this.initialized&&r(h(n.prototype),"renderTile",this).call(this,e)}},{key:"drawTile",value:function(e){if(!e.graphics)return;if(!e.tileData||!e.tileData.dense)return;const{graphics:t}=e;e.svgData=void 0;const{tileX:n,tileWidth:r}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos,this.tilesetInfo.bins_per_dimension||this.tilesetInfo.tile_size),i=e.tileData.dense;if(0===i.length)return;const[o,a]=this.makeValueScale(this.minValue(),this.medianVisibleValue,this.maxValue(),0);o.clamp(!0),this.valueScale=o;const s=o.copy();if(s.range([254,0]).clamp(!0),t.clear(),this.drawAxis(this.valueScale),"log"===this.options.valueScaling&&this.valueScale.domain()[1]<0)return void console.warn("Negative values present when using a log scale",this.valueScale.domain());const l=lm(this.options.lineStrokeColor||"blue"),c=fi().domain([0,this.tilesetInfo.tile_size||this.tilesetInfo.bins_per_dimension]).range([n,n+r]);t.lineStyle(0,l,1);const u=this.options.barFillColor||"grey",h=lm(u),d="barOpacity"in this.options?this.options.barOpacity:1;t.beginFill(h,d),e.drawnAtScale=this._xScale.copy();const p="top"===this.options.align;let f,m,g,b,v,y;if(this.colorGradientColors){v=new Rf.PIXI.Graphics,v.beginFill(fq,1);const e=Sg(this.colorGradientColors,1,this.dimensions[1],0,0,0,this.dimensions[1]);y=new Rf.PIXI.Sprite(Rf.PIXI.Texture.fromCanvas(e,Rf.PIXI.SCALE_MODES.NEAREST)),y.x=this._xScale(n),y.width=this._xScale(n+r)-y.x}for(let n=0;nthis.tilesetInfo.max_pos[0])break;if(this.colorScale&&!this.options.colorRangeGradient){const e=Math.round(s(i[n]+a)),r=this.colorScale[e],o=Rf.PIXI.utils.rgb2hex(r);t.beginFill(o,d)}(v||t).drawRect(f,g,m,b)}this.colorGradientColors&&(y.mask=v,t.removeChildren(),t.addChild(y,v))}},{key:"rerender",value:function(e,t){e&&e.colorRange&&(e.colorRangeGradient?this.setColorGradient(e.colorRange):this.setColorScale(e.colorRange)),r(h(n.prototype),"rerender",this).call(this,e,t)}},{key:"drawZeroLine",value:function(){this.zeroLine.clear();const e=lm(this.options.barFillColor||"grey"),t=+this.options.barOpacity||1,n=this.options.zeroLineColor?lm(this.options.zeroLineColor):e,r=Number.isNaN(+this.options.zeroLineOpacity)?t:+this.options.zeroLineOpacity;this.zeroLine.beginFill(n,r),this.zeroLine.drawRect(0,this.dimensions[1]-1,this.dimensions[0],1)}},{key:"drawZeroLineSvg",value:function(e){const t=document.createElement("rect");t.setAttribute("id","zero-line"),t.setAttribute("x",0),t.setAttribute("y",this.dimensions[1]-1),t.setAttribute("height",1),t.setAttribute("width",this.dimensions[0]),t.setAttribute("fill",this.options.zeroLineColor||this.options.barFillColor),t.setAttribute("fill-opacity",this.options.zeroLineOpacity||this.options.barOpacity),e.appendChild(t)}},{key:"getXScaleAndOffset",value:function(e){const t=e.domain(),n=this._xScale.domain(),r=(t[1]-t[0])/(n[1]-n[0]);return[r,-this._xScale.domain().map(e)[0]*r]}},{key:"draw",value:function(){this.initialized&&(r(h(n.prototype),"draw",this).call(this),this.options.zeroLineVisible?this.drawZeroLine():this.zeroLine.clear(),Object.values(this.fetchedTiles).forEach((e=>{const[t,n]=this.getXScaleAndOffset(e.drawnAtScale);e.graphics.scale.x=t,e.graphics.position.x=n})))}},{key:"zoomed",value:function(e,t){r(h(n.prototype),"zoomed",this).call(this,e,t)}},{key:"movedY",value:function(e){}},{key:"zoomedY",value:function(e,t){}},{key:"addSVGInfo",value:function(e,t,n,r,i,o){e.svgData?(e.svgData.barXValues.push(t),e.svgData.barYValues.push(n),e.svgData.barWidths.push(r),e.svgData.barHeights.push(i),e.svgData.barColors.push(o)):e.svgData={barXValues:[t],barYValues:[n],barWidths:[r],barHeights:[i],barColors:[o]}}},{key:"exportSVG",value:function(){let e=null,t=null;[t,e]=r(h(n.prototype),"superSVG",this).call(this),t.setAttribute("class","exported-line-track");const i=document.createElement("g");e.appendChild(i),i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`),this.options.zeroLine&&this.drawZeroLineSvg(i),this.visibleAndFetchedTiles().filter((e=>e.svgData&&e.svgData.barXValues)).forEach((e=>{const t=e.svgData;for(let n=0;np?(t.beginFill(h,d),this.addSVGInfo(e,r,p,f,a-p,c)):(t.beginFill(u,d),this.addSVGInfo(e,r,a,f,p-a,l)),s(n)>this.tilesetInfo.max_pos[0])break;t.drawRect(r,e.svgData.barYValues[n],f,e.svgData.barHeights[n])}}}]),n}(mq),bq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).setColorScale(r.colorRange),i.opacity=r.opacity||1,i}return f(n,[{key:"setColorScale",value:function(e){this.colorScale=e?wf(e):nm,this.colorScale=this.colorScale.map((e=>e.map((e=>e/255))))}},{key:"rerender",value:function(e){e&&e.colorRange&&this.setColorScale(e.colorRange),this.opacity=e.opacity||1,r(h(n.prototype),"rerender",this).call(this,e)}},{key:"drawAxis",value:function(){}},{key:"drawTile",value:function(e){if(!e.graphics||!e.tileData||!e.tileData.dense)return;const t=e.graphics,{tileX:n,tileWidth:r}=this.getTilePosAndDimensions(e.tileData.zoomLevel,e.tileData.tilePos),i=e.tileData.dense;if(0===i.length)return;const[o,a]=this.makeValueScale(this.minValue(),this.medianVisibleValue,this.maxValue());if(o.range([254,0]).clamp(!0),this.valueScale=o,t.clear(),"log"===this.options.valueScaling&&this.valueScale.domain()[1]<0)return void console.warn("Negative values present when using a log scale",this.valueScale.domain());const s=fi().domain([0,this.tilesetInfo.tile_size]).range([n,n+r]);t.lineStyle(0,0,0);for(let n=0;nthis.tilesetInfo.max_pos[0])break;0!==i[n]&&t.drawRect(o,0,l,c)}}}}]),n}(uq),vq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).seen=new Set,i.pMain=i.pMobile,i.rows=[],i}return f(n,[{key:"uid",value:function(e){return e[e.length-2]}},{key:"segmentOverlap",value:function(e,t){}},{key:"drawAll",value:function(e){this.pMain.clear();const t=new Set,n=yb(e.map((e=>t.has(this.uid(e))?null:(t.add(this.uid(e)),{from:+e[1],to:+e[2],type:e[4],uid:this.uid(e)}))).filter((e=>e)));this.rows=n,this.draw()}},{key:"draw",value:function(){const e=this.rows;if(!e)return;const t=nn().range([0,this.dimensions[1]]).padding(.1).domain(Gt(0,this.maxRows())),n=this.pMain;n.clear(),n.lineStyle(1,255,0),n.beginFill(16740363,.8);for(let r=0;rthis.fetchedTiles[e].tileData.discrete)),t=[].concat(...e);this.drawAll(t)}},{key:"initTile",value:function(e){}},{key:"maxRows",value:function(){return this.rows.length}},{key:"updateTile",value:function(e){}},{key:"destroyTile",value:function(e){e.tileData.discrete.forEach((e=>{const t=e[e.length-2];this.seen.has(t)&&this.seen.delete(t)}))}},{key:"drawTile",value:function(e){}}]),n}(cW),yq=function(){function e(t){d(this,e),this.scene=t.scene,this.originalTrack=t,this.pBase=new Rf.PIXI.Graphics,this.scene.removeChild(t.pBase),this.scene.addChild(this.pBase),this.moveToOrigin=new Rf.PIXI.Graphics,this.moveToOrigin.addChild(t.pBase),this.pBase.addChild(this.moveToOrigin),this.moveToOrigin.rotation=Math.PI/2,t.isLeftModified=!0,t.flipText=!0,this.svgOutput=null,t.gBase&&t.gMain&&(this.originalTrack.gBase.attr("transform",`translate(${this.moveToOrigin.position.x},${this.moveToOrigin.position.y})\n rotate(90)\n scale(${this.moveToOrigin.scale.x},${this.moveToOrigin.scale.y})`),this.originalTrack.gMain.attr("transform",`translate(${this.originalTrack.pBase.position.x},${this.originalTrack.pBase.position.y})`))}return f(e,[{key:"remove",value:function(){this.originalTrack.remove(),this.pBase.clear(),this.scene.removeChild(this.pBase)}},{key:"setDimensions",value:function(e){this.dimensions=e;const t=[e[1],e[0]];this.originalTrack.setDimensions(t)}},{key:"setPosition",value:function(e){this.position=e,this.originalTrack.setPosition(e),this.originalTrack.pBase.position.x=-this.originalTrack.position[0],this.originalTrack.pBase.position.y=-this.originalTrack.position[1],this.moveToOrigin.scale.y=-1,this.moveToOrigin.scale.x=1,this.moveToOrigin.position.x=this.originalTrack.position[0],this.moveToOrigin.position.y=this.originalTrack.position[1],this.originalTrack.gMain&&(this.originalTrack.gBase.attr("transform",`translate(${this.moveToOrigin.position.x},${this.moveToOrigin.position.y})\n rotate(90)\n scale(${this.moveToOrigin.scale.x},${this.moveToOrigin.scale.y})`),this.originalTrack.gMain.attr("transform",`translate(${this.originalTrack.pBase.position.x},${this.originalTrack.pBase.position.y})`))}},{key:"refXScale",value:function(e){return arguments.length?(this.originalTrack._refXScale=e,this):this.originalTrack._refYScale}},{key:"refYScale",value:function(e){return arguments.length?(this.originalTrack._refYScale=e,this):this.originalTrack._refXScale}},{key:"xScale",value:function(e){return arguments.length?(this.originalTrack._yScale=e,this):this.originalTrack._xScale}},{key:"yScale",value:function(e){return arguments.length?(this.originalTrack._xScale=e,this):this.originalTrack._yScale}},{key:"getMouseOverHtml",value:function(e,t){return this.originalTrack.getMouseOverHtml(t,e)}},{key:"clickOutside",value:function(){this.originalTrack.clickOutside()}},{key:"click",value:function(...e){this.originalTrack.click(...e)}},{key:"draw",value:function(){this.originalTrack.draw()}},{key:"zoomed",value:function(e,t,n=1,r=0,i=0,o=0,a=0){if(this.xScale(e),this.yScale(t),this.originalTrack.leftTrackZoomed)return this.originalTrack.refreshTiles&&this.originalTrack.refreshTiles(),this.originalTrack.leftTrackZoomed(e,t,n,r,i),void this.originalTrack.draw();const s=this.originalTrack._xScale(0)-n*this.originalTrack._refXScale(0);if(this.originalTrack.pMobile.position.x=s+this.originalTrack.position[0],this.originalTrack.pMobile.position.y=this.originalTrack.position[1]+this.originalTrack.dimensions[1],this.originalTrack.pMobile.scale.x=n,this.originalTrack.pMobile.scale.y=n,this.originalTrack.options.oneDHeatmapFlipped&&(this.originalTrack.pMobile.scale.y=-n,this.originalTrack.pMobile.position.y=this.originalTrack.position[1]),this.originalTrack.leftTrackDraw)return this.originalTrack.refreshTiles&&this.originalTrack.refreshTiles(),void this.originalTrack.leftTrackDraw();this.originalTrack.zoomed(this.xScale(),this.yScale())}},{key:"zoomedY",value:function(e,t){this.originalTrack.zoomedY(e,t)}},{key:"movedY",value:function(e){this.originalTrack.movedY(e)}},{key:"refScalesChanged",value:function(e,t){this.originalTrack.refScalesChanged(t,e)}},{key:"rerender",value:function(e){this.originalTrack.rerender(e)}},{key:"exportSVG",value:function(){const e=document.createElement("g");if(e.setAttribute("transform",`translate(${this.moveToOrigin.position.x},${this.moveToOrigin.position.y})\n rotate(90)\n scale(${this.moveToOrigin.scale.x},${this.moveToOrigin.scale.y})`),this.originalTrack.exportSVG){const t=document.createElement("g");t.setAttribute("transform",`translate(${this.originalTrack.pBase.position.x}, ${this.originalTrack.pBase.position.y})`),t.appendChild(this.originalTrack.exportSVG()[0]),e.appendChild(t)}return[e,e]}},{key:"respondsToPosition",value:function(e,t){return e>=this.position[0]&&e<=this.dimensions[0]+this.position[0]&&t>=this.position[1]&&t<=this.dimensions[1]+this.position[1]}}]),e}();const Tq="Arial",_q="outside",Eq=lm("#ffffff"),xq=2,wq=20/3*2/3,Sq="blue",kq="red",Aq=(e,t,n)=>{"filler"!==n.type&&t.pubSub.publish("app.click",{type:"gene-annotation",event:e,payload:n})},Cq=(e,t)=>{const n=e.concat(t),r=n.map((e=>[e.xStart,1,e.xEnd,1]));jY(r,((e,t)=>{let r=null,i=null;if("filler"===n[e].type?r=n[e]:i=n[e],"filler"===n[t].type){if(r)return;r=n[t]}else{if(!r)return;i=n[t]}r.xStart>=i.xStart&&r.xEnd<=i.xEnd&&(r.hide=!0)}))};function Iq(e,t,n,r,i,o,a,s,l){const c=s-l/2;e.forEach((e=>{const r=new Rf.PIXI.Graphics;n.rectGraphics.addChild(r),r.beginFill(o,.1),r.lineStyle(0,o);const a=[i(e.xStart)-0,c,i(e.xEnd)+0,c,i(e.xEnd)+0,c+l,i(e.xStart)-0,c+l,i(e.xStart)-0,c];r.interactive=!0,r.buttonMode=!0,r.mouseup=n=>Aq(n,t,e),r.drawPolygon(a),n.allRects.push([a,e.strand,e])}))}function Oq(e,t,n,r,i,o,a,s,l){e.forEach((e=>{const r=e.fields,i=+e.chrOffset,c=r[12],u=r[13],h=new Rf.PIXI.Graphics;n.rectGraphics.addChild(h),h.beginFill(o,a),h.interactive=!0,h.buttonMode=!0,h.mouseup=n=>Aq(n,t,e),n.allRects=n.allRects.concat(function(e,t,n,r,i,o,a,s,l,c){const u=s-l/2,h=i.split(",").map((e=>+e+a)),d=o.split(",").map((e=>+e+a)),p=e._xScale(n),f=e._xScale(r),m=f-p,g=s,b=[];let v=[p,g-xq/2,p+m,g-xq/2,p+m,g+xq/2,p,g+xq/2];t.drawPolygon(v),b.push(v);const y=2*l;for(let n=Math.max(e.position[0],p)+y;n[t,e.strand,e])))}))}function Dq(e,t,n,r,i,o,a,s,l){(function(e,t,n,r,i,o,a,s,l){const c=s-l/2;e.forEach((e=>{const r=t._xScale(e.xStart),i=t._xScale(e.xEnd),s=new Rf.PIXI.Graphics;n.rectGraphics.addChild(s),s.beginFill(o,a),s.interactive=!0,s.buttonMode=!0,s.mouseup=n=>Aq(n,t,e);const l=t.geneRectHeight/2;let u=[];if("+"===e.strand||"+"===e.fields[5]){const e=Math.max(r,i-l);u=[e,c,e+l,c+t.geneRectHeight/2,e,c+t.geneRectHeight]}else{const e=Math.min(i,r+l);u=[e,c,e-l,c+t.geneRectHeight/2,e,c+t.geneRectHeight]}s.drawPolygon(u),n.allRects.push([u,e.strand,e])}))})(e,t,n,0,0,o,a,s,l),Oq(e,t,n,0,0,o,a,s,l)}let Pq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{animate:o}=e;return i.animate=o,i.options=r,i.fontSize=+i.options.fontSize||11,i.geneLabelPos=i.options.geneLabelPosition||_q,i.geneRectHeight=+i.options.geneAnnotationHeight||10,i.geneRectHeight-=2,i.geneStrandSpacing=+i.options.geneStrandSpacing||4,i.geneStrandHSpacing=i.geneStrandSpacing/2,i.geneRectHHeight=i.geneRectHeight/2,i}return f(n,[{key:"initTile",value:function(e){(function(e,t,n){const{flipText:r,fontSize:i,fontFamily:o,plusStrandColor:a,minusStrandColor:s,maxGeneEntries:l,maxFillerEntries:c,maxTexts:u}=n;if(t.texts={},t.rectGraphics=new Rf.PIXI.Graphics,t.textBgGraphics=new Rf.PIXI.Graphics,t.textGraphics=new Rf.PIXI.Graphics,t.rectMaskGraphics=new Rf.PIXI.Graphics,t.graphics.addChild(t.rectGraphics),t.graphics.addChild(t.textBgGraphics),t.graphics.addChild(t.textGraphics),t.graphics.addChild(t.rectMaskGraphics),t.rectGraphics.mask=t.rectMaskGraphics,!t.tileData.sort)return;t.tileData.sort(((e,t)=>t.importance-e.importance));const h=t.tileData.filter((e=>"filler"!==e.type)).slice(0,l),d=t.tileData.filter((e=>"filler"===e.type)).slice(0,c);t.tileData=h.concat(d),t.tileData.forEach(((n,l)=>{if("filler"===n.type)return;const c=n.fields,h=c[3],d=e.geneId(c,n.type),p=n.strand||c[5];n.strand=n.strand||p;let f=a||Sq;if("-"===p&&(f=s||kq),t.textWidths={},t.textHeights={},l>=u)return;const m=new Rf.PIXI.Text(h,{fontSize:`${i}px`,fontFamily:o,fill:lm(f)});m.interactive=!0,r&&(m.scale.x=-1),m.anchor.x=.5,m.anchor.y=1,t.texts[d]=m,t.texts[d].strand=p,t.textGraphics.addChild(m)})),t.initialized=!0})(this,e,{flipText:this.flipText,fontSize:this.fontSize,fontFamily:Tq,plusStrandColor:this.options.plusStrandColor,minusStrandColor:this.options.minusStrandColor,maxGeneEntries:50,maxFillerEntries:5e3,maxTexts:20}),this.renderTile(e)}},{key:"destroyTile",value:function(e){e.rectGraphics.destroy(),e.rectMaskGraphics.destroy(),e.textGraphics.destroy(),e.textBgGraphics.destroy(),e.graphics.destroy()}},{key:"rerender",value:function(e,t){const i=JSON.stringify(e);(t||i!==this.prevOptions)&&(r(h(n.prototype),"rerender",this).call(this,e,t),this.fontSize=+this.options.fontSize||11,this.geneLabelPos=this.options.geneLabelPosition||_q,this.geneRectHeight=+this.options.geneAnnotationHeight||10,this.geneStrandHSpacing=this.geneStrandSpacing/2,this.geneRectHHeight=this.geneRectHeight/2,this.prevOptions=i,this.visibleAndFetchedTiles().forEach((e=>{this.renderTile(e)})))}},{key:"drawTile",value:function(){}},{key:"geneId",value:function(e,t){return`${t}_${e[0]}_${e[1]}_${e[2]}_${e[3]}`}},{key:"renderTile",value:function(e){if(!e.initialized)return;e.allRects=[],e.drawnAtScale=this._xScale.copy(),e.rectGraphics.removeChildren(),e.rectGraphics.clear(),e.textBgGraphics.clear();const t={};t["+"]=lm(this.options.plusStrandColor||Sq),t["-"]=lm(this.options.minusStrandColor||kq);let n=e.tileData.filter((e=>"filler"===e.type&&"+"===e.strand)),r=e.tileData.filter((e=>"filler"===e.type&&"-"===e.strand));const i=e.tileData.filter((e=>"filler"!==e.type&&("+"===e.strand||"+"===e.fields[5]))),o=e.tileData.filter((e=>"filler"!==e.type&&("-"===e.strand||"-"===e.fields[5])));Cq(i,n),Cq(o,r),n=n.filter((e=>!e.hide)),r=r.filter((e=>!e.hide));const a=this.dimensions[1]/2,s=a-this.geneRectHeight/2-this.geneStrandSpacing/2,l=a+this.geneRectHeight/2+this.geneStrandSpacing/2,c=[this,e,e.rectGraphics,this._xScale,t["+"],.3,s,this.geneRectHeight],u=[this,e,e.rectGraphics,this._xScale,t["-"],.3,l,this.geneRectHeight];Iq(n,...c),Iq(r,...u),c[5]=.3,u[5]=.3,Dq(i,...c),Dq(o,...u),function(e,t){const{tileX:n,tileWidth:r}=Kj.getTilePosAndDimensions(e.tilesetInfo,t.tileId);t.rectMaskGraphics.clear();const i=Math.floor(Math.random()*16**6);t.rectMaskGraphics.beginFill(i,.3);const o=e._xScale(n),a=e._xScale(n+r)-e._xScale(n),s=e.dimensions[1];t.rectMaskGraphics.drawRect(o,0,a,s)}(this,e),Kj.stretchRects(this,[e=>e.rectGraphics,e=>e.rectMaskGraphics]);for(const t of Object.values(e.texts))t.style={fontSize:`${this.fontSize}px`,FONT_FAMILY:Tq,fill:lm("-"===t.strand?this.options.minusStrandColor||kq:this.options.plusStrandColor||Sq)}}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]);let t=Math.min(e,this.maxZoom);return t=Math.max(t,0),t}},{key:"draw",value:function(){r(h(n.prototype),"draw",this).call(this),this.allTexts=[],this.allBoxes=[];const e=[];this.geneAreaHeight=this.geneRectHeight;const t=this.fontSize/2;Kj.stretchRects(this,[e=>e.rectGraphics,e=>e.rectMaskGraphics]),Object.values(this.fetchedTiles).filter((e=>e.drawnAtScale)).forEach((n=>{n.textBgGraphics.clear(),n.textBgGraphics.beginFill(void 0!==this.options.labelBackgroundColor?lm(this.options.labelBackgroundColor):Eq);const r=this.parentInFetched(n);n.initialized&&n.tileData.forEach((i=>{if(!n.texts)return;if("filler"===i.type)return;const o=i.fields,a=o[3],s=this.geneId(o,i.type),l=n.texts[s];if(!l)return;const c=+i.chrOffset,u=(+o[1]+c+(+o[2]+c))/2;let h=this.dimensions[1]/2;const d=(this.geneAreaHeight-this.fontSize)/2;if("+"===o[5]?h-="inside"===this.geneLabelPos?d+this.geneStrandSpacing-2:this.fontSize/2+this.geneAreaHeight-2:h+="inside"===this.geneLabelPos?this.fontSize+this.geneStrandSpacing/2+d+1:1.5*this.fontSize+this.geneAreaHeight+2,l.position.x=this._xScale(u),l.position.y=h,!n.textWidths[s]){const e=l.getBounds().width,t=l.getBounds().height;n.textHeights[s]=t,n.textWidths[s]=e}if(r)l.visible=!1;else{l.visible=!0;const r=2;this.flipText?this.allBoxes.push([l.position.x-n.textHeights[s]/2-r,h-t-1,l.position.x+n.textHeights[s]/2+r,h+t-1,a]):this.allBoxes.push([l.position.x-n.textWidths[s]/2-r,h-t-1,l.position.x+n.textWidths[s]/2+r,h+t-1,a]),this.allTexts.push({importance:+o[4],text:l,caption:a,strand:o[5]}),e.push(n.textBgGraphics)}}))})),this.hideOverlaps(this.allBoxes,this.allTexts),this.renderTextBg(this.allBoxes,this.allTexts,e)}},{key:"renderTextBg",value:function(e,t,n){t.forEach(((t,r)=>{if(t.text.visible&&e[r]&&n[r]){const[t,i,o,a]=e[r],s=o-t,l=a-i;n[r].drawRect(t-s/2,i-l/2,s,l)}}))}},{key:"hideOverlaps",value:function(e,t){jY(e,((e,n)=>{t[e].importance>t[n].importance?t[n].text.visible=!1:t[e].text.visible=!1}))}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),[this.pMain.position.x,this.pMain.position.y]=this.position}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e),this.halfRectHHeight=this.dimensions[1]/2,this.visibleAndFetchedTiles().forEach((e=>{this.renderTile(e)}))}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.refreshTiles(),this.draw()}},{key:"getMouseOverHtml",value:function(e,t){if(!this.tilesetInfo)return"";const n=[e,t];for(const e of this.visibleAndFetchedTiles())for(let t=0;t\n ${n.fields[3]}
\n Position: ${n.fields[0]}:${n.fields[1]}-${n.fields[2]}
\n Strand: ${n.fields[5]}\n \n `}}return""}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t);const i=document.createElement("g");return i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`),e.appendChild(i),this.visibleAndFetchedTiles().filter((e=>e.allRects)).forEach((e=>{const t=document.createElement("g");t.setAttribute("transform",`translate(${e.rectGraphics.position.x},\n ${e.rectGraphics.position.y})\n scale(${e.rectGraphics.scale.x},\n ${e.rectGraphics.scale.y})`),e.allRects.forEach((e=>{const n=document.createElement("path"),r=e[0];let i=`M ${r[0]} ${r[1]}`;for(let e=2;ee.text.visible)).forEach((e=>{const t=document.createElement("g"),n=document.createElement("text");n.setAttribute("text-anchor","middle"),n.setAttribute("font-family",Tq),n.setAttribute("font-size",`${this.fontSize}px`),n.setAttribute("dy","-.2em"),t.setAttribute("transform",`scale(${e.text.scale.x},1)`),"+"===e.strand?n.setAttribute("fill",this.options.plusStrandColor):n.setAttribute("fill",this.options.minusStrandColor),n.innerHTML=e.text.text,t.appendChild(n),t.setAttribute("transform",`translate(${e.text.x},${e.text.y})scale(${e.text.scale.x},1)`),i.appendChild(t)})),[t,t]}}]),n}(cW);function Nq(e,t,n,r,i,o,a,s,l,c){const u=c?e._xScale(n.yStart):e._xScale(n.xStart),h=c?e._xScale(n.yEnd):e._xScale(n.xEnd),d=c?e._yScale(n.xStart):e._yScale(n.yStart),p=c?e._yScale(n.xEnd):e._yScale(n.yEnd),f=n.uid+c,m=h-u,g=p-d;let b={x:u,y:d,width:m,height:g};r&&(mi&&b.xi&&va&&b.ya&&yl||b.height>l)&&(t.drawRect(b.x,b.y,b.width,b.height),e.publish("annotationDrawn",{trackUuid:e.uuid,annotationUuid:f,viewPos:[b.x,b.y,b.width,b.height],dataPos:[n.xStart,n.xEnd,n.yStart,n.yEnd],importance:n.importance,info:{patternType:e.options.patternType}}))}let Rq=function(e){i(n,e);var t=o(n);function n(...e){var r;d(this,n),(r=t.call(this,...e)).drawnRects={};const{publish:i,subscribe:o,unsubscribe:a}=gh();return r.publish=i,r.subscribe=o,r.unsubscribe=a,r}return f(n,[{key:"tileToLocalId",value:function(e){return`${e.join(".")}`}},{key:"tileToRemoteId",value:function(e){return`${e.join(".")}`}},{key:"localToRemoteId",value:function(e){const t=e.split(".");return t.slice(0,t.length-1).join(".")}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),t=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1]);let n=Math.max(e,t);return n=Math.min(n,this.maxZoom),n}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e)}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.remoteId)))}},{key:"calculateVisibleTiles",value:function(){if(!this.tilesetInfo)return;this.zoomLevel=this.calculateZoomLevel(),this.xTiles=mg.calculateTiles(this.zoomLevel,this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width),this.yTiles=mg.calculateTiles(this.zoomLevel,this._yScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width);const e=this.xTiles,t=this.yTiles,n=this.zoomLevel,r=[];for(let i=0;i!(e.uid in this.drawnRects))).forEach((e=>{Nq(this,t,e,i,a,s,l,c,o,"yes"===this.options.flipDiagonal),this.options.flipDiagonal&&"copy"===this.options.flipDiagonal&&Nq(this,t,e,i,a,s,l,c,o,!0)}))}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t);const i=document.createElement("g");i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`),e.appendChild(i);for(const e of[!0,!1])for(const t of this.visibleAndFetchedTiles())t.tileData&&t.tileData.length&&t.tileData.forEach((n=>{const r=n.uid+e,o=document.createElement("g");if(o.setAttribute("transform",`translate(${t.graphics.position.x},${t.graphics.position.y})scale(${t.graphics.scale.x},${t.graphics.scale.y})`),i.appendChild(o),r in this.drawnRects){const e=this.drawnRects[r],t=document.createElement("rect");t.setAttribute("x",e.x),t.setAttribute("y",e.y),t.setAttribute("width",e.width),t.setAttribute("height",e.height),t.setAttribute("fill",this.options.rectangleDomainFillColor?this.options.rectangleDomainFillColor:"grey"),t.setAttribute("opacity",.3),t.style.stroke="black",t.style.strokeWidth="1px",o.appendChild(t)}}));return[t,t]}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0]}},{key:"zoomed",value:function(e,t){this.xScale().domain()[0]===e.domain()[0]&&this.xScale().domain()[1]===e.domain()[1]&&this.yScale().domain()[0]===t.domain()[0]&&this.yScale().domain()[1]===t.domain()[1]||(this.xScale(e),this.yScale(t),this.refreshTiles(),this.draw())}},{key:"leftTrackDraw",value:function(){this.draw()}}]),n}(eW);let Mq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{pubSub:o}=e;i.drawnAnnotations={},i.drawnAnnoGfx={},i.selectedAnno=null,i.options.minSquareSize=+i.options.minSquareSize;const{publish:s,subscribe:l,unsubscribe:c}=gh();return i.publish=s,i.subscribe=l,i.unsubscribe=c,i.sT=0,i.annoSelectedBound=i.annoSelected.bind(a(i)),i.pubSubs.push(o.subscribe("annoSelected",i.annoSelectedBound)),i}return f(n,[{key:"minX",get:function(){return this.tilesetInfo&&this.tilesetInfo.min_pos?this.tilesetInfo.min_pos[0]:0}},{key:"maxX",get:function(){return this.tilesetInfo&&this.tilesetInfo.max_pos?this.tilesetInfo.max_pos[0]:this.tilesetInfo.max_width||this.tilesetInfo.max_size}},{key:"minY",get:function(){return this.minX}},{key:"maxY",get:function(){return this.maxX}},{key:"maxSize",get:function(){return this.tilesetInfo.max_pos&&Math.max(this.tilesetInfo.max_pos[0]-this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[1]-this.tilesetInfo.min_pos[1])||(this.tilesetInfo.max_size?this.tilesetInfo.max_size:0)}},{key:"projection",value:function([e,t]){return[this._xScale(e),this._yScale(t)]}},{key:"tileToLocalId",value:function(e){return`${e.join(".")}`}},{key:"tileToRemoteId",value:function(e){return`${e.join(".")}`}},{key:"localToRemoteId",value:function(e){const t=e.split(".");return t.slice(0,t.length-1).join(".")}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.minX,this.maxX),t=mg.calculateZoomLevel(this._yScale,this.minY,this.maxY);return Mg(Ng(e,t),this.maxZoom)}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e)}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.tileId)))}},{key:"calculateVisibleTiles",value:function(){if(!this.tilesetInfo)return;this.zoomLevel=this.calculateZoomLevel(),this.xTiles=mg.calculateTiles(this.zoomLevel,this._xScale,this.minX,this.maxX,this.tilesetInfo.max_zoom,this.maxSize),this.yTiles=mg.calculateTiles(this.zoomLevel,this._yScale,this.minY,this.maxY,this.tilesetInfo.max_zoom,this.maxSize);const e=this.zoomLevel,t=[];for(let n=0;n!(e.uid in this.drawnAnnotations)||t)).forEach((e=>{const[t,i]=this.projection([e.xStart,e.yStart]),[o,a]=this.projection([e.xEnd,e.yEnd]);this.options.exclude&&this.options.exclude.indexOf(e.uid)>=0||this.drawAnnotation(this.prepAnnotation(r,e.uid,t,i,o-t,a-i,e),n)}))}},{key:"prepAnnotation",value:function(e,t,n,r,i,o,a){let s;try{s=JSON.parse(a.fields)}catch(e){}return{graphics:e,id:a.id,uid:t,annotation:{x:n,y:r,width:i,height:o},dataPos:[a.xStart,a.xEnd,a.yStart,a.yEnd],importance:a.importance,info:s}}},{key:"drawAnnotation",value:function({graphics:e,id:t,uid:n,annotation:r,dataPos:i,importance:o,info:a},s){this.options.minSquareSize&&(r.widththis.hover(c,l,n),c.mouseout=()=>this.blur(c,l,n),c.mousedown=()=>this.mouseDown(),c.mouseup=e=>this.mouseUp(c,l,n,e,u),s||this.publish("annotationDrawn",{trackUuids:this.uuid,annotationUuid:n,annotationId:t,viewPos:l,dataPos:i,importance:o,info:a})}},{key:"_drawRect",value:function(e,t,n){let r=this.options.rectangleDomainStrokeColor,i=this.options.rectangleDomainStrokeWidth,o=this.options.rectangleDomainStrokeOpacity,a=this.options.rectangleDomainFillColor,s=this.options.rectangleDomainFillOpacity;this.hoveredAnno===n&&(r=this.options.hoverColor,i=this.options.rectangleDomainStrokeWidth+1||2,o=1,a=this.options.hoverColor,s=this.options.rectangleDomainFillOpacity),this.selectedAnno&&this.selectedAnno.uid===n&&(r=this.options.selectColor,i=this.options.rectangleDomainStrokeWidth+1||2,o=1,a=this.options.selectColor,s=Ng(.33,this.options.rectangleDomainFillOpacity)),e.clear(),this.options.trackBorderBgWidth&&(this.setBorderStyle(e,this.options.trackBorderBgColor,this.options.trackBorderBgWidth,this.options.trackBorderBgAlpha),this.setFill(e,a,0),e.drawRect(...t)),this.setBorderStyle(e,r,i,o),this.setFill(e,a,s),e.drawRect(...t),e.__viewPos__=t}},{key:"context",value:function(e,t,n){return r=>r(e,t,n)}},{key:"click",value:function(e,t,n,r,i){this.select(e,t,n),this.pubSub.publish("app.click",{type:"annotation",event:r,payload:i})}},{key:"mouseDown",value:function(){this.sT=performance.now()}},{key:"mouseUp",value:function(e,t,n,r,i){performance.now()-this.sT<=250&&this.click(e,t,n,r,i)}},{key:"hover",value:function(e,t,n){this.hoveredAnno=n,this._drawRect(e,t,n),this.animate()}},{key:"focus",value:function(e,t,n){this._drawRect(e,t,n),this.animate()}},{key:"blur",value:function(e,t,n){this.hoveredAnno=null,this._drawRect(e,t,n),this.animate()}},{key:"select",value:function(e,t,n,r=!1){let i=null,o=null;this.selectedAnno&&(i=this.selectedAnno.graphics,o=this.selectedAnno.uid),this.selectedAnno={graphics:e,uid:n},this.focus(e,t,n),this.options.onSelect&&!r&&(window[this.options.onSelect](n),this.pubSub.publish("annoSelected",n)),i&&o&&this.blur(i,i.__viewPos__,o)}},{key:"unselect",value:function(){const e=this.selectedAnno.graphics,t=this.selectedAnno.uid;this.selectedAnno=null,this.blur(e,e.__viewPos__,t)}},{key:"annoSelected",value:function(e){if(!this.selectedAnno||this.selectedAnno.uid!==e){this.selectedAnno&&this.unselect();const t=this.drawnAnnoGfx[e];t&&this.select(t,t.__viewPos__,e,!0)}}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t);const i=document.createElement("g");return i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`),e.appendChild(i),this.visibleAndFetchedTiles().filter((e=>e.tileData&&e.tileData.length)).map((e=>({graphics:e.graphics,td:e.tileData}))).forEach((({td:e,graphics:t})=>{const n=document.createElement("g");if(n.setAttribute("transform",`translate(${t.position.x},${t.position.y})scale(${t.scale.x},${t.scale.y})`),i.appendChild(n),e.uid in this.drawnAnnotations){const t=this.drawnAnnotations[e.uid],r=document.createElement("rect");r.setAttribute("x",t.x),r.setAttribute("y",t.y),r.setAttribute("width",t.width),r.setAttribute("height",t.height),r.setAttribute("fill",this.options.fillColor||"grey"),r.setAttribute("opacity",.3),r.style.stroke=this.options.fillColor||"grey",r.style.strokeWidth="1px",n.appendChild(r)}})),[t,t]}},{key:"setBorderStyle",value:function(e,t=this.options.rectangleDomainStrokeColor,n=this.options.rectangleDomainStrokeWidth,r=this.options.rectangleDomainStrokeOpacity){e.lineStyle(void 0!==n?n:1,lm(t||"black"),void 0!==r?r:1)}},{key:"setFill",value:function(e,t=this.options.rectangleDomainFillColor,n=this.options.rectangleDomainFillOpacity){e.beginFill(lm(t||"grey"),void 0!==n?n:.4)}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0]}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.refreshTiles(),this.draw()}}]),n}(eW),Lq=function(e){i(n,e);var t=o(n);function n(e,r,i){var o;return d(this,n),(o=t.call(this,e,r)).pubSub=e.pubSub,o.options=r,o.isVertical=i,o.rects={},o.defaultColor=xn("red"),o}return f(n,[{key:"draw",value:function(){const e=void 0!==this.options.minRectWidth?this.options.minRectWidth:10,t=void 0!==this.options.fill?xn(this.options.fill):this.defaultColor,i=void 0!==this.options.fillOpacity?+this.options.fillOpacity:.2,o=void 0!==this.options.stroke?xn(this.options.stroke):this.defaultColor,a=void 0!==this.options.strokeWidth?+this.options.strokeWidth:1,s=void 0!==this.options.strokeOpacity?+this.options.strokeOpacity:0;let l;this.options.strokePos&&this.options.strokePos.length&&(l=Array.isArray(this.options.strokePos)?this.options.strokePos:[this.options.strokePos]),r(h(n.prototype),"draw",this).call(this);const c=this.pMain;c.clear();const u=performance.now();this.options.regions.forEach((n=>{const r=`${n[0]}-${n[1]}`;this.rects[r]||(this.rects[r]={graphics:new Rf.PIXI.Graphics},c.addChild(this.rects[r].graphics)),this.rects[r].timeStamp=u;const h=xn(n[2])||t;let d=xn(n[3])||o;d||(d=h);const p=Rf.PIXI.utils.rgb2hex([h.r/255,h.g/255,h.b/255]),f=Rf.PIXI.utils.rgb2hex([d.r/255,d.g/255,d.b/255]);l?(c.lineStyle(1,f,0),c.beginFill(f,+n[5]||s)):(c.lineStyle(a,f,+n[5]||s),c.beginFill(p,+n[4]||i));const m=this.isVertical?this._yScale:this._xScale;let g=m(+n[0]);const b=m(+n[1]);let v=b-g;const y=void 0!==n[6]?n[6]:e;v{"top"!==e&&"around"!==e||(this.isVertical?c.drawRect(0,g,a,v):c.drawRect(g,0,v,a)),"right"!==e&&"around"!==e||(this.isVertical?c.drawRect(0,g,this.dimensions[0],a):c.drawRect(g,0,a,this.dimensions[1])),"bottom"!==e&&"around"!==e||(this.isVertical?c.drawRect(this.dimensions[0]-a,g,a,v):c.drawRect(g,this.dimensions[1]-a,v,a)),"left"!==e&&"around"!==e||(this.isVertical?c.drawRect(0,g+v-a,this.dimensions[0],a):c.drawRect(g+v-a,0,a,this.dimensions[1]))}))):c.lineStyle(a,f,+n[5]||s),this.rects[r].graphics.clear(),this.rects[r].graphics.interactive=!0,this.rects[r].graphics.buttonMode=!0,c.beginFill(p,+n[4]||i),this.isVertical?(c.drawRect(0,g,this.dimensions[0],v),this.rects[r].graphics.hitArea=new Rf.PIXI.Rectangle(0,g,this.dimensions[0],v)):(c.drawRect(g,0,v,this.dimensions[1]),this.rects[r].graphics.hitArea=new Rf.PIXI.Rectangle(g,0,v,this.dimensions[1])),this.rects[r].graphics.mousedown=()=>{this.rects[r].mouseDownTime=performance.now()},this.rects[r].graphics.mouseup=e=>{performance.now()-this.rects[r].mouseDownTime<300&&this.pubSub.publish("app.click",{type:"annotation",event:e,payload:n})}})),Object.values(this.rects).filter((e=>e.timeStamp!==u)).forEach((e=>c.removeChild(e.graphics)))}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0]}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}}]),n}(LH),Bq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).drawnRects=new Set,i.pMain=i.pMobile,i}return f(n,[{key:"tileToLocalId",value:function(e){return`${e.join(".")}`}},{key:"tileToRemoteId",value:function(e){return`${e.join(".")}`}},{key:"localToRemoteId",value:function(e){const t=e.split(".");return t.slice(0,t.length-1).join(".")}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),t=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1]);let n=Math.max(e,t);return n=Math.min(n,this.maxZoom),this.options&&this.options.maxZoom&&(this.options.maxZoom>=0?n=Math.min(this.options.maxZoom,n):console.error("Invalid maxZoom on track:",this)),n}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e)}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.tileId)))}},{key:"calculateVisibleTiles",value:function(){if(!this.tilesetInfo)return;this.zoomLevel=this.calculateZoomLevel();const e=this._xScale.copy();e.domain([this._xScale.invert(this._xScale.range()[0]-this.dimensions[1]*Math.sqrt(2)),this._xScale.invert(this._xScale.range()[1]+this.dimensions[1]*Math.sqrt(2))]),this.xTiles=mg.calculateTiles(this.zoomLevel,e,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width),this.yTiles=mg.calculateTiles(this.zoomLevel,e,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width);const t=this.xTiles,n=this.yTiles,r=this.zoomLevel,i=this.tilesetInfo.max_width/2**r,o=[];for(let e=0;ethis.dimensions[1])continue;const s=[r,t[e],n[a]];s.mirrored=!1,o.push(s)}this.setVisibleTiles(o)}},{key:"initTile",value:function(e){r(h(n.prototype),"initTile",this).call(this,e),this.drawTile(e)}},{key:"destroyTile",value:function(e,t){}},{key:"draw",value:function(){this.delayDrawing||this.drawnRects.clear(),r(h(n.prototype),"draw",this).call(this)}},{key:"drawTile",value:function(e){if(!e.graphics)return;const t=e.graphics;t.clear();const n=lm(this.options.rectangleDomainStrokeColor?this.options.rectangleDomainStrokeColor:"black"),r=lm(this.options.rectangleDomainFillColor?this.options.rectangleDomainFillColor:"grey");if(t.lineStyle(1/this.pMain.scale.x,n,1),t.beginFill(r,.4),t.alpha=this.options.rectangleDomainOpacity?this.options.rectangleDomainOpacity:.5,e.tileData.sort)for(const n of e.tileData){const e=this._refXScale(n.xStart),r=this._refXScale(n.xEnd),i=this._refYScale(n.yStart),o=this._refYScale(n.yEnd),a=n.uid;this.drawnRects.has(a)||(this.drawnRects.add(a),t.drawRect(e,i,r-e,o-i),t.pivot.x=this._refXScale(0),t.pivot.y=this._refYScale(0),t.scale.x=-1/Math.sqrt(2),t.rotation=-3*Math.PI/4,t.scale.y=1/Math.sqrt(2),t.position.x=this._refXScale(0),t.position.y=0)}}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0]}},{key:"refScalesChanged",value:function(e,t){r(h(n.prototype),"refScalesChanged",this).call(this,e,t);for(const e in this.fetchedTiles){const t=this.fetchedTiles[e];if(t.sprite){const e=t.graphics;e.pivot.x=this._refXScale(0),e.pivot.y=this._refYScale(0),e.scale.x=-1/Math.sqrt(2),e.rotation=-3*Math.PI/4,e.scale.y=1/Math.sqrt(2),e.position.x=this._refXScale(0),e.position.y=0}}}},{key:"zoomed",value:function(e,t,i,o,a){r(h(n.prototype),"zoomed",this).call(this,e,t,i,o,a),this.pMain.position.x=o,this.pMain.position.y=this.position[1]+this.dimensions[1],this.pMain.scale.x=i,this.pMain.scale.y=i,this.options.oneDHeatmapFlipped&&(this.pMain.scale.y=-i,this.pMain.position.y=this.position[1]),this.draw()}},{key:"leftTrackDraw",value:function(){this.draw()}}]),n}(eW),Fq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).drawnRects=new Set,i}return f(n,[{key:"tileToLocalId",value:function(e){return`${e.join(".")}`}},{key:"tileToRemoteId",value:function(e){return`${e.join(".")}`}},{key:"localToRemoteId",value:function(e){const t=e.split(".");return t.slice(0,t.length-1).join(".")}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),t=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1]);let n=Math.max(e,t);return n=Math.min(n,this.maxZoom),n}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e)}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.tileId)))}},{key:"calculateVisibleTiles",value:function(e=!0){if(!this.tilesetInfo)return;this.zoomLevel=this.calculateZoomLevel(),this.xTiles=mg.calculateTiles(this.zoomLevel,this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width),this.yTiles=mg.calculateTiles(this.zoomLevel,this._yScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width);const t=this.xTiles,n=this.yTiles,r=this.zoomLevel,i=[];for(let e=0;er.chrPositions?bf(e,r):null,chrToAbs:([e,t]=[])=>r.chrPositions?Ef(e,t,r):null};return mg.text(e,((e,n)=>{if(e)t&&t(null);else{const e=Qg(jm(n));Object.keys(e).forEach((t=>{r[t]=e[t]})),t&&t(r)}}),n).then((()=>r))}let jq=function(){function e(t){d(this,e),this.chromInfo=t,this.chromInfoBisector=We((e=>e.pos)).left}return f(e,[{key:"scalesToPositionText",value:function(e,t,n=!1){if(null===this.chromInfo)return"";if(!e||!t)return"";const r=bf(e.domain()[0],this.chromInfo),i=bf(e.domain()[1],this.chromInfo),o=bf(t.domain()[0],this.chromInfo),a=bf(t.domain()[1],this.chromInfo);let s=null;const l=ni(",d");return s=r[0]!==i[0]?`${r[0]}:${l(Math.floor(r[1]))}-${i[0]}:${l(Math.ceil(i[1]))}`:`${r[0]}:${l(Math.floor(r[1]))}-${l(Math.ceil(i[1]))}`,n&&(o[0]!==a[0]?s+=` & ${o[0]}:${l(Math.floor(o[1]))}-${a[0]}:${l(Math.ceil(a[1]))}`:s+=` & ${o[0]}:${l(Math.floor(o[1]))}-${l(Math.ceil(a[1]))}`),(r[2]<=0||i[2]>0||n&&(o[2]<=0||a[2]>0))&&(s+=` [offset ${r[2]},${i[2]}`,n&&(s+=`:${o[2]},${a[2]}`),s+="]"),s}},{key:"convertNumberNotation",value:function(e){let t=e;if(!t.includes("M",t.length-1)&&!t.includes("K",t.length-1))return t;let n=0,r=0;if(t.includes("M",t.length-1)?(n=6,t=t.replace("M","")):(n=3,t=t.replace("K","")),Number.isNaN(+t))return e;t=(+t).toString(),t.includes(".")&&(r=t.length-1-t.indexOf("."),t=(+t.replace(".","")).toString());const i=n-r;return i<0?e:(t+="0".repeat(i),t)}},{key:"parsePosition",value:function(e,t=null){const n=e.split(":");let r=null,i=0;n.length>1?(r=n[0],i=+this.convertNumberNotation(n[1].replace(/,/g,""))):n[0]in this.chromInfo.chrPositions?(r=n[0],i=0,null!==t&&(i=+this.chromInfo.chromLengths[r])):(i=+this.convertNumberNotation(n[0].replace(/,/g,"")),r=null,t&&(r=t));let o=null;return null===r?(r=t,o=i):r in this.chromInfo.chrPositions&&(o=this.chromInfo.chrPositions[r].pos+i),[r,i,o]}},{key:"matchRangesToLarger",value:function(e,t){if(e[1]-e[0]e.length>0));let n=null;if(0===t[0].indexOf("-")&&(t[0]=t[0].slice(3,t[0].length)),t.length>1){let[e,n,r]=this.parsePosition(t[0]),[i,o,a]=this.parsePosition(t[1],e);const s=[r,a];[e,n,r]=this.parsePosition(t[1]),[i,o,a]=this.parsePosition(t[0],e),null===e&&null!==i&&([e,n,r]=this.parsePosition(t[1],i));const l=[r,a];return l[1]-l[0]>s[1]-s[0]?l:s}if(t[0]in this.chromInfo.chrPositions){const e=+this.chromInfo.chrPositions[t[0]].pos;n=[e,e+ +this.chromInfo.chromLengths[t[0]]]}else{const[e,r,i]=this.parsePosition(t[0]);n=[i-8e6,i+8e6]}return n[0]>n[1]?[n[1],n[0]]:n}},{key:"parseOffset",value:function(e){const t=e.split(":");if(0===t.length)return[[0,0],[0,0]];if(1===t.length){const e=t[0].split(",");return[[+e[0],+e[1]],[0,0]]}const n=t[0].split(","),r=t[1].split(",");return[[+n[0],+n[1]],[+r[0],+r[1]]]}},{key:"searchPosition",value:function(e){let t=null,n=null;e=e.trim();const r=/\[offset (.+?)\]/.exec(e);let i=[[0,0],[0,0]];r&&(e=e.replace(r[0],""),i=this.parseOffset(r[1]));const o=e.split(" & ");return o.length>1?(t=this.getSearchRange(o[0].split(" ")[0]),n=this.getSearchRange(o[1].split(" ")[0])):t=this.getSearchRange(o[0]),null!==t&&null!==n&&([t,n]=this.matchRangesToLarger(t,n)),t&&(t[0]+=i[0][0],t[1]+=i[0][1]),n&&(n[0]+=i[1][0],n[1]+=i[1][1]),[t,n]}}]),e}(),Hq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{dataConfig:o,animate:a,pubSub:s}=e;return i.searchField=null,i.chromInfo=null,i.animate=a,Uq(`${o.server}/chrom-sizes/?id=${o.tilesetUid}`,(e=>{i.chromInfo=e,i.searchField=new jq(i.chromInfo),i.draw(),i.texts=[];for(let e=0;ethis.dimensions[0]?c.x-=s+h-this.dimensions[0]:s-h<0&&(c.x-=s-h),l+d>this.dimensions[1]?c.y-=l+d-this.dimensions[1]:l-d<0&&(c.y-=l-d),c.visible=!0,e.push({importance:this.texts[o][t].hashValue,text:this.texts[o][t],caption:null})}this.hideOverlaps(e)}},{key:"hideOverlaps",value:function(e){let t=[];t=e.map((e=>{const t=e.text;t.updateTransform();const n=t.getBounds();return[n.x,n.y,n.x+n.width,n.y+n.height]})),jY(t,((t,n)=>{e[t].importance>e[n].importance?e[n].text.visible=0:e[t].text.visible=0}))}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0]}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}}]),n}(LH),Gq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{chromInfoPath:o,dataConfig:a,animate:s,pubSub:l,orientation:c="2d",isOverlay:u=!1}=e;i.searchField=null,i.chromInfo=null,i.animate=s,i.orientation=c,i.isOverlay=u;let h=o;return h||(h=`${a.server}/chrom-sizes/?id=${a.tilesetUid}`),Uq(h,(e=>{i.chromInfo=e,i.searchField=new jq(i.chromInfo),i.texts=[],i.lineGraphics=new Rf.PIXI.Graphics,i.lineGraphics1dH=new Rf.PIXI.Graphics,i.lineGraphics1dV=new Rf.PIXI.Graphics,i.lineGraphics2d=new Rf.PIXI.Graphics,i.mask1dH=new Rf.PIXI.Graphics,i.mask1dV=new Rf.PIXI.Graphics,i.mask2d=new Rf.PIXI.Graphics,i.lineGraphics.addChild(i.lineGraphics1dH),i.lineGraphics1dH.addChild(i.mask1dH),i.lineGraphics.addChild(i.lineGraphics1dV),i.lineGraphics1dV.addChild(i.mask1dV),i.lineGraphics.addChild(i.lineGraphics2d),i.lineGraphics2d.addChild(i.mask2d),i.pMain.addChild(i.lineGraphics),i.draw(),i.animate()}),l),i}return f(n,[{key:"drawLines",value:function(e=this.orientation,t=0,n=0){let r=this.lineGraphics;this.isOverlay&&"1d-horizontal"===e&&(r=this.lineGraphics1dH),this.isOverlay&&"1d-vertical"===e&&(r=this.lineGraphics1dV),this.isOverlay&&"2d"===e&&(r=this.lineGraphics2d);const i=lm(this.options.lineStrokeColor?this.options.lineStrokeColor:"blue"),o=this.options.lineStrokeWidth?this.options.lineStrokeWidth:1;r.lineStyle(o,i,1),"2d"!==e&&"1d-horizontal"!==e||(r.moveTo(this._xScale(0)+t,n),r.lineTo(this._xScale(0)+t,this.dimensions[1]+n)),"2d"!==e&&"1d-vertical"!==e||(r.moveTo(t,this._yScale(0)+n),r.lineTo(this.dimensions[0]+t,this._yScale(0)+n));for(let i=0;i0&&t0&&t0&&t0&&t{i.chromInfo=e,i.draw()}),i.pubSub),i}return f(n,[{key:"draw",value:function(){if(!this.chromInfo)return;const e=this.options.minRectWidth?this.options.minRectWidth:10,t=this.options.minRectWidth?this.options.minRectHeight:10;r(h(n.prototype),"draw",this).call(this);const i=this.pMain;i.clear();const o=performance.now();this.options.regions.forEach((n=>{const r=n.slice(0,6).join("-");this.rects[r]||(this.rects[r]={graphics:new Rf.PIXI.Graphics},i.addChild(this.rects[r].graphics)),this.rects[r].timeStamp=o;const a=xn(n[6]);let s=xn(n[7]);s||(s=a);const l=Rf.PIXI.utils.rgb2hex([a.r/255,a.g/255,a.b/255]),c=Rf.PIXI.utils.rgb2hex([s.r/255,s.g/255,s.b/255]);i.lineStyle(1,c,s.opacity),i.beginFill(l,a.opacity);let u=this._xScale(this.chromInfo.chrPositions[n[0]].pos+ +n[1]);const h=this._xScale(this.chromInfo.chrPositions[n[0]].pos+ +n[2]);let d=this._yScale(this.chromInfo.chrPositions[n[3]].pos+ +n[4]);const p=this._yScale(this.chromInfo.chrPositions[n[3]].pos+ +n[5]);let f=h-u,m=p-d;const g=void 0!==n[8]?n[8]:e,b=void 0!==n[9]?n[9]:t;f{this.rects[r].mouseDownTime=performance.now()},this.rects[r].graphics.mouseup=e=>{performance.now()-this.rects[r].mouseDownTime<300&&this.pubSub.publish("app.click",{type:"annotation",event:e,payload:n})}}))}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0]}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}}]),n}(LH);const Vq=7829367;let Wq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{dataConfig:o,animate:s,chromInfoPath:l,isShowGlobalMousePosition:c}=e;i.searchField=null,i.chromInfo=null,i.dataConfig=o,i.pTicks=new Rf.PIXI.Graphics,i.pMain.addChild(i.pTicks),i.gTicks={},i.tickTexts={},i.options=r,i.isShowGlobalMousePosition=c,i.textFontSize=12,i.textFontFamily="Arial",i.textFontColor="#808080",i.textStrokeColor=i.getTheme()===Pf?"#000000":"#ffffff",i.pixiTextConfig={fontSize:+i.options.fontSize?+i.options.fontSize+"px":`${i.textFontSize}px`,fontFamily:i.textFontFamily,fill:i.options.color||i.textFontColor,lineJoin:"round",stroke:i.options.stroke||i.textStrokeColor,strokeThickness:2},i.stroke=lm(i.pixiTextConfig.stroke),i.tickWidth=200,i.tickHeight=6,i.tickTextSeparation=2,i.tickColor=i.options.tickColor?lm(i.options.tickColor):Vq,i.animate=s,i.pubSubs=[],i.options.showMousePosition&&!i.hideMousePosition&&(i.hideMousePosition=rb(a(i),i.is2d,i.isShowGlobalMousePosition()));let u=l;return u||(u=`${o.server}/chrom-sizes/?id=${o.tilesetUid}`),Uq(u,(e=>{i.chromInfo=e,i.searchField=new jq(i.chromInfo),i.rerender(i.options,!0),i.draw(),i.animate()}),i.pubSub),i}return f(n,[{key:"initBoundsTicks",value:function(){this.pTicks&&(this.pMain.removeChild(this.pTicks),this.pTicks=null),this.gBoundTicks||(this.gBoundTicks=new Rf.PIXI.Graphics,this.leftBoundTick=new Rf.PIXI.Text("",this.pixiTextConfig),this.rightBoundTick=new Rf.PIXI.Text("",this.pixiTextConfig),this.gBoundTicks.addChild(this.leftBoundTick),this.gBoundTicks.addChild(this.rightBoundTick),this.pMain.addChild(this.gBoundTicks)),this.texts=[]}},{key:"initChromLabels",value:function(){if(this.chromInfo){this.gBoundTicks&&(this.pMain.removeChild(this.gBoundTicks),this.gBoundTicks=null),this.pTicks||(this.pTicks=new Rf.PIXI.Graphics,this.pMain.addChild(this.pTicks)),this.texts=[],this.pTicks.removeChildren();for(let e=0;eNumber.isInteger(e))),s=this.tickTexts[e.chr],l=this.options.fontIsLeftAligned?(+this.options.fontSize||this.textFontSize)/2:this.tickHeight,c=this.flipText?-1:1,u=this.options.fontIsLeftAligned?4*c:0;let h=this.options.fontIsLeftAligned?0:l+this.tickTextSeparation;for(this.options.reverseOrientation&&(h=this.dimensions[1]-h);s.lengtha.length;){const t=s.pop();this.gTicks[e.chr].removeChild(t)}let d=0;for(;d{if(this.tickTexts[e])for(let t=0;t{e.updateTransform();const n=e.getBounds();return[n.x,n.y,n.x+n.width,n.y+n.height]})),jY(t,((t,n)=>{e[t].importance>e[n].importance?e[n].text.visible=!1:e[t].text.visible=!1}))}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),[this.pMain.position.x,this.pMain.position.y]=this.position}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}},{key:"exportSVG",value:function(){let e=null,t=null;r(h(n.prototype),"exportSVG",this)?[t,e]=r(h(n.prototype),"exportSVG",this).call(this):(t=document.createElement("g"),e=t),t.setAttribute("class","chromosome-labels");const i=document.createElement("g");return e.appendChild(i),i.setAttribute("transform",`translate(${this.position[0]},${this.position[1]})`),this.allTexts.filter((e=>e.text.visible)).forEach((e=>{const t=Zg(e.text);i.appendChild(t)})),Object.values(this.tickTexts).forEach((e=>{e.filter((e=>e.visible)).forEach((e=>{let t=Zg(e);i.appendChild(t),t=ob(e.x,this.options.reverseOrientation?0:this.dimensions[1],e.x,this.options.reverseOrientation?this.tickHeight:this.dimensions[1]-this.tickHeight,1,this.tickColor);const n=document.createElement("line");n.setAttribute("x1",e.tickLine[0]),n.setAttribute("y1",e.tickLine[1]),n.setAttribute("x2",e.tickLine[2]),n.setAttribute("y2",e.tickLine[3]),n.setAttribute("style","stroke: grey"),i.appendChild(t),i.appendChild(n)}))})),[t,e]}}]),n}(LH),Xq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{animate:o}=e;return i.pMain=i.pMobile,i.colorScale=nm,i.continuousScaling=!1,r&&r.colorRange&&(i.colorScale=wf(r.colorRange)),i.animate=o,i.options=r,i.pubSubs=[],i}return f(n,[{key:"rerender",value:function(e,t){r(h(n.prototype),"rerender",this).call(this,e,t),this.zoomed(this.xScale(),this.yScale(),this.pMain.scale.x,this.pMain.position.x,this.pMain.position.y)}},{key:"calculateZoomLevel",value:function(){let e=null;if(this.tilesetInfo.resolutions){const t=mg.calculateZoomLevelFromResolutions(this.tilesetInfo.resolutions,this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),n=mg.calculateZoomLevelFromResolutions(this.tilesetInfo.resolutions,this._xScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1]);e=Math.min(t,n)}else{const t=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),n=mg.calculateZoomLevel(this._xScale,this.tilesetInfo.min_pos[1],this.tilesetInfo.max_pos[1]);e=Math.max(t,n),e=Math.min(e,this.maxZoom)}return this.options&&this.options.maxZoom&&(this.options.maxZoom>=0?e=Math.min(this.options.maxZoom,e):console.error("Invalid maxZoom on track:",this)),e}},{key:"calculateVisibleTiles",value:function(){if(!this.tilesetInfo)return;this.zoomLevel=this.calculateZoomLevel();const e=this._xScale.copy();if(e.domain([this._xScale.invert(this._xScale.range()[0]-this.dimensions[1]*Math.sqrt(2)),this._xScale.invert(this._xScale.range()[1]+this.dimensions[1]*Math.sqrt(2))]),this.tilesetInfo.resolutions){const t=this.tilesetInfo.resolutions.map((e=>+e)).sort(((e,t)=>t-e));this.xTiles=mg.calculateTilesFromResolution(t[this.zoomLevel],e,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0]),this.yTiles=mg.calculateTilesFromResolution(t[this.zoomLevel],e,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0])}else this.xTiles=mg.calculateTiles(this.zoomLevel,e,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width),this.yTiles=mg.calculateTiles(this.zoomLevel,e,this.tilesetInfo.min_pos[0],this.tilesetInfo.max_pos[0],this.tilesetInfo.max_zoom,this.tilesetInfo.max_width);const t=this.xTiles,n=this.yTiles,r=this.zoomLevel,i=this.tilesetInfo.max_width/2**r,o=[];for(let e=0;ethis.dimensions[1])continue;const s=[r,t[e],n[a]];s.mirrored=!1,s.dataTransform=this.options.dataTransform?this.options.dataTransform:"default",o.push(s)}this.setVisibleTiles(o)}},{key:"tileDataToCanvas",value:function(e){const t=document.createElement("canvas");t.width=256,t.height=256;const n=t.getContext("2d");n.fillStyle="transparent",n.fillRect(0,0,t.width,t.height);const r=new ImageData(e,t.width,t.height);return n.putImageData(r,0,0),t}},{key:"setSpriteProperties",value:function(e,t,n,r){const{tileX:i,tileY:o,tileWidth:a,tileHeight:s}=this.getTilePosAndDimensions(t,n),l=i+a,c=o+s;e.width=this._refXScale(l)-this._refXScale(i),e.height=this._refYScale(c)-this._refYScale(o),e.x=this._refXScale(i),e.y=this._refYScale(o)}},{key:"pixDataFunction",value:function(e,t){if(t){const n=e.graphics,r=this.tileDataToCanvas(t.pixData),i="4"===Rf.PIXI.VERSION[0]?Rf.PIXI.Texture.fromCanvas(r,Rf.PIXI.SCALE_MODES.NEAREST):Rf.PIXI.Texture.from(r,{scaleMode:Rf.PIXI.SCALE_MODES.NEAREST});e.sprite=new Rf.PIXI.Sprite(i),e.canvas=r,this.setSpriteProperties(e.sprite,e.tileData.zoomLevel,e.tileData.tilePos,e.mirrored),n.pivot.x=this._refXScale(0),n.pivot.y=this._refYScale(0),n.scale.x=-1/Math.sqrt(2),n.rotation=-3*Math.PI/4,n.scale.y=1/Math.sqrt(2),n.position.x=this._refXScale(0),n.position.y=0,n.removeChildren(),n.addChild(e.sprite)}this.renderingTiles.delete(e.tileId)}},{key:"refScalesChanged",value:function(e,t){r(h(n.prototype),"refScalesChanged",this).call(this,e,t);for(const e in this.fetchedTiles){const t=this.fetchedTiles[e];if(t.sprite){this.setSpriteProperties(t.sprite,t.tileData.zoomLevel,t.tileData.tilePos,t.mirrored);const e=t.graphics;e.pivot.x=this._refXScale(0),e.pivot.y=this._refYScale(0),e.scale.x=-1/Math.sqrt(2),e.rotation=-3*Math.PI/4,e.scale.y=1/Math.sqrt(2),e.position.x=this._refXScale(0),e.position.y=0}}}},{key:"zoomed",value:function(e,t,i,o,a){r(h(n.prototype),"zoomed",this).call(this,e,t,i,o,a),r(h(n.prototype),"draw",this).call(this),this.pMain.position.x=o,this.pMain.position.y=this.position[1]+this.dimensions[1],this.pMain.scale.x=i,this.pMain.scale.y=i,this.options.oneDHeatmapFlipped&&(this.pMain.scale.y=-i,this.pMain.position.y=this.position[1])}},{key:"leftTrackDraw",value:function(){this.draw()}},{key:"exportSVG",value:function(){let e=null,t=null;[t,e]=r(h(n.prototype),"superSVG",this).call(this);const i=document.createElement("g");e.appendChild(i),i.setAttribute("transform",`translate(${this.pMain.position.x},${this.pMain.position.y}) scale(${this.pMain.scale.x},${this.pMain.scale.y})`);for(const e of this.visibleAndFetchedTiles()){const t=document.createElement("g"),n=e.graphics,r=180*n.rotation/Math.PI,o=`translate(${n.position.x},${n.position.y}) rotate(${r}) scale(${n.scale.x},${n.scale.y}) translate(${-n.pivot.x},${-n.pivot.y})`;t.setAttribute("transform",o);const a=180*e.sprite.rotation/Math.PI,s=document.createElement("g");s.setAttribute("transform",`translate(${e.sprite.x},${e.sprite.y}) rotate(${a}) scale(${e.sprite.scale.x},${e.sprite.scale.y})`);const l=document.createElement("image");l.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",e.canvas.toDataURL()),l.setAttribute("width",256),l.setAttribute("height",256),s.appendChild(l),t.appendChild(s),i.appendChild(t)}const o=this.exportColorBarSVG();return e.appendChild(o),[t,t]}}]),n}(iW),Yq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).tilesetInfo={},i.errorTextText=`Unknown track type: ${r.type}`,i}return f(n,[{key:"zoomed",value:function(){this.draw()}}]),n}(LH),qq=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).axis=new Yj(a(i)),i.pBase.addChild(i.axis.pAxis),i}return f(n,[{key:"initTile",value:function(e){this.scale.minRawValue=this.minVisibleValueInTiles(),this.scale.maxRawValue=this.minVisibleValueInTiles(),this.scale.minValue=this.scale.minRawValue,this.scale.maxValue=this.scale.maxRawValue,this.drawTile(e)}},{key:"drawTile",value:function(e){if(!e.graphics)return;const t=e.graphics;t.clear(),this.valueScale=xi().domain([this.minValue()+.01,this.maxValue()]).range([this.dimensions[1]-3,3]);const n=lm("black");t.lineStyle(1,n,.3),t.beginFill(n,.3),this.drawAxis(this.valueScale),e.tileData.forEach((e=>{const n=e.fields,r=+e.chrOffset,i=+n[1]+r,o=+n[2]+r,a=+n[3],s=this._xScale(i),l=this._xScale(o),c=Math.max(l-s,4),u=this.valueScale(a),h=(l+s)/2;t.drawRect(h-c/2,u-3,c,6)}))}},{key:"minVisibleValueInTiles",value:function(){let e=this.visibleAndFetchedIds();return 0===e.length&&(e=Object.keys(this.fetchedTiles)),Math.min.apply(null,e.map((e=>+Math.min(...this.fetchedTiles[e].tileData.filter((e=>!Number.isNaN(e.fields[3]))).map((e=>+e.fields[3]))))))}},{key:"maxVisibleValueInTiles",value:function(){let e=this.visibleAndFetchedIds();return 0===e.length&&(e=Object.keys(this.fetchedTiles)),Math.max.apply(null,e.map((e=>+Math.max(...this.fetchedTiles[e].tileData.filter((e=>!Number.isNaN(e.fields[3]))).map((e=>+e.fields[3]))))))}}]),n}(uq),$q=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{registerViewportChanged:o,removeViewportChanged:s,setDomainsCallback:l}=e,c=Ns.nice();return i.uid=c,i.options=r,i.hasFromView=!e.projectionXDomain||!e.projectionYDomain,i.removeViewportChanged=s,i.setDomainsCallback=l,i.viewportXDomain=i.hasFromView?null:e.projectionXDomain,i.viewportYDomain=i.hasFromView?null:e.projectionYDomain,i.brush=fp().on("brush",i.brushed.bind(a(i))),i.gBrush=i.gMain.append("g").attr("id",`brush-${i.uid}`).call(i.brush),i.gBrush.selectAll(".overlay").style("pointer-events","none"),i.gBrush.selectAll(".handle--n").style("pointer-events","none"),i.gBrush.selectAll(".handle--s").style("pointer-events","none"),i.gBrush.selectAll(".handle--w").style("pointer-events","none"),i.gBrush.selectAll(".handle--e").style("pointer-events","none"),o(c,i.viewportChanged.bind(a(i))),i.rerender(),i.draw(),i}return f(n,[{key:"brushed",value:function(e){const t=e.selection;if(!this._xScale||!this._yScale)return;const n=[this._xScale.invert(t[0][0]),this._xScale.invert(t[1][0])],r=[this._yScale.invert(t[0][1]),this._yScale.invert(t[1][1])];this.hasFromView||(this.viewportXDomain=n,this.viewportYDomain=r),this.setDomainsCallback(n,r)}},{key:"viewportChanged",value:function(e,t){const n=e.domain(),r=t.domain();this.viewportXDomain=n,this.viewportYDomain=r,this.draw()}},{key:"remove",value:function(){this.removeViewportChanged(this.uid),r(h(n.prototype),"remove",this).call(this)}},{key:"rerender",value:function(){this.gBrush.selectAll(".selection").attr("fill",this.options.projectionFillColor).attr("stroke",this.options.projectionStrokeColor).attr("fill-opacity",this.options.projectionFillOpacity).attr("stroke-opacity",this.options.projectionStrokeOpacity).attr("stroke-width",this.options.strokeWidth)}},{key:"draw",value:function(){if(!this._xScale||!this.yScale)return;if(!this.viewportXDomain||!this.viewportYDomain)return;const e=[[this._xScale(this.viewportXDomain[0]),this._yScale(this.viewportYDomain[0])],[this._xScale(this.viewportXDomain[1]),this._yScale(this.viewportYDomain[1])]];this.brush.on("brush",null),this.gBrush.call(this.brush.move,e),this.brush.on("brush",this.brushed.bind(this))}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.draw()}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e);const t=this._xScale.range(),i=this._yScale.range(),o=t[1]-t[0],a=i[1]-i[0];this.brush.extent([[t[0]-o,i[0]-a],[t[1]+o,i[1]+a]]),this.gBrush.call(this.brush),this.draw()}}]),n}(IW),Kq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{registerViewportChanged:o,removeViewportChanged:s,setDomainsCallback:l}=e,c=Ns.nice();return i.uid=c,i.options=r,i.hasFromView=!e.projectionXDomain,i.removeViewportChanged=s,i.setDomainsCallback=l,i.viewportXDomain=i.hasFromView?null:e.projectionXDomain,i.viewportYDomain=i.hasFromView?null:[0,0],i.brush=dp().on("brush",i.brushed.bind(a(i))),i.gBrush=i.gMain.append("g").attr("id",`brush-${i.uid}`).call(i.brush),i.gBrush.selectAll(".overlay").style("pointer-events","none"),i.gBrush.selectAll(".handle--ne").style("pointer-events","none"),i.gBrush.selectAll(".handle--nw").style("pointer-events","none"),i.gBrush.selectAll(".handle--sw").style("pointer-events","none"),i.gBrush.selectAll(".handle--se").style("pointer-events","none"),i.gBrush.selectAll(".handle--n").style("pointer-events","none"),i.gBrush.selectAll(".handle--s").style("pointer-events","none"),o(c,i.viewportChanged.bind(a(i))),i.rerender(),i.draw(),i}return f(n,[{key:"brushed",value:function(e){const t=e.selection;if(!this._xScale||!this._yScale)return;const n=[this._xScale.invert(t[0]),this._xScale.invert(t[1])],r=this.viewportYDomain;this.hasFromView||(this.viewportXDomain=n),this.setDomainsCallback(n,r)}},{key:"viewportChanged",value:function(e,t,n=!0){const r=e.domain(),i=t.domain();this.viewportXDomain=r,this.viewportYDomain=i,this.draw()}},{key:"remove",value:function(){this.removeViewportChanged(this.uid),r(h(n.prototype),"remove",this).call(this)}},{key:"rerender",value:function(){this.gBrush.selectAll(".selection").attr("fill",this.options.projectionFillColor).attr("stroke",this.options.projectionStrokeColor).attr("fill-opacity",this.options.projectionFillOpacity).attr("stroke-opacity",this.options.projectionStrokeOpacity).attr("stroke-width",this.options.strokeWidth)}},{key:"draw",value:function(){if(!this._xScale||!this.yScale)return;if(!this.viewportXDomain||!this.viewportYDomain)return;const e=[this._xScale(this.viewportXDomain[0]),this._xScale(this.viewportXDomain[1])];this.brush.on("brush",null),this.gBrush.call(this.brush.move,e),this.brush.on("brush",this.brushed.bind(this))}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.draw()}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e);const t=this._xScale.range(),i=this._yScale.range(),o=t[1]-t[0];this.brush.extent([[t[0]-o,i[0]],[t[1]+o,i[1]]]),this.gBrush.call(this.brush),this.draw()}}]),n}(IW),Qq=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{registerViewportChanged:o,removeViewportChanged:s,setDomainsCallback:l}=e,c=Ns.nice();return i.uid=c,i.options=r,i.hasFromView=!e.projectionYDomain,i.removeViewportChanged=s,i.setDomainsCallback=l,i.viewportXDomain=i.hasFromView?null:[0,0],i.viewportYDomain=i.hasFromView?null:e.projectionYDomain,i.brush=pp().on("brush",i.brushed.bind(a(i))),i.gBrush=i.gMain.append("g").attr("id",`brush-${i.uid}`).call(i.brush),i.gBrush.selectAll(".overlay").style("pointer-events","none"),i.gBrush.selectAll(".handle--ne").style("pointer-events","none"),i.gBrush.selectAll(".handle--nw").style("pointer-events","none"),i.gBrush.selectAll(".handle--sw").style("pointer-events","none"),i.gBrush.selectAll(".handle--se").style("pointer-events","none"),i.gBrush.selectAll(".handle--e").style("pointer-events","none"),i.gBrush.selectAll(".handle--w").style("pointer-events","none"),o(c,i.viewportChanged.bind(a(i))),i.rerender(),i.draw(),i}return f(n,[{key:"brushed",value:function(e){const t=e.selection;if(!this._xScale||!this._yScale)return;const n=this.viewportXDomain,r=[this._yScale.invert(t[0]),this._yScale.invert(t[1])];this.hasFromView||(this.viewportYDomain=r),this.setDomainsCallback(n,r)}},{key:"viewportChanged",value:function(e,t,n=!0){const r=e.domain(),i=t.domain();this.viewportXDomain=r,this.viewportYDomain=i,this.draw()}},{key:"remove",value:function(){this.removeViewportChanged(this.uid),r(h(n.prototype),"remove",this).call(this)}},{key:"rerender",value:function(){this.gBrush.selectAll(".selection").attr("fill",this.options.projectionFillColor).attr("stroke",this.options.projectionStrokeColor).attr("fill-opacity",this.options.projectionFillOpacity).attr("stroke-opacity",this.options.projectionStrokeOpacity).attr("stroke-width",this.options.strokeWidth)}},{key:"draw",value:function(){if(!this._xScale||!this.yScale)return;if(!this.viewportXDomain||!this.viewportYDomain)return;const e=[this._yScale(this.viewportYDomain[0]),this._yScale(this.viewportYDomain[1])];this.brush.on("brush",null),this.gBrush.call(this.brush.move,e),this.brush.on("brush",this.brushed.bind(this))}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.draw()}},{key:"setDimensions",value:function(e){r(h(n.prototype),"setDimensions",this).call(this,e);const t=this._xScale.range(),i=this._yScale.range(),o=i[1]-i[0];this.brush.extent([[t[0],i[0]-o],[t[1],i[1]+o]]),this.gBrush.call(this.brush),this.draw()}}]),n}(IW);const Zq="__mixwith_appliedMixin",Jq="__mixwith_wrappedMixin",e$=e=>e[Jq]||e,t$=(e,t)=>e.hasOwnProperty(Zq)&&e[Zq]===e$(t),n$=(e,t)=>(Object.setPrototypeOf(t,e),e[Jq]||(e[Jq]=e),t),r$="__mixwith_cachedApplications",i$=e=>n$(e,(t=>((e,t)=>{for(;null!==e;){if(t$(e,t))return!0;e=Object.getPrototypeOf(e)}return!1})(t.prototype,e)?t:e(t))),o$=e=>n$(e,(t=>((e,t)=>{const n=t(e);return n.prototype[Zq]=e$(t),n})(t,e))),a$=e=>i$((e=>n$(e,(t=>{let n=t[r$];n||(t[r$]=new Map,n=t[r$]);let r=n.get(e);return r||(r=e(t),n.set(e,r)),r})))(o$(e)));let s$=function(){function e(t){d(this,e),this.superclass=t||function(){return f((function e(){d(this,e)}))}()}return f(e,[{key:"with",value:function(...e){return e.reduce(((e,t)=>t(e)),this.superclass)}}]),e}();const l$=e=>new s$(e),c$=a$((e=>function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{animate:o}=e;return i.highlighted=!1,i.animate=o,i.MOUSEOVER_RADIUS=4,i.pubSub=e.pubSub,i.pubSubs.push(i.pubSub.subscribe("app.mouseMove",i.mouseMoveHandler.bind(a(i)))),i}return f(n,[{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.x=this.position[0],this.pMain.position.y=this.position[1]}},{key:"zoomed",value:function(e,t){r(h(n.prototype),"zoomed",this).call(this,e,t),this.draw()}},{key:"respondsToPosition",value:function(){return this.highlighted}}]),n}(e))),u$=a$((e=>function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"drawHorizontalRule",value:function(e){let t=lm(this.options.color||"black");this.highlighted&&(t=lm("red")),e.lineStyle(this.strokeWidth,t,this.strokeOpacity);let n=0;for(;nfunction(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"drawVerticalRule",value:function(e){let t=lm(this.options.color||"black");this.highlighted&&(t=lm("red")),e.lineStyle(this.strokeWidth,t,this.strokeOpacity);let n=0;for(;nthis.visibleTileIds.has(e)))}},{key:"visibleAndFetchedTiles",value:function(){return this.visibleAndFetchedIds().map((e=>this.fetchedTiles[e]))}},{key:"setVisibleTiles",value:function(e){this.visibleTiles=e.map((e=>({tileId:this.tileToLocalId(e),remoteId:this.tileToRemoteId(e),mirrored:e.mirrored}))),this.visibleTileIds=new Set(this.visibleTiles.map((e=>e.tileId)))}},{key:"removeAllTiles",value:function(){const e=new Set(Object.keys(this.fetchedTiles));this.removeTiles([...e])}},{key:"refreshTiles",value:function(){this.calculateVisibleTiles();const e=new Set(Object.keys(this.fetchedTiles)),t=[...this.visibleTiles].filter((t=>!this.fetching.has(t.remoteId)&&!e.has(t.tileId)));for(let e=0;e!this.visibleTileIds.has(e)));this.removeTiles(n),this.fetchNewTiles(t)}},{key:"removeTiles",value:function(e){e.length&&this.areAllVisibleTilesLoaded()&&(e.forEach((e=>{const t=e;this.destroyTile(this.fetchedTiles[t]),t in this.tileGraphics&&(this.pMain.removeChild(this.tileGraphics[t]),delete this.tileGraphics[t]),delete this.fetchedTiles[t]})),this.synchronizeTilesAndGraphics(),this.draw())}},{key:"tileToLocalId",value:function(e){return e.join(".")}},{key:"tileToRemoteId",value:function(e){return e.join(".")}},{key:"localToRemoteId",value:function(e){const t=e.split(".");return t.slice(0,t.length-1).join(".")}},{key:"calculateZoomLevel",value:function(){const e=mg.calculateZoomLevel(this._xScale,this.minX,this.maxX),t=mg.calculateZoomLevel(this._xScale,this.minY,this.maxY);let n=Math.min(Math.max(e,t),this.maxZoom);return this.options.maxZoom&&(this.options.maxZoom>=0?n=Math.min(this.options.maxZoom,n):console.error("Invalid maxZoom on track:",this)),n}},{key:"calculateVisibleTiles",value:function(){this.zoomLevel=this.calculateZoomLevel(),this.xTiles=mg.calculateTiles(this.zoomLevel,this._xScale,this.minX,this.maxX,this.maxZoom,this.maxWidth),this.yTiles=mg.calculateTiles(this.zoomLevel,this._yScale,this.minY,this.maxY,this.maxZoom,this.maxWidth);const e=this.xTiles,t=this.yTiles,n=this.zoomLevel,r=[];for(let i=0;i0){const t=[...new Set(e.map((e=>e.remoteId)))];for(const e of t){const t=e.split("."),n=this.getTileUrl(t),r=new Image;r.crossOrigin="Anonymous",r.src=n,r.onload=()=>{const i={};i[e]={tileId:e,img:r,zoomLevel:+t[0],tilePos:[+t[1],+t[2]],tileSrc:n},this.receivedTiles(i)}}}}},{key:"receivedTiles",value:function(e){for(let t=0;t{const t=e.remoteId.split("."),n={zoomLevel:t[0],tilePos:t.slice(1,t.length).map((e=>+e))};this.fetchedTiles[e.tileId]=e,this.fetchedTiles[e.tileId].tileData=n,this.fetching.has(e.remoteId)&&this.fetching.delete(e.remoteId)})),this.synchronizeTilesAndGraphics(),this.draw(),this.animate()}},{key:"draw",value:function(){r(h(n.prototype),"draw",this).call(this)}}]),n}(m$),b$=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).style=r.style,i.options.accessToken||(i.errorTextText="No access token provided in the viewconf's track options ('accessToken' option).",i.drawError()),i}return f(n,[{key:"rerender",value:function(e){r(h(n.prototype),"rerender",this).call(this,e),e.style!==this.style&&(this.style=e.style,this.removeAllTiles(),this.refreshTiles())}},{key:"getTileUrl",value:function(e){return`https://api.mapbox.com/styles/v1/mapbox/${this.options&&this.options.style?this.options.style:"streets-v10"}/tiles/${this.options&&+this.options.tileSize?+this.options.tileSize:256}/${e[0]}/${e[1]}/${e[2]}?access_token=${this.options.accessToken}`}}]),n}(m$),v$=function(e){i(n,e);var t=o(n);function n(e,r){var i;return d(this,n),(i=t.call(this,e,r)).style=r.style,i.options.tileSource||(i.errorTextText="No tile source string provided in the options. It should be in the form of http://a.com/{z}/{x}/{y}",i.drawError()),i}return f(n,[{key:"getTileUrl",value:function(e){let t=this.options.tileSource.replace("{z}",e[0]);return t=t.replace("{x}",e[1]),t=t.replace("{y}",e[2]),t}}]),n}(m$);var y$=1e-6,T$=1e-12,_$=Math.PI,E$=_$/2,x$=_$/4,w$=2*_$,S$=180/_$,k$=_$/180,A$=Math.abs,C$=Math.atan,I$=Math.atan2,O$=Math.cos,D$=Math.ceil,P$=Math.exp,N$=Math.hypot,R$=Math.log,M$=Math.pow,L$=Math.sin,B$=Math.sign||function(e){return e>0?1:e<0?-1:0},F$=Math.sqrt,U$=Math.tan;function j$(e){return e>1?0:e<-1?_$:Math.acos(e)}function H$(e){return e>1?E$:e<-1?-E$:Math.asin(e)}function G$(e){return(e=L$(e/2))*e}function z$(){}function V$(e,t){e&&X$.hasOwnProperty(e.type)&&X$[e.type](e,t)}var W$={Feature:function(e,t){V$(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r=0?1:-1,i=r*n,o=O$(t=(t*=k$)/2+x$),a=L$(t),s=tK*a,l=eK*o+s*O$(i),c=s*r*L$(i);pK.add(I$(c,l)),J$=e,eK=o,tK=a}function TK(e){return[I$(e[1],e[0]),H$(e[2])]}function _K(e){var t=e[0],n=e[1],r=O$(n);return[r*O$(t),r*L$(t),L$(n)]}function EK(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function xK(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function wK(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function SK(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function kK(e){var t=F$(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var AK,CK,IK,OK,DK,PK,NK,RK,MK,LK,BK,FK,UK,jK,HK,GK,zK={point:VK,lineStart:XK,lineEnd:YK,polygonStart:function(){zK.point=qK,zK.lineStart=$K,zK.lineEnd=KK,uK=new ot,mK.polygonStart()},polygonEnd:function(){mK.polygonEnd(),zK.point=VK,zK.lineStart=XK,zK.lineEnd=YK,pK<0?(nK=-(iK=180),rK=-(oK=90)):uK>y$?oK=90:uK<-y$&&(rK=-90),dK[0]=nK,dK[1]=iK},sphere:function(){nK=-(iK=180),rK=-(oK=90)}};function VK(e,t){hK.push(dK=[nK=e,iK=e]),toK&&(oK=t)}function WK(e,t){var n=_K([e*k$,t*k$]);if(cK){var r=xK(cK,n),i=xK([r[1],-r[0],0],r);kK(i),i=TK(i);var o,a=e-aK,s=a>0?1:-1,l=i[0]*S$*s,c=A$(a)>180;c^(s*aKoK&&(oK=o):c^(s*aK<(l=(l+360)%360-180)&&loK&&(oK=t)),c?eQK(nK,iK)&&(iK=e):QK(e,iK)>QK(nK,iK)&&(nK=e):iK>=nK?(eiK&&(iK=e)):e>aK?QK(nK,e)>QK(nK,iK)&&(iK=e):QK(e,iK)>QK(nK,iK)&&(nK=e)}else hK.push(dK=[nK=e,iK=e]);toK&&(oK=t),cK=n,aK=e}function XK(){zK.point=WK}function YK(){dK[0]=nK,dK[1]=iK,zK.point=VK,cK=null}function qK(e,t){if(cK){var n=e-aK;uK.add(A$(n)>180?n+(n>0?360:-360):n)}else sK=e,lK=t;mK.point(e,t),WK(e,t)}function $K(){mK.lineStart()}function KK(){qK(sK,lK),mK.lineEnd(),A$(uK)>y$&&(nK=-(iK=180)),dK[0]=nK,dK[1]=iK,cK=null}function QK(e,t){return(t-=e)<0?t+360:t}function ZK(e,t){return e[0]-t[0]}function JK(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t_$?e+Math.round(-e/w$)*w$:e,t]}function fQ(e,t,n){return(e%=w$)?t||n?dQ(gQ(e),bQ(t,n)):gQ(e):t||n?bQ(t,n):pQ}function mQ(e){return function(t,n){return[(t+=e)>_$?t-w$:t<-_$?t+w$:t,n]}}function gQ(e){var t=mQ(e);return t.invert=mQ(-e),t}function bQ(e,t){var n=O$(e),r=L$(e),i=O$(t),o=L$(t);function a(e,t){var a=O$(t),s=O$(e)*a,l=L$(e)*a,c=L$(t),u=c*n+s*r;return[I$(l*i-u*o,s*n-c*r),H$(u*i+l*o)]}return a.invert=function(e,t){var a=O$(t),s=O$(e)*a,l=L$(e)*a,c=L$(t),u=c*i-l*o;return[I$(l*i+c*o,s*n+u*r),H$(u*n-s*r)]},a}function vQ(e){function t(t){return(t=e(t[0]*k$,t[1]*k$))[0]*=S$,t[1]*=S$,t}return e=fQ(e[0]*k$,e[1]*k$,e.length>2?e[2]*k$:0),t.invert=function(t){return(t=e.invert(t[0]*k$,t[1]*k$))[0]*=S$,t[1]*=S$,t},t}function yQ(e,t,n,r,i,o){if(n){var a=O$(t),s=L$(t),l=r*n;null==i?(i=t+r*w$,o=t-l/2):(i=TQ(a,i),o=TQ(a,o),(r>0?io)&&(i+=r*w$));for(var c,u=i;r>0?u>o:u1&&t.push(t.pop().concat(t.shift()))},result:function(){var n=t;return t=[],e=null,n}}}function EQ(e,t){return A$(e[0]-t[0])=0;--o)i.point((u=c[o])[0],u[1]);else r(d.x,d.p.x,-1,i);d=d.p}c=(d=d.o).z,p=!p}while(!d.v);i.lineEnd()}}}function SQ(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r=0?1:-1,k=S*w,A=k>_$,C=g*E;if(l.add(I$(C*S*L$(k),b*x+C*O$(k))),a+=A?w+S*w$:w,A^f>=n^T>=n){var I=xK(_K(p),_K(y));kK(I);var O=xK(o,I);kK(O);var D=(A^w>=0?-1:1)*H$(O[2]);(r>D||r===D&&(I[0]||I[1]))&&(s+=A^w>=0?1:-1)}}return(a<-y$||a0){for(h||(i.polygonStart(),h=!0),i.lineStart(),e=0;e1&&2&l&&d.push(d.pop().concat(d.shift())),a.push(d.filter(IQ))}return d}}function IQ(e){return e.length>1}function OQ(e,t){return((e=e.x)[0]<0?e[1]-E$-y$:E$-e[1])-((t=t.x)[0]<0?t[1]-E$-y$:E$-t[1])}pQ.invert=pQ;const DQ=CQ((function(){return!0}),(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?_$:-_$,l=A$(o-n);A$(l-_$)0?E$:-E$),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=_$&&(A$(n-i)y$?C$((L$(t)*(o=O$(r))*L$(n)-L$(r)*(i=O$(t))*L$(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*E$,r.point(-_$,i),r.point(0,i),r.point(_$,i),r.point(_$,0),r.point(_$,-i),r.point(0,-i),r.point(-_$,-i),r.point(-_$,0),r.point(-_$,i);else if(A$(e[0]-t[0])>y$){var o=e[0]0,i=A$(t)>y$;function o(e,n){return O$(e)*O$(n)>t}function a(e,n,r){var i=[1,0,0],o=xK(_K(e),_K(n)),a=EK(o,o),s=o[0],l=a-s*s;if(!l)return!r&&e;var c=t*a/l,u=-t*s/l,h=xK(i,o),d=SK(i,c);wK(d,SK(o,u));var p=h,f=EK(d,p),m=EK(p,p),g=f*f-m*(EK(d,d)-1);if(!(g<0)){var b=F$(g),v=SK(p,(-f-b)/m);if(wK(v,d),v=TK(v),!r)return v;var y,T=e[0],_=n[0],E=e[1],x=n[1];_0^v[1]<(A$(v[0]-T)_$^(T<=v[0]&&v[0]<=_)){var k=SK(p,(-f+b)/m);return wK(k,d),[v,TK(k)]}}}function s(t,n){var i=r?e:_$-e,o=0;return t<-i?o|=1:t>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return CQ(o,(function(e){var t,n,l,c,u;return{lineStart:function(){c=l=!1,u=1},point:function(h,d){var p,f=[h,d],m=o(h,d),g=r?m?0:s(h,d):m?s(h+(h<0?_$:-_$),d):0;if(!t&&(c=l=m)&&e.lineStart(),m!==l&&(!(p=a(t,f))||EQ(t,p)||EQ(f,p))&&(f[2]=1),m!==l)u=0,m?(e.lineStart(),p=a(f,t),e.point(p[0],p[1])):(p=a(t,f),e.point(p[0],p[1],2),e.lineEnd()),t=p;else if(i&&t&&r^m){var b;g&n||!(b=a(f,t,!0))||(u=0,r?(e.lineStart(),e.point(b[0][0],b[0][1]),e.point(b[1][0],b[1][1]),e.lineEnd()):(e.point(b[1][0],b[1][1]),e.lineEnd(),e.lineStart(),e.point(b[0][0],b[0][1],3)))}!m||t&&EQ(t,f)||e.point(f[0],f[1]),t=f,l=m,n=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return u|(c&&l)<<1}}}),(function(t,r,i,o){yQ(o,e,n,i,t,r)}),r?[0,-e]:[-_$,e-_$])}var NQ,RQ,MQ,LQ,BQ=1e9,FQ=-BQ;function UQ(e,t,n,r){function i(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function o(i,o,s,c){var u=0,h=0;if(null==i||(u=a(i,s))!==(h=a(o,s))||l(i,o)<0^s>0)do{c.point(0===u||3===u?e:n,u>1?r:t)}while((u=(u+s+4)%4)!==h);else c.point(o[0],o[1])}function a(r,i){return A$(r[0]-e)0?0:3:A$(r[0]-n)0?2:1:A$(r[1]-t)0?1:0:i>0?3:2}function s(e,t){return l(e.x,t.x)}function l(e,t){var n=a(e,1),r=a(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}return function(a){var l,c,u,h,d,p,f,m,g,b,v,y=a,T=_Q(),_={point:E,lineStart:function(){_.point=x,c&&c.push(u=[]),b=!0,g=!1,f=m=NaN},lineEnd:function(){l&&(x(h,d),p&&g&&T.rejoin(),l.push(T.result())),_.point=E,g&&y.lineEnd()},polygonStart:function(){y=T,l=[],c=[],v=!0},polygonEnd:function(){var t=function(){for(var t=0,n=0,i=c.length;nr&&(d-o)*(r-a)>(p-a)*(e-o)&&++t:p<=r&&(d-o)*(r-a)<(p-a)*(e-o)&&--t;return t}(),n=v&&t,i=(l=Ut(l)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&wQ(l,s,t,o,a),a.polygonEnd()),y=a,l=c=u=null}};function E(e,t){i(e,t)&&y.point(e,t)}function x(o,a){var s=i(o,a);if(c&&u.push([o,a]),b)h=o,d=a,p=s,b=!1,s&&(y.lineStart(),y.point(o,a));else if(s&&g)y.point(o,a);else{var l=[f=Math.max(FQ,Math.min(BQ,f)),m=Math.max(FQ,Math.min(BQ,m))],T=[o=Math.max(FQ,Math.min(BQ,o)),a=Math.max(FQ,Math.min(BQ,a))];!function(e,t,n,r,i,o){var a,s=e[0],l=e[1],c=0,u=1,h=t[0]-s,d=t[1]-l;if(a=n-s,h||!(a>0)){if(a/=h,h<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=i-s,h||!(a<0)){if(a/=h,h<0){if(a>u)return;a>c&&(c=a)}else if(h>0){if(a0)){if(a/=d,d<0){if(a0){if(a>u)return;a>c&&(c=a)}if(a=o-l,d||!(a<0)){if(a/=d,d<0){if(a>u)return;a>c&&(c=a)}else if(d>0){if(a0&&(e[0]=s+c*h,e[1]=l+c*d),u<1&&(t[0]=s+u*h,t[1]=l+u*d),!0}}}}}(l,T,e,t,n,r)?s&&(y.lineStart(),y.point(o,a),v=!1):(g||(y.lineStart(),y.point(l[0],l[1])),y.point(T[0],T[1]),s||y.lineEnd(),v=!1)}f=o,m=a,g=s}return _}}var jQ={sphere:z$,point:z$,lineStart:function(){jQ.point=GQ,jQ.lineEnd=HQ},lineEnd:z$,polygonStart:z$,polygonEnd:z$};function HQ(){jQ.point=jQ.lineEnd=z$}function GQ(e,t){RQ=e*=k$,MQ=L$(t*=k$),LQ=O$(t),jQ.point=zQ}function zQ(e,t){e*=k$;var n=L$(t*=k$),r=O$(t),i=A$(e-RQ),o=O$(i),a=r*L$(i),s=LQ*n-MQ*r*o,l=MQ*n+LQ*r*o;NQ.add(I$(F$(a*a+s*s),l)),RQ=e,MQ=n,LQ=r}function VQ(e){return NQ=new ot,K$(e,jQ),+NQ}var WQ=[null,null],XQ={type:"LineString",coordinates:WQ};function YQ(e,t){return WQ[0]=e,WQ[1]=t,VQ(XQ)}var qQ={Feature:function(e,t){return KQ(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r0&&(i=YQ(e[o],e[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))y$})).map(l)).concat(Gt(D$(o/p)*p,i,p).filter((function(e){return A$(e%m)>y$})).map(c))}return b.lines=function(){return v().map((function(e){return{type:"LineString",coordinates:e}}))},b.outline=function(){return{type:"Polygon",coordinates:[u(r).concat(h(a).slice(1),u(n).reverse().slice(1),h(s).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],s=+e[0][1],a=+e[1][1],r>n&&(e=r,r=n,n=e),s>a&&(e=s,s=a,a=e),b.precision(g)):[[r,s],[n,a]]},b.extentMinor=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],o=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),o>i&&(n=o,o=i,i=n),b.precision(g)):[[t,o],[e,i]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(f=+e[0],m=+e[1],b):[f,m]},b.stepMinor=function(e){return arguments.length?(d=+e[0],p=+e[1],b):[d,p]},b.precision=function(d){return arguments.length?(g=+d,l=nZ(o,i,90),c=rZ(t,e,g),u=nZ(s,a,90),h=rZ(r,n,g),b):g},b.extentMajor([[-180,-90+y$],[180,90-y$]]).extentMinor([[-180,-80-y$],[180,80+y$]])}const oZ=e=>e;var aZ,sZ,lZ,cZ,uZ=new ot,hZ=new ot,dZ={point:z$,lineStart:z$,lineEnd:z$,polygonStart:function(){dZ.lineStart=pZ,dZ.lineEnd=gZ},polygonEnd:function(){dZ.lineStart=dZ.lineEnd=dZ.point=z$,uZ.add(A$(hZ)),hZ=new ot},result:function(){var e=uZ/2;return uZ=new ot,e}};function pZ(){dZ.point=fZ}function fZ(e,t){dZ.point=mZ,aZ=lZ=e,sZ=cZ=t}function mZ(e,t){hZ.add(cZ*e-lZ*t),lZ=e,cZ=t}function gZ(){mZ(aZ,sZ)}const bZ=dZ;var vZ=1/0,yZ=vZ,TZ=-vZ,_Z=TZ;const EZ={point:function(e,t){eTZ&&(TZ=e),t_Z&&(_Z=t)},lineStart:z$,lineEnd:z$,polygonStart:z$,polygonEnd:z$,result:function(){var e=[[vZ,yZ],[TZ,_Z]];return TZ=_Z=-(yZ=vZ=1/0),e}};var xZ,wZ,SZ,kZ,AZ=0,CZ=0,IZ=0,OZ=0,DZ=0,PZ=0,NZ=0,RZ=0,MZ=0,LZ={point:BZ,lineStart:FZ,lineEnd:HZ,polygonStart:function(){LZ.lineStart=GZ,LZ.lineEnd=zZ},polygonEnd:function(){LZ.point=BZ,LZ.lineStart=FZ,LZ.lineEnd=HZ},result:function(){var e=MZ?[NZ/MZ,RZ/MZ]:PZ?[OZ/PZ,DZ/PZ]:IZ?[AZ/IZ,CZ/IZ]:[NaN,NaN];return AZ=CZ=IZ=OZ=DZ=PZ=NZ=RZ=MZ=0,e}};function BZ(e,t){AZ+=e,CZ+=t,++IZ}function FZ(){LZ.point=UZ}function UZ(e,t){LZ.point=jZ,BZ(SZ=e,kZ=t)}function jZ(e,t){var n=e-SZ,r=t-kZ,i=F$(n*n+r*r);OZ+=i*(SZ+e)/2,DZ+=i*(kZ+t)/2,PZ+=i,BZ(SZ=e,kZ=t)}function HZ(){LZ.point=BZ}function GZ(){LZ.point=VZ}function zZ(){WZ(xZ,wZ)}function VZ(e,t){LZ.point=WZ,BZ(xZ=SZ=e,wZ=kZ=t)}function WZ(e,t){var n=e-SZ,r=t-kZ,i=F$(n*n+r*r);OZ+=i*(SZ+e)/2,DZ+=i*(kZ+t)/2,PZ+=i,NZ+=(i=kZ*e-SZ*t)*(SZ+e),RZ+=i*(kZ+t),MZ+=3*i,BZ(SZ=e,kZ=t)}const XZ=LZ;function YZ(e){this._context=e}YZ.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,w$)}},result:z$};var qZ,$Z,KZ,QZ,ZZ,JZ=new ot,eJ={point:z$,lineStart:function(){eJ.point=tJ},lineEnd:function(){qZ&&nJ($Z,KZ),eJ.point=z$},polygonStart:function(){qZ=!0},polygonEnd:function(){qZ=null},result:function(){var e=+JZ;return JZ=new ot,e}};function tJ(e,t){eJ.point=nJ,$Z=QZ=e,KZ=ZZ=t}function nJ(e,t){QZ-=e,ZZ-=t,JZ.add(F$(QZ*QZ+ZZ*ZZ)),QZ=e,ZZ=t}const rJ=eJ;function iJ(){this._string=[]}function oJ(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function aJ(e){return function(t){var n=new sJ;for(var r in e)n[r]=e[r];return n.stream=t,n}}function sJ(){}function lJ(e,t,n){var r=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=r&&e.clipExtent(null),K$(n,e.stream(EZ)),t(EZ.result()),null!=r&&e.clipExtent(r),e}function cJ(e,t,n){return lJ(e,(function(n){var r=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+t[0][0]+(r-o*(n[1][0]+n[0][0]))/2,s=+t[0][1]+(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])}),n)}function uJ(e,t,n){return cJ(e,[[0,0],t],n)}function hJ(e,t,n){return lJ(e,(function(n){var r=+t,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];e.scale(150*i).translate([o,a])}),n)}function dJ(e,t,n){return lJ(e,(function(n){var r=+t,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;e.scale(150*i).translate([o,a])}),n)}iJ.prototype={_radius:4.5,_circle:oJ(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=oJ(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}return null}},sJ.prototype={constructor:sJ,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var pJ=16,fJ=O$(30*k$);function mJ(e,t){return+t?function(e,t){function n(r,i,o,a,s,l,c,u,h,d,p,f,m,g){var b=c-r,v=u-i,y=b*b+v*v;if(y>4*t&&m--){var T=a+d,_=s+p,E=l+f,x=F$(T*T+_*_+E*E),w=H$(E/=x),S=A$(A$(E)-1)t||A$((b*I+v*O)/y-.5)>.3||a*d+s*p+l*f2?e[2]%360*k$:0,I()):[g*S$,b*S$,v*S$]},A.angle=function(e){return arguments.length?(y=e%360*k$,I()):y*S$},A.reflectX=function(e){return arguments.length?(T=e?-1:1,I()):T<0},A.reflectY=function(e){return arguments.length?(_=e?-1:1,I()):_<0},A.precision=function(e){return arguments.length?(a=mJ(s,k=e*e),O()):F$(k)},A.fitExtent=function(e,t){return cJ(A,e,t)},A.fitSize=function(e,t){return uJ(A,e,t)},A.fitWidth=function(e,t){return hJ(A,e,t)},A.fitHeight=function(e,t){return dJ(A,e,t)},function(){return t=e.apply(this,arguments),A.invert=t.invert&&C,I()}}function TJ(e){var t=0,n=_$/3,r=yJ(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*k$,n=e[1]*k$):[t*S$,n*S$]},i}function _J(e,t){var n=L$(e),r=(n+L$(t))/2;if(A$(r)0?t<-E$+y$&&(t=-E$+y$):t>E$-y$&&(t=E$-y$);var n=i/M$(OJ(t),r);return[n*L$(r*e),i-n*O$(r*e)]}return o.invert=function(e,t){var n=i-t,o=B$(r)*F$(e*e+n*n),a=I$(e,A$(n))*B$(n);return n*r<0&&(a-=_$*B$(e)*B$(n)),[a/r,2*C$(M$(i/o,1/r))-E$]},o}function PJ(e,t){return[e,t]}function NJ(e,t){var n=O$(e),r=e===t?L$(e):(n-O$(t))/(t-e),i=n/r+e;if(A$(r)y$&&--i>0);return[e/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},GJ.invert=SJ(H$),zJ.invert=SJ((function(e){return 2*C$(e)})),VJ.invert=function(e,t){return[-t,2*C$(P$(e))-E$]};const WJ=Object.freeze(Object.defineProperty({__proto__:null,geoArea:function(e){return fK=new ot,K$(e,mK),2*fK},geoBounds:function(e){var t,n,r,i,o,a,s;if(oK=iK=-(nK=rK=1/0),hK=[],K$(e,zK),n=hK.length){for(hK.sort(ZK),t=1,o=[r=hK[0]];tQK(r[0],r[1])&&(r[1]=i[1]),QK(i[0],r[1])>QK(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,t=0,r=o[n=o.length-1];t<=n;r=i,++t)i=o[t],(s=QK(r[1],i[0]))>a&&(a=s,nK=i[0],iK=r[1])}return hK=dK=null,nK===1/0||rK===1/0?[[NaN,NaN],[NaN,NaN]]:[[nK,rK],[iK,oK]]},geoCentroid:function(e){AK=CK=IK=OK=DK=PK=NK=RK=0,MK=new ot,LK=new ot,BK=new ot,K$(e,eQ);var t=+MK,n=+LK,r=+BK,i=N$(t,n,r);return i=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:a).invert(e)},u.stream=function(n){return e&&t===n?e:(r=[a.stream(t=n),s.stream(n),l.stream(n)],i=r.length,e={point:function(e,t){for(var n=-1;++n2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90]).scale(159.155)},geoTransverseMercatorRaw:VJ,geoRotation:vQ,geoStream:K$,geoTransform:function(e){return{stream:aJ(e)}}},Symbol.toStringTag,{value:"Module"}));var XJ=[].slice,YJ={};function qJ(e){this._size=e,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function $J(e){if(!e._start)try{!function(e){for(;e._start=e._waiting&&e._active=0;)if((n=e._tasks[r])&&(e._tasks[r]=null,n.abort))try{n.abort()}catch(e){}e._active=NaN,ZJ(e)}function ZJ(e){if(!e._active&&e._call){var t=e._data;e._data=void 0,e._call(e._error,t)}}function JJ(e){if(null==e)e=1/0;else if(!((e=+e)>=1))throw new Error("invalid concurrency");return new qJ(e)}qJ.prototype=JJ.prototype={constructor:qJ,defer:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var t=XJ.call(arguments,1);return t.push(e),++this._waiting,this._tasks.push(t),$J(this),this},abort:function(){return null==this._error&&QJ(this,new Error("abort")),this},await:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(t,n){e.apply(null,[t].concat(n))},ZJ(this),this},awaitAll:function(e){if("function"!=typeof e)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=e,ZJ(this),this}};const e0=Object.freeze(Object.defineProperty({__proto__:null,queue:JJ},Symbol.toStringTag,{value:"Module"}));var t0="$";function n0(){}function r0(e,t){var n=new n0;if(e instanceof n0)e.each((function(e,t){n.set(t,e)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(null==t)for(;++i=200&&r<300||304===r){if(i)try{t=i.call(n,l)}catch(e){return void a.call("error",n,e)}else t=l;a.call("load",n,t)}else a.call("error",n,e)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in l)&&/^(http(s)?:)?\/\//.test(e)&&(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=d:l.onreadystatechange=function(e){l.readyState>3&&d(e)},l.onprogress=function(e){a.call("progress",n,e)},n={header:function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?s.get(e):(null==t?s.remove(e):s.set(e,t+""),n)},mimeType:function(e){return arguments.length?(r=null==e?null:e+"",n):r},responseType:function(e){return arguments.length?(o=e,n):o},timeout:function(e){return arguments.length?(h=+e,n):h},user:function(e){return arguments.length<1?c:(c=null==e?null:e+"",n)},password:function(e){return arguments.length<1?u:(u=null==e?null:e+"",n)},response:function(e){return i=e,n},get:function(e,t){return n.send("GET",e,t)},post:function(e,t){return n.send("POST",e,t)},send:function(t,i,d){return l.open(t,e,!0,c,u),null==r||s.has("accept")||s.set("accept",r+",*/*"),l.setRequestHeader&&s.each((function(e,t){l.setRequestHeader(t,e)})),null!=r&&l.overrideMimeType&&l.overrideMimeType(r),null!=o&&(l.responseType=o),h>0&&(l.timeout=h),null==d&&"function"==typeof i&&(d=i,i=null),null!=d&&1===d.length&&(d=function(e){return function(t,n){e(null==t?n:null)}}(d)),null!=d&&n.on("error",d).on("load",(function(e){d(null,e)})),a.call("beforesend",n,l),l.send(null==i?null:i),n},abort:function(){return l.abort(),n},on:function(){var e=a.on.apply(a,arguments);return e===a?n:e}},null!=t){if("function"!=typeof t)throw new Error("invalid callback: "+t);return n.get(t)}return n}function d0(e,t){return function(n,r){var i=h0(n).mimeType(e).response(t);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}}l0.prototype=s0.prototype={constructor:l0,on:function(e,t){var n,r,i=this._,o=(r=i,(e+"").trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");if(n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),e&&!r.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:t}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a0)for(var n,r,i=new Array(n),o=0;o9999?"+"+_0(t,6):_0(t,4))+"-"+_0(e.getUTCMonth()+1,2)+"-"+_0(e.getUTCDate(),2)+(o?"T"+_0(n,2)+":"+_0(r,2)+":"+_0(i,2)+"."+_0(o,3)+"Z":i?"T"+_0(n,2)+":"+_0(r,2)+":"+_0(i,2)+"Z":r||n?"T"+_0(n,2)+":"+_0(r,2)+"Z":"")}function x0(e){var t=new RegExp('["'+e+"\n\r]"),n=e.charCodeAt(0);function r(e,t){var r,i=[],o=e.length,a=0,s=0,l=o<=0,c=!1;function u(){if(l)return v0;if(c)return c=!1,b0;var t,r,i=a;if(34===e.charCodeAt(i)){for(;a++=o?l=!0:10===(r=e.charCodeAt(a++))?c=!0:13===r&&(c=!0,10===e.charCodeAt(a)&&++a),e.slice(i+1,t-1).replace(/""/g,'"')}for(;a{this.ref=e}})}}]),n}(m.default.Component);O0.propTypes={axis:S.exports.string,className:S.exports.string,component:S.exports.func,editable:S.exports.bool,handleConfigTrack:S.exports.func,handleResizeTrack:S.exports.func,height:S.exports.number,helperClass:S.exports.string,itemClass:S.exports.string,itemControlAlignLeft:S.exports.bool,itemReactClass:S.exports.func,items:S.exports.array,onAddSeries:S.exports.func,onCloseTrack:S.exports.func,onCloseTrackMenuOpened:S.exports.func,onConfigTrackMenuOpened:S.exports.func,onSortEnd:S.exports.func,onSortStart:S.exports.func,referenceAncestor:S.exports.string,resizeHandles:S.exports.object,useDragHandle:S.exports.bool,width:S.exports.number},O0.defaultProps={className:"list stylizedList",itemClass:"item stylizedItem",width:400,height:600};const D0={"top-right-handle":"_top-right-handle_cizw2_1","bottom-right-handle":"_bottom-right-handle_cizw2_2","top-left-handle":"_top-left-handle_cizw2_7","bottom-left-handle":"_bottom-left-handle_cizw2_8","top-draggable-handle":"_top-draggable-handle_cizw2_13","bottom-draggable-handle":"_bottom-draggable-handle_cizw2_14","left-draggable-handle":"_left-draggable-handle_cizw2_15","right-draggable-handle":"_right-draggable-handle_cizw2_16","draggable-div":"_draggable-div_cizw2_22","top-draggable-handle-grabber":"_top-draggable-handle-grabber_cizw2_27","bottom-draggable-handle-grabber":"_bottom-draggable-handle-grabber_cizw2_28","left-draggable-handle-grabber":"_left-draggable-handle-grabber_cizw2_43","right-draggable-handle-grabber":"_right-draggable-handle-grabber_cizw2_44"};let P0=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).dragTopRight=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragTopRightFunc.bind(a(r))),r.dragTopLeft=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragTopLeftFunc.bind(a(r))),r.dragBottomRight=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragBottomRightFunc.bind(a(r))),r.dragBottomLeft=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragBottomLeftFunc.bind(a(r))),r.dragBottom=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragBottomFunc.bind(a(r))),r.dragTop=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragTopFunc.bind(a(r))),r.dragLeft=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragLeftFunc.bind(a(r))),r.dragRight=Lh().on("start",r.dragStart.bind(a(r))).on("drag",r.dragRightFunc.bind(a(r))),r.minWidth=10,r.minHeight=10,r.bottomHandleWidth=20,r.state={uid:r.props.uid,width:r.props.width,height:r.props.height,top:r.props.top,left:r.props.left},r.domBody=Be("body").node(),r}return f(n,[{key:"componentDidMount",value:function(){Be(this.bottomHandle).call(this.dragBottom),Be(this.topHandle).call(this.dragTop),Be(this.leftHandle).call(this.dragLeft),Be(this.rightHandle).call(this.dragRight)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){"width"in e&&this.setState({width:e.width}),"height"in e&&this.setState({height:e.height})}},{key:"dragBottomFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartHeight+(t[1]-this.dragStartMousePos[1]);n=n>this.minHeight?n:this.minHeight,this.setState({height:n}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragLeftFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartWidth-(t[0]-this.dragStartMousePos[0]);n=n>this.minWidth?n:this.minWidth;let r=this.dragStartLeft+t[0]-this.dragStartMousePos[0];r=n>this.minWidth?r:this.dragStartLeft+this.dragStartWidth-this.minWidth,this.setState({left:r,width:n}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragTopFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartHeight-(t[1]-this.dragStartMousePos[1]);n=n>this.minHeight?n:this.minHeight;let r=this.dragStartTop+t[1]-this.dragStartMousePos[1];r=n>this.minHeight?r:this.dragStartTop+this.dragStartHeight-this.minHeight,this.setState({top:r,height:n}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragRightFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartWidth+(t[0]-this.dragStartMousePos[0]);n=n>this.minWidth?n:this.minWidth,this.setState({width:n}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragBottomLeftFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartHeight+(t[1]-this.dragStartMousePos[1]);n=n>this.minHeight?n:this.minHeight;let r=this.dragStartWidth-(t[0]-this.dragStartMousePos[0]);r=r>this.minWidth?r:this.minWidth;let i=this.dragStartLeft+t[0]-this.dragStartMousePos[0];i=r>this.minWidth?i:this.dragStartLeft+this.dragStartWidth-this.minWidth,this.setState({left:i,width:r,height:n}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragBottomRightFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartWidth+(t[0]-this.dragStartMousePos[0]);n=n>this.minWidth?n:this.minWidth;let r=this.dragStartHeight+(t[1]-this.dragStartMousePos[1]);r=r>this.minHeight?r:this.minHeight,this.setState({width:n,height:r}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragTopRightFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartHeight-(t[1]-this.dragStartMousePos[1]);n=n>this.minHeight?n:this.minHeight;let r=this.dragStartTop+t[1]-this.dragStartMousePos[1];r=n>this.minHeight?r:this.dragStartTop+this.dragStartHeight-this.minHeight;let i=this.dragStartWidth+(t[0]-this.dragStartMousePos[0]);i=i>this.minWidth?i:this.minWidth,this.setState({top:r,width:i,height:n}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragTopLeftFunc",value:function(e){const t=Ge(e,this.domBody);let n=this.dragStartWidth-(t[0]-this.dragStartMousePos[0]);n=n>this.minWidth?n:this.minWidth;let r=this.dragStartLeft+t[0]-this.dragStartMousePos[0];r=n>this.minWidth?r:this.dragStartLeft+this.dragStartWidth-this.minWidth;let i=this.dragStartHeight-(t[1]-this.dragStartMousePos[1]);i=i>this.minHeight?i:this.minHeight;let o=this.dragStartTop+t[1]-this.dragStartMousePos[1];o=i>this.minHeight?o:this.dragStartTop+this.dragStartHeight-this.minHeight,this.setState({top:o,left:r,width:n,height:i}),e.sourceEvent.stopPropagation(),this.sizeChanged()}},{key:"dragStart",value:function(e){this.dragStartMousePos=Ge(e,this.domBody),this.dragStartWidth=this.state.width,this.dragStartHeight=this.state.height,this.dragStartTop=this.state.top,this.dragStartLeft=this.state.left,e.sourceEvent.stopPropagation()}},{key:"sizeChanged",value:function(){this.props.sizeChanged&&this.props.sizeChanged(this.state)}},{key:"rotateClicked",value:function(){this.props.trackRotated(this.state.uid)}},{key:"closeClicked",value:function(){this.props.trackClosed(this.state.uid)}},{key:"render",value:function(){const e=this.props.theme===Pf?"white":"black",t={top:this.state.top,left:this.state.left,width:this.state.width,height:this.state.height,opacity:this.props.opacity},n={left:this.state.width/2-12,width:24},r={top:this.state.height/2-12,height:24},i={bottom:{...n,bottom:1},top:{...n,top:1},left:{...r,left:1},right:{...r,right:1}},o=[...this.props.resizeHandles].map((t=>m.default.createElement("div",{key:t,ref:e=>{this[`${t}Handle`]=e},className:D0[`${t}-draggable-handle`],style:i[t],title:"Resize track"},m.default.createElement("div",{className:D0[`${t}-draggable-handle-grabber`],style:{borderColor:e}}))));return m.default.createElement("div",{ref:e=>{this.divContainer=e},className:gl(this.props.className,D0["draggable-div"]),style:t},o)}}]),n}(m.default.Component);P0.propTypes={className:S.exports.string,height:S.exports.number,left:S.exports.number,opacity:S.exports.number,resizeHandles:S.exports.object,sizeChanged:S.exports.func,top:S.exports.number,trackClosed:S.exports.func,trackRotated:S.exports.func,uid:S.exports.string,width:S.exports.number,theme:S.exports.symbol};const N0=eH(P0);let R0=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={controlsVisible:!1},r}return f(n,[{key:"shouldComponentUpdate",value:function(){return!this.resizing}},{key:"handleMouseEnter",value:function(){this.setState({controlsVisible:!0})}},{key:"handleMouseLeave",value:function(){this.setState({controlsVisible:!1})}},{key:"handleMouseMove",value:function(){this.setState({controlsVisible:!0})}},{key:"getControls",value:function(){let e=null;return e=this.moveable?af((()=>m.default.createElement("svg",{className:"no-zoom",height:"10px",onClick:()=>{},style:this.getMoveImgStyle(),width:"10px"},m.default.createElement("use",{xlinkHref:"#move"})))):af((()=>m.default.createElement("div",null))),m.default.createElement("div",{style:{position:"absolute",backgroundColor:"rgba(255,255,255,0.7)",right:"3px",top:"3px",pointerEvents:"none",paddingLeft:"5px",paddingRight:"5px",borderRadius:"5px",border:"1px solid #dddddd"}},m.default.createElement(e,null),m.default.createElement("svg",{ref:e=>{this.imgConfig=e},className:"no-zoom",height:"10px",onClick:()=>{const e=g.default.findDOMNode(this.imgConfig).getBoundingClientRect();this.props.onConfigTrackMenuOpened(this.props.uid,e)},style:this.getSettingsImgStyle(),width:"10px"},m.default.createElement("use",{xlinkHref:"#cog"})),m.default.createElement("svg",{ref:e=>{this.imgAdd=e},className:"no-zoom",height:"10px",onClick:()=>this.props.onAddSeries(this.props.uid),style:this.getAddImgStyle(),width:"10px"},m.default.createElement("use",{xlinkHref:"#plus"})),m.default.createElement("svg",{ref:e=>{this.imgClose=e},className:"no-zoom",height:"10px",onClick:()=>{const e=g.default.findDOMNode(this.imgClose).getBoundingClientRect();this.props.onCloseTrackMenuOpened(this.props.uid,e)},style:this.getCloseImgStyle(),width:"10px"},m.default.createElement("use",{xlinkHref:"#cross"})))}}]),n}(m.default.Component);R0.propTypes={configMenuOpen:S.exports.bool,onConfigTrackMenuOpened:S.exports.func,onCloseTrackMenuOpened:S.exports.func,onAddSeries:S.exports.func,uid:S.exports.string};let M0=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).moveable=!0,r}return f(n,[{key:"render",value:function(){return m.default.createElement("div",{ref:e=>{this.el=e},className:this.props.className,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:()=>{this.handleMouseLeave()},style:{height:this.props.height,width:this.props.width}},m.default.createElement(N0,{key:this.props.uid,height:this.props.height,resizeHandles:this.props.editable?this.props.resizeHandles:new Set,sizeChanged:e=>this.props.handleResizeTrack(this.props.uid,e.width,e.height),style:{background:"transparent"},uid:this.props.uid,width:this.props.width}),this.props.editable&&this.getControls(this.state.controlsVisible||this.props.item.configMenuVisible))}}]),n}(R0);M0.propTypes={className:S.exports.string,uid:S.exports.string,item:S.exports.object,height:S.exports.number,width:S.exports.number};const L0={pointerEvents:"all"};let B0=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"getControls",value:function(e){return m.default.createElement(fH,{configMenuVisible:this.props.item.configMenuVisible,imgStyleAdd:L0,imgStyleClose:L0,imgStyleMove:L0,imgStyleSettings:L0,isMoveable:this.moveable,isVisible:e,onAddSeries:this.props.onAddSeries,onCloseTrackMenuOpened:this.props.onCloseTrackMenuOpened,onConfigTrackMenuOpened:this.props.onConfigTrackMenuOpened,uid:this.props.uid})}}]),n}(M0);const F0=mf((e=>m.default.createElement(B0,{className:e.className,editable:e.editable,handleConfigTrack:e.handleConfigTrack,handleResizeTrack:e.handleResizeTrack,height:e.height,item:e.item,onAddSeries:e.onAddSeries,onCloseTrack:e.onCloseTrack,onCloseTrackMenuOpened:e.onCloseTrackMenuOpened,onConfigTrackMenuOpened:e.onConfigTrackMenuOpened,resizeHandles:e.resizeHandles,uid:e.uid,width:e.width}))),U0=function(e){var t,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{withRef:!1};return r=t=function(t){function r(e){var t;return Sp(this,r),xp(Cp(Cp(t=Ip(this,Op(r).call(this,e)))),"state",{}),xp(Cp(Cp(t)),"handleStart",(function(e){var n=t.props,r=n.distance,i=n.shouldCancelStart;if(2!==e.button&&!i(e)){t.touched=!0,t.position=qp(e);var o=zp(e.target,(function(e){return null!=e.sortableInfo}));if(o&&o.sortableInfo&&t.nodeIsChild(o)&&!t.state.sorting){var a=t.props.useDragHandle,s=o.sortableInfo,l=s.index,c=s.collection;if(s.disabled)return;if(a&&!zp(e.target,sf))return;t.manager.active={collection:c,index:l},function(e){return e.touches&&e.touches.length||e.changedTouches&&e.changedTouches.length}(e)||e.target.tagName!==of.Anchor||e.preventDefault(),r||(0===t.props.pressDelay?t.handlePress(e):t.pressTimer=setTimeout((function(){return t.handlePress(e)}),t.props.pressDelay))}}})),xp(Cp(Cp(t)),"nodeIsChild",(function(e){return e.sortableInfo.manager===t.manager})),xp(Cp(Cp(t)),"handleMove",(function(e){var n=t.props,r=n.distance,i=n.pressThreshold;if(!t.state.sorting&&t.touched&&!t._awaitingUpdateBeforeSortStart){var o=qp(e),a={x:t.position.x-o.x,y:t.position.y-o.y},s=Math.abs(a.x)+Math.abs(a.y);t.delta=a,r||i&&!(s>=i)?r&&s>=r&&t.manager.isActive()&&t.handlePress(e):(clearTimeout(t.cancelTimer),t.cancelTimer=setTimeout(t.cancel,0))}})),xp(Cp(Cp(t)),"handleEnd",(function(){t.touched=!1,t.cancel()})),xp(Cp(Cp(t)),"cancel",(function(){var e=t.props.distance;t.state.sorting||(e||clearTimeout(t.pressTimer),t.manager.active=null)})),xp(Cp(Cp(t)),"handlePress",(function(e){try{var n=t.manager.getActive(),r=function(){if(n){var r=function(){var n,r,i,c,m,g,b=d.sortableInfo.index,v=(n=d,{bottom:Wp((r=window.getComputedStyle(n)).marginBottom),left:Wp(r.marginLeft),right:Wp(r.marginRight),top:Wp(r.marginTop)}),y=function(e){var t=window.getComputedStyle(e);return"grid"===t.display?{x:Wp(t.gridColumnGap),y:Wp(t.gridRowGap)}:{x:0,y:0}}(t.container),T=t.scrollContainer.getBoundingClientRect(),_=a({index:b,node:d,collection:p});if(t.node=d,t.margin=v,t.gridGap=y,t.width=_.width,t.height=_.height,t.marginOffset={x:t.margin.left+t.margin.right+t.gridGap.x,y:Math.max(t.margin.top,t.margin.bottom,t.gridGap.y)},t.boundingClientRect=d.getBoundingClientRect(),t.containerBoundingRect=T,t.index=b,t.newIndex=b,t.axis={x:o.indexOf("x")>=0,y:o.indexOf("y")>=0},t.offsetEdge=$p(d,t.container),t.initialOffset=qp(f?wp({},e,{pageX:t.boundingClientRect.left,pageY:t.boundingClientRect.top}):e),t.initialScroll={left:t.scrollContainer.scrollLeft,top:t.scrollContainer.scrollTop},t.initialWindowScroll={left:window.pageXOffset,top:window.pageYOffset},t.helper=t.helperContainer.appendChild((c="input, textarea, select, canvas, [contenteditable]",m=(i=d).querySelectorAll(c),Rp((g=i.cloneNode(!0)).querySelectorAll(c)).forEach((function(e,t){"file"!==e.type&&(e.value=m[t].value),"radio"===e.type&&e.name&&(e.name="__sortableClone__".concat(e.name)),e.tagName===of.Canvas&&m[t].width>0&&m[t].height>0&&e.getContext("2d").drawImage(m[t],0,0)})),g)),jp(t.helper,{boxSizing:"border-box",height:"".concat(t.height,"px"),left:"".concat(t.boundingClientRect.left-v.left,"px"),pointerEvents:"none",position:"fixed",top:"".concat(t.boundingClientRect.top-v.top,"px"),width:"".concat(t.width,"px")}),f&&t.helper.focus(),l&&(t.sortableGhost=d,jp(d,{opacity:0,visibility:"hidden"})),t.minTranslate={},t.maxTranslate={},f){var E=h?{top:0,left:0,width:t.contentWindow.innerWidth,height:t.contentWindow.innerHeight}:t.containerBoundingRect,x=E.top,w=E.left,S=E.width,k=x+E.height,A=w+S;t.axis.x&&(t.minTranslate.x=w-t.boundingClientRect.left,t.maxTranslate.x=A-(t.boundingClientRect.left+t.width)),t.axis.y&&(t.minTranslate.y=x-t.boundingClientRect.top,t.maxTranslate.y=k-(t.boundingClientRect.top+t.height))}else t.axis.x&&(t.minTranslate.x=(h?0:T.left)-t.boundingClientRect.left-t.width/2,t.maxTranslate.x=(h?t.contentWindow.innerWidth:T.left+T.width)-t.boundingClientRect.left-t.width/2),t.axis.y&&(t.minTranslate.y=(h?0:T.top)-t.boundingClientRect.top-t.height/2,t.maxTranslate.y=(h?t.contentWindow.innerHeight:T.top+T.height)-t.boundingClientRect.top-t.height/2);s&&s.split(" ").forEach((function(e){return t.helper.classList.add(e)})),t.listenerNode=e.touches?d:t.contentWindow,f?(t.listenerNode.addEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.addEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.addEventListener("keydown",t.handleKeyDown)):(Fp.move.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortMove,!1)})),Fp.end.forEach((function(e){return t.listenerNode.addEventListener(e,t.handleSortEnd,!1)}))),t.setState({sorting:!0,sortingIndex:b}),u&&u({node:d,index:b,collection:p,isKeySorting:f,nodes:t.manager.getOrderedRefs(),helper:t.helper},e),f&&t.keyMove(0)},i=t.props,o=i.axis,a=i.getHelperDimensions,s=i.helperClass,l=i.hideSortableGhost,c=i.updateBeforeSortStart,u=i.onSortStart,h=i.useWindowAsScrollContainer,d=n.node,p=n.collection,f=t.manager.isKeySorting,m=function(){if("function"==typeof c){t._awaitingUpdateBeforeSortStart=!0;var n=function(e,t){try{var n=e()}catch(e){return t(!0,e)}return n&&n.then?n.then(t.bind(null,!1),t.bind(null,!0)):t(!1,value)}((function(){var t=d.sortableInfo.index;return Promise.resolve(c({collection:p,index:t,node:d,isKeySorting:f},e)).then((function(){}))}),(function(e,n){if(t._awaitingUpdateBeforeSortStart=!1,e)throw n;return n}));if(n&&n.then)return n.then((function(){}))}}();return m&&m.then?m.then(r):r()}}();return Promise.resolve(r&&r.then?r.then((function(){})):void 0)}catch(e){return Promise.reject(e)}})),xp(Cp(Cp(t)),"handleSortMove",(function(e){var n=t.props.onSortMove;"function"==typeof e.preventDefault&&e.preventDefault(),t.updateHelperPosition(e),t.animateNodes(),t.autoscroll(),n&&n(e)})),xp(Cp(Cp(t)),"handleSortEnd",(function(e){var n=t.props,r=n.hideSortableGhost,i=n.onSortEnd,o=t.manager,a=o.active.collection,s=o.isKeySorting,l=t.manager.getOrderedRefs();t.listenerNode&&(s?(t.listenerNode.removeEventListener("wheel",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("mousedown",t.handleKeyEnd,!0),t.listenerNode.removeEventListener("keydown",t.handleKeyDown)):(Fp.move.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortMove)})),Fp.end.forEach((function(e){return t.listenerNode.removeEventListener(e,t.handleSortEnd)})))),t.helper.parentNode.removeChild(t.helper),r&&t.sortableGhost&&jp(t.sortableGhost,{opacity:"",visibility:""});for(var c=0,u=l.length;cr)){t.prevIndex=o,t.newIndex=i;var a=function(e,t,n){return et?e-1:e>n&&eg?g/2:this.height/2,width:this.width>m?m/2:this.width/2},v=c&&f>this.index&&f<=u,y=c&&f=u,T={x:0,y:0},_=a[h].edgeOffset;_||(_=$p(p,this.container),a[h].edgeOffset=_,c&&(a[h].boundingClientRect=Yp(p,i)));var E=h0&&a[h-1];E&&!E.edgeOffset&&(E.edgeOffset=$p(E.node,this.container),c&&(E.boundingClientRect=Yp(E.node,i))),f!==this.index?(t&&Gp(p,t),this.axis.x?this.axis.y?y||fthis.containerBoundingRect.width-b.width&&E&&(T.x=E.edgeOffset.left-_.left,T.y=E.edgeOffset.top-_.top),null===this.newIndex&&(this.newIndex=f)):(v||f>this.index&&(s+o.left+b.width>=_.left&&l+o.top+b.height>=_.top||l+o.top+b.height>=_.top+g))&&(T.x=-(this.width+this.marginOffset.x),_.left+T.xthis.index&&s+o.left+b.width>=_.left?(T.x=-(this.width+this.marginOffset.x),this.newIndex=f):(y||fthis.index&&l+o.top+b.height>=_.top?(T.y=-(this.height+this.marginOffset.y),this.newIndex=f):(y||f{const y=t.map(((e,t)=>m.default.createElement(g,{key:`sci-${e.uid}`,className:n,controlAlignLeft:r,sortingIndex:i,index:t,uid:e.uid,height:e.height,width:e.width,item:e,useDragHandle:o,onCloseTrack:c,onCloseTrackMenuOpened:u,onConfigTrackMenuOpened:h,onAddSeries:d,handleConfigTrack:p,editable:f,handleResizeTrack:b,resizeHandles:v})));return m.default.createElement("div",{className:e,style:{height:s,width:l,background:"transparent"},...a},y)})),j0="_horizontal-tiled-plot_1bqkg_1";function H0(e){return e&&e.sourceEvent}let G0=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).brushBehavior=dp().on("start",r.brushStarted.bind(a(r))).on("brush",r.brushed.bind(a(r))).on("end",r.brushedEnded.bind(a(r))),r}return f(n,[{key:"componentDidMount",value:function(){this.props.isRangeSelectionActive&&this.addBrush()}},{key:"shouldComponentUpdate",value:function(e,t){return this.rangeSelectionTriggered?(this.rangeSelectionTriggered=!1,this.rangeSelectionTriggeredEnd&&this.props.rangeSelection!==e.rangeSelection&&this.moveBrush(e.rangeSelection[0]?e.rangeSelection[0]:null,!0),this.rangeSelectionTriggeredEnd=!1,this.state!==t):this.props.rangeSelection===e.rangeSelection||(this.moveBrush(e.rangeSelection[0]?e.rangeSelection[0]:null,e.rangeSelectionEnd),this.state!==t)}},{key:"componentDidUpdate",value:function(){this.props.isRangeSelectionActive?this.addBrush():this.removeBrush()}},{key:"addBrush",value:function(){this.brushEl&&this.brushElAddedBefore!==this.brushEl&&(this.brushElAddedBefore&&this.brushElAddedBefore.on(".brush",null),this.brushEl.call(this.brushBehavior),this.brushElAddedBefore=this.brushEl,Jg(this.brushEl,gH["track-range-selection-group-brush-selection"]))}},{key:"brushed",value:function(e){const t=this.rangeSelectionMoved;this.rangeSelectionMoved=!1,H0(e)&&this.props.onRangeSelection&&!t&&(this.rangeSelectionTriggered=!0,this.props.onRangeSelection(e.selection))}},{key:"brushStarted",value:function(e){H0(e)&&e.selection&&this.props.onRangeSelectionStart()}},{key:"brushedEnded",value:function(e){if(!this.props.is1dRangeSelection)return;const t=this.rangeSelectionMovedEnd;this.rangeSelectionMovedEnd=!1,e.selection&&e.sourceEvent&&this.props.onRangeSelection&&!t&&(this.rangeSelectionTriggered=!0,this.rangeSelectionTriggeredEnd=!0,this.props.onRangeSelectionEnd(e.selection)),e.selection||(this.rangeSelectionTriggered=!0,this.props.onRangeSelectionReset())}},{key:"moveBrush",value:function(e,t=!1){if(!this.brushEl)return;const n=e?[this.props.scale(e[0]),this.props.scale(e[1])]:null;this.rangeSelectionMoved=!0,this.rangeSelectionMovedEnd=!0,t?this.brushEl.transition().call(this.brushBehavior.move,n):this.brushEl.call(this.brushBehavior.move,n)}},{key:"removeBrush",value:function(){this.brushElAddedBefore&&(this.brushElAddedBefore.call(this.brushBehavior.move,null),this.brushElAddedBefore.on(".brush",null),this.brushElAddedBefore=void 0,this.props.onRangeSelectionReset())}},{key:"render",value:function(){const e=this.props.tracks.map((e=>e.height)).reduce(ib,0),t=this.props.tracks.map((e=>wb(e))).reduce(Kg,!1),n=this.props.isRangeSelectionActive?gH["track-range-selection-active"]:gH["track-range-selection"];return m.default.createElement("div",{className:gl("horizontal-tiled-plot",j0)},t&&m.default.createElement("svg",{ref:e=>{this.brushEl=Be(e)},className:n,style:{height:e,width:this.props.width},xmlns:"http://www.w3.org/2000/svg"}),m.default.createElement(O0,{className:gl(DH.list,DH.stylizedList),component:U0,editable:this.props.editable,handleConfigTrack:this.props.handleConfigTrack,handleResizeTrack:this.props.handleResizeTrack,height:e,helperClass:DH.stylizedHelper,itemClass:DH.stylizedItem,itemReactClass:F0,items:this.props.tracks.map((e=>({configMenuVisible:e.uid===this.props.configTrackMenuId,uid:e.uid||Ns.nice(),width:this.props.width,height:e.height,value:e.value}))),onAddSeries:this.props.onAddSeries,onCloseTrack:this.props.onCloseTrack,onCloseTrackMenuOpened:this.props.onCloseTrackMenuOpened,onConfigTrackMenuOpened:this.props.onConfigTrackMenuOpened,onSortEnd:this.props.handleSortEnd,referenceAncestor:this.props.referenceAncestor,resizeHandles:this.props.resizeHandles,useDragHandle:!0,width:this.props.width}))}}]),n}(m.default.Component);G0.propTypes={configTrackMenuId:S.exports.string,editable:S.exports.bool,handleConfigTrack:S.exports.func,handleResizeTrack:S.exports.func,handleSortEnd:S.exports.func,is1dRangeSelection:S.exports.bool,isRangeSelectionActive:S.exports.bool,onAddSeries:S.exports.func,onCloseTrack:S.exports.func,onCloseTrackMenuOpened:S.exports.func,onConfigTrackMenuOpened:S.exports.func,onRangeSelection:S.exports.func,onRangeSelectionEnd:S.exports.func,onRangeSelectionReset:S.exports.func,onRangeSelectionStart:S.exports.func,rangeSelection:S.exports.array,rangeSelectionEnd:S.exports.bool,referenceAncestor:S.exports.func,resizeHandles:S.exports.object,scale:S.exports.func,tracks:S.exports.array,width:S.exports.number};const z0={pointerEvents:"all"};let V0=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"getControls",value:function(e){return m.default.createElement(fH,{imgStyleAdd:z0,imgStyleClose:z0,imgStyleMove:z0,imgStyleSettings:z0,isAlignLeft:this.props.controlAlignLeft,isMoveable:this.moveable,isVertical:!0,isVisible:e,onAddSeries:this.props.onAddSeries,onCloseTrackMenuOpened:this.props.onCloseTrackMenuOpened,onConfigTrackMenuOpened:this.props.onConfigTrackMenuOpened,uid:this.props.uid})}}]),n}(M0),W0=function(e){i(n,e);var t=o(n);function n(e,r){var i;d(this,n),i=t.call(this,e,r);const{registerViewportChanged:o,removeViewportChanged:s}=e,l=Ns.nice();return i.uid=l,i.removeViewportChanged=s,i.viewportXDomain=null,i.viewportYDomain=null,o(l,i.viewportChanged.bind(a(i))),i}return f(n,[{key:"viewportChanged",value:function(e,t){const n=e.domain(),r=t.domain();this.viewportXDomain=n,this.viewportYDomain=r,this.draw()}},{key:"draw",value:function(){const e=this.pMain;if(!this.viewportXDomain||!this.viewportYDomain)return;e.clear(),e.lineStyle(1,255,1),e.beginFill(16740363,1);const t=this._xScale(this.viewportXDomain[0]),n=this._yScale(this.viewportYDomain[0]),r=this._xScale(this.viewportXDomain[1])-this._xScale(this.viewportXDomain[0]),i=this._yScale(this.viewportYDomain[1])-this._yScale(this.viewportYDomain[0]);this.pMain.drawRect(t,n,r,i)}},{key:"zoomed",value:function(e,t){this.xScale(e),this.yScale(t),this.draw()}},{key:"setPosition",value:function(e){r(h(n.prototype),"setPosition",this).call(this,e),this.pMain.position.y=this.position[1],this.pMain.position.x=this.position[0],this.draw()}}]),n}(LH);function X0(e){this.size=0,this.limit=e,this._keymap={}}Object.assign(X0.prototype,{put:function(e,t){const n={key:e,value:t};if(this._keymap[e]=n,this.tail?(this.tail.newer=n,n.older=this.tail):this.head=n,this.tail=n,this.size===this.limit)return this.shift();this.size+=1},get:function(e,t){const n=this._keymap[e];if(void 0!==n)return n===this.tail||(n.newer&&(n===this.head&&(this.head=n.newer),n.newer.older=n.older),n.older&&(n.older.newer=n.newer),n.newer=void 0,n.older=this.tail,this.tail&&(this.tail.newer=n),this.tail=n),t?n:n.value},find:function(e){return this._keymap[e]},keys:function(){return Object.keys(this._keymap)},set:function(e,t){const n=this.get(e,!0);let r;return n?(r=n.value,n.value=t):(r=this.put(e,t),r&&(r=r.value)),r},shift:function(){const e=this.head;return e&&(this.head.newer?(this.head=this.head.newer,this.head.older=void 0):(this.head=void 0,this.tail=void 0),e.newer=void 0,e.older=void 0,delete this._keymap[e.key],this.size-=1),e},remove:function(e){const t=this._keymap[e];if(t)return delete this._keymap[t.key],t.newer&&t.older?(t.older.newer=t.newer,t.newer.older=t.older):t.newer?(t.newer.older=void 0,this.head=t.newer):t.older?(t.older.newer=void 0,this.tail=t.older):(this.head=void 0,this.tail=void 0),this.size-=1,t.value},removeAll:function(){this.head=void 0,this.tail=void 0,this.size=0,this._keymap={}},forEach:function(e,t,n){let r;if(!0===t?(n=!0,t=void 0):"object"!=typeof t&&(t=this),n)for(r=this.tail;r;)e.call(t,r.key,r.value,this),r=r.older;else for(r=this.head;r;)e.call(t,r.key,r.value,this),r=r.newer},toJSON:function(){const e=[];let t=this.head;for(;t;)e.push({key:t.key.toJSON(),value:t.value.toJSON()}),t=t.newer;return e},toString:function(){let e="",t=this.head;for(;t;)e+=`${String(t.key)}:${t.value}`,t=t.newer,t&&(e+=" < ");return e}});const Y0="1.12.4",q0={button:"_button_1wnjn_1","button-shortcut":"_button-shortcut_1wnjn_35"},$0=m.default.forwardRef(((e,t)=>{var n;return m.default.createElement("button",{ref:t,className:null!=(n=q0[e.styleName])?n:q0.button,disabled:e.disable,onBlur:e.onBlur,onClick:e.onClick,onMouseDown:e.onMouseDown,onMouseOut:e.onMouseOut,onMouseUp:e.onMouseUp,type:"button"},e.children,e.shortcut&&m.default.createElement("span",{className:q0["button-shortcut"]},e.shortcut))}));$0.defaultProps={onClick:()=>{},styleName:"",type:"button"},$0.propTypes={children:S.exports.any,disable:S.exports.bool,onBlur:S.exports.func,onClick:S.exports.func,onMouseDown:S.exports.func,onMouseOut:S.exports.func,onMouseUp:S.exports.func,shortcut:S.exports.string,type:S.exports.string,styleName:S.exports.string};const K0={cross:"_cross_2ke8w_1"};function Q0(){return m.default.createElement("div",{className:K0.cross})}const{Provider:Z0,Consumer:J0}=m.default.createContext({close:lb,open:lb}),e1=e=>m.default.forwardRef(((t,n)=>m.default.createElement(J0,null,(r=>m.default.createElement(e,{ref:n,...t,modal:r}))))),t1="_modal-background_zzhoe_1",n1="_modal-hide_zzhoe_13",r1="_modal-wrap_zzhoe_17",i1="_modal-window_zzhoe_25",o1="_modal-window-max-height_zzhoe_38",a1="_modal-content_zzhoe_42";function s1(e){return m.default.createElement("div",{className:gl(t1,{[n1]:e.hide})},m.default.createElement("div",{className:r1},m.default.createElement("div",{className:gl(i1,{[o1]:e.maxHeight})},e.closeButton&&m.default.createElement($0,{onClick:()=>{e.modal.close(),e.onClose&&e.onClose()}},m.default.createElement(Q0,null)),m.default.createElement("div",{className:a1},e.children))))}s1.defaultProps={closeButton:!0,hide:!1,maxHeight:!1},s1.propTypes={children:S.exports.element.isRequired,closeButton:S.exports.bool,hide:S.exports.bool,maxHeight:S.exports.bool,modal:S.exports.object.isRequired,onClose:S.exports.func};const l1=e1(s1),c1={"dialog-header":"_dialog-header_wp50s_1","dialog-main-max-height":"_dialog-main-max-height_wp50s_20","dialog-footer":"_dialog-footer_wp50s_31","dialog-footer-max-height":"_dialog-footer-max-height_wp50s_31"};function u1(e){const t=()=>{e.modal.close(),e.onCancel&&e.onCancel()};return m.default.createElement(l1,{closeButton:!1,hide:e.hide,maxHeight:e.maxHeight},m.default.createElement(m.default.Fragment,null,m.default.createElement("header",{className:c1["dialog-header"]},m.default.createElement("h3",null,e.title),m.default.createElement($0,{onClick:t},m.default.createElement(Q0,null))),e.maxHeight?m.default.createElement("main",{className:gl(e.maxHeight&&c1["dialog-main-max-height"])},e.children):m.default.createElement("main",null,e.children),m.default.createElement("footer",{className:c1[e.maxHeight?"dialog-footer-max-height":"dialog-footer"]},e.okayOnly?m.default.createElement("div",null):m.default.createElement($0,{onClick:t,shortcut:e.cancelShortcut},e.cancelTitle),m.default.createElement($0,{onClick:()=>{e.modal.close(),e.onOkay&&e.onOkay()},shortcut:e.okayShortcut},e.okayTitle))))}u1.defaultProps={cancelTitle:"Cancel",hide:!1,maxHeight:!1,okayOnly:!1,okayTitle:"Ok"},u1.propTypes={cancelShortcut:S.exports.string,cancelTitle:S.exports.string,children:S.exports.object,hide:S.exports.bool,maxHeight:S.exports.bool,modal:S.exports.object.isRequired,okayShortcut:S.exports.string,okayTitle:S.exports.string,okayOnly:S.exports.bool,onCancel:S.exports.func.isRequired,onOkay:S.exports.func.isRequired,title:S.exports.string.isRequired};const h1=e1(u1);var d1={},p1={};const f1="object"==typeof globalThis&&globalThis&&globalThis.Object===Object&&globalThis;var m1="object"==typeof self&&self&&self.Object===Object&&self;const g1=f1||m1||Function("return this")(),b1=g1.Symbol;var v1=Object.prototype,y1=v1.hasOwnProperty,T1=v1.toString,_1=b1?b1.toStringTag:void 0;var E1=Object.prototype.toString;var x1="[object Null]",w1="[object Undefined]",S1=b1?b1.toStringTag:void 0;function k1(e){return null==e?void 0===e?w1:x1:S1&&S1 in Object(e)?function(e){var t=y1.call(e,_1),n=e[_1];try{e[_1]=void 0;var r=!0}catch(e){}var i=T1.call(e);return r&&(t?e[_1]=n:delete e[_1]),i}(e):function(e){return E1.call(e)}(e)}const A1=Array.isArray;function C1(e){return null!=e&&"object"==typeof e}const I1=T(Object.freeze(Object.defineProperty({__proto__:null,default:function(e){return"string"==typeof e||!A1(e)&&C1(e)&&"[object String]"==k1(e)}},Symbol.toStringTag,{value:"Module"})));const O1=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[D1?a:++r];if(!1===t(i[s],s,i))break}return e};var D1;function P1(e){return C1(e)&&"[object Arguments]"==k1(e)}var N1=Object.prototype,R1=N1.hasOwnProperty,M1=N1.propertyIsEnumerable,L1=P1(function(){return arguments}())?P1:function(e){return C1(e)&&R1.call(e,"callee")&&!M1.call(e,"callee")};const B1=L1;var F1="object"==typeof t&&t&&!t.nodeType&&t,U1=F1&&e&&!e.nodeType&&e,j1=U1&&U1.exports===F1?g1.Buffer:void 0;const H1=(j1?j1.isBuffer:void 0)||function(){return!1};var G1=9007199254740991,z1=/^(?:0|[1-9]\d*)$/;function V1(e,t){var n=typeof e;return!!(t=null==t?G1:t)&&("number"==n||"symbol"!=n&&z1.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=W1}var Y1={};function q1(e){return function(t){return e(t)}}Y1["[object Float32Array]"]=Y1["[object Float64Array]"]=Y1["[object Int8Array]"]=Y1["[object Int16Array]"]=Y1["[object Int32Array]"]=Y1["[object Uint8Array]"]=Y1["[object Uint8ClampedArray]"]=Y1["[object Uint16Array]"]=Y1["[object Uint32Array]"]=!0,Y1["[object Arguments]"]=Y1["[object Array]"]=Y1["[object ArrayBuffer]"]=Y1["[object Boolean]"]=Y1["[object DataView]"]=Y1["[object Date]"]=Y1["[object Error]"]=Y1["[object Function]"]=Y1["[object Map]"]=Y1["[object Number]"]=Y1["[object Object]"]=Y1["[object RegExp]"]=Y1["[object Set]"]=Y1["[object String]"]=Y1["[object WeakMap]"]=!1;var $1="object"==typeof t&&t&&!t.nodeType&&t,K1=$1&&e&&!e.nodeType&&e,Q1=K1&&K1.exports===$1&&f1.process;const Z1=function(){try{return K1&&K1.require&&K1.require("util").types||Q1&&Q1.binding&&Q1.binding("util")}catch(e){}}();var J1=Z1&&Z1.isTypedArray;const e2=J1?q1(J1):function(e){return C1(e)&&X1(e.length)&&!!Y1[k1(e)]};var t2=Object.prototype.hasOwnProperty;function n2(e,t){var n=A1(e),r=!n&&B1(e),i=!n&&!r&&H1(e),o=!n&&!r&&!i&&e2(e),a=n||r||i||o,s=a?function(e,t){for(var n=-1,r=Array(e);++n-1},N2.prototype.set=function(e,t){var n=this.__data__,r=D2(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};const R2=g1["__core-js_shared__"];var M2,L2=(M2=/[^.]+$/.exec(R2&&R2.keys&&R2.keys.IE_PROTO||""))?"Symbol(src)_1."+M2:"";var B2=Function.prototype.toString;function F2(e){if(null!=e){try{return B2.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var U2=/^\[object .+?Constructor\]$/,j2=Function.prototype,H2=Object.prototype,G2=j2.toString,z2=H2.hasOwnProperty,V2=RegExp("^"+G2.call(z2).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function W2(e){return!(!l2(e)||(t=e,L2&&L2 in t))&&(p2(e)?V2:U2).test(F2(e));var t}function X2(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return W2(n)?n:void 0}const Y2=X2(g1,"Map"),q2=X2(Object,"create");var $2=Object.prototype.hasOwnProperty;var K2=Object.prototype.hasOwnProperty;function Q2(e){var t=-1,n=null==e?0:e.length;for(this.clear();++ts))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,d=!0,p=n&i5?new t5:void 0;for(o.set(e,t),o.set(t,e);++h0&&void 0!==arguments[0]?arguments[0]:[],n=[];return(0,H3.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return n.push(e)})):(0,j3.default)(t)?(0,U3.default)(t,(function(e,t){!0===e&&n.push(t),n.push(t+"-"+e)})):(0,F3.default)(t)&&n.push(t)})),n};p1.default=z3;var V3={};function W3(e,t){for(var n=-1,r=null==e?0:e.length;++n1&&void 0!==arguments[1]?arguments[1]:[],n=e.default&&(0,Z6.default)(e.default)||{};return t.map((function(t){var r=e[t];return r&&(0,Q6.default)(r,(function(e,t){n[t]||(n[t]={}),n[t]=J6({},n[t],r[t])})),t})),n};V3.default=t4;var n4={};Object.defineProperty(n4,"__esModule",{value:!0}),n4.autoprefix=void 0;var r4=function(e){return e&&e.__esModule?e:{default:e}}(y2),i4=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var a=arguments.length,s=Array(a),l=0;l1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var n,i,o;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var a=arguments.length,s=Array(a),l=0;l1&&void 0!==arguments[1])||arguments[1];n[e]=t};return 0===e&&r("first-child"),e===t-1&&r("last-child"),(0===e||e%2==0)&&r("even"),1===Math.abs(e%2)&&r("odd"),r("nth-child",e),n},Object.defineProperty(d1,"__esModule",{value:!0}),d1.ReactCSS=d1.loop=d1.handleActive=S4=d1.handleHover=d1.hover=void 0;var v4=w4(p1),y4=w4(V3),T4=w4(n4),_4=w4(s4),E4=w4(d4),x4=w4(b4);function w4(e){return e&&e.__esModule?e:{default:e}}d1.hover=_4.default;var S4=d1.handleHover=_4.default;d1.handleActive=E4.default,d1.loop=x4.default;var k4=d1.ReactCSS=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;rl?1:Math.round(100*d/l)/100,t.a!==o)return{h:t.h,s:t.s,l:t.l,a:o,source:"rgb"}}else if(r!==(a=h<0?0:h>s?1:Math.round(100*h/s)/100))return{h:t.h,s:t.s,l:t.l,a,source:"rgb"};return null}(e,r.props.hsl,r.props.direction,r.props.a,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleChange),window.removeEventListener("mouseup",r.handleMouseUp)},R4(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),N4(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,n=A4({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:P4({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return m.default.createElement("div",{style:n.alpha},m.default.createElement("div",{style:n.checkboard},m.default.createElement(D4,{renderers:this.props.renderers})),m.default.createElement("div",{style:n.gradient}),m.default.createElement("div",{style:n.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},m.default.createElement("div",{style:n.pointer},this.props.pointer?m.default.createElement(this.props.pointer,this.props):m.default.createElement("div",{style:n.slider}))))}}]),t}(n.PureComponent||n.Component),L4=function(){function e(e,t){for(var n=0;n-1)){var i=n.getArrowOffset(),o=38===e.keyCode?r+i:r-i;n.setUpdatedValue(o,e)}},n.handleDrag=function(e){if(n.props.dragLabel){var t=Math.round(n.props.value+e.movementX);t>=0&&t<=n.props.dragMax&&n.props.onChange&&n.props.onChange(n.getValueObjectWithLabel(t),e)}},n.handleMouseDown=function(e){n.props.dragLabel&&(e.preventDefault(),n.handleDrag(e),window.addEventListener("mousemove",n.handleDrag),window.addEventListener("mouseup",n.handleMouseUp))},n.handleMouseUp=function(){n.unbindEventListeners()},n.unbindEventListeners=function(){window.removeEventListener("mousemove",n.handleDrag),window.removeEventListener("mouseup",n.handleMouseUp)},n.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},n.inputId="rc-editable-input-"+F4++,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),L4(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var n=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(n,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=A4({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return m.default.createElement("div",{style:t.wrap},m.default.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?m.default.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(n.PureComponent||n.Component),j4=function(){function e(e,t){for(var n=0;ns?0:360*(-100*h/s+100)/100,n.h!==i)return{h:i,s:n.s,l:n.l,a:n.a,source:"hsl"}}else if(o=u<0?0:u>a?359:100*u/a*360/100,n.h!==o)return{h:o,s:n.s,l:n.l,a:n.a,source:"hsl"};return null}(e,r.props.direction,r.props.hsl,r.container);t&&"function"==typeof r.props.onChange&&r.props.onChange(t,e)},r.handleMouseDown=function(e){r.handleChange(e),window.addEventListener("mousemove",r.handleChange),window.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},H4(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),j4(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,n=void 0===t?"horizontal":t,r=A4({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===n});return m.default.createElement("div",{style:r.hue},m.default.createElement("div",{className:"hue-"+n,style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},m.default.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),m.default.createElement("div",{style:r.pointer},this.props.pointer?m.default.createElement(this.props.pointer,this.props):m.default.createElement("div",{style:r.slider}))))}}]),t}(n.PureComponent||n.Component);function z4(e,t,n){(void 0!==n&&!O2(e[t],n)||void 0===n&&!(t in e))&&Y3(e,t,n)}function V4(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}function W4(e,t,n,r,i,o,a){var s,l=V4(e,n),c=V4(t,n),u=a.get(c);if(u)z4(e,n,u);else{var h=o?o(l,c,n+"",e,t,a):void 0,d=void 0===h;if(d){var p=A1(c),f=!p&&H1(c),m=!p&&!f&&e2(c);h=c,p||f||m?A1(l)?h=l:C1(s=l)&&f2(s)?h=o6(l):f?(d=!1,h=i6(c,!0)):m?(d=!1,h=p6(c,!0)):h=[]:A2(c)||B1(c)?(h=l,B1(l)?h=function(e){return K3(e,J3(e))}(l):l2(l)&&!p2(l)||(h=L6(c))):d=!1}d&&(a.set(c,h),i(h,c,r,o,a),a.delete(c)),z4(e,n,h)}}function X4(e,t,n,r,i){e!==t&&O1(t,(function(o,a){if(i||(i=new e5),l2(o))W4(e,t,a,n,X4,r,i);else{var s=r?r(V4(e,a),o,a+"",e,t,i):void 0;void 0===s&&(s=o),z4(e,a,s)}}),J3)}var Y4=Math.max;const q4=X3?function(e,t){return X3(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:b2;var $4=Date.now;const K4=function(e){var t=0,n=0;return function(){var r=$4(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(q4);function Q4(e,t){return K4(function(e,t,n){return t=Y4(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=Y4(r.length-t,0),a=Array(o);++i1?t[r-1]:void 0,o=r>2?t[2]:void 0;for(i=J4.length>3&&"function"==typeof i?(r--,i):void 0,o&&function(e,t,n){if(!l2(n))return!1;var r=typeof t;return!!("number"==r?f2(n)&&V1(t,n.length):"string"==r&&t in n)&&O2(n[t],e)}(t[0],t[1],o)&&(i=r<3?void 0:i,r=1),e=Object(e);++n=t||n<0||h&&e-c>=o}function m(){var e=t8();if(f(e))return g(e);s=setTimeout(m,function(e){var n=t-(e-l);return h?p8(n,o-(e-c)):n}(e))}function g(e){return s=void 0,d&&r?p(e):(r=i=void 0,a)}function b(){var e=t8(),n=f(e);if(r=arguments,i=this,l=e,n){if(void 0===s)return function(e){return c=e,s=setTimeout(m,t),u?p(e):a}(l);if(h)return clearTimeout(s),s=setTimeout(m,t),p(l)}return void 0===s&&(s=setTimeout(m,t)),a}return t=u8(t)||0,l2(n)&&(u=!!n.leading,o=(h="maxWait"in n)?d8(u8(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),b.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=l=i=s=void 0},b.flush=function(){return void 0===s?a:g(t8())},b}var m8=function(){function e(e,t){for(var n=0;ni&&(l=i),c<0?c=0:c>o&&(c=o);var u=l/i,h=1-c/o;return{h:t.h,s:u,v:h,a:t.a,source:"hsv"}}(e,n.props.hsl,n.container),e)},n.handleMouseDown=function(e){n.handleChange(e);var t=n.getContainerRenderWindow();t.addEventListener("mousemove",n.handleChange),t.addEventListener("mouseup",n.handleMouseUp)},n.handleMouseUp=function(){n.unbindEventListeners()},n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return l2(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),f8(e,t,{leading:r,maxWait:t,trailing:i})}((function(e,t,n){e(t,n)}),50),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),m8(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},n=t.color,r=t.white,i=t.black,o=t.pointer,a=t.circle,s=A4({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:n,white:r,black:i,pointer:o,circle:a}},{custom:!!this.props.style});return m.default.createElement("div",{style:s.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},m.default.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),m.default.createElement("div",{style:s.white,className:"saturation-white"},m.default.createElement("div",{style:s.black,className:"saturation-black"}),m.default.createElement("div",{style:s.pointer},this.props.pointer?m.default.createElement(this.props.pointer,this.props):m.default.createElement("div",{style:s.circle}))))}}]),t}(n.PureComponent||n.Component);const b8=/^\s+/,v8=/\s+$/;function y8(e,t){if(t=t||{},(e=e||"")instanceof y8)return e;if(!(this instanceof y8))return new y8(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return"string"==typeof e&&(e=function(e){e=e.replace(b8,"").replace(v8,"").toLowerCase();var t,n=!1;if(L8[e])e=L8[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=$8.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=$8.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=$8.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=$8.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=$8.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=$8.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=$8.hex8.exec(e))?{r:H8(t[1]),g:H8(t[2]),b:H8(t[3]),a:W8(t[4]),format:n?"name":"hex8"}:(t=$8.hex6.exec(e))?{r:H8(t[1]),g:H8(t[2]),b:H8(t[3]),format:n?"name":"hex"}:(t=$8.hex4.exec(e))?{r:H8(t[1]+""+t[1]),g:H8(t[2]+""+t[2]),b:H8(t[3]+""+t[3]),a:W8(t[4]+""+t[4]),format:n?"name":"hex8"}:!!(t=$8.hex3.exec(e))&&{r:H8(t[1]+""+t[1]),g:H8(t[2]+""+t[2]),b:H8(t[3]+""+t[3]),format:n?"name":"hex"}}(e)),"object"==typeof e&&(K8(e.r)&&K8(e.g)&&K8(e.b)?(l=e.r,c=e.g,u=e.b,t={r:255*U8(l,255),g:255*U8(c,255),b:255*U8(u,255)},a=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):K8(e.h)&&K8(e.s)&&K8(e.v)?(r=z8(e.s),i=z8(e.v),t=function(e,t,n){e=6*U8(e,360),t=U8(t,100),n=U8(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(e.h,r,i),a=!0,s="hsv"):K8(e.h)&&K8(e.s)&&K8(e.l)&&(r=z8(e.s),o=z8(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=U8(e,360),t=U8(t,100),n=U8(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,r,o),a=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a)),n=F8(n),{ok:a,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n};var l,c,u}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=n.ok}function T8(e,t,n){e=U8(e,255),t=U8(t,255),n=U8(n,255);var r,i,o=Math.max(e,t,n),a=Math.min(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(y8(r));return o}function M8(e,t){t=t||6;for(var n=y8(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(y8({h:r,s:i,v:o})),o=(o+s)%1;return a}y8.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=F8(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=_8(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=_8(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=T8(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=T8(this._r,this._g,this._b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return E8(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var o=[G8(Math.round(e).toString(16)),G8(Math.round(t).toString(16)),G8(Math.round(n).toString(16)),G8(V8(r))];return i&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1)?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*U8(this._r,255))+"%",g:Math.round(100*U8(this._g,255))+"%",b:Math.round(100*U8(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*U8(this._r,255))+"%, "+Math.round(100*U8(this._g,255))+"%, "+Math.round(100*U8(this._b,255))+"%)":"rgba("+Math.round(100*U8(this._r,255))+"%, "+Math.round(100*U8(this._g,255))+"%, "+Math.round(100*U8(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B8[E8(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+x8(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=y8(e);n="#"+x8(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return y8(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(A8,arguments)},brighten:function(){return this._applyModification(C8,arguments)},darken:function(){return this._applyModification(I8,arguments)},desaturate:function(){return this._applyModification(w8,arguments)},saturate:function(){return this._applyModification(S8,arguments)},greyscale:function(){return this._applyModification(k8,arguments)},spin:function(){return this._applyModification(O8,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(R8,arguments)},complement:function(){return this._applyCombination(D8,arguments)},monochromatic:function(){return this._applyCombination(M8,arguments)},splitcomplement:function(){return this._applyCombination(N8,arguments)},triad:function(){return this._applyCombination(P8,[3])},tetrad:function(){return this._applyCombination(P8,[4])}},y8.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:z8(e[r]));e=n}return y8(e,t)},y8.equals=function(e,t){return!(!e||!t)&&y8(e).toRgbString()==y8(t).toRgbString()},y8.random=function(){return y8.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},y8.mix=function(e,t,n){n=0===n?0:n||50;var r=y8(e).toRgb(),i=y8(t).toRgb(),o=n/100;return y8({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},y8.readability=function(e,t){var n=y8(e),r=y8(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},y8.isReadable=function(e,t,n){var r,i,o,a,s,l=y8.readability(e,t);switch(i=!1,(o=n,"AA"!==(a=((o=o||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==a&&(a="AA"),"small"!==(s=(o.size||"small").toLowerCase())&&"large"!==s&&(s="small"),r={level:a,size:s}).level+r.size){case"AAsmall":case"AAAlarge":i=l>=4.5;break;case"AAlarge":i=l>=3;break;case"AAAsmall":i=l>=7}return i},y8.mostReadable=function(e,t,n){var r,i,o,a,s=null,l=0;i=(n=n||{}).includeFallbackColors,o=n.level,a=n.size;for(var c=0;cl&&(l=r,s=y8(t[c]));return y8.isReadable(e,s,{level:o,size:a})||!i?s:(n.includeFallbackColors=!1,y8.mostReadable(e,["#fff","#000"],n))};var L8=y8.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B8=y8.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(L8);function F8(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function U8(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var n=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function j8(e){return Math.min(1,Math.max(0,e))}function H8(e){return parseInt(e,16)}function G8(e){return 1==e.length?"0"+e:""+e}function z8(e){return e<=1&&(e=100*e+"%"),e}function V8(e){return Math.round(255*parseFloat(e)).toString(16)}function W8(e){return H8(e)/255}var X8,Y8,q8,$8=(Y8="[\\s|\\(]+("+(X8="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+X8+")[,|\\s]+("+X8+")\\s*\\)?",q8="[\\s|\\(]+("+X8+")[,|\\s]+("+X8+")[,|\\s]+("+X8+")[,|\\s]+("+X8+")\\s*\\)?",{CSS_UNIT:new RegExp(X8),rgb:new RegExp("rgb"+Y8),rgba:new RegExp("rgba"+q8),hsl:new RegExp("hsl"+Y8),hsla:new RegExp("hsla"+q8),hsv:new RegExp("hsv"+Y8),hsva:new RegExp("hsva"+q8),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function K8(e){return!!$8.CSS_UNIT.exec(e)}var Q8=function(e){var t,n,r=0,i=0;return n=function(t){e[t]&&(r+=1,isNaN(e[t])||(i+=1),("s"===t||"l"===t)&&/^\d+%$/.test(e[t])&&(i+=1))},(A1(t=["r","g","b","a","h","s","l","v"])?W3:R3)(t,v2(n)),r===i&&e},Z8=function(e,t){var n=e.hex?y8(e.hex):y8(e),r=n.toHsl(),i=n.toHsv(),o=n.toRgb(),a=n.toHex();return 0===r.s&&(r.h=t||0,i.h=t||0),{hsl:r,hex:"000000"===a&&0===o.a?"transparent":"#"+a,rgb:o,hsv:i,oldHue:e.h||t||r.h,source:e.source}},J8=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&y8(e).isValid()},e7=function(e){if(!e)return"#fff";var t=Z8(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},t7=function(e,t){return y8(t+" ("+e.replace("°","")+")")._ok},n7=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:"span";return function(n){function r(){var e,t,n;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);for(var i=arguments.length,o=Array(i),a=0;a=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return tee.default.createElement("svg",eee({viewBox:"0 0 24 24",style:eee({fill:n,width:i,height:a},l)},c),tee.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))},ree=function(){function e(e,t){for(var n=0;n1&&(e.a=1),n.props.onChange({h:n.props.hsl.h,s:n.props.hsl.s,l:n.props.hsl.l,a:Math.round(100*e.a)/100,source:"rgb"},t)):(e.h||e.s||e.l)&&("string"==typeof e.s&&e.s.includes("%")&&(e.s=e.s.replace("%","")),"string"==typeof e.l&&e.l.includes("%")&&(e.l=e.l.replace("%","")),1==e.s?e.s=.01:1==e.l&&(e.l=.01),n.props.onChange({h:e.h||n.props.hsl.h,s:Number(Z9(e.s)?n.props.hsl.s:e.s),l:Number(Z9(e.l)?n.props.hsl.l:e.l),source:"hsl"},t))},n.showHighlight=function(e){e.currentTarget.style.background="#eee"},n.hideHighlight=function(e){e.currentTarget.style.background="transparent"},1!==e.hsl.a&&"hex"===e.view?n.state={view:"rgb"}:n.state={view:e.view},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),ree(t,[{key:"render",value:function(){var e=this,t=A4({default:{wrap:{paddingTop:"16px",display:"flex"},fields:{flex:"1",display:"flex",marginLeft:"-6px"},field:{paddingLeft:"6px",width:"100%"},alpha:{paddingLeft:"6px",width:"100%"},toggle:{width:"32px",textAlign:"right",position:"relative"},icon:{marginRight:"-4px",marginTop:"12px",cursor:"pointer",position:"relative"},iconHighlight:{position:"absolute",width:"24px",height:"28px",background:"#eee",borderRadius:"4px",top:"10px",left:"12px",display:"none"},input:{fontSize:"11px",color:"#333",width:"100%",borderRadius:"2px",border:"none",boxShadow:"inset 0 0 0 1px #dadada",height:"21px",textAlign:"center"},label:{textTransform:"uppercase",fontSize:"11px",lineHeight:"11px",color:"#969696",textAlign:"center",display:"block",marginTop:"12px"},svg:{fill:"#333",width:"24px",height:"24px",border:"1px transparent solid",borderRadius:"5px"}},disableAlpha:{alpha:{display:"none"}}},this.props,this.state),n=void 0;return"hex"===this.state.view?n=m.default.createElement("div",{style:t.fields,className:"flexbox-fix"},m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"hex",value:this.props.hex,onChange:this.handleChange}))):"rgb"===this.state.view?n=m.default.createElement("div",{style:t.fields,className:"flexbox-fix"},m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"r",value:this.props.rgb.r,onChange:this.handleChange})),m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"g",value:this.props.rgb.g,onChange:this.handleChange})),m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"b",value:this.props.rgb.b,onChange:this.handleChange})),m.default.createElement("div",{style:t.alpha},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"a",value:this.props.rgb.a,arrowOffset:.01,onChange:this.handleChange}))):"hsl"===this.state.view&&(n=m.default.createElement("div",{style:t.fields,className:"flexbox-fix"},m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"h",value:Math.round(this.props.hsl.h),onChange:this.handleChange})),m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"s",value:Math.round(100*this.props.hsl.s)+"%",onChange:this.handleChange})),m.default.createElement("div",{style:t.field},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"l",value:Math.round(100*this.props.hsl.l)+"%",onChange:this.handleChange})),m.default.createElement("div",{style:t.alpha},m.default.createElement(U4,{style:{input:t.input,label:t.label},label:"a",value:this.props.hsl.a,arrowOffset:.01,onChange:this.handleChange})))),m.default.createElement("div",{style:t.wrap,className:"flexbox-fix"},n,m.default.createElement("div",{style:t.toggle},m.default.createElement("div",{style:t.icon,onClick:this.toggleViews,ref:function(t){return e.icon=t}},m.default.createElement(nee,{style:t.svg,onMouseOver:this.showHighlight,onMouseEnter:this.showHighlight,onMouseOut:this.hideHighlight}))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 1!==e.hsl.a&&"hex"===t.view?{view:"rgb"}:null}}]),t}(m.default.Component);iee.defaultProps={view:"hex"};var oee=function(){var e=A4({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",transform:"translate(-6px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}}});return m.default.createElement("div",{style:e.picker})},aee=function(){var e=A4({default:{picker:{width:"12px",height:"12px",borderRadius:"6px",boxShadow:"inset 0 0 0 1px #fff",transform:"translate(-6px, -6px)"}}});return m.default.createElement("div",{style:e.picker})},see=function(e){var t=e.width,n=e.onChange,r=e.disableAlpha,i=e.rgb,o=e.hsl,a=e.hsv,s=e.hex,l=e.renderers,c=e.styles,u=void 0===c?{}:c,h=e.className,d=void 0===h?"":h,p=e.defaultView,f=A4(Z4({default:{picker:{width:t,background:"#fff",borderRadius:"2px",boxShadow:"0 0 2px rgba(0,0,0,.3), 0 4px 8px rgba(0,0,0,.3)",boxSizing:"initial",fontFamily:"Menlo"},saturation:{width:"100%",paddingBottom:"55%",position:"relative",borderRadius:"2px 2px 0 0",overflow:"hidden"},Saturation:{radius:"2px 2px 0 0"},body:{padding:"16px 16px 12px"},controls:{display:"flex"},color:{width:"32px"},swatch:{marginTop:"6px",width:"16px",height:"16px",borderRadius:"8px",position:"relative",overflow:"hidden"},active:{absolute:"0px 0px 0px 0px",borderRadius:"8px",boxShadow:"inset 0 0 0 1px rgba(0,0,0,.1)",background:"rgba("+i.r+", "+i.g+", "+i.b+", "+i.a+")",zIndex:"2"},toggles:{flex:"1"},hue:{height:"10px",position:"relative",marginBottom:"8px"},Hue:{radius:"2px"},alpha:{height:"10px",position:"relative"},Alpha:{radius:"2px"}},disableAlpha:{color:{width:"22px"},alpha:{display:"none"},hue:{marginBottom:"0px"},swatch:{width:"10px",height:"10px",marginTop:"0px"}}},u),{disableAlpha:r});return m.default.createElement("div",{style:f.picker,className:"chrome-picker "+d},m.default.createElement("div",{style:f.saturation},m.default.createElement(g8,{style:f.Saturation,hsl:o,hsv:a,pointer:aee,onChange:n})),m.default.createElement("div",{style:f.body},m.default.createElement("div",{style:f.controls,className:"flexbox-fix"},m.default.createElement("div",{style:f.color},m.default.createElement("div",{style:f.swatch},m.default.createElement("div",{style:f.active}),m.default.createElement(D4,{renderers:l}))),m.default.createElement("div",{style:f.toggles},m.default.createElement("div",{style:f.hue},m.default.createElement(G4,{style:f.Hue,hsl:o,pointer:oee,onChange:n})),m.default.createElement("div",{style:f.alpha},m.default.createElement(M4,{style:f.Alpha,rgb:i,hsl:o,pointer:oee,renderers:l,onChange:n})))),m.default.createElement(iee,{rgb:i,hsl:o,hex:s,view:p,onChange:n,disableAlpha:r})))};see.propTypes={width:S.exports.oneOfType([S.exports.string,S.exports.number]),disableAlpha:S.exports.bool,styles:S.exports.object,defaultView:S.exports.oneOf(["hex","rgb","hsl"])},see.defaultProps={width:225,disableAlpha:!1,styles:{}},i7(see);var lee=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,o=e.active,a=A4({default:{color:{background:t,width:"15px",height:"15px",float:"left",marginRight:"5px",marginBottom:"5px",position:"relative",cursor:"pointer"},dot:{absolute:"5px 5px 5px 5px",background:e7(t),borderRadius:"50%",opacity:"0"}},active:{dot:{opacity:"1"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},dot:{background:"#000"}},transparent:{dot:{background:"#000"}}},{active:o,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return m.default.createElement(c7,{style:a.color,color:t,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},m.default.createElement("div",{style:a.dot}))},cee=function(e){var t=e.hex,n=e.rgb,r=e.onChange,i=A4({default:{fields:{display:"flex",paddingBottom:"6px",paddingRight:"5px",position:"relative"},active:{position:"absolute",top:"6px",left:"5px",height:"9px",width:"9px",background:t},HEXwrap:{flex:"6",position:"relative"},HEXinput:{width:"80%",padding:"0px",paddingLeft:"20%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},HEXlabel:{display:"none"},RGBwrap:{flex:"3",position:"relative"},RGBinput:{width:"70%",padding:"0px",paddingLeft:"30%",border:"none",outline:"none",background:"none",fontSize:"12px",color:"#333",height:"16px"},RGBlabel:{position:"absolute",top:"3px",left:"0px",lineHeight:"16px",textTransform:"uppercase",fontSize:"12px",color:"#999"}}}),o=function(e,t){e.r||e.g||e.b?r({r:e.r||n.r,g:e.g||n.g,b:e.b||n.b,source:"rgb"},t):r({hex:e.hex,source:"hex"},t)};return m.default.createElement("div",{style:i.fields,className:"flexbox-fix"},m.default.createElement("div",{style:i.active}),m.default.createElement(U4,{style:{wrap:i.HEXwrap,input:i.HEXinput,label:i.HEXlabel},label:"hex",value:t,onChange:o}),m.default.createElement(U4,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"r",value:n.r,onChange:o}),m.default.createElement(U4,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"g",value:n.g,onChange:o}),m.default.createElement(U4,{style:{wrap:i.RGBwrap,input:i.RGBinput,label:i.RGBlabel},label:"b",value:n.b,onChange:o}))},uee=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.colors,i=e.hex,o=e.rgb,a=e.styles,s=void 0===a?{}:a,l=e.className,c=void 0===l?"":l,u=A4(Z4({default:{Compact:{background:"#f6f6f6",radius:"4px"},compact:{paddingTop:"5px",paddingLeft:"5px",boxSizing:"initial",width:"240px"},clear:{clear:"both"}}},s)),h=function(e,n){e.hex?J8(e.hex)&&t({hex:e.hex,source:"hex"},n):t(e,n)};return m.default.createElement(e8,{style:u.Compact,styles:s},m.default.createElement("div",{style:u.compact,className:"compact-picker "+c},m.default.createElement("div",null,L3(r,(function(e){return m.default.createElement(lee,{key:e,color:e,active:e.toLowerCase()===i,onClick:h,onSwatchHover:n})})),m.default.createElement("div",{style:u.clear})),m.default.createElement(cee,{hex:i,rgb:o,onChange:h})))};uee.propTypes={colors:S.exports.arrayOf(S.exports.string),styles:S.exports.object},uee.defaultProps={colors:["#4D4D4D","#999999","#FFFFFF","#F44E3B","#FE9200","#FCDC00","#DBDF00","#A4DD00","#68CCCA","#73D8FF","#AEA1FF","#FDA1FF","#333333","#808080","#cccccc","#D33115","#E27300","#FCC400","#B0BC00","#68BC00","#16A5A5","#009CE0","#7B64FF","#FA28FF","#000000","#666666","#B3B3B3","#9F0500","#C45100","#FB9E00","#808900","#194D33","#0C797D","#0062B1","#653294","#AB149E"],styles:{}},i7(uee);const hee=S4((function(e){var t=e.hover,n=e.color,r=e.onClick,i=e.onSwatchHover,o={position:"relative",zIndex:"2",outline:"2px solid #fff",boxShadow:"0 0 5px 2px rgba(0,0,0,0.25)"},a=A4({default:{swatch:{width:"25px",height:"25px",fontSize:"0"}},hover:{swatch:o}},{hover:t});return m.default.createElement("div",{style:a.swatch},m.default.createElement(c7,{color:n,onClick:r,onHover:i,focusStyle:o}))}));var dee=function(e){var t=e.width,n=e.colors,r=e.onChange,i=e.onSwatchHover,o=e.triangle,a=e.styles,s=void 0===a?{}:a,l=e.className,c=void 0===l?"":l,u=A4(Z4({default:{card:{width:t,background:"#fff",border:"1px solid rgba(0,0,0,0.2)",boxShadow:"0 3px 12px rgba(0,0,0,0.15)",borderRadius:"4px",position:"relative",padding:"5px",display:"flex",flexWrap:"wrap"},triangle:{position:"absolute",border:"7px solid transparent",borderBottomColor:"#fff"},triangleShadow:{position:"absolute",border:"8px solid transparent",borderBottomColor:"rgba(0,0,0,0.15)"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-14px",left:"10px"},triangleShadow:{top:"-16px",left:"9px"}},"top-right-triangle":{triangle:{top:"-14px",right:"10px"},triangleShadow:{top:"-16px",right:"9px"}},"bottom-left-triangle":{triangle:{top:"35px",left:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",left:"9px",transform:"rotate(180deg)"}},"bottom-right-triangle":{triangle:{top:"35px",right:"10px",transform:"rotate(180deg)"},triangleShadow:{top:"37px",right:"9px",transform:"rotate(180deg)"}}},s),{"hide-triangle":"hide"===o,"top-left-triangle":"top-left"===o,"top-right-triangle":"top-right"===o,"bottom-left-triangle":"bottom-left"===o,"bottom-right-triangle":"bottom-right"===o}),h=function(e,t){return r({hex:e,source:"hex"},t)};return m.default.createElement("div",{style:u.card,className:"github-picker "+c},m.default.createElement("div",{style:u.triangleShadow}),m.default.createElement("div",{style:u.triangle}),L3(n,(function(e){return m.default.createElement(hee,{color:e,key:e,onClick:h,onSwatchHover:i})})))};dee.propTypes={width:S.exports.oneOfType([S.exports.string,S.exports.number]),colors:S.exports.arrayOf(S.exports.string),triangle:S.exports.oneOf(["hide","top-left","top-right","bottom-left","bottom-right"]),styles:S.exports.object},dee.defaultProps={width:200,colors:["#B80000","#DB3E00","#FCCB00","#008B02","#006B76","#1273DE","#004DCF","#5300EB","#EB9694","#FAD0C3","#FEF3BD","#C1E1C5","#BEDADC","#C4DEF6","#BED3F3","#D4C4FB"],triangle:"top-left",styles:{}},i7(dee);var pee=Object.assign||function(e){for(var t=1;t.5});return m.default.createElement("div",{style:n.picker})},bee=function(){var e=A4({default:{triangle:{width:0,height:0,borderStyle:"solid",borderWidth:"4px 0 4px 6px",borderColor:"transparent transparent transparent #fff",position:"absolute",top:"1px",left:"1px"},triangleBorder:{width:0,height:0,borderStyle:"solid",borderWidth:"5px 0 5px 8px",borderColor:"transparent transparent transparent #555"},left:{Extend:"triangleBorder",transform:"translate(-13px, -4px)"},leftInside:{Extend:"triangle",transform:"translate(-8px, -5px)"},right:{Extend:"triangleBorder",transform:"translate(20px, -14px) rotate(180deg)"},rightInside:{Extend:"triangle",transform:"translate(-8px, -5px)"}}});return m.default.createElement("div",{style:e.pointer},m.default.createElement("div",{style:e.left},m.default.createElement("div",{style:e.leftInside})),m.default.createElement("div",{style:e.right},m.default.createElement("div",{style:e.rightInside})))},vee=function(e){var t=e.onClick,n=e.label,r=e.children,i=e.active,o=A4({default:{button:{backgroundImage:"linear-gradient(-180deg, #FFFFFF 0%, #E6E6E6 100%)",border:"1px solid #878787",borderRadius:"2px",height:"20px",boxShadow:"0 1px 0 0 #EAEAEA",fontSize:"14px",color:"#000",lineHeight:"20px",textAlign:"center",marginBottom:"10px",cursor:"pointer"}},active:{button:{boxShadow:"0 0 0 1px #878787"}}},{active:i});return m.default.createElement("div",{style:o.button,onClick:t},n||r)},yee=function(e){var t=e.rgb,n=e.currentColor,r=A4({default:{swatches:{border:"1px solid #B3B3B3",borderBottom:"1px solid #F0F0F0",marginBottom:"2px",marginTop:"1px"},new:{height:"34px",background:"rgb("+t.r+","+t.g+", "+t.b+")",boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 1px 0 #000"},current:{height:"34px",background:n,boxShadow:"inset 1px 0 0 #000, inset -1px 0 0 #000, inset 0 -1px 0 #000"},label:{fontSize:"14px",color:"#000",textAlign:"center"}}});return m.default.createElement("div",null,m.default.createElement("div",{style:r.label},"new"),m.default.createElement("div",{style:r.swatches},m.default.createElement("div",{style:r.new}),m.default.createElement("div",{style:r.current})),m.default.createElement("div",{style:r.label},"current"))},Tee=function(){function e(e,t){for(var n=0;n100&&(e.a=100),e.a/=100,t({h:r.h,s:r.s,l:r.l,a:e.a,source:"rgb"},i))};return m.default.createElement("div",{style:a.fields,className:"flexbox-fix"},m.default.createElement("div",{style:a.double},m.default.createElement(U4,{style:{input:a.input,label:a.label},label:"hex",value:i.replace("#",""),onChange:s})),m.default.createElement("div",{style:a.single},m.default.createElement(U4,{style:{input:a.input,label:a.label},label:"r",value:n.r,onChange:s,dragLabel:"true",dragMax:"255"})),m.default.createElement("div",{style:a.single},m.default.createElement(U4,{style:{input:a.input,label:a.label},label:"g",value:n.g,onChange:s,dragLabel:"true",dragMax:"255"})),m.default.createElement("div",{style:a.single},m.default.createElement(U4,{style:{input:a.input,label:a.label},label:"b",value:n.b,onChange:s,dragLabel:"true",dragMax:"255"})),m.default.createElement("div",{style:a.alpha},m.default.createElement(U4,{style:{input:a.input,label:a.label},label:"a",value:Math.round(100*n.a),onChange:s,dragLabel:"true",dragMax:"100"})))},xee=Object.assign||function(e){for(var t=1;t=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(e,["fill","width","height","style"]);return Nee.default.createElement("svg",Pee({viewBox:"0 0 24 24",style:Pee({fill:n,width:i,height:a},l)},c),Nee.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))},Mee=function(e){var t=e.color,n=e.onClick,r=void 0===n?function(){}:n,i=e.onSwatchHover,o=e.first,a=e.last,s=e.active,l=A4({default:{color:{width:"40px",height:"24px",cursor:"pointer",background:t,marginBottom:"1px"},check:{color:e7(t),marginLeft:"8px",display:"none"}},first:{color:{overflow:"hidden",borderRadius:"2px 2px 0 0"}},last:{color:{overflow:"hidden",borderRadius:"0 0 2px 2px"}},active:{check:{display:"block"}},"color-#FFFFFF":{color:{boxShadow:"inset 0 0 0 1px #ddd"},check:{color:"#333"}},transparent:{check:{color:"#333"}}},{first:o,last:a,active:s,"color-#FFFFFF":"#FFFFFF"===t,transparent:"transparent"===t});return m.default.createElement(c7,{color:t,style:l.color,onClick:r,onHover:i,focusStyle:{boxShadow:"0 0 4px "+t}},m.default.createElement("div",{style:l.check},m.default.createElement(Ree,null)))},Lee=function(e){var t=e.onClick,n=e.onSwatchHover,r=e.group,i=e.active,o=A4({default:{group:{paddingBottom:"10px",width:"40px",float:"left",marginRight:"10px"}}});return m.default.createElement("div",{style:o.group},L3(r,(function(e,o){return m.default.createElement(Mee,{key:e,color:e,active:e.toLowerCase()===i,first:0===o,last:o===r.length-1,onClick:t,onSwatchHover:n})})))},Bee=function(e){var t=e.width,n=e.height,r=e.onChange,i=e.onSwatchHover,o=e.colors,a=e.hex,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,h=A4(Z4({default:{picker:{width:t,height:n},overflow:{height:n,overflowY:"scroll"},body:{padding:"16px 0 6px 16px"},clear:{clear:"both"}}},l)),d=function(e,t){return r({hex:e,source:"hex"},t)};return m.default.createElement("div",{style:h.picker,className:"swatches-picker "+u},m.default.createElement(e8,null,m.default.createElement("div",{style:h.overflow},m.default.createElement("div",{style:h.body},L3(o,(function(e){return m.default.createElement(Lee,{key:e.toString(),group:e,active:a,onClick:d,onSwatchHover:i})})),m.default.createElement("div",{style:h.clear})))))};Bee.propTypes={width:S.exports.oneOfType([S.exports.string,S.exports.number]),height:S.exports.oneOfType([S.exports.string,S.exports.number]),colors:S.exports.arrayOf(S.exports.arrayOf(S.exports.string)),styles:S.exports.object},Bee.defaultProps={width:320,height:240,colors:[[v7,b7,g7,m7,f7],[x7,E7,_7,T7,y7],[C7,A7,k7,S7,w7],[N7,P7,D7,O7,I7],[F7,B7,L7,M7,R7],[z7,G7,H7,j7,U7],[q7,Y7,X7,W7,V7],[J7,Z7,Q7,K7,$7],[i9,r9,n9,t9,e9],["#194D33",l9,s9,a9,o9],[p9,d9,h9,u9,c9],[v9,b9,g9,m9,f9],[x9,E9,_9,T9,y9],[C9,A9,k9,S9,w9],[N9,P9,D9,O9,I9],[F9,B9,L9,M9,R9],[z9,G9,H9,j9,U9],[q9,Y9,X9,W9,V9],["#000000","#525252","#969696","#D9D9D9","#FFFFFF"]],styles:{}},i7(Bee);var Fee=function(e){var t=e.onChange,n=e.onSwatchHover,r=e.hex,i=e.colors,o=e.width,a=e.triangle,s=e.styles,l=void 0===s?{}:s,c=e.className,u=void 0===c?"":c,h=A4(Z4({default:{card:{width:o,background:"#fff",border:"0 solid rgba(0,0,0,0.25)",boxShadow:"0 1px 4px rgba(0,0,0,0.25)",borderRadius:"4px",position:"relative"},body:{padding:"15px 9px 9px 15px"},label:{fontSize:"18px",color:"#fff"},triangle:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent #fff transparent",position:"absolute"},triangleShadow:{width:"0px",height:"0px",borderStyle:"solid",borderWidth:"0 9px 10px 9px",borderColor:"transparent transparent rgba(0,0,0,.1) transparent",position:"absolute"},hash:{background:"#F0F0F0",height:"30px",width:"30px",borderRadius:"4px 0 0 4px",float:"left",color:"#98A1A4",display:"flex",alignItems:"center",justifyContent:"center"},input:{width:"100px",fontSize:"14px",color:"#666",border:"0px",outline:"none",height:"28px",boxShadow:"inset 0 0 0 1px #F0F0F0",boxSizing:"content-box",borderRadius:"0 4px 4px 0",float:"left",paddingLeft:"8px"},swatch:{width:"30px",height:"30px",float:"left",borderRadius:"4px",margin:"0 6px 6px 0"},clear:{clear:"both"}},"hide-triangle":{triangle:{display:"none"},triangleShadow:{display:"none"}},"top-left-triangle":{triangle:{top:"-10px",left:"12px"},triangleShadow:{top:"-11px",left:"12px"}},"top-right-triangle":{triangle:{top:"-10px",right:"12px"},triangleShadow:{top:"-11px",right:"12px"}}},l),{"hide-triangle":"hide"===a,"top-left-triangle":"top-left"===a,"top-right-triangle":"top-right"===a}),d=function(e,n){J8(e)&&t({hex:e,source:"hex"},n)};return m.default.createElement("div",{style:h.card,className:"twitter-picker "+u},m.default.createElement("div",{style:h.triangleShadow}),m.default.createElement("div",{style:h.triangle}),m.default.createElement("div",{style:h.body},L3(i,(function(e,t){return m.default.createElement(c7,{key:t,color:e,hex:e,style:h.swatch,onClick:d,onHover:n,focusStyle:{boxShadow:"0 0 4px "+e}})})),m.default.createElement("div",{style:h.hash},"#"),m.default.createElement(U4,{label:null,style:{input:h.input},value:r.replace("#",""),onChange:d}),m.default.createElement("div",{style:h.clear})))};Fee.propTypes={width:S.exports.oneOfType([S.exports.string,S.exports.number]),triangle:S.exports.oneOf(["hide","top-left","top-right"]),colors:S.exports.arrayOf(S.exports.string),styles:S.exports.object},Fee.defaultProps={width:276,colors:["#FF6900","#FCB900","#7BDCB5","#00D084","#8ED1FC","#0693E3","#ABB8C3","#EB144C","#F78DA7","#9900EF"],triangle:"top-left",styles:{}},i7(Fee);var Uee=function(e){var t=A4({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",border:"2px #fff solid",transform:"translate(-12px, -13px)",background:"hsl("+Math.round(e.hsl.h)+", "+Math.round(100*e.hsl.s)+"%, "+Math.round(100*e.hsl.l)+"%)"}}});return m.default.createElement("div",{style:t.picker})};Uee.propTypes={hsl:S.exports.shape({h:S.exports.number,s:S.exports.number,l:S.exports.number,a:S.exports.number})},Uee.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var jee=function(e){var t=A4({default:{picker:{width:"20px",height:"20px",borderRadius:"22px",transform:"translate(-10px, -7px)",background:"hsl("+Math.round(e.hsl.h)+", 100%, 50%)",border:"2px white solid"}}});return m.default.createElement("div",{style:t.picker})};jee.propTypes={hsl:S.exports.shape({h:S.exports.number,s:S.exports.number,l:S.exports.number,a:S.exports.number})},jee.defaultProps={hsl:{a:1,h:249.94,l:.2,s:.5}};var Hee=function(e){var t=e.onChange,n=e.rgb,r=e.hsl,i=e.hex,o=e.hsv,a=function(e,n){if(e.hex)J8(e.hex)&&t({hex:e.hex,source:"hex"},n);else if(e.rgb){var r=e.rgb.split(",");t7(e.rgb,"rgb")&&t({r:r[0],g:r[1],b:r[2],a:1,source:"rgb"},n)}else if(e.hsv){var i=e.hsv.split(",");t7(e.hsv,"hsv")&&(i[2]=i[2].replace("%",""),i[1]=i[1].replace("%",""),i[0]=i[0].replace("°",""),1==i[1]?i[1]=.01:1==i[2]&&(i[2]=.01),t({h:Number(i[0]),s:Number(i[1]),v:Number(i[2]),source:"hsv"},n))}else if(e.hsl){var o=e.hsl.split(",");t7(e.hsl,"hsl")&&(o[2]=o[2].replace("%",""),o[1]=o[1].replace("%",""),o[0]=o[0].replace("°",""),1==u[1]?u[1]=.01:1==u[2]&&(u[2]=.01),t({h:Number(o[0]),s:Number(o[1]),v:Number(o[2]),source:"hsl"},n))}},s=A4({default:{wrap:{display:"flex",height:"100px",marginTop:"4px"},fields:{width:"100%"},column:{paddingTop:"10px",display:"flex",justifyContent:"space-between"},double:{padding:"0px 4.4px",boxSizing:"border-box"},input:{width:"100%",height:"38px",boxSizing:"border-box",padding:"4px 10% 3px",textAlign:"center",border:"1px solid #dadce0",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",fontFamily:"Roboto,Arial,sans-serif"},input2:{height:"38px",width:"100%",border:"1px solid #dadce0",boxSizing:"border-box",fontSize:"11px",textTransform:"lowercase",borderRadius:"5px",outline:"none",paddingLeft:"10px",fontFamily:"Roboto,Arial,sans-serif"},label:{textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"35px",top:"-6px",left:"0",right:"0",marginLeft:"auto",marginRight:"auto",fontFamily:"Roboto,Arial,sans-serif"},label2:{left:"10px",textAlign:"center",fontSize:"12px",background:"#fff",position:"absolute",textTransform:"uppercase",color:"#3c4043",width:"32px",top:"-6px",fontFamily:"Roboto,Arial,sans-serif"},single:{flexGrow:"1",margin:"0px 4.4px"}}}),l=n.r+", "+n.g+", "+n.b,c=Math.round(r.h)+"°, "+Math.round(100*r.s)+"%, "+Math.round(100*r.l)+"%",u=Math.round(o.h)+"°, "+Math.round(100*o.s)+"%, "+Math.round(100*o.v)+"%";return m.default.createElement("div",{style:s.wrap,className:"flexbox-fix"},m.default.createElement("div",{style:s.fields},m.default.createElement("div",{style:s.double},m.default.createElement(U4,{style:{input:s.input,label:s.label},label:"hex",value:i,onChange:a})),m.default.createElement("div",{style:s.column},m.default.createElement("div",{style:s.single},m.default.createElement(U4,{style:{input:s.input2,label:s.label2},label:"rgb",value:l,onChange:a})),m.default.createElement("div",{style:s.single},m.default.createElement(U4,{style:{input:s.input2,label:s.label2},label:"hsv",value:u,onChange:a})),m.default.createElement("div",{style:s.single},m.default.createElement(U4,{style:{input:s.input2,label:s.label2},label:"hsl",value:c,onChange:a})))))},Gee=function(e){var t=e.width,n=e.onChange,r=e.rgb,i=e.hsl,o=e.hsv,a=e.hex,s=e.header,l=e.styles,c=void 0===l?{}:l,u=e.className,h=void 0===u?"":u,d=A4(Z4({default:{picker:{width:t,background:"#fff",border:"1px solid #dfe1e5",boxSizing:"initial",display:"flex",flexWrap:"wrap",borderRadius:"8px 8px 0px 0px"},head:{height:"57px",width:"100%",paddingTop:"16px",paddingBottom:"16px",paddingLeft:"16px",fontSize:"20px",boxSizing:"border-box",fontFamily:"Roboto-Regular,HelveticaNeue,Arial,sans-serif"},saturation:{width:"70%",padding:"0px",position:"relative",overflow:"hidden"},swatch:{width:"30%",height:"228px",padding:"0px",background:"rgba("+r.r+", "+r.g+", "+r.b+", 1)",position:"relative",overflow:"hidden"},body:{margin:"auto",width:"95%"},controls:{display:"flex",boxSizing:"border-box",height:"52px",paddingTop:"22px"},color:{width:"32px"},hue:{height:"8px",position:"relative",margin:"0px 16px 0px 16px",width:"100%"},Hue:{radius:"2px"}}},c));return m.default.createElement("div",{style:d.picker,className:"google-picker "+h},m.default.createElement("div",{style:d.head},s),m.default.createElement("div",{style:d.swatch}),m.default.createElement("div",{style:d.saturation},m.default.createElement(g8,{hsl:i,hsv:o,pointer:Uee,onChange:n})),m.default.createElement("div",{style:d.body},m.default.createElement("div",{style:d.controls,className:"flexbox-fix"},m.default.createElement("div",{style:d.hue},m.default.createElement(G4,{style:d.Hue,hsl:i,radius:"4px",pointer:jee,onChange:n}))),m.default.createElement(Hee,{rgb:r,hsl:i,hex:a,hsv:o,onChange:n})))};Gee.propTypes={width:S.exports.oneOfType([S.exports.string,S.exports.number]),styles:S.exports.object,header:S.exports.string},Gee.defaultProps={width:652,styles:{},header:"Color picker"},i7(Gee);let zee=function(e){i(n,e);var t=o(n);function n(e){var r;d(this,n),r=t.call(this,e);const i=An(e.color);return r.state={displayColorPicker:!1,color:{r:i.r,g:i.g,b:i.b,a:i.opacity}},r}return f(n,[{key:"handleClick",value:function(){this.setState((e=>({displayColorPicker:!e.displayColorPicker})))}},{key:"handleClose",value:function(){this.setState({displayColorPicker:!1})}},{key:"handleChange",value:function(e){const t=e.rgb,n=`rgba(${t.r},${t.g},${t.b},${t.a})`;this.props.onChange(n),this.setState({color:e.rgb})}},{key:"render",value:function(){const e=A4({default:{color:{width:"32px",height:"14px",borderRadius:"2px",background:`rgba(${this.state.color.r}, ${this.state.color.g}, ${this.state.color.b}, ${this.state.color.a})`},swatch:{padding:"5px",background:"#fff",cursor:"pointer",borderRadius:"1px"},popover:{position:"absolute",zIndex:"2"},cover:{position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}}});return m.default.createElement("div",null,m.default.createElement("div",{onClick:this.handleClick.bind(this),style:e.swatch},m.default.createElement("div",{style:e.color})),this.state.displayColorPicker?m.default.createElement("div",{style:e.popover},m.default.createElement("div",{onClick:this.handleClose.bind(this),style:e.cover}),m.default.createElement(Aee,{color:this.state.color,onChange:this.handleChange.bind(this)})):null)}}]),n}(m.default.Component);zee.propTypes={color:S.exports.string,onChange:S.exports.func};let Vee=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={colors:e.track.options.colorRange.slice()},r}return f(n,[{key:"handleColorsChanged",value:function(e){this.setState({colors:e})}},{key:"handleSubmit",value:function(){this.props.track.options.colorRange=this.state.colors,this.props.onSubmit(this.props.track.options)}},{key:"handleAddColor",value:function(){this.setState((e=>({colors:e.colors.concat(e.colors[e.colors.length-1])})))}},{key:"handleRemoveColor",value:function(e){this.setState((t=>({colors:t.colors.slice(0,e).concat(t.colors.slice(e+1))})))}},{key:"render",value:function(){const e=JSON.parse(JSON.stringify(this.props.track)),t=Object.assign(e,{options:{colorRange:this.state.colors}}),n={editable:!1,zoomFixed:!0,views:[{uid:`hmo-${this.props.track.uid}`,initialXDomain:this.props.xScale?this.props.xScale.domain():[0,1],initialYDomain:this.props.yScale?this.props.yScale.domain():[0,1],tracks:{center:[t]},layout:{x:0,y:0,h:12,w:12,i:`hmo-${this.props.track.id}`}}]},r=this.state.colors.map(((e,t)=>{const n=this.state.colors.length>2&&t===this.state.colors.length-1?m.default.createElement("div",{onClick:()=>this.handleRemoveColor(t),style:{background:"white",position:"absolute",top:0,right:0,opacity:1,width:14,height:14,borderRadius:2,cursor:"pointer"}},m.default.createElement("svg",{height:"10px",style:{position:"absolute",top:2,right:2,opacity:.5,width:10,height:10}},m.default.createElement("use",{xlinkHref:"#cross"}))):null;return m.default.createElement("div",{key:`l${t}`,style:{borderRadius:"1px",boxShadow:"0 0 0 1px #E5E5E5",position:"relative",outline:"none"}},n,m.default.createElement(zee,{key:t,color:this.state.colors[t],onChange:e=>{this.setState((n=>{const r=n.colors.slice();return r[t]=e,{colors:r}}),(()=>{this.handleColorsChanged(this.state.colors)}))}}))})).reverse(),i=this.state.colors.length<10?m.default.createElement("div",{onClick:this.handleAddColor.bind(this),style:{position:"relative",outline:"none",height:"25px",padding:"5px",background:"#fff",borderRadius:"1px",boxShadow:"0 0 0 1px #E5E5E5",cursor:"pointer"}},m.default.createElement("div",{style:{textAlign:"center",width:"32px",height:"14px"}},m.default.createElement("svg",{height:"100%",style:{opacity:.5,margin:"auto",display:"block"},width:"10px"},m.default.createElement("use",{xlinkHref:"#plus"})))):null;return m.default.createElement(h1,{okayTitle:"Submit",onCancel:this.props.onCancel,onOkay:this.handleSubmit.bind(this),title:"Custom Color Map"},m.default.createElement("table",{className:"table-track-options"},m.default.createElement("thead",null),m.default.createElement("tbody",{style:{verticalAlign:"top"}},m.default.createElement("tr",null,m.default.createElement("td",{className:"td-track-options"},m.default.createElement("table",null,m.default.createElement("tbody",null,m.default.createElement("tr",null,m.default.createElement("td",{className:"td-track-options"},"Preview")),m.default.createElement("tr",null,m.default.createElement("td",{className:"td-track-options"},m.default.createElement("div",{style:{width:200}},m.default.createElement(xoe,{options:{bounded:!1},viewConfig:n}))))))),m.default.createElement("td",{className:"td-track-options"},m.default.createElement("table",null,m.default.createElement("tbody",null,m.default.createElement("tr",null,m.default.createElement("td",{className:"td-track-options"},"Colors")),m.default.createElement("tr",null,m.default.createElement("td",{className:"td-track-options"},i,m.default.createElement("div",{style:{position:"relative"}},r))))))))))}}]),n}(m.default.Component);Vee.propTypes={handleCancel:S.exports.func,onCancel:S.exports.func,onSubmit:S.exports.func,track:S.exports.object,xScale:S.exports.object,yScale:S.exports.object};const Wee=e=>{if(!e.header)return[];const t=e.header.split("\t"),n=[];for(let e=0;ee.reduce(((e,r)=>(e[r]={name:`${r*n}${t}`,value:r},e)),{}),Yee={yes:{name:"Yes",value:!0},no:{name:"No",value:!1}},qee={black:{name:"Black",value:"black"},blue:{name:"Blue",value:"blue"},brown:{name:"Brown",value:"brown"},cyan:{name:"Cyan",value:"cyan"},green:{name:"Green",value:"green"},grey:{name:"Grey",value:"grey"},orange:{name:"Orange",value:"orange"},purple:{name:"Purple",value:"purple"},turquoise:{name:"Turquoise",value:"turquoise"},red:{name:"Red",value:"red"},white:{name:"White",value:"white"}},$ee=Xee([1,2,3,5,8,13,21]),Kee=Object.assign($ee,{none:{name:"none",value:"none"}}),Qee=Xee([0,2,4,8,16,32,64,128,256]),Zee=Xee([0,.2,.4,.6,.8,1],"%",100),Jee={axisLabelFormatting:{name:"Axis Label Formatting",inlineOptions:{normal:{name:"normal",value:"normal"},scientific:{name:"scientific",value:"scientific"}}},flipDiagonal:{name:"Flip Across Diagonal",inlineOptions:{none:{name:"No",value:"none"},yes:{name:"Yes",value:"yes"},copy:{name:"Copy",value:"copy"}}},heatmapValueScaling:{name:"Value Scaling",inlineOptions:{linear:{name:"Linear",value:"linear"},log:{name:"Log",value:"log"}}},valueScaling:{name:"Value Scaling",inlineOptions:{linear:{name:"Linear",value:"linear"},log:{name:"Log",value:"log"}}},extent:{name:"Extent",inlineOptions:{full:{name:"Full",value:"full"},upperRight:{name:"Upper Right",value:"upper-right"},lowerLeft:{name:"Lower Left",value:"lower-left"}}},labelLeftMargin:{name:"Label Left Margin",inlineOptions:Qee},labelRightMargin:{name:"Label Right Margin",inlineOptions:Qee},labelTopMargin:{name:"Label Top Margin",inlineOptions:Qee},labelBottomMargin:{name:"Label Bottom Margin",inlineOptions:Qee},labelShowResolution:{name:"Label Show Resolution",inlineOptions:Yee},labelShowAssembly:{name:"Label Show Assembly",inlineOptions:Yee},lineStrokeWidth:{name:"Stroke Width",inlineOptions:$ee},strokeWidth:{name:"Stroke Width",inlineOptions:$ee},trackBorderWidth:{name:"Track Border Width",inlineOptions:$ee},separatePlusMinusStrands:{name:"Separate +/- strands",inlineOptions:Yee},sortLargestOnTop:{name:"Sort Largest On Top",inlineOptions:Yee},showTexts:{name:"Show texts",inlineOptions:Yee},staggered:{name:"Staggered",inlineOptions:Yee},minSquareSize:{name:"Minimum size",inlineOptions:Kee},pointSize:{name:"Point Size",inlineOptions:$ee},pointColor:{name:"Point Color",inlineOptions:qee},trackBorderColor:{name:"Track Border Color",inlineOptions:qee},backgroundColor:{name:"Background Color",inlineOptions:{white:{name:"White",value:"white"},lightGrey:{name:"Light Grey",value:"#eeeeee"},grey:{name:"Grey",value:"#cccccc"},black:{name:"Black",value:"black"},transparent:{name:"Transparent",value:"transparent"}}},colorScale:{name:"Color Scale",inlineOptions:{epilogos:{name:"Epilogos",values:["#FF0000","#FF4500","#32CD32","#008000","#006400","#C2E105","#FFFF00","#66CDAA","#8A91D0","#CD5C5C","#E9967A","#BDB76B","#808080","#C0C0C0","#FFFFFF"]},category10:{name:"D3 Category10",values:["#1F77B4","#FF7F0E","#2CA02C","#D62728","#9467BD","#8C564B","#E377C2","#7F7F7F","#BCBD22","#17BECF"]}}},minusStrandColor:{name:"- Strand Color",inlineOptions:qee},plusStrandColor:{name:"+ Strand Color",inlineOptions:qee},lineStrokeColor:{name:"Stroke color",inlineOptions:qee},projectionStrokeColor:{name:"Stroke color",inlineOptions:qee},projectionFillColor:{name:"Fill color",inlineOptions:qee},stroke:{name:"Stroke Color",inlineOptions:qee},strokeColor:{name:"Stroke color",inlineOptions:qee},fill:{name:"Fill Color",inlineOptions:qee},color:{name:"Color",inlineOptions:qee},fontColor:{name:"Font color",inlineOptions:qee},fillColor:{name:"Fill color",inlineOptions:qee},barFillColor:{name:"Fill color",inlineOptions:qee},barFillColorTop:{name:"Top Fill color",inlineOptions:qee},barFillColorBottom:{name:"Bottom Fill color",inlineOptions:qee},barOpacity:{name:"Bar opacity",inlineOptions:Zee},zeroLineVisible:{name:"Zero line visible",inlineOptions:Yee},zeroLineColor:{name:"Zero line color",inlineOptions:qee},zeroLineOpacity:{name:"Zero line opacity",inlineOptions:Xee([.2,.4,.6,.8,1],"%",100)},fillOpacity:{name:"Fill Opacity",inlineOptions:Zee},strokeOpacity:{name:"Stroke Opacity",inlineOptions:Zee},strokePos:{name:"Stroke Position",inlineOptions:{aroundInner:{name:"Around Inner",value:"around"},aroundCenter:{name:"Around Center",value:null},hidden:{name:"Hidden",value:"hidden"},top:{name:"Top",value:"top"},right:{name:"Right",value:"right"},bottom:{name:"Bottom",value:"bottom"},left:{name:"Left",value:"left"}}},barBorder:{name:"Bar border",inlineOptions:Yee},scaledHeight:{name:"Scaled height",inlineOptions:Yee},rectangleDomainStrokeColor:{name:"Stroke color",inlineOptions:qee},rectangleDomainFillColor:{name:"Fill color",inlineOptions:qee},rectangleDomainFillOpacity:{name:"Fill opacity",inlineOptions:Zee},rectangleDomainOpacity:{name:"Opacity",inlineOptions:Zee},mapboxStyle:{name:"Map style",inlineOptions:{streets:{name:"streets",value:"mapbox.streets"},light:{name:"light",value:"mapbox.light"},dark:{name:"dark",value:"mapbox.dark"},satellite:{name:"satellite",value:"mapbox.satellite"},"streets-satellite":{name:"streets-satellite",value:"mapbox.streets-satellite"},wheatpaste:{name:"wheatpaste",value:"mapbox.wheatpaste"},"streets-basic":{name:"streets-basic",value:"mapbox.streets-basic"},comic:{name:"comic",value:"mapbox.comic"},outdoors:{name:"outdoors",value:"mapbox.outdoors"},"run-bike-hike":{name:"run-bike-hike",value:"mapbox.run-bike-hike"},pencil:{name:"pencil",value:"mapbox.pencil"},pirates:{name:"pirates",value:"mapbox.pirates"},emerald:{name:"emerald",value:"mapbox.emerald"},"high-contrast":{name:"high-contrast",value:"mapbox.high-contrast"}}},oneDHeatmapFlipped:{name:"Flip Heatmap",inlineOptions:{yes:{name:"Yes",value:"yes"},no:{name:"No",value:null}}},showMousePosition:{name:"Show Mouse Position",inlineOptions:Yee},showTooltip:{name:"Show Tooltip",inlineOptions:Yee},fontSize:{name:"Font Size",inlineOptions:Xee([8,9,10,11,12,14,16,18,24],"px")},tickPositions:{name:"Tick Positions",inlineOptions:{even:{name:"Even",value:"even"},ends:{name:"Ends",value:"ends"}}},tickFormat:{name:"Tick Format",inlineOptions:{plain:{name:"Plain",value:"plain"},si:{name:"SI",value:"si"}}},colorEncoding:{name:"Color Encode Annotations",inlineOptions:{none:{name:"None",value:null},itemRgb:{name:"itemRgb",value:"itemRgb"}},generateOptions:Wee},fontIsAligned:{name:"Left-Align Font",inlineOptions:Yee},axisPositionHorizontal:{name:"Axis Position",inlineOptions:{left:{name:"Left",value:"left"},outsideLeft:{name:"Outside left",value:"outsideLeft"},right:{name:"Right",value:"right"},outsideRight:{name:"Outside right",value:"outsideRight"},hidden:{name:"Hidden",value:null}}},axisPositionVertical:{name:"Axis Position",inlineOptions:{top:{name:"Top",value:"top"},outsideTop:{name:"Outside top",value:"outsideTop"},bottom:{name:"Bottom",value:"bottom"},outsideBottom:{name:"Outside bottom",value:"outsideBottom"},hidden:{name:"Hidden",value:null}}},axisMargin:{name:"Axis Margin",inlineOptions:Xee([0,10,20,30,40,50,100,200,400],"px")},colorbarPosition:{name:"Colorbar Position",inlineOptions:{topLeft:{name:"Top Left",value:"topLeft"},topRight:{name:"Top Right",value:"topRight"},bottomLeft:{name:"Bottom Left",value:"bottomLeft"},bottomRight:{name:"Bottom Right",value:"bottomRight"},hidden:{name:"Hidden",value:null}}},colorbarBackgroundColor:{name:"Colorbar Background Color",inlineOptions:qee},colorbarBackgroundOpacity:{name:"Colorbar Background Opacity",inlineOptions:Zee},colorbarLabelsPosition:{name:"Colorbar Labels Position",inlineOptions:{inside:{name:"Inside",value:"inside"},outside:{name:"Outside",value:"outside"}}},labelColor:{name:"Label Color",inlineOptions:{...qee,use_stroke:{name:"Glyph color",value:"[glyph-color]"}}},labelPosition:{name:"Label Position",inlineOptions:{ol:{name:"Outer left",value:"outerLeft"},or:{name:"Outer right",value:"outerRight"},ot:{name:"Outer top",value:"outerTop"},ob:{name:"Outer bottom",value:"outerBottom"},tl:{name:"Top left",value:"topLeft"},tr:{name:"Top right",value:"topRight"},bl:{name:"Bottom left",value:"bottomLeft"},br:{name:"Bottom right",value:"bottomRight"},hidden:{name:"Hidden",value:"hidden"}}},labelTextOpacity:{name:"Label Text Opacity",inlineOptions:Zee},geneAnnotationHeight:{name:"Gene Annotation Height",inlineOptions:{8:{name:"8px",value:8},10:{name:"10px",value:10},12:{name:"12px",value:12},16:{name:"16px",value:16}}},annotationHeight:{name:"Annotation Height",inlineOptions:{5:{name:"5px",value:5},8:{name:"8px",value:8},10:{name:"10px",value:10},12:{name:"12px",value:12},16:{name:"16px",value:16},20:{name:"20px",value:20},scaled:{name:"scaled",value:"scaled"}}},maxAnnotationHeight:{name:"Max Annotation Height",inlineOptions:{5:{name:"5px",value:5},8:{name:"8px",value:8},10:{name:"10px",value:10},12:{name:"12px",value:12},16:{name:"16px",value:16},20:{name:"20px",value:20},none:{name:"none",value:null}}},annotationStyle:{name:"Annotation Style",inlineOptions:{box:{name:"Box",value:"box"},segment:{name:"Segment",value:"segment"}}},geneLabelPosition:{name:"Gene Label Position",inlineOptions:{inside:{name:"Inside",value:"inside"},outside:{name:"Outside",value:"outside"}}},geneStrandSpacing:{name:"Gene Strand Spacing",inlineOptions:{2:{name:"2px",value:2},4:{name:"4px",value:4},8:{name:"8px",value:8}}},labelBackgroundColor:{name:"Label Background Color",inlineOptions:qee},labelBackgroundOpacity:{name:"Label Background Opacity",inlineOptions:Zee},viewResolution:{name:"View Resolution",inlineOptions:{high:{name:"High",value:384},medium:{name:"Medium",value:1024},low:{name:"Low",value:2048}}},colorRange:{name:"Color map",inlineOptions:{afmhot:{name:"afmhot",value:["rgba(0,0,0,1.0)","rgba(128,0,0,1.0)","rgba(256,129,1,1.0)","rgba(256,256,129,1.0)","rgba(256,256,256,1.0)"]},fall:{name:"fall",value:["white","rgba(245,166,35,1.0)","rgba(208,2,27,1.0)","black"]},hot:{name:"hot",value:["rgba(10,0,0,1.0)","rgba(179,0,0,1.0)","rgba(256,91,0,1.0)","rgba(256,256,6,1.0)","rgba(256,256,256,1.0)"]},jet:{name:"jet",value:["rgba(0,0,128,1.0)","rgba(0,129,256,1.0)","rgba(125,256,122,1.0)","rgba(256,148,0,1.0)","rgba(128,0,0,1.0)"]},bwr:{name:"bwr",value:["rgba(0,0,256,1.0)","rgba(128,128,256,1.0)","rgba(256,254,254,1.0)","rgba(256,126,126,1.0)","rgba(256,0,0,1.0)"]},cubehelix:{name:"cubehelix",value:["rgba(0,0,0,1.0)","rgba(21,83,76,1.0)","rgba(162,121,74,1.0)","rgba(199,180,238,1.0)","rgba(256,256,256,1.0)"]},rainbow:{name:"rainbow",value:["rgba(128,0,256,1.0)","rgba(0,181,236,1.0)","rgba(129,255,180,1.0)","rgba(256,179,96,1.0)","rgba(256,0,0,1.0)"]},gray:{name:"greys",value:["rgba(255,255,255,1)","rgba(0,0,0,1)"]},red:{name:"White to red",value:["rgba(255,255,255,1)","rgba(255,0,0,1)"]},green:{name:"White to green",value:["rgba(255,255,255,1)","rgba(0,255,0,1)"]},blue:{name:"White to blue",value:["rgba(255,255,255,1)","rgba(0,0,255,1)"]},custard:{name:"custard",value:["#FFFFFF","#F8E71C","rgba(245,166,35,1)","rgba(0,0,0,1)"]},magma:{name:"magma",value:["rgba(0,0,3,1)","rgba(0,0,4,1)","rgba(0,0,6,1)","rgba(1,0,7,1)","rgba(1,1,9,1)","rgba(1,1,11,1)","rgba(2,2,13,1)","rgba(2,2,15,1)","rgba(3,3,17,1)","rgba(4,3,19,1)","rgba(4,4,21,1)","rgba(5,4,23,1)","rgba(6,5,25,1)","rgba(7,5,27,1)","rgba(8,6,29,1)","rgba(9,7,32,1)","rgba(10,7,34,1)","rgba(11,8,36,1)","rgba(12,9,38,1)","rgba(13,10,40,1)","rgba(14,10,42,1)","rgba(15,11,45,1)","rgba(16,12,47,1)","rgba(17,12,49,1)","rgba(19,13,51,1)","rgba(20,13,54,1)","rgba(21,14,56,1)","rgba(22,14,58,1)","rgba(23,15,61,1)","rgba(25,15,63,1)","rgba(26,16,66,1)","rgba(27,16,68,1)","rgba(28,16,70,1)","rgba(30,17,73,1)","rgba(31,17,75,1)","rgba(33,17,78,1)","rgba(34,17,80,1)","rgba(36,17,83,1)","rgba(37,17,85,1)","rgba(39,17,87,1)","rgba(40,17,90,1)","rgba(42,17,92,1)","rgba(43,17,94,1)","rgba(45,17,97,1)","rgba(47,16,99,1)","rgba(49,16,101,1)","rgba(50,16,103,1)","rgba(52,16,105,1)","rgba(54,15,107,1)","rgba(55,15,108,1)","rgba(57,15,110,1)","rgba(59,15,112,1)","rgba(61,15,113,1)","rgba(62,15,114,1)","rgba(64,15,116,1)","rgba(66,15,117,1)","rgba(67,15,118,1)","rgba(69,15,119,1)","rgba(71,15,120,1)","rgba(72,16,120,1)","rgba(74,16,121,1)","rgba(76,16,122,1)","rgba(77,17,123,1)","rgba(79,17,123,1)","rgba(81,18,124,1)","rgba(82,18,124,1)","rgba(84,19,125,1)","rgba(85,20,125,1)","rgba(87,20,126,1)","rgba(88,21,126,1)","rgba(90,21,126,1)","rgba(92,22,127,1)","rgba(93,23,127,1)","rgba(95,23,127,1)","rgba(96,24,128,1)","rgba(98,25,128,1)","rgba(99,25,128,1)","rgba(101,26,128,1)","rgba(103,26,128,1)","rgba(104,27,129,1)","rgba(106,28,129,1)","rgba(107,28,129,1)","rgba(109,29,129,1)","rgba(110,30,129,1)","rgba(112,30,129,1)","rgba(113,31,129,1)","rgba(115,32,129,1)","rgba(117,32,129,1)","rgba(118,33,129,1)","rgba(120,33,129,1)","rgba(121,34,130,1)","rgba(123,35,130,1)","rgba(124,35,130,1)","rgba(126,36,130,1)","rgba(128,36,130,1)","rgba(129,37,129,1)","rgba(131,37,129,1)","rgba(132,38,129,1)","rgba(134,39,129,1)","rgba(136,39,129,1)","rgba(137,40,129,1)","rgba(139,40,129,1)","rgba(140,41,129,1)","rgba(142,41,129,1)","rgba(144,42,129,1)","rgba(145,42,129,1)","rgba(147,43,128,1)","rgba(148,43,128,1)","rgba(150,44,128,1)","rgba(152,44,128,1)","rgba(153,45,128,1)","rgba(155,46,127,1)","rgba(157,46,127,1)","rgba(158,47,127,1)","rgba(160,47,127,1)","rgba(161,48,126,1)","rgba(163,48,126,1)","rgba(165,49,126,1)","rgba(166,49,125,1)","rgba(168,50,125,1)","rgba(170,50,125,1)","rgba(171,51,124,1)","rgba(173,51,124,1)","rgba(175,52,123,1)","rgba(176,52,123,1)","rgba(178,53,123,1)","rgba(180,53,122,1)","rgba(181,54,122,1)","rgba(183,55,121,1)","rgba(185,55,121,1)","rgba(186,56,120,1)","rgba(188,56,120,1)","rgba(189,57,119,1)","rgba(191,57,118,1)","rgba(193,58,118,1)","rgba(194,59,117,1)","rgba(196,59,117,1)","rgba(198,60,116,1)","rgba(199,61,115,1)","rgba(201,61,115,1)","rgba(202,62,114,1)","rgba(204,63,113,1)","rgba(206,63,113,1)","rgba(207,64,112,1)","rgba(209,65,111,1)","rgba(210,66,110,1)","rgba(212,67,110,1)","rgba(213,67,109,1)","rgba(215,68,108,1)","rgba(216,69,107,1)","rgba(218,70,107,1)","rgba(219,71,106,1)","rgba(221,72,105,1)","rgba(222,73,104,1)","rgba(223,74,103,1)","rgba(225,75,103,1)","rgba(226,76,102,1)","rgba(227,78,101,1)","rgba(229,79,100,1)","rgba(230,80,100,1)","rgba(231,81,99,1)","rgba(232,83,98,1)","rgba(233,84,97,1)","rgba(234,85,97,1)","rgba(236,87,96,1)","rgba(237,88,95,1)","rgba(238,90,95,1)","rgba(239,91,94,1)","rgba(239,93,94,1)","rgba(240,95,93,1)","rgba(241,96,93,1)","rgba(242,98,93,1)","rgba(243,100,92,1)","rgba(243,101,92,1)","rgba(244,103,92,1)","rgba(245,105,92,1)","rgba(246,107,92,1)","rgba(246,108,92,1)","rgba(247,110,92,1)","rgba(247,112,92,1)","rgba(248,114,92,1)","rgba(248,116,92,1)","rgba(249,118,92,1)","rgba(249,120,92,1)","rgba(250,121,93,1)","rgba(250,123,93,1)","rgba(250,125,94,1)","rgba(251,127,94,1)","rgba(251,129,95,1)","rgba(251,131,95,1)","rgba(252,133,96,1)","rgba(252,135,97,1)","rgba(252,137,97,1)","rgba(252,139,98,1)","rgba(253,140,99,1)","rgba(253,142,100,1)","rgba(253,144,101,1)","rgba(253,146,102,1)","rgba(253,148,103,1)","rgba(254,150,104,1)","rgba(254,152,105,1)","rgba(254,154,106,1)","rgba(254,156,107,1)","rgba(254,157,108,1)","rgba(254,159,109,1)","rgba(254,161,110,1)","rgba(254,163,111,1)","rgba(254,165,112,1)","rgba(255,167,114,1)","rgba(255,169,115,1)","rgba(255,171,116,1)","rgba(255,172,118,1)","rgba(255,174,119,1)","rgba(255,176,120,1)","rgba(255,178,122,1)","rgba(255,180,123,1)","rgba(255,182,124,1)","rgba(255,184,126,1)","rgba(255,185,127,1)","rgba(255,187,129,1)","rgba(255,189,130,1)","rgba(255,191,132,1)","rgba(255,193,133,1)","rgba(255,195,135,1)","rgba(255,197,136,1)","rgba(255,198,138,1)","rgba(255,200,140,1)","rgba(255,202,141,1)","rgba(255,204,143,1)","rgba(254,206,144,1)","rgba(254,208,146,1)","rgba(254,209,148,1)","rgba(254,211,149,1)","rgba(254,213,151,1)","rgba(254,215,153,1)","rgba(254,217,155,1)","rgba(254,219,156,1)","rgba(254,220,158,1)","rgba(254,222,160,1)","rgba(254,224,162,1)","rgba(254,226,163,1)","rgba(253,228,165,1)","rgba(253,230,167,1)","rgba(253,231,169,1)","rgba(253,233,171,1)","rgba(253,235,172,1)","rgba(253,237,174,1)","rgba(253,239,176,1)","rgba(253,241,178,1)","rgba(253,242,180,1)","rgba(253,244,182,1)","rgba(253,246,184,1)","rgba(252,248,186,1)","rgba(252,250,188,1)","rgba(252,251,189,1)","rgba(252,253,191,1)"]},viridis:{name:"viridis",value:["rgba(68,1,84,1)","rgba(68,2,85,1)","rgba(69,3,87,1)","rgba(69,5,88,1)","rgba(69,6,90,1)","rgba(70,8,91,1)","rgba(70,9,93,1)","rgba(70,11,94,1)","rgba(70,12,96,1)","rgba(71,14,97,1)","rgba(71,15,98,1)","rgba(71,17,100,1)","rgba(71,18,101,1)","rgba(71,20,102,1)","rgba(72,21,104,1)","rgba(72,22,105,1)","rgba(72,24,106,1)","rgba(72,25,108,1)","rgba(72,26,109,1)","rgba(72,28,110,1)","rgba(72,29,111,1)","rgba(72,30,112,1)","rgba(72,32,113,1)","rgba(72,33,115,1)","rgba(72,34,116,1)","rgba(72,36,117,1)","rgba(72,37,118,1)","rgba(72,38,119,1)","rgba(72,39,120,1)","rgba(71,41,121,1)","rgba(71,42,121,1)","rgba(71,43,122,1)","rgba(71,44,123,1)","rgba(71,46,124,1)","rgba(70,47,125,1)","rgba(70,48,126,1)","rgba(70,49,126,1)","rgba(70,51,127,1)","rgba(69,52,128,1)","rgba(69,53,129,1)","rgba(69,54,129,1)","rgba(68,56,130,1)","rgba(68,57,131,1)","rgba(68,58,131,1)","rgba(67,59,132,1)","rgba(67,60,132,1)","rgba(67,62,133,1)","rgba(66,63,133,1)","rgba(66,64,134,1)","rgba(65,65,134,1)","rgba(65,66,135,1)","rgba(65,67,135,1)","rgba(64,69,136,1)","rgba(64,70,136,1)","rgba(63,71,136,1)","rgba(63,72,137,1)","rgba(62,73,137,1)","rgba(62,74,137,1)","rgba(61,75,138,1)","rgba(61,77,138,1)","rgba(60,78,138,1)","rgba(60,79,138,1)","rgba(59,80,139,1)","rgba(59,81,139,1)","rgba(58,82,139,1)","rgba(58,83,139,1)","rgba(57,84,140,1)","rgba(57,85,140,1)","rgba(56,86,140,1)","rgba(56,87,140,1)","rgba(55,88,140,1)","rgba(55,89,140,1)","rgba(54,91,141,1)","rgba(54,92,141,1)","rgba(53,93,141,1)","rgba(53,94,141,1)","rgba(52,95,141,1)","rgba(52,96,141,1)","rgba(51,97,141,1)","rgba(51,98,141,1)","rgba(51,99,141,1)","rgba(50,100,142,1)","rgba(50,101,142,1)","rgba(49,102,142,1)","rgba(49,103,142,1)","rgba(48,104,142,1)","rgba(48,105,142,1)","rgba(47,106,142,1)","rgba(47,107,142,1)","rgba(47,108,142,1)","rgba(46,109,142,1)","rgba(46,110,142,1)","rgba(45,111,142,1)","rgba(45,112,142,1)","rgba(45,112,142,1)","rgba(44,113,142,1)","rgba(44,114,142,1)","rgba(43,115,142,1)","rgba(43,116,142,1)","rgba(43,117,142,1)","rgba(42,118,142,1)","rgba(42,119,142,1)","rgba(41,120,142,1)","rgba(41,121,142,1)","rgba(41,122,142,1)","rgba(40,123,142,1)","rgba(40,124,142,1)","rgba(40,125,142,1)","rgba(39,126,142,1)","rgba(39,127,142,1)","rgba(38,128,142,1)","rgba(38,129,142,1)","rgba(38,130,142,1)","rgba(37,131,142,1)","rgba(37,131,142,1)","rgba(37,132,142,1)","rgba(36,133,142,1)","rgba(36,134,142,1)","rgba(35,135,142,1)","rgba(35,136,142,1)","rgba(35,137,142,1)","rgba(34,138,141,1)","rgba(34,139,141,1)","rgba(34,140,141,1)","rgba(33,141,141,1)","rgba(33,142,141,1)","rgba(33,143,141,1)","rgba(32,144,141,1)","rgba(32,145,140,1)","rgba(32,146,140,1)","rgba(32,147,140,1)","rgba(31,147,140,1)","rgba(31,148,140,1)","rgba(31,149,139,1)","rgba(31,150,139,1)","rgba(31,151,139,1)","rgba(30,152,139,1)","rgba(30,153,138,1)","rgba(30,154,138,1)","rgba(30,155,138,1)","rgba(30,156,137,1)","rgba(30,157,137,1)","rgba(30,158,137,1)","rgba(30,159,136,1)","rgba(30,160,136,1)","rgba(31,161,136,1)","rgba(31,162,135,1)","rgba(31,163,135,1)","rgba(31,163,134,1)","rgba(32,164,134,1)","rgba(32,165,134,1)","rgba(33,166,133,1)","rgba(33,167,133,1)","rgba(34,168,132,1)","rgba(35,169,131,1)","rgba(35,170,131,1)","rgba(36,171,130,1)","rgba(37,172,130,1)","rgba(38,173,129,1)","rgba(39,174,129,1)","rgba(40,175,128,1)","rgba(41,175,127,1)","rgba(42,176,127,1)","rgba(43,177,126,1)","rgba(44,178,125,1)","rgba(46,179,124,1)","rgba(47,180,124,1)","rgba(48,181,123,1)","rgba(50,182,122,1)","rgba(51,183,121,1)","rgba(53,183,121,1)","rgba(54,184,120,1)","rgba(56,185,119,1)","rgba(57,186,118,1)","rgba(59,187,117,1)","rgba(61,188,116,1)","rgba(62,189,115,1)","rgba(64,190,114,1)","rgba(66,190,113,1)","rgba(68,191,112,1)","rgba(70,192,111,1)","rgba(72,193,110,1)","rgba(73,194,109,1)","rgba(75,194,108,1)","rgba(77,195,107,1)","rgba(79,196,106,1)","rgba(81,197,105,1)","rgba(83,198,104,1)","rgba(85,198,102,1)","rgba(88,199,101,1)","rgba(90,200,100,1)","rgba(92,201,99,1)","rgba(94,201,98,1)","rgba(96,202,96,1)","rgba(98,203,95,1)","rgba(101,204,94,1)","rgba(103,204,92,1)","rgba(105,205,91,1)","rgba(108,206,90,1)","rgba(110,206,88,1)","rgba(112,207,87,1)","rgba(115,208,85,1)","rgba(117,208,84,1)","rgba(119,209,82,1)","rgba(122,210,81,1)","rgba(124,210,79,1)","rgba(127,211,78,1)","rgba(129,212,76,1)","rgba(132,212,75,1)","rgba(134,213,73,1)","rgba(137,213,72,1)","rgba(139,214,70,1)","rgba(142,215,68,1)","rgba(144,215,67,1)","rgba(147,216,65,1)","rgba(149,216,63,1)","rgba(152,217,62,1)","rgba(155,217,60,1)","rgba(157,218,58,1)","rgba(160,218,57,1)","rgba(163,219,55,1)","rgba(165,219,53,1)","rgba(168,220,51,1)","rgba(171,220,50,1)","rgba(173,221,48,1)","rgba(176,221,46,1)","rgba(179,221,45,1)","rgba(181,222,43,1)","rgba(184,222,41,1)","rgba(187,223,39,1)","rgba(189,223,38,1)","rgba(192,223,36,1)","rgba(195,224,35,1)","rgba(197,224,33,1)","rgba(200,225,32,1)","rgba(203,225,30,1)","rgba(205,225,29,1)","rgba(208,226,28,1)","rgba(211,226,27,1)","rgba(213,226,26,1)","rgba(216,227,25,1)","rgba(219,227,24,1)","rgba(221,227,24,1)","rgba(224,228,24,1)","rgba(226,228,24,1)","rgba(229,228,24,1)","rgba(232,229,25,1)","rgba(234,229,25,1)","rgba(237,229,26,1)","rgba(239,230,27,1)","rgba(242,230,28,1)","rgba(244,230,30,1)","rgba(247,230,31,1)","rgba(249,231,33,1)","rgba(251,231,35,1)","rgba(254,231,36,1)"]},custom:{name:"Custom...",componentPickers:{heatmap:Vee,"horizontal-heatmap":Vee}}}},align:{name:"Align",inlineOptions:{white:{name:"Top",value:"top"},lightGrey:{name:"Bottom",value:"bottom"}}},colorRangeGradient:{name:"Color Gradient",inlineOptions:Yee},dataTransform:{name:"Transforms",inlineOptions:{default:{name:"Default",value:"default"},None:{name:"None",value:"None"}},generateOptions:e=>{const t=[];if(e.transforms)for(const n of e.transforms)t.push({name:n.name,value:n.value});return t}},aggregationMode:{name:"Aggregation Mode",inlineOptions:{},generateOptions:e=>{const t=[];return e.aggregationModes?Object.values(e.aggregationModes).forEach((({name:e,value:n})=>{t.push({name:e,value:n})})):t.push({name:"Default",value:"default"}),t}},maxZoom:{name:"Zoom limit",inlineOptions:{none:{name:"None",value:null}},generateOptions:e=>{if(e.maxZoom){const t=[];for(let n=0;n<=e.maxZoom;n++){const{maxWidth:r,binsPerDimension:i,maxZoom:o}=e;let a=1,s=1;if(e.resolutions){const t=e.resolutions.map((e=>+e)).sort(((e,t)=>t-e));[a]=t,s=t[n]}else s=e.maxWidth/(2**n*e.binsPerDimension),a=r/(2**o*i);const l=ci(a,s),c=ri(`.${l}`,s)(s);t.push({name:c,value:n.toString()})}return t}return[]}},valueColumn:{name:"Value column",inlineOptions:{none:{name:"None",value:null}},generateOptions:Wee},zeroValueColor:{name:"Zero Value Color",inlineOptions:qee}},ete={...sm,IS_TRACK_RANGE_SELECTABLE:wb,OPTIONS_INFO:Jee},tte={d3Array:Qt,d3Axis:CW,d3Brush:gp,d3Color:pr,d3Drag:Bh,d3Dsv:Ym,d3Format:hi,d3Geo:WJ,d3Queue:e0,d3Request:I0,d3Scale:ns,d3Selection:ze,d3Transition:Dj,d3Zoom:Xj,PIXI:ete.GLOBALS.PIXI,mix:l$,slugid:Ns},nte={chromosomes:{ChromosomeInfo:Uq,SearchField:jq},libraries:tte,tracks:{Annotations1dTrack:Lq,Annotations2dTrack:Mq,ArrowheadDomainsTrack:Rq,BarTrack:mq,BedLikeTrack:aq,CNVIntervalTrack:vq,Chromosome2DAnnotations:zq,Chromosome2DLabels:Hq,ChromosomeGrid:Gq,CombinedTrack:Ig,CrossRule:f$,DivergentBarTrack:gq,HeatmapTiledPixiTrack:iW,Horizontal1dHeatmapTrack:bq,Horizontal2DDomainsTrack:Bq,HorizontalChromosomeLabels:Wq,HorizontalGeneAnnotationsTrack:Pq,HorizontalHeatmapTrack:Xq,HorizontalLine1DPixiTrack:uq,HorizontalMultivecTrack:pq,HorizontalPoint1DPixiTrack:hq,HorizontalRule:h$,HorizontalTiled1DPixiTrack:cW,HorizontalTiledPlot:G0,HorizontalTrack:B0,Id2DTiledPixiTrack:sW,IdHorizontal1DTiledPixiTrack:uW,IdVertical1DTiledPixiTrack:dW,LeftAxisTrack:DW,MapboxTilesTrack:b$,MoveableTrack:M0,OSMTileIdsTrack:g$,OSMTilesTrack:m$,OverlayTrack:cq,PixiTrack:LH,RasterTilesTrack:v$,SVGTrack:IW,SquareMarkersTrack:Fq,Tiled1DPixiTrack:lW,TiledPixiTrack:eW,TopAxisTrack:OW,Track:RH,ValueIntervalTrack:qq,VerticalRule:p$,VerticalTiled1DPixiTrack:hW,VerticalTrack:V0,ViewportTracker2D:$q,ViewportTracker2DPixi:W0,ViewportTrackerHorizontal:Kq,ViewportTrackerVertical:Qq},dataFetchers:{DataFetcher:BH,GBKDataFetcher:QV,LocalDataFetcher:ZV,getDataFetcher:(e,t,n,r=nte)=>{const i=n[e.type];return i?new i.dataFetcher(r,e,t):"genbank"===e.type?new QV(e,t):"local-tiles"===e.type?new ZV(e,t):new BH(e,t)}},factories:{ContextMenuItem:Th,DataFetcher:BH,LruCache:X0},services:gg,utils:Qj,configs:ete,VERSION:Y0},rte="_track-renderer_11dwb_1",ite="_track-renderer-element_11dwb_5",ote="_track-renderer-events_11dwb_6",{getDataFetcher:ate}=nte.dataFetchers;let ste=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).dragging=!1,r.element=null,r.closing=!1,r.yPositionOffset=0,r.xPositionOffset=0,r.scrollTop=0,r.scrollTimeout=null,r.activeTransitions=0,r.zoomTransform=Mj,r.windowScrolledBound=r.windowScrolled.bind(a(r)),r.zoomStartedBound=r.zoomStarted.bind(a(r)),r.zoomedBound=r.zoomed.bind(a(r)),r.zoomEndedBound=r.zoomEnded.bind(a(r)),r.uid=Ns.nice(),r.viewUid=r.props.uid,r.availableForPlugins={...nte,services:{...nte.services,pubSub:r.props.pubSub,pixiRenderer:r.props.pixiRenderer}},r.mounted=!1,r.emptyZoomBehavior=Wj(),r.currentProps=e,r.prevPropsStr="",r.zoomBehavior=Wj().filter((e=>!e.target.classList.contains("no-zoom")&&!e.target.classList.contains("react-resizable-handle"))).on("start",r.zoomStartedBound).on("zoom",r.zoomedBound).on("end",r.zoomEndedBound),r.zoomTransform=Mj,r.prevZoomTransform=Mj,r.initialXDomain=[0,1],r.initialYDomain=[0,1],r.xDomainLimits=[-Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],r.yDomainLimits=[-Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],r.zoomLimits=[0,Number.MAX_SAFE_INTEGER],r.prevCenterX=r.currentProps.paddingLeft+r.currentProps.leftWidth+r.currentProps.centerWidth/2,r.prevCenterY=r.currentProps.paddingTop+r.currentProps.topHeight+r.currentProps.centerHeight/2,r.cumCenterXOffset=0,r.cumCenterYOffset=0,r.setUpInitialScales(r.currentProps.initialXDomain,r.currentProps.initialYDomain,r.currentProps.xDomainLimits,r.currentProps.yDomainLimits,r.currentProps.zoomLimits),r.setUpScales(),r.trackDefObjects={},r.metaTracks={},r.pubSubs=[],window.higlassTracksByType&&Object.keys(window.higlassTracksByType).forEach((e=>{rm[e]=window.higlassTracksByType[e].config})),r.boundForwardEvent=r.forwardEvent.bind(a(r)),r.boundScrollEvent=r.scrollEvent.bind(a(r)),r.boundForwardContextMenu=r.forwardContextMenu.bind(a(r)),r.dispatchEventBound=r.dispatchEvent.bind(a(r)),r.zoomToDataPosHandlerBound=r.zoomToDataPosHandler.bind(a(r)),r.onScrollHandlerBound=r.onScrollHandler.bind(a(r)),r}return f(n,[{key:"UNSAFE_componentWillMount",value:function(){this.pubSubs=[],this.pubSubs.push(this.props.pubSub.subscribe("scroll",this.windowScrolledBound)),this.pubSubs.push(this.props.pubSub.subscribe("app.event",this.dispatchEventBound)),this.pubSubs.push(this.props.pubSub.subscribe("zoomToDataPos",this.zoomToDataPosHandlerBound)),this.pubSubs.push(this.props.pubSub.subscribe("app.scroll",this.onScrollHandlerBound))}},{key:"componentDidMount",value:function(){if(this.elementPos=this.element.getBoundingClientRect(),this.elementSelection=Be(this.element),this.svgTrackAreaSelection=Be(this.svgTrackArea),this.pStage=new Rf.PIXI.Graphics,this.pMask=new Rf.PIXI.Graphics,this.pOutline=new Rf.PIXI.Graphics,this.pBackground=new Rf.PIXI.Graphics,this.pStage.addChild(this.pMask),this.pStage.addChild(this.pOutline),this.currentProps.pixiStage.addChild(this.pStage),this.pStage.mask=this.pMask,this.props.isRangeSelection||this.addZoom(),!this.currentProps.svgElement||!this.currentProps.canvasElement)return;this.svgElement=this.currentProps.svgElement,this.syncTrackObjects(this.currentProps.positionedTracks),this.syncMetaTracks(this.currentProps.metaTracks),this.currentProps.setCentersFunction(this.setCenter.bind(this)),this.currentProps.registerDraggingChangedListener(this.draggingChanged.bind(this)),this.draggingChanged(!0),this.addEventTracker();const e=[[this.xScale(this.xDomainLimits[0]),this.yScale(this.yDomainLimits[0])],[this.xScale(this.xDomainLimits[1]),this.yScale(this.yDomainLimits[1])]],t=this.svgElement.getBoundingClientRect(),n=[[Math.max(e[0][0],0),Math.max(e[0][1],0)],[Math.min(e[1][0],t.width),Math.min(e[1][1],t.height)]];this.zoomBehavior.extent(n).translateExtent(e).scaleExtent(this.zoomLimits)}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(!e.svgElement||!e.canvasElement)return;const t=this.updatablePropsToString(e);if(this.currentProps=e,this.prevPropsStr===t)return;this.setBackground();for(const e in this.trackDefObjects)this.trackDefObjects[e].trackObject.delayDrawing=!0;this.prevPropsStr=t,this.setUpInitialScales(e.initialXDomain,e.initialYDomain,e.xDomainLimits,e.yDomainLimits,e.zoomLimits),this.setUpScales(e.width!==this.props.width||e.height!==this.props.height),this.svgElement=e.svgElement;const n=[[this.xScale(this.xDomainLimits[0]),this.yScale(this.yDomainLimits[0])],[this.xScale(this.xDomainLimits[1]),this.yScale(this.yDomainLimits[1])]],r=this.svgElement.getBoundingClientRect(),i=[[Math.max(n[0][0],0),Math.max(n[0][1],0)],[Math.min(n[1][0],r.width),Math.min(n[1][1],r.height)]];this.zoomBehavior.extent(i).translateExtent(n).scaleExtent(this.zoomLimits),this.syncTrackObjects(e.positionedTracks),this.syncMetaTracks(e.metaTracks);for(const t of e.positionedTracks){const e=t.track.options,n=this.trackDefObjects[t.track.uid].trackObject;if(n.rerender(e),t.track.hasOwnProperty("contents")){const e={};for(const n of t.track.contents)e[n.uid]=n;for(const t in n.createdTracks)n.createdTracks[t].rerender(e[t].options)}}this.props.onNewTilesLoaded();for(const e in this.trackDefObjects){const t=this.trackDefObjects[e].trackObject;t.delayDrawing=!1,t.draw()}}},{key:"componentDidUpdate",value:function(e){this.props.initialXDomain[0]===e.initialXDomain[0]&&this.props.initialXDomain[1]===e.initialXDomain[1]&&this.props.initialYDomain[0]===e.initialYDomain[0]&&this.props.initialYDomain[1]===e.initialYDomain[1]||(this.element.__zoom=Mj),e.isRangeSelection!==this.props.isRangeSelection&&(this.props.isRangeSelection?this.removeZoom():this.addZoom()),e.zoomable!==this.props.zoomable&&(this.props.zoomable?this.addZoom():this.removeZoom()),this.addEventTracker()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.removeTracks(Object.keys(this.trackDefObjects)),this.removeMetaTracks(Object.keys(this.metaTracks)),this.currentProps.removeDraggingChangedListener(this.draggingChanged),this.currentProps.pixiStage.removeChild(this.pStage),this.pMask.destroy(!0),this.pStage.destroy(!0),this.pubSubs.forEach((e=>this.props.pubSub.unsubscribe(e))),this.pubSubs=[],this.removeEventTracker()}},{key:"dispatchEvent",value:function(e){e.sourceUid===this.uid&&"contextmenu"!==e.type&&_m(e,this.element)}},{key:"isWithin",value:function(e,t){if(!this.element)return!1;const n=e>=this.elementPos.left&&e<=this.elementPos.width+this.elementPos.left,r=t>=this.elementPos.top&&t<=this.elementPos.height+this.elementPos.top;return n&&r}},{key:"zoomToDataPosHandler",value:function({pos:e,animateTime:t,isMercator:n}){this.zoomToDataPos(...e,t,n)}},{key:"addZoom",value:function(){this.elementSelection&&this.currentProps.zoomable&&(this.elementSelection.call(this.zoomBehavior),this.zoomBehavior.transform(this.elementSelection,this.zoomTransform))}},{key:"removeZoom",value:function(){this.elementSelection&&(this.zoomEnded(),this.elementSelection.on(".zoom",null))}},{key:"setMask",value:function(){this.pMask.clear(),this.pMask.beginFill(),this.pMask.drawRect(this.xPositionOffset,this.yPositionOffset,this.currentProps.width,this.currentProps.height),this.pMask.endFill()}},{key:"setBackground",value:function(){const e=this.props.theme===Pf?"black":"white",t=lm(this.currentProps.viewOptions&&this.currentProps.viewOptions.backgroundColor||e);this.pBackground.clear(),this.pBackground.beginFill(t),this.pBackground.drawRect(this.xPositionOffset,this.yPositionOffset,this.currentProps.width,this.currentProps.height),this.pBackground.endFill()}},{key:"windowScrolled",value:function(){this.removeZoom(),this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout((()=>{this.addZoom()}),100)}},{key:"setUpInitialScales",value:function(e=[0,1],t=[0,1],n=[-Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],r=[-Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],i=[0,Number.MAX_SAFE_INTEGER]){i[0]=null===i[0]?0:i[0],i[1]=null===i[1]?1/0:i[1];const o=e[1]-e[0],a=(t[0]+t[1])/2;if(t[0]=a-o/2,t[1]=a+o/2,e[0]===this.initialXDomain[0]&&e[1]===this.initialXDomain[1]&&t[0]===this.initialYDomain[0]&&t[1]===this.initialYDomain[1]&&n[0]===this.xDomainLimits[0]&&n[1]===this.xDomainLimits[1]&&r[0]===this.yDomainLimits[0]&&r[1]===this.yDomainLimits[1]&&i[0]===this.zoomLimits[0]&&i[1]===this.zoomLimits[1])return;let s,l;this.initialXDomain=e,this.initialYDomain=t,this.xDomainLimits=n,this.yDomainLimits=r,this.zoomLimits=i,this.zoomTransform=Mj,this.prevZoomTransform=Mj,this.cumCenterYOffset=0,this.cumCenterXOffset=0,this.drawableToDomainX=fi().domain([this.currentProps.paddingLeft+this.currentProps.leftWidth,this.currentProps.paddingLeft+this.currentProps.leftWidth+this.currentProps.centerWidth]).range([e[0],e[1]]),0===this.currentProps.centerWidth?(s=this.currentProps.paddingTop+this.currentProps.topHeight,l=this.currentProps.paddingTop+this.currentProps.topHeight+this.currentProps.centerHeight):(s=this.currentProps.paddingTop+this.currentProps.topHeight+this.currentProps.centerHeight/2-this.currentProps.centerWidth/2,l=this.currentProps.paddingTop+this.currentProps.topHeight+this.currentProps.centerHeight/2+this.currentProps.centerWidth/2),this.drawableToDomainY=fi().domain([s,l]).range([t[0],t[1]]),this.prevCenterX=this.currentProps.paddingLeft+this.currentProps.leftWidth+this.currentProps.centerWidth/2,this.prevCenterY=this.currentProps.paddingTop+this.currentProps.topHeight+this.currentProps.centerHeight/2}},{key:"updatablePropsToString",value:function(e){return JSON.stringify({positionedTracks:e.positionedTracks,initialXDomain:e.initialXDomain,initialYDomain:e.initialYDomain,width:e.width,height:e.height,paddingLeft:e.paddingLeft,paddingTop:e.paddingTop,leftWidth:e.leftWidth,topHeight:e.topHeight,dragging:e.dragging,viewOptions:e.viewOptions})}},{key:"draggingChanged",value:function(e){this.dragging=e,this.timedUpdatePositionAndDimensions()}},{key:"setUpScales",value:function(e=!1){const t=this.currentProps.paddingLeft+this.currentProps.leftWidth+this.currentProps.centerWidth/2,n=this.currentProps.paddingTop+this.currentProps.topHeight+this.currentProps.centerHeight/2,r=(this.drawableToDomainX(t)-this.drawableToDomainX(this.prevCenterX))/this.zoomTransform.k,i=(this.drawableToDomainY(n)-this.drawableToDomainY(this.prevCenterY))/this.zoomTransform.k;this.cumCenterYOffset+=i,this.cumCenterXOffset+=r,this.prevCenterY=n,this.prevCenterX=t;const o=[this.drawableToDomainX(0)-this.cumCenterXOffset,this.drawableToDomainX(this.currentProps.width)-this.cumCenterXOffset],a=[this.drawableToDomainY(0)-this.cumCenterYOffset,this.drawableToDomainY(this.currentProps.height)-this.cumCenterYOffset];this.xScale=fi().domain(o).range([0,this.currentProps.width]),this.yScale=fi().domain(a).range([0,this.currentProps.height]);for(const e in this.trackDefObjects)this.trackDefObjects[e].trackObject.refScalesChanged(this.xScale,this.yScale);this.applyZoomTransform(e)}},{key:"getTrackDef",value:function(e){const t=fm(this.trackDefObjects);for(const[,{trackDef:n,trackObject:r}]of t){if(r===e)return n.track;if(n.track.contents)for(const t of n.track.contents)if(r.createdTracks[t.uid]===e)return t}return null}},{key:"getTrackObject",value:function(e){const t=fm(this.trackDefObjects);for(let n=0;ne.uid)));this.addMetaTracks(e.filter((e=>!this.metaTracks[e.uid]))),this.updateMetaTracks(e.filter((e=>this.metaTracks[e.uid]))),this.removeMetaTracks(t.filter((e=>!n.has(e))))}},{key:"syncTrackObjects",value:function(e){this.prevTrackDefinitions=JSON.stringify(e);const t={};for(let n=0;n!n.has(e)))),o=new Set([...n].filter((e=>!r.has(e)))),a=new Set([...r].filter((e=>n.has(e))));this.updateExistingTrackDefs([...a].map((e=>t[e]))),this.addNewTracks([...i].map((e=>t[e]))),this.updateExistingTrackDefs([...i].map((e=>t[e]))),this.removeTracks([...o])}},{key:"addMetaTracks",value:function(e){e.filter((e=>!this.metaTracks[e.uid])).forEach((e=>{this.metaTracks[e.uid]={trackDef:e,trackObject:this.createMetaTrack(e)}}))}},{key:"addNewTracks",value:function(e){if(this.currentProps.pixiStage){for(let t=0;t{this.metaTracks[e].trackObject.remove(),this.metaTracks[e]=void 0,delete this.metaTracks[e]}))}},{key:"removeTracks",value:function(e){for(let t=0;t{const e=Mj.translate(u,h).scale(s);this.zoomTransform=e,this.emptyZoomBehavior.transform(this.elementSelection,e),d=this.applyZoomTransform(r)};if(i){let e=this.elementSelection;this.activeTransitions+=1,document.hidden||(e=e.transition().duration(i)),e.call(this.zoomBehavior.transform,Mj.translate(u,h).scale(s)).on("end",(()=>{p(),this.activeTransitions-=1}))}else p();return d}},{key:"valueScaleMove",value:function(e){for(const t of this.getTracksAtPosition(...this.zoomStartPos))t.movedY(e);this.zoomTransform=this.zoomStartTransform}},{key:"valueScaleZoom",value:function(e,t){const n=e.sourceEvent.deltaY*(e.sourceEvent.deltaMode?120:1)/500,r=Ge(e.sourceEvent,this.props.canvasElement);for(const e of this.getTracksAtPosition(...r)){const i="1d-horizontal"===t?r[1]-e.position[1]:r[0]-e.position[0];e.zoomedY(i,2**n)}this.zoomTransform=this.zoomStartTransform}},{key:"zoomed",value:function(e){let t=null;if(this.zoomStartPos){const e=this.getTracksAtPosition(...this.zoomStartPos);if(e.length){const n=e[0],r=this.getTrackDef(n);rm[r.type]&&(t=rm[r.type].orientation),n instanceof yq&&(t="1d-vertical")}}if(t&&e.sourceEvent){if(e.shiftKey||this.valueScaleZooming){if(void 0!==e.sourceEvent.deltaY)return void this.valueScaleZoom(e,t);"1d-horizontal"===t?this.valueScaleMove(e.sourceEvent.movementY):"1d-vertical"===t&&this.valueScaleMove(e.sourceEvent.movementX)}"1d-horizontal"===t&&e.sourceEvent.movementY?this.valueScaleMove(e.sourceEvent.movementY):"1d-vertical"===t&&e.sourceEvent.movementX&&this.valueScaleMove(e.sourceEvent.movementX)}this.zoomTransform=this.currentProps.zoomable?e.transform:Mj,this.prevZoomTransform.k!==this.zoomTransform.k||("1d-horizontal"===t?this.zoomTransform=Mj.translate(this.zoomTransform.x,this.prevZoomTransform.y).scale(this.zoomTransform.k):"1d-vertical"===t&&(this.zoomTransform=Mj.translate(this.prevZoomTransform.x,this.zoomTransform.y).scale(this.zoomTransform.k)),this.element.__zoom=this.zoomTransform),this.applyZoomTransform(!0),this.prevZoomTransform=this.zoomTransform,this.props.pubSub.publish("app.zoom",e),e.sourceEvent&&(e.sourceEvent.stopPropagation(),e.sourceEvent.preventDefault())}},{key:"getTracksAtPosition",value:function(e,t){const n=[];let r=[];for(const e in this.trackDefObjects){const t=this.trackDefObjects[e].trackObject;t.childTracks?r=r.concat(t.childTracks):r.push(t)}for(const i of r){const r=i.position[0]<=e&&e<=i.position[0]+i.dimensions[0],o=i.position[1]<=t&&t<=i.position[1]+i.dimensions[1];r&&o&&n.push(i)}return n}},{key:"zoomStarted",value:function(e){this.zooming=!0,e&&e.sourceEvent&&(this.zoomStartPos=Ge(e.sourceEvent,this.props.canvasElement),e.sourceEvent.shiftKey&&(this.valueScaleZooming=!0)),this.zoomStartTransform=this.zoomTransform,this.props.pubSub.publish("app.zoomStart")}},{key:"zoomEnded",value:function(){this.zooming=!1,this.zoomStartPos=null,this.valueScaleZooming&&(this.valueScaleZooming=!1,this.element.__zoom=this.zoomStartTransform),this.props.pubSub.publish("app.zoomEnd")}},{key:"applyZoomTransform",value:function(e=!0){const t=this.currentProps,n=t.paddingLeft+t.leftWidth,r=t.paddingTop+t.topHeight;this.zoomedXScale=this.zoomTransform.rescaleX(this.xScale),this.zoomedYScale=this.zoomTransform.rescaleY(this.yScale);const i=fi().domain([n,n+t.centerWidth].map(this.zoomedXScale.invert)).range([0,t.centerWidth]),o=fi().domain([r,r+t.centerHeight].map(this.zoomedYScale.invert)).range([0,t.centerHeight]);for(const e in this.trackDefObjects){const n=this.trackDefObjects[e].trackObject,r=this.trackDefObjects[e].trackDef;let a="unknown";if(rm[r.track.type]&&(a=rm[r.track.type].orientation),"whole"!==a)if("gallery"!==this.trackDefObjects[e].trackDef.track.position)n.zoomed(i.copy(),o.copy(),this.zoomTransform.k,this.zoomTransform.x+this.xPositionOffset,this.zoomTransform.y+this.yPositionOffset,t.paddingLeft+t.leftWidth,t.paddingTop+t.topHeight);else{const e=fi().domain([t.paddingLeft+t.leftWidthNoGallery,t.paddingLeft+t.leftWidth+t.centerWidth+t.galleryDim].map(this.zoomedXScale.invert)).range([0,t.centerWidth+2*t.galleryDim]),r=fi().domain([t.paddingTop+t.topHeightNoGallery,t.paddingTop+t.topHeight+t.centerHeight+t.galleryDim].map(this.zoomedYScale.invert)).range([0,t.centerHeight-2*t.galleryDim]);n.zoomed(e.copy(),r.copy(),this.zoomTransform.k)}else{const e=fi().domain([t.paddingLeft,t.width-t.paddingLeft].map(this.zoomedXScale.invert)).range([0,t.width-2*t.paddingLeft]),r=fi().domain([t.paddingTop,t.height-t.paddingTop].map(this.zoomedYScale.invert)).range([0,t.height-2*t.paddingTop]);n.zoomed(e,r)}}return this.currentXScale=i,this.currentYScale=o,e&&this.currentProps.onScalesChanged(i,o),[i,o]}},{key:"createMetaTrack",value:function(e){e.type;{const t=this.props.pluginTracks[e.type];if(t&&t.isMetaTrack){const n={getTrackObject:this.getTrackObject.bind(this),onNewTilesLoaded:()=>{this.currentProps.onNewTilesLoaded(e.uid)},definition:e};try{return new t.track(this.availableForPlugins,n,e.options)}catch(t){console.error("Plugin meta track",e.type,"failed to instantiate.",t)}}return console.warn(`Unknown meta track of type: ${e.type}`),new Yq(this.pStage,{name:"Unknown Track Type",type:e.type},(()=>this.currentProps.onNewTilesLoaded(e.uid)))}}},{key:"createTrackObject",value:function(e){const t=this.createLocationAgnosticTrackObject(e);return"left"!==e.position&&"right"!==e.position||"1d-horizontal"!==rm[e.type].orientation?t:new yq(t)}},{key:"createLocationAgnosticTrackObject",value:function(e){let t=e.data;t||(t={server:cb(e.server),tilesetUid:e.tilesetUid}),e.coordSystem&&(t.coordSystem=e.coordSystem);const n=ate(t,this.props.pubSub,this.props.pluginDataFetchers,this.availableForPlugins),r={id:e.uid,trackUid:e.uid,trackType:e.type,viewUid:this.viewUid,pubSub:this.props.pubSub,scene:this.pStage,dataConfig:t,dataFetcher:n,getLockGroupExtrema:()=>this.currentProps.getLockGroupExtrema(e.uid),handleTilesetInfoReceived:t=>{this.currentProps.onTilesetInfoReceived(e.uid,t)},animate:()=>{this.currentProps.onNewTilesLoaded(e.uid)},svgElement:this.svgElement,isValueScaleLocked:()=>this.currentProps.isValueScaleLocked(e.uid),onValueScaleChanged:()=>{this.currentProps.onValueScaleChanged(e.uid)},onTrackOptionsChanged:t=>{this.currentProps.onTrackOptionsChanged(e.uid,t)},onMouseMoveZoom:this.props.onMouseMoveZoom,chromInfoPath:e.chromInfoPath,isShowGlobalMousePosition:()=>this.props.isShowGlobalMousePosition,getTheme:()=>this.props.theme};e.y&&(r.yPosition=e.y),e.x&&(r.xPosition=e.x),e.projectionXDomain&&(r.projectionXDomain=e.projectionXDomain),e.projectionYDomain&&(r.projectionYDomain=e.projectionYDomain);const i=e.options;switch(e.type){case"left-axis":return new DW(r,i);case"top-axis":return new OW(r,i);case"heatmap":return new iW(r,i);case"multivec":case"vector-heatmap":case"horizontal-multivec":case"horizontal-vector-heatmap":case"vertical-multivec":case"vertical-vector-heatmap":return new pq(r,i);case"1d-heatmap":case"horizontal-1d-heatmap":case"vertical-1d-heatmap":return new bq(r,i);case"line":case"horizontal-line":case"vertical-line":return new uq(r,i);case"point":case"horizontal-point":case"vertical-point":return new hq(r,i);case"bar":case"horizontal-bar":case"vertical-bar":return new mq(r,i);case"divergent-bar":case"horizontal-divergent-bar":case"vertical-divergent-bar":return new gq(r,i);case"horizontal-1d-tiles":return new uW(r,i);case"vertical-1d-tiles":return new dW(r,i);case"2d-tiles":return new sW(r,i);case"stacked-interval":case"top-stacked-interval":case"left-stacked-interval":return new vq(r,i);case"viewport-projection-center":return e.registerViewportChanged&&e.removeViewportChanged&&e.setDomainsCallback?(r.registerViewportChanged=e.registerViewportChanged,r.removeViewportChanged=e.removeViewportChanged,r.setDomainsCallback=e.setDomainsCallback,new $q(r,i)):new RH(r,i);case"viewport-projection-horizontal":return e.registerViewportChanged&&e.removeViewportChanged&&e.setDomainsCallback?(r.registerViewportChanged=e.registerViewportChanged,r.removeViewportChanged=e.removeViewportChanged,r.setDomainsCallback=e.setDomainsCallback,new Kq(r,i)):new RH(r,i);case"viewport-projection-vertical":return e.registerViewportChanged&&e.removeViewportChanged&&e.setDomainsCallback?(r.registerViewportChanged=e.registerViewportChanged,r.removeViewportChanged=e.removeViewportChanged,r.setDomainsCallback=e.setDomainsCallback,new Qq(r,i)):new RH(r,i);case"gene-annotations":case"horizontal-gene-annotations":case"vertical-gene-annotations":return new Pq(r,i);case"2d-rectangle-domains":case"arrowhead-domains":return new Rq(r,i);case"horizontal-1d-annotations":return new Lq(r,i);case"vertical-1d-annotations":return new Lq(r,i,!0);case"2d-annotations":return new Mq(r,i);case"linear-2d-rectangle-domains":case"horizontal-2d-rectangle-domains":case"vertical-2d-rectangle-domains":return new Bq(r,i);case"square-markers":return new Fq(r,i);case"combined":return r.tracks=e.contents,r.createTrackObject=this.createTrackObject.bind(this),new Ig(r,i);case"2d-chromosome-labels":return new Hq(r,i);case"horizontal-chromosome-grid":return r.orientation="1d-horizontal",new Gq(r,i);case"vertical-chromosome-grid":return r.orientation="1d-vertical",new Gq(r,i);case"2d-chromosome-grid":return new Gq(r,i);case"chromosome-labels":case"horizontal-chromosome-labels":case"vertical-chromosome-labels":return new Wq(r,i);case"linear-heatmap":case"horizontal-heatmap":case"vertical-heatmap":return new Xq(r,i);case"2d-chromosome-annotations":return new zq(r,i);case"1d-value-interval":case"horizontal-1d-value-interval":case"vertical-1d-value-interval":return new qq(r,i);case"osm":case"osm-tiles":return new m$(r,i);case"osm-2d-tile-ids":return new g$(r,i);case"mapbox":case"mapbox-tiles":return new b$(r,i);case"raster-tiles":return new v$(r,i);case"bedlike":case"vertical-bedlike":return new aq(r,i);case"overlay-track":return new cq(r,i);case"overlay-chromosome-grid-track":return r.isOverlay=!0,new Gq(r,i);case"horizontal-rule":return new h$(r,i);case"vertical-rule":return new p$(r,i);case"cross-rule":return r.x=e.x,r.y=e.y,new f$(r,i);case"simple-svg":return new IW(r,i);case"empty":return new LH(r,i);default:{const t=this.props.pluginTracks[e.type];if(t&&!t.isMetaTrack){r.AVAILABLE_FOR_PLUGINS=this.availableForPlugins,r.baseEl=this.baseEl,r.definition=e,e.registerViewportChanged&&e.removeViewportChanged&&e.setDomainsCallback&&(r.registerViewportChanged=e.registerViewportChanged,r.removeViewportChanged=e.removeViewportChanged,r.setDomainsCallback=e.setDomainsCallback);try{return new t.track(this.availableForPlugins,r,i)}catch(t){console.error("Plugin track",e.type,"failed to instantiate.",t)}}return console.warn("Unknown track type:",e.type),new Yq(r,{name:"Unknown Track Type",type:e.type})}}}},{key:"zoomToDataPos",value:function(e,t,n,r,i=3e3,o=null){const[a,s,l]=tb(this.xScale.copy().domain([e,t]),this.yScale.copy().domain([n,r])),c=o?o(this.xScale,this.yScale):[this.xScale,this.yScale];this.setCenter(a,s,l,!1,i,c[0],c[1])}},{key:"forwardContextMenu",value:function(e){this.props.disableTrackMenu||e.altKey||(e.preventDefault(),setTimeout((()=>{this.props.pubSub.publish("contextmenu",e)}),0))}},{key:"addEventTracker",value:function(){this.eventTracker&&this.eventTracker!==this.eventTrackerOld&&(this.eventTrackerOld||(this.eventTrackerOld=this.eventTracker),this.eventTracker=this.eventTrackerOld,this.eventTracker.addEventListener("click",this.boundForwardEvent),this.eventTracker.addEventListener("contextmenu",this.boundForwardContextMenu),this.eventTracker.addEventListener("dblclick",this.boundForwardEvent),this.eventTracker.addEventListener("wheel",this.boundForwardEvent),this.eventTracker.addEventListener("dragstart",this.boundForwardEvent),this.eventTracker.addEventListener("selectstart",this.boundForwardEvent),this.eventTracker.addEventListener("mouseover",this.boundForwardEvent),this.eventTracker.addEventListener("mouseenter",this.boundForwardEvent),this.eventTracker.addEventListener("mousedown",this.boundForwardEvent),this.eventTracker.addEventListener("mouseup",this.boundForwardEvent),this.eventTracker.addEventListener("mouseout",this.boundForwardEvent),this.eventTracker.addEventListener("mouseleave",this.boundForwardEvent),this.eventTracker.addEventListener("touchstart",this.boundForwardEvent),this.eventTracker.addEventListener("touchend",this.boundForwardEvent),this.eventTracker.addEventListener("touchmove",this.boundForwardEvent),this.eventTracker.addEventListener("touchcancel",this.boundForwardEvent),this.eventTracker.addEventListener("pointerover",this.boundForwardEvent),this.eventTracker.addEventListener("pointerenter",this.boundForwardEvent),this.eventTracker.addEventListener("pointerdown",this.boundForwardEvent),this.eventTracker.addEventListener("pointerup",this.boundForwardEvent),this.eventTracker.addEventListener("pointercancel",this.boundForwardEvent),this.eventTracker.addEventListener("pointerout",this.boundForwardEvent),this.eventTracker.addEventListener("pointerleave",this.boundForwardEvent),window.addEventListener("scroll",this.boundScrollEvent))}},{key:"removeEventTracker",value:function(){this.eventTracker&&(this.eventTracker.removeEventListener("click",this.boundForwardEvent),this.eventTracker.removeEventListener("contextmenu",this.boundForwardContextMenu),this.eventTracker.removeEventListener("dblclick",this.boundForwardEvent),this.eventTracker.removeEventListener("wheel",this.boundForwardEvent),this.eventTracker.removeEventListener("dragstart",this.boundForwardEvent),this.eventTracker.removeEventListener("selectstart",this.boundForwardEvent),this.eventTracker.removeEventListener("mouseover",this.boundForwardEvent),this.eventTracker.removeEventListener("mouseenter",this.boundForwardEvent),this.eventTracker.removeEventListener("mousedown",this.boundForwardEvent),this.eventTracker.removeEventListener("mouseup",this.boundForwardEvent),this.eventTracker.removeEventListener("mouseout",this.boundForwardEvent),this.eventTracker.removeEventListener("mouseleave",this.boundForwardEvent),this.eventTracker.removeEventListener("touchstart",this.boundForwardEvent),this.eventTracker.removeEventListener("touchend",this.boundForwardEvent),this.eventTracker.removeEventListener("touchcancel",this.boundForwardEvent),this.eventTracker.removeEventListener("pointerover",this.boundForwardEvent),this.eventTracker.removeEventListener("pointerenter",this.boundForwardEvent),this.eventTracker.removeEventListener("pointerdown",this.boundForwardEvent),this.eventTracker.removeEventListener("pointerup",this.boundForwardEvent),this.eventTracker.removeEventListener("pointercancel",this.boundForwardEvent),this.eventTracker.removeEventListener("pointerout",this.boundForwardEvent),this.eventTracker.removeEventListener("pointerleave",this.boundForwardEvent),window.removeEventListener("scroll",this.boundScrollEvent))}},{key:"scrollEvent",value:function(){this.elementPos=this.element.getBoundingClientRect()}},{key:"forwardEvent",value:function(e){e.sourceUid=this.uid,e.forwarded=!0,this.props.pubSub.publish("app.event",e)}},{key:"onScrollHandler",value:function(e){this.scrollTop=e}},{key:"render",value:function(){return m.default.createElement("div",{ref:e=>{this.baseEl=e},className:gl("track-renderer-div",rte),style:{height:this.currentProps.height,width:this.currentProps.width}},m.default.createElement("div",{ref:e=>{this.element=e},className:gl("track-renderer-element",ite)}),m.default.createElement("div",{ref:e=>{this.eventTracker=e},className:gl("track-renderer-events",ote)},this.currentProps.children))}}]),n}(m.default.Component);ste.defaultProps={pluginDataFetchers:{},pluginTracks:{},canvasElement:null,centerHeight:0,centerWidth:0,children:[],galleryDim:0,height:0,initialXDomain:[],initialYDomain:[],isShowGlobalMousePosition:!1,isRangeSelection:!1,leftWidth:0,leftWidthNoGallery:0,paddingLeft:0,paddingTop:0,positionedTracks:[],topHeight:0,topHeightNoGallery:0,width:0,metaTracks:[]},ste.propTypes={canvasElement:S.exports.object,centerHeight:S.exports.number,centerWidth:S.exports.number,children:S.exports.array,disableTrackMenu:S.exports.bool,galleryDim:S.exports.number,height:S.exports.number,initialXDomain:S.exports.array,initialYDomain:S.exports.array,isShowGlobalMousePosition:S.exports.bool,isRangeSelection:S.exports.bool,leftWidth:S.exports.number,leftWidthNoGallery:S.exports.number,paddingLeft:S.exports.number,paddingTop:S.exports.number,metaTracks:S.exports.array,onMouseMoveZoom:S.exports.func,onNewTilesLoaded:S.exports.func.isRequired,onScalesChanged:S.exports.func.isRequired,pixiRenderer:S.exports.object.isRequired,pixiStage:S.exports.object.isRequired,pluginDataFetchers:S.exports.object,pluginTracks:S.exports.object,positionedTracks:S.exports.array,pubSub:S.exports.object.isRequired,setCentersFunction:S.exports.func,svgElement:S.exports.object.isRequired,theme:S.exports.symbol.isRequired,topHeight:S.exports.number,topHeightNoGallery:S.exports.number,viewOptions:S.exports.object,width:S.exports.number,xDomainLimits:S.exports.array,yDomainLimits:S.exports.array,valueScaleZoom:S.exports.bool,zoomable:S.exports.bool.isRequired,zoomDomain:S.exports.array};const lte=xH(eH(ste));var cte={exports:{}};!function(e,t){var n;self,n=e=>(()=>{var t={4184:(e,t)=>{var n;!function(){var r={}.hasOwnProperty;function i(){for(var e=[],t=0;t{var r=n(852)(n(5639),"DataView");e.exports=r},1989:(e,t,n)=>{var r=n(1789),i=n(401),o=n(7667),a=n(1327),s=n(1866);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(7040),i=n(4125),o=n(2117),a=n(7518),s=n(4705);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(852)(n(5639),"Map");e.exports=r},3369:(e,t,n)=>{var r=n(4785),i=n(1285),o=n(6e3),a=n(9916),s=n(5265);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(852)(n(5639),"Promise");e.exports=r},8525:(e,t,n)=>{var r=n(852)(n(5639),"Set");e.exports=r},8668:(e,t,n)=>{var r=n(3369),i=n(619),o=n(2385);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(8407),i=n(7465),o=n(3779),a=n(7599),s=n(4758),l=n(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},2705:(e,t,n)=>{var r=n(5639).Symbol;e.exports=r},1149:(e,t,n)=>{var r=n(5639).Uint8Array;e.exports=r},577:(e,t,n)=>{var r=n(852)(n(5639),"WeakMap");e.exports=r},4963:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n{var r=n(2545),i=n(5694),o=n(1469),a=n(4144),s=n(5776),l=n(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),h=!n&&!u&&a(e),d=!n&&!u&&!h&&l(e),p=n||u||h||d,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||h&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,m))||f.push(g);return f}},2488:e=>{e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(7813);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},8866:(e,t,n)=>{var r=n(2488),i=n(1469);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},4239:(e,t,n)=>{var r=n(2705),i=n(9607),o=n(2333),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},9454:(e,t,n)=>{var r=n(4239),i=n(7005);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},939:(e,t,n)=>{var r=n(2492),i=n(7005);e.exports=function e(t,n,o,a,s){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,a,e,s))}},2492:(e,t,n)=>{var r=n(6384),i=n(7114),o=n(8351),a=n(6096),s=n(4160),l=n(1469),c=n(4144),u=n(6719),h="[object Arguments]",d="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,b){var v=l(e),y=l(t),T=v?d:s(e),_=y?d:s(t),E=(T=T==h?p:T)==p,x=(_=_==h?p:_)==p,w=T==_;if(w&&c(e)){if(!c(t))return!1;v=!0,E=!1}if(w&&!E)return b||(b=new r),v||u(e)?i(e,t,n,m,g,b):o(e,t,T,n,m,g,b);if(!(1&n)){var S=E&&f.call(e,"__wrapped__"),k=x&&f.call(t,"__wrapped__");if(S||k){var A=S?e.value():e,C=k?t.value():t;return b||(b=new r),g(A,C,n,m,b)}}return!!w&&(b||(b=new r),a(e,t,n,m,g,b))}},8458:(e,t,n)=>{var r=n(3560),i=n(5346),o=n(3218),a=n(346),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,h=c.hasOwnProperty,d=RegExp("^"+u.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?d:s).test(a(e))}},8749:(e,t,n)=>{var r=n(4239),i=n(1780),o=n(7005),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!a[r(e)]}},280:(e,t,n)=>{var r=n(5726),i=n(6916),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},2545:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{e.exports=function(e){return function(t){return e(t)}}},4757:e=>{e.exports=function(e,t){return e.has(t)}},4429:(e,t,n)=>{var r=n(5639)["__core-js_shared__"];e.exports=r},7114:(e,t,n)=>{var r=n(8668),i=n(2908),o=n(4757);e.exports=function(e,t,n,a,s,l){var c=1&n,u=e.length,h=t.length;if(u!=h&&!(c&&h>u))return!1;var d=l.get(e),p=l.get(t);if(d&&p)return d==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f{var r=n(2705),i=n(1149),o=n(7813),a=n(7114),s=n(8776),l=n(1814),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,h,d){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!h(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=s;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var m=d.get(e);if(m)return m==t;r|=2,d.set(e,t);var g=a(p(e),p(t),r,c,h,d);return d.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},6096:(e,t,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,a,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var h=u;h--;){var d=c[h];if(!(l?d in t:i.call(t,d)))return!1}var p=s.get(e),f=s.get(t);if(p&&f)return p==t&&f==e;var m=!0;s.set(e,t),s.set(t,e);for(var g=l;++h{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},8234:(e,t,n)=>{var r=n(8866),i=n(9551),o=n(3674);e.exports=function(e){return r(e,o,i)}},5050:(e,t,n)=>{var r=n(7019);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},852:(e,t,n)=>{var r=n(8458),i=n(7801);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},9607:(e,t,n)=>{var r=n(2705),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var i=a.call(e);return r&&(t?e[s]=n:delete e[s]),i}},9551:(e,t,n)=>{var r=n(4963),i=n(479),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return o.call(e,t)})))}:i;e.exports=s},4160:(e,t,n)=>{var r=n(8552),i=n(7071),o=n(3818),a=n(8525),s=n(577),l=n(4239),c=n(346),u="[object Map]",h="[object Promise]",d="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(r),g=c(i),b=c(o),v=c(a),y=c(s),T=l;(r&&T(new r(new ArrayBuffer(1)))!=f||i&&T(new i)!=u||o&&T(o.resolve())!=h||a&&T(new a)!=d||s&&T(new s)!=p)&&(T=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return f;case g:return u;case b:return h;case v:return d;case y:return p}return t}),e.exports=T},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1789:(e,t,n)=>{var r=n(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},1327:(e,t,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},1866:(e,t,n)=>{var r=n(4536);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,n)=>{var r,i=n(4429),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,n)=>{var r=n(8470),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0||(n==t.length-1?t.pop():i.call(t,n,1),--this.size,0))}},2117:(e,t,n)=>{var r=n(8470);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},7518:(e,t,n)=>{var r=n(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,n)=>{var r=n(8470);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},4785:(e,t,n)=>{var r=n(1989),i=n(8407),o=n(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},1285:(e,t,n)=>{var r=n(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,n)=>{var r=n(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,n)=>{var r=n(5050);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},8776:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},4536:(e,t,n)=>{var r=n(852)(Object,"create");e.exports=r},6916:(e,t,n)=>{var r=n(5569)(Object.keys,Object);e.exports=r},1167:(e,t,n)=>{e=n.nmd(e);var r=n(1957),i=t&&!t.nodeType&&t,o=i&&e&&!e.nodeType&&e,a=o&&o.exports===i&&r.process,s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},5639:(e,t,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},619:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},2385:e=>{e.exports=function(e){return this.__data__.has(e)}},1814:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},7465:(e,t,n)=>{var r=n(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,n)=>{var r=n(8407),i=n(7071),o=n(3369);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(e,t),this.size=n.size,this}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},5694:(e,t,n)=>{var r=n(9454),i=n(7005),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,n)=>{var r=n(3560),i=n(1780);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},4144:(e,t,n)=>{e=n.nmd(e);var r=n(5639),i=n(5062),o=t&&!t.nodeType&&t,a=o&&e&&!e.nodeType&&e,s=a&&a.exports===o?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||i;e.exports=l},8446:(e,t,n)=>{var r=n(939);e.exports=function(e,t){return r(e,t)}},3560:(e,t,n)=>{var r=n(4239),i=n(3218);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},6719:(e,t,n)=>{var r=n(8749),i=n(1717),o=n(1167),a=o&&o.isTypedArray,s=a?i(a):r;e.exports=s},3674:(e,t,n)=>{var r=n(4636),i=n(280),o=n(8612);e.exports=function(e){return o(e)?r(e):i(e)}},8306:(e,t,n)=>{var r=n(3369);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=e.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},479:e=>{e.exports=function(){return[]}},5062:e=>{e.exports=function(){return!1}},2703:(e,t,n)=>{var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9787:t=>{t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e](o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var i={};return(()=>{r.r(i),r.d(i,{default:()=>ce,expandNodesToLevel:()=>le});var e=r(4184),t=r.n(e),n=r(8446),o=r.n(n),a=r(8306),s=r.n(a);let l=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")),"");var c=r(5697),u=r.n(c),h=r(9787),d=r.n(h);function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f=["children","title"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(e,f);return d().createElement("button",m({"aria-label":n,title:n,type:"button"},r),t)}}])&&function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.props=t,this.flatNodes=n}var t,n;return t=e,n=[{key:"setProps",value:function(e){this.props=e}},{key:"clone",value:function(){var t=this,n={};return Object.keys(this.flatNodes).forEach((function(e){var r=t.flatNodes[e];n[e]=function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(Array.isArray(e)&&0!==e.length){var i=this.props,o=i.disabled,a=i.noCascade;e.forEach((function(e,i){var s=t.nodeHasChildren(e);if(void 0!==t.flatNodes[e.value])throw new x("Duplicate value '".concat(e.value,"' detected. All node values must be unique."));t.flatNodes[e.value]={label:e.label,value:e.value,children:e.children,parent:n,isChild:void 0!==n.value,isParent:s,isLeaf:!s,showCheckbox:void 0===e.showCheckbox||e.showCheckbox,disabled:t.getDisabledState(e,n,o,a),treeDepth:r,index:i},t.flattenNodes(e.children,e,r+1)}))}}},{key:"nodeHasChildren",value:function(e){return Array.isArray(e.children)}},{key:"getDisabledState",value:function(e,t,n,r){return!!n||!(r||!t.disabled)||Boolean(e.disabled)}},{key:"deserializeLists",value:function(e){var t=this,n=["checked","expanded"];Object.keys(this.flatNodes).forEach((function(e){n.forEach((function(n){t.flatNodes[e][n]=!1}))})),n.forEach((function(n){e[n].forEach((function(e){void 0!==t.flatNodes[e]&&(t.flatNodes[e][n]=!0)}))}))}},{key:"serializeList",value:function(e){var t=this,n=[];return Object.keys(this.flatNodes).forEach((function(r){t.flatNodes[r][e]&&n.push(r)})),n}},{key:"expandAllNodes",value:function(e){var t=this;return Object.keys(this.flatNodes).forEach((function(n){t.flatNodes[n].isParent&&(t.flatNodes[n].expanded=e)})),this}},{key:"toggleChecked",value:function(e,t,n,r){var i=this,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.flatNodes[e.value],s=[k.PARENT,k.ALL].indexOf(n)>-1,l=[k.LEAF,k.ALL].indexOf(n)>-1;if(a.isLeaf||r){if(e.disabled)return this;this.toggleNode(e.value,"checked",t)}else(s||0===a.children.length)&&this.toggleNode(e.value,"checked",t),l&&a.children.forEach((function(e){i.toggleChecked(e,t,n,r,!1)}));return o&&!r&&a.isChild&&s&&this.toggleParentStatus(a.parent,n),this}},{key:"toggleParentStatus",value:function(e,t){var n=this.flatNodes[e.value];n.isChild?(t===k.ALL&&this.toggleNode(e.value,"checked",this.isEveryChildChecked(n)),this.toggleParentStatus(n.parent,t)):this.toggleNode(e.value,"checked",this.isEveryChildChecked(n))}},{key:"isEveryChildChecked",value:function(e){var t=this;return e.children.every((function(e){return t.getNode(e.value).checked}))}},{key:"toggleNode",value:function(e,t,n){return this.flatNodes[e][t]=n,this}}],n&&function(e,t){for(var n=0;n0&&void 0!==arguments[0])||arguments[0];(0,this.props.onExpand)(this.state.model.clone().expandAllNodes(e).serializeList("expanded"))}},{key:"determineShallowCheckState",value:function(e,t){var n=this.state.model.getNode(e.value);return n.isLeaf||t||0===e.children.length?n.checked?1:0:this.isEveryChildChecked(e)?1:this.isSomeChildChecked(e)?2:0}},{key:"isEveryChildChecked",value:function(e){var t=this;return e.children.every((function(e){return 1===t.state.model.getNode(e.value).checkState}))}},{key:"isSomeChildChecked",value:function(e){var t=this;return e.children.some((function(e){return t.state.model.getNode(e.value).checkState>0}))}},{key:"renderTreeNodes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.props,i=r.expandDisabled,o=r.expandOnClick,a=r.icons,s=r.lang,l=r.noCascade,c=r.onClick,u=r.onlyLeafCheckboxes,p=r.optimisticToggle,f=r.showNodeTitle,m=r.showNodeIcon,g=this.state,b=g.id,v=g.model,y=h.defaultProps.icons,T=e.map((function(e){var r=e.value,h=v.getNode(e.value),g=h.isParent?t.renderTreeNodes(e.children,e):null;h.checkState=t.determineShallowCheckState(e,l);var T=u?h.isLeaf:h.showCheckbox;return!n.value||v.getNode(n.value).expanded?d().createElement(V,{key:r,checked:h.checkState,className:e.className,disabled:h.disabled,expandDisabled:i,expandOnClick:o,expanded:h.expanded,icon:e.icon,icons:t.combineMemorized(y,a),label:e.label,lang:s,optimisticToggle:p,isLeaf:h.isLeaf,isParent:h.isParent,showCheckbox:T,showNodeIcon:m,title:f?e.title||e.label:e.title,treeId:b,value:e.value,onCheck:t.onCheck,onClick:c&&t.onNodeClick,onExpand:t.onExpand},g):null}));return d().createElement("ol",null,T)}},{key:"renderExpandAll",value:function(){var e=this.props,t=e.icons,n=t.expandAll,r=t.collapseAll,i=e.lang;return e.showExpandAll?d().createElement("div",{className:"rct-options"},d().createElement(T,{className:"rct-option rct-option-expand-all",title:i.expandAll,onClick:this.onExpandAll},n),d().createElement(T,{className:"rct-option rct-option-collapse-all",title:i.collapseAll,onClick:this.onCollapseAll},r)):null}},{key:"renderHiddenInput",value:function(){var e=this.props,t=e.name,n=e.nameAsArray;return void 0===t?null:n?this.renderArrayHiddenInput():this.renderJoinedHiddenInput()}},{key:"renderArrayHiddenInput",value:function(){var e=this.props,t=e.checked,n=e.name;return t.map((function(e){var t="".concat(n,"[]");return d().createElement("input",{key:e,name:t,type:"hidden",value:e})}))}},{key:"renderJoinedHiddenInput",value:function(){var e=this.props,t=e.checked,n=e.name,r=t.join(",");return d().createElement("input",{name:n,type:"hidden",value:r})}},{key:"render",value:function(){var e,n=this.props,r=n.direction,i=n.disabled,o=n.iconsClass,a=n.nodes,s=n.nativeCheckboxes,l=this.state.id,c=this.renderTreeNodes(a),u=t()((ie(e={"react-checkbox-tree":!0,"rct-disabled":i},"rct-icons-".concat(o),!0),ie(e,"rct-native-display",s),ie(e,"rct-direction-rtl","rtl"===r),e));return d().createElement("div",{className:u,id:l},this.renderExpandAll(),this.renderHiddenInput(),c)}}],i=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.model,r=t.prevProps,i=e.disabled,a=e.id,s=e.nodes,l=J(J({},t),{},{prevProps:e});return n.setProps(e),o()(r.nodes,s)&&r.disabled===i||(n.reset(),n.flattenNodes(s)),null!==a&&(l=J(J({},l),{},{id:a})),n.deserializeLists({checked:e.checked,expanded:e.expanded}),l}}],r&&ee(n.prototype,r),i&&ee(n,i),Object.defineProperty(n,"prototype",{writable:!1}),h}(d().Component);function ae(e){return function(e){if(Array.isArray(e))return se(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return se(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?se(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n2&&void 0!==arguments[2]?arguments[2]:0;if(n>t)return[];var r=[];return e.forEach((function(e){e.children&&(r=[].concat(ae(r),[e.value],ae(le(e.children,t,n+1))))})),r}ie(oe,"propTypes",{nodes:u().arrayOf(K).isRequired,checkModel:u().oneOf([_.LEAF,_.ALL]),checked:W,direction:u().string,disabled:u().bool,expandDisabled:u().bool,expandOnClick:u().bool,expanded:W,icons:L,iconsClass:u().string,id:u().string,lang:B,name:u().string,nameAsArray:u().bool,nativeCheckboxes:u().bool,noCascade:u().bool,onlyLeafCheckboxes:u().bool,optimisticToggle:u().bool,showExpandAll:u().bool,showNodeIcon:u().bool,showNodeTitle:u().bool,onCheck:u().func,onClick:u().func,onExpand:u().func}),ie(oe,"defaultProps",{checkModel:_.LEAF,checked:[],direction:"ltr",disabled:!1,expandDisabled:!1,expandOnClick:!1,expanded:[],icons:{check:d().createElement("span",{className:"rct-icon rct-icon-check"}),uncheck:d().createElement("span",{className:"rct-icon rct-icon-uncheck"}),halfCheck:d().createElement("span",{className:"rct-icon rct-icon-half-check"}),expandClose:d().createElement("span",{className:"rct-icon rct-icon-expand-close"}),expandOpen:d().createElement("span",{className:"rct-icon rct-icon-expand-open"}),expandAll:d().createElement("span",{className:"rct-icon rct-icon-expand-all"}),collapseAll:d().createElement("span",{className:"rct-icon rct-icon-collapse-all"}),parentClose:d().createElement("span",{className:"rct-icon rct-icon-parent-close"}),parentOpen:d().createElement("span",{className:"rct-icon rct-icon-parent-open"}),leaf:d().createElement("span",{className:"rct-icon rct-icon-leaf"})},iconsClass:"fa4",id:null,lang:{collapseAll:"Collapse all",expandAll:"Expand all",toggle:"Toggle"},name:void 0,nameAsArray:!1,nativeCheckboxes:!1,noCascade:!1,onlyLeafCheckboxes:!1,optimisticToggle:!0,showExpandAll:!1,showNodeIcon:!0,showNodeTitle:!1,onCheck:function(){},onClick:null,onExpand:function(){}});const ce=oe})(),i})(),e.exports=n(m.default)}(cte);const ute=y(cte.exports);let hte=function(e){i(n,e);var t=o(n);function n(e){var r;d(this,n),(r=t.call(this,e)).localTracks=em.filter((e=>e.local&&!e.hidden)).map((e=>{const t={...e};return t.datatype=e.datatype[0],t})),r.augmentedTracksInfo=em,window.higlassTracksByType&&Object.keys(window.higlassTracksByType).forEach((e=>{r.augmentedTracksInfo.push(window.higlassTracksByType[e].config)})),e.datatype?r.localTracks=r.localTracks.filter((t=>t.datatype[0]===e.datatype)):r.localTracks=r.localTracks.filter((e=>e.orientation===r.props.orientation)),r.localTracks.forEach((e=>{e.uuid=Ns.nice()}));const i=r.prepareNewEntries("",r.localTracks,{}),o=Object.keys(i),a=o.length?[o[0]]:null;return r.mounted=!1,r.state={selectedUuid:a,options:i,filter:"",checked:[],expanded:[]},r.requestTilesetLists(),r}return f(n,[{key:"componentDidMount",value:function(){this.mounted=!0,this.requestTilesetLists(),this.searchBox.focus()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"prepareNewEntries",value:function(e,t,n){const r=n;return t.map((t=>({...t,server:e,tilesetUid:t.uuid,serverUidKey:this.serverUidKey(e,t.uuid),datatype:t.datatype,name:t.name,uid:Ns.nice()}))).forEach((e=>{r[e.serverUidKey]=e})),r}},{key:"serverUidKey",value:function(e,t){return`${e}/${t}`}},{key:"requestTilesetLists",value:function(){let e=null;if(this.props.datatype)e=`dt=${this.props.datatype}`;else{const t=new Set([].concat(...this.augmentedTracksInfo.filter((e=>e.datatype)).filter((e=>e.orientation===this.props.orientation||"1d-vertical"===this.props.orientation&&"1d-horizontal"===e.orientation)).map((e=>e.datatype))));e=[...t].map((e=>`dt=${e}`)).join("&")}this.props.trackSourceServers?this.props.trackSourceServers.forEach((t=>{mg.json(`${t}/tilesets/?limit=10000&${e}`,((e,n)=>{if(e)console.error("ERROR:",e);else{const e=this.prepareNewEntries(t,n.results,this.state.options),r=Object.keys(e);let{selectedUuid:i}=this.state;if(!i){i=r.length?[r[0]]:null;const e=this.state.options[i[0]];this.props.selectedTilesetChanged([e])}this.mounted&&this.setState({selectedUuid:i,options:e})}}),this.props.pubSub)})):console.warn("No track source servers specified in the viewconf")}},{key:"handleOptionDoubleClick",value:function(e){const t=this.state.options[e.target.value];this.props.onDoubleClick(t)}},{key:"handleSelectedOptions",value:function(e){const t=[],n=[];for(let r=0;re.label.toLowerCase().localeCompare(t.label.toLowerCase(),"en"))),r.push(n[e]));return r.sort(((e,t)=>e.label.toLowerCase().localeCompare(t.label.toLowerCase(),"en"))),r}},{key:"handleChecked",value:function(e){this.handleSelectedOptions(e),this.setState({checked:e})}},{key:"handleExpanded",value:function(e){this.setState({expanded:e})}},{key:"render",value:function(){const e=[];for(const t in this.state.options)e.push(this.state.options[t]);const t=this.partitionByGroup(this.state.options,this.state.filter),n={width:15,height:15,top:2,right:2,position:"relative"},r=JSON.parse(JSON.stringify(n));r.opacity=.5;const i=m.default.createElement("form",{onSubmit:e=>{e.preventDefault()}},m.default.createElement("div",{className:"tileset-finder-search-bar"},m.default.createElement("span",{className:"tileset-finder-label"},"Select tileset:"),m.default.createElement("input",{ref:e=>{this.searchBox=e},className:"tileset-finder-search-box",onChange:this.handleSearchChange.bind(this),placeholder:"Search Term",type:"text"})),m.default.createElement("div",{className:"tileset-finder-checkbox-tree"},m.default.createElement(ute,{checked:this.state.checked,expanded:this.state.expanded,icons:{uncheck:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#square_o"})),check:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#check_square_o"})),halfCheck:m.default.createElement("svg",{style:r},m.default.createElement("use",{xlinkHref:"#check_square_o"})),leaf:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#file_o"})),expandClose:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#chevron_right"})),expandOpen:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#chevron_down"})),parentClose:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#folder_o"})),parentOpen:m.default.createElement("svg",{style:n},m.default.createElement("use",{xlinkHref:"#folder_open_o"}))},nodes:t,onCheck:this.handleChecked.bind(this),onExpand:this.handleExpanded.bind(this)})));return m.default.createElement("div",null,i)}}]),n}(m.default.Component);hte.propTypes={datatype:S.exports.string,orientation:S.exports.string,onDoubleClick:S.exports.func,pubSub:S.exports.object.isRequired,selectedTilesetChanged:S.exports.func,trackSourceServers:S.exports.array};const dte=xH(hte);let pte=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).DATATYPE_TO_TRACK_TYPE=tm(r.props.orientation),r.AVAILABLE_TRACK_TYPES=am(r.props.datatypes,r.props.orientation),r.state={selectedPlotType:r.AVAILABLE_TRACK_TYPES[0]},r}return f(n,[{key:"UNSAFE_componentWillReceiveProps",value:function(e){if(this.AVAILABLE_TRACK_TYPES=am(e.datatypes,this.props.orientation),this.AVAILABLE_TRACK_TYPES&&e.allTracksSameDatatype&&this.AVAILABLE_TRACK_TYPES.length>0&&!this.AVAILABLE_TRACK_TYPES.includes(this.state.selectedPlotType)){const t=Em(e.datatypes[0][0],this.props.position,this.AVAILABLE_TRACK_TYPES);this.handlePlotTypeSelected(t)}}},{key:"handlePlotTypeSelected",value:function(e){this.setState({selectedPlotType:e}),this.props.onPlotTypeSelected(e.type)}},{key:"render",value:function(){let e="No plot types available for track";const t={};return em.forEach((e=>{t[e.type]=e})),this.AVAILABLE_TRACK_TYPES&&(e=this.AVAILABLE_TRACK_TYPES.sort(((e,t)=>e.type{const n=t[e.type].thumbnail,r=this.state.selectedPlotType.type===e.type?"plot-type-item plot-type-selected":"plot-type-item",i=t[e.type].thumbnail?m.default.createElement("div",{className:"track-thumbnail",dangerouslySetInnerHTML:{__html:n.outerHTML}}):m.default.createElement("div",{className:"track-thumbnail"},m.default.createElement("svg",{height:20,width:30}));return m.default.createElement("li",{key:e.type,className:r,onClick:t=>{this.setState({selectedPlotType:e}),this.props.onPlotTypeSelected(e.type)},style:{listStyle:"none",paddingLeft:5,paddingBottom:0}},i,m.default.createElement("span",{style:{verticalAlign:"middle"}},e.type))}))),m.default.createElement("div",null,e.length>0&&this.props.allTracksSameDatatype&&m.default.createElement("div",{className:"plot-type-container"},e),!this.props.allTracksSameDatatype&&m.default.createElement("div",{className:"plot-type-container-empty"},"Datasets with multiple datatypes chosen. They will be added with their default track types."))}}]),n}(m.default.Component);pte.propTypes={allTracksSameDatatype:S.exports.bool,datatypes:S.exports.array,orientation:S.exports.string,onPlotTypeSelected:S.exports.func,position:S.exports.string};let fte=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).options={},r.state={selectedTilesets:[{datatype:"none"}],allTracksSameDatatype:!0},r.handleSubmitBound=r.handleSubmit.bind(a(r)),r.handleTilesetPickerDoubleClickBound=r.handleTilesetPickerDoubleClick.bind(a(r)),r.selectedTilesetsChangedBound=r.selectedTilesetsChanged.bind(a(r)),r}return f(n,[{key:"getOrientation",value:function(e){let t=null;return t="top"===e||"bottom"===e?"1d-horizontal":"left"===e||"right"===e?"1d-vertical":"2d",t}},{key:"handleSubmit",value:function(e){e&&e.preventDefault(),this.props.onTracksChosen(this.state.selectedTilesets,this.props.position,this.props.host)}},{key:"handleTilesetPickerDoubleClick",value:function(e){this.selectedTilesetsChanged([e]),this.props.onTracksChosen(this.state.selectedTilesets,this.props.position,this.props.host)}},{key:"handleOptionsChanged",value:function(e){this.options=e}},{key:"handlePlotTypeSelected",value:function(e){const{selectedTilesets:t}=this.state;for(const n of t)n.type=e;this.selectedPlotType=e,this.setState({selectedTilesets:t})}},{key:"selectedTilesetsChanged",value:function(e){let t=null;t=0===e.length?[{datatype:"none"}]:e;let n=!0;const r=t[0].datatype;for(const e of t)e.datatype!==r&&(n=!1);if(n)for(const e of t)e.type=this.selectedPlotType;else for(const e of t){let t=[e.datatype];const n=this.getOrientation(this.props.position);"cooler"===e.filetype&&(t=[e.datatype,"chromsizes"]);const r=am([t],n),i=Em(t[0],this.props.position,r);e.type=i.type}this.setState({selectedTilesets:t,allTracksSameDatatype:n})}},{key:"render",value:function(){const e=this.getOrientation(this.props.position),t=m.default.createElement("div",null,m.default.createElement(dte,{ref:e=>{this.tilesetFinder=e},datatype:this.props.datatype,onDoubleClick:this.handleTilesetPickerDoubleClick.bind(this),onTracksChosen:e=>this.props.onTracksChosen(e,this.props.position),orientation:e,selectedTilesetChanged:this.selectedTilesetsChanged.bind(this),trackSourceServers:this.props.trackSourceServers}));return m.default.createElement(h1,{maxHeight:!0,okayTitle:"Submit",onCancel:this.props.onCancel,onOkay:this.handleSubmitBound,title:"Add Track"},m.default.createElement(m.default.Fragment,null,t,m.default.createElement(pte,{ref:e=>{this.plotTypeChooser=e},allTracksSameDatatype:this.state.allTracksSameDatatype,datatypes:this.state.selectedTilesets.map((e=>"cooler"===e.filetype?[e.datatype,"chromsizes"]:[e.datatype])),onPlotTypeSelected:this.handlePlotTypeSelected.bind(this),orientation:e,position:this.props.position})))}}]),n}(m.default.Component);fte.defaultProps={position:"top"},fte.propTypes={datatype:S.exports.string,host:S.exports.string,onCancel:S.exports.func.isRequired,onTracksChosen:S.exports.func.isRequired,position:S.exports.string,trackSourceServers:S.exports.array.isRequired};let mte=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"render",value:function(){const e=[];return this.props.children.forEach(((t,n)=>{const r=`customTrackDialog_${n}`;e.push(m.default.createElement(t,{key:r,...this.props.bodyProps[n]}))})),m.default.createElement(h1,{maxHeight:!0,okayOnly:!0,okayTitle:"Close",onCancel:this.props.onCancel,onOkay:this.props.onCancel,title:this.props.title},e)}}]),n}(m.default.PureComponent);mte.defaultProps={},mte.propTypes={onCancel:S.exports.func.isRequired};let gte=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).adjusted=!1,r.state={orientation:r.props.orientation?r.props.orientation:"right",left:r.props.position.left,top:r.props.position.top,submenuShown:null},r}return f(n,[{key:"componentDidMount",value:function(){this.updateOrientation()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.adjusted=!1,this.setState({left:e.position.left,top:e.position.top})}},{key:"componentDidUpdate",value:function(){this.updateOrientation()}},{key:"handleItemMouseEnterWithRect",value:function(e,t){this.setState({submenuShown:t,submenuSourceBbox:e})}},{key:"handleItemMouseEnter",value:function(e,t){this.handleItemMouseEnterWithRect(e.currentTarget.getBoundingClientRect(),t)}},{key:"handleMouseLeave",value:function(){}},{key:"handleOtherMouseEnter",value:function(){this.setState({submenuShown:null})}},{key:"updateOrientation",value:function(){if(this.adjusted)return;this.adjusted=!0,this.divDom=g.default.findDOMNode(this.div);const e=this.divDom.getBoundingClientRect(),t=this.props.parentBbox?this.props.parentBbox:{top:this.props.position.top,left:this.props.position.left,width:0,height:0};let n=this.state.orientation,r=t.top;if(t.top+e.height>window.innerHeight&&(t.top-e.height>0?r=t.top-e.height+20:(r=t.top-e.height+20,r-=r+e.height-window.innerHeight)),"left"===this.state.orientation){let i=t.left-e.width;i<0&&(t.left+t.width+e.width>window.innerWidth?i=0:(i=t.left+t.width,n="right")),this.setState({left:i,top:r,orientation:n})}else{let i=t.left+t.width;t.left+t.width+e.width>window.innerWidth&&(t.left-e.width<0?(i=0,n="right"):(i=t.left-e.width,n="left")),this.setState({left:i,top:r,orientation:n})}}},{key:"render",value:function(){const e=this.state.left?{left:this.state.left}:{right:this.state.right},t={top:this.state.top},n=Object.assign(e,t);return m.default.createElement("div",{ref:e=>{this.div=e},className:gl("context-menu-item",yh["context-menu"],{[yh["context-menu-dark"]]:this.props.theme===Pf}),style:n},this.props.children)}}]),n}(m.default.Component);gte.propTypes={children:S.exports.node,orientation:S.exports.string,parentBbox:S.exports.object,position:S.exports.object,theme:S.exports.symbol.isRequired};let bte=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"getSubmenu",value:function(){if(this.state.submenuShown){const e=this.state.submenuSourceBbox,t="left"===this.state.orientation?{left:this.state.left,top:e.top}:{left:this.state.left+e.width+7,top:e.top},r=this.state.submenuShown;return m.default.createElement(n,{menuItems:r.children,orientation:this.state.orientation,parentBbox:e,position:t,theme:this.props.theme})}return m.default.createElement("div",null)}},{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){const e=[];for(const t in this.props.menuItems){const n=this.props.menuItems[t];e.push(m.default.createElement(Th,{key:t,onClick:n.handler?n.handler:()=>null,onMouseEnter:n.children?e=>this.handleItemMouseEnter(e,n):this.handleOtherMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave},n.name,n.children&&m.default.createElement("svg",{className:yh["play-icon"]},m.default.createElement("use",{xlinkHref:"#play"}))))}return m.default.createElement("div",{ref:e=>{this.div=e},className:gl(yh["context-menu"],{[yh["context-menu-dark"]]:this.props.theme===Pf}),style:{left:this.state.left,top:this.state.top}},e,this.getSubmenu())}}]),n}(gte),vte=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"getConfigureSeriesMenu",value:function(e,t,n){const r={},i=window.higlassTracksByType&&window.higlassTracksByType[n.type]&&window.higlassTracksByType[n.type].config&&window.higlassTracksByType[n.type].config.optionsInfo;if(i)for(const e of Object.keys(i))Jee[e]=i[e];if(!rm[n.type]||!rm[n.type].availableOptions)return null;for(const e of rm[n.type].availableOptions)if(e in Jee){if(r[e]={name:Jee[e].name},Jee[e].generateOptions){const t=Jee[e].generateOptions(n);r[e].children||(r[e].children={});for(const i of t){const t={name:i.name,value:i.value,handler:()=>{n.options[e]=i.value,this.props.onTrackOptionsChanged(n.uid,n.options),this.props.closeMenu()}};r[e].children[i.value]=t}}if(Jee[e].inlineOptions)for(const t in Jee[e].inlineOptions){const i=Jee[e].inlineOptions[t];r[e].children||(r[e].children={});const o={name:i.name,value:i.value};i.componentPickers&&i.componentPickers[n.type]?o.handler=()=>{this.props.onConfigureTrack(n,i.componentPickers[n.type]),this.props.closeMenu()}:o.handler=()=>{n.options[e]=i.value,this.props.onTrackOptionsChanged(n.uid,n.options),this.props.closeMenu()},r[e].children[t]=o}else Jee[e].componentPickers&&Jee[e].componentPickers[n.type]&&(r[e].handler=()=>{this.props.onConfigureTrack(n,Jee[e].componentPickers[n.type]),this.props.closeMenu()})}return m.default.createElement(bte,{key:"config-series-menu",closeMenu:this.props.closeMenu,menuItems:r,orientation:this.state.orientation,parentBbox:t,position:e,theme:this.props.theme})}},{key:"getTrackTypeItems",value:function(e,t,n){window.higlassTracksByType&&Object.keys(window.higlassTracksByType).forEach((e=>{rm[e]=window.higlassTracksByType[e].config}));let{datatype:r}=n,i=null;n.type in rm&&(r||(r=rm[n.type].datatype[0]),({orientation:i}=rm[n.type]));const o=Object.values(rm).filter((e=>e.datatype)).filter((e=>e.orientation)).filter((e=>e.datatype.includes(r))).filter((e=>e.orientation===i)).map((e=>e.type)),a={};for(let e=0;e{this.props.onChangeTrackType(n.uid,o[e])}};return m.default.createElement(bte,{key:"track-type-items",closeMenu:this.props.closeMenu,menuItems:a,orientation:this.state.orientation,parentBbox:t,position:e,theme:this.props.theme})}},{key:"getSubmenu",value:function(){if(this.state.submenuShown){const e=this.state.submenuSourceBbox,t="left"===this.state.orientation?{left:this.state.left,top:e.top}:{left:this.state.left+e.width+7,top:e.top},n=this.state.submenuShown,r=n.value;return"track-type"===n.option?this.getTrackTypeItems(t,e,r):this.getConfigureSeriesMenu(t,e,r)}return m.default.createElement("div",null)}},{key:"getDivideByMenuItem",value:function(){if(this.props.series.data&&"divided"===this.props.series.data.type){const e={tilesetUid:this.props.series.data.children[0].tilesetUid,server:this.props.series.data.children[0].server};return m.default.createElement(Th,{className:yh["context-menu-item"],onClick:()=>this.props.onChangeTrackData(this.props.series.uid,e),onMouseEnter:e=>this.handleOtherMouseEnter(e)},m.default.createElement("span",{className:yh["context-menu-span"]},"Remove divisor"))}return m.default.createElement(Th,{className:yh["context-menu-item"],onClick:()=>this.props.onAddDivisor(this.props.series),onMouseEnter:e=>this.handleOtherMouseEnter(e)},m.default.createElement("span",{className:yh["context-menu-span"]},"Divide by"))}},{key:"componentWillUnmount",value:function(){}},{key:"render",value:function(){let e=null;rm[this.props.series.type]&&rm[this.props.series.type].exportable&&(e=m.default.createElement(Th,{className:yh["context-menu-item"],onClick:()=>this.props.onExportData(this.props.hostTrack.uid,this.props.track.uid),onMouseEnter:e=>this.handleOtherMouseEnter(e)},m.default.createElement("span",{className:yh["context-menu-span"]},"Export Data")));const t=this.props.onAddSeries?m.default.createElement(Th,{className:yh["context-menu-item"],onClick:()=>{this.props.onCloseTrack(this.props.series.uid),this.props.onAddSeries(this.props.hostTrack.uid)},onMouseEnter:e=>this.handleOtherMouseEnter(e)},m.default.createElement("span",{className:yh["context-menu-span"]},"Replace Series")):null;return m.default.createElement("div",{ref:e=>{this.div=e},className:gl(yh["context-menu"],{[yh["context-menu-dark"]]:this.props.theme===Pf}),"data-menu-type":"SeriesListMenu",onMouseLeave:this.props.handleMouseLeave,style:{left:this.state.left,top:this.state.top}},m.default.createElement(Th,{onClick:()=>{},onMouseEnter:e=>this.handleItemMouseEnter(e,{option:"configure-series",value:this.props.track}),onMouseLeave:e=>this.handleMouseLeave(e)},"Configure Series",m.default.createElement("svg",{className:yh["play-icon"]},m.default.createElement("use",{xlinkHref:"#play"}))),m.default.createElement(Th,{className:yh["context-menu-item"],onClick:()=>{},onMouseEnter:e=>this.handleItemMouseEnter(e,{option:"track-type",value:this.props.track}),onMouseLeave:e=>this.handleMouseLeave(e)},m.default.createElement("span",{className:yh["context-menu-span"]},"Track Type",m.default.createElement("svg",{className:yh["play-icon"]},m.default.createElement("use",{xlinkHref:"#play"})))),e,this.getDivideByMenuItem(),m.default.createElement(Th,{className:yh["context-menu-item"],onClick:this.props.onCloseTrack,onMouseEnter:e=>this.handleOtherMouseEnter(e)},m.default.createElement("span",{className:yh["context-menu-span"]},"Close Series")),t,this.getSubmenu())}}]),n}(gte);const yte=e=>{let t=[];for(const n of e)n.contents?t=t.concat(n.contents):t.push(n);return t},Tte=(e,t,n,r)=>e?(window.higlassTracksByType&&Object.keys(window.higlassTracksByType).forEach((e=>{rm[e]=window.higlassTracksByType[e].config})),yte(e).map((e=>{const i=rm[e.type]?rm[e.type].thumbnail:null,o=i?m.default.createElement("div",{className:yh["context-menu-icon"],dangerouslySetInnerHTML:{__html:i.outerHTML}}):m.default.createElement("div",{className:yh["context-menu-icon"]},m.default.createElement("svg",null));return m.default.createElement(Th,{key:e.uid,className:yh["context-menu-item"],onClick:()=>{r&&r(e.uid)},onMouseEnter:n=>{t&&t(n,e)},onMouseLeave:e=>{n&&n(e)}},o,m.default.createElement("span",{className:yh["context-menu-span"]},e.options&&e.options.name&&e.options.name.length?e.options.name:e.type,t&&n?m.default.createElement("svg",{className:yh["play-icon"]},m.default.createElement("use",{xlinkHref:"#play"})):null))}))):null,_te=a$((e=>function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"getSubmenu",value:function(){if(this.state.submenuShown){const e=this.state.submenuSourceBbox;let t=null;t="left"===this.state.orientation?{left:this.state.left,top:e.top}:{left:this.state.left+e.width+7,top:e.top};const n=yte(this.props.tracks).filter((e=>e.uid===this.state.submenuShown.uid))[0],r=n&&!("whole"===n.position);return m.default.createElement(vte,{key:`series-list-menu-${n.uid}`,ref:e=>{this.seriesListMenu=e},closeMenu:this.props.closeMenu,hostTrack:this.props.tracks[0],onAddDivisor:this.props.onAddDivisor,onAddSeries:r?this.props.onAddSeries:null,onChangeTrackData:this.props.onChangeTrackData,onChangeTrackType:this.props.onChangeTrackType,onCloseTrack:()=>this.props.onCloseTrack(this.state.submenuShown.uid),onConfigureTrack:this.props.onConfigureTrack,onDivideSeries:this.props.onDivideSeries,onExportData:this.props.onExportData,onLockScales:this.props.onLockScales,onTrackOptionsChanged:this.props.onTrackOptionsChanged,orientation:this.state.orientation,parentBbox:e,position:t,series:this.state.submenuShown,theme:this.props.theme,track:n,trackOrientation:this.props.trackOrientation,trackSourceServers:this.props.trackSourceServers})}return m.default.createElement("div",null)}}]),n}(e)));let Ete=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).seriesRefs={},r.seriesListMenu=null,r}return f(n,[{key:"componentDidMount",value:function(){r(h(n.prototype),"componentDidMount",this).call(this)}},{key:"render",value:function(){return m.default.createElement("div",{ref:e=>{this.div=e},className:gl(yh["context-menu"],{[yh["context-menu-dark"]]:this.props.theme===Pf}),"data-menu-type":"ConfigTrackMenu",style:{left:this.state.left,top:this.state.top}},Tte(this.props.tracks,this.handleItemMouseEnter.bind(this),this.handleMouseLeave.bind(this),null),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{contextMenu:this,onClick:()=>this.props.onLockValueScale(this.props.tracks[0].uid),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Lock Value Scale With"),m.default.createElement(Th,{contextMenu:this,onClick:()=>this.props.onUnlockValueScale(this.props.tracks[0].uid),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Unlock Value Scale"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{contextMenu:this,onClick:()=>this.props.onAddSeries(this.props.tracks[0].uid),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Add Series"),m.default.createElement(Th,{onClick:()=>this.props.onCloseTrack(this.props.tracks[0].uid)},"Close Track"),m.default.createElement(Th,{onClick:()=>{this.props.onReplaceTrack(this.props.tracks[0].uid,this.props.trackOrientation)}},"Replace Track"),this.getSubmenu())}}]),n}(l$(gte).with(_te));function xte(e){return m.default.createElement("div",null,Tte(e.tracks,null,null,e.onCloseTrack),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:()=>e.onCloseTrack(e.tracks[0].uid)},"Close all series"))}xte.propTypes={onCloseTrack:S.exports.func.isRequired,tracks:S.exports.array.isRequired};let wte=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).clickHandlerBound=r.clickHandler.bind(a(r)),r.contextMenuHandlerBound=r.contextMenuHandler.bind(a(r)),r.resizeHandlerBound=r.resizeHandler.bind(a(r)),r}return f(n,[{key:"componentDidMount",value:function(){this.popup=document.createElement("div"),document.body.appendChild(this.popup),this.popup.style.zIndex=99,this.popup.style.position="absolute",this.popup.className="hg-popup",document.addEventListener("click",this.clickHandlerBound,!0),document.addEventListener("contextmenu",this.contextMenuHandlerBound,!0),window.addEventListener("resize",this.resizeHandlerBound,!0),this._renderLayer()}},{key:"componentDidUpdate",value:function(){this._renderLayer()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("click",this.clickHandlerBound,!0),document.removeEventListener("contextmenu",this.contextMenuHandlerBound,!0),window.removeEventListener("resize",this.resizeHandlerBound,!0),g.default.unmountComponentAtNode(this.popup),document.body.removeChild(this.popup)}},{key:"_renderLayer",value:function(){g.default.render(this.props.children,this.popup)}},{key:"clickHandler",value:function(e){this.popup.contains(e.target)||this.props.onMenuClosed&&this.props.onMenuClosed(e)}},{key:"contextMenuHandler",value:function(e){e.altKey||(e.preventDefault(),this.clickHandler(e))}},{key:"resizeHandler",value:function(){this.props.onMenuClosed(null)}},{key:"render",value:function(){return m.default.createElement("div",null)}}]),n}(m.default.Component);wte.defaultProps={onMenuClosed:Cg},wte.propTypes={children:S.exports.node.isRequired,onMenuClosed:S.exports.func};const Ste=mf((e=>m.default.createElement(V0,{className:e.className,controlAlignLeft:e.controlAlignLeft,editable:e.editable,handleConfigTrack:e.handleConfigTrack,handleResizeTrack:e.handleResizeTrack,height:e.height,item:e.item,onAddSeries:e.onAddSeries,onCloseTrack:e.onCloseTrack,onCloseTrackMenuOpened:e.onCloseTrackMenuOpened,onConfigTrackMenuOpened:e.onConfigTrackMenuOpened,resizeHandles:e.resizeHandles,uid:e.uid,width:e.width}))),kte="_vertical-tiled-plot_f3ho8_1";function Ate(e){return e&&e.sourceEvent}let Cte=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).brushBehavior=pp().on("start",r.brushStarted.bind(a(r))).on("brush",r.brushed.bind(a(r))).on("end",r.brushedEnded.bind(a(r))),r}return f(n,[{key:"componentDidMount",value:function(){this.props.isRangeSelectionActive&&this.addBrush()}},{key:"shouldComponentUpdate",value:function(e,t){if(this.rangeSelectionTriggered)return this.rangeSelectionTriggered=!1,this.rangeSelectionTriggeredEnd&&this.props.rangeSelection!==e.rangeSelection&&this.moveBrush(e.rangeSelection[0]?e.rangeSelection[0]:null,!0),this.rangeSelectionTriggeredEnd=!1,this.state!==t;if(this.props.rangeSelection!==e.rangeSelection){const n=this.props.is1dRangeSelection?0:1;return this.moveBrush(e.rangeSelection[n]?e.rangeSelection[n]:null,e.rangeSelectionEnd),this.state!==t}return!0}},{key:"componentDidUpdate",value:function(){this.props.isRangeSelectionActive?this.addBrush():this.removeBrush()}},{key:"addBrush",value:function(){this.brushEl&&this.brushElAddedBefore!==this.brushEl&&(this.brushElAddedBefore&&this.brushElAddedBefore.on(".brush",null),this.brushEl.call(this.brushBehavior),this.brushElAddedBefore=this.brushEl,Jg(this.brushEl,gH["track-range-selection-group-brush-selection"]))}},{key:"brushed",value:function(e){const t=this.rangeSelectionMoved;this.rangeSelectionMoved=!1,Ate(e)&&this.props.onRangeSelection&&!t&&(this.rangeSelectionTriggered=!0,this.props.onRangeSelection(e.selection))}},{key:"brushStarted",value:function(e){Ate(e)&&e.selection&&this.props.onRangeSelectionStart()}},{key:"brushedEnded",value:function(e){if(!this.props.is1dRangeSelection)return;const t=this.rangeSelectionMovedEnd;this.rangeSelectionMovedEnd=!1,e.selection&&e.sourceEvent&&this.props.onRangeSelection&&!t&&(this.rangeSelectionTriggered=!0,this.rangeSelectionTriggeredEnd=!0,this.props.onRangeSelectionEnd(e.selection)),e.selection||(this.rangeSelectionTriggered=!0,this.props.onRangeSelectionReset())}},{key:"moveBrush",value:function(e,t=!1){if(!this.brushEl)return;const n=e?[this.props.scale(e[0]),this.props.scale(e[1])]:null;this.rangeSelectionMoved=!0,this.rangeSelectionMovedEnd=!0,t?this.brushEl.transition().call(this.brushBehavior.move,n):this.brushEl.call(this.brushBehavior.move,n)}},{key:"removeBrush",value:function(){this.brushElAddedBefore&&(this.brushElAddedBefore.call(this.brushBehavior.move,null),this.brushElAddedBefore.on(".brush",null),this.brushElAddedBefore=void 0,this.props.onRangeSelectionReset())}},{key:"render",value:function(){const e=this.props.tracks.map((e=>e.width)).reduce(ib,0),t=this.props.tracks.map((e=>wb(e))).reduce(Kg,!1),n=gH[this.props.isRangeSelectionActive?"track-range-selection-active":"track-range-selection"];return m.default.createElement("div",{className:kte},t&&m.default.createElement("svg",{ref:e=>{this.brushEl=Be(e)},className:n,style:{height:this.props.height,width:e},xmlns:"http://www.w3.org/2000/svg"}),m.default.createElement(O0,{axis:"x",className:gl(DH.list,DH.stylizedList,DH.horizontalList),component:U0,editable:this.props.editable,handleConfigTrack:this.props.handleConfigTrack,handleResizeTrack:this.props.handleResizeTrack,height:this.props.height,helperClass:DH.stylizedHelper,itemClass:gl(DH.stylizedItem,DH.horizontalItem),itemControlAlignLeft:this.props.tracksControlAlignLeft,itemReactClass:Ste,items:this.props.tracks.map((e=>({configMenuVisible:e.uid===this.props.configTrackMenuId,uid:e.uid||Ns.nice(),height:this.props.height,width:e.width,value:e.value}))),onAddSeries:this.props.onAddSeries,onCloseTrack:this.props.onCloseTrack,onCloseTrackMenuOpened:this.props.onCloseTrackMenuOpened,onConfigTrackMenuOpened:this.props.onConfigTrackMenuOpened,onSortEnd:this.props.handleSortEnd,referenceAncestor:this.props.referenceAncestor,resizeHandles:this.props.resizeHandles,useDragHandle:!0,width:e}))}}]),n}(m.default.Component);Cte.propTypes={configTrackMenuId:S.exports.string,editable:S.exports.bool,handleConfigTrack:S.exports.func,handleResizeTrack:S.exports.func,handleSortEnd:S.exports.func,is1dRangeSelection:S.exports.bool,isRangeSelectionActive:S.exports.bool,height:S.exports.number,onAddSeries:S.exports.func,onCloseTrack:S.exports.func,onCloseTrackMenuOpened:S.exports.func,onConfigTrackMenuOpened:S.exports.func,onRangeSelection:S.exports.func,onRangeSelectionEnd:S.exports.func,onRangeSelectionReset:S.exports.func,onRangeSelectionStart:S.exports.func,rangeSelection:S.exports.array,rangeSelectionEnd:S.exports.bool,referenceAncestor:S.exports.func,resizeHandles:S.exports.object,scale:S.exports.func,tracks:S.exports.array,tracksControlAlignLeft:S.exports.bool};let Ite=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"render",value:function(){const e=Tte(this.props.tracks,this.handleItemMouseEnter.bind(this),this.handleMouseLeave.bind(this)),t=this.props.customItems?m.default.Children.map(this.props.customItems,(e=>m.default.cloneElement(e,{onMouseEnter:e=>{this.handleOtherMouseEnter(e)}}))):null;return m.default.createElement("div",{ref:e=>{this.div=e},className:gl(yh["context-menu"],{[yh["context-menu-dark"]]:this.props.theme===Pf}),"data-menu-type":"ViewContextMenu",style:{left:this.state.left,top:this.state.top}},t,t&&m.default.createElement("hr",{className:yh["context-menu-hr"]}),e,e&&m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:()=>this.props.onAddTrack({type:"horizontal-rule",y:this.props.coords[1],position:"whole"}),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Add Horizontal Rule"),m.default.createElement(Th,{onClick:()=>this.props.onAddTrack({type:"vertical-rule",x:this.props.coords[0],position:"whole"}),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Add Vertical Rule"),m.default.createElement(Th,{onClick:()=>this.props.onAddTrack({type:"cross-rule",x:this.props.coords[0],y:this.props.coords[1],position:"whole"}),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Add Cross Rule"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),this.hasMatrixTrack(this.props.tracks)&&m.default.createElement(Th,{onClick:this.handleAddHorizontalSection.bind(this),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Add Horizontal Cross Section"),this.hasMatrixTrack(this.props.tracks)&&m.default.createElement(Th,{onClick:this.handleAddVerticalSection.bind(this),onMouseEnter:e=>this.handleOtherMouseEnter(e)},"Add Vertical Cross Section"),this.getSubmenu())}},{key:"hasMatrixTrack",value:function(e){return hb(this.props.tracks).filter((e=>"heatmap"===e.type)).length>0}},{key:"handleAddHorizontalSection",value:function(){const e=hb(this.props.tracks).filter((e=>"heatmap"===e.type))[0];this.props.onAddTrack({type:"horizontal-rule",y:this.props.coords[1],position:"whole"}),this.props.onAddTrack({data:{type:"horizontal-section",server:e.server,tilesetUid:e.tilesetUid,slicePos:this.props.coords[1]},options:{valueScaling:"log"},type:"horizontal-bar",height:30,position:"top"})}},{key:"handleAddVerticalSection",value:function(){const e=hb(this.props.tracks).filter((e=>"heatmap"===e.type))[0];this.props.onAddTrack({type:"vertical-rule",x:this.props.coords[0],position:"whole"}),this.props.onAddTrack({data:{type:"vertical-section",server:e.server,tilesetUid:e.tilesetUid,slicePos:this.props.coords[0]},options:{valueScaling:"log"},type:"vertical-bar",height:30,position:"left"})}}]),n}(l$(gte).with(_te));Ite.propTypes={coords:S.exports.array,customItems:S.exports.array};let Ote=function(e){i(n,e);var t=o(n);function n(e){var r;d(this,n),(r=t.call(this,e)).closing=!1;const{tracks:i}=r.props;return r.canvasElement=null,r.tracksByUidInit={},[...r.props.tracks.top||[],...r.props.tracks.right||[],...r.props.tracks.bottom||[],...r.props.tracks.left||[],...r.props.tracks.gallery||[],...r.props.tracks.center||[]].forEach((e=>{"combined"===e.type?e.contents.forEach((e=>{r.tracksByUidInit[e.uid]=!1})):r.tracksByUidInit[e.uid]=!1})),r.xScale=null,r.yScale=null,r.addUidsToTracks(i),r.trackToReplace=null,r.trackRenderer=null,r.configTrackMenu=null,r.state={sizeMeasured:!1,height:10,width:10,tracks:i,init:!1,addTrackPosition:null,customDialog:null,mouseOverOverlayUid:null,forceUpdate:0,rangeSelection:[null,null],rangeSelectionEnd:!1,chromInfo:null,defaultChromSizes:null,contextMenuCustomItems:null,contextMenuPosition:null,addDivisorDialog:null},r.reset=!0,window.higlassTracksByType&&Object.keys(window.higlassTracksByType).forEach((e=>{rm[e]=window.higlassTracksByType[e].config})),r.topHeight=0,r.bottomHeight=0,r.leftWidth=0,r.rightWidth=0,r.centerHeight=0,r.centerWidth=0,r.dragTimeout=null,r.previousPropsStr="",r.contextMenuHandlerBound=r.contextMenuHandler.bind(a(r)),r.handleNoTrackAddedBound=r.handleNoTrackAdded.bind(a(r)),r.handleTracksAddedBound=r.handleTracksAdded.bind(a(r)),r.closeMenusBound=r.closeMenus.bind(a(r)),r.handleAddDivisorBound=r.handleAddDivisor.bind(a(r)),r.handleAddSeriesBound=r.handleAddSeries.bind(a(r)),r.handleChangeTrackDataBound=r.handleChangeTrackData.bind(a(r)),r.handleChangeTrackTypeBound=r.handleChangeTrackType.bind(a(r)),r.handleCloseTrackBound=r.handleCloseTrack.bind(a(r)),r.handleConfigureTrackBound=r.handleConfigureTrack.bind(a(r)),r.handleExportTrackDataBound=r.handleExportTrackData.bind(a(r)),r.handleLockValueScaleBound=r.handleLockValueScale.bind(a(r)),r.handleReplaceTrackBound=r.handleReplaceTrack.bind(a(r)),r.handleTrackOptionsChangedBound=r.handleTrackOptionsChanged.bind(a(r)),r.handleUnlockValueScaleBound=r.handleUnlockValueScale.bind(a(r)),r.onAddTrack=r.handleAddTrack.bind(a(r)),r}return f(n,[{key:"waitForDOMAttachment",value:function(e){if(!this.mounted)return;const t=g.default.findDOMNode(this);document.body.contains(t)?e():requestAnimationFrame((()=>this.waitForDOMAttachment(e)))}},{key:"componentDidMount",value:function(){this.mounted=!0,this.element=g.default.findDOMNode(this),this.canvasElement=g.default.findDOMNode(this.props.canvasElement),this.waitForDOMAttachment((()=>{Bu.ElementQueries.listen(),this.resizeSensor=new Bu.ResizeSensor(this.element.parentNode,this.measureSize.bind(this)),this.measureSize()})),this.addEventListeners(),this.pubSubs=[],this.pubSubs.push(this.props.pubSub.subscribe("contextmenu",this.contextMenuHandlerBound))}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this.addUidsToTracks(e.tracks),this.setState({tracks:e.tracks})}},{key:"shouldComponentUpdate",value:function(e,t){const n=this.previousPropsStr,r=this.updatablePropsToString(e),i=JSON.stringify(this.state),o=JSON.stringify(t),a=n!==r||i!==o||this.props.chooseTrackHandler!==e.chooseTrackHandler||this.props.customDialog!==e.customDialog;a&&(this.previousPropsStr=r);const s=this.numTracks;return this.numTracks=0,_g(this.props.tracks,(()=>this.numTracks++)),this.reset=this.reset||0===s&&this.numTracks>0,this.numTracks||(this.tracksByUidInit={}),a}},{key:"UNSAFE_componentWillUpdate",value:function(){}},{key:"componentDidUpdate",value:function(e,t){if(t.rangeSelection!==this.state.rangeSelection){let e=[null,null];this.state.defaultChromSizes&&this.state.rangeSelection.every((e=>e&&e.length))&&(e=this.state.rangeSelection.map((e=>um(...e,this.state.defaultChromSizes)))),this.props.onRangeSelection({dataRange:this.state.rangeSelection,genomicRange:e})}if(this.state.customDialog||this.props.customDialog){const e=this.state.customDialog||this.props.customDialog;if(e.length>0){const t=[],n=[];e.forEach((e=>{t.push(e.bodyComponent),n.push(e.bodyProps)})),this.props.modal.open(m.default.createElement(mte,{children:t,bodyProps:n,onCancel:this.props.closeCustomDialog,title:e[0].title}))}}if(e.tracks.center,this.props.tracks.center,(this.state.addTrackPosition||this.props.addTrackPosition)&&this.props.modal.open(m.default.createElement(fte,{host:this.state.addTrackHost,onCancel:this.handleNoTrackAddedBound,onTracksChosen:this.handleTracksAddedBound,position:this.state.addTrackPosition||this.props.addTrackPosition,trackSourceServers:this.props.trackSourceServers})),this.state.addDivisorDialog){const e=this.state.addDivisorDialog;this.props.modal.open(m.default.createElement(fte,{datatype:rm[e.type].datatype[0],host:this.state.addTrackHost,onCancel:()=>{this.setState({addDivisorDialog:null})},onTracksChosen:t=>{this.handleDivisorChosen(e,t)},trackSourceServers:this.props.trackSourceServers}))}}},{key:"componentWillUnmount",value:function(){this.closing=!0,this.removeEventListeners(),this.pubSubs.forEach((e=>this.props.pubSub.unsubscribe(e)))}},{key:"addUidsToTracks",value:function(e){Object.keys(e).forEach((t=>{e[t].forEach((e=>{e.uid=e.uid||Ns.nice()}))}))}},{key:"contextMenuHandler",value:function(e){if(!this.divTiledPlot)return;const t=this.divTiledPlot.getBoundingClientRect();if(!Dg(e.clientX,e.clientY,t.left,t.left+t.width,t.top,t.top+t.height))return;const n=[e.clientX,e.clientY],r=Ge(e,this.divTiledPlot),i=this.trackRenderer.zoomedXScale.invert(r[0]),o=this.trackRenderer.zoomedYScale.invert(r[1]);let a=null;e.hgCustomItems&&(a=e.hgCustomItems.map((e=>m.default.createElement(Th,{key:e.key,onClick:e.onClick},e.text)))),this.setState({contextMenuCustomItems:a,contextMenuPosition:{left:n[0],top:n[1],canvasLeft:r[0]+this.trackRenderer.xPositionOffset,canvasTop:r[1]+this.trackRenderer.yPositionOffset},contextMenuDataX:i,contextMenuDataY:o})}},{key:"measureSize",value:function(){this.element.clientWidth>0&&this.element.clientHeight>0&&this.setState({sizeMeasured:!0,width:this.element.clientWidth,height:this.element.clientHeight})}},{key:"handleTrackOptionsChanged",value:function(e,t){return this.props.onTrackOptionsChanged(e,t)}},{key:"handleScalesChanged",value:function(e,t){this.xScale=e,this.yScale=t,this.props.onScalesChanged(e,t)}},{key:"handleTilesetInfoReceived",value:function(e,t){const n=vg(this.props.tracks,e);n?(this.tracksByUidInit[n.uid]=!0,this.checkAllTilesetInfoReceived(),n.options||(n.options={}),n.name=t.name,n.maxWidth=t.max_width,n.transforms=t.transforms,n.aggregationModes=t.aggregation_modes,n.header=t.header,n.binsPerDimension=t.bins_per_dimension,t.resolutions?(n.maxZoom=t.resolutions.length-1,n.resolutions=t.resolutions):n.maxZoom=t.max_zoom,n.coordSystem=t.coordSystem,n.datatype=t.datatype):console.warn("Strange, track not found:",e)}},{key:"checkAllTilesetInfoReceived",value:function(){if(this.state.init&&!this.reset||!this.trackRenderer||!this.props.zoomToDataExtentOnInit())return;const e=Object.keys(this.trackRenderer.trackDefObjects).map((e=>{const t=this.trackRenderer.trackDefObjects[e].trackObject;return t.childTracks?t.childTracks:t})).reduce(((e,t)=>e.concat(t)),[]).filter((({tilesetInfo:e})=>void 0!==e&&!0!==e)),t=Object.values(this.tracksByUidInit).filter((e=>e)).length;e.length===t&&(this.setState({init:!0}),this.reset=!1,this.handleZoomToData())}},{key:"handleOverlayMouseEnter",value:function(e){this.setState({mouseOverOverlayUid:e})}},{key:"handleOverlayMouseLeave",value:function(e){e===this.state.mouseOverOverlayUid&&this.setState({mouseOverOverlayUid:null})}},{key:"handleTrackPositionChosen",value:function(e){this.setState({mouseOverOverlayUid:null}),this.props.chooseTrackHandler(e.track.uid)}},{key:"handleNoTrackAdded",value:function(){this.trackToReplace=null,this.props.onNoTrackAdded(),this.setState({addTrackPosition:null,addTrackHost:null})}},{key:"handleAddDivisor",value:function(e){this.setState({addDivisorDialog:e})}},{key:"handleDivisorChosen",value:function(e,t){this.setState({addDivisorDialog:null});const n=e.data?{server:e.data.server,tilesetUid:e.data.tilesetUid}:{server:e.server,tilesetUid:e.tilesetUid},r={server:t[0].server,tilesetUid:t[0].uuid};this.handleChangeTrackData(e.uid,{type:"divided",children:[n,r]})}},{key:"handleDivideSeries",value:function(e){}},{key:"handleAddSeries",value:function(e){const t=Eg(this.props.tracks,e),n=vg(this.props.tracks,e);this.setState({addTrackPosition:t,addTrackHost:n})}},{key:"handleReplaceTrack",value:function(e,t){this.trackToReplace=e,this.handleAddTrack(t)}},{key:"handleAddTrack",value:function(e){this.setState({addTrackPosition:e,addTrackHost:null})}},{key:"handleResizeTrack",value:function(e,t,n){const{tracks:r}=this.state;for(const i in r){const o=r[i].filter((t=>t.uid===e));o.length>0&&(o[0].width=t,o[0].height=n)}this.setState({tracks:r,forceUpdate:Math.random()}),this.props.onResizeTrack()}},{key:"closeMenus",value:function(){this.setState({closeTrackMenuId:null,configTrackMenuId:null,contextMenuPosition:null,contextMenuCustomItems:null})}},{key:"handleLockValueScale",value:function(e){this.closeMenus(),this.props.onLockValueScale(e)}},{key:"handleUnlockValueScale",value:function(e){this.closeMenus(),this.props.onUnlockValueScale(e)}},{key:"handleCloseTrack",value:function(e){this.closeMenus(),this.props.onCloseTrack(e)}},{key:"handleChangeTrackType",value:function(e,t){this.closeMenus(),this.props.onChangeTrackType(e,t)}},{key:"handleChangeTrackData",value:function(e,t){this.closeMenus(),this.props.onChangeTrackData(e,t)}},{key:"handleTracksAdded",value:function(e,t,n){return this.trackToReplace&&(this.handleCloseTrack(this.trackToReplace),this.trackToReplace=null),this.props.onTracksAdded(e,t,n),this.setState({addTrackPosition:null,addTrackHost:null}),e}},{key:"handleCloseTrackMenuOpened",value:function(e,t){this.setState({closeTrackMenuId:e,closeTrackMenuLocation:t})}},{key:"handleCloseContextMenu",value:function(){this.setState({contextMenuCustomItems:null,contextMenuPosition:null,contextMenuDataX:null,contextMenuDataY:null})}},{key:"handleCloseTrackMenuClosed",value:function(){this.setState({closeTrackMenuId:null})}},{key:"handleConfigTrackMenuOpened",value:function(e,t){this.closeMenus(),this.setState({configTrackMenuId:e,configTrackMenuLocation:t})}},{key:"handleConfigureTrack",value:function(e,t){this.setState({configTrackMenuId:null,trackOptions:{track:e,configComponent:t}}),this.closeMenus()}},{key:"handleSortEnd",value:function(e){this.setState((t=>{const n=t.tracks,r={};for(let t=0;t{t[n]&&t[n].forEach((t=>{t.contents&&t.contents.forEach((e=>{e.position=n})),t.position=n,e.push({track:t,location:n})}))})),e}},{key:"calculateTrackPosition",value:function(e,t){let n=this.props.paddingTop,r=this.props.paddingBottom,i=this.props.paddingLeft,o=this.props.paddingRight,a=this.centerWidth,s=e.height,l=0,c=0;switch(t){case"top":i+=this.leftWidth;for(let t=0;te.includes&&e.includes.length)).map((t=>{const n=t.type?`overlay-${t.type}-track`:"overlay-track",r={...t,uid:t.uid||Ns.nice(),includes:t.includes,type:n,options:Object.assign(t.options,{orientationsAndPositions:t.includes.map((t=>{const n=vg(this.props.tracks,t);if(!n)return console.warn(`OverlayTrack included uid (${t}) not found in the track list`),null;const r=Eg(this.props.tracks,n.uid);let i;if("top"!==r&&"bottom"!==r||(i="1d-horizontal"),"left"!==r&&"right"!==r||(i="1d-vertical"),"center"===r&&(i="2d"),!i)return console.warn("Only top, bottom, left, right, or center tracks can be overlaid at the moment"),null;const o=e.filter((e=>e.track.uid===t));return o.length?{orientation:i,position:{left:o[0].left-this.props.paddingLeft,top:o[0].top-this.props.paddingTop,width:o[0].width,height:o[0].height}}:null})).filter((e=>e))})};return{top:this.props.paddingTop,left:this.props.paddingLeft,width:this.leftWidth+this.centerWidth+this.rightWidth,height:this.topHeight+this.centerHeight+this.bottomHeight+this.props.marginTop+this.props.marginBottom,track:r}})):[]}},{key:"positionedTracks",value:function(){return this.createTracksAndLocations().map((({track:e,location:t})=>this.calculateTrackPosition(e,t)))}},{key:"createTrackPositionTexts",value:function(){const e=this.positionedTracks();return this.createTracksAndLocations(),e.map((e=>{const{track:t}=e;return m.default.createElement("div",{key:t.uid,style:{left:e.left,top:e.top,width:e.width,height:e.height,position:"absolute"}},t.uid.slice(0,2))}))}},{key:"handleExportTrackData",value:function(e,t){const n=vg(this.props.tracks,t);let r=null;e!==t?r=this.trackRenderer.trackDefObjects[e].trackObject.createdTracks[n.uid]:({trackObject:r}=this.trackRenderer.trackDefObjects[e]),r.exportData(),this.closeMenus()}},{key:"listTracksAtPosition",value:function(e,t,n=!1){const r=[];if(!this.trackRenderer)return[];for(const i in this.trackRenderer.trackDefObjects){const o=this.trackRenderer.trackDefObjects[i].trackObject;if(o.respondsToPosition(e,t))if(n){if(this.props.tracks.center)if(this.props.tracks.center.contents)for(let e=0;er[t]&&(r[t]=e.tilesetInfo.max_pos[t]);const o=this.trackRenderer.currentProps.paddingLeft+this.trackRenderer.currentProps.leftWidth;let a=[o,o+this.trackRenderer.currentProps.centerWidth].map(this.trackRenderer.zoomTransform.rescaleX(this.trackRenderer.xScale).invert);const s=this.trackRenderer.currentProps.paddingTop+this.trackRenderer.currentProps.topHeight;let l=[s,s+this.trackRenderer.currentProps.centerHeight].map(this.trackRenderer.zoomTransform.rescaleY(this.trackRenderer.yScale).invert);this.trackRenderer.zoomTransform.k=1,this.trackRenderer.zoomTransform.x=0,this.trackRenderer.zoomTransform.y=0,this.trackRenderer.applyZoomTransform(),n[0]Number.MIN_SAFE_INTEGER&&(a=[n[0],r[0]]),n[1]Number.MIN_SAFE_INTEGER&&(l=[n[1],r[1]]),this.props.onDataDomainChanged(a,l)}},{key:"resetViewport",value:function(){this.trackRenderer.zoomTransform.k=1,this.trackRenderer.zoomTransform.x=0,this.trackRenderer.zoomTransform.y=0,this.trackRenderer.applyZoomTransform(),this.props.onDataDomainChanged(this.props.initialXDomain,this.props.initialYDomain)}},{key:"updatablePropsToString",value:function(e){return JSON.stringify({tracks:e.tracks,overlays:e.overlays,viewOptions:e.viewOptions,uid:e.uid,addTrackPosition:e.addTrackPosition,editable:e.editable,marginTop:e.marginTop,marginBottom:e.marginBottom,marginLeft:e.marginLeft,marginRight:e.marginRight,paddingTop:e.paddingTop,paddingBottom:e.paddingBottom,paddingLeft:e.paddingLeft,paddingRight:e.paddingRight,mouseTool:e.mouseTool,initialXDomain:e.initialXDomain,initialYDomain:e.initialYDomain,trackSourceServers:e.trackSourceServers,zoomable:e.zoomable,draggingHappening:e.draggingHappening})}},{key:"getXYScales",value:function(){this.trackRenderer&&(this.xScale=this.trackRenderer.currentXScale,this.yScale=this.trackRenderer.currentYScale)}},{key:"rangeViewToDataLoci",value:function(e,t){return t?[parseInt(t.invert(e[0]),10),parseInt(t.invert(e[1]),10)]:[null,null]}},{key:"rangeSelectionResetHandler",value:function(){this.state.rangeSelectionMaster&&this.setState({is1dRangeSelection:null,rangeSelection:[null,null],rangeSelectionMaster:null,rangeSelectionEnd:!1})}},{key:"rangeSelection1dEndHandler",value:function(e){this.xScale&&this.yScale||this.getXYScales();const t="x"===e?this.xScale:this.yScale;return n=>{this.setState((r=>{const i=r.is1dRangeSelection?[null,null]:r.rangeSelection.slice(),o=this.state.is1dRangeSelection||"y"!==e?0:1;let a=this.rangeViewToDataLoci(n,t);const s=a[1]-a[0];if(this.props.rangeSelection1dSize[0]>s){const e=a[0]+s/2;a=[e-this.props.rangeSelection1dSize[0]/2,e+this.props.rangeSelection1dSize[0]/2]}else if(this.props.rangeSelection1dSize[1]Math.round(e)))),{rangeSelection:i,rangeSelectionEnd:!0}}))}}},{key:"rangeSelection1dHandler",value:function(e){this.xScale&&this.yScale||this.getXYScales();const t="x"===e?this.xScale:this.yScale;return n=>{this.setState((r=>{const i=r.is1dRangeSelection?[null,null]:r.rangeSelection.slice();return i[r.is1dRangeSelection||"y"!==e?0:1]=this.rangeViewToDataLoci(n,t),{rangeSelection:i,rangeSelectionEnd:!1}}))}}},{key:"rangeSelection1dStartHandler",value:function(){this.state.rangeSelectionMaster||this.setState({is1dRangeSelection:!0,rangeSelectionMaster:!0,rangeSelectionEnd:!1})}},{key:"rangeSelection2dHandler",value:function(e){this.xScale&&this.yScale||this.getXYScales(),this.setState({rangeSelection:[this.rangeViewToDataLoci(e[0],this.xScale),this.rangeViewToDataLoci(e[1],this.yScale)],rangeSelectionEnd:!1})}},{key:"rangeSelection2dStartHandler",value:function(){this.state.rangeSelectionMaster||this.setState({is1dRangeSelection:!1,rangeSelectionMaster:!0,rangeSelectionEnd:!1})}},{key:"rangeSelection2dEndHandler",value:function(e){this.xScale&&this.yScale||this.getXYScales();const t=this.rangeViewToDataLoci(e[0],this.xScale),n=this.rangeViewToDataLoci(e[1],this.yScale);let r=[t,n];const i=[t[1]-t[0],n[1]-n[0]];r.forEach(((e,t)=>{if(this.props.rangeSelection1dSize[0]>i[t]){const n=e[0]+Math.round(i[t]/2);e[0]=n-this.props.rangeSelection1dSize[0]/2,e[1]=n+this.props.rangeSelection1dSize[0]/2}else if(this.props.rangeSelection1dSize[1]e.map((e=>Math.round(e)))))),this.setState({rangeSelection:r,rangeSelectionEnd:!0})}},{key:"getContextMenu",value:function(){if(this.state.contextMenuPosition){const e=this.listTracksAtPosition(this.state.contextMenuPosition.canvasLeft,this.state.contextMenuPosition.canvasTop);return m.default.createElement(wte,{onMenuClosed:this.closeMenusBound},m.default.createElement(Ite,{closeMenu:this.closeMenusBound,coords:[this.state.contextMenuDataX,this.state.contextMenuDataY],customItems:this.state.contextMenuCustomItems,onAddDivisor:this.handleAddDivisorBound,onAddSeries:this.handleAddSeriesBound,onAddTrack:e=>{this.props.onTracksAdded([e],e.position,null),this.handleCloseContextMenu()},onChangeTrackData:this.handleChangeTrackDataBound,onChangeTrackType:this.handleChangeTrackTypeBound,onCloseTrack:this.handleCloseTrackBound,onConfigureTrack:this.handleConfigureTrackBound,onExportData:this.handleExportTrackDataBound,onLockValueScale:this.handleLockValueScaleBound,onReplaceTrack:this.handleReplaceTrackBound,onTrackOptionsChanged:this.handleTrackOptionsChangedBound,onUnlockValueScale:this.handleUnlockValueScaleBound,orientation:"right",position:this.state.contextMenuPosition,theme:this.props.theme,tracks:e,trackSourceServers:this.props.trackSourceServers}))}return null}},{key:"getIdealizedTrackPositionsOverlay",value:function(){const e=this.props.draggingHappening,t=e.datatype;if(!(t in om)&&!e.defaultTracks)return void console.warn("unknown data type:",e.higlassTrack);const n={"1d-horizontal":["top","bottom","left","right"],"2d":["center"],"1d-vertical":["left","right"]},r=om[t]||{};if(e.defaultTracks)for(const t of e.defaultTracks)if(rm[t])for(const e of n[rm[t].orientation])r[e]=t;else console.warn("unknown track type",t);const i=new Set(["top","left","right","center","bottom"].filter((e=>e in this.state.tracks&&this.state.tracks[e].length))),o="top"in r,a="left"in r,s="right"in r,l="bottom"in r,c="center"in r,u="center"in r||i.has("left")||i.has("right")||i.has("center"),h="top"in r,d="bottom"in r&&u,p="left"in r&&u,f="right"in r&&u,g=Object.keys(r).length&&("center"in r||u),b=m.default.createElement("div",{style:{flexGrow:1}}),v=m.default.cloneElement(b),y=m.default.createElement("div",{style:{display:"flex",flexGrow:1}},h&&(g||p)?b:null,m.default.createElement(kH,{defaultTrackType:r.top,draggingHappening:this.props.draggingHappening,enabled:o,onTrackDropped:e=>this.handleTracksAdded([e],"top"),style:{border:"1px solid black",flexGrow:1}}),h&&(g||p)?v:null),T=m.default.createElement("div",{style:{display:"flex",flexGrow:1}},h&&(g||p)?b:null,m.default.createElement(kH,{defaultTrackType:r.bottom,draggingHappening:this.props.draggingHappening,enabled:l,onTrackDropped:e=>this.handleTracksAdded([e],"bottom"),style:{border:"1px solid black",flexGrow:1}}),h&&(g||p)?v:null),_=m.default.createElement(kH,{defaultTrackType:r.left,draggingHappening:this.props.draggingHappening,enabled:a,onTrackDropped:e=>this.handleTracksAdded([e],"left"),style:{border:"1px solid black",flexGrow:1}}),E=m.default.createElement(kH,{defaultTrackType:r.center,draggingHappening:this.props.draggingHappening,enabled:c,onTrackDropped:e=>this.handleTracksAdded([e],"center"),position:"center",style:{border:"1px solid black",flexGrow:1}}),x=m.default.cloneElement(_,{defaultTrackType:r.right,enabled:s,onTrackDropped:e=>this.handleTracksAdded([e],"right")});return m.default.createElement("div",{style:{position:"absolute",left:"0px",top:"0px",width:this.state.width,height:this.state.height}},m.default.createElement("div",{style:{position:"absolute",width:this.state.width,height:this.state.height,background:"white",opacity:.4}}),m.default.createElement("div",{style:{width:this.state.width,height:this.state.height,position:"absolute",display:"flex",flexDirection:"column"}},h?y:null,u&&m.default.createElement("div",{style:{display:"flex",height:h||d?"40%":"100%",width:"100%"}},p?_:null,g?E:null,f?x:null),d?T:null))}},{key:"render",value:function(){this.galleryDim=this.props.tracks.gallery?this.props.tracks.gallery.map((e=>e.height)).reduce(ib,0):0,this.topHeightNoGallery=this.props.tracks.top.map((e=>e.height)).reduce(ib,0),this.topHeight=this.topHeightNoGallery+this.galleryDim,this.bottomHeightNoGallery=this.props.tracks.bottom.map((e=>e.height)).reduce(ib,0),this.bottomHeight=this.bottomHeightNoGallery+this.galleryDim,this.leftWidthNoGallery=this.props.tracks.left.map((e=>e.width)).reduce(ib,0),this.leftWidth=this.leftWidthNoGallery+this.galleryDim,this.rightWidthNoGallery=this.props.tracks.right.map((e=>e.width)).reduce(ib,0),this.rightWidth=this.rightWidthNoGallery+this.galleryDim;const e=this.props.paddingTop+this.props.paddingBottom,t=this.props.paddingLeft+this.props.paddingRight;this.centerHeight=Math.max(0,this.state.height-this.topHeight-this.bottomHeight-e),this.centerWidth=Math.max(0,this.state.width-this.leftWidth-this.rightWidth-t);const n="none",r=m.default.createElement("div",{className:"top-track-container",style:{left:this.leftWidth+this.props.paddingLeft,top:this.props.paddingTop,width:this.centerWidth,height:this.topHeightNoGallery,outline:n,position:"absolute"}},m.default.createElement(G0,{configTrackMenuId:this.state.configTrackMenuId,editable:this.props.editable,handleConfigTrack:this.handleConfigTrackMenuOpened.bind(this),handleResizeTrack:this.handleResizeTrack.bind(this),handleSortEnd:this.handleSortEnd.bind(this),is1dRangeSelection:this.state.is1dRangeSelection,isRangeSelectionActive:this.props.mouseTool===kf,onAddSeries:this.handleAddSeries.bind(this),onCloseTrack:this.handleCloseTrack.bind(this),onCloseTrackMenuOpened:this.handleCloseTrackMenuOpened.bind(this),onConfigTrackMenuOpened:this.handleConfigTrackMenuOpened.bind(this),onRangeSelection:this.rangeSelection1dHandler("x").bind(this),onRangeSelectionEnd:this.rangeSelection1dEndHandler("x").bind(this),onRangeSelectionReset:this.rangeSelectionResetHandler.bind(this),onRangeSelectionStart:this.rangeSelection1dStartHandler.bind(this),rangeSelection:this.state.rangeSelection,rangeSelectionEnd:this.state.rangeSelectionEnd,resizeHandles:new Set(["bottom"]),scale:this.xScale,tracks:this.props.tracks.top,width:this.centerWidth})),i=m.default.createElement("div",{className:"left-track-container",style:{left:this.props.paddingLeft,top:this.topHeight+this.props.paddingTop,width:this.leftWidthNoGallery,height:this.centerHeight,outline:n,position:"absolute"}},m.default.createElement(Cte,{configTrackMenuId:this.state.configTrackMenuId,editable:this.props.editable,handleConfigTrack:this.handleConfigTrackMenuOpened.bind(this),handleResizeTrack:this.handleResizeTrack.bind(this),handleSortEnd:this.handleSortEnd.bind(this),height:this.centerHeight,is1dRangeSelection:this.state.is1dRangeSelection,isRangeSelectionActive:this.props.mouseTool===kf,onAddSeries:this.handleAddSeries.bind(this),onCloseTrack:this.handleCloseTrack.bind(this),onCloseTrackMenuOpened:this.handleCloseTrackMenuOpened.bind(this),onConfigTrackMenuOpened:this.handleConfigTrackMenuOpened.bind(this),onRangeSelection:this.rangeSelection1dHandler("y").bind(this),onRangeSelectionEnd:this.rangeSelection1dEndHandler("y").bind(this),onRangeSelectionReset:this.rangeSelectionResetHandler.bind(this),onRangeSelectionStart:this.rangeSelection1dStartHandler.bind(this),rangeSelection:this.state.rangeSelection,rangeSelectionEnd:this.state.rangeSelectionEnd,resizeHandles:new Set(["right"]),scale:this.yScale,tracks:this.props.tracks.left})),o=m.default.createElement("div",{className:"right-track-container",style:{right:this.props.paddingRight,top:this.topHeight+this.props.paddingTop,width:this.rightWidthNoGallery,height:this.centerHeight,outline:n,position:"absolute"}},m.default.createElement(Cte,{configTrackMenuId:this.state.configTrackMenuId,editable:this.props.editable,handleConfigTrack:this.handleConfigTrackMenuOpened.bind(this),handleResizeTrack:this.handleResizeTrack.bind(this),handleSortEnd:this.handleSortEnd.bind(this),height:this.centerHeight,is1dRangeSelection:this.state.is1dRangeSelection,isRangeSelectionActive:this.props.mouseTool===kf,onAddSeries:this.handleAddSeries.bind(this),onCloseTrack:this.handleCloseTrack.bind(this),onCloseTrackMenuOpened:this.handleCloseTrackMenuOpened.bind(this),onConfigTrackMenuOpened:this.handleConfigTrackMenuOpened.bind(this),onRangeSelection:this.rangeSelection1dHandler("y").bind(this),onRangeSelectionEnd:this.rangeSelection1dEndHandler("y").bind(this),onRangeSelectionReset:this.rangeSelectionResetHandler.bind(this),onRangeSelectionStart:this.rangeSelection1dStartHandler.bind(this),rangeSelection:this.state.rangeSelection,rangeSelectionEnd:this.state.rangeSelectionEnd,resizeHandles:new Set(["left"]),scale:this.yScale,tracks:this.props.tracks.right,tracksControlAlignLeft:!0})),a=m.default.createElement("div",{className:"bottom-track-container",style:{left:this.leftWidth+this.props.paddingLeft,bottom:this.props.paddingBottom,width:this.centerWidth,height:this.bottomHeightNoGallery,outline:n,position:"absolute"}},m.default.createElement(G0,{configTrackMenuId:this.state.configTrackMenuId,editable:this.props.editable,handleConfigTrack:this.handleConfigTrackMenuOpened.bind(this),handleResizeTrack:this.handleResizeTrack.bind(this),handleSortEnd:this.handleSortEnd.bind(this),is1dRangeSelection:this.state.is1dRangeSelection,isRangeSelectionActive:this.props.mouseTool===kf,onAddSeries:this.handleAddSeries.bind(this),onCloseTrack:this.handleCloseTrack.bind(this),onCloseTrackMenuOpened:this.handleCloseTrackMenuOpened.bind(this),onConfigTrackMenuOpened:this.handleConfigTrackMenuOpened.bind(this),onRangeSelection:this.rangeSelection1dHandler("x").bind(this),onRangeSelectionEnd:this.rangeSelection1dEndHandler("x").bind(this),onRangeSelectionReset:this.rangeSelectionResetHandler.bind(this),onRangeSelectionStart:this.rangeSelection1dStartHandler.bind(this),rangeSelection:this.state.rangeSelection,rangeSelectionEnd:this.state.rangeSelectionEnd,resizeHandles:new Set(["top"]),scale:this.xScale,tracks:this.props.tracks.bottom,width:this.centerWidth})),s=m.default.createElement("div",{key:"galleryTracksDiv",className:"gallery-track-container",style:{left:this.leftWidthNoGallery+this.props.paddingLeft,top:this.topHeightNoGallery+this.props.paddingTop,width:this.centerWidth+2*this.galleryDim,height:this.centerHeight+2*this.galleryDim,outline:n,position:"absolute"}},m.default.createElement(NH,{configTrackMenuId:this.state.configTrackMenuId,editable:this.props.editable,height:this.centerHeight+2*this.galleryDim,onAddSeries:this.handleAddSeries.bind(this),onCloseTrack:this.handleCloseTrack.bind(this),onCloseTrackMenuOpened:this.handleCloseTrackMenuOpened.bind(this),onConfigTrackMenuOpened:this.handleConfigTrackMenuOpened.bind(this),tracks:this.props.tracks.gallery,width:this.centerWidth+2*this.galleryDim}));let l=m.default.createElement("div",{className:["center-track-container",mH["center-track-container"]].join(" "),style:{left:this.leftWidth+this.props.paddingLeft,top:this.topHeight+this.props.paddingTop,width:this.centerWidth,height:this.bottomHeight,outline:n}});this.props.tracks.center.length&&(l=m.default.createElement("div",{className:["center-track-container",mH["center-track-container"]].join(" "),style:{left:this.leftWidth+this.props.paddingLeft,top:this.topHeight+this.props.paddingTop,width:this.centerWidth,height:this.centerHeight,outline:n}},m.default.createElement(yH,{configTrackMenuId:this.state.configTrackMenuId,editable:this.props.editable,height:this.centerHeight,is1dRangeSelection:this.state.is1dRangeSelection,isRangeSelectionActive:this.props.mouseTool===kf,onAddSeries:this.handleAddSeries.bind(this),onCloseTrackMenuOpened:this.handleCloseTrackMenuOpened.bind(this),onConfigTrackMenuOpened:this.handleConfigTrackMenuOpened.bind(this),onRangeSelectionReset:this.rangeSelectionResetHandler.bind(this),onRangeSelectionStart:this.rangeSelection2dStartHandler.bind(this),onRangeSelectionX:this.rangeSelection1dHandler("x").bind(this),onRangeSelectionXEnd:this.rangeSelection1dEndHandler("x").bind(this),onRangeSelectionXY:this.rangeSelection2dHandler.bind(this),onRangeSelectionXYEnd:this.rangeSelection2dEndHandler.bind(this),onRangeSelectionY:this.rangeSelection1dHandler("y").bind(this),onRangeSelectionYEnd:this.rangeSelection1dEndHandler("y").bind(this),rangeSelection:this.state.rangeSelection,rangeSelectionEnd:this.state.rangeSelectionEnd,scaleX:this.xScale,scaleY:this.yScale,tracks:this.props.tracks.center,uid:this.props.tracks.center[0].uid,width:this.centerWidth}))),this.createTrackPositionTexts();let c=this.positionedTracks();c=c.concat(this.overlayTracks(c));let u=null;this.state.sizeMeasured&&(u=m.default.createElement(lte,{ref:e=>{this.trackRenderer=e,this.checkAllTilesetInfoReceived()},canvasElement:this.canvasElement,centerHeight:this.centerHeight,centerWidth:this.centerWidth,disableTrackMenu:this.props.disableTrackMenu,dragging:this.props.dragging,galleryDim:this.galleryDim,getLockGroupExtrema:this.props.getLockGroupExtrema,height:this.state.height,initialXDomain:this.props.initialXDomain,initialYDomain:this.props.initialYDomain,isRangeSelection:this.props.mouseTool===kf,isShowGlobalMousePosition:this.props.isShowGlobalMousePosition,isValueScaleLocked:this.props.isValueScaleLocked,leftWidth:this.leftWidth,leftWidthNoGallery:this.leftWidthNoGallery,metaTracks:this.props.metaTracks,onMouseMoveZoom:this.props.onMouseMoveZoom,onNewTilesLoaded:this.props.onNewTilesLoaded,onScalesChanged:this.handleScalesChanged.bind(this),onTilesetInfoReceived:this.handleTilesetInfoReceived.bind(this),onTrackOptionsChanged:this.handleTrackOptionsChanged.bind(this),onValueScaleChanged:this.props.onValueScaleChanged,paddingLeft:this.props.paddingLeft,paddingTop:this.props.paddingTop,pixiRenderer:this.props.pixiRenderer,pixiStage:this.props.pixiStage,pluginDataFetchers:this.props.pluginDataFetchers,pluginTracks:this.props.pluginTracks,positionedTracks:c,registerDraggingChangedListener:this.props.registerDraggingChangedListener,removeDraggingChangedListener:this.props.removeDraggingChangedListener,setCentersFunction:this.props.setCentersFunction,svgElement:this.props.svgElement,topHeight:this.topHeight,topHeightNoGallery:this.topHeightNoGallery,uid:this.props.uid,viewOptions:this.props.viewOptions,width:this.state.width,xDomainLimits:this.props.xDomainLimits,yDomainLimits:this.props.yDomainLimits,zoomable:this.props.zoomable,zoomLimits:this.props.zoomLimits},r,i,o,a,s,l));let h=null,d=null;this.state.configTrackMenuId&&(h=m.default.createElement(wte,{onMenuClosed:this.closeMenusBound},m.default.createElement(Ete,{ref:e=>{this.configTrackMenu=e},closeMenu:this.closeMenusBound,onAddDivisor:this.handleAddDivisorBound,onAddSeries:this.handleAddSeriesBound,onAddTrack:this.handleAddTrackBound,onChangeTrackType:this.handleChangeTrackTypeBound,onCloseTrack:this.handleCloseTrackBound,onConfigureTrack:this.handleConfigureTrackBound,onExportData:this.handleExportTrackDataBound,onLockValueScale:this.handleLockValueScaleBound,onReplaceTrack:this.handleReplaceTrackBound,onTrackOptionsChanged:this.handleTrackOptionsChangedBound,onUnlockValueScale:this.handleUnlockValueScaleBound,position:this.state.configTrackMenuLocation,theme:this.props.theme,trackOrientation:Eg(this.props.tracks,this.state.configTrackMenuId),tracks:[vg(this.props.tracks,this.state.configTrackMenuId)]}))),this.state.closeTrackMenuId&&(d=m.default.createElement(wte,{onMenuClosed:this.handleCloseTrackMenuClosed.bind(this)},m.default.createElement(gte,{position:this.state.closeTrackMenuLocation,theme:this.props.theme},m.default.createElement(xte,{onCloseTrack:this.handleCloseTrack.bind(this),tracks:[vg(this.props.tracks,this.state.closeTrackMenuId)]}))));let p=null;this.props.chooseTrackHandler&&(p=c.filter((e=>"whole"!==e.track.position)).map((e=>{let t="transparent",n="none";return this.state.mouseOverOverlayUid===e.track.uid&&(t="yellow",n="1px solid black"),m.default.createElement("div",{key:e.track.uid,className:"tiled-plot-track-overlay",onClick:()=>this.handleTrackPositionChosen(e),onDragEnter:t=>{this.handleOverlayMouseEnter(e.track.uid),t.preventDefault()},onDragLeave:()=>this.handleOverlayMouseLeave(e.track.uid),onDragOver:e=>e.preventDefault(),onDrop:()=>this.handleTrackPositionChosen(e),onMouseEnter:()=>this.handleOverlayMouseEnter(e.track.uid),onMouseLeave:()=>this.handleOverlayMouseLeave(e.track.uid),style:{position:"absolute",left:e.left,top:e.top,width:e.width,height:e.height,background:t,opacity:.4,border:n,zIndex:1}})})));let f=null;if(this.xScale&&this.yScale&&this.props.editable&&this.state.trackOptions){const e=this.state.trackOptions.configComponent,t=this.state.trackOptions.track;f=m.default.createElement(e,{track:t,xScale:this.xScale,yScale:this.yScale,onCancel:()=>{this.setState({trackOptions:null})},onTrackOptionsChanged:e=>e,onSubmit:e=>{this.handleTrackOptionsChanged(this.state.trackOptions.track.uid,e),this.setState({trackOptions:null})}})}return m.default.createElement("div",{ref:e=>{this.divTiledPlot=e},className:["tiled-plot-div",DH["tiled-plot"]].join(" "),style:{marginBottom:this.props.marginBottom,marginLeft:this.props.marginLeft,marginRight:this.props.marginRight,marginTop:this.props.marginTop}},u,p,h,d,f,this.getContextMenu(),this.props.draggingHappening&&this.getIdealizedTrackPositionsOverlay())}},{key:"addEventListeners",value:function(){this.eventListeners=[],this.eventListeners.forEach((e=>document.addEventListener(e.name,e.callback,!1)))}},{key:"removeEventListeners",value:function(){this.eventListeners.forEach((e=>document.removeEventListener(e.name,e.callback)))}}]),n}(m.default.Component);Ote.defaultProps={isShowGlobalMousePosition:!1,pluginDataFetchers:{},pluginTracks:{},metaTracks:[],zoomable:!0},Ote.propTypes={addTrackPosition:S.exports.string,canvasElement:S.exports.object,chooseTrackHandler:S.exports.func,chromInfoPath:S.exports.string,disableTrackMenu:S.exports.bool,dragging:S.exports.bool,draggingHappening:S.exports.bool,editable:S.exports.bool,getLockGroupExtrema:S.exports.func,initialXDomain:S.exports.array,initialYDomain:S.exports.array,isShowGlobalMousePosition:S.exports.bool,isValueScaleLocked:S.exports.func,marginBottom:S.exports.number.isRequired,marginLeft:S.exports.number.isRequired,marginRight:S.exports.number.isRequired,marginTop:S.exports.number.isRequired,paddingBottom:S.exports.number.isRequired,paddingLeft:S.exports.number.isRequired,paddingRight:S.exports.number.isRequired,paddingTop:S.exports.number.isRequired,metaTracks:S.exports.array,modal:S.exports.object,mouseTool:S.exports.string,onCloseTrack:S.exports.func,onChangeTrackData:S.exports.func,onChangeTrackType:S.exports.func,onDataDomainChanged:S.exports.func,onLockValueScale:S.exports.func,onMouseMoveZoom:S.exports.func,onNewTilesLoaded:S.exports.func,onNoTrackAdded:S.exports.func,onRangeSelection:S.exports.func.isRequired,onScalesChanged:S.exports.func,onTrackOptionsChanged:S.exports.func,onTrackPositionChosen:S.exports.func,onTracksAdded:S.exports.func,onUnlockValueScale:S.exports.func,onValueScaleChanged:S.exports.func,onResizeTrack:S.exports.func,overlays:S.exports.array,openModal:S.exports.func,pixiRenderer:S.exports.object,pixiStage:S.exports.object,pluginDataFetchers:S.exports.object,pluginTracks:S.exports.object,pubSub:S.exports.object.isRequired,rangeSelection1dSize:S.exports.array,rangeSelectionToInt:S.exports.bool,registerDraggingChangedListener:S.exports.func,removeDraggingChangedListener:S.exports.func,setCentersFunction:S.exports.func,svgElement:S.exports.object,theme:S.exports.symbol.isRequired,tracks:S.exports.object,trackSourceServers:S.exports.array,uid:S.exports.string,viewOptions:S.exports.object,xDomainLimits:S.exports.array,yDomainLimits:S.exports.array,zoomable:S.exports.bool,zoomLimits:S.exports.array,zoomToDataExtentOnInit:S.exports.func};const Dte=xH(e1(eH(Ote)));var Pte={exports:{}},Nte=Object.assign||function(e){for(var t=1;t0?!0===o?ine.scrollTop(t,v.top+y.top):!1===o?ine.scrollTop(t,v.top+T.top):y.top<0?ine.scrollTop(t,v.top+y.top):ine.scrollTop(t,v.top+T.top):i||((o=void 0===o||!!o)?ine.scrollTop(t,v.top+y.top):ine.scrollTop(t,v.top+T.top)),r&&(y.left<0||T.left>0?!0===a?ine.scrollLeft(t,v.left+y.left):!1===a?ine.scrollLeft(t,v.left+T.left):y.left<0?ine.scrollLeft(t,v.left+y.left):ine.scrollLeft(t,v.left+T.left):i||((a=void 0===a||!!a)?ine.scrollLeft(t,v.left+y.left):ine.scrollLeft(t,v.left+T.left)))};!function(e){e.exports=one}(Pte);const ane=y(Pte.exports),sne=[];let lne=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={highlightedIndex:null,menuTop:0,menuLeft:0,menuWidth:0,isOpen:!1},r.keyDownHandlers={ArrowDown(e){e.preventDefault();const t=this.getFilteredItems().length;if(!t)return;const{highlightedIndex:n}=this.state,r=null===n||n===t-1?0:n+1;this._performAutoCompleteOnKeyUp=!0,this.setState({highlightedIndex:r,isOpen:!0})},ArrowUp(e){e.preventDefault();const t=this.getFilteredItems().length;if(!t)return;const{highlightedIndex:n}=this.state,r=0===n||null===n?t-1:n-1;this._performAutoCompleteOnKeyUp=!0,this.setState({highlightedIndex:r,isOpen:!0})},Enter(e){if(!1===this.state.isOpen);else if(null===this.state.highlightedIndex)this.setState({isOpen:!1},(()=>{this.inputEl.select()}));else{e.preventDefault();const t=this.getFilteredItems()[this.state.highlightedIndex],n=this.props.getItemValue(t);this.setState({isOpen:!1,highlightedIndex:null},(()=>{this.inputEl.setSelectionRange(n.length,n.length),this.props.onSelect(n,t)}))}},Escape(){this.setState({highlightedIndex:null,isOpen:!1})}},r}return f(n,[{key:"getInitialState",value:function(){return{isOpen:!1,highlightedIndex:null}}},{key:"UNSAFE_componentWillMount",value:function(){this._ignoreBlur=!1,this._performAutoCompleteOnUpdate=!1,this._performAutoCompleteOnKeyUp=!1}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){this._performAutoCompleteOnUpdate=!0,(this.props.items!==e.items||this.state.highlightedIndex>=e.items.length)&&this.setState({highlightedIndex:null})}},{key:"componentDidUpdate",value:function(e,t){!0===this.state.isOpen&&!1===t.isOpen&&this.setMenuPositions(),this.state.isOpen&&this._performAutoCompleteOnUpdate&&(this._performAutoCompleteOnUpdate=!1,this.maybeAutoCompleteText()),this.maybeScrollItemIntoView(),t.isOpen!==this.state.isOpen&&this.props.onMenuVisibilityChange(this.state.isOpen,this.inputEl)}},{key:"maybeScrollItemIntoView",value:function(){if(!0===this.state.isOpen&&null!==this.state.highlightedIndex){const e=this.refs[`item-${this.state.highlightedIndex}`],t=this.refs.menu;e&&ane(l.findDOMNode(e),l.findDOMNode(t),{onlyScrollIfNeeded:!0})}}},{key:"handleKeyDown",value:function(e){this.keyDownHandlers[e.key]?this.keyDownHandlers[e.key].call(this,e):this.setState({highlightedIndex:null,isOpen:!0})}},{key:"handleChange",value:function(e){this._performAutoCompleteOnKeyUp=!0,this.props.onChange(e,e.target.value)}},{key:"handleKeyUp",value:function(){this._performAutoCompleteOnKeyUp&&(this._performAutoCompleteOnKeyUp=!1,this.maybeAutoCompleteText())}},{key:"getFilteredItems",value:function(){let e=this.props.items;return this.props.shouldItemRender&&(e=e.filter((e=>this.props.shouldItemRender(e,this.props.value)))),this.props.sortItems&&e.sort(((e,t)=>this.props.sortItems(e,t,this.props.value))),e}},{key:"maybeAutoCompleteText",value:function(){if(!this.props.autoHighlight||""===this.props.value)return;const{highlightedIndex:e}=this.state,t=this.getFilteredItems();if(0===t.length)return;const n=null!==e?t[e]:t[0];0===this.props.getItemValue(n).toLowerCase().indexOf(this.props.value.toLowerCase())&&null===e&&this.setState({highlightedIndex:0})}},{key:"setMenuPositions",value:function(){const e=this.inputEl,t=e.getBoundingClientRect(),n=globalThis.window.getComputedStyle(e),r=parseInt(n.marginBottom,10)||0,i=parseInt(n.marginLeft,10)||0,o=parseInt(n.marginRight,10)||0;this.setState({menuTop:t.bottom+r,menuLeft:t.left+i,menuWidth:t.width+i+o})}},{key:"highlightItemFromMouse",value:function(e){this.setState({highlightedIndex:e})}},{key:"selectItemFromMouse",value:function(e){const t=this.props.getItemValue(e);this.setState({isOpen:!1,highlightedIndex:null},(()=>{this.props.onSelect(t,e),this.inputEl.focus()}))}},{key:"setIgnoreBlur",value:function(e){this._ignoreBlur=e}},{key:"renderMenu",value:function(){const e=this.getFilteredItems().map(((e,t)=>{const n=this.props.renderItem(e,this.state.highlightedIndex===t,{cursor:"default"});return m.default.cloneElement(n,{onMouseDown:()=>this.setIgnoreBlur(!0),onMouseEnter:()=>this.highlightItemFromMouse(t),onClick:()=>this.selectItemFromMouse(e),ref:`item-${t}`})})),t={left:this.state.menuLeft,top:this.state.menuTop,minWidth:this.state.menuWidth};if(!e.length)return null;const n=this.props.renderMenu(e,this.props.value,t);return m.default.cloneElement(n,{ref:"menu"})}},{key:"handleInputBlur",value:function(){this.props.onFocus&&this.props.onFocus(),this._ignoreBlur||this.setState({isOpen:!1,highlightedIndex:null})}},{key:"handleInputFocus",value:function(){this.props.onFocus&&this.props.onFocus(!0),this._ignoreBlur?this.setIgnoreBlur(!1):(this._ignoreClick=!0,this.setState({isOpen:!0}))}},{key:"isInputFocused",value:function(){return this.inputEl.ownerDocument&&this.inputEl===this.inputEl.ownerDocument.activeElement}},{key:"handleInputClick",value:function(){this.isInputFocused()&&!1===this.state.isOpen?this.setState({isOpen:!0}):null===this.state.highlightedIndex||this._ignoreClick||this.selectItemFromMouse(this.getFilteredItems()[this.state.highlightedIndex]),this._ignoreClick=!1}},{key:"composeEventHandlers",value:function(e,t){return t?n=>{e(n),t(n)}:e}},{key:"render",value:function(){this.props.debug&&sne.push({id:sne.length,state:this.state});const{inputProps:e}=this.props;return m.default.createElement("div",{style:{...this.props.wrapperStyle},...this.props.wrapperProps},m.default.createElement("input",{...e,ref:e=>{this.inputEl=e},"aria-autocomplete":"list",autoComplete:"off",onBlur:this.composeEventHandlers(this.handleInputBlur.bind(this),e.onBlur&&e.onBlur.bind(this)),onChange:this.handleChange.bind(this),onClick:this.composeEventHandlers(this.handleInputClick.bind(this),e.onClick&&e.onClick.bind(this)),onFocus:this.composeEventHandlers(this.handleInputFocus.bind(this),e.onFocus&&e.onFocus.bind(this)),onKeyDown:this.composeEventHandlers(this.handleKeyDown.bind(this),e.onKeyDown&&e.onKeyDown.bind(this)),onKeyUp:this.composeEventHandlers(this.handleKeyUp.bind(this),e.onKeyUp&&e.onKeyUp.bind(this)),role:"combobox",value:this.props.value}),("open"in this.props?this.props.open:this.state.isOpen)&&this.renderMenu(),this.props.debug&&m.default.createElement("pre",{style:{marginLeft:300}},JSON.stringify(sne.slice(sne.length-5,sne.length),null,2)))}}]),n}(m.default.Component);lne.defaultProps={value:"",wrapperProps:{},wrapperStyle:{display:"inline-block"},inputProps:{},onChange(){},onSelect(){},renderMenu(e,t,n){return m.default.createElement("div",{style:{...n,...this.menuStyle}},e)},shouldItemRender:()=>!0,menuStyle:{borderRadius:"3px",boxShadow:"0 2px 12px rgba(0, 0, 0, 0.1)",background:"rgba(255, 255, 255, 0.9)",padding:"2px 0",fontSize:"90%",position:"fixed",overflow:"auto",maxHeight:"50%"},autoHighlight:!0,onMenuVisibilityChange(){}},lne.propTypes={autoHighlight:S.exports.bool,debug:S.exports.bool,getItemValue:S.exports.func.isRequired,inputProps:S.exports.object,items:S.exports.array,menuStyle:S.exports.object,onChange:S.exports.func,onFocus:S.exports.func,onMenuVisibilityChange:S.exports.func,onSelect:S.exports.func,open:S.exports.bool,renderItem:S.exports.func.isRequired,renderMenu:S.exports.func,shouldItemRender:S.exports.func,sortItems:S.exports.func,value:S.exports.any,wrapperProps:S.exports.object,wrapperStyle:S.exports.object};const cne="_genome-position-search_1l2sx_1",une="_genome-position-search-focus_1l2sx_2",hne="_genome-position-search-bar_1l2sx_16",dne="_genome-position-search-dark_1l2sx_34",pne="_genome-position-search-bar-button_1l2sx_38",fne="_genome-position-search-bar-suggestions_1l2sx_83";let mne=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).mounted=!1,r.uid=Ns.nice(),r.chromInfo=null,r.searchField=null,r.autocompleteMenu=null,r.xScale=null,r.yScale=null,r.prevParts=[],r.props.registerViewportChangedListener(r.scalesChanged.bind(a(r))),r.menuPosition={left:0,top:0},r.positionText="chr4:190,998,876-191,000,255",r.state={genes:[],isFocused:!1,autocompleteServer:r.props.autocompleteServer,autocompleteId:r.props.autocompleteId,availableAssemblies:[],selectedAssembly:null},r.styles={item:{padding:"2px 6px",cursor:"default"},highlightedItem:{color:"white",background:"hsl(200, 50%, 50%)",padding:"2px 6px",cursor:"default"},menu:{border:"solid 1px #ccc"}},r.availableAutocompletes={},r.props.autocompleteId&&(r.availableAutocompletes[r.props.chromInfoId]=new Set([{server:r.props.autocompleteServer,acId:r.props.autocompleteId}])),r.availableChromSizes={},r}return f(n,[{key:"componentDidMount",value:function(){this.mounted=!0,Be(this.autocompleteMenu.inputEl).on("keypress",this.autocompleteKeyPress.bind(this)),this.findAvailableAutocompleteSources(),this.findAvailableChromSizes(),this.props.chromInfoPath&&(this.searchPosition=!0,Uq(this.props.chromInfoPath,(e=>{e?(this.chromInfo=e,this.searchField=new jq(this.chromInfo),this.setPositionText()):this.searchPosition=null}))),this.setPositionText()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.props.removeViewportChangedListener()}},{key:"onAutocompleteChange",value:function(e,t){this.positionText=t,this.setState({value:t,loading:!0}),this.changedPart=null;const n=t.split(/ /);let r=0;const i=[];let o=!1;for(let e=0;e{if(e)this.setState({loading:!1,genes:[]});else if(this.changedPart>0&&!o){const e=`${this.state.autocompleteServer}/suggest/?d=${this.state.autocompleteId}&ac=${i[this.changedPart-1].toLowerCase()}-${i[this.changedPart].toLowerCase()}`;mg.json(e,((e,n)=>{e?this.setState({loading:!1,genes:t}):this.setState({loading:!1,genes:n.concat(t)})}),this.props.pubSub)}else this.setState({loading:!1,genes:t})}),this.props.pubSub)}}},{key:"setAvailableAssemblies",value:function(){const e=new Set(mm(this.availableChromSizes)),t=new Set([...e]);this.gpsbForm&&this.setState({availableAssemblies:[...t]})}},{key:"setSelectedAssembly",value:function(e){if(!this.mounted)return;if(!this.availableChromSizes[e])return;const t=[...this.availableChromSizes[e]][0];this.setState({autocompleteServer:t.server});const{server:n}=t;if(this.availableAutocompletes[e]){const t=[...this.availableAutocompletes[e]][0].acId;this.props.onSelectedAssemblyChanged(e,t,n),this.gpsbForm&&this.setState({autocompleteId:t})}else this.props.onSelectedAssemblyChanged(e,null,n),this.gpsbForm&&this.setState({autocompleteId:null});this.fetchChromInfo(t.uuid,t.server)}},{key:"setPositionText",value:function(){if(!this.mounted)return;if(!this.searchField)return;const e=this.searchField.scalesToPositionText(this.xScale,this.yScale,this.props.twoD);this.prevParts=e.split(/[ -]/),this.gpsbForm&&(this.positionText=e,this.origPositionText=e,this.autocompleteMenu.inputEl.value=e)}},{key:"scalesChanged",value:function(e,t){this.xScale=e,this.yScale=t,this.setPositionText()}},{key:"findAvailableChromSizes",value:function(){this.props.trackSourceServers&&this.props.trackSourceServers.forEach((e=>{mg.json(`${e}/available-chrom-sizes/`,((t,n)=>{t?console.error(t):(n.results.forEach((t=>{t.coordSystem in this.availableChromSizes||(this.availableChromSizes[t.coordSystem]=new Set),this.availableChromSizes[t.coordSystem].add({server:e,uuid:t.uuid}),this.setAvailableAssemblies()})),this.searchField||this.fetchChromInfo(this.props.chromInfoId in this.availableChromSizes?[...this.availableChromSizes[this.props.chromInfoId]][0].uuid:this.props.chromInfoId,this.props.chromInfoId in this.availableChromSizes?[...this.availableChromSizes[this.props.chromInfoId]][0].server:this.props.chromInfoServer))}),this.props.pubSub)}))}},{key:"findAvailableAutocompleteSources",value:function(){this.props.trackSourceServers&&this.props.trackSourceServers.forEach((e=>{mg.json(`${e}/tilesets/?limit=100&dt=gene-annotation`,((t,n)=>{t?console.error(t):(n.results.forEach((t=>{t.coordSystem in this.availableAutocompletes||(this.availableAutocompletes[t.coordSystem]=new Set),this.availableAutocompletes[t.coordSystem].add({server:e,acId:t.uuid}),this.setAvailableAssemblies()})),this.state.autocompleteId||this.gpsbForm&&this.availableAutocompletes[this.props.chromInfoId]&&this.setState({autocompleteId:[...this.availableAutocompletes[this.props.chromInfoId]][0].acId}))}),this.props.pubSub)}))}},{key:"fetchChromInfo",value:function(e,t){Uq(`${t}/chrom-sizes/?id=${e}`,(n=>{n&&(mg.json(`${t}/tileset_info/?d=${e}`,((t,n)=>{t||this.gpsbForm&&this.setState({selectedAssembly:n[e].coordSystem})}),this.props.pubSub),this.chromInfo=n,this.searchField=new jq(this.chromInfo),this.setPositionText())}),this.props.pubSub)}},{key:"autocompleteKeyPress",value:function(e){13===e.keyCode&&this.buttonClick()}},{key:"genePositionToSearchBarText",value:function(e){}},{key:"replaceGenesWithLoadedPositions",value:function(e){const t=this.positionText,n=t.split(" ");let r=!1;for(let t=0;to;){const t=i.slice(o,a).join("-");if(e[t.toLowerCase()]){const n=e[t.toLowerCase()],l=Math.floor((n.txEnd-n.txStart)/4);0===o&&a{if(t){const n={};for(let e=0;econsole.error(e)))}},{key:"buttonClick",value:function(){this.setState({genes:[]}),this.replaceGenesWithPositions((e=>{const t=this.positionText;if(null!==this.searchField){const n=this.searchField.searchPosition(t),r=n[0];let i=n[1];if(!r)return void this.setPositionText();if(r&&(Number.isNaN(+r[0])||Number.isNaN(+r[1]))||i&&(Number.isNaN(+i[0])||Number.isNaN(+i[1])))return;i||(i=r);const o=this.xScale.copy().domain(r),a=this.yScale.copy().domain(i),[s,l,c]=tb(o,a);e&&this.props.onGeneSearch({geneSymbol:e,range:r,centerX:s,centerY:l}),this.props.setCenters(s,l,c,1e3)}}))}},{key:"searchFieldSubmit",value:function(){this.buttonClick()}},{key:"pathJoin",value:function(e,t){const n=t||"/",r=new RegExp(`${n}{1,}`,"g");return e.join(n).replace(r,n)}},{key:"geneSelected",value:function(e,t){const n=this.positionText.split(" ");let r=this.changedPart;for(let e=0;ei.length-1)){if(i[r]=t.geneName,2===o.length&&r>0&&i[r-1].toLowerCase()===o[0].toLowerCase()){const t=i.slice(0,r-1);t.push(o.join("-")),rm.default.createElement("option",{key:e,value:e},e)));return m.default.createElement("div",{ref:e=>{this.gpsbForm=e},className:gl({[une]:this.state.isFocused,[cne]:!this.state.isFocused,[dne]:this.props.theme===Pf})},!this.props.hideAvailableAssemblies&&m.default.createElement("select",{ref:e=>{this.assemblyPickButton=e},className:pne,id:this.uid,onChange:this.handleAssemblySelectEvt.bind(this),value:this.state.selectedAssembly||void 0},e),m.default.createElement(lne,{ref:e=>{this.autocompleteMenu=e},getItemValue:e=>e.geneName,inputProps:{className:hne,title:"Current location: enter a symbol or location to change the position of the current view"},items:this.state.genes,menuStyle:{position:"absolute",left:this.menuPosition.left,top:this.menuPosition.top,border:"1px solid black"},onChange:this.onAutocompleteChange.bind(this),onFocus:this.focusHandler.bind(this),onMenuVisibilityChange:this.handleMenuVisibilityChange.bind(this),onSelect:(e,t)=>this.geneSelected(e,t),onSubmit:this.searchFieldSubmit.bind(this),renderItem:(e,t)=>m.default.createElement("div",{key:e.refseqid,id:e.refseqid,style:t?this.styles.highlightedItem:this.styles.item},e.geneName),renderMenu:this.handleRenderMenu.bind(this),value:this.state.selectedAssembly?this.positionText:"No valid assembly selected",wrapperStyle:{width:"100%"}}),m.default.createElement(Qf,{onClick:this.buttonClick.bind(this),theStyle:"multitrack-header-icon"}))}}]),n}(m.default.Component);mne.propTypes={autocompleteId:S.exports.string,autocompleteServer:S.exports.string,chromInfoId:S.exports.string,chromInfoServer:S.exports.string,hideAvailableAssemblies:S.exports.bool,isFocused:S.exports.bool,pubSub:S.exports.object,onFocus:S.exports.func,onGeneSearch:S.exports.func,onSelectedAssemblyChanged:S.exports.func,registerViewportChangedListener:S.exports.func,removeViewportChangedListener:S.exports.func,setCenters:S.exports.func,theme:S.exports.symbol.isRequired,trackSourceServers:S.exports.array,twoD:S.exports.bool};const gne=xH(eH(mne)),bne="_export-link-dialog-wrapper_p9gxw_1";let vne=function(e){i(n,e);var t=o(n);function n(){return d(this,n),t.apply(this,arguments)}return f(n,[{key:"render",value:function(){return m.default.createElement(h1,{okayOnly:!0,okayTitle:"Done",onOkay:this.props.onDone,title:"Share view link"},m.default.createElement("div",{className:bne},m.default.createElement("input",{ref:e=>{e&&(this.input=e,e.focus(),e.select())},onClick:e=>{e.target.select()},placeholder:"Generating the link...",readOnly:!0,value:this.props.url}),m.default.createElement($0,{onClick:e=>{this.input.select(),document.execCommand("copy")}},"Copy")))}}]),n}(m.default.Component);vne.defaultProps={onDone:()=>{},url:""},vne.propTypes={onDone:S.exports.func,url:S.exports.string};let yne=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).state={submenuShown:!1},r}return f(n,[{key:"getConfigureViewMenu",value:function(e,t){const n=["backgroundColor"],r={},i={};for(const e of n)if(e in Object.keys(Jee)&&(r[e]={name:Jee[e].name},Jee[e].inlineOptions))for(const t in Jee[e].inlineOptions){const n=Jee[e].inlineOptions[t];r[e].children||(r[e].children={});const o={name:n.name,value:n.value};o.handler=()=>{i[e]=n.value,this.props.onOptionsChanged(i)},r[e].children[t]=o}return m.default.createElement(bte,{key:"config-series-menu",closeMenu:this.props.closeMenu,menuItems:r,orientation:this.state.orientation,parentBbox:t,position:e,theme:this.props.theme})}},{key:"getSubmenu",value:function(){if(this.state.submenuShown){const e=this.state.submenuSourceBbox,t="left"===this.state.orientation?{left:this.state.left,top:e.top}:{left:this.state.left+e.width+7,top:e.top};return"options"===this.state.submenuShown.option?this.getConfigureViewMenu(t,e):m.default.createElement("div",null)}return m.default.createElement("div",null)}},{key:"render",value:function(){return m.default.createElement("div",{ref:e=>{this.div=e},className:gl(yh["context-menu"],{[yh["context-menu-dark"]]:this.props.theme===Pf}),"data-menu-type":"ConfigViewMenu",style:{left:this.state.left,top:this.state.top}},m.default.createElement(Th,{onClick:e=>this.props.onTogglePositionSearchBox(e)},"Toggle position search box"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:e=>this.props.onZoomToData(e)},"Zoom to data extent"),m.default.createElement(Th,{onClick:e=>this.props.onClearView(e)},"Clear View"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:e=>this.props.onYankZoom(e)},"Take zoom from"),m.default.createElement(Th,{onClick:e=>this.props.onYankLocation(e)},"Take location from"),m.default.createElement(Th,{onClick:e=>this.props.onYankZoomAndLocation(e)},"Take zoom and location from"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:this.props.onLockZoom},"Lock zoom with"),m.default.createElement(Th,{onClick:this.props.onLockLocation},"Lock location with"),m.default.createElement(Th,{onClick:this.props.onLockZoomAndLocation},"Lock zoom and location with"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:this.props.onTakeAndLockZoomAndLocation},"Take and lock zoom and location with"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:e=>this.props.onUnlockZoom(e)},"Unlock zoom"),m.default.createElement(Th,{onClick:e=>this.props.onUnlockLocation(e)},"Unlock location"),m.default.createElement(Th,{onClick:e=>this.props.onUnlockZoomAndLocation(e)},"Unlock zoom and location"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:e=>this.props.onProjectViewport(e)},"Show this viewport on"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:e=>this.props.onEditViewConfig(e)},"Edit view config"),m.default.createElement("hr",{className:yh["context-menu-hr"]}),m.default.createElement(Th,{onClick:()=>this.props.onExportSVG()},"Export views as SVG"),m.default.createElement(Th,{onClick:()=>this.props.onExportPNG()},"Export views as PNG"),m.default.createElement(Th,{onClick:()=>this.props.onExportViewAsJSON()},"Export views as JSON"),m.default.createElement(Th,{onClick:()=>this.props.onExportViewAsLink()},"Export views as Link"),this.getSubmenu())}}]),n}(gte);yne.propTypes={onEditViewConfig:S.exports.func.isRequired,onExportSVG:S.exports.func,onExportPNG:S.exports.func,onExportViewAsJSON:S.exports.func,onExportViewAsLink:S.exports.func,onLockLocation:S.exports.func,onLockZoom:S.exports.func,onLockZoomAndLocation:S.exports.func,onProjectViewport:S.exports.func,onTakeAndLockZoomAndLocation:S.exports.func,onTogglePositionSearchBox:S.exports.func,onUnlockLocation:S.exports.func,onUnlockZoom:S.exports.func,onUnlockZoomAndLocation:S.exports.func,onYankLocation:S.exports.func,onYankZoom:S.exports.func,onYankZoomAndLocation:S.exports.func,onZoomToData:S.exports.func,theme:S.exports.symbol};const Tne="_add-track-position-table_wdy5w_1",_ne="_add-track-position-table-dark_wdy5w_7",Ene="_add-track-position-other_wdy5w_11",xne="_add-track-position-top-center_wdy5w_15",wne="_add-track-position-middle-left_wdy5w_30",Sne="_add-track-position-middle-right_wdy5w_45",kne="_add-track-position-middle-middle_wdy5w_60",Ane="_add-track-position-bottom-middle_wdy5w_71",Cne="_add-track-position-span_wdy5w_86";function Ine(e){return m.default.createElement("div",null,m.default.createElement("div",{className:Cne},"Add Track..."),m.default.createElement("table",{className:gl(Tne,{[_ne]:e.theme===Pf})},m.default.createElement("tbody",null,m.default.createElement("tr",{style:{height:"30px"}},m.default.createElement("td",{className:Ene}),m.default.createElement("td",{className:xne,onClick:()=>e.onTrackPositionChosen("top")},"top"),m.default.createElement("td",{className:Ene})),m.default.createElement("tr",{style:{height:"80px"}},m.default.createElement("td",{className:wne,onClick:()=>e.onTrackPositionChosen("left")},"left"),m.default.createElement("td",{className:kne,onClick:()=>e.onTrackPositionChosen("center")},"center"),m.default.createElement("td",{className:Sne,onClick:()=>e.onTrackPositionChosen("right")},"right")),m.default.createElement("tr",{style:{height:"30px"}},m.default.createElement("td",{className:Ene}),m.default.createElement("td",{className:Ane,onClick:()=>e.onTrackPositionChosen("bottom")},"bottom"),m.default.createElement("td",{className:Ene})))))}Ine.propTypes={onTrackPositionChosen:S.exports.func.isRequired,theme:S.exports.symbol.isRequired};const One=eH(Ine);let Dne=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).configImg=null,r.plusImg=null,r.state={addTrackPositionMenuUid:null,addTrackPositionMenuPosition:null,configMenuUid:null,configMenuPosition:null,isFocused:!1,width:-1},r.handleTrackPositionChosenBound=r.handleTrackPositionChosen.bind(a(r)),r}return f(n,[{key:"componentDidMount",value:function(){this.setState({width:this.el.clientWidth})}},{key:"checkWidth",value:function(){const e=this.el.clientWidth;e!==this.state.width&&this.setState({width:e})}},{key:"handleConfigMenuOpened",value:function(e){this.setState({configMenuUid:e,configMenuPosition:this.configImg.getBoundingClientRect()})}},{key:"handleAddTrackPositionMenuOpened",value:function(e){this.setState({addTrackPositionMenuUid:e,addTrackPositionMenuPosition:this.plusImg.getBoundingClientRect()})}},{key:"handleTrackPositionChosen",value:function(e){this.props.onTrackPositionChosen(e),this.setState({addTrackPositionMenuUid:null,addTrackPositionMenuPosition:null})}},{key:"render",value:function(){let e=null,t=null;this.state.addTrackPositionMenuPosition&&(t=m.default.createElement(wte,{onMenuClosed:()=>{this.setState({addTrackPositionMenuUid:null,addTrackPositionMenuPosition:null})}},m.default.createElement(gte,{orientation:"left",position:this.state.addTrackPositionMenuPosition,theme:this.props.theme},m.default.createElement(One,{onTrackPositionChosen:this.handleTrackPositionChosenBound})))),this.state.configMenuUid&&(e=m.default.createElement(wte,{onMenuClosed:()=>this.setState({configMenuUid:null})},m.default.createElement(yne,{onClearView:()=>{this.setState({configMenuUid:null}),this.props.onClearView()},onEditViewConfig:()=>{this.setState({configMenuUid:null}),this.props.onEditViewConfig(this.state.configMenuUid)},onExportPNG:()=>{this.setState({configMenuUid:null}),this.props.onExportPNG()},onExportSVG:()=>{this.setState({configMenuUid:null}),this.props.onExportSVG()},onExportViewAsJSON:()=>{this.setState({configMenuUid:null}),this.props.onExportViewsAsJSON()},onExportViewAsLink:()=>{this.setState({configMenuUid:null}),this.props.onExportViewsAsLink()},onLockLocation:()=>{this.setState({configMenuUid:null}),this.props.onLockLocation(this.state.configMenuUid)},onLockZoom:()=>{this.setState({configMenuUid:null}),this.props.onLockZoom(this.state.configMenuUid)},onLockZoomAndLocation:()=>{this.setState({configMenuUid:null}),this.props.onLockZoomAndLocation(this.state.configMenuUid)},onOptionsChanged:e=>{this.props.onViewOptionsChanged(e),this.setState({configMenuUid:null})},onProjectViewport:()=>{this.setState({configMenuUid:null}),this.props.onProjectViewport(this.state.configMenuUid)},onTakeAndLockZoomAndLocation:()=>{this.setState({configMenuUid:null}),this.props.onTakeAndLockZoomAndLocation(this.state.configMenuUid)},onTogglePositionSearchBox:()=>{this.setState({configMenuUid:null}),this.props.onTogglePositionSearchBox(this.state.configMenuUid)},onUnlockLocation:()=>{this.setState({configMenuUid:null}),this.props.onUnlockLocation(this.state.configMenuUid)},onUnlockZoom:()=>{this.setState({configMenuUid:null}),this.props.onUnlockZoom(this.state.configMenuUid)},onUnlockZoomAndLocation:()=>{this.setState({configMenuUid:null}),this.props.onUnlockZoomAndLocation(this.state.configMenuUid)},onYankLocation:()=>{this.setState({configMenuUid:null}),this.props.onYankLocation(this.state.configMenuUid)},onYankZoom:()=>{this.setState({configMenuUid:null}),this.props.onYankZoom(this.state.configMenuUid)},onYankZoomAndLocation:()=>{this.setState({configMenuUid:null}),this.props.onYankZoomAndLocation(this.state.configMenuUid)},onZoomToData:()=>{this.setState({configMenuUid:null}),this.props.onZoomToData(this.state.configMenuUid)},orientation:"left",position:this.state.configMenuPosition,theme:this.props.theme})));const n=this.props.getGenomePositionSearchBox(this.state.isFocused,(e=>{this.setState({isFocused:e})})),r=gl(this.state.isFocused?Mf["multitrack-header-focus"]:Mf["multitrack-header"],{[Mf["multitrack-header-dark"]]:this.props.theme===Pf}),i=this.state.width<=400?Mf["multitrack-header-icon-squeazed"]:Mf["multitrack-header-icon"];return m.default.createElement("div",{ref:e=>{this.el=e},className:r},m.default.createElement("div",{className:Mf["multitrack-header-left"]},this.props.mouseTool===kf&&m.default.createElement("svg",{className:gl(Mf["mouse-tool-selection"],i),title:"Selection tool active"},m.default.createElement("use",{xlinkHref:"#select"})),m.default.createElement("div",{className:Mf["multitrack-header-grabber"],title:"Drag to move the view"},m.default.createElement("div",null),m.default.createElement("div",null),m.default.createElement("div",null)),this.state.width>300&&m.default.createElement("div",{className:Mf["multitrack-header-search"]},this.props.isGenomePositionSearchBoxVisible&&n)),m.default.createElement("nav",{className:Mf["multitrack-header-nav-list"]},m.default.createElement("svg",{className:i,onClick:this.props.onAddView},m.default.createElement("title",null,"Add new view (clone this view)"),m.default.createElement("use",{xlinkHref:"#copy"})),m.default.createElement("svg",{ref:e=>{this.configImg=e},className:i,onClick:()=>this.handleConfigMenuOpened(this.props.viewUid)},m.default.createElement("title",null,"Configure this view"),m.default.createElement("use",{xlinkHref:"#cog"})),m.default.createElement("svg",{ref:e=>{this.plusImg=e},className:i,onClick:()=>this.handleAddTrackPositionMenuOpened(this.props.viewUid)},m.default.createElement("title",null,"Add Track"),m.default.createElement("use",{xlinkHref:"#plus"})),m.default.createElement("svg",{className:i,onClick:this.props.onCloseView},m.default.createElement("title",null,"Close View"),m.default.createElement("use",{xlinkHref:"#cross"}))),e,t)}}]),n}(m.default.Component);Dne.defaultProps={isGenomePositionSearchBoxVisible:!1},Dne.propTypes={getGenomePositionSearchBox:S.exports.func.isRequired,isGenomePositionSearchBoxVisible:S.exports.bool,mouseTool:S.exports.string.isRequired,onAddView:S.exports.func.isRequired,onClearView:S.exports.func.isRequired,onCloseView:S.exports.func.isRequired,onEditViewConfig:S.exports.func.isRequired,onExportSVG:S.exports.func.isRequired,onExportPNG:S.exports.func.isRequired,onExportViewsAsJSON:S.exports.func.isRequired,onExportViewsAsLink:S.exports.func.isRequired,onLockLocation:S.exports.func.isRequired,onLockZoom:S.exports.func.isRequired,onLockZoomAndLocation:S.exports.func.isRequired,onProjectViewport:S.exports.func.isRequired,onTakeAndLockZoomAndLocation:S.exports.func.isRequired,onTogglePositionSearchBox:S.exports.func.isRequired,onTrackPositionChosen:S.exports.func.isRequired,onUnlockLocation:S.exports.func.isRequired,onUnlockZoom:S.exports.func.isRequired,onUnlockZoomAndLocation:S.exports.func.isRequired,onViewOptionsChanged:S.exports.func.isRequired,onYankLocation:S.exports.func.isRequired,onYankZoom:S.exports.func.isRequired,onYankZoomAndLocation:S.exports.func.isRequired,onZoomToData:S.exports.func.isRequired,theme:S.exports.symbol.isRequired,viewUid:S.exports.string.isRequired};const Pne=eH(Dne);var Nne={};Object.defineProperty(Nne,"__esModule",{value:!0});var Rne=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1],n=r._history,i=n.stack,o=n.offset;if(i.length&&o>-1){r._history.stack=i.slice(0,o+1);var a=r._history.stack.length;if(a>100){var s=a-100;r._history.stack=i.slice(s,a),r._history.offset=Math.max(r._history.offset-s,0)}}var l=Date.now();if(t){var c=r._history.stack[r._history.offset];if(c&&l-c.timestamp<3e3){var u=/[^a-z0-9]([a-z0-9]+)$/i,h=r._getLines(c.value,c.selectionStart).pop().match(u),d=r._getLines(e.value,e.selectionStart).pop().match(u);if(h&&d&&d[1].startsWith(h[1]))return void(r._history.stack[r._history.offset]=Rne({},e,{timestamp:l}))}}r._history.stack.push(Rne({},e,{timestamp:l})),r._history.offset++},r._updateInput=function(e){var t=r._input;t&&(t.value=e.value,t.selectionStart=e.selectionStart,t.selectionEnd=e.selectionEnd,r.props.onValueChange(e.value))},r._applyEdits=function(e){var t=r._input,n=r._history.stack[r._history.offset];n&&t&&(r._history.stack[r._history.offset]=Rne({},n,{selectionStart:t.selectionStart,selectionEnd:t.selectionEnd})),r._recordChange(e),r._updateInput(e)},r._undoEdit=function(){var e=r._history,t=e.stack,n=e.offset,i=t[n-1];i&&(r._updateInput(i),r._history.offset=Math.max(n-1,0))},r._redoEdit=function(){var e=r._history,t=e.stack,n=e.offset,i=t[n+1];i&&(r._updateInput(i),r._history.offset=Math.min(n+1,t.length-1))},r._handleKeyDown=function(e){var t=r.props,n=t.tabSize,i=t.insertSpaces,o=t.ignoreTabKey,a=t.onKeyDown;if(!a||(a(e),!e.defaultPrevented)){27===e.keyCode&&e.target.blur();var s=e.target,l=s.value,c=s.selectionStart,u=s.selectionEnd,h=(i?" ":"\t").repeat(n);if(9===e.keyCode&&!o&&r.state.capture)if(e.preventDefault(),e.shiftKey){var d=r._getLines(l,c),p=d.length-1,f=r._getLines(l,u).length-1,m=l.split("\n").map((function(e,t){return t>=p&&t<=f&&e.startsWith(h)?e.substring(h.length):e})).join("\n");if(l!==m){var g=d[p];r._applyEdits({value:m,selectionStart:g.startsWith(h)?c-h.length:c,selectionEnd:u-(l.length-m.length)})}}else if(c!==u){var b=r._getLines(l,c),v=b.length-1,y=r._getLines(l,u).length-1,T=b[v];r._applyEdits({value:l.split("\n").map((function(e,t){return t>=v&&t<=y?h+e:e})).join("\n"),selectionStart:/\S/.test(T)?c+h.length:c,selectionEnd:u+h.length*(y-v+1)})}else{var _=c+h.length;r._applyEdits({value:l.substring(0,c)+h+l.substring(u),selectionStart:_,selectionEnd:_})}else if(8===e.keyCode){var E=c!==u;if(l.substring(0,c).endsWith(h)&&!E){e.preventDefault();var x=c-h.length;r._applyEdits({value:l.substring(0,c-h.length)+l.substring(u),selectionStart:x,selectionEnd:x})}}else if(13===e.keyCode){if(c===u){var w=r._getLines(l,c).pop().match(/^\s+/);if(w&&w[0]){e.preventDefault();var S="\n"+w[0],k=c+S.length;r._applyEdits({value:l.substring(0,c)+S+l.substring(u),selectionStart:k,selectionEnd:k})}}}else if(57===e.keyCode||219===e.keyCode||222===e.keyCode||192===e.keyCode){var A=void 0;57===e.keyCode&&e.shiftKey?A=["(",")"]:219===e.keyCode?A=e.shiftKey?["{","}"]:["[","]"]:222===e.keyCode?A=e.shiftKey?['"','"']:["'","'"]:192!==e.keyCode||e.shiftKey||(A=["`","`"]),c!==u&&A&&(e.preventDefault(),r._applyEdits({value:l.substring(0,c)+A[0]+l.substring(c,u)+A[1]+l.substring(u),selectionStart:c,selectionEnd:u+2}))}else!(Une?e.metaKey&&90===e.keyCode:e.ctrlKey&&90===e.keyCode)||e.shiftKey||e.altKey?(Une?e.metaKey&&90===e.keyCode&&e.shiftKey:Fne?e.ctrlKey&&89===e.keyCode:e.ctrlKey&&90===e.keyCode&&e.shiftKey)&&!e.altKey?(e.preventDefault(),r._redoEdit()):77!==e.keyCode||!e.ctrlKey||Une&&!e.shiftKey||(e.preventDefault(),r.setState((function(e){return{capture:!e.capture}}))):(e.preventDefault(),r._undoEdit())}},r._handleChange=function(e){var t=e.target,n=t.value,i=t.selectionStart,o=t.selectionEnd;r._recordChange({value:n,selectionStart:i,selectionEnd:o},!0),r.props.onValueChange(n)},r._history={stack:[],offset:-1},Bne(r,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),Mne(t,[{key:"componentDidMount",value:function(){this._recordCurrentState()}},{key:"render",value:function(){var e=this,t=this.props,n=t.value,r=t.style,i=t.padding,o=t.highlight,a=t.textareaId,s=t.autoFocus,l=t.disabled,c=t.form,u=t.maxLength,h=t.minLength,d=t.name,p=t.placeholder,f=t.readOnly,m=t.required,g=t.onClick,b=t.onFocus,v=t.onBlur,y=t.onKeyUp;t.onKeyDown,t.onValueChange,t.tabSize,t.insertSpaces,t.ignoreTabKey;var T=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["value","style","padding","highlight","textareaId","autoFocus","disabled","form","maxLength","minLength","name","placeholder","readOnly","required","onClick","onFocus","onBlur","onKeyUp","onKeyDown","onValueChange","tabSize","insertSpaces","ignoreTabKey"]),_={paddingTop:i,paddingRight:i,paddingBottom:i,paddingLeft:i},E=o(n);return Lne.createElement("div",Rne({},T,{style:Rne({},Vne.container,r)}),Lne.createElement("textarea",{ref:function(t){return e._input=t},style:Rne({},Vne.editor,Vne.textarea,_),className:jne,id:a,value:n,onChange:this._handleChange,onKeyDown:this._handleKeyDown,onClick:g,onKeyUp:y,onFocus:b,onBlur:v,disabled:l,form:c,maxLength:u,minLength:h,name:d,placeholder:p,readOnly:f,required:m,autoFocus:s,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"data-gramm":!1}),Lne.createElement("pre",Rne({"aria-hidden":"true",style:Rne({},Vne.editor,Vne.highlight,_)},"string"==typeof E?{dangerouslySetInnerHTML:{__html:E+"
"}}:{children:E})),Lne.createElement("style",{type:"text/css",dangerouslySetInnerHTML:{__html:Hne}}))}},{key:"session",get:function(){return{history:this._history}},set:function(e){this._history=e.history}}]),t}(Lne.Component);Gne.defaultProps={tabSize:2,insertSpaces:!0,ignoreTabKey:!1,padding:0};var zne=Nne.default=Gne,Vne={container:{position:"relative",textAlign:"left",boxSizing:"border-box",padding:0,overflow:"hidden"},textarea:{position:"absolute",top:0,left:0,height:"100%",width:"100%",resize:"none",color:"inherit",overflow:"hidden",MozOsxFontSmoothing:"grayscale",WebkitFontSmoothing:"antialiased",WebkitTextFillColor:"transparent"},highlight:{position:"relative",pointerEvents:"none"},editor:{margin:0,border:0,background:"none",boxSizing:"inherit",display:"inherit",fontFamily:"inherit",fontSize:"inherit",fontStyle:"inherit",fontVariantLigatures:"inherit",fontWeight:"inherit",letterSpacing:"inherit",lineHeight:"inherit",tabSize:"inherit",textIndent:"inherit",textRendering:"inherit",textTransform:"inherit",whiteSpace:"pre-wrap",wordBreak:"keep-all",overflowWrap:"break-word"}},Wne={exports:{}};(function(e){var t=function(e){var t=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,n=0,r={},i={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(t){return t instanceof o?new o(t.type,e(t.content),t.alias):Array.isArray(t)?t.map(e):t.replace(/&/g,"&").replace(/=h.reach);x+=E.value.length,E=E.next){var w=E.value;if(t.length>e.length)return;if(!(w instanceof o)){var S,k=1;if(v){if(!(S=a(_,x,e,b))||S.index>=e.length)break;var A=S.index,C=S.index+S[0].length,I=x;for(I+=E.value.length;A>=I;)I+=(E=E.next).value.length;if(x=I-=E.value.length,E.value instanceof o)continue;for(var O=E;O!==t.tail&&(Ih.reach&&(h.reach=R);var M=E.prev;if(P&&(M=c(t,M,P),x+=P.length),u(t,M,k),E=c(t,M,new o(d,g?i.tokenize(D,g):D,y,D)),N&&c(t,E,N),k>1){var L={cause:d+","+f,reach:R};s(e,t,n,E.prev,x,L),h&&L.reach>h.reach&&(h.reach=L.reach)}}}}}}function l(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function c(e,t,n){var r=t.next,i={value:n,prev:t,next:r};return t.next=i,r.prev=i,e.length++,i}function u(e,t,n){for(var r=t.next,i=0;i"+o.content+""},!e.document)return e.addEventListener?(i.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),r=n.language,o=n.code,a=n.immediateClose;e.postMessage(i.highlight(o,i.languages[r],r)),a&&e.close()}),!1),i):i;var h=i.util.currentScript();function d(){i.manual||i.highlightAll()}if(h&&(i.filename=h.src,h.hasAttribute("data-manual")&&(i.manual=!0)),!i.manual){var p=document.readyState;"loading"===p||"interactive"===p&&h&&h.defer?document.addEventListener("DOMContentLoaded",d):window.requestAnimationFrame?window.requestAnimationFrame(d):window.setTimeout(d,16)}return i}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{});e.exports&&(e.exports=t),"undefined"!=typeof globalThis&&(globalThis.Prism=t)})(Wne),Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json;var Xne={};!function(e,t){!function(e){function t(){for(var e=arguments.length,t=Array(e),n=0;n1){t[0]=t[0].slice(0,-1);for(var r=t.length-1,i=1;i= 0x80 (not a basic code point)","invalid-input":"Invalid input"},S=p-f,k=Math.floor,A=String.fromCharCode;function C(e){throw new RangeError(w[e])}function I(e,t){for(var n=[],r=e.length;r--;)n[r]=t(e[r]);return n}function O(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+I((e=e.replace(x,".")).split("."),t).join(".")}function D(e){for(var t=[],n=0,r=e.length;n=55296&&i<=56319&&n>1,e+=k(e/t);e>S*m>>1;r+=p)e=k(e/S);return k(r+(S+1)*e/(e+g))},M=function(e){var t=[],n=e.length,r=0,i=y,o=v,a=e.lastIndexOf(T);a<0&&(a=0);for(var s=0;s=128&&C("not-basic"),t.push(e.charCodeAt(s));for(var l=a>0?a+1:0;l=n&&C("invalid-input");var g=P(e.charCodeAt(l++));(g>=p||g>k((d-r)/u))&&C("overflow"),r+=g*u;var b=h<=o?f:h>=o+m?m:h-o;if(gk(d/_)&&C("overflow"),u*=_}var E=t.length+1;o=R(r-c,E,0==c),k(r/E)>d-i&&C("overflow"),i+=k(r/E),r%=E,t.splice(r++,0,i)}return String.fromCodePoint.apply(String,t)},L=function(e){var t=[],n=(e=D(e)).length,r=y,i=0,o=v,a=!0,s=!1,l=void 0;try{for(var c,u=e[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var h=c.value;h<128&&t.push(A(h))}}catch(e){s=!0,l=e}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}var g=t.length,b=g;for(g&&t.push(T);b=r&&O<_&&(_=O)}}catch(e){x=!0,w=e}finally{try{!E&&I.return&&I.return()}finally{if(x)throw w}}var P=b+1;_-r>k((d-i)/P)&&C("overflow"),i+=(_-r)*P,r=_;var M=!0,L=!1,B=void 0;try{for(var F,U=e[Symbol.iterator]();!(M=(F=U.next()).done);M=!0){var j=F.value;if(jd&&C("overflow"),j==r){for(var H=i,G=p;;G+=p){var z=G<=o?f:G>=o+m?m:G-o;if(H>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function G(e){for(var t="",n=0,r=e.length;n=194&&i<224){if(r-n>=6){var o=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((31&i)<<6|63&o)}else t+=e.substr(n,6);n+=6}else if(i>=224){if(r-n>=9){var a=parseInt(e.substr(n+4,2),16),s=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((15&i)<<12|(63&a)<<6|63&s)}else t+=e.substr(n,9);n+=9}else t+=e.substr(n,3),n+=3}return t}function z(e,t){function n(e){var n=G(e);return n.match(t.UNRESERVED)?n:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,n).replace(t.NOT_USERINFO,H).replace(t.PCT_ENCODED,i)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,n).toLowerCase().replace(t.NOT_HOST,H).replace(t.PCT_ENCODED,i)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,n).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,H).replace(t.PCT_ENCODED,i)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,n).replace(t.NOT_QUERY,H).replace(t.PCT_ENCODED,i)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,n).replace(t.NOT_FRAGMENT,H).replace(t.PCT_ENCODED,i)),e}function V(e){return e.replace(/^0*(.*)/,"$1")||"0"}function W(e,t){var n=e.match(t.IPV4ADDRESS)||[],r=u(n,2)[1];return r?r.split(".").map(V).join("."):e}function X(e,t){var n=e.match(t.IPV6ADDRESS)||[],r=u(n,3),i=r[1],o=r[2];if(i){for(var a=i.toLowerCase().split("::").reverse(),s=u(a,2),l=s[0],c=s[1],h=c?c.split(":").map(V):[],d=l.split(":").map(V),p=t.IPV4ADDRESS.test(d[d.length-1]),f=p?7:8,m=d.length-f,g=Array(f),b=0;b1){var T=g.slice(0,v.index),_=g.slice(v.index+v.length);y=T.join(":")+"::"+_.join(":")}else y=g.join(":");return o&&(y+="%"+o),y}return e}var Y=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,q=void 0==="".match(/(){0}/)[1];function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=!1!==t.iri?c:l;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var i=e.match(Y);if(i){q?(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5])):(n.scheme=i[1]||void 0,n.userinfo=-1!==e.indexOf("@")?i[3]:void 0,n.host=-1!==e.indexOf("//")?i[4]:void 0,n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=-1!==e.indexOf("?")?i[7]:void 0,n.fragment=-1!==e.indexOf("#")?i[8]:void 0,isNaN(n.port)&&(n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?i[4]:void 0)),n.host&&(n.host=X(W(n.host,r),r)),void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||n.path||void 0!==n.query?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==n.reference&&(n.error=n.error||"URI is not a "+t.reference+" reference.");var o=j[(t.scheme||n.scheme||"").toLowerCase()];if(t.unicodeSupport||o&&o.unicodeSupport)z(n,r);else{if(n.host&&(t.domainHost||o&&o.domainHost))try{n.host=U.toASCII(n.host.replace(r.PCT_ENCODED,G).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}z(n,l)}o&&o.parse&&o.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function K(e,t){var n=!1!==t.iri?c:l,r=[];return void 0!==e.userinfo&&(r.push(e.userinfo),r.push("@")),void 0!==e.host&&r.push(X(W(String(e.host),n),n).replace(n.IPV6ADDRESS,(function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(r.push(":"),r.push(String(e.port))),r.length?r.join(""):void 0}var Q=/^\.\.?\//,Z=/^\/\.(\/|$)/,J=/^\/\.\.(\/|$)/,ee=/^\/?(?:.|\n)*?(?=\/|$)/;function te(e){for(var t=[];e.length;)if(e.match(Q))e=e.replace(Q,"");else if(e.match(Z))e=e.replace(Z,"/");else if(e.match(J))e=e.replace(J,"/"),t.pop();else if("."===e||".."===e)e="";else{var n=e.match(ee);if(!n)throw new Error("Unexpected dot segment condition");var r=n[0];e=e.slice(r.length),t.push(r)}return t.join("")}function ne(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.iri?c:l,r=[],i=j[(t.scheme||e.scheme||"").toLowerCase()];if(i&&i.serialize&&i.serialize(e,t),e.host)if(n.IPV6ADDRESS.test(e.host));else if(t.domainHost||i&&i.domainHost)try{e.host=t.iri?U.toUnicode(e.host):U.toASCII(e.host.replace(n.PCT_ENCODED,G).toLowerCase())}catch(n){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+n}z(e,n),"suffix"!==t.reference&&e.scheme&&(r.push(e.scheme),r.push(":"));var o=K(e,t);if(void 0!==o&&("suffix"!==t.reference&&r.push("//"),r.push(o),e.path&&"/"!==e.path.charAt(0)&&r.push("/")),void 0!==e.path){var a=e.path;t.absolutePath||i&&i.absolutePath||(a=te(a)),void 0===o&&(a=a.replace(/^\/\//,"/%2F")),r.push(a)}return void 0!==e.query&&(r.push("?"),r.push(e.query)),void 0!==e.fragment&&(r.push("#"),r.push(e.fragment)),r.join("")}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={};return arguments[3]||(e=$(ne(e,n),n),t=$(ne(t,n),n)),!(n=n||{}).tolerant&&t.scheme?(r.scheme=t.scheme,r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=te(t.path||""),r.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(r.userinfo=t.userinfo,r.host=t.host,r.port=t.port,r.path=te(t.path||""),r.query=t.query):(t.path?("/"===t.path.charAt(0)?r.path=te(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?r.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:r.path=t.path:r.path="/"+t.path,r.path=te(r.path)),r.query=t.query):(r.path=e.path,void 0!==t.query?r.query=t.query:r.query=e.query),r.userinfo=e.userinfo,r.host=e.host,r.port=e.port),r.scheme=e.scheme),r.fragment=t.fragment,r}function ie(e,t,n){var r=a({scheme:"null"},n);return ne(re($(e,r),$(t,r),r,!0),r)}function oe(e,t){return"string"==typeof e?e=ne($(e,t),t):"object"===r(e)&&(e=$(ne(e,t),t)),e}function ae(e,t,n){return"string"==typeof e?e=ne($(e,n),n):"object"===r(e)&&(e=ne(e,n)),"string"==typeof t?t=ne($(t,n),n):"object"===r(t)&&(t=ne(t,n)),e===t}function se(e,t){return e&&e.toString().replace(t&&t.iri?c.ESCAPE:l.ESCAPE,H)}function le(e,t){return e&&e.toString().replace(t&&t.iri?c.PCT_ENCODED:l.PCT_ENCODED,G)}var ce={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var n="https"===String(e.scheme).toLowerCase();return e.port!==(n?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},ue={scheme:"https",domainHost:ce.domainHost,parse:ce.parse,serialize:ce.serialize};function he(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var de={scheme:"ws",domainHost:!0,parse:function(e,t){var n=e;return n.secure=he(n),n.resourceName=(n.path||"/")+(n.query?"?"+n.query:""),n.path=void 0,n.query=void 0,n},serialize:function(e,t){if(e.port!==(he(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var n=e.resourceName.split("?"),r=u(n,2),i=r[0],o=r[1];e.path=i&&"/"!==i?i:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},pe={scheme:"wss",domainHost:de.domainHost,parse:de.parse,serialize:de.serialize},fe={},me="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",ge="[0-9A-Fa-f]",be=n(n("%[EFef]"+ge+"%"+ge+ge+"%"+ge+ge)+"|"+n("%[89A-Fa-f]"+ge+"%"+ge+ge)+"|"+n("%"+ge+ge)),ve="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",ye=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),Te="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",_e=new RegExp(me,"g"),Ee=new RegExp(be,"g"),xe=new RegExp(t("[^]",ve,"[\\.]",'[\\"]',ye),"g"),we=new RegExp(t("[^]",me,Te),"g"),Se=we;function ke(e){var t=G(e);return t.match(_e)?t:e}var Ae={scheme:"mailto",parse:function(e,t){var n=e,r=n.to=n.path?n.path.split(","):[];if(n.path=void 0,n.query){for(var i=!1,o={},a=n.query.split("&"),s=0,l=a.length;s=55296&&t<=56319&&i=t)throw new Error("Cannot access property/index "+r+" levels up, current level is "+t);return n[t-r]}if(r>t)throw new Error("Cannot access data "+r+" levels up, current level is "+t);if(o="data"+(t-r||""),!i)return o}for(var s=o,l=i.split("/"),c=0;c=0?{index:r,compiling:!0}:(r=this._compilations.length,this._compilations[r]={schema:e,root:t,baseId:n},{index:r,compiling:!1})}function $re(e,t,n){var r=Kre.call(this,e,t,n);r>=0&&this._compilations.splice(r,1)}function Kre(e,t,n){for(var r=0;r%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,hie=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,die=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,pie=/^(?:\/(?:[^~/]|~0|~1)*)*$/,fie=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,mie=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,gie=bie;function bie(e){return e="full"==e?"full":"fast",iie.copy(bie[e])}function vie(e){var t=e.match(oie);if(!t)return!1;var n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(2==r&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(n)?29:aie[r])}function yie(e,t){var n=e.match(sie);if(!n)return!1;var r=n[1],i=n[2],o=n[3],a=n[5];return(r<=23&&i<=59&&o<=59||23==r&&59==i&&60==o)&&(!t||a)}bie.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":uie,url:hie,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:lie,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:xie,uuid:die,"json-pointer":pie,"json-pointer-uri-fragment":fie,"relative-json-pointer":mie},bie.full={date:vie,time:yie,"date-time":function(e){var t=e.split(Tie);return 2==t.length&&vie(t[0])&&yie(t[1],!0)},uri:function(e){return _ie.test(e)&&cie.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":uie,url:hie,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:lie,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:xie,uuid:die,"json-pointer":pie,"json-pointer-uri-fragment":fie,"relative-json-pointer":mie};var Tie=/t|\s/i;var _ie=/\/|:/;var Eie=/[^\\]\\Z/;function xie(e){if(Eie.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var wie=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d=e.opts.$data&&s&&s.$data;d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s;var p="maximum"==t,f=p?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[f],g=e.opts.$data&&m&&m.$data,b=p?"<":">",v=p?">":"<",y=void 0;if(!d&&"number"!=typeof s&&void 0!==s)throw new Error(t+" must be number");if(!g&&void 0!==m&&"number"!=typeof m&&"boolean"!=typeof m)throw new Error(f+" must be number or boolean");if(g){var T,_=e.util.getData(m.$data,a,e.dataPathArr),E="exclusive"+o,x="exclType"+o,w="exclIsNumber"+o,S="' + "+(A="op"+o)+" + '";i+=" var schemaExcl"+o+" = "+_+"; ",i+=" var "+E+"; var "+x+" = typeof "+(_="schemaExcl"+o)+"; if ("+x+" != 'boolean' && "+x+" != 'undefined' && "+x+" != 'number') { ",y=f,(T=T||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: '"+f+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+l+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var k=i;i=T.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+x+" == 'number' ? ( ("+E+" = "+r+" === undefined || "+_+" "+b+"= "+r+") ? "+h+" "+v+"= "+_+" : "+h+" "+v+" "+r+" ) : ( ("+E+" = "+_+" === true) ? "+h+" "+v+"= "+r+" : "+h+" "+v+" "+r+" ) || "+h+" !== "+h+") { var op"+o+" = "+E+" ? '"+b+"' : '"+b+"='; ",void 0===s&&(y=f,c=e.errSchemaPath+"/"+f,r=_,d=g)}else if(S=b,(w="number"==typeof m)&&d){var A="'"+S+"'";i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" ( "+r+" === undefined || "+m+" "+b+"= "+r+" ? "+h+" "+v+"= "+m+" : "+h+" "+v+" "+r+" ) || "+h+" !== "+h+") { "}else w&&void 0===s?(E=!0,y=f,c=e.errSchemaPath+"/"+f,r=m,v+="="):(w&&(r=Math[p?"min":"max"](m,s)),m===(!w||r)?(E=!0,y=f,c=e.errSchemaPath+"/"+f,v+="="):(E=!1,S+="=")),A="'"+S+"'",i+=" if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+h+" "+v+" "+r+" || "+h+" !== "+h+") { ";return y=y||t,(T=T||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(y||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+A+", limit: "+r+", exclusive: "+E+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be "+S+" ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",k=i,i=T.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+k+"]); ":i+=" validate.errors = ["+k+"]; return false; ":i+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { "),i},Sie=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" "+h+".length "+("maxItems"==t?">":"<")+" "+r+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"fewer",i+=" than ",i+=d?"' + "+r+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i},kie=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),!1===e.opts.unicode?i+=" "+h+".length ":i+=" ucs2length("+h+") ",i+=" "+p+" "+r+") { ";var f=t,m=m||[];m.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(f||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=d?"' + "+r+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var g=i;return i=m.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i},Aie=function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'number') || "),i+=" Object.keys("+h+").length "+("maxProperties"==t?">":"<")+" "+r+") { ";var p=t,f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"fewer",i+=" than ",i+=d?"' + "+r+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var m=i;return i=f.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+m+"]); ":i+=" validate.errors = ["+m+"]; return false; ":i+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i},Cie={$ref:function(e,t,n){var r,i,o=" ",a=e.level,s=e.dataLevel,l=e.schema[t],c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(s||""),d="valid"+a;if("#"==l||"#/"==l)e.isRoot?(r=e.async,i="validate"):(r=!0===e.root.schema.$async,i="root.refVal[0]");else{var p=e.resolveRef(e.baseId,l,e.isRoot);if(void 0===p){var f=e.MissingRefError.message(e.baseId,l);if("fail"==e.opts.missingRefs){e.logger.error(f),(v=v||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { ref: '"+e.util.escapeQuotes(l)+"' } ",!1!==e.opts.messages&&(o+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(l)+"' "),e.opts.verbose&&(o+=" , schema: "+e.util.toQuotedString(l)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ";var m=o;o=v.pop(),!e.compositeRule&&u?e.async?o+=" throw new ValidationError(["+m+"]); ":o+=" validate.errors = ["+m+"]; return false; ":o+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(o+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,l,f);e.logger.warn(f),u&&(o+=" if (true) { ")}}else if(p.inline){var g=e.util.copy(e);g.level++;var b="valid"+g.level;g.schema=p.schema,g.schemaPath="",g.errSchemaPath=l,o+=" "+e.validate(g).replace(/validate\.schema/g,p.code)+" ",u&&(o+=" if ("+b+") { ")}else r=!0===p.$async||e.async&&!1!==p.$async,i=p.code}if(i){var v;(v=v||[]).push(o),o="",e.opts.passContext?o+=" "+i+".call(this, ":o+=" "+i+"( ",o+=" "+h+", (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var y=o+=" , "+(s?"data"+(s-1||""):"parentData")+" , "+(s?e.dataPathArr[s]:"parentDataProperty")+", rootData) ";if(o=v.pop(),r){if(!e.async)throw new Error("async schema referenced by sync schema");u&&(o+=" var "+d+"; "),o+=" try { await "+y+"; ",u&&(o+=" "+d+" = true; "),o+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",u&&(o+=" "+d+" = false; "),o+=" } ",u&&(o+=" if ("+d+") { ")}else o+=" if (!"+y+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",u&&(o+=" else { ")}return o},allOf:function(e,t,n){var r=" ",i=e.schema[t],o=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,s=!e.opts.allErrors,l=e.util.copy(e),c="";l.level++;var u="valid"+l.level,h=l.baseId,d=!0,p=i;if(p)for(var f,m=-1,g=p.length-1;m0||!1===f:e.util.schemaHasRules(f,e.RULES.all))&&(d=!1,l.schema=f,l.schemaPath=o+"["+m+"]",l.errSchemaPath=a+"/"+m,r+=" "+e.validate(l)+" ",l.baseId=h,s&&(r+=" if ("+u+") { ",c+="}"));return s&&(r+=d?" if (true) { ":" "+c.slice(0,-1)+" "),r},anyOf:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var m="valid"+p.level;if(a.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0||!1===t:e.util.schemaHasRules(t,e.RULES.all)}))){var g=p.baseId;r+=" var "+d+" = errors; var "+h+" = false; ";var b=e.compositeRule;e.compositeRule=p.compositeRule=!0;var v=a;if(v)for(var y,T=-1,_=v.length-1;T<_;)y=v[T+=1],p.schema=y,p.schemaPath=s+"["+T+"]",p.errSchemaPath=l+"/"+T,r+=" "+e.validate(p)+" ",p.baseId=g,r+=" "+h+" = "+h+" || "+m+"; if (!"+h+") { ",f+="}";e.compositeRule=p.compositeRule=b,r+=" "+f+" if (!"+h+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'anyOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should match some schema in anyOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else c&&(r+=" if (true) { ");return r},$comment:function(e,t,n){var r=" ",i=e.schema[t],o=e.errSchemaPath+"/"+t;e.opts.allErrors;var a=e.util.toQuotedString(i);return!0===e.opts.$comment?r+=" console.log("+a+");":"function"==typeof e.opts.$comment&&(r+=" self._opts.$comment("+a+", "+e.util.toQuotedString(o)+", validate.root.schema);"),r},const:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d=e.opts.$data&&a&&a.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; "),d||(r+=" var schema"+i+" = validate.schema"+s+";"),r+="var "+h+" = equal("+u+", schema"+i+"); if (!"+h+") { ";var p=p||[];p.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'const' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValue: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to constant' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var f=r;return r=p.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+f+"]); ":r+=" validate.errors = ["+f+"]; return false; ":r+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r},contains:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e);p.level++;var f="valid"+p.level,m="i"+i,g=p.dataLevel=e.dataLevel+1,b="data"+g,v=e.baseId,y=e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all);if(r+="var "+d+" = errors;var "+h+";",y){var T=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=a,p.schemaPath=s,p.errSchemaPath=l,r+=" var "+f+" = false; for (var "+m+" = 0; "+m+" < "+u+".length; "+m+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers,!0);var _=u+"["+m+"]";p.dataPathArr[g]=m;var E=e.validate(p);p.baseId=v,e.util.varOccurences(E,b)<2?r+=" "+e.util.varReplace(E,b,_)+" ":r+=" var "+b+" = "+_+"; "+E+" ",r+=" if ("+f+") break; } ",e.compositeRule=p.compositeRule=T,r+=" if (!"+f+") {"}else r+=" if ("+u+".length == 0) {";var x=x||[];x.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should contain a valid item' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var w=r;return r=x.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+w+"]); ":r+=" validate.errors = ["+w+"]; return false; ":r+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { ",y&&(r+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } "),e.opts.allErrors&&(r+=" } "),r},dependencies:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e),p="";d.level++;var f="valid"+d.level,m={},g={},b=e.opts.ownProperties;for(_ in a)if("__proto__"!=_){var v=a[_],y=Array.isArray(v)?g:m;y[_]=v}r+="var "+h+" = errors;";var T=e.errorPath;for(var _ in r+="var missing"+i+";",g)if((y=g[_]).length){if(r+=" if ( "+u+e.util.getProperty(_)+" !== undefined ",b&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(_)+"') "),c){r+=" && ( ";var E=y;if(E)for(var x=-1,w=E.length-1;x0||!1===v:e.util.schemaHasRules(v,e.RULES.all))&&(r+=" "+f+" = true; if ( "+u+e.util.getProperty(_)+" !== undefined ",b&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes(_)+"') "),r+=") { ",d.schema=v,d.schemaPath=s+e.util.getProperty(_),d.errSchemaPath=l+"/"+e.util.escapeFragment(_),r+=" "+e.validate(d)+" ",d.baseId=M,r+=" } ",c&&(r+=" if ("+f+") { ",p+="}"));return c&&(r+=" "+p+" if ("+h+" == errors) {"),r},enum:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d=e.opts.$data&&a&&a.$data;d&&(r+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ");var p="i"+i,f="schema"+i;d||(r+=" var "+f+" = validate.schema"+s+";"),r+="var "+h+";",d&&(r+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),r+=h+" = false;for (var "+p+"=0; "+p+"<"+f+".length; "+p+"++) if (equal("+u+", "+f+"["+p+"])) { "+h+" = true; break; }",d&&(r+=" } "),r+=" if (!"+h+") { ";var m=m||[];m.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { allowedValues: schema"+i+" } ",!1!==e.opts.messages&&(r+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var g=r;return r=m.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+g+"]); ":r+=" validate.errors = ["+g+"]; return false; ":r+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" }",c&&(r+=" else { "),r},format:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||"");if(!1===e.opts.format)return c&&(r+=" if (true) { "),r;var h,d=e.opts.$data&&a&&a.$data;d?(r+=" var schema"+i+" = "+e.util.getData(a.$data,o,e.dataPathArr)+"; ",h="schema"+i):h=a;var p=e.opts.unknownFormats,f=Array.isArray(p);if(d)r+=" var "+(m="format"+i)+" = formats["+h+"]; var "+(g="isObject"+i)+" = typeof "+m+" == 'object' && !("+m+" instanceof RegExp) && "+m+".validate; var "+(b="formatType"+i)+" = "+g+" && "+m+".type || 'string'; if ("+g+") { ",e.async&&(r+=" var async"+i+" = "+m+".async; "),r+=" "+m+" = "+m+".validate; } if ( ",d&&(r+=" ("+h+" !== undefined && typeof "+h+" != 'string') || "),r+=" (","ignore"!=p&&(r+=" ("+h+" && !"+m+" ",f&&(r+=" && self._opts.unknownFormats.indexOf("+h+") == -1 "),r+=") || "),r+=" ("+m+" && "+b+" == '"+n+"' && !(typeof "+m+" == 'function' ? ",e.async?r+=" (async"+i+" ? await "+m+"("+u+") : "+m+"("+u+")) ":r+=" "+m+"("+u+") ",r+=" : "+m+".test("+u+"))))) {";else{var m;if(!(m=e.formats[a])){if("ignore"==p)return e.logger.warn('unknown format "'+a+'" ignored in schema at path "'+e.errSchemaPath+'"'),c&&(r+=" if (true) { "),r;if(f&&p.indexOf(a)>=0)return c&&(r+=" if (true) { "),r;throw new Error('unknown format "'+a+'" is used in schema at path "'+e.errSchemaPath+'"')}var g,b=(g="object"==typeof m&&!(m instanceof RegExp)&&m.validate)&&m.type||"string";if(g){var v=!0===m.async;m=m.validate}if(b!=n)return c&&(r+=" if (true) { "),r;if(v){if(!e.async)throw new Error("async format in sync schema");r+=" if (!(await "+(y="formats"+e.util.getProperty(a)+".validate")+"("+u+"))) { "}else{r+=" if (! ";var y="formats"+e.util.getProperty(a);g&&(y+=".validate"),r+="function"==typeof m?" "+y+"("+u+") ":" "+y+".test("+u+") ",r+=") { "}}var T=T||[];T.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { format: ",r+=d?""+h:""+e.util.toQuotedString(a),r+=" } ",!1!==e.opts.messages&&(r+=" , message: 'should match format \"",r+=d?"' + "+h+" + '":""+e.util.escapeQuotes(a),r+="\"' "),e.opts.verbose&&(r+=" , schema: ",r+=d?"validate.schema"+s:""+e.util.toQuotedString(a),r+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var _=r;return r=T.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+_+"]); ":r+=" validate.errors = ["+_+"]; return false; ":r+=" var err = "+_+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",c&&(r+=" else { "),r},if:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e);p.level++;var f="valid"+p.level,m=e.schema.then,g=e.schema.else,b=void 0!==m&&(e.opts.strictKeywords?"object"==typeof m&&Object.keys(m).length>0||!1===m:e.util.schemaHasRules(m,e.RULES.all)),v=void 0!==g&&(e.opts.strictKeywords?"object"==typeof g&&Object.keys(g).length>0||!1===g:e.util.schemaHasRules(g,e.RULES.all)),y=p.baseId;if(b||v){var T;p.createErrors=!1,p.schema=a,p.schemaPath=s,p.errSchemaPath=l,r+=" var "+d+" = errors; var "+h+" = true; ";var _=e.compositeRule;e.compositeRule=p.compositeRule=!0,r+=" "+e.validate(p)+" ",p.baseId=y,p.createErrors=!0,r+=" errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=_,b?(r+=" if ("+f+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",r+=" "+e.validate(p)+" ",p.baseId=y,r+=" "+h+" = "+f+"; ",b&&v?r+=" var "+(T="ifClause"+i)+" = 'then'; ":T="'then'",r+=" } ",v&&(r+=" else { ")):r+=" if (!"+f+") { ",v&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",r+=" "+e.validate(p)+" ",p.baseId=y,r+=" "+h+" = "+f+"; ",b&&v?r+=" var "+(T="ifClause"+i)+" = 'else'; ":T="'else'",r+=" } "),r+=" if (!"+h+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { failingKeyword: "+T+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match \"' + "+T+" + '\" schema' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+=" } ",c&&(r+=" else { ")}else c&&(r+=" if (true) { ");return r},items:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var m="valid"+p.level,g="i"+i,b=p.dataLevel=e.dataLevel+1,v="data"+b,y=e.baseId;if(r+="var "+d+" = errors;var "+h+";",Array.isArray(a)){var T=e.schema.additionalItems;if(!1===T){r+=" "+h+" = "+u+".length <= "+a.length+"; ";var _=l;l=e.errSchemaPath+"/additionalItems",r+=" if (!"+h+") { ";var E=E||[];E.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+a.length+" } ",!1!==e.opts.messages&&(r+=" , message: 'should NOT have more than "+a.length+" items' "),e.opts.verbose&&(r+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var x=r;r=E.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+x+"]); ":r+=" validate.errors = ["+x+"]; return false; ":r+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } ",l=_,c&&(f+="}",r+=" else { ")}var w=a;if(w)for(var S,k=-1,A=w.length-1;k0||!1===S:e.util.schemaHasRules(S,e.RULES.all)){r+=" "+m+" = true; if ("+u+".length > "+k+") { ";var C=u+"["+k+"]";p.schema=S,p.schemaPath=s+"["+k+"]",p.errSchemaPath=l+"/"+k,p.errorPath=e.util.getPathExpr(e.errorPath,k,e.opts.jsonPointers,!0),p.dataPathArr[b]=k;var I=e.validate(p);p.baseId=y,e.util.varOccurences(I,v)<2?r+=" "+e.util.varReplace(I,v,C)+" ":r+=" var "+v+" = "+C+"; "+I+" ",r+=" } ",c&&(r+=" if ("+m+") { ",f+="}")}"object"==typeof T&&(e.opts.strictKeywords?"object"==typeof T&&Object.keys(T).length>0||!1===T:e.util.schemaHasRules(T,e.RULES.all))&&(p.schema=T,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",r+=" "+m+" = true; if ("+u+".length > "+a.length+") { for (var "+g+" = "+a.length+"; "+g+" < "+u+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0),C=u+"["+g+"]",p.dataPathArr[b]=g,I=e.validate(p),p.baseId=y,e.util.varOccurences(I,v)<2?r+=" "+e.util.varReplace(I,v,C)+" ":r+=" var "+v+" = "+C+"; "+I+" ",c&&(r+=" if (!"+m+") break; "),r+=" } } ",c&&(r+=" if ("+m+") { ",f+="}"))}else(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all))&&(p.schema=a,p.schemaPath=s,p.errSchemaPath=l,r+=" for (var "+g+" = 0; "+g+" < "+u+".length; "+g+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0),C=u+"["+g+"]",p.dataPathArr[b]=g,I=e.validate(p),p.baseId=y,e.util.varOccurences(I,v)<2?r+=" "+e.util.varReplace(I,v,C)+" ":r+=" var "+v+" = "+C+"; "+I+" ",c&&(r+=" if (!"+m+") break; "),r+=" }");return c&&(r+=" "+f+" if ("+d+" == errors) {"),r},maximum:wie,minimum:wie,maxItems:Sie,minItems:Sie,maxLength:kie,minLength:kie,maxProperties:Aie,minProperties:Aie,multipleOf:function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d=e.opts.$data&&s&&s.$data;if(d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,!d&&"number"!=typeof s)throw new Error(t+" must be number");i+="var division"+o+";if (",d&&(i+=" "+r+" !== undefined && ( typeof "+r+" != 'number' || "),i+=" (division"+o+" = "+h+" / "+r+", ",e.opts.multipleOfPrecision?i+=" Math.abs(Math.round(division"+o+") - division"+o+") > 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",d&&(i+=" ) "),i+=" ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be multiple of ",i+=d?"' + "+r:r+"'"),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i},not:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){d.schema=a,d.schemaPath=s,d.errSchemaPath=l,r+=" var "+h+" = errors; ";var f,m=e.compositeRule;e.compositeRule=d.compositeRule=!0,d.createErrors=!1,d.opts.allErrors&&(f=d.opts.allErrors,d.opts.allErrors=!1),r+=" "+e.validate(d)+" ",d.createErrors=!0,f&&(d.opts.allErrors=f),e.compositeRule=d.compositeRule=m,r+=" if ("+p+") { ";var g=g||[];g.push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var b=r;r=g.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+b+"]); ":r+=" validate.errors = ["+b+"]; return false; ":r+=" var err = "+b+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.opts.allErrors&&(r+=" } ")}else r+=" var err = ",!1!==e.createErrors?(r+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(r+=" , message: 'should NOT be valid' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c&&(r+=" if (false) { ");return r},oneOf:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="valid"+i,d="errs__"+i,p=e.util.copy(e),f="";p.level++;var m="valid"+p.level,g=p.baseId,b="prevValid"+i,v="passingSchemas"+i;r+="var "+d+" = errors , "+b+" = false , "+h+" = false , "+v+" = null; ";var y=e.compositeRule;e.compositeRule=p.compositeRule=!0;var T=a;if(T)for(var _,E=-1,x=T.length-1;E0||!1===_:e.util.schemaHasRules(_,e.RULES.all))?(p.schema=_,p.schemaPath=s+"["+E+"]",p.errSchemaPath=l+"/"+E,r+=" "+e.validate(p)+" ",p.baseId=g):r+=" var "+m+" = true; ",E&&(r+=" if ("+m+" && "+b+") { "+h+" = false; "+v+" = ["+v+", "+E+"]; } else { ",f+="}"),r+=" if ("+m+") { "+h+" = "+b+" = true; "+v+" = "+E+"; }";return e.compositeRule=p.compositeRule=y,r+=f+"if (!"+h+") { var err = ",!1!==e.createErrors?(r+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { passingSchemas: "+v+" } ",!1!==e.opts.messages&&(r+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",r+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&c&&(e.async?r+=" throw new ValidationError(vErrors); ":r+=" validate.errors = vErrors; return false; "),r+="} else { errors = "+d+"; if (vErrors !== null) { if ("+d+") vErrors.length = "+d+"; else vErrors = null; }",e.opts.allErrors&&(r+=" } "),r},pattern:function(e,t,n){var r,i=" ",o=e.level,a=e.dataLevel,s=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,h="data"+(a||""),d=e.opts.$data&&s&&s.$data;d?(i+=" var schema"+o+" = "+e.util.getData(s.$data,a,e.dataPathArr)+"; ",r="schema"+o):r=s,i+="if ( ",d&&(i+=" ("+r+" !== undefined && typeof "+r+" != 'string') || "),i+=" !"+(d?"(new RegExp("+r+"))":e.usePattern(s))+".test("+h+") ) { ";var p=p||[];p.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { pattern: ",i+=d?""+r:""+e.util.toQuotedString(s),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match pattern \"",i+=d?"' + "+r+" + '":""+e.util.escapeQuotes(s),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=d?"validate.schema"+l:""+e.util.toQuotedString(s),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var f=i;return i=p.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",u&&(i+=" else { "),i},properties:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e),p="";d.level++;var f="valid"+d.level,m="key"+i,g="idx"+i,b=d.dataLevel=e.dataLevel+1,v="data"+b,y="dataProperties"+i,T=Object.keys(a||{}).filter(N),_=e.schema.patternProperties||{},E=Object.keys(_).filter(N),x=e.schema.additionalProperties,w=T.length||E.length,S=!1===x,k="object"==typeof x&&Object.keys(x).length,A=e.opts.removeAdditional,C=S||k||A,I=e.opts.ownProperties,O=e.baseId,D=e.schema.required;if(D&&(!e.opts.$data||!D.$data)&&D.length8)r+=" || validate.schema"+s+".hasOwnProperty("+m+") ";else{var R=T;if(R)for(var M=-1,L=R.length-1;M0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all)){var J=e.util.getProperty($),ee=(W=u+J,Y&&void 0!==Z.default);if(d.schema=Z,d.schemaPath=s+J,d.errSchemaPath=l+"/"+e.util.escapeFragment($),d.errorPath=e.util.getPath(e.errorPath,$,e.opts.jsonPointers),d.dataPathArr[b]=e.util.toQuotedString($),X=e.validate(d),d.baseId=O,e.util.varOccurences(X,v)<2){X=e.util.varReplace(X,v,W);var te=W}else te=v,r+=" var "+v+" = "+W+"; ";if(ee)r+=" "+X+" ";else{if(P&&P[$]){r+=" if ( "+te+" === undefined ",I&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes($)+"') "),r+=") { "+f+" = false; ",j=e.errorPath,G=l;var ne,re=e.util.escapeQuotes($);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(j,$,e.opts.jsonPointers)),l=e.errSchemaPath+"/required",(ne=ne||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+re+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+re+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ",z=r,r=ne.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+z+"]); ":r+=" validate.errors = ["+z+"]; return false; ":r+=" var err = "+z+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l=G,e.errorPath=j,r+=" } else { "}else c?(r+=" if ( "+te+" === undefined ",I&&(r+=" || ! Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes($)+"') "),r+=") { "+f+" = true; } else { "):(r+=" if ("+te+" !== undefined ",I&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", '"+e.util.escapeQuotes($)+"') "),r+=" ) { ");r+=" "+X+" } "}}c&&(r+=" if ("+f+") { ",p+="}")}}if(E.length){var ie=E;if(ie)for(var oe,ae=-1,se=ie.length-1;ae0||!1===Z:e.util.schemaHasRules(Z,e.RULES.all))&&(d.schema=Z,d.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(oe),d.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(oe),r+=I?" "+y+" = "+y+" || Object.keys("+u+"); for (var "+g+"=0; "+g+"<"+y+".length; "+g+"++) { var "+m+" = "+y+"["+g+"]; ":" for (var "+m+" in "+u+") { ",r+=" if ("+e.usePattern(oe)+".test("+m+")) { ",d.errorPath=e.util.getPathExpr(e.errorPath,m,e.opts.jsonPointers),W=u+"["+m+"]",d.dataPathArr[b]=m,X=e.validate(d),d.baseId=O,e.util.varOccurences(X,v)<2?r+=" "+e.util.varReplace(X,v,W)+" ":r+=" var "+v+" = "+W+"; "+X+" ",c&&(r+=" if (!"+f+") break; "),r+=" } ",c&&(r+=" else "+f+" = true; "),r+=" } ",c&&(r+=" if ("+f+") { ",p+="}"))}return c&&(r+=" "+p+" if ("+h+" == errors) {"),r},propertyNames:function(e,t,n){var r=" ",i=e.level,o=e.dataLevel,a=e.schema[t],s=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,c=!e.opts.allErrors,u="data"+(o||""),h="errs__"+i,d=e.util.copy(e);d.level++;var p="valid"+d.level;if(r+="var "+h+" = errors;",e.opts.strictKeywords?"object"==typeof a&&Object.keys(a).length>0||!1===a:e.util.schemaHasRules(a,e.RULES.all)){d.schema=a,d.schemaPath=s,d.errSchemaPath=l;var f="key"+i,m="idx"+i,g="i"+i,b="' + "+f+" + '",v="data"+(d.dataLevel=e.dataLevel+1),y="dataProperties"+i,T=e.opts.ownProperties,_=e.baseId;T&&(r+=" var "+y+" = undefined; "),r+=T?" "+y+" = "+y+" || Object.keys("+u+"); for (var "+m+"=0; "+m+"<"+y+".length; "+m+"++) { var "+f+" = "+y+"["+m+"]; ":" for (var "+f+" in "+u+") { ",r+=" var startErrs"+i+" = errors; ";var E=f,x=e.compositeRule;e.compositeRule=d.compositeRule=!0;var w=e.validate(d);d.baseId=_,e.util.varOccurences(w,v)<2?r+=" "+e.util.varReplace(w,v,E)+" ":r+=" var "+v+" = "+E+"; "+w+" ",e.compositeRule=d.compositeRule=x,r+=" if (!"+p+") { for (var "+g+"=startErrs"+i+"; "+g+"0||!1===y:e.util.schemaHasRules(y,e.RULES.all))||(f[f.length]=g)}}else f=a;if(d||f.length){var T=e.errorPath,_=d||f.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(c)if(r+=" var missing"+i+"; ",_){d||(r+=" var "+p+" = validate.schema"+s+"; ");var x="' + "+(I="schema"+i+"["+(A="i"+i)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(T,I,e.opts.jsonPointers)),r+=" var "+h+" = true; ",d&&(r+=" if (schema"+i+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+i+")) "+h+" = false; else {"),r+=" for (var "+A+" = 0; "+A+" < "+p+".length; "+A+"++) { "+h+" = "+u+"["+p+"["+A+"]] !== undefined ",E&&(r+=" && Object.prototype.hasOwnProperty.call("+u+", "+p+"["+A+"]) "),r+="; if (!"+h+") break; } ",d&&(r+=" } "),r+=" if (!"+h+") { ",(S=S||[]).push(r),r="",!1!==e.createErrors?(r+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+x+"' } ",!1!==e.opts.messages&&(r+=" , message: '",e.opts._errorDataPathProperty?r+="is a required property":r+="should have required property \\'"+x+"\\'",r+="' "),e.opts.verbose&&(r+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),r+=" } "):r+=" {} ";var w=r;r=S.pop(),!e.compositeRule&&c?e.async?r+=" throw new ValidationError(["+w+"]); ":r+=" validate.errors = ["+w+"]; return false; ":r+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",r+=" } else { "}else{r+=" if ( ";var S,k=f;if(k)for(var A=-1,C=k.length-1;A 1) { ";var f=e.schema.items&&e.schema.items.type,m=Array.isArray(f);if(!f||"object"==f||"array"==f||m&&(f.indexOf("object")>=0||f.indexOf("array")>=0))i+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ";else{i+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ";var g="checkDataType"+(m?"s":"");i+=" if ("+e.util[g](f,"item",e.opts.strictNumbers,!0)+") continue; ",m&&(i+=" if (typeof item == 'string') item = '\"' + item; "),i+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}i+=" } ",p&&(i+=" } "),i+=" if (!"+d+") { ";var b=b||[];b.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=p?"validate.schema"+l:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ";var v=i;i=b.pop(),!e.compositeRule&&u?e.async?i+=" throw new ValidationError(["+v+"]); ":i+=" validate.errors = ["+v+"]; return false; ":i+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",u&&(i+=" else { ")}else u&&(i+=" if (true) { ");return i},validate:Fre},Iie=qne.toHash,Oie=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Die=Rre.MissingRef,Pie=function e(t,n,r){var i=this;if("function"!=typeof this._opts.loadSchema)throw new Error("options.loadSchema should be a function");"function"==typeof n&&(r=n,n=void 0);var o=a(t).then((function(){var e=i._addSchema(t,void 0,n);return e.validate||s(e)}));return r&&o.then((function(e){r(null,e)}),r),o;function a(t){var n=t.$schema;return n&&!i.getSchema(n)?e.call(i,{$ref:n},!0):Promise.resolve()}function s(e){try{return i._compile(e)}catch(t){if(t instanceof Die)return function(t){var r=t.missingSchema;if(c(r))throw new Error("Schema "+r+" is loaded but "+t.missingRef+" cannot be resolved");var o=i._loadingSchemas[r];return o||(o=i._loadingSchemas[r]=i._opts.loadSchema(r)).then(l,l),o.then((function(e){if(!c(r))return a(e).then((function(){c(r)||i.addSchema(e,r,void 0,n)}))})).then((function(){return s(e)}));function l(){delete i._loadingSchemas[r]}function c(e){return i._refs[e]||i._schemas[e]}}(t);throw t}}};const Nie={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Rie=Nie,Mie={$id:"https://github.com/ajv-validator/ajv/blob/master/lib/definition_schema.js",definitions:{simpleTypes:Rie.definitions.simpleTypes},type:"object",dependencies:{schema:["validate"],$data:["validate"],statements:["inline"],valid:{not:{required:["macro"]}}},properties:{type:Rie.properties.type,schema:{type:"boolean"},statements:{type:"boolean"},dependencies:{type:"array",items:{type:"string"}},metaSchema:{type:"object"},modifying:{type:"boolean"},valid:{type:"boolean"},$data:{type:"boolean"},async:{type:"boolean"},errors:{anyOf:[{type:"boolean"},{const:"full"}]}}},Lie=/^[a-z_$][a-z0-9_$-]*$/i,Bie=function(e,t,n){var r,i,o=" ",a=e.level,s=e.dataLevel,l=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,d="data"+(s||""),p="valid"+a,f="errs__"+a,m=e.opts.$data&&l&&l.$data;m?(o+=" var schema"+a+" = "+e.util.getData(l.$data,s,e.dataPathArr)+"; ",i="schema"+a):i=l;var g,b,v,y,T,_=this,E="definition"+a,x=_.definition,w="";if(m&&x.$data){T="keywordValidate"+a;var S=x.validateSchema;o+=" var "+E+" = RULES.custom['"+t+"'].definition; var "+T+" = "+E+".validate;"}else{if(!(y=e.useCustomRule(_,l,e.schema,e)))return;i="validate.schema"+c,T=y.code,g=x.compile,b=x.inline,v=x.macro}var k=T+".errors",A="i"+a,C="ruleErr"+a,I=x.async;if(I&&!e.async)throw new Error("async keyword in sync schema");if(b||v||(o+=k+" = null;"),o+="var "+f+" = errors;var "+p+";",m&&x.$data&&(w+="}",o+=" if ("+i+" === undefined) { "+p+" = true; } else { ",S&&(w+="}",o+=" "+p+" = "+E+".validateSchema("+i+"); if ("+p+") { ")),b)x.statements?o+=" "+y.validate+" ":o+=" "+p+" = "+y.validate+"; ";else if(v){var O=e.util.copy(e);w="",O.level++;var D="valid"+O.level;O.schema=y.validate,O.schemaPath="";var P=e.compositeRule;e.compositeRule=O.compositeRule=!0;var N=e.validate(O).replace(/validate\.schema/g,T);e.compositeRule=O.compositeRule=P,o+=" "+N}else{(B=B||[]).push(o),o="",o+=" "+T+".call( ",e.opts.passContext?o+="this":o+="self",g||!1===x.schema?o+=" , "+d+" ":o+=" , "+i+" , "+d+" , validate.schema"+e.schemaPath+" ",o+=" , (dataPath || '')",'""'!=e.errorPath&&(o+=" + "+e.errorPath);var R=s?"data"+(s-1||""):"parentData",M=s?e.dataPathArr[s]:"parentDataProperty",L=o+=" , "+R+" , "+M+" , rootData ) ";o=B.pop(),!1===x.errors?(o+=" "+p+" = ",I&&(o+="await "),o+=L+"; "):o+=I?" var "+(k="customErrors"+a)+" = null; try { "+p+" = await "+L+"; } catch (e) { "+p+" = false; if (e instanceof ValidationError) "+k+" = e.errors; else throw e; } ":" "+k+" = null; "+p+" = "+L+"; "}if(x.modifying&&(o+=" if ("+R+") "+d+" = "+R+"["+M+"];"),o+=""+w,x.valid)h&&(o+=" if (true) { ");else{var B;o+=" if ( ",void 0===x.valid?(o+=" !",o+=v?""+D:""+p):o+=" "+!x.valid+" ",o+=") { ",r=_.keyword,(B=B||[]).push(o),o="",(B=B||[]).push(o),o="",!1!==e.createErrors?(o+=" { keyword: '"+(r||"custom")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { keyword: '"+_.keyword+"' } ",!1!==e.opts.messages&&(o+=" , message: 'should pass \""+_.keyword+"\" keyword validation' "),e.opts.verbose&&(o+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ";var F=o;o=B.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+F+"]); ":o+=" validate.errors = ["+F+"]; return false; ":o+=" var err = "+F+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ";var U=o;o=B.pop(),b?x.errors?"full"!=x.errors&&(o+=" for (var "+A+"="+f+"; "+A+"this.props.pubSub.unsubscribe(e))),this.pubSubs=[]}},{key:"handleChange",value:function(e){const t=this.getLogMsgs(e);this.setState({code:e,logMsgs:t})}},{key:"handleKeyDown",value:function(e){"s"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.props.onChange(this.state.code)),"Enter"===e.key&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),this.props.onChange(this.state.code),this.props.modal.close())}},{key:"handleKeyUp",value:function(e){this.setState({hide:!1}),"Escape"===e.key&&(e.preventDefault(),this.props.modal.close(),this.props.onCancel())}},{key:"handleSubmit",value:function(e){e&&e.preventDefault(),this.props.onSave(this.state.code)}},{key:"getLogMsgs",value:function(e){const t=[];let n;try{n=JSON.parse(e)}catch(e){return console.warn(e),t.push({type:"Error",msg:e.toString()}),t}const r=(new Kie).compile(uoe);return r(n)||(console.warn("Invalid viewconf"),t.push({type:"Warning",msg:"Invalid viewconf"})),r.errors&&(console.warn(JSON.stringify(r.errors,null,2)),r.errors.forEach((e=>{t.push({type:"Warning",msg:JSON.stringify(e,null,2)})}))),0===t.length&&t.push({type:"Success",msg:"No error or warnings"}),t}},{key:"hide",value:function(){this.setState({hide:!0})}},{key:"show",value:function(){this.setState({hide:!1})}},{key:"hideLog",value:function(){this.setState({showLog:!1})}},{key:"showLog",value:function(){this.setState({showLog:!0})}},{key:"toggleLog",value:function(){this.state.showLog?this.hideLog():this.showLog()}},{key:"render",value:function(){const e=this.state.logMsgs.map(((e,t)=>{const n=`${t}-${e.msg}`;return m.default.createElement("tr",{key:n},m.default.createElement("td",{className:gl(hoe.title,hoe[e.type])},`[${t}] ${e.type}`),m.default.createElement("td",null,m.default.createElement("pre",null,e.msg)))}));return m.default.createElement(h1,{cancelShortcut:"ESC",cancelTitle:"Discard Changes",hide:this.state.hide,maxHeight:!0,okayShortcut:"⌘+Enter",okayTitle:"Save and Close",onCancel:this.props.onCancel,onOkay:this.handleSubmitBound,title:"Edit View Config"},m.default.createElement(m.default.Fragment,null,m.default.createElement("header",{className:hoe["view-config-editor-header"]},m.default.createElement($0,{onBlur:this.showBound,onMouseDown:this.hideBound,onMouseOut:this.showBound,onMouseUp:this.showBound},"Hide While Mousedown"),m.default.createElement($0,{onClick:()=>{this.props.onChange(this.state.code)},shortcut:"⌘+S"},"Save")),m.default.createElement("div",{ref:e=>{this.editorWrap=e},className:hoe["view-config-editor"]},m.default.createElement(zne,{ref:e=>{this.editor=e},highlight:e=>Wne.exports.highlight(e,Wne.exports.languages.json),onValueChange:this.handleChangeBound,padding:10,style:{fontFamily:'"Fira code", "Fira Mono", monospace',fontSize:"inherit"},value:this.state.code})),m.default.createElement("div",{className:hoe["view-config-log"],style:{height:this.state.showLog?"50%":"30px"}},m.default.createElement("div",{className:hoe["view-config-log-header"],onClick:()=>this.toggleLogBound()},`Log Messages (${this.state.logMsgs.filter((e=>"Success"!==e.type)).length})`),m.default.createElement("div",{className:hoe["view-config-log-msg"],style:{padding:this.state.showLog?"10px":0}},m.default.createElement("table",null,m.default.createElement("tbody",null,e))))))}}]),n}(m.default.Component);doe.propTypes={modal:S.exports.object.isRequired,onCancel:S.exports.func.isRequired,onChange:S.exports.func.isRequired,onSave:S.exports.func.isRequired,pubSub:S.exports.object.isRequired,viewConfig:S.exports.string.isRequired};const poe=xH(e1(doe));const foe="_higlass-canvas_1uoq8_28",moe="_higlass-drawing-surface_1uoq8_34",goe="_higlass-svg_1uoq8_38",boe="_tiled-area_1uoq8_47",voe="_track-mouseover-menu_1uoq8_52",yoe="bounded",Toe="overflow",_oe="scroll";let Eoe=function(e){i(n,e);var t=o(n);function n(e){var r;d(this,n),r=t.call(this,e),$g(m.default.version)<15.6&&console.warn("HiGlass requires React v15.6 or higher. Current version: ",m.default.version),r.pubSub=gh(),r.domEvent=Jm(r.pubSub),r.pubSubs=[],r.minHorizontalHeight=20,r.minVerticalWidth=20,r.resizeSensor=null,r.uid=Ns.nice(),r.tiledPlots={},r.genomePositionSearchBoxes={},r.xScales={},r.yScales={},r.projectionXDomains={},r.projectionYDomains={},r.topDiv=null,r.zoomToDataExtentOnInit=new Set,r.viewTrackUidsToCombinedUid={},r.combinedUidToViewTrack={},r.scalesChangedListeners={},r.draggingChangedListeners={},r.valueScalesChangedListeners={},r.zoomLocks={},r.locationLocks={},r.locationLocksAxisWise={x:{},y:{}},r.valueScaleLocks={},r.prevAuthToken=e.options.authToken,r.setCenters={},r.plusImg={},r.configImg={},Rf.PIXI=e.options&&e.options.PIXI||b,r.viewMarginTop=+e.options.viewMarginTop>=0?+e.options.viewMarginTop:0,r.viewMarginBottom=+e.options.viewMarginBottom>=0?+e.options.viewMarginBottom:0,r.viewMarginLeft=+e.options.viewMarginLeft>=0?+e.options.viewMarginLeft:0,r.viewMarginRight=+e.options.viewMarginRight>=0?+e.options.viewMarginRight:0,r.viewPaddingTop=+e.options.viewPaddingTop>=0?+e.options.viewPaddingTop:5,r.viewPaddingBottom=+e.options.viewPaddingBottom>=0?+e.options.viewPaddingBottom:5,r.viewPaddingLeft=+e.options.viewPaddingLeft>=0?+e.options.viewPaddingLeft:5,r.viewPaddingRight=+e.options.viewPaddingRight>=0?+e.options.viewPaddingRight:5,r.genomePositionSearchBox=null,r.viewHeaders={},r.boundRefreshView=()=>{r.refreshView(Af)},r.unsetOnLocationChange=[],r.setTheme(e.options.theme,e.options.isDarkTheme),r.viewconfLoaded=!1;const{viewConfig:i}=r.props,o=r.loadIfRemoteViewConfig(r.props.viewConfig);e.options.authToken&&hg(e.options.authToken),r.pixiRoot=new Rf.PIXI.Container,r.pixiRoot.interactive=!0,r.pixiStage=new Rf.PIXI.Container,r.pixiStage.interactive=!0,r.pixiRoot.addChild(r.pixiStage),r.pixiMask=new Rf.PIXI.Graphics,r.pixiRoot.addChild(r.pixiMask),r.pixiStage.mask=r.pixiMask,r.element=null,r.scrollTop=0;let s=Sf;r.props.options&&r.props.options.mouseTool===kf&&(s=kf),r.props.options.pluginTracks&&(window.higlassTracksByType=Object.assign(window.higlassTracksByType||{},r.props.options.pluginTracks));const l={};try{window.higlassTracksByType&&Object.entries(window.higlassTracksByType).forEach((([e,t])=>{l[e]=t}))}catch(e){console.warn("Broken config of a plugin track")}r.props.options.pluginDataFetchers&&(window.higlassDataFetchersByType=Object.assign(window.higlassDataFetchersByType||{},r.props.options.pluginDataFetchers));const c=window.higlassDataFetchersByType,u=r.props.options.pixelPreciseMarginPadding?1:30;r.mounted=!1,r.pluginTracks=l,r.pluginDataFetchers=c,r.state={currentBreakpoint:"lg",width:0,height:0,rowHeight:u,svgElement:null,canvasElement:null,customDialog:null,views:o,viewConfig:i,addTrackPositionMenuPosition:null,typedEditable:void 0,mouseOverOverlayUid:null,mouseTool:s,isDarkTheme:!1,rangeSelection1dSize:[0,1/0],rangeSelectionToInt:!1,modal:null},r.attachedToDOM=!1;const{public:h,destroy:p,publish:f,stack:v}=function(e,t){const n=e;let r=[];const i=gh(),o=()=>{r.forEach((e=>t.unsubscribe(e))),r=[]};return{destroy:o,publish:i.publish,stack:i.stack,public:{get version(){return Y0},setBroadcastMousePositionGlobally(e=!1){n.setBroadcastMousePositionGlobally(e)},setShowGlobalMousePosition(e=!1){n.setShowGlobalMousePosition(e)},setGlobalMousePosition(e=!1){n.setBroadcastMousePositionGlobally(e),n.setShowGlobalMousePosition(e)},setAuthHeader(e){hg(e),n.reload()},getAuthHeader:()=>hg(),getComponent:()=>n,reload(e){let t;t=e?e.flatMap((e=>"string"==typeof e?n.iterateOverTracksInView(e):e)):n.iterateOverTracks();for(const{viewId:e,trackId:r}of t){const t=n.getTrackObject(e,r);for(const e of t.childTracks||[t])e.fetchedTiles&&(e.removeTiles(Object.keys(e.fetchedTiles)),e.fetching.clear(),e.refreshTiles()),e.rerender(e.options,!0)}},destroy(){o(),g.default.unmountComponentAtNode(n.topDiv.parentNode)},setRangeSelectionToInt(){n.setState({rangeSelectionToInt:!0})},setRangeSelectionToFloat(){n.setState({rangeSelectionToInt:!1})},setRangeSelection1dSize(e=0,t=1/0){n.setState({rangeSelection1dSize:[e,t]})},setViewConfig(e,i=!1){const o=n.processViewConfig(e);return new Promise((a=>{this.requestsInFlight=0,r.push(t.subscribe("requestSent",(()=>{this.requestsInFlight+=1}))),r.push(t.subscribe("requestReceived",(()=>{this.requestsInFlight-=1,0===this.requestsInFlight&&a()}))),n.setState({viewConfig:e,views:o},(()=>{i&&a()}))}))},getViewConfig:()=>n.getViewsAsJson(),validateViewConfig(e,{verbose:t=!1}={}){const n=(new Kie).compile(uoe),r=n(e);return t&&n.errors&&console.warn(JSON.stringify(n.errors,null,2)),r},getMinMaxValue:(e,t,r=!1,i=!1)=>n.getMinMaxValue(e,t,r,i),shareViewConfigAsLink:e=>n.handleExportViewsAsLink(e,!0),showAvailableTrackPositions(e){n.setState({draggingHappening:e})},hideAvailableTrackPositions(){n.setState({draggingHappening:null})},showTrackChooser(e){n.setState({chooseTrackHandler:(...t)=>{n.setState({chooseTrackHandler:null}),e(...t)}})},hideTrackChooser(){this.setState({chooseTrackHandler:null})},setTrackValueScaleLimits(e,t,r,i){n.setTrackValueScaleLimits(e,t,r,i)},setDarkTheme(e){console.warn('`setDarkTheme(true)` is deprecated. Please use `setTheme("dark")`.');const t=e?"dark":"light";n.setTheme(t)},setTheme(e){console.warn("Please note that theming is still in beta!"),n.setTheme(e)},zoomTo(e,t,r,i,o,a=0){n.zoomTo(e,t,r,i,o,a)},zoomToGene(e,t,r=0,i=0){n.zoomToGene(e,t,r,i)},suggestGene:(e,t,r)=>n.suggestGene(e,t,r),zoomToDataExtent(e){n.handleZoomToData(e)},resetViewport(e){n.resetViewport(e)},activateTool(e){"select"===e?n.setMouseTool(kf):n.setMouseTool(Sf)},exportAsPngBlobPromise:()=>n.createPNGBlobPromise(),exportAsSvg:()=>n.createSVGString(),exportAsViewConfString:()=>n.getViewsAsString(),getRangeSelection:()=>n.rangeSelection,getLocation(e){const t=e?n.xScales[e]&&n.yScales[e]&&e:Object.values(n.tiledPlots)[0]&&Object.values(n.tiledPlots)[0].props.uid;return t?{xDomain:n.xScales[t].domain(),yDomain:n.yScales[t].domain(),xRange:n.xScales[t].range(),yRange:n.yScales[t].range()}:"Please provide a valid view UUID sweetheart 😙"},getTrackObject(e,t){let r=e,i=t;return t||(r=Object.values(n.state.views)[0].uid,i=e),Sb(n,r,i)},option(e,t){if(void 0===t)return n.props.options[e];"sizeMode"===e?(n.props.options[e]=t,(e=>{e.setState(e.state)})(n)):console.warn(`This option "${e}" is either unknown or not settable.`)},off(e,t,r){const o="object"==typeof t?t.callback:t;switch(e){case"click":i.unsubscribe("click",o);break;case"cursorLocation":i.unsubscribe("cursorLocation",o);break;case"location":n.offLocationChange(r,t);break;case"mouseMoveZoom":i.unsubscribe("mouseMoveZoom",o);break;case"wheel":i.unsubscribe("wheel",o);break;case"rangeSelection":i.unsubscribe("rangeSelection",o);break;case"viewConfig":n.offViewChange(t);break;case"createSVG":n.offPostCreateSVG();break;case"geneSearch":i.unsubscribe("geneSearch",o)}},on(e,t,r,o){switch(e){case"click":return i.subscribe("click",t);case"cursorLocation":return i.subscribe("cursorLocation",t);case"location":return n.onLocationChange(r,t,o);case"mouseMoveZoom":return i.subscribe("mouseMoveZoom",t);case"wheel":return i.subscribe("wheel",t);case"rangeSelection":return i.subscribe("rangeSelection",t);case"viewConfig":return n.onViewChange(t);case"createSVG":return n.onPostCreateSVG(t);case"geneSearch":return i.subscribe("geneSearch",t);default:return}}}}}(a(r),r.pubSub);return r.api=h,r.apiDestroy=p,r.apiPublish=f,r.apiStack=v,r.viewChangeListener=[],r.triggerViewChangeDb=hm(r.triggerViewChange.bind(a(r)),250),r.pubSubs=[],r.rangeSelection=[null,null],r.prevMouseHoverTrack=null,r.zooming=!1,r.appClickHandlerBound=r.appClickHandler.bind(a(r)),r.canvasClickHandlerBound=r.canvasClickHandler.bind(a(r)),r.keyDownHandlerBound=r.keyDownHandler.bind(a(r)),r.keyUpHandlerBound=r.keyUpHandler.bind(a(r)),r.resizeHandlerBound=r.resizeHandler.bind(a(r)),r.resizeHandlerBound=r.resizeHandler.bind(a(r)),r.dispatchEventBound=r.dispatchEvent.bind(a(r)),r.animateOnMouseMoveHandlerBound=r.animateOnMouseMoveHandler.bind(a(r)),r.zoomStartHandlerBound=r.zoomStartHandler.bind(a(r)),r.zoomEndHandlerBound=r.zoomEndHandler.bind(a(r)),r.zoomHandlerBound=r.zoomHandler.bind(a(r)),r.trackDroppedHandlerBound=r.trackDroppedHandler.bind(a(r)),r.trackDimensionsModifiedHandlerBound=r.trackDimensionsModifiedHandler.bind(a(r)),r.animateBound=r.animate.bind(a(r)),r.animateOnGlobalEventBound=r.animateOnGlobalEvent.bind(a(r)),r.requestReceivedHandlerBound=r.requestReceivedHandler.bind(a(r)),r.wheelHandlerBound=r.wheelHandler.bind(a(r)),r.mouseMoveHandlerBound=r.mouseMoveHandler.bind(a(r)),r.onMouseLeaveHandlerBound=r.onMouseLeaveHandler.bind(a(r)),r.onBlurHandlerBound=r.onBlurHandler.bind(a(r)),r.openModalBound=r.openModal.bind(a(r)),r.closeModalBound=r.closeModal.bind(a(r)),r.handleEditViewConfigBound=r.handleEditViewConfig.bind(a(r)),r.onScrollHandlerBound=r.onScrollHandler.bind(a(r)),r.typedText="",r.typedTextTimeout=null,r.modal={open:r.openModalBound,close:r.closeModalBound},r.setBroadcastMousePositionGlobally(r.props.options.broadcastMousePositionGlobally||r.props.options.globalMousePosition),r.setShowGlobalMousePosition(r.props.options.showGlobalMousePosition||r.props.options.globalMousePosition),r}return f(n,[{key:"UNSAFE_componentWillMount",value:function(){this.domEvent.register("keydown",document),this.domEvent.register("keyup",document),this.domEvent.register("scroll",document),this.domEvent.register("resize",window),this.domEvent.register("orientationchange",window),this.domEvent.register("wheel",window),this.domEvent.register("mousedown",window,!0),this.domEvent.register("mouseup",window,!0),this.domEvent.register("click",window,!0),this.domEvent.register("mousemove",window),this.domEvent.register("touchmove",window),this.domEvent.register("touchstart",window),this.domEvent.register("touchend",window),this.domEvent.register("touchcancel",window),this.domEvent.register("blur",window),this.pubSubs.push(this.pubSub.subscribe("app.click",this.appClickHandlerBound),this.pubSub.subscribe("blur",this.onBlurHandlerBound),this.pubSub.subscribe("keydown",this.keyDownHandlerBound),this.pubSub.subscribe("keyup",this.keyUpHandlerBound),this.pubSub.subscribe("resize",this.resizeHandlerBound),this.pubSub.subscribe("wheel",this.wheelHandlerBound),this.pubSub.subscribe("orientationchange",this.resizeHandlerBound),this.pubSub.subscribe("app.event",this.dispatchEventBound),this.pubSub.subscribe("app.animateOnMouseMove",this.animateOnMouseMoveHandlerBound),this.pubSub.subscribe("trackDropped",this.trackDroppedHandlerBound),this.pubSub.subscribe("trackDimensionsModified",this.trackDimensionsModifiedHandlerBound),this.pubSub.subscribe("app.zoomStart",this.zoomStartHandlerBound),this.pubSub.subscribe("app.zoomEnd",this.zoomEndHandlerBound),this.pubSub.subscribe("app.zoom",this.zoomHandlerBound),this.pubSub.subscribe("requestReceived",this.requestReceivedHandlerBound)),this.props.getApi&&this.props.getApi(this.api)}},{key:"sizeMode",get:function(){return void 0===this.props.options.sizeMode?this.props.options.bounded?"bounded":"default":this.props.options.sizeMode}},{key:"setBroadcastMousePositionGlobally",value:function(e=!1){this.isBroadcastMousePositionGlobally=e}},{key:"setShowGlobalMousePosition",value:function(e=!1){if(this.isShowGlobalMousePosition=e,this.isShowGlobalMousePosition&&!this.globalMousePositionListener&&(this.globalMousePositionListener=vh.subscribe("higlass.mouseMove",this.animateOnGlobalEventBound),this.pubSubs.push(this.globalMousePositionListener)),this.isShowGlobalMousePosition&&!this.globalMousePositionListener){const e=this.pubSubs.findIndex((e=>e===this.globalMousePositionListener));vh.unsubscribe(this.globalMousePositionListener),e>=0&&this.pubSubs.splice(e,1),this.globalMousePositionListener=void 0}}},{key:"zoomStartHandler",value:function(){this.hideHoverMenu(),this.zooming=!0}},{key:"zoomEndHandler",value:function(){this.zooming=!1}},{key:"zoomHandler",value:function(e){e.sourceEvent&&this.mouseMoveHandler(e.sourceEvent)}},{key:"waitForDOMAttachment",value:function(e){if(!this.mounted)return;const t=g.default.findDOMNode(this);document.body.contains(t)?e():requestAnimationFrame((()=>this.waitForDOMAttachment(e)))}},{key:"componentDidMount",value:function(){this.mounted=!0,this.element=g.default.findDOMNode(this),window.addEventListener("focus",this.boundRefreshView),Object.values(this.state.views).forEach((e=>{this.adjustLayoutToTrackSizes(e),e.layout?e.layout.i=e.uid:e.layout=this.generateViewLayout(e)}));const e={width:this.state.width,height:this.state.height,view:this.canvasElement,antialias:!0,transparent:!0,resolution:2,autoResize:!0},t=parseInt(b.VERSION[0],10);4===t?(console.warn("Deprecation warning: please update Pixi.js to version 5 or above!"),"canvas"===this.props.options.renderer?this.pixiRenderer=new Rf.PIXI.CanvasRenderer(e):this.pixiRenderer=new Rf.PIXI.WebGLRenderer(e)):(t<4&&console.warn("Deprecation warning: please update Pixi.js to version 5 or above! This version of Pixi.js is unsupported. Good luck 🤞"),"canvas"===this.props.options.renderer?this.pixiRenderer=new Rf.PIXI.CanvasRenderer(e):this.pixiRenderer=new Rf.PIXI.Renderer(e)),this.fitPixiToParentContainer(),this.setState({svgElement:this.svgElement,canvasElement:this.canvasElement}),this.waitForDOMAttachment((()=>{Bu.ElementQueries.listen(),this.resizeSensor=new Bu.ResizeSensor(this.element.parentNode,this.updateAfterResize.bind(this)),this.updateAfterResize()})),this.handleDragStart(),this.handleDragStop(),this.animate();const n=Be(this.element).append("svg").style("display","none");Lf.forEach((e=>function(e,t,n,r){const i=e.append("symbol").attr("id",t).attr("viewBox",r);n.forEach((e=>i.append("path").attr("d",e).attr("fill","currentColor")))}(n,e.id,e.paths,e.viewBox)))}},{key:"getTrackObject",value:function(e,t){return this.tiledPlots[e].trackRenderer.getTrackObject(t)}},{key:"getTrackRenderer",value:function(e){return this.tiledPlots[e].trackRenderer}},{key:"loadIfRemoteViewConfig",value:function(e){let t={};return"string"==typeof e?mg.json(e,((t,n)=>{e=n,this.setState({views:this.processViewConfig(JSON.parse(JSON.stringify(n))),viewConfig:n}),this.unsetOnLocationChange.forEach((({viewId:e,callback:t,callbackId:n})=>{this.onLocationChange(e,t,n)}))}),this.pubSub):(t=this.processViewConfig(JSON.parse(JSON.stringify(e))),this.mounted&&this.setState({viewConfig:e})),t}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){const t=this.loadIfRemoteViewConfig(e.viewConfig);if(e.options.authToken!==this.prevAuthToken){hg(e.options.authToken);for(const e of this.iterateOverViews()){const t=this.getTrackRenderer(e),n=JSON.parse(t.prevTrackDefinitions);t.syncTrackObjects([]),t.syncTrackObjects(n)}this.prevAuthToken=e.options.authToken}for(const e of gm(t))this.adjustLayoutToTrackSizes(e);this.setState({views:t})}},{key:"UNSAFE_componentWillUpdate",value:function(){this.pixiRenderer.render(this.pixiRoot)}},{key:"componentDidUpdate",value:function(){this.setTheme(this.props.options.theme,this.props.options.isDarkTheme),this.animate(),this.triggerViewChangeDb()}},{key:"componentWillUnmount",value:function(){this.mounted=!1,this.pixiStage.destroy(!1),this.pixiStage=null,this.pixiRenderer.destroy(!0),this.pixiRenderer=null,window.removeEventListener("focus",this.boundRefreshView),this.resizeSensor&&this.resizeSensor.detach(),this.domEvent.unregister("keydown",document),this.domEvent.unregister("keyup",document),this.domEvent.unregister("scroll",document),this.domEvent.unregister("wheel",window),this.domEvent.unregister("mousedown",window),this.domEvent.unregister("mouseup",window),this.domEvent.unregister("click",window),this.domEvent.unregister("mousemove",window),this.domEvent.unregister("touchmove",window),this.domEvent.unregister("touchstart",window),this.domEvent.unregister("touchend",window),this.domEvent.unregister("touchcancel",window),this.pubSubs.forEach((e=>this.pubSub.unsubscribe(e))),this.pubSubs=[],this.apiDestroy()}},{key:"setTheme",value:function(e=this.props.options.theme,t=this.props.options.isDarkTheme){if(void 0!==t)console.warn("The option `isDarkTheme` is deprecated. Please use `theme` instead."),this.theme=t?"dark":"light";else switch(e){case"dark":this.theme=Pf;break;case"light":case void 0:this.theme=Df;break;default:console.warn(`Unknown theme "${e}". Using light theme.`),this.theme=Df}}},{key:"dispatchEvent",value:function(e){this.canvasElement&&_m(e,this.canvasElement)}},{key:"trackDroppedHandler",value:function(){this.setState({draggingHappening:null})}},{key:"requestReceivedHandler",value:function(){this.viewconfLoaded||0!==cg||(this.viewconfLoaded=!0,this.props.options.onViewConfLoaded&&this.props.options.onViewConfLoaded())}},{key:"animateOnMouseMoveHandler",value:function(e){e&&!this.animateOnMouseMove&&this.pubSubs.push(this.pubSub.subscribe("app.mouseMove",this.animateBound)),this.animateOnMouseMove=e}},{key:"fitPixiToParentContainer",value:function(){if(!this.element||!this.element.parentNode)return void console.warn("No parentNode:",this.element);const e=this.element.parentNode.clientWidth,t=this.element.parentNode.clientHeight;this.pixiMask.beginFill(16777215).drawRect(0,0,e,t).endFill(),this.pixiRenderer.resize(e,t),this.pixiRenderer.view.style.width=`${e}px`,this.pixiRenderer.view.style.height=`${t}px`,this.pixiRenderer.render(this.pixiRoot)}},{key:"addDefaultTrackOptions",value:function(e){const t=this.getTrackInfo(e.type);if(!t)return;void 0===e.options&&(e.options={});const n=e.options?e.options:{};if(this.props.options.defaultTrackOptions){if(this.props.options.defaultTrackOptions.trackSpecific&&this.props.options.defaultTrackOptions.trackSpecific[e.type]){const t=this.props.options.defaultTrackOptions.trackSpecific[e.type];for(const n in t)e.options[n]=void 0!==e.options[n]?e.options[n]:JSON.parse(JSON.stringify(t[n]))}if(this.props.options.defaultTrackOptions.all){const t=this.props.options.defaultTrackOptions.all;for(const n in t)e.options[n]=void 0!==e.options[n]?e.options[n]:JSON.parse(JSON.stringify(t[n]))}}if(t.defaultOptions){const n=t.defaultOptionsByTheme&&t.defaultOptionsByTheme[this.theme]?t.defaultOptionsByTheme[this.theme]:{},r={...t.defaultOptions,...n};if(e.options)for(const t in r)e.options[t]=void 0!==e.options[t]?e.options[t]:JSON.parse(JSON.stringify(r[t]));else e.options=JSON.parse(JSON.stringify(r))}else e.options=n}},{key:"toggleTypedEditable",value:function(){this.setState({typedEditable:!this.isEditable()})}},{key:"typedTextHandler",value:function(e){if(!this.props.options.cheatCodesEnabled)return;this.typedText=this.typedText.concat(e.key),this.typedText.endsWith("hgedit")&&(this.toggleTypedEditable(),this.typedText="");this.typedTextTimeout&&clearTimeout(this.typedTextTimeout),this.typedTextTimeout=setTimeout((()=>{this.typedText=""}),750)}},{key:"keyDownHandler",value:function(e){this.typedTextHandler(e),this.props.options.rangeSelectionOnAlt&&"Alt"===e.key&&this.setState({mouseTool:kf})}},{key:"keyUpHandler",value:function(e){this.props.options.rangeSelectionOnAlt&&"Alt"===e.key&&this.setState({mouseTool:Sf})}},{key:"openModal",value:function(e){this.setState({modal:m.default.cloneElement(e,{ref:e=>{this.modalRef=e}})})}},{key:"closeModal",value:function(){this.modalRef=null,this.setState({modal:null})}},{key:"handleEditViewConfig",value:function(){const{viewConfig:e}=this.state;this.setState({viewConfigTmp:e}),this.openModal(m.default.createElement(poe,{onCancel:()=>{const{viewConfigTmp:e}=this.state,t=this.processViewConfig(e);for(const e of gm(t))this.adjustLayoutToTrackSizes(e);this.setState({views:t,viewConfig:e,viewConfigTmp:null})},onChange:e=>{const t=JSON.parse(e),n=this.processViewConfig(t);for(const e of gm(n))this.adjustLayoutToTrackSizes(e);this.setState({views:n,viewConfig:t})},onSave:e=>{const t=JSON.parse(e),n=this.processViewConfig(t);for(const e of gm(n))this.adjustLayoutToTrackSizes(e);this.setState({views:n,viewConfig:t,viewConfigTmp:null})},viewConfig:this.getViewsAsString()}))}},{key:"animate",value:function(){this.isRequestingAnimationFrame||(this.isRequestingAnimationFrame=!0,requestAnimationFrame((()=>{this.pixiRenderer&&(this.pixiRenderer.render(this.pixiRoot),this.isRequestingAnimationFrame=!1)})))}},{key:"animateOnGlobalEvent",value:function({sourceUid:e}={}){e!==this.uid&&this.animateOnMouseMove&&this.animate()}},{key:"measureSize",value:function(){const[e,t]=bg(this.element);e>0&&t>0&&this.setState({sizeMeasured:!0,width:e,height:t})}},{key:"updateAfterResize",value:function(){this.measureSize(),this.updateRowHeight(),this.fitPixiToParentContainer(),this.refreshView(Af),this.resizeHandler()}},{key:"onBreakpointChange",value:function(e){this.setState({currentBreakpoint:e})}},{key:"handleOverlayMouseEnter",value:function(e){this.setState({mouseOverOverlayUid:e})}},{key:"handleOverlayMouseLeave",value:function(){this.setState({mouseOverOverlayUid:null})}},{key:"handleLockLocation",value:function(e){this.setState({chooseViewHandler:t=>this.handleLocationLockChosen(e,t),mouseOverOverlayUid:e})}},{key:"isEditable",value:function(){return void 0!==this.state.typedEditable?this.state.typedEditable:this.props.options&&"editable"in this.props.options?this.props.options.editable&&this.state.viewConfig.editable:this.state.viewConfig.editable}},{key:"isTrackMenuDisabled",value:function(){return!(!this.props.options||!1!==this.props.options.editable&&!1!==this.props.options.tracksEditable)||this.state.viewConfig&&(!1===this.state.viewConfig.tracksEditable||!1===this.state.viewConfig.editable)}},{key:"isViewHeaderDisabled",value:function(){return!(!this.props.options||!1!==this.props.options.editable&&!1!==this.props.options.viewEditable)||this.state.viewConfig&&(!1===this.state.viewConfig.viewEditable||!1===this.state.viewConfig.editable)}},{key:"iterateOverViews",value:function(){const e=[];for(const t in Object.keys(this.state.views))e.push(t);return e}},{key:"iterateOverTracksInView",value:function(e){const t=[],{tracks:n}=this.state.views[e];for(const r in n)for(const i of n[r])if("combined"===i.type&&i.contents)for(const n of i.contents)t.push({viewId:e,trackId:n.uid,track:n});else t.push({viewId:e,trackId:i.uid,track:i});return t}},{key:"iterateOverTracks",value:function(){const e=[];for(const t in this.state.views){const{tracks:n}=this.state.views[t];for(const r in n)for(const i of n[r])if("combined"===i.type&&i.contents)for(const n of i.contents)e.push({viewId:t,trackId:n.uid,track:n});else e.push({viewId:t,trackId:i.uid,track:i})}return e}},{key:"setMouseTool",value:function(e){this.setState({mouseTool:e})}},{key:"isValueScaleLocked",value:function(e,t){const n=this.combineViewAndTrackUid(e,t);return!!this.state.views[e]&&!!this.valueScaleLocks[n]}},{key:"getLockGroupExtrema",value:function(e,t){const n=this.combineViewAndTrackUid(e,t);if(!this.state.views[e])return null;if(!this.valueScaleLocks[n])return null;const r=this.valueScaleLocks[n],i=Object.values(r).filter((e=>this.tiledPlots[e.view])).map((e=>this.tiledPlots[e.view].trackRenderer.getTrackObject(e.track))).filter((e=>e)).map((e=>void 0===e.originalTrack?e:e.originalTrack)),o=i.filter((e=>e.minRawValue&&e.maxRawValue)).map((e=>r.ignoreOffScreenValues?e.minVisibleValue(!0):e.minVisibleValueInTiles(!0))),a=i.filter((e=>e.minRawValue&&e.maxRawValue)).map((e=>r.ignoreOffScreenValues?e.maxVisibleValue(!0):e.maxVisibleValueInTiles(!0)));return 0===o.length||o.filter((e=>null===e||e===1/0)).length>0||0===a.length||a.filter((e=>null===e||e===-1/0)).length>0?null:[Math.min(...o),Math.max(...a)]}},{key:"syncValueScales",value:function(e,t){const n=this.combineViewAndTrackUid(e,t);if(!this.state.views[e])return;const r=vg(this.state.views[e].tracks,t);if(this.valueScaleLocks[n]){const i=this.valueScaleLocks[n],o=Object.values(i).filter((e=>this.tiledPlots[e.view])).map((e=>this.tiledPlots[e.view].trackRenderer.getTrackObject(e.track))).filter((e=>e)).map((e=>void 0===e.originalTrack?e:e.originalTrack)),a=this.getLockGroupExtrema(e,t);if(null===a)return;const s=a[0],l=a[1],c=1e-6;for(const e of o){if(e.minValue&&e.minValue(s),e.maxValue&&e.maxValue(l),!e.valueScale)continue;const t=Math.abs(e.minValue()-e.valueScale.domain()[0])>c||Math.abs(e.maxValue()-e.valueScale.domain()[1])>c,n=r.options&&e.options&&void 0!==r.options.scaleStartPercent&&void 0!==r.options.scaleEndPercent&&(Math.abs(e.options.scaleStartPercent-r.options.scaleStartPercent)>c||Math.abs(e.options.scaleEndPercent-r.options.scaleEndPercent)>c);(!e.continuousScaling||t||n)&&(e.valueScale.domain([s,l]),e.prevValueScale=e.valueScale.copy(),n&&(e.options.scaleStartPercent=r.options.scaleStartPercent,e.options.scaleEndPercent=r.options.scaleEndPercent),e.rerender(e.options,!0))}}}},{key:"handleNewTilesLoaded",value:function(e,t){this.animate()}},{key:"notifyDragChangedListeners",value:function(e){gm(this.draggingChangedListeners).forEach((t=>{gm(t).forEach((t=>t(e)))}))}},{key:"addDraggingChangedListener",value:function(e,t,n){this.draggingChangedListeners.hasOwnProperty(e)||(this.draggingChangedListeners[e]={}),this.draggingChangedListeners[e][t]=n,n(!0),n(!1)}},{key:"removeDraggingChangedListener",value:function(e,t){if(this.draggingChangedListeners.hasOwnProperty(e)){const n=this.draggingChangedListeners[e];n.hasOwnProperty(t)&&(n[t](!1),delete n[t])}}},{key:"addScalesChangedListener",value:function(e,t,n){this.scalesChangedListeners[e]||(this.scalesChangedListeners[e]={}),this.scalesChangedListeners[e][t]=n,this.xScales[e]&&this.yScales[e]&&n(this.xScales[e],this.yScales[e])}},{key:"removeScalesChangedListener",value:function(e,t){if(this.scalesChangedListeners[e]){const n=this.scalesChangedListeners[e];n[t]&&delete n[t]}}},{key:"createSVG",value:function(){const e=document.createElement("svg");e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e.setAttribute("version","1.1");for(const t of gm(this.tiledPlots))if(t)for(const n of gm(t.trackRenderer.trackDefObjects))if(n.trackObject.exportSVG){const t=n.trackObject.exportSVG();t&&e.appendChild(t[0])}return e.setAttribute("width",this.canvasElement.style.width),e.setAttribute("height",this.canvasElement.style.height),this.postCreateSVGCallback?this.postCreateSVGCallback(e):e}},{key:"createSVGString",value:function(){const e=this.createSVG();let t=Gu.xml((new window.XMLSerializer).serializeToString(e));return t=t.replace(/\n\n${t}`}},{key:"handleExportSVG",value:function(){bm("export.svg",new Blob([this.createSVGString()],{type:"image/svg+xml"}))}},{key:"offPostCreateSVG",value:function(){this.postCreateSVGCallback=null}},{key:"onPostCreateSVG",value:function(e){this.postCreateSVGCallback=e}},{key:"createPNGBlobPromise",value:function(){return new Promise((e=>{const t=this.createSVGString(),n=new Image(this.canvasElement.width,this.canvasElement.height);n.src=`data:image/svg+xml;base64,${btoa(t)}`,n.onload=()=>{const t=document.createElement("canvas");t.width=this.canvasElement.width/2,t.height=this.canvasElement.height/2,t.getContext("2d").drawImage(n,0,0),t.toBlob((t=>{e(t)}))}}))}},{key:"handleExportPNG",value:function(){this.createPNGBlobPromise().then((e=>{bm("export.png",e)}))}},{key:"handleScalesChanged",value:function(e,t,n,r=!0){if(this.xScales[e]=t,this.yScales[e]=n,r&&e in this.scalesChangedListeners&&gm(this.scalesChangedListeners[e]).forEach((e=>{e(t,n)})),this.zoomLocks[e]){const t=this.zoomLocks[e],n=fm(t),[r,i,o]=tb(this.xScales[e],this.yScales[e]);for(let r=0;r{e(h,d)}))}}if(this.locationLocks[e]){const t=this.locationLocks[e],n=fm(t),[r,i,o]=tb(this.xScales[e],this.yScales[e]);for(let o=0;o{e(p,f)}))}}if(this.locationLocksAxisWise.x[e]){const t=this.locationLocksAxisWise.x[e].lock,n=fm(t),r="x"!==this.locationLocksAxisWise.x[e].axis,[i,o,a]=tb(this.xScales[e],this.yScales[e]);for(let o=0;o{e(d,p)}))}}if(this.locationLocksAxisWise.y[e]){const t=this.locationLocksAxisWise.y[e].lock,n=fm(t),r="y"!==this.locationLocksAxisWise.y[e].axis,[i,o,a]=tb(this.xScales[e],this.yScales[e]);for(let i=0;i{e(d,p)}))}}this.animate(),this.triggerViewChangeDb()}},{key:"handleProjectViewport",value:function(e){this.setState({chooseTrackHandler:(t,n)=>this.handleViewportProjected(e,t,n)})}},{key:"handleZoomToData",value:function(e){if(e&&!this.tiledPlots[e])throw new Error(`View uid ${e} does not exist in the current viewConfig`);e?this.tiledPlots[e].handleZoomToData():Object.values(this.tiledPlots).forEach((e=>e.handleZoomToData()))}},{key:"resetViewport",value:function(e){if(e&&!this.tiledPlots[e])throw new Error(`View uid ${e} does not exist in the current viewConfig`);e?this.tiledPlots[e].resetViewport():Object.values(this.tiledPlots).forEach((e=>e.resetViewport()))}},{key:"handleYankFunction",value:function(e,t){this.setState({chooseViewHandler:n=>t(e,n),mouseOverOverlayUid:e})}},{key:"handleUnlock",value:function(e,t){const n=mm(t[e]);if(2===n.length)return delete t[n[0]],void delete t[n[1]];t[e]&&t[e][e]&&delete t[e][e],t[e]&&delete t[e]}},{key:"viewScalesLockData",value:function(e){return this.xScales[e]&&this.yScales[e]?tb(this.xScales[e],this.yScales[e]):(console.warn("View scale lock doesn't correspond to existing uid: ",e),null)}},{key:"addLock",value:function(e,t,n,r){let i=[],o=[];i=n[e]?fm(n[e]).filter((e=>r(e[0]))).map((e=>[e[0],r(e[0])])):[[e,r.bind(this)(e)]],o=n[t]?fm(n[t]).filter((e=>r.bind(this)(e[0]))).map((e=>[e[0],r.bind(this)(e[0])])):[[t,r.bind(this)(t)]];const a=i.concat(o),s=pm(a);a.forEach((e=>{n[e[0]]=s}))}},{key:"handleLocationLockChosen",value:function(e,t){e!==t?(this.addLock(e,t,this.locationLocks,this.viewScalesLockData.bind(this)),this.setState({chooseViewHandler:null})):this.setState({chooseViewHandler:null})}},{key:"handleZoomLockChosen",value:function(e,t){e!==t?(this.addLock(e,t,this.zoomLocks,this.viewScalesLockData.bind(this)),this.setState({chooseViewHandler:null})):this.setState({chooseViewHandler:null})}},{key:"handleViewportProjected",value:function(e,t,n){let r=null;if(e===t)console.warn("A view can not show its own viewport.");else{const i=vg(this.state.views[t].tracks,n),o=Eg(this.state.views[t].tracks,n);r=Ns.nice();const a={uid:r,type:`viewport-projection-${{top:"horizontal",bottom:"horizontal",center:"center",left:"vertical",right:"vertical"}[o]}`,fromViewUid:e};this.addCallbacks(t,a),this.handleTrackAdded(t,a,o,i)}return this.setState({chooseTrackHandler:null}),r}},{key:"handleLocationYanked",value:function(e,t){const n=this.xScales[t],r=this.yScales[t],i=this.xScales[e],o=this.yScales[e],[a,s,l]=tb(i,o),[c,u,h]=tb(n,r);this.setCenters[e](c,u,l,!0),this.setState({chooseViewHandler:null})}},{key:"handleZoomYanked",value:function(e,t){const n=this.xScales[t],r=this.yScales[t],i=this.xScales[e],o=this.yScales[e],[a,s,l]=tb(i,o),[c,u,h]=tb(n,r);this.setCenters[e](a,s,h,!0),this.setState({chooseViewHandler:null})}},{key:"handleTrackPositionChosen",value:function(e,t){this.setState({addTrackPosition:t,addTrackPositionView:e})}},{key:"updateRowHeight",value:function(){if(!this.props.options||this.sizeMode!==yoe||this.props.options.pixelPreciseMarginPadding)return;const e=this.element.parentNode.clientHeight;let t=0;for(const e of gm(this.state.views))t=Math.max(t,e.layout.y+e.layout.h);this.handleDragStart(),this.handleDragStop();const n=(e-((this.isEditable()?10:0)*t-1))/t,r=Math.floor(n);this.setState({rowHeight:r})}},{key:"handleLayoutChange",value:function(e){this.element&&(e.forEach((e=>{const t=this.state.views[e.i];t&&(t.layout.x=e.x,t.layout.y=e.y,t.layout.w=e.w,t.layout.h=e.h,t.layout.i=e.i)})),this.updateRowHeight(),this.refreshView(Af))}},{key:"clearDragTimeout",value:function(){this.dragTimeout&&(clearTimeout(this.dragTimeout),this.dragTimeout=null)}},{key:"getTrackInfo",value:function(e){return rm[e]?rm[e]:this.pluginTracks&&this.pluginTracks[e]?this.pluginTracks[e].config:window.higlassTracksByType&&window.higlassTracksByType[e]?window.higlassTracksByType[e].config:void console.warn("Track type not found:",e,"(check app/scripts/config/ for a list of defined track types)")}},{key:"forceRefreshView",value:function(){this.setState(this.state)}},{key:"refreshView",value:function(e=110){this.clearDragTimeout(),this.notifyDragChangedListeners(!0),this.clearDragTimeout(),this.dragTimeout=setTimeout((()=>{this.notifyDragChangedListeners(!1)}),e)}},{key:"handleDragStart",value:function(){this.clearDragTimeout(),this.notifyDragChangedListeners(!0)}},{key:"handleDragStop",value:function(){this.clearDragTimeout(),this.dragTimeout=setTimeout((()=>{this.notifyDragChangedListeners(!1)}),Af)}},{key:"resizeHandler",value:function(){Pg(this.viewHeaders).filter((e=>e)).forEach((e=>e.checkWidth()))}},{key:"calculateViewDimensions",value:function(e){const t=20,n=100;let r=this.viewMarginTop+this.viewMarginBottom+this.viewPaddingTop+this.viewPaddingBottom,i=this.viewMarginLeft+this.viewMarginRight+this.viewPaddingLeft+this.viewPaddingRight,o=0;o+=10;if(e.tracks.top)for(let n=0;n0||e.tracks.right&&e.tracks.right.length>0||e.tracks.center&&e.tracks.center.length>0)&&(o+=20);let a=0;if(e.tracks.left)for(let t=0;t0){if(!e.tracks.center[0].contents||e.tracks.center[0].contents.length>0){let t=null,o=null;if(e.tracks.center[0].contents)for(const r of e.tracks.center[0].contents)t=Math.max(t,r.height?r.height:n),o=Math.max(o,r.width?r.width:100);else t=e.tracks.center[0].height?e.tracks.center[0].height:n,o=e.tracks.center[0].width?e.tracks.center[0].width:100;r+=t,i+=o}}else(e.tracks.top&&gm(e.tracks.top).length>1||e.tracks.bottom&&gm(e.tracks.bottom).length>1)&&(e.tracks.left&&gm(e.tracks.left).length||e.tracks.right&&gm(e.tracks.right).length)&&(u=100,c=n);r+=l>c?l:c;let h=0,d=0,p=0,f=0;return"top"in e.tracks&&(h=e.tracks.top.map((e=>e.height?e.height:t)).reduce(((e,t)=>e+t),0)),"bottom"in e.tracks&&(d=e.tracks.bottom.map((e=>e.height?e.height:t)).reduce(((e,t)=>e+t),0)),"left"in e.tracks&&(p=e.tracks.left.map((e=>e.width?e.width:0)).reduce(((e,t)=>e+t),0)),"right"in e.tracks&&(f=e.tracks.right.map((e=>e.width?e.width:0)).reduce(((e,t)=>e+t),0)),{totalWidth:i,totalHeight:r,topHeight:h,bottomHeight:d,leftWidth:p,rightWidth:f,centerWidth:u,centerHeight:c,minNecessaryHeight:o}}},{key:"calculateZoomLimits",value:function(e,t){const n=[0,1/0],r=e.zoomLimits||[1,null],i=t[1]-t[0];if(2!==r.length)return n;if(null!==r[0]&&r[0]>0){const e=i/r[0];n[1]=Math.max(e,1),e<1&&console.warn(`Invalid zoom limits. Lower limit set to ${i}`)}if(null!==r[1]&&r[1]>r[0]){const e=i/r[1];n[0]=Math.min(e,1),e>1&&console.warn(`Invalid zoom limits. Upper limit set to ${i}`)}return n}},{key:"generateViewLayout",value:function(e){let t=null;return"layout"in e?({layout:t}=e.layout):t={x:0,y:0,w:12,h:12},t}},{key:"handleClearView",value:function(e){const{views:t}=this.state;t[e].tracks.top=[],t[e].tracks.bottom=[],t[e].tracks.center=[],t[e].tracks.left=[],t[e].tracks.right=[],t[e].tracks.whole=[],this.setState({views:t})}},{key:"handleCloseView",value:function(e){1!==gm(this.state.views).length&&(this.handleUnlock(e,this.zoomLocks),this.setState((t=>(delete t.views[e],{views:this.removeInvalidTracks(t.views)}))))}},{key:"handleSeriesAdded",value:function(e,t,n,r){const{tracks:i}=this.state.views[e];if("combined"===r.type)r.contents.push(t),"heatmap"===t.type&&this.compatibilityfyStackedHeatmaps(t,r);else{const e={type:"combined",uid:Ns.nice(),height:r.height,width:r.width,contents:[r,t]},o=i[n];for(let t=0;t({views:e.views})))}},{key:"handleNoTrackAdded",value:function(){this.state.addTrackPosition&&this.setState({addTrackPosition:null})}},{key:"handleTracksAdded",value:function(e,t,n,r){this.storeTrackSizes(e);for(const i of t)this.handleTrackAdded(e,i,n,r)}},{key:"handleChangeTrackType",value:function(e,t,n){const r=this.state.views[e],i=vg(r.tracks,t),o=i.uid;i.uid=Ns.nice(),i.type=n;const a=i.uid;this.updateTrackLocks(e,o,a),this.setState((e=>({views:e.views})))}},{key:"handleChangeTrackData",value:function(e,t,n){const r=this.state.views[e],i=vg(r.tracks,t);i.uid=Ns.nice(),i.data=n,this.setState((e=>({views:e.views})))}},{key:"handleTrackAdded",value:function(e,t,n,r=null){if(this.addDefaultTrackOptions(t),t.uid||(t.uid=Ns.nice()),t.contents)for(const e of t.contents)this.addDefaultTrackOptions(e);if(this.state.addTrackPosition&&this.setState({addTrackPosition:null}),r)return this.handleSeriesAdded(e,t,n,r),null;t.position=n;const i=this.getTrackInfo(t.type);t.width=i.defaultWidth||i.defaultOptions&&i.defaultOptions.minWidth||this.minVerticalWidth,t.height=i.defaultHeight||i.defaultOptions&&i.defaultOptions.minHeight||this.minHorizontalHeight;const{tracks:o}=this.state.views[e];let a=0;if(_g(o,(()=>a++)),"left"===n||"top"===n)o[n].unshift(t);else if("center"===n)if(0===o.center.length){const e={uid:Ns.nice(),type:"combined",contents:[t]};o.center=[e]}else if("combined"===o.center[0].type)o.center[0].contents.push(t),"heatmap"===t.type&&this.compatibilityfyStackedHeatmaps(t,o.center[0]);else{const e={uid:Ns.nice(),type:"combined",contents:[o.center[0],t]};o.center=[e],"heatmap"===t.type&&this.compatibilityfyStackedHeatmaps(t,e)}else o[n]||(o[n]=[]),o[n].push(t);return this.adjustLayoutToTrackSizes(this.state.views[e]),1===Object.keys(this.state.views).length&&0===a&&(this.handleZoomToData(e),this.zoomToDataExtentOnInit.add(e)),t}},{key:"compatibilityfyStackedHeatmaps",value:function(e,t){let n;t.contents.some((e=>(n=e,"heatmap"===e.type)))&&(e.options.backgroundColor="transparent",e.options.showTooltip=n.options.showTooltip,e.options.showMousePosition=n.options.showMousePosition,e.options.mousePositionColor=n.options.mousePositionColor)}},{key:"storeTrackSizes",value:function(e){_g(this.state.views[e].tracks,(t=>{const n=this.tiledPlots[e].trackRenderer.getTrackObject(t.uid);n&&([t.width,t.height]=n.dimensions)}))}},{key:"adjustLayoutToTrackSizes",value:function(e){if(!e.layout)return;let t=0;this.isEditable()&&(t+=20);const{totalHeight:n}=this.calculateViewDimensions(e);t+=n;const r=this.isEditable()?10:0;t+=r;const i=this.state.rowHeight+r;this.sizeMode!==yoe&&(e.layout.h=Math.ceil(t/i))}},{key:"handleCloseTrack",value:function(e,t){const{tracks:n}=this.state.views[e];this.handleUnlockValueScale(e,t);for(const e in n){const r=n[e],i=r.filter((e=>e.uid!==t));i.length===r.length?i.filter((e=>"combined"===e.type)).forEach((e=>{e.contents=e.contents.filter((e=>e.uid!==t))})):n[e]=i}return this.storeTrackSizes(e),this.adjustLayoutToTrackSizes(this.state.views[e]),this.setState((e=>({views:e.views}))),this.state.views}},{key:"handleLockValueScale",value:function(e,t){this.setState({chooseTrackHandler:(n,r)=>this.handleValueScaleLocked(e,t,n,r)})}},{key:"combineViewAndTrackUid",value:function(e,t){const n=`${e}.${t}`;if(this.combinedUidToViewTrack[n]={view:e,track:t},this.viewTrackUidsToCombinedUid[e]){if(this.viewTrackUidsToCombinedUid[t])return this.viewTrackUidsToCombinedUid[e][t];this.viewTrackUidsToCombinedUid[e][t]=n}else this.viewTrackUidsToCombinedUid[e]={},this.viewTrackUidsToCombinedUid[e][t]=n;return n}},{key:"updateTrackLocks",value:function(e,t,n){const r=this.combineViewAndTrackUid(e,t),i=this.combineViewAndTrackUid(e,n);if(this.valueScaleLocks[r]){const e=this.valueScaleLocks[r];this.valueScaleLocks[i]=e,delete this.valueScaleLocks[r]}for(const e in this.valueScaleLocks)if(this.valueScaleLocks[e][r]){const t=this.valueScaleLocks[e][r];this.valueScaleLocks[e][i]=t,t.track=n,delete this.valueScaleLocks[e][r]}}},{key:"handleUnlockValueScale",value:function(e,t){if(this.tiledPlots[e].trackRenderer.getTrackObject(t).createdTracks){const n=mm(this.tiledPlots[e].trackRenderer.getTrackObject(t).createdTracks);for(const t of n)this.handleUnlock(this.combineViewAndTrackUid(e,t),this.valueScaleLocks)}else this.handleUnlock(this.combineViewAndTrackUid(e,t),this.valueScaleLocks)}},{key:"handleValueScaleLocked",value:function(e,t,n,r){if(this.tiledPlots[e].trackRenderer.getTrackObject(t).createdTracks){const i=mm(this.tiledPlots[e].trackRenderer.getTrackObject(t).createdTracks);for(const t of i)this.handleValueScaleLocked(e,t,n,r);return}if(this.tiledPlots[n].trackRenderer.getTrackObject(r).createdTracks){const i=mm(this.tiledPlots[n].trackRenderer.getTrackObject(r).createdTracks);for(const r of i)this.handleValueScaleLocked(e,t,n,r);return}const i=this.combineViewAndTrackUid(e,t),o=this.combineViewAndTrackUid(n,r);this.addLock(i,o,this.valueScaleLocks,(e=>this.combinedUidToViewTrack[e])),this.syncValueScales(e,t),this.setState({chooseTrackHandler:null})}},{key:"addCallbacks",value:function(e,t){const n=this.getTrackInfo(t.type);if("viewport-projection-center"===t.type||"viewport-projection-horizontal"===t.type||"viewport-projection-vertical"===t.type||n&&n.projection){const n=t.fromViewUid;t.registerViewportChanged=(e,t)=>this.addScalesChangedListener(n,e,t),t.removeViewportChanged=e=>this.removeScalesChangedListener(n,e),t.setDomainsCallback=(r,i)=>{if(!n)return this.projectionXDomains[e]||(this.projectionXDomains[e]={}),this.projectionYDomains[e]||(this.projectionYDomains[e]={}),"viewport-projection-horizontal"!==t.type&&"viewport-projection-center"!==t.type||(this.projectionXDomains[e][t.uid]=r),"viewport-projection-vertical"!==t.type&&"viewport-projection-center"!==t.type||(this.projectionYDomains[e][t.uid]=i),void this.triggerViewChangeDb();const o=fi().domain(r).range(this.xScales[n].range()),a=fi().domain(i).range(this.yScales[n].range()),[s,l,c]=tb(o,a);this.setCenters[n](s,l,c,!1);let u=!1,h=!1;e in this.zoomLocks&&(u=n in this.zoomLocks[e]),u&&this.handleUnlock(e,this.zoomLocks),e in this.locationLocks&&(h=n in this.locationLocks[e]),h&&this.handleUnlock(e,this.locationLocks),this.handleScalesChanged(n,o,a,!0),u&&this.addLock(e,n,this.zoomLocks,this.viewScalesLockData),h&&this.addLock(e,n,this.locationLocks,this.viewScalesLockData)}}}},{key:"validateLocks",value:function(e){const t=[];for(const n of mm(e))e[n]&&e[n][n]||t.push(n);for(const n of t)e[n]&&(console.warn(`View ${n} not present in lock group. Removing...`),this.handleUnlock(n,e),delete e[n])}},{key:"deserializeLocationLocks",value:function(e){if(this.locationLocks={},e.locationLocks)for(const t of mm(e.locationLocks.locksByViewUid))if("object"!=typeof e.locationLocks.locksByViewUid[t])this.locationLocks[t]=e.locationLocks.locksDict[e.locationLocks.locksByViewUid[t]];else{if("x"in e.locationLocks.locksByViewUid[t]){const n=e.locationLocks.locksDict[e.locationLocks.locksByViewUid[t].x.lock];this.locationLocksAxisWise.x[t]={lock:n,axis:e.locationLocks.locksByViewUid[t].x.axis}}if("y"in e.locationLocks.locksByViewUid[t]){const n=e.locationLocks.locksDict[e.locationLocks.locksByViewUid[t].y.lock];this.locationLocksAxisWise.y[t]={lock:n,axis:e.locationLocks.locksByViewUid[t].y.axis}}}this.validateLocks(this.locationLocks)}},{key:"deserializeZoomLocks",value:function(e){if(this.zoomLocks={},e.zoomLocks)for(const t of mm(e.zoomLocks.locksByViewUid))this.zoomLocks[t]=e.zoomLocks.locksDict[e.zoomLocks.locksByViewUid[t]];this.validateLocks(this.zoomLocks)}},{key:"deserializeValueScaleLocks",value:function(e){if(this.valueScaleLocks={},e.valueScaleLocks)for(const t of mm(e.valueScaleLocks.locksByViewUid))this.valueScaleLocks[t]=e.valueScaleLocks.locksDict[e.valueScaleLocks.locksByViewUid[t]]}},{key:"serializeLocks",value:function(e){const t={},n={};for(const r of mm(e)){let i=e[r]&&e[r].uid;i||(i=Ns.nice()),e[r].uid=i,t[i]=e[r],n[r]=e[r].uid}return{locksByViewUid:n,locksDict:t}}},{key:"getViewsAsJson",value:function(){const e=JSON.parse(JSON.stringify(this.state.viewConfig));return e.views=Object.values(this.state.views).map((e=>{const t=JSON.parse(JSON.stringify(e));return _g(t.tracks,(t=>{if(t.server){const e=lh(t.server,{});if(!e.hostname.length){const n=window.location.host,{protocol:r}=window.location,i=`${r}//${n}${e.pathname}`;t.server=i}}("viewport-projection-center"===t.type||"viewport-projection-horizontal"===t.type)&&this.projectionXDomains[e.uid]&&this.projectionXDomains[e.uid][t.uid]&&(t.projectionXDomain=this.projectionXDomains[e.uid][t.uid]),("viewport-projection-center"===t.type||"viewport-projection-vertical"===t.type)&&this.projectionYDomains[e.uid]&&this.projectionYDomains[e.uid][t.uid]&&(t.projectionYDomain=this.projectionYDomains[e.uid][t.uid]),delete t.name,delete t.position,delete t.header,delete t.description,delete t.created,delete t.project,delete t.project_name,delete t.serverUidKey,delete t.uuid,delete t.private,delete t.maxZoom,delete t.coordSystem,delete t.coordSystem2,delete t.datatype,delete t.maxWidth,delete t.datafile,delete t.binsPerDimension,delete t.resolutions,delete t.aggregationModes})),t.uid=e.uid,t.initialXDomain=this.xScales[e.uid].domain(),t.initialYDomain=this.yScales[e.uid].domain(),delete t.layout.i,t})),e.zoomLocks=this.serializeLocks(this.zoomLocks),e.locationLocks=this.serializeLocks(this.locationLocks),e.valueScaleLocks=this.serializeLocks(this.valueScaleLocks),e}},{key:"getViewsAsString",value:function(){return JSON.stringify(this.getViewsAsJson(),null,2)}},{key:"handleExportViewAsJSON",value:function(){bm("viewconf.json",this.getViewsAsString())}},{key:"handleExportViewsAsLink",value:function(e=this.state.viewConfig.exportViewUrl,t=!1){const n=new URL(e,window.location.origin),r=fetch(e,{method:"POST",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:`{"viewconf":${this.getViewsAsString()}}`,credentials:"same-origin"}).then((e=>{if(!e.ok)throw e;return e.json()})).catch((e=>{console.warn("err:",e)})).then((e=>({id:e.uid,url:`${n.origin}/l/?d=${e.uid}`})));return t||r.then((e=>{this.openModal(m.default.createElement(vne,{onDone:()=>{this.closeModalBound()},url:e.url}))})).catch((e=>console.error("Exporting view config as link failed:",e))),r}},{key:"handleDataDomainChanged",value:function(e,t,n){const{views:r}=this.state;if(r[e].initialXDomain=t,r[e].initialYDomain=n,this.xScales[e]=fi().domain(t),this.yScales[e]=fi().domain(n),this.zoomLocks[e]){const i=this.zoomLocks[e],o=fm(i);for(let e=0;e12)return!1;const a=gm(this.state.views);for(let n=0;nr&&ts)return!1}return!0}},{key:"handleAddView",value:function(e){const t=gm(this.state.views),n=e,r=[];12===e.layout.w&&(e.layout.w=6);for(let n=0;n{const n=e[1]-t[1];return 0===n?e[0]-t[0]:n}));const i=JSON.stringify(n),o=JSON.parse(i);o.initialXDomain=this.xScales[o.uid].domain(),o.initialYDomain=this.yScales[o.uid].domain(),[[o.layout.x,o.layout.y]]=r,o.uid=Ns.nice(),o.layout.i=o.uid,_g(o.tracks,(e=>{this.addCallbacks(o.uid,e)})),this.setState((e=>{const t=JSON.parse(JSON.stringify(e.views));return t[o.uid]=o,{views:t}}))}},{key:"handleSelectedAssemblyChanged",value:function(e,t,n,r){const{views:i}=this.state;i[e].genomePositionSearchBox.chromInfoId=t,i[e].genomePositionSearchBox.autocompleteId=n,i[e].genomePositionSearchBox.autocompleteServer=r}},{key:"createGenomePostionSearchBoxEntry",value:function(e,t){let n=e;const r={autocompleteServer:If,chromInfoServer:If,visible:!1};return n||(n=JSON.parse(JSON.stringify(r))),n.autocompleteServer||(n.autocompleteServer=r.autocompleteServer),n.chromInfoId||(n.chromInfoId=t),n.chromInfoServer||(n.chromInfoServer=r.chromInfoServer),n.visible||(n.visible=!1),n}},{key:"handleTogglePositionSearchBox",value:function(e){const t=this.state.views[e];t.genomePositionSearchBoxVisible=!t.genomePositionSearchBoxVisible;const n={};_g(t.tracks,(e=>{e.coordSystem&&(n[e.coordSystem]||(n[e.coordSystem]=0),n[e.coordSystem]+=1)}));const r=fm(n).sort(((e,t)=>t[1]-e[1]));let i="hg19";r.length&&(i=r[0][0]),t.genomePositionSearchBox=this.createGenomePostionSearchBoxEntry(t.genomePositionSearchBox,i),t.genomePositionSearchBox.visible=!t.genomePositionSearchBox.visible,this.refreshView(),this.setState({configMenuUid:null})}},{key:"handleTrackOptionsChanged",value:function(e,t,n){const r=this.state.views[e],i=vg(r.tracks,t);i&&(i.options=Object.assign(i.options,n),this.mounted&&(this.setState((e=>({views:e.views}))),this.adjustSplitHeatmapTrackOptions(i,n,r.tracks,e)))}},{key:"adjustSplitHeatmapTrackOptions",value:function(e,t,n,r){"heatmap"===e.type&&("upper-right"===t.extent&&"combined"===n.center[0].type&&n.center[0].contents.length>1&&n.center[0].contents.some((n=>{if("heatmap"===n.type&&n.uid!==e.uid&&"lower-left"!==n.options.extent){const i={...n.options,extent:"lower-left",labelPosition:"bottomLeft",colorbarPosition:"bottomLeft"},o={...t,labelPosition:"topRight",colorbarPosition:"topRight"};return this.handleTrackOptionsChanged(r,n.uid,i),this.handleTrackOptionsChanged(r,e.uid,o),!0}return!1})),"lower-left"===t.extent&&"lower-left"===t.extent&&"combined"===n.center[0].type&&n.center[0].contents.length>1&&n.center[0].contents.some((n=>{if("heatmap"===n.type&&n.uid!==e.uid&&"upper-right"!==n.options.extent){const i={...n.options,extent:"upper-right",labelPosition:"topRight",colorbarPosition:"topRight"},o={...t,labelPosition:"bottomLeft",colorbarPosition:"bottomLeft"};return this.handleTrackOptionsChanged(r,n.uid,i),this.handleTrackOptionsChanged(r,e.uid,o),!0}return!1})))}},{key:"handleViewOptionsChanged",value:function(e,t){const n=this.state.views[e];n&&(n.options=Object.assign(n.options||{},t),this.mounted&&this.setState((e=>({views:e.views}))))}},{key:"isTrackValid",value:function(e,t){return!("viewport-projection-center"===e.type&&!t.has(e.fromViewUid))}},{key:"removeInvalidTracks",value:function(e){const t=new Set(mm(e));for(const n of gm(e))for(const e of["left","top","center","right","bottom"])n.tracks&&n.tracks.hasOwnProperty(e)&&(n.tracks[e]=n.tracks[e].filter((e=>this.isTrackValid(e,t))),n.tracks[e].forEach((e=>{"combined"===e.type&&(e.contents=e.contents.filter((e=>this.isTrackValid(e,t))))})));return e}},{key:"processViewConfig",value:function(e){let{views:t}=e,n={};return e.views&&0!==e.views.length||(console.warn("No views provided in viewConfig"),t=[{editable:!0,tracks:{}}]),t.forEach((e=>{e.tracks&&vm(e.tracks),e.uid||(e.uid=Ns.nice()),n[e.uid]=e,this.zoomToDataExtentOnInit.has(e.uid)&&this.zoomToDataExtentOnInit.delete(e.uid),e.initialXDomain?(e.initialXDomain[0]=+e.initialXDomain[0],e.initialXDomain[1]=+e.initialXDomain[1]):(e.initialXDomain=[0,100],this.zoomToDataExtentOnInit.add(e.uid)),e.initialYDomain?(e.initialXDomain[0]=+e.initialXDomain[0],e.initialXDomain[1]=+e.initialXDomain[1]):e.initialYDomain=[e.initialXDomain[0],e.initialXDomain[1]],this.xScales[e.uid]||(this.xScales[e.uid]=fi().domain(e.initialXDomain)),this.yScales[e.uid]||(this.yScales[e.uid]=fi().domain(e.initialYDomain)),_g(e.tracks,(t=>{if(t.uid||(t.uid=Ns.nice()),this.addCallbacks(e.uid,t),this.addDefaultTrackOptions(t),t.contents)for(const e of t.contents)this.addDefaultTrackOptions(e)})),e.layout?e.layout.i=e.uid:e.layout=this.generateViewLayout(e)})),this.deserializeZoomLocks(e),this.deserializeLocationLocks(e),this.deserializeValueScaleLocks(e),n=this.removeInvalidTracks(n),n}},{key:"handleWindowFocused",value:function(){}},{key:"rangeSelectionHandler",value:function(e){this.rangeSelection=e,this.apiPublish("rangeSelection",e)}},{key:"offViewChange",value:function(e){this.viewChangeListener.splice(e,1)}},{key:"onViewChange",value:function(e){return this.viewChangeListener.push(e)-1}},{key:"triggerViewChange",value:function(){this.viewChangeListener.forEach((e=>e(this.getViewsAsString())))}},{key:"getGenomeLocation",value:function(e){return Qm.get(this.state.views[e].chromInfoPath).then((t=>nb(this.xScales[e],this.yScales[e],t)))}},{key:"offLocationChange",value:function(e,t){this.removeScalesChangedListener(e,t)}},{key:"zoomTo",value:function(e,t,n,r,i,o){if(!(e in this.setCenters))throw Error(`Invalid viewUid. Current uuids: ${Object.keys(this.setCenters).join(",")}`);if(Number.isNaN(+t)||Number.isNaN(+n)){const e=[t,n].join(", ");return void console.warn([`Invalid coordinates (${e}). All coordinates need to be numbers\n and should represent absolute coordinates (not chromosome\n coordinates).`].join(" "))}(Number.isNaN(+r)||Number.isNaN(+i)||null===r||null===i)&&(r=t,i=n);const[a,s,l]=tb(this.xScales[e].copy().domain([t,n]),this.yScales[e].copy().domain([r,i]));this.setCenters[e](a,s,l,!1,o)}},{key:"zoomToGene",value:function(e,t,n,r){if(!(e in this.setCenters))throw Error(`Invalid viewUid. Current uuids: ${Object.keys(this.setCenters).join(",")}`);this.state.views[e].genomePositionSearchBox&&this.state.views[e].genomePositionSearchBox.autocompleteServer&&this.state.views[e].genomePositionSearchBox.autocompleteId&&this.state.views[e].chromInfoPath?this.suggestGene(e,t,(i=>{if(i){const o=i.find((e=>e.geneName.toLowerCase()===t.toLowerCase()));if(o){const{chr:t,txStart:i,txEnd:a}=o;Uq(this.state.views[e].chromInfoPath,(o=>{const s=o.chrToAbs([t,i])-n,l=o.chrToAbs([t,a])+n,[c,u,h]=tb(this.xScales[e].copy().domain([s,l]),this.yScales[e].copy().domain([s,l]));this.setCenters[e](c,u,h,!1,r)}),this.pubSub)}else console.warn(`Couldn't find the gene symbol: ${t}`)}})):console.warn("Please set chromInfoPath, autocompleteServer, and autocompleteId to use the zoomToGene API")}},{key:"suggestGene",value:function(e,t,n){if(!(e in this.setCenters))throw Error(`Invalid viewUid. Current uuids: ${Object.keys(this.setCenters).join(",")}`);if(!this.state.views[e].genomePositionSearchBox||!this.state.views[e].genomePositionSearchBox.autocompleteServer||!this.state.views[e].genomePositionSearchBox.autocompleteId)return void console.warn("Please set autocompleteServer and autocompleteId to use the suggestGene API");const r=`${this.state.views[e].genomePositionSearchBox.autocompleteServer}/suggest/?d=${this.state.views[e].genomePositionSearchBox.autocompleteId}&ac=${t.toLowerCase()}`;mg.json(r,lb,this.pubSub).then((e=>{n(e)})).catch((e=>console.error(e)))}},{key:"onLocationChange",value:function(e,t,n){const r=Object.keys(this.state.views);if(!r.length)return this.unsetOnLocationChange.push({viewId:e,callback:t,callbackId:n}),null;if(void 0===(e=void 0===e&&1===r.length?r[0]:e)||-1===r.indexOf(e))return console.error("onLocationChange either missing a viewId or passed an invalid viewId: ",e),null;const i=this.state.views[e];let o=1;return this.scalesChangedListeners[i.uid]&&(o=Object.keys(this.scalesChangedListeners[i.uid]).filter((e=>0===e.indexOf(Cf))).map((e=>parseInt(e.slice(23),10))).reduce(((e,t)=>Math.max(e,t)),0)+1),this.addScalesChangedListener(i.uid,`${Cf}.${o}`,((e,n)=>{t({xDomain:e.domain(),yDomain:n.domain(),xRange:e.range(),yRange:n.range()})})),n&&n(`${Cf}.${o}`),o}},{key:"getTiledPlotAtPosition",value:function(e,t){let n;const r=gm(this.state.views);for(let i=0;i=l&&e<=u&&t>=s&&t<=c){n=o;break}}return n}},{key:"mouseMoveHandler",value:function(e){if(!this.topDiv||this.state.modal)return;const t=e.clientX,n=e.clientY,r=Ge(e,this.topDiv);r[1]+=this.scrollTop;const i=this.getTiledPlotAtPosition(t,n),o=i?i.listTracksAtPosition(r[0],r[1],!0).map((e=>e.originalTrack||e)):[],a=o.find((e=>!e.isAugmentationTrack)),s=a?[r[0]-a.position[0],r[1]-a.position[1]]:r;let l=-1,c=-1;a&&(l=a.flipText?a._xScale.invert(s[1]):a._xScale.invert(s[0]),c=a.is2d?a._yScale.invert(s[1]):l);const u={x:r[0],y:r[1],relTrackX:a&&a.flipText?s[1]:s[0],relTrackY:a&&a.flipText?s[0]:s[1],dataX:l,dataY:c,isFrom2dTrack:!(!a||!a.is2d),isFromVerticalTrack:!(!a||!a.flipText),track:a,origEvt:e,sourceUid:this.uid,hoveredTracks:o,noHoveredTracks:0===o.length};if(this.pubSub.publish("app.mouseMove",u),this.isBroadcastMousePositionGlobally){const e={...u};e.origEvt=void 0,e.track=void 0,e.hoveredTracks=void 0,delete e.origEvt,delete e.track,delete e.hoveredTracks,vh.publish("higlass.mouseMove",e)}this.apiPublish("cursorLocation",{absX:t,absY:n,relX:u.x,relY:u.y,relTrackX:u.relTrackX,relTrackY:u.relTrackY,dataX:u.dataX,dataY:u.dataY,isFrom2dTrack:u.isFrom2dTrack,isFromVerticalTrack:u.isFromVerticalTrack}),this.showHoverMenu(u)}},{key:"getMinMaxValue",value:function(e,t,n,r){const i=yg(this.tiledPlots,e,t);if(i){if(i.minVisibleValueInTiles&&i.maxVisibleValueInTiles)return n&&i.getAggregatedVisibleValue?[i.getAggregatedVisibleValue("min"),i.getAggregatedVisibleValue("max")]:[i.minVisibleValueInTiles(r),i.maxVisibleValueInTiles(r)];console.warn(`Track ${t} doesn't support the retrieval of min or max values.`)}else console.warn(`Track with ID: ${t} not found!`)}},{key:"showHoverMenu",value:function(e){const t=e.track&&e.track.getMouseOverHtml?e.track.getMouseOverHtml(e.relTrackX,e.relTrackY):"";if(e.track!==this.prevMouseHoverTrack&&this.prevMouseHoverTrack&&this.prevMouseHoverTrack.stopHover&&this.prevMouseHoverTrack.stopHover(),this.prevMouseHoverTrack=e.track,this.zooming)return;const n=t&&t.length?[1]:[];let r=Be("body").selectAll(".track-mouseover-menu").data(n);r.exit().remove(),r.enter().append("div").classed("track-mouseover-menu",!0).classed(voe,!0),r=Be("body").selectAll(".track-mouseover-menu");const i=Ge(e.origEvt,Be("body").node()),o=[i[0]-window.scrollX,i[1]-window.scrollY];if(r.style("left",`${o[0]}px`).style("top",`${o[1]}px`),!r.node())return;const a=r.node().getBoundingClientRect();a.x+a.width>window.innerWidth&&r.style("left",o[0]-a.width+"px"),a.y+a.height>window.innerHeight&&r.style("top",o[1]-a.height+"px"),r.html(t)}},{key:"hideHoverMenu",value:function(){Be("body").selectAll(".track-mouseover-menu").remove()}},{key:"closeCustomDialog",value:function(){this.setState((e=>({customDialog:null})))}},{key:"appClickHandler",value:function(e){this.apiPublish("click",e)}},{key:"canvasClickHandler",value:function(e){const t=e.nativeEvent||e,n=t.clientX,r=t.clientY,i=this.getTiledPlotAtPosition(n,r),o=Ge(t,this.topDiv);o[1]+=this.scrollTop;const a=i?i.listTracksAtPosition(o[0],o[1],!0).map((e=>e.originalTrack||e)):[],s=a.find((e=>!e.isAugmentationTrack)),l=s?[o[0]-s.position[0],o[1]-s.position[1]]:o,c=s&&s.flipText?l[1]:l[0],u=s&&s.flipText?l[0]:l[1];for(const e of this.iterateOverTracks()){const t=yg(this.tiledPlots,e.viewId,e.trackId);t.respondsToPosition(o[0],o[1])||t.clickOutside()}const h=[];for(const t of a)if(t.childTracks){for(const n of t.childTracks)h.push({trackUid:n.context.trackUid,viewUid:n.context.viewUid,trackType:n.context.trackType,data:n.click(c,u,e)});h.push({trackUid:t.context.trackUid,viewUid:t.context.viewUid,trackType:t.context.trackType,data:{type:"generic",event:e}})}else h.push({trackUid:t.context.trackUid,viewUid:t.context.viewUid,trackType:t.context.trackType,data:t.click(c,u,e)});const d=[];h.forEach(((e,t)=>{const n=yg(this.tiledPlots,e.viewUid,e.trackUid);if("function"==typeof n.clickDialog){const e=n.clickDialog();e&&d.push(e)}})),d.length>0&&this.setState((e=>({customDialog:d}))),this.pubSub.publish("app.click",h)}},{key:"mouseMoveZoomHandler",value:function(e){this.apiPublish("mouseMoveZoom",e)}},{key:"geneSearchHandler",value:function(e){this.apiPublish("geneSearch",e)}},{key:"mouseDownHandler",value:function(e){}},{key:"onScrollHandler",value:function(){this.props.options.sizeMode===_oe&&(this.scrollTop=this.scrollContainer.scrollTop,this.pixiStage.y=-this.scrollTop,this.pubSub.publish("app.scroll",this.scrollTop),this.animate())}},{key:"setTrackValueScaleLimits",value:function(e,t,n,r){const i=yg(this.tiledPlots,e,t);i?i.setFixedValueScaleMin&&i.setFixedValueScaleMax?(i.setFixedValueScaleMin(n),i.setFixedValueScaleMax(r),i.rerender(i.options,!0),i.animate()):console.warn("Track doesn't support fixed value scales."):console.warn(`Could't find track: ${t}`)}},{key:"setChromInfo",value:function(e,t){Uq(e,(e=>{this.chromInfo=e,t()}),this.pubSub)}},{key:"onMouseLeaveHandler",value:function(){this.pubSub.publish("app.mouseLeave"),this.hideHoverMenu(),this.animate()}},{key:"onBlurHandler",value:function(){this.animate()}},{key:"isZoomFixed",value:function(e){return this.props.zoomFixed||this.props.options.zoomFixed||this.state.viewConfig.zoomFixed||this.props.options.sizeMode===_oe||e&&e.zoomFixed}},{key:"trackDimensionsModifiedHandler",value:function(e){const t=this.state.views[e.viewId];if(!t)return;const n=vg(t.tracks,e.trackId);n&&(void 0!==e.height&&(n.height=e.height),void 0!==e.width&&(n.width=e.width),this.adjustLayoutToTrackSizes(t),this.setState((e=>({views:e.views}))))}},{key:"wheelHandler",value:function(e){if(this.state.modal||this.props.options.sizeMode===_oe)return;const t=e.nativeEvent||e,n=e.target===this.canvasElement;if(!kg(t.target,this.topDiv))return;if(this.isZoomFixed())return;const r=t.clientX,i=t.clientY,o=this.getTiledPlotAtPosition(r,i);if(this.apiStack.wheel&&this.apiStack.wheel.length>0){const e=Ge(t,this.topDiv);e[1]+=this.scrollTop;const n=o?o.listTracksAtPosition(e[0],e[1],!0).map((e=>e.originalTrack||e)):[],r=n.find((e=>!e.isAugmentationTrack)),i=r?[e[0]-r.position[0],e[1]-r.position[1]]:e,a={x:e[0],y:e[1],relTrackX:r&&r.flipText?i[1]:i[0],relTrackY:r&&r.flipText?i[0]:i[1],track:r,origEvt:t,sourceUid:this.uid,hoveredTracks:n,noHoveredTracks:0===n.length};this.apiPublish("wheel",a)}if(t.forwarded||n)return e.stopPropagation(),void e.preventDefault();if(e.preventDefault(),o){const{trackRenderer:e}=o;t.forwarded=!0,t&&(_m(t,e.eventTracker),t.preventDefault())}}},{key:"render",value:function(){this.tiledAreasDivs={},this.tiledAreas=m.default.createElement("div",{className:boe}),this.mounted&&(this.tiledAreas=gm(this.state.views).map((e=>{const t=e.uid===this.state.addTrackPositionMenuUid?this.state.addTrackPositionMenuPosition:null;let n=null;if(this.state.chooseViewHandler){let t="transparent";this.state.mouseOverOverlayUid===e.uid&&(t="green"),n=m.default.createElement("div",{className:"tiled-plot-overlay",onClick:()=>this.state.chooseViewHandler(e.uid),onMouseEnter:()=>this.handleOverlayMouseEnter(e.uid),onMouseLeave:()=>this.handleOverlayMouseLeave(e.uid),onMouseMove:()=>this.handleOverlayMouseEnter(e.uid),style:{position:"absolute",width:"100%",height:"100%",background:t,opacity:.3,zIndex:1}})}const r=m.default.createElement(Dte,{key:`tp${e.uid}`,ref:t=>{this.tiledPlots[e.uid]=t},addTrackPosition:this.state.addTrackPositionView===e.uid?this.state.addTrackPosition:null,addTrackPositionMenuPosition:t,canvasElement:this.state.canvasElement,chooseTrackHandler:this.state.chooseTrackHandler?t=>this.state.chooseTrackHandler(e.uid,t):null,customDialog:this.state.customDialog,closeCustomDialog:()=>this.closeCustomDialog(),chromInfoPath:e.chromInfoPath,disableTrackMenu:this.isTrackMenuDisabled(),draggingHappening:null!==this.state.draggingHappening,editable:this.isEditable(),getLockGroupExtrema:t=>this.getLockGroupExtrema(e.uid,t),initialXDomain:e.initialXDomain,initialYDomain:e.initialYDomain,isShowGlobalMousePosition:this.isShowGlobalMousePosition,isValueScaleLocked:t=>this.isValueScaleLocked(e.uid,t),marginBottom:this.viewMarginBottom,marginLeft:this.viewMarginLeft,marginRight:this.viewMarginRight,marginTop:this.viewMarginTop,metaTracks:e.metaTracks,mouseTool:this.state.mouseTool,onChangeTrackData:(t,n)=>this.handleChangeTrackData(e.uid,t,n),onChangeTrackType:(t,n)=>this.handleChangeTrackType(e.uid,t,n),onCloseTrack:t=>this.handleCloseTrack(e.uid,t),onDataDomainChanged:(t,n)=>this.handleDataDomainChanged(e.uid,t,n),onLockValueScale:t=>this.handleLockValueScale(e.uid,t),onMouseMoveZoom:this.mouseMoveZoomHandler.bind(this),onNewTilesLoaded:t=>this.handleNewTilesLoaded(e.uid,t),onNoTrackAdded:this.handleNoTrackAdded.bind(this),onRangeSelection:this.rangeSelectionHandler.bind(this),onResizeTrack:this.triggerViewChangeDb,onScalesChanged:(t,n)=>this.handleScalesChanged(e.uid,t,n),onTrackOptionsChanged:(t,n)=>this.handleTrackOptionsChanged(e.uid,t,n),onTrackPositionChosen:this.handleTrackPositionChosen.bind(this),onTracksAdded:(t,n,r)=>this.handleTracksAdded(e.uid,t,n,r),onUnlockValueScale:t=>this.handleUnlockValueScale(e.uid,t),onValueScaleChanged:t=>this.syncValueScales(e.uid,t),overlays:e.overlays,paddingBottom:this.viewPaddingBottom,paddingLeft:this.viewPaddingLeft,paddingRight:this.viewPaddingRight,paddingTop:this.viewPaddingTop,pixiRenderer:this.pixiRenderer,pixiStage:this.pixiStage,pluginDataFetchers:this.pluginDataFetchers,pluginTracks:this.pluginTracks,rangeSelection1dSize:this.state.rangeSelection1dSize,rangeSelectionToInt:this.state.rangeSelectionToInt,registerDraggingChangedListener:t=>this.addDraggingChangedListener(e.uid,e.uid,t),removeDraggingChangedListener:t=>this.removeDraggingChangedListener(e.uid,e.uid,t),setCentersFunction:t=>{this.setCenters[e.uid]=t},svgElement:this.state.svgElement,tracks:e.tracks,trackSourceServers:this.state.viewConfig.trackSourceServers,uid:e.uid,verticalMargin:this.verticalMargin,viewOptions:e.options,xDomainLimits:e.xDomainLimits,yDomainLimits:e.yDomainLimits,zoomable:!this.isZoomFixed(e),zoomLimits:this.calculateZoomLimits(e,e.initialXDomain),zoomToDataExtentOnInit:()=>this.zoomToDataExtentOnInit.has(e.uid)}),i=!this.isEditable()||this.isViewHeaderDisabled()||this.state.viewConfig.hideHeader?null:m.default.createElement(Pne,{ref:t=>{this.viewHeaders[e.uid]=t},getGenomePositionSearchBox:(t,n)=>e.genomePositionSearchBox?m.default.createElement(gne,{key:`gpsb${e.uid}`,ref:t=>{this.genomePositionSearchBoxes[e.uid]=t},autocompleteId:e.genomePositionSearchBox.autocompleteId,autocompleteServer:e.genomePositionSearchBox.autocompleteServer,chromInfoId:e.genomePositionSearchBox.chromInfoId,chromInfoPath:e.genomePositionSearchBox.chromInfoPath,chromInfoServer:e.genomePositionSearchBox.chromInfoServer,hideAvailableAssemblies:e.genomePositionSearchBox.hideAvailableAssemblies,isFocused:t,onFocus:n,onGeneSearch:this.geneSearchHandler.bind(this),onSelectedAssemblyChanged:(t,n,r)=>this.handleSelectedAssemblyChanged(e.uid,t,n,r),registerViewportChangedListener:t=>this.addScalesChangedListener(e.uid,e.uid,t),removeViewportChangedListener:()=>this.removeScalesChangedListener(e.uid,e.uid),setCenters:(t,n,r,i)=>this.setCenters[e.uid](t,n,r,!1,i),trackSourceServers:this.state.viewConfig.trackSourceServers,twoD:!!(e.tracks.left.length||e.tracks.right.length||e.tracks.center.length)}):null,isGenomePositionSearchBoxVisible:e.genomePositionSearchBox&&e.genomePositionSearchBox.visible,mouseTool:this.state.mouseTool,onAddView:()=>this.handleAddView(e),onClearView:()=>this.handleClearView(e.uid),onCloseView:()=>this.handleCloseView(e.uid),onEditViewConfig:this.handleEditViewConfigBound,onExportPNG:this.handleExportPNG.bind(this),onExportSVG:this.handleExportSVG.bind(this),onExportViewsAsJSON:this.handleExportViewAsJSON.bind(this),onExportViewsAsLink:this.handleExportViewsAsLink.bind(this),onLockLocation:e=>this.handleYankFunction(e,this.handleLocationLockChosen.bind(this)),onLockZoom:e=>this.handleYankFunction(e,this.handleZoomLockChosen.bind(this)),onLockZoomAndLocation:e=>this.handleYankFunction(e,((e,t)=>{this.handleZoomLockChosen(e,t),this.handleLocationLockChosen(e,t)})),onProjectViewport:this.handleProjectViewport.bind(this),onTakeAndLockZoomAndLocation:e=>{this.handleYankFunction(e,((e,t)=>{this.handleZoomYanked(e,t),this.handleLocationYanked(e,t),this.handleZoomLockChosen(e,t),this.handleLocationLockChosen(e,t)}))},onTogglePositionSearchBox:this.handleTogglePositionSearchBox.bind(this),onTrackPositionChosen:t=>this.handleTrackPositionChosen(e.uid,t),onUnlockLocation:e=>this.handleUnlock(e,this.locationLocks),onUnlockZoom:e=>this.handleUnlock(e,this.zoomLocks),onUnlockZoomAndLocation:e=>{this.handleUnlock(e,this.zoomLocks),this.handleUnlock(e,this.locationLocks)},onViewOptionsChanged:t=>this.handleViewOptionsChanged(e.uid,t),onYankLocation:e=>this.handleYankFunction(e,this.handleLocationYanked.bind(this)),onYankZoom:e=>this.handleYankFunction(e,this.handleZoomYanked.bind(this)),onYankZoomAndLocation:e=>this.handleYankFunction(e,((e,t)=>{this.handleZoomYanked(e,t),this.handleLocationYanked(e,t)})),onZoomToData:e=>this.handleZoomToData(e),viewUid:e.uid});return m.default.createElement("div",{key:e.uid,ref:t=>{this.tiledAreasDivs[e.uid]=t},className:boe},i,r,n)})));let e=this.mounted?Object.values(this.state.views).filter((e=>e.layout)).map((e=>e.layout)):[];e=JSON.parse(JSON.stringify(e));const t=this.isEditable()?10:0,n=this.isEditable()?10:0,r=+this.props.options.containerPaddingX>=0?+this.props.options.containerPaddingX:t,i=+this.props.options.containerPaddingY>=0?+this.props.options.containerPaddingY:n,o=m.default.createElement(Ru,{ref:e=>{this.gridLayout=e},cols:12,containerPadding:[r,i],draggableHandle:`.${Mf["multitrack-header-grabber"]}`,isDraggable:this.isEditable(),isResizable:this.isEditable(),layout:e,margin:this.isEditable()?[10,10]:[0,0],measureBeforeMount:!1,onBreakpointChange:this.onBreakpointChange.bind(this),onDragStart:this.handleDragStart.bind(this),onDragStop:this.handleDragStop.bind(this),onLayoutChange:this.handleLayoutChange.bind(this),onResize:this.resizeHandler.bind(this),rowHeight:this.state.rowHeight,useCSSTransforms:this.mounted,verticalCompact:this.state.viewConfig.compactLayout,width:this.state.width},this.tiledAreas);return m.default.createElement("div",{key:this.uid,ref:e=>{this.topDiv=e},className:gl("higlass",{"higlass-dark-theme":this.theme===Pf,"higlass-container-overflow":this.props.options.sizeMode===Toe||this.props.options.sizeMode===_oe}),onMouseLeave:this.onMouseLeaveHandlerBound,onMouseMove:this.mouseMoveHandlerBound},m.default.createElement(_H,{value:this.pubSub},m.default.createElement(Z0,{value:this.modal},m.default.createElement(Zj,{value:this.theme},this.state.modal,m.default.createElement("canvas",{key:this.uid,ref:e=>{this.canvasElement=e},onClick:this.canvasClickHandlerBound,className:foe}),m.default.createElement("div",{ref:e=>{this.scrollContainer=e},className:gl("higlass-scroll-container",{"higlass-scroll-container-overflow":this.props.options.sizeMode===Toe,"higlass-scroll-container-scroll":this.props.options.sizeMode===_oe}),onScroll:this.onScrollHandlerBound},m.default.createElement("div",{ref:e=>{this.divDrawingSurface=e},className:gl("higlass-drawing-surface",moe)},o),m.default.createElement("svg",{ref:e=>{this.svgElement=e},className:goe,style:{position:"absolute",width:"100%",height:"100%",left:0,top:0,pointerEvents:"none"}}))))))}}]),n}(m.default.Component);Eoe.defaultProps={options:{},zoomFixed:!1,compactLayout:!0},Eoe.propTypes={getApi:S.exports.func,options:S.exports.object,viewConfig:S.exports.oneOfType([S.exports.string,S.exports.object]).isRequired,zoomFixed:S.exports.bool,compactLayout:S.exports.bool};const xoe=Eoe,woe=(e,[t,n,r,i],o)=>{o.options.colorbarPosition||(o.options.colorbarPosition="hidden"),o.options.labelPosition||(o.options.labelPosition="hidden");const a="arbitary-id";return{id:a,hgApi:Aoe(e,{editable:!1,zoomFixed:!1,views:[{uid:a,initialXDomain:[t,n],initialYDomain:[r,i],tracks:{center:[o]},layout:{w:12,h:12,x:0,y:0,moved:!1,static:!1}}]},{sizeMode:"bounded"})}};let Soe=function(e){i(n,e);var t=o(n);function n(e){var r;return d(this,n),(r=t.call(this,e)).id=`id-${Math.random()}`,r}return f(n,[{key:"componentDidMount",value:function(){this.initTrackViewer()}},{key:"shouldComponentUpdate",value:function(e){const{x:t,y:n,width:r,height:i}=e;return this.zoomTo(t,n,r,i),!1}},{key:"initTrackViewer",value:function(){const{trackConfig:e,x:t,y:n,width:r,height:i}=this.props,o=document.getElementById(this.id),{id:a,hgApi:s}=woe(o,[t,t+r,n,n+i],e);this.viewUid=a,this.viewer=s}},{key:"zoomTo",value:function(e,t,n,r){this.viewer.zoomTo(this.viewUid,e,e+n,t,t+r)}},{key:"render",value:function(){return m.default.createElement("div",{id:this.id,style:{height:"100%",width:"100%"}})}}]),n}(m.default.Component);Soe.propTypes={trackConfig:S.exports.object,width:S.exports.number,height:S.exports.number,x:S.exports.number,y:S.exports.number};const koe={SVGTrack:IW,TiledPixiTrack:eW,HorizontalGeneAnnotationsTrack:Pq},Aoe=(e,t,n)=>((e,t,n)=>{const r=m.default.createRef();return g.default.render(m.default.createElement(xoe,{ref:r,options:n||{},viewConfig:t}),e),r.current})(e,t,n).api;t.ChromosomeInfo=Uq,t.HiGlassComponent=xoe,t.HiGlassTrackComponent=Soe,t.getTrackObjectFromHGC=Sb,t.mountHGComponent=SU,t.schema=uoe,t.trackViewer=woe,t.tracks=koe,t.version=Y0,t.viewer=Aoe,t.waitForJsonComplete=xU,t.waitForTilesLoaded=wU,t.waitForTransitionsFinished=EU,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}(t,n(7294),n(3935),n(3832))},8679:(e,t,n)=>{"use strict";var r=n(9864),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||i}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var c=Object.defineProperty,u=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var a=u(n);h&&(a=a.concat(h(n)));for(var s=l(t),m=l(n),g=0;g{t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<>1,u=-7,h=n?i-1:0,d=n?-1:1,p=e[t+h];for(h+=d,o=p&(1<<-u)-1,p>>=-u,u+=s;u>0;o=256*o+e[t+h],h+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+h],h+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(a++,l/=2),a+h>=u?(s=0,a=u):a+h>=1?(s=(t*l-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[n+p]=255&s,p+=f,s/=256,i-=8);for(a=a<0;e[n+p]=255&a,p+=f,a/=256,c-=8);e[n+p-f]|=128*m}},2940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){for(var n=0;n{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var o,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l{var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,b=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,T=String.prototype.toUpperCase,_=String.prototype.toLowerCase,E=RegExp.prototype.test,x=Array.prototype.concat,w=Array.prototype.join,S=Array.prototype.slice,k=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,O="function"==typeof Symbol&&"object"==typeof Symbol.iterator,D="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,N=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||E.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-k(-e):k(e);if(r!==e){var i=String(r),o=v.call(t,i.length+1);return y.call(i,n,"$&_")+"."+y.call(y.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(t,n,"$&_")}var M=n(4654),L=M.custom,B=G(L)?L:null;function F(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function U(e){return y.call(String(e),/"/g,""")}function j(e){return!("[object Array]"!==W(e)||D&&"object"==typeof e&&D in e)}function H(e){return!("[object RegExp]"!==W(e)||D&&"object"==typeof e&&D in e)}function G(e){if(O)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!I)return!1;try{return I.call(e),!0}catch(e){}return!1}e.exports=function e(t,r,i,s){var l=r||{};if(V(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!V(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var T=l.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Y(t,l);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var E=String(t);return T?R(t,E):E}if("bigint"==typeof t){var k=String(t)+"n";return T?R(t,k):k}var C=void 0===l.depth?5:l.depth;if(void 0===i&&(i=0),i>=C&&C>0&&"object"==typeof t)return j(t)?"[Array]":"[Object]";var L,z=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=w.call(Array(e.indent+1)," ")}return{base:n,prev:w.call(Array(t+1),n)}}(l,i);if(void 0===s)s=[];else if(X(s,t)>=0)return"[Circular]";function q(t,n,r){if(n&&(s=S.call(s)).push(n),r){var o={depth:l.depth};return V(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),e(t,o,i+1,s)}return e(t,l,i+1,s)}if("function"==typeof t&&!H(t)){var ee=function(e){if(e.name)return e.name;var t=b.call(g.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}(t),te=J(t,q);return"[Function"+(ee?": "+ee:" (anonymous)")+"]"+(te.length>0?" { "+w.call(te,", ")+" }":"")}if(G(t)){var ne=O?y.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):I.call(t);return"object"!=typeof t||O?ne:$(ne)}if((L=t)&&"object"==typeof L&&("undefined"!=typeof HTMLElement&&L instanceof HTMLElement||"string"==typeof L.nodeName&&"function"==typeof L.getAttribute)){for(var re="<"+_.call(String(t.nodeName)),ie=t.attributes||[],oe=0;oe"}if(j(t)){if(0===t.length)return"[]";var ae=J(t,q);return z&&!function(e){for(var t=0;t=0)return!1;return!0}(ae)?"["+Z(ae,z)+"]":"[ "+w.call(ae,", ")+" ]"}if(function(e){return!("[object Error]"!==W(e)||D&&"object"==typeof e&&D in e)}(t)){var se=J(t,q);return"cause"in Error.prototype||!("cause"in t)||P.call(t,"cause")?0===se.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(se,", ")+" }":"{ ["+String(t)+"] "+w.call(x.call("[cause]: "+q(t.cause),se),", ")+" }"}if("object"==typeof t&&m){if(B&&"function"==typeof t[B]&&M)return M(t,{depth:C-i});if("symbol"!==m&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!o||!e||"object"!=typeof e)return!1;try{o.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var le=[];return a&&a.call(t,(function(e,n){le.push(q(n,t,!0)+" => "+q(e,t))})),Q("Map",o.call(t),le,z)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{o.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var ce=[];return u&&u.call(t,(function(e){ce.push(q(e,t))})),Q("Set",c.call(t),ce,z)}if(function(e){if(!h||!e||"object"!=typeof e)return!1;try{h.call(e,h);try{d.call(e,d)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return K("WeakMap");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{d.call(e,d);try{h.call(e,h)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return K("WeakSet");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{return p.call(e),!0}catch(e){}return!1}(t))return K("WeakRef");if(function(e){return!("[object Number]"!==W(e)||D&&"object"==typeof e&&D in e)}(t))return $(q(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return $(q(A.call(t)));if(function(e){return!("[object Boolean]"!==W(e)||D&&"object"==typeof e&&D in e)}(t))return $(f.call(t));if(function(e){return!("[object String]"!==W(e)||D&&"object"==typeof e&&D in e)}(t))return $(q(String(t)));if("undefined"!=typeof window&&t===window)return"{ [object Window] }";if(t===n.g)return"{ [object globalThis] }";if(!function(e){return!("[object Date]"!==W(e)||D&&"object"==typeof e&&D in e)}(t)&&!H(t)){var ue=J(t,q),he=N?N(t)===Object.prototype:t instanceof Object||t.constructor===Object,de=t instanceof Object?"":"null prototype",pe=!he&&D&&Object(t)===t&&D in t?v.call(W(t),8,-1):de?"Object":"",fe=(he||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(pe||de?"["+w.call(x.call([],pe||[],de||[]),": ")+"] ":"");return 0===ue.length?fe+"{}":z?fe+"{"+Z(ue,z)+"}":fe+"{ "+w.call(ue,", ")+" }"}return String(t)};var z=Object.prototype.hasOwnProperty||function(e){return e in this};function V(e,t){return z.call(e,t)}function W(e){return m.call(e)}function X(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Y(v.call(e,0,t.maxStringLength),t)+r}return F(y.call(y.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,q),"single",t)}function q(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+T.call(t.toString(16))}function $(e){return"Object("+e+")"}function K(e){return e+" { ? }"}function Q(e,t,n,r){return e+" ("+t+") {"+(r?Z(n,r):w.call(n,", "))+"}"}function Z(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+w.call(e,","+n)+"\n"+t.prev}function J(e,t){var n=j(e),r=[];if(n){r.length=e.length;for(var i=0;i{"use strict";e.exports=(e,t={})=>{if(!e)return;const n={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?))?((((?:[^?#/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@/]*@)([^:/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#/]*\.[^?#/.]+(?:[?#]|$)))*\/?)?([^?#/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=n.parser[t.strictMode?"strict":"loose"].exec(e),i={};let o=14;for(;o--;)i[n.key[o]]=r[o]||"";return i[n.q.name]={},i[n.key[12]].replace(n.q.parser,(function(e,t,r){t&&(i[n.q.name][t]=r)})),i}},3832:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ALPHA_MODES:()=>x,AbstractBatchRenderer:()=>Nr,AbstractRenderer:()=>Sr,AccessibilityManager:()=>mt,AnimatedSprite:()=>Qa,AppLoaderPlugin:()=>fi,Application:()=>jr,Attribute:()=>nn,BLEND_MODES:()=>m,BUFFER_BITS:()=>f,BasePrepare:()=>So,BaseRenderTexture:()=>$t,BaseTexture:()=>Mt,BatchDrawCall:()=>Or,BatchGeometry:()=>Mr,BatchPluginFactory:()=>Fr,BatchRenderer:()=>Ur,BatchShaderGenerator:()=>Rr,BatchTextureArray:()=>Dr,BitmapFont:()=>na,BitmapFontData:()=>$o,BitmapFontLoader:()=>aa,BitmapText:()=>oa,Bounds:()=>ot,Buffer:()=>on,CLEAR_MODES:()=>w,Circle:()=>ze,Container:()=>ht,CountLimiter:()=>bo,DEG_TO_RAD:()=>He,DRAW_MODES:()=>g,DisplayObject:()=>lt,ENV:()=>d,Ellipse:()=>Ve,Extract:()=>zr,FORMATS:()=>b,FillStyle:()=>xi,Filter:()=>tr,FilterState:()=>gn,Framebuffer:()=>qt,GC_MODES:()=>S,GLFramebuffer:()=>En,GLProgram:()=>mr,GLTexture:()=>_r,GRAPHICS_CURVES:()=>Ei,Geometry:()=>hn,Graphics:()=>Ji,GraphicsData:()=>Xi,GraphicsGeometry:()=>$i,IGLUniformData:()=>fr,InteractionData:()=>yt,InteractionEvent:()=>_t,InteractionManager:()=>kt,InteractionTrackingData:()=>Et,LINE_CAP:()=>vi,LINE_JOIN:()=>bi,LineStyle:()=>Ki,Loader:()=>pi,LoaderResource:()=>ui,MASK_TYPES:()=>A,MIPMAP_MODES:()=>E,MSAA_QUALITY:()=>C,MaskData:()=>Cn,Matrix:()=>$e,Mesh:()=>Wo,MeshBatchUvs:()=>Go,MeshGeometry:()=>Yo,MeshMaterial:()=>Xo,NineSlicePlane:()=>$a,ObjectRenderer:()=>vn,ObservablePoint:()=>qe,PI_2:()=>Ue,PRECISION:()=>k,ParticleContainer:()=>yi,ParticleRenderer:()=>_i,PlaneGeometry:()=>Va,Point:()=>Ye,Polygon:()=>We,Prepare:()=>Io,Program:()=>Zn,Quad:()=>dn,QuadUv:()=>pn,RAD_TO_DEG:()=>je,RENDERER_TYPE:()=>p,Rectangle:()=>Ge,RenderTexture:()=>en,RenderTexturePool:()=>tn,Renderer:()=>kr,RopeGeometry:()=>Wa,RoundedRectangle:()=>Xe,Runner:()=>At,SCALE_MODES:()=>T,SHAPES:()=>Fe,Shader:()=>Jn,SimpleMesh:()=>qa,SimplePlane:()=>Ya,SimpleRope:()=>Xa,Sprite:()=>ro,SpriteMaskFilter:()=>ir,Spritesheet:()=>Do,SpritesheetLoader:()=>Po,State:()=>er,System:()=>Xt,TARGETS:()=>v,TEXT_GRADIENT:()=>Li,TYPES:()=>y,TemporaryDisplayObject:()=>ct,Text:()=>mo,TextMetrics:()=>ho,TextStyle:()=>so,Texture:()=>Zt,TextureLoader:()=>di,TextureMatrix:()=>rr,TextureUvs:()=>Kt,Ticker:()=>bt,TickerPlugin:()=>vt,TilingSprite:()=>Lo,TilingSpriteRenderer:()=>Uo,TimeLimiter:()=>Oo,Transform:()=>it,UPDATE_PRIORITY:()=>pt,UniformGroup:()=>mn,VERSION:()=>ns,ViewableBuffer:()=>Pr,WRAP_MODES:()=>_,accessibleTarget:()=>dt,autoDetectRenderer:()=>Ar,checkMaxIfStatementsInShader:()=>$n,defaultFilterVertex:()=>Ir,defaultVertex:()=>Cr,filters:()=>rs,graphicsUtils:()=>Wi,groupD8:()=>rt,interactiveTarget:()=>wt,isMobile:()=>W,resources:()=>Wt,settings:()=>X,systems:()=>xr,uniformParsers:()=>Vn,useDeprecated:()=>ts,utils:()=>r});var r={};n.r(r),n.d(r,{BaseTextureCache:()=>Ce,CanvasRenderTarget:()=>De,DATA_URI:()=>Re,EventEmitter:()=>q(),ProgramCache:()=>ke,TextureCache:()=>Ae,clearTextureCache:()=>Oe,correctBlendMode:()=>ce,createIndicesForQuads:()=>pe,decomposeDataUri:()=>Me,deprecation:()=>Se,destroyTextureCache:()=>Ie,determineCrossOrigin:()=>Le,earcut:()=>K(),getBufferType:()=>fe,getResolutionOfUrl:()=>Be,hex2rgb:()=>ie,hex2string:()=>oe,interleaveTypedArrays:()=>ge,isMobile:()=>W,isPow2:()=>ve,isWebGLSupported:()=>re,log2:()=>ye,nextPow2:()=>be,premultiplyBlendMode:()=>le,premultiplyRgba:()=>ue,premultiplyTint:()=>he,premultiplyTintToRgba:()=>de,removeItems:()=>Te,rgb2hex:()=>se,sayHello:()=>ne,sign:()=>_e,skipHello:()=>te,string2hex:()=>ae,trimCanvas:()=>Pe,uid:()=>xe,url:()=>Q});var i=n(6713),o=n(7418),a=n.n(o);if(window.Promise||(window.Promise=i.Polyfill),Object.assign||(Object.assign=a()),Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!window.performance||!window.performance.now){var s=Date.now();window.performance||(window.performance={}),window.performance.now=function(){return Date.now()-s}}for(var l=Date.now(),c=["ms","moz","webkit","o"],u=0;u0?1:-1}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array);var d,p,f,m,g,b,v,y,T,_,E,x,w,S,k,A,C,I=/iPhone/i,O=/iPod/i,D=/iPad/i,P=/\biOS-universal(?:.+)Mac\b/i,N=/\bAndroid(?:.+)Mobile\b/i,R=/Android/i,M=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,L=/Silk/i,B=/Windows Phone/i,F=/\bWindows(?:.+)ARM\b/i,U=/BlackBerry/i,j=/BB10/i,H=/Opera Mini/i,G=/\b(CriOS|Chrome)(?:.+)Mobile/i,z=/Mobile(?:.+)Firefox\b/i,V=function(e){return void 0!==e&&"MacIntel"===e.platform&&"number"==typeof e.maxTouchPoints&&e.maxTouchPoints>1&&"undefined"==typeof MSStream},W=function(e){var t={userAgent:"",platform:"",maxTouchPoints:0};e||"undefined"==typeof navigator?"string"==typeof e?t.userAgent=e:e&&e.userAgent&&(t={userAgent:e.userAgent,platform:e.platform,maxTouchPoints:e.maxTouchPoints||0}):t={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=t.userAgent,r=n.split("[FBAN");void 0!==r[1]&&(n=r[0]),void 0!==(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(e){return function(t){return t.test(e)}}(n),o={apple:{phone:i(I)&&!i(B),ipod:i(O),tablet:!i(I)&&(i(D)||V(t))&&!i(B),universal:i(P),device:(i(I)||i(O)||i(D)||i(P)||V(t))&&!i(B)},amazon:{phone:i(M),tablet:!i(M)&&i(L),device:i(M)||i(L)},android:{phone:!i(B)&&i(M)||!i(B)&&i(N),tablet:!i(B)&&!i(M)&&!i(N)&&(i(L)||i(R)),device:!i(B)&&(i(M)||i(L)||i(N)||i(R))||i(/\bokhttp\b/i)},windows:{phone:i(B),tablet:i(F),device:i(B)||i(F)},other:{blackberry:i(U),blackberry10:i(j),opera:i(H),firefox:i(z),chrome:i(G),device:i(U)||i(j)||i(H)||i(z)||i(G)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(window.navigator),X={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:function(e){var t,n=!0;(W.tablet||W.phone)&&(W.apple.device&&(t=navigator.userAgent.match(/OS (\d+)_(\d+)?/))&&parseInt(t[1],10)<11&&(n=!1),W.android.device&&(t=navigator.userAgent.match(/Android\s([0-9.]*)/))&&parseInt(t[1],10)<7&&(n=!1));return n?32:4}(),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:W.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:!W.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},Y=n(6729),q=n.n(Y),$=n(9187),K=n.n($),Q=n(8575);!function(e){e[e.WEBGL_LEGACY=0]="WEBGL_LEGACY",e[e.WEBGL=1]="WEBGL",e[e.WEBGL2=2]="WEBGL2"}(d||(d={})),function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.WEBGL=1]="WEBGL",e[e.CANVAS=2]="CANVAS"}(p||(p={})),function(e){e[e.COLOR=16384]="COLOR",e[e.DEPTH=256]="DEPTH",e[e.STENCIL=1024]="STENCIL"}(f||(f={})),function(e){e[e.NORMAL=0]="NORMAL",e[e.ADD=1]="ADD",e[e.MULTIPLY=2]="MULTIPLY",e[e.SCREEN=3]="SCREEN",e[e.OVERLAY=4]="OVERLAY",e[e.DARKEN=5]="DARKEN",e[e.LIGHTEN=6]="LIGHTEN",e[e.COLOR_DODGE=7]="COLOR_DODGE",e[e.COLOR_BURN=8]="COLOR_BURN",e[e.HARD_LIGHT=9]="HARD_LIGHT",e[e.SOFT_LIGHT=10]="SOFT_LIGHT",e[e.DIFFERENCE=11]="DIFFERENCE",e[e.EXCLUSION=12]="EXCLUSION",e[e.HUE=13]="HUE",e[e.SATURATION=14]="SATURATION",e[e.COLOR=15]="COLOR",e[e.LUMINOSITY=16]="LUMINOSITY",e[e.NORMAL_NPM=17]="NORMAL_NPM",e[e.ADD_NPM=18]="ADD_NPM",e[e.SCREEN_NPM=19]="SCREEN_NPM",e[e.NONE=20]="NONE",e[e.SRC_OVER=0]="SRC_OVER",e[e.SRC_IN=21]="SRC_IN",e[e.SRC_OUT=22]="SRC_OUT",e[e.SRC_ATOP=23]="SRC_ATOP",e[e.DST_OVER=24]="DST_OVER",e[e.DST_IN=25]="DST_IN",e[e.DST_OUT=26]="DST_OUT",e[e.DST_ATOP=27]="DST_ATOP",e[e.ERASE=26]="ERASE",e[e.SUBTRACT=28]="SUBTRACT",e[e.XOR=29]="XOR"}(m||(m={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(g||(g={})),function(e){e[e.RGBA=6408]="RGBA",e[e.RGB=6407]="RGB",e[e.ALPHA=6406]="ALPHA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(b||(b={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(v||(v={})),function(e){e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.FLOAT=5126]="FLOAT",e[e.HALF_FLOAT=36193]="HALF_FLOAT"}(y||(y={})),function(e){e[e.NEAREST=0]="NEAREST",e[e.LINEAR=1]="LINEAR"}(T||(T={})),function(e){e[e.CLAMP=33071]="CLAMP",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(_||(_={})),function(e){e[e.OFF=0]="OFF",e[e.POW2=1]="POW2",e[e.ON=2]="ON"}(E||(E={})),function(e){e[e.NPM=0]="NPM",e[e.UNPACK=1]="UNPACK",e[e.PMA=2]="PMA",e[e.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",e[e.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",e[e.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(x||(x={})),function(e){e[e.NO=0]="NO",e[e.YES=1]="YES",e[e.AUTO=2]="AUTO",e[e.BLEND=0]="BLEND",e[e.CLEAR=1]="CLEAR",e[e.BLIT=2]="BLIT"}(w||(w={})),function(e){e[e.AUTO=0]="AUTO",e[e.MANUAL=1]="MANUAL"}(S||(S={})),function(e){e.LOW="lowp",e.MEDIUM="mediump",e.HIGH="highp"}(k||(k={})),function(e){e[e.NONE=0]="NONE",e[e.SCISSOR=1]="SCISSOR",e[e.STENCIL=2]="STENCIL",e[e.SPRITE=3]="SPRITE"}(A||(A={})),function(e){e[e.NONE=0]="NONE",e[e.LOW=2]="LOW",e[e.MEDIUM=4]="MEDIUM",e[e.HIGH=8]="HIGH"}(C||(C={})),X.RETINA_PREFIX=/@([0-9\.]+)x/,X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var Z,J=!1,ee="5.3.12";function te(){J=!0}function ne(e){var t;if(!J){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS "+ee+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(t=window.console).log.apply(t,n)}else window.console&&window.console.log("PixiJS "+ee+" - "+e+" - http://www.pixijs.com/");J=!0}}function re(){return void 0===Z&&(Z=function(){var e={stencil:!0,failIfMajorPerformanceCaveat:X.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var t=document.createElement("canvas"),n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(e){return!1}}()),Z}function ie(e,t){return void 0===t&&(t=[]),t[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function oe(e){var t=e.toString(16);return"#"+("000000".substr(0,6-t.length)+t)}function ae(e){return"string"==typeof e&&"#"===e[0]&&(e=e.substr(1)),parseInt(e,16)}function se(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}var le=function(){for(var e=[],t=[],n=0;n<32;n++)e[n]=n,t[n]=n;e[m.NORMAL_NPM]=m.NORMAL,e[m.ADD_NPM]=m.ADD,e[m.SCREEN_NPM]=m.SCREEN,t[m.NORMAL]=m.NORMAL_NPM,t[m.ADD]=m.ADD_NPM,t[m.SCREEN]=m.SCREEN_NPM;var r=[];return r.push(t),r.push(e),r}();function ce(e,t){return le[t?1:0][e]}function ue(e,t,n,r){return n=n||new Float32Array(4),r||void 0===r?(n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t):(n[0]=e[0],n[1]=e[1],n[2]=e[2]),n[3]=t,n}function he(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var n=e>>16&255,r=e>>8&255,i=255&e;return(255*t<<24)+((n=n*t+.5|0)<<16)+((r=r*t+.5|0)<<8)+(i*t+.5|0)}function de(e,t,n,r){return(n=n||new Float32Array(4))[0]=(e>>16&255)/255,n[1]=(e>>8&255)/255,n[2]=(255&e)/255,(r||void 0===r)&&(n[0]*=t,n[1]*=t,n[2]*=t),n[3]=t,n}function pe(e,t){void 0===t&&(t=null);var n=6*e;if((t=t||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+n);for(var r=0,i=0;r>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,1+(e|=e>>>16)}function ve(e){return!(e&e-1||!e)}function ye(e){var t=(e>65535?1:0)<<4,n=((e>>>=t)>255?1:0)<<3;return t|=n,t|=n=((e>>>=n)>15?1:0)<<2,(t|=n=((e>>>=n)>3?1:0)<<1)|(e>>>=n)>>1}function Te(e,t,n){var r,i=e.length;if(!(t>=i||0===n)){var o=i-(n=t+n>i?i-t:n);for(r=t;r=this.x&&e=this.y&&tt!=c>t&&e<(t-s)/(c-s)*(l-a)+a&&(n=!n)}return n},e}(),Xe=function(){function e(e,t,n,r,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=20),this.x=e,this.y=t,this.width=n,this.height=r,this.radius=i,this.type=Fe.RREC}return e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height,this.radius)},e.prototype.contains=function(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){if(t>=this.y+this.radius&&t<=this.y+this.height-this.radius||e>=this.x+this.radius&&e<=this.x+this.width-this.radius)return!0;var n=e-(this.x+this.radius),r=t-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=e-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(n*n+(r=t-(this.y+this.height-this.radius))*r<=i)return!0;if((n=e-(this.x+this.radius))*n+r*r<=i)return!0}return!1},e}(),Ye=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.x=e,this.y=t}return e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.copyFrom=function(e){return this.set(e.x,e.y),this},e.prototype.copyTo=function(e){return e.set(this.x,this.y),e},e.prototype.equals=function(e){return e.x===this.x&&e.y===this.y},e.prototype.set=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this.x=e,this.y=t,this},e}(),qe=function(){function e(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0),this._x=n,this._y=r,this.cb=e,this.scope=t}return e.prototype.clone=function(t,n){return void 0===t&&(t=this.cb),void 0===n&&(n=this.scope),new e(t,n,this._x,this._y)},e.prototype.set=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=e),this._x===e&&this._y===t||(this._x=e,this._y=t,this.cb.call(this.scope)),this},e.prototype.copyFrom=function(e){return this._x===e.x&&this._y===e.y||(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this},e.prototype.copyTo=function(e){return e.set(this._x,this._y),e},e.prototype.equals=function(e){return e.x===this._x&&e.y===this._y},Object.defineProperty(e.prototype,"x",{get:function(){return this._x},set:function(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this._y},set:function(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),e}(),$e=function(){function e(e,t,n,r,i,o){void 0===e&&(e=1),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.array=null,this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=o}return e.prototype.fromArray=function(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]},e.prototype.set=function(e,t,n,r,i,o){return this.a=e,this.b=t,this.c=n,this.d=r,this.tx=i,this.ty=o,this},e.prototype.toArray=function(e,t){this.array||(this.array=new Float32Array(9));var n=t||this.array;return e?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},e.prototype.apply=function(e,t){t=t||new Ye;var n=e.x,r=e.y;return t.x=this.a*n+this.c*r+this.tx,t.y=this.b*n+this.d*r+this.ty,t},e.prototype.applyInverse=function(e,t){t=t||new Ye;var n=1/(this.a*this.d+this.c*-this.b),r=e.x,i=e.y;return t.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,t.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,t},e.prototype.translate=function(e,t){return this.tx+=e,this.ty+=t,this},e.prototype.scale=function(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this},e.prototype.rotate=function(e){var t=Math.cos(e),n=Math.sin(e),r=this.a,i=this.c,o=this.tx;return this.a=r*t-this.b*n,this.b=r*n+this.b*t,this.c=i*t-this.d*n,this.d=i*n+this.d*t,this.tx=o*t-this.ty*n,this.ty=o*n+this.ty*t,this},e.prototype.append=function(e){var t=this.a,n=this.b,r=this.c,i=this.d;return this.a=e.a*t+e.b*r,this.b=e.a*n+e.b*i,this.c=e.c*t+e.d*r,this.d=e.c*n+e.d*i,this.tx=e.tx*t+e.ty*r+this.tx,this.ty=e.tx*n+e.ty*i+this.ty,this},e.prototype.setTransform=function(e,t,n,r,i,o,a,s,l){return this.a=Math.cos(a+l)*i,this.b=Math.sin(a+l)*i,this.c=-Math.sin(a-s)*o,this.d=Math.cos(a-s)*o,this.tx=e-(n*this.a+r*this.c),this.ty=t-(n*this.b+r*this.d),this},e.prototype.prepend=function(e){var t=this.tx;if(1!==e.a||0!==e.b||0!==e.c||1!==e.d){var n=this.a,r=this.c;this.a=n*e.a+this.b*e.c,this.b=n*e.b+this.b*e.d,this.c=r*e.a+this.d*e.c,this.d=r*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this},e.prototype.decompose=function(e){var t=this.a,n=this.b,r=this.c,i=this.d,o=-Math.atan2(-r,i),a=Math.atan2(n,t),s=Math.abs(o+a);return s<1e-5||Math.abs(Ue-s)<1e-5?(e.rotation=a,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=o,e.skew.y=a),e.scale.x=Math.sqrt(t*t+n*n),e.scale.y=Math.sqrt(r*r+i*i),e.position.x=this.tx,e.position.y=this.ty,e},e.prototype.invert=function(){var e=this.a,t=this.b,n=this.c,r=this.d,i=this.tx,o=e*r-t*n;return this.a=r/o,this.b=-t/o,this.c=-n/o,this.d=e/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(e*this.ty-t*i)/o,this},e.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},e.prototype.clone=function(){var t=new e;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},e.prototype.copyTo=function(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},e.prototype.copyFrom=function(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this},Object.defineProperty(e,"IDENTITY",{get:function(){return new e},enumerable:!1,configurable:!0}),Object.defineProperty(e,"TEMP_MATRIX",{get:function(){return new e},enumerable:!1,configurable:!0}),e}(),Ke=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Qe=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Ze=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Je=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],et=[],tt=[],nt=Math.sign;!function(){for(var e=0;e<16;e++){var t=[];et.push(t);for(var n=0;n<16;n++)for(var r=nt(Ke[e]*Ke[n]+Ze[e]*Qe[n]),i=nt(Qe[e]*Ke[n]+Je[e]*Qe[n]),o=nt(Ke[e]*Ze[n]+Ze[e]*Je[n]),a=nt(Qe[e]*Ze[n]+Je[e]*Je[n]),s=0;s<16;s++)if(Ke[s]===r&&Qe[s]===i&&Ze[s]===o&&Je[s]===a){t.push(s);break}}for(e=0;e<16;e++){var l=new $e;l.set(Ke[e],Qe[e],Ze[e],Je[e],0,0),tt.push(l)}}();var rt={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(e){return Ke[e]},uY:function(e){return Qe[e]},vX:function(e){return Ze[e]},vY:function(e){return Je[e]},inv:function(e){return 8&e?15&e:7&-e},add:function(e,t){return et[e][t]},sub:function(e,t){return et[e][rt.inv(t)]},rotate180:function(e){return 4^e},isVertical:function(e){return 2==(3&e)},byDirection:function(e,t){return 2*Math.abs(e)<=Math.abs(t)?t>=0?rt.S:rt.N:2*Math.abs(t)<=Math.abs(e)?e>0?rt.E:rt.W:t>0?e>0?rt.SE:rt.SW:e>0?rt.NE:rt.NW},matrixAppendRotationInv:function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=tt[rt.inv(t)];i.tx=n,i.ty=r,e.append(i)}},it=function(){function e(){this.worldTransform=new $e,this.localTransform=new $e,this.position=new qe(this.onChange,this,0,0),this.scale=new qe(this.onChange,this,1,1),this.pivot=new qe(this.onChange,this,0,0),this.skew=new qe(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return e.prototype.onChange=function(){this._localID++},e.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},e.prototype.updateLocalTransform=function(){var e=this.localTransform;this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1)},e.prototype.updateTransform=function(e){var t=this.localTransform;if(this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==e._worldID){var n=e.worldTransform,r=this.worldTransform;r.a=t.a*n.a+t.b*n.c,r.b=t.a*n.b+t.b*n.d,r.c=t.c*n.a+t.d*n.c,r.d=t.c*n.b+t.d*n.d,r.tx=t.tx*n.a+t.ty*n.c+n.tx,r.ty=t.tx*n.b+t.ty*n.d+n.ty,this._parentID=e._worldID,this._worldID++}},e.prototype.setFromMatrix=function(e){e.decompose(this),this._localID++},Object.defineProperty(e.prototype,"rotation",{get:function(){return this._rotation},set:function(e){this._rotation!==e&&(this._rotation=e,this.updateSkew())},enumerable:!1,configurable:!0}),e.IDENTITY=new e,e}();X.SORTABLE_CHILDREN=!1;var ot=function(){function e(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return e.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},e.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},e.prototype.getRectangle=function(e){return this.minX>this.maxX||this.minY>this.maxY?Ge.EMPTY:((e=e||new Ge(0,0,1,1)).x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)},e.prototype.addPoint=function(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)},e.prototype.addQuad=function(e){var t=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=e[0],a=e[1];t=or?o:r,i=a>i?a:i,t=(o=e[2])r?o:r,i=a>i?a:i,t=(o=e[4])r?o:r,i=a>i?a:i,t=(o=e[6])r?o:r,i=a>i?a:i,this.minX=t,this.minY=n,this.maxX=r,this.maxY=i},e.prototype.addFrame=function(e,t,n,r,i){this.addFrameMatrix(e.worldTransform,t,n,r,i)},e.prototype.addFrameMatrix=function(e,t,n,r,i){var o=e.a,a=e.b,s=e.c,l=e.d,c=e.tx,u=e.ty,h=this.minX,d=this.minY,p=this.maxX,f=this.maxY,m=o*t+s*n+c,g=a*t+l*n+u;h=mp?m:p,f=g>f?g:f,h=(m=o*r+s*n+c)p?m:p,f=g>f?g:f,h=(m=o*t+s*i+c)p?m:p,f=g>f?g:f,h=(m=o*r+s*i+c)p?m:p,f=g>f?g:f,this.minX=h,this.minY=d,this.maxX=p,this.maxY=f},e.prototype.addVertexData=function(e,t,n){for(var r=this.minX,i=this.minY,o=this.maxX,a=this.maxY,s=t;so?l:o,a=c>a?c:a}this.minX=r,this.minY=i,this.maxX=o,this.maxY=a},e.prototype.addVertices=function(e,t,n,r){this.addVerticesMatrix(e.worldTransform,t,n,r)},e.prototype.addVerticesMatrix=function(e,t,n,r,i,o){void 0===i&&(i=0),void 0===o&&(o=i);for(var a=e.a,s=e.b,l=e.c,c=e.d,u=e.tx,h=e.ty,d=this.minX,p=this.minY,f=this.maxX,m=this.maxY,g=n;gr?e.maxX:r,this.maxY=e.maxY>i?e.maxY:i},e.prototype.addBoundsMask=function(e,t){var n=e.minX>t.minX?e.minX:t.minX,r=e.minY>t.minY?e.minY:t.minY,i=e.maxXl?i:l,this.maxY=o>c?o:c}},e.prototype.addBoundsMatrix=function(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)},e.prototype.addBoundsArea=function(e,t){var n=e.minX>t.x?e.minX:t.x,r=e.minY>t.y?e.minY:t.y,i=e.maxXl?i:l,this.maxY=o>c?o:c}},e.prototype.pad=function(e,t){void 0===e&&(e=0),void 0===t&&(t=e),this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)},e.prototype.addFramePad=function(e,t,n,r,i,o){e-=i,t-=o,n+=i,r+=o,this.minX=this.minXn?this.maxX:n,this.minY=this.minYr?this.maxY:r},e}(),at=function(e,t){return at=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},at(e,t)};function st(e,t){function n(){this.constructor=e}at(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var lt=function(e){function t(){var t=e.call(this)||this;return t.tempDisplayObjectParent=null,t.transform=new it,t.alpha=1,t.visible=!0,t.renderable=!0,t.parent=null,t.worldAlpha=1,t._lastSortedIndex=0,t._zIndex=0,t.filterArea=null,t.filters=null,t._enabledFilters=null,t._bounds=new ot,t._localBounds=null,t._boundsID=0,t._boundsRect=null,t._localBoundsRect=null,t._mask=null,t._destroyed=!1,t.isSprite=!1,t.isMask=!1,t}return st(t,e),t.mixin=function(e){for(var n=Object.keys(e),r=0;r1)for(var r=0;rthis.children.length)throw new Error(e+"addChildAt: The index "+t+" supplied is out of bounds "+this.children.length);return e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.splice(t,0,e),this._boundsID++,this.onChildrenChange(t),e.emit("added",this),this.emit("childAdded",e,this,t),e},t.prototype.swapChildren=function(e,t){if(e!==t){var n=this.getChildIndex(e),r=this.getChildIndex(t);this.children[n]=t,this.children[r]=e,this.onChildrenChange(n=this.children.length)throw new Error("The index "+t+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(e);Te(this.children,n,1),this.children.splice(t,0,e),this.onChildrenChange(t)},t.prototype.getChildAt=function(e){if(e<0||e>=this.children.length)throw new Error("getChildAt: Index ("+e+") does not exist.");return this.children[e]},t.prototype.removeChild=function(){for(var e=arguments,t=[],n=0;n1)for(var r=0;r0&&i<=t){n=this.children.splice(r,i);for(var o=0;o1&&this.children.sort(ut),this.sortDirty=!1},t.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var e=0,t=this.children.length;e title : "+e.title+"
tabIndex: "+e.tabIndex},e.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0),e.x+e.width>this.renderer.width&&(e.width=this.renderer.width-e.x),e.y+e.height>this.renderer.height&&(e.height=this.renderer.height-e.y)},e.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width=ft+"px",t.style.height=ft+"px",t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=2..toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&null!==e.accessibleTitle?t.title=e.accessibleTitle:e.accessibleHint&&null!==e.accessibleHint||(t.title="displayObject "+e.tabIndex),e.accessibleHint&&null!==e.accessibleHint&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},e.prototype._onClick=function(e){var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"click",t.eventData),t.dispatchEvent(e.target.displayObject,"pointertap",t.eventData),t.dispatchEvent(e.target.displayObject,"tap",t.eventData)},e.prototype._onFocus=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseover",t.eventData)},e.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseout",t.eventData)},e.prototype._onKeyDown=function(e){9===e.keyCode&&this.activate()},e.prototype._onMouseMove=function(e){0===e.movementX&&0===e.movementY||this.deactivate()},e.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,window.document.removeEventListener("mousemove",this._onMouseMove,!0),window.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},e}();X.TARGET_FPMS=.06,function(e){e[e.INTERACTION=50]="INTERACTION",e[e.HIGH=25]="HIGH",e[e.NORMAL=0]="NORMAL",e[e.LOW=-25]="LOW",e[e.UTILITY=-50]="UTILITY"}(pt||(pt={}));var gt=function(){function e(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=0),void 0===r&&(r=!1),this.fn=e,this.context=t,this.priority=n,this.once=r,this.next=null,this.previous=null,this._destroyed=!1}return e.prototype.match=function(e,t){return void 0===t&&(t=null),this.fn===e&&this.context===t},e.prototype.emit=function(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));var t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t},e.prototype.connect=function(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this},e.prototype.destroy=function(e){void 0===e&&(e=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var t=this.next;return this.next=e?null:t,this.previous=null,t},e}(),bt=function(){function e(){var e=this;this._head=new gt(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/X.TARGET_FPMS,this.elapsedMS=1/X.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(t){e._requestId=null,e.started&&(e.update(t),e.started&&null===e._requestId&&e._head.next&&(e._requestId=requestAnimationFrame(e._tick)))}}return e.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},e.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},e.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},e.prototype.add=function(e,t,n){return void 0===n&&(n=pt.NORMAL),this._addListener(new gt(e,t,n))},e.prototype.addOnce=function(e,t,n){return void 0===n&&(n=pt.NORMAL),this._addListener(new gt(e,t,n,!0))},e.prototype._addListener=function(e){var t=this._head.next,n=this._head;if(t){for(;t;){if(e.priority>t.priority){e.connect(n);break}n=t,t=t.next}e.previous||e.connect(n)}else e.connect(n);return this._startIfPossible(),this},e.prototype.remove=function(e,t){for(var n=this._head.next;n;)n=n.match(e,t)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(e.prototype,"count",{get:function(){if(!this._head)return 0;for(var e=0,t=this._head;t=t.next;)e++;return e},enumerable:!1,configurable:!0}),e.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},e.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},e.prototype.destroy=function(){if(!this._protected){this.stop();for(var e=this._head.next;e;)e=e.destroy(!0);this._head.destroy(),this._head=null}},e.prototype.update=function(e){var t;if(void 0===e&&(e=performance.now()),e>this.lastTime){if((t=this.elapsedMS=e-this.lastTime)>this._maxElapsedMS&&(t=this._maxElapsedMS),t*=this.speed,this._minElapsedMS){var n=e-this._lastFrame|0;if(n=0;u--){var h=c[u],d=this.recursiveFindHit(e,h,n,r,s);if(d){if(!h.parent)continue;s=!1,d&&(e.target&&(r=!1),a=!0)}}return i&&(r&&!e.target&&!t.hitArea&&t.containsPoint&&t.containsPoint(o)&&(a=!0),t.interactive&&(a&&!e.target&&(e.target=t),n&&n(e,t,!!a))),a},e.prototype.findHit=function(e,t,n,r){this.recursiveFindHit(e,t,n,r,!1)},e}(),wt={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(e){e?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};lt.mixin(wt);var St={target:null,data:{global:null}},kt=function(e){function t(t,n){var r=e.call(this)||this;return n=n||{},r.renderer=t,r.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new yt,r.mouse.identifier=1,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[1]=r.mouse,r.interactionDataPool=[],r.eventData=new _t,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!1,r.supportsTouchEvents="ontouchstart"in window,r.supportsPointerEvents=!!window.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new xt,r._tempDisplayObject=new ct,r._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return function(e,t){function n(){this.constructor=e}Tt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(e){this._useSystemTicker=e,e?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),t.prototype.hitTest=function(e,t){return St.target=null,St.data.global=e,t||(t=this.lastObjectRendered),this.processInteractive(St,t,null,!0),St.target},t.prototype.setTargetElement=function(e,t){void 0===t&&(t=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=e,this.resolution=t,this.addEvents(),this.addTickerListener()},t.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(bt.system.add(this.tickerUpdate,this,pt.INTERACTION),this.tickerAdded=!0)},t.prototype.removeTickerListener=function(){this.tickerAdded&&(bt.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},t.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var e=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(e.msContentZooming="none",e.msTouchAction="none"):this.supportsPointerEvents&&(e.touchAction="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0}},t.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var e=this.interactionDOMElement.style;window.navigator.msPointerEnabled?(e.msContentZooming="",e.msTouchAction=""):this.supportsPointerEvents&&(e.touchAction=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1}},t.prototype.tickerUpdate=function(e){this._deltaTime+=e,this._deltaTime8)throw new Error("max arguments reached");var l=this.name,c=this.items;this._aliasCount++;for(var u=0,h=c.length;u0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},e.prototype.add=function(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this},e.prototype.remove=function(e){var t=this.items.indexOf(e);return-1!==t&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this},e.prototype.contains=function(e){return-1!==this.items.indexOf(e)},e.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},e.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(e.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),e}();Object.defineProperties(At.prototype,{dispatch:{value:At.prototype.emit},run:{value:At.prototype.emit}}),X.PREFER_ENV=W.any?d.WEBGL:d.WEBGL2,X.STRICT_TEXTURE_CACHE=!1;var Ct=[];function It(e,t){if(!e)return null;var n="";if("string"==typeof e){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(e);r&&(n=r[1].toLowerCase())}for(var i=Ct.length-1;i>=0;--i){var o=Ct[i];if(o.test&&o.test(e,n))return new o(e,t)}throw new Error("Unrecognized source type to auto-detect Resource")}var Ot=function(e,t){return Ot=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ot(e,t)};function Dt(e,t){function n(){this.constructor=e}Ot(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Pt=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new At("setRealSize"),this.onUpdate=new At("update"),this.onError=new At("onError")}return e.prototype.bind=function(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},e.prototype.unbind=function(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)},e.prototype.resize=function(e,t){e===this._width&&t===this._height||(this._width=e,this._height=t,this.onResize.emit(e,t))},Object.defineProperty(e.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),e.prototype.update=function(){this.destroyed||this.onUpdate.emit()},e.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),e.prototype.style=function(e,t,n){return!1},e.prototype.dispose=function(){},e.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},e.test=function(e,t){return!1},e}(),Nt=function(e){function t(t,n){var r=this,i=n||{},o=i.width,a=i.height;if(!o||!a)throw new Error("BufferResource width or height invalid");return(r=e.call(this,o,a)||this).data=t,r}return Dt(t,e),t.prototype.upload=function(e,t,n){var r=e.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===x.UNPACK),n.width===t.width&&n.height===t.height?r.texSubImage2D(t.target,0,0,0,t.width,t.height,t.format,t.type,this.data):(n.width=t.width,n.height=t.height,r.texImage2D(t.target,0,n.internalFormat,t.width,t.height,0,t.format,n.type,this.data)),!0},t.prototype.dispose=function(){this.data=null},t.test=function(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array},t}(Pt),Rt={scaleMode:T.NEAREST,format:b.RGBA,alphaMode:x.NPM},Mt=function(e){function t(t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=e.call(this)||this,i=(n=n||{}).alphaMode,o=n.mipmap,a=n.anisotropicLevel,s=n.scaleMode,l=n.width,c=n.height,u=n.wrapMode,h=n.format,d=n.type,p=n.target,f=n.resolution,m=n.resourceOptions;return!t||t instanceof Pt||((t=It(t,m)).internal=!0),r.width=l||0,r.height=c||0,r.resolution=f||X.RESOLUTION,r.mipmap=void 0!==o?o:X.MIPMAP_TEXTURES,r.anisotropicLevel=void 0!==a?a:X.ANISOTROPIC_LEVEL,r.wrapMode=u||X.WRAP_MODE,r.scaleMode=void 0!==s?s:X.SCALE_MODE,r.format=h||b.RGBA,r.type=d||y.UNSIGNED_BYTE,r.target=p||v.TEXTURE_2D,r.alphaMode=void 0!==i?i:x.UNPACK,void 0!==n.premultiplyAlpha&&(r.premultiplyAlpha=n.premultiplyAlpha),r.uid=xe(),r.touched=0,r.isPowerOfTwo=!1,r._refreshPOT(),r._glTextures={},r.dirtyId=0,r.dirtyStyleId=0,r.cacheId=null,r.valid=l>0&&c>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(t),r}return Dt(t,e),Object.defineProperty(t.prototype,"realWidth",{get:function(){return Math.ceil(this.width*this.resolution-1e-4)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"realHeight",{get:function(){return Math.ceil(this.height*this.resolution-1e-4)},enumerable:!1,configurable:!0}),t.prototype.setStyle=function(e,t){var n;return void 0!==e&&e!==this.scaleMode&&(this.scaleMode=e,n=!0),void 0!==t&&t!==this.mipmap&&(this.mipmap=t,n=!0),n&&this.dirtyStyleId++,this},t.prototype.setSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=e,this.height=t,this._refreshPOT(),this.update(),this},t.prototype.setRealSize=function(e,t,n){return this.resolution=n||this.resolution,this.width=e/this.resolution,this.height=t/this.resolution,this._refreshPOT(),this.update(),this},t.prototype._refreshPOT=function(){this.isPowerOfTwo=ve(this.realWidth)&&ve(this.realHeight)},t.prototype.setResolution=function(e){var t=this.resolution;return t===e||(this.resolution=e,this.valid&&(this.width=this.width*t/e,this.height=this.height*t/e,this.emit("update",this)),this._refreshPOT()),this},t.prototype.setResource=function(e){if(this.resource===e)return this;if(this.resource)throw new Error("Resource can be set only once");return e.bind(this),this.resource=e,this},t.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},t.prototype.onError=function(e){this.emit("error",this,e)},t.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Ce[this.cacheId],delete Ae[this.cacheId],this.cacheId=null),this.dispose(),t.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},t.prototype.dispose=function(){this.emit("dispose",this)},t.prototype.castToBaseTexture=function(){return this},t.from=function(e,n,r){void 0===r&&(r=X.STRICT_TEXTURE_CACHE);var i="string"==typeof e,o=null;i?o=e:(e._pixiId||(e._pixiId="pixiid_"+xe()),o=e._pixiId);var a=Ce[o];if(i&&r&&!a)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return a||((a=new t(e,n)).cacheId=o,t.addToCache(a,o)),a},t.fromBuffer=function(e,n,r,i){e=e||new Float32Array(n*r*4);var o=new Nt(e,{width:n,height:r}),a=e instanceof Float32Array?y.FLOAT:y.UNSIGNED_BYTE;return new t(o,Object.assign(Rt,i||{width:n,height:r,type:a}))},t.addToCache=function(e,t){t&&(-1===e.textureCacheIds.indexOf(t)&&e.textureCacheIds.push(t),Ce[t]&&console.warn("BaseTexture added to the cache with an id ["+t+"] that already had an entry"),Ce[t]=e)},t.removeFromCache=function(e){if("string"==typeof e){var t=Ce[e];if(t){var n=t.textureCacheIds.indexOf(e);return n>-1&&t.textureCacheIds.splice(n,1),delete Ce[e],t}}else if(e&&e.textureCacheIds){for(var r=0;r0){if(!e.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(e.resource,t)}else e.target=v.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.parentTextureArray=this.baseTexture,this.items[t]=e;return e.valid&&!this.valid&&this.resize(e.realWidth,e.realHeight),this.items[t]=e,this},t.prototype.upload=function(e,n,r){for(var i=this.itemDirtyIds,o=0;o]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,t}(Ft),zt=function(e){function t(n,r){var i=this;if(r=r||{},!(n instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof n&&(n=[n]);var a=n[0].src||n[0];Ft.crossOrigin(o,a,r.crossorigin);for(var s=0;s0&&!1===e.paused&&!1===e.ended&&e.readyState>2},t.prototype._isSourceReady=function(){var e=this.source;return 3===e.readyState||4===e.readyState},t.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(bt.shared.add(this.update,this),this._isConnectedToTicker=!0)},t.prototype._onPlayStop=function(){this._isConnectedToTicker&&(bt.shared.remove(this.update,this),this._isConnectedToTicker=!1)},t.prototype._onCanPlay=function(){var e=this.source;e.removeEventListener("canplay",this._onCanPlay),e.removeEventListener("canplaythrough",this._onCanPlay);var t=this.valid;this.resize(e.videoWidth,e.videoHeight),!t&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&e.play()},t.prototype.dispose=function(){this._isConnectedToTicker&&bt.shared.remove(this.update,this);var t=this.source;t&&(t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),e.prototype.dispose.call(this)},Object.defineProperty(t.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(e){e!==this._autoUpdate&&(this._autoUpdate=e,!this._autoUpdate&&this._isConnectedToTicker?(bt.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(bt.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(e){e!==this._updateFPS&&(this._updateFPS=e)},enumerable:!1,configurable:!0}),t.test=function(e,n){return e instanceof HTMLVideoElement||t.TYPES.indexOf(n)>-1},t.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],t.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},t}(Ft),Vt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dt(t,e),t.test=function(e){return!!window.createImageBitmap&&e instanceof ImageBitmap},t}(Ft);Ct.push(Ht,Vt,Ut,zt,Gt,Nt,jt,Bt);var Wt={Resource:Pt,BaseImageResource:Ft,INSTALLED:Ct,autoDetectResource:It,AbstractMultiResource:Lt,ArrayResource:Bt,BufferResource:Nt,CanvasResource:Ut,CubeResource:jt,ImageResource:Ht,SVGResource:Gt,VideoResource:zt,ImageBitmapResource:Vt},Xt=function(){function e(e){this.renderer=e}return e.prototype.destroy=function(){this.renderer=null},e}(),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Dt(t,e),t.prototype.upload=function(e,t,n){var r=e.gl;return r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===x.UNPACK),n.width===t.width&&n.height===t.height?r.texSubImage2D(t.target,0,0,0,t.width,t.height,t.format,t.type,this.data):(n.width=t.width,n.height=t.height,r.texImage2D(t.target,0,1===e.context.webGLVersion?r.DEPTH_COMPONENT:r.DEPTH_COMPONENT16,t.width,t.height,0,t.format,t.type,this.data)),!0},t}(Nt),qt=function(){function e(e,t){this.width=Math.ceil(e||100),this.height=Math.ceil(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new At("disposeFramebuffer"),this.multisample=C.NONE}return Object.defineProperty(e.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),e.prototype.addColorTexture=function(e,t){return void 0===e&&(e=0),this.colorTextures[e]=t||new Mt(null,{scaleMode:T.NEAREST,resolution:1,mipmap:E.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.addDepthTexture=function(e){return this.depthTexture=e||new Mt(new Yt(null,{width:this.width,height:this.height}),{scaleMode:T.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:E.OFF,format:b.DEPTH_COMPONENT,type:y.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},e.prototype.resize=function(e,t){if(e=Math.ceil(e),t=Math.ceil(t),e!==this.width||t!==this.height){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(var n=0;n-1&&t.textureCacheIds.splice(n,1),delete Ae[e],t}}else if(e&&e.textureCacheIds){for(var r=0;rthis.baseTexture.width,a=n+i>this.baseTexture.height;if(o||a){var s=o&&a?"and":"or",l="X: "+t+" + "+r+" = "+(t+r)+" > "+this.baseTexture.width,c="Y: "+n+" + "+i+" = "+(n+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+l+" "+s+" "+c)}this.valid=r&&i&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=e),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),t.prototype.castToBaseTexture=function(){return this.baseTexture},t}(q());function Jt(e){e.destroy=function(){},e.on=function(){},e.once=function(){},e.emit=function(){}}Zt.EMPTY=new Zt(new Mt),Jt(Zt.EMPTY),Jt(Zt.EMPTY.baseTexture),Zt.WHITE=function(){var e=document.createElement("canvas");e.width=16,e.height=16;var t=e.getContext("2d");return t.fillStyle="white",t.fillRect(0,0,16,16),new Zt(new Mt(new Ut(e)))}(),Jt(Zt.WHITE),Jt(Zt.WHITE.baseTexture);var en=function(e){function t(t,n){var r=this,i=null;if(!(t instanceof $t)){var o=arguments[1],a=arguments[2],s=arguments[3],l=arguments[4];console.warn("Please use RenderTexture.create("+o+", "+a+") instead of the ctor directly."),i=arguments[0],n=null,t=new $t({width:o,height:a,scaleMode:s,resolution:l})}return(r=e.call(this,t,n)||this).legacyRenderer=i,r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Dt(t,e),Object.defineProperty(t.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t,n){void 0===n&&(n=!0),e=Math.ceil(e),t=Math.ceil(t),this.valid=e>0&&t>0,this._frame.width=this.orig.width=e,this._frame.height=this.orig.height=t,n&&this.baseTexture.resize(e,t),this.updateUvs()},t.prototype.setResolution=function(e){var t=this.baseTexture;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))},t.create=function(e){return"number"==typeof e&&(e={width:e,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new t(new $t(e))},t}(Zt),tn=function(){function e(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return e.prototype.createTexture=function(e,t){var n=new $t(Object.assign({width:e,height:t,resolution:1},this.textureOptions));return new en(n)},e.prototype.getOptimalTexture=function(t,n,r){void 0===r&&(r=1);var i=e.SCREEN_KEY;t*=r,n*=r,this.enableFullScreen&&t===this._pixelsWidth&&n===this._pixelsHeight||(i=(65535&(t=be(t)))<<16|65535&(n=be(n))),this.texturePool[i]||(this.texturePool[i]=[]);var o=this.texturePool[i].pop();return o||(o=this.createTexture(t,n)),o.filterPoolKey=i,o.setResolution(r),o},e.prototype.getFilterTexture=function(e,t){var n=this.getOptimalTexture(e.width,e.height,t||e.resolution);return n.filterFrame=e.filterFrame,n},e.prototype.returnTexture=function(e){var t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)},e.prototype.returnFilterTexture=function(e){this.returnTexture(e)},e.prototype.clear=function(e){if(e=!1!==e)for(var t in this.texturePool){var n=this.texturePool[t];if(n)for(var r=0;r0&&t.height>0,r)for(var i=0;i1){for(var c=0;c1&&this.renderer.framebuffer.blit(),1===n.length)n[0].apply(this,t.renderTexture,l.renderTexture,w.BLEND,t),this.returnFilterTexture(t.renderTexture);else{var c=t.renderTexture,u=this.getOptimalFilterTexture(c.width,c.height,t.resolution);u.filterFrame=c.filterFrame;var h=0;for(h=0;h=0;--r)e[r]=n[r]||null,e[r]&&(e[r]._batchLocation=r)},t.prototype.boundArray=function(e,t,n,r){for(var i=e.elements,o=e.ids,a=e.count,s=0,l=0;l=0&&u=d.WEBGL2&&(n=e.getContext("webgl2",t)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},t.prototype.getExtensions=function(){var e=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),loseContext:e.getExtension("WEBGL_lose_context"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:e.getExtension("EXT_color_buffer_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear")})},t.prototype.handleContextLost=function(e){e.preventDefault()},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var e=this.renderer.view;e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(e){var t=e.getContextAttributes(),n="WebGL2RenderingContext"in window&&e instanceof window.WebGL2RenderingContext;n&&(this.webGLVersion=2),t.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var r=n||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=r,r||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},t}(Xt),En=function(e){this.framebuffer=e,this.stencil=null,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.multisample=C.NONE,this.msaaBuffer=null,this.blitFramebuffer=null},xn=new Ge,wn=function(e){function t(t){var n=e.call(this,t)||this;return n.managedFramebuffers=[],n.unknownFramebuffer=new qt(10,10),n.msaaSamples=null,n}return Dt(t,e),t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ge,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var t=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;X.PREFER_ENV===d.WEBGL_LEGACY&&(t=null,n=null),t?e.drawBuffers=function(e){return t.drawBuffersWEBGL(e)}:(this.hasMRT=!1,e.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)},t.prototype.bind=function(e,t){var n=this.gl;if(e){var r=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,n.bindFramebuffer(n.FRAMEBUFFER,r.framebuffer)),r.dirtyId!==e.dirtyId&&(r.dirtyId=e.dirtyId,r.dirtyFormat!==e.dirtyFormat?(r.dirtyFormat=e.dirtyFormat,this.updateFramebuffer(e)):r.dirtySize!==e.dirtySize&&(r.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(var i=0;i1&&(n.msaaBuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,n.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,n.multisample,t.RGBA8,e.width,e.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,n.msaaBuffer));for(var i=[],o=0;o1)){var a=e.colorTextures[o],s=a.parentTextureArray||a;this.renderer.texture.bind(s,0),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+o,a.target,s._glTextures[this.CONTEXT_UID].texture,0),i.push(t.COLOR_ATTACHMENT0+o)}if(i.length>1&&t.drawBuffers(i),e.depthTexture&&this.writeDepthTexture){var l=e.depthTexture;this.renderer.texture.bind(l,0),t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,l._glTextures[this.CONTEXT_UID].texture,0)}n.stencil||!e.stencil&&!e.depth||(n.stencil=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,n.stencil),t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height),e.depthTexture||t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,n.stencil))},t.prototype.detectSamples=function(e){var t=this.msaaSamples,n=C.NONE;if(e<=1||null===t)return n;for(var r=0;r=0&&this.managedFramebuffers.splice(i,1),e.disposeRunner.remove(this),t||(r.deleteFramebuffer(n.framebuffer),n.stencil&&r.deleteRenderbuffer(n.stencil))}},t.prototype.disposeAll=function(e){var t=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n=r.data.byteLength)t.bufferSubData(o,0,r.data);else{var a=r.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;i.byteLength=r.data.byteLength,t.bufferData(o,r.data,a)}}}},t.prototype.checkCompatibility=function(e,t){var n=e.attributes,r=t.attributeData;for(var i in r)if(!n[i])throw new Error('shader and geometry incompatible, geometry missing the "'+i+'" attribute')},t.prototype.getSignature=function(e,t){var n=e.attributes,r=t.attributeData,i=["g",e.id];for(var o in n)r[o]&&i.push(o);return i.join("-")},t.prototype.initGeometryVao=function(e,t,n){void 0===n&&(n=!0),this.checkCompatibility(e,t);var r=this.gl,i=this.CONTEXT_UID,o=this.getSignature(e,t),a=e.glVertexArrayObjects[this.CONTEXT_UID],s=a[o];if(s)return a[t.id]=s,s;var l=e.buffers,c=e.attributes,u={},h={};for(var d in l)u[d]=0,h[d]=0;for(var d in c)!c[d].size&&t.attributeData[d]?c[d].size=t.attributeData[d].size:c[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[c[d].buffer]+=c[d].size*kn[c[d].type];for(var d in c){var p=c[d],f=p.size;void 0===p.stride&&(u[p.buffer]===f*kn[p.type]?p.stride=0:p.stride=u[p.buffer]),void 0===p.start&&(p.start=h[p.buffer],h[p.buffer]+=f*kn[p.type])}s=r.createVertexArray(),r.bindVertexArray(s);for(var m=0;m=d.WEBGL2&&(t=e.getContext("webgl2",{})),t||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),Mn=t}return Mn}function Bn(e,t,n){if("precision"!==e.substring(0,9)){var r=t;return t===k.HIGH&&n!==k.HIGH&&(r=k.MEDIUM),"precision "+r+" float;\n"+e}return n!==k.HIGH&&"precision highp"===e.substring(0,15)?e.replace("precision highp","precision mediump"):e}var Fn={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Un(e){return Fn[e]}var jn=null,Hn={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function Gn(e,t){if(!jn){var n=Object.keys(Hn);jn={};for(var r=0;r0&&(t+="\nelse "),nt.name?1:-1})),o=0;o0?this._useCurrent():e.disable(e.SCISSOR_TEST)},t.prototype._useCurrent=function(){var e=this.maskStack[this.maskStack.length-1]._scissorRect,t=this.renderer.renderTexture.current,n=this.renderer.projection,r=n.transform,i=n.sourceFrame,o=n.destinationFrame,a=t?t.resolution:this.renderer.resolution,s=(e.x-i.x)*a+o.x,l=(e.y-i.y)*a+o.y,c=e.width*a,u=e.height*a;r&&(s+=r.tx*a,l+=r.ty*a),t||(l=this.renderer.height-u-l),this.renderer.gl.scissor(s,l,c,u)},t}(ar),lr=function(e){function t(t){var n=e.call(this,t)||this;return n.glConst=WebGLRenderingContext.STENCIL_TEST,n}return Dt(t,e),t.prototype.getStackLength=function(){var e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0},t.prototype.push=function(e){var t=e.maskObject,n=this.renderer.gl,r=e._stencilCounter;0===r&&(this.renderer.framebuffer.forceStencil(),n.enable(n.STENCIL_TEST)),e._stencilCounter++,n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.EQUAL,r,this._getBitwiseMask()),n.stencilOp(n.KEEP,n.KEEP,n.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent()},t.prototype.pop=function(e){var t=this.renderer.gl;0===this.getStackLength()?(t.disable(t.STENCIL_TEST),t.clear(t.STENCIL_BUFFER_BIT),t.clearStencil(0)):(t.colorMask(!1,!1,!1,!1),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent())},t.prototype._useCurrent=function(){var e=this.renderer.gl;e.colorMask(!0,!0,!0,!0),e.stencilFunc(e.EQUAL,this.getStackLength(),this._getBitwiseMask()),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)},t.prototype._getBitwiseMask=function(){return(1<>=1,n++;this.stateId=e.data}for(n=0;nthis.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var e=this.renderer.texture,t=e.managedTextures,n=!1,r=0;rthis.maxIdle&&(e.destroyTexture(i,!0),t[r]=null,n=!0)}if(n){var o=0;for(r=0;r=0;r--)this.unload(e.children[r])},t}(Xt),_r=function(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121},Er=function(e){function t(t){var n=e.call(this,t)||this;return n.boundTextures=[],n.currentLocation=-1,n.managedTextures=[],n._unknownBoundTextures=!1,n.unknownTexture=new Mt,n}return Dt(t,e),t.prototype.contextChange=function(){var e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(var n=0;n=1:t.mipmap=!1,2===this.webGLVersion||e.isPowerOfTwo?t.wrapMode=e.wrapMode:t.wrapMode=_.CLAMP,e.resource&&e.resource.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)},t.prototype.setStyle=function(e,t){var n=this.gl;if(t.mipmap&&n.generateMipmap(e.target),n.texParameteri(e.target,n.TEXTURE_WRAP_S,t.wrapMode),n.texParameteri(e.target,n.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===T.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&e.anisotropicLevel>0&&e.scaleMode===T.LINEAR){var i=Math.min(e.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(e.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(e.target,n.TEXTURE_MIN_FILTER,e.scaleMode===T.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(e.target,n.TEXTURE_MAG_FILTER,e.scaleMode===T.LINEAR?n.LINEAR:n.NEAREST)},t}(Xt),xr={FilterSystem:bn,BatchSystem:yn,ContextSystem:_n,FramebufferSystem:wn,GeometrySystem:An,MaskSystem:or,ScissorSystem:sr,StencilSystem:lr,ProjectionSystem:cr,RenderTextureSystem:pr,ShaderSystem:vr,StateSystem:yr,TextureGCSystem:Tr,TextureSystem:Er},wr=new $e,Sr=function(e){function t(t,n){void 0===t&&(t=p.UNKNOWN);var r=e.call(this)||this;return(n=Object.assign({},X.RENDER_OPTIONS,n)).roundPixels&&(X.ROUND_PIXELS=n.roundPixels,Se("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),r.options=n,r.type=t,r.screen=new Ge(0,0,n.width,n.height),r.view=n.view||document.createElement("canvas"),r.resolution=n.resolution||X.RESOLUTION,r.transparent=n.transparent,r.autoDensity=n.autoDensity||n.autoResize||!1,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,0],r._backgroundColorString="#000000",r.backgroundColor=n.backgroundColor||r._backgroundColor,r._lastObjectRendered=null,r.plugins={},r}return Dt(t,e),t.prototype.initPlugins=function(e){for(var t in e)this.plugins[t]=new e[t](this)},Object.defineProperty(t.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),t.prototype.resize=function(e,t){this.screen.width=e,this.screen.height=t,this.view.width=e*this.resolution,this.view.height=t*this.resolution,this.autoDensity&&(this.view.style.width=e+"px",this.view.style.height=t+"px"),this.emit("resize",e,t)},t.prototype.generateTexture=function(e,t,n,r){0===(r=r||e.getLocalBounds(null,!0)).width&&(r.width=1),0===r.height&&(r.height=1);var i=en.create({width:0|r.width,height:0|r.height,scaleMode:t,resolution:n});return wr.tx=-r.x,wr.ty=-r.y,this.render(e,i,!1,wr,!!e.parent),i},t.prototype.destroy=function(e){for(var t in this.plugins)this.plugins[t].destroy(),this.plugins[t]=null;e&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);var n=this;n.plugins=null,n.type=p.UNKNOWN,n.view=null,n.screen=null,n._tempDisplayObjectParent=null,n.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(t.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(e){this._backgroundColor=e,this._backgroundColorString=oe(e),ie(e,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),t}(q()),kr=function(e){function t(n){var r=e.call(this,p.WEBGL,n)||this;return n=r.options,r.gl=null,r.CONTEXT_UID=0,r.runners={destroy:new At("destroy"),contextChange:new At("contextChange"),reset:new At("reset"),update:new At("update"),postrender:new At("postrender"),prerender:new At("prerender"),resize:new At("resize")},r.globalUniforms=new mn({projectionMatrix:new $e},!0),r.addSystem(or,"mask").addSystem(_n,"context").addSystem(yr,"state").addSystem(vr,"shader").addSystem(Er,"texture").addSystem(An,"geometry").addSystem(wn,"framebuffer").addSystem(sr,"scissor").addSystem(lr,"stencil").addSystem(cr,"projection").addSystem(Tr,"textureGC").addSystem(bn,"filter").addSystem(pr,"renderTexture").addSystem(yn,"batch"),r.initPlugins(t.__plugins),n.context?r.context.initFromContext(n.context):r.context.initFromOptions({alpha:!!r.transparent,antialias:n.antialias,premultipliedAlpha:r.transparent&&"notMultiplied"!==r.transparent,stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,powerPreference:r.options.powerPreference}),r.renderingToScreen=!0,ne(2===r.context.webGLVersion?"WebGL 2":"WebGL 1"),r.resize(r.options.width,r.options.height),r}return Dt(t,e),t.create=function(e){if(re())return new t(e);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},t.prototype.addSystem=function(e,t){t||(t=e.name);var n=new e(this);if(this[t])throw new Error('Whoops! The name "'+t+'" is already in use');for(var r in this[t]=n,this.runners)this.runners[r].add(n);return this},t.prototype.render=function(e,t,n,r,i){if(this.renderingToScreen=!t,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=r,!this.context.isLost){if(t||(this._lastObjectRendered=e),!i){var o=e.enableTempParent();e.updateTransform(),e.disableTempParent(o)}this.renderTexture.bind(t),this.batch.currentRenderer.start(),(void 0!==n?n:this.clearBeforeRender)&&this.renderTexture.clear(),e.render(this),this.batch.currentRenderer.flush(),t&&t.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},t.prototype.resize=function(t,n){e.prototype.resize.call(this,t,n),this.runners.resize.emit(t,n)},t.prototype.reset=function(){return this.runners.reset.emit(),this},t.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},t.prototype.destroy=function(t){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();e.prototype.destroy.call(this,t),this.gl=null},t.registerPlugin=function(e,n){t.__plugins=t.__plugins||{},t.__plugins[e]=n},t}(Sr);function Ar(e){return kr.create(e)}var Cr="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}",Ir="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n",Or=function(){this.texArray=null,this.blend=0,this.type=g.TRIANGLES,this.start=0,this.size=0,this.data=null},Dr=function(){function e(){this.elements=[],this.ids=[],this.count=0}return e.prototype.clear=function(){for(var e=0;ethis.size&&this.flush(),this._vertexCount+=e.vertexData.length/2,this._indexCount+=e.indices.length,this._bufferedTextures[this._bufferSize]=e._texture.baseTexture,this._bufferedElements[this._bufferSize++]=e)},t.prototype.buildTexturesAndDrawCalls=function(){var e=this._bufferedTextures,n=this.MAX_TEXTURES,r=t._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,a=this.renderer.textureGC.count,s=++Mt._globalBatch,l=0,c=r[0],u=0;i.copyBoundTextures(o,n);for(var h=0;h=n&&(i.boundArray(c,o,s,n),this.buildDrawCalls(c,u,h),u=h,c=r[++l],++s),d._batchEnabled=s,d.touched=a,c.elements[c.count++]=d)}for(c.count>0&&(i.boundArray(c,o,s,n),this.buildDrawCalls(c,u,this._bufferSize),++l,++s),h=0;h0&&(t+="\nelse "),n0||t.responseType===e.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2==(r/100|0)){if(this.xhrType===e.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=e.TYPE.TEXT;else if(this.xhrType===e.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=e.TYPE.JSON}catch(e){return void this.abort("Error trying to parse loaded json: "+e)}else if(this.xhrType===e.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=e.TYPE.XML}catch(e){return void this.abort("Error trying to parse loaded xml: "+e)}else this.data=t.response||n;this.complete()}else this.abort("["+t.status+"] "+t.statusText+": "+t.responseURL)},t._determineCrossOrigin=function(e,t){if(0===e.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";t=t||window.location,ti||(ti=document.createElement("a")),ti.href=e;var n=!(e=Wr()(ti.href,{strictMode:!0})).port&&""===t.port||e.port===t.port,r=e.protocol?e.protocol+":":"";return e.host===t.hostname&&n&&r===t.protocol?"":"anonymous"},t._determineXhrType=function(){return e._xhrTypeMap[this.extension]||e.XHR_RESPONSE_TYPE.TEXT},t._determineLoadType=function(){return e._loadTypeMap[this.extension]||e.LOAD_TYPE.XHR},t._getExtension=function(){var e=this.url,t="";if(this.isDataUrl){var n=e.indexOf("/");t=e.substring(n+1,e.indexOf(";",n))}else{var r=e.indexOf("?"),i=e.indexOf("#"),o=Math.min(r>-1?r:e.length,i>-1?i:e.length);t=(e=e.substring(0,o)).substring(e.lastIndexOf(".")+1)}return t.toLowerCase()},t._getMimeFromXhrType=function(t){switch(t){case e.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case e.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case e.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case e.XHR_RESPONSE_TYPE.JSON:return"application/json";case e.XHR_RESPONSE_TYPE.DEFAULT:case e.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},Jr(e,[{key:"isDataUrl",get:function(){return this._hasFlag(e.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(e.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(e.STATUS_FLAGS.LOADING)}}]),e}();function ii(e,t,n){t&&0===t.indexOf(".")&&(t=t.substring(1)),t&&(e[t]=n)}function oi(e){return e.toString().replace("object ","")}ri.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},ri.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},ri.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},ri.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},ri._loadTypeMap={gif:ri.LOAD_TYPE.IMAGE,png:ri.LOAD_TYPE.IMAGE,bmp:ri.LOAD_TYPE.IMAGE,jpg:ri.LOAD_TYPE.IMAGE,jpeg:ri.LOAD_TYPE.IMAGE,tif:ri.LOAD_TYPE.IMAGE,tiff:ri.LOAD_TYPE.IMAGE,webp:ri.LOAD_TYPE.IMAGE,tga:ri.LOAD_TYPE.IMAGE,svg:ri.LOAD_TYPE.IMAGE,"svg+xml":ri.LOAD_TYPE.IMAGE,mp3:ri.LOAD_TYPE.AUDIO,ogg:ri.LOAD_TYPE.AUDIO,wav:ri.LOAD_TYPE.AUDIO,mp4:ri.LOAD_TYPE.VIDEO,webm:ri.LOAD_TYPE.VIDEO},ri._xhrTypeMap={xhtml:ri.XHR_RESPONSE_TYPE.DOCUMENT,html:ri.XHR_RESPONSE_TYPE.DOCUMENT,htm:ri.XHR_RESPONSE_TYPE.DOCUMENT,xml:ri.XHR_RESPONSE_TYPE.DOCUMENT,tmx:ri.XHR_RESPONSE_TYPE.DOCUMENT,svg:ri.XHR_RESPONSE_TYPE.DOCUMENT,tsx:ri.XHR_RESPONSE_TYPE.DOCUMENT,gif:ri.XHR_RESPONSE_TYPE.BLOB,png:ri.XHR_RESPONSE_TYPE.BLOB,bmp:ri.XHR_RESPONSE_TYPE.BLOB,jpg:ri.XHR_RESPONSE_TYPE.BLOB,jpeg:ri.XHR_RESPONSE_TYPE.BLOB,tif:ri.XHR_RESPONSE_TYPE.BLOB,tiff:ri.XHR_RESPONSE_TYPE.BLOB,webp:ri.XHR_RESPONSE_TYPE.BLOB,tga:ri.XHR_RESPONSE_TYPE.BLOB,json:ri.XHR_RESPONSE_TYPE.JSON,text:ri.XHR_RESPONSE_TYPE.TEXT,txt:ri.XHR_RESPONSE_TYPE.TEXT,ttf:ri.XHR_RESPONSE_TYPE.BUFFER,otf:ri.XHR_RESPONSE_TYPE.BUFFER},ri.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var ai=window.URL||window.webkitURL,si={caching:function(e,t){var n=this;Qr[e.url]?(e.data=Qr[e.url],e.complete()):e.onComplete.once((function(){return Qr[n.url]=n.data})),t()},parsing:function(e,t){if(e.data){if(e.xhr&&e.xhrType===ri.XHR_RESPONSE_TYPE.BLOB)if(window.Blob&&"string"!=typeof e.data){if(0===e.data.type.indexOf("image")){var n=ai.createObjectURL(e.data);return e.blob=e.data,e.data=new Image,e.data.src=n,e.type=ri.TYPE.IMAGE,void(e.data.onload=function(){ai.revokeObjectURL(n),e.data.onload=null,t()})}}else{var r=e.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return e.data=new Image,e.data.src="data:"+r+";base64,"+function(e){for(var t="",n=0;n>2,i[1]=(3&r[0])<<4|r[1]>>4,i[2]=(15&r[1])<<2|r[2]>>6,i[3]=63&r[2],n-(e.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(var a=0;a16384&&(r=16384),o._properties=[!1,!0,!1,!1,!1],o._maxSize=t,o._batchSize=r,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=m.NORMAL,o.autoResize=i,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}return gi(t,e),t.prototype.setProperties=function(e){e&&(this._properties[0]="vertices"in e||"scale"in e?!!e.vertices||!!e.scale:this._properties[0],this._properties[1]="position"in e?!!e.position:this._properties[1],this._properties[2]="rotation"in e?!!e.rotation:this._properties[2],this._properties[3]="uvs"in e?!!e.uvs:this._properties[3],this._properties[4]="tint"in e||"alpha"in e?!!e.tint||!!e.alpha:this._properties[4])},t.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(t.prototype,"tint",{get:function(){return this._tint},set:function(e){this._tint=e,ie(e,this.tintRgb)},enumerable:!1,configurable:!0}),t.prototype.render=function(e){var t=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",(function(){return t.onChildrenChange(0)}))),e.batch.setObjectRenderer(e.plugins.particle),e.plugins.particle.render(this))},t.prototype.onChildrenChange=function(e){for(var t=Math.floor(e/this._batchSize);this._bufferUpdateIDs.lengthn&&!e.autoResize&&(o=n);var a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));var s=t[0]._texture.baseTexture;this.state.blendMode=ce(e.blendMode,s.alphaMode),i.state.set(this.state);var l=i.gl,c=e.worldTransform.copyTo(this.tempMatrix);c.prepend(i.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=c.toArray(!0),this.shader.uniforms.uColor=ue(e.tintRgb,e.worldAlpha,this.shader.uniforms.uColor,s.alphaMode),this.shader.uniforms.uSampler=s,this.renderer.shader.bind(this.shader);for(var u=!1,h=0,d=0;hr&&(p=r),d>=a.length&&a.push(this._generateOneMoreBuffer(e));var f=a[d];f.uploadDynamic(t,h,p);var m=e._bufferUpdateIDs[d]||0;(u=u||f._updateID0,c=s.alpha,u=c<1&&l?he(s._tintRGB,c):s._tintRGB+(255*c<<24);r[o]=u,r[o+i]=u,r[o+2*i]=u,r[o+3*i]=u,o+=4*i}},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},t}(vn);!function(e){e.MITER="miter",e.BEVEL="bevel",e.ROUND="round"}(bi||(bi={})),function(e){e.BUTT="butt",e.ROUND="round",e.SQUARE="square"}(vi||(vi={}));var Ei={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(e,t){if(void 0===t&&(t=20),!this.adaptive||!e||isNaN(e))return t;var n=Math.ceil(e/this.maxLength);return nthis.maxSegments&&(n=this.maxSegments),n}},xi=function(){function e(){this.color=16777215,this.alpha=1,this.texture=Zt.WHITE,this.matrix=null,this.visible=!1,this.reset()}return e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},e.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=Zt.WHITE,this.matrix=null,this.visible=!1},e.prototype.destroy=function(){this.texture=null,this.matrix=null},e}(),wi=function(e,t){return wi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},wi(e,t)};function Si(e,t){function n(){this.constructor=e}wi(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var ki={build:function(e){e.points=e.shape.points.slice()},triangulate:function(e,t){var n=e.points,r=e.holes,i=t.points,o=t.indices;if(n.length>=6){for(var a=[],s=0;sh&&(h+=2*Math.PI);var d=u,p=h-u,f=Math.abs(p),m=Math.sqrt(l*l+c*c),g=1+(15*f*Math.sqrt(m)/Math.PI>>0),b=p/g;if(d+=b,s){a.push(e,t),a.push(n,r);for(var v=1,y=d;vv?(U?(d.push(W,X),d.push(_+S*P,E+k*P),d.push(W,X),d.push(_+A*P,E+C*P)):(d.push(_-S*D,E-k*D),d.push(Y,q),d.push(_-A*D,E-C*D),d.push(Y,q)),f+=2):o.join===bi.ROUND?U?(d.push(W,X),d.push(_+S*P,E+k*P),f+=Ni(_,E,_+S*P,E+k*P,_+A*P,E+C*P,d,!0)+4,d.push(W,X),d.push(_+A*P,E+C*P)):(d.push(_-S*D,E-k*D),d.push(Y,q),f+=Ni(_,E,_-S*D,E-k*D,_-A*D,E-C*D,d,!1)+4,d.push(_-A*D,E-C*D),d.push(Y,q)):(d.push(W,X),d.push(Y,q)):(d.push(_-S*D,E-k*D),d.push(_+S*P,E+k*P),o.join===bi.BEVEL||V/b>v||(o.join===bi.ROUND?f+=U?Ni(_,E,_+S*P,E+k*P,_+A*P,E+C*P,d,!0)+2:Ni(_,E,_-S*D,E-k*D,_-A*D,E-C*D,d,!1)+2:(U?(d.push(Y,q),d.push(Y,q)):(d.push(W,X),d.push(W,X)),f+=2)),d.push(_-A*D,E-C*D),d.push(_+A*P,E+C*P),f+=2)}}y=r[2*(p-2)],T=r[2*(p-2)+1],_=r[2*(p-1)],S=-(T-(E=r[2*(p-1)+1])),k=y-_,S/=I=Math.sqrt(S*S+k*k),k/=I,S*=g,k*=g,d.push(_-S*D,E-k*D),d.push(_+S*P,E+k*P),l||(o.cap===vi.ROUND?f+=Ni(_-S*(D-P)*.5,E-k*(D-P)*.5,_-S*D,E-k*D,_+S*P,E+k*P,d,!1)+2:o.cap===vi.SQUARE&&(f+=Pi(_,E,S,k,D,P,!1,d)));var K=t.indices,Q=Ei.epsilon*Ei.epsilon;for(N=m;Nu*s}},e.arc=function(e,t,n,r,i,o,a,s,l){for(var c=a-o,u=Ei._segmentsCount(Math.abs(c)*i,40*Math.ceil(Math.abs(c)/Ue)),h=c/(2*u),d=2*h,p=Math.cos(h),f=Math.sin(h),m=u-1,g=m%1/m,b=0;b<=m;++b){var v=h+o+d*(b+g*b),y=Math.cos(v),T=-Math.sin(v);l.push((p*y+f*T)*i+n,(p*-T+f*y)*i+r)}},e}(),Ui=function(){function e(){}return e.curveLength=function(e,t,n,r,i,o,a,s){for(var l=0,c=0,u=0,h=0,d=0,p=0,f=0,m=0,g=0,b=0,v=0,y=e,T=t,_=1;_<=10;++_)b=y-(m=(f=(p=(d=1-(c=_/10))*d)*d)*e+3*p*c*n+3*d*(u=c*c)*i+(h=u*c)*a),v=T-(g=f*t+3*p*c*r+3*d*u*o+h*s),y=m,T=g,l+=Math.sqrt(b*b+v*v);return l},e.curveTo=function(t,n,r,i,o,a,s){var l=s[s.length-2],c=s[s.length-1];s.length-=2;var u=Ei._segmentsCount(e.curveLength(l,c,t,n,r,i,o,a)),h=0,d=0,p=0,f=0,m=0;s.push(l,c);for(var g=1,b=0;g<=u;++g)p=(d=(h=1-(b=g/u))*h)*h,m=(f=b*b)*b,s.push(p*l+3*d*b*t+3*h*f*r+m*o,p*c+3*d*b*n+3*h*f*i+m*a)},e}(),ji=function(){function e(){}return e.curveLength=function(e,t,n,r,i,o){var a=e-2*n+i,s=t-2*r+o,l=2*n-2*e,c=2*r-2*t,u=4*(a*a+s*s),h=4*(a*l+s*c),d=l*l+c*c,p=2*Math.sqrt(u+h+d),f=Math.sqrt(u),m=2*u*f,g=2*Math.sqrt(d),b=h/f;return(m*p+f*h*(p-g)+(4*d*u-h*h)*Math.log((2*f+b+p)/(b+g)))/(4*m)},e.curveTo=function(t,n,r,i,o){for(var a=o[o.length-2],s=o[o.length-1],l=Ei._segmentsCount(e.curveLength(a,s,t,n,r,i)),c=0,u=0,h=1;h<=l;++h){var d=h/l;c=a+(t-a)*d,u=s+(n-s)*d,o.push(c+(t+(r-t)*d-c)*d,u+(n+(i-n)*d-u)*d)}},e}(),Hi=function(){function e(){this.reset()}return e.prototype.begin=function(e,t,n){this.reset(),this.style=e,this.start=t,this.attribStart=n},e.prototype.end=function(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start},e.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},e}(),Gi=((Mi={})[Fe.POLY]=ki,Mi[Fe.CIRC]=Ai,Mi[Fe.ELIP]=Ai,Mi[Fe.RECT]=Ci,Mi[Fe.RREC]=Di,Mi),zi=[],Vi=[],Wi={buildPoly:ki,buildCircle:Ai,buildRectangle:Ci,buildRoundedRectangle:Di,FILL_COMMANDS:Gi,BATCH_POOL:zi,DRAW_CALL_POOL:Vi,buildLine:Ri,Star:Bi,ArcUtils:Fi,BezierUtils:Ui,QuadraticUtils:ji,BatchPart:Hi},Xi=function(){function e(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),this.shape=e,this.lineStyle=n,this.fillStyle=t,this.matrix=r,this.type=e.type,this.points=[],this.holes=[]}return e.prototype.clone=function(){return new e(this.shape,this.fillStyle,this.lineStyle,this.matrix)},e.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},e}(),Yi=new Ye,qi=new ot,$i=function(e){function t(){var t=e.call(this)||this;return t.uvsFloat32=null,t.indicesUint16=null,t.points=[],t.colors=[],t.uvs=[],t.indices=[],t.textureIds=[],t.graphicsData=[],t.dirty=0,t.batchDirty=-1,t.cacheDirty=-1,t.clearDirty=0,t.drawCalls=[],t.batches=[],t.shapeIndex=0,t._bounds=new ot,t.boundsDirty=-1,t.boundsPadding=0,t.batchable=!1,t.indicesUint16=null,t.uvsFloat32=null,t.closePointEps=1e-4,t}return Si(t,e),Object.defineProperty(t.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),t.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var e=0;e0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},t.prototype.drawShape=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var i=new Xi(e,t,n,r);return this.graphicsData.push(i),this.dirty++,this},t.prototype.drawHole=function(e,t){if(void 0===t&&(t=null),!this.graphicsData.length)return null;var n=new Xi(e,null,null,t),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this},t.prototype.destroy=function(){e.prototype.destroy.call(this);for(var t=0;t0&&(i=(r=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o65535&&e;this.indicesUint16=b?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},t.prototype._compareStyles=function(e,t){return!(!e||!t)&&e.texture.baseTexture===t.texture.baseTexture&&e.color+e.alpha===t.color+t.alpha&&!!e.native==!!t.native},t.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var e=0,t=this.graphicsData.length;e131070)return!1;for(var e=this.batches,n=0;n0&&((i=Vi.pop())||((i=new Or).texArray=new Dr),this.drawCalls.push(i)),i.start=u,i.size=0,i.texArray.count=0,i.type=c),p.touched=1,p._batchEnabled=e,p._batchLocation=o,p.wrapMode=10497,i.texArray.elements[i.texArray.count++]=p,o++)),i.size+=h.size,u+=h.size,s=p._batchLocation,this.addColors(n,d.color,d.alpha,h.attribSize,h.attribStart),this.addTextureIds(r,s,h.attribSize,h.attribStart)}Mt._globalBatch=e,this.packAttributes()},t.prototype.packAttributes=function(){for(var e=this.points,t=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(3*e.length*4),o=new Float32Array(i),a=new Uint32Array(i),s=0,l=0;l>16)+(65280&t)+((255&t)<<16),n);e.length=Math.max(e.length,i+r);for(var a=0;a0&&e.alpha>0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:n},e)):this._lineStyle.reset(),this},t.prototype.startPoly=function(){if(this.currentPath){var e=this.currentPath.points,t=this.currentPath.points.length;t>2&&(this.drawShape(this.currentPath),this.currentPath=new We,this.currentPath.closeStroke=!1,this.currentPath.points.push(e[t-2],e[t-1]))}else this.currentPath=new We,this.currentPath.closeStroke=!1},t.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},t.prototype.moveTo=function(e,t){return this.startPoly(),this.currentPath.points[0]=e,this.currentPath.points[1]=t,this},t.prototype.lineTo=function(e,t){this.currentPath||this.moveTo(0,0);var n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return r===e&&i===t||n.push(e,t),this},t.prototype._initCurve=function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[e,t]):this.moveTo(e,t)},t.prototype.quadraticCurveTo=function(e,t,n,r){this._initCurve();var i=this.currentPath.points;return 0===i.length&&this.moveTo(0,0),ji.curveTo(e,t,n,r,i),this},t.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._initCurve(),Ui.curveTo(e,t,n,r,i,o,this.currentPath.points),this},t.prototype.arcTo=function(e,t,n,r,i){this._initCurve(e,t);var o=this.currentPath.points,a=Fi.curveTo(e,t,n,r,i,o);if(a){var s=a.cx,l=a.cy,c=a.radius,u=a.startAngle,h=a.endAngle,d=a.anticlockwise;this.arc(s,l,c,u,h,d)}return this},t.prototype.arc=function(e,t,n,r,i,o){if(void 0===o&&(o=!1),r===i)return this;if(!o&&i<=r?i+=Ue:o&&r<=i&&(r+=Ue),0==i-r)return this;var a=e+Math.cos(r)*n,s=t+Math.sin(r)*n,l=this._geometry.closePointEps,c=this.currentPath?this.currentPath.points:null;if(c){var u=Math.abs(c[c.length-2]-a),h=Math.abs(c[c.length-1]-s);u0;return n?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:n},e)):this._fillStyle.reset(),this},t.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},t.prototype.drawRect=function(e,t,n,r){return this.drawShape(new Ge(e,t,n,r))},t.prototype.drawRoundedRect=function(e,t,n,r,i){return this.drawShape(new Xe(e,t,n,r,i))},t.prototype.drawCircle=function(e,t,n){return this.drawShape(new ze(e,t,n))},t.prototype.drawEllipse=function(e,t,n,r){return this.drawShape(new Ve(e,t,n,r))},t.prototype.drawPolygon=function(){for(var e,t=arguments,n=[],r=0;r>16&255)/255*i,o.tint[1]=(r>>8&255)/255*i,o.tint[2]=(255&r)/255*i,o.tint[3]=i,e.shader.bind(t),e.geometry.bind(n,t),e.state.set(this.state);for(var s=0,l=a.length;s>16)+(65280&i)+((255&i)<<16)}}},t.prototype.calculateVertices=function(){var e=this.transform._worldID;if(this._transformID!==e){this._transformID=e;for(var t=this.transform.worldTransform,n=t.a,r=t.b,i=t.c,o=t.d,a=t.tx,s=t.ty,l=this._geometry.points,c=this.vertexData,u=0,h=0;h=r&&to.x=i&&to.y>16)+(65280&e)+((255&e)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||Zt.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),t}(ht),io=function(e,t){return io=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},io(e,t)};!function(e){e[e.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",e[e.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(Li||(Li={}));var oo={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:Li.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},ao=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],so=function(){function e(e){this.styleID=0,this.reset(),uo(this,e,e)}return e.prototype.clone=function(){var t={};return uo(t,this,oo),new e(t)},e.prototype.reset=function(){uo(this,oo,oo)},Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(e){this._align!==e&&(this._align=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"breakWords",{get:function(){return this._breakWords},set:function(e){this._breakWords!==e&&(this._breakWords=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(e){this._dropShadow!==e&&(this._dropShadow=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(e){this._dropShadowAlpha!==e&&(this._dropShadowAlpha=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(e){this._dropShadowAngle!==e&&(this._dropShadowAngle=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(e){this._dropShadowBlur!==e&&(this._dropShadowBlur=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(e){var t=co(e);this._dropShadowColor!==t&&(this._dropShadowColor=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(e){this._dropShadowDistance!==e&&(this._dropShadowDistance=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fill},set:function(e){var t=co(e);this._fill!==t&&(this._fill=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(e){this._fillGradientType!==e&&(this._fillGradientType=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(e){(function(e,t){if(!Array.isArray(e)||!Array.isArray(t))return!1;if(e.length!==t.length)return!1;for(var n=0;n=0;n--){var r=t[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&ao.indexOf(r)<0&&(r='"'+r+'"'),t[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+e+" "+t.join(",")},e}();function lo(e){return"number"==typeof e?oe(e):("string"==typeof e&&0===e.indexOf("0x")&&(e=e.replace("0x","#")),e)}function co(e){if(Array.isArray(e)){for(var t=0;tf)if(""!==a&&(s+=e.addLine(a),a="",o=0),e.canBreakWords(b,n.breakWords))for(var _=e.wordWrapSplit(b),E=0;E<_.length;E++){for(var x=_[E],w=1;_[E+w];){var S=_[E+w],k=x[x.length-1];if(e.canBreakChars(k,S,b,E,n.breakWords))break;x+=S,w++}E+=x.length-1;var A=e.getFromCache(x,c,l,i);A+o>f&&(s+=e.addLine(a),p=!1,a="",o=0),a+=x,o+=A}else{a.length>0&&(s+=e.addLine(a),a="",o=0);var C=g===m.length-1;s+=e.addLine(b,!C),p=!1,a="",o=0}else T+o>f&&(p=!1,s+=e.addLine(a),a="",o=0),(a.length>0||!e.isBreakingSpace(b)||p)&&(a+=b,o+=T)}return s+e.addLine(a,!1)},e.addLine=function(t,n){return void 0===n&&(n=!0),t=e.trimRight(t),n?t+"\n":t},e.getFromCache=function(e,t,n,r){var i=n[e];if("number"!=typeof i){var o=e.length*t;i=r.measureText(e).width+o,n[e]=i}return i},e.collapseSpaces=function(e){return"normal"===e||"pre-line"===e},e.collapseNewlines=function(e){return"normal"===e},e.trimRight=function(t){if("string"!=typeof t)return"";for(var n=t.length-1;n>=0;n--){var r=t[n];if(!e.isBreakingSpace(r))break;t=t.slice(0,-1)}return t},e.isNewline=function(t){return"string"==typeof t&&e._newlines.indexOf(t.charCodeAt(0))>=0},e.isBreakingSpace=function(t){return"string"==typeof t&&e._breakingSpaces.indexOf(t.charCodeAt(0))>=0},e.tokenize=function(t){var n=[],r="";if("string"!=typeof t)return n;for(var i=0;is;--d){for(m=0;m0},e}();function vo(e,t){var n=!1;if(e&&e._textures&&e._textures.length)for(var r=0;r=0;t--)this.add(e.children[t]);return this},e.prototype.destroy=function(){this.ticking&&bt.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},e}();function ko(e,t){return t instanceof Mt&&(t._glTextures[e.CONTEXT_UID]||e.texture.bind(t),!0)}function Ao(e,t){if(!(t instanceof Ji))return!1;var n=t.geometry;t.finishPoly(),n.updateBatches();for(var r=n.batches,i=0;i=r&&Mo.x=i&&Mo.y>16)+(65280&e)+((255&e)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),t.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var e=this.texture.baseTexture;de(this._tint,this._alpha,this.uniforms.uColor,e.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},t}(Jn),Yo=function(e){function t(t,n,r){var i=e.call(this)||this,o=new on(t),a=new on(n,!0),s=new on(r,!0,!0);return i.addAttribute("aVertexPosition",o,2,!1,y.FLOAT).addAttribute("aTextureCoord",a,2,!1,y.FLOAT).addIndex(s),i._updateId=-1,i}return Ho(t,e),Object.defineProperty(t.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),t}(hn),qo=function(e,t){return qo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},qo(e,t)},$o=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]},Ko=function(){function e(){}return e.test=function(e){return"string"==typeof e&&0===e.indexOf("info face=")},e.parse=function(e){var t=e.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[]};for(var r in t){var i=t[r].match(/^[a-z]+/gm)[0],o=t[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),a={};for(var s in o){var l=o[s].split("="),c=l[0],u=l[1].replace(/"/gm,""),h=parseFloat(u),d=isNaN(h)?u:h;a[c]=d}n[i].push(a)}var p=new $o;return n.info.forEach((function(e){return p.info.push({face:e.face,size:parseInt(e.size,10)})})),n.common.forEach((function(e){return p.common.push({lineHeight:parseInt(e.lineHeight,10)})})),n.page.forEach((function(e){return p.page.push({id:parseInt(e.id,10),file:e.file})})),n.char.forEach((function(e){return p.char.push({id:parseInt(e.id,10),page:parseInt(e.page,10),x:parseInt(e.x,10),y:parseInt(e.y,10),width:parseInt(e.width,10),height:parseInt(e.height,10),xoffset:parseInt(e.xoffset,10),yoffset:parseInt(e.yoffset,10),xadvance:parseInt(e.xadvance,10)})})),n.kerning.forEach((function(e){return p.kerning.push({first:parseInt(e.first,10),second:parseInt(e.second,10),amount:parseInt(e.amount,10)})})),p},e}(),Qo=function(){function e(){}return e.test=function(e){return e instanceof XMLDocument&&e.getElementsByTagName("page").length&&null!==e.getElementsByTagName("info")[0].getAttribute("face")},e.parse=function(e){for(var t=new $o,n=e.getElementsByTagName("info"),r=e.getElementsByTagName("common"),i=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),a=e.getElementsByTagName("kerning"),s=0;s")>-1){var t=(new self.DOMParser).parseFromString(e,"text/xml");return Qo.test(t)}return!1},e.parse=function(e){var t=(new window.DOMParser).parseFromString(e,"text/xml");return Qo.parse(t)},e}(),Jo=[Ko,Qo,Zo];function ea(e){for(var t=0;t=c-w*s){if(0===v)throw new Error("[BitmapFont] textureHeight "+c+"px is too small for "+h.fontSize+"px fonts");--_,f=null,m=null,g=null,v=0,b=0,y=0}else if(y=Math.max(w+E.fontProperties.descent,y),S*s+b>=d)--_,v+=y*s,v=Math.ceil(v),b=0,y=0;else{ta(f,m,E,b,v,s,h);var k=E.text.charCodeAt(0);p.char.push({id:k,page:T.length-1,x:b/s,y:v/s,width:S,height:w,xoffset:0,yoffset:0,xadvance:Math.ceil(x-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0))}),b+=(S+2*a)*s,b=Math.ceil(b)}}var A=new e(p,T,!0);return void 0!==e.available[t]&&e.uninstall(t),e.available[t]=A,A},e.ALPHA=[["a","z"],["A","Z"]," "],e.NUMERIC=[["0","9"]],e.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],e.ASCII=[[" ","~"]],e.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:e.ALPHANUMERIC},e.available={},e}(),ra=[],ia=[],oa=function(e){function t(n,r){void 0===r&&(r={});var i=e.call(this)||this;i._tint=16777215,r.font&&(Se("5.3.0","PIXI.BitmapText constructor style.font property is deprecated."),i._upgradeStyle(r));var o=Object.assign({},t.styleDefaults,r),a=o.align,s=o.tint,l=o.maxWidth,c=o.letterSpacing,u=o.fontName,h=o.fontSize;if(!na.available[u])throw new Error('Missing BitmapFont "'+u+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=a,i._tint=s,i._fontName=u,i._fontSize=h||na.available[u].size,i._text=n,i._maxWidth=l,i._maxLineHeight=0,i._letterSpacing=c,i._anchor=new qe((function(){i.dirty=!0}),i,0,0),i._roundPixels=X.ROUND_PIXELS,i.dirty=!0,i._textureCache={},i}return function(e,t){function n(){this.constructor=e}qo(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.updateText=function(){for(var e,t=na.available[this._fontName],n=this._fontSize/t.size,r=new Ye,i=[],o=[],a=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",s=a.length,l=this._maxWidth*t.size/this._fontSize,c=null,u=0,h=0,d=0,p=-1,f=0,m=0,g=0,b=0;b0&&r.x>l&&(Te(i,1+p-++m,1+b-p),b=p,p=-1,o.push(f),h=Math.max(h,f),d++,r.x=0,r.y+=t.lineHeight,c=null)}}else o.push(u),h=Math.max(h,u),++d,++m,r.x=0,r.y+=t.lineHeight,c=null}var E=a.charAt(a.length-1);"\r"!==E&&"\n"!==E&&(/(?:\s)/.test(E)&&(u=f),o.push(u),h=Math.max(h,u));var x=[];for(b=0;b<=d;b++){var w=0;"right"===this._align?w=h-o[b]:"center"===this._align&&(w=(h-o[b])/2),x.push(w)}var S=i.length,k={},A=[],C=this._activePagesMeshData;for(b=0;b6*N)||W.vertices.length<2*Wo.BATCHABLE_SIZE)W.vertices=new Float32Array(8*N),W.uvs=new Float32Array(8*N),W.indices=new Uint16Array(6*N);else for(var R=W.total,M=W.vertices,L=4*R*2;L=2&&(e.fontSize=parseInt(t[0],10))}else e.fontName=e.font.name,e.fontSize="number"==typeof e.font.size?e.font.size:parseInt(e.font.size,10)},t.prototype.destroy=function(t){var n=this._textureCache;for(var r in n)n[r].destroy(),delete n[r];this._textureCache=null,e.prototype.destroy.call(this,t)},t.registerFont=function(e,t){return Se("5.3.0","PIXI.BitmapText.registerFont is deprecated, use PIXI.BitmapFont.install"),na.install(e,t)},Object.defineProperty(t,"fonts",{get:function(){return Se("5.3.0","PIXI.BitmapText.fonts is deprecated, use PIXI.BitmapFont.available"),na.available},enumerable:!1,configurable:!0}),t.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0},t}(ht),aa=function(){function e(){}return e.add=function(){ui.setExtensionXhrType("fnt",ui.XHR_RESPONSE_TYPE.TEXT)},e.use=function(t,n){var r=ea(t.data);if(r)for(var i=e.getBaseUrl(this,t),o=r.parse(t.data),a={},s=function(e){a[e.metadata.pageFile]=e.texture,Object.keys(a).length===o.page.length&&(t.bitmapFont=na.install(o,a,!0),n())},l=0;l=r&&(t=e-a-1),o+=s=s.replace("%value%",n[t].toString()),o+="\n"}return(i=i.replace("%blur%",o)).replace("%size%",e.toString())}(o);return(a=e.call(this,s,l)||this).horizontal=t,a.resolution=i,a._quality=0,a.quality=r,a.blur=n,a}return ua(t,e),t.prototype.apply=function(e,t,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/t.width):this.uniforms.strength=1/n.height*(n.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)e.applyFilter(this,t,n,r);else{var i=e.getFilterTexture(),o=e.renderer,a=t,s=i;this.state.blend=!1,e.applyFilter(this,a,s,xa.CLEAR);for(var l=1;l 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",n)||this).alpha=1,t}return function(e,t){function n(){this.constructor=e}Pa(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype._loadMatrix=function(e,t){void 0===t&&(t=!1);var n=e;t&&(this._multiply(n,this.uniforms.m,e),n=this._colorMatrix(n)),this.uniforms.m=n},t.prototype._multiply=function(e,t,n){return e[0]=t[0]*n[0]+t[1]*n[5]+t[2]*n[10]+t[3]*n[15],e[1]=t[0]*n[1]+t[1]*n[6]+t[2]*n[11]+t[3]*n[16],e[2]=t[0]*n[2]+t[1]*n[7]+t[2]*n[12]+t[3]*n[17],e[3]=t[0]*n[3]+t[1]*n[8]+t[2]*n[13]+t[3]*n[18],e[4]=t[0]*n[4]+t[1]*n[9]+t[2]*n[14]+t[3]*n[19]+t[4],e[5]=t[5]*n[0]+t[6]*n[5]+t[7]*n[10]+t[8]*n[15],e[6]=t[5]*n[1]+t[6]*n[6]+t[7]*n[11]+t[8]*n[16],e[7]=t[5]*n[2]+t[6]*n[7]+t[7]*n[12]+t[8]*n[17],e[8]=t[5]*n[3]+t[6]*n[8]+t[7]*n[13]+t[8]*n[18],e[9]=t[5]*n[4]+t[6]*n[9]+t[7]*n[14]+t[8]*n[19]+t[9],e[10]=t[10]*n[0]+t[11]*n[5]+t[12]*n[10]+t[13]*n[15],e[11]=t[10]*n[1]+t[11]*n[6]+t[12]*n[11]+t[13]*n[16],e[12]=t[10]*n[2]+t[11]*n[7]+t[12]*n[12]+t[13]*n[17],e[13]=t[10]*n[3]+t[11]*n[8]+t[12]*n[13]+t[13]*n[18],e[14]=t[10]*n[4]+t[11]*n[9]+t[12]*n[14]+t[13]*n[19]+t[14],e[15]=t[15]*n[0]+t[16]*n[5]+t[17]*n[10]+t[18]*n[15],e[16]=t[15]*n[1]+t[16]*n[6]+t[17]*n[11]+t[18]*n[16],e[17]=t[15]*n[2]+t[16]*n[7]+t[17]*n[12]+t[18]*n[17],e[18]=t[15]*n[3]+t[16]*n[8]+t[17]*n[13]+t[18]*n[18],e[19]=t[15]*n[4]+t[16]*n[9]+t[17]*n[14]+t[18]*n[19]+t[19],e},t.prototype._colorMatrix=function(e){var t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t},t.prototype.brightness=function(e,t){var n=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(n,t)},t.prototype.greyscale=function(e,t){var n=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(n,t)},t.prototype.blackAndWhite=function(e){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],e)},t.prototype.hue=function(e,t){e=(e||0)/180*Math.PI;var n=Math.cos(e),r=Math.sin(e),i=1/3,o=(0,Math.sqrt)(i),a=[n+(1-n)*i,i*(1-n)-o*r,i*(1-n)+o*r,0,0,i*(1-n)+o*r,n+i*(1-n),i*(1-n)-o*r,0,0,i*(1-n)-o*r,i*(1-n)+o*r,n+i*(1-n),0,0,0,0,0,1,0];this._loadMatrix(a,t)},t.prototype.contrast=function(e,t){var n=(e||0)+1,r=-.5*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,t)},t.prototype.saturate=function(e,t){void 0===e&&(e=0);var n=2*e/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,t)},t.prototype.desaturate=function(){this.saturate(-1)},t.prototype.negative=function(e){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],e)},t.prototype.sepia=function(e){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],e)},t.prototype.technicolor=function(e){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],e)},t.prototype.polaroid=function(e){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],e)},t.prototype.toBGR=function(e){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],e)},t.prototype.kodachrome=function(e){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],e)},t.prototype.browni=function(e){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],e)},t.prototype.vintage=function(e){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],e)},t.prototype.colorTone=function(e,t,n,r,i){var o=((n=n||16770432)>>16&255)/255,a=(n>>8&255)/255,s=(255&n)/255,l=((r=r||3375104)>>16&255)/255,c=(r>>8&255)/255,u=(255&r)/255,h=[.3,.59,.11,0,0,o,a,s,e=e||.2,0,l,c,u,t=t||.15,0,o-l,a-c,s-u,0,0];this._loadMatrix(h,i)},t.prototype.night=function(e,t){var n=[-2*(e=e||.1),-e,0,0,0,-e,0,e,0,0,0,e,2*e,0,0,0,0,0,1,0];this._loadMatrix(n,t)},t.prototype.predator=function(e,t){var n=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(n,t)},t.prototype.lsd=function(e){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],e)},t.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(t.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(e){this.uniforms.m=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(e){this.uniforms.uAlpha=e},enumerable:!1,configurable:!0}),t}(tr);Na.prototype.grayscale=Na.prototype.greyscale;var Ra=function(e,t){return Ra=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ra(e,t)},Ma=function(e){function t(t,n){var r=this,i=new $e;return t.renderable=!1,(r=e.call(this,"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",{mapSampler:t._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=t,r.maskMatrix=i,null==n&&(n=20),r.scale=new Ye(n,n),r}return function(e,t){function n(){this.constructor=e}Ra(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.apply=function(e,t,n,r){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var i=this.maskSprite.worldTransform,o=Math.sqrt(i.a*i.a+i.b*i.b),a=Math.sqrt(i.c*i.c+i.d*i.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=i.a/o,this.uniforms.rotation[1]=i.b/o,this.uniforms.rotation[2]=i.c/a,this.uniforms.rotation[3]=i.d/a),e.applyFilter(this,t,n,r)},Object.defineProperty(t.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(e){this.uniforms.mapSampler=e},enumerable:!1,configurable:!0}),t}(tr),La=function(e,t){return La=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},La(e,t)},Ba=function(e){function t(){return e.call(this,"\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n')||this}return function(e,t){function n(){this.constructor=e}La(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t}(tr),Fa=function(e,t){return Fa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Fa(e,t)},Ua=function(e){function t(t,n){void 0===t&&(t=.5),void 0===n&&(n=Math.random());var r=e.call(this,Ir,"precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",{uNoise:0,uSeed:0})||this;return r.noise=t,r.seed=n,r}return function(e,t){function n(){this.constructor=e}Fa(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),Object.defineProperty(t.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(e){this.uniforms.uNoise=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(e){this.uniforms.uSeed=e},enumerable:!1,configurable:!0}),t}(tr),ja=new $e;lt.prototype._cacheAsBitmap=!1,lt.prototype._cacheData=null;var Ha=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(lt.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(e){var t;this._cacheAsBitmap!==e&&(this._cacheAsBitmap=e,e?(this._cacheData||(this._cacheData=new Ha),(t=this._cacheData).originalRender=this.render,t.originalRenderCanvas=this.renderCanvas,t.originalUpdateTransform=this.updateTransform,t.originalCalculateBounds=this.calculateBounds,t.originalGetLocalBounds=this.getLocalBounds,t.originalDestroy=this.destroy,t.originalContainsPoint=this.containsPoint,t.originalMask=this._mask,t.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((t=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=t.originalRender,this.renderCanvas=t.originalRenderCanvas,this.calculateBounds=t.originalCalculateBounds,this.getLocalBounds=t.originalGetLocalBounds,this.destroy=t.originalDestroy,this.updateTransform=t.originalUpdateTransform,this.containsPoint=t.originalContainsPoint,this._mask=t.originalMask,this.filterArea=t.originalFilterArea))}}}),lt.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))},lt.prototype._initCachedDisplayObject=function(e){if(!this._cacheData||!this._cacheData.sprite){var t=this.alpha;this.alpha=1,e.batch.flush();var n=this.getLocalBounds(null,!0).clone();if(this.filters){var r=this.filters[0].padding;n.pad(r)}n.ceil(X.RESOLUTION);var i=e.renderTexture.current,o=e.renderTexture.sourceFrame.clone(),a=e.renderTexture.destinationFrame.clone(),s=e.projection.transform,l=en.create({width:n.width,height:n.height}),c="cacheAsBitmap_"+xe();this._cacheData.textureCacheId=c,Mt.addToCache(l.baseTexture,c),Zt.addToCache(l,c);var u=this.transform.localTransform.copyTo(ja).invert().translate(-n.x,-n.y);this.render=this._cacheData.originalRender,e.render(this,l,!0,u,!1),e.projection.transform=s,e.renderTexture.bind(i,o,a),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var h=new ro(l);h.transform.worldTransform=this.transform.worldTransform,h.anchor.x=-n.x/n.width,h.anchor.y=-n.y/n.height,h.alpha=t,h._bounds=this._bounds,this._cacheData.sprite=h,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=h.containsPoint.bind(h)}},lt.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))},lt.prototype._initCachedDisplayObjectCanvas=function(e){if(!this._cacheData||!this._cacheData.sprite){var t=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var r=e.context,i=e._projTransform;t.ceil(X.RESOLUTION);var o=en.create({width:t.width,height:t.height}),a="cacheAsBitmap_"+xe();this._cacheData.textureCacheId=a,Mt.addToCache(o.baseTexture,a),Zt.addToCache(o,a);var s=ja;this.transform.localTransform.copyTo(s),s.invert(),s.tx-=t.x,s.ty-=t.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,o,!0,s,!1),e.context=r,e._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var l=new ro(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-t.x/t.width,l.anchor.y=-t.y/t.height,l.alpha=n,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}},lt.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},lt.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},lt.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Mt.removeFromCache(this._cacheData.textureCacheId),Zt.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},lt.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)},lt.prototype.name=null,ht.prototype.getChildByName=function(e,t){for(var n=0,r=this.children.length;n0){var d=s.x-e[u].x,p=s.y-e[u].y,f=Math.sqrt(d*d+p*p);s=e[u],a+=f/l}else a=u/(c-1);i[h]=a,i[h+1]=0,i[h+2]=a,i[h+3]=1}var m=0;for(u=0;u0?this.textureScale*this._width/2:this._width/2;r/=u,i/=u,r*=h,i*=h,o[c]=l.x+r,o[c+1]=l.y+i,o[c+2]=l.x-r,o[c+3]=l.y-i,n=l}this.buffers[0].update()}},t.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},t}(Yo),Xa=function(e){function t(t,n,r){void 0===r&&(r=0);var i=this,o=new Wa(t.height,n,r),a=new Xo(t);return r>0&&(t.baseTexture.wrapMode=_.REPEAT),(i=e.call(this,o,a)||this).autoUpdate=!0,i}return za(t,e),t.prototype._render=function(t){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),e.prototype._render.call(this,t)},t}(Wo),Ya=function(e){function t(t,n,r){var i=this,o=new Va(t.width,t.height,n,r),a=new Xo(Zt.WHITE);return(i=e.call(this,o,a)||this).texture=t,i}return za(t,e),t.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var e=this.geometry;e.width=this.shader.texture.width,e.height=this.shader.texture.height,e.build()},Object.defineProperty(t.prototype,"texture",{get:function(){return this.shader.texture},set:function(e){this.shader.texture!==e&&(this.shader.texture=e,this._textureID=-1,e.baseTexture.valid?this.textureUpdated():e.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),t.prototype._render=function(t){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),e.prototype._render.call(this,t)},t.prototype.destroy=function(t){this.shader.texture.off("update",this.textureUpdated,this),e.prototype.destroy.call(this,t)},t}(Wo),qa=function(e){function t(t,n,r,i,o){void 0===t&&(t=Zt.EMPTY);var a=this,s=new Yo(n,r,i);s.getBuffer("aVertexPosition").static=!1;var l=new Xo(t);return(a=e.call(this,s,l,null,o)||this).autoUpdate=!0,a}return za(t,e),Object.defineProperty(t.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(e){this.geometry.getBuffer("aVertexPosition").data=e},enumerable:!1,configurable:!0}),t.prototype._render=function(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),e.prototype._render.call(this,t)},t}(Wo),$a=function(e){function t(t,n,r,i,o){void 0===n&&(n=10),void 0===r&&(r=10),void 0===i&&(i=10),void 0===o&&(o=10);var a=e.call(this,Zt.WHITE,4,4)||this;return a._origWidth=t.orig.width,a._origHeight=t.orig.height,a._width=a._origWidth,a._height=a._origHeight,a._leftWidth=n,a._rightWidth=i,a._topHeight=r,a._bottomHeight=o,a.texture=t,a}return za(t,e),t.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(t.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(e){this.geometry.getBuffer("aVertexPosition").data=e},enumerable:!1,configurable:!0}),t.prototype.updateHorizontalVertices=function(){var e=this.vertices,t=this._getMinScale();e[9]=e[11]=e[13]=e[15]=this._topHeight*t,e[17]=e[19]=e[21]=e[23]=this._height-this._bottomHeight*t,e[25]=e[27]=e[29]=e[31]=this._height},t.prototype.updateVerticalVertices=function(){var e=this.vertices,t=this._getMinScale();e[2]=e[10]=e[18]=e[26]=this._leftWidth*t,e[4]=e[12]=e[20]=e[28]=this._width-this._rightWidth*t,e[6]=e[14]=e[22]=e[30]=this._width},t.prototype._getMinScale=function(){var e=this._leftWidth+this._rightWidth,t=this._width>e?1:this._width/e,n=this._topHeight+this._bottomHeight,r=this._height>n?1:this._height/n;return Math.min(t,r)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(e){this._leftWidth=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(e){this._rightWidth=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"topHeight",{get:function(){return this._topHeight},set:function(e){this._topHeight=e,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(e){this._bottomHeight=e,this._refresh()},enumerable:!1,configurable:!0}),t.prototype._refresh=function(){var e=this.texture,t=this.geometry.buffers[1].data;this._origWidth=e.orig.width,this._origHeight=e.orig.height;var n=1/this._origWidth,r=1/this._origHeight;t[0]=t[8]=t[16]=t[24]=0,t[1]=t[3]=t[5]=t[7]=0,t[6]=t[14]=t[22]=t[30]=1,t[25]=t[27]=t[29]=t[31]=1,t[2]=t[10]=t[18]=t[26]=n*this._leftWidth,t[4]=t[12]=t[20]=t[28]=1-n*this._rightWidth,t[9]=t[11]=t[13]=t[15]=r*this._topHeight,t[17]=t[19]=t[21]=t[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},t}(Ya),Ka=function(e,t){return Ka=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},Ka(e,t)},Qa=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t[0]instanceof Zt?t[0]:t[0].texture)||this;return r._textures=null,r._durations=null,r._autoUpdate=n,r._isConnectedToTicker=!1,r.animationSpeed=1,r.loop=!0,r.updateAnchor=!1,r.onComplete=null,r.onFrameChange=null,r.onLoop=null,r._currentTime=0,r._playing=!1,r._previousFrame=null,r.textures=t,r}return function(e,t){function n(){this.constructor=e}Ka(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}(t,e),t.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(bt.shared.remove(this.update,this),this._isConnectedToTicker=!1))},t.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(bt.shared.add(this.update,this,pt.HIGH),this._isConnectedToTicker=!0))},t.prototype.gotoAndStop=function(e){this.stop();var t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture()},t.prototype.gotoAndPlay=function(e){var t=this.currentFrame;this._currentTime=e,t!==this.currentFrame&&this.updateTexture(),this.play()},t.prototype.update=function(e){if(this._playing){var t=this.animationSpeed*e,n=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=t/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*e);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=t;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):n!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramen)&&this.onLoop(),this.updateTexture())}},t.prototype.updateTexture=function(){var e=this.currentFrame;this._previousFrame!==e&&(this._previousFrame=e,this._texture=this._textures[e],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},t.prototype.destroy=function(t){this.stop(),e.prototype.destroy.call(this,t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},t.fromFrames=function(e){for(var n=[],r=0;r{"use strict";var r=n(414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,a){if(a!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},5798:e=>{"use strict";var t=String.prototype.replace,n=/%20/g,r="RFC3986";e.exports={default:r,formatters:{RFC1738:function(e){return t.call(e,n,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:r}},129:(e,t,n)=>{"use strict";var r=n(8261),i=n(5235),o=n(5798);e.exports={formats:o,parse:i,stringify:r}},5235:(e,t,n)=>{"use strict";var r=n(2769),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var h=0;n.depth>0&&null!==(s=a.exec(o))&&h=0;--o){var a,s=e[o];if("[]"===s&&n.parseArrays)a=[].concat(i);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=i:"__proto__"!==c&&(a[c]=i):a={0:i}}i=a}return i}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,c={__proto__:null},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,h=t.parameterLimit===1/0?void 0:t.parameterLimit,d=u.split(t.delimiter,h),p=-1,f=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(g=o(g)?[g]:g),i.call(c,m)?c[m]=r.combine(c[m],g):c[m]=g}return c}(e,n):e,h=n.plainObjects?Object.create(null):{},d=Object.keys(u),p=0;p{"use strict";var r=n(7478),i=n(2769),o=n(5798),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},h=Date.prototype.toISOString,d=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(e){return h.call(e)},skipNulls:!1,strictNullHandling:!1},f={},m=function e(t,n,o,a,s,c,h,d,m,g,b,v,y,T,_,E){for(var x,w=t,S=E,k=0,A=!1;void 0!==(S=S.get(f))&&!A;){var C=S.get(t);if(k+=1,void 0!==C){if(C===k)throw new RangeError("Cyclic object value");A=!0}void 0===S.get(f)&&(k=0)}if("function"==typeof d?w=d(n,w):w instanceof Date?w=b(w):"comma"===o&&l(w)&&(w=i.maybeMap(w,(function(e){return e instanceof Date?b(e):e}))),null===w){if(s)return h&&!T?h(n,p.encoder,_,"key",v):n;w=""}if("string"==typeof(x=w)||"number"==typeof x||"boolean"==typeof x||"symbol"==typeof x||"bigint"==typeof x||i.isBuffer(w))return h?[y(T?n:h(n,p.encoder,_,"key",v))+"="+y(h(w,p.encoder,_,"value",v))]:[y(n)+"="+y(String(w))];var I,O=[];if(void 0===w)return O;if("comma"===o&&l(w))T&&h&&(w=i.maybeMap(w,h)),I=[{value:w.length>0?w.join(",")||null:void 0}];else if(l(d))I=d;else{var D=Object.keys(w);I=m?D.sort(m):D}for(var P=a&&l(w)&&1===w.length?n+"[]":n,N=0;N0?_+T:""}},2769:(e,t,n)=>{"use strict";var r=n(5798),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r1;){var t=e.pop(),n=t.obj[t.prop];if(o(n)){for(var r=[],i=0;i=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var n=[],r=0;r{"use strict";var r=n(7294),i=n(7418),o=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n