1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[888],{9742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,s=l(e),o=s[0],a=s[1],u=new i((o+a)*3/4-a),c=0,d=a>0?o-4:o;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,s=[],o=0,a=n-i;o<a;o+=16383)s.push(function(e,t,n){for(var i,s=[],o=t;o<n;o+=3)s.push(r[(i=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]))>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return s.join("")}(e,o,o+16383>a?a:o+16383));return 1===i?s.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&s.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),s.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)r[o]=s[o],n[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:function(e,t,r){"use strict";/*! 2 * The buffer module from node.js, for the browser. 3 * 4 * @author Feross Aboukhadijeh <https://feross.org> 5 * @license MIT 6 */var n=r(9742),i=r(645),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);var r=0|f(e,t),n=o(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(R(e,Uint8Array)){var t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(R(e,ArrayBuffer)||e&&R(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(R(e,SharedArrayBuffer)||e&&R(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);var i=function(e){if(a.isBuffer(e)){var t,r=0|p(e.length),n=o(r);return 0===n.length||e.copy(n,0,0,r),n}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?o(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 a.from(e[Symbol.toPrimitive]("string"),t,r);throw 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 TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|p(e))}function d(e){for(var t=e.length<0?0:0|p(e.length),r=o(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){var n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}function p(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||R(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return k(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return O(e).length;default:if(i)return n?-1:k(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){var i,s,o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",s=t;s<r;++s)i+=T[e[s]];return i}(this,t,r);case"utf8":case"utf-8":return _(this,t,r);case"ascii":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}(this,t,r);case"base64":return i=t,s=r,0===i&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var n=e.slice(t,r),i="",s=0;s<n.length-1;s+=2)i+=String.fromCharCode(n[s]+256*n[s+1]);return i}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){var s;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(s=r=+r)!=s&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}
vendor: 14,466 bytes, line 6
6else if(r<0){if(!i)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var s,o=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(s=r;s<a;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else -1!==c&&(s-=s-c),c=-1}else for(r+l>a&&(r=a-l),s=r;s>=0;s--){for(var d=!0,h=0;h<l;h++)if(u(e,s+h)!==u(t,h)){d=!1;break}if(d)return s}return -1}function _(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var s,o,a,l,u=e[i],c=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(c=u);break;case 2:(192&(s=e[i+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[i+1],o=e[i+2],(192&s)==128&&(192&o)==128&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[i+1],o=e[i+2],a=e[i+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,d=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function b(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,s){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<s)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function S(e,t,r,n,i,s){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function C(e,t,r,n,s){return t=+t,r>>>=0,s||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function E(e,t,r,n,s){return t=+t,r>>>=0,s||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.lW=a,t.h2=50,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(u(e),e<=0)?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(R(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),R(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,s=Math.min(r,n);i<s;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;var r,n=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var s=e[r];if(R(s,Uint8Array))i+s.length>n.length?a.from(s).copy(n,i):Uint8Array.prototype.set.call(n,s,i);else if(a.isBuffer(s))s.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=s.length}return n},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)m(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)m(this,t,t+3),m(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?_(this,0,e):g.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(R(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var s=i-n,o=r-t,l=Math.min(s,o),u=this.slice(n,i),c=e.slice(t,r),d=0;d<l;++d)if(u[d]!==c[d]){s=u[d],o=c[d];break}return s<o?-1:o<s?1:0},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,s,o,a,l,u,c,d,h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var p=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var s=t.length;n>s/2&&(n=s/2);for(var o=0;o<n;++o){var a=parseInt(t.substr(2*o,2),16);if(a!=a)break;e[r+o]=a}return o}(this,e,t,r);case"utf8":case"utf-8":return i=t,s=r,I(k(e,this.length-i),this,i,s);case"ascii":case"latin1":case"binary":return o=t,a=r,I(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,o,a);case"base64":return l=t,u=r,I(O(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,d=r,I(function(e,t){for(var r,n,i=[],s=0;s<e.length&&!((t-=2)<0);++s)n=(r=e.charCodeAt(s))>>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,d);default:if(p)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),p=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,s=0;++s<t&&(i*=256);)n+=this[e+s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,s=this[e+--n];n>0&&(i*=256);)s+=this[e+--n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return(e>>>=0,t||b(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var s=1,o=0;for(this[t]=255&e;++o<r&&(s*=256);)this[t+o]=e/s&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;w(this,e,t,r,i,0)}var s=r-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(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},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(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},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var s=0,o=1,a=0;for(this[t]=255&e;++s<r&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);w(this,e,t,r,i-1,-i)}var s=r-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o>>0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||w(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},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||w(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},a.prototype.writeFloatLE=function(e,t,r){return C(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return C(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return E(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return E(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){var i,s=e.charCodeAt(0);("utf8"===n&&s<128||"latin1"===n)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=a.isBuffer(e)?e:a.from(e,n),l=o.length;
6if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%l]}return this};var x=/[^+/0-9A-Za-z-_]/g;function k(e,t){t=t||1/0;for(var r,n=e.length,i=null,s=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&s.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&s.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&s.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;s.push(r)}else if(r<2048){if((t-=2)<0)break;s.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;s.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;s.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return s}function O(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(x,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function I(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function R(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var T=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},6010:function(e,t,r){"use strict";function n(){for(var e,t,r=0,n="";r<arguments.length;)(e=arguments[r++])&&(t=function e(t){var r,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t){if(Array.isArray(t))for(r=0;r<t.length;r++)t[r]&&(n=e(t[r]))&&(i&&(i+=" "),i+=n);else for(r in t)t[r]&&(i&&(i+=" "),i+=r)}return i}(e))&&(n&&(n+=" "),n+=t);return n}r.d(t,{W:function(){return n}}),t.Z=n},645:function(e,t){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */t.read=function(e,t,r,n,i){var s,o,a=8*i-n-1,l=(1<<a)-1,u=l>>1,c=-7,d=r?i-1:0,h=r?-1:1,p=e[t+d];for(d+=h,s=p&(1<<-c)-1,p>>=-c,c+=a;c>0;s=256*s+e[t+d],d+=h,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=h,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:(p?-1:1)*(1/0);o+=Math.pow(2,n),s-=u}return(p?-1:1)*o*Math.pow(2,s-n)},t.write=function(e,t,r,n,i,s){var o,a,l,u=8*s-i-1,c=(1<<u)-1,d=c>>1,h=23===i?5960464477539062e-23:0,p=n?0:s-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=c?(a=0,o=c):o+d>=1?(a=(t*l-1)*Math.pow(2,i),o+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+p]=255&a,p+=f,a/=256,i-=8);for(o=o<<i|a,u+=i;u>0;e[r+p]=255&o,p+=f,o/=256,u-=8);e[r+p-f]|=128*g}},9548:function(e,t,r){"use strict";var n=r(4836);Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcastChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nextauth.message";return{receive:function(t){var r=function(r){if(r.key===e){var n,i=JSON.parse(null!==(n=r.newValue)&&void 0!==n?n:"{}");(null==i?void 0:i.event)==="session"&&null!=i&&i.data&&t(i)}};return window.addEventListener("storage",r),function(){return window.removeEventListener("storage",r)}},post:function(t){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(l(l({},t),{},{timestamp:d()})))}catch(e){}}}},t.apiBaseUrl=c,t.fetchData=function(e,t,r){return u.apply(this,arguments)},t.now=d;var i=n(r(4687)),s=n(r(8416)),o=n(r(7156));function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){(0,s.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(){return(u=(0,o.default)(i.default.mark(function e(t,r,n){var s,o,a,u,d,h,p,f,g,m=arguments;return i.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=(s=m.length>3&&void 0!==m[3]?m[3]:{}).ctx,u=void 0===(a=s.req)?null==o?void 0:o.req:a,d="".concat(c(r),"/").concat(t),e.prev=2,p={headers:l({"Content-Type":"application/json"}
6,null!=u&&null!==(h=u.headers)&&void 0!==h&&h.cookie?{cookie:u.headers.cookie}:{})},null!=u&&u.body&&(p.body=JSON.stringify(u.body),p.method="POST"),e.next=7,fetch(d,p);case 7:return f=e.sent,e.next=10,f.json();case 10:if(g=e.sent,f.ok){e.next=13;break}throw g;case 13:return e.abrupt("return",Object.keys(g).length>0?g:null);case 16:return e.prev=16,e.t0=e.catch(2),n.error("CLIENT_FETCH_ERROR",{error:e.t0,url:d}),e.abrupt("return",null);case 20:case"end":return e.stop()}},e,null,[[2,16]])}))).apply(this,arguments)}function c(e){return"undefined"==typeof window?"".concat(e.baseUrlServer).concat(e.basePathServer):e.basePath}function d(){return Math.floor(Date.now()/1e3)}},6925:function(e,t,r){"use strict";var n=r(4836);Object.defineProperty(t,"__esModule",{value:!0}),t.UnsupportedStrategy=t.UnknownError=t.OAuthCallbackError=t.MissingSecret=t.MissingAuthorize=t.MissingAdapterMethods=t.MissingAdapter=t.MissingAPIRoute=t.InvalidCallbackUrl=t.AccountNotLinkedError=void 0,t.adapterErrorHandler=function(e,t){if(e)return Object.keys(e).reduce(function(r,n){return r[n]=(0,s.default)(i.default.mark(function r(){var s,o,a,l,u,c=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:for(r.prev=0,o=Array(s=c.length),a=0;a<s;a++)o[a]=c[a];return t.debug("adapter_".concat(n),{args:o}),l=e[n],r.next=6,l.apply(void 0,o);case 6:return r.abrupt("return",r.sent);case 9:throw r.prev=9,r.t0=r.catch(0),t.error("adapter_error_".concat(n),r.t0),(u=new f(r.t0)).name="".concat(x(n),"Error"),u;case 15:case"end":return r.stop()}},r,null,[[0,9]])})),r},{})},t.capitalize=x,t.eventsErrorHandler=function(e,t){return Object.keys(e).reduce(function(r,n){return r[n]=(0,s.default)(i.default.mark(function r(){var s,o=arguments;return i.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,s=e[n],r.next=4,s.apply(void 0,o);case 4:return r.abrupt("return",r.sent);case 7:r.prev=7,r.t0=r.catch(0),t.error("".concat(E(n),"_EVENT_ERROR"),r.t0);case 10:case"end":return r.stop()}},r,null,[[0,7]])})),r},{})},t.upperSnake=E;var i=n(r(4687)),s=n(r(7156)),o=n(r(6115)),a=n(r(8416)),l=n(r(6690)),u=n(r(9728)),c=n(r(1655)),d=n(r(4993)),h=n(r(3808));function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct||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}}();return function(){var r,n=(0,h.default)(e);if(t){var i=(0,h.default)(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return(0,d.default)(this,r)}}var f=function(e){(0,c.default)(r,e);var t=p(r);function r(e){var n,i;return(0,l.default)(this,r),(i=t.call(this,null!==(n=null==e?void 0:e.message)&&void 0!==n?n:e)).name="UnknownError",i.code=e.code,e instanceof Error&&(i.stack=e.stack),i}return(0,u.default)(r,[{key:"toJSON",value:function(){return{name:this.name,message:this.message,stack:this.stack}}}]),r}((0,n(r(3496)).default)(Error));t.UnknownError=f;var g=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","OAuthCallbackError"),e}return(0,u.default)(r)}(f);t.OAuthCallbackError=g;var m=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","AccountNotLinkedError"),e}return(0,u.default)(r)}(f);t.AccountNotLinkedError=m;var y=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","MissingAPIRouteError"),(0,a.default)((0,o.default)(e),"code","MISSING_NEXTAUTH_API_ROUTE_ERROR"),e}return(0,u.default)(r)}(f);t.MissingAPIRoute=y;var v=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","MissingSecretError"),(0,a.default)((0,o.default)(e),"code","NO_SECRET"),e}return(0,u.default)(r)}(f);t.MissingSecret=v;var _=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","MissingAuthorizeError"),(0,a.default)((0,o.default)(e),"code","CALLBACK_CREDENTIALS_HANDLER_ERROR"),e}return(0,u.default)(r)}(f);t.MissingAuthorize=_;var b=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","MissingAdapterError"),(0,a.default)((0,o.default)(e),"code","
6EMAIL_REQUIRES_ADAPTER_ERROR"),e}return(0,u.default)(r)}(f);t.MissingAdapter=b;var w=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","MissingAdapterMethodsError"),(0,a.default)((0,o.default)(e),"code","MISSING_ADAPTER_METHODS_ERROR"),e}return(0,u.default)(r)}(f);t.MissingAdapterMethods=w;var S=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","UnsupportedStrategyError"),(0,a.default)((0,o.default)(e),"code","CALLBACK_CREDENTIALS_JWT_ERROR"),e}return(0,u.default)(r)}(f);t.UnsupportedStrategy=S;var C=function(e){(0,c.default)(r,e);var t=p(r);function r(){var e;(0,l.default)(this,r);for(var n=arguments.length,i=Array(n),s=0;s<n;s++)i[s]=arguments[s];return e=t.call.apply(t,[this].concat(i)),(0,a.default)((0,o.default)(e),"name","InvalidCallbackUrl"),(0,a.default)((0,o.default)(e),"code","INVALID_CALLBACK_URL_ERROR"),e}return(0,u.default)(r)}(f);function E(e){return e.replace(/([A-Z])/g,"_$1").toUpperCase()}function x(e){return"".concat(e[0].toUpperCase()).concat(e.slice(1))}t.InvalidCallbackUrl=C},3299:function(e,t,r){"use strict";var n,i,s,o,a,l=r(3454),u=r(4836),c=r(8698);Object.defineProperty(t,"__esModule",{value:!0});var d={SessionContext:!0,useSession:!0,getSession:!0,getCsrfToken:!0,getProviders:!0,signIn:!0,signOut:!0,SessionProvider:!0};t.SessionContext=void 0,t.SessionProvider=function(e){if(!R)throw Error("React Context is unavailable in Server Components");var t,r,n,i,s,o,a=e.children,l=e.basePath,u=e.refetchInterval,c=e.refetchWhenOffline;l&&(k.basePath=l);var d=void 0!==e.session;k._lastSync=d?(0,_.now)():0;var p=m.useState(function(){return d&&(k._session=e.session),e.session}),y=(0,g.default)(p,2),v=y[0],w=y[1],S=m.useState(!d),C=(0,g.default)(S,2),E=C[0],x=C[1];m.useEffect(function(){return k._getSession=(0,f.default)(h.default.mark(function e(){var t,r,n=arguments;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=(n.length>0&&void 0!==n[0]?n[0]:{}).event,e.prev=1,!((r="storage"===t)||void 0===k._session)){e.next=10;break}return k._lastSync=(0,_.now)(),e.next=7,T({broadcast:!r});case 7:return k._session=e.sent,w(k._session),e.abrupt("return");case 10:if(!(!t||null===k._session||(0,_.now)()<k._lastSync)){e.next=12;break}return e.abrupt("return");case 12:return k._lastSync=(0,_.now)(),e.next=15,T();case 15:k._session=e.sent,w(k._session),e.next=22;break;case 19:e.prev=19,e.t0=e.catch(1),I.error("CLIENT_SESSION_ERROR",e.t0);case 22:return e.prev=22,x(!1),e.finish(22);case 25:case"end":return e.stop()}},e,null,[[1,19,22,25]])})),k._getSession(),function(){k._lastSync=0,k._session=void 0,k._getSession=function(){}}},[]),m.useEffect(function(){var e=O.receive(function(){return k._getSession({event:"storage"})});return function(){return e()}},[]),m.useEffect(function(){var t=e.refetchOnWindowFocus,r=void 0===t||t,n=function(){r&&"visible"===document.visibilityState&&k._getSession({event:"visibilitychange"})};return document.addEventListener("visibilitychange",n,!1),function(){return document.removeEventListener("visibilitychange",n,!1)}},[e.refetchOnWindowFocus]);var M=(t=m.useState("undefined"!=typeof navigator&&navigator.onLine),n=(r=(0,g.default)(t,2))[0],i=r[1],s=function(){return i(!0)},o=function(){return i(!1)},m.useEffect(function(){return window.addEventListener("online",s),window.addEventListener("offline",o),function(){window.removeEventListener("online",s),window.removeEventListener("offline",o)}},[]),n),D=!1!==c||M;m.useEffect(function(){if(u&&D){var e=setInterval(function(){k._session&&k._getSession({event:"poll"})},1e3*u);return function(){return clearInterval(e)}}},[u,D]);var P=m.useMemo(function(){return{data:v,status:E?"loading":v?"authenticated":"unauthenticated",update:function(e){return(0,f.default)(h.default.mark(function t(){var r;return h.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!(E||!v)){t.next=2;break}return t.abrupt("return");case 2:return x(!0),t.t0=_.fetchData,t.t1=k,t.t2=I,t.next=8,A();case 8:return t.t3=t.sent,t.t4=e,t.t5={csrfToken:t.t3,data:t.t4},t.t6={body:t.t5},t.t7={req:t.t6},t.next=15,(0,t.t0)("session",t.t1,t.t2,t.t7);case 15:return r=t.sent,x(!1),r&&(w(r),O.post({event:"session",data:{trigger:"getSession"}})),t.abrupt("return",r);case 19:case"end":return t.stop()}},t)}))()}}},[v,E]);return(0,b.jsx)(R.Provider,{value:P,children:a})},t.getCsrfToken=A,t.getProviders=P,t.getSession=T,t.signIn=function(e,t,r){return N.apply(this,arguments)},t.signOut=function(e){return j.apply(this,arguments)},t.useSession=function(e){if(!R)throw Error("React Context is unavailable in Server Components");var t=m.useContext(R),r=null!=e?e:{},n=r.required,i=r.onUnauthenticated,s=n&&"unauthenticated"===t.status;return(m.useEffect(function(){if(s){var e="/api/auth/signin?".concat(new
6URLSearchParams({error:"SessionRequired",callbackUrl:window.location.href}));i?i():window.location.href=e}},[s,i]),s)?{data:t.data,update:t.update,status:"loading"}:t};var h=u(r(4687)),p=u(r(8416)),f=u(r(7156)),g=u(r(7424)),m=C(r(7294)),y=C(r(6553)),v=u(r(762)),_=r(9548),b=r(5893),w=r(527);function S(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(S=function(e){return e?r:t})(e)}function C(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var r=S(t);if(r&&r.has(e))return r.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach(function(t){(0,p.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}
6Object.keys(w).forEach(function(e){!("default"===e||"__esModule"===e||Object.prototype.hasOwnProperty.call(d,e))&&(e in t&&t[e]===w[e]||Object.defineProperty(t,e,{enumerable:!0,get:function(){return w[e]}}))});var k={baseUrl:(0,v.default)(null!==(n=l.env.NEXTAUTH_URL)&&void 0!==n?n:l.env.VERCEL_URL).origin,basePath:(0,v.default)(l.env.NEXTAUTH_URL).path,baseUrlServer:(0,v.default)(null!==(i=null!==(s=l.env.NEXTAUTH_URL_INTERNAL)&&void 0!==s?s:l.env.NEXTAUTH_URL)&&void 0!==i?i:l.env.VERCEL_URL).origin,basePathServer:(0,v.default)(null!==(o=l.env.NEXTAUTH_URL_INTERNAL)&&void 0!==o?o:l.env.NEXTAUTH_URL).path,_lastSync:0,_session:void 0,_getSession:function(){}},O=(0,_.BroadcastChannel)(),I=(0,y.proxyLogger)(y.default,k.basePath),R=null===(a=m.createContext)||void 0===a?void 0:a.call(m,void 0);function T(e){return M.apply(this,arguments)}function M(){return(M=(0,f.default)(h.default.mark(function e(t){var r,n;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.fetchData)("session",k,I,t);case 2:return n=e.sent,(null===(r=null==t?void 0:t.broadcast)||void 0===r||r)&&O.post({event:"session",data:{trigger:"getSession"}}),e.abrupt("return",n);case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function A(e){return D.apply(this,arguments)}function D(){return(D=(0,f.default)(h.default.mark(function e(t){var r;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.fetchData)("csrf",k,I,t);case 2:return r=e.sent,e.abrupt("return",null==r?void 0:r.csrfToken);case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function P(){return L.apply(this,arguments)}function L(){return(L=(0,f.default)(h.default.mark(function e(){return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.fetchData)("providers",k,I);case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function N(){return(N=(0,f.default)(h.default.mark(function e(t,r,n){var i,s,o,a,l,u,c,d,p,f,g,m,y,v,b,w,S;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=void 0===(s=(i=null!=r?r:{}).callbackUrl)?window.location.href:s,l=void 0===(a=i.redirect)||a,u=(0,_.apiBaseUrl)(k),e.next=4,P();case 4:if(c=e.sent){e.next=8;break}return window.location.href="".concat(u,"/error"),e.abrupt("return");case 8:if(!(!t||!(t in c))){e.next=11;break}return window.location.href="".concat(u,"/signin?").concat(new URLSearchParams({callbackUrl:o})),e.abrupt("return");case 11:return d="credentials"===c[t].type,p="email"===c[t].type,f=d||p,g="".concat(u,"/").concat(d?"callback":"signin","/").concat(t),m="".concat(g,"?").concat(new URLSearchParams(n)),e.t0=fetch,e.t1=m,e.t2={"Content-Type":"application/x-www-form-urlencoded"},e.t3=URLSearchParams,e.t4=x,e.t5=x({},r),e.t6={},e.next=25,A();case 25:return e.t7=e.sent,e.t8=o,e.t9={csrfToken:e.t7,callbackUrl:e.t8,json:!0},e.t10=(0,e.t4)(e.t5,e.t6,e.t9),e.t11=new e.t3(e.t10),e.t12={method:"post",headers:e.t2,body:e.t11},e.next=33,(0,e.t0)(e.t1,e.t12);case 33:return y=e.sent,e.next=36,y.json();case 36:if(v=e.sent,!(l||!f)){e.next=42;break}return w=null!==(b=v.url)&&void 0!==b?b:o,window.location.href=w,w.includes("#")&&window.location.reload(),e.abrupt("return");case 42:if(S=new URL(v.url).searchParams.get("error"),!y.ok){e.next=46;break}return e.next=46,k._getSession({event:"storage"});case 46:return e.abrupt("return",{error:S,status:y.status,ok:y.ok,url:S?null:v.url});case 47:case"end":return e.stop()}},e)}))).apply(this,arguments)}function j(){return(j=(0,f.default)(h.default.mark(function e(t){var r,n,i,s,o,a,l,u,c;return h.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=void 0===(n=(null!=t?t:{}).callbackUrl)?window.location.href:n,s=(0,_.apiBaseUrl)(k),e.t0={"Content-Type":"application/x-www-form-urlencoded"},e.t1=URLSearchParams,e.next=6,A();case 6:return e.t2=e.sent,e.t3=i,e.t4={csrfToken:e.t2,callbackUrl:e.t3,json:!0},e.t5=new e.t1(e.t4),o={method:"post",headers:e.t0,body:e.t5},e.next=13,fetch("".concat(s,"/signout"),o);case 13:return a=e.sent,e.next=16,a.json();case 16:if(l=e.sent,O.post({event:"session",data:{trigger:"signout"}}),!(null===(r=null==t?void 0:t.redirect)||void 0===r||r)){e.next=23;break}return c=null!==(u=l.url)&&void 0!==u?u:i,window.location.href=c,c.includes("#")&&window.location.reload(),e.abrupt("return");case 23:return e.next=25,k._getSession({event:"storage"});case 25:return e.abrupt("return",l);case 26:case"end":return e.stop()}},e)}))).apply(this,arguments)}t.SessionContext=R},527:function(e,t){"use strict";
6Object.defineProperty(t,"__esModule",{value:!0})},6553:function(e,t,r){"use strict";var n=r(4836);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,t.proxyLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:l,t=arguments.length>1?arguments[1]:void 0;try{if("undefined"==typeof window)return e;var r={},n=function(e){r[e]=function(r,n){l[e](r,n),"error"===e&&(n=a(n)),n.client=!0;var s="".concat(t,"/_log"),u=new URLSearchParams(function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){(0,i.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({level:e,code:r},n));return navigator.sendBeacon?navigator.sendBeacon(s,u):fetch(s,{method:"POST",body:u,keepalive:!0})}};for(var s in e)n(s);return r}catch(e){return l}},t.setLogger=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t||(l.debug=function(){}),e.error&&(l.error=e.error),e.warn&&(l.warn=e.warn),e.debug&&(l.debug=e.debug)};var i=n(r(8416)),s=r(6925);function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){var t;return e instanceof Error&&!(e instanceof s.UnknownError)?{message:e.message,stack:e.stack,name:e.name}:(null!=e&&e.error&&(e.error=a(e.error),e.message=null!==(t=e.message)&&void 0!==t?t:e.error.message),e)}var l={error:function(e,t){t=a(t),console.error("[next-auth][error][".concat(e,"]"),"\nhttps://next-auth.js.org/errors#".concat(e.toLowerCase()),t.message,t)},warn:function(e){console.warn("[next-auth][warn][".concat(e,"]"),"\nhttps://next-auth.js.org/warnings#".concat(e.toLowerCase()))},debug:function(e,t){console.log("[next-auth][debug][".concat(e,"]"),t)}};t.default=l},762:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t;let r=new URL("http://localhost:3000/api/auth");e&&!e.startsWith("http")&&(e=`https://${e}`);let n=new URL(null!==(t=e)&&void 0!==t?t:r),i=("/"===n.pathname?r.pathname:n.pathname).replace(/\/$/,""),s=`${n.origin}${i}`;return{origin:n.origin,host:n.host,path:i,base:s,toString:()=>s}}},3454:function(e,t,r){"use strict";var n,i;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(i=r.g.process)?void 0:i.env)?r.g.process:r(7663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(6932)}])},6531:function(e,t,r){"use strict";var n=r(7294),i=r(7565),s=r(1163),o=r(673),a=r(7636),l=r(3299),u=r(9754);t.Z=()=>{let{mutateAsync:e}=i.h.user.guestRead.useMutation(),{mutateAsync:t}=i.h.user.getGuestUser.useMutation(),{mutateAsync:r}=i.h.user.updateUser.useMutation(),{push:c}=(0,s.useRouter)(),{data:d,status:h}=(0,l.useSession)(),{addChat:p,addRead:f,setUsage:g,usage:m,setIsSubscribed:y,isSubscribed:v,storeUser:_}=(0,o.L)(),[b,w]=(0,n.useState)(!1),{setGuessWallShow:S}=(0,u.H)(),C=(0,n.useCallback)(async()=>{v||(m.read>=a.ZP.USAGE_LIMIT.read?S(!0):(f(),e()))},[m,v]),E=(0,n.useCallback)(async()=>{if(!b){w(!0);try{let e=await t();if(console.log("getUser",e),!e.error){let{user:t}=e;t.workspace?(_(t),g({chat:0,read:0}),y(!0),t.registered||c("/onboarding")):(g({chat:t.chat,read:t.read}),y(!1))}return e}finally{w(!1)}}},[b,t,g,y,_,c]),x=(0,n.useCallback)(async e=>{let{firstName:t,lastName:n,description:i}=e;w(!0);let s=await r({firstName:t,lastName:n,description:i});console.log({updateUserResponse:s}),s.error||c("/"),w(!1)},[]),k=(0,n.useCallback)(async()=>{if("authenticated"===h){var e;window.open("".concat("https://billing.stripe.com/p/login/eVa2892YidNZ3PG9AA?prefilled_email=").concat(null==d?void 0:null===(e=d.user)||void 0===e?void 0:e.email),"_blank")}},[h]);return{read:C,getUser:E,updateUser:x,isLoading:b,userBilling:k}}},2296:function(e,t,r){"use strict";r.d(t,{l2:function(){return tu},bG:function(){return to},sU:function(){return ta},Gg:function(){return tl}});var n,i,s,o,a,l,u,c,d=r(250),h=r(909),p=r(2566);(n=o||(o={})).assertEqual=e=>e,n.assertIs=function(e){},n.assertNever=function(e){throw Error()},n.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},n.getValidEnumValues=e=>{let t=n.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),r={};for(let n of t)r[n]=e[n];return n.objectValues(r)},n.objectValues=e=>n.objectKeys(e).map(function(t){return e[t]}),n.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},n.find=(e,t)=>{for(let r of e)if(t(r))return r},n.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,n.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},n.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(a||(a={})).mergeShapes=(e,t)=>({...e,...t});let f=o.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),g=e=>{let t=typeof e;switch(t){case"undefined":return f.undefined;case"string":return f.string;case"number":return isNaN(e)?f.nan:f.number;case"boolean":return f.boolean;case"function":return f.function;case"bigint":return f.bigint;case"symbol":return f.symbol;case"object":if(Array.isArray(e))return f.array;if(null===e)return f.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return f.promise;if("undefined"!=typeof Map&&e instanceof Map)return f.map;if("undefined"!=typeof Set&&e instanceof Set)return f.set;if("undefined"!=typeof Date&&e instanceof Date)return f.date;return f.object;default:return f.unknown}}
6,m=o.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class y extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){let r=i.path[n],s=n===i.path.length-1;s?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,o.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}y.create=e=>{let t=new y(e);return t};let v=(e,t)=>{let r;switch(e.code){case m.invalid_type:r=e.received===f.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,o.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:r=`Unrecognized key(s) in object: ${o.joinValues(e.keys,", ")}`;break;case m.invalid_union:r="Invalid input";break;case m.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${o.joinValues(e.options)}`;break;case m.invalid_enum_value:r=`Invalid enum value. Expected ${o.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:r="Invalid function arguments";break;case m.invalid_return_type:r="Invalid function return type";break;case m.invalid_date:r="Invalid date";break;case m.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:o.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case m.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case m.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case m.custom:r="Invalid input";break;
6case m.invalid_intersection_types:r="Intersection results could not be merged";break;case m.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:r="Number must be finite";break;default:r=t.defaultError,o.assertNever(e)}return{message:r}},_=v,b=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,s=[...r,...i.path||[]],o={...i,path:s},a="",l=n.filter(e=>!!e).slice().reverse();for(let e of l)a=e(o,{data:t,defaultError:a}).message;return{...i,path:s,message:i.message||a}};function w(e,t){let r=b({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,_,v].filter(e=>!!e)});e.common.issues.push(r)}class S{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return C;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t)r.push({key:await e.key,value:await e.value});return S.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return C;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let C=Object.freeze({status:"aborted"}),E=e=>({status:"dirty",value:e}),x=e=>({status:"valid",value:e}),k=e=>"aborted"===e.status,O=e=>"dirty"===e.status,I=e=>"valid"===e.status,R=e=>"undefined"!=typeof Promise&&e instanceof Promise;(i=l||(l={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},i.toString=e=>"string"==typeof e?e:null==e?void 0:e.message;class T{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let M=(e,t)=>{if(I(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new y(e.common.issues);return this._error=t,this._error}}};function A(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(e,t)=>"invalid_type"!==e.code?{message:t.defaultError}:void 0===t.data?{message:null!=n?n:t.defaultError}:{message:null!=r?r:t.defaultError},description:i}}class D{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return g(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:g(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new S,ctx:{common:e.parent.common,data:e.data,parsedType:g(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(R(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;let n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:g(e)},i=this._parseSync({data:e,path:n.path,parent:n});return M(n,i)}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:g(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await (R(n)?n:Promise.resolve(n));return M(r,i)}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),s=()=>n.addIssue({code:m.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(s(),!1)):!!i||(s(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new ev({schema:this,typeName:u.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return e_.create(this,this._def)}nullable(){return eb.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return et.create(this,this._def)}promise(){return ey.create(this,this._def)}or(e){return en.create([this,e],this._def)}and(e){return eo.create(this,e,this._def)}transform(e){return new ev({...A(this._def),schema:this,typeName:u.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new ew({...A(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:u.ZodDefault})}brand(){return new ex({typeName:u.ZodBranded,type:this,...A(this._def)})}catch(e){return new eS({...A(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:u.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return ek.create(this,e)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let P=/^c[^\s-]{8,}$/i,L=/^[a-z][a-z0-9]*$/,N=/[0-9A-HJKMNP-TV-Z]{26}/,j=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,U=/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\])|(\[IPv6:(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\.[A-Za-z]{2,})+))$/,F=/^(\p{Extended_Pictographic}|\p{Emoji_Component})+$/u,B=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,z=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,V=e=>e.precision?e.offset?RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):0===e.precision?e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");class q extends D{constructor(){super(...arguments),this._regex=(e,t,r)=>this.refinement(t=>e.test(t),{validation:t,code:m.invalid_string,...l.errToObj(r)}),this.nonempty=e=>this.min(1,l.errToObj(e)),this.trim=()=>new q({...this._def,checks:[...this._def.checks,{kind:"trim"}]}),this.toLowerCase=()=>new q({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]}),this.toUpperCase=()=>new q({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}_parse(e){let t;this._def.coerce&&(e.data=String(e.data));let r=this._getType(e);if(r!==f.string){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.string,received:t.parsedType}),C}let n=new S;for(let r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty());else if("max"===r.kind)e.data.length>r.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),n.dirty());else if("length"===r.kind){let i=e.data.length>r.value,s=e.data.length<r.value;(i||s)&&(t=this._getOrReturnCtx(e,t),i?w(t,{code:m.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):s&&w(t,{code:m.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),n.dirty())}else if("email"===r.kind)U.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{validation:"email",code:m.invalid_string,message:r.message}),n.dirty());else if("emoji"===r.kind)F.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{validation:"emoji",code:m.invalid_string,message:r.message}),n.dirty());else if("uuid"===r.kind)j.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{validation:"uuid",code:m.invalid_string,message:r.message}),n.dirty());else if("cuid"===r.kind)P.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{validation:"cuid",code:m.invalid_string,message:r.message}),n.dirty());else if("cuid2"===r.kind)L.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{validation:"cuid2",code:m.invalid_string,message:r.message}),n.dirty());else if("ulid"===r.kind)N.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{validation:"ulid",code:m.invalid_string,message:r.message}),n.dirty());else if("url"===r.kind)try{new URL(e.data)}catch(i){w(t=this._getOrReturnCtx(e,t),{validation:"url",code:m.invalid_string,message:r.message}),n.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;let i=r.regex.test(e.data);i||(w(t=this._getOrReturnCtx(e,t),{validation:"regex",code:m.invalid_string,message:r.message}),n.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),n.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:{startsWith:r.value},message:r.message}),n.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:{endsWith:r.value},message:r.message}),n.dirty());else if("datetime"===r.kind){let i=V(r);i.test(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_string,validation:"datetime",message:r.message}),n.dirty())}else if("ip"===r.kind){var i,s;i=e.data,("v4"===(s=r.version)||!s)&&B.test(i)||("v6"===s||!s)&&z.test(i)||(w(t=this._getOrReturnCtx(e,t),{validation:"ip",code:m.invalid_string,message:r.message}),n.dirty())}else o.assertNever(r);return{status:n.value,value:e.data}}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}datetime(e){var t;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,...l.errToObj(null==e?void 0:e.message)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...l.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}
6get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}q.create=e=>{var t;return new q({checks:[],typeName:u.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...A(e)})};class K extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;this._def.coerce&&(e.data=Number(e.data));let r=this._getType(e);if(r!==f.number){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.number,received:t.parsedType}),C}let n=new S;for(let r of this._def.checks)if("int"===r.kind)o.isInteger(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){let i=r.inclusive?e.data<r.value:e.data<=r.value;i&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){let i=r.inclusive?e.data>r.value:e.data>=r.value;i&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n,s=parseInt(e.toFixed(i).replace(".","")),o=parseInt(t.toFixed(i).replace(".",""));return s%o/Math.pow(10,i)}(e.data,r.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.not_finite,message:r.message}),n.dirty()):o.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new K({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&o.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}K.create=e=>new K({checks:[],typeName:u.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...A(e)});class Z extends D{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;this._def.coerce&&(e.data=BigInt(e.data));let r=this._getType(e);if(r!==f.bigint){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.bigint,received:t.parsedType}),C}let n=new S;for(let r of this._def.checks)if("min"===r.kind){let i=r.inclusive?e.data<r.value:e.data<=r.value;i&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else if("max"===r.kind){let i=r.inclusive?e.data>r.value:e.data>=r.value;i&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(w(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):o.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,n){return new Z({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(n)}]})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}
6positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}Z.create=e=>{var t;return new Z({checks:[],typeName:u.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...A(e)})};class W extends D{_parse(e){this._def.coerce&&(e.data=!!e.data);let t=this._getType(e);if(t!==f.boolean){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.boolean,received:t.parsedType}),C}return x(e.data)}}W.create=e=>new W({typeName:u.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...A(e)});class G extends D{_parse(e){let t;this._def.coerce&&(e.data=new Date(e.data));let r=this._getType(e);if(r!==f.date){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.date,received:t.parsedType}),C}if(isNaN(e.data.getTime())){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_date}),C}let n=new S;for(let r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),n.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),n.dirty()):o.assertNever(r);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new G({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}G.create=e=>new G({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:u.ZodDate,...A(e)});class $ extends D{_parse(e){let t=this._getType(e);if(t!==f.symbol){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.symbol,received:t.parsedType}),C}return x(e.data)}}$.create=e=>new $({typeName:u.ZodSymbol,...A(e)});class Q extends D{_parse(e){let t=this._getType(e);if(t!==f.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.undefined,received:t.parsedType}),C}return x(e.data)}}Q.create=e=>new Q({typeName:u.ZodUndefined,...A(e)});class H extends D{_parse(e){let t=this._getType(e);if(t!==f.null){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.null,received:t.parsedType}),C}return x(e.data)}}H.create=e=>new H({typeName:u.ZodNull,...A(e)});class Y extends D{constructor(){super(...arguments),this._any=!0}_parse(e){return x(e.data)}}Y.create=e=>new Y({typeName:u.ZodAny,...A(e)});class J extends D{constructor(){super(...arguments),this._unknown=!0}_parse(e){return x(e.data)}}J.create=e=>new J({typeName:u.ZodUnknown,...A(e)});class X extends D{_parse(e){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.never,received:t.parsedType}),C}}X.create=e=>new X({typeName:u.ZodNever,...A(e)});class ee extends D{_parse(e){let t=this._getType(e);if(t!==f.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.void,received:t.parsedType}),C}return x(e.data)}}ee.create=e=>new ee({typeName:u.ZodVoid,...A(e)});class et extends D{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==f.array)return w(t,{code:m.invalid_type,expected:f.array,received:t.parsedType}),C;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(w(t,{code:e?m.too_big:m.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(w(t,{code:m.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(w(t,{code:m.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new T(t,e,t.path,r)))).then(e=>S.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new T(t,e,t.path,r)));return S.mergeArray(r,i)}
6get element(){return this._def.type}min(e,t){return new et({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new et({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new et({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}et.create=(e,t)=>new et({type:e,minLength:null,maxLength:null,exactLength:null,typeName:u.ZodArray,...A(t)});class er extends D{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=o.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){let t=this._getType(e);if(t!==f.object){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.object,received:t.parsedType}),C}let{status:r,ctx:n}=this._processInputParams(e),{shape:i,keys:s}=this._getCached(),o=[];if(!(this._def.catchall instanceof X&&"strip"===this._def.unknownKeys))for(let e in n.data)s.includes(e)||o.push(e);let a=[];for(let e of s){let t=i[e],r=n.data[e];a.push({key:{status:"valid",value:e},value:t._parse(new T(n,r,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof X){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of o)a.push({key:{status:"valid",value:e},value:{status:"valid",value:n.data[e]}});else if("strict"===e)o.length>0&&(w(n,{code:m.unrecognized_keys,keys:o}),r.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of o){let r=n.data[t];a.push({key:{status:"valid",value:t},value:e._parse(new T(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of a){let r=await t.key;e.push({key:r,value:await t.value,alwaysSet:t.alwaysSet})}return e}).then(e=>S.mergeObjectSync(r,e)):S.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new er({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,s,o;let a=null!==(s=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==s?s:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=l.errToObj(e).message)&&void 0!==o?o:a}:{message:a}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(e){return new er({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){let t=new er({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:u.ZodObject});return t}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new er({...this._def,catchall:e})}pick(e){let t={};return o.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new er({...this._def,shape:()=>t})}omit(e){let t={};return o.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new er({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof er){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=e_.create(e(i))}return new er({...t._def,shape:()=>r})}return t instanceof et?new et({...t._def,type:e(t.element)}):t instanceof e_?e_.create(e(t.unwrap())):t instanceof eb?eb.create(e(t.unwrap())):t instanceof ea?ea.create(t.items.map(t=>e(t))):t}(this)}partial(e){let t={};return o.objectKeys(this.shape).forEach(r=>{let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}),new er({...this._def,shape:()=>t})}required(e){let t={};return o.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r],n=e;for(;n instanceof e_;)n=n._def.innerType;t[r]=n}}),new er({...this._def,shape:()=>t})}keyof(){return ef(o.objectKeys(this.shape))}}er.create=(e,t)=>new er({shape:()=>e,unknownKeys:"strip",catchall:X.create(),typeName:u.ZodObject,...A(t)}),er.strictCreate=(e,t)=>new er({shape:()=>e,unknownKeys:"strict",catchall:X.create(),typeName:u.ZodObject,...A(t)}),er.lazycreate=(e,t)=>new er({shape:e,unknownKeys:"strip",catchall:X.create(),typeName:u.ZodObject,...A(t)});class en extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new y(e.ctx.common.issues));return w(t,{code:m.invalid_union,unionErrors:r}),C});{let e;let n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},s=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new y(e));return w(t,{code:m.invalid_union,unionErrors:i}),C}}get options(){return this._def.options}}en.create=(e,t)=>
6new en({options:e,typeName:u.ZodUnion,...A(t)});let ei=e=>{if(e instanceof eh)return ei(e.schema);if(e instanceof ev)return ei(e.innerType());if(e instanceof ep)return[e.value];if(e instanceof eg)return e.options;if(e instanceof em)return Object.keys(e.enum);if(e instanceof ew)return ei(e._def.innerType);if(e instanceof Q)return[void 0];else if(e instanceof H)return[null];else return null};class es extends D{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.object)return w(t,{code:m.invalid_type,expected:f.object,received:t.parsedType}),C;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(w(t,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),C)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=ei(r.shape[e]);if(!t)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new es({typeName:u.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...A(r)})}}class eo extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(k(e)||k(n))return C;let i=function e(t,r){let n=g(t),i=g(r);if(t===r)return{valid:!0,data:t};if(n===f.object&&i===f.object){let n=o.objectKeys(r),i=o.objectKeys(t).filter(e=>-1!==n.indexOf(e)),s={...t,...r};for(let n of i){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};s[n]=i.data}return{valid:!0,data:s}}if(n===f.array&&i===f.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;i<t.length;i++){let s=t[i],o=r[i],a=e(s,o);if(!a.valid)return{valid:!1};n.push(a.data)}return{valid:!0,data:n}}return n===f.date&&i===f.date&&+t==+r?{valid:!0,data:t}:{valid:!1}}(e.value,n.value);return i.valid?((O(e)||O(n))&&t.dirty(),{status:t.value,value:i.data}):(w(r,{code:m.invalid_intersection_types}),C)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}eo.create=(e,t,r)=>new eo({left:e,right:t,typeName:u.ZodIntersection,...A(r)});class ea extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==f.array)return w(r,{code:m.invalid_type,expected:f.array,received:r.parsedType}),C;if(r.data.length<this._def.items.length)return w(r,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),C;let n=this._def.rest;!n&&r.data.length>this._def.items.length&&(w(r,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let i=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new T(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(i).then(e=>S.mergeArray(t,e)):S.mergeArray(t,i)}get items(){return this._def.items}rest(e){return new ea({...this._def,rest:e})}}ea.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ea({items:e,typeName:u.ZodTuple,rest:null,...A(t)})};class el extends D{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==f.object)return w(r,{code:m.invalid_type,expected:f.object,received:r.parsedType}),C;let n=[],i=this._def.keyType,s=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new T(r,e,r.path,e)),value:s._parse(new T(r,r.data[e],r.path,e))});return r.common.async?S.mergeObjectAsync(t,n):S.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new el(t instanceof D?{keyType:e,valueType:t,typeName:u.ZodRecord,...A(r)}:{keyType:q.create(),valueType:e,typeName:u.ZodRecord,...A(t)})}}class eu extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==f.map)return w(r,{code:m.invalid_type,expected:f.map,received:r.parsedType}),C;let n=this._def.keyType,i=this._def.valueType,s=[...r.data.entries()].map(([e,t],s)=>({key:n._parse(new T(r,e,r.path,[s,"key"])),value:i._parse(new T(r,t,r.path,[s,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of s){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return C;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of s){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return C;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}eu.create=(e,t,r)=>new eu({valueType:t,keyType:e,typeName:u.ZodMap,...A(r)});class ec extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==f.set)return w(r,{code:m.invalid_type,expected:f.set,received:r.parsedType}),C;let n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(w(r,{code:m.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(w(r,{code:m.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function s(e){let r=new Set;for(let n of e){if("aborted"===n.status)return C;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let o=[...r.data.values()].map((e,t)=>i._parse(new T(r,e,r.path,t)));return r.common.async?Promise.all(o).then(e=>s(e)):s(o)}min(e,t){return new ec({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new ec({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ec.create=(e,t)=>
6new ec({valueType:e,minSize:null,maxSize:null,typeName:u.ZodSet,...A(t)});class ed extends D{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.function)return w(t,{code:m.invalid_type,expected:f.function,received:t.parsedType}),C;function r(e,r){return b({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_,v].filter(e=>!!e),issueData:{code:m.invalid_arguments,argumentsError:r}})}function n(e,r){return b({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,_,v].filter(e=>!!e),issueData:{code:m.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},s=t.data;return this._def.returns instanceof ey?x(async(...e)=>{let t=new y([]),o=await this._def.args.parseAsync(e,i).catch(n=>{throw t.addIssue(r(e,n)),t}),a=await s(...o),l=await this._def.returns._def.type.parseAsync(a,i).catch(e=>{throw t.addIssue(n(a,e)),t});return l}):x((...e)=>{let t=this._def.args.safeParse(e,i);if(!t.success)throw new y([r(e,t.error)]);let o=s(...t.data),a=this._def.returns.safeParse(o,i);if(!a.success)throw new y([n(o,a.error)]);return a.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ed({...this._def,args:ea.create(e).rest(J.create())})}returns(e){return new ed({...this._def,returns:e})}implement(e){let t=this.parse(e);return t}strictImplement(e){let t=this.parse(e);return t}static create(e,t,r){return new ed({args:e||ea.create([]).rest(J.create()),returns:t||J.create(),typeName:u.ZodFunction,...A(r)})}}class eh extends D{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.getter();return r._parse({data:t.data,path:t.path,parent:t})}}eh.create=(e,t)=>new eh({getter:e,typeName:u.ZodLazy,...A(t)});class ep extends D{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:m.invalid_literal,expected:this._def.value}),C}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ef(e,t){return new eg({values:e,typeName:u.ZodEnum,...A(t)})}ep.create=(e,t)=>new ep({value:e,typeName:u.ZodLiteral,...A(t)});class eg extends D{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return w(t,{expected:o.joinValues(r),received:t.parsedType,code:m.invalid_type}),C}if(-1===this._def.values.indexOf(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return w(t,{received:t.data,code:m.invalid_enum_value,options:r}),C}return x(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e){return eg.create(e)}exclude(e){return eg.create(this.options.filter(t=>!e.includes(t)))}}eg.create=ef;class em extends D{_parse(e){let t=o.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==f.string&&r.parsedType!==f.number){let e=o.objectValues(t);return w(r,{expected:o.joinValues(e),received:r.parsedType,code:m.invalid_type}),C}if(-1===t.indexOf(e.data)){let e=o.objectValues(t);return w(r,{received:r.data,code:m.invalid_enum_value,options:e}),C}return x(e.data)}get enum(){return this._def.values}}em.create=(e,t)=>new em({values:e,typeName:u.ZodNativeEnum,...A(t)});class ey extends D{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==f.promise&&!1===t.common.async)return w(t,{code:m.invalid_type,expected:f.promise,received:t.parsedType}),C;let r=t.parsedType===f.promise?t.data:Promise.resolve(t.data);return x(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ey.create=(e,t)=>new ey({type:e,typeName:u.ZodPromise,...A(t)});class ev extends D{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===u.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null;if("preprocess"===n.type){let e=n.transform(r.data);return r.common.async?Promise.resolve(e).then(e=>this._def.schema._parseAsync({data:e,path:r.path,parent:r})):this._def.schema._parseSync({data:e,path:r.path,parent:r})}let i={addIssue:e=>{w(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"refinement"===n.type){let e=e=>{let t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?C:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?C:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type){if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>I(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):e);{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!I(e))return e;let s=n.transform(e.value,i);if(s instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}}o.assertNever(n)}}ev.create=(e,t,r)=>new ev({schema:e,typeName:u.ZodEffects,effect:t,...A(r)}),ev.createWithPreprocess=(e,t,r)=>new ev({schema:t,effect:{type:"preprocess",transform:e},typeName:u.ZodEffects,...A(r)});class e_ extends D{_parse(e){let t=this._getType(e);return t===f.undefined?x(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}e_.create=(e,t)=>
6new e_({innerType:e,typeName:u.ZodOptional,...A(t)});class eb extends D{_parse(e){let t=this._getType(e);return t===f.null?x(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eb.create=(e,t)=>new eb({innerType:e,typeName:u.ZodNullable,...A(t)});class ew extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===f.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ew.create=(e,t)=>new ew({innerType:e,typeName:u.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...A(t)});class eS extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return R(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new y(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new y(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eS.create=(e,t)=>new eS({innerType:e,typeName:u.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...A(t)});class eC extends D{_parse(e){let t=this._getType(e);if(t!==f.nan){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:f.nan,received:t.parsedType}),C}return{status:"valid",value:e.data}}}eC.create=e=>new eC({typeName:u.ZodNaN,...A(e)});let eE=Symbol("zod_brand");class ex extends D{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ek extends D{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async){let e=async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?C:"dirty"===e.status?(t.dirty(),E(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})};return e()}{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?C:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ek({in:e,out:t,typeName:u.ZodPipeline})}}let eO=(e,t={},r)=>e?Y.create().superRefine((n,i)=>{var s,o;if(!e(n)){let e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,a=null===(o=null!==(s=e.fatal)&&void 0!==s?s:r)||void 0===o||o,l="string"==typeof e?{message:e}:e;i.addIssue({code:"custom",...l,fatal:a})}}):Y.create(),eI={object:er.lazycreate};(s=u||(u={})).ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline";let eR=q.create,eT=K.create,eM=eC.create,eA=Z.create,eD=W.create,eP=G.create,eL=$.create,eN=Q.create,ej=H.create,eU=Y.create,eF=J.create,eB=X.create,ez=ee.create,eV=et.create,eq=er.create,eK=er.strictCreate,eZ=en.create,eW=es.create,eG=eo.create,e$=ea.create,eQ=el.create,eH=eu.create,eY=ec.create,eJ=ed.create,eX=eh.create,e0=ep.create,e1=eg.create,e2=em.create,e3=ey.create,e6=ev.create,e8=e_.create,e5=eb.create,e4=ev.createWithPreprocess,e9=ek.create;var e7=Object.freeze({__proto__:null,defaultErrorMap:v,setErrorMap:function(e){_=e},getErrorMap:function(){return _},makeIssue:b,EMPTY_PATH:[],addIssueToContext:w,ParseStatus:S,INVALID:C,DIRTY:E,OK:x,isAborted:k,isDirty:O,isValid:I,isAsync:R,get util(){return o},get objectUtil(){return a},ZodParsedType:f,getParsedType:g,ZodType:D,ZodString:q,ZodNumber:K,ZodBigInt:Z,ZodBoolean:W,ZodDate:G,ZodSymbol:$,ZodUndefined:Q,ZodNull:H,ZodAny:Y,ZodUnknown:J,ZodNever:X,ZodVoid:ee,ZodArray:et,ZodObject:er,ZodUnion:en,ZodDiscriminatedUnion:es,ZodIntersection:eo,ZodTuple:ea,ZodRecord:el,ZodMap:eu,ZodSet:ec,ZodFunction:ed,ZodLazy:eh,ZodLiteral:ep,ZodEnum:eg,ZodNativeEnum:em,ZodPromise:ey,ZodEffects:ev,ZodTransformer:ev,ZodOptional:e_,ZodNullable:eb,ZodDefault:ew,ZodCatch:eS,ZodNaN:eC,BRAND:eE,ZodBranded:ex,ZodPipeline:ek,custom:eO,Schema:D,ZodSchema:D,late:eI,get ZodFirstPartyTypeKind(){return u},coerce:{string:e=>q.create({...e,coerce:!0}),number:e=>K.create({...e,coerce:!0}),boolean:e=>W.create({...e,coerce:!0}),bigint:e=>Z.create({...e,coerce:!0}),date:e=>G.create({...e,coerce:!0})},any:eU,array:eV,bigint:eA,boolean:eD,date:eP,discriminatedUnion:eW,effect:e6,enum:e1,function:eJ,instanceof:(e,t={message:`Input not instance of ${e.name}`})=>eO(t=>t instanceof e,t),intersection:eG,lazy:eX,literal:e0,map:eH,nan:eM,nativeEnum:e2,never:eB,null:ej,nullable:e5,number:eT,object:eq,oboolean:()=>eD().optional(),onumber:()=>eT().optional(),optional:e8,ostring:()=>eR().optional(),pipeline:e9,preprocess:e4,promise:e3,record:eQ,set:eY,strictObject:eK,string:eR,symbol:eL,transformer:e6,tuple:e$,undefined:eN,union:eZ,unknown:eF,void:ez,
6NEVER:C,ZodIssueCode:m,quotelessJson:e=>{let t=JSON.stringify(e,null,2);return t.replace(/"([^"]+)":/g,"$1:")},ZodError:y}),te=r(3454),tt=r(3454);let tr=function({runtimeEnv:e,...t}){return function(e){let t=e.runtimeEnvStrict??e.runtimeEnv??te.env;if(e.skipValidation)return t;let r="object"==typeof e.client?e.client:{},n=e7.object(r),i=e7.object(e.server),s=e.isServer??typeof window>"u",o=i.merge(n),a=s?o.safeParse(t):n.safeParse(t),l=e.onValidationError??(e=>{throw console.error("â Invalid environment variables:",e.flatten().fieldErrors),Error("Invalid environment variables")}),u=e.onInvalidAccess??(e=>{throw Error("â Attempted to access a server-side environment variable on the client")});return!1===a.success?l(a.error):new Proxy(a.data,{get(t,r){if("string"==typeof r)return s||r.startsWith(e.clientPrefix)?t[r]:u(r)}})}({...t,clientPrefix:"NEXT_PUBLIC_",runtimeEnvStrict:e})}({server:{DATABASE_URL:e7.string().url(),NODE_ENV:e7.enum(["development","test","production"]),NEXTAUTH_SECRET:e7.string().min(1),NEXTAUTH_URL:e7.preprocess(e=>null!==(c=tt.env.VERCEL_URL)&&void 0!==c?c:e,tt.env.VERCEL?e7.string().min(1):e7.string().url()),DISCORD_CLIENT_ID:e7.string(),DISCORD_CLIENT_SECRET:e7.string()},client:{NEXT_PUBLIC_STATSIG_CLIENT_KEY:e7.string().optional().default("")},runtimeEnv:{DATABASE_URL:tt.env.DATABASE_URL,NODE_ENV:"production",NEXTAUTH_SECRET:tt.env.NEXTAUTH_SECRET,NEXTAUTH_URL:tt.env.NEXTAUTH_URL,DISCORD_CLIENT_ID:tt.env.DISCORD_CLIENT_ID,DISCORD_CLIENT_SECRET:tt.env.DISCORD_CLIENT_SECRET,NEXT_PUBLIC_STATSIG_CLIENT_KEY:"client-placeholder"},skipValidation:!!tt.env.SKIP_ENV_VALIDATION}),tn=null,ti=null;function ts(){return"development"}function to(e,t,r,n){var i;let s=e||void 0;if(!s&&!t)return null;let o=ts(),a=null!==(i=s||t)&&void 0!==i?i:void 0;return{userID:a,email:s,custom:{isSubscribed:null!=r&&r,isLoggedIn:null!=n&&n,environment:o}}}async function ta(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(ti)return ti;if(tn)return Promise.resolve();let t=tr.NEXT_PUBLIC_STATSIG_CLIENT_KEY;if(!t||"client-placeholder"===t)return console.warn("NEXT_PUBLIC_STATSIG_CLIENT_KEY not configured or is placeholder, Statsig will be disabled"),Promise.resolve();let r=ts();return ti=(async()=>{try{let t=e||{userID:void 0};tn=new d.StatsigClient(tr.NEXT_PUBLIC_STATSIG_CLIENT_KEY,t,{environment:{tier:r},plugins:[new h.cb,new p.Hq]}),await tn.initializeAsync(),console.log("Statsig initialized successfully")}catch(e){console.error("Failed to initialize Statsig:",e),tn=null}})()}async function tl(e){if(!tn){await ta(e);return}try{await tn.updateUserAsync(e||{userID:void 0})}catch(e){console.error("Failed to update Statsig user:",e)}}async function tu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!tn)return t;try{return await tn.checkGate(e)}catch(r){return console.error("Error checking gate ".concat(e,":"),r),t}}},6932:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return S}});var n=r(5893),i=r(3299),s=r(4298),o=r.n(s),a=r(7565);r(5929),r(7952);var l=r(7636),u=r(7294),c=r(7339),d=r(9754),h=r(673),p=r(1163),f=r(6010);let g=()=>{let{toasts:e,removeToast:t}=(0,d.H)();return 0===e.length?null:(0,n.jsx)("div",{className:"fixed right-4 top-4 z-50 flex flex-col gap-2",children:e.map(e=>(0,n.jsx)("div",{className:(0,f.Z)("min-w-[300px] rounded-lg px-4 py-3 shadow-lg transition-all duration-300","error"===e.type&&"bg-red-500 text-white","success"===e.type&&"bg-green-500 text-white","info"===e.type&&"bg-blue-500 text-white"),children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:e.message}),(0,n.jsx)("button",{onClick:()=>t(e.id),className:"text-white opacity-70 hover:opacity-100",children:"\xd7"})]})},e.id))})};var m=r(6531),y=r(2296);let v=()=>"local"===l.ZP.NODE_ENV.production?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o(),{src:"https://www.googletagmanager.com/gtag/js?id=G-XT4QP8PYMS",strategy:"afterInteractive"}),(0,n.jsx)(o(),{id:"google-analytics",strategy:"afterInteractive",children:"\n window.dataLayer = window.dataLayer || [];\n function gtag(){window.dataLayer.push(arguments);}\n gtag('js', new Date());\n\n gtag('config', 'G-XT4QP8PYMS');\n "})]}):null,_=e=>{let{children:t}=e,{language:r,setLanguage:i}=(0,d.H)(),{push:s,asPath:o,pathname:a,query:l}=(0,p.useRouter)();return((0,u.useEffect)(()=>{},[r]),r&&"en"!==r.toLowerCase())?(0,n.jsx)(c.$,{from:"en",to:r,children:t}):(0,n.jsx)(n.Fragment,{children:t})},b=e=>{let{children:t}=e,{data:r,status:s}=(0,i.useSession)(),{user:o}=(0,h.L)(),[a,l]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let e=async()=>{var e,t,n;let i=(null==r?void 0:null===(e=r.user)||void 0===e?void 0:e.email)||(null==o?void 0:o.email)||void 0,a=(null==r?void 0:null===(t=r.user)||void 0===t?void 0:t.id)||(null==o?void 0:o._id)||(null==o?void 0:o.id)||void 0,u=null!==(n=null==o?void 0:o.isSubscribed)&&void 0!==n&&n,c="authenticated"===s,d=(0,y.bG)(i,a,u,c);await (0,y.sU)(d),l(!0)};e()},[]),(0,u.useEffect)(()=>{var e,t,n;if(!a)return;let i=(null==r?void 0:null===(e=r.user)||void 0===e?void 0:e.email)||(null==o?void 0:o.email)||void 0,l=(null==r?void 0:null===(t=r.user)||void 0===t?void 0:t.id)||(null==o?void 0:o._id)||(null==o?void 0:o.id)||void 0,u=null!==(n=null==o?void 0:o.isSubscribed)&&void 0!==n&&n,c="authenticated"===s,d=(0,y.bG)(i,l,u,c);(0,y.Gg)(d)},[r,s,o,a]),(0,n.jsx)(n.Fragment,{children:t})},w=e=>{let{children:t}=e,{status:r}=(0,i.useSession)(),{isSubscribed:s}=(0,h.L)(),{getUser:o}=(0,m.Z)();return(0,u.useEffect)(()=>{"authenticated"===r&&null===s&&o()},[r]),(0,n.jsx)(n.Fragment,{children:t})};var S=a.h.withTRPC(e=>{let{Component:t,pageProps:{session:r,...s}}=e,{locale:o}=(0,p.useRouter)(),a=t.getLayout||(e=>e);return a((0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(v,{}),(0,n.jsx)(i.SessionProvider,{session:r,children:(0,n.jsx)(w,{children:(0,n.jsx)(b,{children:(0,n.jsxs)(_,{children:[(0,n.jsx)(t,{...s}),(0,n.jsx)(g,{})]})})})})]}))})},9754:function(e,t,r){"use strict";r.d(t,{H:function(){return a},S:function(){return i}});var n=r(4529);let i=e=>{let t=[{label:"en",value:"en"},{label:"zh-hk",value:"zh-tw"},{label:"zh-tw",value:"zh-tw"},{label:"zh",value:"zh"},{label:"jp",value:"ja"},{label:"pt-br",value:"pt-br"},{label:"id",value:"id"},{label:"ko",value:"ko"},{label:"ru",value:"ru"},{label:"nl",value:"nl"},{label:"es",value:"es"},{label:"hi",value:"hi"},{label:"ar",value:"ar"},{label:"bn",value:"bn"},{label:"fr",value:"fr"},{label:"pt",value:"pt"},{label:"de",value:"de"},{label:"tr",value:"tr"},{label:"it",value:"it"},{label:"ja",value:"ja"},{label:"sv",value:"sv"},{label:"pl",value:"pl"},{label:"fa",value:"fa"},{label:"zh-Hant",value:"zh-Hant"},{label:"zh-Hans",value:"zh-Hans"}];try{var r;return null===(r=t[t.findIndex(t=>t.label==e)])||void 0===r?void 0:r.value}catch(e){return"en"}},s={isShownIntro:!1,isChatShow:!1,isMenuShow:!1,isGuessWakkShow:!1,language:"en",toasts:[]},o=e=>
6({setIsChatShow:t=>{e(()=>({isChatShow:t}))},setGuessWallShow:t=>{e(()=>({isGuessWakkShow:t}))},setShownIntro:t=>{e(()=>({isShownIntro:t}))},setLanguage:t=>{e(()=>({language:i(t)}))},setIsMenuShow:t=>{e(()=>({isMenuShow:t}))},showToast:function(t){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"error",n=Math.random().toString(36).substring(2,9);e(e=>({toasts:[...e.toasts,{id:n,message:t,type:r}]})),setTimeout(()=>{e(e=>({toasts:e.toasts.filter(e=>e.id!==n)}))},5e3)},removeToast:t=>{e(e=>({toasts:e.toasts.filter(e=>e.id!==t)}))}}),a=(0,n.Ue)()(e=>({...s,...o(e)}))},673:function(e,t,r){"use strict";r.d(t,{L:function(){return o}});var n=r(4529);let i={user:null,isSubscribed:null,usage:{chat:0,read:0},userPreferenceTopics:[]},s=e=>({storeUser:t=>{var r;e(()=>{var e;return{user:t,userPreferenceTopics:null!==(r=null==t?void 0:null===(e=t.preferenceId)||void 0===e?void 0:e.topics)&&void 0!==r?r:[]}})},setUsage:t=>{let{chat:r,read:n}=t;e(()=>({usage:{chat:r,read:n}}))},resetRead:()=>{e(()=>({usage:{chat:0,read:0}}))},setIsSubscribed:t=>{e(()=>({isSubscribed:t}))},addRead:()=>{e(e=>{let{usage:t}=e;return{usage:{...t,read:t.read+1}}})},addChat:()=>{e(e=>{let{usage:t}=e;return{usage:{...t,chat:t.chat+1}}})}}),o=(0,n.Ue)()(e=>({...i,...s(e)}))},7565:function(e,t,r){"use strict";let n;r.d(t,{h:function(){return nw}});class i extends Error{constructor(e){super(e),this.name="ObservableAbortError",Object.setPrototypeOf(this,i.prototype)}}function s(e){return e}function o(e){let t={subscribe(t){let r=null,n=!1,i=!1,s=!1;function o(){if(null===r){s=!0;return}!i&&(i=!0,"function"==typeof r?r():r&&r.unsubscribe())}return r=e({next(e){n||t.next?.(e)},error(e){n||(n=!0,t.error?.(e),o())},complete(){n||(n=!0,t.complete?.(),o())}}),s&&o(),{unsubscribe:o}},pipe:(...e)=>(0===e.length?s:1===e.length?e[0]:function(t){return e.reduce((e,t)=>t(e),t)})(t)};return t}class a extends Error{static from(e,t={}){return e instanceof Error?"TRPCClientError"===e.name?e:new a(e.message,{...t,cause:e,result:null}):new a(e.error.message??"",{...t,cause:void 0,result:e})}constructor(e,t){let r=t?.cause;super(e,{cause:r}),this.meta=t?.meta,this.cause=r,this.shape=t?.result?.error,this.data=t?.result?.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,a.prototype)}}function l(e){return!!e&&!Array.isArray(e)&&"object"==typeof e}function u(e,t){let r;try{r=function(e,t){if("error"in e){let r=t.transformer.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}let r={...e.result,...(!e.result.type||"data"===e.result.type)&&{type:"data",data:t.transformer.deserialize(e.result.data)}};return{ok:!0,result:r}}(e,t)}catch(e){throw new a("Unable to transform response from server")}if(!r.ok&&(!l(r.error.error)||"number"!=typeof r.error.error.code)||r.ok&&!l(r.result))throw new a("Badly formatted response from server");return r}function c(e){let t=Object.create(null);for(let r in e){let n=e[r];t[n]=r}return t}let d={PARSE_ERROR:-32700,BAD_REQUEST:-32600,INTERNAL_SERVER_ERROR:-32603,UNAUTHORIZED:-32001,FORBIDDEN:-32003,NOT_FOUND:-32004,METHOD_NOT_SUPPORTED:-32005,TIMEOUT:-32008,CONFLICT:-32009,PRECONDITION_FAILED:-32012,PAYLOAD_TOO_LARGE:-32013,UNPROCESSABLE_CONTENT:-32022,TOO_MANY_REQUESTS:-32029,CLIENT_CLOSED_REQUEST:-32099};c(d),c(d);let h=()=>{},p=e=>(function e(t,r){let n=new Proxy(h,{get(n,i){if("string"==typeof i&&"then"!==i)return e(t,[...r,i])},apply(e,n,i){let s="apply"===r[r.length-1];return t({args:s?i.length>=2?i[1]:[]:i,path:s?r.slice(0,-1):r})}});return n})(e,[]),f=e=>new Proxy(h,{get(t,r){if("string"==typeof r&&"then"!==r)return e(r)}}),g=e=>"function"==typeof e;function m(e,t){return g(e.bind)?e.bind(t):e}function y(e){var t;return{url:e.url,fetch:function(e){if(e)return e;if("undefined"!=typeof window&&g(window.fetch))return m(window.fetch,window);if("undefined"!=typeof globalThis&&g(globalThis.fetch))return m(globalThis.fetch,globalThis);throw Error("No fetch implementation found")}(e.fetch),AbortController:(t=e.AbortController)?t:"undefined"!=typeof window&&window.AbortController?window.AbortController:"undefined"!=typeof globalThis&&globalThis.AbortController?globalThis.AbortController:null}}let v={query:"GET",mutation:"POST"};function _(e){return"input"in e?e.runtime.transformer.serialize(e.input):function(e){let t={};for(let r=0;r<e.length;r++){let n=e[r];t[r]=n}return t}(e.inputs.map(t=>e.runtime.transformer.serialize(t)))}let b=e=>{let t=e.url+"/"+e.path,r=[];if("inputs"in e&&r.push("batch=1"),"query"===e.type){let t=_(e);void 0!==t&&r.push(`input=${encodeURIComponent(JSON.stringify(t))}`)}return r.length&&(t+="?"+r.join("&")),t},w=e=>{if("query"===e.type)return;let t=_(e);return void 0!==t?JSON.stringify(t):void 0},S=e=>E({...e,contentTypeHeader:"application/json",getUrl:b,getBody:w});async function C(e,t){let r=e.getUrl(e),n=e.getBody(e),{type:i}=e,s=await e.headers();if("subscription"===i)throw Error("Subscriptions should use wsLink");return e.fetch(r,{method:v[i],signal:t?.signal,body:n,headers:{...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.batchModeHeader?{"trpc-batch-mode":e.batchModeHeader}:{},...s}})}function E(e){let t=e.AbortController?new e.AbortController:null,r={},n=new Promise((n,i)=>{C(e,t).then(e=>(r.response=e,e.json())).then(e=>{n({json:e,meta:r})}).catch(i)});return{promise:n,cancel:()=>{t?.abort()}}}let x=()=>{throw Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function k(e){let t=null,r=null,n=()=>{clearTimeout(r),r=null,t=null};function i(){let r=function(t){let r=[[]],n=0;for(;;){let i=t[n];if(!i)break;let s=r[r.length-1];if(i.aborted){i.reject?.(Error("Aborted")),n++;continue}let o=e.validate(s.concat(i).map(e=>e.key));if(o){s.push(i),n++;continue}if(0===s.length){i.reject?.(Error("Input is too big for a single dispatch")),n++;continue}r.push([])}return r}(t);for(let t of(n(),r)){if(!t.length)continue;let r={items:t,cancel:x};for(let e of t)e.batch=r;let n=(e,t)=>{let n=r.items[e];n.resolve?.(t),n.batch=null,n.reject=null,n.resolve=null},{promise:i,cancel:s}=e.fetch(r.items.map(e=>e.key),n);r.cancel=s,i.then(e=>{for(let t=0;t<e.length;t++){let r=e[t];n(t,r)}for(let e=0;e<r.items.length;e++){let t=r.items[e];t.reject?.(Error("Missing result")),t.batch=null}}).catch(e=>{for(let t of r.items)t.reject?.(e),t.batch=null})}}return{load:function(e){let n={aborted:!1,key:e,batch:null,resolve:x,reject:x},s=new Promise((e,r)=>{n.reject=r,n.resolve=e,t||(t=[]),t.push(n)});return r||(r=setTimeout(i)),{promise:s,cancel:()=>{n.aborted=!0,n.batch?.items.every(e=>e.aborted)&&(n.batch.cancel(),n.batch=null)}}}}}function O(e){return function(t){let r=y(t),n=t.maxURLLength||1/0;return i=>{let s=s=>{let o=e({...r,runtime:i,type:s,opts:t});return{validate:e=>{if(n===1/0)return!0;let t=e.map(e=>e.path).join(","),o=e.map(e=>e.input),a=b({...r,runtime:i,type:s,path:t,inputs:o});return a.length<=n},fetch:o}},l=k(s("query")),c=k(s("mutation")),d=k(s("subscription")),h={query:l,subscription:d,mutation:c};return({op:e})=>o(t=>{let r=h[e.type],{promise:n,cancel:s}=r.load(e);return n.then(e=>{let r=u(e.json,i);if(!r.ok){t.error(a.from(r.error,{meta:e.meta}));return}t.next({context:e.meta,result:r.result}),t.complete()}).catch(e=>t.error(a.from(e))),()=>s()})}}}let I=O(e=>t=>{let r=t.map(e=>e.path).join(","),n=t.map(e=>e.input),{promise:i,cancel:s}=S({...e,path:r,inputs:n,headers:()=>
6e.opts.headers?"function"==typeof e.opts.headers?e.opts.headers({opList:t}):e.opts.headers:{}});return{promise:i.then(e=>{let r=Array.isArray(e.json)?e.json:t.map(()=>e.json),n=r.map(t=>({meta:e.meta,json:t}));return n}),cancel:s}});function R(e){return t=>{let r=y(t);return n=>({op:i})=>o(s=>{let{path:o,input:l,type:c}=i,{promise:d,cancel:h}=e.requester({...r,runtime:n,type:c,path:o,input:l,headers:()=>t.headers?"function"==typeof t.headers?t.headers({op:i}):t.headers:{}});return d.then(e=>{let t=u(e.json,n);if(!t.ok){s.error(a.from(t.error,{meta:e.meta}));return}s.next({context:e.meta,result:t.result}),s.complete()}).catch(e=>s.error(a.from(e))),()=>{h()}})}}R({requester:S});let T={query:["72e3ff","3fb0d8"],mutation:["c5a3fc","904dfc"],subscription:["ff49e1","d83fbe"]},M=(e=console)=>t=>{let{direction:r,type:n,path:i,context:s,id:o}=t,[a,l]=T[n],u=t.input,c="undefined"!=typeof FormData&&u instanceof FormData?Object.fromEntries(u):u,d=` 7 background-color: #${"up"===r?a:l}; 8 color: ${"up"===r?"black":"white"}; 9 padding: 2px; 10 `,h=["%c","up"===r?">>":"<<",n,`#${o}`,`%c${i}%c`,"%O"],p=[d,`${d}; font-weight: bold;`,`${d}; font-weight: normal;`];"up"===t.direction?p.push({input:c,context:s}):p.push({input:c,result:t.result,elapsedMs:t.elapsedMs,context:s});let f="down"===t.direction&&t.result&&(t.result instanceof Error||"error"in t.result.result)?"error":"log";e[f].apply(null,[h.join(" ")].concat(p))};class A{$request({type:e,input:t,path:r,context:n={}}){var i;let s=(i={links:this.links,op:{id:++this.requestId,type:e,path:r,input:t,context:n}},o(e=>{let t=function e(t=0,r=i.op){let n=i.links[t];if(!n)throw Error("No more links to execute - did you forget to add an ending link?");let s=n({op:r,next(r){let n=e(t+1,r);return n}});return s}();return t.subscribe(e)}));return s.pipe(e=>{let t=0,r=null,n=[];return{subscribe:i=>(t++,n.push(i),r||(r=e.subscribe({next(e){for(let t of n)t.next?.(e)},error(e){for(let t of n)t.error?.(e)},complete(){for(let e of n)e.complete?.()}})),{unsubscribe(){t--,function(){if(0===t&&r){let e=r;r=null,e.unsubscribe()}}();let e=n.findIndex(e=>e===i);e>-1&&n.splice(e,1)}})}})}requestAsPromise(e){let t=this.$request(e),{promise:r,abort:n}=function(e){let t;let r=new Promise((r,n)=>{let s=!1;function o(){s||(s=!0,n(new i("This operation was aborted.")),a.unsubscribe())}let a=e.subscribe({next(e){s=!0,r(e),o()},error(e){s=!0,n(e),o()},complete(){s=!0,o()}});t=o});return{promise:r,abort:t}}(t),s=new Promise((t,i)=>{e.signal?.addEventListener("abort",n),r.then(e=>{t(e.result.data)}).catch(e=>{i(a.from(e))})});return s}query(e,t,r){return this.requestAsPromise({type:"query",path:e,input:t,context:r?.context,signal:r?.signal})}mutation(e,t,r){return this.requestAsPromise({type:"mutation",path:e,input:t,context:r?.context,signal:r?.signal})}subscription(e,t,r){let n=this.$request({type:"subscription",path:e,input:t,context:r?.context});return n.subscribe({next(e){"started"===e.result.type?r.onStarted?.():"stopped"===e.result.type?r.onStopped?.():r.onData?.(e.result.data)},error(e){r.onError?.(e)},complete(){r.onComplete?.()}})}constructor(e){this.requestId=0;let t=(()=>{let t=e.transformer;return t?"input"in t?e.transformer:{input:t,output:t}:{input:{serialize:e=>e,deserialize:e=>e},output:{serialize:e=>e,deserialize:e=>e}}})();this.runtime={transformer:{serialize:e=>t.input.serialize(e),deserialize:e=>t.output.deserialize(e)},combinedTransformer:t},this.links=e.links.map(e=>e(this.runtime))}}function D(e){let t=new A(e);return t}let P={query:"query",mutate:"mutation",subscribe:"subscription"},L=e=>P[e];async function N(e){let t=e.parse??JSON.parse;await j(e.readableStream,r=>{if(e.signal?.aborted||!r||"}"===r)return;let n=r.indexOf(":"),i=r.substring(2,n-1),s=r.substring(n+1);e.onSingle(Number(i),t(s))},e.textDecoder)}async function j(e,t,r){let n="",i=e=>{let i=r.decode(e),s=i.split("\n");if(1===s.length)n+=s[0];else if(s.length>1){t(n+s[0]);for(let e=1;e<s.length-1;e++)t(s[e]);n=s[s.length-1]}};"getReader"in e?await U(e,i):await new Promise(t=>{e.on("data",i),e.on("end",t)}),t(n)}async function U(e,t){let r=e.getReader(),n=await r.read();for(;!n.done;)t(n.value),n=await r.read()}let F=(e,t)=>{let r=e.AbortController?new e.AbortController:null,n=C({...e,contentTypeHeader:"application/json",batchModeHeader:"stream",getUrl:b,getBody:w},r),i=n.then(async n=>{if(!n.body)throw Error("Received response without body");let i={response:n};return N({readableStream:n.body,onSingle:t,parse:e=>({json:JSON.parse(e),meta:i}),signal:r?.signal,textDecoder:e.textDecoder})});return{cancel:()=>r?.abort(),promise:i}};O(e=>{let t=function(e){if(e)return e;if("undefined"!=typeof window&&window.TextDecoder)return new window.TextDecoder;if("undefined"!=typeof globalThis&&globalThis.TextDecoder)return new globalThis.TextDecoder;throw Error("No TextDecoder implementation found")}(e.opts.textDecoder);return(r,n)=>{let i=r.map(e=>e.path).join(","),s=r.map(e=>e.input),{cancel:o,promise:a}=F({...e,textDecoder:t,path:i,inputs:s,headers:()=>
10e.opts.headers?"function"==typeof e.opts.headers?e.opts.headers({opList:r}):e.opts.headers:{}},(e,t)=>n(e,t));return{promise:a.then(()=>[]),cancel:o}}});let B=e=>{if("input"in e){if(!(e.input instanceof FormData))throw Error("Input is not FormData");return e.input}};R({requester:e=>{if("mutation"!==e.type)throw Error("We only handle mutations with formdata");return E({...e,getUrl:()=>`${e.url}/${e.path}`,getBody:B})}});var z,V=r(7294);let q=V.createContext(void 0),K=V.createContext(!1);function Z(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=q),window.ReactQueryClientContext):q)}let W=({context:e}={})=>{let t=V.useContext(Z(e,V.useContext(K)));if(!t)throw Error("No QueryClient set, use QueryClientProvider to set one");return t},G=({client:e,children:t,context:r,contextSharing:n=!1})=>{V.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);let i=Z(r,n);return V.createElement(K.Provider,{value:!r&&n},V.createElement(i.Provider,{value:e},t))};function $(e){return e.state.isPau
10sed}function Q(e){return"success"===e.state.status}let H=({children:e,options:t,state:r})=>(!function(e,t={}){let r=W({context:t.context}),n=V.useRef(t);n.current=t,V.useMemo(()=>{e&&function(e,t,r){if("object"!=typeof t||null===t)return;let n=e.getMutationCache(),i=e.getQueryCache(),s=t.mutations||[],o=t.queries||[];s.forEach(t=>{var i;n.build(e,{...null==r?void 0:null==(i=r.defaultOptions)?void 0:i.mutations,mutationKey:t.mutationKey},t.state)}),o.forEach(t=>{var n;let s=i.get(t.queryHash),o={...t.state,fetchStatus:"idle"};if(s){s.state.dataUpdatedAt<o.dataUpdatedAt&&s.setState(o);return}i.build(e,{...null==r?void 0:null==(n=r.defaultOptions)?void 0:n.queries,queryKey:t.queryKey,queryHash:t.queryHash},o)})}(r,e,n.current)},[r,e])}(r,t),e);function Y(e,t){let r=Array.isArray(e)?e:[e],[n,i]=r,s="string"!=typeof n||""===n?[]:n.split(".");return i||t&&"any"!==t?[s,{...void 0!==i&&{input:i},...t&&"any"!==t&&{type:t}}]:s.length?[s]:[]}let J="undefined"==typeof window||"Deno"in window;function X(){}function ee(e){return"number"==typeof e&&e>=0&&e!==1/0}function et(e,t){return e.filter(e=>!t.includes(e))}function er(e,t){return Math.max(e+(t||0)-Date.now(),0)}function en(e,t,r){return ef(e)?"function"==typeof t?{...r,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function ei(e,t,r){return ef(e)?[{...t,queryKey:e},r]:[e||{},t]}function es(e,t){let{type:r="all",exact:n,fetchStatus:i,predicate:s,queryKey:o,stale:a}=e;if(ef(o)){if(n){if(t.queryHash!==ea(o,t.options))return!1}else{if(!eu(t.queryKey,o))return!1}}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(void 0===i||i===t.state.fetchStatus)&&(!s||!!s(t))}function eo(e,t){let{exact:r,fetching:n,predicate:i,mutationKey:s}=e;if(ef(s)){if(!t.options.mutationKey)return!1;if(r){if(el(t.options.mutationKey)!==el(s))return!1}else{if(!eu(t.options.mutationKey,s))return!1}}return("boolean"!=typeof n||"loading"===t.state.status===n)&&(!i||!!i(t))}function ea(e,t){let r=(null==t?void 0:t.queryKeyHashFn)||el;return r(e)}function el(e){return JSON.stringify(e,(e,t)=>eh(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function eu(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&!Object.keys(t).some(r=>!eu(e[r],t[r]))}function ec(e,t){if(e&&!t||t&&!e)return!1;for(let r in e)if(e[r]!==t[r])return!1;return!0}function ed(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function eh(e){if(!ep(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(ep(r)&&r.hasOwnProperty("isPrototypeOf"))}function ep(e){return"[object Object]"===Object.prototype.toString.call(e)}function ef(e){return Array.isArray(e)}function eg(e){return new Promise(t=>{setTimeout(t,e)})}function em(e){eg(0).then(e)}function ey(e,t,r){return null!=r.isDataEqual&&r.isDataEqual(e,t)?e:"function"==typeof r.structuralSharing?r.structuralSharing(e,t):!1!==r.structuralSharing?function e(t,r){if(t===r)return t;let n=ed(t)&&ed(r);if(n||eh(t)&&eh(r)){let i=n?t.length:Object.keys(t).length,s=n?r:Object.keys(r),o=s.length,a=n?[]:{},l=0;for(let i=0;i<o;i++){let o=n?i:s[i];a[o]=e(t[o],r[o]),a[o]===t[o]&&l++}return i===o&&l===i?t:a}return r}(e,t):t}let ev=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},i=n=>{t?e.push(n):em(()=>{r(n)})},s=()=>{let t=e;e=[],t.length&&em(()=>{n(()=>{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||s()}return r},batchCalls:e=>(...t)=>{i(()=>{e(...t)})},schedule:i,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e}}}();class e_{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){let t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}let eb=new class extends e_{constructor(){super(),this.setup=e=>{if(!J&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.focused=e,e&&this.onFocus()}
10onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)}},ew=["online","offline"],eS=new class extends e_{constructor(){super(),this.setup=e=>{if(!J&&window.addEventListener){let t=()=>e();return ew.forEach(e=>{window.addEventListener(e,t,!1)}),()=>{ew.forEach(e=>{window.removeEventListener(e,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.cleanup)||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,null==(t=this.cleanup)||t.call(this),this.cleanup=e(e=>{"boolean"==typeof e?this.setOnline(e):this.onOnline()})}setOnline(e){this.online=e,e&&this.onOnline()}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine}};function eC(e){return Math.min(1e3*2**e,3e4)}function eE(e){return(null!=e?e:"online")!=="online"||eS.isOnline()}class ex{constructor(e){this.revert=null==e?void 0:e.revert,this.silent=null==e?void 0:e.silent}}function ek(e){return e instanceof ex}function eO(e){let t,r,n,i=!1,s=0,o=!1,a=new Promise((e,t)=>{r=e,n=t}),l=()=>!eb.isFocused()||"always"!==e.networkMode&&!eS.isOnline(),u=n=>{o||(o=!0,null==e.onSuccess||e.onSuccess(n),null==t||t(),r(n))},c=r=>{o||(o=!0,null==e.onError||e.onError(r),null==t||t(),n(r))},d=()=>new Promise(r=>{t=e=>{let t=o||!l();return t&&r(e),t},null==e.onPause||e.onPause()}).then(()=>{t=void 0,o||null==e.onContinue||e.onContinue()}),h=()=>{let t;if(!o){try{t=e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(u).catch(t=>{var r,n;if(o)return;let a=null!=(r=e.retry)?r:3,u=null!=(n=e.retryDelay)?n:eC,p="function"==typeof u?u(s,t):u,f=!0===a||"number"==typeof a&&s<a||"function"==typeof a&&a(s,t);if(i||!f){c(t);return}s++,null==e.onFail||e.onFail(s,t),eg(p).then(()=>{if(l())return d()}).then(()=>{i?c(t):h()})})}};return eE(e.networkMode)?h():d().then(h),{promise:a,cancel:t=>{o||(c(new ex(t)),null==e.abort||e.abort())},continue:()=>{let e=null==t?void 0:t();return e?a:Promise.resolve()},cancelRetry:()=>{i=!0},continueRetry:()=>{i=!1}}}class eI extends e_{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.currentQuery.addObserver(this),eR(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return eT(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return eT(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){let r=this.options,n=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),ec(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled)throw Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();let i=this.hasListeners();i&&eM(this.currentQuery,n,this.options,r)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();let s=this.computeRefetchInterval();i&&(this.currentQuery!==n||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){let t=this.client.getQueryCache().build(this.client,e);return this.createResult(t,e)}getCurrentResult(){return this.currentResult}trackResult(e){let t={};return Object.keys(e).forEach(r=>{Object.defineProperty(t,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),e[r])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){let t=this.client.defaultQueryOptions(e),r=this.client.getQueryCache().build(this.client,t);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:null==(t=e.cancelRefetch)||t}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return null!=e&&e.throwOnError||(t=t.catch(X)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),J||this.currentResult.isStale||!ee(this.options.staleTime))return;let e=er(this.currentResult.dataUpdatedAt,this.options.staleTime);this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e+1)}computeRefetchInterval(){var e;return"function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.currentResult.data,this.currentQuery):null!=(e=this.options.refetchInterval)&&e}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!J&&!1!==this.options.enabled&&ee(this.currentRefetchInterval)&&0!==this.currentRefetchInterval&&(this.refetchIntervalId=setInterval(()=>
10{(this.options.refetchIntervalInBackground||eb.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){let r;let n=this.currentQuery,i=this.options,s=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=e!==n,u=l?e.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:d}=e,{dataUpdatedAt:h,error:p,errorUpdatedAt:f,fetchStatus:g,status:m}=d,y=!1,v=!1;if(t._optimisticResults){let r=this.hasListeners(),s=!r&&eR(e,t),o=r&&eM(e,n,t,i);(s||o)&&(g=eE(e.options.networkMode)?"fetching":"paused",h||(m="loading")),"isRestoring"===t._optimisticResults&&(g="idle")}if(t.keepPreviousData&&!d.dataUpdatedAt&&null!=c&&c.isSuccess&&"error"!==m)r=c.data,h=c.dataUpdatedAt,m=c.status,y=!0;else if(t.select&&void 0!==d.data){if(s&&d.data===(null==o?void 0:o.data)&&t.select===this.selectFn)r=this.selectResult;else try{this.selectFn=t.select,r=t.select(d.data),r=ey(null==s?void 0:s.data,r,t),this.selectResult=r,this.selectError=null}catch(e){this.selectError=e}}else r=d.data;if(void 0!==t.placeholderData&&void 0===r&&"loading"===m){let e;if(null!=s&&s.isPlaceholderData&&t.placeholderData===(null==a?void 0:a.placeholderData))e=s.data;else if(e="function"==typeof t.placeholderData?t.placeholderData():t.placeholderData,t.select&&void 0!==e)try{e=t.select(e),this.selectError=null}catch(e){this.selectError=e}void 0!==e&&(m="success",r=ey(null==s?void 0:s.data,e,t),v=!0)}this.selectError&&(p=this.selectError,r=this.selectResult,f=Date.now(),m="error");let _="fetching"===g,b="loading"===m,w="error"===m,S={status:m,fetchStatus:g,isLoading:b,isSuccess:"success"===m,isError:w,isInitialLoading:b&&_,data:r,dataUpdatedAt:h,error:p,errorUpdatedAt:f,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:_,isRefetching:_&&!b,isLoadingError:w&&0===d.dataUpdatedAt,isPaused:"paused"===g,isPlaceholderData:v,isPreviousData:y,isRefetchError:w&&0!==d.dataUpdatedAt,isStale:eA(e,t),refetch:this.refetch,remove:this.remove};return S}updateResult(e){let t=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,ec(r,t))return;this.currentResult=r;let n={cache:!0};(null==e?void 0:e.listeners)!==!1&&(()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options;if("all"===e||!e&&!this.trackedProps.size)return!0;let r=new Set(null!=e?e:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(e=>{let n=this.currentResult[e]!==t[e];return n&&r.has(e)})})()&&(n.listeners=!0),this.notify({...n,...e})}updateQuery(){let e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;let t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(null==t||t.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){let t={};"success"===e.type?t.onSuccess=!e.manual:"error"!==e.type||ek(e.error)||(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){ev.batch(()=>{var t,r,n,i,s,o,a,l;e.onSuccess?(null==(t=(r=this.options).onSuccess)||t.call(r,this.currentResult.data),null==(n=(i=this.options).onSettled)||n.call(i,this.currentResult.data,null)):e.onError&&(null==(s=(o=this.options).onError)||s.call(o,this.currentResult.error),null==(a=(l=this.options).onSettled)||a.call(l,void 0,this.currentResult.error)),e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function eR(e,t){return!1!==t.enabled&&!e.state.dataUpdatedAt&&!("error"===e.state.status&&!1===t.retryOn
10Mount)||e.state.dataUpdatedAt>0&&eT(e,t,t.refetchOnMount)}function eT(e,t,r){if(!1!==t.enabled){let n="function"==typeof r?r(e):r;return"always"===n||!1!==n&&eA(e,t)}return!1}function eM(e,t,r,n){return!1!==r.enabled&&(e!==t||!1===n.enabled)&&(!r.suspense||"error"!==e.state.status)&&eA(e,r)}function eA(e,t){return e.isStaleByTime(t.staleTime)}var eD=r(1688);let eP=eD.useSyncExternalStore,eL=V.createContext((n=!1,{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n})),eN=()=>V.useContext(eL),ej=V.createContext(!1),eU=()=>V.useContext(ej);function eF(e,t){return"function"==typeof e?e(...t):!!e}ej.Provider;let eB=(e,t)=>{(e.suspense||e.useErrorBoundary)&&!t.isReset()&&(e.retryOnMount=!1)},ez=e=>{V.useEffect(()=>{e.clearReset()},[e])},eV=({result:e,errorResetBoundary:t,useErrorBoundary:r,query:n})=>e.isError&&!t.isReset()&&!e.isFetching&&eF(r,[e.error,n]),eq=e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)},eK=(e,t)=>e.isLoading&&e.isFetching&&!t,eZ=(e,t,r)=>(null==e?void 0:e.suspense)&&eK(t,r),eW=(e,t,r)=>t.fetchOptimistic(e).then(({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)}).catch(t=>{r.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)});function eG(e,t){let r=W({context:e.context}),n=eU(),i=eN(),s=r.defaultQueryOptions(e);s._optimisticResults=n?"isRestoring":"optimistic",s.onError&&(s.onError=ev.batchCalls(s.onError)),s.onSuccess&&(s.onSuccess=ev.batchCalls(s.onSuccess)),s.onSettled&&(s.onSettled=ev.batchCalls(s.onSettled)),eq(s),eB(s,i),ez(i);let[o]=V.useState(()=>new t(r,s)),a=o.getOptimisticResult(s);if(eP(V.useCallback(e=>{let t=n?()=>void 0:o.subscribe(ev.batchCalls(e));return o.updateResult(),t},[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),V.useEffect(()=>{o.setOptions(s,{listeners:!1})},[s,o]),eZ(s,a,n))throw eW(s,o,i);if(eV({result:a,errorResetBoundary:i,useErrorBoundary:s.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return s.notifyOnChangeProps?a:o.trackResult(a)}let e$=console;class eQ{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ee(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,null!=e?e:J?1/0:3e5)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class eH extends eQ{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||e$,this.observers=[],this.state=e.state||eY(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||("loading"===this.state.status?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return null!=(e=null==(t=this.retryer)?void 0:t.continue())?e:this.execute()}async execute(){var e,t,r,n,i,s,o,a,l,u,c,d,h,p,f,g,m,y,v,_;let b="loading"===this.state.status;try{if(!b){this.dispatch({type:"loading",variables:this.options.variables}),await (null==(l=(u=this.mutationCache.config).onMutate)?void 0:l.call(u,this.state.variables,this));let e=await (null==(c=(d=this.options).onMutate)?void 0:c.call(d,this.state.variables));e!==this.state.context&&this.dispatch({type:"loading",context:e,variables:this.state.variables})}let h=await (()=>{var e;return this.retryer=eO({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:null!=(e=this.options.retry)?e:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise})();return await (null==(e=(t=this.mutationCache.config).onSuccess)?void 0:e.call(t,h,this.state.variables,this.state.context,this)),await (null==(r=(n=this.options).onSuccess)?void 0:r.call(n,h,this.state.variables,this.state.context)),await (null==(i=(s=this.mutationCache.config).onSettled)?void 0:i.call(s,h,null,this.state.variables,this.state.context,this)),await (null==(o=(a=this.options).onSettled)?void 0:o.call(a,h,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:h}),h}catch(e){try{throw await (null==(h=(p=this.mutationCache.config).onError)?void 0:h.call(p,e,this.state.variables,this.state.context,this)),await (null==(f=(g=this.options).onError)?void 0:f.call(g,e,this.state.variables,this.state.context)),await (null==(m=(y=this.mutationCache.config).onSettled)?void 0:m.call(y,void 0,e,this.state.variables,this.state.context,this)),await (null==(v=(_=this.options).onSettled)?void 0:v.call(_,void 0,e,this.state.variables,this.state.context)),e}finally{this.dispatch({type:"error",error:e})}}}dispatch(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"loading":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!eE(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
10sed:!1,status:"error"};case"setState":return{...t,...e.state}}})(this.state),ev.batch(()=>{this.observers.forEach(t=>{t.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function eY(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class eJ extends e_{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;let r=this.options;this.options=this.client.defaultMutationOptions(e),ec(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),null==(t=this.currentMutation)||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;null==(e=this.currentMutation)||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();let t={listeners:!0};"success"===e.type?t.onSuccess=!0:"error"===e.type&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:void 0!==e?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){let e=this.currentMutation?this.currentMutation.state:eY(),t={...e,isLoading:"loading"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){ev.batch(()=>{if(this.mutateOptions&&this.hasListeners()){var t,r,n,i,s,o,a,l;e.onSuccess?(null==(t=(r=this.mutateOptions).onSuccess)||t.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),null==(n=(i=this.mutateOptions).onSettled)||n.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)):e.onError&&(null==(s=(o=this.mutateOptions).onError)||s.call(o,this.currentResult.error,this.currentResult.variables,this.currentResult.context),null==(a=(l=this.mutateOptions).onSettled)||a.call(l,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context))}e.listeners&&this.listeners.forEach(({listener:e})=>{e(this.currentResult)})})}}function eX(){}function e0(){return{onFetch:e=>{e.fetchFn=()=>{var t,r,n,i,s,o;let a;let l=null==(t=e.fetchOptions)?void 0:null==(r=t.meta)?void 0:r.refetchPage,u=null==(n=e.fetchOptions)?void 0:null==(i=n.meta)?void 0:i.fetchMore,c=null==u?void 0:u.pageParam,d=(null==u?void 0:u.direction)==="forward",h=(null==u?void 0:u.direction)==="backward",p=(null==(s=e.state.data)?void 0:s.pages)||[],f=(null==(o=e.state.data)?void 0:o.pageParams)||[],g=f,m=!1,y=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>{var t,r;return null!=(t=e.signal)&&t.aborted?m=!0:null==(r=e.signal)||r.addEventListener("abort",()=>{m=!0}),e.signal}})},v=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),_=(e,t,r,n)=>(g=n?[t,...g]:[...g,t],n?[r,...e]:[...e,r]),b=(t,r,n,i)=>{if(m)return Promise.reject("Cancelled");if(void 0===n&&!r&&t.length)return Promise.resolve(t);let s={queryKey:e.queryKey,pageParam:n,meta:e.options.meta};y(s);let o=v(s),a=Promise.resolve(o).then(e=>_(t,n,e,i));return a};if(p.length){if(d){let t=void 0!==c,r=t?c:e1(e.options,p);a=b(p,t,r)}else if(h){let t=void 0!==c,r=t?c:e2(e.options,p);a=b(p,t,r,!0)}else{g=[];let t=void 0===e.options.getNextPageParam,r=!l||!p[0]||l(p[0],0,p);a=r?b([],t,f[0]):Promise.resolve(_([],f[0],p[0]));for(let r=1;r<p.length;r++)a=a.then(n=>{let i=!l||!p[r]||l(p[r],r,p);if(i){let i=t?f[r]:e1(e.options,n);return b(n,t,i)}return Promise.resolve(_(n,f[r],p[r]))})}}else a=b([]);let w=a.then(e=>({pages:e,pageParams:g}));return w}}}}function e1(e,t){return null==e.getNextPageParam?void 0:e.getNextPageParam(t[t.length-1],t)}function e2(e,t){return null==e.getPreviousPageParam?void 0:e.getPreviousPageParam(t[0],t)}class e3 extends eI{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:e0()},t)}getOptimisticResult(e){return e.behavior=e0(),super.getOptimisticResult(e)}fetchNextPage({pageParam:e,...t}={}
10){return this.fetch({...t,meta:{fetchMore:{direction:"forward",pageParam:e}}})}fetchPreviousPage({pageParam:e,...t}={}){return this.fetch({...t,meta:{fetchMore:{direction:"backward",pageParam:e}}})}createResult(e,t){var r,n,i,s,o,a;let{state:l}=e,u=super.createResult(e,t),{isFetching:c,isRefetching:d}=u,h=c&&(null==(r=l.fetchMeta)?void 0:null==(n=r.fetchMore)?void 0:n.direction)==="forward",p=c&&(null==(i=l.fetchMeta)?void 0:null==(s=i.fetchMore)?void 0:s.direction)==="backward";return{...u,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:function(e,t){if(e.getNextPageParam&&Array.isArray(t)){let r=e1(e,t);return null!=r&&!1!==r}}(t,null==(o=l.data)?void 0:o.pages),hasPreviousPage:function(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){let r=e2(e,t);return null!=r&&!1!==r}}(t,null==(a=l.data)?void 0:a.pages),isFetchingNextPage:h,isFetchingPreviousPage:p,isRefetching:d&&!h&&!p}}}class e6 extends e_{constructor(e,t){super(),this.client=e,this.queries=[],this.result=[],this.observers=[],this.observersMap={},t&&this.setQueries(t)}onSubscribe(){1===this.listeners.size&&this.observers.forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.observers.forEach(e=>{e.destroy()})}setQueries(e,t){this.queries=e,ev.batch(()=>{let e=this.observers,r=this.findMatchingObservers(this.queries);r.forEach(e=>e.observer.setOptions(e.defaultedQueryOptions,t));let n=r.map(e=>e.observer),i=Object.fromEntries(n.map(e=>[e.options.queryHash,e])),s=n.map(e=>e.getCurrentResult()),o=n.some((t,r)=>t!==e[r]);(e.length!==n.length||o)&&(this.observers=n,this.observersMap=i,this.result=s,this.hasListeners()&&(et(e,n).forEach(e=>{e.destroy()}),et(n,e).forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})}),this.notify()))})}getCurrentResult(){return this.result}getQueries(){return this.observers.map(e=>e.getCurrentQuery())}getObservers(){return this.observers}getOptimisticResult(e){return this.findMatchingObservers(e).map(e=>e.observer.getOptimisticResult(e.defaultedQueryOptions))}
10findMatchingObservers(e){let t=this.observers,r=new Map(t.map(e=>[e.options.queryHash,e])),n=e.map(e=>this.client.defaultQueryOptions(e)),i=n.flatMap(e=>{let t=r.get(e.queryHash);return null!=t?[{defaultedQueryOptions:e,observer:t}]:[]}),s=new Set(i.map(e=>e.defaultedQueryOptions.queryHash)),o=n.filter(e=>!s.has(e.queryHash)),a=new Set(i.map(e=>e.observer)),l=t.filter(e=>!a.has(e)),u=e=>{let t=this.client.defaultQueryOptions(e),r=this.observersMap[t.queryHash];return null!=r?r:new eI(this.client,t)},c=o.map((e,t)=>{if(e.keepPreviousData){let r=l[t];if(void 0!==r)return{defaultedQueryOptions:e,observer:r}}return{defaultedQueryOptions:e,observer:u(e)}});return i.concat(c).sort((e,t)=>n.indexOf(e.defaultedQueryOptions)-n.indexOf(t.defaultedQueryOptions))}onUpdate(e,t){let r=this.observers.indexOf(e);-1!==r&&(this.result=function(e,t,r){let n=e.slice(0);return n[t]=r,n}(this.result,r,t),this.notify())}notify(){ev.batch(()=>{this.listeners.forEach(({listener:e})=>{e(this.result)})})}}function e8(e,t){return e.length?void 0===t?[e]:[e,t]:[]}function e5(e,t){return p(r=>{let n=r.args,i=[e,...r.path],s=i.pop(),o=i.join(".");if("useMutation"===s)return t[s](o,...n);let[a,...l]=n,u=e8(o,a);if("getQueryKey"===s)return Y(u,l[0]??"any");if("_def"===s)return{path:i};if(s.startsWith("useSuspense")){let e=l[0]||{},r=t["useSuspenseQuery"===s?"useQuery":"useInfiniteQuery"](u,{...e,suspense:!0,enabled:!0});return[r.data,r]}return t[s](u,...l)})}let e4=["client","ssrContext","ssrState","abortOnUnmount"],e9=(0,V.createContext)(null);function e7(e){return f(t=>{if("client"===t){var r;return r=e.client,f(e=>r.hasOwnProperty(e)?r[e]:p(({path:t,args:n})=>{let i=[e,...t],s=L(i.pop()),o=i.join(".");return r[s](o,...n)}))}return e4.includes(t)?e[t]:p(({path:r,args:n})=>{let i=[t,...r],s=i.pop(),o=i.join("."),{queryKey:a,rest:l,updater:u}=(e=>{if(["setData","setInfiniteData"].includes(e)){let[e,t,...r]=n,i=e8(o,e);return{queryKey:i,updater:t,rest:r}}let[t,...r]=n,i=e8(o,t);return{queryKey:i,rest:r}})(s);return({fetch:()=>e.fetchQuery(a,...l),fetchInfinite:()=>e.fetchInfiniteQuery(a,...l),prefetch:()=>e.prefetchQuery(a,...l),prefetchInfinite:()=>e.prefetchInfiniteQuery(a,...l),ensureData:()=>e.ensureQueryData(a,...l),invalidate:()=>e.invalidateQueries(a,...l),reset:()=>e.resetQueries(a,...l),refetch:()=>e.refetchQueries(a,...l),cancel:()=>e.cancelQuery(a,...l),setData:()=>e.setQueryData(a,u,...l),setInfiniteData:()=>e.setInfiniteQueryData(a,u,...l),getData:()=>e.getQueryData(a),getInfiniteData:()=>e.getInfiniteQueryData(a)})[s]()})})}function te(e,t){let[r,n]=e;return[r,n,t?.trpc]}function tt(e){let t=(0,V.useRef)(e);return t.current.path=e.path,t.current}function tr(e){return function(e){let t=(e?.overrides??e?.unstable_overrides)?.useMutation?.onSuccess??(e=>e.originalFn()),r=e?.context??e9,n=e?.reactQueryContext;function i(){return V.useContext(r)}function s(e,t,r){let{queryClient:n,ssrState:s}=i();return s&&"mounted"!==s&&"error"===n.getQueryCache().find(Y(e,t))?.state.status?{retryOnMount:!1,...r}:r}return{Provider:e=>{let{abortOnUnmount:t=!1,client:n,queryClient:i,ssrContext:s}=e,[o,a]=(0,V.useState)(e.ssrState??!1);return(0,V.useEffect)(()=>{a(e=>!!e&&"mounted")},[]),V.createElement(r.Provider,{value:{abortOnUnmount:t,queryClient:i,client:n,ssrContext:s||null,ssrState:o,fetchQuery:(0,V.useCallback)((e,t)=>i.fetchQuery({...t,queryKey:Y(e,"query"),queryFn:()=>n.query(...te(e,t))}),[n,i]),fetchInfiniteQuery:(0,V.useCallback)((e,t)=>i.fetchInfiniteQuery({...t,queryKey:Y(e,"infinite"),queryFn:({pageParam:r})=>{let[i,s]=e,o={...s,cursor:r};return n.query(...te([i,o],t))}}),[n,i]),prefetchQuery:(0,V.useCallback)((e,t)=>i.prefetchQuery({...t,queryKey:Y(e,"query"),queryFn:()=>n.query(...te(e,t))}),[n,i]),prefetchInfiniteQuery:(0,V.useCallback)((e,t)=>i.prefetchInfiniteQuery({...t,queryKey:Y(e,"infinite"),queryFn:({pageParam:r})=>{let[i,s]=e,o={...s,cursor:r};return n.query(...te([i,o],t))}}),[n,i]),ensureQueryData:(0,V.useCallback)((e,t)=>i.ensureQueryData({...t,queryKey:Y(e,"query"),queryFn:()=>n.query(...te(e,t))}),[n,i]),invalidateQueries:(0,V.useCallback)((e,t,r)=>i.invalidateQueries({...t,queryKey:Y(e,"any")},r),[i]),resetQueries:(0,V.useCallback)((...e)=>{let[t,r,n]=e;return i.resetQueries({...r,queryKey:Y(t,"any")},n)},[i]),refetchQueries:(0,V.useCallback)((...e)=>{let[t,r,n]=e;return i.refetchQueries({...r,queryKey:Y(t,"any")},n)},[i]),cancelQuery:(0,V.useCallback)(e=>i.cancelQueries({queryKey:Y(e,"any")}),[i]),setQueryData:(0,V.useCallback)((...e)=>{let[t,...r]=e;return i.setQueryData(Y(t,"query"),...r)},[i]),getQueryData:(0,V.useCallback)((...e)=>{let[t,...r]=e;return i.getQueryData(Y(t,"query"),...r)},[i]),setInfiniteQueryData:(0,V.useCallback)((...e)=>{let[t,...r]=e;return i.setQueryData(Y(t,"infinite"),...r)},[i]),getInfiniteQueryData:(0,V.useCallback)((...e)=>{let[t,...r]=e;return i.getQueryData(Y(t,"infinite"),...r)},[i])}},e.children)},createClient:e=>D(e),useContext:i,useQuery:function(t,r){let o=i();if(!o)throw Error("Unable to retrieve application context. Did you forget to wrap your Ap
10p inside `withTRPC` HoC?");let{abortOnUnmount:a,client:l,ssrState:u,queryClient:c,prefetchQuery:d}=o,h=c.getQueryDefaults(Y(t,"query"));"undefined"!=typeof window||"prepass"!==u||r?.trpc?.ssr===!1||(r?.enabled??h?.enabled)===!1||c.getQueryCache().find(Y(t,"query"))||d(t,r);let p=s(t,"query",{...h,...r}),f=r?.trpc?.abortOnUnmount??e?.abortOnUnmount??a,g=function(e,t,r){let n=en(e,void 0,void 0);return eG(n,eI)}({...p,queryKey:Y(t,"query"),queryFn:e=>{let r={...p,trpc:{...p?.trpc,...f?{signal:e.signal}:{}}};return l.query(...te(t,r))},context:n});return g.trpc=tt({path:t[0]}),g},useQueries:(e,t)=>{let{ssrState:r,queryClient:n,prefetchQuery:s,client:o}=i(),a=p(e=>{let t=e.path.join("."),[r,...n]=e.args,i=e8(t,r),s={queryKey:i,queryFn:()=>o.query(t,r),...n[0]};return s}),l=e(a);if("undefined"==typeof window&&"prepass"===r)for(let e of l)e.trpc?.ssr===!1||n.getQueryCache().find(Y(e.queryKey,"query"))||s(e.queryKey,e);return function({queries:e,context:t}){let r=W({context:t}),n=eU(),i=eN(),s=V.useMemo(()=>e.map(e=>{let t=r.defaultQueryOptions(e);return t._optimisticResults=n?"isRestoring":"optimistic",t}),[e,r,n]);s.forEach(e=>{eq(e),eB(e,i)}),ez(i);let[o]=V.useState(()=>new e6(r,s)),a=o.getOptimisticResult(s);eP(V.useCallback(e=>n?()=>void 0:o.subscribe(ev.batchCalls(e)),[o,n]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),V.useEffect(()=>{o.setQueries(s,{listeners:!1})},[s,o]);let l=a.some((e,t)=>eZ(s[t],e,n)),u=l?a.flatMap((e,t)=>{let r=s[t],a=o.getObservers()[t];if(r&&a){if(eZ(r,e,n))return eW(r,a,i);eK(e,n)&&eW(r,a,i)}return[]}):[];if(u.length>0)throw Promise.all(u);let c=o.getQueries(),d=a.find((e,t)=>{var r,n;return eV({result:e,errorResetBoundary:i,useErrorBoundary:null!=(r=null==(n=s[t])?void 0:n.useErrorBoundary)&&r,query:c[t]})});if(null!=d&&d.error)throw d.error;return a}({queries:l.map(e=>({...e,queryKey:Y(e.queryKey,"query")})),context:t})},useMutation:function(e,r){let{client:s}=i(),o=W({context:n}),a=Array.isArray(e)?e[0]:e,l=o.getMutationDefaults([a.split(".")]),u=function(e,t,r){var n;let i=(n=void 0,ef(e)?"function"==typeof n?{mutationKey:e,mutationFn:n}:{...n,mutationKey:e}:"function"==typeof e?{...n,mutationFn:e}:{...e}),s=W({context:i.context}),[o]=V.useState(()=>new eJ(s,i));V.useEffect(()=>{o.setOptions(i)},[o,i]);let a=eP(V.useCallback(e=>o.subscribe(ev.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),l=V.useCallback((e,t)=>{o.mutate(e,t).catch(eX)},[o]);if(a.error&&eF(o.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:l,mutateAsync:a.mutate}}({...r,mutationKey:[a.split(".")],mutationFn:e=>s.mutation(...te([a,e],r)),context:n,onSuccess:(...e)=>t({originalFn:()=>r?.onSuccess?.(...e)??l?.onSuccess?.(...e),queryClient:o,meta:r?.meta??l?.meta??{}})});return u.trpc=tt({path:a}),u},useSubscription:function(e,t){let r=t?.enabled??!0,n=el(e),{client:s}=i(),o=(0,V.useRef)(t);return o.current=t,(0,V.useEffect)(()=>{if(!r)return;let[t,n]=e,i=!1,a=s.subscription(t,n??void 0,{onStarted:()=>{i||o.current.onStarted?.()},onData:e=>{i||o.current.onData(e)},onError:e=>{i||o.current.onError?.(e)}});return()=>{i=!0,a.unsubscribe()}},[n,r])},useDehydratedState:(e,t)=>{let r=(0,V.useMemo)(()=>t?e.runtime.transformer.deserialize(t):t,[t,e]);return r},useInfiniteQuery:function(e,t){let[r,o]=e,{client:a,ssrState:l,prefetchInfiniteQuery:u,queryClient:c,abortOnUnmount:d}=i(),h=c.getQueryDefaults(Y(e,"infinite"));"undefined"!=typeof window||"prepass"!==l||t?.trpc?.ssr===!1||(t?.enabled??h?.enabled)===!1||c.getQueryCache().find(Y(e,"infinite"))||u(e,{...h,...t});let p=s(e,"infinite",{...h,...t}),f=t?.trpc?.abortOnUnmount??d,g=function(e,t,r){let n=en(e,void 0,void 0);return eG(n,e3)}({...p,queryKey:Y(e,"infinite"),queryFn:e=>{let n={...p,trpc:{...p?.trpc,...f?{signal:e.signal}:{}}},i={...o??{},cursor:e.pageParam??t?.initialCursor};return a.query(...te([r,i],n))},context:n});return g.trpc=tt({path:r}),g}}}(e)}class tn extends eQ{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||e$,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdate
10Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"loading",fetchStatus:"idle"}}(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.cache.remove(this)}setData(e,t){let r=ey(this.state.data,e,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:null==t?void 0:t.updatedAt,manual:null==t?void 0:t.manual}),r}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;let r=this.promise;return null==(t=this.retryer)||t.cancel(e),r?r.then(X).catch(X):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>!1!==e.options.enabled)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!er(this.state.dataUpdatedAt,e)}onFocus(){var e;let t=this.observers.find(e=>e.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}onOnline(){var e;let t=this.observers.find(e=>e.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),null==(e=this.retryer)||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var r,n,i,s;if("idle"!==this.state.fetchStatus){if(this.state.dataUpdatedAt&&null!=t&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise)return null==(i=this.retryer)||i.continueRetry(),this.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}Array.isArray(this.options.queryKey);let o=function(){if("function"==typeof AbortController)return new AbortController}(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);let u={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn")};l(u),null==(r=this.options.behavior)||r.onFetch(u),this.revertState=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(n=u.fetchOptions)?void 0:n.meta))&&this.dispatch({type:"fetch",meta:null==(s=u.fetchOptions)?void 0:s.meta});let c=e=>{if(ek(e)&&e.silent||this.dispatch({type:"error",error:e}),!ek(e)){var t,r,n,i;null==(t=(r=this.cache.config).onError)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,this.state.data,e,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=eO({fn:u.fetchFn,abort:null==o?void 0:o.abort.bind(o),onSuccess:e=>{var t,r,n,i;if(void 0===e){c(Error(this.queryHash+" data is undefined"));return}this.setData(e),null==(t=(r=this.cache.config).onSuccess)||t.call(r,e,this),null==(n=(i=this.cache.config).onSettled)||n.call(i,e,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:c,onFail:(e,t)=>{this.dispatch({type:"failed",failureCount:e,error:t})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){this.state=(t=>{var r,n;switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null!=(r=e.meta)?r:null,fetchStatus:eE(this.options.networkMode)?"fetching":"paused",...!t.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(n=e.dataUpdatedAt)?n:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let i=e.error;if(ek(i)&&i.revert&&this.revertState)return{...this.revertState};
10return{...t,error:i,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),ev.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}class ti extends e_{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,r){var n;let i=t.queryKey,s=null!=(n=t.queryHash)?n:ea(i,t),o=this.get(s);return o||(o=new tn({cache:this,logger:e.getLogger(),queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){let t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(t=>t!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){ev.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){let[r]=ei(e,t);return void 0===r.exact&&(r.exact=!0),this.queries.find(e=>es(r,e))}findAll(e,t){let[r]=ei(e,t);return Object.keys(r).length>0?this.queries.filter(e=>es(r,e)):this.queries}notify(e){ev.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){ev.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){ev.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class ts extends e_{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,r){let n=new eH({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:r,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(n),n}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){ev.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return void 0===e.exact&&(e.exact=!0),this.mutations.find(t=>eo(e,t))}findAll(e){return this.mutations.filter(t=>eo(e,t))}notify(e){ev.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=(null!=(e=this.resuming)?e:Promise.resolve()).then(()=>{let e=this.mutations.filter(e=>
10e.state.isPaused);return ev.batch(()=>e.reduce((e,t)=>e.then(()=>t.continue().catch(X)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}class to{constructor(e={}){this.queryCache=e.queryCache||new ti,this.mutationCache=e.mutationCache||new ts,this.logger=e.logger||e$,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=eb.subscribe(()=>{eb.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=eS.subscribe(()=>{eS.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){let[r]=ei(e,t);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state.data}ensureQueryData(e,t,r){let n=en(e,t,r),i=this.getQueryData(n.queryKey);return i?Promise.resolve(i):this.fetchQuery(n)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:e,state:t})=>{let r=t.data;return[e,r]})}setQueryData(e,t,r){let n=this.queryCache.find(e),i=null==n?void 0:n.state.data,s="function"==typeof t?t(i):t;if(void 0===s)return;let o=en(e),a=this.defaultQueryOptions(o);return this.queryCache.build(this,a).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return ev.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e,t){var r;return null==(r=this.queryCache.find(e,t))?void 0:r.state}removeQueries(e,t){let[r]=ei(e,t),n=this.queryCache;ev.batch(()=>{n.findAll(r).forEach(e=>{n.remove(e)})})}resetQueries(e,t,r){let[n,i]=ei(e,t,r),s=this.queryCache,o={type:"active",...n};return ev.batch(()=>(s.findAll(n).forEach(e=>{e.reset()}),this.refetchQueries(o,i)))}cancelQueries(e,t,r){let[n,i={}]=ei(e,t,r);void 0===i.revert&&(i.revert=!0);let s=ev.batch(()=>this.queryCache.findAll(n).map(e=>e.cancel(i)));return Promise.all(s).then(X).catch(X)}invalidateQueries(e,t,r){let[n,i]=ei(e,t,r);return ev.batch(()=>{var e,t;if(this.queryCache.findAll(n).forEach(e=>{e.invalidate()}),"none"===n.refetchType)return Promise.resolve();let r={...n,type:null!=(e=null!=(t=n.refetchType)?t:n.type)?e:"active"};return this.refetchQueries(r,i)})}refetchQueries(e,t,r){let[n,i]=ei(e,t,r),s=ev.batch(()=>this.queryCache.findAll(n).filter(e=>!e.isDisabled()).map(e=>{var t;return e.fetch(void 0,{...i,cancelRefetch:null==(t=null==i?void 0:i.cancelRefetch)||t,meta:{refetchPage:n.refetchPage}})})),o=Promise.all(s).then(X);return null!=i&&i.throwOnError||(o=o.catch(X)),o}fetchQuery(e,t,r){let n=en(e,t,r),i=this.defaultQueryOptions(n);void 0===i.retry&&(i.retry=!1);let s=this.queryCache.build(this,i);return s.isStaleByTime(i.staleTime)?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(e,t,r){return this.fetchQuery(e,t,r).then(X).catch(X)}fetchInfiniteQuery(e,t,r){let n=en(e,t,r);return n.behavior=e0(),this.fetchQuery(n)}prefetchInfiniteQuery(e,t,r){return this.fetchInfiniteQuery(e,t,r).then(X).catch(X)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){let r=this.queryDefaults.find(t=>el(e)===el(t.queryKey));r?r.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;let t=this.queryDefaults.find(t=>eu(e,t.queryKey));return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){let r=this.mutationDefaults.find(t=>el(e)===el(t.mutationKey));r?r.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;let t=this.mutationDefaults.find(t=>eu(e,t.mutationKey));return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;let t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=ea(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}let ta=e=>e.queryClient??new to(e.queryClientConfig);function tl(){return(tl=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];
10for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var tu=60103,tc=60106,td=60107,th=60108,tp=60114,tf=60109,tg=60110,tm=60111,ty=60112,tv=60113,t_=60115,tb=60116;if("function"==typeof Symbol&&Symbol.for){var tw=Symbol.for;tu=tw("react.element"),tc=tw("react.portal"),td=tw("react.fragment"),th=tw("react.strict_mode"),tp=tw("react.profiler"),tf=tw("react.provider"),tg=tw("react.context"),tm=Symbol.for("react.concurrent_mode"),ty=tw("react.forward_ref"),tv=tw("react.suspense"),t_=tw("react.memo"),tb=tw("react.lazy")}var tS=tu,tC=tc,tE=td,tx=th,tk=tp,tO=tf,tI=tg,tR=tm,tT=ty,tM=tv,tA=t_,tD=tb,tP=V.Children.toArray,tL=function(e){return null!==e&&"object"==typeof e},tN=function(e){return tP(e).filter(tL)},tj=function(e,t){return"object"==typeof t?tl({},t,e):e},tU=new Map,tF={},tB=void 0,tz=void 0,tV=function(){return tl({},tF)},tq=function(){return new Map(tU)},tK=function(){var e=tB;return tB=void 0,e},tZ=function(){var e=tz;return tz=void 0,e},tW=function(e){void 0!==e&&tl(tF,e)},tG=function(e){void 0!==e&&tU.set(e[0],e[1])},t$=function(e){tB=void 0,tF=e},tQ=function(e){tz=void 0,tU=e},tH=function(e){var t=tU.get(e);return void 0!==t?t:e._currentValue},tY={},tJ=function(e){var t=e.contextType,r=e.contextTypes;if(t)return tH(t);if(!r)return tY;var n={};for(var i in r)n[i]=tF[i];return n},tX=null,t0=function(){return tX},t1=function(e){tX=e||null},t2={current:{uniqueID:0}},t3="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},t6=null,t8=function(e){t6=e},t5=function(){if(null===t6)throw Error("[react-ssr-prepass] Hooks can only be called inside the body of a function component. (https://fb.me/react-invalid-hook-call)");return t6},t4=null,t9=null,t7=!1,re=null,rt=0,rr=function(e){t4=e};function rn(){return null===t9?null===t4?t4=t9={memoizedState:null,queue:null,next:null}:t9=t4:t9=null===t9.next?t9.next={memoizedState:null,queue:null,next:null}:t9.next}function ri(e,t){return"function"==typeof t?t(e):t}function rs(e,t,r){var n,i=t5();null===(t9=rn()).queue&&(n=e===ri?"function"==typeof t?t():t:void 0!==r?r(t):t,t9.memoizedState=n);var s=t9.queue||(t9.queue={last:null,dispatch:null}),o=s.dispatch||(s.dispatch=rl.bind(null,i,s));if(null!==re){var a=re.get(s);if(void 0!==a){re.delete(s);var l=t9.memoizedState,u=a;do l=e(l,u.action),u=u.next;while(null!==u);t9.memoizedState=l}}return[t9.memoizedState,o]}function ro(e,t){t5();var r=void 0===t?null:t,n=(t9=rn()).memoizedState;if(null!==n&&null!==r&&function(e,t){if(null===t)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!t3(e[r],t[r]))return!1;return!0}(r,n[1]))return n[0];var i=e();return t9.memoizedState=[i,r],i}function ra(){return t5(),(t9=rn()).memoizedState||(t9.memoizedState="R:"+(t2.current.uniqueID++).toString(36)),t9.memoizedState}function rl(e,t,r){if(e===t6){t7=!0;var n={action:r,next:null};null===re&&(re=new Map);var i=re.get(t);if(void 0===i)re.set(t,n);else{for(var s=i;null!==s.next;)s=s.next;s.next=n}}}function ru(){}function rc(e){e()}var rd={readContext:function(e,t){return tH(e)},useSyncExternalStore:function(e,t,r){return t()},useContext:function(e,t){return t5(),tH(e)},useMemo:ro,useReducer:rs,useRef:function(e){t5();var t=(t9=rn()).memoizedState;if(null!==t)return t;var r={current:e};return t9.memoizedState=r,r},useState:function(e){return rs(ri,e)},useCallback:function(e,t){return ro(function(){return e},t)},useMutableSource:function(e,t,r){return t5(),t(e._source)},useTransition:function(){return[rc,!1]},useDeferredValue:function(e){return e},useOpaqueIdentifier:ra,useId:ra,unstable_useId:ra,unstable_useOpaqueIdentifier:ra,useLayoutEffect:ru,useImperativeHandle:ru,useEffect:ru,useDebugValue:ru},rh=function(e){var t=e._payload||e;return 0===t._status?t._result:1===t._status?Promise.resolve(t._result):2===t._status?Promise.reject(t._result):(t._status=0,t._result=(t._ctor||t._result)().then(function(e){t._result=e,"function"==typeof e?t._status=1:null!==e&&"object"==typeof e&&"function"==typeof e.default?(t._result=e.default,t._status=1):t._status=2}).catch(function(e){return t._status=2,t._result=e,Promise.reject(e)}))},rp=function(e,t,r){var n=e._payload||e;return 1===n._status?(0,V.createElement)(n._result,t):null},rf=function(e,t,r){return{contextMap:tV(),contextStore:tq(),id:t5(),hook:t4,kind:"frame.hooks",errorFrame:t0(),thenable:r,props:t,type:e}},rg=function(e,t,r){try{return function(e,t,r){t9=null;for(var n=e(t,r);rt<25&&t7;)t7=!1,rt+=1,t9=null,n=e(t,r);return rt=0,re=null,t9=null,n}(e,tj(t,e.defaultProps),tJ(e))}catch(n){if("function"!=typeof n.then)throw n;return r.push(rf(e,t,n)),null}};function rm(){return!1}function ry(){return null}var rv=function(e,t){var r,n={_thrown:0,queue:r=[],isMounted:rm,enqueueForceUpdate:ry,enqueueReplaceState:function(e,t){e._isMounted&&(r.length=0,r.push(t))},enqueueSetState:function(e,t){e._isMounted&&r.push(t)}},i=tj(t,e.defaultProps),s=tJ(e),o=new e(i,s,n);if(o.props=i,o.context=s,o.updater=n,o._isMounted=!0,void 0===o.state&&(o.state=null),"function"==typeof o.componentDidCatch||"function"==typeof e.getDerivedStateFromError){var a=r_(e,o,null);a.errorFrame=a,t1(a)}if("function"==typeof e.getDerivedStateFromProps){var l=(0,e.getDerivedStateFromProps)(o.props,o.state);null!=l&&(o.state=tl({},o.state,l))}else"function"==typeof o.componentWillMount?o.componentWillMount():"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount();return o},r_=function(e,t,r){return{contextMap:tV(),contextStore:tq(),errorFrame:t0(),thenable:r,kind:"frame.class",error:null,instance:t,type:e}},rb=function(e,t,r){!function(e){var t=e.updater.queue;if(t.length>0){for(var r=tl({},e.state),n=0,i=t.length;n<i;n++){var s=t[n],o="function"==typeof s?s.call(e,r,e.props,e.context):s;null!==o&&tl(r,o)}e.state=r,t.length=0}}(t);var n=null;try{n=t.render()}catch(n){if("function"!=typeof n.then)throw n;return r.push(r_(e,t,n)),null}if(void 0!==e.childContextTypes&&"function"==typeof t.getChildContext){var i=t.getChildContext();null!==i&&"object"==typeof i&&function(e){for(var t in tB={},e)tB[t]=tF[t],tF[t]=e[t]}(i)}if("function"!=typeof t.getDerivedStateFromProps&&("function"==typeof t.componentWillMount||"function"==typeof t.UNSAFE_componentWillMount)&&"function"==typeof t.componentWillUnmount)try{t.componentWillUnmount()}catch(e){}return t._isMounted=!1,n}
10,rw=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentDispatcher,rS="function"==typeof setImmediate,rC=function(e,t,r,n,i){var s,o,a;return e.prototype&&e.prototype.isReactComponent?(t8(null),(o=n(i,s=rv(e,t)))?(r.push(r_(e,s,o)),null):rb(e,s,r)):(rr(null),t8({}),(a=n(i))?(r.push(rf(e,t,a)),null):rg(e,t,r))},rE=function(e,t,r){switch(function(e){switch(e.$$typeof){case tC:return tC;case tS:switch(e.type){case tR:return tR;case tE:return tE;case tk:return tk;case tx:return tx;case tM:return tM;default:switch(e.type&&e.type.$$typeof){case tD:return tD;case tA:return tA;case tI:return tI;case tO:return tO;case tT:return tT;default:return tS}}default:return}}(e)){case tM:case tx:case tR:case tk:case tE:return tN(e.props.children);case tO:var n,i,s,o,a=e.props,l=a.children;return s=e.type._context,o=a.value,tz=[s,tU.get(s)],tU.set(s,o),tN(l);case tI:var u=e.props.children;if("function"!=typeof u)return[];var c=e.type;return tN(u(tH("object"==typeof c._context?c._context:c)));case tD:return tN((n=e.type,i=e.props,(n._payload||n)._status<=0?(t.push({kind:"frame.lazy",contextMap:tV(),contextStore:tq(),errorFrame:t0(),thenable:rh(n),props:i,type:n}),null):rp(n,i)));case tA:return tN((0,V.createElement)(e.type.type,e.props));case tT:var d=e.type,h=d.render,p=tj(e.props,d.defaultProps);return tN((0,V.createElement)(h,p));case tS:if("string"==typeof e.type)return tN(e.props.children);return tN(rC(e.type,e.props,t,r,e));default:return[]}},rx=function(e,t,r,n,i,s){var o=rw.current,a=Date.now();try{for(rw.current=rd;e.length>0;){var l=e[e.length-1].shift();if(void 0!==l){var u=rE(l,i,s);e.push(u),t.push(tK()),r.push(tZ()),n.push(t0())}else e.pop(),tW(t.pop()),tG(r.pop()),t1(n.pop());if(rS&&Date.now()-a>5)return!0}return!1}catch(e){var c=t0();if(!c)throw e;return c.error=e,i.unshift(c),!1}finally{rw.current=o}},rk=function(e,t,r,n){return{contextMap:tV(),contextStore:tq(),errorFrame:t0(),thenable:null,kind:"frame.yield",traversalChildren:e,traversalMap:t,traversalStore:r,traversalErrorFrame:n}},rO=function(e,t,r){var n=[e],i=[tK()],s=[tZ()],o=[t0()];rx(n,i,s,o,t,r)&&t.unshift(rk(n,i,s,o))},rI=function(e,t,r){if("frame.yield"===e.kind)t8(null),t$(e.contextMap),tQ(e.contextStore),t1(e.errorFrame),rx(e.traversalChildren,e.traversalMap,e.traversalStore,e.traversalErrorFrame,t,r)&&t.unshift(rk(e.traversalChildren,e.traversalMap,e.traversalStore,e.traversalErrorFrame));else{var n=rw.current,i=null;rw.current=rd;try{"frame.class"===e.kind?i=function(e,t){if(t8(null),t$(t.contextMap),tQ(t.contextStore),t1(t.errorFrame),t.error){if(++t.instance.updater._thrown>=25)return null;t.instance._isMounted=!0,"function"==typeof t.instance.componentDidCatch&&t.instance.componentDidCatch(t.error),"function"==typeof t.type.getDerivedStateFromError&&t.instance.updater.enqueueSetState(t.instance,t.type.getDerivedStateFromError(t.error))}return rb(t.type,t.instance,e)}(t,e):"frame.hooks"===e.kind?(rr(e.hook),t8(e.id),t$(e.contextMap),tQ(e.contextStore),t1(e.errorFrame),i=rg(e.type,e.props,t)):"frame.lazy"===e.kind&&(t8(null),t$(e.contextMap),tQ(e.contextStore),t1(e.errorFrame),i=rp(e.type,e.props))}catch(e){var s=t0();if(!s)throw e;s.error=e,t.unshift(s),i=null}finally{rw.current=n}rO(tN(i),t,r)}};function rR(e,t){setImmediate(e)}var rT=function(e,t,r){var n=e.shift();return n?(rS&&"frame.yield"===n.kind&&(n.thenable=new Promise(rR)),Promise.resolve(n.thenable).then(function(){return t2.current=r,rI(n,e,t),rT(e,t,r)},function(r){if(!n.errorFrame)throw r;n.errorFrame.error=r,rI(n.errorFrame,e,t)})):Promise.resolve()},rM=function(){},rA=function(e,t){t||(t=rM);var r=[],n=t2.current={uniqueID:0};t$({}),tQ(new Map),t1(null);try{rO(tN(e),r,t)}catch(e){return Promise.reject(e)}return rT(r,t,n)};function rD(e){let t=e.state.error;if(t instanceof Error&&"TRPCClientError"===t.name){let r={message:t.message,data:t.data,shape:t.shape};return{...e,state:{...e.state,error:r}}}return e}var rP=function(){function e(){this.keyToValue=new Map,this.valueToKey=new Map}return e.prototype.set=function(e,t){this.keyToValue.set(e,t),this.valueToKey.set(t,e)},e.prototype.getByKey=function(e){return this.keyToValue.get(e)},e.prototype.getByValue=function(e){return this.valueToKey.get(e)},e.prototype.clear=function(){this.keyToValue.clear(),this.valueToKey.clear()},e}(),rL=function(){function e(e){this.generateIdentifier=e,this.kv=new rP}return e.prototype.register=function(e,t){this.kv.getByValue(e)||(t||(t=this.generateIdentifier(e)),this.kv.set(t,e))},e.prototype.clear=function(){this.kv.clear()},e.prototype.getIdentifier=function(e){return this.kv.getByValue(e)},e.prototype.getValue=function(e){return this.kv.getByKey(e)},e}(),rN=(z=function(e,t){return(z=Object.setPrototypeOf||({__proto__:[]}
10)instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}z(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),rj=function(e){function t(){var t=e.call(this,function(e){return e.name})||this;return t.classToAllowedProps=new Map,t}return rN(t,e),t.prototype.register=function(t,r){"object"==typeof r?(r.allowProps&&this.classToAllowedProps.set(t,r.allowProps),e.prototype.register.call(this,t,r.identifier)):e.prototype.register.call(this,t,r)},t.prototype.getAllowedProps=function(e){return this.classToAllowedProps.get(e)},t}(rL),rU=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o};function rF(e,t){Object.entries(e).forEach(function(e){var r=rU(e,2),n=r[0];return t(r[1],n)})}function rB(e,t){return -1!==e.indexOf(t)}function rz(e,t){for(var r=0;r<e.length;r++){var n=e[r];if(t(n))return n}}var rV=function(){function e(){this.transfomers={}}return e.prototype.register=function(e){this.transfomers[e.name]=e},e.prototype.findApplicable=function(e){return function(e,t){var r=function(e){if("values"in Object)return Object.values(e);var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(e[r]);return t}(e);if("find"in r)return r.find(t);for(var n=0;n<r.length;n++){var i=r[n];if(t(i))return i}}(this.transfomers,function(t){return t.isApplicable(e)}
10)},e.prototype.findByName=function(e){return this.transfomers[e]},e}(),rq=function(e){return void 0===e},rK=function(e){return"object"==typeof e&&null!==e&&e!==Object.prototype&&(null===Object.getPrototypeOf(e)||e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)},rZ=function(e){return rK(e)&&0===Object.keys(e).length},rW=function(e){return Array.isArray(e)},rG=function(e){return e instanceof Map},r$=function(e){return e instanceof Set},rQ=function(e){return"Symbol"===Object.prototype.toString.call(e).slice(8,-1)},rH=function(e){return"number"==typeof e&&isNaN(e)},rY=function(e){return"boolean"==typeof e||null===e||rq(e)||"number"==typeof e&&!isNaN(e)||"string"==typeof e||rQ(e)},rJ=function(e){return e.replace(/\./g,"\\.")},rX=function(e){return e.map(String).map(rJ).join(".")},r0=function(e){for(var t=[],r="",n=0;n<e.length;n++){var i=e.charAt(n);if("\\"===i&&"."===e.charAt(n+1)){r+=".",n++;continue}if("."===i){t.push(r),r="";continue}r+=i}var s=r;return t.push(s),t},r1=function(){return(r1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},r2=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o},r3=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};function r6(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var r8=[r6(rq,"undefined",function(){return null},function(){}),r6(function(e){return"bigint"==typeof e},"bigint",function(e){return e.toString()},function(e){return"undefined"!=typeof BigInt?BigInt(e):(console.error("Please add a BigInt polyfill."),e)}),r6(function(e){return e instanceof Date&&!isNaN(e.valueOf())},"Date",function(e){return e.toISOString()},function(e){return new Date(e)}),r6(function(e){return e instanceof Error},"Error",function(e,t){var r={name:e.name,message:e.message};return t.allowedErrorProps.forEach(function(t){r[t]=e[t]}),r},function(e,t){var r=Error(e.message);return r.name=e.name,r.stack=e.stack,t.allowedErrorProps.forEach(function(t){r[t]=e[t]}),r}),r6(function(e){return e instanceof RegExp},"regexp",function(e){return""+e},function(e){var t=e.slice(1,e.lastIndexOf("/")),r=e.slice(e.lastIndexOf("/")+1);return new RegExp(t,r)}),r6(r$,"set",function(e){return r3([],r2(e.values()))},function(e){return new Set(e)}),r6(rG,"map",function(e){return r3([],r2(e.entries()))},function(e){return new Map(e)}),r6(function(e){var t;return rH(e)||(t=e)===1/0||t===-1/0},"number",function(e){return rH(e)?"NaN":e>0?"Infinity":"-Infinity"},Number),r6(function(e){return 0===e&&1/e==-1/0},"number",function(){return"-0"},Number),r6(function(e){return e instanceof URL},"URL",function(e){return e.toString()},function(e){return new URL(e)})];function r5(e,t,r,n){return{isApplicable:e,annotation:t,transform:r,untransform:n}}var r4=r5(function(e,t){return!!rQ(e)&&!!t.symbolRegistry.getIdentifier(e)},function(e,t){return["symbol",t.symbolRegistry.getIdentifier(e)]},function(e){return e.description},function(e,t,r){var n=r.symbolRegistry.getValue(t[1]);if(!n)throw Error("Trying to deserialize unknown symbol");return n}),r9=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce(function(e,t){return e[t.name]=t,e},{}),r7=r5(function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},function(e){return["typed-array",e.constructor.name]},function(e){return r3([],r2(e))},function(e,t){var r=r9[t[1]];if(!r)throw Error("Trying to deserialize unknown typed array");return new r(e)});function ne(e,t){return null!=e&&!!e.constructor&&!!t.classRegistry.getIdentifier(e.constructor)}var nt=r5(ne,function(e,t){return["class",t.classRegistry.getIdentifier(e.constructor)]},function(e,t){var r=t.classRegistry.getAllowedProps(e.constructor);if(!r)return r1({},e);var n={};return r.forEach(function(t){n[t]=e[t]}),n},function(e,t,r){var n=r.classRegistry.getValue(t[1]);
10if(!n)throw Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(n.prototype),e)}),nr=r5(function(e,t){return!!t.customTransformerRegistry.findApplicable(e)},function(e,t){return["custom",t.customTransformerRegistry.findApplicable(e).name]},function(e,t){return t.customTransformerRegistry.findApplicable(e).serialize(e)},function(e,t,r){var n=r.customTransformerRegistry.findByName(t[1]);if(!n)throw Error("Trying to deserialize unknown custom value");return n.deserialize(e)}),nn=[nt,r4,nr,r7],ni=function(e,t){var r=rz(nn,function(r){return r.isApplicable(e,t)});if(r)return{value:r.transform(e,t),type:r.annotation(e,t)};var n=rz(r8,function(r){return r.isApplicable(e,t)});if(n)return{value:n.transform(e,t),type:n.annotation}},ns={};r8.forEach(function(e){ns[e.annotation]=e});var no=function(e,t,r){if(rW(t))switch(t[0]){case"symbol":return r4.untransform(e,t,r);case"class":return nt.untransform(e,t,r);case"custom":return nr.untransform(e,t,r);case"typed-array":return r7.untransform(e,t,r);default:throw Error("Unknown transformation: "+t)}else{var n=ns[t];if(!n)throw Error("Unknown transformation: "+t);return n.untransform(e,r)}},na=function(e,t){for(var r=e.keys();t>0;)r.next(),t--;return r.next().value};function nl(e){if(rB(e,"__proto__"))throw Error("__proto__ is not allowed as a property");if(rB(e,"prototype"))throw Error("prototype is not allowed as a property");if(rB(e,"constructor"))throw Error("constructor is not allowed as a property")}var nu=function(e,t){nl(t);for(var r=0;r<t.length;r++){var n=t[r];if(r$(e))e=na(e,+n);else if(rG(e)){var i=+n,s=0==+t[++r]?"key":"value",o=na(e,i);switch(s){case"key":e=o;break;case"value":e=e.get(o)}}else e=e[n]}return e},nc=function(e,t,r){if(nl(t),0===t.length)return r(e);for(var n=e,i=0;i<t.length-1;i++){var s=t[i];if(rW(n))n=n[+s];else if(rK(n))n=n[s];else if(r$(n)){var o=+s;n=na(n,o)}else if(rG(n)){if(i===t.length-2)break;var o=+s,a=0==+t[++i]?"key":"value",l=na(n,o);switch(a){case"key":n=l;break;case"value":n=n.get(l)}}}var u=t[t.length-1];if((rW(n)||rK(n))&&(n[u]=r(n[u])),r$(n)){var c=na(n,+u),d=r(c);c!==d&&(n.delete(c),n.add(d))}if(rG(n)){var o=+t[t.length-2],h=na(n,o),a=0==+u?"key":"value";switch(a){case"key":var p=r(h);n.set(p,n.get(h)),p!==h&&n.delete(h);break;case"value":n.set(h,r(n.get(h)))}}return e},nd=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o},nh=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},np=function(e,t,r,n,i){if(void 0===n&&(n=[]),void 0===i&&(i=[]),rY(e)||(s=n,(o=t.get(e))?o.push(s):t.set(e,[s])),!(rK(e)||rW(e)||rG(e)||r$(e)||ne(e,r))){var s,o,a,l=ni(e,r);return l?{transformedValue:l.value,annotations:[l.type]}:{transformedValue:e}}if(rB(i,e))return{transformedValue:null};var u=ni(e,r),c=null!==(a=null==u?void 0:u.value)&&void 0!==a?a:e;rY(e)||(i=nh(nh([],nd(i)),[e]));var d=rW(c)?[]:{},h={};return(rF(c,function(e,s){var o=np(e,t,r,nh(nh([],nd(n)),[s]),i);d[s]=o.transformedValue,rW(o.annotations)?h[s]=o.annotations:rK(o.annotations)&&rF(o.annotations,function(e,t){h[rJ(s)+"."+t]=e})}),rZ(h))?{transformedValue:d,annotations:u?[u.type]:void 0}:{transformedValue:d,annotations:u?[u.type,h]:h}};function nf(e){return Object.prototype.toString.call(e).slice(8,-1)}function ng(e){return"Array"===nf(e)}var nm=function(){return(nm=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},ny=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o},nv=function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e},n_=function(){function e(){this.classRegistry=new rj,this.symbolRegistry=new rL(function(e){var t;return null!==(t=e.description)&&void 0!==t?t:""}),this.customTransformerRegistry=new rV,this.allowedErrorProps=[]}return e.prototype.serialize=function(e){var t,r,n=new Map,i=np(e,n,this),s={json:i.transformedValue};i.annotations&&(s.meta=nm(nm({},s.meta),{values:i.annotations}));var o=(t={},r=void 0,(n.forEach(function(e){if(!(e.length<=1)){var n=nd(e.map(function(e){return e.map(String)}).sort(function(e,t){return e.length-t.length})),i=n[0],s=n.slice(1);0===i.length?r=s.map(rX):t[rX(i)]=s.map(rX)}}),r)?rZ(t)?[r]:[r,t]:rZ(t)?void 0:t);return o&&(s.meta=nm(nm({},s.meta),{referentialEqualities:o})),s},e.prototype.deserialize=function(e){var t,r,n,i=e.json,s=e.meta,o=function e(t,r={}){if(ng(t))return t.map(t=>e(t,r));if(!function(e){if("Object"!==nf(e))return!1;let t=Object.getPrototypeOf(e);return!!t&&t.constructor===Object&&t===Object.prototype}(t))return t;let n=Object.getOwnPropertyNames(t),i=Object.getOwnPropertySymbols(t);return[...n,...i].reduce((n,i)=>{if(ng(r.props)&&!r.props.includes(i))return n;let s=t[i],o=e(s,r);return function(e,t,r,n,i){let s=({}).propertyIsEnumerable.call(n,t)?"enumerable":"nonenumerable";"enumerable"===s&&(e[t]=r),i&&"nonenumerable"===s&&Object.defineProperty(e,t,{value:r,enumerable:!1,writable:!0,configurable:!0})}(n,i,o,t,r.nonenumerable),n},{})}(i);return(null==s?void 0:s.values)&&(t=o,r=s.values,n=this,function e(t,r,n){if(void 0===n&&(n=[]),t){if(!rW(t)){rF(t,function(t,i){return e(t,r,nh(nh([],nd(n)),nd(r0(i))))});return}var i=nd(t,2),s=i[0],o=i[1];o&&rF(o,function(t,i){e(t,r,nh(nh([],nd(n)),nd(r0(i))))}),r(s,n)}}(r,function(e,r){t=nc(t,r,function(t){return no(t,e,n)})}),o=t),(null==s?void 0:s.referentialEqualities)&&(o=function(e,t){function r(t,r){var n=nu(e,r0(r));
10t.map(r0).forEach(function(t){e=nc(e,t,function(){return n})})}if(rW(t)){var n=nd(t,2),i=n[0],s=n[1];i.forEach(function(t){e=nc(e,r0(t),function(){return e})}),s&&rF(s,r)}else rF(t,r);return e}(o,s.referentialEqualities)),o},e.prototype.stringify=function(e){return JSON.stringify(this.serialize(e))},e.prototype.parse=function(e){return this.deserialize(JSON.parse(e))},e.prototype.registerClass=function(e,t){this.classRegistry.register(e,t)},e.prototype.registerSymbol=function(e,t){this.symbolRegistry.register(e,t)},e.prototype.registerCustom=function(e,t){this.customTransformerRegistry.register(nm({name:t},e))},e.prototype.allowErrorProps=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];(e=this.allowedErrorProps).push.apply(e,nv([],ny(t)))},e.defaultInstance=new e,e.serialize=e.defaultInstance.serialize.bind(e.defaultInstance),e.deserialize=e.defaultInstance.deserialize.bind(e.defaultInstance),e.stringify=e.defaultInstance.stringify.bind(e.defaultInstance),e.parse=e.defaultInstance.parse.bind(e.defaultInstance),e.registerClass=e.defaultInstance.registerClass.bind(e.defaultInstance),e.registerSymbol=e.defaultInstance.registerSymbol.bind(e.defaultInstance),e.registerCustom=e.defaultInstance.registerCustom.bind(e.defaultInstance),e.allowErrorProps=e.defaultInstance.allowErrorProps.bind(e.defaultInstance),e}();n_.serialize,n_.deserialize,n_.stringify,n_.parse,n_.registerClass,n_.registerCustom,n_.registerSymbol,n_.allowErrorProps,r(3454);let nb=()=>"",nw=function(e){let t=tr(e),r=function(e){let{config:t}=e;return r=>{let n=function(e){let t=tr(e),r=f(e=>"useContext"===e?()=>{let e=t.useContext();return(0,V.useMemo)(()=>e7(e),[e])}:t.hasOwnProperty(e)?t[e]:e5(e,t));return{...t,proxy:r}}(e),i=i=>{let[s]=(0,V.useState)(()=>{if(i.trpc)return i.trpc;let r=t({}),s=ta(r),o=n.createClient(r);return{abortOnUnmount:r.abortOnUnmount,queryClient:s,trpcClient:o,ssrState:!!e.ssr&&"mounting",ssrContext:null}}),{queryClient:o,trpcClient:a,ssrState:l,ssrContext:u}=s,c=n.useDehydratedState(a,i.pageProps?.trpcState);return V.createElement(n.Provider,{abortOnUnmount:s.abortOnUnmount??!1,client:a,queryClient:o,ssrState:l,ssrContext:u},V.createElement(G,{client:o},V.createElement(H,{state:c},V.createElement(r,Object.assign({},i)))))};(r.getInitialProps||e.ssr)&&(i.getInitialProps=async n=>{let i=n.AppTree,s=!!n.Component,o=s?n.ctx:n,a={};if(r.getInitialProps){let e=await r.getInitialProps(n),t=s?e.pageProps??{}:e;a={...t,...a}}let l=e=>s?{pageProps:e}:e;if("undefined"!=typeof window||!e.ssr)return l(a);let u=t({ctx:o}),c=D(u),d=ta(u),h={pageProps:a,trpc:{config:u,trpcClient:c,queryClient:d,ssrState:"prepass",ssrContext:o}};for(;await rA((0,V.createElement)(i,h)),d.isFetching();)await new Promise(e=>{let t=d.getQueryCache().subscribe(r=>{0===r?.query.getObserversCount()&&(e(),t())})});let p=function(e,t={}){let r=[],n=[];if(!1!==t.dehydrateMutations){let n=t.shouldDehydrateMutation||$;e.getMutationCache().getAll().forEach(e=>{n(e)&&r.push({mutationKey:e.options.mutationKey,state:e.state})})}if(!1!==t.dehydrateQueries){let r=t.shouldDehydrateQuery||Q;e.getQueryCache().getAll().forEach(e=>{r(e)&&n.push({state:e.state,queryKey:e.queryKey,queryHash:e.queryHash})})}return{mutations:r,queries:n}}(d,{shouldDehydrateQuery:()=>!0}),f={...p,queries:p.queries.map(rD),mutations:p.mutations.map(rD)};a.trpcState=c.runtime.combinedTransformer.output.serialize(f);let g=l(a),m=e.responseMeta?.({ctx:o,clientErrors:[...p.queries,...p.mutations].map(e=>e.state.error).flatMap(e=>e instanceof Error&&"TRPCClientError"===e.name?[e]:[])})||{};for(let[e,t]of Object.entries(m.headers||{}))"string"==typeof t&&o.res?.setHeader(e,t);return m.status&&o.res&&(o.res.statusCode=m.status),g});let s=r.displayName||r.name||"Component";return i.displayName=`withTRPC(${s})`,i}}(e);return f(e=>"useContext"===e?()=>{let e=t.useContext();return(0,V.useMemo)(()=>e7(e),[e])}:"useQueries"===e?t.useQueries:"withTRPC"===e?r:e5(e,t))}({config:()=>({transformer:n_,links:[function(e={}){let{enabled:t=()=>!0}=e,{logger:r=M(e.console)}=e;return()=>({op:e,next:n})=>o(i=>{var s;t({...e,direction:"up"})&&r({...e,direction:"up"});let o=Date.now();function a(n){let i=Date.now()-o;t({...e,direction:"down",result:n})&&r({...e,direction:"down",elapsedMs:i,result:n})}return n(e).pipe((s={next(e){a(e)},error(e){a(e)}},e=>({subscribe:t=>e.subscribe({next(e){s.next?.(e),t.next?.(e)},error(e){s.error?.(e),t.error?.(e)},complete(){s.complete?.(),t.complete?.()}})}))).subscribe(i)})}({enabled:e=>"down"===e.direction&&e.result instanceof Error}),I({url:"".concat(nb(),"/api/trpc")})]}),ssr:!1})},7636:function(e,t,r){"use strict";r.d(t,{F5:function(){return n},RI:function(){return s},YI:function(){return i}});let n=[{icon:"\uD83C\uDFAD",name:"Culture"},{icon:"\uD83D\uDDF3ï¸",name:"Politics"},{icon:"\uD83E\uDD16",name:"Technology"},{icon:"\uD83D\uDCBC",name:"Business"},{icon:"\uD83D\uDCB0",name:"Finance"},{icon:"\uD83C\uDFC0",name:"Sports"},{icon:"\uD83D\uDE4F",name:"Spirituality"},{icon:"\uD83C\uDF1F",name:"Self Improvement"},{icon:"âï¸",name:"Weather"}
10,{icon:"\uD83D\uDE97",name:"Transportation"},{icon:"\uD83D\uDD2C",name:"Science"},{icon:"\uD83C\uDFA8",name:"Art"},{icon:"\uD83C\uDFB5",name:"Music"},{icon:"\uD83C\uDFC3",name:"Health"},{icon:"\uD83C\uDF33",name:"Environment"},{icon:"\uD83C\uDFA8",name:"Design"},{icon:"\uD83C\uDF93",name:"Education"},{icon:"\uD83E\uDD14",name:"Philosophy"},{icon:"\uD83D\uDCDC",name:"History"},{icon:"âï¸",name:"Travel"},{icon:"\uD83C\uDF05",name:"Lifestyle"},{icon:"\uD83C\uDF0D",name:"Climate Change"},{icon:"\uD83D\uDCB9",name:"Investment"},{icon:"\uD83D\uDCDA",name:"Education"},{icon:"\uD83D\uDCB0",name:"Crypto"},{icon:"\uD83E\uDD16",name:"Artificial Intelligence"},{icon:"\uD83E\uDDBE",name:"Productivity"},{icon:"\uD83D\uDE80",name:"Startups"},{icon:"\uD83D\uDCF1",name:"Apps"},{icon:"\uD83D\uDCCA",name:"Case Study"},{icon:"\uD83D\uDCBC",name:"Merger and Acquisition"},{icon:"\uD83D\uDCC8",name:"IPO"},{icon:"\uD83C\uDF10",name:"Internet Culture"},{icon:"\uD83D\uDCBB",name:"Computers"},{icon:"\uD83D\uDD2C",name:"Science"},{icon:"\uD83C\uDFE2",name:"Enterprise"},{icon:"\uD83E\uDE90",name:"Space"},{icon:"\uD83D\uDCC4",name:"Compliance"},{icon:"\uD83D\uDC65",name:"Social Media"},{icon:"\uD83D\uDDE3",name:"Fundraising"},{icon:"â¡ï¸",name:"Energy"},{icon:"âï¸",name:"Hardware"},{icon:"\uD83D\uDCB3",name:"Economy"},{icon:"\uD83D\uDC68â\uD83D\uDCBBï¸",name:"Jobs"},{icon:"\uD83E\uDD29",name:"Entertainment"},{icon:"\uD83C\uDFAE",name:"Gaming"},{icon:"\uD83C\uDF33",name:"Nature"},{icon:"\uD83D\uDC83",name:"Fashion"},{icon:"â½",name:"Sports"}],i=[{_id:"641d38fea22a6d3d332cc336",name:"The Information",source:"https://www.theinformation.com/",img:"/images/TheInformation.png"},{_id:"641d38fea22a6d3d332cc337",name:"Fortune",source:"https://fortune.com/",img:"/images/Fortune.png"},{_id:"641d38fea22a6d3d332cc338",name:"Business Insider",source:"https://www.businessinsider.com/",img:"/images/BusinessInsider.png"},{_id:"641d38fea22a6d3d332cc339",name:"TechCrunch",source:"https://techcrunch.com/",img:"/images/Techcrunch.png"},{_id:"641d38fea22a6d3d332cc33a",name:"Fast Company",source:"https://www.fastcompany.com/",img:"/images/FastCompany.png"},{_id:"641d38fea22a6d3d332cc33f",name:"VentureBeat",source:"https://venturebeat.com/",img:"/images/VentureBeat.png"},{_id:"641d38fea22a6d3d332cc33b",name:"Axios",source:"https://www.axios.com/",img:"/images/Axios.png"},{_id:"641d38fea22a6d3d332cc33c",name:"Quartz",source:"https://qz.com/",img:"/images/Quartz.png"},{_id:"",name:"AppleInsider",source:"https://appleinsider.com/",img:"/images/AppleInsider.png"},{_id:"",name:"Gizmodo",source:"https://gizmodo.com/",img:"/images/Gizmodo.png"},{_id:"",name:"Reuters",source:"https://www.reuters.com/",img:"/images/Reuters.png"},{_id:"",name:"BBC",source:"https://www.bbc.com/",img:"/images/BBC.png"},{_id:"",name:"NPR",source:"https://www.npr.org/",img:"/images/NPR.png"},{_id:"",name:"CNBC",source:"https://www.cnbc.com/",img:"/images/CNBC.png"},{_id:"",name:"9to5Mac",source:"https://9to5mac.com/",img:"/images/9to5Mac.png"},{_id:"",name:"Digiday",source:"https://digiday.com/",img:"/images/digiday.png"},{_id:"",name:"Music Business Worldwide",source:"https://www.musicbusinessworldwide.com/",img:"/images/MBW.png"},{_id:"",name:"GamesIndustry.biz",source:"https://www.gamesindustry.biz",img:"/images/gamesindustry.png"},{_id:"",name:"Futurism",source:"https://futurism.com/",img:"/images/futurism.png"},{_id:"",name:"Financial Times",source:"https://www.ft.com/",img:"/images/ft.png"},{_id:"",name:"Crunchbase News",source:"https://news.crunchbase.com/",img:"/images/crunchbase.png"},{_id:"",name:"MIT Technology Review",source:"https://www.technologyreview.com/",img:"/images/technologyreview.png"},{_id:"",name:"The Atlantic",source:"https://www.theatlantic.com/",img:"/images/theatlantic.png"},{_id:"",name:"PR Daily",source:"https://www.prdaily.com/",img:"/images/prdaily.png"},{_id:"",name:"Decrypt",source:"https://decrypt.co/",img:"/images/decrypt.png"},{_id:"641d38fea22a6d3d332cc33e",name:"HackerNoon",source:"https://hackernoon.com/",img:"/images/Hackernoon.png"},{_id:"641d38fea22a6d3d332cc33d",name:"Bloomberg Business",source:"https://www.bloomberg.com/",img:"/images/Bloomberg.png"},{_id:"64303eafc02cf9f4568a6686",name:"Wall Street Journal",source:"https://www.wsj.com/",img:"/images/TheWallStreetJournal.png"},{_id:"64303eafc02cf9f4568a6687",name:"The Economist",source:"https://www.economist.com/",img:"/images/TheEconomist.png"},{_id:"64303eafc02cf9f4568a6688",name:"Wired",source:"https://www.wired.com/",img:"/images/Wired.png"},{_id:"64303eafc02cf9f4568a6689",name:"The Verge",source:"https://www.theverge.com/",img:"/images/TheVerge.png"},{_id:"",name:"Intelligent CIO",source:"https://www.intelligentcio.com/",img:"/images/CIO.png"},{_id:"",name:"Semafor",source:"https://www.semafor.com/",img:"/images/Semafor.png"},{_id:"",name:"SCMP",source:"https://www.scmp.com/",img:"/images/SCMP.png"},{_id:"",name:"The Standard",source:"https://www.thestandard.com.hk/",img:"/images/TheStandard.png"},{_id:"",name:"GeekWire",source:"https://www.geekwire.com/",img:"/images/GeekWire.png"},{_id:"",name:"Nieman Journalism Lab",source:"https://www.niemanlab.org/",img:"/images/NJL.png"},{_id:"",name:"Andreessen Horowitz",source:"https://a16z.com/",img:"/images/a16z.png"},{_id:"",name:"Inc42",source:"https://inc42.com/",img:"/images/Inc42.png"},{_id:"",name:"ScienceDaily",source:"https://www.sciencedaily.com/",img:"/images/ScienceDaily.png"},{_id:"",name:"Skift",source:"https://skift.com/",img:"/images/Skift.png"},{_id:"",name:"Federal News Network",source:"https://federalnewsnetwork.com/",img:"/images/FederalNewsNetwork.png"},{_id:"",name:"Barron's",source:"https://www.barrons.com/",img:"/images/Barrons.png"},{_id:"",name:"Medical Xpress",source:"medicalxpress.com/",img:"/images/MedicalXpress.png"},{_id:"",name:"Live Science",source:"livescience.com/",img:"/images/LiveScience.png"},{_id:"",name:"Futurity News",source:"futurity.org/",img:"/images/FuturityNews.png"},{_id:"",name:"The Conversation",source:"theconversation.com/",img:"/images/TheConversation.png"},{_id:"",name:"Phys.org",source:"phys.org/",img:"/images/Phys.png"},{_id:"",name:"nature",source:"www.nature.com/",img:"/images/nature.png"},{_id:"",name:"News Medical",source:"news-medical.net/",img:"/images/NewsMedical.png"},{_id:"",name:"Medscape",source:"medscape.com/",img:"/images/Medscape.png"},{_id:"",name:"STAT",source:"statnews.com/",img:"/images/STAT.png"},{_id:"",name:"MedPage Today",source:"medpagetoday.com/",img:"/images/MedPageToday.png"},{_id:"",name:"The Motely Fool",source:"www.fool.com/",img:"/images/TheMotelyFool.png"},{_id:"",name:"The Next Platform",source:"nextplatform.com/",img:"/images/TheNextPlatform.png"},{_id:"",name:"The Real Deal",source:"therealdeal.com/",img:"/images/TheRealDeal.png"}
10,{_id:"",name:"Big Think",source:"bigthink.com/",img:"/images/BigThink.png"},{_id:"",name:"The Independent",source:"independent.co.uk/",img:"/images/TheIndependent.png"},{_id:"",name:"Forbes",source:"forbes.com/",img:"/images/Forbes.png"},{_id:"",name:"Healthline",source:"healthline.com/",img:"/images/Healthline.png"},{_id:"",name:"CNET",source:"cnet.com/",img:"/images/CNET.png"},{_id:"",name:"TechRadar",source:"techradar.com/",img:"/images/TechRadar.png"},{_id:"",name:"Tomâs Guide",source:"tomsguide.com/",img:"/images/TomsGuide.png"},{_id:"",name:"PC Magazine",source:"pcmag.com/",img:"/images/PCMagazine.png"},{_id:"",name:"The New York Times",source:"nytimes.com/",img:"/images/TheNewYorkTimes.png"},{_id:"",name:"MoneyControl",source:"moneycontrol.com/",img:"/images/MoneyControl.png"},{_id:"",name:"Mint",source:"livemint.com/",img:"/images/Mint.png"},{_id:"",name:"The Economic Times",source:"economictimes.indiatimes.com",img:"/images/TheEconomicTimes.png"},{_id:"",name:"Youtube",source:"youtube",img:"/images/youtube.png"}],s=[{label:"English",value:"en"},{label:"Espa\xf1ol",value:"es"},{label:"Fran\xe7ais",value:"fr"},{label:"Deutsch",value:"de"},{label:"Italiano",value:"it"},{label:"æ¥æ¬èª",value:"ja"},{label:"íêµì´",value:"ko"},{label:"Ø§ÙØ¹Ø±Ø¨ÙØ©",value:"ar"},{label:"हिनà¥à¤¦à¥",value:"hi"},{label:"Ð ÑÑÑкий",value:"ru"},{label:"Portugu\xeas",value:"pt"},{label:"Nederlands",value:"nl"},{label:"Svenska",value:"sv"},{label:"Polski",value:"pl"},{label:"T\xfcrk\xe7e",value:"tr"},{label:"ÙØ§Ø±Ø³Û",value:"fa"},{label:"ç¹é«ä¸æ",value:"zh-Hant"},{label:"ç®ä½ä¸æ",value:"zh-Hans"},{label:"Bahasa Indonesia",value:"id"},{label:"ç¹é«ä¸æ",value:"zh-hk"},{label:"ç¹é«ä¸æ",value:"zh-tw"},{label:"ç®ä½ä¸æ",value:"zh"},{label:"æ¥æ¬èª",value:"jp"},{label:"Portugu\xeas (Brasil)",value:"pt-br"}];t.ZP={NODE_ENV:{production:"production",staging:"staging",development:"development",local:"local"},PINECODE_FILTER:{date:3,score:.82,scoreP2:.85,topKP2:10,topK:50,chatScore:.82},USAGE_LIMIT:{chat:3,read:8}}},7339:function(e,t,r){"use strict";r.d(t,{v:function(){return l},$:function(){return a}});var n=r(5893),i=r(7294);let s=(0,i.createContext)(()=>{}),o=(0,i.createContext)("en");function a(e){let{to:t,from:r,cacheProvider:a,children:l}=e,u=(0,i.useCallback)(async(e,n)=>{if("en"===t||"en-US"===t||"en-GB"===t){n(e);return}try{let i=await fetch("/api/translate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:e,to:t,from:r})});if(!i.ok){console.error("Translation failed:",await i.text());return}let s=await i.json(),o=s&&"string"==typeof s.text&&s.text.trim()||"";o&&n(o)}catch(e){console.error("Translation error:",e)}},[t,r]);return(0,n.jsx)(s.Provider,{value:u,children:(0,n.jsx)(o.Provider,{value:t,children:l})})}function l(e){let{children:t}=e,r=(0,i.useContext)(o),n=(0,i.useContext)(s),[a,l]=(0,i.useState)(t);return i.useEffect(()=>{n(t,l)},[t,r]),a}},5929:function(){},7952:function(){},7663:function(e){!function(){var t={229:function(e){var t,r,n,i=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var l=[],u=!1,c=-1;function d(){u&&n&&(u=!1,n.length?l=n.concat(l):c=-1,l.length&&h())}function h(){if(!u){var e=a(d);u=!0;for(var t=l.length;t;){for(n=l,l=[];++c<t;)n&&n[c].run();c=-1,t=l.length}n=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function f(){}i.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new p(e,t)),1!==l.length||u||a(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=f,i.addListener=f,i.once=f,i.off=f,i.removeListener=f,i.removeAllListeners=f,i.emit=f,i.prependListener=f,i.prependOnceListener=f,i.listeners=function(e){return[]},i.binding=function(e){throw Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw Error("process.chdir is not supported")},i.umask=function(){return 0}}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var s=r[e]={exports:{}},o=!0;try{t[e](s,s.exports,n),o=!1}finally{o&&delete r[e]}return s.exports}n.ab="//";var i=n(229);e.exports=i}()},1163:function(e,t,r){e.exports=r(6885)},4298:function(e,t,r){e.exports=r(5442)},3250:function(e,t,r){"use strict";/** 11 * @license React 12 * use-sync-external-store-shim.production.min.js 13 * 14 * Copyright (c) Facebook, Inc. and its affiliates. 15 * 16 * This source code is licensed under the MIT license found in the 17 * LICENSE file in the root directory of this source tree. 18 */var n=r(7294),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=n.useState,o=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=s({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return a(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),o(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},139:function(e,t,r){"use strict";/** 19 * @license React 20 * use-sync-external-store-shim/with-selector.production.min.js 21 * 22 * Copyright (c) Facebook, Inc. and its affiliates. 23 * 24 * This source code is licensed under the MIT license found in the 25 * LICENSE file in the root directory of this source tree. 26 */var n=r(7294),i=r(1688),s="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,a=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=u(function(){function e(e){if(!l){if(l=!0,o=e,e=n(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return a=t}return a=e}if(t=a,s(o,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(o=e,a=r)}var o,a,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]);var p=o(e,d[0],d[1]);return l(function(){h.hasValue=!0,h.value=p},[p]),c(p),p}},1688:function(e,t,r){"use strict";e.exports=r(3250)},2798:function(e,t,r){"use strict";e.exports=r(139)},3897:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},e.exports.__esModule=!0,e.exports.default=e.exports},5372:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},6115:function(e){e.exports=function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports},7156:function(e){function t(e,t,r,n,i,s,o){try{var a=e[s](o),l=a.value}catch(e){r(e);return}a.done?t(l):Promise.resolve(l).then(n,i)}
26e.exports=function(e){return function(){var r=this,n=arguments;return new Promise(function(i,s){var o=e.apply(r,n);function a(e){t(o,i,s,a,l,"next",e)}function l(e){t(o,i,s,a,l,"throw",e)}a(void 0)})}},e.exports.__esModule=!0,e.exports.default=e.exports},6690:function(e){e.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},3515:function(e,t,r){var n=r(6015),i=r(9617);function s(t,r,o){return i()?(e.exports=s=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=s=function(e,t,r){var i=[null];i.push.apply(i,t);var s=new(Function.bind.apply(e,i));return r&&n(s,r.prototype),s},e.exports.__esModule=!0,e.exports.default=e.exports),s.apply(null,arguments)}e.exports=s,e.exports.__esModule=!0,e.exports.default=e.exports},9728:function(e,t,r){var n=r(4062);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}e.exports=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports},8416:function(e,t,r){var n=r(4062);e.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports},3808:function(e){function t(r){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},1655:function(e,t,r){var n=r(6015);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw 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&&n(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports},4836:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},6035:function(e){e.exports=function(e){return -1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},9617:function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct||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}},e.exports.__esModule=!0,e.exports.default=e.exports},8872:function(e){e.exports=function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,s,o,a=[],l=!0,u=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return a}},e.exports.__esModule=!0,e.exports.default=e.exports},2218:function(e){e.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},4993:function(e,t,r){var n=r(8698).default,i=r(6115);e.exports=function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports.default=e.exports},7061:function(e,t,r){var n=r(8698).default;function i(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},r=Object.prototype,s=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},l=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function d(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{d({},"")}catch(e){d=function(e,t,r){return e[t]=r}}function h(e,t,r,n){var i,s,a=Object.create((t&&t.prototype instanceof g?t:g).prototype);return o(a,"_invoke",{value:(i=new k(n||[]),s="suspendedStart",function(t,n){if("executing"===s)throw Error("Generator is already running");if("completed"===s){if("throw"===t)throw n;return I()}for(i.method=t,i.arg=n;;){var o=i.delegate;if(o){var a=function e(t,r){var n=r.method,i=t.iterator[n];if(void 0===i)return r.delegate=null,"throw"===n&&t.iterator.return&&
vendor: 4,215 bytes, line 26
26(r.method="return",r.arg=void 0,e(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=TypeError("The iterator does not provide a '"+n+"' method")),f;var s=p(i,t.iterator,r.arg);if("throw"===s.type)return r.method="throw",r.arg=s.arg,r.delegate=null,f;var o=s.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=TypeError("iterator result is not an object"),r.delegate=null,f)}(o,i);if(a){if(a===f)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===s)throw s="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);s="executing";var l=p(e,r,i);if("normal"===l.type){if(s=i.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(s="completed",i.method="throw",i.arg=l.arg)}})}),a}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=h;var f={};function g(){}function m(){}function y(){}var v={};d(v,l,function(){return this});var _=Object.getPrototypeOf,b=_&&_(_(O([])));b&&b!==r&&s.call(b,l)&&(v=b);var w=y.prototype=g.prototype=Object.create(v);function S(e){["next","throw","return"].forEach(function(t){d(e,t,function(e){return this._invoke(t,e)})})}function C(e,t){var r;o(this,"_invoke",{value:function(i,o){function a(){return new t(function(r,a){!function r(i,o,a,l){var u=p(e[i],e,o);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==n(d)&&s.call(d,"__await")?t.resolve(d.__await).then(function(e){r("next",e,a,l)},function(e){r("throw",e,a,l)}):t.resolve(d).then(function(e){c.value=e,a(c)},function(e){return r("throw",e,a,l)})}l(u.arg)}(i,o,r,a)})}return r=r?r.then(a,a):a()}})}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function x(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,n=function t(){for(;++r<e.length;)if(s.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return n.next=n}}return{next:I}}function I(){return{value:void 0,done:!0}}return m.prototype=y,o(w,"constructor",{value:y,configurable:!0}),o(y,"constructor",{value:m,configurable:!0}),m.displayName=d(y,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,d(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},S(C.prototype),d(C.prototype,u,function(){return this}),t.AsyncIterator=C,t.async=function(e,r,n,i,s){void 0===s&&(s=Promise);var o=new C(h(e,r,n,i),s);return t.isGeneratorFunction(r)?o:o.next().then(function(e){return e.done?e.value:o.next()})},S(w),d(w,c,"Generator"),d(w,l,function(){return this}),d(w,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=O,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!e)for(var t in this)"t"===t.charAt(0)&&s.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(r,n){return o.type="throw",o.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],o=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var a=s.call(i,"catchLoc"),l=s.call(i,"finallyLoc");
26if(a&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(a){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var i=n.arg;x(r)}return i}}throw Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:O(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},6015:function(e){function t(r,n){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},7424:function(e,t,r){var n=r(5372),i=r(8872),s=r(6116),o=r(2218);e.exports=function(e,t){return n(e)||i(e,t)||s(e,t)||o()},e.exports.__esModule=!0,e.exports.default=e.exports},7946:function(e,t,r){var n=r(8698).default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},4062:function(e,t,r){var n=r(8698).default,i=r(7946);e.exports=function(e){var t=i(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports},8698:function(e){function t(r){return e.exports=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.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},6116:function(e,t,r){var n=r(3897);e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}},e.exports.__esModule=!0,e.exports.default=e.exports},3496:function(e,t,r){var n=r(3808),i=r(6015),s=r(6035),o=r(3515);function a(t){var r="function"==typeof Map?new Map:void 0;return e.exports=a=function(e){if(null===e||!s(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return o(e,arguments,n(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),i(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,a(t)}e.exports=a,e.exports.__esModule=!0,e.exports.default=e.exports},4687:function(e,t,r){var n=r(7061)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},5761:function(e,t,r){"use strict";let n,i,s,o,a,l,u,c,d,h,p,f,g,m,y,v,_,b,w,S,C,E;var x,k,O,I,R,T,M,A,D,P,L=r(8764).lW,N=r(3454);Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});var j=Object.defineProperty,U=(e,t,r)=>t in e?j(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,F=(e,t,r)=>U(e,"symbol"!=typeof t?t+"":t,r),B=Object.defineProperty,z=(e,t,r)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,V=(e,t,r)=>z(e,"symbol"!=typeof t?t+"":t,r),q=((x=q||{})[x.Document=0]="Document",x[x.DocumentType=1]="DocumentType",x[x.Element=2]="Element",x[x.Text=3]="Text",x[x.CDATA=4]="CDATA",x[x.Comment=5]="Comment",x);
26let K={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Z={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},W={};function G(e){if(W[e])return W[e];let t=globalThis[e],r=t.prototype,n=e in K?K[e]:void 0,i=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),s=e in Z?Z[e]:void 0,o=!!(s&&s.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&o)return W[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let i=n.contentWindow;if(!i)return t.prototype;let s=i[e].prototype;if(document.body.removeChild(n),!s)return r;return W[e]=s}catch{return r}}let $={};function Q(e,t,r){var n;let i=`${e}.${String(r)}`;if($[i])return $[i].call(t);let s=G(e),o=null==(n=Object.getOwnPropertyDescriptor(s,r))?void 0:n.get;return o?($[i]=o,o.call(t)):t[r]}let H={};function Y(e,t,r){let n=`${e}.${String(r)}`;if(H[n])return H[n].bind(t);let i=G(e),s=i[r];return"function"!=typeof s?t[r]:(H[n]=s,s.bind(t))}let J={childNodes:function(e){return Q("Node",e,"childNodes")},parentNode:function(e){return Q("Node",e,"parentNode")},parentElement:function(e){return Q("Node",e,"parentElement")},textContent:function(e){return Q("Node",e,"textContent")},contains:function(e,t){return Y("Node",e,"contains")(t)},getRootNode:function(e){return Y("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Q("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Q("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Q("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Q("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return G("MutationObserver").constructor}};function X(e){return e.nodeType===e.ELEMENT_NODE}function ee(e){let t=e&&"host"in e&&"mode"in e&&J.host(e)||null;return!!(t&&"shadowRoot"in t&&J.shadowRoot(t)===e)}function et(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function er(e){try{var t;let r=e.rules||e.cssRules;if(!r)return null;let n=Array.from(r,t=>en(t,e.href)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}}function en(e,t){if("styleSheet"in e){let t;try{t=er(e.styleSheet)||function(e){let{cssText:t}=e;if(t.split('"').length<3)return t;let r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?ef(t,e.styleSheet.href):t}{let r=e.cssText;return("selectorText"in e&&e.selectorText.includes(":")&&(r=r.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")),t)?ef(r,t):r}}class ei{constructor(){V(this,"idNodeMap",new Map),V(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return -1;let r=null==(t=this.getMeta(e))?void 0:t.id;return r??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){let r=this.getNode(e);if(r){let e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function es({element:e,maskInputOptions:t,tagName:r,type:n,value:i,maskInputFn:s}){let o=i||"",a=n&&eo(n);return(t[r.toLowerCase()]||a&&t[a])&&(o=s?s(o,e):"*".repeat(o.length)),o}function eo(e){return e.toLowerCase()}let ea="__rrweb_original__";function el(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?eo(t):null}function eu(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}let n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==n?void 0:n[1])??null}let ec=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ed=/^(?:[a-z+]+:)?\/\//i,eh=/^www\..*/i,ep=/^(data:)([^,]*),(.*)/i;function ef(e,t){return(e||"").replace(ec,(e,r,n,i,s,o)=>{let a=n||s||o,l=r||i||"";if(!a)return e;if(ed.test(a)||eh.test(a)||ep.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${(t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0]).split("?")[0]+a}${l})`;let u=t.split("/"),c=a.split("/");for(let e of(u.pop(),c))"."!==e&&(".."===e?u.pop():u.push(e));return`url(${l}${u.join("/")}${l})`})}let eg=1,em=RegExp("[^a-z0-9-_:]");function ey(){return eg++}let ev=/^[^ \t\n\r\u000c]+/,e_=/^[, \t\n\r\u000c]+/,eb=new WeakMap;function ew(e,t){return t&&""!==t.trim()?eS(e,t):t}function eS(e,t){let r=eb.get(e);if(r||(r=e.createElement("a"),eb.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function eC(e,t,r,n){return n?"src"!==r&&("href"!==r||"use"===t&&"#"===n[0])&&("xlink:href"!==r||"#"===n[0])&&("background"!==r||"table"!==t&&"td"!==t&&"th"!==t)?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n;let i=e.exec(t.substring(r));return i?(n=i[0],r+=n.length,n):""}let i=[];for(;n(e_),!(r>=t.length);){let s=n(ev);if(","===s.slice(-1))s=ew(e,s.substring(0,s.length-1)),i.push(s);else{let n="";s=ew(e,s);let o=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((s+n).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,i.push((s+n).trim());break}"("===e&&(o=!0)}n+=e,r+=1}}}return i.join(", ")}
26(e,n):"style"===r?ef(n,eS(e)):"object"===t&&"data"===r?ew(e,n):n:ew(e,n):n}function eE(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function ex(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&ex(J.parentNode(e),t,r);for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}return!!r&&ex(J.parentNode(e),t,r)}function ek(e,t,r,n){let i;if(X(e)){if(i=e,!J.childNodes(i).length)return!1}else{if(null===J.parentElement(e))return!1;i=J.parentElement(e)}try{if("string"==typeof t){if(n){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(ex(i,t,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(e){}return!1}function eO(e){return null==e?"":e.toLowerCase()}function eI(e,t){let r;let{doc:s,mirror:o,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:c,skipChild:d=!1,inlineStylesheet:h=!0,maskInputOptions:p={},maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y={},inlineImages:v=!1,recordCanvas:_=!1,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:E=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:k=!1}=t,{needsMask:O}=t,{preserveWhiteSpace:I=!0}=t;if(!O){let t=void 0===O;O=ek(e,u,c,t)}let R=function(e,t){let{doc:r,mirror:s,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:u,maskInputOptions:c={},maskTextFn:d,maskInputFn:h,dataURLOptions:p={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:y=!1}=t,v=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(r,s);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:q.Document,childNodes:[],compatMode:e.compatMode};return{type:q.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:q.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return function(e,t){let r;let{doc:s,blockClass:o,blockSelector:a,inlineStylesheet:l,maskInputOptions:u={},maskInputFn:c,dataURLOptions:d={},inlineImages:h,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:g=!1,rootId:m}=t,y=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){let n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a),v=function(e){if(e instanceof HTMLFormElement)return"form";let t=eo(e.tagName);return em.test(t)?"div":t}(e),_={},b=e.attributes.length;for(let t=0;t<b;t++){let r=e.attributes[t];eE(v,r.name,r.value)||(_[r.name]=eC(s,v,eo(r.name),r.value))}if("link"===v&&l){let t=Array.from(s.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=er(t)),r&&(delete _.rel,delete _.href,_._cssText=r)}if("style"===v&&e.sheet&&!(e.innerText||J.textContent(e)||"").trim().length){let t=er(e.sheet);t&&(_._cssText=t)}if("input"===v||"textarea"===v||"select"===v){let t=e.value,r=e.checked;"radio"!==_.type&&"checkbox"!==_.type&&"submit"!==_.type&&"button"!==_.type&&t?_.value=es({element:e,type:el(e),tagName:v,value:t,maskInputOptions:u,maskInputFn:c}):r&&(_.checked=r)}if("option"===v&&(e.selected&&!u.select?_.selected=!0:delete _.selected),"dialog"===v&&e.open&&(_.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===v&&p){if("2d"===e.__context)!function(e){let t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){let i=t.getImageData,s=ea in i?i[ea]:i,o=new Uint32Array(s.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer);if(o.some(e=>0!==e))return!1}return!0}(e)&&(_.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){let t=e.toDataURL(d.type,d.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height;let n=r.toDataURL(d.type,d.quality);t!==n&&(_.rr_dataURL=t)}}if("img"===v&&h){n||(i=(n=s.createElement("canvas")).getContext("2d"));let t=e.currentSrc||e.getAttribute("src")||"<unknown-src>",r=e.crossOrigin,o=()=>{e.removeEventListener("load",o);try{n.width=e.naturalWidth,n.height=e.naturalHeight,i.drawImage(e,0,0),_.rr_dataURL=n.toDataURL(d.type,d.quality)}catch(r){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWi
26dth?o():e.addEventListener("load",o);return}console.warn(`Cannot inline img src=${t}! Error: ${r}`)}"anonymous"===e.crossOrigin&&(r?_.crossOrigin=r:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if("audio"===v||"video"===v){let t=_;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}if(!g&&(e.scrollLeft&&(_.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(_.rr_scrollTop=e.scrollTop)),y){let{width:t,height:r}=e.getBoundingClientRect();_={class:_.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==v||f(_.src)||(e.contentDocument||(_.rr_src=_.src),delete _.src);try{customElements.get(v)&&(r=!0)}catch(e){}return{type:q.Element,tagName:v,attributes:_,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:y,rootId:m,isCustom:r}}(e,{doc:r,blockClass:o,blockSelector:a,inlineStylesheet:u,maskInputOptions:c,maskInputFn:h,dataURLOptions:p,inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:y,rootId:v});case e.TEXT_NODE:return function(e,t){var r;let{needsMask:n,maskTextFn:i,rootId:s}=t,o=J.parentNode(e),a=o&&o.tagName,l=J.textContent(e),u="STYLE"===a||void 0,c="SCRIPT"===a||void 0;if(u&&l){try{e.nextSibling||e.previousSibling||(null==(r=o.sheet)?void 0:r.cssRules)&&(l=er(o.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}l=ef(l,eS(t.doc))}return c&&(l="SCRIPT_PLACEHOLDER"),!u&&!c&&l&&n&&(l=i?i(l,J.parentElement(e)):l.replace(/[\S]/g,"*")),{type:q.Text,textContent:l||"",isStyle:u,rootId:s}}(e,{doc:r,needsMask:l,maskTextFn:d,rootId:v});case e.CDATA_SECTION_NODE:return{type:q.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:q.Comment,textContent:J.textContent(e)||"",rootId:v};default:return!1}}(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,needsMask:O,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:g,dataURLOptions:y,inlineImages:v,recordCanvas:_,keepIframeSrcFn:x,newlyAddedElement:k});if(!R)return console.warn(e,"not serialized"),null;r=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===q.Comment)return!0;if(e.type===q.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===eu(e.attributes.href))||t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(eO(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===eO(e.attributes.name)||"icon"===eO(e.attributes.rel)||"apple-touch-icon"===eO(e.attributes.rel)||"shortcut icon"===eO(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&eO(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(eO(e.attributes.property).match(/^(og|twitter|fb):/)||eO(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===eO(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===eO(e.attributes.name)||"googlebot"===eO(e.attributes.name)||"bingbot"===eO(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===eO(e.attributes.name)||"generator"===eO(e.attributes.name)||"framework"===eO(e.attributes.name)||"publisher"===eO(e.attributes.name)||"progid"===eO(e.attributes.name)||eO(e.attributes.property).match(/^article:/)||eO(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===eO(e.attributes.name)||"yandex-verification"===eO(e.attributes.name)||"csrf-token"===eO(e.attributes.name)||"p:domain_verify"===eO(e.attributes.name)||"verify-v1"===eO(e.attributes.name)||"verification"===eO(e.attributes.name)||"shopify-checkout-api-token"===eO(e.attributes.name)))return!0}}return!1}(R,m)&&(I||R.type!==q.Text||R.isStyle||R.textContent.replace(/^\s+|\s+$/gm,"").length)?ey():-2;let T=Object.assign(R,{id:r});if(o.add(e,T),-2===r)return null;b&&b(e);let M=!d;if(T.type===q.Element){M=M&&!T.needBlock,delete T.needBlock;let t=J.shadowRoot(e);t&&et(t)&&(T.isShadowHost=!0)}if((T.type===q.Document||T.type===q.Element)&&M){m.headWhitespace&&T.type===q.Element&&"head"===T.tagName&&(I=!1);let t={doc:s,mirror:o,blockClass:a,blockSelector:l,needsMask:O,maskTextClass:u,maskTextSelector:c,skipChild:d,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:v,recordCanvas:_,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:x};if(T.type===q.Element&&"textarea"===T.tagName&&void 0!==T.attributes.value);else for(let r of Array.from(J.childNodes(e))){let e=eI(r,t);e&&T.childNodes.push(e)}let r=null;if(X(e)&&(r=J.shadowRoot(e)))for(let e of Array.from(J.childNodes(r))){let n=eI(e,t);n&&(et(r)&&(n.isShadow=!0),T.childNodes.push(n))}}let A=J.parentNode(e);return A&&ee(A)&&et(A)&&(T.isShadow=!0),T.type===q.Element&&"iframe"===T.tagName&&function(e,t,r){let n;let i=e.contentWindow;if(!i)return;let s=!1;try{n=i.document.readyState}catch(e){return}if("complete"!==n){let n=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),s=!0,t()});return}let o="about:blank";if(i.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{let t=e.contentDocument;if(t&&w){let r=eI(t,{doc:t,mirror:o,blockClass:a,blockSelector:l,needsMask:O,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:v,recordCanvas:_,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:x});r&&w(e,r)}},S),T.type===q.Element&&"link"===T.tagName&&"string"==typeof T.attributes.rel&&("stylesheet"===T.attributes.rel||"preload"===T.attributes.rel&&"string"==typeof T.attributes.href&&"css"===eu(T.attributes.href))&&function(e,t,r){let n,i=!1;try{n=e.sheet}catch(e){return}if(n)return;let s=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),i=!0,t()})}(e,()=>{if(C){let t=eI(e,{doc:s,mirror:o,blockClass:a,blockSelector:l,needsMask:O,maskTextClass:u,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:p,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:v,recordCanvas:_,preserveWhiteSpace:I,onSerialize:b,onIframeLoad:w,iframeLoadTimeout:S,onStylesheetLoad:C,stylesheetLoadTimeout:E,keepIframeSrcFn:x});t&&C(e,t)}},E),T}var eR={exports:{}},eT=String,eM=function(){return{isColorSupported:!1,reset:eT,bold:eT,dim:eT,italic:eT,underline:eT,inverse:eT,hidden:eT,strikethrough:eT,black:eT,red:eT,green:eT,yellow:eT,blue:eT,magenta:eT,cyan:eT,white:eT,gray:eT,bgBlack:eT,bgRed:eT,bgGreen:eT,bgYellow:eT,bgBlue:eT,bgMagenta:eT,bgCyan:eT,bgWhite:eT}};eR.exports=eM(),eR.exports.createColors=eM;var eA=eR.exports;let eD=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),eP=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};
26return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(eD),eL=class e extends Error{constructor(t,r,n,i,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){let t,r;if(!this.source)return"";let n=this.source;null==e&&(e=eA.isColorSupported),eP&&e&&(n=eP(n));let i=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),a=String(o).length;if(e){let{bold:e,gray:n,red:i}=eA.createColors(!0);t=t=>e(i(t)),r=e=>n(e)}else t=r=e=>e;return i.slice(s,o).map((e,n)=>{let i=s+1+n,o=" "+(" "+i).slice(-a)+" | ";if(i===this.line){let n=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(o)+e+"\n "+n+t("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};eL.default=eL;var eN={};eN.isClean=Symbol("isClean"),eN.my=Symbol("my");let ej={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},eU=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&void 0!==(n=e.raws[t]))return n;let i=e.parent;if("before"===r&&(!i||"root"===i.type&&i.first===e||i&&"document"===i.type))return"";if(!i)return ej[r];let s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{var o;let i="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[i]?n=this[i](s,e):s.walk(e=>{if(void 0!==(n=e.raws[t]))return!1})}return void 0===n&&(n=ej[r]),s.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function eF(e,t){new eU(t).stringify(e)}eU.default=eU,eF.default=eF;let{isClean:eB,my:ez}=eN,eV=class{constructor(e={}){for(let t in this.raws={},this[eB]=!1,this[ez]=!0,e)if("nodes"===t)for(let r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let s=t[i],o=typeof s;"parent"===i&&"object"===o?r&&(n[i]=r):"source"===i?n[i]=s:Array.isArray(s)?n[i]=s.map(t=>e(t,n)):("object"===o&&null!==s&&(s=e(s)),n[i]=s)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
26error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new eL(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[eB]){this[eB]=!1;let e=this;for(;e=e.parent;)e[eB]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);-1!==i&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new eU().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let s=t.get(n.input);null==s&&(s=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:s,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=eF){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}};eV.default=eV;let eq=eV,eK=class extends eq{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};eK.default=eK;let{SourceMapConsumer:eZ,SourceMapGenerator:eW}=eP,{existsSync:eG,readFileSync:e$}=eP,{dirname:eQ,join:eH}=eP,eY=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=eQ(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new eZ(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),L?L.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
26if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=eQ(e),eG(e))return this.mapFile=e,e$(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"==typeof t){let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r.toString());return e}}else if(t instanceof eZ)return eW.fromSourceMap(t).toString();else if(t instanceof eW)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=eH(eQ(e),t)),this.loadFile(t)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};eY.default=eY;let{SourceMapConsumer:eJ,SourceMapGenerator:eX}=eP,{fileURLToPath:e0,pathToFileURL:e1}=eP,{isAbsolute:e2,resolve:e3}=eP,{nanoid:e6}={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}
26,e8=Symbol("fromOffsetCache"),e5=!!(eJ&&eX),e4=!!(e3&&e2),e9=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!e4||/^\w+:\/\//.test(t.from)||e2(t.from)?this.file=t.from:this.file=e3(t.from)),e4&&e5){let e=new eY(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+e6(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,s,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,o=e.col}else s=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,s,o);return(i=a?new eL(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new eL(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:o,line:s},this.css,this.file,n.plugin)).input={column:r,endColumn:o,endLine:s,line:t,source:this.css},this.file&&(e1&&(i.input.url=e1(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[e8])r=this[e8];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[e8]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(e<r[t=n+(i-n>>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:e3(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){let i,s;if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(i=o.originalPositionFor({column:n,line:r})),s=e2(a.source)?e1(a.source):new URL(a.source,this.map.consumer().sourceRoot||e1(this.map.mapFile));let l={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(e0)l.file=e0(s);else throw Error("file: protocol is not available in this PostCSS build")}let u=o.sourceContentFor(a.source);return u&&(l.source=u),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};e9.default=e9,eP&&eP.registerInput&&eP.registerInput(e9);let{SourceMapConsumer:e7,SourceMapGenerator:te}=eP,{dirname:tt,relative:tr,resolve:tn,sep:ti}=eP,{pathToFileURL:ts}=eP,to=!!(e7&&te),ta=!!(tt&&tn&&tr&&ti),tl=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||tt(e.file);!1===this.mapOpts.sourcesContent?(t=new e7(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}}generate(){if(this.clearAnnotation(),ta&&to&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=te.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new te({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,t;this.css="",this.map=new te({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,n=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(s.generated.line=r,s.generated.column=n-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?tt(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=tt(tn(r,this.mapOpts.annotation)));let n=tr(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new e9(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return L?L.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(ts){let t=ts(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===ti&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},tu=eV,tc=class extends tu{constructor(e){super(e),this.type="comment"}};tc.default=tc;let{isClean:td,my:th}=eN,tp=eV,tf=class e extends tp{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
26e.root().toProxy();if("nodes"===t)return e.nodes.map(e=>e.toProxy());if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",s=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),s))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+s.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(s(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new eK(t)]}else if(t.selector)t=[new o(t)];else if(t.name)t=[new a(t)];else if(t.text)t=[new tc(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[th]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[td]&&function e(t){if(t[td]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};tf.registerParse=e=>{s=e},tf.registerRule=e=>{o=e},tf.registerAtRule=e=>{a=e},tf.registerRoot=e=>{l=e},tf.default=tf,tf.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,a.prototype):"rule"===e.type?Object.setPrototypeOf(e,o.prototype):"decl"===e.type?Object.setPrototypeOf(e,eK.prototype):"comment"===e.type?Object.setPrototypeOf(e,tc.prototype):"root"===e.type&&Object.setPrototypeOf(e,l.prototype),e[th]=!0,e.nodes&&e.nodes.forEac
26h(e=>{tf.rebuild(e)})};let tg=tf,tm=class extends tg{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new u(new c,this,e).stringify()}};tm.registerLazyResult=e=>{u=e},tm.registerProcessor=e=>{c=e},tm.default=tm;let ty=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};ty.default=ty;let tv=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new ty(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};tv.default=tv;let t_=/[\t\n\f\r "#'()/;[\\\]{}]/g,tb=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tw=/.[\r\n"'(/\\]/,tS=/[\da-f]/i,tC=tf,tE=class extends tC{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};tE.default=tE,tC.registerAtRule(tE);let tx=tf,tk=class extends tx{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new d(new h,this,e).stringify()}};tk.registerLazyResult=e=>{d=e},tk.registerProcessor=e=>{h=e},tk.default=tk,tx.registerRoot(tk);let tO={comma:e=>tO.split(e,[","],!0),space:e=>tO.split(e,[" ","\n"," "]),split(e,t,r){let n=[],i="",s=!1,o=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(s=!0),s?(""!==i&&n.push(i.trim()),i="",s=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};tO.default=tO;let tI=tf,tR=class extends tI{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return tO.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};tR.default=tR,tI.registerRule(tR);let tT=function(e,t={}){let r,n,i,s,o,a,l,u,c,d,h=e.css.valueOf(),p=t.ignoreErrors,f=h.length,g=0,m=[],y=[];function v(t){throw e.error("Unclosed "+t,g)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&g>=f},nextToken:function(e){if(y.length)return y.pop();if(g>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(g)){case 10:case 32:case 9:case 13:case 12:n=g;do n+=1,r=h.charCodeAt(n);while(32===r||10===r||9===r||13===r||12===r);d=["space",h.slice(g,n)],g=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);d=[e,e,g];break}case 40:if(u=m.length?m.pop()[1]:"",c=h.charCodeAt(g+1),"url"===u&&39!==c&&34!==c&&32!==c&&10!==c&&9!==c&&12!==c&&13!==c){n=g;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(p||t){n=g;break}v("bracket")}for(l=n;
2692===h.charCodeAt(l-1);)l-=1,a=!a}while(a);d=["brackets",h.slice(g,n+1),g,n],g=n}else n=h.indexOf(")",g+1),s=h.slice(g,n+1),-1===n||tw.test(s)?d=["(","(",g]:(d=["brackets",s,g,n],g=n);break;case 39:case 34:i=39===r?"'":'"',n=g;do{if(a=!1,-1===(n=h.indexOf(i,n+1))){if(p||t){n=g+1;break}v("string")}for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a);d=["string",h.slice(g,n+1),g,n],g=n;break;case 64:t_.lastIndex=g+1,t_.test(h),n=0===t_.lastIndex?h.length-1:t_.lastIndex-2,d=["at-word",h.slice(g,n+1),g,n],g=n;break;case 92:for(n=g,o=!0;92===h.charCodeAt(n+1);)n+=1,o=!o;if(r=h.charCodeAt(n+1),o&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,tS.test(h.charAt(n)))){for(;tS.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}d=["word",h.slice(g,n+1),g,n],g=n;break;default:47===r&&42===h.charCodeAt(g+1)?(0===(n=h.indexOf("*/",g+2)+1)&&(p||t?n=h.length:v("comment")),d=["comment",h.slice(g,n+1),g,n],g=n):(tb.lastIndex=g+1,tb.test(h),n=0===tb.lastIndex?h.length-1:tb.lastIndex-2,d=["word",h.slice(g,n+1),g,n],m.push(d),g=n)}return g++,d},position:function(){return g}}},tM={empty:!0,space:!0},tA=class{constructor(e){this.input=e,this.root=new tk,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,i=new tE;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let s=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),s&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,s]of e.entries()){if("("===(t=s[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(s)}r=s}return!1}comment(e){let t=new tc;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=tT(this.input)}decl(e,t){let r,n,i=new eK;this.init(i,e[0][2]);let s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(":"===(r=e.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let o=[];for(;e.length&&("space"===(n=e[0][0])||"comment"===n);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){i.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(i.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),n="";for(let e=t;e>0;e--){let t=r[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(i.important=!0,i.raws.important=n,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(i.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(i,"value",o.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new tR;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,s=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),s.push("("===r?")":"]");else if(o&&n&&"{"===r)i||(i=l),s.push("}");else if(0===s.length){if(";"===r){if(n){this.decl(a,o);return}break}if("{"===r){this.rule(a);return}if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(i=null));l=this.tokenizer.nextToken()}
26if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(i),t&&n){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,s,o,a;let l=r.length,u="",c=!0;for(let e=0;e<l;e+=1)"space"!==(s=(i=r[e])[0])||e!==l-1||n?"comment"===s?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",tM[a]||tM[o]?c=!1:","===u.slice(-1)?c=!1:u+=i[1]):u+=i[1]:c=!1;if(!c){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new tR;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function tD(e,t){let r=new e9(e,t),n=new tA(r);try{n.parse()}catch(e){throw e}return n.root}tD.default=tD,tf.registerParse(tD);let{isClean:tP,my:tL}=eN,tN={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},tj={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},tU={Once:!0,postcssPlugin:!0,prepare:!0};function tF(e){return"object"==typeof e&&"function"==typeof e.then}function tB(e){let t=!1,r=tN[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function tz(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:tB(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function tV(e){return e[tP]=!1,e.nodes&&e.nodes.forEach(e=>tV(e)),e}let tq={},tK=class e{constructor(t,r,n){let i;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=tV(r);else if(r instanceof e||r instanceof tv)i=tV(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=tD;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{i=e(r,n)}catch(e){this.processed=!0,this.error=e}i&&!i[tL]&&tf.rebuild(i)}this.result=new tv(t,i,n),this.helpers={...tq,postcss:tq,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!tj[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
26. Try to update PostCSS (${this.processor.version} now).`);if(!tU[r]){if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(tF(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tP];){e[tP]=!0;let t=[tz(e)];for(;t.length>0;){let e=this.visitTick(t);if(tF(e))try{await e}catch(r){let e=t[t.length-1].node;throw this.handleError(r,e)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(tF(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=eF;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new tl(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(tF(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tP];)e[tP]=!0,this.walkSync(e);if(this.listeners.OnceExit){if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(tF(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[e,i]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let n,i=t.iterator;for(;n=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!n[tP]){n[tP]=!0,e.push(tz(n));return}t.iterator=0,delete r.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e){r.nodes&&r.nodes.length&&(r[tP]=!0,t.iterator=r.getIterator());return}if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){for(let t of(e[tP]=!0,tB(e)))if(0===t)e.nodes&&e.each(e=>{e[tP]||this.walkSync(e)});else{let r=this.listeners[t];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};tK.registerPostcss=e=>{tq=e},tK.default=tK,tk.registerLazyResult(tK),tm.registerLazyResult(tK);let tZ=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new tv(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let s=new tl(eF,n,this._opts,t);
26if(s.isMap()){let[e,t]=s.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=tD(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}};tZ.default=tZ;let tW=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new tK(this,e,t):new tZ(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function tG(e,t){if(Array.isArray(e))return e.map(e=>tG(e));let{inputs:r,...n}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:e9.prototype};r.map&&(r.map={...r.map,__proto__:eY.prototype}),t.push(r)}if(n.nodes&&(n.nodes=e.nodes.map(e=>tG(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new tk(n);if("decl"===n.type)return new eK(n);if("rule"===n.type)return new tR(n);if("comment"===n.type)return new tc(n);if("atrule"===n.type)return new tE(n);throw Error("Unknown node type: "+e.type)}function t$(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new tW(e)}tW.default=tW,tk.registerProcessor(tW),tm.registerProcessor(tW),tG.default=tG,t$.plugin=function(e,t){let r,n=!1;function i(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),N.env.LANG&&N.env.LANG.startsWith("cn")&&console.warn(e+": éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=new tW().version,s}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return t$([i(r)]).process(e,t)},i},t$.stringify=eF,t$.parse=tD,t$.fromJSON=tG,t$.list=tO,t$.comment=e=>new tc(e),t$.atRule=e=>new tE(e),t$.decl=e=>new eK(e),t$.rule=e=>new tR(e),t$.root=e=>new tk(e),t$.document=e=>new tm(e),t$.CssSyntaxError=eL,t$.Declaration=eK,t$.Container=tf,t$.Processor=tW,t$.Document=tm,t$.Comment=tc,t$.Warning=ty,t$.AtRule=tE,t$.Result=tv,t$.Input=e9,t$.Rule=tR,t$.Root=tk,t$.Node=eV,tK.registerPostcss(t$),t$.default=t$;let tQ=t$&&t$.__esModule&&Object.prototype.hasOwnProperty.call(t$,"default")?t$.default:t$;tQ.stringify,tQ.fromJSON,tQ.plugin,tQ.parse,tQ.list,tQ.document,tQ.comment,tQ.atRule,tQ.rule,tQ.decl,tQ.root,tQ.CssSyntaxError,tQ.Declaration,tQ.Container,tQ.Processor,tQ.Document,tQ.Comment,tQ.Warning,tQ.AtRule,tQ.Result,tQ.Input,tQ.Rule,tQ.Root,tQ.Node;var tH=Object.defineProperty,tY=(e,t,r)=>t in e?tH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,tJ=(e,t,r)=>tY(e,"symbol"!=typeof t?t+"":t,r),tX={exports:{}},t0=String,t1=function(){return{isColorSupported:!1,reset:t0,bold:t0,dim:t0,italic:t0,underline:t0,inverse:t0,hidden:t0,strikethrough:t0,black:t0,red:t0,green:t0,yellow:t0,blue:t0,magenta:t0,cyan:t0,white:t0,gray:t0,bgBlack:t0,bgRed:t0,bgGreen:t0,bgYellow:t0,bgBlue:t0,bgMagenta:t0,bgCyan:t0,bgWhite:t0}};tX.exports=t1(),tX.exports.createColors=t1;var t2=tX.exports;let t3=Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})),t6=function(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};
26return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}(t3),t8=class e extends Error{constructor(t,r,n,i,s,o){super(t),this.name="CssSyntaxError",this.reason=t,s&&(this.file=s),i&&(this.source=i),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){let t,r;if(!this.source)return"";let n=this.source;null==e&&(e=t2.isColorSupported),t6&&e&&(n=t6(n));let i=n.split(/\r?\n/),s=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),a=String(o).length;if(e){let{bold:e,gray:n,red:i}=t2.createColors(!0);t=t=>e(i(t)),r=e=>n(e)}else t=r=e=>e;return i.slice(s,o).map((e,n)=>{let i=s+1+n,o=" "+(" "+i).slice(-a)+" | ";if(i===this.line){let n=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(o)+e+"\n "+n+t("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};t8.default=t8;var t5={};t5.isClean=Symbol("isClean"),t5.my=Symbol("my");let t4={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1},t9=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+n+i,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,i=0;for(;n&&"root"!==n.type;)i+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<i;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let i=e.nodes[n],s=this.raw(i,"before");s&&this.builder(s),this.stringify(i,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&void 0!==(n=e.raws[t]))return n;let i=e.parent;if("before"===r&&(!i||"root"===i.type&&i.first===e||i&&"document"===i.type))return"";if(!i)return t4[r];let s=e.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{var o;let i="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[i]?n=this[i](s,e):s.walk(e=>{if(void 0!==(n=e.raws[t]))return!1})}return void 0===n&&(n=t4[r]),s.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return(t=e.raws.after).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return(r=e.raws.before).includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&void 0!==(t=e.raws.between))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return(t=r.raws.before).includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&void 0!==(t=e.raws.after))return!1}),t}rawIndent(e){let t;return e.raws.indent?e.raws.indent:(e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=(t=e[e.length-1]).replace(/\S/g,""),!1}}),t)}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&void 0!==(t=e.raws.semicolon))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};function t7(e,t){new t9(t).stringify(e)}t9.default=t9,t7.default=t7;let{isClean:re,my:rt}=t5,rr=class{constructor(e={}){for(let t in this.raws={},this[re]=!1,this[rt]=!0,e)if("nodes"===t)for(let r of(this.nodes=[],e[t]))"function"==typeof r.clone?this.append(r.clone()):this.append(r);else this[t]=e[t]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=function e(t,r){let n=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let s=t[i],o=typeof s;"parent"===i&&"object"===o?r&&(n[i]=r):"source"===i?n[i]=s:Array.isArray(s)?n[i]=s.map(t=>e(t,n)):("object"===o&&null!==s&&(s=e(s)),n[i]=s)}return n}(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}
26error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new t8(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>e[t]===r||(e[t]=r,("prop"===t||"value"===t||"name"===t||"params"===t||"important"===t||"text"===t)&&e.markDirty(),!0)}}markDirty(){if(this[re]){this[re]=!1;let e=this;for(;e=e.parent;)e[re]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,i+=1):n+=1;return{column:n,line:i}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),i=n.indexOf(e.word);-1!==i&&(t=this.positionInside(i,n),r=this.positionInside(i+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return new t9().raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let i=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let s=t.get(n.input);null==s&&(s=i,t.set(n.input,i),i++),r[e]={end:n.end,inputId:s,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=t7){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}};rr.default=rr;let rn=rr,ri=class extends rn{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}};ri.default=ri;let{SourceMapConsumer:rs,SourceMapGenerator:ro}=t6,{existsSync:ra,readFileSync:rl}=t6,{dirname:ru,join:rc}=t6,rd=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ru(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new rs(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e)){var t;return t=e.substr(RegExp.lastMatch.length),L?L.from(t,"base64").toString():window.atob(t)}throw Error("Unsupported source map encoding "+e.match(/data:application\/json;([^,]+),/)[1])}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);
26if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=ru(e),ra(e))return this.mapFile=e,rl(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"==typeof t){let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw Error("Unable to load previous source map: "+r.toString());return e}}else if(t instanceof rs)return ro.fromSourceMap(t).toString();else if(t instanceof ro)return t.toString();else if(this.isMap(t))return JSON.stringify(t);else throw Error("Unsupported previous source map format: "+t.toString())}else if(this.inline)return this.decodeInline(this.annotation);else if(this.annotation){let t=this.annotation;return e&&(t=rc(ru(e),t)),this.loadFile(t)}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};rd.default=rd;let{SourceMapConsumer:rh,SourceMapGenerator:rp}=t6,{fileURLToPath:rf,pathToFileURL:rg}=t6,{isAbsolute:rm,resolve:ry}=t6,{nanoid:rv}={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",i=r;for(;i--;)n+=e[Math.random()*e.length|0];return n}}
26,r_=Symbol("fromOffsetCache"),rb=!!(rh&&rp),rw=!!(ry&&rm),rS=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\uFEFF"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!rw||/^\w+:\/\//.test(t.from)||rm(t.from)?this.file=t.from:this.file=ry(t.from)),rw&&rb){let e=new rd(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+rv(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let i,s,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);s=e.line,o=e.col}else s=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,s,o);return(i=a?new t8(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new t8(e,void 0===s?t:{column:r,line:t},void 0===s?r:{column:o,line:s},this.css,this.file,n.plugin)).input={column:r,endColumn:o,endLine:s,line:t,source:this.css},this.file&&(rg&&(i.input.url=rg(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[r_])r=this[r_];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let n=0,i=e.length;n<i;n++)r[n]=t,t+=e[n].length+1;this[r_]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,i=r.length-2;for(;n<i;)if(e<r[t=n+(i-n>>1)])i=t-1;else if(e>=r[t+1])n=t+1;else{n=t;break}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ry(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){let i,s;if(!this.map)return!1;let o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(i=o.originalPositionFor({column:n,line:r})),s=rm(a.source)?rg(a.source):new URL(a.source,this.map.consumer().sourceRoot||rg(this.map.mapFile));let l={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:s.toString()};if("file:"===s.protocol){if(rf)l.file=rf(s);else throw Error("file: protocol is not available in this PostCSS build")}let u=o.sourceContentFor(a.source);return u&&(l.source=u),l}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};rS.default=rS,t6&&t6.registerInput&&t6.registerInput(rS);let{SourceMapConsumer:rC,SourceMapGenerator:rE}=t6,{dirname:rx,relative:rk,resolve:rO,sep:rI}=t6,{pathToFileURL:rR}=t6,rT=!!(rC&&rE),rM=!!(rx&&rO&&rk&&rI),rA=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||rx(e.file);!1===this.mapOpts.sourcesContent?(t=new rC(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation){if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)"comment"===(e=this.root.nodes[t]).type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}}generate(){if(this.clearAnnotation(),rM&&rT&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=rE.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new rE({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return(this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline())?[this.css]:[this.css,this.map]}generateString(){let e,t;this.css="",this.map=new rE({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,n=1,i="<no source>",s={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(o,a,l)=>{if(this.css+=o,a&&"end"!==l&&(s.generated.line=r,s.generated.column=n-1,a.source&&a.source.start?(s.source=this.sourcePath(a),s.original.line=a.source.start.line,s.original.column=a.source.start.column-1,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,this.map.addMapping(s))),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};(!("decl"===a.type||"atrule"===a.type&&!a.nodes)||a!==e.last||e.raws.semicolon)&&(a.source&&a.source.end?(s.source=this.sourcePath(a),s.original.line=a.source.end.line,s.original.column=a.source.end.column-1,s.generated.line=r,s.generated.column=n-2,this.map.addMapping(s)):(s.source=i,s.original.line=1,s.original.column=0,s.generated.line=r,s.generated.column=n-1,this.map.addMapping(s)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?rx(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=rx(rO(r,this.mapOpts.annotation)));let n=rk(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps){if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new rS(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return L?L.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(rR){let t=rR(e).toString();return this.memoizedFileURLs.set(e,t),t}throw Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===rI&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},rD=rr,rP=class extends rD{constructor(e){super(e),this.type="comment"}};rP.default=rP;let{isClean:rL,my:rN}=t5,rj=rr,rU=class e extends rj{append(...e){for(let t of e)for(let e of this.normalize(t,this.last))this.proxyOf.nodes.push(e);return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){let t,r;if(!this.proxyOf.nodes)return;let n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get(e,t){if("proxyOf"===t)return e;if(!e[t])return e[t];if("each"===t||"string"==typeof t&&t.startsWith("walk"))return(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e));if("every"===t||"some"===t)return r=>e[t]((e,...t)=>r(e.toProxy(),...t));if("root"===t)return()=>
26e.root().toProxy();if("nodes"===t)return e.nodes.map(e=>e.toProxy());if("first"===t||"last"===t)return e[t].toProxy();else return e[t]},set:(e,t,r)=>e[t]===r||(e[t]=r,("name"===t||"params"===t||"selector"===t)&&e.markDirty(),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),i=this.normalize(t,this.proxyOf.nodes[n]).reverse();for(let t of(n=this.index(e),i))this.proxyOf.nodes.splice(n+1,0,t);for(let e in this.indexes)n<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),i=0===n&&"prepend",s=this.normalize(t,this.proxyOf.nodes[n],i).reverse();for(let t of(n=this.index(e),s))this.proxyOf.nodes.splice(n,0,t);for(let e in this.indexes)n<=(r=this.indexes[e])&&(this.indexes[e]=r+s.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=function e(t){return t.map(t=>(t.nodes&&(t.nodes=e(t.nodes)),delete t.source,t))}(p(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t))for(let e of t=t.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if("root"===t.type&&"document"!==this.type)for(let e of t=t.nodes.slice(0))e.parent&&e.parent.removeChild(e,"ignore");else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new ri(t)]}else if(t.selector)t=[new f(t)];else if(t.name)t=[new g(t)];else if(t.text)t=[new rP(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[rN]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[rL]&&function e(t){if(t[rL]=!1,t.proxyOf.nodes)for(let r of t.proxyOf.nodes)e(r)}(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){for(let t of e=e.reverse()){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;for(let r in e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1),this.indexes)(t=this.indexes[r])>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{(!t.props||t.props.includes(n.prop))&&(!t.fast||n.value.includes(t.fast))&&(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};rU.registerParse=e=>{p=e},rU.registerRule=e=>{f=e},rU.registerAtRule=e=>{g=e},rU.registerRoot=e=>{m=e},rU.default=rU,rU.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,g.prototype):"rule"===e.type?Object.setPrototypeOf(e,f.prototype):"decl"===e.type?Object.setPrototypeOf(e,ri.prototype):"comment"===e.type?Object.setPrototypeOf(e,rP.prototype):"root"===e.type&&Object.setPrototypeOf(e,m.prototype),e[rN]=!0,e.nodes&&e.nodes.forEac
26h(e=>{rU.rebuild(e)})};let rF=rU,rB=class extends rF{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new y(new v,this,e).stringify()}};rB.registerLazyResult=e=>{y=e},rB.registerProcessor=e=>{v=e},rB.default=rB;let rz=class{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};rz.default=rz;let rV=class{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,t={}){!t.plugin&&this.lastPlugin&&this.lastPlugin.postcssPlugin&&(t.plugin=this.lastPlugin.postcssPlugin);let r=new rz(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};rV.default=rV;let rq=/[\t\n\f\r "#'()/;[\\\]{}]/g,rK=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rZ=/.[\r\n"'(/\\]/,rW=/[\da-f]/i,rG=rU,r$=class extends rG{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}};r$.default=r$,rG.registerAtRule(r$);let rQ=rU,rH=class extends rQ{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t){if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before}return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new _(new b,this,e).stringify()}};rH.registerLazyResult=e=>{_=e},rH.registerProcessor=e=>{b=e},rH.default=rH,rQ.registerRoot(rH);let rY={comma:e=>rY.split(e,[","],!0),space:e=>rY.split(e,[" ","\n"," "]),split(e,t,r){let n=[],i="",s=!1,o=0,a=!1,l="",u=!1;for(let r of e)u?u=!1:"\\"===r?u=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?o+=1:")"===r?o>0&&(o-=1):0===o&&t.includes(r)&&(s=!0),s?(""!==i&&n.push(i.trim()),i="",s=!1):i+=r;return(r||""!==i)&&n.push(i.trim()),n}};rY.default=rY;let rJ=rU,rX=class extends rJ{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rY.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}};rX.default=rX,rJ.registerRule(rX);let r0=function(e,t={}){let r,n,i,s,o,a,l,u,c,d,h=e.css.valueOf(),p=t.ignoreErrors,f=h.length,g=0,m=[],y=[];function v(t){throw e.error("Unclosed "+t,g)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&g>=f},nextToken:function(e){if(y.length)return y.pop();if(g>=f)return;let t=!!e&&e.ignoreUnclosed;switch(r=h.charCodeAt(g)){case 10:case 32:case 9:case 13:case 12:n=g;do n+=1,r=h.charCodeAt(n);while(32===r||10===r||9===r||13===r||12===r);d=["space",h.slice(g,n)],g=n-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);d=[e,e,g];break}case 40:if(u=m.length?m.pop()[1]:"",c=h.charCodeAt(g+1),"url"===u&&39!==c&&34!==c&&32!==c&&10!==c&&9!==c&&12!==c&&13!==c){n=g;do{if(a=!1,-1===(n=h.indexOf(")",n+1))){if(p||t){n=g;break}v("bracket")}for(l=n;
2692===h.charCodeAt(l-1);)l-=1,a=!a}while(a);d=["brackets",h.slice(g,n+1),g,n],g=n}else n=h.indexOf(")",g+1),s=h.slice(g,n+1),-1===n||rZ.test(s)?d=["(","(",g]:(d=["brackets",s,g,n],g=n);break;case 39:case 34:i=39===r?"'":'"',n=g;do{if(a=!1,-1===(n=h.indexOf(i,n+1))){if(p||t){n=g+1;break}v("string")}for(l=n;92===h.charCodeAt(l-1);)l-=1,a=!a}while(a);d=["string",h.slice(g,n+1),g,n],g=n;break;case 64:rq.lastIndex=g+1,rq.test(h),n=0===rq.lastIndex?h.length-1:rq.lastIndex-2,d=["at-word",h.slice(g,n+1),g,n],g=n;break;case 92:for(n=g,o=!0;92===h.charCodeAt(n+1);)n+=1,o=!o;if(r=h.charCodeAt(n+1),o&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(n+=1,rW.test(h.charAt(n)))){for(;rW.test(h.charAt(n+1));)n+=1;32===h.charCodeAt(n+1)&&(n+=1)}d=["word",h.slice(g,n+1),g,n],g=n;break;default:47===r&&42===h.charCodeAt(g+1)?(0===(n=h.indexOf("*/",g+2)+1)&&(p||t?n=h.length:v("comment")),d=["comment",h.slice(g,n+1),g,n],g=n):(rK.lastIndex=g+1,rK.test(h),n=0===rK.lastIndex?h.length-1:rK.lastIndex-2,d=["word",h.slice(g,n+1),g,n],m.push(d),g=n)}return g++,d},position:function(){return g}}},r1={empty:!0,space:!0},r2=class{constructor(e){this.input=e,this.root=new rH,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,i=new r$;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let s=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if("("===(t=(e=this.tokenizer.nextToken())[0])||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){s=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),s&&(e=a[a.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),o&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let t,r=this.colon(e);if(!1===r)return;let n=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,n=0;for(let[i,s]of e.entries()){if("("===(t=s[0])&&(n+=1),")"===t&&(n-=1),0===n&&":"===t){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(s)}r=s}return!1}comment(e){let t=new rP;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let r=e[1].slice(2,-2);if(/^\s*$/.test(r))t.text="",t.raws.left=r,t.raws.right="";else{let e=r.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=r0(this.input)}decl(e,t){let r,n,i=new ri;this.init(i,e[0][2]);let s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),i.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),i.raws.before+=e.shift()[1];for(i.source.start=this.getPosition(e[0][2]),i.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;i.prop+=e.shift()[1]}for(i.raws.between="";e.length;){if(":"===(r=e.shift())[0]){i.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),i.raws.between+=r[1]}("_"===i.prop[0]||"*"===i.prop[0])&&(i.raws.before+=i.prop[0],i.prop=i.prop.slice(1));let o=[];for(;e.length&&("space"===(n=e[0][0])||"comment"===n);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let t=e.length-1;t>=0;t--){if("!important"===(r=e[t])[1].toLowerCase()){i.important=!0;let r=this.stringFrom(e,t);" !important"!==(r=this.spacesFromEnd(e)+r)&&(i.raws.important=r);break}if("important"===r[1].toLowerCase()){let r=e.slice(0),n="";for(let e=t;e>0;e--){let t=r[e][0];if(0===n.trim().indexOf("!")&&"space"!==t)break;n=r.pop()[1]+n}0===n.trim().indexOf("!")&&(i.important=!0,i.raws.important=n,e=r)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(i.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(i,"value",o.concat(e),t),i.value.includes(":")&&!t&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new rX;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,i=null,s=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),s.push("("===r?")":"]");else if(o&&n&&"{"===r)i||(i=l),s.push("}");else if(0===s.length){if(";"===r){if(n){this.decl(a,o);return}break}if("{"===r){this.rule(a);return}if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===s[s.length-1]&&(s.pop(),0===s.length&&(i=null));l=this.tokenizer.nextToken()}
26if(this.tokenizer.endOfFile()&&(t=!0),s.length>0&&this.unclosedBracket(i),t&&n){if(!o)for(;a.length&&("space"===(l=a[a.length-1][0])||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,o)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch((e=this.tokenizer.nextToken())[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let i,s,o,a;let l=r.length,u="",c=!0;for(let e=0;e<l;e+=1)"space"!==(s=(i=r[e])[0])||e!==l-1||n?"comment"===s?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",r1[a]||r1[o]?c=!1:","===u.slice(-1)?c=!1:u+=i[1]):u+=i[1]:c=!1;if(!c){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new rX;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t;let r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t;let r="";for(;e.length&&("space"===(t=e[0][0])||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t="";for(;e.length&&"space"===e[e.length-1][0];)t=e.pop()[1]+t;return t}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}};function r3(e,t){let r=new rS(e,t),n=new r2(r);try{n.parse()}catch(e){throw e}return n.root}r3.default=r3,rU.registerParse(r3);let{isClean:r6,my:r8}=t5,r5={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},r4={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},r9={Once:!0,postcssPlugin:!0,prepare:!0};function r7(e){return"object"==typeof e&&"function"==typeof e.then}function ne(e){let t=!1,r=r5[e.type];return("decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append)?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function nt(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ne(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function nr(e){return e[r6]=!1,e.nodes&&e.nodes.forEach(e=>nr(e)),e}let nn={},ni=class e{constructor(t,r,n){let i;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=nr(r);else if(r instanceof e||r instanceof rV)i=nr(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=r3;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{i=e(r,n)}catch(e){this.processed=!0,this.error=e}i&&!i[r8]&&rU.rebuild(i)}this.result=new rV(t,i,n),this.helpers={...nn,postcss:nn,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin?r.postcssVersion:(e.plugin=r.postcssPlugin,e.setMessage())}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!r4[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
26. Try to update PostCSS (${this.processor.version} now).`);if(!r9[r]){if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(r7(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r6];){e[r6]=!0;let t=[nt(e)];for(;t.length>0;){let e=this.visitTick(t);if(r7(e))try{await e}catch(r){let e=t[t.length-1].node;throw this.handleError(r,e)}}}if(this.listeners.OnceExit)for(let[t,r]of this.listeners.OnceExit){this.result.lastPlugin=t;try{if("document"===e.type){let t=e.nodes.map(e=>r(e,this.helpers));await Promise.all(t)}else await r(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));if(r7(t[0]))return Promise.all(t);return t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=t7;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new rA(t,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins)if(r7(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r6];)e[r6]=!0,this.walkSync(e);if(this.listeners.OnceExit){if("document"===e.type)for(let t of e.nodes)this.visitSync(this.listeners.OnceExit,t);else this.visitSync(this.listeners.OnceExit,e)}}return this.result}then(e,t){return this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(r7(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent){e.pop();return}if(n.length>0&&t.visitorIndex<n.length){let[e,i]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return i(r.toProxy(),this.helpers)}catch(e){throw this.handleError(e,r)}}if(0!==t.iterator){let n,i=t.iterator;for(;n=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!n[r6]){n[r6]=!0,e.push(nt(n));return}t.iterator=0,delete r.indexes[i]}let i=t.events;for(;t.eventIndex<i.length;){let e=i[t.eventIndex];if(t.eventIndex+=1,0===e){r.nodes&&r.nodes.length&&(r[r6]=!0,t.iterator=r.getIterator());return}if(this.listeners[e]){t.visitors=this.listeners[e];return}}e.pop()}walkSync(e){for(let t of(e[r6]=!0,ne(e)))if(0===t)e.nodes&&e.each(e=>{e[r6]||this.walkSync(e)});else{let r=this.listeners[t];if(r&&this.visitSync(r,e.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}};ni.registerPostcss=e=>{nn=e},ni.default=ni,rH.registerLazyResult(ni),rB.registerLazyResult(ni);let ns=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new rV(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let s=new rA(t7,n,this._opts,t);
26if(s.isMap()){let[e,t]=s.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else s.clearAnnotation(),this.result.css=s.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){let e;if(this._root)return this._root;try{e=r3(this._css,this._opts)}catch(e){this.error=e}if(!this.error)return this._root=e,e;throw this.error}get[Symbol.toStringTag](){return"NoWorkResult"}};ns.default=ns;let no=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else if("object"==typeof r&&(r.parse||r.stringify));else throw Error(r+" is not a PostCSS plugin");return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new ni(this,e,t):new ns(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function na(e,t){if(Array.isArray(e))return e.map(e=>na(e));let{inputs:r,...n}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:rS.prototype};r.map&&(r.map={...r.map,__proto__:rd.prototype}),t.push(r)}if(n.nodes&&(n.nodes=e.nodes.map(e=>na(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new rH(n);if("decl"===n.type)return new ri(n);if("rule"===n.type)return new rX(n);if("comment"===n.type)return new rP(n);if("atrule"===n.type)return new r$(n);throw Error("Unknown node type: "+e.type)}function nl(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new no(e)}no.default=no,rH.registerProcessor(no),rB.registerProcessor(no),na.default=na,nl.plugin=function(e,t){let r,n=!1;function i(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),N.env.LANG&&N.env.LANG.startsWith("cn")&&console.warn(e+": éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=new no().version,s}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return nl([i(r)]).process(e,t)},i},nl.stringify=t7,nl.parse=r3,nl.fromJSON=na,nl.list=rY,nl.comment=e=>new rP(e),nl.atRule=e=>new r$(e),nl.decl=e=>new ri(e),nl.rule=e=>new rX(e),nl.root=e=>new rH(e),nl.document=e=>new rB(e),nl.CssSyntaxError=t8,nl.Declaration=ri,nl.Container=rU,nl.Processor=no,nl.Document=rB,nl.Comment=rP,nl.Warning=rz,nl.AtRule=r$,nl.Result=rV,nl.Input=rS,nl.Rule=rX,nl.Root=rH,nl.Node=rr,ni.registerPostcss(nl),nl.default=nl;let nu=nl&&nl.__esModule&&Object.prototype.hasOwnProperty.call(nl,"default")?nl.default:nl;nu.stringify,nu.fromJSON,nu.plugin,nu.parse,nu.list,nu.document,nu.comment,nu.atRule,nu.rule,nu.decl,nu.root,nu.CssSyntaxError,nu.Declaration,nu.Container,nu.Processor,nu.Document,nu.Comment,nu.Warning,nu.AtRule,nu.Result,nu.Input,nu.Rule,nu.Root,nu.Node;class nc{constructor(...e){tJ(this,"parentElement",null),tJ(this,"parentNode",null),tJ(this,"ownerDocument"),tJ(this,"firstChild",null),tJ(this,"lastChild",null),tJ(this,"previousSibling",null),tJ(this,"nextSibling",null),tJ(this,"ELEMENT_NODE",1),tJ(this,"TEXT_NODE",3),tJ(this,"nodeType"),tJ(this,"nodeName"),tJ(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof nc)||e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}let nd={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},nh={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},np={};function nf(e){if(np[e])return np[e];let t=globalThis[e],r=t.prototype,n=e in nd?nd[e]:void 0,i=!!(n&&n.every(e=>{var t,n;return!!(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),s=e in nh?nh[e]:void 0,o=!!(s&&s.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&o)return np[e]=t.prototype,t.prototype;try{let n=document.createElement("iframe");document.body.appendChild(n);let i=n.contentWindow;if(!i)return t.prototype;let s=i[e].prototype;if(document.body.removeChild(n),!s)return r;return np[e]=s}catch{return r}}let ng={};function nm(e,t,r){var n;let i=`${e}.${String(r)}`;if(ng[i])return ng[i].call(t);let s=nf(e),o=null==(n=Object.getOwnPropertyDescriptor(s,r))?void 0:n.get;return o?(ng[i]=o,o.call(t)):t[r]}let ny={};function nv(e,t,r){let n=`${e}.${String(r)}`;if(ny[n])return ny[n].bind(t);let i=nf(e),s=i[r];return"function"!=typeof s?t[r]:(ny[n]=s,s.bind(t))}function n_(){return nf("MutationObserver").constructor}let nb={childNodes:function(e){return nm("Node",e,"childNodes")},parentNode:function(e){return nm("Node",e,"parentNode")},parentElement:function(e){return nm("Node",e,"parentElement")},textContent:function(e){return nm("Node",e,"textContent")},contains:function(e,t){return nv("Node",e,"contains")(t)},getRootNode:function(e){return nv("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?nm("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?nm("Element",e,"shadowRoot"):null},querySelector:function(e,t){return nm("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return nm("Element",e,"querySelectorAll")(t)},mutationObserver:n_};function nw(e,t,r=document){let n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}let nS="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",nC={map:{},getId:()=>(console.error(nS),-1),getNode:()=>(console.error(nS),null),removeNodeFromMap(){console.error(nS)},has:()=>(console.error(nS),!1),reset(){console.error(nS)}};function nE(e,t,r={}){let n=null,i=0;return function(...s){let o=Date.now();i||!1!==r.leading||(i=o);let a=t-(o-i),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),i=o,e.apply(l,s)):n||!1===r.trailing||(n=setTimeout(()=>{i=!1===r.leading?0:Date.now(),n=null,e.apply(l,s)},a))}}function nx(e,t,r,n,i=window){let s=i.Object.getOwnPropertyDescriptor(e,t);
26return i.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),s&&s.set&&s.set.call(this,e)}}),()=>nx(e,t,s||{},!0)}function nk(e,t,r){try{if(!(t in e))return()=>{};let n=e[t],i=r(n);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=i,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(nC=new Proxy(nC,{get:(e,t,r)=>("map"===t&&console.error(nS),Reflect.get(e,t,r))}));let nO=Date.now;function nI(e){var t,r,n,i;let s=e.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:s.documentElement.scrollLeft||(null==s?void 0:s.body)&&(null==(t=nb.parentElement(s.body))?void 0:t.scrollLeft)||(null==(r=null==s?void 0:s.body)?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==s?void 0:s.documentElement.scrollTop)||(null==s?void 0:s.body)&&(null==(n=nb.parentElement(s.body))?void 0:n.scrollTop)||(null==(i=null==s?void 0:s.body)?void 0:i.scrollTop)||0}}function nR(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function nT(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function nM(e){if(!e)return null;let t=e.nodeType===e.ELEMENT_NODE?e:nb.parentElement(e);return t}function nA(e,t,r,n){if(!e)return!1;let i=nM(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t)||n&&null!==i.closest("."+t))return!0}else if(ex(i,t,n))return!0}catch(e){}return!!(r&&(i.matches(r)||n&&null!==i.closest(r)))}function nD(e,t,r){return"TITLE"===e.tagName&&!!r.headTitleMutations||-2===t.getId(e)}function nP(e){return!!e.changedTouches}function nL(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function nN(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function nj(e){return!!e&&(e instanceof nc&&"shadowRoot"in e?!!e.shadowRoot:!!nb.shadowRoot(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(nO=()=>new Date().getTime());class nU{constructor(){F(this,"id",1),F(this,"styleIDMap",new WeakMap),F(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){let r;return this.has(e)?this.getId(e):(r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r)}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function nF(e){var t;let r=null;return"getRootNode"in e&&(null==(t=nb.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&nb.host(nb.getRootNode(e))&&(r=nb.host(nb.getRootNode(e))),r}function nB(e){let t=e.ownerDocument;return!!t&&(nb.contains(t,e)||function(e){let t=e.ownerDocument;if(!t)return!1;let r=function(e){let t,r=e;for(;t=nF(r);)r=t;return r}(e);return nb.contains(t,r)}(e))}var nz=((k=nz||{})[k.DomContentLoaded=0]="DomContentLoaded",k[k.Load=1]="Load",k[k.FullSnapshot=2]="FullSnapshot",k[k.IncrementalSnapshot=3]="IncrementalSnapshot",k[k.Meta=4]="Meta",k[k.Custom=5]="Custom",k[k.Plugin=6]="Plugin",k),nV=((O=nV||{})[O.Mutation=0]="Mutation",O[O.MouseMove=1]="MouseMove",O[O.MouseInteraction=2]="MouseInteraction",O[O.Scroll=3]="Scroll",O[O.ViewportResize=4]="ViewportResize",O[O.Input=5]="Input",O[O.TouchMove=6]="TouchMove",O[O.MediaInteraction=7]="MediaInteraction",O[O.StyleSheetRule=8]="StyleSheetRule",O[O.CanvasMutation=9]="CanvasMutation",O[O.Font=10]="Font",O[O.Log=11]="Log",O[O.Drag=12]="Drag",O[O.StyleDeclaration=13]="StyleDeclaration",O[O.Selection=14]="Selection",O[O.AdoptedStyleSheet=15]="AdoptedStyleSheet",O[O.CustomElement=16]="CustomElement",O),nq=((I=nq||{})[I.MouseUp=0]="MouseUp",I[I.MouseDown=1]="MouseDown",I[I.Click=2]="Click",I[I.ContextMenu=3]="ContextMenu",I[I.DblClick=4]="DblClick",I[I.Focus=5]="Focus",I[I.Blur=6]="Blur",I[I.TouchStart=7]="TouchStart",I[I.TouchMove_Departed=8]="TouchMove_Departed",I[I.TouchEnd=9]="TouchEnd",I[I.TouchCancel=10]="TouchCancel",I),nK=((R=nK||{})[R.Mouse=0]="Mouse",R[R.Pen=1]="Pen",R[R.Touch=2]="Touch",R),nZ=((T=nZ||{})[T["2D"]=0]="2D",T[T.WebGL=1]="WebGL",T[T.WebGL2=2]="WebGL2",T),nW=((M=nW||{})[M.Play=0]="Play",M[M.Pause=1]="Pause",M[M.Seeked=2]="Seeked",M[M.VolumeChange=3]="VolumeChange",M[M.RateChange=4]="RateChange",M);
26class nG{constructor(){F(this,"length",0),F(this,"head",null),F(this,"tail",null)}get(e){if(e>=this.length)throw Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&"__ln"in e.previousSibling){let r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&"__ln"in e.nextSibling&&e.nextSibling.__ln.previous){let r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}let n$=(e,t)=>`${e}@${t}`;class nQ{constructor(){F(this,"frozen",!1),F(this,"locked",!1),F(this,"texts",[]),F(this,"attributes",[]),F(this,"attributeMap",new WeakMap),F(this,"removes",[]),F(this,"mapRemoves",[]),F(this,"movedMap",{}),F(this,"addedSet",new Set),F(this,"movedSet",new Set),F(this,"droppedSet",new Set),F(this,"mutationCb"),F(this,"blockClass"),F(this,"blockSelector"),F(this,"maskTextClass"),F(this,"maskTextSelector"),F(this,"inlineStylesheet"),F(this,"maskInputOptions"),F(this,"maskTextFn"),F(this,"maskInputFn"),F(this,"keepIframeSrcFn"),F(this,"recordCanvas"),F(this,"inlineImages"),F(this,"slimDOMOptions"),F(this,"dataURLOptions"),F(this,"doc"),F(this,"mirror"),F(this,"iframeManager"),F(this,"stylesheetManager"),F(this,"shadowDomManager"),F(this,"canvasManager"),F(this,"processedNodeManager"),F(this,"unattachedDoc"),F(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),F(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new nG,n=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{let s=nb.parentNode(i);if(!s||!nB(i)||"TEXTAREA"===s.tagName)return;let o=ee(s)?this.mirror.getId(nF(i)):this.mirror.getId(s),a=n(i);if(-1===o||-1===a)return r.addNode(i);let l=eI(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{nL(e,this.mirror)&&this.iframeManager.addIframe(e),nN(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),nj(i)&&this.shadowDomManager.addShadowRoot(nb.shadowRoot(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});l&&(e.push({parentId:o,nextId:a,node:l}),t.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!nY(this.removes,e,this.mirror)||this.movedSet.has(nb.parentNode(e)))&&i(e);for(let e of this.addedSet)nJ(this.droppedSet,e)||nY(this.removes,e,this.mirror)?nJ(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let s=null;for(;r.length;){let e=null;if(s){let t=this.mirror.getId(nb.parentNode(s.value)),r=n(s.value);-1!==t&&-1!==r&&(e=s)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(nb.parentNode(r.value)),i=n(r.value);if(-1===i)continue;if(-1!==t){e=r;break}{let t=r.value,n=nb.parentNode(t);if(n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let t=nb.host(n),i=this.mirror.getId(t);if(-1!==i){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}s=e.previous,r.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>{let t=e.node,r=nb.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if("string"==typeof t.style){let r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}
vendor: 1,567 bytes, line 26
26return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))}),F(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(nb.childNodes(e),e=>nb.textContent(e)||"").join("")}),F(this,"processMutation",e=>{if(!nD(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=nb.textContent(e.target);nA(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ek(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,nM(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){let e=el(t);n=es({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(nA(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;r="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}}
26,this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!eE(t.tagName,r)){if(i.attributes[r]=eC(this.doc,eo(t.tagName),eo(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}let r=this.unattachedDoc.createElement("span");for(let n of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(n),s=t.style.getPropertyPriority(n);e!==r.style.getPropertyValue(n)||s!==r.style.getPropertyPriority(n)?""===s?i.styleDiff[n]=e:i.styleDiff[n]=[e,s]:i._unchangedStyles[n]=[e,s]}for(let e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal")}break}case"childList":if(nA(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),n=ee(e.target)?this.mirror.getId(nb.host(e.target)):this.mirror.getId(e.target);nA(e.target,this.blockClass,this.blockSelector,!1)||nD(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(nH(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(ee(t))return!1;let n=r.getId(t);if(!r.has(n))return!0;let i=nb.parentNode(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[n$(r,n)]?nH(this.movedSet,t):this.removes.push({parentId:n,id:r,isShadow:!!(ee(e.target)&&et(e.target))||void 0})),this.mapRemoves.push(t))})}}),F(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(nD(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[n$(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!nA(e,this.blockClass,this.blockSelector,!1)&&(nb.childNodes(e).forEach(e=>
26this.genAdds(e)),nj(e)&&nb.childNodes(nb.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function nH(e,t){e.delete(t),nb.childNodes(t).forEach(t=>nH(e,t))}function nY(e,t,r){return 0!==e.length&&function(e,t,r){let n=nb.parentNode(t);for(;n;){let t=r.getId(n);if(e.some(e=>e.id===t))return!0;n=nb.parentNode(n)}return!1}(e,t,r)}function nJ(e,t){return 0!==e.size&&function e(t,r){let n=nb.parentNode(r);return!!n&&(!!t.has(n)||e(t,n))}(e,t)}let nX=e=>w?(...t)=>{try{return e(...t)}catch(e){if(w&&!0===w(e))return;throw e}}:e,n0=[];function n1(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function n2(e,t){let r=new nQ;n0.push(r),r.init(e);let n=new(n_())(nX(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function n3({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){let o=nX(nE(nX(s=>{let o=n1(s);if(!o||nA(o,n,i,!0))return;let a=r.getId(o);if(o===t&&t.defaultView){let r=nI(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),s.scroll||100));return nw("scroll",o,t)}let n6=["INPUT","TEXTAREA","SELECT"],n8=new WeakMap;function n5(e){return function(e,t){if(ie("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ie("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ie("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ie("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules),n=r.indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules),n=r.indexOf(e);t.unshift(n)}return t}(e,[])}function n4(e,t,r){let n,i;return e?(e.ownerNode?n=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:n}):{}}function n9({mirror:e,stylesheetManager:t},r){var n,i,s;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(nb.host(r));let a="#document"===r.nodeName?null==(n=r.defaultView)?void 0:n.Document:null==(s=null==(i=r.ownerDocument)?void 0:i.defaultView)?void 0:s.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==o&&-1!==o&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;let n=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return n}}),nX(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function n7(e,t={}){let r;let n=e.doc.defaultView;if(!n)return()=>{};!function(e,t){let{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:u,styleDeclarationCb:c,canvasMutationCb:d,fontCb:h,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),s(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),o(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),u(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),c(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),d(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),h(...e)}
26,e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(r=n2(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){let i;if(!1===t.mousemove)return()=>{};let s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=nE(nX(t=>{let r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),u=nX(nE(nX(e=>{let t=n1(e),{clientX:r,clientY:s}=nP(e)?e.changedTouches[0]:e;i||(i=nO()),a.push({x:r,y:s,id:n.getId(t),timeOffset:nO()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?nV.Drag:e instanceof MouseEvent?nV.MouseMove:nV.TouchMove)}),s,{trailing:!1})),c=[nw("mousemove",u,r),nw("touchmove",u,r),nw("drag",u,r)];return nX(()=>{c.forEach(e=>e())})}(e),s=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(!1===s.mouseInteraction)return()=>{};let o=!0===s.mouseInteraction||void 0===s.mouseInteraction?{}:s.mouseInteraction,a=[],l=null,u=t=>s=>{let o=n1(s);if(nA(o,n,i,!0))return;let a=null,u=t;if("pointerType"in s){switch(s.pointerType){case"mouse":a=nK.Mouse;break;case"touch":a=nK.Touch;break;case"pen":a=nK.Pen}a===nK.Touch?nq[t]===nq.MouseDown?u="TouchStart":nq[t]===nq.MouseUp&&(u="TouchEnd"):nK.Pen}else nP(s)&&(a=nK.Touch);null!==a?(l=a,(u.startsWith("Touch")&&a===nK.Touch||u.startsWith("Mouse")&&a===nK.Mouse)&&(a=null)):nq[t]===nq.Click&&(a=l,l=null);let c=nP(s)?s.changedTouches[0]:s;if(!c)return;let d=r.getId(o),{clientX:h,clientY:p}=c;nX(e)({type:nq[u],id:d,x:h,y:p,...null!==a&&{pointerType:a}})};return Object.keys(nq).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(e=>{let r=eo(e),n=u(e);if(window.PointerEvent)switch(nq[e]){case nq.MouseDown:case nq.MouseUp:r=r.replace("mouse","pointer");break;case nq.TouchStart:case nq.TouchEnd:return}a.push(nw(r,n,t))}),nX(()=>{a.forEach(e=>e())})}(e),o=n3(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1,i=nX(nE(nX(()=>{let t=nR(),i=nT();(r!==t||n!==i)&&(e({width:Number(i),height:Number(t)}),r=t,n=i)}),200));return nw("resize",i,t)}(e,{win:n}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:u,userTriggeredOnInput:c}){function d(e){let r=n1(e),u=e.isTrusted,d=r&&r.tagName;if(r&&"OPTION"===d&&(r=nb.parentElement(r)),!r||!d||0>n6.indexOf(d)||nA(r,n,i,!0)||r.classList.contains(s)||o&&r.matches(o))return;let p=r.value,f=!1,g=el(r)||"";"radio"===g||"checkbox"===g?f=r.checked:(a[d.toLowerCase()]||a[g])&&(p=es({element:r,maskInputOptions:a,tagName:d,type:g,value:p,maskInputFn:l})),h(r,c?{text:p,isChecked:f,userTriggered:u}:{text:p,isChecked:f});let m=r.name;"radio"===g&&m&&f&&t.querySelectorAll(`input[type="radio"][name="${m}"]`).forEach(e=>{if(e!==r){let t=e.value;h(e,c?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function h(t,n){let i=n8.get(t);if(!i||i.text!==n.text||i.isChecked!==n.isChecked){n8.set(t,n);let i=r.getId(t);nX(e)({...n,id:i})}}let p="last"===u.input?["change"]:["input","change"],f=p.map(e=>nw(e,nX(d),t)),g=t.defaultView;if(!g)return()=>{f.forEach(e=>e())};let m=g.Object.getOwnPropertyDescriptor(g.HTMLInputElement.prototype,"value"),y=[[g.HTMLInputElement.prototype,"value"],[g.HTMLInputElement.prototype,"checked"],[g.HTMLSelectElement.prototype,"value"],[g.HTMLTextAreaElement.prototype,"value"],[g.HTMLSelectElement.prototype,"selectedIndex"],[g.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&f.push(...y.map(e=>nx(e[0],e[1],{set(){nX(d)({target:this,isTrusted:!1})}},!1,g))),nX(()=>{f.forEach(e=>e())})}(e),u=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:i,doc:s}){let o=nX(s=>nE(nX(i=>{let o=n1(i);if(!o||nA(o,t,r,!0))return;let{currentTime:a,volume:l,muted:u,playbackRate:c,loop:d}=o;e({type:s,id:n.getId(o),currentTime:a,volume:l,muted:u,playbackRate:c,loop:d})}),i.media||500)),a=[nw("play",o(nW.Play),s),nw("pause",o(nW.Pause),s),nw("seeked",o(nW.Seeked),s),nw("volumechange",o(nW.VolumeChange),s),nw("ratechange",o(nW.RateChange),s)];return nX(()=>
26{a.forEach(e=>e())})}(e),c=()=>{},d=()=>{},h=()=>{},p=()=>{};e.recordDOM&&(c=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){let i,s;if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};let o=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:nX((n,i,s)=>{let[o,a]=s,{id:l,styleId:u}=n4(i,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:a}]}),n.apply(i,s)})}),n.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){let i=`${e} { ${t} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};let a=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:nX((n,i,s)=>{let[o]=s,{id:a,styleId:l}=n4(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),n.apply(i,s)})}),n.CSSStyleSheet.prototype.removeRule=function(e){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:nX((n,i,s)=>{let[o]=s,{id:a,styleId:l}=n4(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),n.apply(i,s)})})),n.CSSStyleSheet.prototype.replaceSync&&(s=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:nX((n,i,s)=>{let[o]=s,{id:a,styleId:l}=n4(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),n.apply(i,s)})}));let l={};it("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(it("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),it("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),it("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));let u={};return Object.entries(l).forEach(([n,i])=>{u[n]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(u[n].insertRule,{apply:nX((n,i,s)=>{let[o,a]=s,{id:l,styleId:u}=n4(i.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,adds:[{rule:o,index:[...n5(i),a||0]}]}),n.apply(i,s)})}),i.prototype.deleteRule=new Proxy(u[n].deleteRule,{apply:nX((n,i,s)=>{let[o]=s,{id:a,styleId:l}=n4(i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...n5(i),o]}]}),n.apply(i,s)})})}),nX(()=>{n.CSSStyleSheet.prototype.insertRule=o,n.CSSStyleSheet.prototype.deleteRule=a,i&&(n.CSSStyleSheet.prototype.replace=i),s&&(n.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=u[e].insertRule,t.prototype.deleteRule=u[e].deleteRule})})}(e,{win:n}),d=n9(e,e.doc),h=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){let s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:nX((i,o,a)=>{var l;let[u,c,d]=a;if(r.has(u))return s.apply(o,[u,c,d]);let{id:h,styleId:p}=n4(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(h&&-1!==h||p&&-1!==p)&&e({id:h,styleId:p,set:{property:u,value:c,priority:d},index:n5(o.parentRule)}),i.apply(o,a)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:nX((i,s,a)=>{var l;let[u]=a;if(r.has(u))return o.apply(s,[u]);let{id:c,styleId:d}=n4(null==(l=s.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||d&&-1!==d)&&e({id:c,styleId:d,remove:{property:u},index:n5(s.parentRule)}),i.apply(s,a)})}),nX(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:n}),e.collectFonts&&(p=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(e,t,r){let n=new s(e,t,r);return i.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};let o=nk(t.fonts,"add",function(t){return function(r){return setTimeout(nX(()=>{let t=i.get(r);t&&(e(t),i.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=s}),n.push(o),nX(()=>
26{n.forEach(e=>e())})}(e)));let f=function(e){let{doc:t,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=e,o=!0,a=nX(()=>{let e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;let a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let s=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:u,endOffset:c}=s,d=nA(o,n,i,!0)||nA(u,n,i,!0);d||a.push({start:r.getId(o),startOffset:l,end:r.getId(u),endOffset:c})}s({ranges:a})});return a(),nw("selectionchange",a)}(e),g=function({doc:e,customElementCb:t}){let r=e.defaultView;if(!r||!r.customElements)return()=>{};let n=nk(r.customElements,"define",function(e){return function(r,n,i){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,n,i])}});return n}(e),m=[];for(let t of e.plugins)m.push(t.observer(t.callback,n,t.options));return nX(()=>{n0.forEach(e=>e.reset()),null==r||r.disconnect(),i(),s(),o(),a(),l(),u(),c(),d(),h(),p(),f(),g(),m.forEach(e=>e())})}function ie(e){return void 0!==window[e]}function it(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ir{constructor(e){F(this,"iframeIdToRemoteIdMap",new WeakMap),F(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){let i=r||this.getIdToRemoteIdMap(e),s=n||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),s.set(o,t)),o}getIds(e,t){let r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){let n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let i=n.get(t);return i||-1}getRemoteIds(e,t){let r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class ii{constructor(e){F(this,"iframes",new WeakMap),F(this,"crossOriginIframeMap",new WeakMap),F(this,"crossOriginIframeMirror",new ir(ey)),F(this,"crossOriginIframeStyleMirror"),F(this,"crossOriginIframeRootIdMap",new WeakMap),F(this,"mirror"),F(this,"mutationCb"),F(this,"wrappedEmit"),F(this,"loadListener"),F(this,"stylesheetManager"),F(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ir(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){if("rrweb"!==e.data.type||e.origin!==e.data.origin)return;let t=e.source;if(!t)return;let r=this.crossOriginIframeMap.get(e.source);if(!r)return;let n=this.transformCrossOriginEvent(r,e.data.event);n&&this.wrappedEmit(n,e.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case nz.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:nz.IncrementalSnapshot,data:{source:nV.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case nz.Meta:case nz.Load:case nz.DomContentLoaded:break;case nz.Plugin:return t;case nz.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case nz.IncrementalSnapshot:switch(t.data.source){case nV.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);let r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}
26),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case nV.Drag:case nV.TouchMove:case nV.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case nV.ViewportResize:return!1;case nV.MediaInteraction:case nV.MouseInteraction:case nV.Scroll:case nV.CanvasMutation:case nV.Input:return this.replaceIds(t.data,e,["id"]),t;case nV.StyleSheetRule:case nV.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case nV.Font:return t;case nV.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case nV.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(let i of n)(Array.isArray(t[i])||"number"==typeof t[i])&&(Array.isArray(t[i])?t[i]=e.getIds(r,t[i]):t[i]=e.getId(r,t[i]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===q.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class is{constructor(e){F(this,"shadowDoms",new WeakSet),F(this,"mutationCb"),F(this,"scrollCb"),F(this,"bypassOptions"),F(this,"mirror"),F(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!et(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=n2({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(n3({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(nb.host(e))),this.restoreHandlers.push(n9({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){let r=this;this.restoreHandlers.push(nk(e.prototype,"attachShadow",function(e){return function(n){let i=e.call(this,n),s=nb.shadowRoot(this);return s&&nB(this)&&r.addShadowRoot(s,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var io="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ia="undefined"==typeof Uint8Array?[]:new Uint8Array(256),il=0;il<io.length;il++)ia[io.charCodeAt(il)]=il;var iu=function(e){var t,r=new Uint8Array(e),n=r.length,i="";for(t=0;t<n;t+=3)i+=io[r[t]>>2]+io[(3&r[t])<<4|r[t+1]>>4]+io[(15&r[t+1])<<2|r[t+2]>>6]+io[63&r[t+2]];return n%3==2?i=i.substring(0,i.length-1)+"=":n%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let ic=new Map,id=(e,t,r)=>{let n;if(!e||!(ip(e,t)||"object"==typeof e))return;let i=e.constructor.name,s=((n=ic.get(r))||(n=new Map,ic.set(r,n)),n.has(i)||n.set(i,[]),n.get(i)),o=s.indexOf(e);return -1===o&&(o=s.length,s.push(e)),o},ih=(e,t,r)=>e.map(e=>(function e(t,r,n){if(t instanceof Array)return t.map(t=>e(t,r,n));if(null===t);else if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray){let e=t.constructor.name;return{rr_type:e,args:[Object.values(t)]}}else if(t instanceof ArrayBuffer){let e=t.constructor.name,r=iu(t);return{rr_type:e,base64:r}}else if(t instanceof DataView){let i=t.constructor.name;return{rr_type:i,args:[e(t.buffer,r,n),t.byteOffset,t.byteLength]}}else if(t instanceof HTMLImageElement){let e=t.constructor.name,{src:r}=t;return{rr_type:e,src:r}}else if(t instanceof HTMLCanvasElement){let e=t.toDataURL();return{rr_type:"HTMLImageElement",src:e}}else if(t instanceof ImageData){let i=t.constructor.name;return{rr_type:i,args:[e(t.data,r,n),t.width,t.height]}}else if(ip(t,r)||"object"==typeof t){let e=t.constructor.name,i=id(t,r,n);return{rr_type:e,index:i}}return t})(e,t,r)),ip=(e,t)=>{let r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return!!r.find(r=>e instanceof t[r])};function ig(e,t,r,n){let i=[];try{let s=nk(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i,...s){if(!nA(this,t,r,!0)){let e="experimental-webgl"===i?"webgl":i;if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e)){if(s[0]&&"object"==typeof s[0]){let e=s[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else s.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[i,...s])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
26{i.forEach(e=>e())}}function im(e,t,r,n,i,s){let o=[],a=Object.getOwnPropertyNames(e);for(let l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;let a=nk(e,l,function(e){return function(...o){let a=e.apply(this,o);if(id(a,s,this),"tagName"in this.canvas&&!nA(this.canvas,n,i,!0)){let e=ih(o,s,this),n={type:t,property:l,args:e};r(this.canvas,n)}return a}});o.push(a)}catch{let n=nx(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(n)}return o}let iy="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
26hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",iv="undefined"!=typeof window&&window.Blob&&new Blob([Uint8Array.from(atob(iy),e=>e.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function i_(e){let t;try{if(!(t=iv&&(window.URL||window.webkitURL).createObjectURL(iv)))throw"";let r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;base64,"+iy,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class ib{constructor(e){F(this,"pendingCanvasMutations",new Map),F(this,"rafStamps",{latestId:0,invokeId:null}),F(this,"mirror"),F(this,"mutationCb"),F(this,"resetObservers"),F(this,"frozen",!1),F(this,"locked",!1),F(this,"processMutation",(e,t)=>{let r=this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId;(r||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});let{sampling:t="all",win:r,blockClass:n,blockSelector:i,recordCanvas:s,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,s&&"all"===t&&this.initCanvasMutationObserver(r,n,i),s&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,i,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,i){let s;let o=ig(t,r,n,!0),a=new Map,l=new i_;l.onmessage=e=>{let{id:t}=e.data;if(a.set(t,!1),!("base64"in e.data))return;let{base64:r,type:n,width:i,height:s}=e.data;this.mutationCb({id:t,type:nZ["2D"],commands:[{property:"clearRect",args:[0,0,i,s]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};let u=1e3/e,c=0,d=()=>{let e=[];return t.document.querySelectorAll("canvas").forEach(t=>{nA(t,r,n,!0)||e.push(t)}),e},h=e=>{if(c&&e-c<u){s=requestAnimationFrame(h);return}
26c=e,d().forEach(async e=>{var t;let r=this.mirror.getId(e);if(a.get(r)||0===e.width||0===e.height)return;if(a.set(r,!0),["webgl","webgl2"].includes(e.__context)){let r=e.getContext(e.__context);(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)===!1&&r.clear(r.COLOR_BUFFER_BIT)}let n=await createImageBitmap(e);l.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[n])}),s=requestAnimationFrame(h)};s=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(s)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=ig(e,t,r,!1),i=function(e,t,r,n){let i=[],s=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let o of s)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;let s=nk(t.CanvasRenderingContext2D.prototype,o,function(i){return function(...s){return nA(this.canvas,r,n,!0)||setTimeout(()=>{let r=ih(s,t,this);e(this.canvas,{type:nZ["2D"],property:o,args:r})},0),i.apply(this,s)}});i.push(s)}catch{let r=nx(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:nZ["2D"],property:o,args:[t],setter:!0})}});i.push(r)}return()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),s=function(e,t,r,n){let i=[];return i.push(...im(t.WebGLRenderingContext.prototype,nZ.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&i.push(...im(t.WebGL2RenderingContext.prototype,nZ.WebGL2,e,r,n,t)),()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),i(),s()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;let n=r.map(e=>{let{type:t,...r}=e;return r}),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:n}),this.pendingCanvasMutations.delete(e)}}class iw{constructor(e){F(this,"trackedLinkElements",new WeakSet),F(this,"mutationCb"),F(this,"adoptedStyleSheetCb"),F(this,"styleMirror",new nU),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;let r={id:t,styleIds:[]},n=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),n.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:en(e,t.href),index:r}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class iS{constructor(){F(this,"nodeMap",new WeakMap),F(this,"active",!1)}inOtherBuffer(e,t){let r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let iC=!1;try{if(2!==Array.from([1],e=>2*e)[0]){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(D=e.contentWindow)?void 0:D.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}let iE=new ei;function ix(e={}){let t;let{emit:r,checkoutEveryNms:n,checkoutEveryNth:i,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:u="rr-mask",maskTextSelector:c=null,inlineStylesheet:d=!0,maskAllInputs:h,maskInputOptions:p,slimDOMOptions:f,maskInputFn:g,maskTextFn:m,hooks:y,packFn:v,sampling:_={},dataURLOptions:b={}
26,mousemoveWait:x,recordDOM:k=!0,recordCanvas:O=!1,recordCrossOriginIframes:I=!1,recordAfter:R="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:T=!1,collectFonts:M=!1,inlineImages:A=!1,plugins:D,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:N}=e;w=N;let j=!I||window.parent===window,U=!1;if(!j)try{window.parent.document&&(U=!1)}catch(e){U=!0}if(j&&!r)throw Error("emit function is required");if(!j&&!U)return()=>{};void 0!==x&&void 0===_.mousemove&&(_.mousemove=x),iE.reset();let F=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==p?p:{password:!0},B=!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===f,headMetaDescKeywords:"all"===f,headTitleMutations:"all"===f}:f||{};!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let z=0,V=e=>{for(let t of D||[])t.eventProcessor&&(e=t.eventProcessor(e));return v&&!U&&(e=v(e)),e};S=(e,s)=>{var o;if(e.timestamp=nO(),(null==(o=n0[0])?void 0:o.isFrozen())&&e.type!==nz.FullSnapshot&&!(e.type===nz.IncrementalSnapshot&&e.data.source===nV.Mutation)&&n0.forEach(e=>e.unfreeze()),j)null==r||r(V(e),s);else if(U){let t={type:"rrweb",event:V(e),origin:window.location.origin,isCheckout:s};window.parent.postMessage(t,"*")}if(e.type===nz.FullSnapshot)t=e,z=0;else if(e.type===nz.IncrementalSnapshot){if(e.data.source===nV.Mutation&&e.data.isAttachIframe)return;z++;let r=i&&z>=i,s=n&&e.timestamp-t.timestamp>n;(r||s)&&C(!0)}};let q=e=>{S({type:nz.IncrementalSnapshot,data:{source:nV.Mutation,...e}})},K=e=>S({type:nz.IncrementalSnapshot,data:{source:nV.Scroll,...e}}),Z=e=>S({type:nz.IncrementalSnapshot,data:{source:nV.CanvasMutation,...e}}),W=new iw({mutationCb:q,adoptedStyleSheetCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.AdoptedStyleSheet,...e}})}),G=new ii({mirror:iE,mutationCb:q,stylesheetManager:W,recordCrossOriginIframes:I,wrappedEmit:S});for(let e of D||[])e.getMirror&&e.getMirror({nodeMirror:iE,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});let $=new iS;E=new ib({recordCanvas:O,mutationCb:Z,win:window,blockClass:s,blockSelector:o,mirror:iE,sampling:_.canvas,dataURLOptions:b});let Q=new is({mutationCb:q,scrollCb:K,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:F,dataURLOptions:b,maskTextFn:m,maskInputFn:g,recordCanvas:O,inlineImages:A,sampling:_,slimDOMOptions:B,iframeManager:G,stylesheetManager:W,canvasManager:E,keepIframeSrcFn:P,processedNodeManager:$},mirror:iE});C=(e=!1)=>{if(!k)return;S({type:nz.Meta,data:{href:window.location.href,width:nT(),height:nR()}},e),W.reset(),Q.init(),n0.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new ei,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:u=!1,maskAllInputs:c=!1,maskTextFn:d,maskInputFn:h,slimDOM:p=!1,dataURLOptions:f,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:_,stylesheetLoadTimeout:b,keepIframeSrcFn:w=()=>!1}=t||{},S=!0===c?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===c?{password:!0}:c,C=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p;return eI(e,{doc:e,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:S,maskTextFn:d,maskInputFn:h,slimDOMOptions:C,dataURLOptions:f,inlineImages:l,recordCanvas:u,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:v,onStylesheetLoad:_,stylesheetLoadTimeout:b,keepIframeSrcFn:w,newlyAddedElement:!1})}(document,{mirror:iE,blockClass:s,blockSelector:o,maskTextClass:u,maskTextSelector:c,inlineStylesheet:d,maskAllInputs:F,maskTextFn:m,maskInputFn:g,slimDOM:B,dataURLOptions:b,recordCanvas:O,inlineImages:A,onSerialize:e=>{nL(e,iE)&&G.addIframe(e),nN(e,iE)&&W.trackLinkElement(e),nj(e)&&Q.addShadowRoot(nb.shadowRoot(e),document)},onIframeLoad:(e,t)=>{G.attachIframe(e,t),Q.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");S({type:nz.FullSnapshot,data:{node:t,initialOffset:nI(window)}}
26,e),n0.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,iE.getId(document))};try{let e=[],t=e=>{var t;return nX(n7)({mutationCb:q,mousemoveCb:(e,t)=>S({type:nz.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.MouseInteraction,...e}}),scrollCb:K,viewportResizeCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.ViewportResize,...e}}),inputCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.Input,...e}}),mediaInteractionCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.MediaInteraction,...e}}),styleSheetRuleCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.StyleSheetRule,...e}}),styleDeclarationCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.StyleDeclaration,...e}}),canvasMutationCb:Z,fontCb:e=>S({type:nz.IncrementalSnapshot,data:{source:nV.Font,...e}}),selectionCb:e=>{S({type:nz.IncrementalSnapshot,data:{source:nV.Selection,...e}})},customElementCb:e=>{S({type:nz.IncrementalSnapshot,data:{source:nV.CustomElement,...e}})},blockClass:s,ignoreClass:a,ignoreSelector:l,maskTextClass:u,maskTextSelector:c,maskInputOptions:F,inlineStylesheet:d,sampling:_,recordDOM:k,recordCanvas:O,inlineImages:A,userTriggeredOnInput:T,collectFonts:M,doc:e,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:P,blockSelector:o,slimDOMOptions:B,dataURLOptions:b,mirror:iE,iframeManager:G,stylesheetManager:W,shadowDomManager:Q,processedNodeManager:$,canvasManager:E,ignoreCSSAttributes:L,plugins:(null==(t=null==D?void 0:D.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>S({type:nz.Plugin,data:{plugin:e.name,payload:t}})})))||[]},y)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{C(),e.push(t(document)),iC=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(nw("DOMContentLoaded",()=>{S({type:nz.DomContentLoaded,data:{}}),"DOMContentLoaded"===R&&r()})),e.push(nw("load",()=>{S({type:nz.Load,data:{}}),"load"===R&&r()},window))),()=>{e.forEach(e=>e()),$.destroy(),iC=!1,w=void 0}}catch(e){console.warn(e)}}ix.addCustomEvent=(e,t)=>{if(!iC)throw Error("please add custom event after start recording");S({type:nz.Custom,data:{tag:e,payload:t}})},ix.freezePage=()=>{n0.forEach(e=>e.freeze())},ix.takeFullSnapshot=e=>{if(!iC)throw Error("please take full snapshot after start recording");C(e)},ix.mirror=iE,(A=P||(P={}))[A.NotStarted=0]="NotStarted",A[A.Running=1]="Running",A[A.Stopped=2]="Stopped",t.record=ix},375:function(e,t,r){"use strict";var n,i,s;Object.defineProperty(t,"__esModule",{value:!0}),t._getInstance=t._getStatsigGlobalFlag=t._getStatsigGlobal=void 0;let o=r(9025);t._getStatsigGlobal=()=>{try{return"undefined"!=typeof __STATSIG__?__STATSIG__:d}catch(e){return d}},t._getStatsigGlobalFlag=e=>(0,t._getStatsigGlobal)()[e],t._getInstance=e=>{let r=(0,t._getStatsigGlobal)();return e?r.instances&&r.instances[e]:(r.instances&&Object.keys(r.instances).length>1&&o.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),r.firstInstance)};let a="__STATSIG__",l="undefined"!=typeof window?window:{},u=void 0!==r.g?r.g:{},c="undefined"!=typeof globalThis?globalThis:{},d=null!==(s=null!==(i=null!==(n=l[a])&&void 0!==n?n:u[a])&&void 0!==i?i:c[a])&&void 0!==s?s:{instance:t._getInstance};l[a]=d,u[a]=d,c[a]=d},1867:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getStorageKey=t._getUserStorageKey=void 0;let n=r(6152);function i(e,t,r){var i;if(r)return r(e,t);let s=t&&t.customIDs?t.customIDs:{},o=[`uid:${null!==(i=null==t?void 0:t.userID)&&void 0!==i?i:""}`,`cids:${Object.keys(s).sort((e,t)=>e.localeCompare(t)).map(e=>`${e}-${s[e]}`).join(",")}`,`k:${e}`];return(0,n._DJB2)(o.join("|"))}t._getUserStorageKey=i,t._getStorageKey=function(e,t,r){return t?i(e,t,r):(0,n._DJB2)(`k:${e}`)}},394:function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0})},3183:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._makeDataAdapterResult=t.DataAdapterCore=void 0;let i=r(9025),s=r(3463),o=r(9063),a=r(8614),l=r(3111);function u(e,t,r,n){return{source:e,data:t,receivedAt:Date.now(),stableID:r,fullUserHash:(0,o._getFullUserHash)(n)}}t.DataAdapterCore=class{constructor(e,t){this._adapterName=e,this._cacheSuffix=t,this._options=null,this._sdkKey=null,this._cacheLimit=10,this._lastModifiedStoreKey=`statsig.last_modified_time.${t}`,this._inMemoryCache=new c}attach(e,t,r){this._sdkKey=e,this._options=t}getDataSync(e){let t=e&&(0,o._normalizeUser)(e,this._options),r=this._getCacheKey(t),n=this._inMemoryCache.get(r,t);if(n&&this._getIsCacheValueValid(n))return n;let i=this._loadFromCache(r);return i&&this._getIsCacheValueValid(i)?(this._inMemoryCache.add(r,i,this._cacheLimit),this._inMemoryCache.get(r,t)):null}setData(e,t){let r=t&&(0,o._normalizeUser)(t,this._options),n=this._getCacheKey(r);this._inMemoryCache.add(n,u("Bootstrap",e,null,r),this._cacheLimit)}_getIsCacheValueValid(e){return null==e.stableID||e.stableID===s.StableID.get(this._getSdkKey())}_getDataAsyncImpl(e,t,r){return n(this,void 0,void 0,function*(){a.Storage.isReady()||(yield a.Storage.isReadyResolver());let n=null!=e?e:this.getDataSync(t),s=[this._fetchAndPrepFromNetwork(n,t,r)];return(null==r?void 0:r.timeoutMs)&&s.push(new Promise(e=>setTimeout(e,r.timeoutMs)).then(()=>(i.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(s)})}_prefetchDataImpl(e,t){return n(this,void 0,void 0,function*(){let r=e&&(0,o._normalizeUser)(e,this._options),n=this._getCacheKey(r),i=yield this._getDataAsyncImpl(null,r,t);i&&this._inMemoryCache.add(n,Object.assign(Object.assign({},i),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(e,t,r){return n(this,void 0,void 0,function*(){var n;let o=null!==(n=null==e?void 0:e.data)&&void 0!==n?n:null,a=null!=e&&this._isCachedResultValidFor204(e,t),c=yield this._fetchFromNetwork(o,t,r,a);if(!c)return i.Log.debug("No response returned for latest value"),null;let d=(0,l._typedJsonParse)(c,"has_updates","Response"),h=this._getSdkKey(),p=s.StableID.get(h),f=null;if((null==d?void 0:d.has_updates)===!0)f=u("Network",c,p,t);else{if(!o||(null==d?void 0:d.has_updates)!==!1)return null;f=u("NetworkNotModified",o,p,t)}let g=this._getCacheKey(t);return this._inMemoryCache.add(g,f,this._cacheLimit),this._writeToCache(g,f),f})}_getSdkKey(){return null!=this._sdkKey?this._sdkKey:(i.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(e){var t;let r=null===(t=a.Storage.getItem)||void 0===t?void 0:t.call(a.Storage,e);if(null==r)return null;let n=(0,l._typedJsonParse)(r,"source","Cached Result");return n?Object.assign(Object.assign({},n),{source:"Cache"}):null}_writeToCache(e,t){let r=JSON.stringify(t);for(let t=0;t<8;t++)try{a.Storage.setItem(e,r);break}catch(t){if(!(t instanceof Error)||!(t.toString().includes("QuotaExceededError")||t.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw t;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(e,this._cacheLimit-1)}this._runLocalStorageCacheEviction(e)}_runLocalStorageCacheEviction(e,t=this._cacheLimit){var r;let n=null!==(r=(0,a._getObjectFromStorage)(this._lastModifiedStoreKey))&&void 0!==r?r:{};n[e]=Date.now();let i=d(n,t);for(let e of i)delete n[e],a.Storage.removeItem(e);(0,a._setObjectInStorage)(this._lastModifiedStoreKey,n)}},t._makeDataAdapterResult=u;class c{constructor(){this._data={}}get(e,t){var r;let n=this._data[e],s=null==n?void 0:n.stableID,o=null===(r=null==t?void 0:t.customIDs)||void 0===r?void 0:r.stableID;return o&&s&&o!==s?(i.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):n}add(e,t,r){let n=d(this._data,r-1);for(let e of n)delete this._data[e];this._data[e]=t}merge(e){this._data=Object.assign(Object.assign({},this._data),e)}}function d(e,t){let r=Object.keys(e);return r.length<=t?[]:0===t?r:r.sort((t,r)=>{let n=e[t],i=e[r];return"object"==typeof n&&"object"==typeof i?n.receivedAt-i.receivedAt:n-i}).slice(0,r.length-t)}},642:function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t.Diagnostics=void 0;let r=new Map,n="start";function i(e,t,r,n){return Object.assign({key:r,action:t,step:n,timestamp:Date.now()},e)}function s(e,t){var n;let i=null!==(n=r.get(e))&&void 0!==n?n:[];i.push(t),r.set(e,i)}function o(e,t){if(t in e)return e[t]}t.Diagnostics={_getMarkers:e=>r.get(e),_markInitOverallStart:e=>{s(e,i({},n,"overall"))},_markInitOverallEnd:(e,t,r)=>{s(e,i({success:t,error:t?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:r},"end","overall"))},_markInitNetworkReqStart:(e,t)=>{s(e,i(t,n,"initialize","network_request"))},_markInitNetworkReqEnd:(e,t)=>{s(e,i(t,"end","initialize","network_request"))},_markInitProcessStart:e=>{s(e,i({},n,"initialize","process"))},_markInitProcessEnd:(e,t)=>{s(e,i(t,"end","initialize","process"))},_clearMarkers:e=>{r.delete(e)},_formatError(e){if(e&&"object"==typeof e)return{code:o(e,"code"),name:o(e,"name"),message:o(e,"message")}},_getDiagnosticsData(e,r,n,i){var s;return{success:(null==e?void 0:e.ok)===!0,statusCode:null==e?void 0:e.status,sdkRegion:null===(s=null==e?void 0:e.headers)||void 0===s?void 0:s.get("x-statsig-region"),isDelta:!0===n.includes('"is_delta":true')||void 0,attempt:r,error:t.Diagnostics._formatError(i)}},_enqueueDiagnosticsEvent(e,r,n,i){let s=t.Diagnostics._getMarkers(n);if(null==s||s.length<=0)return -1;let o=s[s.length-1].timestamp-s[0].timestamp;t.Diagnostics._clearMarkers(n);let a=function(e,t){let r={eventName:"statsig::diagnostics",user:e,value:null,metadata:t,time:Date.now()};return r}(e,{context:"initialize",markers:s.slice(),statsigOptions:i});return r.enqueue(a),o}}},9549:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._fetchTxtRecords=void 0;let n=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),i=["i","e","d"];t._fetchTxtRecords=function(e){return r(this,void 0,void 0,function*(){let t=yield e("https://cloudflare-dns.com/dns-query",{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:n});if(!t.ok){let e=Error("Failed to fetch TXT records from DNS");throw e.name="DnsTxtFetchError",e}let r=yield t.arrayBuffer(),s=new Uint8Array(r);return function(e){let t=e.findIndex((t,r)=>r<200&&"="===String.fromCharCode(t)&&i.includes(String.fromCharCode(e[r-1])));if(-1===t){let e=Error("Failed to parse TXT records from DNS");throw e.name="DnsTxtParseError",e}let r="";for(let n=t-1;n<e.length;n++)r+=String.fromCharCode(e[n]);return r.split(",")}(s)})}},6831:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8896:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorBoundary=t.EXCEPTION_ENDPOINT=void 0;let i=r(9025),s=r(5881),o=r(6801);t.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";let a="[Statsig] UnknownError";function l(e){return e instanceof Error?e:"string"==typeof e?Error(e):Error("An unknown error occurred.")}t.ErrorBoundary=class{constructor(e,t,r,n){this._sdkKey=e,this._options=t,this._emitter=r,this._lastSeenError=n,this._seen=new Set}wrap(e,t){try{(function(e){let t=new Set,r=Object.getPrototypeOf(e);for(;r&&r!==Object.prototype;)Object.getOwnPropertyNames(r).filter(e=>"function"==typeof(null==r?void 0:r[e])).forEach(e=>t.add(e)),r=Object.getPrototypeOf(r);return Array.from(t)})(e).forEach(r=>{let n=e[r];"$EB"in n||(e[r]=(...i)=>this._capture(t?`${t}:${r}`:r,()=>n.apply(e,i)),e[r].$EB=!0)})}catch(e){this._onError("eb:wrap",e)}}logError(e,t){this._onError(e,t)}getLastSeenErrorAndReset(){let e=this._lastSeenError;return this._lastSeenError=void 0,null!=e?e:null}attachErrorIfNoneExists(e){this._lastSeenError||(this._lastSeenError=l(e))}_capture(e,t){try{let r=t();if(r&&r instanceof Promise)return r.catch(t=>this._onError(e,t));return r}catch(t){return this._onError(e,t),null}}_onError(e,r){try{i.Log.warn(`Caught error in ${e}`,{error:r}),n(this,void 0,void 0,function*(){var n,i,u,c,d,h,p;let f=r||Error(a),g=f instanceof Error,m=g?f.name:"No Name",y=l(f);if(this._lastSeenError=y,this._seen.has(m))return;if(this._seen.add(m),null===(i=null===(n=this._options)||void 0===n?void 0:n.networkConfig)||void 0===i?void 0:i.preventAllNetworkTraffic){null===(u=this._emitter)||void 0===u||u.call(this,{name:"error",error:r,tag:e});return}let v=s.SDKType._get(this._sdkKey),_=o.StatsigMetadataProvider.get(),b=g?f.stack:function(e){try{return JSON.stringify(e)}catch(e){return a}}(f),w=Object.assign({tag:e,exception:m,info:b,statsigOptions:function(e){if(!e)return{};let t={};return Object.keys(e).forEach(r=>{let n=e[r];switch(typeof n){case"number":case"bigint":case"boolean":t[String(r)]=n;break;case"string":n.length<50?t[String(r)]=n:t[String(r)]="set";break;case"object":"environment"===r?t.environment=n:"networkConfig"===r?t.networkConfig=n:t[String(r)]=null!=n?"set":"unset"}}),t}(this._options)},Object.assign(Object.assign({},_),{sdkType:v})),S=null!==(h=null===(d=null===(c=this._options)||void 0===c?void 0:c.networkConfig)||void 0===d?void 0:d.networkOverrideFunc)&&void 0!==h?h:fetch;yield S(t.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String(v),"STATSIG-SDK-VERSION":String(_.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(w)}),null===(p=this._emitter)||void 0===p||p.call(this,{name:"error",error:r,tag:e})}).then(()=>{}).catch(()=>{})}catch(e){}}}},624:function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0})},1335:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6156:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventLogger=void 0;let i=r(1867),s=r(6152),o=r(9025),a=r(3975),l=r(7631),u=r(9817),c=r(6790),d=r(8614),h=r(801),p=r(5260),f={},g={Startup:"startup",GainedFocus:"gained_focus"};class m{static _safeFlushAndForget(e){var t;null===(t=f[e])||void 0===t||t.flush().catch(()=>{})}static _safeRetryFailedLogs(e){var t;null===(t=f[e])||void 0===t||t._retryFailedLogs(g.GainedFocus)}constructor(e,t,r,n){var i,s;this._sdkKey=e,this._emitter=t,this._network=r,this._options=n,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=null!==(i=null==n?void 0:n.loggingEnabled)&&void 0!==i?i:(null==n?void 0:n.disableLogging)===!0?c.LoggingEnabledOption.disabled:c.LoggingEnabledOption.browserOnly,(null==n?void 0:n.loggingEnabled)&&void 0!==n.disableLogging&&o.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=null!==(s=null==n?void 0:n.loggingBufferMaxSize)&&void 0!==s?s:100;let l=null==n?void 0:n.networkConfig;this._logEventUrlConfig=new h.UrlConfiguration(a.Endpoint._rgstr,null==l?void 0:l.logEventUrl,null==l?void 0:l.api,null==l?void 0:l.logEventFallbackUrls)}setLogEventCompressionMode(e){this._network.setLogEventCompressionMode(e)}setLoggingEnabled(e){if("disabled"===this._loggingEnabled&&"disabled"!==e){let e=this._getStorageKey(),t=(0,d._getObjectFromStorage)(e);t&&this._queue.push(...t),d.Storage.removeItem(e)}this._loggingEnabled=e}enqueue(e){this._shouldLogEvent(e)&&(this._normalizeAndAppendEvent(e),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&m._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(e){var t;let r=null!==(t=this._nonExposedChecks[e])&&void 0!==t?t:0;this._nonExposedChecks[e]=r+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var e;let t=(0,l._isServerEnv)();t&&(null===(e=this._options)||void 0===e?void 0:e.loggingEnabled)!=="always"||(f[this._sdkKey]=this,t||(0,p._subscribeToVisiblityChanged)(e=>{"background"===e?m._safeFlushAndForget(this._sdkKey):"foreground"===e&&m._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(g.Startup),this._startBackgroundFlushInterval())}stop(){return n(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete f[this._sdkKey],yield this.flush()})}flush(){return n(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),0===this._queue.length)return;let e=this._queue;this._queue=[],yield this._sendEvents(e)})}_quickFlushIfNeeded(){!this._hasRunQuickFlush&&(this._hasRunQuickFlush=!0,Date.now()-this._creationTime>200||setTimeout(()=>m._safeFlushAndForget(this._sdkKey),200))}_shouldLogEvent(e){var t;if((null===(t=this._options)||void 0===t?void 0:t.loggingEnabled)!=="always"&&(0,l._isServerEnv)())return!1;if(!(0,u._isExposureEvent)(e))return!0;let r=e.user?e.user:{statsigEnvironment:void 0},n=(0,i._getUserStorageKey)(this._sdkKey,r),s=e.metadata?e.metadata:{},o=[e.eventName,n,s.gate,s.config,s.ruleID,s.allocatedExperiment,s.parameterName,String(s.isExplicitParameter),s.reason].join("|"),a=this._lastExposureTimeMap[o],c=Date.now();return(!a||!(c-a<6e5))&&(Object.keys(this._lastExposureTimeMap).length>1e3&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[o]=c,!0)}_sendEvents(e){return n(this,void 0,void 0,function*(){var t,r;if("disabled"===this._loggingEnabled)return this._saveFailedLogsToStorage(e),!1;try{let n=(0,p._isUnloading)(),i=n&&this._network.isBeaconSupported()&&(null===(r=null===(t=this._options)||void 0===t?void 0:t.networkConfig)||void 0===r?void 0:r.networkOverrideFunc)==null;this._emitter({name:"pre_logs_flushed",events:e});let s=i?this._sendEventsViaBeacon(e):yield this._sendEventsViaPost(e);if(s.success)return this._emitter({name:"logs_flushed",events:e}),!0;return o.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(e),!1}catch(e){return o.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(e){return n(this,void 0,void 0,function*(){var t;let r=yield this._network.post(this._getRequestData(e)),n=null!==(t=null==r?void 0:r.code)&&void 0!==t?t:-1;return{success:n>=200&&n<300}})}_sendEventsViaBeacon(e){return{success:this._network.beacon(this._getRequestData(e))}}_getRequestData(e){return{sdkKey:this._sdkKey,data:{events:e},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[a.NetworkParam.EventC
26ount]:String(e.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(e){for(;e.length>500;)e.shift();let t=this._getStorageKey();try{let r=this._getFailedLogsFromStorage(t);(0,d._setObjectInStorage)(t,[...r,...e])}catch(e){o.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(e){let t=[];try{let r=(0,d._getObjectFromStorage)(e);return Array.isArray(r)&&(t=r),t}catch(e){return[]}}_retryFailedLogs(e){let t=this._getStorageKey();n(this,void 0,void 0,function*(){d.Storage.isReady()||(yield d.Storage.isReadyResolver());let r=(0,d._getObjectFromStorage)(t);if(!r)return;e===g.Startup&&d.Storage.removeItem(t);let n=yield this._sendEvents(r);n&&e===g.GainedFocus&&d.Storage.removeItem(t)}).catch(()=>{o.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,s._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(e){e.user&&(e.user=Object.assign({},e.user),delete e.user.privateAttributes);let t={},r=this._getCurrentPageUrl();r&&(t.statsigMetadata={currentPage:r});let n=Object.assign(Object.assign({},e),t);o.Log.debug("Enqueued Event:",n),this._queue.push(n)}_appendAndResetNonExposedChecks(){0!==Object.keys(this._nonExposedChecks).length&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var e;if((null===(e=this._options)||void 0===e?void 0:e.includeCurrentPageUrlWithEvents)!==!1)return(0,l._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var e,t;let r=null!==(t=null===(e=this._options)||void 0===e?void 0:e.loggingIntervalMs)&&void 0!==t?t:1e4,n=setInterval(()=>{let e=f[this._sdkKey];e&&e._flushIntervalId===n?m._safeFlushAndForget(this._sdkKey):clearInterval(n)},r);this._flushIntervalId=n}}t.EventLogger=m},6152:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getSortedObject=t._DJB2Object=t._DJB2=void 0;let n=r(8687);t._DJB2=e=>{let t=0;for(let r=0;r<e.length;r++){let n=e.charCodeAt(r);t=(t<<5)-t+n,t&=t}return String(t>>>0)},t._DJB2Object=(e,r)=>(0,t._DJB2)(JSON.stringify((0,t._getSortedObject)(e,r))),t._getSortedObject=(e,r)=>{if(null==e)return null;let i=Object.keys(e).sort(),s={};return i.forEach(i=>{let o=e[i];if(0===r||"object"!==(0,n._typeOf)(o)){s[i]=o;return}s[i]=(0,t._getSortedObject)(o,null!=r?r-1:r)}),s}},6724:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9025:function(e,t){"use strict";function r(e){return e.unshift("[Statsig]"),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Log=t.LogLevel=void 0,t.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class n{static info(...e){n.level>=t.LogLevel.Info&&console.info(" INFO ",...r(e))}static debug(...e){n.level>=t.LogLevel.Debug&&console.debug(" DEBUG ",...r(e))}static warn(...e){n.level>=t.LogLevel.Warn&&console.warn(" WARN ",...r(e))}static error(...e){n.level>=t.LogLevel.Error&&console.error(" ERROR ",...r(e))}}t.Log=n,n.level=t.LogLevel.Warn},1231:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMemoKey=t.MemoPrefix=void 0,t.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};let r=new Set([]),n=new Set(["userPersistedValues"]);t.createMemoKey=function(e,t,i){let s=`${e}|${t}`;if(!i)return s;for(let e of Object.keys(i)){if(n.has(e))return;r.has(e)?s+=`|${e}=true`:s+=`|${e}=${i[e]}`}return s}},3975:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkParam=t.NetworkDefault=t.Endpoint=void 0,t.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},t.NetworkDefault={[t.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[t.Endpoint._initialize]:"https://featureassets.org/v1",[t.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},t.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}},3284:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};
26Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkCore=void 0,r(375);let i=r(375),s=r(642),o=r(9025),a=r(3975),l=r(4930),u=r(1753),c=r(5881),d=r(7631),h=r(7995),p=r(3463),f=r(6478),g=r(6801),m=r(6790),y=r(5260),v=new Set([408,500,502,503,504,522,524,599]);t.NetworkCore=class{constructor(e,t){this._emitter=t,this._errorBoundary=null,this._timeout=1e4,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,e&&(this._options=e),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new l.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(e))}setLogEventCompressionMode(e){this._options.logEventCompressionMode=e}setErrorBoundary(e){this._errorBoundary=e,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(e)}isBeaconSupported(){return"undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon}getLastUsedInitUrlAndReset(){let e=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,e}beacon(e){if(!_(e))return!1;let t=this._getInternalRequestArgs("POST",e),r=this._getPopulatedURL(t),n=navigator;return n.sendBeacon.bind(n)(r,t.body)}post(e){return n(this,void 0,void 0,function*(){let t=this._getInternalRequestArgs("POST",e);return this._tryEncodeBody(t),yield this._tryToCompressBody(t),this._sendRequest(t)})}get(e){let t=this._getInternalRequestArgs("GET",e);return this._sendRequest(t)}_sendRequest(e){return n(this,void 0,void 0,function*(){var t,r,i,l;if(!_(e)||this._netConfig.preventAllNetworkTraffic)return null;let{method:u,body:c,retries:d,attempt:h}=e,p=e.urlConfig.endpoint;if(this._isRateLimited(p))return o.Log.warn(`Request to ${p} was blocked because you are making requests too frequently.`),null;let g=null!=h?h:1,m=!1,b=this._getPopulatedURL(e),S=null,C=(0,y._isUnloading)();try{let r;let n={method:u,body:c,headers:Object.assign({},e.headers),priority:e.priority,keepalive:C};e.urlConfig.endpoint===a.Endpoint._initialize&&s.Diagnostics._markInitNetworkReqStart(e.sdkKey,{attempt:g});let i=this._leakyBucket[p];i&&(i.lastRequestTime=Date.now(),this._leakyBucket[p]=i);let o=null!==(t=this._netConfig.networkOverrideFunc)&&void 0!==t?t:fetch;if(!(S=yield Promise.race([o(b,n).finally(()=>clearTimeout(r)),new Promise((e,t)=>{r=setTimeout(()=>{m=!0,t(Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})])).ok){let e=yield S.text().catch(()=>"No Text"),t=Error(`NetworkError: ${b} ${e}`);throw t.name="NetworkError",t}let l=yield S.text();return w(e,S,g,l),this._fallbackResolver.tryBumpExpiryTime(e.sdkKey,e.urlConfig),{body:l,code:S.status}}catch(c){let t="string"==typeof c?c:c instanceof Error?`${c.name}: ${c.message}`:"Unknown Error",s=function(e,t){let r=e.includes("Timeout");return r||t}(null!=t?t:"",m);w(e,S,g,"",c);let a=yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(e.sdkKey,e.urlConfig,t,s);if(a&&(e.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(e.sdkKey,e.urlConfig)),!d||g>d||!v.has(null!==(r=null==S?void 0:S.status)&&void 0!==r?r:500)){null===(i=this._emitter)||void 0===i||i.call(this,{name:"error",error:c,tag:f.ErrorTag.NetworkError,requestArgs:e});let r=`A networking error occurred during ${u} request to ${b}.`;return o.Log.error(r,t,c),null===(l=this._errorBoundary)||void 0===l||l.attachErrorIfNoneExists(r),null}return yield function(e){return n(this,void 0,void 0,function*(){yield new Promise(t=>setTimeout(t,Math.min(500*(e*e),3e4)))})}(g),this._sendRequest(Object.assign(Object.assign({},e),{retries:d,attempt:g+1}))}})}_getLogEventCompressionMode(e){let t=null==e?void 0:e.logEventCompressionMode;return t||(null==e?void 0:e.disableCompression)!==!0||(t=m.LogEventCompressionMode.Disabled),t||(t=m.LogEventCompressionMode.Enabled),t}_isRateLimited(e){var t;let r=Date.now(),n=null!==(t=this._leakyBucket[e])&&void 0!==t?t:{count:0,lastRequestTime:r},i=r-n.lastRequestTime;return n.count=Math.max(0,n.count-Math.floor(.05*i)),n.count>=50||(n.count+=1,n.lastRequestTime=r,this._leakyBucket[e]=n,!1)}_getPopulatedURL(e){var t;let r=null!==(t=e.fallbackUrl)&&void 0!==t?t:e.urlConfig.getUrl();(e.urlConfig.endpoint===a.Endpoint._initialize||e.urlConfig.endpoint===a.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=r);let n=Object.assign({[a.NetworkParam.SdkKey]:e.sdkKey,[a.NetworkParam.SdkType]:c.SDKType._get(e.sdkKey),[a.NetworkParam.SdkVersion]:g.SDK_VERSION,[a.NetworkParam.Time]:String(Date.now()),[a.NetworkParam.SessionID]:h.SessionID.get(e.sdkKey)},e.params),i=Object.keys(n).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(n[e])}`).join("&");return`${r}${i?`?${i}`:""}`}_tryEncodeBody(e){var t;let r=(0,d._getWindowSafe)(),n=e.body;if(e.isStatsigEncodable&&!this._options.disableStatsigEncoding&&"string"==typeof n&&null==(0,i._getStatsigGlobalFlag)("no-encode")&&(null==r?void 0:r.btoa))try{e.body=r.btoa(n).split("").reverse().join(""),e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[a.NetworkParam.StatsigEncoded]:"1"})}catch(t){o.Log.warn(`Request encoding failed for ${e.urlConfig.getUrl()}`,t)}}_tryToCompressBody(e){return n(this,void 0,void 0,function*(){var t;let r=e.body;if("string"==typeof r&&function(e,t){if(!e.isCompressable||null!=(0,i._getStatsigGlobalFlag)("no-compress")||"undefined"==typeof CompressionStream||"undefined"==typeof TextEncoder)return!1;let r=null!=e.urlConfig.customUrl||null!=e.urlConfig.fallbackUrls,n=!0===u.SDKFlags.get(e.sdkKey,"enable_log_event_compression");switch(t.logEventCompressionMode){case m.LogEventCompressionMode.Disabled:return!1;case m.LogEventCompressionMode.Enabled:if(r&&!n)return!1;return!0;case m.LogEventCompressionMode.Forced:return!0;default:return!1}}(e,this._options))try{let n;let i=new TextEncoder().encode(r),s=new CompressionStream("gzip"),l=s.writable.getWriter();l.write(i).catch(o.Log.error),l.close().catch(o.Log.error);let u=s.readable.getReader(),c=[];for(;!(n=yield u.read()).done;)c.push(n.value);let d=c.reduce((e,t)=>
26e+t.length,0),h=new Uint8Array(d),p=0;for(let e of c)h.set(e,p),p+=e.length;e.body=h,e.params=Object.assign(Object.assign({},null!==(t=e.params)&&void 0!==t?t:{}),{[a.NetworkParam.IsGzipped]:"1"})}catch(t){o.Log.warn(`Request compression failed for ${e.urlConfig.getUrl()}`,t)}})}_getInternalRequestArgs(e,t){let r=this._fallbackResolver.getActiveFallbackUrl(t.sdkKey,t.urlConfig),n=Object.assign(Object.assign({},t),{method:e,fallbackUrl:r});return"data"in t&&b(n,t.data),n}};let _=e=>!!e.sdkKey||(o.Log.warn("Unable to make request without an SDK key"),!1),b=(e,t)=>{let{sdkKey:r,fallbackUrl:n}=e,i=p.StableID.get(r),s=h.SessionID.get(r),o=c.SDKType._get(r);e.body=JSON.stringify(Object.assign(Object.assign({},t),{statsigMetadata:Object.assign(Object.assign({},g.StatsigMetadataProvider.get()),{stableID:i,sessionID:s,sdkType:o,fallbackUrl:n})}))};function w(e,t,r,n,i){e.urlConfig.endpoint===a.Endpoint._initialize&&s.Diagnostics._markInitNetworkReqEnd(e.sdkKey,s.Diagnostics._getDiagnosticsData(t,r,n,i))}},4930:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t._isDomainFailure=t.NetworkFallbackResolver=void 0;let i=r(9549),s=r(6152),o=r(9025),a=r(8614);function l(e,t){var r;let n=null!==(r=null==e?void 0:e.toLowerCase())&&void 0!==r?r:"";return t||n.includes("uncaught exception")||n.includes("failed to fetch")||n.includes("networkerror when attempting to fetch resource")}function u(e){return`statsig.network_fallback.${(0,s._DJB2)(e)}`}function c(e,t){let r=u(e);if(!t||0===Object.keys(t).length){a.Storage.removeItem(r);return}a.Storage.setItem(r,JSON.stringify(t))}t.NetworkFallbackResolver=class{constructor(e){var t;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=null===(t=e.networkConfig)||void 0===t?void 0:t.networkOverrideFunc}setErrorBoundary(e){this._errorBoundary=e}tryBumpExpiryTime(e,t){var r;let n=null===(r=this._fallbackInfo)||void 0===r?void 0:r[t.endpoint];n&&(n.expiryTime=Date.now()+6048e5,c(e,Object.assign(Object.assign({},this._fallbackInfo),{[t.endpoint]:n})))}getActiveFallbackUrl(e,t){var r,n;if(null!=t.customUrl&&null!=t.fallbackUrls)return null;let i=this._fallbackInfo;null==i&&(i=null!==(r=function(e){let t=u(e),r=a.Storage.getItem(t);if(!r)return null;try{return JSON.parse(r)}catch(e){return o.Log.error("Failed to parse FallbackInfo"),null}}(e))&&void 0!==r?r:{},this._fallbackInfo=i);let s=i[t.endpoint];return!s||Date.now()>(null!==(n=s.expiryTime)&&void 0!==n?n:0)||t.getChecksum()!==s.urlConfigChecksum?(delete i[t.endpoint],this._fallbackInfo=i,c(e,this._fallbackInfo),null):s.url?s.url:null}tryFetchUpdatedFallbackInfo(e,t,r,i){return n(this,void 0,void 0,function*(){var n,s;try{if(!l(r,i))return!1;let s=null==t.customUrl&&null==t.fallbackUrls,o=s?yield this._tryFetchFallbackUrlsFromNetwork(t):t.fallbackUrls,a=this._pickNewFallbackUrl(null===(n=this._fallbackInfo)||void 0===n?void 0:n[t.endpoint],o);if(!a)return!1;return this._updateFallbackInfoWithNewUrl(e,t,a),!0}catch(e){return null===(s=this._errorBoundary)||void 0===s||s.logError("tryFetchUpdatedFallbackInfo",e),!1}})}_updateFallbackInfoWithNewUrl(e,t,r){var n,i,s;let o={urlConfigChecksum:t.getChecksum(),url:r,expiryTime:Date.now()+6048e5,previous:[]},a=t.endpoint,l=null===(n=this._fallbackInfo)||void 0===n?void 0:n[a];l&&o.previous.push(...l.previous),o.previous.length>10&&(o.previous=[]);let u=null===(s=null===(i=this._fallbackInfo)||void 0===i?void 0:i[a])||void 0===s?void 0:s.url;null!=u&&o.previous.push(u),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[a]:o}),c(e,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(e){return n(this,void 0,void 0,function*(){var t;let r=this._dnsQueryCooldowns[e.endpoint];if(r&&Date.now()<r)return null;this._dnsQueryCooldowns[e.endpoint]=Date.now()+144e5;let n=[],s=yield(0,i._fetchTxtRecords)(null!==(t=this._networkOverrideFunc)&&void 0!==t?t:fetch),o=function(e){try{let t=new URL(e);return t.pathname}catch(e){return null}}(e.defaultUrl);for(let t of s){if(!t.startsWith(e.endpointDnsKey+"="))continue;let r=t.split("=");if(r.length>1){let e=r[1];e.endsWith("/")&&(e=e.slice(0,-1)),n.push(`https://${e}${o}
26`)}}return n})}_pickNewFallbackUrl(e,t){var r;if(null==t)return null;let n=new Set(null!==(r=null==e?void 0:e.previous)&&void 0!==r?r:[]),i=null==e?void 0:e.url,s=null;for(let e of t){let t=e.endsWith("/")?e.slice(0,-1):e;if(!n.has(e)&&t!==i){s=t;break}}return s}},t._isDomainFailure=l},34:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4632:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1753:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SDKFlags=void 0;let r={};t.SDKFlags={setFlags:(e,t)=>{r[e]=t},get:(e,t)=>{var n,i;return null!==(i=null===(n=r[e])||void 0===n?void 0:n[t])&&void 0!==i&&i}}},5881:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),t.SDKType=void 0;let n={};t.SDKType={_get:e=>{var t;return(null!==(t=n[e])&&void 0!==t?t:"js-mono")+(null!=r?r:"")},_setClientType(e,t){n[e]=t},_setBindingType(e){r&&"-react"!==r||(r="-"+e)}}},7631:function(e,t,r){"use strict";var n=r(3454);Object.defineProperty(t,"__esModule",{value:!0}),t._getUnloadEvent=t._getCurrentPageUrlSafe=t._addDocumentEventListenerSafe=t._addWindowEventListenerSafe=t._isServerEnv=t._getDocumentSafe=t._getWindowSafe=void 0,t._getWindowSafe=()=>"undefined"!=typeof window?window:null,t._getDocumentSafe=()=>{var e;let r=(0,t._getWindowSafe)();return null!==(e=null==r?void 0:r.document)&&void 0!==e?e:null},t._isServerEnv=()=>{if(null!==(0,t._getDocumentSafe)())return!1;let e=void 0!==n&&null!=n.versions&&null!=n.versions.node,r="string"==typeof EdgeRuntime;return r||e},t._addWindowEventListenerSafe=(e,r)=>{let n=(0,t._getWindowSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._addDocumentEventListenerSafe=(e,r)=>{let n=(0,t._getDocumentSafe)();"function"==typeof(null==n?void 0:n.addEventListener)&&n.addEventListener(e,r)},t._getCurrentPageUrlSafe=()=>{var e;try{return null===(e=(0,t._getWindowSafe)())||void 0===e?void 0:e.location.href.split(/[?#]/)[0]}catch(e){return}},t._getUnloadEvent=()=>{let e=(0,t._getWindowSafe)();return e&&"onpagehide"in e?"pagehide":"beforeunload"}},7995:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigSession=t.SessionID=void 0;let n=r(375),i=r(1867),s=r(9025),o=r(8614),a=r(9382),l={};function u(e,t){return setTimeout(()=>{var t;let r=null===(t=(0,n._getStatsigGlobal)())||void 0===t?void 0:t.instance(e);r&&r.$emt({name:"session_expired"})},t)}function c(e){return`statsig.session_id.${(0,i._getStorageKey)(e)}`}t.SessionID={get:e=>t.StatsigSession.get(e).data.sessionID},t.StatsigSession={get:e=>{null==l[e]&&(l[e]=function(e){let t=function(e){let t=c(e);return(0,o._getObjectFromStorage)(t)}(e),r=Date.now();return t||(t={sessionID:(0,a.getUUID)(),startTime:r,lastUpdate:r}),{data:t,sdkKey:e}}(e));let t=l[e];return function(e){let t=Date.now(),r=e.data,n=e.sdkKey;if(function({lastUpdate:e}){return Date.now()-e>18e5}(r)||function({startTime:e}){return Date.now()-e>144e5}(r)){r.sessionID=(0,a.getUUID)(),r.startTime=t;let e=null==__STATSIG__?void 0:__STATSIG__.instance(n);e&&e.$emt({name:"session_expired"})}r.lastUpdate=t,function(e,t){let r=c(t);try{(0,o._setObjectInStorage)(r,e)}catch(e){s.Log.warn("Failed to save SessionID")}}(r,e.sdkKey),clearTimeout(e.idleTimeoutID),clearTimeout(e.ageTimeoutID);let i=t-r.startTime;return e.idleTimeoutID=u(n,18e5),e.ageTimeoutID=u(n,144e5-i),e}(t)},overrideInitialSessionID:(e,t)=>{l[t]=function(e,t){let r=Date.now();return{data:{sessionID:e,startTime:r,lastUpdate:r},sdkKey:t}}(e,t)}}},1486:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._fastApproxSizeOf=void 0,t._fastApproxSizeOf=(e,r)=>{let n=0,i=Object.keys(e);for(let s=0;s<i.length;s++){let o=i[s],a=e[o];if(n+=o.length,"object"==typeof a&&null!==a?n+=(0,t._fastApproxSizeOf)(a,r)+2:n+=String(a).length+1,n>=r)break}return n}},3463:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCookieName=t.StableID=void 0;let n=r(1867),i=r(9025),s=r(7631),o=r(8614),a=r(9382),l={},u={},c={};function d(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}function h(e,t){let r=d(t);try{(0,o._setObjectInStorage)(r,e)}catch(e){i.Log.warn("Failed to save StableID to storage")}}function p(e,t){if(!u[t]||null==(0,s._getDocumentSafe)())return;let r=new Date;r.setFullYear(r.getFullYear()+1),document.cookie=`${f(t)}=${encodeURIComponent(e)}; expires=${r.toUTCString()}; path=/`}function f(e){return`statsig.stable_id.${(0,n._getStorageKey)(e)}`}t.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:e=>{if(c[e])return null;if(null!=l[e])return l[e];let t=null;return null!=(t=function(e){if(!u[e]||null==(0,s._getDocumentSafe)())return null;let t=document.cookie.split(";");for(let r of t){let[t,n]=r.trim().split("=");if(t===f(e))return decodeURIComponent(n)}return null}(e))?(l[e]=t,h(t,e),t):(null==(t=function(e){let t=d(e);return(0,o._getObjectFromStorage)(t)}(e))&&(t=(0,a.getUUID)()),h(t,e),p(t,e),l[e]=t,t)},setOverride:(e,t)=>{l[t]=e,h(e,t),p(e,t)}
26,_setCookiesEnabled:(e,t)=>{u[e]=t},_setDisabled:(e,t)=>{c[e]=t}},t.getCookieName=f},4850:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClientBase=void 0,r(375);let i=r(375),s=r(8896),o=r(6156),a=r(9025),l=r(1231),u=r(7631),c=r(7995),d=r(3463),h=r(6790),p=r(8614);t.StatsigClientBase=class{constructor(e,t,r,n){var l,h,f,g;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};let m=this.$emt.bind(this);(null==n?void 0:n.logLevel)!=null&&(a.Log.level=n.logLevel),(null==n?void 0:n.disableStorage)&&p.Storage._setDisabled(!0),(null==n?void 0:n.initialSessionID)&&c.StatsigSession.overrideInitialSessionID(n.initialSessionID,e),(null==n?void 0:n.storageProvider)&&p.Storage._setProvider(n.storageProvider),(null==n?void 0:n.enableCookies)&&d.StableID._setCookiesEnabled(e,n.enableCookies),(null==n?void 0:n.disableStableID)&&d.StableID._setDisabled(e,!0),this._sdkKey=e,this._options=null!=n?n:{},this._memoCache={},this.overrideAdapter=null!==(l=null==n?void 0:n.overrideAdapter)&&void 0!==l?l:null,this._logger=new o.EventLogger(e,m,r,n),this._errorBoundary=new s.ErrorBoundary(e,n,m),this._errorBoundary.wrap(this),this._errorBoundary.wrap(t),this._errorBoundary.wrap(this._logger),r.setErrorBoundary(this._errorBoundary),this.dataAdapter=t,this.dataAdapter.attach(e,n,r),this.storageProvider=p.Storage,null===(g=null===(f=null===(h=this.overrideAdapter)||void 0===h?void 0:h.loadFromStorage)||void 0===f?void 0:f.call(h))||void 0===g||g.catch(e=>this._errorBoundary.logError("OA::loadFromStorage",e)),this._primeReadyRipcord(),function(e,t){var r;if((0,u._isServerEnv)())return;let n=(0,i._getStatsigGlobal)(),s=null!==(r=n.instances)&&void 0!==r?r:{};null!=s[e]&&a.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),s[e]=t,n.firstInstance||(n.firstInstance=t),n.instances=s,__STATSIG__=n}(e,this)}updateRuntimeOptions(e){e.loggingEnabled?(this._options.loggingEnabled=e.loggingEnabled,this._logger.setLoggingEnabled(e.loggingEnabled)):null!=e.disableLogging&&(this._options.disableLogging=e.disableLogging,this._logger.setLoggingEnabled(e.disableLogging?"disabled":"browser-only")),null!=e.disableStorage&&(this._options.disableStorage=e.disableStorage,p.Storage._setDisabled(e.disableStorage)),null!=e.enableCookies&&(this._options.enableCookies=e.enableCookies,d.StableID._setCookiesEnabled(this._sdkKey,e.enableCookies)),e.logEventCompressionMode?this._logger.setLogEventCompressionMode(e.logEventCompressionMode):e.disableCompression&&this._logger.setLogEventCompressionMode(h.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return n(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(e,t){this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t)}off(e,t){if(this._listeners[e]){let r=this._listeners[e].indexOf(t);-1!==r&&this._listeners[e].splice(r,1)}}$on(e,t){t.__isInternal=!0,this.on(e,t)}$emt(e){var t;let r=t=>{try{t(e)}catch(r){if(!0===t.__isInternal){this._errorBoundary.logError(`__emit:${e.name}`,r);return}a.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",e)}};this._listeners[e.name]&&this._listeners[e.name].forEach(e=>r(e)),null===(t=this._listeners["*"])||void 0===t||t.forEach(r)}_setStatus(e,t){this.loadingStatus=e,this._memoCache={},this.$emt({name:"values_updated",status:e,values:t})}_enqueueExposure(e,t,r){if((null==r?void 0:r.disableExposureLog)===!0){this._logger.incrementNonExposureCount(e);return}this._logger.enqueue(t)}_memoize(e,t){return(r,n)=>{if(this._options.disableEvaluationMemoization)return t(r,n);let i=(0,l.createMemoKey)(e,r,n);return i?(i in this._memoCache||(Object.keys(this._memoCache).length>=3e3&&(this._memoCache={}),this._memoCache[i]=t(r,n)),this._memoCache[i]):t(r,n)}}}},6478:function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorTag=void 0,t.ErrorTag={NetworkError:"NetworkError"}},712:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataAdapterCachePrefix=void 0,t.DataAdapterCachePrefix="statsig.cached"},9817:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._createLayerParameterExposure=t._createConfigExposure=t._mapExposures=t._createGateExposure=t._isExposureEvent=void 0;let r="statsig::config_exposure",n="statsig::gate_exposure",i="statsig::layer_exposure",s=(e,t,r,n,i)=>(r.bootstrapMetadata&&(n.bootstrapMetadata=r.bootstrapMetadata),{eventName:e,user:t,value:null,metadata:a(r,n),secondaryExposures:i,time:Date.now()});function o(e,t){return e.map(e=>"string"==typeof e?(null!=t?t:{})[e]:e).filter(e=>null!=e)}t._isExposureEvent=({eventName:e})=>e===n||e===r||e===i,t._createGateExposure=(e,t,r)=>{var i,a,l;let u={gate:t.name,gateValue:String(t.value),ruleID:t.ruleID};return(null===(i=t.__evaluation)||void 0===i?void 0:i.version)!=null&&(u.configVersion=t.__evaluation.version),s(n,e,t.details,u,o(null!==(l=null===(a=t.__evaluation)||void 0===a?void 0:a.secondary_exposures)&&void 0!==l?l:[],r))},t._mapExposures=o,t._createConfigExposure=(e,t,n)=>{var i,a,l,u;let c={config:t.name,ruleID:t.ruleID};return(null===(i=t.__evaluation)||void 0===i?void 0:i.version)!=null&&(c.configVersion=t.__evaluation.version),(null===(a=t.__evaluation)||void 0===a?void 0:a.passed)!=null&&(c.rulePassed=String(t.__evaluation.passed)),s(r,e,t.details,c,o(null!==(u=null===(l=t.__evaluation)||void 0===l?void 0:l.secondary_exposures)&&void 0!==u?u:[],n))},t._createLayerParameterExposure=(e,t,r,n)=>{var a,l,u,c,d,h,p;let f=t.__evaluation,g=(null===(a=null==f?void 0:f.explicit_parameters)||void 0===a?void 0:a.includes(r))===!0,m="",y=null!==(l=null==f?void 0:f.undelegated_secondary_exposures)&&void 0!==l?l:[];g&&(m=null!==(u=f.allocated_experiment_name)&&void 0!==u?u:"",y=null!==(c=f.secondary_exposures)&&void 0!==c?c:[]);let v=null===(d=t.__evaluation)||void 0===d?void 0:d.parameter_rule_ids,_={config:t.name,parameterName:r,ruleID:null!==(h=null==v?void 0:v[r])&&void 0!==h?h:t.ruleID,allocatedExperiment:m,isExplicitParameter:String(g)};return(null===(p=t.__evaluation)||void 0===p?void 0:p.version)!=null&&(_.configVersion=t.__evaluation.version),s(i,e,t.details,_,o(y,n))};let a=(e,t)=>(t.reason=e.reason,e.lcut&&(t.lcut=String(e.lcut)),e.receivedAt&&(t.receivedAt=String(e.receivedAt)),t)},6801:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigMetadataProvider=t.SDK_VERSION=void 0,t.SDK_VERSION="3.29.1";let r={sdkVersion:t.SDK_VERSION,sdkType:"js-mono"};t.StatsigMetadataProvider={get:()=>r,add:e=>{r=Object.assign(Object.assign({},r),e)}}},6790:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoggingEnabledOption=t.LogEventCompressionMode=void 0,t.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},t.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"}},1497:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8431:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._makeTypedGet=t._mergeOverride=t._makeLayer=t._makeExperiment=t._makeDynamicConfig=t._makeFeatureGate=void 0;let n=r(9025),i=r(8687);function s(e,t,r,n){var i;return{name:e,details:t,ruleID:null!==(i=null==r?void 0:r.rule_id)&&void 0!==i?i:"",__evaluation:r,value:n}}function o(e,t,r){var n,i;let o=null!==(n=null==r?void 0:r.value)&&void 0!==n?n:{};return Object.assign(Object.assign({},s(e,t,r,o)),{idType:null!==(i=null==r?void 0:r.id_type)&&void 0!==i?i:null,get:a(e,null==r?void 0:r.value)})}function a(e,t,r){return(s,o)=>{var a;let l=null!==(a=null==t?void 0:t[s])&&void 0!==a?a:null;return null==l?null!=o?o:null:null==o||(0,i._isTypeMatch)(l,o)?(null==r||r(s),l):(n.Log.warn(`Parameter type mismatch. '${e}.${s}' was found to be type '${typeof l}' but fallback/return type is '${typeof o}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),null!=o?o:null)}}t._makeFeatureGate=function(e,t,r){var n;return Object.assign(Object.assign({},s(e,t,r,(null==r?void 0:r.value)===!0)),{idType:null!==(n=null==r?void 0:r.id_type)&&void 0!==n?n:null})},t._makeDynamicConfig=o,t._makeExperiment=function(e,t,r){var n;let i=o(e,t,r);return Object.assign(Object.assign({},i),{groupName:null!==(n=null==r?void 0:r.group_name)&&void 0!==n?n:null})},t._makeLayer=function(e,t,r,n){var i,o;return Object.assign(Object.assign({},s(e,t,r,void 0)),{get:a(e,null==r?void 0:r.value,n),groupName:null!==(i=null==r?void 0:r.group_name)&&void 0!==i?i:null,__value:null!==(o=null==r?void 0:r.value)&&void 0!==o?o:{}})},t._mergeOverride=function(e,t,r,n){return Object.assign(Object.assign(Object.assign({},e),t),{get:a(e.name,r,n)})},t._makeTypedGet=a},7963:function(e,t){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0})},5051:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPDATE_DETAIL_ERROR_MESSAGES=t.createUpdateDetails=void 0,t.createUpdateDetails=(e,t,r,n,i,s)=>({duration:r,source:t,success:e,error:n,sourceUrl:i,warnings:s}),t.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."}},9063:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getFullUserHash=t._normalizeUser=void 0;let n=r(6152),i=r(9025);t._normalizeUser=function(e,t,r){try{let n=JSON.parse(JSON.stringify(e));return null!=t&&null!=t.environment?n.statsigEnvironment=t.environment:null!=r&&(n.statsigEnvironment={tier:r}),n}catch(e){return i.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}},t._getFullUserHash=function(e){return e?(0,n._DJB2Object)(e):null}},8614:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._setObjectInStorage=t._getObjectFromStorage=t.Storage=void 0;let n=r(9025),i=r(7631),s={},o={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:e=>s[e]?s[e]:null,setItem:(e,t)=>{s[e]=t},removeItem:e=>{delete s[e]},getAllKeys:()=>Object.keys(s)},a=null;try{let e=(0,i._getWindowSafe)();e&&e.localStorage&&"function"==typeof e.localStorage.getItem&&(a={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:t=>e.localStorage.getItem(t),setItem:(t,r)=>e.localStorage.setItem(t,r),removeItem:t=>e.localStorage.removeItem(t),getAllKeys:()=>Object.keys(e.localStorage)})}catch(e){n.Log.warn("Failed to setup localStorageProvider.")}let l=null!=a?a:o,u=l;function c(e){try{return e()}catch(e){if(e instanceof Error&&"SecurityError"===e.name)return t.Storage._setProvider(o),null;throw e}}t.Storage={isReady:()=>u.isReady(),isReadyResolver:()=>u.isReadyResolver(),getProviderName:()=>u.getProviderName(),getItem:e=>c(()=>u.getItem(e)),setItem:(e,t)=>c(()=>u.setItem(e,t)),removeItem:e=>u.removeItem(e),getAllKeys:()=>u.getAllKeys(),_setProvider:e=>{l=e,u=e},_setDisabled:e=>{u=e?o:l}},t._getObjectFromStorage=function(e){let r=t.Storage.getItem(e);return JSON.parse(null!=r?r:"null")},t._setObjectInStorage=function(e,r){t.Storage.setItem(e,JSON.stringify(r))}},3111:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._typedJsonParse=void 0;let n=r(9025);t._typedJsonParse=function(e,t,r){try{let r=JSON.parse(e);if(r&&"object"==typeof r&&t in r)return r}catch(e){}return n.Log.error(`Failed to parse ${r}`),null}},8687:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._isTypeMatch=t._typeOf=void 0,t._typeOf=function(e){return Array.isArray(e)?"array":typeof e},t._isTypeMatch=function(e,t){let r=e=>Array.isArray(e)?"array":null===e?"null":typeof e;return r(e)===r(t)}},9382:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUUID=void 0,t.getUUID=function(){if("undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID)return crypto.randomUUID();let e=new Date().getTime(),t="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0,r="89ab"[Math.floor(4*Math.random())];return`xxxxxxxx-xxxx-4xxx-${r}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,r=>{let n=16*Math.random();return e>0?(n=(e+n)%16|0,e=Math.floor(e/16)):(n=(t+n)%16|0,t=Math.floor(t/16)),("x"===r?n:7&n|8).toString(16)})}},801:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlConfiguration=void 0;let n=r(6152),i=r(3975),s={[i.Endpoint._initialize]:"i",[i.Endpoint._rgstr]:"e",[i.Endpoint._download_config_specs]:"d"};t.UrlConfiguration=class{constructor(e,t,r,n){this.customUrl=null,this.fallbackUrls=null,this.endpoint=e,this.endpointDnsKey=s[e],t&&(this.customUrl=t),!t&&r&&(this.customUrl=r.endsWith("/")?`${r}${e}`:`${r}/${e}`),n&&(this.fallbackUrls=n);let o=i.NetworkDefault[e];this.defaultUrl=`${o}/${e}`}getUrl(){var e;return null!==(e=this.customUrl)&&void 0!==e?e:this.defaultUrl}getChecksum(){var e;let t=(null!==(e=this.fallbackUrls)&&void 0!==e?e:[]).sort().join(",");return(0,n._DJB2)(this.customUrl+t)}}},5260:function(e,t,r){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t._notifyVisibilityChanged=t._subscribeToVisiblityChanged=t._isUnloading=t._isCurrentlyVisible=void 0;let n=r(7631),i="foreground",s="background",o=[],a=i,l=!1;t._isCurrentlyVisible=()=>a===i,t._isUnloading=()=>l,t._subscribeToVisiblityChanged=e=>{o.unshift(e)},t._notifyVisibilityChanged=e=>{e!==a&&(a=e,o.forEach(t=>t(e)))},(0,n._addWindowEventListenerSafe)("focus",()=>{l=!1,(0,t._notifyVisibilityChanged)(i)}),(0,n._addWindowEventListenerSafe)("blur",()=>(0,t._notifyVisibilityChanged)(s)),(0,n._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,t._notifyVisibilityChanged)("visible"===document.visibilityState?i:s)}),(0,n._addWindowEventListenerSafe)((0,n._getUnloadEvent)(),()=>{l=!0,(0,t._notifyVisibilityChanged)(s)})},3328:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.Log=t.EventLogger=t.Diagnostics=void 0,r(375);let s=r(375),o=r(642);Object.defineProperty(t,"Diagnostics",{enumerable:!0,get:function(){return o.Diagnostics}});let a=r(6156);Object.defineProperty(t,"EventLogger",{enumerable:!0,get:function(){return a.EventLogger}});let l=r(9025);Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}});let u=r(6801),c=r(8614);Object.defineProperty(t,"Storage",{enumerable:!0,get:function(){return c.Storage}}),i(r(375),t),i(r(1867),t),i(r(394),t),i(r(3183),t),i(r(642),t),i(r(6831),t),i(r(8896),t),i(r(624),t),i(r(1335),t),i(r(6152),t),i(r(6724),t),i(r(9025),t),i(r(1231),t),i(r(3975),t),i(r(3284),t),i(r(34),t),i(r(4632),t),i(r(7631),t),i(r(5881),t),i(r(7995),t),i(r(1486),t),i(r(3463),t),i(r(4850),t),i(r(6478),t),i(r(712),t),i(r(9817),t),i(r(6801),t),i(r(6790),t),i(r(1497),t),i(r(8431),t),i(r(7963),t),i(r(9063),t),i(r(8614),t),i(r(3111),t),i(r(8687),t),i(r(801),t),i(r(9382),t),i(r(5260),t),i(r(5051),t),i(r(1753),t),Object.assign((0,s._getStatsigGlobal)(),{Log:l.Log,SDK_VERSION:u.SDK_VERSION})},3815:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._resolveDeltasResponse=void 0;let n=r(3328);function i(e,t){null==e||e.forEach(e=>{delete t[e]})}t._resolveDeltasResponse=function(e,t){let r=(0,n._typedJsonParse)(t,"checksum","DeltasEvaluationResponse");if(!r)return{hadBadDeltaChecksum:!0};let s=Object.assign(Object.assign(Object.assign({},e),r),{feature_gates:Object.assign(Object.assign({},e.feature_gates),r.feature_gates),layer_configs:Object.assign(Object.assign({},e.layer_configs),r.layer_configs),dynamic_configs:Object.assign(Object.assign({},e.dynamic_configs),r.dynamic_configs)}),o=(i(s.deleted_gates,s.feature_gates),delete s.deleted_gates,i(s.deleted_configs,s.dynamic_configs),delete s.deleted_configs,i(s.deleted_layers,s.layer_configs),delete s.deleted_layers,s),a=(0,n._DJB2Object)({feature_gates:o.feature_gates,dynamic_configs:o.dynamic_configs,layer_configs:o.layer_configs},2),l=a===r.checksumV2;return l?JSON.stringify(o):{hadBadDeltaChecksum:!0,badChecksum:a,badMergedConfigs:o,badFullResponse:r.deltas_full_response}}},4228:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(3328),i=r(2034),s=r(4246);t.default=class{constructor(e){this._sdkKey=e,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,n._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(e,t){var r,o;
26if(!e)return!1;let a=(0,n._typedJsonParse)(e.data,"has_updates","EvaluationResponse");if(null==a)return!1;if(this._source=e.source,(null==a?void 0:a.has_updates)!==!0)return!0;let l=null!==(r=a.time)&&void 0!==r?r:0;return l<this._lcut||(this._rawValues=e.data,this._lcut=a.time,this._receivedAt=e.receivedAt,"init-v2"===a.response_format?this._values=new s.V2InitializeContainer(a):this._values=new i.V1InitializeContainer(a),this._bootstrapMetadata=this._extractBootstrapMetadata(e.source,a),e.source&&a.user&&this._setWarningState(t,a),n.SDKFlags.setFlags(this._sdkKey,null!==(o=a.sdk_flags)&&void 0!==o?o:{}),!0)}getWarnings(){if(0!==this._warnings.size)return Array.from(this._warnings)}getGate(e){let t=this._values?this._values.getGate(e):null;return this._getDetailedStoreResult(t)}getConfig(e){let t=this._values?this._values.getConfig(e):null;return this._getDetailedStoreResult(t)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(e){let t=this._values?this._values.getLayer(e):null;return this._getDetailedStoreResult(t)}getParamStore(e){let t=this._values?this._values.getParamStore(e):null;return this._getDetailedStoreResult(t)}getSource(){return this._source}getExposureMapping(){var e;return null===(e=this._values)||void 0===e?void 0:e.getExposureMapping()}_extractBootstrapMetadata(e,t){if("Bootstrap"!==e)return null;let r={};return t.user&&(r.user=t.user),t.sdkInfo&&(r.generatorSDKInfo=t.sdkInfo),r.lcut=t.time,r}_getDetailedStoreResult(e){return{result:e,details:this._getDetails(null==e)}}_setWarningState(e,t){var r,i;let s=n.StableID.get(this._sdkKey);if((null===(r=e.customIDs)||void 0===r?void 0:r.stableID)!==s&&((null===(i=e.customIDs)||void 0===i?void 0:i.stableID)||s)){this._warnings.add("StableIDMismatch");return}if("user"in t){let r=t.user,i=Object.assign(Object.assign({},e),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,n._getFullUserHash)(i)!==(0,n._getFullUserHash)(r)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if("Uninitialized"===this._source||"NoValues"===this._source)return{reason:this._source};let e={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(e.warnings=Array.from(this._warnings)),e}_getDetails(e){var t,r;let n=this.getCurrentSourceDetails(),i=n.reason,s=null!==(t=n.warnings)&&void 0!==t?t:[];"Bootstrap"===this._source&&s.length>0&&(i+=s[0]),"Uninitialized"!==i&&"NoValues"!==i&&(i=`${i}:${e?"Unrecognized":"Recognized"}`);let o="Bootstrap"===this._source&&null!==(r=this._bootstrapMetadata)&&void 0!==r?r:void 0;return o&&(n.bootstrapMetadata=o),Object.assign(Object.assign({},n),{reason:i})}}},226:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let i=r(3328),s=r(3815);class o extends i.NetworkCore{constructor(e,t){super(e,t);let r=null==e?void 0:e.networkConfig;this._option=e,this._initializeUrlConfig=new i.UrlConfiguration(i.Endpoint._initialize,null==r?void 0:r.initializeUrl,null==r?void 0:r.api,null==r?void 0:r.initializeFallbackUrls)}fetchEvaluations(e,t,r,s,o){return n(this,void 0,void 0,function*(){var n,a,l,u,c,d;let h=t?(0,i._typedJsonParse)(t,"has_updates","InitializeResponse"):null,p={user:s,hash:null!==(l=null===(a=null===(n=this._option)||void 0===n?void 0:n.networkConfig)||void 0===a?void 0:a.initializeHashAlgorithm)&&void 0!==l?l:"djb2",deltasResponseRequested:!1,full_checksum:null};if(null==h?void 0:h.has_updates){let e=(null==h?void 0:h.hash_used)!==(null!==(d=null===(c=null===(u=this._option)||void 0===u?void 0:u.networkConfig)||void 0===c?void 0:c.initializeHashAlgorithm)&&void 0!==d?d:"djb2");p=Object.assign(Object.assign({},p),{sinceTime:o&&!e?h.time:0,previousDerivedFields:"derived_fields"in h&&o?h.derived_fields:{},deltasResponseRequested:!0,full_checksum:h.full_checksum,partialUserMatchSinceTime:e?0:h.time})}return this._fetchEvaluations(e,h,p,r)})}_fetchEvaluations(e,t,r,i){return n(this,void 0,void 0,function*(){var n,o;let a=yield this.post({sdkKey:e,urlConfig:this._initializeUrlConfig,data:r,retries:2,isStatsigEncodable:!0,priority:i});if((null==a?void 0:a.code)===204)return'{"has_updates": false}';if((null==a?void 0:a.code)!==200)return null!==(n=null==a?void 0:a.body)&&void 0!==n?n:null;if((null==t?void 0:t.has_updates)!==!0||(null===(o=a.body)||void 0===o?void 0:o.includes('"is_delta":true'))!==!0||!0!==r.deltasResponseRequested)return a.body;let l=(0,s._resolveDeltasResponse)(t,a.body);return"string"==typeof l?l:this._fetchEvaluations(e,t,Object.assign(Object.assign(Object.assign({},r),l),{deltasResponseRequested:!1}),i)})}}t.default=o},866:function(e,t,r){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t._makeParamStoreGetter=void 0;let n=r(3328),i={disableExposureLog:!0};function s(e){return null==e||!1===e.disableExposureLog}function o(e,t){return null!=t&&!(0,n._isTypeMatch)(e,t)}t._makeParamStoreGetter=function(e,t,r){return(a,l)=>{if(null==t)return l;let u=t[a];if(null==u||null!=l&&(0,n._typeOf)(l)!==u.param_type)return l;switch(u.ref_type){case"static":return u.value;case"gate":return function(e,t,r){let n=e.getFeatureGate(t.gate_name,s(r)?void 0:i);return n.value?t.pass_value:t.fail_value}(e,u,r);case"dynamic_config":return function(e,t,r,n){let a=e.getDynamicConfig(t.config_name,s(n)?void 0:i),l=a.get(t.param_name);return o(l,r)?r:l}(e,u,l,r);case"experiment":return function(e,t,r,n){let a=e.getExperiment(t.experiment_name,s(n)?void 0:i),l=a.get(t.param_name);return o(l,r)?r:l}(e,u,l,r);case"layer":return function(e,t,r,n){let a=e.getLayer(t.layer_name,s(n)?void 0:i),l=a.get(t.param_name);return o(l,r)?r:l}(e,u,l,r);default:return l}}}},4620:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});let i=r(3328),s=r(4228),o=r(226),a=r(866),l=r(5231);class u extends i.StatsigClientBase{static instance(e){let t=(0,i._getStatsigGlobal)().instance(e);return t instanceof u?t:(i.Log.warn((0,i._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new u(null!=e?e:"",{}))}constructor(e,t,r=null){var n,a;i.SDKType._setClientType(e,"javascript-client");let u=new o.default(r,e=>{this.$emt(e)});super(e,null!==(n=null==r?void 0:r.dataAdapter)&&void 0!==n?n:new l.StatsigEvaluationsDataAdapter,u,r),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(i.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(i.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(i.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(i.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(i.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(i.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new s.default(e),this._network=u,this._user=this._configureUser(t,r),this._sdkInstanceID=(0,i.getUUID)();let c=null!==(a=null==r?void 0:r.plugins)&&void 0!==a?a:[];for(let e of c)e.bind(this)}initializeSync(e){var t;return"Uninitialized"!==this.loadingStatus?(0,i.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...null!==(t=this._store.getWarnings())&&void 0!==t?t:[]]):(this._logger.start(),this.updateUserSync(this._user,e))}initializeAsync(e){return n(this,void 0,void 0,function*(){return this._initializePromise||(this._initializePromise=this._initializeAsyncImpl(e)),this._initializePromise})}updateUserSync(e,t){let r=performance.now();try{return this._updateUserSyncImpl(e,t,r)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,r)}}_updateUserSyncImpl(e,t,r){var n;let s=[...null!==(n=this._store.getWarnings())&&void 0!==n?n:[]];this._resetForUser(e);let o=this.dataAdapter.getDataSync(this._user);null==o&&s.push("NoCachedValues"),this._store.setValues(o,this._user),this._finalizeUpdate(o);let a=null==t?void 0:t.disableBackgroundCacheRefresh;return!0===a||null==a&&(null==o?void 0:o.source)==="Bootstrap"||this._runPostUpdate(null!=o?o:null,this._user),(0,i.createUpdateDetails)(!0,this._store.getSource(),performance.now()-r,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),s)}updateUserAsync(e,t){return n(this,void 0,void 0,function*(){let r=performance.now();try{return yield this._updateUserAsyncImpl(e,t)}catch(t){let e=t instanceof Error?t:Error(String(t));return this._createErrorUpdateDetails(e,r)}})}_updateUserAsyncImpl(e,t){return n(this,void 0,void 0,function*(){this._resetForUser(e);let r=this._user;i.Diagnostics._markInitOverallStart(this._sdkKey);let n=this.dataAdapter.getDataSync(r);if(this._store.setValues(n,this._user),this._setStatus("Loading",n),n=yield this.dataAdapter.getDataAsync(n,r,t),r!==this._user)return(0,i.createUpdateDetails)(!1,this._store.getSource(),-1,Error("User changed during update"),this._network.getLastUsedInitUrlAndReset()
26);let s=!1;null!=n&&(i.Diagnostics._markInitProcessStart(this._sdkKey),s=this._store.setValues(n,this._user),i.Diagnostics._markInitProcessEnd(this._sdkKey,{success:s})),this._finalizeUpdate(n),s||(this._errorBoundary.attachErrorIfNoneExists(i.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),i.Diagnostics._markInitOverallEnd(this._sdkKey,s,this._store.getCurrentSourceDetails());let o=i.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,i.createUpdateDetails)(s,this._store.getSource(),o,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:i.StatsigSession.get(this._sdkKey),stableID:i.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(e,t){return this.getFeatureGate(e,t).value}logEvent(e,t,r){let n="string"==typeof e?{eventName:e,value:t,metadata:r}:e;this.$emt({name:"log_event_called",event:n}),this._logger.enqueue(Object.assign(Object.assign({},n),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(e){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:e}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{"Loading"===this.loadingStatus&&this._finalizeUpdate(null)})}_initializeAsyncImpl(e){return n(this,void 0,void 0,function*(){return i.Storage.isReady()||(yield i.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,e)})}_createErrorUpdateDetails(e,t){var r;return(0,i.createUpdateDetails)(!1,this._store.getSource(),performance.now()-t,e,null,[...null!==(r=this._store.getWarnings())&&void 0!==r?r:[]])}_finalizeUpdate(e){this._store.finalize(),this._setStatus("Ready",e)}_runPostUpdate(e,t){this.dataAdapter.getDataAsync(e,t,{priority:"low"}).catch(e=>{i.Log.error("An error occurred after update.",e)})}_resetForUser(e){this._logger.reset(),this._store.reset(),this._user=this._configureUser(e,this._options)}_configureUser(e,t){var r,n,s;let o=(0,i._normalizeUser)(e,t),a=null===(r=o.customIDs)||void 0===r?void 0:r.stableID;if(a){let e=null===(s=(n=this.storageProvider).isReadyResolver)||void 0===s?void 0:s.call(n);e?e.then(()=>i.StableID.setOverride(a,this._sdkKey),()=>i.StableID.setOverride(a,this._sdkKey)):i.StableID.setOverride(a,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(o.analyticsOnlyMetadata=Object.assign(Object.assign({},o.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),o}_getFeatureGateImpl(e,t){var r,n;let{result:s,details:o}=this._store.getGate(e),a=(0,i._makeFeatureGate)(e,o,s),l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getGateOverride)||void 0===n?void 0:n.call(r,a,this._user,t),u=null!=l?l:a;return this._enqueueExposure(e,(0,i._createGateExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"gate_evaluation",gate:u}),u}_getDynamicConfigImpl(e,t){var r,n;let{result:s,details:o}=this._store.getConfig(e),a=(0,i._makeDynamicConfig)(e,o,s),l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getDynamicConfigOverride)||void 0===n?void 0:n.call(r,a,this._user,t),u=null!=l?l:a;return this._enqueueExposure(e,(0,i._createConfigExposure)(this._user,u,this._store.getExposureMapping()),t),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:u}),u}_getExperimentImpl(e,t){var r,n,s,o;let{result:a,details:l}=this._store.getConfig(e),u=(0,i._makeExperiment)(e,l,a);null!=u.__evaluation&&(u.__evaluation.secondary_exposures=(0,i._mapExposures)(null!==(n=null===(r=u.__evaluation)||void 0===r?void 0:r.secondary_exposures)&&void 0!==n?n:[],this._store.getExposureMapping()));let c=null===(o=null===(s=this.overrideAdapter)||void 0===s?void 0:s.getExperimentOverride)||void 0===o?void 0:o.call(s,u,this._user,t),d=null!=c?c:u;return this._enqueueExposure(e,(0,i._createConfigExposure)(this._user,d,this._store.getExposureMapping()),t),this.$emt({name:"experiment_evaluation",experiment:d}),d}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(e,t){var r,n,s;let{result:o,details:a}=this._store.getLayer(e),l=(0,i._makeLayer)(e,a,o),u=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getLayerOverride)||void 0===n?void 0:n.call(r,l,this._user,t);(null==t?void 0:t.disableExposureLog)&&this._logger.incrementNonExposureCount(e);let c=(0,i._mergeOverride)(l,u,null!==(s=null==u?void 0:u.__value)&&void 0!==s?s:l.__value,r=>{null!=t&&t.disableExposureLog||this._enqueueExposure(e,(0,i._createLayerParameterExposure)(this._user,c,r,this._store.getExposureMapping()),t)}
26);return this.$emt({name:"layer_evaluation",layer:c}),c}_getParameterStoreImpl(e,t){var r,n;let{result:i,details:s}=this._store.getParamStore(e);this._logger.incrementNonExposureCount(e);let o={name:e,details:s,__configuration:i,get:(0,a._makeParamStoreGetter)(this,i,t)},l=null===(n=null===(r=this.overrideAdapter)||void 0===r?void 0:r.getParamStoreOverride)||void 0===n?void 0:n.call(r,o,t);return null!=l&&(o.__configuration=l.config,o.details=l.details,o.get=(0,a._makeParamStoreGetter)(this,l.config,t)),o}}t.default=u},5231:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigEvaluationsDataAdapter=void 0;let i=r(3328),s=r(226);class o extends i.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(e,t,r){super.attach(e,t,r),null!==r&&r instanceof s.default?this._network=r:this._network=new s.default(null!=t?t:{})}getDataAsync(e,t,r){return this._getDataAsyncImpl(e,(0,i._normalizeUser)(t,this._options),r)}prefetchData(e,t){return this._prefetchDataImpl(e,t)}setData(e){let t=(0,i._typedJsonParse)(e,"has_updates","data");t&&"user"in t?super.setData(e,t.user):i.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(e,t){super.setData(e,t)}_fetchFromNetwork(e,t,r,i){return n(this,void 0,void 0,function*(){var n;let s=yield null===(n=this._network)||void 0===n?void 0:n.fetchEvaluations(this._getSdkKey(),e,null==r?void 0:r.priority,t,i);return null!=s?s:null})}_getCacheKey(e){var t;let r=(0,i._getStorageKey)(this._getSdkKey(),e,null===(t=this._options)||void 0===t?void 0:t.customUserCacheKeyFunc);return`${i.DataAdapterCachePrefix}.${this._cacheSuffix}.${r}`}_isCachedResultValidFor204(e,t){return null!=e.fullUserHash&&e.fullUserHash===(0,i._getFullUserHash)(t)}}t.StatsigEvaluationsDataAdapter=o},2034:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.V1InitializeContainer=void 0;let n=r(3328);t.V1InitializeContainer=class{constructor(e){this._values=e}getGate(e){return this._getResultFromLookup(this._values.feature_gates,e)}getConfig(e){return this._getResultFromLookup(this._values.dynamic_configs,e)}getLayer(e){return this._getResultFromLookup(this._values.layer_configs,e)}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r,i;return e&&null!==(i=null!==(r=e[t])&&void 0!==r?r:e[(0,n._DJB2)(t)])&&void 0!==i?i:null}}},4246:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.V2InitializeContainer=void 0;let n=r(3328);t.V2InitializeContainer=class{constructor(e){this._values=e}getGate(e){var t,r,n;let i=this._getResultFromLookup(this._values.feature_gates,e);return i?{name:e,value:!0===i.v,rule_id:null!==(t=i.r)&&void 0!==t?t:"default",secondary_exposures:null!==(r=i.s)&&void 0!==r?r:[],id_type:null!==(n=i.i)&&void 0!==n?n:""}:null}getConfig(e){var t,r,n,i;let s=this._getResultFromLookup(this._values.dynamic_configs,e);return s?{name:e,value:null!==(t=this._values.values[s.v])&&void 0!==t?t:{},rule_id:s.r,secondary_exposures:null!==(r=s.s)&&void 0!==r?r:[],id_type:null!==(n=s.i)&&void 0!==n?n:"",is_user_in_experiment:!0===s.ue,passed:!0===s.p,group_name:null!==(i=s.gn)&&void 0!==i?i:void 0,is_experiment_active:!0===s.ea,group:s.r,is_device_based:"stableID"===s.i}:null}getLayer(e){var t,r,n,i,s,o;let a=this._getResultFromLookup(this._values.layer_configs,e);return a?{name:e,value:null!==(t=this._values.values[a.v])&&void 0!==t?t:{},rule_id:a.r,secondary_exposures:null!==(r=a.s)&&void 0!==r?r:[],is_user_in_experiment:!0===a.ue,group_name:null!==(n=a.gn)&&void 0!==n?n:void 0,is_experiment_active:!0===a.ea,group:a.r,is_device_based:"stableID"===a.i,allocated_experiment_name:null!==(i=a.ae)&&void 0!==i?i:"",explicit_parameters:null!==(s=a.ep)&&void 0!==s?s:[],undelegated_secondary_exposures:null!==(o=a.us)&&void 0!==o?o:[],parameter_rule_ids:a.pr}:null}getParamStore(e){return this._getResultFromLookup(this._values.param_stores,e)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(e,t){var r,i;return e&&null!==(i=null!==(r=e[t])&&void 0!==r?r:e[(0,n._DJB2)(t)])&&void 0!==i?i:null}}},250:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);
26(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.StatsigClient=void 0;let s=r(3328),o=r(4620);t.StatsigClient=o.default,i(r(3328),t);let a=Object.assign((0,s._getStatsigGlobal)(),{StatsigClient:o.default});t.default=a},6085:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplay=t.runStatsigSessionReplay=t.StatsigSessionReplayPlugin=void 0;let n=r(3328),i=r(1229),s=r(1850);function o(e,t){new a(e,t)}t.StatsigSessionReplayPlugin=class{constructor(e){this.options=e,this.__plugin="session-replay"}bind(e){o(e,this.options)}},t.runStatsigSessionReplay=o;class a extends i.SessionReplayBase{constructor(e,t){var r;super(e,t),this._client.$on("values_updated",()=>{var e;this._wasStopped||this._attemptToStartRecording(null===(e=this._options)||void 0===e?void 0:e.forceRecording)}),this._attemptToStartRecording(null===(r=this._options)||void 0===r?void 0:r.forceRecording)}_shutdown(e){super._shutdownImpl(e)}_attemptToStartRecording(e=!1){var t,r;if(this._totalLogs>=s.MAX_LOGS)return;let i=this._client.getContext().values;if((null==i?void 0:i.recording_blocked)===!0||!e&&(null==i?void 0:i.can_record_session)!==!0||(null==i?void 0:i.passes_session_recording_targeting)===!1){this._shutdown();return}this._replayer.isRecording()||(this._wasStopped=!1,n.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.record((e,t)=>this._onRecordingEvent(e,t),null!==(r=null===(t=this._options)||void 0===t?void 0:t.rrwebConfig)&&void 0!==r?r:{},()=>{this._shutdown()}))}}t.SessionReplay=a},1229:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayBase=t.forceStartRecording=t.startRecording=t.stopRecording=void 0;let n=r(3328),i=r(4066),s=r(1850);function o(e){var t,r;let i=null==e?(0,n._getStatsigGlobal)().firstSRInstance:null===(r=null===(t=(0,n._getStatsigGlobal)())||void 0===t?void 0:t.srInstances)||void 0===r?void 0:r[e];return i instanceof a?i:null}t.stopRecording=function(e){var t;null===(t=o(e))||void 0===t||t.stopRecording()},t.startRecording=function(e){var t;null===(t=o(e))||void 0===t||t.startRecording()},t.forceStartRecording=function(e){var t;null===(t=o(e))||void 0===t||t.forceStartRecording()};class a{constructor(e,t){this._sessionData={startTime:-1,endTime:0,clickCount:0},this._events=[],this._wasStopped=!1,this._currentEventIndex=0,this._totalLogs=0,this._client=e,this._options=t;let{sdkKey:r,errorBoundary:s}=this._client.getContext();if(this._errorBoundary=s,this._errorBoundary.wrap(this),this._replayer=new i.SessionReplayClient,this._client.$on("pre_shutdown",()=>this._shutdown()),this._client.on("session_expired",()=>{this._shutdown("session_expired")}),!(0,n._isServerEnv)()){let e=(0,n._getStatsigGlobal)();e.srInstances=Object.assign(Object.assign({},e.srInstances),{[r]:this}),e.firstSRInstance||(e.firstSRInstance=this)}this._currentSessionID=this._getSessionIdFromClient(),this._subscribeToVisibilityChanged()}forceStartRecording(){this._wasStopped=!1,this._attemptToStartRecording(!0)}stopRecording(){this._wasStopped=!0,this._shutdown()}startRecording(){var e;this._wasStopped=!1,this._attemptToStartRecording(null===(e=this._options)||void 0===e?void 0:e.forceRecording)}isRecording(){return this._replayer.isRecording()}_logRecording(e){0!==this._events.length&&(e=(0,n._isUnloading)()?"is_leaving_page":e,this._logRecordingWithSessionID(this._currentSessionID,e))}_onVisibilityChanged(e){"background"===e&&(this._logRecording(),this._client.flush().catch(e=>{this._errorBoundary.logError("SR::visibility",e)}))}_subscribeToVisibilityChanged(){let{sdkKey:e}=this._client.getContext();(0,n._subscribeToVisiblityChanged)(t=>{var r,i;let s=null===(i=null===(r=(0,n._getStatsigGlobal)())||void 0===r?void 0:r.srInstances)||void 0===i?void 0:i[e];s instanceof a&&s._onVisibilityChanged(t)})}_logRecordingWithSessionID(e,t){let r=this._sessionData;if(0===this._events.length)return;let i=JSON.stringify(this._events),o=(0,s._slicePayload)(i),a=o.length>1?(0,n.getUUID)():null;for(let l=0;l<o.length;l++){let u=o[l],c=(0,s._makeLoggableRrwebEvent)(u,i,e,r,this._client.getContext().sdkInstanceID);null!=a&&(0,s._appendSlicedMetadata)(c.metadata,a,l,o.length,u.length),t&&(c.metadata[t]="true"),this._totalLogs++,this._client.logEvent(c),null!=a&&this._client.flush().catch(e=>{n.Log.error(e)})}this._events=[],this._totalLogs>s.MAX_LOGS&&this._shutdown()}_bumpSessionIdleTimerAndLogRecording(){this._getSessionIdFromClient(),this._logRecording()}_getSessionIdFromClient(){return this._client.getContext().session.data.sessionID}_shutdownImpl(e){if(this._replayer.isRecording()){this._replayer.stop();let e=()=>{n.StatsigMetadataProvider.add({isRecordingSession:"false"}),this._client.off("logs_flushed",e)};this._client.$on("logs_flushed",e)}if(0===this._events.length){"session_expired"===e&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData());return}this._logRecording(e),"session_expired"===e&&(this._currentEventIndex=0,this._sessionData=this._makeEmptySessionData())}_makeEmptySessionData(){return{startTime:-1,endTime:0,clickCount:0}}_onRecordingEvent(e,t){if(this._currentSessionID!==this._getSessionIdFromClient()){this._shutdown("session_expired");return}if(this._totalLogs>=s.MAX_LOGS){this._shutdown();return}e.eventIndex=this._currentEventIndex++,this._sessionData.clickCount+=t.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?t.startTime:Math.min(this._sessionData.startTime,t.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,t.endTime);let r=(0,n._fastApproxSizeOf)(e,s.MAX_INDIVIDUAL_EVENT_BYTES);if(r>s.MAX_INDIVIDUAL_EVENT_BYTES){n.Log.warn(`SessionReplay event is too large (~${r} bytes) and will not be logged`,e);return}let i=(0,n._fastApproxSizeOf)(this._events,s.REPLAY_ENQUEUE_TRIGGER_BYTES);this._events.push(e),i+r<s.REPLAY_ENQUEUE_TRIGGER_BYTES||((0,n._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording())}}t.SessionReplayBase=a},4066:function(e,t,r){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t.SessionReplayClient=void 0;let n=r(5761),i=r(3328);t.SessionReplayClient=class{constructor(){this._startTimestamp=null,this._endTimestamp=null}record(e,t,r,s=!1){if(null!=(0,i._getDocumentSafe)()&&(this._startTimestamp=null,this._endTimestamp=null,this._stopCallback=r,!this._stopFn)){var o;this._stopFn=(o=(t,r)=>{var n,i,o;s?this._startTimestamp=r?t.timestamp:null!==(n=this._startTimestamp)&&void 0!==n?n:t.timestamp:null!==(i=this._startTimestamp)&&void 0!==i||(this._startTimestamp=t.timestamp),this._endTimestamp=t.timestamp;let a=0;3===t.type&&2===t.data.source&&(2===t.data.type||4===t.data.type)&&a++,e(Object.assign(Object.assign({},t),{eventIndex:0}),{startTime:this._startTimestamp,endTime:this._endTimestamp,clickCount:a},null!=r&&r),this._endTimestamp-this._startTimestamp>144e5&&(null===(o=this._stopFn)||void 0===o||o.call(this),this._stopCallback&&this._stopCallback())},s?(0,n.record)(Object.assign(Object.assign({},t),{emit:o,checkoutEveryNms:3e4})):(0,n.record)(Object.assign(Object.assign({},t),{emit:o})))}}stop(){this._stopFn&&(this._stopFn(),this._stopFn=void 0)}isRecording(){return null!=this._stopFn}}},1850:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._appendSlicedMetadata=t._slicePayload=t._makeLoggableRrwebEvent=t.MAX_LOGS=t.MAX_INDIVIDUAL_EVENT_BYTES=t.REPLAY_ENQUEUE_TRIGGER_BYTES=void 0;let n=r(3328);t.REPLAY_ENQUEUE_TRIGGER_BYTES=10240,t.MAX_INDIVIDUAL_EVENT_BYTES=10485760,t.MAX_LOGS=1e4,t._makeLoggableRrwebEvent=function(e,t,r,i,s){let o={session_start_ts:String(i.startTime),session_end_ts:String(i.endTime),clicks_captured_cumulative:String(i.clickCount),rrweb_events:e,rrweb_payload_size:String(t.length),session_replay_sdk_version:n.SDK_VERSION,sdk_instance_id:s};return{eventName:"statsig::session_recording",value:r,metadata:o}},t._slicePayload=function(e){let t=[];for(let r=0;r<e.length;r+=1048576)t.push(e.slice(r,r+1048576));return t},t._appendSlicedMetadata=function(e,t,r,n,i){e.sliced_id=t,e.slice_index=String(r),e.slice_count=String(n),e.slice_byte_size=String(i)}},7951:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TriggeredSessionReplay=t.runStatsigTriggeredSessionReplay=t.StatsigTriggeredSessionReplayPlugin=void 0;let n=r(3328),i=r(1229),s=r(1850);function o(e,t){new a(e,t)}t.StatsigTriggeredSessionReplayPlugin=class{constructor(e){this.options=e,this.__plugin="triggered-session-replay"}bind(e){o(e,this.options)}},t.runStatsigTriggeredSessionReplay=o;class a extends i.SessionReplayBase{constructor(e,t){var r;super(e,t),this._runningEventData=[],this._isActiveRecording=!1,this._subscribeToClientEvents(t),(null==t?void 0:t.autoStartRecording)?this._attemptToStartRecording(null===(r=this._options)||void 0===r?void 0:r.forceRecording):(null==t?void 0:t.keepRollingWindow)&&this._attemptToStartRollingWindow()}_subscribeToClientEvents(e){this._subscribeToValuesUpdated(e),this._subscribeToLogEventCalled(),this._subscribeToGateEvaluation(),this._subscribeToExperimentEvaluation()}_subscribeToValuesUpdated(e){this._client.$on("values_updated",()=>{var t;!this._wasStopped&&((null==e?void 0:e.autoStartRecording)?this._attemptToStartRecording(null===(t=this._options)||void 0===t?void 0:t.forceRecording):(null==e?void 0:e.keepRollingWindow)&&this._attemptToStartRollingWindow())})}_subscribeToLogEventCalled(){this._client.$on("log_event_called",e=>{var t;if(this._wasStopped)return;let r=this._client.getContext().values,n=null==r?void 0:r.passes_session_recording_targeting;if(!1===n||(null==r?void 0:r.session_recording_event_triggers)==null)return;let i=r.session_recording_event_triggers[e.event.eventName];if(null==i||!1===i.passes_sampling)return;let s=i.values;if(null==s||s.includes(String(null!==(t=e.event.value)&&void 0!==t?t:""))){this._attemptToStartRecording(!0);return}})}_subscribeToGateEvaluation(){this._client.$on("gate_evaluation",e=>{this._tryStartExposureRecording(e.gate.name,String(e.gate.value))})}_subscribeToExperimentEvaluation(){this._client.$on("experiment_evaluation",e=>{var t;this._tryStartExposureRecording(e.experiment.name,null!==(t=e.experiment.groupName)&&void 0!==t?t:"")})}_tryStartExposureRecording(e,t){var r;if(this._wasStopped)return;let i=this._client.getContext().values,s=null==i?void 0:i.passes_session_recording_targeting;if(!1===s||(null==i?void 0:i.session_recording_exposure_triggers)==null)return;let o=null!==(r=i.session_recording_exposure_triggers[e])&&void 0!==r?r:i.session_recording_exposure_triggers[(0,n._DJB2)(e)];if(null==o||!1===o.passes_sampling)return;let a=o.values;if(null==a||a.includes(t)){this._attemptToStartRecording(!0);return}}forceStartRecording(){super.forceStartRecording()}stopRecording(){this._isActiveRecording=!1,this._runningEventData=[],super.stopRecording()}_handleStartActiveRecording(){if(this._isActiveRecording=!0,0===this._runningEventData.length)return;let e=this._runningEventData.map(e=>e.events).flat();for(let t=0;t<e.length;t++)e[t].event.eventIndex=t,this._sessionData.clickCount+=e[t].data.clickCount,this._sessionData.startTime=-1===this._sessionData.startTime?e[t].data.startTime:Math.min(this._sessionData.startTime,e[t].data.startTime),this._sessionData.endTime=Math.max(this._sessionData.endTime,e[t].data.endTime);this._events=e.map(e=>e.event),this._currentEventIndex=e.length,(0,n._isCurrentlyVisible)()?this._bumpSessionIdleTimerAndLogRecording():this._logRecording(),this._replayer.stop()}_shutdown(e){this._isActiveRecording=!1,this._runningEventData=[],super._shutdownImpl(e)}_onRecordingEvent(e,t,r){if(!this._isActiveRecording){if(this._currentSessionID!==this._getSessionIdFromClient()){this._shutdown("session_expired");return}r&&4===e.type||0===this._runningEventData.length?(this._runningEventData.length>1&&this._runningEventData.shift(),this._runningEventData.push({events:[{event:e,data:t}]})):this._runningEventData[this._runningEventData.length-1].events.push({event:e,data:t});return}super._onRecordingEvent(e,t)}_attemptToStartRollingWindow(){var e,t;let r=this._client.getContext().values;if((null==r?void 0:r.passes_session_recording_targeting)===!1){this._shutdown();return}this._replayer.isRecording()||this._replayer.record((e,t,r)=>this._onRecordingEvent(e,t,r),null!==(t=null===(e=this._options)||void 0===e?void 0:e.rrwebConfig)&&void 0!==t?t:{},()=>{this._shutdown()},!0)}_attemptToStartRecording(e=!1){var t,r;if(this._totalLogs>=s.MAX_LOGS)return;let i=this._client.getContext().values;if((null==i?void 0:i.recording_blocked)===!0||!e&&(null==i?void 0:i.can_record_session)!==!0||(null==i?void 0:i.passes_session_recording_targeting)===!1){this._shutdown();return}this._handleStartActiveRecording(),this._wasStopped=!1,n.StatsigMetadataProvider.add({isRecordingSession:"true"}),this._replayer.isRecording()||this._replayer.record((e,t,r)=>this._onRecordingEvent(e,t,r),null!==(r=null===(t=this._options)||void 0===t?void 0:t.rrwebConfig)&&void 0!==r?r:{},()=>{this._shutdown()})}}t.TriggeredSessionReplay=a},909:function(e,t,r){"use strict";t.cb=void 0;let n=r(3328),i=r(6085);Object.defineProperty(t,"cb",{enumerable:!0,get:function(){return i.StatsigSessionReplayPlugin}});
26let s=r(1229),o=r(4066),a=r(7951);Object.assign((0,n._getStatsigGlobal)(),{SessionReplayClient:o.SessionReplayClient,SessionReplay:i.SessionReplay,runStatsigSessionReplay:i.runStatsigSessionReplay,runStatsigTriggeredSessionReplay:a.runStatsigTriggeredSessionReplay,StatsigSessionReplayPlugin:i.StatsigSessionReplayPlugin,StatsigTriggeredSessionReplayPlugin:a.StatsigTriggeredSessionReplayPlugin,startRecording:s.startRecording,stopRecording:s.stopRecording,forceStartRecording:s.forceStartRecording})},9023:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCapture=t.runStatsigAutoCapture=t.StatsigAutoCapturePlugin=void 0;let n=r(3328),i=r(5473),s=r(2824),o=r(9896),a=r(3480),l=r(442),u=r(8325),c=r(2185),d=r(3683),h=r(614),p={submit:i.AutoCaptureEventName.FORM_SUBMIT,click:i.AutoCaptureEventName.CLICK,copy:i.AutoCaptureEventName.COPY,cut:i.AutoCaptureEventName.COPY};function f(e,t){var r;let{sdkKey:i}=e.getContext();if(!(0,n._isServerEnv)()){let e=(0,n._getStatsigGlobal)(),t=null!==(r=e.acInstances)&&void 0!==r?r:{};if(t[i])return t[i]}return new g(e,t)}t.StatsigAutoCapturePlugin=class{constructor(e){this._options=e,this.__plugin="auto-capture"}bind(e){f(e,this._options)}},t.runStatsigAutoCapture=f;class g{constructor(e,t){var r,i,c,d;this._client=e,this._disabledEvents={},this._previousLoggedPageViewUrl=null,this._hasLoggedPageViewEnd=!1,this._pageViewLogged=!1;let{sdkKey:h,errorBoundary:p,values:f}=e.getContext();this._options=t,this._disabledEvents=null!==(i=null===(r=null==f?void 0:f.auto_capture_settings)||void 0===r?void 0:r.disabled_events)&&void 0!==i?i:{},this._errorBoundary=p,this._errorBoundary.wrap(this,"autoCapture:"),this._client.$on("values_updated",()=>{var e,t;let r=this._client.getContext().values;this._disabledEvents=null!==(t=null===(e=null==r?void 0:r.auto_capture_settings)||void 0===e?void 0:e.disabled_events)&&void 0!==t?t:this._disabledEvents}),this._engagementManager=new a.EngagementManager,this._rageClickManager=new l.default,this._webVitalsManager=new u.WebVitalsManager(this._enqueueAutoCapture.bind(this),p),this._deadClickManager=new o.default(this._enqueueAutoCapture.bind(this),p),this._consoleLogManager=new s.ConsoleLogManager(this._enqueueAutoCapture.bind(this),p,null!==(c=null==t?void 0:t.consoleLogAutoCaptureSettings)&&void 0!==c?c:{enabled:!1}),this._eventFilterFunc=null==t?void 0:t.eventFilterFunc;let g=(0,n._getDocumentSafe)();if(!(0,n._isServerEnv)()){__STATSIG__=(0,n._getStatsigGlobal)();let e=null!==(d=__STATSIG__.acInstances)&&void 0!==d?d:{};e[h]=this,__STATSIG__.acInstances=e}if((null==g?void 0:g.readyState)==="loading"){g.addEventListener("DOMContentLoaded",()=>this._initialize());return}this._initialize()}_addEventHandlers(){let e=(0,n._getWindowSafe)(),t=(0,n._getDocumentSafe)();if(!e||!t)return;let r=(e,t=!0)=>{var r;let i=e||(null===(r=(0,n._getWindowSafe)())||void 0===r?void 0:r.event);if(this._autoLogEvent(i),t&&this._engagementManager.bumpInactiveTimer(),"click"===i.type&&i instanceof MouseEvent){let e=this._rageClickManager.isRageClick(i.clientX,i.clientY,Date.now());e&&this._logRageClick(i)}};(0,c._registerEventHandler)(t,"click",e=>r(e)),(0,c._registerEventHandler)(t,"submit",e=>r(e)),(0,c._registerEventHandler)(t,"copy",e=>r(e)),(0,c._registerEventHandler)(t,"cut",e=>r(e)),(0,c._registerEventHandler)(e,"error",e=>r(e,!1)),(0,c._registerEventHandler)(e,"pagehide",()=>this._tryLogPageViewEnd()),(0,c._registerEventHandler)(e,"beforeunload",()=>this._tryLogPageViewEnd())}_addPageViewTracking(){let e=(0,n._getWindowSafe)(),t=(0,n._getDocumentSafe)();e&&t&&((0,c._registerEventHandler)(e,"popstate",()=>this._tryLogPageView("popstate")),window.history.pushState=new Proxy(window.history.pushState,{apply:(e,t,[r,n,i])=>{e.apply(t,[r,n,i]),this._tryLogPageView("pushstate")}}),window.history.replaceState=new Proxy(window.history.replaceState,{apply:(e,t,[r,n,i])=>{e.apply(t,[r,n,i]),this._tryLogPageView("replacestate")}}),this._tryLogPageView())}_autoLogEvent(e){var t,r,s,o;let a=null===(t=e.type)||void 0===t?void 0:t.toLowerCase();if("error"===a&&e instanceof ErrorEvent){this._logError(e);return}let l=(0,c._getTargetNode)(e);if(!l)return;let u=p[a];if(!u)return;let f=u===i.AutoCaptureEventName.COPY;if(!(0,c._shouldLogEvent)(e,l,f))return;let g={};if(f){let t=null===(s=null===(r=(0,n._getWindowSafe)())||void 0===r?void 0:r.getSelection())||void 0===s?void 0:s.toString();if(!t)return;(null===(o=this._options)||void 0===o?void 0:o.captureCopyText)&&(g.selectedText=(0,c._sanitizeString)(t));let i=e.type||"clipboard";g.clipType=i}let{value:m,metadata:y}=(0,d._gatherEventData)(l);y.isOutbound&&this._engagementManager.setMeaningfulEngagementOccurred(!0),Object.assign(g,y);let v=(0,h._gatherAllMetadata)((0,c._getSafeUrl)());this._enqueueAutoCapture(u,m,Object.assign(Object.assign({},v),g))}_initialize(){this._webVitalsManager.startTracking(),this._deadClickManager.startTracking(),this._consoleLogManager.startTracking(),this._engagementManager.startInactivityTracking(()=>this._tryLogPageViewEnd(!0)),this._addEventHandlers(),this._addPageViewTracking(),this._logSessionStart(),this._logPerformance()}_logError(e){let t=(null==e?void 0:e.error)||{},r=t;if("object"==typeof t)try{r=JSON.stringify(t)}catch(e){r="function"==typeof(null==t?void 0:t.toString)?t.toString():"Unknown Error"}this._enqueueAutoCapture(i.AutoCaptureEventName.ERROR,e.message,{message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error_str:r})}_logSessionStart(){let e=this._getSessionFromClient();try{if(!this._isNewSession(e))return;this._enqueueAutoCapture(i.AutoCaptureEventName.SESSION_START,(0,c._getSanitizedPageUrl)(),Object.assign({sessionID:e.data.sessionID},(0,h._gatherAllMetadata)((0,c._getSafeUrl)())),{flushImmediately:!0})}catch(e){this._errorBoundary.logError("AC::logSession",e)}}_tryLogPageView(e){let t=(0,c._getSafeUrl)(),r=this._previousLoggedPageViewUrl;if(r&&t.pathname===r.pathname)return;this._engagementManager.setLastPageViewTime(Date.now()),this._hasLoggedPageViewEnd=!1;let n=(0,h._gatherAllMetadata)(t);e&&(n.navigation_type=e),this._previousLoggedPageViewUrl&&(n.last_page_view_url=this._previousLoggedPageViewUrl.href),this._pageViewLogged||(this._updateClientWithPossibleFirstTouchMetadata(),this._pageViewLogged=!0),this._enqueueAutoCapture(i.AutoCaptureEventName.PAGE_VIEW,(0,c._getSanitizedPageUrl)(),n,{flushImmediately:!0,addNewSessionMetadata:!0}),this._previousLoggedPageViewUrl=t,this._engagementManager.bumpInactiveTimer()}_tryLogPageViewEnd(e=!1){this._hasLoggedPageViewEnd||(this._hasLoggedPageViewEnd=!0,this._enqueueAutoCapture(i.AutoCaptureEventName.PAGE_VIEW_END,(0,c._getSanitizedPageUrl)(),Object.assign(Object.assign({},this._engagementManager.getPageViewEndMetadata()),{dueToInactivity:e}),{flushImmediately:!0}))}
26_logRageClick(e){if(!(0,c._shouldLogEvent)(e,e.target))return;let{value:t,metadata:r}=(0,d._gatherEventData)(e.target);this._enqueueAutoCapture(i.AutoCaptureEventName.RAGE_CLICK,t,Object.assign(Object.assign({x:e.clientX,y:e.clientY,timestamp:Date.now()},(0,h._gatherAllMetadata)((0,c._getSafeUrl)())),r))}_logPerformance(){let e=(0,n._getWindowSafe)();e&&e.performance&&void 0!==(null==e?void 0:e.performance)&&"function"==typeof e.performance.getEntriesByType&&"function"==typeof e.performance.getEntriesByName&&setTimeout(()=>{let t={},r=e.performance.getEntriesByType("navigation");if(r&&r.length>0&&r[0]instanceof PerformanceNavigationTiming){let e=r[0];t.load_time_ms=e.duration,t.dom_interactive_time_ms=e.domInteractive-e.startTime,t.redirect_count=e.redirectCount,t.transfer_bytes=e.transferSize}let n=e.performance.getEntriesByName("first-contentful-paint");n&&n.length>0&&n[0]instanceof PerformancePaintTiming&&(t.first_contentful_paint_time_ms=n[0].startTime),this._enqueueAutoCapture(i.AutoCaptureEventName.PERFORMANCE,(0,c._getSanitizedPageUrl)(),Object.assign(Object.assign({},t),(0,h._getNetworkInfo)()))},1)}_enqueueAutoCapture(e,t,r,i){var s,o,a;if(!t)return;let l=e.slice(14);if(this._disabledEvents[e]||this._disabledEvents[l])return;let u=this._getSessionFromClient();try{let l=Object.assign({sessionID:u.data.sessionID,page_url:null!==(a=null===(o=null===(s=(0,n._getWindowSafe)())||void 0===s?void 0:s.location)||void 0===o?void 0:o.href)&&void 0!==a?a:""},r);(null==i?void 0:i.addNewSessionMetadata)&&(l.isNewSession=String(this._isNewSession(u)));let c={eventName:e,value:t,metadata:l};if(this._eventFilterFunc&&!this._eventFilterFunc(c))return;this._client.logEvent(c),(null==i?void 0:i.flushImmediately)&&this._flushImmediately()}catch(e){this._errorBoundary.logError("AC::enqueue",e)}}_updateClientWithPossibleFirstTouchMetadata(){let e=this._client;e._possibleFirstTouchMetadata=(0,h._getPossibleFirstTouchMetadata)((0,c._getSafeUrl)()),Object.keys(e._possibleFirstTouchMetadata).length>0&&(e._user=Object.assign(Object.assign({},e._user),{analyticsOnlyMetadata:Object.assign(Object.assign({},e._possibleFirstTouchMetadata),e._user.analyticsOnlyMetadata)}))}_flushImmediately(){this._client.flush().catch(e=>{n.Log.error(e)})}_isNewSession(e){return 1e3>Math.abs(e.data.startTime-Date.now())}_getSessionFromClient(){return this._client.getContext().session}static getAllMetadata(){return(0,h._gatherAllMetadata)((0,c._getSafeUrl)())}}t.AutoCapture=g},5473:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutoCaptureEventName=void 0,t.AutoCaptureEventName={PAGE_VIEW:"auto_capture::page_view",PAGE_VIEW_END:"auto_capture::page_view_end",ERROR:"auto_capture::error",SESSION_START:"auto_capture::session_start",PERFORMANCE:"auto_capture::performance",FORM_SUBMIT:"auto_capture::form_submit",CLICK:"auto_capture::click",RAGE_CLICK:"auto_capture::rage_click",WEB_VITALS:"auto_capture::web_vitals",DEAD_CLICK:"auto_capture::dead_click",COPY:"auto_capture::copy",CONSOLE_LOG:"statsig::log_line"}},2824:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogManager=void 0;let n=r(3328),i=r(5473),s=r(2185),o=r(7191),a=r(614),l={trace:10,debug:20,log:30,info:30,warn:40,error:50};t.ConsoleLogManager=class{constructor(e,t,r){var n,i,s,o;this._enqueueFn=e,this._errorBoundary=t,this._options=r,this._restoreFns=[],this._isTracking=!1,this._logLevel="info",this.__source="js-auto-capture",this._logLevel=null!==(n=this._options.logLevel)&&void 0!==n?n:"info",this._maxKeys=null!==(i=this._options.maxKeys)&&void 0!==i?i:10,this._maxDepth=null!==(s=this._options.maxDepth)&&void 0!==s?s:10,this._maxStringLength=null!==(o=this._options.maxStringLength)&&void 0!==o?o:500}startTracking(){try{if(this._isTracking||!this._options.enabled)return;let e=(0,n._getWindowSafe)();if(!e)return;this._patchConsole(),this._isTracking=!0}catch(e){n.Log.error("Error starting console log tracking",e),this._errorBoundary.logError("autoCapture:ConsoleLogManager",e)}}stopTracking(){this._isTracking&&(this._restoreFns.forEach(e=>e()),this._restoreFns=[],this._isTracking=!1)}_patchConsole(){Object.entries(l).forEach(([e,t])=>
26{if(t<l[this._logLevel]||!console[e])return;let r=console[e].bind(console),n=!1,i=(0,s.wrapFunctionWithRestore)(console,e,t=>(...i)=>{if(t(...i),!n){n=!0;try{let t=i.map(e=>(0,o._safeStringify)(e,this._maxKeys,this._maxDepth,this._maxStringLength)),r=(0,o._getStackTrace)();this._enqueueConsoleLog(e,t,r)}catch(e){r("console observer error:",e,...i),this._errorBoundary.logError("autoCapture:ConsoleLogManager",e)}finally{n=!1}}});this._restoreFns.push(i)})}_enqueueConsoleLog(e,t,r){if(!this._shouldLog())return;let n=Object.assign({status:"log"===e?"info":e,log_level:e,payload:t,trace:r,timestamp:Date.now(),source:this.__source},(0,a._gatherAllMetadata)((0,s._getSafeUrl)()));this._enqueueFn(i.AutoCaptureEventName.CONSOLE_LOG,t.join(" "),n)}_shouldLog(){return!this._options.sampleRate||"number"!=typeof this._options.sampleRate||this._options.sampleRate<=0||this._options.sampleRate>=1||Math.random()<this._options.sampleRate}}},9896:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeadClickConfig=void 0;let n=r(3328),i=r(5473),s=r(2185),o=r(3683),a=r(614);t.DeadClickConfig={CLICK_CHECK_TIMEOUT:1e3,SCROLL_DELAY_MS:100,SELECTION_CHANGE_DELAY_MS:100,MUTATION_DELAY_MS:2500,ABSOLUTE_DEAD_CLICK_TIMEOUT:2750},t.default=class{constructor(e,r){this._enqueueFn=e,this._errorBoundary=r,this._lastMutationTime=0,this._lastSelectionChangeTime=0,this._clicks=[],this._deadClickConfig=t.DeadClickConfig,this._handleScroll=(0,s.throttle)(()=>{let e=Date.now();this._clicks.forEach(t=>{t.scrollDelayMs||(t.scrollDelayMs=e-t.timestamp)})},50)}startTracking(){try{let e=(0,n._getWindowSafe)();if(!e)return;e.addEventListener("click",e=>this._handleClick(e),{capture:!0}),e.addEventListener("scroll",()=>this._handleScroll(),{capture:!0,passive:!0}),e.addEventListener("selectionchange",()=>this._handleSelectionChange()),this._setupMutationObserver()}catch(e){n.Log.error("Error starting dead click tracking",e),this._errorBoundary.logError("autoCapture:DeadClickManager",e)}}_handleClick(e){var t,r;let i=e.target;if(!i)return;let o={timestamp:Date.now(),eventTarget:i};s.interactiveElements.includes(null===(t=null==i?void 0:i.tagName)||void 0===t?void 0:t.toLowerCase())||this._clicks.push(o),this._clicks.length&&!this._clickCheckTimer&&(this._clickCheckTimer=null===(r=(0,n._getWindowSafe)())||void 0===r?void 0:r.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}_handleSelectionChange(){this._lastSelectionChangeTime=Date.now()}_setupMutationObserver(){let e=(0,n._getDocumentSafe)();e&&(this._observer=new MutationObserver(()=>{this._lastMutationTime=Date.now()}),this._observer.observe(e.body,{childList:!0,subtree:!0,attributes:!0,characterData:!0}))}_checkForDeadClick(){var e;if(!this._clicks.length)return;clearTimeout(this._clickCheckTimer),this._clickCheckTimer=void 0;let t=this._clicks;for(let e of(this._clicks=[],t)){this._updateClickDelayMs(e);let t=null!=e.scrollDelayMs&&e.scrollDelayMs<this._deadClickConfig.SCROLL_DELAY_MS,r=null!=e.selectionChangeDelayMs&&e.selectionChangeDelayMs<this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,n=null!=e.mutationDelayMs&&e.mutationDelayMs<this._deadClickConfig.MUTATION_DELAY_MS;if(t||r||n)continue;let i=null!=e.scrollDelayMs&&e.scrollDelayMs>this._deadClickConfig.SCROLL_DELAY_MS,s=null!=e.selectionChangeDelayMs&&e.selectionChangeDelayMs>this._deadClickConfig.SELECTION_CHANGE_DELAY_MS,o=null!=e.mutationDelayMs&&e.mutationDelayMs>this._deadClickConfig.MUTATION_DELAY_MS,a=null!=e.absoluteDelayMs&&e.absoluteDelayMs>this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT;i||s||o||a?this._logDeadClick(e,{scrollTimeout:i,selectionChangeTimeout:s,mutationTimeout:o,absoluteTimeout:a}):null!=e.absoluteDelayMs&&e.absoluteDelayMs<this._deadClickConfig.ABSOLUTE_DEAD_CLICK_TIMEOUT&&this._clicks.push(e)}this._clicks.length&&!this._clickCheckTimer&&(this._clickCheckTimer=null===(e=(0,n._getWindowSafe)())||void 0===e?void 0:e.setTimeout(()=>{this._checkForDeadClick()},this._deadClickConfig.CLICK_CHECK_TIMEOUT))}_logDeadClick(e,t){let{value:r,metadata:n}=(0,o._gatherEventData)(e.eventTarget);r&&this._enqueueFn(i.AutoCaptureEventName.DEAD_CLICK,r,Object.assign(Object.assign(Object.assign(Object.assign({},n),t),(0,a._gatherCommonMetadata)((0,s._getSafeUrl)())),{scrollDelayMs:e.scrollDelayMs,selectionChangeDelayMs:e.selectionChangeDelayMs,mutationDelayMs:e.mutationDelayMs,absoluteDelayMs:e.absoluteDelayMs}))}_updateClickDelayMs(e){!e.mutationDelayMs&&this._lastMutationTime>0&&e.timestamp<=this._lastMutationTime&&(e.mutationDelayMs=Date.now()-this._lastMutationTime),!e.selectionChangeDelayMs&&this._lastSelectionChangeTime>0&&e.timestamp<=this._lastSelectionChangeTime&&(e.selectionChangeDelayMs=Date.now()-this._lastSelectionChangeTime),e.absoluteDelayMs=Date.now()-e.timestamp}}},3480:function(e,t,r){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t.EngagementManager=void 0;let n=r(3328);t.EngagementManager=class{constructor(){this._lastScrollY=0,this._maxScrollY=0,this._lastScrollPercentage=0,this._maxScrollPercentage=0,this._lastPageViewTime=Date.now(),this._inactiveTimer=null,this._onInactivityCallback=null,this._meaningfulEngagementOccurred=!1,this._initializeScrollTracking()}_initializeScrollTracking(){let e=(0,n._getWindowSafe)();e&&(e.addEventListener("scroll",()=>this._handleScroll()),e.addEventListener("scrollend",()=>this._handleScroll()),e.addEventListener("resize",()=>this._handleScroll()))}_handleScroll(){let e=(0,n._getWindowSafe)(),t=(0,n._getDocumentSafe)();if(!e||!t)return;let r=t.body.scrollHeight,i=e.scrollY||t.documentElement.scrollTop||0,s=e.innerHeight;this._lastScrollY=i,this._maxScrollY=Math.max(this._maxScrollY,i);let o=Math.min(100,Math.round((i+s)/r*100));this._lastScrollPercentage=o,this._maxScrollPercentage=Math.max(this._maxScrollPercentage,o),this.bumpInactiveTimer()}getScrollMetrics(){return{lastScrollY:this._lastScrollY,maxScrollY:this._maxScrollY,lastScrollPercentage:this._lastScrollPercentage,maxScrollPercentage:this._maxScrollPercentage,scrollDepth:this._maxScrollPercentage}}getPageViewLength(){return Date.now()-this._lastPageViewTime}setLastPageViewTime(e){this._lastPageViewTime=e}startInactivityTracking(e){this._onInactivityCallback=e}bumpInactiveTimer(){let e=(0,n._getWindowSafe)();e&&(this._inactiveTimer&&clearTimeout(this._inactiveTimer),this._inactiveTimer=e.setTimeout(()=>{this._onInactivityCallback&&this._onInactivityCallback()},6e5))}setMeaningfulEngagementOccurred(e){this._meaningfulEngagementOccurred=e}getPageViewEndMetadata(){let e=Object.assign(Object.assign({},this.getScrollMetrics()),{pageViewLength:this.getPageViewLength(),meaningfulEngagementOccurred:this._meaningfulEngagementOccurred});return this.setMeaningfulEngagementOccurred(!1),e}}},442:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this._clicks=[]}isRageClick(e,t,r){return this._clicks=this._clicks.filter(e=>r-e.timestamp<1e3),this._clicks.length>0&&!(r=>{let n=e-r.x,i=t-r.y;return Math.abs(n)+Math.abs(i)<=30})(this._clicks[this._clicks.length-1])&&(this._clicks=[]),this._clicks.push({x:e,y:t,timestamp:r}),this._clicks.length>=3}}},8325:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebVitalsManager=void 0;let n=r(4511),i=r(3328),s=r(5473),o=r(2185),a=["CLS","FCP","INP","LCP","TTFB"];t.WebVitalsManager=class{constructor(e,t){this._enqueueFn=e,this._errorBoundary=t,this._isInitialized=!1,this._metricEvent={url:(0,o._getSafeUrlString)(),sanitizedUrl:(0,o._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}startTracking(){var e,t;try{if(this._isInitialized)return;let r=null===(t=null===(e=(0,i._getWindowSafe)())||void 0===e?void 0:e.location)||void 0===t?void 0:t.protocol;if("https:"!==r&&"http:"!==r)return;(0,n.onCLS)(e=>this._handleMetric(e)),(0,n.onFCP)(e=>this._handleMetric(e)),(0,n.onINP)(e=>this._handleMetric(e)),(0,n.onLCP)(e=>this._handleMetric(e)),(0,n.onTTFB)(e=>this._handleMetric(e)),this._isInitialized=!0}catch(e){i.Log.error("Error starting web vitals tracking",e),this._errorBoundary.logError("autoCapture:WebVitalsManager",e)}}_handleMetric(e){if(void 0===this._metricEvent.firstMetricTimestamp&&(this._metricEvent.firstMetricTimestamp=Date.now()),void 0===e||(null==e?void 0:e.name)===void 0)return;let t=(0,o._getSafeUrlString)();""!==t&&a.includes(e.name)&&(t!==this._metricEvent.url&&(this._enqueueWebVitalsAutoCaptureEvent(),this._metricEvent.url=t),this._metricEvent.metrics.push({name:e.name,value:e.value,delta:e.delta,id:e.id}),this._metricEvent.metrics.length===a.length&&this._enqueueWebVitalsAutoCaptureEvent())}_enqueueWebVitalsAutoCaptureEvent(){if(""===this._metricEvent.url||0===this._metricEvent.metrics.length)return;let e={};this._metricEvent.metrics.forEach(t=>{let r=t.name.toLowerCase();e[`${r}_value`]=t.value,e[`${r}_delta`]=t.delta,e[`${r}_id`]=t.id}),this._enqueueFn(s.AutoCaptureEventName.WEB_VITALS,this._metricEvent.sanitizedUrl,Object.assign(Object.assign({},e),{first_metric_timestamp:this._metricEvent.firstMetricTimestamp})),this._metricEvent={url:(0,o._getSafeUrlString)(),sanitizedUrl:(0,o._getSanitizedPageUrl)(),metrics:[],firstMetricTimestamp:void 0}}}},2566:function(e,t,r){"use strict";t.Hq=void 0;let n=r(3328),i=r(9023);Object.defineProperty(t,"Hq",{enumerable:!0,get:function(){return i.StatsigAutoCapturePlugin}}),r(5473),Object.assign((0,n._getStatsigGlobal)(),{AutoCapture:i.AutoCapture,runStatsigAutoCapture:i.runStatsigAutoCapture,StatsigAutoCapturePlugin:i.StatsigAutoCapturePlugin})},2185:function(e,t,r){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t.wrapFunctionWithRestore=t.throttle=t._sanitizeString=t._getAnchorNodeInHierarchy=t._getSafeTimezoneOffset=t._getSafeTimezone=t._getSafeNetworkInformation=t._registerEventHandler=t._getSanitizedPageUrl=t._getSafeUrlString=t._getSafeUrl=t._shouldLogEvent=t._getTargetNode=t._stripEmptyValues=t.interactiveElements=void 0;let n=r(3328),i=RegExp("^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$"),s=RegExp("^(\\d{3}-?\\d{2}-?\\d{4})$");function o(){var e,t,r;let i;let s=null!==(r=null===(t=null===(e=(0,n._getWindowSafe)())||void 0===e?void 0:e.location)||void 0===t?void 0:t.href)&&void 0!==r?r:"";try{i=new URL(s)}catch(e){i=new URL("error:")}return i}function a(e){if(!e)return null;let t=e;for(;t;){let e=t.tagName.toLowerCase();if(["body","document"].includes(e))break;if("a"===t.tagName.toLowerCase())return t;t=t.parentElement}return null}t.interactiveElements=["button","a","input","select","textarea","form","select","label"],t._stripEmptyValues=function(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>null!=t&&""!==t&&void 0!==t))},t._getTargetNode=function(e){if(!e)return null;let t=e.target||e.srcElement;return t&&t instanceof Element?(3===t.nodeType&&(t=t.parentNode||null),t):null},t._shouldLogEvent=function(e,r,n=!1){if(!e||!r||1!==r.nodeType)return!1;let i=r.tagName.toLowerCase(),s=e.type.toLowerCase(),o=r.classList;if(o.contains("statsig-no-capture"))return!1;if(n)return!0;switch(i){case"html":return!1;case"form":return["submit"].indexOf(s)>=0;case"input":case"select":case"textarea":return["change","click"].indexOf(s)>=0;default:if("click"===s){let e=window.getComputedStyle(r);if(e&&"pointer"===e.getPropertyValue("cursor")||t.interactiveElements.includes(i)||"true"===r.getAttribute("contenteditable"))return!0;let n=a(r);if(n)return!0}return!1}},t._getSafeUrl=o,t._getSafeUrlString=function(){let e=o().toString();return e.startsWith("error:")?"":e},t._getSanitizedPageUrl=function(){return(0,n._getCurrentPageUrlSafe)()||""},t._registerEventHandler=function(e,t,r){e&&e.addEventListener&&e.addEventListener(t,r,!0)},t._getSafeNetworkInformation=function(){let e=(0,n._getWindowSafe)();if(!e||!e.navigator)return null;let t=e.navigator.connection;return t||null},t._getSafeTimezone=function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return null}},t._getSafeTimezoneOffset=function(){try{return new Date().getTimezoneOffset()}catch(e){return null}},t._getAnchorNodeInHierarchy=a,t._sanitizeString=function(e){return e?e.replace(/<[^>]*>/g,"").trim().split(/(\s+)/).filter(e=>!(i.test((e||"").replace(/[- ]/g,""))||s.test((e||"").replace(/[- ]/g,"")))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255):null},t.throttle=function(e,t){let r=0;return function(...n){let i=Date.now();i-r>=t&&(r=i,e(...n))}},t.wrapFunctionWithRestore=function(e,t,r){let n=e[t];if("function"!=typeof n)return()=>{};try{let i=r(n);return Object.defineProperty(i,"__statsig_original__",{enumerable:!1,value:n}),e[t]=i,()=>{e[t]=n}}catch(e){return()=>{}}}},7191:function(e,t){"use strict";function r(e,t){return e.length<=t?e:e.slice(0,t)+"..."}Object.defineProperty(t,"__esModule",{value:!0}),t._getStackTrace=t._safeStringify=void 0,t._safeStringify=function(e,t,n,i){try{if("[object Object]"===Object.prototype.toString.call(e)&&(Object.keys(e).length>t||function e(t,r){return r<=0||"object"==typeof t&&null!==t&&Object.keys(t).some(n=>e(t[n],r-1))}(e,n))||"function"==typeof e)return r(e.toString(),i);if("string"==typeof e)return r(e,i);if("object"==typeof e&&null!==e)return r(JSON.stringify(e),i);return r(String(e),i)}catch(e){return r("[Unserializable]",i)}},t._getStackTrace=function(){var e,t;try{return null!==(t=null===(e=Error().stack)||void 0===e?void 0:e.split("\n").slice(2))&&void 0!==t?t:[]}catch(e){return[]}}},3683:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t._getMetadataFromElement=t._gatherCopyEventData=t._gatherEventData=void 0;let n=r(3328),i=r(2185);function s(e,t){return e?e.length>t?e.substring(0,t)+"...":e:null}function o(e){let t={};return t.class=(s(e.getAttribute("class"),1e3)||"").replace(/\s+/g," ").trim(),t.id=s(e.getAttribute("id"),1e3),t.ariaLabel=s(e.getAttribute("aria-label"),1e3),t.name=s(e.getAttribute("name"),1e3),t}function a(e){let t={},r=o(e);Object.assign(t,r);let n=Array.from(e.classList);return t.classList=n.length>0?n.slice(0,100):null,t.selector=function(e){if(!e)return"";if(!e.parentNode){let t=e.tagName.toLowerCase();if(e.id)return`#${e.id}`;let r=t;if(e.className&&"string"==typeof e.className){let t=e.className.trim().split(/\s+/);t.length>0&&""!==t[0]&&(r+="."+t.join("."))}return r}let t=[],r=e,n=0;for(;r&&r.nodeType===Node.ELEMENT_NODE&&n<50;){let e=function(e){let t=e.tagName.toLowerCase();if(e.id)return`#${e.id}`;let r=t;if(e.className&&"string"==typeof e.className){let t=e.className.trim().split(/\s+/);t.length>0&&""!==t[0]&&(r+="."+t.join("."))}let n=e.parentElement;if(n&&n.children.length>1){let t=1,n=1,i=e.previousElementSibling;for(;i;)t++,i.tagName===e.tagName&&n++,i=i.previousElementSibling;r+=`:nth-child(${t})`,(n>1||function(e){let t=e.nextElementSibling;for(;t;){if(t.tagName===e.tagName)return!0;t=t.nextElementSibling}return!1}(e))&&(r+=`:nth-of-type(${n})`)}return r}(r);if(t.unshift(e),r.id||(r=r.parentElement)&&"body"===r.tagName.toLowerCase())break;n++}return t.join(" > ")}(e),t}t._gatherEventData=function(e){let t=(0,i._getSanitizedPageUrl)()||"",r=e.tagName.toLowerCase();if("input"===e.tagName.toLowerCase()&&["button","checkbox","submit","reset"].includes(e.getAttribute("type")||"")||"textarea"===e.tagName.toLowerCase()||"select"===e.tagName.toLowerCase()||"true"===e.getAttribute("contenteditable"))return{value:t,metadata:o(e)};let n={};n.tagName=r;let s=a(e);Object.assign(n,s),"form"===r&&Object.assign(n,function(e){var t;let r={};return r.action=e.getAttribute("action"),r.method=null!==(t=e.getAttribute("method"))&&void 0!==t?t:"GET",r.formName=e.getAttribute("name"),r.formId=e.getAttribute("id"),r}(e)),"input"===r&&Object.assign(n,function(e){let t={};return t.content=e.value,t.inputName=e.getAttribute("name"),t}(e));let l=(0,i._getAnchorNodeInHierarchy)(e);return l&&Object.assign(n,function(e){let t={};return t.href=e.getAttribute("href"),t}(l)),("button"===r||l)&&Object.assign(n,function(e){let t={};t.content=(e.textContent||"").trim();let r=function(e){let t={};if(!e)return t;let r=null==e?void 0:e.dataset;if(!r)return t;for(let e in r)t[`data-${e}`]=r[e]||"";return t}(e);return Object.assign(t,r),t}(l||e)),function(e){var t;if(Array.isArray(e.classList)&&(null===(t=e.classList)||void 0===t?void 0:t.includes("statsig-ctr-capture")))return!0;let r=e.href;if(r)try{let e=(0,i._getSafeUrl)(),t=new URL(r);return e.host!==t.host}catch(e){}return!1}(n)&&(n.isOutbound="true"),{value:t,metadata:n}},t._gatherCopyEventData=function(e){var t,r;let s=null===(r=null===(t=(0,n._getWindowSafe)())||void 0===t?void 0:t.getSelection())||void 0===r?void 0:r.toString(),o={};o.selectedText=(0,i._sanitizeString)(s);let a=e.type||"clipboard";return o.clipType=a,o},t._getMetadataFromElement=a},614:function(e,t,r){"use strict";
26Object.defineProperty(t,"__esModule",{value:!0}),t._getPossibleFirstTouchMetadata=t._getNetworkInfo=t._gatherAllMetadata=t._gatherCommonMetadata=void 0;let n=r(3328),i=r(2185);function s(e){var t,r,s,a,l,u,c,d;let h=(0,n._getDocumentSafe)(),p=(0,n._getWindowSafe)();return(0,i._stripEmptyValues)(Object.assign({title:null==h?void 0:h.title,current_url:null===(t=null==p?void 0:p.location)||void 0===t?void 0:t.href,user_agent:(null===(r=null==p?void 0:p.navigator)||void 0===r?void 0:r.userAgent)&&(null===(a=null===(s=null==p?void 0:p.navigator)||void 0===s?void 0:s.userAgent)||void 0===a?void 0:a.length)>200?p.navigator.userAgent.substring(0,200):null===(l=null==p?void 0:p.navigator)||void 0===l?void 0:l.userAgent,locale:null===(u=null==p?void 0:p.navigator)||void 0===u?void 0:u.language,hostname:e.hostname,pathname:e.pathname,screen_width:null===(c=null==p?void 0:p.screen)||void 0===c?void 0:c.width,screen_height:null===(d=null==p?void 0:p.screen)||void 0===d?void 0:d.height,viewport_width:null==p?void 0:p.innerWidth,viewport_height:null==p?void 0:p.innerHeight,viewport:`${null==p?void 0:p.innerWidth}x${null==p?void 0:p.innerHeight}`,timestamp:Date.now(),timezone:(0,i._getSafeTimezone)(),timezone_offset:(0,i._getSafeTimezoneOffset)()},o()))}function o(){let e=(0,i._getSafeNetworkInformation)(),t={};return(null==e?void 0:e.effectiveType)!==void 0&&(t.effective_connection_type=e.effectiveType),(null==e?void 0:e.rtt)!==void 0&&(t.rtt_ms=e.rtt),(null==e?void 0:e.downlink)!==void 0&&(t.downlink_mbps=e.downlink,t.downlink_kbps=1e3*e.downlink),(null==e?void 0:e.saveData)!==void 0&&(t.save_data=e.saveData),t}function a(e){let t=(null==e?void 0:e.referrer)||"";if(!t)return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""};try{let e=new URL(t),r=e.hostname,n=["google","bing","yahoo","duckduckgo","baidu"].find(e=>r.includes(e+"."))||"",i=e.searchParams.get("yahoo"===n?"p":"q")||"";return{referrer:t,referrer_domain:e.hostname,referrer_path:e.pathname,searchEngine:n,searchQuery:i}}catch(e){return{referrer:null,referrer_domain:null,referrer_path:null,searchEngine:"",searchQuery:""}}}function l(e){let t=e.searchParams,r={};return["utm_source","utm_medium","utm_campaign","utm_term","utm_content","msclkid","dclid","fbclid","gad_source","gclid","gclsrc","wbraid","utm_id","irclid","igshid","_kx","li_fat_id","mc_cid","mc_eid","epik","qclid","rdt_cid","sccid","ttc","ttclid","ttc_id","twclid"].forEach(e=>{let n=t.get(e);n&&(r[e]=n)}),r}t._gatherCommonMetadata=s,t._gatherAllMetadata=function(e){let t=(0,n._getDocumentSafe)(),r=(0,n._getWindowSafe)();if(!t||!r)return{};let o=a(t),u=s(e),c=l(e),d={};return e.searchParams.forEach((e,t)=>{d[t]=e}),Object.assign(Object.assign({},u),(0,i._stripEmptyValues)(Object.assign(Object.assign(Object.assign({},o),c),d)))},t._getNetworkInfo=o,t._getPossibleFirstTouchMetadata=function(e){let t=(0,n._getDocumentSafe)(),r=(0,n._getWindowSafe)();if(!t||!r)return{};let s=a(t),o=l(e),u=(0,i._stripEmptyValues)(Object.assign(Object.assign({},s),o)),c={};for(let[e,t]of Object.entries(u))c[`$s_${e}`]=t;return c}},4511:function(e,t){!function(e){"use strict";let t;let r=-1,n=e=>{addEventListener("pageshow",t=>{t.persisted&&(r=t.timeStamp,e(t))},!0)},i=(e,t,r,n)=>{let i,s;return o=>{var a;t.value>=0&&(o||n)&&((s=t.value-(i??0))||void 0===i)&&(i=t.value,t.delta=s,t.rating=(a=t.value)>r[1]?"poor":a>r[0]?"needs-improvement":"good",e(t))}},s=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},o=()=>{let e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},a=()=>{let e=o();return e?.activationStart??0},l=(e,t=-1)=>{let n=o(),i="navigate";return r>=0?i="back-forward-cache":n&&(document.prerendering||a()>0?i="prerender":document.wasDiscarded?i="restore":n.type&&(i=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:i}},u=new WeakMap;function c(e,t){return u.get(e)||u.set(e,new t),u.get(e)}class d{t;i=0;o=[];h(e){if(e.hadRecentInput)return;let t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}let h=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let n=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return n.observe({type:e,buffered:!0,...r}),n}}catch{}},p=e=>{let t=!1;return()=>{t||(e(),t=!0)}},f=-1,g=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,m=e=>{"hidden"===document.visibilityState&&f>-1&&(f="visibilitychange"===e.type?e.timeStamp:0,v())},y=()=>{addEventListener("visibilitychange",m,!0),addEventListener("prerenderingchange",m,!0)},v=()=>{removeEventListener("visibilitychange",m,!0),removeEventListener("prerenderingchange",m,!0)},_=()=>{if(f<0){let e=a(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;f=t??g(),y(),n(()=>{setTimeout(()=>{f=g(),y()})})}return{get firstHiddenTime(){return f}}},b=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},w=[1800,3e3],S=(e,t={})=>{b(()=>{let r=_(),o,u=l("FCP"),c=h("paint",e=>{for(let t of e)"first-contentful-paint"===t.name&&(c.disconnect(),t.startTime<r.firstHiddenTime&&(u.value=Math.max(t.startTime-a(),0),u.entries.push(t),o(!0)))});c&&(o=i(e,u,w,t.reportAllChanges),n(r=>{o=i(e,u=l("FCP"),w,t.reportAllChanges),s(()=>{u.value=performance.now()-r.timeStamp,o(!0)})}))})},C=[.1,.25],E=0,x=1/0,k=0,O=e=>{for(let t of e)t.interactionId&&(x=Math.min(x,t.interactionId),E=(k=Math.max(k,t.interactionId))?(k-x)/7+1:0)},I=()=>t?E:performance.interactionCount??0,R=()=>{"interactionCount"in performance||t||(t=h("event",O,{type:"event",buffered:!0,durationThreshold:0}))},T=0;class M{u=[];l=new Map;m;p;v(){T=I(),this.u.length=0,this.l.clear()}T(){let e=Math.min(this.u.length-1,Math.floor((I()-T)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;let t=this.u.at(-1),r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.P){if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort((e,t)=>
26t.P-e.P),this.u.length>10){let e=this.u.splice(10);for(let t of e)this.l.delete(t.id)}this.p?.(r)}}}let A=e=>{let t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=p(e),document.addEventListener("visibilitychange",e,{once:!0}),t(()=>{e(),document.removeEventListener("visibilitychange",e)}))},D=[200,500];class P{m;h(e){this.m?.(e)}}let L=[2500,4e3],N=[800,1800],j=e=>{document.prerendering?b(()=>j(e)):"complete"!==document.readyState?addEventListener("load",()=>j(e),!0):setTimeout(e)};e.CLSThresholds=C,e.FCPThresholds=w,e.INPThresholds=D,e.LCPThresholds=L,e.TTFBThresholds=N,e.onCLS=(e,t={})=>{S(p(()=>{let r,o=l("CLS",0),a=c(t,d),u=e=>{for(let t of e)a.h(t);a.i>o.value&&(o.value=a.i,o.entries=a.o,r())},p=h("layout-shift",u);p&&(r=i(e,o,C,t.reportAllChanges),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(u(p.takeRecords()),r(!0))}),n(()=>{a.i=0,r=i(e,o=l("CLS",0),C,t.reportAllChanges),s(()=>r())}),setTimeout(r))}))},e.onFCP=S,e.onINP=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&b(()=>{R();let r,s=l("INP"),o=c(t,M),a=e=>{A(()=>{for(let t of e)o.h(t);let t=o.T();t&&t.P!==s.value&&(s.value=t.P,s.entries=t.entries,r())})},u=h("event",a,{durationThreshold:t.durationThreshold??40});r=i(e,s,D,t.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&(a(u.takeRecords()),r(!0))}),n(()=>{o.v(),r=i(e,s=l("INP"),D,t.reportAllChanges)}))})},e.onLCP=(e,t={})=>{b(()=>{let r=_(),o,u=l("LCP"),d=c(t,P),f=e=>{for(let n of(t.reportAllChanges||(e=e.slice(-1)),e))d.h(n),n.startTime<r.firstHiddenTime&&(u.value=Math.max(n.startTime-a(),0),u.entries=[n],o())},g=h("largest-contentful-paint",f);if(g){o=i(e,u,L,t.reportAllChanges);let r=p(()=>{f(g.takeRecords()),g.disconnect(),o(!0)});for(let e of["keydown","click","visibilitychange"])addEventListener(e,()=>A(r),{capture:!0,once:!0});n(r=>{o=i(e,u=l("LCP"),L,t.reportAllChanges),s(()=>{u.value=performance.now()-r.timeStamp,o(!0)})})}})},e.onTTFB=(e,t={})=>{let r=l("TTFB"),s=i(e,r,N,t.reportAllChanges);j(()=>{let u=o();u&&(r.value=Math.max(u.responseStart-a(),0),r.entries=[u],s(!0),n(()=>{(s=i(e,r=l("TTFB",0),N,t.reportAllChanges))(!0)}))})}}(t)},4529:function(e,t,r){"use strict";r.d(t,{Ue:function(){return u}});let n=e=>{let t;let r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,s={setState:n,getState:i,subscribe:e=>(r.add(e),()=>r.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}};return t=e(n,i,s),s},i=e=>e?n(e):n;var s=r(7294),o=r(2798);let{useSyncExternalStoreWithSelector:a}=o,l=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");let t="function"==typeof e?i(e):e,r=(e,r)=>(function(e,t=e.getState,r){let n=a(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return(0,s.useDebugValue)(n),n})(t,e,r);return Object.assign(r,t),r},u=e=>e?l(e):l}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[774,179],function(){return t(6840),t(6885)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.