PageSourceSearch

https://www.sckry.com/_next/static/chunks/cbb2cc705847159b.js

js sckry.com collected 2026-10-02 01:42:55 UTC 234,431 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,67034,(e,t,r)=>{var s={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],s=t[1];return(r+s)*3/4-s},t.toByteArray=function(e){var t,r,n=l(e),o=n[0],a=n[1],h=new i((o+a)*3/4-a),u=0,c=a>0?o-4:o;for(r=0;r<c;r+=4)t=s[e.charCodeAt(r)]<<18|s[e.charCodeAt(r+1)]<<12|s[e.charCodeAt(r+2)]<<6|s[e.charCodeAt(r+3)],h[u++]=t>>16&255,h[u++]=t>>8&255,h[u++]=255&t;return 2===a&&(t=s[e.charCodeAt(r)]<<2|s[e.charCodeAt(r+1)]>>4,h[u++]=255&t),1===a&&(t=s[e.charCodeAt(r)]<<10|s[e.charCodeAt(r+1)]<<4|s[e.charCodeAt(r+2)]>>2,h[u++]=t>>8&255,h[u++]=255&t),h},t.fromByteArray=function(e){for(var t,s=e.length,i=s%3,n=[],o=0,a=s-i;o<a;o+=16383)n.push(function(e,t,s){for(var i,n=[],o=t;o<s;o+=3)i=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),n.push(r[i>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return n.join("")}(e,o,o+16383>a?a:o+16383));return 1===i?n.push(r[(t=e[s-1])>>2]+r[t<<4&63]+"=="):2===i&&n.push(r[(t=(e[s-2]<<8)+e[s-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),n.join("")};for(var r=[],s=[],i="u">typeof Uint8Array?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=n.length;o<a;++o)r[o]=n[o],s[n.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 s=r===t?0:4-r%4;return[r,s]}s[45]=62,s[95]=63},72:function(e,t,r){"use strict";var s=r(675),i=r(783),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)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 u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var s=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!a.isEncoding(i))throw TypeError("Unknown encoding: "+i);var n=0|d(s,i),l=o(n),h=l.write(s,i);return h!==n&&(l=l.slice(0,h)),l}if(ArrayBuffer.isView(e))return c(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(A(e,ArrayBuffer)||e&&A(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(A(e,SharedArrayBuffer)||e&&A(e.buffer,SharedArrayBuffer)))return function(e,t,r){var s;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(s=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),s}(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var u=e.valueOf&&e.valueOf();if(null!=u&&u!==e)return a.from(u,t,r);var f=function(e){if(a.isBuffer(e)){var t=0|p(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(f)return f;if("u">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 h(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 u(e){return h(e),o(e<0?0:0|p(e))}function c(e){for(var t=e.length<0?0:0|p(e.length),r=o(t),s=0;s<t;s+=1)r[s]=255&e[s];return r}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,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&&"u">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(
vendor: 15,328 bytes, line 1
1h(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 u(e)},a.allocUnsafeSlow=function(e){return u(e)};function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||A(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,s=arguments.length>2&&!0===arguments[2];if(!s&&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 s?-1:k(e).length;t=(""+t).toLowerCase(),i=!0}}function f(e,t,r){var i,n,o,a=!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 s=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>s)&&(r=s);for(var i="",n=t;n<r;++n)i+=R[e[n]];return i}(this,t,r);case"utf8":case"utf-8":return w(this,t,r);case"ascii":return function(e,t,r){var s="";r=Math.min(e.length,r);for(var i=t;i<r;++i)s+=String.fromCharCode(127&e[i]);return s}(this,t,r);case"latin1":case"binary":return function(e,t,r){var s="";r=Math.min(e.length,r);for(var i=t;i<r;++i)s+=String.fromCharCode(e[i]);return s}(this,t,r);case"base64":return i=this,n=t,o=r,0===n&&o===i.length?s.fromByteArray(i):s.fromByteArray(i.slice(n,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){for(var s=e.slice(t,r),i="",n=0;n<s.length;n+=2)i+=String.fromCharCode(s[n]+256*s[n+1]);return i}(this,t,r);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function g(e,t,r){var s=e[t];e[t]=e[r],e[r]=s}function m(e,t,r,s,i){var n;if(0===e.length)return -1;if("string"==typeof r?(s=r,r=0):r>0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(n=r*=1)!=n&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,s)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,s,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return y(e,[t],r,s,i)}throw TypeError("val must be string, number or Buffer")}function y(e,t,r,s,i){var n,o=1,a=e.length,l=t.length;if(void 0!==s&&("ucs2"===(s=String(s).toLowerCase())||"ucs-2"===s||"utf16le"===s||"utf-16le"===s)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,r/=2}function h(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(n=r;n<a;n++)if(h(e,n)===h(t,-1===u?0:n-u)){if(-1===u&&(u=n),n-u+1===l)return u*o}else -1!==u&&(n-=n-u),u=-1}else for(r+l>a&&(r=a-l),n=r;n>=0;n--){for(var c=!0,p=0;p<l;p++)if(h(e,n+p)!==h(t,p)){c=!1;break}if(c)return n}return -1}a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(A(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),A(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,s=t.length,i=0,n=Math.min(r,s);i<n;++i)if(e[i]!==t[i]){r=e[i],s=t[i];break}return r<s?-1:+(s<r)},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,s=a.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var n=e[r];if(A(n,Uint8Array)&&(n=a.from(n)),!a.isBuffer(n))throw TypeError('"list" argument must be an Array of Buffers');n.copy(s,i),i+=n.length}return s},a.byteLength=d,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)g(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)g(this,t,t+3),g(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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?w(this,0,e):f.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.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,s,i){if(A(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===s&&(s=0),void 0===i&&(i=this.length),t<0||r>e.length||s<0||i>this.length)throw RangeError("out of range index");if(s>=i&&t>=r)return 0;if(s>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,s>>>=0,i>>>=0,this===e)return 0;for(var n=i-s,o=r-t,l=Math.min(n,o),h=this.slice(s,i),u=e.slice(t,r),c=0;c<l;++c)if(h[c]!==u[c]){n=h[c],o=u[c];break}return n<o?-1:+(o<n)},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)};function w(e,t,r){r=Math.min(e.length,r);for(var s=[],i=t;i<r;){var n,o,a,l,h=e[i],u=null,c=h>239?4:h>223?3:h>191?2:1;if(i+c<=r)switch(c){case 1:h<128&&(u=h);break;case 2:(192&(n=e[i+1]))==128&&(l=(31&h)<<6|63&n)>127&&(u=l);break;case 3:n=e[i+1],o=e[i+2],(192&n)==128&&(192&o)==128&&(l=(15&h)<<12|(63&n)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:n=e[i+1],o=e[i+2],a=e[i+3],(192&n)==128&&(192&o)==128&&(192&a)==128&&(l=(15&h)<<18|(63&n)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,c=1):u>65535&&(u-=65536,s.push(u>>>10&1023|55296),u=56320|1023&u),s.push(u),i+=c}var p=s,d=p.length;if(d<=4096)return String.fromCharCode.apply(String,p);for(var f="",g=0;g<d;)f+=String.fromCharCode.apply(String,p.slice(g,g+=4096));return f}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 v(e,t,r,s,i,n){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<n)throw RangeError('"value" argument is out of bounds');if(r+s>e.length)throw RangeError("Index out of range")}function S(e,t,r,s,i,n){if(r+s>e.length||r<0)throw RangeError("Index out of range")}function C(e,t,r,s,n){return t*=1,r>>>=0,n||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,s,23,4),r+4}function I(e,t,r,s,n){return t*=1,r>>>=0,n||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,s,52,8),r+8}a.prototype.write=function(e,t,r,s){if(void 0===t)s="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)s=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===s&&(s="utf8")):(s=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,n,o,a,l,h,u,c,p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");s||(s="utf8");for(var d=!1;;)switch(s){case"hex":return function(e,t,r,s){r=Number(r)||0;var i=e.length-r;s?(s=Number(s))>i&&(s=i):s=i;var n=t.length;s>n/2&&(s=n/2);for(var o=0;o<s;++o){var a,l=parseInt(t.substr(2*o,2),16);if((a=l)!=a)break;e[r+o]=l}return o}(this,e,t,r);case"utf8":case"utf-8":return i=t,n=r,M(k(e,this.length-i),this,i,n);case"ascii":return o=t,a=r,M(E(e),this,o,a);case"latin1":case"binary":return function(e,t,r,s){return M(E(t),e,r,s)}(this,e,t,r);case"base64":return l=t,h=r,M(O(e),this,l,h);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,c=r,M(function(e,t){for(var r,s,i=[],n=0;n<e.length&&!((t-=2)<0);++n)s=(r=e.charCodeAt(n))>>8,i.push(r%256),i.push(s);return i}(e,this.length-u),this,u,c);default:if(d)throw TypeError("Unknown encoding: "+s);s=(""+s).toLowerCase(),d=!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 s=this.subarray(e,t);return Object.setPrototypeOf(s,a.prototype),s},a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var s=this[e],i=1,n=0;++n<t&&(i*=256);)s+=this[e+n]*i;return s},a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var s=this[e+--t],i=1;t>0&&(i*=256);)s+=this[e+--t]*i;return s},a.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},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)+0x1000000*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*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 s=this[e],i=1,n=0;++n<t&&(i*=256);)s+=this[e+n]*i;return s>=(i*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var s=t,i=1,n=this[e+--s];s>0&&(i*=256);)n+=this[e+--s]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},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?0xffff0000|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?0xffff0000|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=function(e,t,r,s){if(e*=1,t>>>=0,r>>>=0,!s){var i=Math.pow(2,8*r)-1;v(this,e,t,r,i,0)}var n=1,o=0;for(this[t]=255&e;++o<r&&(n*=256);)this[t+o]=e/n&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,s){if(e*=1,t>>>=0,r>>>=0,!s){var i=Math.pow(2,8*r)-1;v(this,e,t,r,i,0)}var n=r-1,o=1;for(this[t+n]=255&e;--n>=0&&(o*=256);)this[t+n]=e/o&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,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=function(e,t,r){return e*=1,t>>>=0,r||v(this,e,t,4,0xffffffff,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,s){if(e*=1,t>>>=0,!s){var i=Math.pow(2,8*r-1);v(this,e,t,r,i-1,-i)}var n=0,o=1,a=0;for(this[t]=255&e;++n<r&&(o*=256);)e<0&&0===a&&0!==this[t+n-1]&&(a=1),this[t+n]=(e/o|0)-a&255;return t+r},a.prototype.writeIntBE=function(e,t,r,s){if(e*=1,t>>>=0,!s){var i=Math.pow(2,8*r-1);v(this,e,t,r,i-1,-i)}var n=r-1,o=1,a=0;for(this[t+n]=255&e;--n>=0&&(o*=256);)e<0&&0===a&&0!==this[t+n+1]&&(a=1),this[t+n]=(e/o|0)-a&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||v(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*=1,t>>>=0,r||v(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*=1,t>>>=0,r||v(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*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),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*=1,t>>>=0,r||v(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+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 I(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return I(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,s){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),s||0===s||(s=this.length),t>=e.length&&(t=e.length),t||(t=0),s>0&&s<r&&(s=r),s===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(s<0)throw RangeError("sourceEnd out of bounds");s>this.length&&(s=this.length),e.length-t<s-r&&(s=e.length-t+r);var i=s-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,s);else if(this===e&&r<t&&t<s)for(var n=i-1;n>=0;--n)e[n+t]=this[n+r];else Uint8Array.prototype.set.call(e,this.subarray(r,s),t);return i},a.prototype.fill=function(e,t,r,s){if("string"==typeof e){if("string"==typeof t?(s=t,t=0,r=this.length):"string"==typeof r&&(s=r,r=this.length),void 0!==s&&"string"!=typeof s)throw TypeError("encoding must be a string");if("string"==typeof s&&!a.isEncoding(s))throw TypeError("Unknown encoding: "+s);if(1===e.length){var i,n=e.charCodeAt(0);("utf8"===s&&n<128||"latin1"===s)&&(e=n)}}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,s),l=o.length;
1if(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,s=e.length,i=null,n=[],o=0;o<s;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319||o+1===s){(t-=3)>-1&&n.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&n.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&n.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;n.push(r)}else if(r<2048){if((t-=2)<0)break;n.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;n.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;n.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return n}function E(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function O(e){return s.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 M(e,t,r,s){for(var i=0;i<s&&!(i+r>=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function A(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var s=16*r,i=0;i<16;++i)t[s+i]=e[r]+e[i];return t}()},783:function(e,t){t.read=function(e,t,r,s,i){var n,o,a=8*i-s-1,l=(1<<a)-1,h=l>>1,u=-7,c=r?i-1:0,p=r?-1:1,d=e[t+c];for(c+=p,n=d&(1<<-u)-1,d>>=-u,u+=a;u>0;n=256*n+e[t+c],c+=p,u-=8);for(o=n&(1<<-u)-1,n>>=-u,u+=s;u>0;o=256*o+e[t+c],c+=p,u-=8);if(0===n)n=1-h;else{if(n===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,s),n-=h}return(d?-1:1)*o*Math.pow(2,n-s)},t.write=function(e,t,r,s,i,n){var o,a,l,h=8*n-i-1,u=(1<<h)-1,c=u>>1,p=5960464477539062e-23*(23===i),d=s?0:n-1,f=s?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+c>=1?t+=p/l:t+=p*Math.pow(2,1-c),t*l>=2&&(o++,l/=2),o+c>=u?(a=0,o=u):o+c>=1?(a=(t*l-1)*Math.pow(2,i),o+=c):(a=t*Math.pow(2,c-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&a,d+=f,a/=256,i-=8);for(o=o<<i|a,h+=i;h>0;e[r+d]=255&o,d+=f,o/=256,h-=8);e[r+d-f]|=128*g}}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}},o=!0;try{s[e](r,r.exports,n),o=!1}finally{o&&delete i[e]}return r.exports}n.ab="/ROOT/node_modules/next/dist/compiled/buffer/",t.exports=n(72)},76008,e=>{"use strict";let t,r,s,i,n,o,a,l,h,u,c,p,d,f,g,m,y,w,b,v,S,C;var I,x,k,E,O,M,A,R,T,_,N,P,D,L,F=e.i(71645),U=e.i(67034),B=e.i(47167),z=Object.defineProperty,j=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?z(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r},V=Object.defineProperty,W=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?V(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r},$=((I=$||{})[I.Document=0]="Document",I[I.DocumentType=1]="DocumentType",I[I.Element=2]="Element",I[I.Text=3]="Text",I[I.CDATA=4]="CDATA",I[I.Comment=5]="Comment",I);let G={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Z={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},H={};function Y(e){if(H[e])return H[e];let t=globalThis[e],r=t.prototype,s=e in G?G[e]:void 0,i=!!(s&&s.every(e=>{var t,s;return!!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),n=e in Z?Z[e]:void 0,o=!!(n&&n.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&o&&!globalThis.Zone)return H[e]=t.prototype,t.prototype;try{let s=document.createElement("iframe");document.body.appendChild(s);let i=s.contentWindow;if(!i)return t.prototype;let n=i[e].prototype;if(document.body.removeChild(s),!n)return r;return H[e]=n}catch{return r}}let J={};function X(e,t,r){var s;let i=`${e}.${String(r)}`;if(J[i])return J[i].call(t);let n=null==(s=Object.getOwnPropertyDescriptor(Y(e),r))?void 0:s.get;return n?(J[i]=n,n.call(t)):t[r]}let K=function(e){return X("Node",e,"childNodes")},q=function(e){return X("Node",e,"parentNode")},Q=function(e){return X("Node",e,"parentElement")},ee=function(e){return X("Node",e,"textContent")},et=function(e){return e&&"shadowRoot"in e?X("Element",e,"shadowRoot"):null};
1function er(e){return e.nodeType===e.ELEMENT_NODE}function es(e){var t;let r=e&&"host"in e&&"mode"in e&&((t=e)&&"host"in t?X("ShadowRoot",t,"host"):null)||null;return!!(r&&"shadowRoot"in r&&et(r)===e)}function ei(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function en(e){try{var t;let r=e.rules||e.cssRules;if(!r)return null;let s=e.href;return!s&&e.ownerNode&&(s=e.ownerNode.baseURI),(t=Array.from(r,e=>eo(e,s)).join("")).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 eo(e,t){if("styleSheet"in e){let t;try{t=en(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?ey(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)?ey(r,t):r}}class ea{constructor(){W(this,"idNodeMap",new Map),W(this,"nodeMetaMap",new WeakMap)}getId(e){var t;return e?(null==(t=this.getMeta(e))?void 0:t.id)??-1:-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 el({element:e,maskInputOptions:t,tagName:r,type:s,value:i,maskInputFn:n}){let o=i||"",a=s&&eh(s);return(t[r.toLowerCase()]||a&&t[a])&&(o=n?n(o,e):"*".repeat(o.length)),o}function eh(e){return e.toLowerCase()}let eu="__rrweb_original__";function ec(e){let t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?eh(t):null}function ep(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}let s=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==s?void 0:s[1])??null}let ed=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ef=/^(?:[a-z+]+:)?\/\//i,eg=/^www\..*/i,em=/^(data:)([^,]*),(.*)/i;function ey(e,t){return(e||"").replace(ed,(e,r,s,i,n,o)=>{let a=s||n||o,l=r||i||"";if(!a)return e;if(ef.test(a)||eg.test(a)||em.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 h=t.split("/"),u=a.split("/");for(let e of(h.pop(),u))if("."===e)continue;else".."===e?h.pop():h.push(e);return`url(${l}${h.join("/")}${l})`})}function ew(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}let eb=1,ev=RegExp("[^a-z0-9-_:]");function eS(){return eb++}let eC=/^[^ \t\n\r\u000c]+/,eI=/^[, \t\n\r\u000c]+/,ex=new WeakMap;function ek(e,t){return t&&""!==t.trim()?eE(e,t):t}function eE(e,t){let r=ex.get(e);if(r||(r=e.createElement("a"),ex.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function eO(e,t,r,s){if(!s)return s;if("src"===r||"href"===r&&("use"!==t||"#"!==s[0])||"xlink:href"===r&&"#"!==s[0])return ek(e,s);if("background"===r&&["table","td","th"].includes(t))return ek(e,s);if("srcset"===r)return function(e,t){if(""===t.trim())return t;let r=0;function s(e){let s,i=e.exec(t.substring(r));return i?(s=i[0],r+=s.length,s):""}let i=[];for(;s(eI),!(r>=t.length);){let n=s(eC);if(","===n.slice(-1))n=ek(e,n.substring(0,n.length-1)),i.push(n);else{let s="";n=ek(e,n);let o=!1;for(;;){let e=t.charAt(r);if(""===e){i.push((n+s).trim());break}if(o)")"===e&&(o=!1);else if(","===e){r+=1,i.push((n+s).trim());break}else"("===e&&(o=!0);s+=e,r+=1}}}return i.join(", ")}(e,s);if("style"===r)return ey(s,eE(e));else if("object"===t&&"data"===r)return ek(e,s);return s}function eM(e,t,r){return["video","audio"].includes(e)&&"autoplay"===t}function eA(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&eA(q(e),t,r);for(let r=e.classList.length;r--;){let s=e.classList[r];if(t.test(s))return!0}return!!r&&eA(q(e),t,r)}function eR(e,t,r,s){let i;if(er(e)){if(!K(i=e).length)return!1}else{if(null===Q(e))return!1;i=Q(e)}
1try{if("string"==typeof t){if(s){if(i.closest(`.${t}`))return!0}else if(i.classList.contains(t))return!0}else if(eA(i,t,s))return!0;if(r){if(s){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch(e){}return!1}function eT(e){return null==e?"":e.toLowerCase()}function e_(e){return!0===e||"all"===e?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===e,headMetaDescKeywords:"all"===e,headTitleMutations:"all"===e}:e||{}}function eN(e,s){let i,{doc:n,mirror:o,blockClass:a,blockSelector:l,maskTextClass:h,maskTextSelector:u,skipChild:c=!1,inlineStylesheet:p=!0,maskInputOptions:d={},maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y={},inlineImages:w=!1,recordCanvas:b=!1,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:C=5e3,onStylesheetLoad:I,stylesheetLoadTimeout:x=5e3,keepIframeSrcFn:k=()=>!1,newlyAddedElement:E=!1,cssCaptured:O=!1}=s,{needsMask:M}=s,{preserveWhiteSpace:A=!0}=s;M||(M=eR(e,h,u,void 0===M));let R=function(e,s){let{doc:i,mirror:n,blockClass:o,blockSelector:a,needsMask:l,inlineStylesheet:h,maskInputOptions:u={},maskTextFn:c,maskInputFn:p,dataURLOptions:d={},inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:y=!1,cssCaptured:w=!1}=s,b=function(e,t){if(!t.hasNode(e))return;let r=t.getId(e);return 1===r?void 0:r}(i,n);switch(e.nodeType){case e.DOCUMENT_NODE:if("CSS1Compat"!==e.compatMode)return{type:$.Document,childNodes:[],compatMode:e.compatMode};return{type:$.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:$.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return function(e,s){let i,{doc:n,blockClass:o,blockSelector:a,inlineStylesheet:l,maskInputOptions:h={},maskInputFn:u,dataURLOptions:c={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:g=!1,rootId:m}=s,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 s=e.classList[r];if(t.test(s))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,o,a),w=function(e){if(e instanceof HTMLFormElement)return"form";let t=eh(e.tagName);return ev.test(t)?"div":t}(e),b={},v=e.attributes.length;for(let t=0;t<v;t++){let r=e.attributes[t];
1eM(w,r.name,r.value)||(b[r.name]=eO(n,w,eh(r.name),r.value))}if("link"===w&&l){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=en(t)),r&&(delete b.rel,delete b.href,b._cssText=r)}if("style"===w&&e.sheet){let t=en(e.sheet);t&&(e.childNodes.length>1&&(t=(function(e,t,r=!1){let s=Array.from(t.childNodes),i=[],n=0;if(s.length>1&&e&&"string"==typeof e){let t=ew(e,r),o=t.length/e.length;for(let a=1;a<s.length;a++)if(s[a].textContent&&"string"==typeof s[a].textContent){let l=ew(s[a].textContent,r),h=3;for(;h<l.length&&(l[h].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,h),1));h++);for(;h<l.length;h++){let u=l.substring(0,h),c=t.split(u),p=-1;if(2===c.length)p=c[0].length;else if(c.length>2&&""===c[0]&&""!==s[a-1].textContent)p=t.indexOf(u,1);else if(1===c.length){if(u=u.substring(0,u.length-1),(c=t.split(u)).length<=1)return i.push(e),i;h=101}else h===l.length-1&&(p=t.indexOf(u));if(c.length>=2&&h>100){let e=s[a-1].textContent;if(e&&"string"==typeof e){let r=ew(e).length;p=t.indexOf(u,r)}-1===p&&(p=c[0].length)}if(-1!==p){let a=Math.floor(p/o);for(;a>0&&a<e.length;){if((n+=1)>50*s.length)return i.push(e),i;let l=ew(e.substring(0,a),r);if(l.length===p){i.push(e.substring(0,a)),e=e.substring(a),t=t.substring(p);break}l.length<p?a+=Math.max(1,Math.floor((p-l.length)/o)):a-=Math.max(1,Math.floor((l.length-p)*o))}break}}}}return i.push(e),i})(t,e).join("/* rr_split */")),b._cssText=t)}if(["input","textarea","select"].includes(w)){let t=e.value,r=e.checked;"radio"!==b.type&&"checkbox"!==b.type&&"submit"!==b.type&&"button"!==b.type&&t?b.value=el({element:e,type:ec(e),tagName:w,value:t,maskInputOptions:h,maskInputFn:u}):r&&(b.checked=r)}if("option"===w&&(e.selected&&!h.select?b.selected=!0:delete b.selected),"dialog"===w&&e.open&&(b.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal"),"canvas"===w&&d){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 s=0;s<e.height;s+=50){let i=t.getImageData;if(new Uint32Array((eu in i?i[eu]:i).call(t,r,s,Math.min(50,e.width-r),Math.min(50,e.height-s)).data.buffer).some(e=>0!==e))return!1}return!0}(e)&&(b.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){let t=e.toDataURL(c.type,c.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height,t!==r.toDataURL(c.type,c.quality)&&(b.rr_dataURL=t)}}if("img"===w&&p){t||(r=(t=n.createElement("canvas")).getContext("2d"));let s=e.currentSrc||e.getAttribute("src")||"<unknown-src>",i=e.crossOrigin,o=()=>{e.removeEventListener("load",o);try{t.width=e.naturalWidth,t.height=e.naturalHeight,r.drawImage(e,0,0),b.rr_dataURL=t.toDataURL(c.type,c.quality)}catch(t){if("anonymous"!==e.crossOrigin){e.crossOrigin="anonymous",e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o);return}console.warn(`Cannot inline img src=${s}! Error: ${t}`)}"anonymous"===e.crossOrigin&&(i?b.crossOrigin=i:e.removeAttribute("crossorigin"))};e.complete&&0!==e.naturalWidth?o():e.addEventListener("load",o)}if(["audio","video"].includes(w)){let t=b;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&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),y){let{width:t,height:r}=e.getBoundingClientRect();b={class:b.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==w||f(b.src)||(e.contentDocument||(b.rr_src=b.src),delete b.src);try{customElements.get(w)&&(i=!0)}catch(e){}return{type:$.Element,tagName:w,attributes:b,childNodes:[],isSVG:!!("svg"===e.tagName||e.ownerSVGElement)||void 0,needBlock:y,rootId:m,isCustom:i}}(e,{doc:i,blockClass:o,blockSelector:a,inlineStylesheet:h,maskInputOptions:u,maskInputFn:p,dataURLOptions:d,inlineImages:f,recordCanvas:g,keepIframeSrcFn:m,newlyAddedElement:y,rootId:b});case e.TEXT_NODE:return function(e,t){let{needsMask:r,maskTextFn:s,rootId:i,cssCaptured:n}=t,o=q(e),a=o&&o.tagName,l="",h="STYLE"===a||void 0,u="SCRIPT"===a||void 0;return u?l="SCRIPT_PLACEHOLDER":!n&&(l=ee(e),h&&l&&(l=ey(l,eE(t.doc)))),!h&&!u&&l&&r&&(l=s?s(l,Q(e)):l.replace(/[\S]/g,"*")),{type:$.Text,textContent:l||"",rootId:i}}(e,{doc:i,needsMask:l,maskTextFn:c,rootId:b,cssCaptured:w});case e.CDATA_SECTION_NODE:return{type:$.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:$.Comment,textContent:ee(e)||"",rootId:b};default:return!1}}(e,{doc:n,mirror:o,blockClass:a,blockSelector:l,needsMask:M,inlineStylesheet:p,maskInputOptions:d,maskTextFn:f,maskInputFn:g,dataURLOptions:y,inlineImages:w,recordCanvas:b,keepIframeSrcFn:k,newlyAddedElement:E,cssCaptured:O});if(!R)return console.warn(e,"not serialized"),null;i=o.hasNode(e)?o.getId(e):!function(e,t){if(t.comment&&e.type===$.Comment)return!0;
1if(e.type===$.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel&&"script"===e.attributes.as||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===ep(e.attributes.href)))return!0;else if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(eT(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===eT(e.attributes.name)||"icon"===eT(e.attributes.rel)||"apple-touch-icon"===eT(e.attributes.rel)||"shortcut icon"===eT(e.attributes.rel))))return!0;else if("meta"===e.tagName){if(t.headMetaDescKeywords&&eT(e.attributes.name).match(/^description|keywords$/))return!0;else if(t.headMetaSocial&&(eT(e.attributes.property).match(/^(og|twitter|fb):/)||eT(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===eT(e.attributes.name)))return!0;else if(t.headMetaRobots&&("robots"===eT(e.attributes.name)||"googlebot"===eT(e.attributes.name)||"bingbot"===eT(e.attributes.name)))return!0;else if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;else if(t.headMetaAuthorship&&("author"===eT(e.attributes.name)||"generator"===eT(e.attributes.name)||"framework"===eT(e.attributes.name)||"publisher"===eT(e.attributes.name)||"progid"===eT(e.attributes.name)||eT(e.attributes.property).match(/^article:/)||eT(e.attributes.property).match(/^product:/)))return!0;else if(t.headMetaVerification&&("google-site-verification"===eT(e.attributes.name)||"yandex-verification"===eT(e.attributes.name)||"csrf-token"===eT(e.attributes.name)||"p:domain_verify"===eT(e.attributes.name)||"verify-v1"===eT(e.attributes.name)||"verification"===eT(e.attributes.name)||"shopify-checkout-api-token"===eT(e.attributes.name)))return!0}}return!1}(R,m)&&(A||R.type!==$.Text||R.textContent.replace(/^\s+|\s+$/gm,"").length)?eS():-2;let T=Object.assign(R,{id:i});if(o.add(e,T),-2===i)return null;v&&v(e);let _=!c;if(T.type===$.Element){_=_&&!T.needBlock,delete T.needBlock;let t=et(e);t&&ei(t)&&(T.isShadowHost=!0)}if((T.type===$.Document||T.type===$.Element)&&_){m.headWhitespace&&T.type===$.Element&&"head"===T.tagName&&(A=!1);let t={doc:n,mirror:o,blockClass:a,blockSelector:l,needsMask:M,maskTextClass:h,maskTextSelector:u,skipChild:c,inlineStylesheet:p,maskInputOptions:d,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:b,preserveWhiteSpace:A,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:k,cssCaptured:!1};if(T.type===$.Element&&"textarea"===T.tagName&&void 0!==T.attributes.value);else for(let r of(T.type===$.Element&&void 0!==T.attributes._cssText&&"string"==typeof T.attributes._cssText&&(t.cssCaptured=!0),Array.from(K(e)))){let e=eN(r,t);e&&T.childNodes.push(e)}let r=null;if(er(e)&&(r=et(e)))for(let e of Array.from(K(r))){let s=eN(e,t);s&&(ei(r)&&(s.isShadow=!0),T.childNodes.push(s))}}let N=q(e);return N&&es(N)&&ei(N)&&(T.isShadow=!0),T.type===$.Element&&"iframe"===T.tagName&&function(e,t,r){let s,i=e.contentWindow;if(!i)return;let n=!1;try{s=i.document.readyState}catch(e){return}if("complete"!==s){let s=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(s),n=!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&&S){let r=eN(t,{doc:t,mirror:o,blockClass:a,blockSelector:l,needsMask:M,maskTextClass:h,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:d,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:b,preserveWhiteSpace:A,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:k});r&&S(e,r)}},C),T.type===$.Element&&"link"===T.tagName&&"string"==typeof T.attributes.rel&&("stylesheet"===T.attributes.rel||"preload"===T.attributes.rel&&"string"==typeof T.attributes.href&&"css"===ep(T.attributes.href))&&function(e,t,r){let s,i=!1;
1try{s=e.sheet}catch(e){return}if(s)return;let n=setTimeout(()=>{i||(t(),i=!0)},r);e.addEventListener("load",()=>{clearTimeout(n),i=!0,t()})}(e,()=>{if(I){let t=eN(e,{doc:n,mirror:o,blockClass:a,blockSelector:l,needsMask:M,maskTextClass:h,maskTextSelector:u,skipChild:!1,inlineStylesheet:p,maskInputOptions:d,maskTextFn:f,maskInputFn:g,slimDOMOptions:m,dataURLOptions:y,inlineImages:w,recordCanvas:b,preserveWhiteSpace:A,onSerialize:v,onIframeLoad:S,iframeLoadTimeout:C,onStylesheetLoad:I,stylesheetLoadTimeout:x,keepIframeSrcFn:k});t&&I(e,t)}},x),T}RegExp(/(max|min)-device-(width|height)/.source,"g");var eP={exports:{}},eD=String,eL=function(){return{isColorSupported:!1,reset:eD,bold:eD,dim:eD,italic:eD,underline:eD,inverse:eD,hidden:eD,strikethrough:eD,black:eD,red:eD,green:eD,yellow:eD,blue:eD,magenta:eD,cyan:eD,white:eD,gray:eD,bgBlack:eD,bgRed:eD,bgGreen:eD,bgYellow:eD,bgBlue:eD,bgMagenta:eD,bgCyan:eD,bgWhite:eD}};eP.exports=eL(),eP.exports.createColors=eL;var eF=eP.exports;let eU=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={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),eB=class e extends Error{constructor(t,r,s,i,n,o){super(t),this.name="CssSyntaxError",this.reason=t,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.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 s=this.source;null==e&&(e=eF.isColorSupported),eU&&e&&(s=eU(s));let i=s.split(/\r?\n/),n=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),a=String(o).length;if(e){let{bold:e,gray:s,red:i}=eF.createColors(!0);t=t=>e(i(t)),r=e=>s(e)}else t=r=e=>e;return i.slice(n,o).map((e,s)=>{let i=n+1+s,o=" "+(" "+i).slice(-a)+" | ";if(i===this.line){let s=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(o)+e+"\n "+s+t("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};eB.default=eB;var ez={};ez.isClean=Symbol("isClean"),ez.my=Symbol("my");let ej={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},eV=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+s+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 s=e.parent,i=0;for(;s&&"root"!==s.type;)i+=1,s=s.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,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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 s=0;s<e.nodes.length;s++){let i=e.nodes[s],n=this.raw(i,"before");n&&this.builder(n),this.stringify(i,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&void 0!==(s=e.raws[t]))return s;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 n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[r])return n.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]?s=this[i](n,e):n.walk(e=>{if(void 0!==(s=e.raws[t]))return!1})}return void 0===s&&(s=ej[r]),n.rawCache[r]=s,s}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 s=r.parent;if(s&&s!==e&&s.parent&&s.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],s=e.raws[t];return s&&s.value===r?s.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 eW(e,t){new eV(t).stringify(e)}eV.default=eV,eW.default=eW;let{isClean:e$,my:eG}=ez,eZ=class{constructor(e={}){for(let t in this.raws={},this[e$]=!1,this[eG]=!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 s=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let n=t[i],o=typeof n;"parent"===i&&"object"===o?r&&(s[i]=r):"source"===i?s[i]=n:Array.isArray(n)?s[i]=n.map(t=>e(t,s)):("object"===o&&null!==n&&(n=e(n)),s[i]=n)}return s}(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}
1error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new eB(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[e$]){this[e$]=!1;let e=this;for(;e=e.parent;)e[e$]=!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 s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,i+=1):s+=1;return{column:s,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 s=this.toString(),i=s.indexOf(e.word);-1!==i&&(t=this.positionInside(i,s),r=this.positionInside(i+e.word.length,s))}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 eV().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 s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);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={},s=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 s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let n=t.get(s.input);null==n&&(n=i,t.set(s.input,i),i++),r[e]={end:s.end,inputId:n,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=eW){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};eZ.default=eZ;let eH=eZ,eY=class extends eH{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]}};eY.default=eY;let{SourceMapConsumer:eJ,SourceMapGenerator:eX}=eU,{existsSync:eK,readFileSync:eq}=eU,{dirname:eQ,join:e0}=eU,e1=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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=eQ(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new eJ(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),U.Buffer.from(t,"base64").toString()}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);
1if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=eQ(e),eK(e))return this.mapFile=e,eq(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t)if("string"==typeof t)return t;else 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 eJ)return eX.fromSourceMap(t).toString();else if(t instanceof eX)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=e0(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)}};e1.default=e1;let{SourceMapConsumer:e2,SourceMapGenerator:e3}=eU,{fileURLToPath:e5,pathToFileURL:e6}=eU,{isAbsolute:e8,resolve:e4}=eU,{nanoid:e9}={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 s="",i=r;for(;i--;)s+=e[Math.random()*e.length|0];return s}}
1,e7=Symbol("fromOffsetCache"),te=!!(e2&&e3),tt=!!(e4&&e8),tr=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&&(!tt||/^\w+:\/\//.test(t.from)||e8(t.from)?this.file=t.from:this.file=e4(t.from)),tt&&te){let e=new e1(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 "+e9(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let i,n,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);n=e.line,o=e.col}else n=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,n,o);return(i=a?new eB(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,s.plugin):new eB(e,void 0===n?t:{column:r,line:t},void 0===n?r:{column:o,line:n},this.css,this.file,s.plugin)).input={column:r,endColumn:o,endLine:n,line:t,source:this.css},this.file&&(e6&&(i.input.url=e6(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[e7])r=this[e7];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let s=0,i=e.length;s<i;s++)r[s]=t,t+=e[s].length+1;this[e7]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,i=r.length-2;for(;s<i;)if(e<r[t=s+(i-s>>1)])i=t-1;else if(e>=r[t+1])s=t+1;else{s=t;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:e4(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){let i,n;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:s,line:r})),n=e8(a.source)?e6(a.source):new URL(a.source,this.map.consumer().sourceRoot||e6(this.map.mapFile));let l={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:n.toString()};if("file:"===n.protocol)if(e5)l.file=e5(n);else throw Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(a.source);return h&&(l.source=h),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}};tr.default=tr,eU&&eU.registerInput&&eU.registerInput(tr);let{SourceMapConsumer:ts,SourceMapGenerator:ti}=eU,{dirname:tn,relative:to,resolve:ta,sep:tl}=eU,{pathToFileURL:th}=eU,tu=!!(ts&&ti),tc=!!(tn&&ta&&to&&tl),tp=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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)),s=e.root||tn(e.file);!1===this.mapOpts.sourcesContent?(t=new ts(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}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(),tc&&tu&&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=ti.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new ti({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 ti({file:this.outputFile(),ignoreInvalidMapping:!0});let r=1,s=1,i="<no source>
1",n={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&&(n.generated.line=r,n.generated.column=s-1,a.source&&a.source.start?(n.source=this.sourcePath(a),n.original.line=a.source.start.line,n.original.column=a.source.start.column-1):(n.source=i,n.original.line=1,n.original.column=0),this.map.addMapping(n)),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=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?(n.source=this.sourcePath(a),n.original.line=a.source.end.line,n.original.column=a.source.end.column-1,n.generated.line=r,n.generated.column=s-2):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=r,n.generated.column=s-1),this.map.addMapping(n))}})}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?tn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=tn(ta(r,this.mapOpts.annotation)));let s=to(r,e);return this.memoizedPaths.set(e,s),s}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 tr(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 s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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 U.Buffer.from(e).toString("base64")}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(th){let t=th(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;"\\"===tl&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},td=eZ,tf=class extends td{constructor(e){super(e),this.type="comment"}};tf.default=tf;let{isClean:tg,my:tm}=ez,ty=eZ,tw=class e extends ty{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 s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],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()=>
1e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else 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,s=this.index(e),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();for(let t of(s=this.index(e),i))this.proxyOf.nodes.splice(s+1,0,t);for(let e in this.indexes)s<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),i=0===s&&"prepend",n=this.normalize(t,this.proxyOf.nodes[s],i).reverse();for(let t of(s=this.index(e),n))this.proxyOf.nodes.splice(s,0,t);for(let e in this.indexes)s<=(r=this.indexes[e])&&(this.indexes[e]=r+n.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 eY(t)]}else if(t.selector)t=[new i(t)];else if(t.name)t=[new n(t)];else if(t.text)t=[new tf(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[tm]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[tg]&&function e(t){if(t[tg]=!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(s=>{t.props&&!t.props.includes(s.prop)||(!t.fast||s.value.includes(t.fast))&&(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(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,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(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,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(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]}};tw.registerParse=e=>{s=e},tw.registerRule=e=>{i=e},tw.registerAtRule=e=>{n=e},tw.registerRoot=e=>{o=e},tw.default=tw,tw.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,n.prototype):"rule"===e.type?Object.setPrototypeOf(e,i.prototype):"decl"===e.type?Object.setPrototypeOf(e,eY.prototype):"comment"===e.type?Object.setPrototypeOf(e,tf.prototype):"root"===e.type&&Object.setPrototypeOf(e,o.prototype),e[tm]=!0,e.nodes&&e.nodes.forEac
1h(e=>{tw.rebuild(e)})};let tb=tw,tv=class extends tb{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new a(new l,this,e).stringify()}};tv.registerLazyResult=e=>{a=e},tv.registerProcessor=e=>{l=e},tv.default=tv;let tS=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}};tS.default=tS;let tC=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 tS(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};tC.default=tC;let tI=/[\t\n\f\r "#'()/;[\\\]{}]/g,tx=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,tk=/.[\r\n"'(/\\]/,tE=/[\da-f]/i,tO=tw,tM=class extends tO{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)}};tM.default=tM,tO.registerAtRule(tM);let tA=tw,tR=class extends tA{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)e.raws.before=t.raws.before}return s}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 h(new u,this,e).stringify()}};tR.registerLazyResult=e=>{h=e},tR.registerProcessor=e=>{u=e},tR.default=tR,tA.registerRoot(tR);let tT={comma:e=>tT.split(e,[","],!0),space:e=>tT.split(e,[" ","\n","	"]),split(e,t,r){let s=[],i="",n=!1,o=0,a=!1,l="",h=!1;for(let r of e)h?h=!1:"\\"===r?h=!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)&&(n=!0),n?(""!==i&&s.push(i.trim()),i="",n=!1):i+=r;return(r||""!==i)&&s.push(i.trim()),s}};tT.default=tT;let t_=tw,tN=class extends t_{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return tT.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)}};tN.default=tN,t_.registerRule(tN);let tP=function(e,t={}){let r,s,i,n,o,a,l,h,u,c,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,g=0,m=[],y=[];function w(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=p.charCodeAt(g)){case 10:case 32:case 9:case 13:case 12:s=g;do s+=1,r=p.charCodeAt(s);while(32===r||10===r||9===r||13===r||12===r)c=["space",p.slice(g,s)],g=s-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);c=[e,e,g];break}case 40:if(h=m.length?m.pop()[1]:"",u=p.charCodeAt(g+1),"url"===h&&39!==u&&34!==u&&32!==u&&10!==u&&9!==u&&12!==u&&13!==u){s=g;do{if(a=!1,-1===(s=p.indexOf(")",s+1)))if(d||t){s=g;break}else w("bracket");for(l=s;
192===p.charCodeAt(l-1);)l-=1,a=!a}while(a)c=["brackets",p.slice(g,s+1),g,s],g=s}else s=p.indexOf(")",g+1),n=p.slice(g,s+1),-1===s||tk.test(n)?c=["(","(",g]:(c=["brackets",n,g,s],g=s);break;case 39:case 34:i=39===r?"'":'"',s=g;do{if(a=!1,-1===(s=p.indexOf(i,s+1)))if(d||t){s=g+1;break}else w("string");for(l=s;92===p.charCodeAt(l-1);)l-=1,a=!a}while(a)c=["string",p.slice(g,s+1),g,s],g=s;break;case 64:tI.lastIndex=g+1,tI.test(p),s=0===tI.lastIndex?p.length-1:tI.lastIndex-2,c=["at-word",p.slice(g,s+1),g,s],g=s;break;case 92:for(s=g,o=!0;92===p.charCodeAt(s+1);)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(s+=1,tE.test(p.charAt(s)))){for(;tE.test(p.charAt(s+1));)s+=1;32===p.charCodeAt(s+1)&&(s+=1)}c=["word",p.slice(g,s+1),g,s],g=s;break;default:47===r&&42===p.charCodeAt(g+1)?(0===(s=p.indexOf("*/",g+2)+1)&&(d||t?s=p.length:w("comment")),c=["comment",p.slice(g,s+1),g,s]):(tx.lastIndex=g+1,tx.test(p),s=0===tx.lastIndex?p.length-1:tx.lastIndex-2,c=["word",p.slice(g,s+1),g,s],m.push(c)),g=s}return g++,c},position:function(){return g}}},tD={empty:!0,space:!0},tL=class{constructor(e){this.input=e,this.root=new tR,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,s,i=new tM;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let n=!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}else if("{"===t){o=!0;break}else if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(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 s=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(s+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,s=0;for(let[i,n]of e.entries()){if("("===(t=n[0])&&(s+=1),")"===t&&(s-=1),0===s&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return i;else this.doubleColon(n);r=n}return!1}comment(e){let t=new tf;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=tP(this.input)}decl(e,t){let r,s,i=new eY;this.init(i,e[0][2]);let n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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"===(s=e[0][0])||"comment"===s);)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),s="";for(let e=t;e>0;e--){let t=r[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=r.pop()[1]+s}0===s.trim().indexOf("!")&&(i.important=!0,i.raws.important=s,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 tN;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,s=!1,i=null,n=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),n.push("("===r?")":"]");else if(o&&s&&"{"===r)i||(i=l),n.push("}");else if(0===n.length)if(";"===r)if(s)return void this.decl(a,o);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(s=!0);else r===n[n.length-1]&&(n.pop(),0===n.length&&(i=null));l=this.tokenizer.nextToken()}
1if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(i),t&&s){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,s){let i,n,o,a,l=r.length,h="",u=!0;for(let e=0;e<l;e+=1)"space"!==(n=(i=r[e])[0])||e!==l-1||s?"comment"===n?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",tD[a]||tD[o]||","===h.slice(-1)?u=!1:h+=i[1]):h+=i[1]:u=!1;if(!u){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new tN;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,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 s=t;s<e.length;s++)r+=e[s][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 tF(e,t){let r=new tL(new tr(e,t));try{r.parse()}catch(e){throw e}return r.root}tF.default=tF,tw.registerParse(tF);let{isClean:tU,my:tB}=ez,tz={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},tV={Once:!0,postcssPlugin:!0,prepare:!0};function tW(e){return"object"==typeof e&&"function"==typeof e.then}function t$(e){let t=!1,r=tz[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 tG(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:t$(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function tZ(e){return e[tU]=!1,e.nodes&&e.nodes.forEach(e=>tZ(e)),e}let tH={},tY=class e{constructor(t,r,s){let i;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=tZ(r);else if(r instanceof e||r instanceof tC)i=tZ(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=tF;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{i=e(r,s)}catch(e){this.processed=!0,this.error=e}i&&!i[tB]&&tw.rebuild(i)}this.result=new tC(t,i,s),this.helpers={...tH,postcss:tH,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}
1. Try to update PostCSS (${this.processor.version} now).`);if(!tV[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);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(tW(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tU];){e[tU]=!0;let t=[tG(e)];for(;t.length>0;){let e=this.visitTick(t);if(tW(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(tW(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=eW;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new tp(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(tW(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tU];)e[tU]=!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,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(tW(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.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 s,i=t.iterator;for(;s=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!s[tU]){s[tU]=!0,e.push(tG(s));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[tU]=!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[tU]=!0,t$(e)))if(0===t)e.nodes&&e.each(e=>{e[tU]||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"}};tY.registerPostcss=e=>{tH=e},tY.default=tY,tR.registerLazyResult(tY),tv.registerLazyResult(tY);let tJ=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new tC(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let n=new tp(eW,s,this._opts,t);
1if(n.isMap()){let[e,t]=n.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else n.clearAnnotation(),this.result.css=n.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=tF(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"}};tJ.default=tJ;let tX=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 tY(this,e,t):new tJ(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function tK(e,t){if(Array.isArray(e))return e.map(e=>tK(e));let{inputs:r,...s}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:tr.prototype};r.map&&(r.map={...r.map,__proto__:e1.prototype}),t.push(r)}if(s.nodes&&(s.nodes=e.nodes.map(e=>tK(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new tR(s);if("decl"===s.type)return new eY(s);if("rule"===s.type)return new tN(s);if("comment"===s.type)return new tf(s);if("atrule"===s.type)return new tM(s);else throw Error("Unknown node type: "+e.type)}function tq(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new tX(e)}tX.default=tX,tR.registerProcessor(tX),tv.registerProcessor(tX),tK.default=tK,tq.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),B.default.env.LANG&&B.default.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=new tX().version,n}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return tq([i(r)]).process(e,t)},i},tq.stringify=eW,tq.parse=tF,tq.fromJSON=tK,tq.list=tT,tq.comment=e=>new tf(e),tq.atRule=e=>new tM(e),tq.decl=e=>new eY(e),tq.rule=e=>new tN(e),tq.root=e=>new tR(e),tq.document=e=>new tv(e),tq.CssSyntaxError=eB,tq.Declaration=eY,tq.Container=tw,tq.Processor=tX,tq.Document=tv,tq.Comment=tf,tq.Warning=tS,tq.AtRule=tM,tq.Result=tC,tq.Input=tr,tq.Rule=tN,tq.Root=tR,tq.Node=eZ,tY.registerPostcss(tq),tq.default=tq;let tQ=tq&&tq.__esModule&&Object.prototype.hasOwnProperty.call(tq,"default")?tq.default:tq;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 t0=Object.defineProperty,t1=(e,t,r)=>{let s;return(s="symbol"!=typeof t?t+"":t)in e?t0(e,s,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[s]=r},t2={exports:{}},t3=String,t5=function(){return{isColorSupported:!1,reset:t3,bold:t3,dim:t3,italic:t3,underline:t3,inverse:t3,hidden:t3,strikethrough:t3,black:t3,red:t3,green:t3,yellow:t3,blue:t3,magenta:t3,cyan:t3,white:t3,gray:t3,bgBlack:t3,bgRed:t3,bgGreen:t3,bgYellow:t3,bgBlue:t3,bgMagenta:t3,bgCyan:t3,bgWhite:t3}};t2.exports=t5(),t2.exports.createColors=t5;var t6=t2.exports;let t8=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={};
1return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,s.get?s:{enumerable:!0,get:function(){return e[t]}})}),r}(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"}))),t4=class e extends Error{constructor(t,r,s,i,n,o){super(t),this.name="CssSyntaxError",this.reason=t,n&&(this.file=n),i&&(this.source=i),o&&(this.plugin=o),void 0!==r&&void 0!==s&&("number"==typeof r?(this.line=r,this.column=s):(this.line=r.line,this.column=r.column,this.endLine=s.line,this.endColumn=s.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 s=this.source;null==e&&(e=t6.isColorSupported),t8&&e&&(s=t8(s));let i=s.split(/\r?\n/),n=Math.max(this.line-3,0),o=Math.min(this.line+2,i.length),a=String(o).length;if(e){let{bold:e,gray:s,red:i}=t6.createColors(!0);t=t=>e(i(t)),r=e=>s(e)}else t=r=e=>e;return i.slice(n,o).map((e,s)=>{let i=n+1+s,o=" "+(" "+i).slice(-a)+" | ";if(i===this.line){let s=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return t(">")+r(o)+e+"\n "+s+t("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};t4.default=t4;var t9={};t9.isClean=Symbol("isClean"),t9.my=Symbol("my");let t7={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:"    ",semicolon:!1},re=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,s=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:s&&(r+=" "),e.nodes)this.block(e,r+s);else{let i=(e.raws.between||"")+(t?";":"");this.builder(r+s+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 s=e.parent,i=0;for(;s&&"root"!==s.type;)i+=1,s=s.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,s=this.raw(e,"between","beforeOpen");this.builder(t+s+"{",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 s=0;s<e.nodes.length;s++){let i=e.nodes[s],n=this.raw(i,"before");n&&this.builder(n),this.stringify(i,t!==s||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"),s=e.prop+r+this.rawValue(e,"value");e.important&&(s+=e.raws.important||" !important"),t&&(s+=";"),this.builder(s,e)}document(e){this.body(e)}raw(e,t,r){let s;if(r||(r=t),t&&void 0!==(s=e.raws[t]))return s;let i=e.parent;if("before"===r&&(!i||"root"===i.type&&i.first===e||i&&"document"===i.type))return"";if(!i)return t7[r];let n=e.root();if(n.rawCache||(n.rawCache={}),void 0!==n.rawCache[r])return n.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]?s=this[i](n,e):n.walk(e=>{if(void 0!==(s=e.raws[t]))return!1})}return void 0===s&&(s=t7[r]),n.rawCache[r]=s,s}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 s=r.parent;if(s&&s!==e&&s.parent&&s.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],s=e.raws[t];return s&&s.value===r?s.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 rt(e,t){new re(t).stringify(e)}re.default=re,rt.default=rt;let{isClean:rr,my:rs}=t9,ri=class{constructor(e={}){for(let t in this.raws={},this[rr]=!1,this[rs]=!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 s=new t.constructor;for(let i in t){if(!Object.prototype.hasOwnProperty.call(t,i)||"proxyCache"===i)continue;let n=t[i],o=typeof n;"parent"===i&&"object"===o?r&&(s[i]=r):"source"===i?s[i]=n:Array.isArray(n)?s[i]=n.map(t=>e(t,s)):("object"===o&&null!==n&&(n=e(n)),s[i]=n)}return s}(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}
1error(e,t={}){if(this.source){let{end:r,start:s}=this.rangeBy(t);return this.source.input.error(e,{column:s.column,line:s.line},{column:r.column,line:r.line},t)}return new t4(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[rr]){this[rr]=!1;let e=this;for(;e=e.parent;)e[rr]=!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 s=(t=this.toString()).indexOf(e.word);-1!==s&&(r=this.positionInside(s,t))}return r}positionInside(e,t){let r=t||this.toString(),s=this.source.start.column,i=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(s=1,i+=1):s+=1;return{column:s,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 s=this.toString(),i=s.indexOf(e.word);-1!==i&&(t=this.positionInside(i,s),r=this.positionInside(i+e.word.length,s))}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 re().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 s of e)s===this?r=!0:r?(this.parent.insertAfter(t,s),t=s):this.parent.insertBefore(t,s);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={},s=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 s=this[e];if(Array.isArray(s))r[e]=s.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof s&&s.toJSON)r[e]=s.toJSON(null,t);else if("source"===e){let n=t.get(s.input);null==n&&(n=i,t.set(s.input,i),i++),r[e]={end:s.end,inputId:n,start:s.start}}else r[e]=s}return s&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=rt){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let s={node:this};for(let e in r)s[e]=r[e];return e.warn(t,s)}get proxyOf(){return this}};ri.default=ri;let rn=ri,ro=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]}};ro.default=ro;let{SourceMapConsumer:ra,SourceMapGenerator:rl}=t8,{existsSync:rh,readFileSync:ru}=t8,{dirname:rc,join:rp}=t8,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,s=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=rc(this.mapFile)),s&&(this.text=s)}consumer(){return this.consumerCache||(this.consumerCache=new ra(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),U.Buffer.from(t,"base64").toString()}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);
1if(!t)return;let r=e.lastIndexOf(t.pop()),s=e.indexOf("*/",r);r>-1&&s>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,s)))}loadFile(e){if(this.root=rc(e),rh(e))return this.mapFile=e,ru(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t)if("string"==typeof t)return t;else 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 ra)return rl.fromSourceMap(t).toString();else if(t instanceof rl)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=rp(rc(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:rf,SourceMapGenerator:rg}=t8,{fileURLToPath:rm,pathToFileURL:ry}=t8,{isAbsolute:rw,resolve:rb}=t8,{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 s="",i=r;for(;i--;)s+=e[Math.random()*e.length|0];return s}}
1,rS=Symbol("fromOffsetCache"),rC=!!(rf&&rg),rI=!!(rb&&rw),rx=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&&(!rI||/^\w+:\/\//.test(t.from)||rw(t.from)?this.file=t.from:this.file=rb(t.from)),rI&&rC){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,s={}){let i,n,o;if(t&&"object"==typeof t){let e=t,s=r;if("number"==typeof e.offset){let s=this.fromOffset(e.offset);t=s.line,r=s.col}else t=e.line,r=e.column;if("number"==typeof s.offset){let e=this.fromOffset(s.offset);n=e.line,o=e.col}else n=s.line,o=s.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,n,o);return(i=a?new t4(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,s.plugin):new t4(e,void 0===n?t:{column:r,line:t},void 0===n?r:{column:o,line:n},this.css,this.file,s.plugin)).input={column:r,endColumn:o,endLine:n,line:t,source:this.css},this.file&&(ry&&(i.input.url=ry(this.file).toString()),i.input.file=this.file),i}fromOffset(e){let t,r;if(this[rS])r=this[rS];else{let e=this.css.split("\n");r=Array(e.length);let t=0;for(let s=0,i=e.length;s<i;s++)r[s]=t,t+=e[s].length+1;this[rS]=r}t=r[r.length-1];let s=0;if(e>=t)s=r.length-1;else{let t,i=r.length-2;for(;s<i;)if(e<r[t=s+(i-s>>1)])i=t-1;else if(e>=r[t+1])s=t+1;else{s=t;break}}return{col:e-r[s]+1,line:s+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:rb(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,s){let i,n;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:s,line:r})),n=rw(a.source)?ry(a.source):new URL(a.source,this.map.consumer().sourceRoot||ry(this.map.mapFile));let l={column:a.column,endColumn:i&&i.column,endLine:i&&i.line,line:a.line,url:n.toString()};if("file:"===n.protocol)if(rm)l.file=rm(n);else throw Error("file: protocol is not available in this PostCSS build");let h=o.sourceContentFor(a.source);return h&&(l.source=h),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}};rx.default=rx,t8&&t8.registerInput&&t8.registerInput(rx);let{SourceMapConsumer:rk,SourceMapGenerator:rE}=t8,{dirname:rO,relative:rM,resolve:rA,sep:rR}=t8,{pathToFileURL:rT}=t8,r_=!!(rk&&rE),rN=!!(rO&&rA&&rM&&rR),rP=class{constructor(e,t,r,s){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=s,this.originalCSS=s,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)),s=e.root||rO(e.file);!1===this.mapOpts.sourcesContent?(t=new rk(e.text)).sourcesContent&&(t.sourcesContent=null):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(s)))}}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(),rN&&r_&&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,s=1,i="<no source>
1",n={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&&(n.generated.line=r,n.generated.column=s-1,a.source&&a.source.start?(n.source=this.sourcePath(a),n.original.line=a.source.start.line,n.original.column=a.source.start.column-1):(n.source=i,n.original.line=1,n.original.column=0),this.map.addMapping(n)),(e=o.match(/\n/g))?(r+=e.length,t=o.lastIndexOf("\n"),s=o.length-t):s+=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?(n.source=this.sourcePath(a),n.original.line=a.source.end.line,n.original.column=a.source.end.column-1,n.generated.line=r,n.generated.column=s-2):(n.source=i,n.original.line=1,n.original.column=0,n.generated.line=r,n.generated.column=s-1),this.map.addMapping(n))}})}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?rO(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=rO(rA(r,this.mapOpts.annotation)));let s=rM(r,e);return this.memoizedPaths.set(e,s),s}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 rx(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 s=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(s,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 U.Buffer.from(e).toString("base64")}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(rT){let t=rT(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;"\\"===rR&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},rD=ri,rL=class extends rD{constructor(e){super(e),this.type="comment"}};rL.default=rL;let{isClean:rF,my:rU}=t9,rB=ri,rz=class e extends rB{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 s=this.getIterator();for(;this.indexes[s]<this.proxyOf.nodes.length&&(t=this.indexes[s],!1!==(r=e(this.proxyOf.nodes[t],t)));)this.indexes[s]+=1;return delete this.indexes[s],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()=>
1e.root().toProxy();else if("nodes"===t)return e.nodes.map(e=>e.toProxy());else 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,s=this.index(e),i=this.normalize(t,this.proxyOf.nodes[s]).reverse();for(let t of(s=this.index(e),i))this.proxyOf.nodes.splice(s+1,0,t);for(let e in this.indexes)s<(r=this.indexes[e])&&(this.indexes[e]=r+i.length);return this.markDirty(),this}insertBefore(e,t){let r,s=this.index(e),i=0===s&&"prepend",n=this.normalize(t,this.proxyOf.nodes[s],i).reverse();for(let t of(s=this.index(e),n))this.proxyOf.nodes.splice(s,0,t);for(let e in this.indexes)s<=(r=this.indexes[e])&&(this.indexes[e]=r+n.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))}(c(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 ro(t)]}else if(t.selector)t=[new p(t)];else if(t.name)t=[new d(t)];else if(t.text)t=[new rL(t)];else throw Error("Unknown node type in node creation");return t.map(t=>(t[rU]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[rF]&&function e(t){if(t[rF]=!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(s=>{t.props&&!t.props.includes(s.prop)||(!t.fast||s.value.includes(t.fast))&&(s.value=s.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let s;try{s=e(t,r)}catch(e){throw t.addToError(e)}return!1!==s&&t.walk&&(s=t.walk(e)),s})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,s)=>{if("atrule"===r.type&&e.test(r.name))return t(r,s)}):this.walk((r,s)=>{if("atrule"===r.type&&r.name===e)return t(r,s)}):(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,s)=>{if("decl"===r.type&&e.test(r.prop))return t(r,s)}):this.walk((r,s)=>{if("decl"===r.type&&r.prop===e)return t(r,s)}):(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,s)=>{if("rule"===r.type&&e.test(r.selector))return t(r,s)}):this.walk((r,s)=>{if("rule"===r.type&&r.selector===e)return t(r,s)}):(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]}};rz.registerParse=e=>{c=e},rz.registerRule=e=>{p=e},rz.registerAtRule=e=>{d=e},rz.registerRoot=e=>{f=e},rz.default=rz,rz.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,d.prototype):"rule"===e.type?Object.setPrototypeOf(e,p.prototype):"decl"===e.type?Object.setPrototypeOf(e,ro.prototype):"comment"===e.type?Object.setPrototypeOf(e,rL.prototype):"root"===e.type&&Object.setPrototypeOf(e,f.prototype),e[rU]=!0,e.nodes&&e.nodes.forEac
1h(e=>{rz.rebuild(e)})};let rj=rz,rV=class extends rj{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new g(new m,this,e).stringify()}};rV.registerLazyResult=e=>{g=e},rV.registerProcessor=e=>{m=e},rV.default=rV;let rW=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}};rW.default=rW;let r$=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 rW(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};r$.default=r$;let rG=/[\t\n\f\r "#'()/;[\\\]{}]/g,rZ=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,rH=/.[\r\n"'(/\\]/,rY=/[\da-f]/i,rJ=rz,rX=class extends rJ{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)}};rX.default=rX,rJ.registerAtRule(rX);let rK=rz,rq=class extends rK{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let s=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 s)e.raws.before=t.raws.before}return s}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 y(new w,this,e).stringify()}};rq.registerLazyResult=e=>{y=e},rq.registerProcessor=e=>{w=e},rq.default=rq,rK.registerRoot(rq);let rQ={comma:e=>rQ.split(e,[","],!0),space:e=>rQ.split(e,[" ","\n","	"]),split(e,t,r){let s=[],i="",n=!1,o=0,a=!1,l="",h=!1;for(let r of e)h?h=!1:"\\"===r?h=!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)&&(n=!0),n?(""!==i&&s.push(i.trim()),i="",n=!1):i+=r;return(r||""!==i)&&s.push(i.trim()),s}};rQ.default=rQ;let r0=rz,r1=class extends r0{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return rQ.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)}};r1.default=r1,r0.registerRule(r1);let r2=function(e,t={}){let r,s,i,n,o,a,l,h,u,c,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,g=0,m=[],y=[];function w(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=p.charCodeAt(g)){case 10:case 32:case 9:case 13:case 12:s=g;do s+=1,r=p.charCodeAt(s);while(32===r||10===r||9===r||13===r||12===r)c=["space",p.slice(g,s)],g=s-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(r);c=[e,e,g];break}case 40:if(h=m.length?m.pop()[1]:"",u=p.charCodeAt(g+1),"url"===h&&39!==u&&34!==u&&32!==u&&10!==u&&9!==u&&12!==u&&13!==u){s=g;do{if(a=!1,-1===(s=p.indexOf(")",s+1)))if(d||t){s=g;break}else w("bracket");for(l=s;
192===p.charCodeAt(l-1);)l-=1,a=!a}while(a)c=["brackets",p.slice(g,s+1),g,s],g=s}else s=p.indexOf(")",g+1),n=p.slice(g,s+1),-1===s||rH.test(n)?c=["(","(",g]:(c=["brackets",n,g,s],g=s);break;case 39:case 34:i=39===r?"'":'"',s=g;do{if(a=!1,-1===(s=p.indexOf(i,s+1)))if(d||t){s=g+1;break}else w("string");for(l=s;92===p.charCodeAt(l-1);)l-=1,a=!a}while(a)c=["string",p.slice(g,s+1),g,s],g=s;break;case 64:rG.lastIndex=g+1,rG.test(p),s=0===rG.lastIndex?p.length-1:rG.lastIndex-2,c=["at-word",p.slice(g,s+1),g,s],g=s;break;case 92:for(s=g,o=!0;92===p.charCodeAt(s+1);)s+=1,o=!o;if(r=p.charCodeAt(s+1),o&&47!==r&&32!==r&&10!==r&&9!==r&&13!==r&&12!==r&&(s+=1,rY.test(p.charAt(s)))){for(;rY.test(p.charAt(s+1));)s+=1;32===p.charCodeAt(s+1)&&(s+=1)}c=["word",p.slice(g,s+1),g,s],g=s;break;default:47===r&&42===p.charCodeAt(g+1)?(0===(s=p.indexOf("*/",g+2)+1)&&(d||t?s=p.length:w("comment")),c=["comment",p.slice(g,s+1),g,s]):(rZ.lastIndex=g+1,rZ.test(p),s=0===rZ.lastIndex?p.length-1:rZ.lastIndex-2,c=["word",p.slice(g,s+1),g,s],m.push(c)),g=s}return g++,c},position:function(){return g}}},r3={empty:!0,space:!0},r5=class{constructor(e){this.input=e,this.root=new rq,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,s,i=new rX;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let n=!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}else if("{"===t){o=!0;break}else if("}"===t){if(a.length>0){for(s=a.length-1,r=a[s];r&&"space"===r[0];)r=a[--s];r&&(i.source.end=this.getPosition(r[3]||r[2]),i.source.end.offset++)}this.end(e);break}else a.push(e);else a.push(e);if(this.tokenizer.endOfFile()){n=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(i.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(i,"params",a),n&&(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 s=0;for(let i=r-1;i>=0&&("space"===(t=e[i])[0]||2!==(s+=1));i--);throw this.input.error("Missed semicolon","word"===t[0]?t[3]+1:t[2])}colon(e){let t,r,s=0;for(let[i,n]of e.entries()){if("("===(t=n[0])&&(s+=1),")"===t&&(s-=1),0===s&&":"===t)if(r)if("word"===r[0]&&"progid"===r[1])continue;else return i;else this.doubleColon(n);r=n}return!1}comment(e){let t=new rL;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=r2(this.input)}decl(e,t){let r,s,i=new ro;this.init(i,e[0][2]);let n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),i.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],s=r[3]||r[2];if(s)return s}}(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"===(s=e[0][0])||"comment"===s);)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),s="";for(let e=t;e>0;e--){let t=r[e][0];if(0===s.trim().indexOf("!")&&"space"!==t)break;s=r.pop()[1]+s}0===s.trim().indexOf("!")&&(i.important=!0,i.raws.important=s,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 r1;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,s=!1,i=null,n=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)i||(i=l),n.push("("===r?")":"]");else if(o&&s&&"{"===r)i||(i=l),n.push("}");else if(0===n.length)if(";"===r)if(s)return void this.decl(a,o);else break;else if("{"===r)return void this.rule(a);else if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}else":"===r&&(s=!0);else r===n[n.length-1]&&(n.pop(),0===n.length&&(i=null));l=this.tokenizer.nextToken()}
1if(this.tokenizer.endOfFile()&&(t=!0),n.length>0&&this.unclosedBracket(i),t&&s){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,s){let i,n,o,a,l=r.length,h="",u=!0;for(let e=0;e<l;e+=1)"space"!==(n=(i=r[e])[0])||e!==l-1||s?"comment"===n?(a=r[e-1]?r[e-1][0]:"empty",o=r[e+1]?r[e+1][0]:"empty",r3[a]||r3[o]||","===h.slice(-1)?u=!1:h+=i[1]):h+=i[1]:u=!1;if(!u){let s=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:s,value:h}}e[t]=h}rule(e){e.pop();let t=new r1;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&("space"===(t=e[e.length-1][0])||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,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 s=t;s<e.length;s++)r+=e[s][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 r6(e,t){let r=new r5(new rx(e,t));try{r.parse()}catch(e){throw e}return r.root}r6.default=r6,rz.registerParse(r6);let{isClean:r8,my:r4}=t9,r9={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},r7={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},se={Once:!0,postcssPlugin:!0,prepare:!0};function st(e){return"object"==typeof e&&"function"==typeof e.then}function sr(e){let t=!1,r=r9[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 ss(e){return{eventIndex:0,events:"document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:sr(e),iterator:0,node:e,visitorIndex:0,visitors:[]}}function si(e){return e[r8]=!1,e.nodes&&e.nodes.forEach(e=>si(e)),e}let sn={},so=class e{constructor(t,r,s){let i;if(this.stringified=!1,this.processed=!1,"object"==typeof r&&null!==r&&("root"===r.type||"document"===r.type))i=si(r);else if(r instanceof e||r instanceof r$)i=si(r.root),r.map&&(void 0===s.map&&(s.map={}),s.map.inline||(s.map.inline=!1),s.map.prev=r.map);else{let e=r6;s.syntax&&(e=s.syntax.parse),s.parser&&(e=s.parser),e.parse&&(e=e.parse);try{i=e(r,s)}catch(e){this.processed=!0,this.error=e}i&&!i[r4]&&rz.rebuild(i)}this.result=new r$(t,i,s),this.helpers={...sn,postcss:sn,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(!r7[r]&&/^[A-Z]/.test(r))throw Error(`Unknown event ${r} in ${t.postcssPlugin}
1. Try to update PostCSS (${this.processor.version} now).`);if(!se[r])if("object"==typeof t[r])for(let s in t[r])e(t,"*"===s?r:r+"-"+s.toLowerCase(),t[r][s]);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(st(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r8];){e[r8]=!0;let t=[ss(e)];for(;t.length>0;){let e=this.visitTick(t);if(st(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(st(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=rt;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new rP(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(st(this.runOnRoot(e)))throw this.getAsyncError();if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[r8];)e[r8]=!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,s]of e){let e;this.result.lastPlugin=r;try{e=s(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(st(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:s}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(s.length>0&&t.visitorIndex<s.length){let[e,i]=s[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===s.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 s,i=t.iterator;for(;s=r.nodes[r.indexes[i]];)if(r.indexes[i]+=1,!s[r8]){s[r8]=!0,e.push(ss(s));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[r8]=!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[r8]=!0,sr(e)))if(0===t)e.nodes&&e.each(e=>{e[r8]||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"}};so.registerPostcss=e=>{sn=e},so.default=so,rq.registerLazyResult(so),rV.registerLazyResult(so);let sa=class{constructor(e,t,r){let s;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0,this.result=new r$(this._processor,s,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let n=new rP(rt,s,this._opts,t);
1if(n.isMap()){let[e,t]=n.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else n.clearAnnotation(),this.result.css=n.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=r6(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"}};sa.default=sa;let sl=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 so(this,e,t):new sa(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};function sh(e,t){if(Array.isArray(e))return e.map(e=>sh(e));let{inputs:r,...s}=e;if(r)for(let e of(t=[],r)){let r={...e,__proto__:rx.prototype};r.map&&(r.map={...r.map,__proto__:rd.prototype}),t.push(r)}if(s.nodes&&(s.nodes=e.nodes.map(e=>sh(e,t))),s.source){let{inputId:e,...r}=s.source;s.source=r,null!=e&&(s.source.input=t[e])}if("root"===s.type)return new rq(s);if("decl"===s.type)return new ro(s);if("rule"===s.type)return new r1(s);if("comment"===s.type)return new rL(s);if("atrule"===s.type)return new rX(s);else throw Error("Unknown node type: "+e.type)}function su(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new sl(e)}sl.default=sl,rq.registerProcessor(sl),rV.registerProcessor(sl),sh.default=sh,su.plugin=function(e,t){let r,s=!1;function i(...r){console&&console.warn&&!s&&(s=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),B.default.env.LANG&&B.default.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...r);return n.postcssPlugin=e,n.postcssVersion=new sl().version,n}return Object.defineProperty(i,"postcss",{get:()=>(r||(r=i()),r)}),i.process=function(e,t,r){return su([i(r)]).process(e,t)},i},su.stringify=rt,su.parse=r6,su.fromJSON=sh,su.list=rQ,su.comment=e=>new rL(e),su.atRule=e=>new rX(e),su.decl=e=>new ro(e),su.rule=e=>new r1(e),su.root=e=>new rq(e),su.document=e=>new rV(e),su.CssSyntaxError=t4,su.Declaration=ro,su.Container=rz,su.Processor=sl,su.Document=rV,su.Comment=rL,su.Warning=rW,su.AtRule=rX,su.Result=r$,su.Input=rx,su.Rule=r1,su.Root=rq,su.Node=ri,so.registerPostcss(su),su.default=su;let sc=su&&su.__esModule&&Object.prototype.hasOwnProperty.call(su,"default")?su.default:su;sc.stringify,sc.fromJSON,sc.plugin,sc.parse,sc.list,sc.document,sc.comment,sc.atRule,sc.rule,sc.decl,sc.root,sc.CssSyntaxError,sc.Declaration,sc.Container,sc.Processor,sc.Document,sc.Comment,sc.Warning,sc.AtRule,sc.Result,sc.Input,sc.Rule,sc.Root,sc.Node;var sp=((x=sp||{})[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);class sd{constructor(...e){t1(this,"parentElement",null),t1(this,"parentNode",null),t1(this,"ownerDocument"),t1(this,"firstChild",null),t1(this,"lastChild",null),t1(this,"previousSibling",null),t1(this,"nextSibling",null),t1(this,"ELEMENT_NODE",1),t1(this,"TEXT_NODE",3),t1(this,"nodeType"),t1(this,"nodeName"),t1(this,"RRNodeType")}get childNodes(){let e=[],t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof sd)||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"}}var sf=((k=sf||{})[k.PLACEHOLDER=0]="PLACEHOLDER",k[k.ELEMENT_NODE=1]="ELEMENT_NODE",k[k.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",k[k.TEXT_NODE=3]="TEXT_NODE",k[k.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",k[k.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",k[k.ENTITY_NODE=6]="ENTITY_NODE",k[k.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",k[k.COMMENT_NODE=8]="COMMENT_NODE",k[k.DOCUMENT_NODE=9]="DOCUMENT_NODE",k[k.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",k[k.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",k);let sg={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},sm={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},sy={};function sw(e){if(sy[e])return sy[e];let t=globalThis[e],r=t.prototype,s=e in sg?sg[e]:void 0,i=!!(s&&s.every(e=>{var t,s;return!!(null==(s=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:s.toString().includes("[native code]"))})),n=e in sm?sm[e]:void 0,o=!!(n&&n.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(i&&o&&!globalThis.Zone)return sy[e]=t.prototype,t.prototype;try{let s=document.createElement("iframe");document.body.appendChild(s);let i=s.contentWindow;if(!i)return t.prototype;let n=i[e].prototype;if(document.body.removeChild(s),!n)return r;return sy[e]=n}catch{return r}}let sb={};function sv(e,t,r){var s;let i=`${e}.${String(r)}`;if(sb[i])return sb[i].call(t);let n=null==(s=Object.getOwnPropertyDescriptor(sw(e),r))?void 0:s.get;return n?(sb[i]=n,n.call(t)):t[r]}let sS={};function sC(e,t,r){let s=`${e}.${String(r)}`;if(sS[s])return sS[s].bind(t);let i=sw(e)[r];return"function"!=typeof i?t[r]:(sS[s]=i,i.bind(t))}function sI(e,t,r){try{if(!(t in e))return()=>{};let s=e[t],i=r(s);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:s}})),e[t]=i,()=>{e[t]=s}}catch{return()=>{}}}let sx=function(e){return sv("Node",e,"ownerDocument")},sk=function(e){return sv("Node",e,"childNodes")},sE=function(e){return sv("Node",e,"parentNode")},sO=function(e){return sv("Node",e,"parentElement")},sM=function(e){return sv("Node",e,"textContent")},sA=function(e,t){return sC("Node",e,"contains")(t)},sR=function(e){return sC("Node",e,"getRootNode")()},sT=function(e){return e&&"host"in e?sv("ShadowRoot",e,"host"):null},s_=function(e){return e&&"shadowRoot"in e?sv("Element",e,"shadowRoot"):null};function sN(e,t,r=document){let s={capture:!0,passive:!0};return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}let sP="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.",sD={map:{},getId:()=>(console.error(sP),-1),getNode:()=>(console.error(sP),null),removeNodeFromMap(){console.error(sP)},has:()=>(console.error(sP),!1),reset(){console.error(sP)}};function sL(e,t,r={}){let s=null,i=0;return function(...n){let o=Date.now();i||!1!==r.leading||(i=o);let a=t-(o-i),l=this;a<=0||a>t?(s&&(clearTimeout(s),s=null),i=o,e.apply(l,n)):s||!1===r.trailing||(s=setTimeout(()=>{i=!1===r.leading?0:Date.now(),s=null,e.apply(l,n)},a))}}function sF(e,t,r,s,i=window){let n=i.Object.getOwnPropertyDescriptor(e,t);
1return i.Object.defineProperty(e,t,s?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),n&&n.set&&n.set.call(this,e)}}),()=>sF(e,t,n||{},!0)}"u">typeof window&&window.Proxy&&window.Reflect&&(sD=new Proxy(sD,{get:(e,t,r)=>("map"===t&&console.error(sP),Reflect.get(e,t,r))}));let sU=Date.now;function sB(e){var t,r,s,i;let n=e.document;return{left:n.scrollingElement?n.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:n.documentElement.scrollLeft||(null==n?void 0:n.body)&&(null==(t=sO(n.body))?void 0:t.scrollLeft)||(null==(r=null==n?void 0:n.body)?void 0:r.scrollLeft)||0,top:n.scrollingElement?n.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==n?void 0:n.documentElement.scrollTop)||(null==n?void 0:n.body)&&(null==(s=sO(n.body))?void 0:s.scrollTop)||(null==(i=null==n?void 0:n.body)?void 0:i.scrollTop)||0}}function sz(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sj(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function sV(e){return e?e.nodeType===e.ELEMENT_NODE?e:sO(e):null}function sW(e,t,r,s){if(!e)return!1;let i=sV(e);if(!i)return!1;try{if("string"==typeof t){if(i.classList.contains(t)||s&&null!==i.closest("."+t))return!0}else if(eA(i,t,s))return!0}catch(e){}return!!(r&&(i.matches(r)||s&&null!==i.closest(r)))||!1}function s$(e,t,r){return"TITLE"===e.tagName&&!!r.headTitleMutations||-2===t.getId(e)}function sG(e){return!!e.changedTouches}function sZ(e,t){return!!("IFRAME"===e.nodeName&&t.getMeta(e))}function sH(e,t){return!!("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function sY(e){return!!e&&(e instanceof sd&&"shadowRoot"in e?!!e.shadowRoot:!!s_(e))}/[1-9][0-9]{12}/.test(Date.now().toString())||(sU=()=>new Date().getTime());class sJ{constructor(){j(this,"id",1),j(this,"styleIDMap",new WeakMap),j(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 sX(e){var t;let r=null;return"getRootNode"in e&&(null==(t=sR(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&sT(sR(e))&&(r=sT(sR(e))),r}function sK(e){var t;let r,s=sx(e);return!!s&&(sA(s,e)||!!(r=sx(t=e))&&sA(r,function(e){let t,r=e;for(;t=sX(r);)r=t;return r}(t)))}var sq=((E=sq||{})[E.DomContentLoaded=0]="DomContentLoaded",E[E.Load=1]="Load",E[E.FullSnapshot=2]="FullSnapshot",E[E.IncrementalSnapshot=3]="IncrementalSnapshot",E[E.Meta=4]="Meta",E[E.Custom=5]="Custom",E[E.Plugin=6]="Plugin",E),sQ=((O=sQ||{})[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),s0=((M=s0||{})[M.MouseUp=0]="MouseUp",M[M.MouseDown=1]="MouseDown",M[M.Click=2]="Click",M[M.ContextMenu=3]="ContextMenu",M[M.DblClick=4]="DblClick",M[M.Focus=5]="Focus",M[M.Blur=6]="Blur",M[M.TouchStart=7]="TouchStart",M[M.TouchMove_Departed=8]="TouchMove_Departed",M[M.TouchEnd=9]="TouchEnd",M[M.TouchCancel=10]="TouchCancel",M),s1=((A=s1||{})[A.Mouse=0]="Mouse",A[A.Pen=1]="Pen",A[A.Touch=2]="Touch",A),s2=((R=s2||{})[R["2D"]=0]="2D",R[R.WebGL=1]="WebGL",R[R.WebGL2=2]="WebGL2",R),s3=((T=s3||{})[T.Play=0]="Play",T[T.Pause=1]="Pause",T[T.Seeked=2]="Seeked",T[T.VolumeChange=3]="VolumeChange",T[T.RateChange=4]="RateChange",T),s5=((_=s5||{}).Start="start",_.Pause="pause",_.Resume="resume",_.Resize="resize",_.Finish="finish",_.FullsnapshotRebuilded="fullsnapshot-rebuilded",_.LoadStylesheetStart="load-stylesheet-start",_.LoadStylesheetEnd="load-stylesheet-end",_.SkipStart="skip-start",_.SkipEnd="skip-end",_.MouseInteraction="mouse-interaction",_.EventCast="event-cast",_.CustomEvent="custom-event",_.Flush="flush",_.StateChange="state-change",_.PlayBack="play-back",_.Destroy="destroy",_),s6=((N=s6||{})[N.Document=0]="Document",N[N.DocumentType=1]="DocumentType",N[N.Element=2]="Element",N[N.Text=3]="Text",N[N.CDATA=4]="CDATA",N[N.Comment=5]="Comment",N);class s8{constructor(){j(this,"length",0),j(this,"head",null),j(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;
1this.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 s4=(e,t)=>`${e}@${t}`;class s9{constructor(){j(this,"frozen",!1),j(this,"locked",!1),j(this,"texts",[]),j(this,"attributes",[]),j(this,"attributeMap",new WeakMap),j(this,"removes",[]),j(this,"mapRemoves",[]),j(this,"movedMap",{}),j(this,"addedSet",new Set),j(this,"movedSet",new Set),j(this,"droppedSet",new Set),j(this,"removesSubTreeCache",new Set),j(this,"mutationCb"),j(this,"blockClass"),j(this,"blockSelector"),j(this,"maskTextClass"),j(this,"maskTextSelector"),j(this,"inlineStylesheet"),j(this,"maskInputOptions"),j(this,"maskTextFn"),j(this,"maskInputFn"),j(this,"keepIframeSrcFn"),j(this,"recordCanvas"),j(this,"inlineImages"),j(this,"slimDOMOptions"),j(this,"dataURLOptions"),j(this,"doc"),j(this,"mirror"),j(this,"iframeManager"),j(this,"stylesheetManager"),j(this,"shadowDomManager"),j(this,"canvasManager"),j(this,"processedNodeManager"),j(this,"unattachedDoc"),j(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),j(this,"emit",()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,r=new s8,s=e=>{let t=e,r=-2;for(;-2===r;)r=(t=t&&t.nextSibling)&&this.mirror.getId(t);return r},i=i=>{let n=sE(i);if(!n||!sK(i))return;let o=!1;if(i.nodeType===Node.TEXT_NODE){let e=n.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(n)&&(o=!0)}let a=es(n)?this.mirror.getId(sX(i)):this.mirror.getId(n),l=s(i);if(-1===a||-1===l)return r.addNode(i);let h=eN(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=>{sZ(e,this.mirror)&&this.iframeManager.addIframe(e),sH(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),sY(i)&&this.shadowDomManager.addShadowRoot(s_(i),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});h&&(e.push({parentId:a,nextId:l,node:h}),t.add(h.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)(!ie(this.removesSubTreeCache,e,this.mirror)||this.movedSet.has(sE(e)))&&i(e);for(let e of this.addedSet)it(this.droppedSet,e)||ie(this.removesSubTreeCache,e,this.mirror)?it(this.movedSet,e)?i(e):this.droppedSet.add(e):i(e);let n=null;for(;r.length;){let e=null;if(n){let t=this.mirror.getId(sE(n.value)),r=s(n.value);-1!==t&&-1!==r&&(e=n)}if(!e){let t=r.tail;for(;t;){let r=t;if(t=t.previous,r){let t=this.mirror.getId(sE(r.value));if(-1===s(r.value))continue;if(-1!==t){e=r;break}{let t=sE(r.value);if(t&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let s=sT(t);if(-1!==this.mirror.getId(s)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}n=e.previous,r.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>{let t=e.node,r=sE(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),s=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+s).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{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.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(o))}),j(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));let r=Array.from(sk(e),e=>sM(e)||"").join("");t.attributes.value=el({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:ec(e),value:r,maskInputFn:this.maskInputFn})}),j(this,"processMutation",e=>{if(!s$(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{let t=sM(e.target);sW(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:eR(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,sV(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{let t=e.target,r=e.attributeName,s=e.target.getAttribute(r);if("value"===r){let e=ec(t);s=el({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(sW(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);
1if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(s))if(t.contentDocument)return;else r="rr_src";if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},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"),!eM(t.tagName,r))if(i.attributes[r]=eO(this.doc,eh(t.tagName),eh(r),s),"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 s of(e.oldValue&&r.setAttribute("style",e.oldValue),Array.from(t.style))){let e=t.style.getPropertyValue(s),n=t.style.getPropertyPriority(s);e!==r.style.getPropertyValue(s)||n!==r.style.getPropertyPriority(s)?""===n?i.styleDiff[s]=e:i.styleDiff[s]=[e,n]:i._unchangedStyles[s]=[e,n]}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(sW(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let r=this.mirror.getId(t),s=es(e.target)?this.mirror.getId(sT(e.target)):this.mirror.getId(e.target);sW(e.target,this.blockClass,this.blockSelector,!1)||s$(t,this.mirror,this.slimDOMOptions)||-1===this.mirror.getId(t)||(this.addedSet.has(t)?(s7(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||function e(t,r){if(es(t))return!1;let s=r.getId(t);if(!r.has(s))return!0;let i=sE(t);return(!i||i.nodeType!==t.DOCUMENT_NODE)&&(!i||e(i,r))}(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[s4(r,s)]?s7(this.movedSet,t):(this.removes.push({parentId:s,id:r,isShadow:!!(es(e.target)&&ei(e.target))||void 0}),function(e,t){let r=[e];for(;r.length;){let e=r.pop();t.has(e)||(t.add(e),sk(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),j(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(s$(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[s4(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);!sW(e,this.blockClass,this.blockSelector,!1)&&(sk(e).forEach(e=>this.genAdds(e)),sY(e)&&sk(s_(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 s7(e,t){e.delete(t),sk(t).forEach(t=>s7(e,t))}function ie(e,t,r){var s;let i;return 0!==e.size&&(s=e,!!(i=sE(t))&&s.has(i))}function it(e,t){return 0!==e.size&&function e(t,r){let s=sE(r);return!!s&&(!!t.has(s)||e(t,s))}(e,t)}let ir=e=>b?(...t)=>{try{return e(...t)}catch(e){if(b&&!0===b(e))return;throw e}}:e,is=[];function ii(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 io(e,t){let r=new s9;is.push(r),r.init(e);let s=new(sw("MutationObserver")).constructor(ir(r.processMutations.bind(r)));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function ia({scrollCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:n}){return sN("scroll",ir(sL(ir(n=>{let o=ii(n);if(!o||sW(o,s,i,!0))return;let a=r.getId(o);if(o===t&&t.defaultView){let r=sB(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),n.scroll||100)),t)}let il=["INPUT","TEXTAREA","SELECT"],ih=new WeakMap;function iu(e){var t=[];if(ig("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ig("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ig("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ig("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){let r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){let r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}function ic(e,t,r){let s,i;return e?(e.ownerNode?s=t.getId(e.ownerNode):i=r.getId(e),{styleId:i,id:s}):{}}function ip({mirror:e,stylesheetManager:t},r){var s,i,n;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(sT(r));let a="#document"===r.nodeName?null==(s=r.defaultView)?void 0:s.Document:null==(n=null==(i=r.ownerDocument)?void 0:i.defaultView)?void 0:n.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 s=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(e){}return s}}),ir(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function id(e,t={}){let r,s=e.doc.defaultView;if(!s)return()=>{};
1!function(e,t){let{mutationCb:r,mousemoveCb:s,mouseInteractionCb:i,scrollCb:n,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:h,styleDeclarationCb:u,canvasMutationCb:c,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),s(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),i(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),n(...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),h(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),c(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),p(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),d(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(r=io(e,e.doc));let i=function({mousemoveCb:e,sampling:t,doc:r,mirror:s}){let i;if(!1===t.mousemove)return()=>{};let n="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500,a=[],l=sL(ir(t=>{let r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),h=ir(sL(ir(e=>{let t=ii(e),{clientX:r,clientY:n}=sG(e)?e.changedTouches[0]:e;i||(i=sU()),a.push({x:r,y:n,id:s.getId(t),timeOffset:sU()-i}),l("u">typeof DragEvent&&e instanceof DragEvent?sQ.Drag:e instanceof MouseEvent?sQ.MouseMove:sQ.TouchMove)}),n,{trailing:!1})),u=[sN("mousemove",h,r),sN("touchmove",h,r),sN("drag",h,r)];return ir(()=>{u.forEach(e=>e())})}(e),n=function({mouseInteractionCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,sampling:n}){if(!1===n.mouseInteraction)return()=>{};let o=!0===n.mouseInteraction||void 0===n.mouseInteraction?{}:n.mouseInteraction,a=[],l=null;return Object.keys(s0).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(n=>{let o=eh(n),h=t=>{let o=ii(t);if(sW(o,s,i,!0))return;let a=null,h=n;if("pointerType"in t){switch(t.pointerType){case"mouse":a=s1.Mouse;break;case"touch":a=s1.Touch;break;case"pen":a=s1.Pen}a===s1.Touch?s0[n]===s0.MouseDown?h="TouchStart":s0[n]===s0.MouseUp&&(h="TouchEnd"):s1.Pen}else sG(t)&&(a=s1.Touch);null!==a?(l=a,(h.startsWith("Touch")&&a===s1.Touch||h.startsWith("Mouse")&&a===s1.Mouse)&&(a=null)):s0[n]===s0.Click&&(a=l,l=null);let u=sG(t)?t.changedTouches[0]:t;if(!u)return;let c=r.getId(o),{clientX:p,clientY:d}=u;ir(e)({type:s0[h],id:c,x:p,y:d,...null!==a&&{pointerType:a}})};if(window.PointerEvent)switch(s0[n]){case s0.MouseDown:case s0.MouseUp:o=o.replace("mouse","pointer");break;case s0.TouchStart:case s0.TouchEnd:return}a.push(sN(o,h,t))}),ir(()=>{a.forEach(e=>e())})}(e),o=ia(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,s=-1;return sN("resize",ir(sL(ir(()=>{let t=sz(),i=sj();(r!==t||s!==i)&&(e({width:Number(i),height:Number(t)}),r=t,s=i)}),200)),t)}(e,{win:s}),l=function({inputCb:e,doc:t,mirror:r,blockClass:s,blockSelector:i,ignoreClass:n,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:h,userTriggeredOnInput:u}){function c(e){let r=ii(e),h=e.isTrusted,c=r&&r.tagName;if(r&&"OPTION"===c&&(r=sO(r)),!r||!c||0>il.indexOf(c)||sW(r,s,i,!0)||r.classList.contains(n)||o&&r.matches(o))return;let d=r.value,f=!1,g=ec(r)||"";"radio"===g||"checkbox"===g?f=r.checked:(a[c.toLowerCase()]||a[g])&&(d=el({element:r,maskInputOptions:a,tagName:c,type:g,value:d,maskInputFn:l})),p(r,u?{text:d,isChecked:f,userTriggered:h}:{text:d,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;p(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,s){let i=ih.get(t);if(!i||i.text!==s.text||i.isChecked!==s.isChecked){ih.set(t,s);let i=r.getId(t);ir(e)({...s,id:i})}}let d=("last"===h.input?["change"]:["input","change"]).map(e=>sN(e,ir(c),t)),f=t.defaultView;if(!f)return()=>
1{d.forEach(e=>e())};let g=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),m=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return g&&g.set&&d.push(...m.map(e=>sF(e[0],e[1],{set(){ir(c)({target:this,isTrusted:!1})}},!1,f))),ir(()=>{d.forEach(e=>e())})}(e),h=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:s,sampling:i,doc:n}){let o=ir(n=>sL(ir(i=>{let o=ii(i);if(!o||sW(o,t,r,!0))return;let{currentTime:a,volume:l,muted:h,playbackRate:u,loop:c}=o;e({type:n,id:s.getId(o),currentTime:a,volume:l,muted:h,playbackRate:u,loop:c})}),i.media||500)),a=[sN("play",o(s3.Play),n),sN("pause",o(s3.Pause),n),sN("seeked",o(s3.Seeked),n),sN("volumechange",o(s3.VolumeChange),n),sN("ratechange",o(s3.RateChange),n)];return ir(()=>{a.forEach(e=>e())})}(e),u=()=>{},c=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:s}){let i,n;if(!s.CSSStyleSheet||!s.CSSStyleSheet.prototype)return()=>{};let o=s.CSSStyleSheet.prototype.insertRule;s.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:ir((s,i,n)=>{let[o,a]=n,{id:l,styleId:h}=ic(i,t,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:a}]}),s.apply(i,n)})}),s.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){let i=`${e} { ${t} }`;return s.CSSStyleSheet.prototype.insertRule.apply(this,[i,r])};let a=s.CSSStyleSheet.prototype.deleteRule;s.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:ir((s,i,n)=>{let[o]=n,{id:a,styleId:l}=ic(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),s.apply(i,n)})}),s.CSSStyleSheet.prototype.removeRule=function(e){return s.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},s.CSSStyleSheet.prototype.replace&&(i=s.CSSStyleSheet.prototype.replace,s.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:ir((s,i,n)=>{let[o]=n,{id:a,styleId:l}=ic(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),s.apply(i,n)})})),s.CSSStyleSheet.prototype.replaceSync&&(n=s.CSSStyleSheet.prototype.replaceSync,s.CSSStyleSheet.prototype.replaceSync=new Proxy(n,{apply:ir((s,i,n)=>{let[o]=n,{id:a,styleId:l}=ic(i,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),s.apply(i,n)})}));let l={};im("CSSGroupingRule")?l.CSSGroupingRule=s.CSSGroupingRule:(im("CSSMediaRule")&&(l.CSSMediaRule=s.CSSMediaRule),im("CSSConditionRule")&&(l.CSSConditionRule=s.CSSConditionRule),im("CSSSupportsRule")&&(l.CSSSupportsRule=s.CSSSupportsRule));let h={};return Object.entries(l).forEach(([s,i])=>{h[s]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(h[s].insertRule,{apply:ir((s,i,n)=>{let[o,a]=n,{id:l,styleId:h}=ic(i.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||h&&-1!==h)&&e({id:l,styleId:h,adds:[{rule:o,index:[...iu(i),a||0]}]}),s.apply(i,n)})}),i.prototype.deleteRule=new Proxy(h[s].deleteRule,{apply:ir((s,i,n)=>{let[o]=n,{id:a,styleId:l}=ic(i.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...iu(i),o]}]}),s.apply(i,n)})})}),ir(()=>{s.CSSStyleSheet.prototype.insertRule=o,s.CSSStyleSheet.prototype.deleteRule=a,i&&(s.CSSStyleSheet.prototype.replace=i),n&&(s.CSSStyleSheet.prototype.replaceSync=n),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=h[e].insertRule,t.prototype.deleteRule=h[e].deleteRule})})}(e,{win:s}),c=ip(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:s},{win:i}){let n=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(n,{apply:ir((i,o,a)=>{var l;let[h,u,c]=a;if(r.has(h))return n.apply(o,[h,u,c]);let{id:p,styleId:d}=ic(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:h,value:u,priority:c},index:iu(o.parentRule)}),i.apply(o,a)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ir((i,n,a)=>{var l;let[h]=a;
1if(r.has(h))return o.apply(n,[h]);let{id:u,styleId:c}=ic(null==(l=n.parentRule)?void 0:l.parentStyleSheet,t,s.styleMirror);return(u&&-1!==u||c&&-1!==c)&&e({id:u,styleId:c,remove:{property:h},index:iu(n.parentRule)}),i.apply(n,a)})}),ir(()=>{i.CSSStyleDeclaration.prototype.setProperty=n,i.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:s}),e.collectFonts&&(d=function({fontCb:e,doc:t}){let r=t.defaultView;if(!r)return()=>{};let s=[],i=new WeakMap,n=r.FontFace;r.FontFace=function(e,t,r){let s=new n(e,t,r);return i.set(s,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),s};let o=sI(t.fonts,"add",function(t){return function(r){return setTimeout(ir(()=>{let t=i.get(r);t&&(e(t),i.delete(r))}),0),t.apply(this,[r])}});return s.push(()=>{r.FontFace=n}),s.push(o),ir(()=>{s.forEach(e=>e())})}(e)));let f=function(e){let{doc:t,mirror:r,blockClass:s,blockSelector:i,selectionCb:n}=e,o=!0,a=ir(()=>{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{startContainer:n,startOffset:o,endContainer:l,endOffset:h}=e.getRangeAt(t);sW(n,s,i,!0)||sW(l,s,i,!0)||a.push({start:r.getId(n),startOffset:o,end:r.getId(l),endOffset:h})}n({ranges:a})});return a(),sN("selectionchange",a)}(e),g=function({doc:e,customElementCb:t}){let r=e.defaultView;return r&&r.customElements?sI(r.customElements,"define",function(e){return function(r,s,i){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,s,i])}}):()=>{}}(e),m=[];for(let t of e.plugins)m.push(t.observer(t.callback,s,t.options));return ir(()=>{is.forEach(e=>e.reset()),null==r||r.disconnect(),i(),n(),o(),a(),l(),h(),u(),c(),p(),d(),f(),g(),m.forEach(e=>e())})}function ig(e){return void 0!==window[e]}function im(e){return!!(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class iy{constructor(e){j(this,"iframeIdToRemoteIdMap",new WeakMap),j(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,s){let i=r||this.getIdToRemoteIdMap(e),n=s||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),n.set(o,t)),o}getIds(e,t){let r=this.getIdToRemoteIdMap(e),s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,s))}getRemoteId(e,t,r){let s=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;let i=s.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 iw{constructor(e){j(this,"iframes",new WeakMap),j(this,"crossOriginIframeMap",new WeakMap),j(this,"crossOriginIframeMirror",new iy(eS)),j(this,"crossOriginIframeStyleMirror"),j(this,"crossOriginIframeRootIdMap",new WeakMap),j(this,"mirror"),j(this,"mutationCb"),j(this,"wrappedEmit"),j(this,"loadListener"),j(this,"stylesheetManager"),j(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new iy(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,s;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==(s=this.loadListener)||s.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||!e.source)return;let t=this.crossOriginIframeMap.get(e.source);if(!t)return;let r=this.transformCrossOriginEvent(t,e.data.event);r&&this.wrappedEmit(r,e.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case sq.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:sq.IncrementalSnapshot,data:{source:sQ.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case sq.Meta:case sq.Load:case sq.DomContentLoaded:break;case sq.Plugin:return t;case sq.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case sq.IncrementalSnapshot:switch(t.data.source){case sQ.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)}
1),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 sQ.Drag:case sQ.TouchMove:case sQ.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case sQ.ViewportResize:return!1;case sQ.MediaInteraction:case sQ.MouseInteraction:case sQ.Scroll:case sQ.CanvasMutation:case sQ.Input:return this.replaceIds(t.data,e,["id"]),t;case sQ.StyleSheetRule:case sQ.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case sQ.Font:return t;case sQ.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case sQ.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,s){for(let i of s)(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===s6.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class ib{constructor(e){j(this,"shadowDoms",new WeakSet),j(this,"mutationCb"),j(this,"scrollCb"),j(this,"bypassOptions"),j(this,"mirror"),j(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(!ei(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let r=io({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(ia({...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(sT(e))),this.restoreHandlers.push(ip({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(sI(e.prototype,"attachShadow",function(e){return function(s){let i=e.call(this,s),n=s_(this);return n&&sK(this)&&r.addShadowRoot(n,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var iv="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",iS="u"<typeof Uint8Array?[]:new Uint8Array(256),iC=0;iC<iv.length;iC++)iS[iv.charCodeAt(iC)]=iC;var iI=function(e){var t,r=new Uint8Array(e),s=r.length,i="";for(t=0;t<s;t+=3)i+=iv[r[t]>>2],i+=iv[(3&r[t])<<4|r[t+1]>>4],i+=iv[(15&r[t+1])<<2|r[t+2]>>6],i+=iv[63&r[t+2]];return s%3==2?i=i.substring(0,i.length-1)+"=":s%3==1&&(i=i.substring(0,i.length-2)+"=="),i};let ix=new Map,ik=(e,t,r)=>{let s;if(!e||!(iO(e,t)||"object"==typeof e))return;let i=e.constructor.name,n=((s=ix.get(r))||(s=new Map,ix.set(r,s)),s.has(i)||s.set(i,[]),s.get(i)),o=n.indexOf(e);return -1===o&&(o=n.length,n.push(e)),o},iE=(e,t,r)=>e.map(e=>(function e(t,r,s){if(t instanceof Array)return t.map(t=>e(t,r,s));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)return{rr_type:t.constructor.name,args:[Object.values(t)]};else if(t instanceof ArrayBuffer)return{rr_type:t.constructor.name,base64:iI(t)};else if(t instanceof DataView)return{rr_type:t.constructor.name,args:[e(t.buffer,r,s),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)return{rr_type:"HTMLImageElement",src:t.toDataURL()};else if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[e(t.data,r,s),t.width,t.height]};else if(iO(t,r)||"object"==typeof t)return{rr_type:t.constructor.name,index:ik(t,r,s)};return t})(e,t,r)),iO=(e,t)=>
1!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]).find(r=>e instanceof t[r]);function iM(e,t,r,s){let i=[];try{let n=sI(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(i,...n){if(!sW(this,t,r,!0)){let e="experimental-webgl"===i?"webgl":i;if("__context"in this||(this.__context=e),s&&["webgl","webgl2"].includes(e))if(n[0]&&"object"==typeof n[0]){let e=n[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else n.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[i,...n])}});i.push(n)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(e=>e())}}function iA(e,t,r,s,i,n){let o=[];for(let a of Object.getOwnPropertyNames(e))if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(a))try{if("function"!=typeof e[a])continue;let l=sI(e,a,function(e){return function(...o){let l=e.apply(this,o);if(ik(l,n,this),"tagName"in this.canvas&&!sW(this.canvas,s,i,!0)){let e=iE(o,n,this),s={type:t,property:a,args:e};r(this.canvas,s)}return l}});o.push(l)}catch{let s=sF(e,a,{set(e){r(this.canvas,{type:t,property:a,args:[e],setter:!0})}});o.push(s)}return o}let iR="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3B
1hcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",iT="u">typeof window&&window.Blob&&new Blob([Uint8Array.from(atob(iR),e=>e.charCodeAt(0))],{type:"text/javascript;charset=utf-8"});function i_(e){let t;try{if(!(t=iT&&(window.URL||window.webkitURL).createObjectURL(iT)))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,"+iR,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class iN{constructor(e){j(this,"pendingCanvasMutations",new Map),j(this,"rafStamps",{latestId:0,invokeId:null}),j(this,"mirror"),j(this,"mutationCb"),j(this,"resetObservers"),j(this,"frozen",!1),j(this,"locked",!1),j(this,"processMutation",(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:s,blockSelector:i,recordCanvas:n,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,n&&"all"===t&&this.initCanvasMutationObserver(r,s,i),n&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,s,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,s,i){let n,o=iM(t,r,s,!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:s,width:i,height:n}=e.data;this.mutationCb({id:t,type:s2["2D"],commands:[{property:"clearRect",args:[0,0,i,n]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:s}]},0,0]}]})};let h=1e3/e,u=0,c=e=>{let o;if(u&&e-u<h){n=requestAnimationFrame(c);return}
1u=e,(o=[],t.document.querySelectorAll("canvas").forEach(e=>{sW(e,r,s,!0)||o.push(e)}),o).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 s=await createImageBitmap(e);l.postMessage({id:r,bitmap:s,width:e.width,height:e.height,dataURLOptions:i.dataURLOptions},[s])}),n=requestAnimationFrame(c)};n=requestAnimationFrame(c),this.resetObservers=()=>{o(),cancelAnimationFrame(n)}}initCanvasMutationObserver(e,t,r){var s;let i;this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let n=iM(e,t,r,!1),o=function(e,t,r,s){let i=[];for(let n of Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype))try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[n])continue;let o=sI(t.CanvasRenderingContext2D.prototype,n,function(i){return function(...o){return sW(this.canvas,r,s,!0)||setTimeout(()=>{let r=iE(o,t,this);e(this.canvas,{type:s2["2D"],property:n,args:r})},0),i.apply(this,o)}});i.push(o)}catch{let r=sF(t.CanvasRenderingContext2D.prototype,n,{set(t){e(this.canvas,{type:s2["2D"],property:n,args:[t],setter:!0})}});i.push(r)}return()=>{i.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),a=(s=this.processMutation.bind(this),(i=[]).push(...iA(e.WebGLRenderingContext.prototype,s2.WebGL,s,t,r,e)),void 0!==e.WebGL2RenderingContext&&i.push(...iA(e.WebGL2RenderingContext.prototype,s2.WebGL2,s,t,r,e)),()=>{i.forEach(e=>e())});this.resetObservers=()=>{n(),o(),a()}}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 s=r.map(e=>{let{type:t,...r}=e;return r}),{type:i}=r[0];this.mutationCb({id:t,type:i,commands:s}),this.pendingCanvasMutations.delete(e)}}class iP{constructor(e){j(this,"trackedLinkElements",new WeakSet),j(this,"mutationCb"),j(this,"adoptedStyleSheetCb"),j(this,"styleMirror",new sJ),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:[]},s=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),s.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,r)=>({rule:eo(e,t.href),index:r}))})),r.styleIds.push(e)}s.length>0&&(r.styles=s),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class iD{constructor(){j(this,"nodeMap",new WeakMap),j(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 iL=!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 iF=new ea;function iU(e={}){let t,{emit:r,checkoutEveryNms:s,checkoutEveryNth:i,blockClass:n="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:h="rr-mask",maskTextSelector:u=null,inlineStylesheet:c=!0,maskAllInputs:p,maskInputOptions:d,slimDOMOptions:f,maskInputFn:g,maskTextFn:m,hooks:y,packFn:w,sampling:I={},dataURLOptions:x={},mousemoveWait:k,recordDOM:E=!0,recordCanvas:O=!1,recordCrossOriginIframes:M=!1,recordAfter:A="DOMContentLoaded"===e.recordAfter?e.recordAfter:"load",userTriggeredOnInput:R=!1,collectFonts:T=!1,inlineImages:_=!1,plugins:N,keepIframeSrcFn:P=()=>!1,ignoreCSSAttributes:D=new Set([]),errorHandler:L}=e;b=L;let F=!M||window.parent===window,U=!1;if(!F)try{window.parent.document&&(U=!1)}catch(e){U=!0}if(F&&!r)throw Error("emit function is required");if(!F&&!U)return()=>{};void 0!==k&&void 0===I.mousemove&&(I.mousemove=k),iF.reset();let B=!0===p?{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!==d?d:{password:!0},z=e_(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 j=0,V=e=>{for(let t of N||[])t.eventProcessor&&(e=t.eventProcessor(e));return w&&!U&&(e=w(e)),e};v=(e,n)=>{var o;if(e.timestamp=sU(),(null==(o=is[0])?void 0:o.isFrozen())&&e.type!==sq.FullSnapshot&&(e.type!==sq.IncrementalSnapshot||e.data.source!==sQ.Mutation)&&is.forEach(e
1=>e.unfreeze()),F)null==r||r(V(e),n);else if(U){let t={type:"rrweb",event:V(e),origin:window.location.origin,isCheckout:n};window.parent.postMessage(t,"*")}if(e.type===sq.FullSnapshot)t=e,j=0;else if(e.type===sq.IncrementalSnapshot){if(e.data.source===sQ.Mutation&&e.data.isAttachIframe)return;j++;let r=i&&j>=i,n=s&&e.timestamp-t.timestamp>s;(r||n)&&S(!0)}};let W=e=>{v({type:sq.IncrementalSnapshot,data:{source:sQ.Mutation,...e}})},$=e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.Scroll,...e}}),G=e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.CanvasMutation,...e}}),Z=new iP({mutationCb:W,adoptedStyleSheetCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.AdoptedStyleSheet,...e}})}),H=new iw({mirror:iF,mutationCb:W,stylesheetManager:Z,recordCrossOriginIframes:M,wrappedEmit:v});for(let e of N||[])e.getMirror&&e.getMirror({nodeMirror:iF,crossOriginIframeMirror:H.crossOriginIframeMirror,crossOriginIframeStyleMirror:H.crossOriginIframeStyleMirror});let Y=new iD;C=new iN({recordCanvas:O,mutationCb:G,win:window,blockClass:n,blockSelector:o,mirror:iF,sampling:I.canvas,dataURLOptions:x});let J=new ib({mutationCb:W,scrollCb:$,bypassOptions:{blockClass:n,blockSelector:o,maskTextClass:h,maskTextSelector:u,inlineStylesheet:c,maskInputOptions:B,dataURLOptions:x,maskTextFn:m,maskInputFn:g,recordCanvas:O,inlineImages:_,sampling:I,slimDOMOptions:z,iframeManager:H,stylesheetManager:Z,canvasManager:C,keepIframeSrcFn:P,processedNodeManager:Y},mirror:iF});S=(e=!1)=>{if(!E)return;v({type:sq.Meta,data:{href:window.location.href,width:sj(),height:sz()}},e),Z.reset(),J.init(),is.forEach(e=>e.lock());let t=function(e,t){let{mirror:r=new ea,blockClass:s="rr-block",blockSelector:i=null,maskTextClass:n="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:h=!1,maskAllInputs:u=!1,maskTextFn:c,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S=()=>!1}=t||{};return eN(e,{doc:e,mirror:r,blockClass:s,blockSelector:i,maskTextClass:n,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{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===u?{password:!0}:u,maskTextFn:c,maskInputFn:p,slimDOMOptions:e_(d),dataURLOptions:f,inlineImages:l,recordCanvas:h,preserveWhiteSpace:g,onSerialize:m,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:S,newlyAddedElement:!1})}(document,{mirror:iF,blockClass:n,blockSelector:o,maskTextClass:h,maskTextSelector:u,inlineStylesheet:c,maskAllInputs:B,maskTextFn:m,maskInputFn:g,slimDOM:z,dataURLOptions:x,recordCanvas:O,inlineImages:_,onSerialize:e=>{sZ(e,iF)&&H.addIframe(e),sH(e,iF)&&Z.trackLinkElement(e),sY(e)&&J.addShadowRoot(s_(e),document)},onIframeLoad:(e,t)=>{H.attachIframe(e,t),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Z.attachLinkElement(e,t)},keepIframeSrcFn:P});if(!t)return console.warn("Failed to snapshot the document");v({type:sq.FullSnapshot,data:{node:t,initialOffset:sB(window)}},e),is.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Z.adoptStyleSheets(document.adoptedStyleSheets,iF.getId(document))};try{let e=[],t=e=>{var t;return ir(id)({mutationCb:W,mousemoveCb:(e,t)=>v({type:sq.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.MouseInteraction,...e}}),scrollCb:$,viewportResizeCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.ViewportResize,...e}}),inputCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.Input,...e}}),mediaInteractionCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.MediaInteraction,...e}}),styleSheetRuleCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.StyleSheetRule,...e}}),styleDeclarationCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.StyleDeclaration,...e}}),canvasMutationCb:G,fontCb:e=>v({type:sq.IncrementalSnapshot,data:{source:sQ.Font,...e}}),selectionCb:e=>{v({type:sq.IncrementalSnapshot,data:{source:sQ.Selection,...e}})},customElementCb:e=>{v({type:sq.IncrementalSnapshot,data:{source:sQ.CustomElement,...e}})},blockClass:n,ignoreClass:a,ignoreSelector:l,maskTextClass:h,maskTextSelector:u,maskInputOptions:B,inlineStylesheet:c,sampling:I,recordDOM:E,recordCanvas:O,inlineImages:_,userTriggeredOnInput:R,collectFonts:T,doc:e,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:P,blockSelector:o,slimDOMOptions:z,dataURLOptions:x,mirror:iF,iframeManager:H,stylesheetManager:Z,shadowDomManager:J,processedNodeManager:Y,canvasManager:C,ignoreCSSAttributes:D,plugins:(null==(t=null==N?void 0:N.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>v({type:sq.Plugin,data:{plugin:e.name,payload:t}}
1)})))||[]},y)};H.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});let r=()=>{S(),e.push(t(document)),iL=!0};return["interactive","complete"].includes(document.readyState)?r():(e.push(sN("DOMContentLoaded",()=>{v({type:sq.DomContentLoaded,data:{}}),"DOMContentLoaded"===A&&r()})),e.push(sN("load",()=>{v({type:sq.Load,data:{}}),"load"===A&&r()},window))),()=>{e.forEach(e=>{try{e()}catch(e){String(e).toLowerCase().includes("cross-origin")||console.warn(e)}}),Y.destroy(),iL=!1,b=void 0}}catch(e){console.warn(e)}}iU.addCustomEvent=(e,t)=>{if(!iL)throw Error("please add custom event after start recording");v({type:sq.Custom,data:{tag:e,payload:t}})},iU.freezePage=()=>{is.forEach(e=>e.freeze())},iU.takeFullSnapshot=e=>{if(!iL)throw Error("please take full snapshot after start recording");S(e)},iU.mirror=iF,(P=L||(L={}))[P.NotStarted=0]="NotStarted",P[P.Running=1]="Running",P[P.Stopped=2]="Stopped";let{addCustomEvent:iB}=iU,{freezePage:iz}=iU,{takeFullSnapshot:ij}=iU,iV={api_host:"https://capture.honch.io",autocapture:!0,capture_clicks:!0,capture_forms:!0,session_recording:!1,recordCanvas:!1,session_recording_sample_rate:1,capture_vitals:!0,batch_size:10,flush_interval_ms:5e3,max_retries:3,debug:!1,disabled:!1,default_properties:{},exclude_urls:[],exclude_elements:["[data-honch-ignore]",".honch-ignore"],persistence:"localStorage",storage_prefix:"honch_",respect_dnt:!0};class iW{constructor(e,t){this.memoryStorage=new Map,this.type=this.isStorageAvailable(e)?e:"memory",this.prefix=t,"memory"===this.type&&"memory"!==e&&console.warn(`Honch: ${e} not available, falling back to memory storage`)}get(e){let t=this.prefix+e;try{if("memory"===this.type)return this.memoryStorage.get(t)??null;let e=("localStorage"===this.type?localStorage:sessionStorage).getItem(t);if(null===e)return null;return JSON.parse(e)}catch(e){return null}}set(e,t){let r=this.prefix+e;try{if("memory"===this.type)return void this.memoryStorage.set(r,t);("localStorage"===this.type?localStorage:sessionStorage).setItem(r,JSON.stringify(t))}catch(e){console.warn("Honch: Failed to persist to storage",e)}}remove(e){let t=this.prefix+e;try{if("memory"===this.type)return void this.memoryStorage.delete(t);("localStorage"===this.type?localStorage:sessionStorage).removeItem(t)}catch(e){}}clear(){try{if("memory"===this.type)return void this.memoryStorage.clear();let e="localStorage"===this.type?localStorage:sessionStorage,t=[];for(let r=0;r<e.length;r++){let s=e.key(r);s&&s.startsWith(this.prefix)&&t.push(s)}t.forEach(t=>e.removeItem(t))}catch(e){}}isStorageAvailable(e){if("memory"===e)return!0;if("u"<typeof window)return!1;try{let t="localStorage"===e?localStorage:sessionStorage,r="__honch_test__";return t.setItem(r,"test"),t.removeItem(r),!0}catch(e){return!1}}}class i${constructor(e,t,r=10,s=5e3,i=3){this.queue=[],this.flushTimer=null,this.isFlushing=!1,this.transport=e,this.logger=t,this.batchSize=r,this.flushIntervalMs=s,this.maxRetries=i,this.storage=new iW("localStorage","honch_queue_"),this.loadPersistedQueue(),"u">typeof window&&(window.addEventListener("beforeunload",()=>this.flushSync()),window.addEventListener("pagehide",()=>this.flushSync()),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.flushSync()}))}start(){this.flushTimer||(this.flushTimer=setInterval(()=>{this.flush()},this.flushIntervalMs),this.logger.debug("Queue started",{intervalMs:this.flushIntervalMs}))}stop(){this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.logger.debug("Queue stopped")}enqueue(e){this.queue.push(e),this.persistQueue(),this.logger.debug("Event enqueued",{event:e.event,queueSize:this.queue.length}),this.queue.length>=this.batchSize&&this.flush()}async flush(){if(this.isFlushing||0===this.queue.length)return;this.isFlushing=!0;let e=[...this.queue];this.queue=[],this.persistQueue(),this.logger.debug("Flushing events",{count:e.length});try{await this.sendWithRetry(e),this.logger.debug("Flush successful",{count:e.length})}catch(t){this.logger.error("Flush failed, re-queueing events",{error:t,count:e.length}),this.queue=[...e,...this.queue],this.persistQueue()}finally{this.isFlushing=!1}}flushSync(){if(0===this.queue.length)return;let e=[...this.queue];this.queue=[],this.persistQueue(),this.logger.debug("Sync flushing events",{count:e.length}),this.transport.sendBeacon(e)}async sendWithRetry(e){let t=null;for(let r=0;r<this.maxRetries;r++)try{await this.transport.sendBatch(e);return}catch(s){t=s;let e=1e3*Math.pow(2,r)+1e3*Math.random();this.logger.warn(`Send failed, retrying in ${e}ms`,{attempt:r,error:s}),await this.sleep(e)}throw t||Error("Send failed after retries")}sleep(e){return new Promise(t=>setTimeout(t,e))}persistQueue(){try{this.storage.set("events",this.queue)}catch(e){this.logger.warn("Failed to persist queue",{error:e})}}loadPersistedQueue(){try{let e=this.storage.get("events");Array.isArray(e)&&e.length>0&&(this.queue=e,this.logger.debug("Loaded persisted events",{count:e.length}))}catch(e){this.logger.warn("Failed to load persisted queue",{error:e})}}}class iG{constructor(e,t,r,s){this.apiHost=e.replace(/\/$/,""),this.token=t,this.logger=r,this.fetchFn=s||("u">typeof fetch?(e,t)=>fetch(e,t):this.noopFetch)}async sendBatch(e){let t={token:this.token,batch:e},r=`${this.apiHost}/capture/batch`;this.logger.debug("Sending batch",{url:r,count:e.length});let s=await this.fetchFn(r,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t),keepalive:!0});if(!s.ok){let e=await s.text().catch(()=>"");throw Error(`HTTP ${s.status}: ${e}`)}let i=await s.json();if(1!==i.status)throw Error(`Capture failed: ${JSON.stringify(i)}`)}sendBeacon(e){let t={token:this.token,batch:e},r=`${this.apiHost}/capture/batch`,s=JSON.stringify(t);if("u">typeof navigator&&navigator.sendBeacon){let t=new Blob([s],{type:"application/json"});if(navigator.sendBeacon(r,t))return this.logger.debug("sendBeacon succeeded",{count:e.length}),!0;this.logger.warn("sendBeacon failed (browser limit?), falling back to fetch")}try{return this.fetchFn(r,{method:"POST",headers:{"Content-Type":"application/json"},body:s,keepalive:!0}
1).catch(()=>{}),!0}catch{return this.logger.warn("fetch keepalive fallback also failed"),!1}}async sendRecording(e,t,r,s){let i={token:this.token,distinct_id:e,batch:[{event:"$snapshot",properties:{$session_id:t,$window_id:r,$snapshot_items:s,$snapshot_source:"web"}}]},n=`${this.apiHost}/s/`;this.logger.debug("Sending recording",{url:n,eventCount:s.length});let o=await this.fetchFn(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!o.ok){let e=await o.text().catch(()=>"");throw Error(`HTTP ${o.status}: ${e}`)}}sendRecordingBeacon(e,t,r,s){let i=`${this.apiHost}/s/`,n=s=>({token:this.token,distinct_id:e,batch:[{event:"$snapshot",properties:{$session_id:t,$window_id:r,$snapshot_items:s,$snapshot_source:"web"}}]}),o=e=>{let t=JSON.stringify(n(e));if("u">typeof navigator&&navigator.sendBeacon){let r=new Blob([t],{type:"application/json"});if(navigator.sendBeacon(i,r))return!0;this.logger.warn("sendBeacon chunk failed, falling back to fetch",{chunkSize:e.length})}try{return this.fetchFn(i,{method:"POST",headers:{"Content-Type":"application/json"},body:t,keepalive:!0}).catch(()=>{}),!0}catch{return!1}},a=JSON.stringify(n(s));if(a.length<=61440)return o(s);this.logger.debug("Payload too large for single sendBeacon, chunking",{size:a.length,eventCount:s.length});let l=61440-JSON.stringify(n([])).length-100,h=[],u=0;for(;u<s.length;){if(4===s[u].type&&u+1<s.length&&2===s[u+1].type){h.push([s[u],s[u+1]]),u+=2;continue}h.push([s[u]]),u++}let c=[],p=0,d=!0;for(let e of h){let t=JSON.stringify(e).length;p+t>l&&c.length>0&&(o(c)||(d=!1),c=[],p=0),c.push(...e),p+=t}return c.length>0&&!o(c)&&(d=!1),d}noopFetch(){return Promise.resolve(new Response('{"status":1}',{status:200}))}}class iZ{constructor(e,t){this.lastUrl="",this.originalPushState=null,this.originalReplaceState=null,this.handleUrlChange=()=>{let e=window.location.href;e!==this.lastUrl&&(this.lastUrl=e,this.trackPageview(),this.honch._onNavigate&&this.honch._onNavigate(e))},this.honch=e,this.logger=t}start(){"u">typeof window&&(this.lastUrl=window.location.href,this.patchHistoryMethod("pushState"),this.patchHistoryMethod("replaceState"),window.addEventListener("popstate",this.handleUrlChange),this.logger.debug("Pageview tracker started"))}stop(){"u">typeof window&&(window.removeEventListener("popstate",this.handleUrlChange),this.originalPushState&&(history.pushState=this.originalPushState,this.originalPushState=null),this.originalReplaceState&&(history.replaceState=this.originalReplaceState,this.originalReplaceState=null),this.logger.debug("Pageview tracker stopped"))}trackPageview(){this.honch.capture("$pageview",{$current_url:window.location.href,$pathname:window.location.pathname,$search:window.location.search,$hash:window.location.hash,$title:document.title,$referrer:document.referrer}),this.logger.debug("Pageview tracked",{url:window.location.href})}patchHistoryMethod(e){let t=history[e];"pushState"===e?this.originalPushState=t:this.originalReplaceState=t;let r=this;history[e]=function(...e){let s=t.apply(this,e);return r.handleUrlChange(),s}}}function iH(e){let t=[],r=e,s=0;for(;r&&s<5;){let e=r.tagName.toLowerCase();if(r.id){e+=`#${r.id}`,t.unshift(e);break}if(r.className){let t=r.className.split(/\s+/).filter(e=>e&&!e.startsWith("honch")).slice(0,3).join(".");t&&(e+=`.${t}`)}if(r.parentElement){let t=Array.from(r.parentElement.children).filter(e=>e.tagName===r.tagName);if(t.length>1){let s=t.indexOf(r)+1;e+=`:nth-of-type(${s})`}}t.unshift(e),r=r.parentElement,s++}return t.join(" > ")}function iY(e,t){for(let r of t)try{if(e.matches(r)||e.closest(r))return!0}catch(e){}return!1}function iJ(e,t){return e.length<=t?e:e.substring(0,t-3)+"..."}class iX{constructor(e,t,r){this.handleClick=e=>{let t=e.target;if(!t)return;let r=this.findClickableElement(t);if(!r||iY(r,this.config.exclude_elements))return;let s=this.getElementProperties(r);this.honch.capture("$autocapture",{$event_type:"click",...s}),this.logger.debug("Click captured",s)},this.honch=e,this.config=t,this.logger=r}start(){"u">typeof document&&(document.addEventListener("click",this.handleClick,{capture:!0}),this.logger.debug("Click tracker started"))}stop(){"u">typeof document&&(document.removeEventListener("click",this.handleClick,{capture:!0}),this.logger.debug("Click tracker stopped"))}findClickableElement(e){let t=e,r=0;for(;t&&r<5;){let e=t.tagName.toLowerCase();if("a"===e||"button"===e||"input"===e||"select"===e||t.hasAttribute("role")||t.hasAttribute("onclick"))return t;t=t.parentElement,r++}return e}getElementProperties(e){return{$element_tag:e.tagName.toLowerCase(),$element_text:function(e){let t=e.getAttribute("aria-label");if(t)return iJ(t,100);if(e.title)return iJ(e.title,100);let r=e.tagName.toLowerCase();if("input"!==r&&"select"!==r&&"textarea"!==r){let t=e.innerText?.trim();if(t)return iJ(t,100)}if("input"===r){let t=e.placeholder;if(t)return iJ(t,100)}}(e),$element_selector:iH(e),$element_classes:e.className||void 0,$element_id:e.id||void 0,$element_href:e.href||void 0,$element_name:e.name||void 0,$element_type:e.type||void 0}}}class iK{constructor(e,t,r){this.handleSubmit=e=>{let t=e.target;if(!t||"form"!==t.tagName.toLowerCase()||iY(t,this.config.exclude_elements))return;let r=this.getFormProperties(t);this.honch.capture("$autocapture",{$event_type:"submit",...r}),this.logger.debug("Form submit captured",r)},this.honch=e,this.config=t,this.logger=r}start(){"u">typeof document&&(document.addEventListener("submit",this.handleSubmit,{capture:!0}),this.logger.debug("Form tracker started"))}stop(){"u">typeof document&&(document.removeEventListener("submit",this.handleSubmit,{capture:!0}),this.logger.debug("Form tracker stopped"))}getFormProperties(e){let t=Array.from(e.elements).filter(e=>{let t=e.tagName.toLowerCase();return"input"===t||"select"===t||"textarea"===t}).map(e=>({name:e.name||void 0,type:e.type||e.tagName.toLowerCase()})).filter(e=>e.name);return{$element_tag:"form",$element_selector:iH(e),$element_id:e.id||void 0,$element_name:e.name||void 0,$element_action:e.action||void 0,$element_method:e.method||void 0,$form_fields:t,$form_field_count:t.length}}}class iq{constructor(e,t,r){this.pageviewTracker=null,this.clickTracker=null,this.formTracker=null,this.honch=e,this.config=t,this.logger=r}start(){this.logger.debug("Starting autocapture"),this.config.autocapture&&(this.pageviewTracker=new iZ(this.honch,this.logger),this.pageviewTracker.start()),this.config.capture_clicks&&(this.clickTracker=new iX(this.honch,this.config,this.logger),this.clickTracker.start()),this.config.capture_forms&&(this.formTracker=new iK(this.honch,this.config,this.logger),this.formTracker.start())}stop(){this.logger.debug("Stopping autocapture"),this.pageviewTracker?.stop(),this.clickTracker?.stop(),this.formTracker?.stop(),this.pageviewTracker=null,this.clickTracker=null,this.formTracker=null}}class iQ{constructor(e,t,r,s,i=!1,n){this.buffer=[],this.stopFn=null,this.flushTimer=null,this.isStarted=!1,this.isStopping=!1,this.startedAt=0,this.boundBeforeUnload=null,this.boundPageHide=null,this.boundVisibilityChange=null,this.boundFreeze=null,this.deferredVisibilityListener=null,this.lastUrl="",this.correctiveObserver=null,this.correctiveTimer=null,this.correctiveMutationCount=0,this.BUFFER_SIZE=100,this.FLUSH_INTERVAL_MS=5e3,this.MAX_BUFFER_SIZE=2e3,this.hasSentFullSnapshot=!1,this.bufferCreatedAt=Date.now(),this.transport=e,this.distinctId=t,this.sessionId=r,this.windowId=s,this.recordCanvas=i,this.logger=n,this.instanceId=`rec_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}
1start(){if(!this.isStarted&&"u">typeof window){if("u">typeof document&&"hidden"===document.visibilityState){this.logger.debug("Deferring recording start — tab is hidden"),this.deferredVisibilityListener=()=>{"visible"!==document.visibilityState||this.isStarted||this.isStopping||(document.removeEventListener("visibilitychange",this.deferredVisibilityListener),this.deferredVisibilityListener=null,this.logger.debug("Tab became visible, starting deferred recording"),this.initRecording())},document.addEventListener("visibilitychange",this.deferredVisibilityListener);return}this.initRecording()}}initRecording(){if(!this.isStarted){this.logger.debug("Initializing session recording",{instanceId:this.instanceId}),this.startedAt=Date.now(),this.bufferCreatedAt=Date.now(),this.hasSentFullSnapshot=!1,this.buffer=[],iQ.activeInstanceId=this.instanceId;try{this.isStarted=!0,this.isStopping=!1;let e=iU({emit:e=>this.handleEvent(e),sampling:{mousemove:50,mouseInteraction:!0,scroll:150,input:"last"},blockClass:"honch-block",ignoreClass:"honch-ignore",maskTextClass:"honch-mask",maskAllInputs:!0,maskInputOptions:{password:!0,email:!1},recordCanvas:this.recordCanvas,inlineImages:!0,collectFonts:!0});if(!e){this.isStarted=!1,this.logger.warn("rrweb record() returned null — recording not started");return}this.stopFn=e,this.flushTimer=setInterval(()=>this.flush(),this.FLUSH_INTERVAL_MS),this.lastUrl=window.location.href,this.boundBeforeUnload=()=>this.handleUnload(),this.boundPageHide=()=>this.handleUnload(),this.boundVisibilityChange=()=>this.handleVisibilityChange(),this.boundFreeze=()=>this.handleUnload(),window.addEventListener("beforeunload",this.boundBeforeUnload),window.addEventListener("pagehide",this.boundPageHide),document.addEventListener("visibilitychange",this.boundVisibilityChange),document.addEventListener("freeze",this.boundFreeze),this.scheduleCorrectiveSnapshot(),this.logger.info("Session recording started",{sessionId:this.sessionId,instanceId:this.instanceId})}catch(e){this.isStarted=!1,this.logger.error("Failed to start session recording",{error:e})}}}onNavigate(e){if(!this.isStarted||!this.stopFn)return;let t=e||window.location.href;if(t!==this.lastUrl)if(this.lastUrl=t,this.logger.debug("SPA navigation detected in recording",{url:t}),"u">typeof requestAnimationFrame){let e=this.instanceId;requestAnimationFrame(()=>{requestAnimationFrame(()=>{this.isStarted&&iQ.activeInstanceId===e&&this.takeFullSnapshotSafe()})})}else{let e=this.instanceId;setTimeout(()=>{this.isStarted&&iQ.activeInstanceId===e&&this.takeFullSnapshotSafe()},50)}}handleVisibilityChange(){if(this.isStarted){if("hidden"===document.visibilityState)this.flushSync();else if("visible"===document.visibilityState&&this.stopFn)if(Date.now()-this.startedAt>1e3){this.logger.debug("Tab resumed, requesting full snapshot");let e=this.instanceId;setTimeout(()=>{this.isStarted&&iQ.activeInstanceId===e&&this.takeFullSnapshotSafe()},100)}else this.logger.debug("Tab resumed but recording just started, skipping extra snapshot")}}takeFullSnapshotSafe(){if(this.isStarted&&this.stopFn){if(iQ.activeInstanceId!==this.instanceId)return void this.logger.debug("Skipping snapshot — stale instance",{myId:this.instanceId,activeId:iQ.activeInstanceId});try{iU.takeFullSnapshot(),this.logger.debug("Full snapshot taken")}catch(e){this.logger.warn("Failed to take full snapshot",{error:e})}}}scheduleCorrectiveSnapshot(){if("u"<typeof MutationObserver||!document.body)return;this.correctiveMutationCount=0;let e=Date.now(),t=this.instanceId;this.correctiveObserver=new MutationObserver(()=>{iQ.activeInstanceId!==t?this.cleanupCorrectiveObserver():(this.correctiveMutationCount++,this.correctiveTimer&&clearTimeout(this.correctiveTimer),Date.now()-e>iQ.CORRECTIVE_MAX_WAIT_MS)?this.fireCorrectiveSnapshot():this.correctiveTimer=setTimeout(()=>{this.fireCorrectiveSnapshot()},iQ.CORRECTIVE_SETTLE_MS)}),this.correctiveObserver.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>{iQ.activeInstanceId===t&&this.cleanupCorrectiveObserver()},iQ.CORRECTIVE_MAX_WAIT_MS)}fireCorrectiveSnapshot(){let e=this.correctiveMutationCount;this.cleanupCorrectiveObserver(),e>=iQ.CORRECTIVE_MIN_MUTATIONS?(this.logger.debug("Taking corrective snapshot after DOM settled",{mutations:e}),this.takeFullSnapshotSafe()):this.logger.debug("Skipping corrective snapshot — DOM was stable",{mutations:e})}cleanupCorrectiveObserver(){this.correctiveObserver&&(this.correctiveObserver.disconnect(),this.correctiveObserver=null),this.correctiveTimer&&(clearTimeout(this.correctiveTimer),this.correctiveTimer=null)}handleUnload(){this.flushSync()}stop(){return this.isStarted||this.deferredVisibilityListener?(this.isStopping=!0,this.logger.debug("Stopping session recording",{instanceId:this.instanceId}),iQ.activeInstanceId===this.instanceId&&(iQ.activeInstanceId=null),this.deferredVisibilityListener&&(document.removeEventListener("visibilitychange",this.deferredVisibilityListener),this.deferredVisibilityListener=null),this.stopFn&&(this.stopFn(),this.stopFn=null),this.cleanupCorrectiveObserver(),this.flushTimer&&(clearInterval(this.flushTimer),this.flushTimer=null),this.boundBeforeUnload&&(window.removeEventListener("beforeunload",this.boundBeforeUnload),this.boundBeforeUnload=null),this.boundPageHide&&(window.removeEventListener("pagehide",this.boundPageHide),this.boundPageHide=null),this.boundVisibilityChange&&(document.removeEventListener("visibilitychange",this.boundVisibilityChange),this.boundVisibilityChange=null),this.boundFreeze&&(document.removeEventListener("freeze",this.boundFreeze),this.boundFreeze=null),this.flushSync(),this.isStarted=!1,this.isStopping=!1,this.logger.info("Session recording stopped",{instanceId:this.instanceId}),new Promise(e=>setTimeout(e,100))):Promise.resolve()}updateDistinctId(e){this.distinctId=e}handleEvent(e){if(this.isStarted&&iQ.activeInstanceId===this.instanceId){if(this.buffer.push(e),this.buffer.length>this.MAX_BUFFER_SIZE){let e=this.buffer.length;this.buffer=this.evictLowPriorityEvents(this.buffer,this.MAX_BUFFER_SIZE);let t=e-this.buffer.length;t>0&&this.logger.warn("Recording buffer overflow, dropped low-priority events",{dropped:t})}this.buffer.length>=this.BUFFER_SIZE&&this.flush()}}evictLowPriorityEvents(e,t){if(e.length<=t)return e;let r=e.map((e,t)=>{let r=2;if(3===e.type){let t=e.data?.source;1===t||6===t?r=0:3===t&&(r=1)}return{event:e,priority:r,index:t}});r.sort((e,t)=>
1e.priority-t.priority||e.index-t.index);let s=r.slice(-t);return s.sort((e,t)=>e.index-t.index),s.map(e=>e.event)}isRecordingViable(e){if(e.length<3||!e.some(e=>2===e.type)||!e.some(e=>3===e.type))return!1;let t=e.map(e=>e.timestamp).filter(e=>e>0);if(t.length>=2){let e=Math.min(...t);if(Math.max(...t)-e<1e3)return!1}return!0}async flush(){if(0===this.buffer.length)return;if(!this.hasSentFullSnapshot){if(!this.buffer.some(e=>2===e.type)){let e=Date.now()-this.bufferCreatedAt;return e<1e4&&this.buffer.length<this.BUFFER_SIZE?void this.logger.debug("Waiting for full snapshot",{events:this.buffer.length,age:e}):(this.logger.warn("Never received full snapshot, discarding buffer",{events:this.buffer.length,age:e}),this.buffer=[],void(this.bufferCreatedAt=Date.now()))}let e=Date.now()-this.startedAt;if(e<2e3)return void this.logger.debug("Recording too young, deferring flush",{age:e});let t=[...this.buffer];return this.isRecordingViable(t)?(this.buffer=[],this.bufferCreatedAt=Date.now(),this.logger.debug("Sending first viable recording batch",{count:t.length}),void(await this.sendWithRetry(t)?this.hasSentFullSnapshot=!0:this.buffer.length+t.length<=this.MAX_BUFFER_SIZE?this.buffer=[...t,...this.buffer]:this.logger.warn("Dropping failed first batch to prevent overflow"))):void this.logger.debug("First batch not yet viable, waiting for more events",{count:t.length})}if(this.buffer.length<3&&Date.now()-this.bufferCreatedAt<2*this.FLUSH_INTERVAL_MS)return;let e=[...this.buffer];this.buffer=[],this.bufferCreatedAt=Date.now(),this.logger.debug("Flushing recording events",{count:e.length}),await this.sendWithRetry(e)}async sendWithRetry(e){for(let t=0;t<3;t++)try{return await this.transport.sendRecording(this.distinctId,this.sessionId,this.windowId,e),!0}catch(r){if(t<2){let e=500*Math.pow(2,t)+500*Math.random();this.logger.warn(`Recording send failed, retry in ${e}ms`,{attempt:t,error:r}),await new Promise(t=>setTimeout(t,e))}else{this.logger.error("Recording send failed after retries",{error:r}),this.buffer.length+e.length<=this.MAX_BUFFER_SIZE?this.buffer=[...e,...this.buffer]:this.logger.warn("Dropping failed events to prevent overflow",{dropped:e.length});break}}return!1}flushSync(){if(0===this.buffer.length)return;let e=[...this.buffer];if(this.buffer=[],!this.hasSentFullSnapshot){if(!this.isRecordingViable(e))return void this.logger.debug("Skipping sync flush — first batch not viable",{count:e.length});this.hasSentFullSnapshot=!0}this.transport.sendRecordingBeacon(this.distinctId,this.sessionId,this.windowId,e)}}iQ.CORRECTIVE_SETTLE_MS=1e3,iQ.CORRECTIVE_MAX_WAIT_MS=5e3,iQ.CORRECTIVE_MIN_MUTATIONS=10,iQ.activeInstanceId=null;class i0{constructor(e){this.tracked=new Set,this.honch=e}start(){"u">typeof window&&(this.observeLCP(),this.observeFID(),this.observeCLS(),this.observeTTFB(),this.observeINP())}stop(){}trackMetric(e){this.tracked.has(e.name)||(this.tracked.add(e.name),this.honch.capture("$web_vitals",{$metric_name:e.name,$metric_value:e.value,$metric_rating:e.rating}))}observeLCP(){if("PerformanceObserver"in window)try{new PerformanceObserver(e=>{let t=e.getEntries(),r=t[t.length-1];if(r){let e=r.startTime;this.trackMetric({name:"LCP",value:e,rating:e<=2500?"good":e<=4e3?"needs-improvement":"poor"})}}).observe({type:"largest-contentful-paint",buffered:!0})}catch(e){}}observeFID(){if("PerformanceObserver"in window)try{new PerformanceObserver(e=>{let t=e.getEntries()[0];if(t){let e=t.processingStart-t.startTime;this.trackMetric({name:"FID",value:e,rating:e<=100?"good":e<=300?"needs-improvement":"poor"})}}).observe({type:"first-input",buffered:!0})}catch(e){}}observeCLS(){if(!("PerformanceObserver"in window))return;let e=0;try{new PerformanceObserver(t=>{for(let r of t.getEntries())r.hadRecentInput||(e+=r.value)}).observe({type:"layout-shift",buffered:!0});let t=()=>{this.trackMetric({name:"CLS",value:e,rating:e<=.1?"good":e<=.25?"needs-improvement":"poor"})};window.addEventListener("pagehide",t,{once:!0}),document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&t()},{once:!0})}catch(e){}}observeTTFB(){if("u">typeof window&&window.performance)try{let e=performance.getEntriesByType("navigation")[0];if(e){let t=e.responseStart-e.requestStart;this.trackMetric({name:"TTFB",value:t,rating:t<=800?"good":t<=1800?"needs-improvement":"poor"})}}catch(e){}}observeINP(){if(!("PerformanceObserver"in window))return;let e=[];try{new PerformanceObserver(t=>{for(let r of t.getEntries())r.interactionId&&e.push(r.duration)}).observe({type:"event",buffered:!0,durationThreshold:16});let t=()=>{if(0===e.length)return;e.sort((e,t)=>
1e-t);let t=Math.floor(.98*e.length),r=e[t]||e[e.length-1];this.trackMetric({name:"INP",value:r,rating:r<=200?"good":r<=500?"needs-improvement":"poor"})};window.addEventListener("pagehide",t,{once:!0})}catch(e){}}}function i1(){return"u">typeof crypto&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}class i2{constructor(e){this.prefix="[Honch]",this.debug_enabled=e}setDebug(e){this.debug_enabled=e}debug(e,t){this.debug_enabled&&this.log("debug",e,t)}info(e,t){this.debug_enabled&&this.log("info",e,t)}warn(e,t){this.log("warn",e,t)}error(e,t){this.log("error",e,t)}log(e,t,r){let s=`${this.prefix} ${t}`;switch(e){case"debug":console.debug(s,r||"");break;case"info":console.info(s,r||"");break;case"warn":console.warn(s,r||"");break;case"error":console.error(s,r||"")}}}let i3=new class{constructor(){this.autoCapture=null,this.sessionRecording=null,this.webVitals=null,this.sessionCheckTimer=null,this.boundSessionVisibilityHandler=null,this.personProperties={},this.superProperties={},this.optedOut=!1,this.initialized=!1,this.shouldRecordSession=!1,this.isRotatingSession=!1,this.config={...iV,token:""},this.storage=new iW("memory","honch_"),this.sessionStorage=new iW("memory","honch_sess_"),this.logger=new i2(!1),this.transport=new iG("","",this.logger),this.queue=new i$(this.transport,this.logger,10,5e3,3),this.distinctId="",this.sessionId="",this.windowId=""}init(e,t={}){return this.initialized?this.logger.warn("Honch already initialized. Call reset() first to reinitialize."):e?(this.config={...iV,...t,token:e},this.logger=new i2(this.config.debug),this.logger.info("Initializing Honch SDK",{token:e.substring(0,10)+"..."}),this.config.respect_dnt&&this.isDoNotTrackEnabled()&&(this.logger.info("Do Not Track enabled, disabling tracking"),this.config.disabled=!0),this.config.disabled)?(this.logger.info("Honch tracking is disabled"),this.initialized=!0):(this.storage=new iW(this.config.persistence,this.config.storage_prefix),this.sessionStorage=new iW("sessionStorage",this.config.storage_prefix+"sess_"),this.transport=new iG(this.config.api_host,this.config.token,this.logger,this.config.fetch_fn),this.queue=new i$(this.transport,this.logger,this.config.batch_size,this.config.flush_interval_ms,this.config.max_retries),this.distinctId=this.storage.get("distinct_id")||this.generateAnonymousId(),this.storage.set("distinct_id",this.distinctId),this.sessionId=this.getOrCreateSessionId(),this.windowId=i1(),this.personProperties=this.storage.get("person_properties")||{},this.superProperties=this.storage.get("super_properties")||{},this.optedOut=!0===this.storage.get("opted_out"),this.optedOut)?(this.logger.info("User has opted out of tracking"),this.initialized=!0):(this.shouldRecordSession=this.config.session_recording&&Math.random()<this.config.session_recording_sample_rate,this.queue.start(),this.sessionCheckTimer=setInterval(()=>{this.checkAndRefreshSession()},3e5),"u">typeof document&&(this.boundSessionVisibilityHandler=()=>{"visible"===document.visibilityState&&this.checkAndRefreshSession()},document.addEventListener("visibilitychange",this.boundSessionVisibilityHandler)),this.initialized=!0,this.shouldRecordSession&&this.startSessionRecording(),(this.config.autocapture||this.config.capture_clicks||this.config.capture_forms)&&(this.autoCapture=new iq(this,this.config,this.logger),this.autoCapture.start()),this.config.capture_vitals&&(this.webVitals=new i0(this),this.webVitals.start()),this.config.autocapture&&this.capturePageview(),this.logger.info("Honch SDK initialized",{distinctId:this.distinctId}),this.config.loaded&&this.config.loaded(this)):this.logger.error("Honch.init() requires a valid API token"),this}async startSessionRecording(){this.sessionRecording&&(await this.sessionRecording.stop(),this.sessionRecording=null),this.sessionRecording=new iQ(this.transport,this.distinctId,this.sessionId,this.windowId,!!this.config.recordCanvas,this.logger),this.sessionRecording.start()}_onNavigate(e){this.sessionRecording&&this.sessionRecording.onNavigate(e)}
1capture(e,t={}){if(!this.initialized||this.config.disabled||this.optedOut)return;if(!e||"string"!=typeof e)return void this.logger.warn("capture() requires a valid event name");if("u">typeof window&&this.shouldExcludeUrl(window.location.href))return void this.logger.debug("URL excluded from tracking",{url:window.location.href});this.checkAndRefreshSession(),this.updateSessionActivity();let r={event:e,distinct_id:this.distinctId,properties:this.buildEventProperties(t),timestamp:new Date().toISOString()};this.logger.debug("Capturing event",r),this.queue.enqueue(r)}identify(e,t={}){if(!this.initialized||this.config.disabled||this.optedOut)return;if(!e||"string"!=typeof e)return void this.logger.warn("identify() requires a valid distinct_id");if(this.distinctId&&!this.distinctId.startsWith("anon_")&&this.distinctId!==e)return void this.logger.warn(`User already identified as '${this.distinctId}'. Call reset() first to switch users.`);let r=this.distinctId;this.distinctId=e,this.storage.set("distinct_id",e),this.personProperties={...this.personProperties,...t},this.storage.set("person_properties",this.personProperties),this.capture("$identify",{$anon_distinct_id:r,$set:t}),this.sessionRecording&&this.sessionRecording.updateDistinctId(e),this.logger.info("User identified",{distinctId:e,previousId:r})}alias(e,t){!this.initialized||this.config.disabled||this.optedOut||this.capture("$create_alias",{alias:e,distinct_id:t||this.distinctId})}reset(){this.logger.info("Resetting user"),this.sessionRecording&&(this.sessionRecording.stop(),this.sessionRecording=null),this.sessionCheckTimer&&(clearInterval(this.sessionCheckTimer),this.sessionCheckTimer=null),this.boundSessionVisibilityHandler&&(document.removeEventListener("visibilitychange",this.boundSessionVisibilityHandler),this.boundSessionVisibilityHandler=null),this.queue.flush(),this.storage.remove("distinct_id"),this.storage.remove("person_properties"),this.sessionStorage.remove("session_id"),this.sessionStorage.remove("session_start"),this.sessionStorage.remove("last_activity"),this.distinctId=this.generateAnonymousId(),this.storage.set("distinct_id",this.distinctId),this.sessionId=this.createNewSession(),this.windowId=i1(),this.personProperties={},this.shouldRecordSession&&this.startSessionRecording(),this.sessionCheckTimer=setInterval(()=>{this.checkAndRefreshSession()},3e5),"u">typeof document&&(this.boundSessionVisibilityHandler=()=>{"visible"===document.visibilityState&&this.checkAndRefreshSession()},document.addEventListener("visibilitychange",this.boundSessionVisibilityHandler))}setPersonProperties(e){!this.initialized||this.config.disabled||this.optedOut||(this.personProperties={...this.personProperties,...e},this.storage.set("person_properties",this.personProperties),this.capture("$set",{$set:e}))}setPersonPropertiesOnce(e){if(!this.initialized||this.config.disabled||this.optedOut)return;let t={};for(let[r,s]of Object.entries(e))r in this.personProperties||(t[r]=s);Object.keys(t).length>0&&(this.personProperties={...this.personProperties,...t},this.storage.set("person_properties",this.personProperties),this.capture("$set",{$set_once:t}))}register(e){this.superProperties={...this.superProperties,...e},this.storage.set("super_properties",this.superProperties)}unregister(e){delete this.superProperties[e],this.storage.set("super_properties",this.superProperties)}getDistinctId(){return this.distinctId}getSessionId(){return this.sessionId}async flush(){await this.queue.flush()}opt_out(){this.optedOut=!0,this.storage.set("opted_out",!0),this.autoCapture&&(this.autoCapture.stop(),this.autoCapture=null),this.sessionRecording&&(this.sessionRecording.stop(),this.sessionRecording=null),this.webVitals&&(this.webVitals.stop(),this.webVitals=null),this.sessionCheckTimer&&(clearInterval(this.sessionCheckTimer),this.sessionCheckTimer=null),this.boundSessionVisibilityHandler&&(document.removeEventListener("visibilitychange",this.boundSessionVisibilityHandler),this.boundSessionVisibilityHandler=null),this.queue.stop(),this.logger.info("User opted out of tracking")}opt_in(){this.optedOut=!1,this.storage.remove("opted_out"),this.config.autocapture&&this.autoCapture&&this.autoCapture.start(),this.queue.start(),this.logger.info("User opted in to tracking")}isOptedOut(){return this.optedOut}debug(e=!0){this.logger.setDebug(e),this.config.debug=e}generateAnonymousId(){return`anon_${i1()}`}getOrCreateSessionId(){let e=this.sessionStorage.get("session_id"),t=this.sessionStorage.get("last_activity"),r=Date.now();return e&&t&&r-t<18e5?(this.sessionStorage.set("last_activity",r),e):this.createNewSession()}createNewSession(){let e=`sess_${i1()}`,t=Date.now();return this.sessionStorage.set("session_id",e),this.sessionStorage.set("session_start",t),this.sessionStorage.set("last_activity",t),this.logger.debug("Created new session",{sessionId:e}),e}updateSessionActivity(){this.sessionStorage.set("last_activity",Date.now())}
1checkAndRefreshSession(){if(this.isRotatingSession)return;let e=this.sessionStorage.get("last_activity"),t=Date.now();if(e&&t-e>=18e5){if("u">typeof document&&"hidden"===document.visibilityState)return void this.logger.debug("Session timed out but tab is hidden, deferring rotation");this.isRotatingSession=!0,this.logger.info("Session timed out, creating new session"),this.sessionId=this.createNewSession(),this.windowId=i1(),this.shouldRecordSession?this.startSessionRecording().finally(()=>{this.isRotatingSession=!1}):(this.sessionRecording&&(this.sessionRecording.stop(),this.sessionRecording=null),this.isRotatingSession=!1)}}capturePageview(){"u">typeof window&&this.capture("$pageview",{$current_url:window.location.href,$pathname:window.location.pathname,$search:window.location.search,$hash:window.location.hash,$title:document.title,$referrer:document.referrer})}buildEventProperties(e){if("u"<typeof window)return{...e};let t=function(){if("u"<typeof navigator)return{name:"Unknown",version:"Unknown"};let e=navigator.userAgent;if(/Chrome\/(\d+)/.test(e)&&!/Edg\//.test(e)){let t=e.match(/Chrome\/(\d+)/);return{name:"Chrome",version:t?t[1]:"Unknown"}}if(/Firefox\/(\d+)/.test(e)){let t=e.match(/Firefox\/(\d+)/);return{name:"Firefox",version:t?t[1]:"Unknown"}}if(/Safari\/(\d+)/.test(e)&&!/Chrome/.test(e)){let t=e.match(/Version\/(\d+)/);return{name:"Safari",version:t?t[1]:"Unknown"}}if(/Edg\/(\d+)/.test(e)){let t=e.match(/Edg\/(\d+)/);return{name:"Edge",version:t?t[1]:"Unknown"}}if(/Trident/.test(e)){let t=e.match(/rv:(\d+)/);return{name:"Internet Explorer",version:t?t[1]:"Unknown"}}return{name:"Unknown",version:"Unknown"}}(),r=function(){if("u"<typeof navigator)return{type:"desktop",os:"Unknown",osVersion:"Unknown"};let e=navigator.userAgent,t="Unknown",r="Unknown";if(/Windows NT (\d+\.\d+)/.test(e)){t="Windows";let s=e.match(/Windows NT (\d+\.\d+)/);if(s){let e=s[1];r=({"10.0":"10","6.3":"8.1","6.2":"8","6.1":"7"})[e]||e}}else if(/Mac OS X (\d+[._]\d+)/.test(e)){t="Mac OS X";let s=e.match(/Mac OS X (\d+[._]\d+)/);r=s?s[1].replace("_","."):"Unknown"}else if(/Android (\d+)/.test(e)){t="Android";let s=e.match(/Android (\d+)/);r=s?s[1]:"Unknown"}else if(/iPhone OS (\d+)/.test(e)||/iPad.*OS (\d+)/.test(e)){t="iOS";let s=e.match(/OS (\d+)/);r=s?s[1]:"Unknown"}else/Linux/.test(e)&&(t="Linux");let s="desktop";return/Mobi|Android.*Mobile|iPhone|iPod/.test(e)?s="mobile":/iPad|Android(?!.*Mobile)|Tablet/.test(e)&&(s="tablet"),{type:s,os:t,osVersion:r}}();return{$session_id:this.sessionId,$window_id:this.windowId,$browser:t.name,$browser_version:t.version,$os:r.os,$os_version:r.osVersion,$device_type:r.type,$screen_height:window.screen.height,$screen_width:window.screen.width,$viewport_height:window.innerHeight,$viewport_width:window.innerWidth,$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$lib:"honch-js",$lib_version:"0.1.5",$timestamp:new Date().toISOString(),$time:Date.now(),...this.superProperties,...this.config.default_properties,...e}}shouldExcludeUrl(e){return this.config.exclude_urls.some(t=>t.test(e))}isDoNotTrackEnabled(){if("u"<typeof navigator)return!1;let e=navigator.doNotTrack||window.doNotTrack;return"1"===e||"yes"===e}},i5={init:(e,t)=>i3.init(e,t),capture:(e,t)=>i3.capture(e,t),identify:(e,t)=>i3.identify(e,t),alias:(e,t)=>i3.alias(e,t),reset:()=>i3.reset(),setPersonProperties:e=>i3.setPersonProperties(e),setPersonPropertiesOnce:e=>i3.setPersonPropertiesOnce(e),register:e=>i3.register(e),unregister:e=>i3.unregister(e),getDistinctId:()=>i3.getDistinctId(),getSessionId:()=>i3.getSessionId(),flush:()=>i3.flush(),opt_out:()=>i3.opt_out(),opt_in:()=>i3.opt_in(),isOptedOut:()=>i3.isOptedOut(),debug:e=>i3.debug(e)};function i6(){return(0,F.useEffect)(()=>{i5.init("phc_vfEHDxGCYnNwjAkgbB2YfWLKvWNJLKGQa2wHE7hHEyY",{api_host:"https://capture.honch.io",autocapture:!0,capture_clicks:!0,capture_forms:!0,session_recording:!0})},[]),null}"u">typeof window&&(window.honch=i5),e.s(["HonchTracker",()=>i6],76008)}]);

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.