@brainfish-ai/web-tracker 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -2
- package/dist/record/index.d.ts +1 -3
- package/dist/tracker.cjs.js +1 -1
- package/dist/tracker.cjs.js.gz +0 -0
- package/dist/tracker.cjs.js.map +1 -1
- package/dist/tracker.es.js +25 -13496
- package/dist/tracker.es.js.gz +0 -0
- package/dist/tracker.es.js.map +1 -1
- package/dist/tracker.js +1 -1
- package/dist/tracker.js.gz +0 -0
- package/dist/tracker.js.map +1 -1
- package/package.json +1 -2
- package/dist/screenshot/capture.d.ts +0 -2
- package/dist/screenshot/redact.d.ts +0 -3
- package/dist/screenshot/renderStability.d.ts +0 -17
- package/dist/screenshot/snapshot.d.ts +0 -8
package/dist/tracker.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __defProp=Object.defineProperty,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField=(e,t,r)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,r);!function(){"use strict";const e=Object.create(null);e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Object.keys(e).forEach(r=>{t[e[r]]=r});const r={type:"error",data:"parser error"},n="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),s="function"==typeof ArrayBuffer,i=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,o=({type:t,data:r},o,l)=>n&&r instanceof Blob?o?l(r):a(r,l):s&&(r instanceof ArrayBuffer||i(r))?o?l(r):a(new Blob([r]),l):l(e[t]+(r||"")),a=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function l(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let c;const h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let Kk=0;Kk<64;Kk++)u[h.charCodeAt(Kk)]=Kk;const d="function"==typeof ArrayBuffer,p=(e,n)=>{if("string"!=typeof e)return{type:"message",data:f(e,n)};const s=e.charAt(0);if("b"===s)return{type:"message",data:m(e.substring(1),n)};return t[s]?e.length>1?{type:t[s],data:e.substring(1)}:{type:t[s]}:r},m=(e,t)=>{if(d){const r=(e=>{let t,r,n,s,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)r=u[e.charCodeAt(t)],n=u[e.charCodeAt(t+1)],s=u[e.charCodeAt(t+2)],i=u[e.charCodeAt(t+3)],h[l++]=r<<2|n>>4,h[l++]=(15&n)<<4|s>>2,h[l++]=(3&s)<<6|63&i;return c})(e);return f(r,t)}return{base64:!0,data:e}},f=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,g=String.fromCharCode(30);function y(){return new TransformStream({transform(e,t){!function(e,t){n&&e.data instanceof Blob?e.data.arrayBuffer().then(l).then(t):s&&(e.data instanceof ArrayBuffer||i(e.data))?t(l(e.data)):o(e,!1,e=>{c||(c=new TextEncoder),t(c.encode(e))})}(e,r=>{const n=r.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const e=new DataView(s.buffer);e.setUint8(0,126),e.setUint16(1,n)}else{s=new Uint8Array(9);const e=new DataView(s.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(n))}e.data&&"string"!=typeof e.data&&(s[0]|=128),t.enqueue(s),t.enqueue(r)})}})}let b;function w(e){return e.reduce((e,t)=>e+t.length,0)}function k(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let s=0;s<t;s++)r[s]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),r}function v(e){if(e)return function(e){for(var t in v.prototype)e[t]=v.prototype[t];return e}(e)}v.prototype.on=v.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},v.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},v.prototype.off=v.prototype.removeListener=v.prototype.removeAllListeners=v.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var s=0;s<n.length;s++)if((r=n[s])===t||r.fn===t){n.splice(s,1);break}return 0===n.length&&delete this._callbacks["$"+e],this},v.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){n=0;for(var s=(r=r.slice(0)).length;n<s;++n)r[n].apply(this,t)}return this},v.prototype.emitReserved=v.prototype.emit,v.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},v.prototype.hasListeners=function(e){return!!this.listeners(e).length};const S="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),C="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function x(e,...t){return t.reduce((t,r)=>(e.hasOwnProperty(r)&&(t[r]=e[r]),t),{})}const I=C.setTimeout,A=C.clearTimeout;function E(e,t){t.useNativeTimers?(e.setTimeoutFn=I.bind(C),e.clearTimeoutFn=A.bind(C)):(e.setTimeoutFn=C.setTimeout.bind(C),e.clearTimeoutFn=C.clearTimeout.bind(C))}function O(e){return"string"==typeof e?function(e){let t=0,r=0;for(let n=0,s=e.length;n<s;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}(e):Math.ceil(1.33*(e.byteLength||e.size))}function R(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class M extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class j extends v{constructor(e){super(),this.writable=!1,E(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,r){return super.emitReserved("error",new M(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=p(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return t.length?"?"+t:""}}class N extends j{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const r=e.split(g),n=[];for(let s=0;s<r.length;s++){const e=p(r[s],t);if(n.push(e),"error"===e.type)break}return n})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const r=e.length,n=new Array(r);let s=0;e.forEach((e,i)=>{o(e,!1,e=>{n[i]=e,++s===r&&t(n.join(g))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let _=!1;try{_="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Xk){}const z=_;function T(){}class P extends N{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port}}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class L extends v{constructor(e,t,r){super(),this.createRequest=e,E(this,r),this._opts=r,this._method=r.method||"GET",this._uri=t,this._data=void 0!==r.data?r.data:null,this._create()}_create(){var e;const t=x(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(t);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(n){}if("POST"===this._method)try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(n){}try{r.setRequestHeader("Accept","*/*")}catch(n){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;3===r.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(r.getResponseHeader("set-cookie"))),4===r.readyState&&(200===r.status||1223===r.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof r.status?r.status:0)},0))},r.send(this._data)}catch(n){return void this.setTimeoutFn(()=>{this._onError(n)},0)}"undefined"!=typeof document&&(this._index=L.requestsCount++,L.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=T,e)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete L.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(L.requestsCount=0,L.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",F);else if("function"==typeof addEventListener){addEventListener("onpagehide"in C?"pagehide":"unload",F,!1)}function F(){for(let e in L.requests)L.requests.hasOwnProperty(e)&&L.requests[e].abort()}const D=function(){const e=B({xdomain:!1});return e&&null!==e.responseType}();function B(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||z))return new XMLHttpRequest}catch(r){}if(!t)try{return new(C[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(r){}}const U="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class W extends j{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,r=U?{}:x(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,r)}catch(Xk){return this.emitReserved("error",Xk)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;o(r,this.supportsBinary,e=>{try{this.doWrite(r,e)}catch(t){}n&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const V=C.WebSocket||C.MozWebSocket;const q={websocket:class extends W{createSocket(e,t,r){return U?new V(e,t,r):t?new V(e,t):new V(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends j{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Xk){return this.emitReserved("error",Xk)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){b||(b=new TextDecoder);const n=[];let s=0,i=-1,o=!1;return new TransformStream({transform(a,l){for(n.push(a);;){if(0===s){if(w(n)<1)break;const e=k(n,1);o=!(128&~e[0]),i=127&e[0],s=i<126?3:126===i?1:2}else if(1===s){if(w(n)<2)break;const e=k(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),s=3}else if(2===s){if(w(n)<8)break;const e=k(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){l.enqueue(r);break}i=o*Math.pow(2,32)+t.getUint32(4),s=3}else{if(w(n)<i)break;const e=k(n,i);l.enqueue(p(o?e:b.decode(e),t)),s=0}if(0===i||i>e){l.enqueue(r);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),s=y();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const r=e[t],n=t===e.length-1;this._writer.write(r).then(()=>{n&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends P{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=D&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new L(B,this.uri(),e)}}},$=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Y=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Z(e){if(e.length>8e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let s=$.exec(e||""),i={},o=14;for(;o--;)i[Y[o]]=s[o]||"";return-1!=r&&-1!=n&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||n.splice(0,1);"/"==t.slice(-1)&&n.splice(n.length-1,1);return n}(0,i.path),i.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,n){t&&(r[t]=n)}),r}(0,i.query),i}const G="function"==typeof addEventListener&&"function"==typeof removeEventListener,J=[];G&&addEventListener("offline",()=>{J.forEach(e=>e())},!1);class H extends v{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const r=Z(e);t.hostname=r.host,t.secure="https"===r.protocol||"wss"===r.protocol,t.port=r.port,r.query&&(t.query=r.query)}else t.host&&(t.hostname=Z(t.host).host);E(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let n=0,s=r.length;n<s;n++){let e=r[n].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),G&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},J.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](r)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&H.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",H.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const r=this.writeBuffer[t].data;if(r&&(e+=O(r)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,S(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,r){return this._sendPacket("message",e,t,r),this}send(e,t,r){return this._sendPacket("message",e,t,r),this}_sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const s={type:e,data:t,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),n&&this.once("flush",n),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():e()}):this.upgrading?r():e()),this}_onError(e){if(H.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),G&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=J.indexOf(this._offlineEventListener);-1!==e&&J.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}H.protocol=4;class X extends H{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),r=!1;H.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!r)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;H.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{r||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function s(){r||(r=!0,c(),t.close(),t=null)}const i=e=>{const r=new Error("probe error: "+e);r.transport=t.name,s(),this.emitReserved("upgradeError",r)};function o(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&s()}const c=()=>{t.removeListener("open",n),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",n),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{r||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let r=0;r<e.length;r++)~this.transports.indexOf(e[r])&&t.push(e[r]);return t}}let K=class extends X{constructor(e,t={}){const r="object"==typeof e?e:t;(!r.transports||r.transports&&"string"==typeof r.transports[0])&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(e=>q[e]).filter(e=>!!e)),super(e,r)}};const Q="function"==typeof ArrayBuffer,ee=Object.prototype.toString,te="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===ee.call(Blob),re="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===ee.call(File);function ne(e){return Q&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||te&&e instanceof Blob||re&&e instanceof File}function se(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,r=e.length;t<r;t++)if(se(e[t]))return!0;return!1}if(ne(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return se(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&se(e[r]))return!0;return!1}function ie(e){const t=[],r=e.data,n=e;return n.data=oe(r,t),n.attachments=t.length,{packet:n,buffers:t}}function oe(e,t){if(!e)return e;if(ne(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=oe(e[n],t);return r}if("object"==typeof e&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=oe(e[n],t));return r}return e}function ae(e,t){return e.data=le(e.data,t),delete e.attachments,e}function le(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=le(e[r],t);else if("object"==typeof e)for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=le(e[r],t));return e}const ce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var he,ue;(ue=he||(he={}))[ue.CONNECT=0]="CONNECT",ue[ue.DISCONNECT=1]="DISCONNECT",ue[ue.EVENT=2]="EVENT",ue[ue.ACK=3]="ACK",ue[ue.CONNECT_ERROR=4]="CONNECT_ERROR",ue[ue.BINARY_EVENT=5]="BINARY_EVENT",ue[ue.BINARY_ACK=6]="BINARY_ACK";function de(e){return"[object Object]"===Object.prototype.toString.call(e)}class pe extends v{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const r=t.type===he.BINARY_EVENT;r||t.type===he.BINARY_ACK?(t.type=r?he.EVENT:he.ACK,this.reconstructor=new me(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!ne(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const r={type:Number(e.charAt(0))};if(void 0===he[r.type])throw new Error("unknown packet type "+r.type);if(r.type===he.BINARY_EVENT||r.type===he.BINARY_ACK){const n=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const s=e.substring(n,t);if(s!=Number(s)||"-"!==e.charAt(t))throw new Error("Illegal attachments");r.attachments=Number(s)}if("/"===e.charAt(t+1)){const n=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}r.nsp=e.substring(n,t)}else r.nsp="/";const n=e.charAt(t+1);if(""!==n&&Number(n)==n){const n=t+1;for(;++t;){const r=e.charAt(t);if(null==r||Number(r)!=r){--t;break}if(t===e.length)break}r.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){const n=this.tryParse(e.substr(t));if(!pe.isPayloadValid(r.type,n))throw new Error("invalid payload");r.data=n}return r}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case he.CONNECT:return de(t);case he.DISCONNECT:return void 0===t;case he.CONNECT_ERROR:return"string"==typeof t||de(t);case he.EVENT:case he.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ce.indexOf(t[0]));case he.ACK:case he.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class me{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ae(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fe=Object.freeze(Object.defineProperty({__proto__:null,Decoder:pe,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==he.EVENT&&e.type!==he.ACK||!se(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===he.EVENT?he.BINARY_EVENT:he.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==he.BINARY_EVENT&&e.type!==he.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=ie(e),r=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(r),n}},get PacketType(){return he},protocol:5},Symbol.toStringTag,{value:"Module"}));function ge(e,t,r){return e.on(t,r),function(){e.off(t,r)}}const ye=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class be extends v{constructor(e,t,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var r,n,s;if(ye.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:he.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,r=t.pop();this._registerAckCallback(e,r),i.id=e}const o=null===(n=null===(r=this.io.engine)||void 0===r?void 0:r.transport)||void 0===n?void 0:n.writable,a=this.connected&&!(null===(s=this.io.engine)||void 0===s?void 0:s._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var r;const n=null!==(r=this.flags.timeout)&&void 0!==r?r:this._opts.ackTimeout;if(void 0===n)return void(this.acks[e]=t);const s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},n),i=(...e)=>{this.io.clearTimeoutFn(s),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((r,n)=>{const s=(e,t)=>e?n(e):r(t);s.withError=!0,t.push(s),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...n)=>{if(r!==this._queue[0])return;return null!==e?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue()}),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:he.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case he.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case he.EVENT:case he.BINARY_EVENT:this.onevent(e);break;case he.ACK:case he.BINARY_ACK:this.onack(e);break;case he.DISCONNECT:this.ondisconnect();break;case he.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:he.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:he.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let r=0;r<t.length;r++)if(e===t[r])return t.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const r of t)r.apply(this,e.data)}}}function we(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}we.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+r:e-r}return 0|Math.min(e,this.max)},we.prototype.reset=function(){this.attempts=0},we.prototype.setMin=function(e){this.ms=e},we.prototype.setMax=function(e){this.max=e},we.prototype.setJitter=function(e){this.jitter=e};class ke extends v{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,E(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=t.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new we({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const n=t.parser||fe;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new K(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=ge(t,"open",function(){r.onopen(),e&&e()}),s=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=ge(t,"error",s);if(!1!==this._timeout){const e=this._timeout,r=this.setTimeoutFn(()=>{n(),s(new Error("timeout")),t.close()},e);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){S(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new be(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const r of t){if(this.nsps[r].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;r<t.length;r++)this.engine.write(t[r],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var r;this.cleanup(),null===(r=this.engine)||void 0===r||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const ve={};function Se(e,t){"object"==typeof e&&(t=e,e=void 0);const r=function(e,t="",r){let n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=Z(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const s=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+s+":"+n.port+t,n.href=n.protocol+"://"+s+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),n=r.source,s=r.id,i=r.path,o=ve[s]&&i in ve[s].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new ke(n,t):(ve[s]||(ve[s]=new ke(n,t)),a=ve[s]),r.query&&!t.query&&(t.query=r.queryKey),a.socket(r.path,t)}Object.assign(Se,{Manager:ke,Socket:be,io:Se,connect:Se});class Ce{constructor(e){__publicField(this,"socket"),__publicField(this,"encode"),__publicField(this,"decode"),this.socket=Se(e.baseUrl,{transports:["websocket"],path:"/analytics/ws",auth:{token:e.authToken},query:e.query}),this.encode=e.encoder??(e=>function(e){const t=(new TextEncoder).encode(e);if("undefined"!=typeof window&&"function"==typeof window.btoa){const e=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(e)}if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");throw new Error("[utils.base64Encode]: Unsupported environment")}(JSON.stringify(e))),this.decode=e.decoder??(e=>JSON.parse((e=>{if("undefined"!=typeof window&&"function"==typeof window.atob){const t=atob(e),r=t.length,n=new Uint8Array(r);for(let e=0;e<r;e++)n[e]=t.charCodeAt(e);return(new TextDecoder).decode(n)}if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");throw new Error("[utils.base64Decode]: Unsupported environment")})(e)))}send(e,t,r){"function"==typeof r?this.socket.emit(e,this.encode(t),r):this.socket.emit(e,this.encode(t))}on(e,t){this.socket.on(e,e=>t(this.decode(e)))}}class xe{constructor(e){__publicField(this,"baseUrl"),__publicField(this,"authToken"),__publicField(this,"sdkMetadata"),this.baseUrl=e.baseUrl,this.authToken=e.authToken,this.sdkMetadata=e.sdkMetadata}async send(e,t){const r=new URL(e,this.baseUrl),n={...t,...this.sdkMetadata&&{sdk:this.sdkMetadata}};try{const e=await fetch(r.toString(),{method:"POST",headers:{"Content-Type":"application/json",...this.authToken&&{Authorization:`Bearer ${this.authToken}`}},body:JSON.stringify(n)});if(!e.ok)return null;let t;try{t=await e.json()}catch{t={}}return t}catch(s){}}}class Ie{constructor(e){if(__publicField(this,"defaultTTL"),__publicField(this,"items"),this.defaultTTL=e,e<=0)throw new Error("Default TTL must be a positive number.");this.items=new Map,this.defaultTTL=e,setInterval(()=>this.cleanup(),e)}add(e,t){const r=void 0!==t?t:this.defaultTTL;if(r<=0)throw new Error("TTL must be a positive number.");const n=Date.now()+r;this.items.set(e,n)}has(e){const t=this.items.get(e);return void 0!==t&&(!(Date.now()>t)||(this.items.delete(e),!1))}delete(e){this.items.delete(e)}get size(){return this.cleanup(),this.items.size}clear(){this.items.clear()}cleanup(){const e=Date.now();for(const[t,r]of this.items.entries())r<=e&&this.items.delete(t)}toArray(){return this.cleanup(),Array.from(this.items.keys())}}let Ae=null;var Ee,Oe,Re,Me;"undefined"!=typeof window&&window.addEventListener("message",e=>{if("https://agent.brainfi.sh"===e.origin&&"REQUEST_USER_IDENTITY"===e.data?.type&&Ae&&e.source){const t=document.querySelector("#bf-iframe-container .trigger-iframe");if(!t||e.source!==t.contentWindow)return void console.warn("BrainfishWidgetWarn: Rejected REQUEST_USER_IDENTITY from untrusted iframe source:",e.origin);e.source.postMessage({type:"USER_IDENTIFY",payload:Ae},e.origin)}}),(Oe=Ee||(Ee={})).OpenUrl="openUrl",Oe.CallPhone="callPhone",Oe.SendEmail="sendEmail",Oe.TriggerEvent="triggerEvent",(Me=Re||(Re={})).Button="button",Me.Link="link";const je=class e{constructor(t){__publicField(this,"options"),__publicField(this,"client"),__publicField(this,"httpClient"),__publicField(this,"userId"),__publicField(this,"global"),__publicField(this,"queue",[]),__publicField(this,"knownEvents",["nudge.show"]),__publicField(this,"eventListeners",{}),__publicField(this,"recentNudgeIds",new Ie(1e3)),__publicField(this,"trackingDisabled",!1),this.options=t;const r={sdk_name:t.sdk||"node",sdk_version:t.sdkVersion||""},n=t.apiUrl||"https://analytic.brainfi.sh",s=t.accessKey;this.client=new Ce({baseUrl:n,authToken:s,query:r}),this.httpClient=new xe({baseUrl:n,authToken:s,sdkMetadata:{name:t.sdk||"node",version:t.sdkVersion||""}}),"undefined"!=typeof window&&"undefined"!=typeof localStorage&&(this.trackingDisabled="true"===localStorage.getItem(e.TRACKING_DISABLED_KEY)),this.setupIncomingPayloadHandler()}init(){}ready(){this.options.waitForUser=!1,this.flush()}setupIncomingPayloadHandler(){this.client.on("e",this.handleIncomingPayload.bind(this))}handleIncomingPayload(e){if("nudge.show"===e.type){const{nudgeId:t}=e.payload;if(this.recentNudgeIds.has(t))return;this.recentNudgeIds.add(t),this.dispatchEventListeners("nudge.show",e.payload)}}dispatchEventListeners(e,t){this.eventListeners[e]?.forEach(e=>e(t))}on(e,t){this.knownEvents.includes(e)&&(this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t))}off(e,t){this.knownEvents.includes(e)&&this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t),0===this.eventListeners[e].length&&delete this.eventListeners[e])}async send(e,t){return this.options.disabled||this.trackingDisabled||this.options.filter&&!this.options.filter(e)?Promise.resolve():this.options.waitForUser&&!this.userId?(this.queue.push(e),Promise.resolve()):this.client.send("t",e,t)}setGlobalProperties(e){this.global={...this.global,...e}}async track(e,t,r){return this.send({type:"event.track",payload:{name:e,userId:t?.userId??this.userId,properties:{...this.global??{},...t??{},...r?{_bfOverrides:r}:{}}}})}async identify(e){e.userId?(this.userId=e.userId,this.flush()):console.warn("BrainfishWidgetWarn: `.identify` called without a userId. User identification requires a valid userId to be provided.");const t=new Set(["userId","firstName","lastName","email","phone","avatar","properties"]),r=Object.keys(e).filter(e=>!t.has(e));r.length>0&&console.warn(`BrainfishWidgetWarn: The following fields are not recognized as main identifier fields: ${r.join(", ")}. Please place custom fields under the 'properties' object instead. Note: Using fields incorrectly may cause user identification to not work as expected.`),e.phone&&!/^\+[1-9]\d{1,14}$/.test(e.phone)&&console.warn("BrainfishWidgetWarn: phone should be in E.164 format (e.g., +14155552671). Providing the correct format ensures accurate user identification."),Ae=e;const n=document.querySelector("#bf-iframe-container .trigger-iframe");if(n){const t=()=>{n.contentWindow&&n.contentWindow.postMessage({type:"USER_IDENTIFY",payload:e},"*")};n.contentWindow&&t(),n.addEventListener("load",t)}if(Object.keys(e).length>1)return this.send({type:"user.identify",payload:{...e,properties:{...this.global,...e.properties}}})}async record(e){if(this.options.disabled)return Promise.resolve(null);if(this.trackingDisabled)return Promise.resolve(null);const t={type:"event.record",payload:{events:e,userId:this.userId}};if(this.options.filter&&!this.options.filter(t))return Promise.resolve(null);const r=await this.httpClient.send("/s",{events:e,userId:this.userId});return r?.sessionId||null}async alias(e){return this.send({type:"user.alias",payload:e})}async increment(e){return this.send({type:"user.increment",payload:e})}async decrement(e){return this.send({type:"user.decrement",payload:e})}clear(){this.userId=void 0}flush(){this.queue.forEach(e=>{this.send({...e,payload:{...e.payload,userId:e.payload.userId??this.userId}})}),this.queue=[]}disableTracking(){this.trackingDisabled=!0,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.setItem(e.TRACKING_DISABLED_KEY,"true")}enableTracking(){this.trackingDisabled=!1,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.removeItem(e.TRACKING_DISABLED_KEY),console.log("Brainfish tracking re-enabled. Refresh page for full effect.")}isTrackingDisabled(){return this.trackingDisabled}};__publicField(je,"TRACKING_DISABLED_KEY","bf_tracking_disabled");let Ne=je;var _e={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,snapshot:new WeakMap,snapshotKey:new Map,reset:function(){_e.computedStyle=new WeakMap}};var ze=new Set(["-webkit-locale"]);function Te(e,t,r=!1){const n=[],s=function(e){if(_e.defaultStyle.has(e))return _e.defaultStyle.get(e);if(new Set(["script","style","meta","link","noscript","template","defs","symbol","title","metadata","desc"]).has(e)){const t={};return _e.defaultStyle.set(e,t),t}let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0",t.style.height="0",t.style.overflow="hidden",document.body.appendChild(t));const r=document.createElement(e);r.style.all="initial",t.appendChild(r);const n=getComputedStyle(r),s={};for(let i of n)s[i]=n.getPropertyValue(i);return t.removeChild(r),_e.defaultStyle.set(e,s),s}(t);for(let[i,o]of Object.entries(e))if(!ze.has(i))if(r){const e=s[i];o&&o!==e&&n.push(`${i}:${o}`)}else o&&n.push(`${i}:${o}`);return n.sort().join(";")}async function Pe(e,t={}){const r=Be(e);/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e);if(r){const e=Ye(r);if(_e.background.has(e))return t.skipInline?void 0:`url(${_e.background.get(e)})`;{const r=await qe(e,{useProxy:t.useProxy});return _e.background.set(e,r),t.skipInline?void 0:`url("${r}")`}}return e}function Le(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function Fe(e,t=null){if(!(e instanceof Element))return window.getComputedStyle(e,t);let r=_e.computedStyle.get(e);if(r||(r=new Map,_e.computedStyle.set(e,r)),!r.has(t)){const n=window.getComputedStyle(e,t);r.set(t,n)}return r.get(t)}function De(e){let t=e.replace(/^['"]|['"]$/g,"");if(t.startsWith("\\"))try{return String.fromCharCode(parseInt(t.replace("\\",""),16))}catch{return t}return t}function Be(e){const t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;const r=t[2].trim();return r.startsWith("#")?null:r}async function Ue(e,{useProxy:t=""}={}){async function r(e){const t=await fetch(e);if(!t.ok)throw new Error(`[snapdom] Failed to fetch resource: ${e}`);return t}try{return await r(e)}catch(n){if(t&&"string"==typeof t){return r(t.replace(/\/$/,"")+Ye(e))}throw n}}var We=new Map,Ve=new Map;function qe(e,{timeout:t=3e3,useProxy:r="",errorTTL:n=8e3}={}){function s(e){try{return new URL(e,window.location.href).origin===window.location.origin?"use-credentials":"anonymous"}catch{return"anonymous"}}const i=e=>({ok:!0,data:e}),o=e=>({ok:!1,error:e instanceof Error?e:new Error(String(e))});function a(e){try{return fetch(e,{mode:"cors",credentials:"use-credentials"===s(e)?"include":"omit"}).then(e=>e.ok?e.blob().then(e=>new Promise(t=>{const r=new FileReader;r.onloadend=()=>{const e=r.result;"string"==typeof e&&e.startsWith("data:image/")?t(i(e)):t(o(new Error("Invalid image data URL")))},r.onerror=()=>t(o(new Error("FileReader error"))),r.readAsDataURL(e)})):o(new Error("HTTP "+e.status))).catch(e=>o(e))}catch(t){return Promise.resolve(o(t))}}function l(e){return a(e).then(t=>{if(t.ok)return t;if(r&&"string"==typeof r){return a(r.replace(/\/$/,"")+Ye(e)).then(e=>e.ok?e:o(new Error("[SnapDOM - fetchImage] Fetch failed and no proxy provided")))}return o(new Error("[SnapDOM - fetchImage] Fetch failed and no proxy provided"))})}const c=Date.now(),h=Ve.get(e);if(h&&h>c){const e=Promise.reject(new Error("[SnapDOM - fetchImage] Recently failed (cooldown)."));return e.catch(()=>{}),e}if(We.has(e))return We.get(e);const u=s(e);if(_e.image.has(e))return Promise.resolve(_e.image.get(e));if(e.startsWith("data:image/"))return _e.image.set(e,e),Promise.resolve(e);if(/\.svg(\?.*)?$/i.test(e)){const t=(async()=>{const t=await(async()=>{try{const t=await fetch(e,{mode:"cors",credentials:"use-credentials"===u?"include":"omit"});if(!t.ok)return o(new Error("HTTP "+t.status));const r=await t.text();return i(`data:image/svg+xml;charset=utf-8,${encodeURIComponent(r)}`)}catch(t){return o(t)}})();if(t.ok)return _e.image.set(e,t.data),t.data;const r=await l(e);return r.ok?(_e.image.set(e,r.data),r.data):(Ve.set(e,c+n),Promise.reject(r.error))})();return We.set(e,t),t.finally(()=>We.delete(e)),t.catch(()=>{}),t}const d=new Promise((r,s)=>{let i=!1;const o=new Image,a=e=>t=>{i||(i=!0,clearTimeout(d),o.onload=o.onerror=null,e(t))},c=t=>{_e.image.set(e,t),r(t)},h=t=>{Ve.set(e,Date.now()+n),s(t)},d=setTimeout(a(()=>{l(e).then(e=>{e.ok?c(e.data):h(new Error("Image load timed out"))})}),t);o.crossOrigin=u,o.onload=a(()=>{Promise.resolve(o.decode()).then(()=>{try{const e=document.createElement("canvas");e.width=o.naturalWidth||o.width,e.height=o.naturalHeight||o.height;e.getContext("2d").drawImage(o,0,0,e.width,e.height),c(e.toDataURL("image/png"))}catch{l(e).then(e=>{e.ok?c(e.data):h(e.error)})}}).catch(()=>{l(e).then(e=>{e.ok?c(e.data):h(e.error)})})}),o.onerror=a(()=>{l(e).then(e=>{e.ok?c(e.data):h(e.error)})}),o.src=e});return We.set(e,d),d.finally(()=>We.delete(e)),d.catch(()=>{}),d}function $e(e){const t={};for(let r of e)t[r]=e.getPropertyValue(r);return t}function Ye(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}function Ze(e){const t=[];let r=0,n=0;for(let s=0;s<e.length;s++){const i=e[s];"("===i&&r++,")"===i&&r--,","===i&&0===r&&(t.push(e.slice(n,s).trim()),n=s+1)}return t.push(e.slice(n).trim()),t}var Ge=new WeakMap,Je=new Map;function He(e,t,r,n,s){if("STYLE"===e.tagName)return;n.has(e)||n.set(e,Fe(e));const i=n.get(e);if(!Ge.has(e)){const t=function(e){const t={},r=e.getPropertyValue("visibility");for(let n=0;n<e.length;n++){const r=e[n];let s=e.getPropertyValue(r);"background-image"!==r&&"content"!==r||!s.includes("url(")||s.includes("data:")||(s="none"),t[r]=s}return"hidden"===r&&(t.opacity="0"),t}(i);Ge.set(e,t)}const o=Ge.get(e),a=Object.entries(o).sort(([e],[t])=>e.localeCompare(t)).map(([e,t])=>`${e}:${t}`).join(";");if(Je.has(a))return void r.set(t,Je.get(a));const l=Te(o,e.tagName?.toLowerCase()||"div",s);Je.set(a,l),r.set(t,l)}function Xe(e,t,r,n,s,i={},o){if(!e)throw new Error("Invalid node");const a=new Set;let l,c=null;if(e.nodeType===Node.TEXT_NODE)return e.cloneNode(!0);if(e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if("exclude"===e.getAttribute("data-capture")){const t=document.createElement("div"),r=e.getBoundingClientRect();return t.style.cssText=`display:inline-block;width:${r.width}px;height:${r.height}px;visibility:hidden;`,t}if(i.exclude&&Array.isArray(i.exclude))for(const h of i.exclude)try{if(e.matches?.(h)){const t=document.createElement("div"),r=e.getBoundingClientRect();return t.style.cssText=`display:inline-block;width:${r.width}px;height:${r.height}px;visibility:hidden;`,t}}catch(Xk){console.warn(`Invalid selector in exclude option: ${h}`,Xk)}if("function"==typeof i.filter)try{if(!i.filter(e,o||e)){const t=document.createElement("div"),r=e.getBoundingClientRect();return t.style.cssText=`display:inline-block;width:${r.width}px;height:${r.height}px;visibility:hidden;`,t}}catch(Xk){console.warn("Error in filter function:",Xk)}if("IFRAME"===e.tagName){const t=document.createElement("div");return t.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,t}if("placeholder"===e.getAttribute("data-capture")){const i=e.cloneNode(!1);n.set(i,e),He(e,i,t,r,s);const o=document.createElement("div");return o.textContent=e.getAttribute("data-placeholder-text")||"",o.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",i.appendChild(o),i}if("CANVAS"===e.tagName){const i=e.toDataURL(),o=document.createElement("img");return o.src=i,o.width=e.width,o.height=e.height,n.set(o,e),He(e,o,t,r,s),o}try{l=e.cloneNode(!1),n.set(l,e),"IMG"===e.tagName&&function(e,t){try{const r=e.currentSrc||e.src||"";if(!r)return;t.setAttribute("src",r),t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.loading="eager",t.decoding="sync"}catch{}}(e,l)}catch(Xk){throw console.error("[Snapdom] Failed to clone node:",e,Xk),Xk}if(e instanceof HTMLTextAreaElement){l.textContent=e.value,l.value=e.value;const t=e.getBoundingClientRect();return l.style.width=`${t.width}px`,l.style.height=`${t.height}px`,l}if(e instanceof HTMLInputElement&&(l.value=e.value,l.setAttribute("value",e.value),void 0!==e.checked&&(l.checked=e.checked,e.checked&&l.setAttribute("checked",""),e.indeterminate&&(l.indeterminate=e.indeterminate))),e instanceof HTMLSelectElement&&(c=e.value),He(e,l,t,r,s),e.shadowRoot){if(Array.from(e.shadowRoot.querySelectorAll("slot")).length>0){for(const t of e.shadowRoot.childNodes)if(t.nodeType===Node.ELEMENT_NODE&&"STYLE"===t.tagName){const e=t.textContent||"";e.trim()&&s&&r.set(t,e)}}else{const a=document.createDocumentFragment();for(const l of e.shadowRoot.childNodes){if(l.nodeType===Node.ELEMENT_NODE&&"STYLE"===l.tagName){const e=l.textContent||"";e.trim()&&s&&r.set(l,e);continue}const c=Xe(l,t,r,n,s,i,o||e);c&&a.appendChild(c)}l.appendChild(a)}}if("SLOT"===e.tagName){const a=e.assignedNodes?.({flatten:!0})||[],l=a.length>0?a:Array.from(e.childNodes),c=document.createDocumentFragment();for(const h of l){const a=Xe(h,t,r,n,s,i,o||e);a&&c.appendChild(a)}return c}for(const h of e.childNodes){if(a.has(h))continue;const c=Xe(h,t,r,n,s,i,o||e);c&&l.appendChild(c)}if(null!==c&&l instanceof HTMLSelectElement){l.value=c;for(const e of l.options)e.value===c?e.setAttribute("selected",""):e.removeAttribute("selected")}return l}var Ke=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Qe=[];function et(e){const t="string"==typeof e?e:"",r=[...Ke,...Qe];for(const n of r)if(n instanceof RegExp&&n.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}async function tt(e,t,r,n=32,s="#000"){t=t.replace(/^['"]+|['"]+$/g,"");const i=window.devicePixelRatio||1;await document.fonts.ready;const o=document.createElement("span");o.textContent=e,o.style.position="absolute",o.style.visibility="hidden",o.style.fontFamily=`"${t}"`,o.style.fontWeight=r||"normal",o.style.fontSize=`${n}px`,o.style.lineHeight="1",o.style.whiteSpace="nowrap",o.style.padding="0",o.style.margin="0",document.body.appendChild(o);const a=o.getBoundingClientRect(),l=Math.ceil(a.width),c=Math.ceil(a.height);document.body.removeChild(o);const h=document.createElement("canvas");h.width=l*i,h.height=c*i;const u=h.getContext("2d");return u.scale(i,i),u.font=r?`${r} ${n}px "${t}"`:`${n}px "${t}"`,u.textAlign="left",u.textBaseline="top",u.fillStyle=s,u.fillText(e,0,0),{dataUrl:h.toDataURL(),width:l,height:c}}function rt(e){return Array.from(document.styleSheets).some(t=>t.href===e)}function nt(e){return new Promise(t=>{if(rt(e))return t(null);const r=document.createElement("link");r.rel="stylesheet",r.href=e,r.setAttribute("data-snapdom","injected-import"),r.onload=()=>t(r),r.onerror=()=>t(null),document.head.appendChild(r)})}async function st(e,t,r,n,s){if(!(e instanceof Element&&t instanceof Element))return;for(const l of["::before","::after","::first-letter"])try{const n=Fe(e,l);if(!n||"function"!=typeof n[Symbol.iterator])continue;if(!("none"!==n.content||"none"!==n.backgroundImage||"transparent"!==n.backgroundColor||"none"!==n.borderStyle&&0!==parseFloat(n.borderWidth)||n.transform&&"none"!==n.transform||"inline"!==n.display))continue;if("::first-letter"===l){const i=getComputedStyle(e);if(!(n.color!==i.color||n.fontSize!==i.fontSize||n.fontWeight!==i.fontWeight))continue;const o=Array.from(t.childNodes).find(e=>e.nodeType===Node.TEXT_NODE&&e.textContent?.trim().length>0);if(!o)continue;const a=o.textContent,l=a.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u),c=l?.[0],h=a.slice(c?.length||0);if(!c||/[\uD800-\uDFFF]/.test(c))continue;const u=document.createElement("span");u.textContent=c,u.dataset.snapdomPseudo="::first-letter";const d=Te($e(n),"span",s);r.set(u,d);const p=document.createTextNode(h);t.replaceChild(p,o),t.insertBefore(u,p);continue}const i=n.content,o=/counter\s*\(|counters\s*\(/.test(i)?"- ":De(i),c=n.backgroundImage,h=n.backgroundColor,u=n.fontFamily,d=parseInt(n.fontSize)||32,p=parseInt(n.fontWeight)||!1,m=n.color||"#000",f=n.display,g=parseFloat(n.width),y=parseFloat(n.height),b=n.borderStyle,w=parseFloat(n.borderWidth),k=n.transform,v=et(u),S="none"!==i&&""!==o,C=c&&"none"!==c,x=h&&"transparent"!==h&&"rgba(0, 0, 0, 0)"!==h,I="inline"!==f&&(g>0||y>0),A=b&&"none"!==b&&w>0,E=k&&"none"!==k;if(!(S||C||x||I||A||E))continue;const O=document.createElement("span");O.dataset.snapdomPseudo=l,O.style.verticalAlign="middle";const R=Te($e(n),"span",s);if(r.set(O,R),v&&1===o.length){const{dataUrl:e,width:r,height:n}=await tt(o,u,p,d,m),s=document.createElement("img");s.src=e,s.style=`height:${d}px;width:${r/n*d}px;object-fit:contain;`,O.appendChild(s),t.dataset.snapdomHasIcon="true"}else if(o.startsWith("url(")){const t=Be(o);if(t?.trim())try{const e=document.createElement("img"),r=await qe(Ye(t),s);e.src=r,e.style=`width:${d}px;height:auto;object-fit:contain;`,O.appendChild(e)}catch(a){console.error(`[snapdom] Error in pseudo ${l} for`,e,a)}}else!v&&S&&(O.textContent=o);if(C)try{const e=Ze(c),t=await Promise.all(e.map(Pe));O.style.backgroundImage=t.join(", ")}catch(a){console.warn(`[snapdom] Failed to inline background-image for ${l}`,a)}x&&(O.style.backgroundColor=h);const M=O.childNodes.length>0||""!==O.textContent?.trim();if(!(M||C||x||I||A||E))continue;"::before"===l?t.insertBefore(O,t.firstChild):t.appendChild(O)}catch(a){console.warn(`[snapdom] Failed to capture ${l} for`,e,a)}const i=Array.from(e.children),o=Array.from(t.children).filter(e=>!e.dataset.snapdomPseudo);for(let l=0;l<Math.min(i.length,o.length);l++)await st(i[l],o[l],r,n,s)}async function it(e,t=!1,r=!1,n={}){const s=new Map,i=new WeakMap,o=new Map;let a,l="";!function(e){const t=getComputedStyle(e),r=t.outlineStyle,n=t.outlineWidth,s=t.borderStyle,i=t.borderWidth,o="none"!==r&&parseFloat(n)>0,a="none"===s||0===parseFloat(i);o&&a&&(e.style.border=`${n} solid transparent`)}(e);try{!function(e){if(!e)return;const t=new Set;if(e.querySelectorAll("use").forEach(e=>{const r=e.getAttribute("xlink:href")||e.getAttribute("href");r&&r.startsWith("#")&&t.add(r.slice(1))}),!t.size)return;const r=Array.from(document.querySelectorAll("svg > symbol, svg > defs")),n=r.filter(e=>"symbol"===e.tagName.toLowerCase()),s=r.filter(e=>"defs"===e.tagName.toLowerCase());let i=e.querySelector("svg.inline-defs-container");i||(i=document.createElementNS("http://www.w3.org/2000/svg","svg"),i.setAttribute("aria-hidden","true"),i.setAttribute("style","position: absolute; width: 0; height: 0; overflow: hidden;"),i.classList.add("inline-defs-container"),e.insertBefore(i,e.firstChild));const o=new Set;e.querySelectorAll("symbol[id], defs > *[id]").forEach(e=>{o.add(e.id)}),t.forEach(e=>{if(o.has(e))return;const t=n.find(t=>t.id===e);if(t)return i.appendChild(t.cloneNode(!0)),void o.add(e);for(const r of s){const t=r.querySelector(`#${CSS.escape(e)}`);if(t){let r=i.querySelector("defs");r||(r=document.createElementNS("http://www.w3.org/2000/svg","defs"),i.appendChild(r)),r.appendChild(t.cloneNode(!0)),o.add(e);break}}})}(e)}catch(c){console.warn("inlineExternal defs or symbol failed:",c)}try{a=Xe(e,s,i,o,t,n,e)}catch(c){throw console.warn("deepClone failed:",c),c}try{await st(e,a,s,i,t,n.useProxy)}catch(c){console.warn("inlinePseudoElements failed:",c)}if(await async function(e){if(!e)return;const t=e.querySelectorAll?e.querySelectorAll("img"):[];for(const o of t)try{const e=o.getAttribute("src")||o.currentSrc||"";if(ht(e)){const t=await at(e);o.setAttribute("src",t)}const t=o.getAttribute("srcset");if(t&&t.includes("blob:")){const e=ut(t);let r=!1;for(const t of e)if(ht(t.url))try{t.url=await at(t.url),r=!0}catch{}r&&o.setAttribute("srcset",dt(e))}}catch{}const r=e.querySelectorAll?e.querySelectorAll("image"):[];for(const o of r)try{const e="http://www.w3.org/1999/xlink",t=o.getAttribute("href")||o.getAttributeNS?.(e,"href");if(ht(t)){const r=await at(t);o.setAttribute("href",r),o.removeAttributeNS?.(e,"href")}}catch{}const n=e.querySelectorAll?e.querySelectorAll("[style*='blob:']"):[];for(const o of n)try{const e=o.getAttribute("style");if(e&&e.includes("blob:")){const t=await ct(e);o.setAttribute("style",t)}}catch{}const s=e.querySelectorAll?e.querySelectorAll("style"):[];for(const o of s)try{const e=o.textContent||"";e.includes("blob:")&&(o.textContent=await ct(e))}catch{}const i=["poster"];for(const o of i){const t=e.querySelectorAll?e.querySelectorAll(`[${o}^='blob:']`):[];for(const e of t)try{const t=e.getAttribute(o);ht(t)&&e.setAttribute(o,await at(t))}catch{}}}(a),t){const e=function(e){const t=new Set(e.values()),r=new Map;let n=1;for(const s of t)s.trim()&&r.set(s,"c"+n++);return r}(s);l=Array.from(e.entries()).map(([e,t])=>`.${t}{${e}}`).join("");for(const[t,r]of s.entries()){if("STYLE"===t.tagName)continue;if(t.getRootNode&&t.getRootNode()instanceof ShadowRoot){t.setAttribute("style",r.replace(/;/g,"; "));continue}const n=e.get(r);n&&t.classList.add(n);const s=t.style?.backgroundImage,i=t.dataset?.snapdomHasIcon;s&&"none"!==s&&(t.style.backgroundImage=s),i&&(t.style.verticalAlign="middle",t.style.display="inline")}}else for(const[h,u]of s.entries())"STYLE"!==h.tagName&&h.setAttribute("style",u.replace(/;/g,"; "));for(const[h,u]of o.entries()){const e=u.scrollLeft,t=u.scrollTop;if((e||t)&&h instanceof HTMLElement){h.style.overflow="hidden",h.style.scrollbarWidth="none",h.style.msOverflowStyle="none";const r=document.createElement("div");for(r.style.transform=`translate(${-e}px, ${-t}px)`,r.style.willChange="transform",r.style.display="inline-block",r.style.width="100%";h.firstChild;)r.appendChild(h.firstChild);h.appendChild(r)}}if(e===o.get(a)){const t=i.get(e)||window.getComputedStyle(e);i.set(e,t);const r=function(e){if(!e||"none"===e)return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(e,t)=>{const r=t.split(",").map(e=>e.trim());return 6!==r.length?`matrix(${t})`:(r[4]="0",r[5]="0",`matrix(${r.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(e,t)=>{const r=t.split(",").map(e=>e.trim());return 16!==r.length?`matrix3d(${t})`:(r[12]="0",r[13]="0",`matrix3d(${r.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}(t.transform);a.style.margin="0",a.style.position="static",a.style.top="auto",a.style.left="auto",a.style.right="auto",a.style.bottom="auto",a.style.zIndex="auto",a.style.float="none",a.style.clear="none",a.style.transform=r||""}for(const[h,u]of o.entries())"PRE"===u.tagName&&(h.style.marginTop="0",h.style.marginBlockStart="0");return{clone:a,classCSS:l,styleCache:i}}var ot=new Map;async function at(e){if(ot.has(e))return ot.get(e);const t=await fetch(e);if(!t.ok)throw new Error(`[SnapDOM] HTTP ${t.status} on blob fetch (${e})`);const r=await t.blob(),n=await new Promise((e,t)=>{const n=new FileReader;n.onloadend=()=>{const r=n.result;"string"==typeof r&&r.startsWith("data:")?e(r):t(new Error("[SnapDOM] Invalid data URL from blob"))},n.onerror=()=>t(new Error("[SnapDOM] FileReader error")),n.readAsDataURL(r)});return ot.set(e,n),n}var lt=/\bblob:[^)"'\s]+/g;async function ct(e){if(!e||-1===e.indexOf("blob:"))return e;const t=Array.from(new Set(e.match(lt)||[]));if(0===t.length)return e;let r=e;for(const n of t)try{const e=await at(n);r=r.split(n).join(e)}catch{}return r}function ht(e){return"string"==typeof e&&e.startsWith("blob:")}function ut(e){return(e||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{const t=e.match(/^(\S+)(\s+.+)?$/);return t?{url:t[1],desc:t[2]||""}:null}).filter(Boolean)}function dt(e){return e.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}async function pt(e,t={}){if(!e)throw new Error("Element cannot be null or undefined");_e.reset();const{compress:r=!0,embedFonts:n=!1,fast:s=!0,scale:i=1,useProxy:o="",localFonts:a=[]}=t;let l,c,h,u,d,p="",m="";if(({clone:l,classCSS:c,styleCache:h}=await it(e,r,n,t)),await new Promise(e=>{Le(async()=>{await async function(e,t={}){const r=Array.from(e.querySelectorAll("img")),n=async e=>{if(!e.getAttribute("src")){const t=e.currentSrc||e.src||"";t&&e.setAttribute("src",t)}e.removeAttribute("srcset"),e.removeAttribute("sizes");const r=e.src;try{const n=await qe(r,{useProxy:t.useProxy});e.src=n,e.width||(e.width=e.naturalWidth||100),e.height||(e.height=e.naturalHeight||100)}catch{const t=document.createElement("div");t.style=`width: ${e.width||100}px; height: ${e.height||100}px; background: #ccc; display: inline-block; text-align: center; line-height: ${e.height||100}px; color: #666; font-size: 12px;`,t.innerText="img",e.replaceWith(t)}};for(let s=0;s<r.length;s+=4){const e=r.slice(s,s+4).map(n);await Promise.allSettled(e)}}(l,t),e()},{fast:s})}),await new Promise(r=>{Le(async()=>{await async function(e,t,r,n={}){const s=[[e,t]],i=["background-image","mask","mask-image","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source","border-image-slice","border-image-width","border-image-outset","border-image-repeat"];for(;s.length;){const[e,t]=s.shift(),o=r.get(e)||Fe(e);r.has(e)||r.set(e,o);const a=(()=>{const e=o.getPropertyValue("border-image"),t=o.getPropertyValue("border-image-source");return e&&"none"!==e||t&&"none"!==t})();for(const r of i){if(["border-image-slice","border-image-width","border-image-outset","border-image-repeat"].includes(r)&&!a)continue;const e=o.getPropertyValue(r);if(!e||"none"===e)continue;const s=Ze(e),i=await Promise.all(s.map(e=>Pe(e,n)));i.some(e=>e&&"none"!==e&&!/^url\(undefined/.test(e))&&t.style.setProperty(r,i.join(", "))}const l=o.getPropertyValue("background-color");l&&"transparent"!==l&&"rgba(0, 0, 0, 0)"!==l&&(t.style.backgroundColor=l);const c=Array.from(e.children),h=Array.from(t.children);for(let r=0;r<Math.min(c.length,h.length);r++)s.push([c[r],h[r]])}}(e,l,h,t),r()},{fast:s})}),n&&await new Promise(e=>{Le(async()=>{p=await async function({preCached:e=!1,localFonts:t=[],useProxy:r=""}={}){if(_e.resource.has("fonts-embed-css")){if(e){const e=document.createElement("style");e.setAttribute("data-snapdom","embedFonts"),e.textContent=_e.resource.get("fonts-embed-css"),document.head.appendChild(e)}return _e.resource.get("fonts-embed-css")}const n=new Set;try{for(const e of document.fonts)"loaded"===e.status&&n.add(`${e.family}__${e.weight||"normal"}__${e.style||"normal"}`)}catch{}const s=/@import\s+url\(["']?([^"')]+)["']?\)/g,i=[];for(const c of document.querySelectorAll("style")){const e=c.textContent||"",t=Array.from(e.matchAll(s));for(const r of t){const e=r[1];et(e)||rt(e)||i.push(e)}}await Promise.all(i.map(nt));const o=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).filter(e=>e.href);let a="";for(const c of o)try{const e=await Ue(c.href,{useProxy:r}),t=await e.text();if(et(c.href)||et(t))continue;const s=/@font-face[^{}]*{[^}]*}/g;let i=t;for(const o of t.match(s)||[]){const e=o.match(/font-family:\s*([^;]+);/i);if(!e)continue;const t=e[1].replace(/['"]/g,"").trim(),s=o.match(/font-weight:\s*([^;]+);/i),a=o.match(/font-style:\s*([^;]+);/i),h=`${t}__${s?s[1].trim():"normal"}__${a?a[1].trim():"normal"}`,u=/url\((["']?)([^"')]+)\1\)/g,d=/url\(/i.test(o),p=/local\(/i.test(o);if(!d&&p)continue;if(!n.has(h)){i=i.replace(o,"");continue}let m=o;const f=Array.from(o.matchAll(u));for(const n of f){let e=Be(n[0]);if(!e)continue;let t=e;if(t.startsWith("http")||t.startsWith("data:")||(t=new URL(t,c.href).href),!et(t))if(_e.resource.has(t))_e.font.add(t),m=m.replace(n[0],`url(${_e.resource.get(t)})`);else if(!_e.font.has(t))try{const e=await Ue(t,{useProxy:r}),s=await e.blob(),i=await new Promise(e=>{const t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(s)});_e.resource.set(t,i),_e.font.add(t),m=m.replace(n[0],`url(${i})`)}catch(l){console.warn("[snapdom] Failed to fetch font resource:",t)}}i=i.replace(o,m)}a+=i+"\n"}catch(l){console.warn("[snapdom] Failed to fetch CSS:",c.href)}for(const c of document.styleSheets)try{if(!c.href||o.every(e=>e.href!==c.href))for(const e of c.cssRules)if(e.type===CSSRule.FONT_FACE_RULE){const t=e.style.getPropertyValue("src"),s=e.style.getPropertyValue("font-family");if(!t||et(s))continue;const i=e.style.getPropertyValue("font-weight")||"normal",o=e.style.getPropertyValue("font-style")||"normal",h=`${s}__${i}__${o}`,u=/url\((["']?)([^"')]+)\1\)/g,d=/local\((["']?)[^)]+?\1\)/g,p=!!t.match(u),m=!!t.match(d);if(!p&&m){a+=`@font-face{font-family:${s};src:${t};font-style:${o};font-weight:${i};}`;continue}if(!n.has(h))continue;let f=t;const g=Array.from(t.matchAll(u));for(const e of g){let t=e[2].trim();if(!t)continue;let n=t;if(n.startsWith("http")||n.startsWith("data:")||(n=new URL(n,c.href||location.href).href),!et(n))if(_e.resource.has(n))_e.font.add(n),f=f.replace(e[0],`url(${_e.resource.get(n)})`);else if(!_e.font.has(n))try{const t=await Ue(n,{useProxy:r}),s=await t.blob(),i=await new Promise(e=>{const t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(s)});_e.resource.set(n,i),_e.font.add(n),f=f.replace(e[0],`url(${i})`)}catch(l){console.warn("[snapdom] Failed to fetch font URL:",n)}}a+=`@font-face{font-family:${s};src:${f};font-style:${o};font-weight:${i};}`}}catch(l){console.warn("[snapdom] Cannot access stylesheet",c.href,l)}for(const c of document.fonts)if(c.family&&"loaded"===c.status&&c._snapdomSrc){if(et(c.family))continue;let e=c._snapdomSrc;if(!e.startsWith("data:"))if(_e.resource.has(c._snapdomSrc))e=_e.resource.get(c._snapdomSrc),_e.font.add(c._snapdomSrc);else if(!_e.font.has(c._snapdomSrc))try{const t=await Ue(c._snapdomSrc,{useProxy:r}),n=await t.blob();e=await new Promise(e=>{const t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(n)}),_e.resource.set(c._snapdomSrc,e),_e.font.add(c._snapdomSrc)}catch(l){console.warn("[snapdom] Failed to fetch dynamic font src:",c._snapdomSrc);continue}a+=`@font-face{font-family:'${c.family}';src:url(${e});font-style:${c.style||"normal"};font-weight:${c.weight||"normal"};}`}for(const c of t){if(!c||"object"!=typeof c)continue;const{family:e,src:t,weight:n="normal",style:s="normal"}=c;if(!e||!t)continue;let i=t;if(i.startsWith("data:"))_e.resource.set(t,i),_e.font.add(t);else try{const e=await Ue(t,{useProxy:r}),n=await e.blob();i=await new Promise(e=>{const t=new FileReader;t.onload=()=>e(t.result),t.readAsDataURL(n)}),_e.resource.set(t,i),_e.font.add(t)}catch(l){console.warn("[snapdom] Failed to load local font:",t);continue}a+=`@font-face{font-family:'${e}';src:url(${i});font-style:${s};font-weight:${n};}`}if(a&&(_e.resource.set("fonts-embed-css",a),e)){const e=document.createElement("style");e.setAttribute("data-snapdom","embedFonts"),e.textContent=a,document.head.appendChild(e)}return a}({localFonts:a,useProxy:o}),e()},{fast:s})}),r){const e=function(e){const t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),"function"==typeof e.querySelectorAll&&e.querySelectorAll("*").forEach(e=>t.add(e.tagName.toLowerCase())),Array.from(t))}(l).sort(),t=e.join(",");_e.baseStyle.has(t)?m=_e.baseStyle.get(t):await new Promise(r=>{Le(()=>{m=function(e){const t=new Map;for(let n of e){const e=_e.defaultStyle.get(n);if(!e)continue;const r=Object.entries(e).map(([e,t])=>`${e}:${t};`).sort().join("");t.has(r)||t.set(r,[]),t.get(r).push(n)}let r="";for(let[n,s]of t.entries())r+=`${s.join(",")} { ${n} }\n`;return r}(e),_e.baseStyle.set(t,m),r()},{fast:s})})}await new Promise(r=>{Le(()=>{const n=e.getBoundingClientRect();let s=n.width,o=n.height;const a=Number.isFinite(t.width),h=Number.isFinite(t.height),f="number"==typeof i&&1!==i;if(!f){const e=n.width/n.height;a&&h?(s=t.width,o=t.height):a?(s=t.width,o=s/e):h&&(o=t.height,s=o*e)}if(s=Math.ceil(s),o=Math.ceil(o),l.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),l.style.transformOrigin="top left",!f&&(a||h)){const e=s/n.width,t=o/n.height,r=l.style.transform||"",i=`scale(${e}, ${t})`;l.style.transform=`${i} ${r}`.trim()}const g="http://www.w3.org/2000/svg",y=document.createElementNS(g,"foreignObject");y.setAttribute("width","100%"),y.setAttribute("height","100%");const b=document.createElement("style");b.textContent=m+p+"svg{overflow:visible;}"+c,y.appendChild(b),y.appendChild(l);const w=(new XMLSerializer).serializeToString(y);d=`<svg xmlns="${g}" width="${s}" height="${o}" viewBox="0 0 ${s} ${o}">`+w+"</svg>",u=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(d)}`,r()},{fast:s})});const f=document.getElementById("snapdom-sandbox");return f&&"absolute"===f.style.position&&f.remove(),u}async function mt(e,{dpr:t=1,scale:r=1}={}){const n=new Image;n.src=e,n.crossOrigin="anonymous",n.loading="eager",n.decoding="sync";const s=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);let i=!1;if(s&&(document.body.appendChild(n),i=!0),await n.decode(),s&&await new Promise(e=>setTimeout(e,100)),0===n.width||0===n.height)throw i&&n.remove(),new Error("Image failed to load or has no dimensions");const o=n.naturalWidth*r,a=n.naturalHeight*r,l=document.createElement("canvas");l.width=Math.ceil(o*t),l.height=Math.ceil(a*t),l.style.width=`${o}px`,l.style.height=`${a}px`;const c=l.getContext("2d");return c.scale(t,t),c.drawImage(n,0,0,o,a),i&&n.remove(),l}async function ft(e,{type:t="svg",scale:r=1,backgroundColor:n="#fff",quality:s}={}){const i={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp"}[t]||"image/png";if("svg"===t){const t=decodeURIComponent(e.split(",")[1]);return new Blob([t],{type:"image/svg+xml"})}const o=await gt(e,{dpr:1,scale:r},n);return new Promise(e=>{o.toBlob(t=>e(t),`${i}`,s)})}async function gt(e,{dpr:t=1,scale:r=1},n){const s=await mt(e,{dpr:t,scale:r});if(!n)return s;const i=document.createElement("canvas");i.width=s.width,i.height=s.height;const o=i.getContext("2d");return o.fillStyle=n,o.fillRect(0,0,i.width,i.height),o.drawImage(s,0,0),i}async function yt(e,{dpr:t=1,scale:r=1,backgroundColor:n,quality:s},i="png"){const o=["jpg","jpeg","webp"].includes(i)?"#fff":void 0,a=n??o,l=await gt(e,{dpr:t,scale:r},a),c=new Image;return c.src=l.toDataURL(`image/${i}`,s),await c.decode(),c.style.width=l.width/t+"px",c.style.height=l.height/t+"px",c}async function bt(e,t={}){if(t={scale:1,...t},!e)throw new Error("Element cannot be null or undefined");return t.iconFonts&&function(e){const t=Array.isArray(e)?e:[e];for(const r of t)r instanceof RegExp?Qe.push(r):"string"==typeof r?Qe.push(new RegExp(r,"i")):console.warn("[snapdom] Ignored invalid iconFont value:",r)}(t.iconFonts),await bt.capture(e,t)}bt.capture=async(e,t={})=>{const r=await pt(e,t),n=t.dpr??(window.devicePixelRatio||1),s=t.scale||1;return{url:r,options:t,toRaw:()=>r,toImg:(e={})=>async function(e,{scale:t=1}={}){const r=new Image;return r.src=e,await r.decode(),1!==t&&(r.style.width=r.naturalWidth*t+"px",r.style.height=r.naturalHeight*t+"px"),r}(r,{scale:s,...e}),toCanvas:(e={})=>mt(r,{dpr:n,scale:s,...e}),toBlob:(e={})=>ft(r,{scale:s,...e}),toPng:(e={})=>yt(r,{dpr:n,scale:s,...e},"png"),toJpg:(e={})=>yt(r,{dpr:n,scale:s,...e},"jpeg"),toWebp:(e={})=>yt(r,{dpr:n,scale:s,...e},"webp"),download:({format:e="png",filename:t="snapDOM",backgroundColor:i,...o}={})=>async function(e,{dpr:t=1,scale:r=1,backgroundColor:n,format:s="png",filename:i="snapDOM"}={}){if("svg"===s){const t=await ft(e),r=URL.createObjectURL(t),n=document.createElement("a");return n.href=r,n.download=`${i}.svg`,n.click(),void URL.revokeObjectURL(r)}const o=["jpg","jpeg","webp"].includes(s)?"#fff":void 0,a=n??o,l=await gt(e,{dpr:t,scale:r},a),c={jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",webp:"image/webp"}[s]||"image/png",h=l.toDataURL(c),u=document.createElement("a");u.href=h,u.download=`${i}.${s}`,u.click()}(r,{dpr:n,scale:s,format:e,filename:t,backgroundColor:i,...o})}},bt.toRaw=async(e,t)=>(await bt.capture(e,t)).toRaw(),bt.toImg=async(e,t)=>(await bt.capture(e,t)).toImg(),bt.toCanvas=async(e,t)=>(await bt.capture(e,t)).toCanvas(),bt.toBlob=async(e,t)=>(await bt.capture(e,t)).toBlob(t),bt.toPng=async(e,t)=>(await bt.capture(e,t)).toPng(t),bt.toJpg=async(e,t)=>(await bt.capture(e,t)).toJpg(t),bt.toWebp=async(e,t)=>(await bt.capture(e,t)).toWebp(t),bt.download=async(e,t={})=>{const{format:r="png",filename:n="capture",backgroundColor:s,...i}=t,o=await bt.capture(e,i);return await o.download({format:r,filename:n,backgroundColor:s})};async function wt(e){const t=document.documentElement.scrollHeight,r=document.documentElement.scrollWidth,{width:n,height:s}=function(e,t){if(e<=1920&&t<=1080)return{width:e,height:t};const r=1920/e,n=1080/t,s=Math.min(r,n);return{width:Math.round(e*s),height:Math.round(t*s)}}(r,t),i=Array.from(document.styleSheets).map(e=>{try{return Array.from(e.cssRules).map(e=>e.cssText).join("")}catch(t){return""}}).join("\n"),o=document.createElement("style");o.textContent=i,e.appendChild(o);try{return(await bt.toCanvas(e,{quality:.7,width:n,height:s,exclude:[".bf-nocapture"]})).toDataURL("image/webp",.7)}finally{e.removeChild(o)}}const kt=new RegExp("((("+/(^|\.\s+)(dear|hi|hello|greetings|hey|hey there)/gi.source+")|("+/(thx|thanks|thank you|regards|best|[a-z]+ly|[a-z]+ regards|all the best|happy [a-z]+ing|take care|have a [a-z]+ (weekend|night|day))/gi.source+"\\s*[,.!]*))[\\s-]*)","gi"),vt=new RegExp("( ?(([A-Z][a-z]+)|([A-Z]\\.)))+([,.]|[,.]?$)","gm"),St=new RegExp("\\b(\\s*)(\\s*("+["aaron","abad","abarca","abbate","abbey","abbie","abbott","abby","abdullah","abel","abell","abercrombie","abernathy","abernethy","abeyta","abigail","ables","abner","abney","abraham","abrams","abramson","abrego","abreu","absher","abshire","acevedo","aceves","acker","ackerman","ackley","acklin","acord","acosta","acree","acuff","acuna","ada","adah","adair","adaline","adam","adame","adames","adams","adamski","adamson","adcock","addie","addington","addis","addison","adela","adelaida","adelaide","adele","adelia","adelina","adeline","adell","adella","adelle","adena","adina","adkins","adkinson","adkison","adkisson","adler","adorno","adria","adrian","adriana","adriane","adrianna","adrianne","adrien","adriene","adrienne","afton","agatha","agnes","agnew","agnus","agosto","agripina","aguayo","agueda","aguero","aguiar","aguila","aguilar","aguilera","aguirre","agustin","agustina","ahearn","ahern","ahlers","ahmad","ahmed","ahn","ahner","aho","ahrens","ahumada","aida","aiello","aiken","aikens","aiko","aileen","ailene","aimee","ainsworth","aisha","aitken","aja","aker","akers","akiko","akilah","akins","alaina","alaine","alan","alana","alane","alanis","alaniz","alanna","alarcon","alayna","alba","albanese","albano","albaugh","albers","albert","alberta","albertha","albertina","albertine","alberto","albertson","albin","albina","albrecht","albright","albritton","alcala","alcantar","alcantara","alcaraz","alcorn","alda","aldana","alden","alderete","alderson","aldrich","aldridge","alease","alecia","aleen","aleida","aleisha","alejandra","alejandrina","alejandro","aleman","alena","alene","alesha","aleshia","alesia","alessandra","alessi","aleta","aletha","alethea","alethia","alex","alexa","alexander","alexandra","alexandria","alexia","alexis","alfano","alfaro","alfonso","alford","alfred","alfreda","alfredia","alger","ali","alia","alica","alice","alicea","alicia","alida","alina","aline","alisa","alise","alisha","alishia","alisia","alison","alissa","alita","alix","aliza","alla","allain","allan","allard","alleen","allegra","alleman","allen","allena","allene","alleyne","allgood","allie","alline","allison","allman","allmon","allred","allyn","allyson","alma","almanza","almaraz","almazan","almeda","almeida","almeta","almonte","alona","alonso","alonzo","alpert","alston","alsup","alta","altagracia","altamirano","altha","althea","altman","alton","alva","alvarado","alvardo","alvarez","alvera","alverez","alverson","alverta","alves","alvey","alvina","alvis","alyce","alycia","alysa","alyse","alysha","alysia","alyson","alyssa","amada","amador","amal","amalia","aman","amanda","amaral","amaro","amato","amaya","amber","amberly","ambriz","ambrose","amee","amelia","america","amerson","ames","amey","amick","amie","amiee","amin","amina","amira","ammerman","ammie","amos","amparo","amundson","amy","anabel","analisa","anamaria","anastacia","anastasia","anaya","ancheta","andera","anders","andersen","anderson","anderton","andes","andino","andra","andrade","andre","andrea","andree","andres","andresen","andress","andrew","andrews","andria","andrus","anette","ange","angela","angele","angelena","angeles","angelia","angelica","angelika","angelina","angeline","angelique","angelita","angell","angella","angelo","angelyn","angie","angila","angla","anglea","anglin","anguiano","angulo","angus","anh","anika","anisa","anisha","anissa","anita","anitra","anja","anjanette","anjelica","ann","anna","annabel","annabell","annabelle","annalee","annalisa","annamae","annamaria","annamarie","anne","anneliese","annelle","annemarie","annett","annetta","annette","annice","annie","annika","annis","annita","annmarie","anselmo","ansley","anson","anthony","antionette","antoine","antoinette","anton","antonelli","antonetta","antonette","antonia","antonietta","antonina","antonio","anya","aparicio","apodaca","apolonia","aponte","appleby","applegate","appleton","applewhite","appling","apryl","aquilar","aquino","araceli","aracelis","aracely","aragon","araiza","arana","aranda","arango","araujo","arbogast","arbuckle","arce","arcelia","arceneaux","archambault","archibald","archie","archuleta","arciniega","ardath","ardelia","ardell","ardella","ardelle","ardis","ardith","ardoin","arellano","aretha","arevalo","argelia","argentina","argo","arguelles","arguello","argueta","ariana","ariane","arianna","arianne","arica","arie","ariel","arielle","arla","arlean","arleen","arlena","arlene","arletha","arletta","arlette","arlinda","arline","arlyne","armanda","armandina","armbruster","armendariz","armenta","armentrout","armes","armida","armijo","arminda","armistead","armitage","armstead","armstrong","arndt","arneson","arnett","arnetta","arnette","arnita","arnold","arnone","aronson","arredondo","arreola","arriaga","arrington","arriola","arrowood","arruda","arsenault","arteaga","arthur","artie","artis","arvilla","arvizu","arwood","arzola","asberry","asbury","asha","ashanti","ashbaugh","ashburn","ashby","ashcraft","ashe","ashely","asher","ashford","ashlea","ashlee","ashleigh","ashley","ashli","ashlie","ashly","ashlyn","ashmore","ashton","ashworth","asia","askins","asley","assunta","aston","astrid","asuncion","atchison","atchley","atencio","athena","atherton","athey","atkins","atkinson","attaway","atwater","atwell","atwood","aube","aubin","aubrey","aucoin","audet","audette","audie","audra","audrea","audrey","audria","audrie","audry","augusta","augustin","augustina","augustine","augustus","ault","aultman","aundrea","aurea","aurelia","aurora","aurore","austin","auten","autrey","autry","ava","avalos","avelar","avelina","avent","averett","averill","avery","avila","aviles","avina","avis","avril","awilda","ayako","ayala","ayana","ayanna","aycock","ayer","ayers","ayesha","ayotte","azalee","azar","azevedo","azucena","azzie","babara","babb","babcock","baber","babette","babin","babineaux","baca","bachman","backman","backus","bader","badgett","badillo","baer","baez","baeza","bagby","baggett","bagley","bagwell","bahena","bahr","baier","bailes","bailey","baillargeon","baily","bain","baines","bair","baird","baisden","bakke","bakken","bakker","balch","balcom","balderas","baldridge","baldwin","ballance","ballard","ballenger","ballentine","ballesteros","ballew","ballinger","ballou","baltazar","balzer","bambi","banas","bancroft","bankhead","bankston","bannon","banta","banuelos","bao","baptiste","barabara","barahona","barajas","baran","baranowski","barba","barbar","barbara","barbee","barbera","barbieri","barbosa","barbour","barboza","barbra","barclay","barden","bardwell","barela","barfield","barger","barham","barhorst","barkley","barksdale","barlow","barnard","barner","barnes","barnett","barnette","barnhart","barnhill","barnum","barnwell","barone","barr","barragan","barraza","barrera","barreto","barrett","barrick","barrie","barrientos","barringer","barrington","barron","barros","barry","barta","bartel","bartell","bartels","barth","bartholomew","bartlett","bartley","barto","bartz","bascom","basham","basile","basilia","basinger","baskerville","baskin","bassett","bastian","batchelder","batchelor","bateman","batey","batista","batson","battaglia","battista","batton","baty","baucom","bauer","baugh","baugher","baughman","baum","bauman","baumann","baumgardner","baumgartner","bautista","baxley","bayer","bayless","baylor","bayne","bazan","bazemore","beaird","beal","beale","beall","beals","beaman","beamon","beane","bearden","beardsley","beasley","beason","beaton","beatrice","beatris","beatriz","beattie","beatty","beaty","beauchamp","beaudette","beaudoin","beaudry","beaulah","beaulieu","beaumont","beauregard","bebe","becerra","bechtel","bechtold","becker","beckett","beckford","beckham","becki","beckie","beckley","beckman","beckner","beckwith","becky","becnel","bedard","bedford","bedwell","beebe","beecher","beeler","beem","beeman","beene","beesley","beeson","begay","beggs","begley","behling","behr","behrens","bejarano","belanger","belden","belen","belew","belia","belinda","belisle","belk","belkis","belknap","bella","bellamy","belle","beller","bellinger","bello","belton","beltran","beltz","belva","bemis","benally","benavides","benavidez","benbow","benedetto","benedict","benefield","benfield","benford","benge","benham","benita","benites","benitez","benn","benner","bennett","bennie","benning","bennington","benoit","benson","bentley","benton","bentz","benz","berard","berenice","bergen","berger","bergeron","bergin","berglund","bergman","bergmann","bergquist","bergstrom","berkey","berkley","berkowitz","berman","bermudez","berna","bernadette","bernadine","bernal","bernard","bernarda","bernardina","bernardine","bernardo","berndt","berneice","berner","bernetta","bernhardt","bernice","bernie","berniece","bernier","bernita","bernstein","berrios","berryhill","berryman","berta","bertha","bertie","bertram","bertrand","berube","beryl","bess","bessette","bessie","betancourt","beth","bethanie","bethann","bethany","bethea","bethel","bethune","betsey","betsy","bette","bettencourt","bettie","bettina","bettis","betts","betty","bettyann","bettye","betz","beula","beulah","bev","bevan","beveridge","beverlee","beverley","beverly","bevins","bevis","bewley","beyer","bianca","bianchi","bianco","bibb","bibbs","bickel","bickerstaff","bickford","biddle","bidwell","bieber","bierman","bigelow","biggers","biggerstaff","bigham","bigler","bigley","bilbrey","biller","billi","billie","billingsley","billington","billiot","billups","billy","billye","bilodeau","bilyeu","binette","binford","bingaman","bingham","binion","binkley","binns","birchfield","birdsall","birdsong","birdwell","birgit","birmingham","birnbaum","birt","bischoff","bissell","bissonnette","bitner","bittner","bivens","bivins","bixby","bixler","blackburn","blackford","blackman","blackmon","blackmore","blackshear","blackstock","blackstone","blackwell","blaine","blair","blais","blaisdell","blake","blakely","blakemore","blakeney","blakeslee","blakey","blakley","blakney","blalock","blanc","blanca","blanch","blanchard","blanche","blanchette","blanding","blaney","blankenship","blanton","blaylock","bledsoe","blevins","bloch","blodgett","blomquist","blondell","bloodworth","bloomfield","blouin","blount","bluhm","blum","blume","blumenthal","bly","blythe","boardman","boatright","boatwright","bobb","bobbi","bobbie","bobbitt","bobby","bobbye","bobette","bobo","bocanegra","boddie","boden","bodine","bodnar","boehm","boettcher","bogard","bogart","boger","boggess","boggs","bohannan","bohannon","bohn","boisvert","bojorquez","bok","boland","bolanos","bolding","boldt","bolduc","bolen","boley","bolick","bolin","boling","bolinger","bollinger","bolton","bolyard","boman","bomar","bonanno","boney","bonham","bonilla","bonin","bonita","bonnell","bonner","bonnett","bonney","bonnie","bonny","bono","booher","booker","bookout","boone","boothe","bopp","borchardt","borchers","bordeaux","bordelon","borden","boren","borg","borges","borja","borkowski","borowski","borrego","borrero","borst","bosch","bosco","bosley","bost","bostic","bostick","bostwick","boswell","bosworth","botelho","botello","bouchard","boucher","boudreau","boudreaux","bouffard","boughton","bouie","boulanger","bouldin","boulware","bourassa","bourque","bousquet","boutin","boutte","boutwell","bova","bove","bowden","bowe","bowen","bowens","bowes","bowie","bowker","bowles","bowlin","boyce","boyd","boyer","boyes","boyett","boyette","boykin","boykins","boylan","boyle","boyles","boynton","bozarth","bozeman","bracey","brackett","bracy","bradberry","bradbury","braddock","braddy","braden","bradfield","bradford","bradley","bradshaw","brady","bragdon","bragg","brainard","braithwaite","braley","bramblett","bramlett","brammer","branda","brande","brandee","brandenburg","brandes","brandi","brandie","brandon","brandt","branham","brann","brannan","brannen","brannon","branscum","branson","brantley","branton","branum","brashear","braswell","bratcher","bratton","braud","brauer","braun","brawley","brawner","braxton","brayton","brazell","braziel","breana","breann","breanna","breanne","breault","breaux","breazeale","breckenridge","bree","breeden","breedlove","breen","brehm","breland","bremer","brenda","brenna","brennan","brenneman","brenner","bresnahan","brett","bretz","breunig","brewington","brewton","brian","briana","brianna","brianne","brice","briceno","bricker","brickey","bridgeman","bridgers","bridget","bridgett","bridgette","bridgewater","brien","brigette","briggs","brigham","brigid","brigida","brigitte","briley","brinda","brinker","brinkley","brinkman","brinson","brinton","briones","brisco","briscoe","briseno","brisson","brister","bristol","bristow","britany","britney","britni","brito","britt","britta","brittain","brittaney","brittani","brittanie","brittany","britteny","brittingham","brittney","brittni","brittny","britton","broadbent","broaddus","broadnax","broadus","broadwater","brochu","brockington","brockman","brockway","broderick","brodeur","brodie","brodsky","brody","brogdon","brokaw","bromley","bronson","bronwyn","brooke","brooker","brookins","brookshire","broome","broomfield","brophy","brotherton","broughton","broussard","browder","brower","browne","brownell","brownfield","brownlee","broyles","brubaker","bruce","brumbaugh","brumfield","brumley","brummett","bruna","brundage","brune","brunelle","bruner","brunilda","brunner","bruno","bruns","brunson","bruton","bryan","bryanna","bryant","bryce","brynn","bryson","bucci","buchanan","bucher","buchholz","buckingham","buckley","buckman","buckner","budd","budde","buehler","buell","buena","bueno","buenrostro","buettner","buffington","bufford","buffy","buford","bugg","buggs","bui","buie","bula","bulah","bullard","bullen","buller","bullington","bullins","bullis","bulter","bumgardner","bumgarner","bunn","bunnell","bunton","burbank","burch","burcham","burchell","burchett","burchette","burchfield","burdett","burdette","burdick","burdine","burford","burge","burgett","burgin","burgos","burkett","burkey","burkhalter","burkhardt","burkhart","burkholder","burleigh","burleson","burlingame","burma","burmeister","burnell","burnett","burnette","burney","burnham","burrell","burress","burris","burroughs","burrus","burruss","burson","burt","burwell","busch","bushey","bushnell","bussard","busse","bussell","bussey","bustamante","bustos","butterfield","butterworth","butz","buxton","buzzell","byars","bybee","byer","byerly","byers","byington","byler","bynum","byrd","byrne","byrnes","byron","byrum","caballero","caban","cabe","cabral","cabrales","cabrera","caceres","caddell","cadena","cadwell","cady","caffey","cagle","cahill","cahoon","caine","caines","caitlin","caitlyn","calabro","calandra","calder","calderon","caldwell","calfee","calhoun","calista","callaghan","callahan","callaway","callen","callender","callie","callihan","callis","callison","calloway","calton","calvert","calvillo","calvin","calvo","calzada","camacho","camara","camarena","camargo","camarillo","cambell","camelia","camellia","cameron","cami","camie","camila","camilla","camille","camire","cammack","cammie","cammy","campbell","campuzano","canada","canaday","canady","canales","candace","candance","candelaria","candelario","candi","candice","candida","candie","candis","candler","candra","candyce","cannady","cano","cantara","cantrell","cantu","cantwell","cao","capel","capone","capps","caprice","capuano","caputo","cara","caraballo","carbajal","carbaugh","carbone","carden","cardenas","cardin","cardinale","cardona","cardoso","cardoza","cardwell","caren","carey","cargile","cargill","cari","caridad","carie","carillo","carin","carina","carisa","carissa","carita","carl","carla","carlee","carleen","carlena","carlene","carleton","carletta","carley","carli","carlie","carlile","carlin","carline","carlisle","carlita","carlo","carlos","carlota","carlotta","carlsen","carlson","carlton","carly","carlyle","carlyn","carma","carmack","carman","carmel","carmela","carmelia","carmelina","carmelita","carmella","carmen","carmichael","carmina","carmody","carmon","carmona","carnahan","carner","carnes","caro","carola","carolann","carole","carolee","carolin","carolina","caroline","caroll","carolyn","carolyne","carolynn","caron","carothers","caroyln","carpio","carranza","carrasco","carrasquillo","carreno","carreon","carrera","carrero","carri","carrico","carrie","carrigan","carrillo","carrington","carrizales","carrol","carroll","carruth","carruthers","carson","carswell","cartagena","cartier","carty","caruso","caruthers","carvajal","carvalho","cary","caryl","carylon","caryn","casandra","casanova","casares","casarez","casavant","cascio","casey","cashman","casiano","casias","casie","casillas","casimira","caskey","cason","casper","cass","cassady","cassandra","cassaundra","cassel","cassell","cassey","cassi","cassidy","cassie","cassity","cassondra","cassy","castaneda","castano","castanon","casteel","castellano","castellanos","castello","castillo","castleberry","castleman","casto","caston","castorena","castro","caswell","catalan","catalano","catalina","catarina","caterina","catharine","cathcart","catherin","catherina","catherine","cathern","catheryn","cathey","cathi","cathie","cathleen","cathrine","cathryn","cathy","catina","catlett","catlin","cato","caton","catrice","catrina","catron","caudell","caudill","cauley","caulfield","cauthen","cavanaugh","cavazos","cavender","cavin","caviness","cawley","cawthon","cayla","caylor","cazares","ceasar","ceballos","cecelia","cecil","cecila","cecile","cecilia","cecille","cecily","cedeno","cedillo","ceja","celena","celesta","celeste","celestina","celestine","celia","celina","celinda","celine","celsa","centeno","ceola","cepeda","cerda","cervantes","cervantez","chabot","chacon","chadwell","chadwick","chae","chaffee","chaffin","chafin","chaisson","chalfant","chalmers","chamberlain","chamberlin","chamblee","chambless","chambliss","chamness","champlin","chan","chana","chanda","chandra","chanel","chanell","chanelle","chaney","chang","chantal","chantay","chante","chantel","chantell","chantelle","chao","chapa","chaparro","chapin","chaplin","chappell","chapple","chara","charbonneau","charest","charette","charis","charise","charissa","charisse","charita","charla","charland","charleen","charlena","charlene","charles","charlesetta","charlette","charley","charlie","charline","charlott","charlotte","charlsie","charlton","charlyn","charmain","charmaine","charolette","charron","chartier","chasidy","chasity","chassidy","chastain","chasteen","chatham","chatman","chau","chavarria","chavers","chaves","chavez","chavira","chavis","chaya","cheatham","chee","chelsea","chelsey","chelsie","chen","chenault","cheney","cheng","chenoweth","cher","chere","cheree","cherelle","cheri","cherie","cherilyn","cherise","cherly","cherlyn","cherri","cherrie","cherryl","chery","cheryl","cheryle","cheryll","chesser","chesson","chester","cheung","chewning","cheyenne","chiang","chidester","chieko","childers","childress","childs","chilton","ching","chinn","chipman","chiquita","chisholm","chism","chisolm","chitwood","chiu","chloe","cho","choate","choe","choi","chong","chouinard","chris","chrisman","chrissy","christ","christa","christal","christeen","christel","christen","christena","christene","christensen","christenson","christi","christia","christian","christiana","christiane","christiansen","christianson","christie","christin","christina","christine","christinia","christman","christmas","christner","christopher","christopherso","christy","chronister","chrystal","chu","chun","chung","churchill","churchwell","ciara","cicely","ciera","cierra","cimino","cinda","cinderella","cindi","cindie","cindy","cinthia","cintron","cioffi","cira","cisneros","claar","claiborne","clair","claire","clancy","clanton","clapp","clara","clardy","clare","clarence","claretha","claretta","claribel","clarice","clarinda","clarine","claris","clarisa","clarissa","clarita","clark","clarke","clarkson","classie","claude","claudette","claudia","claudie","claudine","claudio","claus","clausen","claussen","clawson","claxton","claycomb","claypool","claypoole","clayton","claytor","cleary","clegg","cleghorn","cleland","clelia","clemencia","clemens","clemente","clementina","clementine","clements","clemmer","clemmie","clemmons","clemons","cleo","cleopatra","cleora","cleotilde","cleta","cleveland","clevenger","clifford","clifton","clinkscales","clinton","cloninger","clora","clorinda","clotilde","clouse","cloutier","clower","clowers","cloyd","cluff","clyburn","clyde","clymer","coakley","coan","coates","cobos","coburn","cochran","cochrane","cockerham","cockrell","codi","cody","coe","coelho","coen","cofer","coffelt","coffey","coffman","cofield","cogan","coggins","cogswell","cohen","cohn","coker","colangelo","colbert","colburn","colby","coldiron","coleen","colella","coleman","colene","coletta","colette","collado","collazo","colleen","collen","collene","collett","collette","colletti","colley","collin","collins","collinsworth","collum","colman","colombo","colquitt","colson","colston","colton","colucci","colunga","colvin","colwell","comeau","comeaux","compton","comstock","conant","conaway","concepcion","concetta","concha","conchita","conde","condon","congdon","conklin","conley","conlin","conlon","connally","connell","connelly","connie","connolly","connor","connors","conover","conrad","conroy","constance","constantine","constantino","consuela","consuelo","contessa","conti","contreras","conway","conwell","conyers","cooke","cooksey","cookson","cooley","coolidge","coomer","cooney","copeland","copenhaver","copley","coppage","coppola","cora","coralee","coralie","corazon","corbett","corbin","corbitt","corcoran","cordeiro","cordelia","cordell","corder","cordero","cordes","cordia","cordie","cordoba","cordova","coreen","corene","coretta","corey","cori","corie","corina","corine","corinna","corinne","corley","corliss","cormier","cornejo","cornelia","cornelison","cornelius","cornell","cornish","cornwell","coronado","coronel","corpuz","corr","corrales","correa","correia","correll","corrie","corrigan","corrin","corrina","corrine","corrinne","corriveau","corson","cortes","cortese","cortez","cortney","corum","corwin","cory","cosby","cosentino","cosgrove","cosme","cosper","costanzo","costello","coston","cota","cothran","cotten","cottingham","cottle","cotto","cottrell","cottrill","coughlin","coulombe","coulson","courson","courtney","covarrubias","covington","cowart","cowden","cowell","cowen","cowgill","cowles","cowley","coyle","coyne","cozart","crabb","crabtree","craddock","crafton","craighead","crain","cramer","crampton","crandall","crandell","cranford","crawford","crawley","crayton","creech","creekmore","creighton","crenshaw","creola","crespo","creswell","cribb","cribbs","crider","crigger","crim","criner","crippen","cris","criselda","criss","crissman","crissy","crist","crista","cristal","cristen","cristi","cristie","cristin","cristina","cristine","cristy","criswell","crites","crittenden","crocker","crockett","cromer","cromwell","cronin","croom","crosby","crossland","crossley","crossman","crosson","croteau","crotty","crowe","crowell","crowl","crowley","crowson","crowther","croy","cruce","crum","crumley","crumpler","crumpton","crutcher","crutchfield","cruz","crysta","crystle","cuc","cuellar","cuevas","culbertson","culbreth","cullen","culley","cullum","culp","culpepper","cumming","cummings","cundiff","cunha","cunningham","cuomo","cupp","curcio","cureton","curiel","curley","curran","currey","currin","curtin","curtis","curtiss","cusack","cushing","cushman","cusick","custer","cuthbertson","cutright","cutshall","cyndi","cyndy","cynthia","cyr","cyrstal","cyrus","cythia","dabbs","dabney","dacia","dacosta","dade","daggett","dagmar","dagny","dagostino","dahlberg","dahlgren","dahlia","daigle","dail","dailey","daina","daine","daisey","dakota","dale","dalene","dalessandro","dalessio","daley","dalia","dalila","dallas","dalrymple","dalton","daly","damaris","damato","dambrosio","dameron","damian","damiano","damico","damon","dampier","damron","dan","dana","danae","dancy","dandrea","dandridge","danelle","danette","danford","danforth","dangelo","dangerfield","dani","dania","danica","daniel","daniela","daniele","daniell","daniella","danielle","daniels","danielson","danika","danille","danita","danley","dann","danna","danner","dannette","dannie","dannielle","dansby","dantzler","danuta","danyel","danyell","danyelle","dao","daphine","daphne","dara","darby","darcel","darcey","darci","darcie","darcy","dardar","darden","daria","darla","darleen","darlena","darlene","darline","darnell","darr","darrow","daryl","dashiell","dasilva","daugherty","daughtry","daves","davey","david","davida","davidson","davie","davies","davila","davina","davis","davison","davisson","davy","dawes","dawkins","dawna","dawne","dawson","daye","dayle","dayna","daysi","dayton","deadra","deana","deanda","deandra","deandrea","deane","deangelis","deangelo","deann","deanna","deanne","dearborn","dearing","dearman","deas","deason","deaton","deaver","deb","debbi","debbie","debbra","debby","debera","deberry","debi","deboer","debora","deborah","debose","debra","debrah","debroah","decarlo","decastro","deckard","decosta","decoteau","dede","dedra","dee","deeann","deeanna","deedee","deedra","deegan","deel","deen","deena","deering","deese","deetta","defazio","defelice","degraw","degroot","deguzman","dehart","dehaven","deherrera","deidra","deidre","deirdre","deitz","deja","dejesus","dejong","delacruz","delafuente","delagarza","delaine","delana","delancey","delaney","delano","delao","delapaz","delarosa","delatorre","delcie","delena","deleon","delfina","delgadillo","delgado","delia","delicia","delila","delilah","delinda","delisa","delisle","delk","dell","della","dellinger","delma","delmy","deloach","delois","deloise","delong","delora","deloras","delorenzo","delores","deloris","delorse","delossantos","delozier","delp","delpha","delphia","delphine","delrio","delrosario","delsie","deltoro","deluca","deluna","delvalle","delvecchio","demarco","demars","demello","demers","demetra","demetria","demetrice","demetrius","deming","demoss","dempsey","dena","denae","dendy","deneen","denese","denham","denice","denis","denise","denisha","denison","denisse","denita","denman","denna","dennard","denney","dennis","dennise","dennison","denny","densmore","denson","denton","denyse","deon","deonna","depalma","depew","depriest","derosa","derose","derosier","derouen","derr","derryberry","desai","desalvo","desantis","desilva","desimone","desirae","desiree","desjardins","desmarais","desmond","desouza","despain","despina","desrochers","desrosiers","dessie","destefano","detra","detwiler","deutsch","devaney","devaughn","devault","dever","deville","devin","devine","devito","devlin","devoe","devon","devona","devora","devorah","devore","devries","dewberry","deweese","dewey","deyo","deyoung","dia","dian","diana","diane","diann","dianna","dianne","dias","diaz","dicarlo","dicken","dickenson","dickerson","dickinson","dickman","dickson","diedra","diedre","diego","diehl","diep","dierdre","dietrich","dietz","diez","diggins","diggs","digiacomo","digiovanni","digna","dillard","diller","dilley","dillingham","dillion","dillman","dillon","dillow","dilorenzo","dilworth","dimaggio","dimarco","dimmick","dina","dinah","dineen","dingess","dingman","dinh","dinkins","dinorah","dinsmore","dion","dione","dionna","dionne","diorio","dipietro","dishman","dismuke","disney","distefano","dittman","dittmer","divina","dix","dixie","dixon","dixson","dizon","doak","doan","doane","dobbs","dobson","doby","dockery","dodd","dodds","dodie","dodson","doering","doerr","doggett","doherty","doiron","dolan","dollie","dolores","doloris","dombrowski","domenica","dominga","domingo","dominguez","dominica","dominick","dominique","dominque","dominquez","domitila","domonique","dona","donahue","donald","donaldson","donato","donegan","donella","donelson","donetta","donette","doney","donita","donley","donna","donnell","donnelly","donner","donnetta","donnette","donnie","donofrio","donohoe","donohue","donovan","donya","doody","dooley","doolittle","dora","doran","dorathy","dorcas","dore","doreatha","doreen","dorene","doretha","dorethea","doretta","dori","doria","dorian","dorie","dorinda","dorine","doris","dorla","dorman","dorn","dorotha","dorothea","dorothy","dorris","dorsett","dorsey","dortch","dortha","dorthea","dorthey","dorthy","dorton","dostie","dotson","dottie","dotty","doucette","doud","dougherty","douglas","douglass","dovie","dowdell","dowden","dowell","dowling","downes","downey","doyle","doyon","drayton","dreama","dreher","drema","drennan","drennen","dressler","drews","dreyer","driggers","driscoll","driskell","drouin","drucilla","drumm","drummond","drury","drusilla","dryden","drye","duarte","dube","dubois","dubose","ducharme","duckett","duckworth","duclos","duda","dudek","dudley","duenas","duffey","duffy","dufour","dufrene","dufresne","dugan","dugas","duggan","dugger","duggins","duhon","dulaney","dulce","dulcie","duley","dulin","dumont","dunagan","dunaway","dunbar","duncan","dunford","dungan","dunham","dunigan","dunkin","dunkle","dunlap","dunleavy","dunlop","dunn","dunne","dunson","dunston","dunton","duong","duplessis","dupont","dupre","dupree","duprey","dupuis","duque","duquette","duran","durand","durante","durbin","durden","duren","durfee","durham","durkee","durkin","duron","durr","durrett","dusti","dustin","dutcher","dutra","dutton","duval","duvall","dvorak","dwana","dwyer","dyan","dykstra","dyson","eaddy","eades","eads","eady","eagan","eakin","eakins","eames","eanes","earle","earlean","earleen","earlene","earley","earlie","earline","earnestine","earp","eartha","easley","eason","easterday","eastman","easton","eastwood","eatmon","eaton","eberhardt","eberle","eberly","ebersole","ebert","ebner","eboni","ebonie","eby","eccles","echevarria","echeverria","echols","eck","eckard","eckenrode","ecker","eckert","eckhardt","ecklund","eckman","eckstein","eda","edda","eddie","eddings","eddington","eddins","edelman","edelmira","edelstein","eden","edens","edgar","edgerton","edgington","edie","edington","edison","edith","edmiston","edmond","edmonds","edmondson","edmonson","edmunds","edmundson","edna","edra","edris","edson","edward","edwards","edwina","edyth","edythe","effie","egan","egbert","eggert","eggleston","ehlers","ehrlich","ehtel","eichelberger","eicher","eichhorn","eichler","eidson","eiland","eileen","eilene","eisele","eisenberg","eklund","ela","eladia","elaina","elaine","elam","elana","elane","elanor","elayne","elba","elbert","elda","eldora","eldred","eldredge","eldridge","eleanor","eleanora","eleanore","elease","elena","elene","eleni","elenor","elenora","elenore","eleonor","eleonora","eleonore","eley","elfreda","elfrieda","elfriede","elgin","elia","eliana","elias","eliason","elicia","elida","elidia","elin","elina","elinor","elinore","elisa","elisabeth","elise","elisha","elissa","eliz","eliza","elizabet","elizabeth","elizbeth","elizebeth","elizondo","elke","elkins","ella","ellamae","ellan","elledge","ellen","ellena","ellender","eller","elli","ellie","ellinger","ellingson","ellington","elliot","elliott","ellis","ellison","ellsworth","elly","ellyn","elma","elmer","elmira","elmore","elna","elnora","elodia","elois","eloisa","eloise","elouise","elrod","elsa","elsie","elson","elston","elswick","elsy","elva","elvera","elvia","elvie","elvina","elvira","elwanda","elwell","elwood","ely","elyse","elza","ema","emanuel","embree","embrey","embry","emelda","emelia","emelina","emeline","emely","emerick","emerita","emerson","emiko","emilee","emilia","emilie","emily","emma","emmaline","emmert","emmett","emmie","emmons","emmy","emogene","emory","emrich","emrick","encarnacion","enciso","enda","endicott","endres","endsley","enedina","eneida","eng","engel","engelhardt","england","engle","engleman","engler","englert","english","engstrom","enid","enloe","ennis","enoch","enola","enos","enright","enriqueta","enriquez","ensor","epifania","epley","epperson","epps","epstein","erb","erdman","erdmann","eric","erica","ericka","erickson","ericson","erika","erin","erinn","erlene","erlinda","erline","erma","ermelinda","erminia","erna","ernest","ernestina","ernestine","ernst","erskine","ervin","erwin","eryn","escalante","escalera","escamilla","escobar","escobedo","eshelman","eskew","eskridge","eslinger","esmeralda","esparza","esperanza","espinal","espino","espinosa","espinoza","esposito","esqueda","esquibel","esquivel","essary","essex","essie","esta","estabrook","estefana","estela","estell","estella","estelle","estep","ester","estes","estevez","esther","estrada","estrella","etha","ethel","ethelene","ethelyn","etheridge","ethridge","ethyl","etienne","etsuko","etta","etter","ettie","eubank","eubanks","eudy","eufemia","eugena","eugene","eugenia","eugenie","eulah","eulalia","eun","euna","eunice","eura","eure","eusebia","eustolia","eva","evalyn","evan","evangelina","evangeline","evangelista","evans","eveland","evelia","evelin","evelina","eveline","evelyn","evelyne","evelynn","evenson","everett","everette","everhart","evers","eversole","everson","evette","evia","evie","evita","evon","evonne","ewa","ewald","ewell","ewing","exie","exum","eyler","ezell","ezzell","faber","fabian","fabiola","fabrizio","fagan","fahey","fairbanks","fairchild","faircloth","fairfield","fairley","faison","fajardo","falco","falcone","falgoust","falgout","falk","falkner","fallon","fancher","fanelli","fann","fannie","fannin","fanny","fant","farah","farber","faria","farias","faris","farkas","farley","farnham","farnsworth","farr","farrah","farrar","farrell","farrington","farris","farwell","fasano","fassett","fatima","fatimah","faucher","faught","faulk","faulkner","faust","faustina","faviola","fawcett","faye","fazio","featherston","featherstone","fecteau","feder","federico","feeley","feeney","fehr","feinberg","feinstein","felder","feldman","felecia","felica","felice","felicia","feliciano","felicidad","felicita","felicitas","felipa","felipe","felisa","felisha","felix","felker","feltner","felton","fenderson","fendley","fenn","fennell","fenner","fenske","fenton","fenwick","ferebee","ferguson","ferland","fermina","fernanda","fernande","fernandes","fernandez","fernando","ferne","ferrante","ferrari","ferraro","ferree","ferreira","ferrell","ferrer","ferretti","ferri","ferrin","ferris","ferro","fessler","fewell","fick","fidela","fidelia","fidler","fiedler","fierro","fifield","figueroa","fike","fikes","fillmore","filomena","fincher","findlay","findley","finke","finkelstein","finkle","finlay","finley","finn","finnegan","finnell","finney","fiona","fiore","fischer","fiscus","fishman","fiske","fite","fitz","fitzgerald","fitzhugh","fitzpatrick","fitzsimmons","fitzwater","flagg","flaherty","flanagan","flanders","flanigan","flannery","flatt","flavia","fleenor","fleetwood","fleischer","fleischman","flemming","fleta","flickinger","flinn","florance","florencia","florene","florentina","flores","floretta","florez","floria","florinda","florine","florio","florrie","flossie","flournoy","floy","floyd","fluellen","fluker","flynn","flynt","fogarty","fogel","fogg","foley","follett","folse","folsom","foltz","fonda","fong","fonseca","fontaine","fontana","fontanez","fontenot","fontes","foote","foran","forbes","forbis","forcier","forde","fordham","foret","forman","forney","forrest","forrester","forsberg","forster","forsyth","forsythe","fortenberry","fortier","fortin","fortner","fortney","fortson","fortuna","fortunato","foti","fournier","foust","fouts","fowlkes","foxworth","frady","fraga","fraley","frampton","fran","france","francene","frances","francesca","franchesca","francie","francina","francine","francis","francisca","francisco","franck","franco","francois","francoise","franke","frankel","frankie","franko","fransisca","frantz","franz","franzen","fraser","frasier","frausto","frawley","frazee","frazer","frazier","frechette","fred","freda","fredda","freddie","frederica","frederick","fredericka","fredericks","frederickson","fredette","fredia","fredrick","fredricka","fredrickson","freeda","freeland","freese","fregoso","freida","freitag","freitas","fretwell","freund","frey","frias","frick","fricke","frida","friday","frieda","friedman","friedrich","friel","frierson","friesen","frink","frisbee","frisbie","frisby","frisch","fritts","fritz","frizzell","froehlich","fromm","fruge","frye","fuchs","fuentes","fugate","fuhrman","fujimoto","fulbright","fulcher","fulford","fulk","fulkerson","fulks","fullerton","fullmer","fulmer","fulton","fults","fultz","fumiko","funches","funderburk","fung","funke","funkhouser","fuqua","furman","furr","furst","furtado","fusco","fussell","futch","futrell","fye","gabel","gabriel","gabriela","gabriele","gabriella","gabrielle","gaddis","gaddy","gadson","gaffney","gagliano","gagliardi","gagne","gagnon","gailey","gaines","gainey","gaitan","gaither","galan","galarza","galbraith","galbreath","galicia","galina","galindo","gallagher","gallaher","gallardo","gallaway","gallego","gallegos","galligan","gallion","gallman","gallo","galloway","gallup","galvan","galvez","galvin","gamache","gambill","gamboa","gambrell","gamez","gandy","gann","gannon","gantt","gantz","gaona","garay","garber","garcia","gard","gardiner","gardner","garfield","garibay","garica","garman","garmon","garnet","garnett","garofalo","garrard","garretson","garrett","garrick","garrido","garris","garrity","garrow","garry","gartner","garton","garver","garvey","garvin","gary","garza","gasaway","gaskill","gaspar","gaspard","gass","gassaway","gastelum","gaston","gatewood","gatlin","gatling","gattis","gatto","gaudet","gaudette","gaudreau","gaughan","gaul","gause","gauthier","gauvin","gavin","gayden","gaye","gayla","gayle","gaylene","gaylor","gaylord","gaynell","gaynelle","gaynor","gaytan","gayton","gearhart","gearldine","geary","gebhardt","gebhart","geddes","geer","gehring","gehrke","geier","geiger","geis","geisler","gelinas","geller","gema","gendron","genevie","genevieve","genevive","genia","genna","gennie","genny","genovese","genoveva","georgann","george","georgeann","georgeanna","georgene","georgetta","georgette","georgia","georgiana","georgiann","georgianna","georgianne","georgie","georgina","georgine","gerald","geraldine","geralyn","gerard","gerber","gerda","gerdes","gerena","gerhardt","gerhart","geri","gerlach","germaine","germany","gerri","gerry","gertha","gertie","gertrud","gertrude","gertrudis","gertude","gervais","geter","getty","getz","geyer","ghislaine","gholston","gia","gianna","gibb","gibbs","gibson","giddens","giddings","gideon","gidget","giese","giffin","gifford","gigi","giglio","giguere","gil","gilberte","gilbertson","gilbreath","gilchrist","gilda","gile","giles","gilkey","gillam","gillard","gillen","gillenwater","gilles","gillespie","gillett","gillette","gilley","gilliam","gillian","gilliard","gilligan","gilliland","gillis","gillispie","gillman","gillum","gilma","gilman","gilmer","gilmore","gilpin","gilreath","gilroy","gilson","gilstrap","gina","ginder","ginette","gingerich","gingras","gingrich","ginny","ginsberg","ginter","giordano","giovanna","gipson","girard","giroux","gisela","gisele","giselle","gish","gita","gittens","giuseppina","givens","gladis","gladney","gladstone","glady","gladys","glaser","glasgow","glasper","glasscock","glasser","glayds","gleason","glenda","glendora","glenn","glenna","glennie","glennis","glick","glidden","glidewell","glinda","glisson","gloria","gluck","glynda","glynis","glynn","gober","goble","godbey","goddard","godfrey","godin","godinez","godoy","godsey","godwin","goebel","goetz","goforth","goines","goins","golda","goldberg","goldfarb","golding","goldman","goldsberry","goldstein","gomes","gomez","gonsalez","gonsalves","gonzales","gonzalez","gooch","goodale","goodall","goode","goodell","gooden","goodin","gooding","goodloe","goodnight","goodrich","goodrum","goodsell","goodson","goodwin","goolsby","gordan","gordon","gordy","goree","gorham","gorman","gormley","gorski","gorton","goshorn","gosnell","goss","gosselin","gossett","gott","gottlieb","gottschalk","gough","gould","goulet","gourley","gouveia","govan","gove","govea","gowen","gower","goyette","graber","grabowski","gracia","gracie","graciela","grady","graf","graff","grafton","gragg","graham","grajeda","grammer","granado","granados","grantham","granville","grasso","grau","gravitt","gravois","graybill","grayce","grayson","graziano","grazyna","greathouse","greco","greeley","greenberg","greene","greenhaw","greenlaw","greenleaf","greenlee","greenwald","greenway","greenwell","greer","greeson","gregg","gregoire","gregor","gregoria","gregorio","gregory","greig","greiner","grenier","gresham","greta","gretchen","gretta","gricelda","grider","grieco","griego","grier","griffen","griffey","griffis","griffith","griffiths","grigg","griggs","grigsby","grijalva","grillo","grimaldi","grimaldo","grimm","grimmett","grimsley","grindle","griner","grisby","grisel","griselda","grisham","grissom","griswold","groce","groff","grogan","groh","grose","grossman","grosso","groth","grover","grubb","grubbs","grube","gruber","grundy","guadalupe","guajardo","guardado","guarino","guay","gudrun","guenther","guerin","guerra","guerrero","guertin","guevara","guffey","guido","guidry","guilford","guillen","guillermina","guillermo","guillory","guillot","guimond","guinn","gulick","gulledge","gullett","gumm","gump","gunderson","gunn","gunther","gupta","gupton","gurley","gurrola","gurule","gusman","gussie","gustafson","gustin","guth","guthrie","gutierrez","gutshall","guyer","guyette","guyton","guzman","gwen","gwenda","gwendolyn","gwenn","gwin","gwinn","gwyn","gwyneth","haag","haas","haase","haber","haberman","hackett","hackman","hackworth","haddad","haddix","hadfield","hadley","hadlock","hae","hafer","haffner","hafner","haga","hagan","hagans","hagar","hage","hageman","hagen","hager","hagerman","hagerty","haggerty","hagler","hagood","hague","hagy","hahn","haigh","haight","haile","hailey","haines","haire","hairston","halcomb","hales","haley","halford","halina","halle","haller","hallett","halley","halliburton","halliday","hallie","hallman","hallock","halloran","hallowell","halpern","halpin","halsey","halstead","halverson","halvorsen","halvorson","hamann","hamblin","hambrick","hamby","hamel","hamer","hamill","hamilton","hamlett","hamlin","hamm","hammack","hamman","hammel","hammett","hammon","hammond","hammonds","hammons","hamner","hampson","hampton","hamrick","han","hana","hancock","handley","hanes","haney","hanh","hanke","hankins","hanley","hanlon","hann","hanna","hannah","hannan","hannelore","hanner","hannigan","hannon","hanrahan","hans","hansen","hanson","harbaugh","harber","harbin","harbison","hardaway","hardcastle","hardee","hardeman","hardesty","hardie","hardiman","hardin","harding","hardison","hardman","hardnett","hardwick","hargett","hargis","hargrave","hargrove","harker","harkey","harkins","harkness","harlan","harless","harley","harlow","harmon","harner","harney","haro","harold","harr","harrell","harrelson","harriet","harriett","harriette","harrigan","harriman","harrington","harris","harrison","harrod","harrold","harter","hartfield","hartford","hartle","hartley","hartman","hartmann","hartnett","hartsell","hartsfield","hartsock","hartung","hartwell","hartwig","harty","hartz","hartzell","hartzog","harvell","harvey","harville","harvin","harwell","harwood","hashimoto","haskell","haskins","hass","hassan","hassell","hassett","hassie","hassler","hasson","hatchett","hatfield","hathaway","hathcock","hathorn","hatley","hatten","hattie","hatton","hauck","haug","haugen","haun","haupt","hauser","havard","haviland","hawes","hawkes","hawkins","hawkinson","hawley","hawn","haworth","hawthorne","hayashi","haydee","hayden","haydon","hayes","haygood","hayley","hayman","hayner","haynes","haynie","haywood","hazelton","hazelwood","hazen","hazlett","hazzard","headley","headrick","healey","healy","heaney","hearn","hearne","heather","heatherly","heaton","hebert","hecht","hecker","heckman","hedden","hedgepeth","hedrick","hedwig","hedy","hee","heffernan","heffner","heflin","hefner","hegarty","heide","heidi","heidy","heike","heil","heilman","heim","hein","heine","heinrich","heins","heintz","heinz","heise","heiser","heisler","helaine","helen","helena","helene","helfrich","helga","helgeson","hellen","hellman","helman","helmer","helmick","helmuth","helton","helwig","hembree","hemingway","hemphill","hendershot","henderson","hendley","hendon","hendren","hendrick","hendricks","hendrickson","hendrix","hendry","henke","henkel","henley","hennessey","hennessy","henninger","henrietta","henriette","henriques","henriquez","henry","hensel","henshaw","hensley","henson","henton","hepburn","hepler","hepner","herbert","herbst","heredia","hereford","herlinda","herma","herman","hermann","hermelinda","hermes","hermila","hermina","hermine","herminia","hermosillo","hernadez","hernandes","hernandez","herndon","herod","herold","herr","herren","herrera","herrick","herrin","herrington","herrmann","herrod","herron","hersey","hersh","hershberger","hershey","herta","hertel","hertha","herzog","hess","hesse","hesson","hester","hetrick","hettie","hetzel","heuer","hewett","hewitt","hewlett","heyer","heyward","heywood","hiatt","hibbard","hibbert","hibbler","hibbs","hickerson","hickman","hickok","hickox","hickson","hiedi","hien","hiers","higa","higbee","higdon","higginbotham","higgins","higgs","highsmith","hightower","higley","hilaria","hilary","hilbert","hilburn","hilda","hilde","hildebrand","hildebrandt","hildegard","hildegarde","hildred","hildreth","hileman","hiles","hillard","hillary","hiller","hilliard","hillis","hillman","hillyer","hilma","hilton","himes","hinckley","hindman","hine","hines","hinkle","hinkley","hinman","hinojosa","hinrichs","hinshaw","hinson","hinton","hintz","hinz","hipp","hiroko","hirsch","hirst","hisako","hitchcock","hite","hitt","hix","hixon","hixson","hoa","hoag","hoagland","hoang","hobart","hobbs","hobson","hoch","hochstetler","hockenberry","hockett","hodge","hodges","hodgkins","hodgson","hodson","hoekstra","hoelscher","hoey","hofer","hoff","hoffer","hoffman","hoffmann","hofmann","hoggard","hogue","holbert","holbrook","holcomb","holcombe","holguin","holifield","holladay","hollander","hollar","hollenbeck","holley","holli","holliday","hollie","hollifield","holliman","hollinger","hollingshead","hollingsworth","hollins","hollis","hollister","holloman","holloway","hollowell","holman","holmberg","holmes","holmgren","holmquist","holsinger","holst","holstein","holston","holter","holton","holtz","holzer","hom","homan","honaker","honea","honeycutt","hoopes","hooten","hopkins","hoppe","hopson","horan","hord","horgan","hornback","hornbeck","horne","hornsby","horowitz","horrocks","horsley","horta","hortencia","hortense","hortensia","horton","horvath","hosey","hoskins","hosmer","hostetler","hostetter","hotchkiss","houchens","houck","houghton","houk","houle","houlihan","householder","houser","housley","housman","houston","hovey","hovis","howard","howarth","howell","howells","hower","howerton","howie","howland","howlett","howse","howze","hoye","hoyle","hoyos","hoyt","hsiu","hsu","hua","huang","hubbard","hubbell","hubble","hubbs","huber","hubert","huckaby","hudak","huddleston","hudgens","hudgins","hudnall","hudson","hudspeth","huebner","huerta","huertas","huey","huffman","hufford","huggins","hughes","hughey","hughs","hui","huie","hulbert","hulda","hulett","hulse","hulsey","humbert","hume","humes","humphrey","humphreys","humphries","hundley","huneycutt","hungerford","hunley","hunnicutt","hunsaker","huntington","huntley","huong","hupp","hurd","hurlburt","hurtado","huskey","hussey","husted","huston","hutchens","hutcherson","hutcheson","hutchings","hutchins","hutchinson","hutchison","huth","hutson","hutt","hutto","hutton","huynh","hwa","hwang","hyacinth","hyatt","hyde","hyden","hyder","hye","hyland","hylton","hyman","hynes","hyo","hyon","hysell","hyun","ibanez","ibarra","ibrahim","ickes","idell","idella","iesha","iglesias","ignacia","ilana","ilda","ileana","ileen","ilene","iliana","ilona","ilse","iluminada","imelda","imes","imhoff","imogene","india","indira","inell","ines","inez","inga","ingalls","ingeborg","ingersoll","ingham","ingraham","ingrid","inman","inocencia","iona","ione","ira","iraida","irby","ireland","irena","irene","irick","irina","irish","irizarry","irma","irmgard","irvin","irvine","irving","irwin","iryna","isa","isaac","isaacs","isaacson","isabel","isabell","isabella","isabelle","isadora","isaura","isbell","isela","isenberg","isham","isidra","isis","islas","isley","isobel","isom","ison","israel","ito","ivana","ivelisse","iverson","ives","ivette","ivey","ivie","ivonne","izaguirre","izetta","izola","izzo","jablonski","jacalyn","jacelyn","jacinda","jacinta","jacinto","jackeline","jackelyn","jacki","jackie","jacklyn","jackqueline","jackson","jaclyn","jaco","jacob","jacobi","jacobo","jacobs","jacobsen","jacobson","jacoby","jacqualine","jacque","jacquelin","jacqueline","jacquelyn","jacquelyne","jacquelynn","jacques","jacquetta","jacquez","jacqui","jacquie","jacquiline","jacquline","jacqulyn","jada","jadwiga","jae","jaffe","jahn","jahnke","jaime","jaimee","jaimes","jaimie","jalbert","jaleesa","jalisa","jama","jame","jamee","jamerson","james","jameson","jamey","jami","jamie","jamieson","jamika","jamila","jamison","jammie","jan","jana","janae","janay","jane","janean","janee","janeen","janel","janell","janella","janelle","janene","janessa","janet","janeth","janett","janetta","janette","janey","jani","janice","janie","janiece","janina","janine","janis","janise","janita","jankowski","jann","janna","jannet","jannette","jannie","jansen","janson","janssen","janyce","jaqueline","jaquelyn","jaques","jaquez","jara","jaramillo","jarboe","jardine","jarman","jarmon","jarrell","jarrett","jarvis","jason","jasso","jaunita","jauregui","javier","jaworski","jaye","jayme","jaymie","jayna","jayne","jaynes","jazmin","jazmine","jeana","jeanbaptiste","jeane","jeanelle","jeanene","jeanett","jeanetta","jeanette","jeanice","jeanie","jeanine","jeanlouis","jeanmarie","jeanna","jeanne","jeannetta","jeannette","jeannie","jeannine","jeffcoat","jefferies","jeffers","jefferson","jeffery","jeffie","jeffrey","jeffreys","jeffries","jemison","jen","jena","jenae","jene","jenee","jenell","jenelle","jenette","jeneva","jeni","jenice","jenifer","jeniffer","jenine","jenise","jenkins","jenks","jenna","jennefer","jennell","jennette","jenni","jennie","jennifer","jenniffer","jennine","jennings","jenny","jensen","jenson","jepson","jeraldine","jeremy","jeri","jerica","jerilyn","jerlene","jernigan","jerome","jerri","jerrica","jerrie","jerry","jesenia","jesica","jeske","jesse","jessee","jessen","jessenia","jessi","jessia","jessica","jessie","jessika","jessup","jestine","jesus","jesusa","jesusita","jeter","jett","jetta","jettie","jewell","jewett","jiles","jill","jillian","jim","jimenez","jimerson","jiminez","jimmie","joan","joana","joane","joanie","joann","joanna","joanne","joannie","joaquina","jobe","jocelyn","jodee","jodi","jodie","jody","joe","joeann","joel","joella","joelle","joellen","joeseph","joesph","joetta","joette","joey","johana","johanna","johanne","johansen","johanson","john","johna","johnetta","johnette","johnie","johnna","johnnie","johnny","johnsen","johnsie","johnson","johnston","johnstone","joi","joie","jolanda","joleen","jolene","jolie","jolin","joline","jolley","jolyn","jolynn","jon","jona","jonas","jone","jonell","jonelle","jones","jong","joni","jonie","jonna","jonnie","joplin","jordan","jordon","jorge","jorgensen","jorgenson","jose","josefa","josefina","josefine","joselyn","joseph","josephina","josephine","josephson","josette","josey","joshua","josie","joslin","joslyn","josphine","jost","joubert","jovan","jovita","jowers","joya","joyce","joycelyn","joye","joyner","juan","juana","juanita","juarez","judd","jude","judi","judie","judith","judkins","judson","judy","jule","julee","julene","juli","julia","julian","juliana","juliane","juliann","julianna","julianne","julie","julieann","julien","julienne","juliet","julieta","julietta","juliette","julio","julissa","julius","jung","junie","junita","junko","jurado","justa","justin","justina","justine","justus","jutta","kacey","kaci","kacie","kacy","kaczmarek","kahl","kahle","kahler","kahn","kaila","kaitlin","kaitlyn","kala","kaleigh","kaley","kali","kallie","kalyn","kam","kamala","kami","kamilah","kaminski","kaminsky","kammerer","kamp","kandace","kandi","kandice","kandis","kandra","kandy","kane","kanesha","kanisha","kantor","kao","kaplan","kapp","kara","karan","kareen","karen","karena","karey","kari","karie","karima","karin","karina","karine","karisa","karissa","karl","karla","karleen","karlene","karly","karlyn","karmen","karnes","karns","karol","karole","karoline","karolyn","karon","karp","karr","karren","karri","karrie","karry","kary","karyl","karyn","kasandra","kasey","kasha","kasi","kasie","kasper","kass","kassandra","kassie","kasten","kastner","kate","katelin","katelyn","katelynn","katerine","kates","kathaleen","katharina","katharine","katharyn","kathe","katheleen","katherin","katherina","katherine","kathern","katheryn","kathey","kathi","kathie","kathleen","kathlene","kathline","kathlyn","kathrin","kathrine","kathryn","kathryne","kathy","kathyrn","kati","katia","katie","katina","katlyn","kato","katrice","katrina","kattie","katy","katz","kauffman","kaufman","kaufmann","kautz","kavanagh","kavanaugh","kay","kayce","kaycee","kaye","kayla","kaylee","kayleen","kayleigh","kaylene","kaylor","kayser","kazuko","kean","keane","kearney","kearns","kearse","keating","keaton","kecia","kee","keefe","keefer","keegan","keele","keeley","keely","keena","keenan","keene","keeney","keesee","keesha","keeter","keeton","keever","keffer","kehoe","keiko","keil","keila","keim","keira","keiser","keisha","keith","keitha","keitt","keli","kellam","kellar","kelle","kellee","kelleher","keller","kellerman","kelley","kelli","kellie","kellner","kellogg","kellum","kelly","kellye","kelm","kelsey","kelsi","kelsie","kelso","kelton","kemberly","kempf","kena","kenda","kendal","kendall","kendra","kendrick","kendricks","kenia","kenisha","kenna","kennard","kennedy","kenneth","kenney","kennon","kenny","kenya","kenyatta","kenyetta","kenyon","keown","kephart","kepler","kera","kerby","keren","keri","kerley","kerr","kerri","kerrie","kerrigan","kerry","kershaw","kershner","kerstin","kesha","keshia","kesler","kessel","kessinger","kessler","kester","kesterson","ketcham","ketchum","ketron","keturah","keva","kevin","keyes","keyser","khadijah","khalilah","khoury","kia","kiana","kiara","kibler","kidd","kidwell","kiefer","kieffer","kiel","kiely","kiera","kiernan","kiersten","kiesha","kiger","kight","kilburn","kilby","kile","kiley","kilgore","killebrew","killen","killian","killingsworth","killion","killough","kilmer","kilpatrick","kim","kimball","kimber","kimberely","kimberlee","kimberley","kimberli","kimberlie","kimberlin","kimberly","kimbery","kimble","kimbra","kimbrell","kimbro","kimbrough","kimes","kimi","kimiko","kimmel","kimsey","kimura","kina","kinard","kincaid","kindra","kingery","kingsbury","kingsley","kingston","kinlaw","kinnard","kinney","kinsella","kinser","kinsey","kinsler","kinsley","kinslow","kinzer","kira","kirby","kirchner","kirkendall","kirkham","kirkland","kirkpatrick","kirksey","kirkwood","kirschner","kirsten","kirstie","kirstin","kirtley","kirwan","kiser","kisha","kisner","kissinger","kistler","kittie","kittrell","kitts","kitty","kiyoko","kizer","kizzie","kizzy","klara","klatt","klaus","klein","kline","kling","klingensmith","klinger","klink","klotz","klug","knapp","knecht","knepper","knighten","knighton","knisley","knopp","knorr","knott","knotts","knowles","knowlton","knox","knudsen","knudson","knuth","knutson","kobayashi","koch","kocher","koehler","koehn","koenig","koerner","koester","koger","kohler","kohn","kolb","koller","kong","konrad","koon","koonce","koons","koontz","koopman","kopp","kori","korn","kornegay","korte","kortney","koski","koster","kourtney","kovac","kovach","kovacs","kowal","kowalczyk","kowalewski","kowalski","kozak","koziol","kozlowski","kraemer","krall","kramer","kratz","kratzer","kraus","krause","krauss","krawczyk","krebs","kremer","kress","krick","krieg","krieger","kris","krishna","krissy","krista","kristal","kristan","kristeen","kristel","kristen","kristi","kristian","kristie","kristin","kristina","kristine","kristle","kristy","kristyn","kroeger","krohn","krol","kroll","kropp","krouse","krueger","krug","kruger","krumm","kruse","krysta","krystal","krysten","krystin","krystina","krystle","krystyna","kubiak","kucera","kuehl","kuehn","kugler","kuhl","kuhlman","kuhlmann","kuhn","kuhns","kujawa","kulp","kum","kumar","kunkel","kunkle","kuntz","kunz","kurth","kurtz","kushner","kuster","kutz","kuykendall","kwan","kwiatkowski","kwon","kyla","kyle","kylee","kylie","kym","kymberly","kyoko","kyong","kyra","kyser","kyung","labarbera","labbe","labelle","labonte","laboy","labrecque","labrie","lacasse","lacey","lach","lachance","lachelle","laci","lacie","laclair","lacombe","lacour","lacresha","lacroix","ladawn","ladd","ladner","ladonna","lael","lafave","lafayette","lafferty","laflamme","lafleur","lafollette","lafond","lafontaine","lafountain","lafrance","lafreniere","lagasse","laguna","lagunas","lahoma","lahr","lai","lail","laila","laine","laing","lajoie","lajuana","lakeesha","lakeisha","lakendra","lakenya","lakesha","lakeshia","lakey","lakia","lakiesha","lakisha","lakita","lala","laliberte","lally","lalonde","lamanna","lamar","lambrecht","lamere","lamkin","lamm","lamonica","lamont","lamontagne","lamoreaux","lamothe","lamoureux","lampe","lampkin","lampley","lana","lancaster","landa","landeros","landes","landin","landis","landon","landreth","landrum","landry","lanell","lanelle","lanette","laney","lang","langan","langdon","lange","langer","langevin","langford","langham","langley","langlois","langston","lanham","lani","lanie","lanier","lanita","lankford","lannie","lanning","lanora","lansing","lantz","lanza","lao","lapierre","laplante","lapoint","lapointe","laporte","lapp","laquanda","laquita","lara","larae","laraine","laree","largent","larhonda","larios","larisa","larissa","larita","lariviere","larkin","larkins","larocca","laroche","larochelle","larock","laronda","larosa","larose","larrabee","larraine","larry","larsen","larson","larue","lasalle","lasandra","lasater","lashanda","lashandra","lashaun","lashaunda","lashawn","lashawna","lashawnda","lashay","lashell","lashley","lashon","lashonda","lashunda","laskowski","lasky","lasley","lasonya","lasseter","lassiter","latanya","latarsha","latasha","latashia","latesha","latham","lathan","lathrop","latia","laticia","latimer","latina","latisha","latonia","latonya","latoria","latosha","latour","latoya","latoyia","latrice","latricia","latrina","latrisha","latta","lattimore","lau","lauderdale","lauer","laughlin","launa","laura","lauralee","lauran","laure","laureano","laureen","lauren","laurena","laurence","laurene","laurent","lauretta","laurette","lauri","laurice","laurie","laurinda","laurine","lauryn","laux","lavada","lavallee","lavalley","lavelle","lavenia","lavera","lavergne","lavern","laverna","laverne","laverty","lavery","laveta","lavette","lavigne","lavin","lavina","lavine","lavinia","lavoie","lavon","lavona","lavonda","lavone","lavonia","lavonna","lavonne","lawana","lawanda","lawanna","lawhorn","lawler","lawlor","lawrence","lawson","lawton","layfield","layla","layne","layton","lazarus","lazo","leah","leahy","leake","leana","leandra","leann","leanna","leanne","leanora","leath","leatha","leatherman","leatherwood","leatrice","leavitt","lebeau","lebel","leblanc","leboeuf","lebron","lebrun","lechner","lecia","leclair","leclaire","leclerc","lecompte","leda","ledbetter","lederman","ledesma","ledet","ledezma","ledford","ledoux","leduc","leeann","leeanna","leeanne","leeds","leena","leeper","leesa","lefebvre","lefevre","leffler","lefler","leflore","leftwich","legault","legere","legg","leggett","legrand","lehman","lehmann","leia","leibowitz","leida","leigh","leigha","leighann","leighton","leija","leiker","leila","leilani","leininger","leisa","leisha","leith","leiva","lejeune","lekisha","lela","lelah","leland","lelia","lemaster","lemay","lemieux","lemire","lemke","lemley","lemmon","lemmons","lemoine","lemos","lemus","lena","lenard","lenhart","lenita","lenna","lennie","lennon","lennox","lenoir","lenora","lenore","lentz","lenz","leo","leola","leoma","leon","leona","leonard","leonarda","leonardo","leone","leong","leonia","leonida","leonie","leonila","leonor","leonora","leonore","leontine","leora","leos","leota","lepage","lepore","lera","lerch","lerma","lerner","leroy","lesa","lesha","lesher","lesia","lesko","leslee","lesley","lesli","leslie","lessard","lessie","lester","leta","letendre","letha","leticia","letisha","letitia","letourneau","lett","lettie","letty","leung","levan","levasseur","leveille","leverett","levesque","levi","levine","levinson","levitt","lewallen","lewandowski","lewellen","lewin","lewis","lexie","leyba","leyva","lezlie","lheureux","liane","lianne","libbie","libby","librada","lida","liddell","liddle","lidia","lieb","lieberman","lieselotte","liggett","liggins","lightfoot","lightner","ligia","ligon","lila","liles","lili","lilia","lilian","liliana","lilla","lillard","lilley","lilli","lillia","lilliam","lillian","lilliana","lillie","lilly","lim","limon","linares","lincoln","linda","lindahl","lindberg","lindell","lindeman","linder","linderman","lindgren","lindholm","lindley","lindner","lindo","lindquist","lindsay","lindsey","lindsley","lindstrom","lindsy","lindy","lineberry","linette","ling","lingenfelter","lingerfelt","lingle","linh","linkous","linn","linnea","linnie","linsey","linton","linville","lippert","lipps","lipscomb","lipsey","lisa","lisabeth","lisandra","lisbeth","lise","lisette","lisha","lissa","lissette","liston","lita","litchfield","littlefield","littlejohn","littleton","litton","littrell","liu","livengood","livesay","livia","livingston","liz","liza","lizabeth","lizarraga","lizbeth","lizeth","lizette","lizotte","lizzette","lizzie","llanes","llewellyn","lloyd","lockard","locke","lockett","lockhart","locklear","lockridge","lockwood","loeb","loeffler","loehr","loera","loesch","loftin","loftis","lofton","loftus","logan","loggins","logsdon","logue","lohman","lohr","loida","lois","loise","lola","lolita","lollar","lollis","loma","lomax","lombardi","lombardo","lomeli","lona","londa","london","lonergan","loney","longley","longmire","longo","longoria","loni","lonna","lonnie","loomis","looney","lopez","lora","loraine","loralee","lorean","loree","loreen","lorelei","loren","lorena","lorene","lorenz","lorenza","lorenzen","lorenzo","loreta","loretta","lorette","lori","loria","loriann","lorie","lorilee","lorina","lorinda","lorine","lorita","lorna","lorraine","lorretta","lorri","lorriane","lorrie","lorrine","lory","lott","lottie","lotz","lou","louann","louanne","loucks","loudermilk","louella","louetta","loughlin","louie","louis","louisa","louise","louque","loura","lourdes","lourie","louvenia","lovato","lovejoy","lovelace","lovelady","loveland","lovell","lovella","lovett","lovetta","lovie","lovins","lowder","lowell","lowman","lowrance","lowrey","lowry","lowther","loya","loyce","loyd","lozada","lozano","lozier","lozoya","luana","luann","luanna","luanne","luba","lubin","lucas","lucero","luci","lucia","luciana","luciano","lucie","lucienne","lucier","lucila","lucile","lucilla","lucille","lucina","lucinda","lucio","luckett","luckey","lucrecia","lucretia","lucy","ludie","ludivina","ludlow","ludwick","ludwig","lueck","luella","luetta","luevano","lugo","lui","luis","luisa","luise","lujan","lukas","lukens","luker","lula","lulu","luna","lund","lundberg","lunde","lundgren","lundquist","lundy","lunn","lunsford","luong","lupe","lupita","lupo","lura","lurlene","lurline","lussier","luther","luttrell","luu","luvenia","luz","lyda","lydia","lydon","lykins","lyla","lyle","lyles","lyman","lyn","lynda","lyndia","lyndsay","lyndsey","lynell","lynelle","lynetta","lynette","lynn","lynna","lynne","lynnette","lynsey","lyon","lyons","lytle","mabe","mabel","mabelle","mable","mabry","macaluso","macarthur","macdonald","macdougall","macedo","macfarlane","macgregor","mach","machado","machelle","machuca","macias","macie","maciel","mackay","mackenzie","mackey","mackie","mackinnon","macklin","maclean","macleod","macmillan","macneil","macomber","macon","macpherson","macy","madalene","madaline","madalyn","maddie","maddox","maddux","madelaine","madeleine","madelene","madeline","madelyn","mader","madera","madewell","madge","madie","madigan","madison","madlyn","madonna","madore","madrid","madsen","madson","mae","maeda","maegan","maes","maestas","mafalda","magali","magallanes","magaly","magan","magana","magaret","magda","magdalen","magdalena","magdalene","magdaleno","magee","magen","maggard","maggie","maggio","magill","magness","magnolia","magnuson","magruder","maguire","mahaffey","mahalia","mahan","maher","mahler","mahon","mahone","mahoney","mai","maia","maida","maier","maile","maines","maira","maire","maisha","maisie","majewski","majorie","makeda","maki","makowski","malave","malcolm","malcom","maldonado","malek","malena","maley","malia","malika","malinda","malinowski","malisa","malissa","malka","mallett","mallette","malley","mallie","mallon","mallory","malloy","malone","maloney","malorie","maloy","malvina","mamie","mammie","manchester","mancilla","mancini","mancuso","manda","mandel","mandeville","mandi","mandie","mandy","maness","mangan","mangrum","mangum","manie","manion","manis","manley","mann","mannino","manns","manriquez","mansell","mansfield","manson","mansour","mantooth","manuel","manuela","manzanares","manzano","manzo","mapes","mapp","marable","maragaret","maragret","maranda","marasco","marcano","marceau","marcela","marcelene","marcelina","marceline","marcell","marcella","marcelle","marcene","marchand","marchant","marchelle","marchetti","marci","marcia","marciano","marcie","marcotte","marcoux","marcum","marcus","marcy","mardell","marden","mardis","marek","maren","margaret","margareta","margarete","margarett","margaretta","margarette","margart","marge","margene","margeret","margert","margery","marget","margherita","margie","margit","margo","margorie","margot","margret","margrett","marguerita","marguerite","margurite","margy","marhta","mari","maria","mariah","mariam","marian","mariana","marianela","mariani","mariann","marianna","marianne","mariano","maribel","maribeth","marica","maricela","maricruz","marie","mariel","mariela","mariella","marielle","marietta","mariette","mariko","marilee","marilou","marilu","marilyn","marilynn","marin","marinda","marinelli","marino","mario","marion","maris","marisa","mariscal","marisela","marisha","marisol","marissa","marita","maritza","marivel","marjorie","marjory","markel","marketta","markey","markham","markita","markle","markley","markowitz","markus","marla","marlana","marleen","marlen","marlena","marlene","marler","marley","marlin","marline","marlo","marlow","marlowe","marlyn","marlys","marna","marni","marnie","maroney","marotta","marquardt","marquerite","marquetta","marquez","marquita","marquitta","marr","marra","marrero","marriott","marron","marroquin","marrs","marrufo","marsha","marshall","marston","marta","marte","martell","marth","martha","marti","martin","martina","martindale","martine","martineau","martinelli","martines","martinez","martino","martinson","marty","martz","marva","marvella","marvin","marvis","marx","mary","marya","maryalice","maryam","maryann","maryanna","maryanne","marybelle","marybeth","maryellen","maryetta","maryjane","maryjo","maryland","marylee","marylin","maryln","marylou","marylouise","marylyn","marylynn","maryrose","masako","mascarenas","mashburn","masse","massengale","massey","massie","masterson","mastin","mata","mateo","matha","matheny","mather","matherly","matherne","mathers","mathes","matheson","mathew","mathews","mathewson","mathias","mathieu","mathilda","mathilde","mathis","mathison","matias","matilda","matilde","matlock","matney","matos","matson","matsumoto","matta","mattern","matteson","matthew","matthews","mattie","mattingly","mattison","mattos","mattox","mattson","matz","maude","maudie","mauk","mauldin","mauney","maupin","maura","maureen","maurer","maurice","mauricio","maurine","maurita","mauro","maus","mavis","maxey","maxfield","maxie","maxima","maximina","maxine","maxon","maxson","maybell","maybelle","mayberry","maye","mayer","mayers","mayes","mayfield","mayhew","mayle","mayme","maynard","mayne","maynor","mayo","mayola","mayorga","mayra","mazie","mazur","mazurek","mazza","mazzola","mcabee","mcadams","mcadoo","mcafee","mcalister","mcallister","mcalpin","mcalpine","mcanally","mcandrew","mcardle","mcarthur","mcatee","mcauley","mcauliffe","mcavoy","mcbee","mcbrayer","mcbride","mcbroom","mcbryde","mcburney","mccabe","mccafferty","mccaffrey","mccain","mccaleb","mccall","mccalla","mccallister","mccallum","mccammon","mccandless","mccann","mccants","mccarley","mccarron","mccarter","mccarthy","mccartney","mccarty","mccarver","mccary","mccaskill","mccaslin","mccauley","mccay","mcchesney","mcclain","mcclanahan","mcclary","mcclean","mccleary","mcclellan","mcclelland","mcclendon","mcclintock","mcclinton","mccloskey","mccloud","mcclung","mcclure","mcclurg","mccluskey","mccollough","mccollum","mccomas","mccomb","mccombs","mcconnell","mccool","mccord","mccorkle","mccormack","mccormick","mccourt","mccowan","mccown","mccoy","mccracken","mccrae","mccrary","mccraw","mccray","mccrea","mccready","mccreary","mccrory","mccubbin","mccue","mcculley","mcculloch","mccullough","mccullum","mccully","mccune","mccurdy","mccurry","mccusker","mccutchen","mccutcheon","mcdade","mcdaniel","mcdaniels","mcdavid","mcdermott","mcdevitt","mcdonald","mcdonnell","mcdonough","mcdougal","mcdougald","mcdougall","mcdowell","mcduffie","mceachern","mcelhaney","mcelrath","mcelroy","mcentire","mcevoy","mcewen","mcfadden","mcfall","mcfarland","mcfarlane","mcfarlin","mcgaha","mcgann","mcgarry","mcgary","mcgee","mcgehee","mcghee","mcgill","mcginley","mcginn","mcginnis","mcginty","mcglone","mcglothlin","mcglynn","mcgough","mcgovern","mcgowan","mcgowen","mcgrath","mcgraw","mcgregor","mcgrew","mcgriff","mcgruder","mcguigan","mcguinness","mcguire","mchale","mchenry","mchugh","mcilwain","mcinerney","mcinnis","mcintire","mcintosh","mcintyre","mciver","mckamey","mckay","mckean","mckee","mckeehan","mckeever","mckellar","mckelvey","mckenna","mckenney","mckenzie","mckeon","mckeown","mckibben","mckie","mckim","mckinley","mckinney","mckinnie","mckinnon","mckinzie","mckissick","mcknight","mckown","mckoy","mclain","mclane","mclaren","mclaughlin","mclaurin","mclean","mclellan","mclemore","mclendon","mcleod","mclin","mcloughlin","mcmahan","mcmahon","mcmann","mcmanus","mcmaster","mcmasters","mcmichael","mcmillan","mcmillen","mcmillian","mcmillin","mcmillon","mcminn","mcmorris","mcmullen","mcmullin","mcmurray","mcmurry","mcnabb","mcnair","mcnally","mcnamara","mcnamee","mcnary","mcneal","mcneely","mcneese","mcneil","mcneill","mcnew","mcniel","mcnulty","mcnutt","mcpeak","mcphail","mcphee","mcpherson","mcquade","mcqueen","mcquiston","mcrae","mcreynolds","mcroberts","mcshane","mcswain","mcsweeney","mcvay","mcvey","mcwhirter","mcwhorter","mcwilliams","meacham","meade","meader","meador","meadors","meagan","meaghan","meagher","mears","mebane","mecham","mechelle","meda","medeiros","medellin","medford","medlin","medlock","medrano","mee","meehan","meekins","meeks","mefford","meg","megan","meggan","meghan","meghann","mehta","mei","meier","meissner","mejia","mejias","melaine","melancon","melani","melania","melanie","melanson","melany","melba","melcher","melchor","melda","mele","melendez","melgar","melia","melida","melina","melinda","melisa","melissa","melissia","melita","mellie","mellisa","mellissa","mello","mellon","mellott","melnick","melo","melodee","melodi","melodie","melonie","melony","melson","melva","melville","melvin","melvina","melynda","mena","menard","menchaca","mendenhall","mendes","mendez","mendiola","mendoza","mendy","menefee","menendez","meneses","menjivar","menke","meraz","mercado","mercedes","mercedez","mercier","mercurio","meredith","meri","merida","merideth","meridith","merilyn","merissa","merkel","merkle","merle","merlene","merlyn","merna","merrell","merri","merrick","merrie","merrifield","merrilee","merrill","merriman","merritt","merriweather","mertens","mertie","mertz","merwin","meryl","messer","messick","messina","messinger","messner","mestas","metcalf","metcalfe","metts","metz","metzger","metzler","meunier","meyer","meyers","meza","mia","mica","micaela","micah","miceli","micha","michael","michaela","michaele","michaelis","michaels","michaelson","michal","michalak","michalski","michaud","micheal","michel","michele","michelina","micheline","michell","michelle","michels","michiko","mickel","mickelson","mickens","mickey","micki","mickie","middaugh","middlebrooks","middleton","midgett","midkiff","miele","mielke","mier","miesha","migdalia","mignon","miguel","miguelina","mika","mikaela","mike","mikell","mikesell","miki","mikki","mila","milagro","milagros","milam","milan","milano","milburn","milda","mildred","miley","milford","milissa","millan","millar","millard","millen","millett","millican","millicent","millie","milligan","milliken","millner","millsap","millsaps","milly","milne","milner","milton","mimi","mims","minard","mincey","minda","mindi","mindy","minerva","ming","mingo","minh","minna","minnich","minnick","minnie","minta","minton","mintz","mira","miramontes","miranda","mireille","mireles","mirella","mireya","miriam","mirian","mirna","mirta","mirtha","misha","miss","missy","misti","mistie","mitchel","mitchell","mitchem","mitchum","mitsue","mitsuko","mittie","mitzi","mitzie","mixon","miyamoto","miyoko","mize","mizell","moberg","mobley","modesta","modica","modlin","moeller","moen","moffatt","moffett","moffitt","mohamed","mohammed","mohan","mohler","moira","mojica","molina","moller","mollie","molloy","molly","molnar","mona","monaco","monaghan","monahan","moncada","moncrief","monday","mondragon","monet","monge","monica","monika","monique","moniz","monnie","monroe","monroy","monserrate","monson","montague","montalvo","montana","montanez","montano","monteiro","montelongo","montemayor","montenegro","montez","montgomery","monti","montiel","montoya","monzon","mooney","mooneyham","moore","moorefield","moorehead","moorer","moores","moorhead","mora","morabito","moralez","moran","moreau","morehead","morehouse","moreira","moreland","morell","morelli","morelock","moreno","morey","morgan","mori","moriah","moriarty","morin","moritz","morley","morman","morrell","morrill","morrison","morrissette","morrissey","mortensen","mortenson","mortimer","morton","mosby","moseley","mosely","moser","mosher","mosier","moskowitz","mosley","mosqueda","mota","moten","moton","motta","moua","moulton","moultrie","mowery","mowry","moxley","moye","moyer","moyers","moynihan","mozell","mozella","mozelle","mudd","mueller","muhammad","mui","mulcahy","mulder","muldoon","muldrow","mulholland","mulkey","mullen","mullens","mullin","mullinax","mullins","mullis","mulvaney","mulvey","mumford","muncy","munday","mundell","mundy","munford","munger","munguia","muniz","munn","munos","munoz","munro","munroe","munsey","munson","muoi","murchison","murdoch","murdock","murguia","muriel","murillo","muro","murphey","murphree","murr","murrell","musgrave","musgrove","musick","musselman","musser","musso","muth","myatt","myer","myers","myesha","myhre","myles","myong","myra","myriam","myrick","myrl","myrle","myrna","myrta","myrtice","myrtie","myrtis","myrtle","myung","nabors","nadeau","nadene","nader","nadia","nadine","nadler","nagel","nagle","nagy","naida","najera","nakamura","nakano","nakesha","nakia","nakisha","nakita","nall","nalley","nancee","nancey","nanci","nancie","nancy","nanette","nannette","nannie","naoma","naomi","napier","napoli","napolitano","naquin","naranjo","narcisa","nardi","nardone","narvaez","nash","nason","natacha","natale","natalia","natalie","natalya","natasha","natashia","nate","nathalie","nathan","natisha","natividad","natosha","naughton","naumann","nava","navarra","navarrete","navarrette","navarro","naylor","nazario","neace","neale","nealy","neary","necaise","necole","neda","nedra","needham","neel","neeley","neely","neff","negrete","negron","neida","neil","neill","neilson","nelda","nelia","nelida","nell","nella","nelle","nellie","nelly","nelms","nelsen","nemeth","nena","nenita","neoma","neomi","nereida","neri","nerissa","nero","nery","nesbit","nesbitt","nesmith","nestor","neta","nettie","neu","neubauer","neuman","neumann","neva","nevada","nevarez","neville","nevins","newberry","newby","newcomb","newhouse","newkirk","newland","newlin","newman","newport","newsom","newsome","newson","ney","nez","ngan","ngo","ngoc","nguyen","nguyet","nichelle","nichol","nicholas","nichole","nicholle","nicholls","nichols","nicholson","nickell","nickelson","nickens","nickerson","nicki","nickie","nickles","nickole","nicky","nicol","nicola","nicolas","nicolasa","nicole","nicolette","nicolle","nida","nidia","nielsen","nielson","nieman","niemann","niemeyer","niemi","niesha","nieto","nieves","nightingale","nigro","niki","nikia","nikita","nikki","nikole","nila","nilda","niles","nilsa","nilsen","nilsson","nimmons","nina","ninfa","nino","nisha","nissen","nita","nixon","noah","nobuko","noe","noel","noelia","noella","noelle","noemi","nohemi","nola","nolan","noland","nolasco","nolen","noles","nolin","nolte","noma","nona","noonan","nora","norah","nord","nordstrom","noreen","norene","norfleet","noriega","noriko","norine","norma","norman","normand","norris","norsworthy","northcutt","northrop","northrup","norton","norvell","norwood","nottingham","novak","novotny","nowak","nowell","nowicki","nowlin","nubia","nugent","nunes","nunez","nunley","nunn","nunnally","nuno","nuss","nussbaum","nutt","nyberg","nydia","nygaard","nyla","nystrom","oakes","oakley","oates","obannon","obdulia","ober","oberg","obregon","obrian","obrien","obryan","obryant","ocampo","ocasio","ochoa","ocie","oconnell","oconner","oconnor","octavia","oda","odaniel","oday","odelia","odell","oden","odessa","odette","odilia","odle","odom","odonnell","odum","ofelia","offutt","ogburn","ogden","oglesby","ogletree","ogrady","ohalloran","ohara","ohare","ojeda","okeefe","okelley","olander","oldham","oleary","olene","oleson","oleta","olevia","olga","olguin","olimpia","olin","olinda","olinger","oliva","olivares","olivarez","olivas","oliveira","olivera","olivia","olivier","olivo","oller","ollie","ollis","olmos","olmstead","olney","oloughlin","olsen","olson","olszewski","olvera","olympia","omalley","omar","omara","omeara","oneal","oneida","oneil","oneill","oney","ong","onie","onita","ontiveros","ophelia","oquendo","oquinn","oralee","oralia","orcutt","ordonez","ordway","oreilly","orellana","oretha","orlando","orman","ormsby","orndorff","ornelas","orosco","orourke","orozco","orpha","orr","orta","ortega","ortego","orth","ortiz","orton","osborn","osborne","osburn","oscar","osgood","oshaughnessy","oshea","oshiro","osman","osorio","ossie","osteen","oster","osterman","ostrander","ostrom","ostrowski","osullivan","osuna","oswald","oswalt","otelia","otero","otey","otha","otilia","otis","otoole","ott","otte","otten","ottinger","oubre","ouellette","ouida","ousley","ovalle","overcash","overstreet","overton","overturf","owen","owens","owensby","owings","owsley","oxendine","oxford","oxley","oyler","ozell","ozella","ozie","ozuna","pabon","pacheco","packard","padgett","padilla","padron","paez","pagano","pagel","paige","paine","paiz","pak","palacio","palacios","palermo","palladino","palma","palmieri","palmira","palmore","palomo","palumbo","pam","pamala","pamela","pamelia","pamella","pamila","pamula","panek","paniagua","pankey","pannell","pantoja","paola","pappas","paquette","paquin","parada","paradis","pardo","pardue","paredes","parenteau","parham","paris","parisi","parke","parkhurst","parkinson","parkman","parmenter","parmer","parnell","parra","parrett","parris","parrish","parrott","partain","partee","parthenia","particia","partida","partin","partlow","paschall","pascoe","pasley","pasquale","passmore","pastore","patel","paterson","patino","patnode","patria","patrica","patrice","patricia","patrick","patrina","patsy","patterson","patti","pattie","pattison","patton","patty","paugh","paul","paula","paulene","pauletta","paulette","pauley","paulin","paulina","pauline","paulino","paulita","paulk","paulsen","paulson","paulus","paxton","payne","paynter","payton","paz","peabody","peachey","peake","pearcy","pearle","pearlene","pearlie","pearline","pearman","pearsall","pearson","peaslee","peay","peckham","pecoraro","peden","pedersen","pederson","pedigo","pedraza","pedroza","peebles","peele","peeples","peggie","peggy","pegram","pegues","pei","peiffer","pelayo","pelfrey","pelkey","pellegrini","pellegrino","pellerin","pelletier","peloquin","peltier","pelton","peluso","pemberton","pena","pender","pendergast","pendergrass","pendleton","pendley","penelope","penick","penland","penley","penn","pennell","penney","penni","pennie","pennington","penrod","penton","pepe","pepin","perales","peralta","peraza","percy","perdomo","perea","peres","pereyra","perez","perla","perlman","permenter","pernell","perrault","perreault","perreira","perri","perrin","perrine","perrone","perrotta","perry","perryman","persaud","persinger","pesce","pete","peter","peterkin","peterman","petersen","peterson","petra","petree","petrie","petrillo","petrina","petro","petronila","petry","pettaway","petterson","pettiford","pettigrew","pettis","pettit","pettus","pettway","peyton","pfaff","pfeffer","pfeifer","pfeiffer","pfister","pham","phan","pharr","phebe","phelan","phelps","phifer","philbrick","philip","philips","phillip","phillips","phillis","philomena","philpot","philpott","phinney","phipps","phoebe","phung","phuong","phylicia","phylis","phyliss","phyllis","piatt","picard","pichardo","pickard","pickel","pickens","pickering","pickett","piedad","pieper","piercy","pierre","pierson","pifer","pigg","pilkington","pimental","pimentel","pina","pinard","pinckney","pineda","pinero","pinkard","pinkerton","pinkham","pinkney","pinkston","pino","pinon","pinson","piotrowski","pires","pirtle","pisano","pitchford","pitre","pitt","pittman","pitts","pitzer","pizarro","placencia","plante","plascencia","platt","plemmons","pless","plotkin","plott","plourde","plumlee","plumley","plummer","plunkett","plyler","poche","poe","poff","pogue","pohl","poindexter","poirier","poisson","pok","polanco","poland","polito","polley","polly","polson","polston","pomerleau","pomeroy","poole","pooler","poore","popham","popovich","popp","porras","porsche","porsha","porterfield","portia","portillo","portis","posner","poston","poteat","poteet","poulin","pouliot","poulos","poulson","powe","powell","poynter","prado","prather","preciado","preece","prendergast","prentiss","prescott","presley","presnell","pressley","preston","prevost","prewitt","prichard","pricilla","prickett","priddy","pridemore","pridgen","priester","prieto","primm","prindle","prine","pringle","priscila","priscilla","pritchard","pritchett","privett","probst","proffitt","propst","prosser","proulx","prouty","provencher","providencia","pruett","pruitt","pryor","puckett","puente","puentes","puga","pugliese","puleo","pulido","pullen","pulliam","pumphrey","pura","purcell","purdy","purifoy","purkey","purnell","pursley","purvis","puryear","putman","putnam","pyatt","pyle","pyles","qiana","quach","quackenbush","quade","qualls","quan","quattlebaum","queenie","quesada","quesenberry","quevedo","quezada","quiana","quigley","quijano","quiles","quillen","quimby","quinlan","quinn","quinonez","quintana","quintanilla","quintero","quinton","quiroz","quyen","raab","rabb","rabe","raber","rabideau","rabinowitz","rabon","raby","rachael","rachal","racheal","rachel","rachele","rachell","rachelle","racine","rackley","racquel","radcliff","radcliffe","rademacher","rader","radford","radke","radtke","rae","raeann","rael","raelene","rafaela","rafferty","ragan","ragin","ragland","ragsdale","raguel","rahman","rahn","railey","raina","rainbolt","rainer","raines","rainey","rainwater","raisa","raleigh","raley","ralph","ralston","ramage","rambo","ramer","rameriz","ramey","ramires","ramirez","ramon","ramona","ramonita","ramos","ramsay","ramsdell","ramsey","ranae","rancourt","randa","randall","randazzo","randee","randel","randell","randi","randle","randolph","randy","ranee","raney","rangel","rankin","rankins","ransdell","ranson","rao","raphael","raposa","rapp","raquel","rasberry","rascon","rasheeda","rashid","rashida","rasmussen","ratchford","ratcliff","ratcliffe","rathbone","rathbun","ratliff","rau","rauch","rausch","rawlings","rawlins","rawls","rawson","raya","rayborn","rayburn","raye","rayfield","rayford","raylene","raymer","raymond","raymonde","raymund","rayna","rayner","raynor","razo","rea","reagan","reanna","reardon","reatha","reavis","reba","rebbeca","rebbecca","rebeca","rebecca","rebecka","rebekah","reber","reda","reddick","redford","redman","redmon","redmond","redwine","reece","reena","reese","refugia","refugio","regalado","regan","regena","regenia","regina","regine","reginia","rehm","reich","reichard","reichel","reichert","reid","reiff","reiko","reilly","reimer","reimers","reina","reiner","reinert","reinhardt","reinhart","reinhold","reinke","reiser","reiss","reita","reitz","rema","rembert","remedios","remillard","remington","remona","remy","rena","renae","renata","renate","renaud","renay","renda","rendon","rene","renea","reneau","renee","renetta","renfro","renfroe","renfrow","renita","renn","renna","renner","rennie","reno","renshaw","renteria","renz","resendez","resnick","ressie","ressler","reta","retha","retta","reuter","reva","revell","revis","rey","reyes","reyna","reynalda","reynolds","reynoso","rhea","rheba","rhee","rhiannon","rhinehart","rhoades","rhoads","rhoda","rhoden","rhodes","rhona","rhonda","rhyne","ribeiro","ricarda","ricci","ricciardi","riccio","richard","richards","richardson","richburg","richelle","richerson","richert","richey","richie","richman","richmond","rickard","rickert","ricketts","ricki","rickie","rickman","rico","riddell","riddick","ridenhour","ridenour","rideout","ridgway","ridley","riedel","rieger","riehl","riendeau","ries","riffe","rigby","rigdon","riggins","riggle","rigney","rigsby","riker","rikki","riley","rimmer","rinaldi","rincon","rinehart","ringler","rinker","riojas","riordan","rios","rioux","ripley","rippy","risa","risinger","risley","risner","ritchey","ritchie","rittenhouse","ritz","rivard","rivera","rivero","rivka","rizo","rizzo","roa","roane","roark","robb","robbie","robbin","robbins","robbyn","robena","roberge","roberson","robert","roberta","roberto","roberts","robertson","robeson","robey","robichaud","robichaux","robinett","robinette","robinson","robison","robledo","robson","roby","robyn","rocco","rocha","roche","rochel","rochell","rochelle","rochester","rocio","rockett","rockwell","rockwood","rodarte","rodas","roddy","roden","roderick","rodgers","rodney","rodrigez","rodrigue","rodrigues","rodriguez","rodriques","rodriquez","roeder","roemer","roesch","roesler","rogan","roger","rogers","rohde","rohr","rohrer","rojas","rojo","roland","rolanda","rolande","roldan","rolf","rolfe","rolle","rollins","rollo","rolon","romana","romano","rome","romelia","romeo","romero","romine","romo","romona","rona","ronald","ronda","roney","roni","ronna","ronni","ronnie","rooker","rooney","rory","rosa","rosado","rosalba","rosalee","rosales","rosalia","rosalie","rosalina","rosalind","rosalinda","rosaline","rosalva","rosalyn","rosamaria","rosamond","rosana","rosann","rosanna","rosanne","rosaria","rosario","rosas","rosaura","roscoe","roseann","roseanna","roseanne","roseberry","roseboro","roselee","roselia","roseline","rosella","roselle","roselyn","roseman","rosemarie","rosemond","rosen","rosena","rosenbaum","rosenberg","rosenberger","rosenberry","rosenblatt","rosenblum","rosenda","rosenfeld","rosenthal","rosetta","rosette","rosia","rosie","rosina","rosio","rosita","roslyn","ross","rossana","rossi","rossie","rossiter","rossman","rost","roth","rothman","rothrock","rothstein","rothwell","rotz","roundtree","roundy","rountree","rourke","roush","rousseau","roussel","rowden","rowe","rowell","rowena","rowland","rowles","rowlett","rowley","roxana","roxane","roxann","roxanna","roxanne","roxie","roy","roybal","royce","royer","royston","rozanne","rozella","rozier","ruano","rubalcava","ruben","rubenstein","rubi","rubie","rubin","rubino","rubio","rubye","ruch","rucker","ruckman","rudnick","rudolph","rudy","rueda","ruelas","ruffner","rufina","rugg","ruggiero","ruggles","ruhl","ruiz","rummel","rumph","rumsey","rundell","runge","runion","runyan","runyon","rupe","rupert","rupp","ruppert","rusch","rushton","russ","russell","russo","rutan","ruth","rutha","ruthann","ruthanne","ruthe","ruthie","rutkowski","rutland","rutledge","ruvalcaba","ryan","ryann","ryder","saad","saari","saavedra","sabina","sabine","sabo","sabol","sabra","sabrina","sacco","sacha","sachiko","sachs","sackett","sadie","sadler","sadowski","sadye","saechao","saenz","saez","safford","saito","saiz","sala","salas","salazar","salcedo","salcido","saldana","saldivar","saleh","salem","salena","salerno","salgado","salisbury","salley","sallie","sally","salo","salome","salomon","saltzman","salvador","salvatore","salyer","salyers","salzman","sam","samaniego","samantha","samara","samatha","samella","samira","sammie","sammons","sammy","samons","samora","sampson","sams","samson","samuel","samuels","samuelson","sana","sanabria","sanborn","sanches","sanchez","sanda","sandberg","sandee","sanderlin","sanderson","sandi","sandidge","sandie","sandifer","sandler","sandlin","sandoval","sandra","sandstrom","sandusky","sanford","sanjuana","sanjuanita","sankey","sanmiguel","sanora","sansom","sansone","santa","santacruz","santamaria","santana","santiago","santillan","santina","santo","santoro","santos","santoyo","sapp","sappington","sara","sarabia","sarah","sarai","saran","sargeant","sargent","sari","sarina","sarita","sarmiento","sartain","sartin","sarver","sasaki","sasha","sasser","sather","sato","satterfield","satterwhite","sattler","saturnina","sau","sauceda","saucedo","sauer","saunders","saundra","sauter","savannah","saville","savino","savoie","sawicki","saxon","saxton","sayles","saylor","sayre","scaife","scalf","scalise","scanlan","scanlon","scarberry","scarborough","scarbrough","scarlett","schaaf","schaal","schade","schaefer","schaeffer","schafer","schaffer","schaffner","schall","schaller","scharf","schatz","schaub","schauer","scheel","scheer","scheffler","schell","scheller","schenck","schenk","scherer","schermerhorn","schexnayder","schick","schiff","schiffman","schindler","schlegel","schleicher","schlosser","schlueter","schmid","schmidt","schmit","schmitt","schmitz","schneider","schock","schoen","schoenfeld","schofield","scholl","scholz","schoonmaker","schoonover","schott","schrader","schram","schramm","schreck","schreiber","schreiner","schrimsher","schrock","schroder","schroeder","schubert","schuck","schuh","schuler","schuller","schulman","schulte","schultz","schulz","schulze","schumacher","schuman","schumann","schuster","schutt","schutz","schuyler","schwab","schwartz","schwarz","schweitzer","scofield","scoggins","scott","scottie","scoville","scribner","scrivner","scroggins","scruggs","scully","seabolt","seabrook","seagraves","seale","sealey","sealy","sean","searcy","searle","searles","seaton","seaver","seavey","seawright","seay","sebastian","sebrina","sechrist","seda","sedillo","seeger","seeley","seema","segal","segarra","seger","segovia","segura","seibel","seiber","seibert","seidel","seifert","seiler","seitz","selby","selena","selene","selina","sellars","selma","selman","sena","senaida","seng","senn","senter","sepulveda","serafina","serena","sergent","serina","serita","serna","serrano","serrato","sessoms","setser","setsuko","setzer","severson","sevier","sevigny","sevilla","seward","sewell","seymore","seymour","shackelford","shackleford","shae","shafer","shaffer","shaina","shakia","shakira","shakita","shala","shalanda","shalon","shalonda","shamblin","shameka","shamika","shana","shanae","shanahan","shanda","shandi","shandra","shane","shaneka","shanel","shanell","shanelle","shaner","shani","shanice","shanika","shaniqua","shanita","shankle","shanklin","shanna","shannan","shannon","shanon","shanta","shantae","shantay","shante","shantel","shantell","shantelle","shanti","shapiro","shaquana","shaquita","shara","sharan","sharda","sharee","sharell","sharen","shari","sharice","sharie","sharika","sharilyn","sharita","sharkey","sharla","sharleen","sharlene","sharma","sharmaine","sharolyn","sharon","sharonda","sharpe","sharri","sharron","sharyl","sharyn","shasta","shattuck","shaughnessy","shaun","shauna","shaunda","shaunna","shaunta","shaunte","shavon","shavonda","shavonne","shawana","shawanda","shawanna","shawn","shawna","shawnda","shawnee","shawnna","shawnta","shay","shayla","shayna","shayne","shea","shealy","shearin","sheba","shedd","sheehan","sheehy","sheena","sheffield","sheila","sheilah","shela","shelba","shelby","sheldon","shelia","shella","shelley","shelli","shellie","shelly","shelton","shemeka","shemika","shena","shenika","shenita","shenk","shenna","shepard","shephard","sheppard","shera","sheree","sherell","sherer","sheri","sherice","sheridan","sherie","sherika","sherill","sherilyn","sherise","sherita","sherlene","sherley","sherly","sherlyn","sherman","sheron","sherrell","sherrer","sherri","sherrie","sherril","sherrill","sherrod","sherron","sherryl","sherwin","sherwood","shery","sheryl","sheryll","shetler","shick","shiela","shifflett","shiflett","shila","shiloh","shinn","shipe","shipley","shipp","shippy","shira","shirely","shirey","shirl","shirlee","shirleen","shirlene","shirley","shirly","shively","shizue","shizuko","shockey","shockley","shoemake","shoffner","shona","shonda","shondra","shonna","shonta","shoop","shortridge","shoshana","shotwell","shoup","shouse","showalter","shrader","shreve","shropshire","shroyer","shrum","shu","shubert","shuler","shull","shults","shultz","shumaker","shuman","shumate","shumpert","shumway","shupe","shuster","shutt","shyla","sibert","sibley","sibyl","sickler","sidney","siebert","siegel","siegfried","sievers","sifuentes","sigler","sigman","sigmon","signe","sigrid","sikora","silas","silva","silvana","silveira","silverman","silverstein","silvey","silvia","simard","simas","simmon","simmons","simms","simon","simona","simonds","simone","simoneau","simoneaux","simonne","simons","simonson","simonton","simpkins","simpson","sinclair","sindy","singh","singletary","singley","siobhan","sirena","sirois","sisco","sisk","sisneros","sisson","sistrunk","sitton","siu","sixta","sizemore","skaggs","skeen","skeens","skelton","skidmore","skiles","skye","slagle","slaton","slavin","slayton","sloat","slocum","slone","slover","slusher","slyvia","smalley","smallwood","smedley","smelser","smitherman","smithson","smtih","smyth","smythe","snapp","snavely","snodgrass","snowden","snyder","soares","sobel","socorro","sofia","sohn","soila","soileau","sokol","solange","solberg","soledad","solis","soliz","soloman","solomon","solorio","solorzano","somer","somers","somerville","sommer","sommers","sommerville","sona","sondra","songer","sonia","sonja","sonnier","sonya","soper","sophia","sophie","sophy","soraya","sorensen","sorenson","soria","soriano","sorrell","sorrells","sosa","sotelo","soto","soucy","soukup","soule","sousa","southard","southerland","southwick","southworth","souza","sowder","sowell","spalding","spann","spano","sparkman","spaulding","specht","spector","speight","spellman","sperry","spiegel","spielman","spiers","spiker","spillman","spinelli","spitler","spitzer","spivey","spooner","spradlin","spradling","spraggins","sprague","spratt","sprayberry","spriggs","sproul","sprouse","spruill","spurgeon","spurlock","staats","stacee","stacey","staci","stacia","stacie","stackhouse","stacy","stadler","stafford","stagg","staggs","stagner","stahl","staley","stallard","stallworth","stalnaker","stambaugh","stamey","stamm","stancil","standifer","standley","standridge","stanfield","stanfill","stanford","stanger","stanley","stansberry","stansbury","stanton","stapleton","starkey","starla","starnes","starr","stasia","staten","staton","staub","stauffer","stclair","stcyr","steadman","stearns","stebbins","steck","stedman","steele","steelman","stefani","stefania","stefanie","stefany","steffanie","steffen","steffens","stegall","steger","steib","steiger","steinbach","steinberg","steiner","steinke","steinman","steinmetz","stella","stelly","stenson","stepanie","stephaine","stephan","stephane","stephani","stephania","stephanie","stephany","stephen","stephenie","stephens","stephenson","stephine","stephnie","stepp","sternberg","stetson","steven","stevenson","steverson","stevie","stewart","stgermain","sthilaire","stickney","stidham","stier","stiffler","stillman","stillwell","stiltner","stilwell","stine","stines","stinnett","stinson","stites","stith","stitt","stjohn","stlaurent","stlouis","stockdale","stockton","stockwell","stoddard","stoffel","stogner","stoll","stollings","stoltz","stoltzfus","stonge","stott","stotts","stouffer","stovall","stowe","stowell","stpeter","stpierre","strachan","strader","strahan","straka","straley","strasser","stratton","straub","strauss","strawn","strawser","streeter","streit","stribling","stricker","strickland","strickler","stricklin","stringfellow","strobel","stroh","strom","stroman","stromberg","strother","strouse","struble","strunk","stuart","stubblefield","stuckey","studer","stultz","stumpf","sturdivant","sturges","sturgill","sturgis","sturm","sturtevant","stutz","stutzman","suanne","suarez","suazo","sublett","sudduth","sudie","sueann","suellen","suggs","suh","suiter","suk","sulema","sullins","sullivan","sumiko","summerlin","summerville","sumner","sumrall","sundberg","sunderland","sunni","surber","surratt","susan","susana","susann","susanna","susannah","susanne","susie","sussman","susy","suter","sutherland","sutphin","sutter","sutton","suzan","suzann","suzanna","suzanne","suzette","suzi","suzie","suzuki","suzy","svetlana","svitlana","svoboda","swafford","swaim","swaney","swanger","swann","swanner","swanson","swarey","swartz","swearingen","sweatt","sweitzer","swenson","swett","swick","swiger","swindell","swinford","swinney","swinson","swint","swinton","switzer","swope","sybil","syble","sydney","sydnor","sylvester","sylvia","sylvie","symons","synder","synthia","syreeta","szabo","szymanski","tabatha","tabb","taber","tabetha","tabitha","tackett","tafoya","taft","taggart","tague","taina","taisha","tajuana","takahashi","takako","takisha","talamantes","talavera","talbert","talbott","talia","taliaferro","talisha","talitha","talkington","tallent","talley","tallman","talton","tamala","tamar","tamara","tamatha","tamayo","tambra","tameika","tameka","tamekia","tamela","tamera","tamesha","tamez","tami","tamica","tamie","tamika","tamiko","tamisha","tammara","tammera","tammi","tammie","tammy","tamra","tana","tanaka","tandra","tandy","taneka","tanesha","tangela","tanguay","tania","tanika","tanisha","tanja","tankersley","tanna","tanya","tapia","tapley","tapp","tara","tarah","tarango","tarbox","tardif","tardiff","taren","tari","tarpley","tarr","tarra","tarrant","tarsha","tarver","taryn","tasha","tashia","tashina","tasia","tatiana","tatro","tatum","tatyana","taunya","tavares","tavarez","taveras","tawana","tawanda","tawanna","tawna","tawnya","taylor","tayna","teague","teasley","tedford","teena","teets","tegan","teisha","teixeira","tejada","tejeda","telford","telles","tellez","tello","telma","temeka","temika","tempie","templeton","templin","tena","tenesha","tenisha","tennant","tenney","tennie","tennille","tennison","tennyson","tenorio","teodora","teofila","tera","teran","tereasa","teresa","terese","teresia","teresita","teressa","teri","terica","terina","terisa","terra","terrazas","terrell","terresa","terri","terrie","terrill","terrilyn","terry","terwilliger","tesch","tesha","tess","tessa","tessie","tessier","testerman","teter","tetreault","thach","thacker","thai","thalia","thames","thanh","thao","tharp","tharpe","thaxton","thayer","thea","theda","theis","theisen","theiss","thelen","thelma","theo","theobald","theodora","theodore","theola","theresa","therese","theresia","theressa","theriault","theriot","therrien","thersa","thi","thibault","thibeault","thibodeau","thibodeaux","thiel","thiele","thielen","thies","thigpen","thom","thoma","thomas","thomasena","thomasina","thomasine","thomason","thomasson","thompkins","thompson","thomsen","thomson","thora","thornberry","thornburg","thorne","thornhill","thornton","thorson","thorton","threadgill","threatt","thresa","throckmorton","thu","thurber","thurman","thurmond","thurston","thuy","tia","tiana","tianna","tibbetts","tibbs","tidwell","tiera","tierney","tierra","tiesha","tifany","tiffaney","tiffani","tiffanie","tiffany","tiffiny","tighe","tijerina","tijuana","tilda","tilghman","tillery","tillett","tilley","tillie","tillis","tillman","tillotson","tilton","timberlake","timika","timm","timmerman","timmons","timms","timothy","tims","tina","tincher","tindall","tindle","tingley","tinisha","tinney","tinsley","tippett","tipton","tirado","tisa","tisdale","tish","tisha","titus","tobar","tobey","tobi","tobias","tobie","tobin","toby","toccara","todd","toi","toland","tolbert","toledo","tolentino","toler","toliver","tolle","tollefson","tolley","tolliver","tolman","tolson","tomas","tomasa","tomblin","tomeka","tomi","tomika","tomiko","tomlin","tomlinson","tommie","tommy","tommye","tomoko","tompkins","tona","tonda","tonette","toni","tonia","tonie","tonisha","tonita","tonja","tony","tonya","toole","tooley","toombs","toomer","toomey","tora","torgerson","tori","torie","toro","torre","torrence","torres","torrey","torrez","torri","torrie","tory","toscano","tosha","toshia","toshiko","toth","totten","toussaint","tova","tovar","towanda","towe","towle","towne","towner","townes","townley","townsend","townsley","toya","tracee","tracey","traci","tracie","tracy","trahan","trainor","tramel","trammell","tran","trang","trantham","trapp","trask","travers","travis","trawick","traylor","traynor","treadway","treadwell","treasa","treece","treena","trejo","tremblay","trena","trent","tresa","tressa","tressie","treva","trevino","trexler","tricia","trigg","trimble","trina","trinh","trinidad","triplett","tripp","trish","trisha","trista","tristan","trombley","trost","trotman","trott","trottier","troup","troutman","trowbridge","troxell","troxler","troy","troyer","truax","trudeau","trudi","trudie","trudy","trueblood","truelove","truesdale","truett","truitt","trujillo","trula","truman","truong","trussell","tsai","tsang","tse","tso","tsosie","tubbs","tucci","tudor","tuggle","tula","tull","tullis","tully","tunnell","tunstall","tupper","turcotte","turgeon","turk","turley","turman","turnage","turnbow","turnbull","turney","turpin","tutt","tuttle","tuyet","twana","twanda","twanna","twigg","twila","twilley","twitty","twombly","twomey","twyla","twyman","tyesha","tyisha","tyler","tyndall","tyner","tynisha","tyra","tyree","tyrrell","tyson","tyus","uhl","ulibarri","ullman","ulloa","ullrich","ulmer","ulrich","ulrike","underhill","ung","unger","unknow","unruh","upchurch","upshaw","upton","urbina","urias","uribe","urquhart","urrutia","ursula","usha","ussery","ute","utley","vaca","vaccaro","vachon","vada","vaden","vadnais","vaillancourt","val","valadez","valarie","valda","valdes","valdez","valdivia","valdovinos","valencia","valene","valente","valenti","valentin","valentina","valentino","valenzuela","valeri","valeria","valerie","valerio","valero","valery","valladares","valle","vallee","vallejo","valles","vallie","valliere","valorie","valrie","valverde","vanatta","vanburen","vanbuskirk","vance","vancleave","vanda","vandenberg","vanderpool","vandiver","vandusen","vandyke","vanegas","vanesa","vanessa","vanetta","vanhook","vanhoose","vanhorn","vanhouten","vania","vanita","vankirk","vanlandingham","vanmeter","vann","vanna","vannatta","vannesa","vanness","vannessa","vannoy","vanover","vanpelt","vanscoy","vansickle","vantassel","vanwinkle","vanzandt","vanzant","varela","varga","vargas","vargo","varnado","varner","varney","vashti","vasiliki","vasques","vasquez","vassallo","vassar","vaughan","vaughn","vaught","vazquez","veach","veasey","veda","veilleux","velarde","velasco","velasquez","velazquez","velda","velez","velia","veliz","vella","velma","veloz","velva","vena","venable","venegas","venessa","venetta","venice","venita","vennie","ventura","veola","vera","verda","verdell","verdie","verdugo","verduzco","vereen","verena","vergara","vergie","verla","verlene","verlie","verline","vermillion","verna","vernell","vernetta","vernia","vernice","vernie","vernita","vernon","verona","veronica","veronika","veronique","verret","versie","vertie","vesta","veta","vetter","vicenta","vick","vickers","vickery","vickey","vicki","vickie","vicky","victoria","victorina","vida","vidal","vidrine","vieira","viera","vierra","vigue","viki","vikki","villagomez","villalba","villalobos","villalpando","villanueva","villareal","villarreal","villasenor","villatoro","villegas","villeneuve","vilma","vincent","vincenza","vinita","vinnie","vinson","violeta","violette","virgen","virgie","virgil","virgina","virginia","visser","vitale","vivan","vivian","viviana","vivien","vivienne","voelker","vogel","vogler","vogt","voight","voigt","volkman","vollmer","volpe","volz","voncile","vonda","vonnie","voorhees","voss","vowell","voyles","vue","vuong","wachter","waddell","wadley","wadsworth","wagner","wagstaff","wahl","wai","waite","waites","wakefield","walcott","walczak","walden","waldman","waldon","waldron","waldrop","waldrup","wallace","wallen","walley","wallin","wallis","walsh","walston","walter","walters","walther","waltman","walton","waltraud","walz","wampler","wanda","waneta","wanetta","wanita","wardell","wardlaw","warfield","wargo","warnke","warnock","warr","warrick","warrington","warwick","washburn","washington","wasson","watanabe","waterhouse","watford","watkins","watson","watters","watterson","wava","wayland","wayman","wayne","weatherby","weatherford","weathersby","weatherspoon","webb","webber","weddle","weeden","weekley","weese","wegner","wei","weidman","weidner","weigand","weigel","weiland","weiler","weimer","weinberg","weinberger","weiner","weinstein","weintraub","weis","weisberg","weise","weiser","weisman","weiss","weissman","weitzel","welborn","weldon","welker","weller","wellington","wellman","welton","welty","wendel","wendell","wendi","wendie","wendling","wendolyn","wendt","wendy","wenger","wenona","wentworth","wentz","wentzel","wenzel","werner","werth","wertz","wescott","wesley","wessel","wessels","wesson","westberry","westbrook","westbrooks","westcott","westerfield","westerman","westfall","westlund","westmoreland","weston","westover","westphal","wethington","wetmore","wetzel","wexler","whalen","whaley","wharton","whatley","wheatley","wheaton","wheelock","whelan","whipple","whisenant","whisenhunt","whisler","whitacre","whitaker","whitcomb","whitehead","whitehouse","whitehurst","whiteley","whiteman","whitesell","whiteside","whitfield","whitford","whitley","whitlock","whitman","whitmer","whitmire","whitmore","whitney","whitson","whitt","whittaker","whitted","whittemore","whitten","whittier","whittington","whitton","whitworth","whorton","whyte","wickham","wicklund","wickman","wideman","widmer","widner","wiegand","wieland","wiener","wiese","wigfall","wiggins","wiggs","wigley","wilbanks","wilber","wilborn","wilbourn","wilbur","wilburn","wilcher","wilcox","wilda","wilde","wildman","wiley","wilfong","wilford","wilhelm","wilhelmina","wilhemina","wilhite","wilhoit","wilk","wilke","wilkens","wilkerson","wilkes","wilkey","wilkie","wilkins","wilkinson","wilks","willa","willaims","willams","willard","wille","willena","willene","willett","willetta","willette","willhite","willia","william","williams","williamson","willie","williemae","williford","willingham","willis","willison","willman","willodean","willoughby","willson","wilma","wilmot","wilmoth","wilson","wilton","wimberly","wimbush","wimer","wimmer","winburn","winchell","winchester","windham","windom","windsor","winegar","winfield","winfrey","wingard","wingate","wingfield","wingo","winifred","winkelman","winkler","winn","winnie","winnifred","winona","winslow","winstead","winston","winton","wirth","wiseman","wisner","wisniewski","witcher","witham","witherspoon","withrow","witkowski","witmer","witt","witte","witten","wittman","wofford","wojcik","wolcott","wolfe","wolfenbarger","wolff","wolfgang","wolford","wolfson","wolter","wolters","womack","wonda","wong","woodall","woodard","woodbury","woodford","woodham","woodley","woodring","woodrow","woodrum","woodson","woodworth","woolard","wooldridge","woolery","wooley","woolf","woolfolk","woolley","woolridge","woosley","wooster","wooten","wooton","worden","worley","worrell","worsham","worsley","wortham","worthen","worthington","wortman","wozniak","wray","wrenn","wulf","wunderlich","wurth","wyant","wyatt","wyche","wyckoff","wylie","wyman","wynell","wynne","wynona","wyrick","wysocki","xenia","xiao","xiomara","xiong","xochitl","xuan","yadira","yaeko","yael","yahaira","yajaira","yamada","yamamoto","yan","yancey","yancy","yandell","yanez","yanira","yarber","yarborough","yarbrough","yasmin","yasmine","yasuko","yates","yazzie","ybarra","yeager","yee","yeh","yelena","yepez","yer","yesenia","yessenia","yetta","yeung","yevette","yi","yim","ying","yingling","yoakum","yockey","yocum","yoder","yoel","yoho","yoko","yolanda","yolande","yolando","yolonda","yong","yoo","yoon","yoshida","yoshie","yoshiko","yost","youlanda","youmans","youngblood","youngman","youngs","yount","younts","yu","yuen","yuette","yuk","yuki","yukiko","yuko","yulanda","yun","yung","yuonne","yuri","yuriko","yvette","yvone","yvonne","zachary","zack","zada","zahn","zaida","zajac","zak","zamarripa","zambrano","zamora","zamudio","zana","zandra","zaragoza","zarate","zavala","zayas","zeigler","zelaya","zelda","zella","zeller","zellers","zelma","zena","zenaida","zendejas","zenia","zenobia","zepeda","zeringue","zetta","zhang","zhao","ziegler","zielinski","zimmerman","zimmermann","zina","zink","zinn","zita","zito","zoe","zofia","zoila","zola","zona","zonia","zook","zora","zoraida","zorn","zuber","zucker","zula","zulema","zulma","zumwalt","zuniga"].join("|")+"))+\\b","gim");class Ct{constructor(e="PERSON_NAME"){this.replaceWith=e}redact(e){kt.lastIndex=0,vt.lastIndex=0;let t=kt.exec(e);for(;null!==t;){vt.lastIndex=kt.lastIndex;let r=vt.exec(e);if(null!==r&&r.index===kt.lastIndex){let t=null===r[5]?"":r[5];e=e.slice(0,r.index)+this.replaceWith+t+e.slice(r.index+r[0].length)}t=kt.exec(e)}return e=e.replace(St,"$1"+this.replaceWith)}}const xt=new RegExp("(\\d+\\s*(\\w+ ){1,2}"+/(street|st|road|rd|avenue|ave|drive|dr|loop|court|ct|circle|cir|lane|ln|boulevard|blvd|way)\.?\b/gi.source+"(\\s+"+/(apt|bldg|dept|fl|hngr|lot|pier|rm|ste|slip|trlr|unit|#)\.? *[a-z0-9-]+\b/gi.source+")?)|("+/P\.? ?O\.? *Box +\d+/gi.source+")","gi"),It=Object.freeze(Object.defineProperty({__proto__:null,credentials:/(login( cred(ential)?s| info(rmation)?)?|cred(ential)?s) ?:\s*\S+\s+\/?\s*\S+/gi,creditCardNumber:/\d{4}[ -]?\d{4}[ -]?\d{4}[ -]?\d{4}|\d{4}[ -]?\d{6}[ -]?\d{4}\d?/g,digits:/\b\d{4,}\b/g,emailAddress:/([a-z0-9_\-.+]+)@\w+(\.\w+)*/gi,ipAddress:/(\d{1,3}(\.\d{1,3}){3}|[0-9A-F]{4}(:[0-9A-F]{4}){5}(::|(:0000)+))/gi,password:/(pass(word|phrase)?|secret): \S+/gi,phoneNumber:/(\(?\+?[0-9]{1,2}\)?[-. ]?)?(\(?[0-9]{3}\)?|[0-9]{3})[-. ]?([0-9]{3}[-. ]?[0-9]{4}|\b[A-Z0-9]{7}\b)/g,streetAddress:xt,url:/([^\s:/?#]+):\/\/([^/?#\s]*)([^?#\s]*)(\?([^#\s]*))?(#([^\s]*))?/g,usSocialSecurityNumber:/\b\d{3}[ -.]\d{2}[ -.]\d{4}\b/g,username:/(user( ?name)?|login): \S+/gi,zipcode:/\b\d{5}\b(-\d{4})?\b/g},Symbol.toStringTag,{value:"Module"}));function At(e){return e.replace(/[A-Z]/g,(e,t)=>0!==t?`_${e.toLowerCase()}`:e.toLowerCase())}class Et{constructor({replaceWith:e=At("default").toUpperCase(),regexpPattern:t}){__publicField(this,"regexpMatcher"),__publicField(this,"replaceWith"),this.replaceWith=e,this.regexpMatcher=t}redact(e){return e.replace(this.regexpMatcher,this.replaceWith)}}function Ot(e){return void 0!==e.regexpPattern?new Et({regexpPattern:e.regexpPattern,replaceWith:e.replaceWith}):e}class Rt{constructor(e){__publicField(this,"childRedactors",[]),__publicField(this,"redact",e=>{for(const t of this.childRedactors)e=t.redact(e);return e}),this.childRedactors=function(e={}){const t=[];e.customRedactors&&e.customRedactors.before&&e.customRedactors.before.map(Ot).forEach(e=>t.push(e));for(const r of Object.keys(It))e.builtInRedactors&&e.builtInRedactors[r]&&!1===e.builtInRedactors[r].enabled||t.push(new Et({regexpPattern:It[r],replaceWith:e.globalReplaceWith||At(r).toUpperCase()}));return e.builtInRedactors&&e.builtInRedactors.names&&!1===e.builtInRedactors.names.enabled||t.push(new Ct(e.globalReplaceWith)),e.customRedactors&&e.customRedactors.after&&e.customRedactors.after.map(Ot).forEach(e=>t.push(e)),t}(e)}}const Mt={before:[{regexpPattern:/\b[A-Z]\d{7}\b/g,replaceWith:"PASSPORT_NUMBER"},{regexpPattern:/(?<=password: )(.*)/gi,replaceWith:"[REDACTED]"}]};function jt(e){return new Rt({builtInRedactors:{names:{replaceWith:"ANONYMOUS_PERSON"}},customRedactors:Mt}).redact(e)}function Nt(e){const t=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null);let r;for(;r=t.nextNode();){const e=r.nodeValue,t=jt(e);e!==t&&(r.nodeValue=t)}!function(e){const t=Array.from(e.querySelectorAll('input[type="password"]'));t.forEach(e=>{e.value="[REDACTED]"})}(e)}async function _t(e={}){const{maxWaitTime:t=2e3,minStableFrames:r=3,requiredSelectors:n=[]}=e;return new Promise(e=>{const s=performance.now();let i,o=0,a=0;const l=()=>{if(performance.now()-s>t)return cancelAnimationFrame(i),void e();const c=document.documentElement.offsetHeight;if(c!==a||n.length&&!n.every(e=>{const t=document.querySelector(e);if(!t)return!1;const r=t.getBoundingClientRect();return r.width>0&&r.height>0}))o=0;else if(o++,o>=r)return cancelAnimationFrame(i),void e();a=c,i=requestAnimationFrame(l)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{i=requestAnimationFrame(l)},{once:!0}):i=requestAnimationFrame(l)})}var zt,Tt=Object.defineProperty,Pt=(e,t,r)=>((e,t,r)=>t in e?Tt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Lt=Object.defineProperty,Ft=(e,t,r)=>((e,t,r)=>t in e?Lt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Dt=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Dt||{});const Bt={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Ut={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},Wt={};function Vt(e){if(Wt[e])return Wt[e];const t=globalThis[e],r=t.prototype,n=e in Bt?Bt[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in Ut?Ut[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&o&&!globalThis.Zone)return Wt[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const i=s[e].prototype;return document.body.removeChild(n),i?Wt[e]=i:r}catch{return r}}const qt={};function $t(e,t,r){var n;const s=`${e}.${String(r)}`;if(qt[s])return qt[s].call(t);const i=Vt(e),o=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return o?(qt[s]=o,o.call(t)):t[r]}const Yt={};function Zt(e,t,r){const n=`${e}.${String(r)}`;if(Yt[n])return Yt[n].bind(t);const s=Vt(e)[r];return"function"!=typeof s?t[r]:(Yt[n]=s,s.bind(t))}const Gt={childNodes:function(e){return $t("Node",e,"childNodes")},parentNode:function(e){return $t("Node",e,"parentNode")},parentElement:function(e){return $t("Node",e,"parentElement")},textContent:function(e){return $t("Node",e,"textContent")},contains:function(e,t){return Zt("Node",e,"contains")(t)},getRootNode:function(e){return Zt("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?$t("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?$t("Element",e,"shadowRoot"):null},querySelector:function(e,t){return $t("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return $t("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Vt("MutationObserver").constructor}};function Jt(e){return e.nodeType===e.ELEMENT_NODE}function Ht(e){const t=e&&"host"in e&&"mode"in e&&Gt.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Gt.shadowRoot(t)===e)}function Xt(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Kt(e){try{const r=e.rules||e.cssRules;if(!r)return null;let n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);const s=Array.from(r,e=>Qt(e,n)).join("");return(t=s).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(r){return null}var t}function Qt(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=Kt(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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?hr(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?hr(r,t):r}}let er=class{constructor(){Ft(this,"idNodeMap",new Map),Ft(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const 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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const 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 tr({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:i}){let o=s||"";const a=n&&rr(n);return(t[r.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function rr(e){return e.toLowerCase()}const nr="__rrweb_original__";function sr(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?rr(t):null}function ir(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(Xk){return null}const n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==n?void 0:n[1])??null}const or=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ar=/^(?:[a-z+]+:)?\/\//i,lr=/^www\..*/i,cr=/^(data:)([^,]*),(.*)/i;function hr(e,t){return(e||"").replace(or,(e,r,n,s,i,o)=>{const a=n||i||o,l=r||s||"";if(!a)return e;if(ar.test(a)||lr.test(a))return`url(${l}${a}${l})`;if(cr.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const t of h)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`})}function ur(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function dr(e,t){return function(e,t){const r=Array.from(t.childNodes),n=[];if(r.length>1&&e&&"string"==typeof e){const t=ur(e);for(let s=1;s<r.length;s++)if(r[s].textContent&&"string"==typeof r[s].textContent){const i=ur(r[s].textContent);for(let r=3;r<i.length;r++){const s=i.substring(0,r);if(2===t.split(s).length){const r=t.indexOf(s);for(let t=r;t<e.length;t++)if(ur(e.substring(0,t)).length===r){n.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return n.push(e),n}(e,t).join("/* rr_split */")}let pr=1;const mr=new RegExp("[^a-z0-9-_:]");function fr(){return pr++}let gr,yr;const br=/^[^ \t\n\r\u000c]+/,wr=/^[, \t\n\r\u000c]+/;const kr=new WeakMap;function vr(e,t){return t&&""!==t.trim()?Cr(e,t):t}function Sr(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Cr(e,t){let r=kr.get(e);if(r||(r=e.createElement("a"),kr.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function xr(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?vr(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n;const s=e.exec(t.substring(r));return s?(n=s[0],r+=n.length,n):""}const s=[];for(;n(wr),!(r>=t.length);){let i=n(br);if(","===i.slice(-1))i=vr(e,i.substring(0,i.length-1)),s.push(i);else{let n="";i=vr(e,i);let o=!1;for(;;){const e=t.charAt(r);if(""===e){s.push((i+n).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){r+=1,s.push((i+n).trim());break}"("===e&&(o=!0)}n+=e,r+=1}}}return s.join(", ")}(e,n):"style"===r?hr(n,Cr(e)):"object"===t&&"data"===r?vr(e,n):n:vr(e,n):n}function Ir(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Ar(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Ar(Gt.parentNode(e),t,r);for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!!r&&Ar(Gt.parentNode(e),t,r)}function Er(e,t,r,n){let s;if(Jt(e)){if(s=e,!Gt.childNodes(s).length)return!1}else{if(null===Gt.parentElement(e))return!1;s=Gt.parentElement(e)}try{if("string"==typeof t){if(n){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(Ar(s,t,n))return!0;if(r)if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}catch(i){}return!1}function Or(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:f=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Dt.Document,childNodes:[],compatMode:e.compatMode}:{type:Dt.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Dt.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:d=!1,rootId:p}=t,m=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(n){}return!1}(e,n,s),f=function(e){if(e instanceof HTMLFormElement)return"form";const t=rr(e.tagName);return mr.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let k=0;k<y;k++){const t=e.attributes[k];Ir(f,t.name,t.value)||(g[t.name]=xr(r,f,rr(t.name),t.value))}if("link"===f&&i){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let n=null;t&&(n=Kt(t)),n&&(delete g.rel,delete g.href,g._cssText=n)}if("style"===f&&e.sheet){let t=Kt(e.sheet);t&&(e.childNodes.length>1&&(t=dr(t,e)),g._cssText=t)}if("input"===f||"textarea"===f||"select"===f){const t=e.value,r=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=tr({element:e,type:sr(e),tagName:f,value:t,maskInputOptions:o,maskInputFn:a}):r&&(g.checked=r)}"option"===f&&(e.selected&&!o.select?g.selected=!0:delete g.selected);"dialog"===f&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===f&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){const s=t.getImageData,i=nr in s?s[nr]:s;if(new Uint32Array(i.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),n=r.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===f&&c){gr||(gr=r.createElement("canvas"),yr=gr.getContext("2d"));const t=e,n=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{gr.width=t.naturalWidth,gr.height=t.naturalHeight,yr.drawImage(t,0,0),g.rr_dataURL=gr.toDataURL(l.type,l.quality)}catch(Xk){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${n}! Error: ${Xk}`)}"anonymous"===t.crossOrigin&&(s?g.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===f||"video"===f){const t=g;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}d||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(m){const{width:t,height:r}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${r}px`}}"iframe"!==f||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let b;try{customElements.get(f)&&(b=!0)}catch(w){}return{type:Dt.Element,tagName:f,attributes:g,childNodes:[],isSVG:Sr(e)||void 0,needBlock:m,rootId:p,isCustom:b}}(e,{doc:r,blockClass:s,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:d,recordCanvas:p,keepIframeSrcFn:m,newlyAddedElement:f,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:n,rootId:s,cssCaptured:i}=t,o=Gt.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=Gt.textContent(e),c&&l&&(l=hr(l,Cr(t.doc))));!c&&!h&&l&&r&&(l=n?n(l,Gt.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:Dt.Text,textContent:l||"",rootId:s}}(e,{doc:r,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:Dt.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:Dt.Comment,textContent:Gt.textContent(e)||"",rootId:y};default:return!1}}function Rr(e){return null==e?"":e.toLowerCase()}function Mr(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:m={},inlineImages:f=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:v=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:C=!1,cssCaptured:x=!1}=t;let{needsMask:I}=t,{preserveWhiteSpace:A=!0}=t;if(!I){I=Er(e,o,a,void 0===I)}const E=Or(e,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:I,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,dataURLOptions:m,inlineImages:f,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:C,cssCaptured:x});if(!E)return console.warn(e,"not serialized"),null;let O;O=n.hasNode(e)?n.getId(e):function(e,t){if(t.comment&&e.type===Dt.Comment)return!0;if(e.type===Dt.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===ir(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Rr(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Rr(e.attributes.name)||"icon"===Rr(e.attributes.rel)||"apple-touch-icon"===Rr(e.attributes.rel)||"shortcut icon"===Rr(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Rr(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Rr(e.attributes.property).match(/^(og|twitter|fb):/)||Rr(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Rr(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Rr(e.attributes.name)||"googlebot"===Rr(e.attributes.name)||"bingbot"===Rr(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Rr(e.attributes.name)||"generator"===Rr(e.attributes.name)||"framework"===Rr(e.attributes.name)||"publisher"===Rr(e.attributes.name)||"progid"===Rr(e.attributes.name)||Rr(e.attributes.property).match(/^article:/)||Rr(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Rr(e.attributes.name)||"yandex-verification"===Rr(e.attributes.name)||"csrf-token"===Rr(e.attributes.name)||"p:domain_verify"===Rr(e.attributes.name)||"verify-v1"===Rr(e.attributes.name)||"verification"===Rr(e.attributes.name)||"shopify-checkout-api-token"===Rr(e.attributes.name)))return!0}}return!1}(E,p)||!A&&E.type===Dt.Text&&!E.textContent.replace(/^\s+|\s+$/gm,"").length?-2:fr();const R=Object.assign(E,{id:O});if(n.add(e,R),-2===O)return null;y&&y(e);let M=!l;if(R.type===Dt.Element){M=M&&!R.needBlock,delete R.needBlock;const t=Gt.shadowRoot(e);t&&Xt(t)&&(R.isShadowHost=!0)}if((R.type===Dt.Document||R.type===Dt.Element)&&M){p.headWhitespace&&R.type===Dt.Element&&"head"===R.tagName&&(A=!1);const t={doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:I,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:v,keepIframeSrcFn:S,cssCaptured:!1};if(R.type===Dt.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===Dt.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(Gt.childNodes(e))){const e=Mr(r,t);e&&R.childNodes.push(e)}}let C=null;if(Jt(e)&&(C=Gt.shadowRoot(e)))for(const e of Array.from(Gt.childNodes(C))){const r=Mr(e,t);r&&(Xt(C)&&(r.isShadow=!0),R.childNodes.push(r))}}const j=Gt.parentNode(e);return j&&Ht(j)&&Xt(j)&&(R.isShadow=!0),R.type===Dt.Element&&"iframe"===R.tagName&&function(e,t,r){const n=e.contentWindow;if(!n)return;let s,i=!1;try{s=n.document.readyState}catch(a){return}if("complete"!==s){const n=setTimeout(()=>{i||(t(),i=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(n),i=!0,t()})}const o="about:blank";if(n.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&b){const r=Mr(t,{doc:t,mirror:n,blockClass:s,blockSelector:i,needsMask:I,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:v,keepIframeSrcFn:S});r&&b(e,r)}},w),R.type===Dt.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===ir(R.attributes.href))&&function(e,t,r){let n,s=!1;try{n=e.sheet}catch(o){return}if(n)return;const i=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(i),s=!0,t()})}(e,()=>{if(k){const t=Mr(e,{doc:r,mirror:n,blockClass:s,blockSelector:i,needsMask:I,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:p,dataURLOptions:m,inlineImages:f,recordCanvas:g,preserveWhiteSpace:A,onSerialize:y,onIframeLoad:b,iframeLoadTimeout:w,onStylesheetLoad:k,stylesheetLoadTimeout:v,keepIframeSrcFn:S});t&&k(e,t)}},v),R}function jr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Nr(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 n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var _r={exports:{}},zr=String,Tr=function(){return{isColorSupported:!1,reset:zr,bold:zr,dim:zr,italic:zr,underline:zr,inverse:zr,hidden:zr,strikethrough:zr,black:zr,red:zr,green:zr,yellow:zr,blue:zr,magenta:zr,cyan:zr,white:zr,gray:zr,bgBlack:zr,bgRed:zr,bgGreen:zr,bgYellow:zr,bgBlue:zr,bgMagenta:zr,bgCyan:zr,bgWhite:zr}};_r.exports=Tr(),_r.exports.createColors=Tr;var Pr=_r.exports;const Lr=Nr(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Fr=Pr,Dr=Lr,Br=class e extends Error{constructor(t,r,n,s,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Fr.isColorSupported),Dr&&e&&(t=Dr(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,gray:t,red:s}=Fr.createColors(!0);r=t=>e(s(t)),n=e=>t(e)}else r=n=e=>e;return s.slice(i,o).map((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ur=Br;Br.default=Br;var Wr={};Wr.isClean=Symbol("isClean"),Wr.my=Symbol("my");const Vr={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let qr=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],i=this.raw(s,"before");i&&this.builder(i),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],void 0!==n))return n;let s=e.parent;if("before"===r){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return Vr[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let s="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[s]?n=this[s](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var o;return void 0===n&&(n=Vr[r]),i.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.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,r.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,r.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&&(t=e.raws.between,void 0!==t))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,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var $r=qr;qr.default=qr;let Yr=$r;function Zr(e,t){new Yr(t).stringify(e)}var Gr=Zr;Zr.default=Zr;let{isClean:Jr,my:Hr}=Wr,Xr=Ur,Kr=$r,Qr=Gr;function en(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>en(e,r)):("object"===i&&null!==s&&(s=en(s)),r[n]=s)}return r}let tn=class{constructor(e={}){this.raws={},this[Jr]=!1,this[Hr]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of 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=en(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}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Xr(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[Jr]){this[Jr]=!1;let e=this;for(;e=e.parent;)e[Jr]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let i=0;i<e;i++)"\n"===r[i]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Kr).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))r[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)r[i]=e.toJSON(null,t);else if("source"===i){let n=t.get(e.input);null==n&&(n=s,t.set(e.input,s),s++),r[i]={end:e.end,inputId:n,start:e.start}}else r[i]=e}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Qr){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}};var rn=tn;tn.default=tn;let nn=rn,sn=class extends nn{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]}};var on=sn;sn.default=sn;var an={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:ln,SourceMapGenerator:cn}=Lr,{existsSync:hn,readFileSync:un}=Lr,{dirname:dn,join:pn}=Lr;let mn=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=dn(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new ln(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=dn(e),hn(e))return this.mapFile=e,un(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof ln)return cn.fromSourceMap(t).toString();if(t instanceof cn)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=pn(dn(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)}};var fn=mn;mn.default=mn;let{SourceMapConsumer:gn,SourceMapGenerator:yn}=Lr,{fileURLToPath:bn,pathToFileURL:wn}=Lr,{isAbsolute:kn,resolve:vn}=Lr,{nanoid:Sn}=an,Cn=Lr,xn=Ur,In=fn,An=Symbol("fromOffsetCache"),En=Boolean(gn&&yn),On=Boolean(vn&&kn),Rn=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!On||/^\w+:\/\//.test(t.from)||kn(t.from)?this.file=t.from:this.file=vn(t.from)),On&&En){let e=new In(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 "+Sn(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new xn(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new xn(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,n.plugin),s.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(wn&&(s.input.url=wn(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[An])r=this[An];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[An]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:vn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({column:n,line:r})),i=kn(a.source)?wn(a.source):new URL(a.source,this.map.consumer().sourceRoot||wn(this.map.mapFile));let l={column:a.column,endColumn:s&&s.column,endLine:s&&s.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!bn)throw new Error("file: protocol is not available in this PostCSS build");l.file=bn(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var Mn=Rn;Rn.default=Rn,Cn&&Cn.registerInput&&Cn.registerInput(Rn);let{SourceMapConsumer:jn,SourceMapGenerator:Nn}=Lr,{dirname:_n,relative:zn,resolve:Tn,sep:Pn}=Lr,{pathToFileURL:Ln}=Lr,Fn=Mn,Dn=Boolean(jn&&Nn),Bn=Boolean(_n&&Tn&&zn&&Pn);var Un=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||_n(e.file);!1===this.mapOpts.sourcesContent?(t=new jn(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),Bn&&Dn&&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=Nn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Nn({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(){this.css="",this.map=new Nn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,s="<no source>",i={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&&(i.generated.line=r,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?_n(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=_n(Tn(r,this.mapOpts.annotation)));let n=zn(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Fn(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ln){let t=Ln(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Pn&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Wn=rn,Vn=class extends Wn{constructor(e){super(e),this.type="comment"}};var qn=Vn;Vn.default=Vn;let $n,Yn,Zn,Gn,{isClean:Jn,my:Hn}=Wr,Xn=on,Kn=qn,Qn=rn;function es(e){return e.map(e=>(e.nodes&&(e.nodes=es(e.nodes)),delete e.source,e))}function ts(e){if(e[Jn]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)ts(t)}let rs=class e extends Qn{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let i of s)this.proxyOf.nodes.splice(n+1,0,i);for(let i in this.indexes)r=this.indexes[i],n<r&&(this.indexes[i]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n,0,o);for(let o in this.indexes)r=this.indexes[o],n<=r&&(this.indexes[o]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=es($n(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Xn(t)]}else if(t.selector)t=[new Yn(t)];else if(t.name)t=[new Zn(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Kn(t)]}return t.map(t=>(t[Hn]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Jn]&&ts(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){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(s){throw t.addToError(s)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};rs.registerParse=e=>{$n=e},rs.registerRule=e=>{Yn=e},rs.registerAtRule=e=>{Zn=e},rs.registerRoot=e=>{Gn=e};var ns=rs;rs.default=rs,rs.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Zn.prototype):"rule"===e.type?Object.setPrototypeOf(e,Yn.prototype):"decl"===e.type?Object.setPrototypeOf(e,Xn.prototype):"comment"===e.type?Object.setPrototypeOf(e,Kn.prototype):"root"===e.type&&Object.setPrototypeOf(e,Gn.prototype),e[Hn]=!0,e.nodes&&e.nodes.forEach(e=>{rs.rebuild(e)})};let ss,is,os=ns,as=class extends os{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ss(new is,this,e).stringify()}};as.registerLazyResult=e=>{ss=e},as.registerProcessor=e=>{is=e};var ls=as;as.default=as;let cs={};var hs=function(e){cs[e]||(cs[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let us=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 r in t)this[r]=t[r]}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}};var ds=us;us.default=us;let ps=ds,ms=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 ps(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var fs=ms;ms.default=ms;const gs="'".charCodeAt(0),ys='"'.charCodeAt(0),bs="\\".charCodeAt(0),ws="/".charCodeAt(0),ks="\n".charCodeAt(0),vs=" ".charCodeAt(0),Ss="\f".charCodeAt(0),Cs="\t".charCodeAt(0),xs="\r".charCodeAt(0),Is="[".charCodeAt(0),As="]".charCodeAt(0),Es="(".charCodeAt(0),Os=")".charCodeAt(0),Rs="{".charCodeAt(0),Ms="}".charCodeAt(0),js=";".charCodeAt(0),Ns="*".charCodeAt(0),_s=":".charCodeAt(0),zs="@".charCodeAt(0),Ts=/[\t\n\f\r "#'()/;[\\\]{}]/g,Ps=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ls=/.[\r\n"'(/\\]/,Fs=/[\da-f]/i;let Ds=ns,Bs=class extends Ds{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)}};var Us=Bs;Bs.default=Bs,Ds.registerAtRule(Bs);let Ws,Vs,qs=ns,$s=class extends qs{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of n)s.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Ws(new Vs,this,e).stringify()}};$s.registerLazyResult=e=>{Ws=e},$s.registerProcessor=e=>{Vs=e};var Ys=$s;$s.default=$s,qs.registerRoot($s);let Zs={comma:e=>Zs.split(e,[","],!0),space:e=>Zs.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=h;return(r||""!==s)&&n.push(s.trim()),n}};var Gs=Zs;Zs.default=Zs;let Js=ns,Hs=Gs,Xs=class extends Js{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Hs.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)}};var Ks=Xs;Xs.default=Xs,Js.registerRule(Xs);let Qs=on,ei=function(e,t={}){let r,n,s,i,o,a,l,c,h,u,d=e.css.valueOf(),p=t.ignoreErrors,m=d.length,f=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&f>=m},nextToken:function(e){if(y.length)return y.pop();if(f>=m)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(f),r){case ks:case vs:case Cs:case xs:case Ss:n=f;do{n+=1,r=d.charCodeAt(n)}while(r===vs||r===ks||r===Cs||r===xs||r===Ss);u=["space",d.slice(f,n)],f=n-1;break;case Is:case As:case Rs:case Ms:case _s:case js:case Os:{let e=String.fromCharCode(r);u=[e,e,f];break}case Es:if(c=g.length?g.pop()[1]:"",h=d.charCodeAt(f+1),"url"===c&&h!==gs&&h!==ys&&h!==vs&&h!==ks&&h!==Cs&&h!==Ss&&h!==xs){n=f;do{if(a=!1,n=d.indexOf(")",n+1),-1===n){if(p||t){n=f;break}b("bracket")}for(l=n;d.charCodeAt(l-1)===bs;)l-=1,a=!a}while(a);u=["brackets",d.slice(f,n+1),f,n],f=n}else n=d.indexOf(")",f+1),i=d.slice(f,n+1),-1===n||Ls.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case gs:case ys:s=r===gs?"'":'"',n=f;do{if(a=!1,n=d.indexOf(s,n+1),-1===n){if(p||t){n=f+1;break}b("string")}for(l=n;d.charCodeAt(l-1)===bs;)l-=1,a=!a}while(a);u=["string",d.slice(f,n+1),f,n],f=n;break;case zs:Ts.lastIndex=f+1,Ts.test(d),n=0===Ts.lastIndex?d.length-1:Ts.lastIndex-2,u=["at-word",d.slice(f,n+1),f,n],f=n;break;case bs:for(n=f,o=!0;d.charCodeAt(n+1)===bs;)n+=1,o=!o;if(r=d.charCodeAt(n+1),o&&r!==ws&&r!==vs&&r!==ks&&r!==Cs&&r!==xs&&r!==Ss&&(n+=1,Fs.test(d.charAt(n)))){for(;Fs.test(d.charAt(n+1));)n+=1;d.charCodeAt(n+1)===vs&&(n+=1)}u=["word",d.slice(f,n+1),f,n],f=n;break;default:r===ws&&d.charCodeAt(f+1)===Ns?(n=d.indexOf("*/",f+2)+1,0===n&&(p||t?n=d.length:b("comment")),u=["comment",d.slice(f,n+1),f,n],f=n):(Ps.lastIndex=f+1,Ps.test(d),n=0===Ps.lastIndex?d.length-1:Ps.lastIndex-2,u=["word",d.slice(f,n+1),f,n],g.push(u),f=n)}return f++,u},position:function(){return f}}},ti=qn,ri=Us,ni=Ys,si=Ks;const ii={empty:!0,space:!0};let oi=ns,ai=class{constructor(e){this.input=e,this.root=new ni,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,s=new ri;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new ti;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=ei(this.input)}decl(e,t){let r=new Qs;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(n=e[a],"!important"===n[1].toLowerCase()){r.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(r.raws.important=t);break}if("important"===n[1].toLowerCase()){let t=e.slice(0),n="";for(let e=a;e>0;e--){let r=t[e][0];if(0===n.trim().indexOf("!")&&"space"!==r)break;n=t.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=t)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 si;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,i,o,a,l=r.length,c="",h=!0;for(let u=0;u<l;u+=1)s=r[u],i=s[0],"space"!==i||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",o=r[u+1]?r[u+1][0]:"empty",ii[a]||ii[o]||","===c.slice(-1)?h=!1:c+=s[1]):c+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new si;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&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},li=Mn;function ci(e,t){let r=new li(e,t),n=new ai(r);try{n.parse()}catch(s){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===s.name&&t&&t.from&&(/\.scss$/i.test(t.from)?s.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?s.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(s.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),s}return n.root}var hi=ci;ci.default=ci,oi.registerParse(ci);let{isClean:ui,my:di}=Wr,pi=Un,mi=Gr,fi=ns,gi=ls,yi=hs,bi=fs,wi=hi,ki=Ys;const vi={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Si={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},Ci={Once:!0,postcssPlugin:!0,prepare:!0};function xi(e){return"object"==typeof e&&"function"==typeof e.then}function Ii(e){let t=!1,r=vi[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 Ai(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:Ii(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ei(e){return e[ui]=!1,e.nodes&&e.nodes.forEach(e=>Ei(e)),e}let Oi={},Ri=class e{constructor(t,r,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof bi)s=Ei(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=wi;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(r,n)}catch(i){this.processed=!0,this.error=i}s&&!s[di]&&fi.rebuild(s)}else s=Ei(r);this.result=new bi(t,s,n),this.helpers={...Oi,postcss:Oi,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),i=n.split(".");(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(Xk){console&&console.error&&console.error(Xk)}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(!Si[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ci[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let r=0;r<this.plugins.length;r++){let t=this.plugins[r],n=this.runOnRoot(t);if(xi(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ui];){e[ui]=!0;let r=[Ai(e)];for(;r.length>0;){let e=this.visitTick(r);if(xi(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(t){throw this.handleError(t)}}}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));return xi(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=mi;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new pi(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(xi(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[ui];)e[ui]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||yi("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){let e;this.result.lastPlugin=n;try{e=s(t,this.helpers)}catch(r){throw this.handleError(r,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(xi(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex<n.length){let[e,s]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return s(r.toProxy(),this.helpers)}catch(i){throw this.handleError(i,r)}}if(0!==t.iterator){let n,s=t.iterator;for(;n=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!n[ui])return n[ui]=!0,void e.push(Ai(n));t.iterator=0,delete r.indexes[s]}let s=t.events;for(;t.eventIndex<s.length;){let e=s[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[ui]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[ui]=!0;let t=Ii(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[ui]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,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"}};Ri.registerPostcss=e=>{Oi=e};var Mi=Ri;Ri.default=Ri,ki.registerLazyResult(Ri),gi.registerLazyResult(Ri);let ji=Un,Ni=Gr,_i=hs,zi=hi;const Ti=fs;let Pi=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=Ni;this.result=new Ti(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new ji(s,n,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||_i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=zi;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Li=Pi;Pi.default=Pi;let Fi=Li,Di=Mi,Bi=ls,Ui=Ys,Wi=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)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Di(this,e,t):new Fi(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vi=Wi;Wi.default=Wi,Ui.registerProcessor(Wi),Bi.registerProcessor(Wi);let qi=on,$i=fn,Yi=qn,Zi=Us,Gi=Mn,Ji=Ys,Hi=Ks;function Xi(e,t){if(Array.isArray(e))return e.map(e=>Xi(e));let{inputs:r,...n}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Gi.prototype};r.map&&(r.map={...r.map,__proto__:$i.prototype}),t.push(r)}}if(n.nodes&&(n.nodes=e.nodes.map(e=>Xi(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new Ji(n);if("decl"===n.type)return new qi(n);if("rule"===n.type)return new Hi(n);if("comment"===n.type)return new Yi(n);if("atrule"===n.type)return new Zi(n);throw new Error("Unknown node type: "+e.type)}var Ki=Xi;Xi.default=Xi;let Qi=Ur,eo=on,to=Mi,ro=ns,no=Vi,so=Gr,io=Ki,oo=ls,ao=ds,lo=qn,co=Us,ho=fs,uo=Mn,po=hi,mo=Gs,fo=Ks,go=Ys,yo=rn;function bo(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new no(e)}bo.plugin=function(e,t){let r,n=!1;function s(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=(new no).version,s}return Object.defineProperty(s,"postcss",{get:()=>(r||(r=s()),r)}),s.process=function(e,t,r){return bo([s(r)]).process(e,t)},s},bo.stringify=so,bo.parse=po,bo.fromJSON=io,bo.list=mo,bo.comment=e=>new lo(e),bo.atRule=e=>new co(e),bo.decl=e=>new eo(e),bo.rule=e=>new fo(e),bo.root=e=>new go(e),bo.document=e=>new oo(e),bo.CssSyntaxError=Qi,bo.Declaration=eo,bo.Container=ro,bo.Processor=no,bo.Document=oo,bo.Comment=lo,bo.Warning=ao,bo.AtRule=co,bo.Result=ho,bo.Input=uo,bo.Rule=fo,bo.Root=go,bo.Node=yo,to.registerPostcss(bo);var wo=bo;bo.default=bo;const ko=jr(wo);ko.stringify,ko.fromJSON,ko.plugin,ko.parse,ko.list,ko.document,ko.comment,ko.atRule,ko.rule,ko.decl,ko.root,ko.CssSyntaxError,ko.Declaration,ko.Container,ko.Processor,ko.Document,ko.Comment,ko.Warning,ko.AtRule,ko.Result,ko.Input,ko.Rule,ko.Root,ko.Node;var vo=Object.defineProperty,So=(e,t,r)=>((e,t,r)=>t in e?vo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Co(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function xo(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 n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Io={exports:{}},Ao=String,Eo=function(){return{isColorSupported:!1,reset:Ao,bold:Ao,dim:Ao,italic:Ao,underline:Ao,inverse:Ao,hidden:Ao,strikethrough:Ao,black:Ao,red:Ao,green:Ao,yellow:Ao,blue:Ao,magenta:Ao,cyan:Ao,white:Ao,gray:Ao,bgBlack:Ao,bgRed:Ao,bgGreen:Ao,bgYellow:Ao,bgBlue:Ao,bgMagenta:Ao,bgCyan:Ao,bgWhite:Ao}};Io.exports=Eo(),Io.exports.createColors=Eo;var Oo=Io.exports;const Ro=xo(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Mo=Oo,jo=Ro,No=class e extends Error{constructor(t,r,n,s,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Mo.isColorSupported),jo&&e&&(t=jo(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,gray:t,red:s}=Mo.createColors(!0);r=t=>e(s(t)),n=e=>t(e)}else r=n=e=>e;return s.slice(i,o).map((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var _o=No;No.default=No;var zo={};zo.isClean=Symbol("isClean"),zo.my=Symbol("my");const To={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Po=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],i=this.raw(s,"before");i&&this.builder(i),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],void 0!==n))return n;let s=e.parent;if("before"===r){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return To[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let s="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[s]?n=this[s](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var o;return void 0===n&&(n=To[r]),i.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.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,r.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,r.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&&(t=e.raws.between,void 0!==t))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,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Lo=Po;Po.default=Po;let Fo=Lo;function Do(e,t){new Fo(t).stringify(e)}var Bo=Do;Do.default=Do;let{isClean:Uo,my:Wo}=zo,Vo=_o,qo=Lo,$o=Bo;function Yo(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>Yo(e,r)):("object"===i&&null!==s&&(s=Yo(s)),r[n]=s)}return r}let Zo=class{constructor(e={}){this.raws={},this[Uo]=!1,this[Wo]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of 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=Yo(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}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Vo(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[Uo]){this[Uo]=!1;let e=this;for(;e=e.parent;)e[Uo]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let i=0;i<e;i++)"\n"===r[i]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new qo).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))r[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)r[i]=e.toJSON(null,t);else if("source"===i){let n=t.get(e.input);null==n&&(n=s,t.set(e.input,s),s++),r[i]={end:e.end,inputId:n,start:e.start}}else r[i]=e}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=$o){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}};var Go=Zo;Zo.default=Zo;let Jo=Go,Ho=class extends Jo{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]}};var Xo=Ho;Ho.default=Ho;var Ko={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Qo,SourceMapGenerator:ea}=Ro,{existsSync:ta,readFileSync:ra}=Ro,{dirname:na,join:sa}=Ro;let ia=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=na(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Qo(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=na(e),ta(e))return this.mapFile=e,ra(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Qo)return ea.fromSourceMap(t).toString();if(t instanceof ea)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=sa(na(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)}};var oa=ia;ia.default=ia;let{SourceMapConsumer:aa,SourceMapGenerator:la}=Ro,{fileURLToPath:ca,pathToFileURL:ha}=Ro,{isAbsolute:ua,resolve:da}=Ro,{nanoid:pa}=Ko,ma=Ro,fa=_o,ga=oa,ya=Symbol("fromOffsetCache"),ba=Boolean(aa&&la),wa=Boolean(da&&ua),ka=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!wa||/^\w+:\/\//.test(t.from)||ua(t.from)?this.file=t.from:this.file=da(t.from)),wa&&ba){let e=new ga(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 "+pa(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new fa(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new fa(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,n.plugin),s.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ha&&(s.input.url=ha(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[ya])r=this[ya];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[ya]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:da(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({column:n,line:r})),i=ua(a.source)?ha(a.source):new URL(a.source,this.map.consumer().sourceRoot||ha(this.map.mapFile));let l={column:a.column,endColumn:s&&s.column,endLine:s&&s.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ca)throw new Error("file: protocol is not available in this PostCSS build");l.file=ca(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var va=ka;ka.default=ka,ma&&ma.registerInput&&ma.registerInput(ka);let{SourceMapConsumer:Sa,SourceMapGenerator:Ca}=Ro,{dirname:xa,relative:Ia,resolve:Aa,sep:Ea}=Ro,{pathToFileURL:Oa}=Ro,Ra=va,Ma=Boolean(Sa&&Ca),ja=Boolean(xa&&Aa&&Ia&&Ea);var Na=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||xa(e.file);!1===this.mapOpts.sourcesContent?(t=new Sa(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),ja&&Ma&&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=Ca.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ca({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(){this.css="",this.map=new Ca({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,s="<no source>",i={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&&(i.generated.line=r,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?xa(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=xa(Aa(r,this.mapOpts.annotation)));let n=Ia(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Ra(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Oa){let t=Oa(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ea&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let _a=Go,za=class extends _a{constructor(e){super(e),this.type="comment"}};var Ta=za;za.default=za;let Pa,La,Fa,Da,{isClean:Ba,my:Ua}=zo,Wa=Xo,Va=Ta,qa=Go;function $a(e){return e.map(e=>(e.nodes&&(e.nodes=$a(e.nodes)),delete e.source,e))}function Ya(e){if(e[Ba]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Ya(t)}let Za=class e extends qa{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let i of s)this.proxyOf.nodes.splice(n+1,0,i);for(let i in this.indexes)r=this.indexes[i],n<r&&(this.indexes[i]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n,0,o);for(let o in this.indexes)r=this.indexes[o],n<=r&&(this.indexes[o]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=$a(Pa(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Wa(t)]}else if(t.selector)t=[new La(t)];else if(t.name)t=[new Fa(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Va(t)]}return t.map(t=>(t[Ua]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ba]&&Ya(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){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(s){throw t.addToError(s)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Za.registerParse=e=>{Pa=e},Za.registerRule=e=>{La=e},Za.registerAtRule=e=>{Fa=e},Za.registerRoot=e=>{Da=e};var Ga=Za;Za.default=Za,Za.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Fa.prototype):"rule"===e.type?Object.setPrototypeOf(e,La.prototype):"decl"===e.type?Object.setPrototypeOf(e,Wa.prototype):"comment"===e.type?Object.setPrototypeOf(e,Va.prototype):"root"===e.type&&Object.setPrototypeOf(e,Da.prototype),e[Ua]=!0,e.nodes&&e.nodes.forEach(e=>{Za.rebuild(e)})};let Ja,Ha,Xa=Ga,Ka=class extends Xa{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ja(new Ha,this,e).stringify()}};Ka.registerLazyResult=e=>{Ja=e},Ka.registerProcessor=e=>{Ha=e};var Qa=Ka;Ka.default=Ka;let el={};var tl=function(e){el[e]||(el[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let rl=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 r in t)this[r]=t[r]}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}};var nl=rl;rl.default=rl;let sl=nl,il=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 sl(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var ol=il;il.default=il;const al="'".charCodeAt(0),ll='"'.charCodeAt(0),cl="\\".charCodeAt(0),hl="/".charCodeAt(0),ul="\n".charCodeAt(0),dl=" ".charCodeAt(0),pl="\f".charCodeAt(0),ml="\t".charCodeAt(0),fl="\r".charCodeAt(0),gl="[".charCodeAt(0),yl="]".charCodeAt(0),bl="(".charCodeAt(0),wl=")".charCodeAt(0),kl="{".charCodeAt(0),vl="}".charCodeAt(0),Sl=";".charCodeAt(0),Cl="*".charCodeAt(0),xl=":".charCodeAt(0),Il="@".charCodeAt(0),Al=/[\t\n\f\r "#'()/;[\\\]{}]/g,El=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ol=/.[\r\n"'(/\\]/,Rl=/[\da-f]/i;let Ml=Ga,jl=class extends Ml{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)}};var Nl=jl;jl.default=jl,Ml.registerAtRule(jl);let _l,zl,Tl=Ga,Pl=class extends Tl{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of n)s.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new _l(new zl,this,e).stringify()}};Pl.registerLazyResult=e=>{_l=e},Pl.registerProcessor=e=>{zl=e};var Ll=Pl;Pl.default=Pl,Tl.registerRoot(Pl);let Fl={comma:e=>Fl.split(e,[","],!0),space:e=>Fl.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=h;return(r||""!==s)&&n.push(s.trim()),n}};var Dl=Fl;Fl.default=Fl;let Bl=Ga,Ul=Dl,Wl=class extends Bl{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ul.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)}};var Vl=Wl;Wl.default=Wl,Bl.registerRule(Wl);let ql=Xo,$l=function(e,t={}){let r,n,s,i,o,a,l,c,h,u,d=e.css.valueOf(),p=t.ignoreErrors,m=d.length,f=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&f>=m},nextToken:function(e){if(y.length)return y.pop();if(f>=m)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(f),r){case ul:case dl:case ml:case fl:case pl:n=f;do{n+=1,r=d.charCodeAt(n)}while(r===dl||r===ul||r===ml||r===fl||r===pl);u=["space",d.slice(f,n)],f=n-1;break;case gl:case yl:case kl:case vl:case xl:case Sl:case wl:{let e=String.fromCharCode(r);u=[e,e,f];break}case bl:if(c=g.length?g.pop()[1]:"",h=d.charCodeAt(f+1),"url"===c&&h!==al&&h!==ll&&h!==dl&&h!==ul&&h!==ml&&h!==pl&&h!==fl){n=f;do{if(a=!1,n=d.indexOf(")",n+1),-1===n){if(p||t){n=f;break}b("bracket")}for(l=n;d.charCodeAt(l-1)===cl;)l-=1,a=!a}while(a);u=["brackets",d.slice(f,n+1),f,n],f=n}else n=d.indexOf(")",f+1),i=d.slice(f,n+1),-1===n||Ol.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case al:case ll:s=r===al?"'":'"',n=f;do{if(a=!1,n=d.indexOf(s,n+1),-1===n){if(p||t){n=f+1;break}b("string")}for(l=n;d.charCodeAt(l-1)===cl;)l-=1,a=!a}while(a);u=["string",d.slice(f,n+1),f,n],f=n;break;case Il:Al.lastIndex=f+1,Al.test(d),n=0===Al.lastIndex?d.length-1:Al.lastIndex-2,u=["at-word",d.slice(f,n+1),f,n],f=n;break;case cl:for(n=f,o=!0;d.charCodeAt(n+1)===cl;)n+=1,o=!o;if(r=d.charCodeAt(n+1),o&&r!==hl&&r!==dl&&r!==ul&&r!==ml&&r!==fl&&r!==pl&&(n+=1,Rl.test(d.charAt(n)))){for(;Rl.test(d.charAt(n+1));)n+=1;d.charCodeAt(n+1)===dl&&(n+=1)}u=["word",d.slice(f,n+1),f,n],f=n;break;default:r===hl&&d.charCodeAt(f+1)===Cl?(n=d.indexOf("*/",f+2)+1,0===n&&(p||t?n=d.length:b("comment")),u=["comment",d.slice(f,n+1),f,n],f=n):(El.lastIndex=f+1,El.test(d),n=0===El.lastIndex?d.length-1:El.lastIndex-2,u=["word",d.slice(f,n+1),f,n],g.push(u),f=n)}return f++,u},position:function(){return f}}},Yl=Ta,Zl=Nl,Gl=Ll,Jl=Vl;const Hl={empty:!0,space:!0};let Xl=Ga,Kl=class{constructor(e){this.input=e,this.root=new Gl,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,s=new Zl;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new Yl;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=$l(this.input)}decl(e,t){let r=new ql;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(n=e[a],"!important"===n[1].toLowerCase()){r.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(r.raws.important=t);break}if("important"===n[1].toLowerCase()){let t=e.slice(0),n="";for(let e=a;e>0;e--){let r=t[e][0];if(0===n.trim().indexOf("!")&&"space"!==r)break;n=t.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=t)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 Jl;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,i,o,a,l=r.length,c="",h=!0;for(let u=0;u<l;u+=1)s=r[u],i=s[0],"space"!==i||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",o=r[u+1]?r[u+1][0]:"empty",Hl[a]||Hl[o]||","===c.slice(-1)?h=!1:c+=s[1]):c+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new Jl;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&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Ql=va;function ec(e,t){let r=new Ql(e,t),n=new Kl(r);try{n.parse()}catch(s){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===s.name&&t&&t.from&&(/\.scss$/i.test(t.from)?s.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?s.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(s.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),s}return n.root}var tc=ec;ec.default=ec,Xl.registerParse(ec);let{isClean:rc,my:nc}=zo,sc=Na,ic=Bo,oc=Ga,ac=Qa,lc=tl,cc=ol,hc=tc,uc=Ll;const dc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pc={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},mc={Once:!0,postcssPlugin:!0,prepare:!0};function fc(e){return"object"==typeof e&&"function"==typeof e.then}function gc(e){let t=!1,r=dc[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 yc(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:gc(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function bc(e){return e[rc]=!1,e.nodes&&e.nodes.forEach(e=>bc(e)),e}let wc={},kc=class e{constructor(t,r,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof cc)s=bc(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=hc;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(r,n)}catch(i){this.processed=!0,this.error=i}s&&!s[nc]&&oc.rebuild(s)}else s=bc(r);this.result=new cc(t,s,n),this.helpers={...wc,postcss:wc,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),i=n.split(".");(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(Xk){console&&console.error&&console.error(Xk)}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(!pc[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!mc[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let r=0;r<this.plugins.length;r++){let t=this.plugins[r],n=this.runOnRoot(t);if(fc(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rc];){e[rc]=!0;let r=[yc(e)];for(;r.length>0;){let e=this.visitTick(r);if(fc(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(t){throw this.handleError(t)}}}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));return fc(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=ic;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new sc(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(fc(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[rc];)e[rc]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||lc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){let e;this.result.lastPlugin=n;try{e=s(t,this.helpers)}catch(r){throw this.handleError(r,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(fc(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex<n.length){let[e,s]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return s(r.toProxy(),this.helpers)}catch(i){throw this.handleError(i,r)}}if(0!==t.iterator){let n,s=t.iterator;for(;n=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!n[rc])return n[rc]=!0,void e.push(yc(n));t.iterator=0,delete r.indexes[s]}let s=t.events;for(;t.eventIndex<s.length;){let e=s[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[rc]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[rc]=!0;let t=gc(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[rc]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,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"}};kc.registerPostcss=e=>{wc=e};var vc=kc;kc.default=kc,uc.registerLazyResult(kc),ac.registerLazyResult(kc);let Sc=Na,Cc=Bo,xc=tl,Ic=tc;const Ac=ol;let Ec=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=Cc;this.result=new Ac(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Sc(s,n,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||xc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=Ic;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Oc=Ec;Ec.default=Ec;let Rc=Oc,Mc=vc,jc=Qa,Nc=Ll,_c=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)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Mc(this,e,t):new Rc(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var zc=_c;_c.default=_c,Nc.registerProcessor(_c),jc.registerProcessor(_c);let Tc=Xo,Pc=oa,Lc=Ta,Fc=Nl,Dc=va,Bc=Ll,Uc=Vl;function Wc(e,t){if(Array.isArray(e))return e.map(e=>Wc(e));let{inputs:r,...n}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Dc.prototype};r.map&&(r.map={...r.map,__proto__:Pc.prototype}),t.push(r)}}if(n.nodes&&(n.nodes=e.nodes.map(e=>Wc(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new Bc(n);if("decl"===n.type)return new Tc(n);if("rule"===n.type)return new Uc(n);if("comment"===n.type)return new Lc(n);if("atrule"===n.type)return new Fc(n);throw new Error("Unknown node type: "+e.type)}var Vc=Wc;Wc.default=Wc;let qc=_o,$c=Xo,Yc=vc,Zc=Ga,Gc=zc,Jc=Bo,Hc=Vc,Xc=Qa,Kc=nl,Qc=Ta,eh=Nl,th=ol,rh=va,nh=tc,sh=Dl,ih=Vl,oh=Ll,ah=Go;function lh(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Gc(e)}lh.plugin=function(e,t){let r,n=!1;function s(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=(new Gc).version,s}return Object.defineProperty(s,"postcss",{get:()=>(r||(r=s()),r)}),s.process=function(e,t,r){return lh([s(r)]).process(e,t)},s},lh.stringify=Jc,lh.parse=nh,lh.fromJSON=Hc,lh.list=sh,lh.comment=e=>new Qc(e),lh.atRule=e=>new eh(e),lh.decl=e=>new $c(e),lh.rule=e=>new ih(e),lh.root=e=>new oh(e),lh.document=e=>new Xc(e),lh.CssSyntaxError=qc,lh.Declaration=$c,lh.Container=Zc,lh.Processor=Gc,lh.Document=Xc,lh.Comment=Qc,lh.Warning=Kc,lh.AtRule=eh,lh.Result=th,lh.Input=rh,lh.Rule=ih,lh.Root=oh,lh.Node=ah,Yc.registerPostcss(lh);var ch=lh;lh.default=lh;const hh=Co(ch);hh.stringify,hh.fromJSON,hh.plugin,hh.parse,hh.list,hh.document,hh.comment,hh.atRule,hh.rule,hh.decl,hh.root,hh.CssSyntaxError,hh.Declaration,hh.Container,hh.Processor,hh.Document,hh.Comment,hh.Warning,hh.AtRule,hh.Result,hh.Input,hh.Rule,hh.Root,hh.Node;let uh=class e{constructor(...e){So(this,"parentElement",null),So(this,"parentNode",null),So(this,"ownerDocument"),So(this,"firstChild",null),So(this,"lastChild",null),So(this,"previousSibling",null),So(this,"nextSibling",null),So(this,"ELEMENT_NODE",1),So(this,"TEXT_NODE",3),So(this,"nodeType"),So(this,"nodeName"),So(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const dh={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ph={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},mh={};function fh(e){if(mh[e])return mh[e];const t=globalThis[e],r=t.prototype,n=e in dh?dh[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in ph?ph[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&o&&!globalThis.Zone)return mh[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const i=s[e].prototype;return document.body.removeChild(n),i?mh[e]=i:r}catch{return r}}const gh={};function yh(e,t,r){var n;const s=`${e}.${String(r)}`;if(gh[s])return gh[s].call(t);const i=fh(e),o=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return o?(gh[s]=o,o.call(t)):t[r]}const bh={};function wh(e,t,r){const n=`${e}.${String(r)}`;if(bh[n])return bh[n].bind(t);const s=fh(e)[r];return"function"!=typeof s?t[r]:(bh[n]=s,s.bind(t))}function kh(){return fh("MutationObserver").constructor}const vh={childNodes:function(e){return yh("Node",e,"childNodes")},parentNode:function(e){return yh("Node",e,"parentNode")},parentElement:function(e){return yh("Node",e,"parentElement")},textContent:function(e){return yh("Node",e,"textContent")},contains:function(e,t){return wh("Node",e,"contains")(t)},getRootNode:function(e){return wh("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?yh("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?yh("Element",e,"shadowRoot"):null},querySelector:function(e,t){return yh("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return yh("Element",e,"querySelectorAll")(t)},mutationObserver:kh};function Sh(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const Ch="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.";let xh={map:{},getId:()=>(console.error(Ch),-1),getNode:()=>(console.error(Ch),null),removeNodeFromMap(){console.error(Ch)},has:()=>(console.error(Ch),!1),reset(){console.error(Ch)}};function Ih(e,t,r={}){let n=null,s=0;return function(...i){const o=Date.now();s||!1!==r.leading||(s=o);const a=t-(o-s),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),s=o,e.apply(l,i)):n||!1===r.trailing||(n=setTimeout(()=>{s=!1===r.leading?0:Date.now(),n=null,e.apply(l,i)},a))}}function Ah(e,t,r,n,s=window){const i=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>Ah(e,t,i||{},!0)}function Eh(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(xh=new Proxy(xh,{get:(e,t,r)=>("map"===t&&console.error(Ch),Reflect.get(e,t,r))}));let Oh=Date.now;function Rh(e){var t,r,n,s;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=vh.parentElement(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(n=vh.parentElement(i.body))?void 0:n.scrollTop)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollTop)||0}}function Mh(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function jh(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nh(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:vh.parentElement(e)}function _h(e,t,r,n){if(!e)return!1;const s=Nh(e);if(!s)return!1;try{if("string"==typeof t){if(s.classList.contains(t))return!0;if(n&&null!==s.closest("."+t))return!0}else if(Ar(s,t,n))return!0}catch(i){}if(r){if(s.matches(r))return!0;if(n&&null!==s.closest(r))return!0}return!1}function zh(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Th(e,t){if(Ht(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=vh.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Th(n,t))}function Ph(e){return Boolean(e.changedTouches)}function Lh(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Fh(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Dh(e){return!!e&&(e instanceof uh&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(vh.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Oh=()=>(new Date).getTime());let Bh=class{constructor(){Pt(this,"id",1),Pt(this,"styleIDMap",new WeakMap),Pt(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return 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 Uh(e){var t;let r=null;return"getRootNode"in e&&(null==(t=vh.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&vh.host(vh.getRootNode(e))&&(r=vh.host(vh.getRootNode(e))),r}function Wh(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=Uh(r);)r=t;return r}(e);return vh.contains(t,r)}function Vh(e){const t=e.ownerDocument;return!!t&&(vh.contains(t,e)||Wh(e))}var qh=(e=>(e[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))(qh||{}),$h=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))($h||{}),Yh=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Yh||{}),Zh=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Zh||{}),Gh=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Gh||{}),Jh=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Jh||{}),Hh=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Hh||{});function Xh(e){return"__ln"in e}class Kh{constructor(){Pt(this,"length",0),Pt(this,"head",null),Pt(this,"tail",null)}get(e){if(e>=this.length)throw new 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){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Xh(e.previousSibling)){const 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&&Xh(e.nextSibling)&&e.nextSibling.__ln.previous){const 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){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Qh=(e,t)=>`${e}@${t}`;class eu{constructor(){Pt(this,"frozen",!1),Pt(this,"locked",!1),Pt(this,"texts",[]),Pt(this,"attributes",[]),Pt(this,"attributeMap",new WeakMap),Pt(this,"removes",[]),Pt(this,"mapRemoves",[]),Pt(this,"movedMap",{}),Pt(this,"addedSet",new Set),Pt(this,"movedSet",new Set),Pt(this,"droppedSet",new Set),Pt(this,"removesSubTreeCache",new Set),Pt(this,"mutationCb"),Pt(this,"blockClass"),Pt(this,"blockSelector"),Pt(this,"maskTextClass"),Pt(this,"maskTextSelector"),Pt(this,"inlineStylesheet"),Pt(this,"maskInputOptions"),Pt(this,"maskTextFn"),Pt(this,"maskInputFn"),Pt(this,"keepIframeSrcFn"),Pt(this,"recordCanvas"),Pt(this,"inlineImages"),Pt(this,"slimDOMOptions"),Pt(this,"dataURLOptions"),Pt(this,"doc"),Pt(this,"mirror"),Pt(this,"iframeManager"),Pt(this,"stylesheetManager"),Pt(this,"shadowDomManager"),Pt(this,"canvasManager"),Pt(this,"processedNodeManager"),Pt(this,"unattachedDoc"),Pt(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Pt(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Kh,n=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},s=s=>{const i=vh.parentNode(s);if(!i||!Vh(s))return;let o=!1;if(s.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=Ht(i)?this.mirror.getId(Uh(s)):this.mirror.getId(i),l=n(s);if(-1===a||-1===l)return r.addNode(s);const c=Mr(s,{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=>{Lh(e,this.mirror)&&this.iframeManager.addIframe(e),Fh(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Dh(s)&&this.shadowDomManager.addShadowRoot(vh.shadowRoot(s),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)ru(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(vh.parentNode(a))||s(a);for(const a of this.addedSet)nu(this.droppedSet,a)||ru(this.removesSubTreeCache,a,this.mirror)?nu(this.movedSet,a)?s(a):this.droppedSet.add(a):s(a);let i=null;for(;r.length;){let e=null;if(i){const t=this.mirror.getId(vh.parentNode(i.value)),r=n(i.value);-1!==t&&-1!==r&&(e=i)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(vh.parentNode(r.value));if(-1===n(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,n=vh.parentNode(t);if(n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=vh.host(n);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}i=e.previous,r.removeNode(e.value),s(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,r=vh.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}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))}),Pt(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(vh.childNodes(e),e=>vh.textContent(e)||"").join("")}),Pt(this,"processMutation",e=>{if(!zh(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=vh.textContent(e.target);_h(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,Nh(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const r=e.target;let n=e.attributeName,s=e.target.getAttribute(n);if("value"===n){const e=sr(r);s=tr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:e,value:s,maskInputFn:this.maskInputFn})}if(_h(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===r.tagName&&"src"===n&&!this.keepIframeSrcFn(s)){if(r.contentDocument)return;n="rr_src"}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),"type"===n&&"INPUT"===r.tagName&&"password"===(e.oldValue||"").toLowerCase()&&r.setAttribute("data-rr-is-password","true"),!Ir(r.tagName,n))if(i.attributes[n]=xr(this.doc,rr(r.tagName),rr(n),s),"style"===n){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(r.style)){const t=r.style.getPropertyValue(e),s=r.style.getPropertyPriority(e);t!==n.style.getPropertyValue(e)||s!==n.style.getPropertyPriority(e)?i.styleDiff[e]=""===s?t:[t,s]:i._unchangedStyles[e]=[t,s]}for(const e of Array.from(n.style))""===r.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===n&&"DIALOG"===r.tagName&&(r.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(_h(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=>{const r=this.mirror.getId(t),n=Ht(e.target)?this.mirror.getId(vh.host(e.target)):this.mirror.getId(e.target);_h(e.target,this.blockClass,this.blockSelector,!1)||zh(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(tu(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Th(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Qh(r,n)]?tu(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!(!Ht(e.target)||!Xt(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),vh.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Pt(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(zh(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[Qh(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_h(e,this.blockClass,this.blockSelector,!1)||(vh.childNodes(e).forEach(e=>this.genAdds(e)),Dh(e)&&vh.childNodes(vh.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function tu(e,t){e.delete(t),vh.childNodes(t).forEach(t=>tu(e,t))}function ru(e,t,r){return 0!==e.size&&function(e,t){const r=vh.parentNode(t);return!!r&&e.has(r)}(e,t)}function nu(e,t){return 0!==e.size&&su(e,t)}function su(e,t){const r=vh.parentNode(t);return!!r&&(!!e.has(r)||su(e,r))}let iu;const ou=e=>{if(!iu)return e;return(...t)=>{try{return e(...t)}catch(r){if(iu&&!0===iu(r))return;throw r}}},au=[];function lu(e){try{if("composedPath"in e){const 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 cu(e,t){const r=new eu;au.push(r),r.init(e);const n=new(kh())(ou(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function hu({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(Yh).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=rr(i);const c=(t=>i=>{const o=lu(i);if(_h(o,n,s,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Zh.Mouse;break;case"touch":a=Zh.Touch;break;case"pen":a=Zh.Pen}a===Zh.Touch?Yh[t]===Yh.MouseDown?c="TouchStart":Yh[t]===Yh.MouseUp&&(c="TouchEnd"):Zh.Pen}else Ph(i)&&(a=Zh.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Zh.Touch||c.startsWith("Mouse")&&a===Zh.Mouse)&&(a=null)):Yh[t]===Yh.Click&&(a=l,l=null);const h=Ph(i)?i.changedTouches[0]:i;if(!h)return;const u=r.getId(o),{clientX:d,clientY:p}=h;ou(e)({type:Yh[c],id:u,x:d,y:p,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Yh[i]){case Yh.MouseDown:case Yh.MouseUp:o=o.replace("mouse","pointer");break;case Yh.TouchStart:case Yh.TouchEnd:return}a.push(Sh(o,c,t))}),ou(()=>{a.forEach(e=>e())})}function uu({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:i}){return Sh("scroll",ou(Ih(ou(i=>{const o=lu(i);if(!o||_h(o,n,s,!0))return;const a=r.getId(o);if(o===t&&t.defaultView){const r=Rh(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const du=["INPUT","TEXTAREA","SELECT"],pu=new WeakMap;function mu(e){return function(e,t){if(bu("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||bu("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||bu("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||bu("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function fu(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function gu({mirror:e,stylesheetManager:t},r){var n,s,i;let o=null;o="#document"===r.nodeName?e.getId(r):e.getId(vh.host(r));const a="#document"===r.nodeName?null==(n=r.defaultView)?void 0:n.Document:null==(i=null==(s=r.ownerDocument)?void 0:s.defaultView)?void 0:i.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;const n=null==(r=l.set)?void 0:r.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(s){}return n}}),ou(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function yu(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let n;!function(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:d,selectionCb:p,customElementCb:m}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),s(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...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),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)},e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),m(...e)}}(e,t),e.recordDOM&&(n=cu(e,e.doc));const s=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=Ih(ou(t=>{const r=Date.now()-o;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],o=null}),i),c=ou(Ih(ou(e=>{const t=lu(e),{clientX:r,clientY:s}=Ph(e)?e.changedTouches[0]:e;o||(o=Oh()),a.push({x:r,y:s,id:n.getId(t),timeOffset:Oh()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?$h.Drag:e instanceof MouseEvent?$h.MouseMove:$h.TouchMove)}),s,{trailing:!1})),h=[Sh("mousemove",c,r),Sh("touchmove",c,r),Sh("drag",c,r)];return ou(()=>{h.forEach(e=>e())})}(e),i=hu(e),o=uu(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return Sh("resize",ou(Ih(ou(()=>{const t=Mh(),s=jh();r===t&&n===s||(e({width:Number(s),height:Number(t)}),r=t,n=s)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let r=lu(e);const c=e.isTrusted,u=r&&r.tagName;if(r&&"OPTION"===u&&(r=vh.parentElement(r)),!r||!u||du.indexOf(u)<0||_h(r,n,s,!0))return;if(r.classList.contains(i)||o&&r.matches(o))return;let p=r.value,m=!1;const f=sr(r)||"";"radio"===f||"checkbox"===f?m=r.checked:(a[u.toLowerCase()]||a[f])&&(p=tr({element:r,maskInputOptions:a,tagName:u,type:f,value:p,maskInputFn:l})),d(r,h?{text:p,isChecked:m,userTriggered:c}:{text:p,isChecked:m});const g=r.name;"radio"===f&&g&&m&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;d(e,h?{text:t,isChecked:!m,userTriggered:!1}:{text:t,isChecked:!m})}})}function d(t,n){const s=pu.get(t);if(!s||s.text!==n.text||s.isChecked!==n.isChecked){pu.set(t,n);const s=r.getId(t);ou(e)({...n,id:s})}}const p=("last"===c.input?["change"]:["input","change"]).map(e=>Sh(e,ou(u),t)),m=t.defaultView;if(!m)return()=>{p.forEach(e=>e())};const f=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),g=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return f&&f.set&&p.push(...g.map(e=>Ah(e[0],e[1],{set(){ou(u)({target:this,isTrusted:!1})}},!1,m))),ou(()=>{p.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:i}){const o=ou(i=>Ih(ou(s=>{const o=lu(s);if(!o||_h(o,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:n.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),s.media||500)),a=[Sh("play",o(Jh.Play),i),Sh("pause",o(Jh.Pause),i),Sh("seeked",o(Jh.Seeked),i),Sh("volumechange",o(Jh.VolumeChange),i),Sh("ratechange",o(Jh.RateChange),i)];return ou(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:ou((n,s,i)=>{const[o,a]=i,{id:l,styleId:c}=fu(s,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),n.apply(s,i)})}),n.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const s=`${e} { ${t} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[s,r])};const i=n.CSSStyleSheet.prototype.deleteRule;let o,a;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ou((n,s,i)=>{const[o]=i,{id:a,styleId:l}=fu(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),n.apply(s,i)})}),n.CSSStyleSheet.prototype.removeRule=function(e){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ou((n,s,i)=>{const[o]=i,{id:a,styleId:l}=fu(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),n.apply(s,i)})})),n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ou((n,s,i)=>{const[o]=i,{id:a,styleId:l}=fu(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),n.apply(s,i)})}));const l={};wu("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(wu("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),wu("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),wu("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(l).forEach(([n,s])=>{c[n]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[n].insertRule,{apply:ou((n,s,i)=>{const[o,a]=i,{id:l,styleId:c}=fu(s.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...mu(s),a||0]}]}),n.apply(s,i)})}),s.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:ou((n,s,i)=>{const[o]=i,{id:a,styleId:l}=fu(s.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...mu(s),o]}]}),n.apply(s,i)})})}),ou(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=i,o&&(n.CSSStyleSheet.prototype.replace=o),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),u=gu(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){const i=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ou((s,o,a)=>{var l;const[c,h,u]=a;if(r.has(c))return i.apply(o,[c,h,u]);const{id:d,styleId:p}=fu(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:h,priority:u},index:mu(o.parentRule)}),s.apply(o,a)})});const o=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ou((s,i,a)=>{var l;const[c]=a;if(r.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=fu(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:mu(i.parentRule)}),s.apply(i,a)})}),ou(()=>{s.CSSStyleDeclaration.prototype.setProperty=i,s.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:r}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],s=new WeakMap,i=r.FontFace;r.FontFace=function(e,t,r){const n=new i(e,t,r);return s.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};const o=Eh(t.fonts,"add",function(t){return function(r){return setTimeout(ou(()=>{const t=s.get(r);t&&(e(t),s.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=i}),n.push(o),ou(()=>{n.forEach(e=>e())})}(e)));const m=function(e){const{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:i}=e;let o=!0;const a=ou(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;_h(o,n,s,!0)||_h(c,n,s,!0)||a.push({start:r.getId(o),startOffset:l,end:r.getId(c),endOffset:h})}i({ranges:a})});return a(),Sh("selectionchange",a)}(e),f=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Eh(r.customElements,"define",function(e){return function(r,n,s){try{t({define:{name:r}})}catch(i){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,n,s])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,r,y.options));return ou(()=>{au.forEach(e=>e.reset()),null==n||n.disconnect(),s(),i(),o(),a(),l(),c(),h(),u(),d(),p(),m(),f(),g.forEach(e=>e())})}function bu(e){return void 0!==window[e]}function wu(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class ku{constructor(e){Pt(this,"iframeIdToRemoteIdMap",new WeakMap),Pt(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){const s=r||this.getIdToRemoteIdMap(e),i=n||this.getRemoteIdToIdMap(e);let o=s.get(t);return o||(o=this.generateIdFn(),s.set(t,o),i.set(o,t)),o}getIds(e,t){const r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){const n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const s=n.get(t);return s||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);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 vu{constructor(e){Pt(this,"iframes",new WeakMap),Pt(this,"crossOriginIframeMap",new WeakMap),Pt(this,"crossOriginIframeMirror",new ku(fr)),Pt(this,"crossOriginIframeStyleMirror"),Pt(this,"crossOriginIframeRootIdMap",new WeakMap),Pt(this,"mirror"),Pt(this,"mutationCb"),Pt(this,"wrappedEmit"),Pt(this,"loadListener"),Pt(this,"stylesheetManager"),Pt(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ku(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case qh.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:qh.IncrementalSnapshot,data:{source:$h.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case qh.Meta:case qh.Load:case qh.DomContentLoaded:return!1;case qh.Plugin:return t;case qh.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case qh.IncrementalSnapshot:switch(t.data.source){case $h.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),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 $h.Drag:case $h.TouchMove:case $h.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case $h.ViewportResize:return!1;case $h.MediaInteraction:case $h.MouseInteraction:case $h.Scroll:case $h.CanvasMutation:case $h.Input:return this.replaceIds(t.data,e,["id"]),t;case $h.StyleSheetRule:case $h.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case $h.Font:return t;case $h.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case $h.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(const s of n)(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]));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===Hh.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Su{constructor(e){Pt(this,"shadowDoms",new WeakSet),Pt(this,"mutationCb"),Pt(this,"scrollCb"),Pt(this,"bypassOptions"),Pt(this,"mirror"),Pt(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(!Xt(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=cu({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(uu({...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(vh.host(e))),this.restoreHandlers.push(gu({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){const r=this;this.restoreHandlers.push(Eh(e.prototype,"attachShadow",function(e){return function(n){const s=e.call(this,n),i=vh.shadowRoot(this);return i&&Vh(this)&&r.addShadowRoot(i,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Cu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",xu="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Iu=0;Iu<64;Iu++)xu[Cu.charCodeAt(Iu)]=Iu;const Au=new Map;const Eu=(e,t,r)=>{if(!e||!Mu(e,t)&&"object"!=typeof e)return;const n=function(e,t){let r=Au.get(e);return r||(r=new Map,Au.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let s=n.indexOf(e);return-1===s&&(s=n.length,n.push(e)),s};function Ou(e,t,r){if(e instanceof Array)return e.map(e=>Ou(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,s="";for(t=0;t<n;t+=3)s+=Cu[r[t]>>2],s+=Cu[(3&r[t])<<4|r[t+1]>>4],s+=Cu[(15&r[t+1])<<2|r[t+2]>>6],s+=Cu[63&r[t+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ou(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ou(e.data,t,r),e.width,e.height]}}if(Mu(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Eu(e,t,r)}}return e}const Ru=(e,t,r)=>e.map(e=>Ou(e,t,r)),Mu=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function ju(e,t,r,n){const s=[];try{const i=Eh(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(s,...i){if(!_h(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...i])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(e=>e())}}function Nu(e,t,r,n,s,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Eh(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Eu(a,i,this),"tagName"in this.canvas&&!_h(this.canvas,n,s,!0)){const e=Ru(o,i,this),n={type:t,property:l,args:e};r(this.canvas,n)}return a}});o.push(a)}catch{const n=Ah(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(n)}return o}const _u="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",zu="undefined"!=typeof window&&window.Blob&&new Blob([(Tu=_u,Uint8Array.from(atob(Tu),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Tu;function Pu(e){let t;try{if(t=zu&&(window.URL||window.webkitURL).createObjectURL(zu),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),r}catch(r){return new Worker("data:text/javascript;base64,"+_u,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Lu{constructor(e){Pt(this,"pendingCanvasMutations",new Map),Pt(this,"rafStamps",{latestId:0,invokeId:null}),Pt(this,"mirror"),Pt(this,"mutationCb"),Pt(this,"resetObservers"),Pt(this,"frozen",!1),Pt(this,"locked",!1),Pt(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:n,blockSelector:s,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(r,n,s),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,s,{dataURLOptions:o})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,s){const i=ju(t,r,n,!0),o=new Map,a=new Pu;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:r,type:n,width:s,height:i}=e.data;this.mutationCb({id:t,type:Gh["2D"],commands:[{property:"clearRect",args:[0,0,s,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{_h(t,r,n,!0)||e.push(t)}),e})().forEach(async e=>{var t;const r=this.mirror.getId(e);if(o.get(r))return;if(0===e.width||0===e.height)return;if(o.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const n=await createImageBitmap(e);a.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:s.dataURLOptions},[n])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=ju(e,t,r,!1),s=function(e,t,r,n){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=Eh(t.CanvasRenderingContext2D.prototype,o,function(s){return function(...i){return _h(this.canvas,r,n,!0)||setTimeout(()=>{const r=Ru(i,t,this);e(this.canvas,{type:Gh["2D"],property:o,args:r})},0),s.apply(this,i)}});s.push(i)}catch{const r=Ah(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Gh["2D"],property:o,args:[t],setter:!0})}});s.push(r)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),i=function(e,t,r,n){const s=[];return s.push(...Nu(t.WebGLRenderingContext.prototype,Gh.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Nu(t.WebGL2RenderingContext.prototype,Gh.WebGL2,e,r,n,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),s(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const n=r.map(e=>{const{type:t,...r}=e;return r}),{type:s}=r[0];this.mutationCb({id:t,type:s,commands:n}),this.pendingCanvasMutations.delete(e)}}class Fu{constructor(e){Pt(this,"trackedLinkElements",new WeakSet),Pt(this,"mutationCb"),Pt(this,"adoptedStyleSheetCb"),Pt(this,"styleMirror",new Bh),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;const r={id:t,styleIds:[]},n=[];for(const s of e){let e;this.styleMirror.has(s)?e=this.styleMirror.getId(s):(e=this.styleMirror.add(s),n.push({styleId:e,rules:Array.from(s.rules||CSSRule,(e,t)=>({rule:Qt(e,s.href),index:t}))})),r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Du{constructor(){Pt(this,"nodeMap",new WeakMap),Pt(this,"active",!1)}inOtherBuffer(e,t){const 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 Bu,Uu,Wu,Vu=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(zt=e.contentWindow)?void 0:zt.Array.from)||Array.from,document.body.removeChild(e)}}catch(Xk){console.debug("Unable to override Array.from",Xk)}const qu=new er;function $u(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:p,maskInputFn:m,maskTextFn:f,hooks:g,packFn:y,sampling:b={},dataURLOptions:w={},mousemoveWait:k,recordDOM:v=!0,recordCanvas:S=!1,recordCrossOriginIframes:C=!1,recordAfter:x=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:I=!1,collectFonts:A=!1,inlineImages:E=!1,plugins:O,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:j}=e;iu=j;const N=!C||window.parent===window;let _=!1;if(!N)try{window.parent.document&&(_=!1)}catch(Y){_=!0}if(N&&!t)throw new Error("emit function is required");if(!N&&!_)return()=>{};void 0!==k&&void 0===b.mousemove&&(b.mousemove=k),qu.reset();const z=!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}:void 0!==d?d:{password:!0},T=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let P;!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 L=0;const F=e=>{for(const t of O||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!_&&(e=y(e)),e};Bu=(e,s)=>{var i;const o=e;if(o.timestamp=Oh(),!(null==(i=au[0])?void 0:i.isFrozen())||o.type===qh.FullSnapshot||o.type===qh.IncrementalSnapshot&&o.data.source===$h.Mutation||au.forEach(e=>e.unfreeze()),N)null==t||t(F(o),s);else if(_){const e={type:"rrweb",event:F(o),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(o.type===qh.FullSnapshot)P=o,L=0;else if(o.type===qh.IncrementalSnapshot){if(o.data.source===$h.Mutation&&o.data.isAttachIframe)return;L++;const e=n&&L>=n,t=r&&o.timestamp-P.timestamp>r;(e||t)&&Uu(!0)}};const D=e=>{Bu({type:qh.IncrementalSnapshot,data:{source:$h.Mutation,...e}})},B=e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.Scroll,...e}}),U=e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.CanvasMutation,...e}}),W=new Fu({mutationCb:D,adoptedStyleSheetCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.AdoptedStyleSheet,...e}})}),V=new vu({mirror:qu,mutationCb:D,stylesheetManager:W,recordCrossOriginIframes:C,wrappedEmit:Bu});for(const G of O||[])G.getMirror&&G.getMirror({nodeMirror:qu,crossOriginIframeMirror:V.crossOriginIframeMirror,crossOriginIframeStyleMirror:V.crossOriginIframeStyleMirror});const q=new Du;Wu=new Lu({recordCanvas:S,mutationCb:U,win:window,blockClass:s,blockSelector:i,mirror:qu,sampling:b.canvas,dataURLOptions:w});const $=new Su({mutationCb:D,scrollCb:B,bypassOptions:{blockClass:s,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:z,dataURLOptions:w,maskTextFn:f,maskInputFn:m,recordCanvas:S,inlineImages:E,sampling:b,slimDOMOptions:T,iframeManager:V,stylesheetManager:W,canvasManager:Wu,keepIframeSrcFn:R,processedNodeManager:q},mirror:qu});Uu=(e=!1)=>{if(!v)return;Bu({type:qh.Meta,data:{href:window.location.href,width:jh(),height:Mh()}},e),W.reset(),$.init(),au.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new er,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:d,slimDOM:p=!1,dataURLOptions:m,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:v=()=>!1}=t||{};return Mr(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:d,slimDOMOptions:!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===p,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===p?{}:p,dataURLOptions:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:f,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:b,onStylesheetLoad:w,stylesheetLoadTimeout:k,keepIframeSrcFn:v,newlyAddedElement:!1})}(document,{mirror:qu,blockClass:s,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:z,maskTextFn:f,maskInputFn:m,slimDOM:T,dataURLOptions:w,recordCanvas:S,inlineImages:E,onSerialize:e=>{Lh(e,qu)&&V.addIframe(e),Fh(e,qu)&&W.trackLinkElement(e),Dh(e)&&$.addShadowRoot(vh.shadowRoot(e),document)},onIframeLoad:(e,t)=>{V.attachIframe(e,t),$.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{W.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");Bu({type:qh.FullSnapshot,data:{node:t,initialOffset:Rh(window)}},e),au.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,qu.getId(document))};try{const e=[],t=e=>{var t;return ou(yu)({mutationCb:D,mousemoveCb:(e,t)=>Bu({type:qh.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.MouseInteraction,...e}}),scrollCb:B,viewportResizeCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.ViewportResize,...e}}),inputCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.Input,...e}}),mediaInteractionCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.MediaInteraction,...e}}),styleSheetRuleCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.StyleSheetRule,...e}}),styleDeclarationCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.StyleDeclaration,...e}}),canvasMutationCb:U,fontCb:e=>Bu({type:qh.IncrementalSnapshot,data:{source:$h.Font,...e}}),selectionCb:e=>{Bu({type:qh.IncrementalSnapshot,data:{source:$h.Selection,...e}})},customElementCb:e=>{Bu({type:qh.IncrementalSnapshot,data:{source:$h.CustomElement,...e}})},blockClass:s,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:z,inlineStylesheet:h,sampling:b,recordDOM:v,recordCanvas:S,inlineImages:E,userTriggeredOnInput:I,collectFonts:A,doc:e,maskInputFn:m,maskTextFn:f,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:T,dataURLOptions:w,mirror:qu,iframeManager:V,stylesheetManager:W,shadowDomManager:$,processedNodeManager:q,canvasManager:Wu,ignoreCSSAttributes:M,plugins:(null==(t=null==O?void 0:O.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Bu({type:qh.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};V.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(n){console.warn(n)}});const r=()=>{Uu(),e.push(t(document)),Vu=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Sh("DOMContentLoaded",()=>{Bu({type:qh.DomContentLoaded,data:{}}),"DOMContentLoaded"===x&&r()})),e.push(Sh("load",()=>{Bu({type:qh.Load,data:{}}),"load"===x&&r()},window))),()=>{e.forEach(e=>e()),q.destroy(),Vu=!1,iu=void 0}}catch(Z){console.warn(Z)}}var Yu,Zu;$u.addCustomEvent=(e,t)=>{if(!Vu)throw new Error("please add custom event after start recording");Bu({type:qh.Custom,data:{tag:e,payload:t}})},$u.freezePage=()=>{au.forEach(e=>e.freeze())},$u.takeFullSnapshot=e=>{if(!Vu)throw new Error("please take full snapshot after start recording");Uu(e)},$u.mirror=qu,(Zu=Yu||(Yu={}))[Zu.NotStarted=0]="NotStarted",Zu[Zu.Running=1]="Running",Zu[Zu.Stopped=2]="Stopped";const{addCustomEvent:Gu}=$u,{freezePage:Ju}=$u,{takeFullSnapshot:Hu}=$u;class Xu extends Array{constructor(){super()}isEmpty(){return 0===this.length}isFull(){return 10===this.length}flush(){return this.splice(0,this.length)}}class Ku{constructor(e){__publicField(this,"agent"),__publicField(this,"eventBuffer"),this.agent=e,this.eventBuffer=new Xu}start(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.send()})}handle(e){e.type===qh.FullSnapshot&&this.eventBuffer.find(e=>e.type===qh.FullSnapshot)||(this.eventBuffer.push(e),this.eventBuffer.isFull()&&this.send())}async send(){if(!this.eventBuffer.isEmpty()&&this.agent.sendEvents){const e=this.eventBuffer.flush();await this.agent.sendEvents(e)}}}var Qu,ed=(e=>(e[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))(ed||{}),td=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(td||{}),rd=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(rd||{}),nd=Object.defineProperty,sd=(e,t,r)=>((e,t,r)=>t in e?nd(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),id=Object.defineProperty,od=(e,t,r)=>((e,t,r)=>t in e?id(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),ad=Object.defineProperty,ld=(e,t,r)=>((e,t,r)=>t in e?ad(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const cd={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},hd={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ud={};function dd(e){if(ud[e])return ud[e];const t=globalThis[e],r=t.prototype,n=e in cd?cd[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in hd?hd[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&o&&!globalThis.Zone)return ud[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const i=s[e].prototype;return document.body.removeChild(n),i?ud[e]=i:r}catch{return r}}const pd={};function md(e,t,r){var n;const s=`${e}.${String(r)}`;if(pd[s])return pd[s].call(t);const i=dd(e),o=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return o?(pd[s]=o,o.call(t)):t[r]}const fd={};function gd(e,t,r){const n=`${e}.${String(r)}`;if(fd[n])return fd[n].bind(t);const s=dd(e)[r];return"function"!=typeof s?t[r]:(fd[n]=s,s.bind(t))}const yd={childNodes:function(e){return md("Node",e,"childNodes")},parentNode:function(e){return md("Node",e,"parentNode")},parentElement:function(e){return md("Node",e,"parentElement")},textContent:function(e){return md("Node",e,"textContent")},contains:function(e,t){return gd("Node",e,"contains")(t)},getRootNode:function(e){return gd("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?md("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?md("Element",e,"shadowRoot"):null},querySelector:function(e,t){return md("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return md("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return dd("MutationObserver").constructor}};class bd{constructor(){ld(this,"idNodeMap",new Map),ld(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const 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){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const 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 wd(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&wd(yd.parentNode(e),t,r);for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!!r&&wd(yd.parentNode(e),t,r)}function kd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vd(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 n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Sd={exports:{}},Cd=String,xd=function(){return{isColorSupported:!1,reset:Cd,bold:Cd,dim:Cd,italic:Cd,underline:Cd,inverse:Cd,hidden:Cd,strikethrough:Cd,black:Cd,red:Cd,green:Cd,yellow:Cd,blue:Cd,magenta:Cd,cyan:Cd,white:Cd,gray:Cd,bgBlack:Cd,bgRed:Cd,bgGreen:Cd,bgYellow:Cd,bgBlue:Cd,bgMagenta:Cd,bgCyan:Cd,bgWhite:Cd}};Sd.exports=xd(),Sd.exports.createColors=xd;var Id=Sd.exports;const Ad=vd(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ed=Id,Od=Ad,Rd=class e extends Error{constructor(t,r,n,s,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=Ed.isColorSupported),Od&&e&&(t=Od(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,gray:t,red:s}=Ed.createColors(!0);r=t=>e(s(t)),n=e=>t(e)}else r=n=e=>e;return s.slice(i,o).map((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Md=Rd;Rd.default=Rd;var jd={};jd.isClean=Symbol("isClean"),jd.my=Symbol("my");const Nd={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _d=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],i=this.raw(s,"before");i&&this.builder(i),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],void 0!==n))return n;let s=e.parent;if("before"===r){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return Nd[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let s="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[s]?n=this[s](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var o;return void 0===n&&(n=Nd[r]),i.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.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,r.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,r.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&&(t=e.raws.between,void 0!==t))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,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var zd=_d;_d.default=_d;let Td=zd;function Pd(e,t){new Td(t).stringify(e)}var Ld=Pd;Pd.default=Pd;let{isClean:Fd,my:Dd}=jd,Bd=Md,Ud=zd,Wd=Ld;function Vd(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>Vd(e,r)):("object"===i&&null!==s&&(s=Vd(s)),r[n]=s)}return r}let qd=class{constructor(e={}){this.raws={},this[Fd]=!1,this[Dd]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of 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=Vd(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}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new Bd(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[Fd]){this[Fd]=!1;let e=this;for(;e=e.parent;)e[Fd]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let i=0;i<e;i++)"\n"===r[i]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Ud).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))r[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)r[i]=e.toJSON(null,t);else if("source"===i){let n=t.get(e.input);null==n&&(n=s,t.set(e.input,s),s++),r[i]={end:e.end,inputId:n,start:e.start}}else r[i]=e}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wd){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}};var $d=qd;qd.default=qd;let Yd=$d,Zd=class extends Yd{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]}};var Gd=Zd;Zd.default=Zd;var Jd={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Hd,SourceMapGenerator:Xd}=Ad,{existsSync:Kd,readFileSync:Qd}=Ad,{dirname:ep,join:tp}=Ad;let rp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=ep(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Hd(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=ep(e),Kd(e))return this.mapFile=e,Qd(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Hd)return Xd.fromSourceMap(t).toString();if(t instanceof Xd)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=tp(ep(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)}};var np=rp;rp.default=rp;let{SourceMapConsumer:sp,SourceMapGenerator:ip}=Ad,{fileURLToPath:op,pathToFileURL:ap}=Ad,{isAbsolute:lp,resolve:cp}=Ad,{nanoid:hp}=Jd,up=Ad,dp=Md,pp=np,mp=Symbol("fromOffsetCache"),fp=Boolean(sp&&ip),gp=Boolean(cp&&lp),yp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!gp||/^\w+:\/\//.test(t.from)||lp(t.from)?this.file=t.from:this.file=cp(t.from)),gp&&fp){let e=new pp(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 "+hp(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new dp(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new dp(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,n.plugin),s.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ap&&(s.input.url=ap(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[mp])r=this[mp];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[mp]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:cp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({column:n,line:r})),i=lp(a.source)?ap(a.source):new URL(a.source,this.map.consumer().sourceRoot||ap(this.map.mapFile));let l={column:a.column,endColumn:s&&s.column,endLine:s&&s.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!op)throw new Error("file: protocol is not available in this PostCSS build");l.file=op(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var bp=yp;yp.default=yp,up&&up.registerInput&&up.registerInput(yp);let{SourceMapConsumer:wp,SourceMapGenerator:kp}=Ad,{dirname:vp,relative:Sp,resolve:Cp,sep:xp}=Ad,{pathToFileURL:Ip}=Ad,Ap=bp,Ep=Boolean(wp&&kp),Op=Boolean(vp&&Cp&&Sp&&xp);var Rp=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||vp(e.file);!1===this.mapOpts.sourcesContent?(t=new wp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),Op&&Ep&&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=kp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new kp({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(){this.css="",this.map=new kp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,s="<no source>",i={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&&(i.generated.line=r,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?vp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=vp(Cp(r,this.mapOpts.annotation)));let n=Sp(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new Ap(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ip){let t=Ip(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===xp&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let Mp=$d,jp=class extends Mp{constructor(e){super(e),this.type="comment"}};var Np=jp;jp.default=jp;let _p,zp,Tp,Pp,{isClean:Lp,my:Fp}=jd,Dp=Gd,Bp=Np,Up=$d;function Wp(e){return e.map(e=>(e.nodes&&(e.nodes=Wp(e.nodes)),delete e.source,e))}function Vp(e){if(e[Lp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Vp(t)}let qp=class e extends Up{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let i of s)this.proxyOf.nodes.splice(n+1,0,i);for(let i in this.indexes)r=this.indexes[i],n<r&&(this.indexes[i]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n,0,o);for(let o in this.indexes)r=this.indexes[o],n<=r&&(this.indexes[o]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=Wp(_p(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Dp(t)]}else if(t.selector)t=[new zp(t)];else if(t.name)t=[new Tp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Bp(t)]}return t.map(t=>(t[Fp]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Lp]&&Vp(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){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(s){throw t.addToError(s)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};qp.registerParse=e=>{_p=e},qp.registerRule=e=>{zp=e},qp.registerAtRule=e=>{Tp=e},qp.registerRoot=e=>{Pp=e};var $p=qp;qp.default=qp,qp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Tp.prototype):"rule"===e.type?Object.setPrototypeOf(e,zp.prototype):"decl"===e.type?Object.setPrototypeOf(e,Dp.prototype):"comment"===e.type?Object.setPrototypeOf(e,Bp.prototype):"root"===e.type&&Object.setPrototypeOf(e,Pp.prototype),e[Fp]=!0,e.nodes&&e.nodes.forEach(e=>{qp.rebuild(e)})};let Yp,Zp,Gp=$p,Jp=class extends Gp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Yp(new Zp,this,e).stringify()}};Jp.registerLazyResult=e=>{Yp=e},Jp.registerProcessor=e=>{Zp=e};var Hp=Jp;Jp.default=Jp;let Xp={};var Kp=function(e){Xp[e]||(Xp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Qp=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 r in t)this[r]=t[r]}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}};var em=Qp;Qp.default=Qp;let tm=em,rm=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 tm(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var nm=rm;rm.default=rm;const sm="'".charCodeAt(0),im='"'.charCodeAt(0),om="\\".charCodeAt(0),am="/".charCodeAt(0),lm="\n".charCodeAt(0),cm=" ".charCodeAt(0),hm="\f".charCodeAt(0),um="\t".charCodeAt(0),dm="\r".charCodeAt(0),pm="[".charCodeAt(0),mm="]".charCodeAt(0),fm="(".charCodeAt(0),gm=")".charCodeAt(0),ym="{".charCodeAt(0),bm="}".charCodeAt(0),wm=";".charCodeAt(0),km="*".charCodeAt(0),vm=":".charCodeAt(0),Sm="@".charCodeAt(0),Cm=/[\t\n\f\r "#'()/;[\\\]{}]/g,xm=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Im=/.[\r\n"'(/\\]/,Am=/[\da-f]/i;let Em=$p,Om=class extends Em{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)}};var Rm=Om;Om.default=Om,Em.registerAtRule(Om);let Mm,jm,Nm=$p,_m=class extends Nm{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of n)s.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new Mm(new jm,this,e).stringify()}};_m.registerLazyResult=e=>{Mm=e},_m.registerProcessor=e=>{jm=e};var zm=_m;_m.default=_m,Nm.registerRoot(_m);let Tm={comma:e=>Tm.split(e,[","],!0),space:e=>Tm.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=h;return(r||""!==s)&&n.push(s.trim()),n}};var Pm=Tm;Tm.default=Tm;let Lm=$p,Fm=Pm,Dm=class extends Lm{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Fm.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)}};var Bm=Dm;Dm.default=Dm,Lm.registerRule(Dm);let Um=Gd,Wm=function(e,t={}){let r,n,s,i,o,a,l,c,h,u,d=e.css.valueOf(),p=t.ignoreErrors,m=d.length,f=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&f>=m},nextToken:function(e){if(y.length)return y.pop();if(f>=m)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(f),r){case lm:case cm:case um:case dm:case hm:n=f;do{n+=1,r=d.charCodeAt(n)}while(r===cm||r===lm||r===um||r===dm||r===hm);u=["space",d.slice(f,n)],f=n-1;break;case pm:case mm:case ym:case bm:case vm:case wm:case gm:{let e=String.fromCharCode(r);u=[e,e,f];break}case fm:if(c=g.length?g.pop()[1]:"",h=d.charCodeAt(f+1),"url"===c&&h!==sm&&h!==im&&h!==cm&&h!==lm&&h!==um&&h!==hm&&h!==dm){n=f;do{if(a=!1,n=d.indexOf(")",n+1),-1===n){if(p||t){n=f;break}b("bracket")}for(l=n;d.charCodeAt(l-1)===om;)l-=1,a=!a}while(a);u=["brackets",d.slice(f,n+1),f,n],f=n}else n=d.indexOf(")",f+1),i=d.slice(f,n+1),-1===n||Im.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case sm:case im:s=r===sm?"'":'"',n=f;do{if(a=!1,n=d.indexOf(s,n+1),-1===n){if(p||t){n=f+1;break}b("string")}for(l=n;d.charCodeAt(l-1)===om;)l-=1,a=!a}while(a);u=["string",d.slice(f,n+1),f,n],f=n;break;case Sm:Cm.lastIndex=f+1,Cm.test(d),n=0===Cm.lastIndex?d.length-1:Cm.lastIndex-2,u=["at-word",d.slice(f,n+1),f,n],f=n;break;case om:for(n=f,o=!0;d.charCodeAt(n+1)===om;)n+=1,o=!o;if(r=d.charCodeAt(n+1),o&&r!==am&&r!==cm&&r!==lm&&r!==um&&r!==dm&&r!==hm&&(n+=1,Am.test(d.charAt(n)))){for(;Am.test(d.charAt(n+1));)n+=1;d.charCodeAt(n+1)===cm&&(n+=1)}u=["word",d.slice(f,n+1),f,n],f=n;break;default:r===am&&d.charCodeAt(f+1)===km?(n=d.indexOf("*/",f+2)+1,0===n&&(p||t?n=d.length:b("comment")),u=["comment",d.slice(f,n+1),f,n],f=n):(xm.lastIndex=f+1,xm.test(d),n=0===xm.lastIndex?d.length-1:xm.lastIndex-2,u=["word",d.slice(f,n+1),f,n],g.push(u),f=n)}return f++,u},position:function(){return f}}},Vm=Np,qm=Rm,$m=zm,Ym=Bm;const Zm={empty:!0,space:!0};let Gm=$p,Jm=class{constructor(e){this.input=e,this.root=new $m,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,s=new qm;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new Vm;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=Wm(this.input)}decl(e,t){let r=new Um;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(n=e[a],"!important"===n[1].toLowerCase()){r.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(r.raws.important=t);break}if("important"===n[1].toLowerCase()){let t=e.slice(0),n="";for(let e=a;e>0;e--){let r=t[e][0];if(0===n.trim().indexOf("!")&&"space"!==r)break;n=t.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=t)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 Ym;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,i,o,a,l=r.length,c="",h=!0;for(let u=0;u<l;u+=1)s=r[u],i=s[0],"space"!==i||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",o=r[u+1]?r[u+1][0]:"empty",Zm[a]||Zm[o]||","===c.slice(-1)?h=!1:c+=s[1]):c+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new Ym;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&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Hm=bp;function Xm(e,t){let r=new Hm(e,t),n=new Jm(r);try{n.parse()}catch(s){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===s.name&&t&&t.from&&(/\.scss$/i.test(t.from)?s.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?s.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(s.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),s}return n.root}var Km=Xm;Xm.default=Xm,Gm.registerParse(Xm);let{isClean:Qm,my:ef}=jd,tf=Rp,rf=Ld,nf=$p,sf=Hp,of=Kp,af=nm,lf=Km,cf=zm;const hf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},uf={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},df={Once:!0,postcssPlugin:!0,prepare:!0};function pf(e){return"object"==typeof e&&"function"==typeof e.then}function mf(e){let t=!1,r=hf[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 ff(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:mf(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function gf(e){return e[Qm]=!1,e.nodes&&e.nodes.forEach(e=>gf(e)),e}let yf={},bf=class e{constructor(t,r,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof af)s=gf(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=lf;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(r,n)}catch(i){this.processed=!0,this.error=i}s&&!s[ef]&&nf.rebuild(s)}else s=gf(r);this.result=new af(t,s,n),this.helpers={...yf,postcss:yf,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),i=n.split(".");(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(Xk){console&&console.error&&console.error(Xk)}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(!uf[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!df[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let r=0;r<this.plugins.length;r++){let t=this.plugins[r],n=this.runOnRoot(t);if(pf(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qm];){e[Qm]=!0;let r=[ff(e)];for(;r.length>0;){let e=this.visitTick(r);if(pf(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(t){throw this.handleError(t)}}}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));return pf(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=rf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new tf(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(pf(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Qm];)e[Qm]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||of("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){let e;this.result.lastPlugin=n;try{e=s(t,this.helpers)}catch(r){throw this.handleError(r,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pf(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex<n.length){let[e,s]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return s(r.toProxy(),this.helpers)}catch(i){throw this.handleError(i,r)}}if(0!==t.iterator){let n,s=t.iterator;for(;n=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!n[Qm])return n[Qm]=!0,void e.push(ff(n));t.iterator=0,delete r.indexes[s]}let s=t.events;for(;t.eventIndex<s.length;){let e=s[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[Qm]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Qm]=!0;let t=mf(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[Qm]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,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"}};bf.registerPostcss=e=>{yf=e};var wf=bf;bf.default=bf,cf.registerLazyResult(bf),sf.registerLazyResult(bf);let kf=Rp,vf=Ld,Sf=Kp,Cf=Km;const xf=nm;let If=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=vf;this.result=new xf(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new kf(s,n,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Sf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=Cf;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Af=If;If.default=If;let Ef=Af,Of=wf,Rf=Hp,Mf=zm,jf=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)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Of(this,e,t):new Ef(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nf=jf;jf.default=jf,Mf.registerProcessor(jf),Rf.registerProcessor(jf);let _f=Gd,zf=np,Tf=Np,Pf=Rm,Lf=bp,Ff=zm,Df=Bm;function Bf(e,t){if(Array.isArray(e))return e.map(e=>Bf(e));let{inputs:r,...n}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Lf.prototype};r.map&&(r.map={...r.map,__proto__:zf.prototype}),t.push(r)}}if(n.nodes&&(n.nodes=e.nodes.map(e=>Bf(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new Ff(n);if("decl"===n.type)return new _f(n);if("rule"===n.type)return new Df(n);if("comment"===n.type)return new Tf(n);if("atrule"===n.type)return new Pf(n);throw new Error("Unknown node type: "+e.type)}var Uf=Bf;Bf.default=Bf;let Wf=Md,Vf=Gd,qf=wf,$f=$p,Yf=Nf,Zf=Ld,Gf=Uf,Jf=Hp,Hf=em,Xf=Np,Kf=Rm,Qf=nm,eg=bp,tg=Km,rg=Pm,ng=Bm,sg=zm,ig=$d;function og(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Yf(e)}og.plugin=function(e,t){let r,n=!1;function s(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=(new Yf).version,s}return Object.defineProperty(s,"postcss",{get:()=>(r||(r=s()),r)}),s.process=function(e,t,r){return og([s(r)]).process(e,t)},s},og.stringify=Zf,og.parse=tg,og.fromJSON=Gf,og.list=rg,og.comment=e=>new Xf(e),og.atRule=e=>new Kf(e),og.decl=e=>new Vf(e),og.rule=e=>new ng(e),og.root=e=>new sg(e),og.document=e=>new Jf(e),og.CssSyntaxError=Wf,og.Declaration=Vf,og.Container=$f,og.Processor=Yf,og.Document=Jf,og.Comment=Xf,og.Warning=Hf,og.AtRule=Kf,og.Result=Qf,og.Input=eg,og.Rule=ng,og.Root=sg,og.Node=ig,qf.registerPostcss(og);var ag=og;og.default=og;const lg=kd(ag);lg.stringify,lg.fromJSON,lg.plugin,lg.parse,lg.list,lg.document,lg.comment,lg.atRule,lg.rule,lg.decl,lg.root,lg.CssSyntaxError,lg.Declaration,lg.Container,lg.Processor,lg.Document,lg.Comment,lg.Warning,lg.AtRule,lg.Result,lg.Input,lg.Rule,lg.Root,lg.Node;var cg=Object.defineProperty,hg=(e,t,r)=>((e,t,r)=>t in e?cg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function ug(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function dg(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 n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var pg={exports:{}},mg=String,fg=function(){return{isColorSupported:!1,reset:mg,bold:mg,dim:mg,italic:mg,underline:mg,inverse:mg,hidden:mg,strikethrough:mg,black:mg,red:mg,green:mg,yellow:mg,blue:mg,magenta:mg,cyan:mg,white:mg,gray:mg,bgBlack:mg,bgRed:mg,bgGreen:mg,bgYellow:mg,bgBlue:mg,bgMagenta:mg,bgCyan:mg,bgWhite:mg}};pg.exports=fg(),pg.exports.createColors=fg;var gg=pg.exports;const yg=dg(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let bg=gg,wg=yg,kg=class e extends Error{constructor(t,r,n,s,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),s&&(this.source=s),o&&(this.plugin=o),void 0!==r&&void 0!==n&&("number"==typeof r?(this.line=r,this.column=n):(this.line=r.line,this.column=r.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,e)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let t=this.source;null==e&&(e=bg.isColorSupported),wg&&e&&(t=wg(t));let r,n,s=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,s.length),a=String(o).length;if(e){let{bold:e,gray:t,red:s}=bg.createColors(!0);r=t=>e(s(t)),n=e=>t(e)}else r=n=e=>e;return s.slice(i,o).map((e,t)=>{let s=i+1+t,o=" "+(" "+s).slice(-a)+" | ";if(s===this.line){let t=n(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(o)+e+"\n "+t+r("^")}return" "+n(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var vg=kg;kg.default=kg;var Sg={};Sg.isClean=Symbol("isClean"),Sg.my=Symbol("my");const Cg={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let xg=class{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],i=this.raw(s,"before");i&&this.builder(i),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(e,t,r){let n;if(r||(r=t),t&&(n=e.raws[t],void 0!==n))return n;let s=e.parent;if("before"===r){if(!s||"root"===s.type&&s.first===e)return"";if(s&&"document"===s.type)return""}if(!s)return Cg[r];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[r])return i.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(e,r);{let s="raw"+((o=r)[0].toUpperCase()+o.slice(1));this[s]?n=this[s](i,e):i.walk(e=>{if(n=e.raws[t],void 0!==n)return!1})}var o;return void 0===n&&(n=Cg[r]),i.rawCache[r]=n,n}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.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,r.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,r.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&&(t=e.raws.between,void 0!==t))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,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Ig=xg;xg.default=xg;let Ag=Ig;function Eg(e,t){new Ag(t).stringify(e)}var Og=Eg;Eg.default=Eg;let{isClean:Rg,my:Mg}=Sg,jg=vg,Ng=Ig,_g=Og;function zg(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>zg(e,r)):("object"===i&&null!==s&&(s=zg(s)),r[n]=s)}return r}let Tg=class{constructor(e={}){this.raws={},this[Rg]=!1,this[Mg]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let r of 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=zg(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}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new jg(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[Rg]){this[Rg]=!1;let e=this;for(;e=e.parent;)e[Rg]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let i=0;i<e;i++)"\n"===r[i]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new Ng).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))r[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)r[i]=e.toJSON(null,t);else if("source"===i){let n=t.get(e.input);null==n&&(n=s,t.set(e.input,s),s++),r[i]={end:e.end,inputId:n,start:e.start}}else r[i]=e}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=_g){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let s in r)n[s]=r[s];return e.warn(t,n)}get proxyOf(){return this}};var Pg=Tg;Tg.default=Tg;let Lg=Pg,Fg=class extends Lg{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]}};var Dg=Fg;Fg.default=Fg;var Bg={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Ug,SourceMapGenerator:Wg}=yg,{existsSync:Vg,readFileSync:qg}=yg,{dirname:$g,join:Yg}=yg;let Zg=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=$g(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new Ug(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}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);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=$g(e),Vg(e))return this.mapFile=e,qg(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Ug)return Wg.fromSourceMap(t).toString();if(t instanceof Wg)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let r=t(e);if(r){let e=this.loadFile(r);if(!e)throw new Error("Unable to load previous source map: "+r.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Yg($g(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)}};var Gg=Zg;Zg.default=Zg;let{SourceMapConsumer:Jg,SourceMapGenerator:Hg}=yg,{fileURLToPath:Xg,pathToFileURL:Kg}=yg,{isAbsolute:Qg,resolve:ey}=yg,{nanoid:ty}=Bg,ry=yg,ny=vg,sy=Gg,iy=Symbol("fromOffsetCache"),oy=Boolean(Jg&&Hg),ay=Boolean(ey&&Qg),ly=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!ay||/^\w+:\/\//.test(t.from)||Qg(t.from)?this.file=t.from:this.file=ey(t.from)),ay&&oy){let e=new sy(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 "+ty(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,n={}){let s,i,o;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,o=e.col}else i=n.line,o=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let a=this.origin(t,r,i,o);return s=a?new ny(e,void 0===a.endLine?a.line:{column:a.column,line:a.line},void 0===a.endLine?a.column:{column:a.endColumn,line:a.endLine},a.source,a.file,n.plugin):new ny(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:o,line:i},this.css,this.file,n.plugin),s.input={column:r,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(Kg&&(s.input.url=Kg(this.file).toString()),s.input.file=this.file),s}fromOffset(e){let t,r;if(this[iy])r=this[iy];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[iy]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ey(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,r,n){if(!this.map)return!1;let s,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof r&&(s=o.originalPositionFor({column:n,line:r})),i=Qg(a.source)?Kg(a.source):new URL(a.source,this.map.consumer().sourceRoot||Kg(this.map.mapFile));let l={column:a.column,endColumn:s&&s.column,endLine:s&&s.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Xg)throw new Error("file: protocol is not available in this PostCSS build");l.file=Xg(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var cy=ly;ly.default=ly,ry&&ry.registerInput&&ry.registerInput(ly);let{SourceMapConsumer:hy,SourceMapGenerator:uy}=yg,{dirname:dy,relative:py,resolve:my,sep:fy}=yg,{pathToFileURL:gy}=yg,yy=cy,by=Boolean(hy&&uy),wy=Boolean(dy&&my&&py&&fy);var ky=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let t,r=this.toUrl(this.path(e.file)),n=e.root||dy(e.file);!1===this.mapOpts.sourcesContent?(t=new hy(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,r,this.toUrl(this.path(n)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),wy&&by&&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=uy.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new uy({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(){this.css="",this.map=new uy({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,r=1,n=1,s="<no source>",i={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&&(i.generated.line=r,i.generated.column=n-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(r+=e.length,t=o.lastIndexOf("\n"),n=o.length-t):n+=o.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=r,i.generated.column=n-2,this.map.addMapping(i)):(i.source=s,i.original.line=1,i.original.column=0,i.generated.line=r,i.generated.column=n-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let r=this.opts.to?dy(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(r=dy(my(r,this.mapOpts.annotation)));let n=py(r,e);return this.memoizedPaths.set(e,n),n}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new yy(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(gy){let t=gy(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===fy&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}};let vy=Pg,Sy=class extends vy{constructor(e){super(e),this.type="comment"}};var Cy=Sy;Sy.default=Sy;let xy,Iy,Ay,Ey,{isClean:Oy,my:Ry}=Sg,My=Dg,jy=Cy,Ny=Pg;function _y(e){return e.map(e=>(e.nodes&&(e.nodes=_y(e.nodes)),delete e.source,e))}function zy(e){if(e[Oy]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)zy(t)}let Ty=class e extends Ny{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let i of s)this.proxyOf.nodes.splice(n+1,0,i);for(let i in this.indexes)r=this.indexes[i],n<r&&(this.indexes[i]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",i=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let o of i)this.proxyOf.nodes.splice(n,0,o);for(let o in this.indexes)r=this.indexes[o],n<=r&&(this.indexes[o]=r+i.length);return this.markDirty(),this}normalize(t,r){if("string"==typeof t)t=_y(xy(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new My(t)]}else if(t.selector)t=[new Iy(t)];else if(t.name)t=[new Ay(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new jy(t)]}return t.map(t=>(t[Ry]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Oy]&&zy(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){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(s){throw t.addToError(s)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}};Ty.registerParse=e=>{xy=e},Ty.registerRule=e=>{Iy=e},Ty.registerAtRule=e=>{Ay=e},Ty.registerRoot=e=>{Ey=e};var Py=Ty;Ty.default=Ty,Ty.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Ay.prototype):"rule"===e.type?Object.setPrototypeOf(e,Iy.prototype):"decl"===e.type?Object.setPrototypeOf(e,My.prototype):"comment"===e.type?Object.setPrototypeOf(e,jy.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ey.prototype),e[Ry]=!0,e.nodes&&e.nodes.forEach(e=>{Ty.rebuild(e)})};let Ly,Fy,Dy=Py,By=class extends Dy{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Ly(new Fy,this,e).stringify()}};By.registerLazyResult=e=>{Ly=e},By.registerProcessor=e=>{Fy=e};var Uy=By;By.default=By;let Wy={};var Vy=function(e){Wy[e]||(Wy[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let qy=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 r in t)this[r]=t[r]}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}};var $y=qy;qy.default=qy;let Yy=$y,Zy=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 Yy(e,t);return this.messages.push(r),r}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Gy=Zy;Zy.default=Zy;const Jy="'".charCodeAt(0),Hy='"'.charCodeAt(0),Xy="\\".charCodeAt(0),Ky="/".charCodeAt(0),Qy="\n".charCodeAt(0),eb=" ".charCodeAt(0),tb="\f".charCodeAt(0),rb="\t".charCodeAt(0),nb="\r".charCodeAt(0),sb="[".charCodeAt(0),ib="]".charCodeAt(0),ob="(".charCodeAt(0),ab=")".charCodeAt(0),lb="{".charCodeAt(0),cb="}".charCodeAt(0),hb=";".charCodeAt(0),ub="*".charCodeAt(0),db=":".charCodeAt(0),pb="@".charCodeAt(0),mb=/[\t\n\f\r "#'()/;[\\\]{}]/g,fb=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,gb=/.[\r\n"'(/\\]/,yb=/[\da-f]/i;let bb=Py,wb=class extends bb{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)}};var kb=wb;wb.default=wb,bb.registerAtRule(wb);let vb,Sb,Cb=Py,xb=class extends Cb{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let s of n)s.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(e={}){return new vb(new Sb,this,e).stringify()}};xb.registerLazyResult=e=>{vb=e},xb.registerProcessor=e=>{Sb=e};var Ib=xb;xb.default=xb,Cb.registerRoot(xb);let Ab={comma:e=>Ab.split(e,[","],!0),space:e=>Ab.split(e,[" ","\n","\t"]),split(e,t,r){let n=[],s="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==s&&n.push(s.trim()),s="",i=!1):s+=h;return(r||""!==s)&&n.push(s.trim()),n}};var Eb=Ab;Ab.default=Ab;let Ob=Py,Rb=Eb,Mb=class extends Ob{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Rb.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)}};var jb=Mb;Mb.default=Mb,Ob.registerRule(Mb);let Nb=Dg,_b=function(e,t={}){let r,n,s,i,o,a,l,c,h,u,d=e.css.valueOf(),p=t.ignoreErrors,m=d.length,f=0,g=[],y=[];function b(t){throw e.error("Unclosed "+t,f)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&f>=m},nextToken:function(e){if(y.length)return y.pop();if(f>=m)return;let t=!!e&&e.ignoreUnclosed;switch(r=d.charCodeAt(f),r){case Qy:case eb:case rb:case nb:case tb:n=f;do{n+=1,r=d.charCodeAt(n)}while(r===eb||r===Qy||r===rb||r===nb||r===tb);u=["space",d.slice(f,n)],f=n-1;break;case sb:case ib:case lb:case cb:case db:case hb:case ab:{let e=String.fromCharCode(r);u=[e,e,f];break}case ob:if(c=g.length?g.pop()[1]:"",h=d.charCodeAt(f+1),"url"===c&&h!==Jy&&h!==Hy&&h!==eb&&h!==Qy&&h!==rb&&h!==tb&&h!==nb){n=f;do{if(a=!1,n=d.indexOf(")",n+1),-1===n){if(p||t){n=f;break}b("bracket")}for(l=n;d.charCodeAt(l-1)===Xy;)l-=1,a=!a}while(a);u=["brackets",d.slice(f,n+1),f,n],f=n}else n=d.indexOf(")",f+1),i=d.slice(f,n+1),-1===n||gb.test(i)?u=["(","(",f]:(u=["brackets",i,f,n],f=n);break;case Jy:case Hy:s=r===Jy?"'":'"',n=f;do{if(a=!1,n=d.indexOf(s,n+1),-1===n){if(p||t){n=f+1;break}b("string")}for(l=n;d.charCodeAt(l-1)===Xy;)l-=1,a=!a}while(a);u=["string",d.slice(f,n+1),f,n],f=n;break;case pb:mb.lastIndex=f+1,mb.test(d),n=0===mb.lastIndex?d.length-1:mb.lastIndex-2,u=["at-word",d.slice(f,n+1),f,n],f=n;break;case Xy:for(n=f,o=!0;d.charCodeAt(n+1)===Xy;)n+=1,o=!o;if(r=d.charCodeAt(n+1),o&&r!==Ky&&r!==eb&&r!==Qy&&r!==rb&&r!==nb&&r!==tb&&(n+=1,yb.test(d.charAt(n)))){for(;yb.test(d.charAt(n+1));)n+=1;d.charCodeAt(n+1)===eb&&(n+=1)}u=["word",d.slice(f,n+1),f,n],f=n;break;default:r===Ky&&d.charCodeAt(f+1)===ub?(n=d.indexOf("*/",f+2)+1,0===n&&(p||t?n=d.length:b("comment")),u=["comment",d.slice(f,n+1),f,n],f=n):(fb.lastIndex=f+1,fb.test(d),n=0===fb.lastIndex?d.length-1:fb.lastIndex-2,u=["word",d.slice(f,n+1),f,n],g.push(u),f=n)}return f++,u},position:function(){return f}}},zb=Cy,Tb=kb,Pb=Ib,Lb=jb;const Fb={empty:!0,space:!0};let Db=Py,Bb=class{constructor(e){this.input=e,this.root=new Pb,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,n,s=new Tb;s.name=e[1].slice(1),""===s.name&&this.unnamedAtrule(s,e),this.init(s,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){s.source.end=this.getPosition(e[2]),s.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(n=a.length-1,r=a[n];r&&"space"===r[0];)r=a[--n];r&&(s.source.end=this.getPosition(r[3]||r[2]),s.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}s.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(s.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(s,"params",a),i&&(e=a[a.length-1],s.source.end=this.getPosition(e[3]||e[2]),s.source.end.offset++,this.spaces=s.raws.between,s.raws.between="")):(s.raws.afterName="",s.params=""),o&&(s.nodes=[],this.current=s)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[i,o]of e.entries()){if(t=o,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return i}this.doubleColon(t)}n=t}return!1}comment(e){let t=new zb;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=_b(this.input)}decl(e,t){let r=new Nb;this.init(r,e[0][2]);let n,s=e[e.length-1];for(";"===s[0]&&(this.semicolon=!0,e.pop()),r.source.end=this.getPosition(s[3]||s[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(e)),r.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),r.raws.before+=e.shift()[1];for(r.source.start=this.getPosition(e[0][2]),r.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;r.prop+=e.shift()[1]}for(r.raws.between="";e.length;){if(n=e.shift(),":"===n[0]){r.raws.between+=n[1];break}"word"===n[0]&&/\w/.test(n[1])&&this.unknownWord([n]),r.raws.between+=n[1]}"_"!==r.prop[0]&&"*"!==r.prop[0]||(r.raws.before+=r.prop[0],r.prop=r.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(n=e[a],"!important"===n[1].toLowerCase()){r.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(r.raws.important=t);break}if("important"===n[1].toLowerCase()){let t=e.slice(0),n="";for(let e=a;e>0;e--){let r=t[e][0];if(0===n.trim().indexOf("!")&&"space"!==r)break;n=t.pop()[1]+n}0===n.trim().indexOf("!")&&(r.important=!0,r.raws.important=n,e=t)}if("space"!==n[0]&&"comment"!==n[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(r.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(r,"value",o.concat(e),t),r.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 Lb;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),i.push("("===r?")":"]");else if(o&&n&&"{"===r)s||(s=l),i.push("}");else if(0===i.length){if(";"===r){if(n)return void this.decl(a,o);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===i[i.length-1]&&(i.pop(),0===i.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(s),t&&n){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,i,o,a,l=r.length,c="",h=!0;for(let u=0;u<l;u+=1)s=r[u],i=s[0],"space"!==i||u!==l-1||n?"comment"===i?(a=r[u-1]?r[u-1][0]:"empty",o=r[u+1]?r[u+1][0]:"empty",Fb[a]||Fb[o]||","===c.slice(-1)?h=!1:c+=s[1]):c+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:c}}e[t]=c}rule(e){e.pop();let t=new Lb;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&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Ub=cy;function Wb(e,t){let r=new Ub(e,t),n=new Bb(r);try{n.parse()}catch(s){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===s.name&&t&&t.from&&(/\.scss$/i.test(t.from)?s.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?s.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(s.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),s}return n.root}var Vb=Wb;Wb.default=Wb,Db.registerParse(Wb);let{isClean:qb,my:$b}=Sg,Yb=ky,Zb=Og,Gb=Py,Jb=Uy,Hb=Vy,Xb=Gy,Kb=Vb,Qb=Ib;const ew={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},tw={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},rw={Once:!0,postcssPlugin:!0,prepare:!0};function nw(e){return"object"==typeof e&&"function"==typeof e.then}function sw(e){let t=!1,r=ew[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 iw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:sw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function ow(e){return e[qb]=!1,e.nodes&&e.nodes.forEach(e=>ow(e)),e}let aw={},lw=class e{constructor(t,r,n){let s;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof e||r instanceof Xb)s=ow(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=Kb;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{s=e(r,n)}catch(i){this.processed=!0,this.error=i}s&&!s[$b]&&Gb.rebuild(s)}else s=ow(r);this.result=new Xb(t,s,n),this.helpers={...aw,postcss:aw,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),i=n.split(".");(s[0]!==i[0]||parseInt(s[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(Xk){console&&console.error&&console.error(Xk)}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(!tw[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!rw[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let r=0;r<this.plugins.length;r++){let t=this.plugins[r],n=this.runOnRoot(t);if(nw(n))try{await n}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qb];){e[qb]=!0;let r=[iw(e)];for(;r.length>0;){let e=this.visitTick(r);if(nw(e))try{await e}catch(t){let e=r[r.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[r,n]of this.listeners.OnceExit){this.result.lastPlugin=r;try{if("document"===e.type){let t=e.nodes.map(e=>n(e,this.helpers));await Promise.all(t)}else await n(e,this.helpers)}catch(t){throw this.handleError(t)}}}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));return nw(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Zb;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let r=new Yb(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(nw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qb];)e[qb]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||Hb("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[n,s]of e){let e;this.result.lastPlugin=n;try{e=s(t,this.helpers)}catch(r){throw this.handleError(r,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(nw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:r,visitors:n}=t;if("root"!==r.type&&"document"!==r.type&&!r.parent)return void e.pop();if(n.length>0&&t.visitorIndex<n.length){let[e,s]=n[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===n.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return s(r.toProxy(),this.helpers)}catch(i){throw this.handleError(i,r)}}if(0!==t.iterator){let n,s=t.iterator;for(;n=r.nodes[r.indexes[s]];)if(r.indexes[s]+=1,!n[qb])return n[qb]=!0,void e.push(iw(n));t.iterator=0,delete r.indexes[s]}let s=t.events;for(;t.eventIndex<s.length;){let e=s[t.eventIndex];if(t.eventIndex+=1,0===e)return void(r.nodes&&r.nodes.length&&(r[qb]=!0,t.iterator=r.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[qb]=!0;let t=sw(e);for(let r of t)if(0===r)e.nodes&&e.each(e=>{e[qb]||this.walkSync(e)});else{let t=this.listeners[r];if(t&&this.visitSync(t,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"}};lw.registerPostcss=e=>{aw=e};var cw=lw;lw.default=lw,Qb.registerLazyResult(lw),Jb.registerLazyResult(lw);let hw=ky,uw=Og,dw=Vy,pw=Vb;const mw=Gy;let fw=class{constructor(e,t,r){let n;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=r,this._map=void 0;let s=uw;this.result=new mw(this._processor,n,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new hw(s,n,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||dw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=pw;try{e=t(this._css,this._opts)}catch(r){this.error=r}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var gw=fw;fw.default=fw;let yw=gw,bw=cw,ww=Uy,kw=Ib,vw=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)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new bw(this,e,t):new yw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Sw=vw;vw.default=vw,kw.registerProcessor(vw),ww.registerProcessor(vw);let Cw=Dg,xw=Gg,Iw=Cy,Aw=kb,Ew=cy,Ow=Ib,Rw=jb;function Mw(e,t){if(Array.isArray(e))return e.map(e=>Mw(e));let{inputs:r,...n}=e;if(r){t=[];for(let e of r){let r={...e,__proto__:Ew.prototype};r.map&&(r.map={...r.map,__proto__:xw.prototype}),t.push(r)}}if(n.nodes&&(n.nodes=e.nodes.map(e=>Mw(e,t))),n.source){let{inputId:e,...r}=n.source;n.source=r,null!=e&&(n.source.input=t[e])}if("root"===n.type)return new Ow(n);if("decl"===n.type)return new Cw(n);if("rule"===n.type)return new Rw(n);if("comment"===n.type)return new Iw(n);if("atrule"===n.type)return new Aw(n);throw new Error("Unknown node type: "+e.type)}var jw=Mw;Mw.default=Mw;let Nw=vg,_w=Dg,zw=cw,Tw=Py,Pw=Sw,Lw=Og,Fw=jw,Dw=Uy,Bw=$y,Uw=Cy,Ww=kb,Vw=Gy,qw=cy,$w=Vb,Yw=Eb,Zw=jb,Gw=Ib,Jw=Pg;function Hw(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Pw(e)}Hw.plugin=function(e,t){let r,n=!1;function s(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let s=t(...r);return s.postcssPlugin=e,s.postcssVersion=(new Pw).version,s}return Object.defineProperty(s,"postcss",{get:()=>(r||(r=s()),r)}),s.process=function(e,t,r){return Hw([s(r)]).process(e,t)},s},Hw.stringify=Lw,Hw.parse=$w,Hw.fromJSON=Fw,Hw.list=Yw,Hw.comment=e=>new Uw(e),Hw.atRule=e=>new Ww(e),Hw.decl=e=>new _w(e),Hw.rule=e=>new Zw(e),Hw.root=e=>new Gw(e),Hw.document=e=>new Dw(e),Hw.CssSyntaxError=Nw,Hw.Declaration=_w,Hw.Container=Tw,Hw.Processor=Pw,Hw.Document=Dw,Hw.Comment=Uw,Hw.Warning=Bw,Hw.AtRule=Ww,Hw.Result=Vw,Hw.Input=qw,Hw.Rule=Zw,Hw.Root=Gw,Hw.Node=Jw,zw.registerPostcss(Hw);var Xw=Hw;Hw.default=Hw;const Kw=ug(Xw);Kw.stringify,Kw.fromJSON,Kw.plugin,Kw.parse,Kw.list,Kw.document,Kw.comment,Kw.atRule,Kw.rule,Kw.decl,Kw.root,Kw.CssSyntaxError,Kw.Declaration,Kw.Container,Kw.Processor,Kw.Document,Kw.Comment,Kw.Warning,Kw.AtRule,Kw.Result,Kw.Input,Kw.Rule,Kw.Root,Kw.Node;class Qw{constructor(...e){hg(this,"parentElement",null),hg(this,"parentNode",null),hg(this,"ownerDocument"),hg(this,"firstChild",null),hg(this,"lastChild",null),hg(this,"previousSibling",null),hg(this,"nextSibling",null),hg(this,"ELEMENT_NODE",1),hg(this,"TEXT_NODE",3),hg(this,"nodeType"),hg(this,"nodeName"),hg(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof Qw))return!1;if(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 new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const ek={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tk={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},rk={};function nk(e){if(rk[e])return rk[e];const t=globalThis[e],r=t.prototype,n=e in ek?ek[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),i=e in tk?tk[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&o&&!globalThis.Zone)return rk[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const i=s[e].prototype;return document.body.removeChild(n),i?rk[e]=i:r}catch{return r}}const sk={};function ik(e,t,r){var n;const s=`${e}.${String(r)}`;if(sk[s])return sk[s].call(t);const i=nk(e),o=null==(n=Object.getOwnPropertyDescriptor(i,r))?void 0:n.get;return o?(sk[s]=o,o.call(t)):t[r]}const ok={};function ak(e,t,r){const n=`${e}.${String(r)}`;if(ok[n])return ok[n].bind(t);const s=nk(e)[r];return"function"!=typeof s?t[r]:(ok[n]=s,s.bind(t))}const lk={childNodes:function(e){return ik("Node",e,"childNodes")},parentNode:function(e){return ik("Node",e,"parentNode")},parentElement:function(e){return ik("Node",e,"parentElement")},textContent:function(e){return ik("Node",e,"textContent")},contains:function(e,t){return ak("Node",e,"contains")(t)},getRootNode:function(e){return ak("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?ik("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?ik("Element",e,"shadowRoot"):null},querySelector:function(e,t){return ik("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return ik("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return nk("MutationObserver").constructor}};const ck="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.";let hk={map:{},getId:()=>(console.error(ck),-1),getNode:()=>(console.error(ck),null),removeNodeFromMap(){console.error(ck)},has:()=>(console.error(ck),!1),reset(){console.error(ck)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(hk=new Proxy(hk,{get:(e,t,r)=>("map"===t&&console.error(ck),Reflect.get(e,t,r))}));let uk=Date.now;function dk(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:lk.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(uk=()=>(new Date).getTime());function pk(e){var t;let r=null;return"getRootNode"in e&&(null==(t=lk.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&lk.host(lk.getRootNode(e))&&(r=lk.host(lk.getRootNode(e))),r}function mk(e){let t,r=e;for(;t=pk(r);)r=t;return r}function fk(e){const t=e.ownerDocument;if(!t)return!1;const r=mk(e);return lk.contains(t,r)}const gk=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){od(this,"id",1),od(this,"styleIDMap",new WeakMap),od(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return 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++}},get _mirror(){return hk},closestElementOfNode:dk,getBaseDimension:function e(t,r){var n,s;const i=null==(s=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:s.frameElement;if(!i||i===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,r),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:mk,getShadowHost:pk,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,s;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=lk.parentElement(i.body))?void 0:t.scrollLeft)||(null==(r=null==i?void 0:i.body)?void 0:r.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(n=lk.parentElement(i.body))?void 0:n.scrollTop)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof Qw&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(lk.shadowRoot(e)))},hookSetter:function e(t,r,n,s,i=window){const o=i.Object.getOwnPropertyDescriptor(t,r);return i.Object.defineProperty(t,r,s?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,r,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(lk.contains(t,e)||fk(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&yd.host(e)||null;return Boolean(t&&"shadowRoot"in t&&yd.shadowRoot(t)===e)}(t))return!1;const n=r.getId(t);if(!r.has(n))return!0;const s=lk.parentNode(t);return(!s||s.nodeType!==t.DOCUMENT_NODE)&&(!s||e(s,r))},isBlocked:function(e,t,r,n){if(!e)return!1;const s=dk(e);if(!s)return!1;try{if("string"==typeof t){if(s.classList.contains(t))return!0;if(n&&null!==s.closest("."+t))return!0}else if(wd(s,t,n))return!0}catch(i){}if(r){if(s.matches(r))return!0;if(n&&null!==s.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return uk},on:function(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}},polyfill: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)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(const s of e){const{nextId:e,parentId:i}=s;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,r(s,i.parent))}else{const e=n.indexOf(i);n.splice(e,0,r(s,null))}}else if(i in t){const e=t[i];e.children.push(r(s,e))}else n.push(r(s,null))}return n},shadowHostInDom:fk,throttle:function(e,t,r={}){let n=null,s=0;return function(...i){const o=Date.now();s||!1!==r.leading||(s=o);const a=t-(o-s),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),s=o,e.apply(l,i)):n||!1===r.trailing||(n=setTimeout(()=>{s=!1===r.leading?0:Date.now(),n=null,e.apply(l,i)},a))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let n=e.length;n--;){const s=e[n];t.has(s.id)||(r.push(s),t.add(s.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var yk="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",bk="undefined"==typeof Uint8Array?[]:new Uint8Array(256),wk=0;wk<64;wk++)bk[yk.charCodeAt(wk)]=wk;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Qu=e.contentWindow)?void 0:Qu.Array.from)||Array.from,document.body.removeChild(e)}}catch(Xk){console.debug("Unable to override Array.from",Xk)}var kk;new bd,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(kk||(kk={}));class vk{constructor(e){sd(this,"fileName"),sd(this,"functionName"),sd(this,"lineNumber"),sd(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const Sk=/(^|@)\S+:\d+/,Ck=/^\s*at .*(\S+:\d+|\(native\))/m,xk=/^(eval@)?(\[native code])?$/,Ik={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Ck)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Ck)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const n=t.split(/\s+/).slice(1),s=this.extractLocation(r?r[1]:n.pop()),i=n.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0];return new vk({functionName:i,fileName:o,lineNumber:s[1],columnNumber:s[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(xk)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new vk({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,s=this.extractLocation(e.replace(t,""));return new vk({functionName:n,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[];for(let s=2,i=r.length;s<i;s+=2){const e=t.exec(r[s]);e&&n.push(new vk({fileName:e[2],lineNumber:parseFloat(e[1])}))}return n},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[];for(let s=0,i=r.length;s<i;s+=2){const e=t.exec(r[s]);e&&n.push(new vk({functionName:e[3]||void 0,fileName:e[2],lineNumber:parseFloat(e[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Sk)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new vk({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function Ak(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const n=e.parentElement,s=[];if(n.children&&n.children.length>0)for(let e=0;e<n.children.length;e++){const t=n.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&s.push(t)}s.length>1&&(r+=`:eq(${s.indexOf(e)})`),t=r+(t?">"+t:""),e=n}return t}function Ek(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ok(e,t){if(0===t)return!0;const r=Object.keys(e);for(const n of r)if(Ek(e[n])&&Ok(e[n],t-1))return!0;return!1}function Rk(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const n=[],s=[];return JSON.stringify(e,function(e,t){if(n.length>0){const r=n.indexOf(this);~r?n.splice(r+1):n.push(this),~r?s.splice(r,1/0,e):s.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Circular ~]":"[Circular ~."+s.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Ek(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Ek(e)&&Ok(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const n=t[r];Array.isArray(n)?e[r]=Ak(n.length?n[0]:null):e[r]=n}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Mk={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function jk(e,t,r){const n=r?Object.assign({},Mk,r):Mk,s=n.logger;if(!s)return()=>{};let i;i="string"==typeof s?t[s]:s;let o=0,a=!1;const l=[];if(n.level.includes("error")){const r=t=>{const r=t.message,s=t.error,i=Ik.parse(s).map(e=>e.toString()),o=[Rk(r,n.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",r),l.push(()=>{t.removeEventListener("error",r)});const s=t=>{let r,s;t.reason instanceof Error?(r=t.reason,s=[Rk(`Uncaught (in promise) ${r.name}: ${r.message}`,n.stringifyOptions)]):(r=new Error,s=[Rk("Uncaught (in promise)",n.stringifyOptions),Rk(t.reason,n.stringifyOptions)]);const i=Ik.parse(r).map(e=>e.toString());e({level:"error",trace:i,payload:s})};t.addEventListener("unhandledrejection",s),l.push(()=>{t.removeEventListener("unhandledrejection",s)})}for(const h of n.level)l.push(c(i,h));return()=>{l.forEach(e=>e())};function c(t,r){return t[r]?gk.patch(t,r,t=>(...s)=>{if(t.apply(this,s),!("assert"===r&&s[0]||a)){a=!0;try{const t=Ik.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===r?s.slice(1):s).map(e=>Rk(e,n.stringifyOptions));o++,o<n.lengthThreshold?e({level:r,trace:t,payload:i}):o===n.lengthThreshold&&e({level:"warn",trace:[],payload:[Rk("The number of log records reached the threshold.")]})}catch(i){t("rrweb logger error:",i,...s)}finally{a=!1}}}):()=>{}}}const Nk={recordOptions:{blockClass:"bf-nocapture",blockSelector:void 0,ignoreClass:"bf-ignore-input",ignoreCSSAttributes:void 0,maskTextClass:"bf-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskTextFn:void 0},recordConsolePlugin:{level:["error"],lengthThreshold:Number.POSITIVE_INFINITY,stringifyOptions:{stringLengthLimit:Number.POSITIVE_INFINITY,numOfKeysLimit:Number.POSITIVE_INFINITY,depthOfLimit:Number.POSITIVE_INFINITY}},samplingOptions:{scroll:150,media:1e3,canvas:8,input:"last"}};class _k{constructor(e){var t;__publicField(this,"options"),__publicField(this,"stop"),this.options={...Nk.recordOptions,emit:e,plugins:[(t=Nk.recordConsolePlugin,{name:"rrweb/console@1",observer:jk,options:t})],sampling:Nk.samplingOptions},this.stop=null}static mockImplementation(e){throw new Error("Method not implemented.")}start(){this.stop=$u(this.options)??null}getMirror(){return $u.mirror}takeFullSnapshot(){return $u.takeFullSnapshot()}}class zk{constructor(e){__publicField(this,"recordingManager"),__publicField(this,"isRunning"),__publicField(this,"events"),this.recordingManager=e,this.isRunning=!1,this.events=[]}start(){this.isRunning=!0}handle(e){this.isInitializingEvent(e)?this.events.push(e):this.stop(e)}isInitializingEvent(e){return[2,4].includes(e.type)||this.isSelectionEvent(e)||this.isConsoleEvent(e)}isSelectionEvent(e){return 3===e.type&&14===e.data.source}isConsoleEvent(e){return 6===e.type}stop(e){this.stamp(this.events,e.timestamp-1),this.publish(...this.events,e),this.events=[],this.isRunning=!1}stamp(e,t){e.forEach(e=>e.timestamp=t)}publish(...e){e.forEach(e=>{this.recordingManager.publishEvent(e)})}}function Tk(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var s=1,i="";if("?"===e[a=r+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--s){a++;break}}else if("("===e[a]&&(s++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(s)throw new TypeError("Unbalanced pattern at ".concat(r));if(!i)throw new TypeError("Missing pattern at ".concat(r));t.push({type:"PATTERN",index:r,value:i}),r=a}else{for(var o="",a=r+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[a++]}if(!o)throw new TypeError("Missing parameter name at ".concat(r));t.push({type:"NAME",index:r,value:o}),r=a}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,s=void 0===n?"./":n,i=t.delimiter,o=void 0===i?"/#?":i,a=[],l=0,c=0,h="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},d=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],s=n.type,i=n.index;throw new TypeError("Unexpected ".concat(s," at ").concat(i,", expected ").concat(e))},p=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t},m=function(e){var t=a[a.length-1],r=e||(t&&"string"==typeof t?t:"");if(t&&!r)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!r||function(e){for(var t=0,r=o;t<r.length;t++){var n=r[t];if(e.indexOf(n)>-1)return!0}return!1}(r)?"[^".concat(Lk(o),"]+?"):"(?:(?!".concat(Lk(r),")[^").concat(Lk(o),"])+?")};c<r.length;){var f=u("CHAR"),g=u("NAME"),y=u("PATTERN");if(g||y){var b=f||"";-1===s.indexOf(b)&&(h+=b,b=""),h&&(a.push(h),h=""),a.push({name:g||l++,prefix:b,suffix:"",pattern:y||m(b),modifier:u("MODIFIER")||""})}else{var w=f||u("ESCAPED_CHAR");if(w)h+=w;else if(h&&(a.push(h),h=""),u("OPEN")){b=p();var k=u("NAME")||"",v=u("PATTERN")||"",S=p();d("CLOSE"),a.push({name:k||(v?l++:""),pattern:k&&!v?m(b):v,prefix:b,suffix:S,modifier:u("MODIFIER")||""})}else d("END")}}return a}function Pk(e,t){var r=[];return function(e,t,r){void 0===r&&(r={});var n=r.decode,s=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var i=n[0],o=n.index,a=Object.create(null),l=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?a[r.name]=n[e].split(r.prefix+r.suffix).map(function(e){return s(e,r)}):a[r.name]=s(n[e],r)},c=1;c<n.length;c++)l(c);return{path:i,index:o,params:a}}}(Bk(e,r,t),r,t)}function Lk(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Fk(e){return e&&e.sensitive?"":"i"}function Dk(e,t,r){return function(e,t,r){void 0===r&&(r={});for(var n=r.strict,s=void 0!==n&&n,i=r.start,o=void 0===i||i,a=r.end,l=void 0===a||a,c=r.encode,h=void 0===c?function(e){return e}:c,u=r.delimiter,d=void 0===u?"/#?":u,p=r.endsWith,m="[".concat(Lk(void 0===p?"":p),"]|$"),f="[".concat(Lk(d),"]"),g=o?"^":"",y=0,b=e;y<b.length;y++){var w=b[y];if("string"==typeof w)g+=Lk(h(w));else{var k=Lk(h(w.prefix)),v=Lk(h(w.suffix));if(w.pattern)if(t&&t.push(w),k||v)if("+"===w.modifier||"*"===w.modifier){var S="*"===w.modifier?"?":"";g+="(?:".concat(k,"((?:").concat(w.pattern,")(?:").concat(v).concat(k,"(?:").concat(w.pattern,"))*)").concat(v,")").concat(S)}else g+="(?:".concat(k,"(").concat(w.pattern,")").concat(v,")").concat(w.modifier);else{if("+"===w.modifier||"*"===w.modifier)throw new TypeError('Can not repeat "'.concat(w.name,'" without a prefix and suffix'));g+="(".concat(w.pattern,")").concat(w.modifier)}else g+="(?:".concat(k).concat(v,")").concat(w.modifier)}}if(l)s||(g+="".concat(f,"?")),g+=r.endsWith?"(?=".concat(m,")"):"$";else{var C=e[e.length-1],x="string"==typeof C?f.indexOf(C[C.length-1])>-1:void 0===C;s||(g+="(?:".concat(f,"(?=").concat(m,"))?")),x||(g+="(?=".concat(f,"|").concat(m,")"))}return new RegExp(g,Fk(r))}(Tk(e,r),t,r)}function Bk(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;for(var r=/\((?:\?<(.*?)>)?(?!\?)/g,n=0,s=r.exec(e.source);s;)t.push({name:s[1]||n++,prefix:"",suffix:"",modifier:"",pattern:""}),s=r.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map(function(e){return Bk(e,t,r).source});return new RegExp("(?:".concat(n.join("|"),")"),Fk(r))}(e,t,r):Dk(e,t,r)}function Uk(e,t){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&!t)return!1;const r=window.location.pathname;for(const s of e)try{if(Pk(s,{decode:decodeURIComponent})(r))return!1}catch(n){if(s===r)return!1}return!0}const Wk=[td.MouseMove,td.MouseInteraction,td.Scroll,td.ViewportResize,td.Input,td.TouchMove,td.MediaInteraction,td.Drag];class Vk{constructor(e){__publicField(this,"agent"),__publicField(this,"recorder"),__publicField(this,"stasher"),this.agent=e,this.recorder=new _k(this.handleEvent.bind(this)),this.stasher=new zk(this)}start(){this.recorder.start()}handleEvent(e){const t=new URL(window.location.href),r=t.origin+t.pathname;if(Uk(this.agent.recordingBlocklist,this.agent._allowLocalhostRecording)){if(this.agent.sessionManager.isIdle){if(!this.isInteractiveEvent(e))return;this.agent.handleActivityDuringIdle()}if(this.isClick(e)){let t=$u.mirror.getNode(e.data.id);t&&this.nodeIsInteresting(t)&&(e.conversionData={},e.conversionData.eventType="click",e.conversionData.textContent=t.textContent,e.conversionData.htmlElement=t.nodeName?.toLowerCase(),e.conversionData.location=r)}this.isCustom(e)&&(e.conversionData={},e.conversionData.eventType="custom",e.conversionData.customEventType=e.data.tag,e.conversionData.location=r),this.stasher.isRunning?this.stasher.handle(e):this.publishEvent(e)}}publishEvent(e){this.agent.sender.handle(e),this.agent.timer&&this.agent.timer.restart()}startRecorderWithStasher(){this.stasher.start(),this.recorder=new _k(this.handleEvent.bind(this)),this.recorder.start()}isClick(e){return e.type===ed.IncrementalSnapshot&&e.data.source===td.MouseInteraction&&e.data.type===rd.Click}nodeIsInteresting(e){return"BUTTON"===e.nodeName||"ANCHOR"===e.nodeName}isCustom(e){return e.type===ed.Custom}isInteractiveEvent(e){return e.type===ed.IncrementalSnapshot&&Wk.includes(e.data?.source)}}class qk{constructor(e,t){__publicField(this,"agent"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timeoutId"),this.agent=e,this.MAX_IDLE_TIME=t,this.timeoutId=0}restart(){this.stop(),this.start()}stop(){clearTimeout(this.timeoutId)}start(){this.timeoutId=window.setTimeout(this.agent.handleTimeout.bind(this.agent),this.MAX_IDLE_TIME)}}const $k=class e{constructor(){__publicField(this,"sessionId",null),__publicField(this,"lastScreenViewEventTime",0),__publicField(this,"isIdle",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}determineSessionState(e){return!this.sessionId&&e?"new":this.sessionId&&e&&this.sessionId!==e?"changed":this.sessionId===e&&null!==this.sessionId?"active":"expired"}handleSessionTransition(e,t){switch(e){case"new":case"changed":this.updateIdleStatus(!1),t.takeFullSnapshot?.()}}updateSession(e,t={}){const r=this.determineSessionState(e);this.handleSessionTransition(r,t),this.sessionId=e}updateLastScreenViewEventTime(){this.lastScreenViewEventTime=Date.now()}updateIdleStatus(e){this.isIdle=e}getLastScreenViewEventTime(){return this.lastScreenViewEventTime}getCurrentSessionId(){return this.sessionId}};__publicField($k,"instance");let Yk=$k;const Zk=class e{constructor(){__publicField(this,"recordingManager"),__publicField(this,"sender"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timer"),__publicField(this,"sendEvents"),__publicField(this,"sendScreenViewEvent"),__publicField(this,"recordingBlocklist",[]),__publicField(this,"_allowLocalhostRecording"),__publicField(this,"_allowScreenRecording"),__publicField(this,"sessionCreationPromise",null),this.recordingManager=new Vk(this),this.sender=new Ku(this)}get sessionManager(){return e._sessionManager}async start({sendEvents:e,sendScreenViewEvent:t,recordingBlocklist:r,_allowLocalhostRecording:n,_allowScreenRecording:s}){this.sendEvents=e,this.sendScreenViewEvent=t,this.recordingBlocklist=r,this._allowLocalhostRecording=n,this._allowScreenRecording=s,this.MAX_IDLE_TIME=6e4,this.timer=new qk(this,this.MAX_IDLE_TIME),this.sender.start(),this.recordingManager.start()}handleTimeout(){this.recordingManager.recorder.stop&&this.recordingManager.recorder.stop(),this.sender.send(),this.recordingManager.startRecorderWithStasher(),e._sessionManager.updateIdleStatus(!0)}handleActivityDuringIdle(){null===e._sessionManager.getCurrentSessionId()&&(e._sessionManager.getLastScreenViewEventTime()>Date.now()-5e3||this.sessionCreationPromise||(this.sessionCreationPromise=this.createSession().finally(()=>{this.sessionCreationPromise=null})))}takeFullSnapshot(){return this.recordingManager.recorder.takeFullSnapshot()}static handleCustomEvent(e){$u.addCustomEvent(e,null)}async createSession(){if(this.sendScreenViewEvent)try{this.sendScreenViewEvent({__path:window.location.href,__title:document.title,__is_session_refresh:!0})}catch(e){console.error("Failed to send screen_view event:",e)}}};__publicField(Zk,"_sessionManager",Yk.getInstance());let Gk=Zk;function Jk(e){return e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))}class Hk extends Ne{constructor(e){if(super({sdk:"web",sdkVersion:"0.0.25",...e}),__publicField(this,"lastPath",""),__publicField(this,"debounceTimer",null),__publicField(this,"agent"),__publicField(this,"sessionManager",Yk.getInstance()),__publicField(this,"recordingBlocklist",[]),__publicField(this,"MAX_SCREENSHOT_SIZE",768e3),__publicField(this,"isRecordingActive",!1),this.options=e,this.agent=new Gk,this.recordingBlocklist=e.recordingBlocklist||[],!this.isServer()){this.setGlobalProperties({__referrer:document.referrer});const e=this.isTrackingDisabled();this.options.trackOutgoingLinks&&!e&&this.trackOutgoingLinks(),this.options.trackScreenViews&&this.trackScreenViews(),this.options.trackAttributes&&!e&&this.trackAttributes(),this.options.enableRecording&&this.options._allowScreenRecording&&!e&&(this.startRecording(),this.isRecordingActive=!0,console.log("Brainfish has started ambient learning"))}}debounce(e,t){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(e,t)}isServer(){return"undefined"==typeof document}trackOutgoingLinks(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,r=t.closest("a");if(r&&t){const e=r.getAttribute("href");e?.startsWith("http")&&super.track("link_out",{href:e,text:r.innerText||r.getAttribute("title")||t.getAttribute("alt")||t.getAttribute("title")})}})}trackScreenViews(){if(this.isServer())return;this.screenView();const e=history.pushState;history.pushState=function(...t){const r=e.apply(this,t);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),r};const t=history.replaceState;history.replaceState=function(...e){const r=t.apply(this,e);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),r},window.addEventListener("popstate",function(){window.dispatchEvent(new Event("locationchange"))});const r=()=>this.debounce(()=>this.screenView(),100);this.options.trackHashChanges?window.addEventListener("hashchange",r):window.addEventListener("locationchange",r)}trackAttributes(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,r=t.closest("button"),n=t.closest("a"),s=r?.getAttribute("data-track")?r:n?.getAttribute("data-track")?n:null;if(s){const e={};for(const r of s.attributes)r.name.startsWith("data-")&&"data-track"!==r.name&&(e[Jk(r.name.replace(/^data-/,""))]=r.value);const t=s.getAttribute("data-track");t&&super.track(t,e)}})}startRecording(){this.isServer()||this.agent.start({sendEvents:this.recordEventsToServer.bind(this),sendScreenViewEvent:this.sendScreenViewEvent.bind(this),recordingBlocklist:this.recordingBlocklist,_allowLocalhostRecording:this.options._allowLocalhostRecording})}async screenView(e,t){if(this.isServer())return;let r,n;if("string"==typeof e?(r=e,n=t):(r=window.location.href,n=e),this.lastPath===r)return;this.lastPath=r;const s={...n??{},__path:r,__title:document.title};if(this.options.enableRecording&&!this.isTrackingDisabled()&&Uk(this.recordingBlocklist,this.options._allowLocalhostRecording))try{const e=await async function(e){try{await _t(e);const t=document.body.cloneNode(!0);return Nt(t),await wt(t)}catch(t){console.error("An error occurred:",t)}}();e&&(e.length<=this.MAX_SCREENSHOT_SIZE?s.__screenshot=e:(s.__screenshotOmitted=!0,s.__screenshotSizeInBytes=e.length))}catch(Xk){s.__screenshotOmitted=!0,s.__screenshotError=Xk.message}this.sendScreenViewEvent(s)}async recordEventsToServer(e){const t=await this.record(e);this.sessionManager.updateSession(t,{takeFullSnapshot:()=>{this.agent.takeFullSnapshot()}})}sendScreenViewEvent(e){super.track("screen_view",e),this.sessionManager.updateLastScreenViewEventTime()}disableTracking(){super.disableTracking(),this.isRecordingActive&&(this.agent.recordingManager.recorder.stop&&this.agent.recordingManager.recorder.stop(),this.isRecordingActive=!1,console.log("Brainfish has stopped ambient learning"))}enableTracking(){super.enableTracking()}}(e=>{if(e.BrainfishAnalytics&&"q"in e.BrainfishAnalytics){const t=e.BrainfishAnalytics.q||[],r=t.findIndex(e=>"init"===e[0]);if(-1===r)return void console.warn("BrainfishAnalytics has not been initialized.");const[n]=t.splice(r,1),s=new Hk(n[1]);t.forEach(e=>{e[0]in s&&s[e[0]](...e.slice(1))}),e.BrainfishAnalytics=(e,...t)=>{const r=s[e]?s[e].bind(s):void 0;if("function"==typeof r)return r(...t);console.warn(`Method ${e} does not exist on BrainfishAnalytics`)}}})(window)}();
|
|
1
|
+
var __defProp=Object.defineProperty,__defNormalProp=(e,t,s)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,__publicField=(e,t,s)=>__defNormalProp(e,"symbol"!=typeof t?t+"":t,s);!function(){"use strict";const e=Object.create(null);e.open="0",e.close="1",e.ping="2",e.pong="3",e.message="4",e.upgrade="5",e.noop="6";const t=Object.create(null);Object.keys(e).forEach(s=>{t[e[s]]=s});const s={type:"error",data:"parser error"},r="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),n="function"==typeof ArrayBuffer,i=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,o=({type:t,data:s},o,l)=>r&&s instanceof Blob?o?l(s):a(s,l):n&&(s instanceof ArrayBuffer||i(s))?o?l(s):a(new Blob([s]),l):l(e[t]+(s||"")),a=(e,t)=>{const s=new FileReader;return s.onload=function(){const e=s.result.split(",")[1];t("b"+(e||""))},s.readAsDataURL(e)};function l(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let c;const h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let $b=0;$b<64;$b++)u[h.charCodeAt($b)]=$b;const p="function"==typeof ArrayBuffer,d=(e,r)=>{if("string"!=typeof e)return{type:"message",data:m(e,r)};const n=e.charAt(0);if("b"===n)return{type:"message",data:f(e.substring(1),r)};return t[n]?e.length>1?{type:t[n],data:e.substring(1)}:{type:t[n]}:s},f=(e,t)=>{if(p){const s=(e=>{let t,s,r,n,i,o=.75*e.length,a=e.length,l=0;"="===e[e.length-1]&&(o--,"="===e[e.length-2]&&o--);const c=new ArrayBuffer(o),h=new Uint8Array(c);for(t=0;t<a;t+=4)s=u[e.charCodeAt(t)],r=u[e.charCodeAt(t+1)],n=u[e.charCodeAt(t+2)],i=u[e.charCodeAt(t+3)],h[l++]=s<<2|r>>4,h[l++]=(15&r)<<4|n>>2,h[l++]=(3&n)<<6|63&i;return c})(e);return m(s,t)}return{base64:!0,data:e}},m=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,g=String.fromCharCode(30);function y(){return new TransformStream({transform(e,t){!function(e,t){r&&e.data instanceof Blob?e.data.arrayBuffer().then(l).then(t):n&&(e.data instanceof ArrayBuffer||i(e.data))?t(l(e.data)):o(e,!1,e=>{c||(c=new TextEncoder),t(c.encode(e))})}(e,s=>{const r=s.length;let n;if(r<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,r);else if(r<65536){n=new Uint8Array(3);const e=new DataView(n.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{n=new Uint8Array(9);const e=new DataView(n.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}e.data&&"string"!=typeof e.data&&(n[0]|=128),t.enqueue(n),t.enqueue(s)})}})}let w;function b(e){return e.reduce((e,t)=>e+t.length,0)}function v(e,t){if(e[0].length===t)return e.shift();const s=new Uint8Array(t);let r=0;for(let n=0;n<t;n++)s[n]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),s}function C(e){if(e)return function(e){for(var t in C.prototype)e[t]=C.prototype[t];return e}(e)}C.prototype.on=C.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},C.prototype.once=function(e,t){function s(){this.off(e,s),t.apply(this,arguments)}return s.fn=t,this.on(e,s),this},C.prototype.off=C.prototype.removeListener=C.prototype.removeAllListeners=C.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var n=0;n<r.length;n++)if((s=r[n])===t||s.fn===t){r.splice(n,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},C.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),s=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(s){r=0;for(var n=(s=s.slice(0)).length;r<n;++r)s[r].apply(this,t)}return this},C.prototype.emitReserved=C.prototype.emit,C.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},C.prototype.hasListeners=function(e){return!!this.listeners(e).length};const S="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),k="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")();function I(e,...t){return t.reduce((t,s)=>(e.hasOwnProperty(s)&&(t[s]=e[s]),t),{})}const x=k.setTimeout,O=k.clearTimeout;function A(e,t){t.useNativeTimers?(e.setTimeoutFn=x.bind(k),e.clearTimeoutFn=O.bind(k)):(e.setTimeoutFn=k.setTimeout.bind(k),e.clearTimeoutFn=k.clearTimeout.bind(k))}function E(e){return"string"==typeof e?function(e){let t=0,s=0;for(let r=0,n=e.length;r<n;r++)t=e.charCodeAt(r),t<128?s+=1:t<2048?s+=2:t<55296||t>=57344?s+=3:(r++,s+=4);return s}(e):Math.ceil(1.33*(e.byteLength||e.size))}function R(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}class M extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}}class N extends C{constructor(e){super(),this.writable=!1,A(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new M(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=d(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let s in e)e.hasOwnProperty(s)&&(t.length&&(t+="&"),t+=encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return t}(e);return t.length?"?"+t:""}}class _ extends N{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once("pollComplete",function(){--e||t()})),this.writable||(e++,this.once("drain",function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const s=e.split(g),r=[];for(let n=0;n<s.length;n++){const e=d(s[n],t);if(r.push(e),"error"===e.type)break}return r})(e,this.socket.binaryType).forEach(e=>{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)}),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const s=e.length,r=new Array(s);let n=0;e.forEach((e,i)=>{o(e,!1,e=>{r[i]=e,++n===s&&t(r.join(g))})})})(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}}let T=!1;try{T="undefined"!=typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(Kb){}const P=T;function L(){}class F extends _{constructor(e){if(super(e),"undefined"!=typeof location){const t="https:"===location.protocol;let s=location.port;s||(s=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){const s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(e,t)=>{this.onError("xhr post error",e,t)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(e,t)=>{this.onError("xhr poll error",e,t)}),this.pollXhr=e}}class D extends C{constructor(e,t,s){super(),this.createRequest=e,A(this,s),this._opts=s,this._method=s.method||"GET",this._uri=t,this._data=void 0!==s.data?s.data:null,this._create()}_create(){var e;const t=I(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(t);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&s.setRequestHeader(e,this._opts.extraHeaders[e])}}catch(r){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{s.setRequestHeader("Accept","*/*")}catch(r){}null===(e=this._opts.cookieJar)||void 0===e||e.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var e;3===s.readyState&&(null===(e=this._opts.cookieJar)||void 0===e||e.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(r){return void this.setTimeoutFn(()=>{this._onError(r)},0)}"undefined"!=typeof document&&(this._index=D.requestsCount++,D.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=L,e)try{this._xhr.abort()}catch(t){}"undefined"!=typeof document&&delete D.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(D.requestsCount=0,D.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",B);else if("function"==typeof addEventListener){addEventListener("onpagehide"in k?"pagehide":"unload",B,!1)}function B(){for(let e in D.requests)D.requests.hasOwnProperty(e)&&D.requests[e].abort()}const U=function(){const e=j({xdomain:!1});return e&&null!==e.responseType}();function j(e){const t=e.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!t||P))return new XMLHttpRequest}catch(s){}if(!t)try{return new(k[["Active"].concat("Object").join("X")])("Microsoft.XMLHTTP")}catch(s){}}const z="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class V extends N{get name(){return"websocket"}doOpen(){const e=this.uri(),t=this.opts.protocols,s=z?{}:I(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(Kb){return this.emitReserved("error",Kb)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;o(s,this.supportsBinary,e=>{try{this.doWrite(s,e)}catch(t){}r&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=R()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}}const W=k.WebSocket||k.MozWebSocket;const Y={websocket:class extends V{createSocket(e,t,s){return z?new W(e,t,s):t?new W(e,t):new W(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends N{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(Kb){return this.emitReserved("error",Kb)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const t=function(e,t){w||(w=new TextDecoder);const r=[];let n=0,i=-1,o=!1;return new TransformStream({transform(a,l){for(r.push(a);;){if(0===n){if(b(r)<1)break;const e=v(r,1);o=!(128&~e[0]),i=127&e[0],n=i<126?3:126===i?1:2}else if(1===n){if(b(r)<2)break;const e=v(r,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(b(r)<8)break;const e=v(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),o=t.getUint32(0);if(o>Math.pow(2,21)-1){l.enqueue(s);break}i=o*Math.pow(2,32)+t.getUint32(4),n=3}else{if(b(r)<i)break;const e=v(r,i);l.enqueue(d(o?e:w.decode(e),t)),n=0}if(0===i||i>e){l.enqueue(s);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=y();n.readable.pipeTo(e.writable),this._writer=n.writable.getWriter();const i=()=>{r.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){const s=e[t],r=t===e.length-1;this._writer.write(s).then(()=>{r&&S(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;null===(e=this._transport)||void 0===e||e.close()}},polling:class extends F{constructor(e){super(e);const t=e&&e.forceBase64;this.supportsBinary=U&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new D(j,this.uri(),e)}}},G=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function J(e){if(e.length>8e3)throw"URI too long";const t=e,s=e.indexOf("["),r=e.indexOf("]");-1!=s&&-1!=r&&(e=e.substring(0,s)+e.substring(s,r).replace(/:/g,";")+e.substring(r,e.length));let n=G.exec(e||""),i={},o=14;for(;o--;)i[Z[o]]=n[o]||"";return-1!=s&&-1!=r&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const s=/\/{2,9}/g,r=t.replace(s,"/").split("/");"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1);"/"==t.slice(-1)&&r.splice(r.length-1,1);return r}(0,i.path),i.queryKey=function(e,t){const s={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(s[t]=r)}),s}(0,i.query),i}const X="function"==typeof addEventListener&&"function"==typeof removeEventListener,H=[];X&&addEventListener("offline",()=>{H.forEach(e=>e())},!1);class K extends C{constructor(e,t){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&"object"==typeof e&&(t=e,e=null),e){const s=J(e);t.hostname=s.host,t.secure="https"===s.protocol||"wss"===s.protocol,t.port=s.port,s.query&&(t.query=s.query)}else t.host&&(t.hostname=J(t.host).host);A(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{const t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},s=e.split("&");for(let r=0,n=s.length;r<n;r++){let e=s[r].split("=");t[decodeURIComponent(e[0])]=decodeURIComponent(e[1])}return t}(this.opts.query)),X&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},H.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const s=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);const e=this.opts.rememberUpgrade&&K.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(e);t.open(),this.setTransport(t)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",e=>this._onClose("transport close",e))}onOpen(){this.readyState="open",K.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=e.data,this._onError(t);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data)}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){const s=this.writeBuffer[t].data;if(s&&(e+=E(s)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,S(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,t,s){return this._sendPacket("message",e,t,s),this}send(e,t,s){return this._sendPacket("message",e,t,s),this}_sendPacket(e,t,s,r){if("function"==typeof t&&(r=t,t=void 0),"function"==typeof s&&(r=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;const n={type:e,data:t,options:s};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),r&&this.once("flush",r),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},s=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():e()}):this.upgrading?s():e()),this}_onError(e){if(K.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),X&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const e=H.indexOf(this._offlineEventListener);-1!==e&&H.splice(e,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this._prevBufferLen=0}}}K.protocol=4;class $ extends K{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;K.priorWebsocketSuccess=!1;const r=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",e=>{if(!s)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;K.priorWebsocketSuccess="websocket"===t.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}}))};function n(){s||(s=!0,c(),t.close(),t=null)}const i=e=>{const s=new Error("probe error: "+e);s.transport=t.name,n(),this.emitReserved("upgradeError",s)};function o(){i("transport closed")}function a(){i("socket closed")}function l(e){t&&e.name!==t.name&&n()}const c=()=>{t.removeListener("open",r),t.removeListener("error",i),t.removeListener("close",o),this.off("close",a),this.off("upgrading",l)};t.once("open",r),t.once("error",i),t.once("close",o),this.once("close",a),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}}let q=class extends ${constructor(e,t={}){const s="object"==typeof e?e:t;(!s.transports||s.transports&&"string"==typeof s.transports[0])&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(e=>Y[e]).filter(e=>!!e)),super(e,s)}};const Q="function"==typeof ArrayBuffer,ee=Object.prototype.toString,te="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===ee.call(Blob),se="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===ee.call(File);function re(e){return Q&&(e instanceof ArrayBuffer||(e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer)(e))||te&&e instanceof Blob||se&&e instanceof File}function ne(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,s=e.length;t<s;t++)if(ne(e[t]))return!0;return!1}if(re(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1===arguments.length)return ne(e.toJSON(),!0);for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&ne(e[s]))return!0;return!1}function ie(e){const t=[],s=e.data,r=e;return r.data=oe(s,t),r.attachments=t.length,{packet:r,buffers:t}}function oe(e,t){if(!e)return e;if(re(e)){const s={_placeholder:!0,num:t.length};return t.push(e),s}if(Array.isArray(e)){const s=new Array(e.length);for(let r=0;r<e.length;r++)s[r]=oe(e[r],t);return s}if("object"==typeof e&&!(e instanceof Date)){const s={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(s[r]=oe(e[r],t));return s}return e}function ae(e,t){return e.data=le(e.data,t),delete e.attachments,e}function le(e,t){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let s=0;s<e.length;s++)e[s]=le(e[s],t);else if("object"==typeof e)for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(e[s]=le(e[s],t));return e}const ce=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var he,ue;(ue=he||(he={}))[ue.CONNECT=0]="CONNECT",ue[ue.DISCONNECT=1]="DISCONNECT",ue[ue.EVENT=2]="EVENT",ue[ue.ACK=3]="ACK",ue[ue.CONNECT_ERROR=4]="CONNECT_ERROR",ue[ue.BINARY_EVENT=5]="BINARY_EVENT",ue[ue.BINARY_ACK=6]="BINARY_ACK";function pe(e){return"[object Object]"===Object.prototype.toString.call(e)}class de extends C{constructor(e){super(),this.reviver=e}add(e){let t;if("string"==typeof e){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);const s=t.type===he.BINARY_EVENT;s||t.type===he.BINARY_ACK?(t.type=s?he.EVENT:he.ACK,this.reconstructor=new fe(t),0===t.attachments&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else{if(!re(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t))}}decodeString(e){let t=0;const s={type:Number(e.charAt(0))};if(void 0===he[s.type])throw new Error("unknown packet type "+s.type);if(s.type===he.BINARY_EVENT||s.type===he.BINARY_ACK){const r=t+1;for(;"-"!==e.charAt(++t)&&t!=e.length;);const n=e.substring(r,t);if(n!=Number(n)||"-"!==e.charAt(t))throw new Error("Illegal attachments");s.attachments=Number(n)}if("/"===e.charAt(t+1)){const r=t+1;for(;++t;){if(","===e.charAt(t))break;if(t===e.length)break}s.nsp=e.substring(r,t)}else s.nsp="/";const r=e.charAt(t+1);if(""!==r&&Number(r)==r){const r=t+1;for(;++t;){const s=e.charAt(t);if(null==s||Number(s)!=s){--t;break}if(t===e.length)break}s.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){const r=this.tryParse(e.substr(t));if(!de.isPayloadValid(s.type,r))throw new Error("invalid payload");s.data=r}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch(t){return!1}}static isPayloadValid(e,t){switch(e){case he.CONNECT:return pe(t);case he.DISCONNECT:return void 0===t;case he.CONNECT_ERROR:return"string"==typeof t||pe(t);case he.EVENT:case he.BINARY_EVENT:return Array.isArray(t)&&("number"==typeof t[0]||"string"==typeof t[0]&&-1===ce.indexOf(t[0]));case he.ACK:case he.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class fe{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const e=ae(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const me=Object.freeze(Object.defineProperty({__proto__:null,Decoder:de,Encoder:class{constructor(e){this.replacer=e}encode(e){return e.type!==he.EVENT&&e.type!==he.ACK||!ne(e)?[this.encodeAsString(e)]:this.encodeAsBinary({type:e.type===he.EVENT?he.BINARY_EVENT:he.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id})}encodeAsString(e){let t=""+e.type;return e.type!==he.BINARY_EVENT&&e.type!==he.BINARY_ACK||(t+=e.attachments+"-"),e.nsp&&"/"!==e.nsp&&(t+=e.nsp+","),null!=e.id&&(t+=e.id),null!=e.data&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){const t=ie(e),s=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(s),r}},get PacketType(){return he},protocol:5},Symbol.toStringTag,{value:"Module"}));function ge(e,t,s){return e.on(t,s),function(){e.off(t,s)}}const ye=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class we extends C{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[ge(e,"open",this.onopen.bind(this)),ge(e,"packet",this.onpacket.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,r,n;if(ye.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const i={type:he.EVENT,data:t,options:{}};if(i.options.compress=!1!==this.flags.compress,"function"==typeof t[t.length-1]){const e=this.ids++,s=t.pop();this._registerAckCallback(e,s),i.id=e}const o=null===(r=null===(s=this.io.engine)||void 0===s?void 0:s.transport)||void 0===r?void 0:r.writable,a=this.connected&&!(null===(n=this.io.engine)||void 0===n?void 0:n._hasPingExpired());return this.flags.volatile&&!o||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,t){var s;const r=null!==(s=this.flags.timeout)&&void 0!==s?s:this._opts.ackTimeout;if(void 0===r)return void(this.acks[e]=t);const n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,new Error("operation has timed out"))},r),i=(...e)=>{this.io.clearTimeoutFn(n),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((s,r)=>{const n=(e,t)=>e?r(e):s(t);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>{if(s!==this._queue[0])return;return null!==e?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...r)),s.pending=!1,this._drainQueue()}),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:he.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case he.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case he.EVENT:case he.BINARY_EVENT:this.onevent(e);break;case he.ACK:case he.BINARY_ACK:this.onack(e);break;case he.DISCONNECT:this.ondisconnect();break;case he.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let s=!1;return function(...r){s||(s=!0,t.packet({type:he.ACK,id:e,data:r}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:he.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const s of t)s.apply(this,e.data)}}}function be(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}be.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),s=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+s:e-s}return 0|Math.min(e,this.max)},be.prototype.reset=function(){this.attempts=0},be.prototype.setMin=function(e){this.ms=e},be.prototype.setMax=function(e){this.max=e},be.prototype.setJitter=function(e){this.jitter=e};class ve extends C{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,A(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(s=t.randomizationFactor)&&void 0!==s?s:.5),this.backoff=new be({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const r=t.parser||me;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new q(this.uri,this.opts);const t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const r=ge(t,"open",function(){s.onopen(),e&&e()}),n=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=ge(t,"error",n);if(!1!==this._timeout){const e=this._timeout,s=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(r),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(ge(e,"ping",this.onping.bind(this)),ge(e,"data",this.ondata.bind(this)),ge(e,"error",this.onerror.bind(this)),ge(e,"close",this.onclose.bind(this)),ge(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){S(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new we(this,e,t),this.nsps[e]=s),s}_destroy(e){const t=Object.keys(this.nsps);for(const s of t){if(this.nsps[s].active)return}this._close()}_packet(e){const t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),null===(s=this.engine)||void 0===s||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ce={};function Se(e,t){"object"==typeof e&&(t=e,e=void 0);const s=function(e,t="",s){let r=e;s=s||"undefined"!=typeof location&&location,null==e&&(e=s.protocol+"//"+s.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?s.protocol+e:s.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==s?s.protocol+"//"+e:"https://"+e),r=J(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const n=-1!==r.host.indexOf(":")?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+n+":"+r.port+t,r.href=r.protocol+"://"+n+(s&&s.port===r.port?"":":"+r.port),r}(e,(t=t||{}).path||"/socket.io"),r=s.source,n=s.id,i=s.path,o=Ce[n]&&i in Ce[n].nsps;let a;return t.forceNew||t["force new connection"]||!1===t.multiplex||o?a=new ve(r,t):(Ce[n]||(Ce[n]=new ve(r,t)),a=Ce[n]),s.query&&!t.query&&(t.query=s.queryKey),a.socket(s.path,t)}Object.assign(Se,{Manager:ve,Socket:we,io:Se,connect:Se});class ke{constructor(e){__publicField(this,"socket"),__publicField(this,"encode"),__publicField(this,"decode"),this.socket=Se(e.baseUrl,{transports:["websocket"],path:"/analytics/ws",auth:{token:e.authToken},query:e.query}),this.encode=e.encoder??(e=>function(e){const t=(new TextEncoder).encode(e);if("undefined"!=typeof window&&"function"==typeof window.btoa){const e=Array.from(t,e=>String.fromCharCode(e)).join("");return btoa(e)}if("undefined"!=typeof Buffer)return Buffer.from(t).toString("base64");throw new Error("[utils.base64Encode]: Unsupported environment")}(JSON.stringify(e))),this.decode=e.decoder??(e=>JSON.parse((e=>{if("undefined"!=typeof window&&"function"==typeof window.atob){const t=atob(e),s=t.length,r=new Uint8Array(s);for(let e=0;e<s;e++)r[e]=t.charCodeAt(e);return(new TextDecoder).decode(r)}if("undefined"!=typeof Buffer)return Buffer.from(e,"base64").toString("utf-8");throw new Error("[utils.base64Decode]: Unsupported environment")})(e)))}send(e,t,s){"function"==typeof s?this.socket.emit(e,this.encode(t),s):this.socket.emit(e,this.encode(t))}on(e,t){this.socket.on(e,e=>t(this.decode(e)))}}class Ie{constructor(e){__publicField(this,"baseUrl"),__publicField(this,"authToken"),__publicField(this,"sdkMetadata"),this.baseUrl=e.baseUrl,this.authToken=e.authToken,this.sdkMetadata=e.sdkMetadata}async send(e,t){const s=new URL(e,this.baseUrl),r={...t,...this.sdkMetadata&&{sdk:this.sdkMetadata}};try{const e=await fetch(s.toString(),{method:"POST",headers:{"Content-Type":"application/json",...this.authToken&&{Authorization:`Bearer ${this.authToken}`}},body:JSON.stringify(r)});if(!e.ok)return null;let t;try{t=await e.json()}catch{t={}}return t}catch(n){}}}class xe{constructor(e){if(__publicField(this,"defaultTTL"),__publicField(this,"items"),this.defaultTTL=e,e<=0)throw new Error("Default TTL must be a positive number.");this.items=new Map,this.defaultTTL=e,setInterval(()=>this.cleanup(),e)}add(e,t){const s=void 0!==t?t:this.defaultTTL;if(s<=0)throw new Error("TTL must be a positive number.");const r=Date.now()+s;this.items.set(e,r)}has(e){const t=this.items.get(e);return void 0!==t&&(!(Date.now()>t)||(this.items.delete(e),!1))}delete(e){this.items.delete(e)}get size(){return this.cleanup(),this.items.size}clear(){this.items.clear()}cleanup(){const e=Date.now();for(const[t,s]of this.items.entries())s<=e&&this.items.delete(t)}toArray(){return this.cleanup(),Array.from(this.items.keys())}}let Oe=null;var Ae,Ee,Re,Me;"undefined"!=typeof window&&window.addEventListener("message",e=>{if("https://agent.brainfi.sh"===e.origin&&"REQUEST_USER_IDENTITY"===e.data?.type&&Oe&&e.source){const t=document.querySelector("#bf-iframe-container .trigger-iframe");if(!t||e.source!==t.contentWindow)return void console.warn("BrainfishWidgetWarn: Rejected REQUEST_USER_IDENTITY from untrusted iframe source:",e.origin);e.source.postMessage({type:"USER_IDENTIFY",payload:Oe},e.origin)}}),(Ee=Ae||(Ae={})).OpenUrl="openUrl",Ee.CallPhone="callPhone",Ee.SendEmail="sendEmail",Ee.TriggerEvent="triggerEvent",(Me=Re||(Re={})).Button="button",Me.Link="link";const Ne=class e{constructor(t){__publicField(this,"options"),__publicField(this,"client"),__publicField(this,"httpClient"),__publicField(this,"userId"),__publicField(this,"global"),__publicField(this,"queue",[]),__publicField(this,"knownEvents",["nudge.show"]),__publicField(this,"eventListeners",{}),__publicField(this,"recentNudgeIds",new xe(1e3)),__publicField(this,"trackingDisabled",!1),this.options=t;const s={sdk_name:t.sdk||"node",sdk_version:t.sdkVersion||""},r=t.apiUrl||"https://analytic.brainfi.sh",n=t.accessKey;this.client=new ke({baseUrl:r,authToken:n,query:s}),this.httpClient=new Ie({baseUrl:r,authToken:n,sdkMetadata:{name:t.sdk||"node",version:t.sdkVersion||""}}),"undefined"!=typeof window&&"undefined"!=typeof localStorage&&(this.trackingDisabled="true"===localStorage.getItem(e.TRACKING_DISABLED_KEY)),this.setupIncomingPayloadHandler()}init(){}ready(){this.options.waitForUser=!1,this.flush()}setupIncomingPayloadHandler(){this.client.on("e",this.handleIncomingPayload.bind(this))}handleIncomingPayload(e){if("nudge.show"===e.type){const{nudgeId:t}=e.payload;if(this.recentNudgeIds.has(t))return;this.recentNudgeIds.add(t),this.dispatchEventListeners("nudge.show",e.payload)}}dispatchEventListeners(e,t){this.eventListeners[e]?.forEach(e=>e(t))}on(e,t){this.knownEvents.includes(e)&&(this.eventListeners[e]||(this.eventListeners[e]=[]),this.eventListeners[e].push(t))}off(e,t){this.knownEvents.includes(e)&&this.eventListeners[e]&&(this.eventListeners[e]=this.eventListeners[e].filter(e=>e!==t),0===this.eventListeners[e].length&&delete this.eventListeners[e])}async send(e,t){return this.options.disabled||this.trackingDisabled||this.options.filter&&!this.options.filter(e)?Promise.resolve():this.options.waitForUser&&!this.userId?(this.queue.push(e),Promise.resolve()):this.client.send("t",e,t)}setGlobalProperties(e){this.global={...this.global,...e}}async track(e,t,s){return this.send({type:"event.track",payload:{name:e,userId:t?.userId??this.userId,properties:{...this.global??{},...t??{},...s?{_bfOverrides:s}:{}}}})}async identify(e){e.userId?(this.userId=e.userId,this.flush()):console.warn("BrainfishWidgetWarn: `.identify` called without a userId. User identification requires a valid userId to be provided.");const t=new Set(["userId","firstName","lastName","email","phone","avatar","properties"]),s=Object.keys(e).filter(e=>!t.has(e));s.length>0&&console.warn(`BrainfishWidgetWarn: The following fields are not recognized as main identifier fields: ${s.join(", ")}. Please place custom fields under the 'properties' object instead. Note: Using fields incorrectly may cause user identification to not work as expected.`),e.phone&&!/^\+[1-9]\d{1,14}$/.test(e.phone)&&console.warn("BrainfishWidgetWarn: phone should be in E.164 format (e.g., +14155552671). Providing the correct format ensures accurate user identification."),Oe=e;const r=document.querySelector("#bf-iframe-container .trigger-iframe");if(r){const t=()=>{r.contentWindow&&r.contentWindow.postMessage({type:"USER_IDENTIFY",payload:e},"*")};r.contentWindow&&t(),r.addEventListener("load",t)}if(Object.keys(e).length>1)return this.send({type:"user.identify",payload:{...e,properties:{...this.global,...e.properties}}})}async record(e){if(this.options.disabled)return Promise.resolve(null);if(this.trackingDisabled)return Promise.resolve(null);const t={type:"event.record",payload:{events:e,userId:this.userId}};if(this.options.filter&&!this.options.filter(t))return Promise.resolve(null);const s=await this.httpClient.send("/s",{events:e,userId:this.userId});return s?.sessionId||null}async alias(e){return this.send({type:"user.alias",payload:e})}async increment(e){return this.send({type:"user.increment",payload:e})}async decrement(e){return this.send({type:"user.decrement",payload:e})}clear(){this.userId=void 0}flush(){this.queue.forEach(e=>{this.send({...e,payload:{...e.payload,userId:e.payload.userId??this.userId}})}),this.queue=[]}disableTracking(){this.trackingDisabled=!0,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.setItem(e.TRACKING_DISABLED_KEY,"true")}enableTracking(){this.trackingDisabled=!1,"undefined"!=typeof window&&"undefined"!=typeof localStorage&&localStorage.removeItem(e.TRACKING_DISABLED_KEY),console.log("Brainfish tracking re-enabled. Refresh page for full effect.")}isTrackingDisabled(){return this.trackingDisabled}};__publicField(Ne,"TRACKING_DISABLED_KEY","bf_tracking_disabled");let _e=Ne;var Te,Pe=Object.defineProperty,Le=(e,t,s)=>((e,t,s)=>t in e?Pe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Fe=Object.defineProperty,De=(e,t,s)=>((e,t,s)=>t in e?Fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),Be=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Be||{});const Ue={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},je={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ze={};function Ve(e){if(ze[e])return ze[e];const t=globalThis[e],s=t.prototype,r=e in Ue?Ue[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in je?je[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return ze[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?ze[e]=i:s}catch{return s}}const We={};function Ye(e,t,s){var r;const n=`${e}.${String(s)}`;if(We[n])return We[n].call(t);const i=Ve(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(We[n]=o,o.call(t)):t[s]}const Ge={};function Ze(e,t,s){const r=`${e}.${String(s)}`;if(Ge[r])return Ge[r].bind(t);const n=Ve(e)[s];return"function"!=typeof n?t[s]:(Ge[r]=n,n.bind(t))}const Je={childNodes:function(e){return Ye("Node",e,"childNodes")},parentNode:function(e){return Ye("Node",e,"parentNode")},parentElement:function(e){return Ye("Node",e,"parentElement")},textContent:function(e){return Ye("Node",e,"textContent")},contains:function(e,t){return Ze("Node",e,"contains")(t)},getRootNode:function(e){return Ze("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Ye("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Ye("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Ye("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Ye("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return Ve("MutationObserver").constructor}};function Xe(e){return e.nodeType===e.ELEMENT_NODE}function He(e){const t=e&&"host"in e&&"mode"in e&&Je.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Je.shadowRoot(t)===e)}function Ke(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function $e(e){try{const s=e.rules||e.cssRules;if(!s)return null;let r=e.href;!r&&e.ownerNode&&e.ownerNode.ownerDocument&&(r=e.ownerNode.ownerDocument.location.href);const n=Array.from(s,e=>qe(e,r)).join("");return(t=n).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(s){return null}var t}function qe(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=$e(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const s=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?s.push("layer"):e.layerName&&s.push(`layer(${e.layerName})`),e.supportsText&&s.push(`supports(${e.supportsText})`),e.media.length&&s.push(e.media.mediaText),s.join(" ")+";"}(e)}catch(s){t=e.cssText}return e.styleSheet.href?ct(t,e.styleSheet.href):t}{let s=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(s=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(s)),t?ct(s,t):s}}let Qe=class{constructor(){De(this,"idNodeMap",new Map),De(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const 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){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function et({element:e,maskInputOptions:t,tagName:s,type:r,value:n,maskInputFn:i}){let o=n||"";const a=r&&tt(r);return(t[s.toLowerCase()]||a&&t[a])&&(o=i?i(o,e):"*".repeat(o.length)),o}function tt(e){return e.toLowerCase()}const st="__rrweb_original__";function rt(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?tt(t):null}function nt(e,t){let s;try{s=new URL(e,t??window.location.href)}catch(Kb){return null}const r=s.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==r?void 0:r[1])??null}const it=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ot=/^(?:[a-z+]+:)?\/\//i,at=/^www\..*/i,lt=/^(data:)([^,]*),(.*)/i;function ct(e,t){return(e||"").replace(it,(e,s,r,n,i,o)=>{const a=r||i||o,l=s||n||"";if(!a)return e;if(ot.test(a)||at.test(a))return`url(${l}${a}${l})`;if(lt.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),h=a.split("/");c.pop();for(const t of h)"."!==t&&(".."===t?c.pop():c.push(t));return`url(${l}${c.join("/")}${l})`})}function ht(e){return e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"")}function ut(e,t){return function(e,t){const s=Array.from(t.childNodes),r=[];if(s.length>1&&e&&"string"==typeof e){const t=ht(e);for(let n=1;n<s.length;n++)if(s[n].textContent&&"string"==typeof s[n].textContent){const i=ht(s[n].textContent);for(let s=3;s<i.length;s++){const n=i.substring(0,s);if(2===t.split(n).length){const s=t.indexOf(n);for(let t=s;t<e.length;t++)if(ht(e.substring(0,t)).length===s){r.push(e.substring(0,t)),e=e.substring(t);break}break}}}}return r.push(e),r}(e,t).join("/* rr_split */")}let pt=1;const dt=new RegExp("[^a-z0-9-_:]");function ft(){return pt++}let mt,gt;const yt=/^[^ \t\n\r\u000c]+/,wt=/^[, \t\n\r\u000c]+/;const bt=new WeakMap;function vt(e,t){return t&&""!==t.trim()?St(e,t):t}function Ct(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function St(e,t){let s=bt.get(e);if(s||(s=e.createElement("a"),bt.set(e,s)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return s.setAttribute("href",t),s.href}function kt(e,t,s,r){return r?"src"===s||"href"===s&&("use"!==t||"#"!==r[0])||"xlink:href"===s&&"#"!==r[0]?vt(e,r):"background"!==s||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===s?function(e,t){if(""===t.trim())return t;let s=0;function r(e){let r;const n=e.exec(t.substring(s));return n?(r=n[0],s+=r.length,r):""}const n=[];for(;r(wt),!(s>=t.length);){let i=r(yt);if(","===i.slice(-1))i=vt(e,i.substring(0,i.length-1)),n.push(i);else{let r="";i=vt(e,i);let o=!1;for(;;){const e=t.charAt(s);if(""===e){n.push((i+r).trim());break}if(o)")"===e&&(o=!1);else{if(","===e){s+=1,n.push((i+r).trim());break}"("===e&&(o=!0)}r+=e,s+=1}}}return n.join(", ")}(e,r):"style"===s?ct(r,St(e)):"object"===t&&"data"===s?vt(e,r):r:vt(e,r):r}function It(e,t,s){return("video"===e||"audio"===e)&&"autoplay"===t}function xt(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&xt(Je.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&xt(Je.parentNode(e),t,s)}function Ot(e,t,s,r){let n;if(Xe(e)){if(n=e,!Je.childNodes(n).length)return!1}else{if(null===Je.parentElement(e))return!1;n=Je.parentElement(e)}try{if("string"==typeof t){if(r){if(n.closest(`.${t}`))return!0}else if(n.classList.contains(t))return!0}else if(xt(n,t,r))return!0;if(s)if(r){if(n.closest(s))return!0}else if(n.matches(s))return!0}catch(i){}return!1}function At(e,t){const{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:o,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:h,dataURLOptions:u={},inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m=!1,cssCaptured:g=!1}=t,y=function(e,t){if(!t.hasNode(e))return;const s=t.getId(e);return 1===s?void 0:s}(s,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Be.Document,childNodes:[],compatMode:e.compatMode}:{type:Be.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Be.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return function(e,t){const{doc:s,blockClass:r,blockSelector:n,inlineStylesheet:i,maskInputOptions:o={},maskInputFn:a,dataURLOptions:l={},inlineImages:c,recordCanvas:h,keepIframeSrcFn:u,newlyAddedElement:p=!1,rootId:d}=t,f=function(e,t,s){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let s=e.classList.length;s--;){const r=e.classList[s];if(t.test(r))return!0}if(s)return e.matches(s)}catch(r){}return!1}(e,r,n),m=function(e){if(e instanceof HTMLFormElement)return"form";const t=tt(e.tagName);return dt.test(t)?"div":t}(e);let g={};const y=e.attributes.length;for(let v=0;v<y;v++){const t=e.attributes[v];It(m,t.name,t.value)||(g[t.name]=kt(s,m,tt(t.name),t.value))}if("link"===m&&i){const t=Array.from(s.styleSheets).find(t=>t.href===e.href);let r=null;t&&(r=$e(t)),r&&(delete g.rel,delete g.href,g._cssText=r)}if("style"===m&&e.sheet){let t=$e(e.sheet);t&&(e.childNodes.length>1&&(t=ut(t,e)),g._cssText=t)}if("input"===m||"textarea"===m||"select"===m){const t=e.value,s=e.checked;"radio"!==g.type&&"checkbox"!==g.type&&"submit"!==g.type&&"button"!==g.type&&t?g.value=et({element:e,type:rt(e),tagName:m,value:t,maskInputOptions:o,maskInputFn:a}):s&&(g.checked=s)}"option"===m&&(e.selected&&!o.select?g.selected=!0:delete g.selected);"dialog"===m&&e.open&&(g.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===m&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let s=0;s<e.width;s+=50)for(let r=0;r<e.height;r+=50){const n=t.getImageData,i=st in n?n[st]:n;if(new Uint32Array(i.call(t,s,r,Math.min(50,e.width-s),Math.min(50,e.height-r)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(g.rr_dataURL=e.toDataURL(l.type,l.quality));else if(!("__context"in e)){const t=e.toDataURL(l.type,l.quality),r=s.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(l.type,l.quality)&&(g.rr_dataURL=t)}if("img"===m&&c){mt||(mt=s.createElement("canvas"),gt=mt.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",n=t.crossOrigin,i=()=>{t.removeEventListener("load",i);try{mt.width=t.naturalWidth,mt.height=t.naturalHeight,gt.drawImage(t,0,0),g.rr_dataURL=mt.toDataURL(l.type,l.quality)}catch(Kb){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i));console.warn(`Cannot inline img src=${r}! Error: ${Kb}`)}"anonymous"===t.crossOrigin&&(n?g.crossOrigin=n:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?i():t.addEventListener("load",i)}if("audio"===m||"video"===m){const t=g;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}p||(e.scrollLeft&&(g.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(g.rr_scrollTop=e.scrollTop));if(f){const{width:t,height:s}=e.getBoundingClientRect();g={class:g.class,rr_width:`${t}px`,rr_height:`${s}px`}}"iframe"!==m||u(g.src)||(e.contentDocument||(g.rr_src=g.src),delete g.src);let w;try{customElements.get(m)&&(w=!0)}catch(b){}return{type:Be.Element,tagName:m,attributes:g,childNodes:[],isSVG:Ct(e)||void 0,needBlock:f,rootId:d,isCustom:w}}(e,{doc:s,blockClass:n,blockSelector:i,inlineStylesheet:a,maskInputOptions:l,maskInputFn:h,dataURLOptions:u,inlineImages:p,recordCanvas:d,keepIframeSrcFn:f,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return function(e,t){const{needsMask:s,maskTextFn:r,rootId:n,cssCaptured:i}=t,o=Je.parentNode(e),a=o&&o.tagName;let l="";const c="STYLE"===a||void 0,h="SCRIPT"===a||void 0;h?l="SCRIPT_PLACEHOLDER":i||(l=Je.textContent(e),c&&l&&(l=ct(l,St(t.doc))));!c&&!h&&l&&s&&(l=r?r(l,Je.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:Be.Text,textContent:l||"",rootId:n}}(e,{doc:s,needsMask:o,maskTextFn:c,rootId:y,cssCaptured:g});case e.CDATA_SECTION_NODE:return{type:Be.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:Be.Comment,textContent:Je.textContent(e)||"",rootId:y};default:return!1}}function Et(e){return null==e?"":e.toLowerCase()}function Rt(e,t){const{doc:s,mirror:r,blockClass:n,blockSelector:i,maskTextClass:o,maskTextSelector:a,skipChild:l=!1,inlineStylesheet:c=!0,maskInputOptions:h={},maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f={},inlineImages:m=!1,recordCanvas:g=!1,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:v,stylesheetLoadTimeout:C=5e3,keepIframeSrcFn:S=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=t;let{needsMask:x}=t,{preserveWhiteSpace:O=!0}=t;if(!x){x=Ot(e,o,a,void 0===x)}const A=At(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,dataURLOptions:f,inlineImages:m,recordCanvas:g,keepIframeSrcFn:S,newlyAddedElement:k,cssCaptured:I});if(!A)return console.warn(e,"not serialized"),null;let E;E=r.hasNode(e)?r.getId(e):function(e,t){if(t.comment&&e.type===Be.Comment)return!0;if(e.type===Be.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===nt(e.attributes.href)))return!0;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;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Et(e.attributes.name).match(/^description|keywords$/))return!0;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;if(t.headMetaRobots&&("robots"===Et(e.attributes.name)||"googlebot"===Et(e.attributes.name)||"bingbot"===Et(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;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;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}(A,d)||!O&&A.type===Be.Text&&!A.textContent.replace(/^\s+|\s+$/gm,"").length?-2:ft();const R=Object.assign(A,{id:E});if(r.add(e,R),-2===E)return null;y&&y(e);let M=!l;if(R.type===Be.Element){M=M&&!R.needBlock,delete R.needBlock;const t=Je.shadowRoot(e);t&&Ke(t)&&(R.isShadowHost=!0)}if((R.type===Be.Document||R.type===Be.Element)&&M){d.headWhitespace&&R.type===Be.Element&&"head"===R.tagName&&(O=!1);const t={doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:l,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S,cssCaptured:!1};if(R.type===Be.Element&&"textarea"===R.tagName&&void 0!==R.attributes.value);else{R.type===Be.Element&&void 0!==R.attributes._cssText&&"string"==typeof R.attributes._cssText&&(t.cssCaptured=!0);for(const s of Array.from(Je.childNodes(e))){const e=Rt(s,t);e&&R.childNodes.push(e)}}let k=null;if(Xe(e)&&(k=Je.shadowRoot(e)))for(const e of Array.from(Je.childNodes(k))){const s=Rt(e,t);s&&(Ke(k)&&(s.isShadow=!0),R.childNodes.push(s))}}const N=Je.parentNode(e);return N&&He(N)&&Ke(N)&&(R.isShadow=!0),R.type===Be.Element&&"iframe"===R.tagName&&function(e,t,s){const r=e.contentWindow;if(!r)return;let n,i=!1;try{n=r.document.readyState}catch(a){return}if("complete"!==n){const r=setTimeout(()=>{i||(t(),i=!0)},s);return void e.addEventListener("load",()=>{clearTimeout(r),i=!0,t()})}const o="about:blank";if(r.location.href!==o||e.src===o||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&w){const s=Rt(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});s&&w(e,s)}},b),R.type===Be.Element&&"link"===R.tagName&&"string"==typeof R.attributes.rel&&("stylesheet"===R.attributes.rel||"preload"===R.attributes.rel&&"string"==typeof R.attributes.href&&"css"===nt(R.attributes.href))&&function(e,t,s){let r,n=!1;try{r=e.sheet}catch(o){return}if(r)return;const i=setTimeout(()=>{n||(t(),n=!0)},s);e.addEventListener("load",()=>{clearTimeout(i),n=!0,t()})}(e,()=>{if(v){const t=Rt(e,{doc:s,mirror:r,blockClass:n,blockSelector:i,needsMask:x,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:c,maskInputOptions:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:d,dataURLOptions:f,inlineImages:m,recordCanvas:g,preserveWhiteSpace:O,onSerialize:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:v,stylesheetLoadTimeout:C,keepIframeSrcFn:S});t&&v(e,t)}},C),R}function Mt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Nt(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var _t={exports:{}},Tt=String,Pt=function(){return{isColorSupported:!1,reset:Tt,bold:Tt,dim:Tt,italic:Tt,underline:Tt,inverse:Tt,hidden:Tt,strikethrough:Tt,black:Tt,red:Tt,green:Tt,yellow:Tt,blue:Tt,magenta:Tt,cyan:Tt,white:Tt,gray:Tt,bgBlack:Tt,bgRed:Tt,bgGreen:Tt,bgYellow:Tt,bgBlue:Tt,bgMagenta:Tt,bgCyan:Tt,bgWhite:Tt}};_t.exports=Pt(),_t.exports.createColors=Pt;var Lt=_t.exports;const Ft=Nt(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Dt=Lt,Bt=Ft,Ut=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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){if(!this.source)return"";let t=this.source;null==e&&(e=Dt.isColorSupported),Bt&&e&&(t=Bt(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Dt.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var jt=Ut;Ut.default=Ut;var zt={};zt.isClean=Symbol("isClean"),zt.my=Symbol("my");const Vt={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Wt=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="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 r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Vt[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Vt[s]),i.rawCache[s]=r,r}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,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Yt=Wt;Wt.default=Wt;let Gt=Yt;function Zt(e,t){new Gt(t).stringify(e)}var Jt=Zt;Zt.default=Zt;let{isClean:Xt,my:Ht}=zt,Kt=jt,$t=Yt,qt=Jt;function Qt(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Qt(e,s)):("object"===i&&null!==n&&(n=Qt(n)),s[r]=n)}return s}let es=class{constructor(e={}){this.raws={},this[Xt]=!1,this[Ht]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Qt(this);for(let s in e)t[s]=e[s];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}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Kt(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Xt]){this[Xt]=!1;let e=this;for(;e=e.parent;)e[Xt]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new $t).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=qt){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var ts=es;es.default=es;let ss=ts,rs=class extends ss{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]}};var ns=rs;rs.default=rs;var is={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:os,SourceMapGenerator:as}=Ft,{existsSync:ls,readFileSync:cs}=Ft,{dirname:hs,join:us}=Ft;let ps=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=hs(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new os(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=hs(e),ls(e))return this.mapFile=e,cs(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof os)return as.fromSourceMap(t).toString();if(t instanceof as)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=us(hs(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)}};var ds=ps;ps.default=ps;let{SourceMapConsumer:fs,SourceMapGenerator:ms}=Ft,{fileURLToPath:gs,pathToFileURL:ys}=Ft,{isAbsolute:ws,resolve:bs}=Ft,{nanoid:vs}=is,Cs=Ft,Ss=jt,ks=ds,Is=Symbol("fromOffsetCache"),xs=Boolean(fs&&ms),Os=Boolean(bs&&ws),As=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!Os||/^\w+:\/\//.test(t.from)||ws(t.from)?this.file=t.from:this.file=bs(t.from)),Os&&xs){let e=new ks(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 "+vs(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new Ss(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,r.plugin):new Ss(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(ys&&(n.input.url=ys(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[Is])s=this[Is];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[Is]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:bs(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=ws(a.source)?ys(a.source):new URL(a.source,this.map.consumer().sourceRoot||ys(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!gs)throw new Error("file: protocol is not available in this PostCSS build");l.file=gs(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var Es=As;As.default=As,Cs&&Cs.registerInput&&Cs.registerInput(As);let{SourceMapConsumer:Rs,SourceMapGenerator:Ms}=Ft,{dirname:Ns,relative:_s,resolve:Ts,sep:Ps}=Ft,{pathToFileURL:Ls}=Ft,Fs=Es,Ds=Boolean(Rs&&Ms),Bs=Boolean(Ns&&Ts&&_s&&Ps);var Us=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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,s=this.toUrl(this.path(e.file)),r=e.root||Ns(e.file);!1===this.mapOpts.sourcesContent?(t=new Rs(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),Bs&&Ds&&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=Ms.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Ms({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(){this.css="",this.map=new Ms({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={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&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?Ns(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=Ns(Ts(s,this.mapOpts.annotation)));let r=_s(s,e);return this.memoizedPaths.set(e,r),r}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 Fs(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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 Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ls){let t=Ls(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Ps&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let js=ts,zs=class extends js{constructor(e){super(e),this.type="comment"}};var Vs=zs;zs.default=zs;let Ws,Ys,Gs,Zs,{isClean:Js,my:Xs}=zt,Hs=ns,Ks=Vs,$s=ts;function qs(e){return e.map(e=>(e.nodes&&(e.nodes=qs(e.nodes)),delete e.source,e))}function Qs(e){if(e[Js]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Qs(t)}let er=class e extends $s{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=qs(Ws(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Hs(t)]}else if(t.selector)t=[new Ys(t)];else if(t.name)t=[new Gs(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Ks(t)]}return t.map(t=>(t[Xs]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Js]&&Qs(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};er.registerParse=e=>{Ws=e},er.registerRule=e=>{Ys=e},er.registerAtRule=e=>{Gs=e},er.registerRoot=e=>{Zs=e};var tr=er;er.default=er,er.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Gs.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ys.prototype):"decl"===e.type?Object.setPrototypeOf(e,Hs.prototype):"comment"===e.type?Object.setPrototypeOf(e,Ks.prototype):"root"===e.type&&Object.setPrototypeOf(e,Zs.prototype),e[Xs]=!0,e.nodes&&e.nodes.forEach(e=>{er.rebuild(e)})};let sr,rr,nr=tr,ir=class extends nr{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new sr(new rr,this,e).stringify()}};ir.registerLazyResult=e=>{sr=e},ir.registerProcessor=e=>{rr=e};var or=ir;ir.default=ir;let ar={};var lr=function(e){ar[e]||(ar[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let cr=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 s in t)this[s]=t[s]}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}};var hr=cr;cr.default=cr;let ur=hr,pr=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new ur(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var dr=pr;pr.default=pr;const fr="'".charCodeAt(0),mr='"'.charCodeAt(0),gr="\\".charCodeAt(0),yr="/".charCodeAt(0),wr="\n".charCodeAt(0),br=" ".charCodeAt(0),vr="\f".charCodeAt(0),Cr="\t".charCodeAt(0),Sr="\r".charCodeAt(0),kr="[".charCodeAt(0),Ir="]".charCodeAt(0),xr="(".charCodeAt(0),Or=")".charCodeAt(0),Ar="{".charCodeAt(0),Er="}".charCodeAt(0),Rr=";".charCodeAt(0),Mr="*".charCodeAt(0),Nr=":".charCodeAt(0),_r="@".charCodeAt(0),Tr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Pr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Lr=/.[\r\n"'(/\\]/,Fr=/[\da-f]/i;let Dr=tr,Br=class extends Dr{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)}};var Ur=Br;Br.default=Br,Dr.registerAtRule(Br);let jr,zr,Vr=tr,Wr=class extends Vr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new jr(new zr,this,e).stringify()}};Wr.registerLazyResult=e=>{jr=e},Wr.registerProcessor=e=>{zr=e};var Yr=Wr;Wr.default=Wr,Vr.registerRoot(Wr);let Gr={comma:e=>Gr.split(e,[","],!0),space:e=>Gr.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Zr=Gr;Gr.default=Gr;let Jr=tr,Xr=Zr,Hr=class extends Jr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Xr.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Kr=Hr;Hr.default=Hr,Jr.registerRule(Hr);let $r=ns,qr=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case wr:case br:case Cr:case Sr:case vr:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===br||s===wr||s===Cr||s===Sr||s===vr);u=["space",p.slice(m,r)],m=r-1;break;case kr:case Ir:case Ar:case Er:case Nr:case Rr:case Or:{let e=String.fromCharCode(s);u=[e,e,m];break}case xr:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==fr&&h!==mr&&h!==br&&h!==wr&&h!==Cr&&h!==vr&&h!==Sr){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===gr;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Lr.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case fr:case mr:n=s===fr?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===gr;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case _r:Tr.lastIndex=m+1,Tr.test(p),r=0===Tr.lastIndex?p.length-1:Tr.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case gr:for(r=m,o=!0;p.charCodeAt(r+1)===gr;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==yr&&s!==br&&s!==wr&&s!==Cr&&s!==Sr&&s!==vr&&(r+=1,Fr.test(p.charAt(r)))){for(;Fr.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===br&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===yr&&p.charCodeAt(m+1)===Mr?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Pr.lastIndex=m+1,Pr.test(p),r=0===Pr.lastIndex?p.length-1:Pr.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Qr=Vs,en=Ur,tn=Yr,sn=Kr;const rn={empty:!0,space:!0};let nn=tr,on=class{constructor(e){this.input=e,this.root=new tn,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,s,r,n=new en;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Qr;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=qr(this.input)}decl(e,t){let s=new $r;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 sn;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",rn[a]||rn[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new sn;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},an=Es;function ln(e,t){let s=new an(e,t),r=new on(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var cn=ln;ln.default=ln,nn.registerParse(ln);let{isClean:hn,my:un}=zt,pn=Us,dn=Jt,fn=tr,mn=or,gn=lr,yn=dr,wn=cn,bn=Yr;const vn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cn={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},Sn={Once:!0,postcssPlugin:!0,prepare:!0};function kn(e){return"object"==typeof e&&"function"==typeof e.then}function In(e){let t=!1,s=vn[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function xn(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:In(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function On(e){return e[hn]=!1,e.nodes&&e.nodes.forEach(e=>On(e)),e}let An={},En=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof yn)n=On(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=wn;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[un]&&fn.rebuild(n)}else n=On(s);this.result=new yn(t,n,r),this.helpers={...An,postcss:An,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!Cn[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Sn[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(kn(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[hn];){e[hn]=!0;let s=[xn(e)];for(;s.length>0;){let e=this.visitTick(s);if(kn(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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));return kn(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=dn;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new pn(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(kn(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[hn];)e[hn]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||gn("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(kn(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[hn])return r[hn]=!0,void e.push(xn(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[hn]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[hn]=!0;let t=In(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[hn]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,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"}};En.registerPostcss=e=>{An=e};var Rn=En;En.default=En,bn.registerLazyResult(En),mn.registerLazyResult(En);let Mn=Us,Nn=Jt,_n=lr,Tn=cn;const Pn=dr;let Ln=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Nn;this.result=new Pn(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Mn(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||_n("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=Tn;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Fn=Ln;Ln.default=Ln;let Dn=Fn,Bn=Rn,Un=or,jn=Yr,zn=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Bn(this,e,t):new Dn(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vn=zn;zn.default=zn,jn.registerProcessor(zn),Un.registerProcessor(zn);let Wn=ns,Yn=ds,Gn=Vs,Zn=Ur,Jn=Es,Xn=Yr,Hn=Kr;function Kn(e,t){if(Array.isArray(e))return e.map(e=>Kn(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Jn.prototype};s.map&&(s.map={...s.map,__proto__:Yn.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Kn(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Xn(r);if("decl"===r.type)return new Wn(r);if("rule"===r.type)return new Hn(r);if("comment"===r.type)return new Gn(r);if("atrule"===r.type)return new Zn(r);throw new Error("Unknown node type: "+e.type)}var $n=Kn;Kn.default=Kn;let qn=jt,Qn=ns,ei=Rn,ti=tr,si=Vn,ri=Jt,ni=$n,ii=or,oi=hr,ai=Vs,li=Ur,ci=dr,hi=Es,ui=cn,pi=Zr,di=Kr,fi=Yr,mi=ts;function gi(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new si(e)}gi.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new si).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return gi([n(s)]).process(e,t)},n},gi.stringify=ri,gi.parse=ui,gi.fromJSON=ni,gi.list=pi,gi.comment=e=>new ai(e),gi.atRule=e=>new li(e),gi.decl=e=>new Qn(e),gi.rule=e=>new di(e),gi.root=e=>new fi(e),gi.document=e=>new ii(e),gi.CssSyntaxError=qn,gi.Declaration=Qn,gi.Container=ti,gi.Processor=si,gi.Document=ii,gi.Comment=ai,gi.Warning=oi,gi.AtRule=li,gi.Result=ci,gi.Input=hi,gi.Rule=di,gi.Root=fi,gi.Node=mi,ei.registerPostcss(gi);var yi=gi;gi.default=gi;const wi=Mt(yi);wi.stringify,wi.fromJSON,wi.plugin,wi.parse,wi.list,wi.document,wi.comment,wi.atRule,wi.rule,wi.decl,wi.root,wi.CssSyntaxError,wi.Declaration,wi.Container,wi.Processor,wi.Document,wi.Comment,wi.Warning,wi.AtRule,wi.Result,wi.Input,wi.Rule,wi.Root,wi.Node;var bi=Object.defineProperty,vi=(e,t,s)=>((e,t,s)=>t in e?bi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function Ci(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Si(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var ki={exports:{}},Ii=String,xi=function(){return{isColorSupported:!1,reset:Ii,bold:Ii,dim:Ii,italic:Ii,underline:Ii,inverse:Ii,hidden:Ii,strikethrough:Ii,black:Ii,red:Ii,green:Ii,yellow:Ii,blue:Ii,magenta:Ii,cyan:Ii,white:Ii,gray:Ii,bgBlack:Ii,bgRed:Ii,bgGreen:Ii,bgYellow:Ii,bgBlue:Ii,bgMagenta:Ii,bgCyan:Ii,bgWhite:Ii}};ki.exports=xi(),ki.exports.createColors=xi;var Oi=ki.exports;const Ai=Si(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ei=Oi,Ri=Ai,Mi=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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){if(!this.source)return"";let t=this.source;null==e&&(e=Ei.isColorSupported),Ri&&e&&(t=Ri(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ei.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ni=Mi;Mi.default=Mi;var _i={};_i.isClean=Symbol("isClean"),_i.my=Symbol("my");const Ti={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Pi=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="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 r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Ti[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Ti[s]),i.rawCache[s]=r,r}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,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Li=Pi;Pi.default=Pi;let Fi=Li;function Di(e,t){new Fi(t).stringify(e)}var Bi=Di;Di.default=Di;let{isClean:Ui,my:ji}=_i,zi=Ni,Vi=Li,Wi=Bi;function Yi(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Yi(e,s)):("object"===i&&null!==n&&(n=Yi(n)),s[r]=n)}return s}let Gi=class{constructor(e={}){this.raws={},this[Ui]=!1,this[ji]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Yi(this);for(let s in e)t[s]=e[s];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}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new zi(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Ui]){this[Ui]=!1;let e=this;for(;e=e.parent;)e[Ui]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Vi).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wi){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Zi=Gi;Gi.default=Gi;let Ji=Zi,Xi=class extends Ji{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]}};var Hi=Xi;Xi.default=Xi;var Ki={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:$i,SourceMapGenerator:qi}=Ai,{existsSync:Qi,readFileSync:eo}=Ai,{dirname:to,join:so}=Ai;let ro=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=to(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new $i(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=to(e),Qi(e))return this.mapFile=e,eo(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof $i)return qi.fromSourceMap(t).toString();if(t instanceof qi)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=so(to(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)}};var no=ro;ro.default=ro;let{SourceMapConsumer:io,SourceMapGenerator:oo}=Ai,{fileURLToPath:ao,pathToFileURL:lo}=Ai,{isAbsolute:co,resolve:ho}=Ai,{nanoid:uo}=Ki,po=Ai,fo=Ni,mo=no,go=Symbol("fromOffsetCache"),yo=Boolean(io&&oo),wo=Boolean(ho&&co),bo=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!wo||/^\w+:\/\//.test(t.from)||co(t.from)?this.file=t.from:this.file=ho(t.from)),wo&&yo){let e=new mo(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 "+uo(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new fo(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,r.plugin):new fo(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(lo&&(n.input.url=lo(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[go])s=this[go];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[go]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:ho(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=co(a.source)?lo(a.source):new URL(a.source,this.map.consumer().sourceRoot||lo(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ao)throw new Error("file: protocol is not available in this PostCSS build");l.file=ao(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var vo=bo;bo.default=bo,po&&po.registerInput&&po.registerInput(bo);let{SourceMapConsumer:Co,SourceMapGenerator:So}=Ai,{dirname:ko,relative:Io,resolve:xo,sep:Oo}=Ai,{pathToFileURL:Ao}=Ai,Eo=vo,Ro=Boolean(Co&&So),Mo=Boolean(ko&&xo&&Io&&Oo);var No=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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,s=this.toUrl(this.path(e.file)),r=e.root||ko(e.file);!1===this.mapOpts.sourcesContent?(t=new Co(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),Mo&&Ro&&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=So.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new So({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(){this.css="",this.map=new So({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={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&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ko(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=ko(xo(s,this.mapOpts.annotation)));let r=Io(s,e);return this.memoizedPaths.set(e,r),r}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 Eo(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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 Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ao){let t=Ao(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===Oo&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let _o=Zi,To=class extends _o{constructor(e){super(e),this.type="comment"}};var Po=To;To.default=To;let Lo,Fo,Do,Bo,{isClean:Uo,my:jo}=_i,zo=Hi,Vo=Po,Wo=Zi;function Yo(e){return e.map(e=>(e.nodes&&(e.nodes=Yo(e.nodes)),delete e.source,e))}function Go(e){if(e[Uo]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Go(t)}let Zo=class e extends Wo{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=Yo(Lo(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new zo(t)]}else if(t.selector)t=[new Fo(t)];else if(t.name)t=[new Do(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Vo(t)]}return t.map(t=>(t[jo]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Uo]&&Go(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Zo.registerParse=e=>{Lo=e},Zo.registerRule=e=>{Fo=e},Zo.registerAtRule=e=>{Do=e},Zo.registerRoot=e=>{Bo=e};var Jo=Zo;Zo.default=Zo,Zo.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Do.prototype):"rule"===e.type?Object.setPrototypeOf(e,Fo.prototype):"decl"===e.type?Object.setPrototypeOf(e,zo.prototype):"comment"===e.type?Object.setPrototypeOf(e,Vo.prototype):"root"===e.type&&Object.setPrototypeOf(e,Bo.prototype),e[jo]=!0,e.nodes&&e.nodes.forEach(e=>{Zo.rebuild(e)})};let Xo,Ho,Ko=Jo,$o=class extends Ko{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Xo(new Ho,this,e).stringify()}};$o.registerLazyResult=e=>{Xo=e},$o.registerProcessor=e=>{Ho=e};var qo=$o;$o.default=$o;let Qo={};var ea=function(e){Qo[e]||(Qo[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let ta=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 s in t)this[s]=t[s]}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}};var sa=ta;ta.default=ta;let ra=sa,na=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new ra(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var ia=na;na.default=na;const oa="'".charCodeAt(0),aa='"'.charCodeAt(0),la="\\".charCodeAt(0),ca="/".charCodeAt(0),ha="\n".charCodeAt(0),ua=" ".charCodeAt(0),pa="\f".charCodeAt(0),da="\t".charCodeAt(0),fa="\r".charCodeAt(0),ma="[".charCodeAt(0),ga="]".charCodeAt(0),ya="(".charCodeAt(0),wa=")".charCodeAt(0),ba="{".charCodeAt(0),va="}".charCodeAt(0),Ca=";".charCodeAt(0),Sa="*".charCodeAt(0),ka=":".charCodeAt(0),Ia="@".charCodeAt(0),xa=/[\t\n\f\r "#'()/;[\\\]{}]/g,Oa=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Aa=/.[\r\n"'(/\\]/,Ea=/[\da-f]/i;let Ra=Jo,Ma=class extends Ra{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)}};var Na=Ma;Ma.default=Ma,Ra.registerAtRule(Ma);let _a,Ta,Pa=Jo,La=class extends Pa{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new _a(new Ta,this,e).stringify()}};La.registerLazyResult=e=>{_a=e},La.registerProcessor=e=>{Ta=e};var Fa=La;La.default=La,Pa.registerRoot(La);let Da={comma:e=>Da.split(e,[","],!0),space:e=>Da.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ba=Da;Da.default=Da;let Ua=Jo,ja=Ba,za=class extends Ua{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return ja.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Va=za;za.default=za,Ua.registerRule(za);let Wa=Hi,Ya=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case ha:case ua:case da:case fa:case pa:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ua||s===ha||s===da||s===fa||s===pa);u=["space",p.slice(m,r)],m=r-1;break;case ma:case ga:case ba:case va:case ka:case Ca:case wa:{let e=String.fromCharCode(s);u=[e,e,m];break}case ya:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==oa&&h!==aa&&h!==ua&&h!==ha&&h!==da&&h!==pa&&h!==fa){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===la;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Aa.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case oa:case aa:n=s===oa?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===la;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Ia:xa.lastIndex=m+1,xa.test(p),r=0===xa.lastIndex?p.length-1:xa.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case la:for(r=m,o=!0;p.charCodeAt(r+1)===la;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==ca&&s!==ua&&s!==ha&&s!==da&&s!==fa&&s!==pa&&(r+=1,Ea.test(p.charAt(r)))){for(;Ea.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ua&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===ca&&p.charCodeAt(m+1)===Sa?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(Oa.lastIndex=m+1,Oa.test(p),r=0===Oa.lastIndex?p.length-1:Oa.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ga=Po,Za=Na,Ja=Fa,Xa=Va;const Ha={empty:!0,space:!0};let Ka=Jo,$a=class{constructor(e){this.input=e,this.root=new Ja,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,s,r,n=new Za;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ga;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=Ya(this.input)}decl(e,t){let s=new Wa;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Xa;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Ha[a]||Ha[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Xa;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},qa=vo;function Qa(e,t){let s=new qa(e,t),r=new $a(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var el=Qa;Qa.default=Qa,Ka.registerParse(Qa);let{isClean:tl,my:sl}=_i,rl=No,nl=Bi,il=Jo,ol=qo,al=ea,ll=ia,cl=el,hl=Fa;const ul={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},pl={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},dl={Once:!0,postcssPlugin:!0,prepare:!0};function fl(e){return"object"==typeof e&&"function"==typeof e.then}function ml(e){let t=!1,s=ul[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function gl(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ml(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function yl(e){return e[tl]=!1,e.nodes&&e.nodes.forEach(e=>yl(e)),e}let wl={},bl=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof ll)n=yl(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=cl;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[sl]&&il.rebuild(n)}else n=yl(s);this.result=new ll(t,n,r),this.helpers={...wl,postcss:wl,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!pl[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!dl[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(fl(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tl];){e[tl]=!0;let s=[gl(e)];for(;s.length>0;){let e=this.visitTick(s);if(fl(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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));return fl(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=nl;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new rl(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(fl(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tl];)e[tl]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||al("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(fl(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[tl])return r[tl]=!0,void e.push(gl(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[tl]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[tl]=!0;let t=ml(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[tl]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,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"}};bl.registerPostcss=e=>{wl=e};var vl=bl;bl.default=bl,hl.registerLazyResult(bl),ol.registerLazyResult(bl);let Cl=No,Sl=Bi,kl=ea,Il=el;const xl=ia;let Ol=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=Sl;this.result=new xl(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new Cl(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||kl("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=Il;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var Al=Ol;Ol.default=Ol;let El=Al,Rl=vl,Ml=qo,Nl=Fa,_l=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Rl(this,e,t):new El(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Tl=_l;_l.default=_l,Nl.registerProcessor(_l),Ml.registerProcessor(_l);let Pl=Hi,Ll=no,Fl=Po,Dl=Na,Bl=vo,Ul=Fa,jl=Va;function zl(e,t){if(Array.isArray(e))return e.map(e=>zl(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Bl.prototype};s.map&&(s.map={...s.map,__proto__:Ll.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>zl(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Ul(r);if("decl"===r.type)return new Pl(r);if("rule"===r.type)return new jl(r);if("comment"===r.type)return new Fl(r);if("atrule"===r.type)return new Dl(r);throw new Error("Unknown node type: "+e.type)}var Vl=zl;zl.default=zl;let Wl=Ni,Yl=Hi,Gl=vl,Zl=Jo,Jl=Tl,Xl=Bi,Hl=Vl,Kl=qo,$l=sa,ql=Po,Ql=Na,ec=ia,tc=vo,sc=el,rc=Ba,nc=Va,ic=Fa,oc=Zi;function ac(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Jl(e)}ac.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Jl).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return ac([n(s)]).process(e,t)},n},ac.stringify=Xl,ac.parse=sc,ac.fromJSON=Hl,ac.list=rc,ac.comment=e=>new ql(e),ac.atRule=e=>new Ql(e),ac.decl=e=>new Yl(e),ac.rule=e=>new nc(e),ac.root=e=>new ic(e),ac.document=e=>new Kl(e),ac.CssSyntaxError=Wl,ac.Declaration=Yl,ac.Container=Zl,ac.Processor=Jl,ac.Document=Kl,ac.Comment=ql,ac.Warning=$l,ac.AtRule=Ql,ac.Result=ec,ac.Input=tc,ac.Rule=nc,ac.Root=ic,ac.Node=oc,Gl.registerPostcss(ac);var lc=ac;ac.default=ac;const cc=Ci(lc);cc.stringify,cc.fromJSON,cc.plugin,cc.parse,cc.list,cc.document,cc.comment,cc.atRule,cc.rule,cc.decl,cc.root,cc.CssSyntaxError,cc.Declaration,cc.Container,cc.Processor,cc.Document,cc.Comment,cc.Warning,cc.AtRule,cc.Result,cc.Input,cc.Rule,cc.Root,cc.Node;let hc=class e{constructor(...e){vi(this,"parentElement",null),vi(this,"parentNode",null),vi(this,"ownerDocument"),vi(this,"firstChild",null),vi(this,"lastChild",null),vi(this,"previousSibling",null),vi(this,"nextSibling",null),vi(this,"ELEMENT_NODE",1),vi(this,"TEXT_NODE",3),vi(this,"nodeType"),vi(this,"nodeName"),vi(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(t){if(!(t instanceof e))return!1;if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}};const uc={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},pc={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},dc={};function fc(e){if(dc[e])return dc[e];const t=globalThis[e],s=t.prototype,r=e in uc?uc[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in pc?pc[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return dc[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?dc[e]=i:s}catch{return s}}const mc={};function gc(e,t,s){var r;const n=`${e}.${String(s)}`;if(mc[n])return mc[n].call(t);const i=fc(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(mc[n]=o,o.call(t)):t[s]}const yc={};function wc(e,t,s){const r=`${e}.${String(s)}`;if(yc[r])return yc[r].bind(t);const n=fc(e)[s];return"function"!=typeof n?t[s]:(yc[r]=n,n.bind(t))}function bc(){return fc("MutationObserver").constructor}const vc={childNodes:function(e){return gc("Node",e,"childNodes")},parentNode:function(e){return gc("Node",e,"parentNode")},parentElement:function(e){return gc("Node",e,"parentElement")},textContent:function(e){return gc("Node",e,"textContent")},contains:function(e,t){return wc("Node",e,"contains")(t)},getRootNode:function(e){return wc("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?gc("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?gc("Element",e,"shadowRoot"):null},querySelector:function(e,t){return gc("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return gc("Element",e,"querySelectorAll")(t)},mutationObserver:bc};function Cc(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)}const Sc="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.";let kc={map:{},getId:()=>(console.error(Sc),-1),getNode:()=>(console.error(Sc),null),removeNodeFromMap(){console.error(Sc)},has:()=>(console.error(Sc),!1),reset(){console.error(Sc)}};function Ic(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}}function xc(e,t,s,r,n=window){const i=n.Object.getOwnPropertyDescriptor(e,t);return n.Object.defineProperty(e,t,r?s:{set(e){setTimeout(()=>{s.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>xc(e,t,i||{},!0)}function Oc(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(kc=new Proxy(kc,{get:(e,t,s)=>("map"===t&&console.error(Sc),Reflect.get(e,t,s))}));let Ac=Date.now;function Ec(e){var t,s,r,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=vc.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=vc.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}}function Rc(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Mc(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Nc(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:vc.parentElement(e)}function _c(e,t,s,r){if(!e)return!1;const n=Nc(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(xt(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1}function Tc(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)}function Pc(e,t){if(He(e))return!1;const s=t.getId(e);if(!t.has(s))return!0;const r=vc.parentNode(e);return(!r||r.nodeType!==e.DOCUMENT_NODE)&&(!r||Pc(r,t))}function Lc(e){return Boolean(e.changedTouches)}function Fc(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Dc(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Bc(e){return!!e&&(e instanceof hc&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(vc.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ac=()=>(new Date).getTime());let Uc=class{constructor(){Le(this,"id",1),Le(this,"styleIDMap",new WeakMap),Le(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}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 jc(e){var t;let s=null;return"getRootNode"in e&&(null==(t=vc.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&vc.host(vc.getRootNode(e))&&(s=vc.host(vc.getRootNode(e))),s}function zc(e){const t=e.ownerDocument;if(!t)return!1;const s=function(e){let t,s=e;for(;t=jc(s);)s=t;return s}(e);return vc.contains(t,s)}function Vc(e){const t=e.ownerDocument;return!!t&&(vc.contains(t,e)||zc(e))}var Wc=(e=>(e[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))(Wc||{}),Yc=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(Yc||{}),Gc=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Gc||{}),Zc=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Zc||{}),Jc=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Jc||{}),Xc=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Xc||{}),Hc=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Hc||{});function Kc(e){return"__ln"in e}class $c{constructor(){Le(this,"length",0),Le(this,"head",null),Le(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let s=0;s<e;s++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Kc(e.previousSibling)){const s=e.previousSibling.__ln.next;t.next=s,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,s&&(s.previous=t)}else if(e.nextSibling&&Kc(e.nextSibling)&&e.nextSibling.__ln.previous){const s=e.nextSibling.__ln.previous;t.previous=s,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,s&&(s.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){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const qc=(e,t)=>`${e}@${t}`;class Qc{constructor(){Le(this,"frozen",!1),Le(this,"locked",!1),Le(this,"texts",[]),Le(this,"attributes",[]),Le(this,"attributeMap",new WeakMap),Le(this,"removes",[]),Le(this,"mapRemoves",[]),Le(this,"movedMap",{}),Le(this,"addedSet",new Set),Le(this,"movedSet",new Set),Le(this,"droppedSet",new Set),Le(this,"removesSubTreeCache",new Set),Le(this,"mutationCb"),Le(this,"blockClass"),Le(this,"blockSelector"),Le(this,"maskTextClass"),Le(this,"maskTextSelector"),Le(this,"inlineStylesheet"),Le(this,"maskInputOptions"),Le(this,"maskTextFn"),Le(this,"maskInputFn"),Le(this,"keepIframeSrcFn"),Le(this,"recordCanvas"),Le(this,"inlineImages"),Le(this,"slimDOMOptions"),Le(this,"dataURLOptions"),Le(this,"doc"),Le(this,"mirror"),Le(this,"iframeManager"),Le(this,"stylesheetManager"),Le(this,"shadowDomManager"),Le(this,"canvasManager"),Le(this,"processedNodeManager"),Le(this,"unattachedDoc"),Le(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Le(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,s=new $c,r=e=>{let t=e,s=-2;for(;-2===s;)t=t&&t.nextSibling,s=t&&this.mirror.getId(t);return s},n=n=>{const i=vc.parentNode(n);if(!i||!Vc(n))return;let o=!1;if(n.nodeType===Node.TEXT_NODE){const e=i.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(i)&&(o=!0)}const a=He(i)?this.mirror.getId(jc(n)):this.mirror.getId(i),l=r(n);if(-1===a||-1===l)return s.addNode(n);const c=Rt(n,{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=>{Fc(e,this.mirror)&&this.iframeManager.addIframe(e),Dc(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Bc(n)&&this.shadowDomManager.addShadowRoot(vc.shadowRoot(n),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:o});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const a of this.movedSet)th(this.removesSubTreeCache,a,this.mirror)&&!this.movedSet.has(vc.parentNode(a))||n(a);for(const a of this.addedSet)sh(this.droppedSet,a)||th(this.removesSubTreeCache,a,this.mirror)?sh(this.movedSet,a)?n(a):this.droppedSet.add(a):n(a);let i=null;for(;s.length;){let e=null;if(i){const t=this.mirror.getId(vc.parentNode(i.value)),s=r(i.value);-1!==t&&-1!==s&&(e=i)}if(!e){let t=s.tail;for(;t;){const s=t;if(t=t.previous,s){const t=this.mirror.getId(vc.parentNode(s.value));if(-1===r(s.value))continue;if(-1!==t){e=s;break}{const t=s.value,r=vc.parentNode(t);if(r&&r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=vc.host(r);if(-1!==this.mirror.getId(t)){e=s;break}}}}}}if(!e){for(;s.head;)s.removeNode(s.head.value);break}i=e.previous,s.removeNode(e.value),n(e.value)}const o={texts:this.texts.map(e=>{const t=e.node,s=vc.parentNode(t);return s&&"TEXTAREA"===s.tagName&&this.genTextAreaValueMutation(s),{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=>{const{attributes:t}=e;if("string"==typeof t.style){const s=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);s.length<t.style.length&&(s+r).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))}),Le(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t)),t.attributes.value=Array.from(vc.childNodes(e),e=>vc.textContent(e)||"").join("")}),Le(this,"processMutation",e=>{if(!Tc(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=vc.textContent(e.target);_c(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:Ot(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Nc(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const s=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=rt(s);n=et({element:s,maskInputOptions:this.maskInputOptions,tagName:s.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(_c(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let i=this.attributeMap.get(e.target);if("IFRAME"===s.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(s.contentDocument)return;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"===s.tagName&&"password"===(e.oldValue||"").toLowerCase()&&s.setAttribute("data-rr-is-password","true"),!It(s.tagName,r))if(i.attributes[r]=kt(this.doc,tt(s.tagName),tt(r),n),"style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(t){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(s.style)){const t=s.style.getPropertyValue(e),n=s.style.getPropertyPriority(e);t!==r.style.getPropertyValue(e)||n!==r.style.getPropertyPriority(e)?i.styleDiff[e]=""===n?t:[t,n]:i._unchangedStyles[e]=[t,n]}for(const e of Array.from(r.style))""===s.style.getPropertyValue(e)&&(i.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===s.tagName&&(s.matches("dialog:modal")?i.attributes.rr_open_mode="modal":i.attributes.rr_open_mode="non-modal");break}case"childList":if(_c(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=>{const s=this.mirror.getId(t),r=He(e.target)?this.mirror.getId(vc.host(e.target)):this.mirror.getId(e.target);_c(e.target,this.blockClass,this.blockSelector,!1)||Tc(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(eh(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===s||Pc(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[qc(s,r)]?eh(this.movedSet,t):(this.removes.push({parentId:r,id:s,isShadow:!(!He(e.target)||!Ke(e.target))||void 0}),function(e,t){const s=[e];for(;s.length;){const e=s.pop();t.has(e)||(t.add(e),vc.childNodes(e).forEach(e=>s.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Le(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Tc(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let s=null;t&&this.mirror.hasNode(t)&&(s=this.mirror.getId(t)),s&&-1!==s&&(this.movedMap[qc(this.mirror.getId(e),s)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);_c(e,this.blockClass,this.blockSelector,!1)||(vc.childNodes(e).forEach(e=>this.genAdds(e)),Bc(e)&&vc.childNodes(vc.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function eh(e,t){e.delete(t),vc.childNodes(t).forEach(t=>eh(e,t))}function th(e,t,s){return 0!==e.size&&function(e,t){const s=vc.parentNode(t);return!!s&&e.has(s)}(e,t)}function sh(e,t){return 0!==e.size&&rh(e,t)}function rh(e,t){const s=vc.parentNode(t);return!!s&&(!!e.has(s)||rh(e,s))}let nh;const ih=e=>{if(!nh)return e;return(...t)=>{try{return e(...t)}catch(s){if(nh&&!0===nh(s))return;throw s}}},oh=[];function ah(e){try{if("composedPath"in e){const 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 lh(e,t){const s=new Qc;oh.push(s),s.init(e);const r=new(bc())(ih(s.processMutations.bind(s)));return r.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),r}function ch({mouseInteractionCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const o=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,a=[];let l=null;return Object.keys(Gc).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==o[e]).forEach(i=>{let o=tt(i);const c=(t=>i=>{const o=ah(i);if(_c(o,r,n,!0))return;let a=null,c=t;if("pointerType"in i){switch(i.pointerType){case"mouse":a=Zc.Mouse;break;case"touch":a=Zc.Touch;break;case"pen":a=Zc.Pen}a===Zc.Touch?Gc[t]===Gc.MouseDown?c="TouchStart":Gc[t]===Gc.MouseUp&&(c="TouchEnd"):Zc.Pen}else Lc(i)&&(a=Zc.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Zc.Touch||c.startsWith("Mouse")&&a===Zc.Mouse)&&(a=null)):Gc[t]===Gc.Click&&(a=l,l=null);const h=Lc(i)?i.changedTouches[0]:i;if(!h)return;const u=s.getId(o),{clientX:p,clientY:d}=h;ih(e)({type:Gc[c],id:u,x:p,y:d,...null!==a&&{pointerType:a}})})(i);if(window.PointerEvent)switch(Gc[i]){case Gc.MouseDown:case Gc.MouseUp:o=o.replace("mouse","pointer");break;case Gc.TouchStart:case Gc.TouchEnd:return}a.push(Cc(o,c,t))}),ih(()=>{a.forEach(e=>e())})}function hh({scrollCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,sampling:i}){return Cc("scroll",ih(Ic(ih(i=>{const o=ah(i);if(!o||_c(o,r,n,!0))return;const a=s.getId(o);if(o===t&&t.defaultView){const s=Ec(t.defaultView);e({id:a,x:s.left,y:s.top})}else e({id:a,x:o.scrollLeft,y:o.scrollTop})}),i.scroll||100)),t)}const uh=["INPUT","TEXTAREA","SELECT"],ph=new WeakMap;function dh(e){return function(e,t){if(yh("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||yh("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||yh("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||yh("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const s=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(s)}else if(e.parentStyleSheet){const s=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(s)}return t}(e,[])}function fh(e,t,s){let r,n;return e?(e.ownerNode?r=t.getId(e.ownerNode):n=s.getId(e),{styleId:n,id:r}):{}}function mh({mirror:e,stylesheetManager:t},s){var r,n,i;let o=null;o="#document"===s.nodeName?e.getId(s):e.getId(vc.host(s));const a="#document"===s.nodeName?null==(r=s.defaultView)?void 0:r.Document:null==(i=null==(n=s.ownerDocument)?void 0:n.defaultView)?void 0:i.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(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var s;const r=null==(s=l.set)?void 0:s.call(this,e);if(null!==o&&-1!==o)try{t.adoptStyleSheets(e,o)}catch(n){}return r}}),ih(()=>{Object.defineProperty(s,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function gh(e,t={}){const s=e.doc.defaultView;if(!s)return()=>{};let r;!function(e,t){const{mutationCb:s,mousemoveCb:r,mouseInteractionCb:n,scrollCb:i,viewportResizeCb:o,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:h,canvasMutationCb:u,fontCb:p,selectionCb:d,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),s(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),r(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),n(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),i(...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),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),h(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),u(...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=lh(e,e.doc));const n=function({mousemoveCb:e,sampling:t,doc:s,mirror:r}){if(!1===t.mousemove)return()=>{};const n="number"==typeof t.mousemove?t.mousemove:50,i="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let o,a=[];const l=Ic(ih(t=>{const s=Date.now()-o;e(a.map(e=>(e.timeOffset-=s,e)),t),a=[],o=null}),i),c=ih(Ic(ih(e=>{const t=ah(e),{clientX:s,clientY:n}=Lc(e)?e.changedTouches[0]:e;o||(o=Ac()),a.push({x:s,y:n,id:r.getId(t),timeOffset:Ac()-o}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?Yc.Drag:e instanceof MouseEvent?Yc.MouseMove:Yc.TouchMove)}),n,{trailing:!1})),h=[Cc("mousemove",c,s),Cc("touchmove",c,s),Cc("drag",c,s)];return ih(()=>{h.forEach(e=>e())})}(e),i=ch(e),o=hh(e),a=function({viewportResizeCb:e},{win:t}){let s=-1,r=-1;return Cc("resize",ih(Ic(ih(()=>{const t=Rc(),n=Mc();s===t&&r===n||(e({width:Number(n),height:Number(t)}),s=t,r=n)}),200)),t)}(e,{win:s}),l=function({inputCb:e,doc:t,mirror:s,blockClass:r,blockSelector:n,ignoreClass:i,ignoreSelector:o,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:h}){function u(e){let s=ah(e);const c=e.isTrusted,u=s&&s.tagName;if(s&&"OPTION"===u&&(s=vc.parentElement(s)),!s||!u||uh.indexOf(u)<0||_c(s,r,n,!0))return;if(s.classList.contains(i)||o&&s.matches(o))return;let d=s.value,f=!1;const m=rt(s)||"";"radio"===m||"checkbox"===m?f=s.checked:(a[u.toLowerCase()]||a[m])&&(d=et({element:s,maskInputOptions:a,tagName:u,type:m,value:d,maskInputFn:l})),p(s,h?{text:d,isChecked:f,userTriggered:c}:{text:d,isChecked:f});const g=s.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==s){const t=e.value;p(e,h?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function p(t,r){const n=ph.get(t);if(!n||n.text!==r.text||n.isChecked!==r.isChecked){ph.set(t,r);const n=s.getId(t);ih(e)({...r,id:n})}}const d=("last"===c.input?["change"]:["input","change"]).map(e=>Cc(e,ih(u),t)),f=t.defaultView;if(!f)return()=>{d.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[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 m&&m.set&&d.push(...g.map(e=>xc(e[0],e[1],{set(){ih(u)({target:this,isTrusted:!1})}},!1,f))),ih(()=>{d.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:s,mirror:r,sampling:n,doc:i}){const o=ih(i=>Ic(ih(n=>{const o=ah(n);if(!o||_c(o,t,s,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:h,loop:u}=o;e({type:i,id:r.getId(o),currentTime:a,volume:l,muted:c,playbackRate:h,loop:u})}),n.media||500)),a=[Cc("play",o(Xc.Play),i),Cc("pause",o(Xc.Pause),i),Cc("seeked",o(Xc.Seeked),i),Cc("volumechange",o(Xc.VolumeChange),i),Cc("ratechange",o(Xc.RateChange),i)];return ih(()=>{a.forEach(e=>e())})}(e);let h=()=>{},u=()=>{},p=()=>{},d=()=>{};e.recordDOM&&(h=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:s},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const n=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(n,{apply:ih((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=fh(n,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:a}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.addRule=function(e,t,s=this.cssRules.length){const n=`${e} { ${t} }`;return r.CSSStyleSheet.prototype.insertRule.apply(this,[n,s])};const i=r.CSSStyleSheet.prototype.deleteRule;let o,a;r.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:o}]}),r.apply(n,i)})}),r.CSSStyleSheet.prototype.removeRule=function(e){return r.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:o}),r.apply(n,i)})})),r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:o}),r.apply(n,i)})}));const l={};wh("CSSGroupingRule")?l.CSSGroupingRule=r.CSSGroupingRule:(wh("CSSMediaRule")&&(l.CSSMediaRule=r.CSSMediaRule),wh("CSSConditionRule")&&(l.CSSConditionRule=r.CSSConditionRule),wh("CSSSupportsRule")&&(l.CSSSupportsRule=r.CSSSupportsRule));const c={};return Object.entries(l).forEach(([r,n])=>{c[r]={insertRule:n.prototype.insertRule,deleteRule:n.prototype.deleteRule},n.prototype.insertRule=new Proxy(c[r].insertRule,{apply:ih((r,n,i)=>{const[o,a]=i,{id:l,styleId:c}=fh(n.parentStyleSheet,t,s.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:o,index:[...dh(n),a||0]}]}),r.apply(n,i)})}),n.prototype.deleteRule=new Proxy(c[r].deleteRule,{apply:ih((r,n,i)=>{const[o]=i,{id:a,styleId:l}=fh(n.parentStyleSheet,t,s.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...dh(n),o]}]}),r.apply(n,i)})})}),ih(()=>{r.CSSStyleSheet.prototype.insertRule=n,r.CSSStyleSheet.prototype.deleteRule=i,o&&(r.CSSStyleSheet.prototype.replace=o),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:s}),u=mh(e,e.doc),p=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:s,stylesheetManager:r},{win:n}){const i=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(i,{apply:ih((n,o,a)=>{var l;const[c,h,u]=a;if(s.has(c))return i.apply(o,[c,h,u]);const{id:p,styleId:d}=fh(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(p&&-1!==p||d&&-1!==d)&&e({id:p,styleId:d,set:{property:c,value:h,priority:u},index:dh(o.parentRule)}),n.apply(o,a)})});const o=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:ih((n,i,a)=>{var l;const[c]=a;if(s.has(c))return o.apply(i,[c]);const{id:h,styleId:u}=fh(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,r.styleMirror);return(h&&-1!==h||u&&-1!==u)&&e({id:h,styleId:u,remove:{property:c},index:dh(i.parentRule)}),n.apply(i,a)})}),ih(()=>{n.CSSStyleDeclaration.prototype.setProperty=i,n.CSSStyleDeclaration.prototype.removeProperty=o})}(e,{win:s}),e.collectFonts&&(d=function({fontCb:e,doc:t}){const s=t.defaultView;if(!s)return()=>{};const r=[],n=new WeakMap,i=s.FontFace;s.FontFace=function(e,t,s){const r=new i(e,t,s);return n.set(r,{family:e,buffer:"string"!=typeof t,descriptors:s,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const o=Oc(t.fonts,"add",function(t){return function(s){return setTimeout(ih(()=>{const t=n.get(s);t&&(e(t),n.delete(s))}),0),t.apply(this,[s])}});return r.push(()=>{s.FontFace=i}),r.push(o),ih(()=>{r.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:s,blockClass:r,blockSelector:n,selectionCb:i}=e;let o=!0;const a=ih(()=>{const e=t.getSelection();if(!e||o&&(null==e?void 0:e.isCollapsed))return;o=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:o,startOffset:l,endContainer:c,endOffset:h}=i;_c(o,r,n,!0)||_c(c,r,n,!0)||a.push({start:s.getId(o),startOffset:l,end:s.getId(c),endOffset:h})}i({ranges:a})});return a(),Cc("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const s=e.defaultView;return s&&s.customElements?Oc(s.customElements,"define",function(e){return function(s,r,n){try{t({define:{name:s}})}catch(i){console.warn(`Custom element callback failed for ${s}`)}return e.apply(this,[s,r,n])}}):()=>{}}(e),g=[];for(const y of e.plugins)g.push(y.observer(y.callback,s,y.options));return ih(()=>{oh.forEach(e=>e.reset()),null==r||r.disconnect(),n(),i(),o(),a(),l(),c(),h(),u(),p(),d(),f(),m(),g.forEach(e=>e())})}function yh(e){return void 0!==window[e]}function wh(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class bh{constructor(e){Le(this,"iframeIdToRemoteIdMap",new WeakMap),Le(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,s,r){const n=s||this.getIdToRemoteIdMap(e),i=r||this.getRemoteIdToIdMap(e);let o=n.get(t);return o||(o=this.generateIdFn(),n.set(t,o),i.set(o,t)),o}getIds(e,t){const s=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,s,r))}getRemoteId(e,t,s){const r=s||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const n=r.get(t);return n||-1}getRemoteIds(e,t){const s=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,s))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);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 vh{constructor(e){Le(this,"iframes",new WeakMap),Le(this,"crossOriginIframeMap",new WeakMap),Le(this,"crossOriginIframeMirror",new bh(ft)),Le(this,"crossOriginIframeStyleMirror"),Le(this,"crossOriginIframeRootIdMap",new WeakMap),Le(this,"mirror"),Le(this,"mutationCb"),Le(this,"wrappedEmit"),Le(this,"loadListener"),Le(this,"stylesheetManager"),Le(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bh(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 s,r;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(s=e.contentWindow)||s.addEventListener("message",this.handleMessage.bind(this))),null==(r=this.loadListener)||r.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){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const s=this.crossOriginIframeMap.get(e.source);if(!s)return;const r=this.transformCrossOriginEvent(s,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){var s;switch(t.type){case Wc.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const s=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,s),this.patchRootIdOnNode(t.data.node,s),{timestamp:t.timestamp,type:Wc.IncrementalSnapshot,data:{source:Yc.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Wc.Meta:case Wc.Load:case Wc.DomContentLoaded:return!1;case Wc.Plugin:return t;case Wc.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Wc.IncrementalSnapshot:switch(t.data.source){case Yc.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(t.node,s)}),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 Yc.Drag:case Yc.TouchMove:case Yc.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case Yc.ViewportResize:return!1;case Yc.MediaInteraction:case Yc.MouseInteraction:case Yc.Scroll:case Yc.CanvasMutation:case Yc.Input:return this.replaceIds(t.data,e,["id"]),t;case Yc.StyleSheetRule:case Yc.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case Yc.Font:return t;case Yc.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case Yc.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(s=t.data.styles)||s.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,s,r){for(const n of r)(Array.isArray(t[n])||"number"==typeof t[n])&&(Array.isArray(t[n])?t[n]=e.getIds(s,t[n]):t[n]=e.getId(s,t[n]));return t}replaceIds(e,t,s){return this.replace(this.crossOriginIframeMirror,e,t,s)}replaceStyleIds(e,t,s){return this.replace(this.crossOriginIframeStyleMirror,e,t,s)}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===Hc.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Ch{constructor(e){Le(this,"shadowDoms",new WeakSet),Le(this,"mutationCb"),Le(this,"scrollCb"),Le(this,"bypassOptions"),Le(this,"mirror"),Le(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(!Ke(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const s=lh({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>s.disconnect()),this.restoreHandlers.push(hh({...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(vc.host(e))),this.restoreHandlers.push(mh({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){const s=this;this.restoreHandlers.push(Oc(e.prototype,"attachShadow",function(e){return function(r){const n=e.call(this,r),i=vc.shadowRoot(this);return i&&Vc(this)&&s.addShadowRoot(i,t),n}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(t){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var Sh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kh="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ih=0;Ih<64;Ih++)kh[Sh.charCodeAt(Ih)]=Ih;const xh=new Map;const Oh=(e,t,s)=>{if(!e||!Rh(e,t)&&"object"!=typeof e)return;const r=function(e,t){let s=xh.get(e);return s||(s=new Map,xh.set(e,s)),s.has(t)||s.set(t,[]),s.get(t)}(s,e.constructor.name);let n=r.indexOf(e);return-1===n&&(n=r.length,r.push(e)),n};function Ah(e,t,s){if(e instanceof Array)return e.map(e=>Ah(e,t,s));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,s=new Uint8Array(e),r=s.length,n="";for(t=0;t<r;t+=3)n+=Sh[s[t]>>2],n+=Sh[(3&s[t])<<4|s[t+1]>>4],n+=Sh[(15&s[t+1])<<2|s[t+2]>>6],n+=Sh[63&s[t+2]];return r%3==2?n=n.substring(0,n.length-1)+"=":r%3==1&&(n=n.substring(0,n.length-2)+"=="),n}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Ah(e.buffer,t,s),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:s}=e;return{rr_type:t,src:s}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Ah(e.data,t,s),e.width,e.height]}}if(Rh(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Oh(e,t,s)}}return e}const Eh=(e,t,s)=>e.map(e=>Ah(e,t,s)),Rh=(e,t)=>{const s=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(s.find(s=>e instanceof t[s]))};function Mh(e,t,s,r){const n=[];try{const i=Oc(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(n,...i){if(!_c(this,t,s,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(n);if("__context"in this||(this.__context=e),r&&["webgl","webgl2"].includes(e))if(i[0]&&"object"==typeof i[0]){const e=i[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else i.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[n,...i])}});n.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{n.forEach(e=>e())}}function Nh(e,t,s,r,n,i){const o=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Oc(e,l,function(e){return function(...o){const a=e.apply(this,o);if(Oh(a,i,this),"tagName"in this.canvas&&!_c(this.canvas,r,n,!0)){const e=Eh(o,i,this),r={type:t,property:l,args:e};s(this.canvas,r)}return a}});o.push(a)}catch{const r=xc(e,l,{set(e){s(this.canvas,{type:t,property:l,args:[e],setter:!0})}});o.push(r)}return o}const _h="KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=",Th="undefined"!=typeof window&&window.Blob&&new Blob([(Ph=_h,Uint8Array.from(atob(Ph),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var Ph;function Lh(e){let t;try{if(t=Th&&(window.URL||window.webkitURL).createObjectURL(Th),!t)throw"";const s=new Worker(t,{name:null==e?void 0:e.name});return s.addEventListener("error",()=>{(window.URL||window.webkitURL).revokeObjectURL(t)}),s}catch(s){return new Worker("data:text/javascript;base64,"+_h,{name:null==e?void 0:e.name})}finally{t&&(window.URL||window.webkitURL).revokeObjectURL(t)}}class Fh{constructor(e){Le(this,"pendingCanvasMutations",new Map),Le(this,"rafStamps",{latestId:0,invokeId:null}),Le(this,"mirror"),Le(this,"mutationCb"),Le(this,"resetObservers"),Le(this,"frozen",!1),Le(this,"locked",!1),Le(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:s,blockClass:r,blockSelector:n,recordCanvas:i,dataURLOptions:o}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,i&&"all"===t&&this.initCanvasMutationObserver(s,r,n),i&&"number"==typeof t&&this.initCanvasFPSObserver(t,s,r,n,{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,s,r,n){const i=Mh(t,s,r,!0),o=new Map,a=new Lh;a.onmessage=e=>{const{id:t}=e.data;if(o.set(t,!1),!("base64"in e.data))return;const{base64:s,type:r,width:n,height:i}=e.data;this.mutationCb({id:t,type:Jc["2D"],commands:[{property:"clearRect",args:[0,0,n,i]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:r}]},0,0]}]})};const l=1e3/e;let c,h=0;const u=e=>{h&&e-h<l||(h=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{_c(t,s,r,!0)||e.push(t)}),e})().forEach(async e=>{var t;const s=this.mirror.getId(e);if(o.get(s))return;if(0===e.width||0===e.height)return;if(o.set(s,!0),["webgl","webgl2"].includes(e.__context)){const s=e.getContext(e.__context);!1===(null==(t=null==s?void 0:s.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&s.clear(s.COLOR_BUFFER_BIT)}const r=await createImageBitmap(e);a.postMessage({id:s,bitmap:r,width:e.width,height:e.height,dataURLOptions:n.dataURLOptions},[r])})),c=requestAnimationFrame(u)};c=requestAnimationFrame(u),this.resetObservers=()=>{i(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,s){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const r=Mh(e,t,s,!1),n=function(e,t,s,r){const n=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const o of i)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[o])continue;const i=Oc(t.CanvasRenderingContext2D.prototype,o,function(n){return function(...i){return _c(this.canvas,s,r,!0)||setTimeout(()=>{const s=Eh(i,t,this);e(this.canvas,{type:Jc["2D"],property:o,args:s})},0),n.apply(this,i)}});n.push(i)}catch{const s=xc(t.CanvasRenderingContext2D.prototype,o,{set(t){e(this.canvas,{type:Jc["2D"],property:o,args:[t],setter:!0})}});n.push(s)}return()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s),i=function(e,t,s,r){const n=[];return n.push(...Nh(t.WebGLRenderingContext.prototype,Jc.WebGL,e,s,r,t)),void 0!==t.WebGL2RenderingContext&&n.push(...Nh(t.WebGL2RenderingContext.prototype,Jc.WebGL2,e,s,r,t)),()=>{n.forEach(e=>e())}}(this.processMutation.bind(this),e,t,s);this.resetObservers=()=>{r(),n(),i()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const s=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,s)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const s=this.pendingCanvasMutations.get(e);if(!s||-1===t)return;const r=s.map(e=>{const{type:t,...s}=e;return s}),{type:n}=s[0];this.mutationCb({id:t,type:n,commands:r}),this.pendingCanvasMutations.delete(e)}}class Dh{constructor(e){Le(this,"trackedLinkElements",new WeakSet),Le(this,"mutationCb"),Le(this,"adoptedStyleSheetCb"),Le(this,"styleMirror",new Uc),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;const s={id:t,styleIds:[]},r=[];for(const n of e){let e;this.styleMirror.has(n)?e=this.styleMirror.getId(n):(e=this.styleMirror.add(n),r.push({styleId:e,rules:Array.from(n.rules||CSSRule,(e,t)=>({rule:qe(e,n.href),index:t}))})),s.styleIds.push(e)}r.length>0&&(s.styles=r),this.adoptedStyleSheetCb(s)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Bh{constructor(){Le(this,"nodeMap",new WeakMap),Le(this,"active",!1)}inOtherBuffer(e,t){const s=this.nodeMap.get(e);return s&&Array.from(s).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 Uh,jh,zh,Vh=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Te=e.contentWindow)?void 0:Te.Array.from)||Array.from,document.body.removeChild(e)}}catch(Kb){console.debug("Unable to override Array.from",Kb)}const Wh=new Qe;function Yh(e={}){const{emit:t,checkoutEveryNms:s,checkoutEveryNth:r,blockClass:n="rr-block",blockSelector:i=null,ignoreClass:o="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:h=!0,maskAllInputs:u,maskInputOptions:p,slimDOMOptions:d,maskInputFn:f,maskTextFn:m,hooks:g,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:v,recordDOM:C=!0,recordCanvas:S=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:x=!1,collectFonts:O=!1,inlineImages:A=!1,plugins:E,keepIframeSrcFn:R=()=>!1,ignoreCSSAttributes:M=new Set([]),errorHandler:N}=e;nh=N;const _=!k||window.parent===window;let T=!1;if(!_)try{window.parent.document&&(T=!1)}catch(Z){T=!0}if(_&&!t)throw new Error("emit function is required");if(!_&&!T)return()=>{};void 0!==v&&void 0===w.mousemove&&(w.mousemove=v),Wh.reset();const P=!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}:void 0!==p?p:{password:!0},L=!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===d,headMetaDescKeywords:"all"===d,headTitleMutations:"all"===d}:d||{};let 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 D=0;const B=e=>{for(const t of E||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!T&&(e=y(e)),e};Uh=(e,n)=>{var i;const o=e;if(o.timestamp=Ac(),!(null==(i=oh[0])?void 0:i.isFrozen())||o.type===Wc.FullSnapshot||o.type===Wc.IncrementalSnapshot&&o.data.source===Yc.Mutation||oh.forEach(e=>e.unfreeze()),_)null==t||t(B(o),n);else if(T){const e={type:"rrweb",event:B(o),origin:window.location.origin,isCheckout:n};window.parent.postMessage(e,"*")}if(o.type===Wc.FullSnapshot)F=o,D=0;else if(o.type===Wc.IncrementalSnapshot){if(o.data.source===Yc.Mutation&&o.data.isAttachIframe)return;D++;const e=r&&D>=r,t=s&&o.timestamp-F.timestamp>s;(e||t)&&jh(!0)}};const U=e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Mutation,...e}})},j=e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Scroll,...e}}),z=e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.CanvasMutation,...e}}),V=new Dh({mutationCb:U,adoptedStyleSheetCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.AdoptedStyleSheet,...e}})}),W=new vh({mirror:Wh,mutationCb:U,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:Uh});for(const X of E||[])X.getMirror&&X.getMirror({nodeMirror:Wh,crossOriginIframeMirror:W.crossOriginIframeMirror,crossOriginIframeStyleMirror:W.crossOriginIframeStyleMirror});const Y=new Bh;zh=new Fh({recordCanvas:S,mutationCb:z,win:window,blockClass:n,blockSelector:i,mirror:Wh,sampling:w.canvas,dataURLOptions:b});const G=new Ch({mutationCb:U,scrollCb:j,bypassOptions:{blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskInputOptions:P,dataURLOptions:b,maskTextFn:m,maskInputFn:f,recordCanvas:S,inlineImages:A,sampling:w,slimDOMOptions:L,iframeManager:W,stylesheetManager:V,canvasManager:zh,keepIframeSrcFn:R,processedNodeManager:Y},mirror:Wh});jh=(e=!1)=>{if(!C)return;Uh({type:Wc.Meta,data:{href:window.location.href,width:Mc(),height:Rc()}},e),V.reset(),G.init(),oh.forEach(e=>e.lock());const t=function(e,t){const{mirror:s=new Qe,blockClass:r="rr-block",blockSelector:n=null,maskTextClass:i="rr-mask",maskTextSelector:o=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:h=!1,maskTextFn:u,maskInputFn:p,slimDOM:d=!1,dataURLOptions:f,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C=()=>!1}=t||{};return Rt(e,{doc:e,mirror:s,blockClass:r,blockSelector:n,maskTextClass:i,maskTextSelector:o,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===h?{password:!0}:h,maskTextFn:u,maskInputFn:p,slimDOMOptions:!0===d||"all"===d?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===d,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===d?{}:d,dataURLOptions:f,inlineImages:l,recordCanvas:c,preserveWhiteSpace:m,onSerialize:g,onIframeLoad:y,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:v,keepIframeSrcFn:C,newlyAddedElement:!1})}(document,{mirror:Wh,blockClass:n,blockSelector:i,maskTextClass:l,maskTextSelector:c,inlineStylesheet:h,maskAllInputs:P,maskTextFn:m,maskInputFn:f,slimDOM:L,dataURLOptions:b,recordCanvas:S,inlineImages:A,onSerialize:e=>{Fc(e,Wh)&&W.addIframe(e),Dc(e,Wh)&&V.trackLinkElement(e),Bc(e)&&G.addShadowRoot(vc.shadowRoot(e),document)},onIframeLoad:(e,t)=>{W.attachIframe(e,t),G.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:R});if(!t)return console.warn("Failed to snapshot the document");Uh({type:Wc.FullSnapshot,data:{node:t,initialOffset:Ec(window)}},e),oh.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,Wh.getId(document))};try{const e=[],t=e=>{var t;return ih(gh)({mutationCb:U,mousemoveCb:(e,t)=>Uh({type:Wc.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.MouseInteraction,...e}}),scrollCb:j,viewportResizeCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.ViewportResize,...e}}),inputCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Input,...e}}),mediaInteractionCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.MediaInteraction,...e}}),styleSheetRuleCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.StyleSheetRule,...e}}),styleDeclarationCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.StyleDeclaration,...e}}),canvasMutationCb:z,fontCb:e=>Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Font,...e}}),selectionCb:e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.Selection,...e}})},customElementCb:e=>{Uh({type:Wc.IncrementalSnapshot,data:{source:Yc.CustomElement,...e}})},blockClass:n,ignoreClass:o,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:P,inlineStylesheet:h,sampling:w,recordDOM:C,recordCanvas:S,inlineImages:A,userTriggeredOnInput:x,collectFonts:O,doc:e,maskInputFn:f,maskTextFn:m,keepIframeSrcFn:R,blockSelector:i,slimDOMOptions:L,dataURLOptions:b,mirror:Wh,iframeManager:W,stylesheetManager:V,shadowDomManager:G,processedNodeManager:Y,canvasManager:zh,ignoreCSSAttributes:M,plugins:(null==(t=null==E?void 0:E.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Uh({type:Wc.Plugin,data:{plugin:e.name,payload:t}})})))||[]},g)};W.addLoadListener(s=>{try{e.push(t(s.contentDocument))}catch(r){console.warn(r)}});const s=()=>{jh(),e.push(t(document)),Vh=!0};return"interactive"===document.readyState||"complete"===document.readyState?s():(e.push(Cc("DOMContentLoaded",()=>{Uh({type:Wc.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&s()})),e.push(Cc("load",()=>{Uh({type:Wc.Load,data:{}}),"load"===I&&s()},window))),()=>{e.forEach(e=>e()),Y.destroy(),Vh=!1,nh=void 0}}catch(J){console.warn(J)}}var Gh,Zh;Yh.addCustomEvent=(e,t)=>{if(!Vh)throw new Error("please add custom event after start recording");Uh({type:Wc.Custom,data:{tag:e,payload:t}})},Yh.freezePage=()=>{oh.forEach(e=>e.freeze())},Yh.takeFullSnapshot=e=>{if(!Vh)throw new Error("please take full snapshot after start recording");jh(e)},Yh.mirror=Wh,(Zh=Gh||(Gh={}))[Zh.NotStarted=0]="NotStarted",Zh[Zh.Running=1]="Running",Zh[Zh.Stopped=2]="Stopped";const{addCustomEvent:Jh}=Yh,{freezePage:Xh}=Yh,{takeFullSnapshot:Hh}=Yh;class Kh extends Array{constructor(){super()}isEmpty(){return 0===this.length}isFull(){return 10===this.length}flush(){return this.splice(0,this.length)}}class $h{constructor(e){__publicField(this,"agent"),__publicField(this,"eventBuffer"),this.agent=e,this.eventBuffer=new Kh}start(){document.addEventListener("visibilitychange",()=>{"hidden"===document.visibilityState&&this.send()})}handle(e){e.type===Wc.FullSnapshot&&this.eventBuffer.find(e=>e.type===Wc.FullSnapshot)||(this.eventBuffer.push(e),this.eventBuffer.isFull()&&this.send())}async send(){if(!this.eventBuffer.isEmpty()&&this.agent.sendEvents){const e=this.eventBuffer.flush();await this.agent.sendEvents(e)}}}var qh,Qh=(e=>(e[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))(Qh||{}),eu=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(eu||{}),tu=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(tu||{}),su=Object.defineProperty,ru=(e,t,s)=>((e,t,s)=>t in e?su(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),nu=Object.defineProperty,iu=(e,t,s)=>((e,t,s)=>t in e?nu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s),ou=Object.defineProperty,au=(e,t,s)=>((e,t,s)=>t in e?ou(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);const lu={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},cu={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},hu={};function uu(e){if(hu[e])return hu[e];const t=globalThis[e],s=t.prototype,r=e in lu?lu[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in cu?cu[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return hu[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?hu[e]=i:s}catch{return s}}const pu={};function du(e,t,s){var r;const n=`${e}.${String(s)}`;if(pu[n])return pu[n].call(t);const i=uu(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(pu[n]=o,o.call(t)):t[s]}const fu={};function mu(e,t,s){const r=`${e}.${String(s)}`;if(fu[r])return fu[r].bind(t);const n=uu(e)[s];return"function"!=typeof n?t[s]:(fu[r]=n,n.bind(t))}const gu={childNodes:function(e){return du("Node",e,"childNodes")},parentNode:function(e){return du("Node",e,"parentNode")},parentElement:function(e){return du("Node",e,"parentElement")},textContent:function(e){return du("Node",e,"textContent")},contains:function(e,t){return mu("Node",e,"contains")(t)},getRootNode:function(e){return mu("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?du("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?du("Element",e,"shadowRoot"):null},querySelector:function(e,t){return du("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return du("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return uu("MutationObserver").constructor}};class yu{constructor(){au(this,"idNodeMap",new Map),au(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-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){const 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){const s=t.id;this.idNodeMap.set(s,e),this.nodeMetaMap.set(e,t)}replace(e,t){const s=this.getNode(e);if(s){const e=this.nodeMetaMap.get(s);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function wu(e,t,s){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!s&&wu(gu.parentNode(e),t,s);for(let r=e.classList.length;r--;){const s=e.classList[r];if(t.test(s))return!0}return!!s&&wu(gu.parentNode(e),t,s)}function bu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vu(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var Cu={exports:{}},Su=String,ku=function(){return{isColorSupported:!1,reset:Su,bold:Su,dim:Su,italic:Su,underline:Su,inverse:Su,hidden:Su,strikethrough:Su,black:Su,red:Su,green:Su,yellow:Su,blue:Su,magenta:Su,cyan:Su,white:Su,gray:Su,bgBlack:Su,bgRed:Su,bgGreen:Su,bgYellow:Su,bgBlue:Su,bgMagenta:Su,bgCyan:Su,bgWhite:Su}};Cu.exports=ku(),Cu.exports.createColors=ku;var Iu=Cu.exports;const xu=vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Ou=Iu,Au=xu,Eu=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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){if(!this.source)return"";let t=this.source;null==e&&(e=Ou.isColorSupported),Au&&e&&(t=Au(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=Ou.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ru=Eu;Eu.default=Eu;var Mu={};Mu.isClean=Symbol("isClean"),Mu.my=Symbol("my");const Nu={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let _u=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="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 r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Nu[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Nu[s]),i.rawCache[s]=r,r}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,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Tu=_u;_u.default=_u;let Pu=Tu;function Lu(e,t){new Pu(t).stringify(e)}var Fu=Lu;Lu.default=Lu;let{isClean:Du,my:Bu}=Mu,Uu=Ru,ju=Tu,zu=Fu;function Vu(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Vu(e,s)):("object"===i&&null!==n&&(n=Vu(n)),s[r]=n)}return s}let Wu=class{constructor(e={}){this.raws={},this[Du]=!1,this[Bu]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Vu(this);for(let s in e)t[s]=e[s];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}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Uu(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Du]){this[Du]=!1;let e=this;for(;e=e.parent;)e[Du]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new ju).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=zu){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Yu=Wu;Wu.default=Wu;let Gu=Yu,Zu=class extends Gu{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]}};var Ju=Zu;Zu.default=Zu;var Xu={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:Hu,SourceMapGenerator:Ku}=xu,{existsSync:$u,readFileSync:qu}=xu,{dirname:Qu,join:ep}=xu;let tp=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Qu(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new Hu(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Qu(e),$u(e))return this.mapFile=e,qu(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof Hu)return Ku.fromSourceMap(t).toString();if(t instanceof Ku)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=ep(Qu(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)}};var sp=tp;tp.default=tp;let{SourceMapConsumer:rp,SourceMapGenerator:np}=xu,{fileURLToPath:ip,pathToFileURL:op}=xu,{isAbsolute:ap,resolve:lp}=xu,{nanoid:cp}=Xu,hp=xu,up=Ru,pp=sp,dp=Symbol("fromOffsetCache"),fp=Boolean(rp&&np),mp=Boolean(lp&&ap),gp=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!mp||/^\w+:\/\//.test(t.from)||ap(t.from)?this.file=t.from:this.file=lp(t.from)),mp&&fp){let e=new pp(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 "+cp(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new up(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,r.plugin):new up(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&(op&&(n.input.url=op(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[dp])s=this[dp];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[dp]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:lp(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=ap(a.source)?op(a.source):new URL(a.source,this.map.consumer().sourceRoot||op(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!ip)throw new Error("file: protocol is not available in this PostCSS build");l.file=ip(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var yp=gp;gp.default=gp,hp&&hp.registerInput&&hp.registerInput(gp);let{SourceMapConsumer:wp,SourceMapGenerator:bp}=xu,{dirname:vp,relative:Cp,resolve:Sp,sep:kp}=xu,{pathToFileURL:Ip}=xu,xp=yp,Op=Boolean(wp&&bp),Ap=Boolean(vp&&Sp&&Cp&&kp);var Ep=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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,s=this.toUrl(this.path(e.file)),r=e.root||vp(e.file);!1===this.mapOpts.sourcesContent?(t=new wp(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),Ap&&Op&&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=bp.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new bp({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(){this.css="",this.map=new bp({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={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&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?vp(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=vp(Sp(s,this.mapOpts.annotation)));let r=Cp(s,e);return this.memoizedPaths.set(e,r),r}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 xp(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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 Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(Ip){let t=Ip(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===kp&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let Rp=Yu,Mp=class extends Rp{constructor(e){super(e),this.type="comment"}};var Np=Mp;Mp.default=Mp;let _p,Tp,Pp,Lp,{isClean:Fp,my:Dp}=Mu,Bp=Ju,Up=Np,jp=Yu;function zp(e){return e.map(e=>(e.nodes&&(e.nodes=zp(e.nodes)),delete e.source,e))}function Vp(e){if(e[Fp]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Vp(t)}let Wp=class e extends jp{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=zp(_p(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Bp(t)]}else if(t.selector)t=[new Tp(t)];else if(t.name)t=[new Pp(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Up(t)]}return t.map(t=>(t[Dp]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Fp]&&Vp(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Wp.registerParse=e=>{_p=e},Wp.registerRule=e=>{Tp=e},Wp.registerAtRule=e=>{Pp=e},Wp.registerRoot=e=>{Lp=e};var Yp=Wp;Wp.default=Wp,Wp.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Pp.prototype):"rule"===e.type?Object.setPrototypeOf(e,Tp.prototype):"decl"===e.type?Object.setPrototypeOf(e,Bp.prototype):"comment"===e.type?Object.setPrototypeOf(e,Up.prototype):"root"===e.type&&Object.setPrototypeOf(e,Lp.prototype),e[Dp]=!0,e.nodes&&e.nodes.forEach(e=>{Wp.rebuild(e)})};let Gp,Zp,Jp=Yp,Xp=class extends Jp{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Gp(new Zp,this,e).stringify()}};Xp.registerLazyResult=e=>{Gp=e},Xp.registerProcessor=e=>{Zp=e};var Hp=Xp;Xp.default=Xp;let Kp={};var $p=function(e){Kp[e]||(Kp[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let qp=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 s in t)this[s]=t[s]}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}};var Qp=qp;qp.default=qp;let ed=Qp,td=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new ed(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var sd=td;td.default=td;const rd="'".charCodeAt(0),nd='"'.charCodeAt(0),id="\\".charCodeAt(0),od="/".charCodeAt(0),ad="\n".charCodeAt(0),ld=" ".charCodeAt(0),cd="\f".charCodeAt(0),hd="\t".charCodeAt(0),ud="\r".charCodeAt(0),pd="[".charCodeAt(0),dd="]".charCodeAt(0),fd="(".charCodeAt(0),md=")".charCodeAt(0),gd="{".charCodeAt(0),yd="}".charCodeAt(0),wd=";".charCodeAt(0),bd="*".charCodeAt(0),vd=":".charCodeAt(0),Cd="@".charCodeAt(0),Sd=/[\t\n\f\r "#'()/;[\\\]{}]/g,kd=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Id=/.[\r\n"'(/\\]/,xd=/[\da-f]/i;let Od=Yp,Ad=class extends Od{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)}};var Ed=Ad;Ad.default=Ad,Od.registerAtRule(Ad);let Rd,Md,Nd=Yp,_d=class extends Nd{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new Rd(new Md,this,e).stringify()}};_d.registerLazyResult=e=>{Rd=e},_d.registerProcessor=e=>{Md=e};var Td=_d;_d.default=_d,Nd.registerRoot(_d);let Pd={comma:e=>Pd.split(e,[","],!0),space:e=>Pd.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Ld=Pd;Pd.default=Pd;let Fd=Yp,Dd=Ld,Bd=class extends Fd{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Dd.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var Ud=Bd;Bd.default=Bd,Fd.registerRule(Bd);let jd=Ju,zd=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case ad:case ld:case hd:case ud:case cd:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===ld||s===ad||s===hd||s===ud||s===cd);u=["space",p.slice(m,r)],m=r-1;break;case pd:case dd:case gd:case yd:case vd:case wd:case md:{let e=String.fromCharCode(s);u=[e,e,m];break}case fd:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==rd&&h!==nd&&h!==ld&&h!==ad&&h!==hd&&h!==cd&&h!==ud){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===id;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||Id.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case rd:case nd:n=s===rd?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===id;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case Cd:Sd.lastIndex=m+1,Sd.test(p),r=0===Sd.lastIndex?p.length-1:Sd.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case id:for(r=m,o=!0;p.charCodeAt(r+1)===id;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==od&&s!==ld&&s!==ad&&s!==hd&&s!==ud&&s!==cd&&(r+=1,xd.test(p.charAt(r)))){for(;xd.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===ld&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===od&&p.charCodeAt(m+1)===bd?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(kd.lastIndex=m+1,kd.test(p),r=0===kd.lastIndex?p.length-1:kd.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Vd=Np,Wd=Ed,Yd=Td,Gd=Ud;const Zd={empty:!0,space:!0};let Jd=Yp,Xd=class{constructor(e){this.input=e,this.root=new Yd,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,s,r,n=new Wd;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Vd;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=zd(this.input)}decl(e,t){let s=new jd;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Gd;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Zd[a]||Zd[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Gd;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},Hd=yp;function Kd(e,t){let s=new Hd(e,t),r=new Xd(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var $d=Kd;Kd.default=Kd,Jd.registerParse(Kd);let{isClean:qd,my:Qd}=Mu,ef=Ep,tf=Fu,sf=Yp,rf=Hp,nf=$p,of=sd,af=$d,lf=Td;const cf={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},hf={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},uf={Once:!0,postcssPlugin:!0,prepare:!0};function pf(e){return"object"==typeof e&&"function"==typeof e.then}function df(e){let t=!1,s=cf[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function ff(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:df(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function mf(e){return e[qd]=!1,e.nodes&&e.nodes.forEach(e=>mf(e)),e}let gf={},yf=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof of)n=mf(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=af;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Qd]&&sf.rebuild(n)}else n=mf(s);this.result=new of(t,n,r),this.helpers={...gf,postcss:gf,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!hf[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!uf[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(pf(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qd];){e[qd]=!0;let s=[ff(e)];for(;s.length>0;){let e=this.visitTick(s);if(pf(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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));return pf(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=tf;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new ef(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(pf(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qd];)e[qd]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||nf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(pf(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[qd])return r[qd]=!0,void e.push(ff(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[qd]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[qd]=!0;let t=df(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[qd]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,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"}};yf.registerPostcss=e=>{gf=e};var wf=yf;yf.default=yf,lf.registerLazyResult(yf),rf.registerLazyResult(yf);let bf=Ep,vf=Fu,Cf=$p,Sf=$d;const kf=sd;let If=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=vf;this.result=new kf(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new bf(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||Cf("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=Sf;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var xf=If;If.default=If;let Of=xf,Af=wf,Ef=Hp,Rf=Td,Mf=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new Af(this,e,t):new Of(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Nf=Mf;Mf.default=Mf,Rf.registerProcessor(Mf),Ef.registerProcessor(Mf);let _f=Ju,Tf=sp,Pf=Np,Lf=Ed,Ff=yp,Df=Td,Bf=Ud;function Uf(e,t){if(Array.isArray(e))return e.map(e=>Uf(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ff.prototype};s.map&&(s.map={...s.map,__proto__:Tf.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Uf(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Df(r);if("decl"===r.type)return new _f(r);if("rule"===r.type)return new Bf(r);if("comment"===r.type)return new Pf(r);if("atrule"===r.type)return new Lf(r);throw new Error("Unknown node type: "+e.type)}var jf=Uf;Uf.default=Uf;let zf=Ru,Vf=Ju,Wf=wf,Yf=Yp,Gf=Nf,Zf=Fu,Jf=jf,Xf=Hp,Hf=Qp,Kf=Np,$f=Ed,qf=sd,Qf=yp,em=$d,tm=Ld,sm=Ud,rm=Td,nm=Yu;function im(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Gf(e)}im.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Gf).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return im([n(s)]).process(e,t)},n},im.stringify=Zf,im.parse=em,im.fromJSON=Jf,im.list=tm,im.comment=e=>new Kf(e),im.atRule=e=>new $f(e),im.decl=e=>new Vf(e),im.rule=e=>new sm(e),im.root=e=>new rm(e),im.document=e=>new Xf(e),im.CssSyntaxError=zf,im.Declaration=Vf,im.Container=Yf,im.Processor=Gf,im.Document=Xf,im.Comment=Kf,im.Warning=Hf,im.AtRule=$f,im.Result=qf,im.Input=Qf,im.Rule=sm,im.Root=rm,im.Node=nm,Wf.registerPostcss(im);var om=im;im.default=im;const am=bu(om);am.stringify,am.fromJSON,am.plugin,am.parse,am.list,am.document,am.comment,am.atRule,am.rule,am.decl,am.root,am.CssSyntaxError,am.Declaration,am.Container,am.Processor,am.Document,am.Comment,am.Warning,am.AtRule,am.Result,am.Input,am.Rule,am.Root,am.Node;var lm=Object.defineProperty,cm=(e,t,s)=>((e,t,s)=>t in e?lm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s)(e,"symbol"!=typeof t?t+"":t,s);function hm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function um(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var s=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),s}var pm={exports:{}},dm=String,fm=function(){return{isColorSupported:!1,reset:dm,bold:dm,dim:dm,italic:dm,underline:dm,inverse:dm,hidden:dm,strikethrough:dm,black:dm,red:dm,green:dm,yellow:dm,blue:dm,magenta:dm,cyan:dm,white:dm,gray:dm,bgBlack:dm,bgRed:dm,bgGreen:dm,bgYellow:dm,bgBlue:dm,bgMagenta:dm,bgCyan:dm,bgWhite:dm}};pm.exports=fm(),pm.exports.createColors=fm;var mm=pm.exports;const gm=um(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let ym=mm,wm=gm,bm=class e extends Error{constructor(t,s,r,n,i,o){super(t),this.name="CssSyntaxError",this.reason=t,i&&(this.file=i),n&&(this.source=n),o&&(this.plugin=o),void 0!==s&&void 0!==r&&("number"==typeof s?(this.line=s,this.column=r):(this.line=s.line,this.column=s.column,this.endLine=r.line,this.endColumn=r.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){if(!this.source)return"";let t=this.source;null==e&&(e=ym.isColorSupported),wm&&e&&(t=wm(t));let s,r,n=t.split(/\r?\n/),i=Math.max(this.line-3,0),o=Math.min(this.line+2,n.length),a=String(o).length;if(e){let{bold:e,gray:t,red:n}=ym.createColors(!0);s=t=>e(n(t)),r=e=>t(e)}else s=r=e=>e;return n.slice(i,o).map((e,t)=>{let n=i+1+t,o=" "+(" "+n).slice(-a)+" | ";if(n===this.line){let t=r(o.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+r(o)+e+"\n "+t+s("^")}return" "+r(o)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var vm=bm;bm.default=bm;var Cm={};Cm.isClean=Symbol("isClean"),Cm.my=Symbol("my");const Sm={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let km=class{constructor(e){this.builder=e}atrule(e,t){let s="@"+e.name,r=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?s+=e.raws.afterName:r&&(s+=" "),e.nodes)this.block(e,s+r);else{let n=(e.raws.between||"")+(t?";":"");this.builder(s+r+n,e)}}beforeAfter(e,t){let s;s="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 r=e.parent,n=0;for(;r&&"root"!==r.type;)n+=1,r=r.parent;if(s.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<n;e++)s+=t}return s}block(e,t){let s,r=this.raw(e,"between","beforeOpen");this.builder(t+r+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),s=this.raw(e,"after")):s=this.raw(e,"after","emptyBody"),s&&this.builder(s),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let s=this.raw(e,"semicolon");for(let r=0;r<e.nodes.length;r++){let n=e.nodes[r],i=this.raw(n,"before");i&&this.builder(i),this.stringify(n,t!==r||s)}}comment(e){let t=this.raw(e,"left","commentLeft"),s=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+s+"*/",e)}decl(e,t){let s=this.raw(e,"between","colon"),r=e.prop+s+this.rawValue(e,"value");e.important&&(r+=e.raws.important||" !important"),t&&(r+=";"),this.builder(r,e)}document(e){this.body(e)}raw(e,t,s){let r;if(s||(s=t),t&&(r=e.raws[t],void 0!==r))return r;let n=e.parent;if("before"===s){if(!n||"root"===n.type&&n.first===e)return"";if(n&&"document"===n.type)return""}if(!n)return Sm[s];let i=e.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[s])return i.rawCache[s];if("before"===s||"after"===s)return this.beforeAfter(e,s);{let n="raw"+((o=s)[0].toUpperCase()+o.slice(1));this[n]?r=this[n](i,e):i.walk(e=>{if(r=e.raws[t],void 0!==r)return!1})}var o;return void 0===r&&(r=Sm[s]),i.rawCache[s]=r,r}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,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let s;return e.walkComments(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeDecl"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeDecl(e,t){let s;return e.walkDecls(e=>{if(void 0!==e.raws.before)return s=e.raws.before,s.includes("\n")&&(s=s.replace(/[^\n]+$/,"")),!1}),void 0===s?s=this.raw(t,null,"beforeRule"):s&&(s=s.replace(/\S/g,"")),s}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(s=>{if(s.nodes&&(s.parent!==e||e.first!==s)&&void 0!==s.raws.before)return t=s.raws.before,t.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&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(s=>{let r=s.parent;if(r&&r!==e&&r.parent&&r.parent===e&&void 0!==s.raws.before){let e=s.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let s=e[t],r=e.raws[t];return r&&r.value===s?r.raw:s}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 new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}};var Im=km;km.default=km;let xm=Im;function Om(e,t){new xm(t).stringify(e)}var Am=Om;Om.default=Om;let{isClean:Em,my:Rm}=Cm,Mm=vm,Nm=Im,_m=Am;function Tm(e,t){let s=new e.constructor;for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if("proxyCache"===r)continue;let n=e[r],i=typeof n;"parent"===r&&"object"===i?t&&(s[r]=t):"source"===r?s[r]=n:Array.isArray(n)?s[r]=n.map(e=>Tm(e,s)):("object"===i&&null!==n&&(n=Tm(n)),s[r]=n)}return s}let Pm=class{constructor(e={}){this.raws={},this[Em]=!1,this[Rm]=!0;for(let t in e)if("nodes"===t){this.nodes=[];for(let s of e[t])"function"==typeof s.clone?this.append(s.clone()):this.append(s)}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=Tm(this);for(let s in e)t[s]=e[s];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}error(e,t={}){if(this.source){let{end:s,start:r}=this.rangeBy(t);return this.source.input.error(e,{column:r.column,line:r.line},{column:s.column,line:s.line},t)}return new Mm(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[Em]){this[Em]=!1;let e=this;for(;e=e.parent;)e[Em]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let s=this.source.start;if(e.index)s=this.positionInside(e.index,t);else if(e.word){let r=(t=this.toString()).indexOf(e.word);-1!==r&&(s=this.positionInside(r,t))}return s}positionInside(e,t){let s=t||this.toString(),r=this.source.start.column,n=this.source.start.line;for(let i=0;i<e;i++)"\n"===s[i]?(r=1,n+=1):r+=1;return{column:r,line:n}}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},s=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 r=this.toString(),n=r.indexOf(e.word);-1!==n&&(t=this.positionInside(n,r),s=this.positionInside(n+e.word.length,r))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?s={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?s=this.positionInside(e.endIndex):e.index&&(s=this.positionInside(e.index+1));return(s.line<t.line||s.line===t.line&&s.column<=t.column)&&(s={column:t.column+1,line:t.line}),{end:s,start:t}}raw(e,t){return(new Nm).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,s=!1;for(let r of e)r===this?s=!0:s?(this.parent.insertAfter(t,r),t=r):this.parent.insertBefore(t,r);s||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let s={},r=null==t;t=t||new Map;let n=0;for(let i in this){if(!Object.prototype.hasOwnProperty.call(this,i))continue;if("parent"===i||"proxyCache"===i)continue;let e=this[i];if(Array.isArray(e))s[i]=e.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof e&&e.toJSON)s[i]=e.toJSON(null,t);else if("source"===i){let r=t.get(e.input);null==r&&(r=n,t.set(e.input,n),n++),s[i]={end:e.end,inputId:r,start:e.start}}else s[i]=e}return r&&(s.inputs=[...t.keys()].map(e=>e.toJSON())),s}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=_m){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,s){let r={node:this};for(let n in s)r[n]=s[n];return e.warn(t,r)}get proxyOf(){return this}};var Lm=Pm;Pm.default=Pm;let Fm=Lm,Dm=class extends Fm{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]}};var Bm=Dm;Dm.default=Dm;var Um={nanoid:(e=21)=>{let t="",s=e;for(;s--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t}};let{SourceMapConsumer:jm,SourceMapGenerator:zm}=gm,{existsSync:Vm,readFileSync:Wm}=gm,{dirname:Ym,join:Gm}=gm;let Zm=class{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let s=t.map?t.map.prev:void 0,r=this.loadMap(t.from,s);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=Ym(this.mapFile)),r&&(this.text=r)}consumer(){return this.consumerCache||(this.consumerCache=new jm(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))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let s=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+s)}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);if(!t)return;let s=e.lastIndexOf(t.pop()),r=e.indexOf("*/",s);s>-1&&r>-1&&(this.annotation=this.getAnnotationURL(e.substring(s,r)))}loadFile(e){if(this.root=Ym(e),Vm(e))return this.mapFile=e,Wm(e,"utf-8").toString().trim()}loadMap(e,t){if(!1===t)return!1;if(t){if("string"==typeof t)return t;if("function"!=typeof t){if(t instanceof jm)return zm.fromSourceMap(t).toString();if(t instanceof zm)return t.toString();if(this.isMap(t))return JSON.stringify(t);throw new Error("Unsupported previous source map format: "+t.toString())}{let s=t(e);if(s){let e=this.loadFile(s);if(!e)throw new Error("Unable to load previous source map: "+s.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let t=this.annotation;return e&&(t=Gm(Ym(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)}};var Jm=Zm;Zm.default=Zm;let{SourceMapConsumer:Xm,SourceMapGenerator:Hm}=gm,{fileURLToPath:Km,pathToFileURL:$m}=gm,{isAbsolute:qm,resolve:Qm}=gm,{nanoid:eg}=Um,tg=gm,sg=vm,rg=Jm,ng=Symbol("fromOffsetCache"),ig=Boolean(Xm&&Hm),og=Boolean(Qm&&qm),ag=class{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new 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&&(!og||/^\w+:\/\//.test(t.from)||qm(t.from)?this.file=t.from:this.file=Qm(t.from)),og&&ig){let e=new rg(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 "+eg(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,s,r={}){let n,i,o;if(t&&"object"==typeof t){let e=t,r=s;if("number"==typeof e.offset){let r=this.fromOffset(e.offset);t=r.line,s=r.col}else t=e.line,s=e.column;if("number"==typeof r.offset){let e=this.fromOffset(r.offset);i=e.line,o=e.col}else i=r.line,o=r.column}else if(!s){let e=this.fromOffset(t);t=e.line,s=e.col}let a=this.origin(t,s,i,o);return n=a?new sg(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,r.plugin):new sg(e,void 0===i?t:{column:s,line:t},void 0===i?s:{column:o,line:i},this.css,this.file,r.plugin),n.input={column:s,endColumn:o,endLine:i,line:t,source:this.css},this.file&&($m&&(n.input.url=$m(this.file).toString()),n.input.file=this.file),n}fromOffset(e){let t,s;if(this[ng])s=this[ng];else{let e=this.css.split("\n");s=new Array(e.length);let t=0;for(let r=0,n=e.length;r<n;r++)s[r]=t,t+=e[r].length+1;this[ng]=s}t=s[s.length-1];let r=0;if(e>=t)r=s.length-1;else{let t,n=s.length-2;for(;r<n;)if(t=r+(n-r>>1),e<s[t])n=t-1;else{if(!(e>=s[t+1])){r=t;break}r=t+1}}return{col:e-s[r]+1,line:r+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qm(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,s,r){if(!this.map)return!1;let n,i,o=this.map.consumer(),a=o.originalPositionFor({column:t,line:e});if(!a.source)return!1;"number"==typeof s&&(n=o.originalPositionFor({column:r,line:s})),i=qm(a.source)?$m(a.source):new URL(a.source,this.map.consumer().sourceRoot||$m(this.map.mapFile));let l={column:a.column,endColumn:n&&n.column,endLine:n&&n.line,line:a.line,url:i.toString()};if("file:"===i.protocol){if(!Km)throw new Error("file: protocol is not available in this PostCSS build");l.file=Km(i)}let c=o.sourceContentFor(a.source);return c&&(l.source=c),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}};var lg=ag;ag.default=ag,tg&&tg.registerInput&&tg.registerInput(ag);let{SourceMapConsumer:cg,SourceMapGenerator:hg}=gm,{dirname:ug,relative:pg,resolve:dg,sep:fg}=gm,{pathToFileURL:mg}=gm,gg=lg,yg=Boolean(cg&&hg),wg=Boolean(ug&&dg&&pg&&fg);var bg=class{constructor(e,t,s,r){this.stringify=e,this.mapOpts=s.map||{},this.root=t,this.opts=s,this.css=r,this.originalCSS=r,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,s=this.toUrl(this.path(e.file)),r=e.root||ug(e.file);!1===this.mapOpts.sourcesContent?(t=new cg(e.text),t.sourcesContent&&(t.sourcesContent=null)):t=e.consumer(),this.map.applySourceMap(t,s,this.toUrl(this.path(r)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.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(),wg&&yg&&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=hg.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new hg({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(){this.css="",this.map=new hg({file:this.outputFile(),ignoreInvalidMapping:!0});let e,t,s=1,r=1,n="<no source>",i={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&&(i.generated.line=s,i.generated.column=r-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=o.match(/\n/g),e?(s+=e.length,t=o.lastIndexOf("\n"),r=o.length-t):r+=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?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=s,i.generated.column=r-2,this.map.addMapping(i)):(i.source=n,i.original.line=1,i.original.column=0,i.generated.line=s,i.generated.column=r-1,this.map.addMapping(i)))}})}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)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let s=this.opts.to?ug(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(s=ug(dg(s,this.mapOpts.annotation)));let r=pg(s,e);return this.memoizedPaths.set(e,r),r}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 gg(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 s=t.source.input.from;if(s&&!e[s]){e[s]=!0;let r=this.usesFileUrls?this.toFileUrl(s):this.toUrl(this.path(s));this.map.setSourceContent(r,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 Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(mg){let t=mg(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===fg&&(e=e.replace(/\\/g,"/"));let s=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,s),s}};let vg=Lm,Cg=class extends vg{constructor(e){super(e),this.type="comment"}};var Sg=Cg;Cg.default=Cg;let kg,Ig,xg,Og,{isClean:Ag,my:Eg}=Cm,Rg=Bm,Mg=Sg,Ng=Lm;function _g(e){return e.map(e=>(e.nodes&&(e.nodes=_g(e.nodes)),delete e.source,e))}function Tg(e){if(e[Ag]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)Tg(t)}let Pg=class e extends Ng{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,s,r=this.getIterator();for(;this.indexes[r]<this.proxyOf.nodes.length&&(t=this.indexes[r],s=e(this.proxyOf.nodes[t],t),!1!==s);)this.indexes[r]+=1;return delete this.indexes[r],s}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)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...s)=>e[t](...s.map(e=>"function"==typeof e?(t,s)=>e(t.toProxy(),s):e)):"every"===t||"some"===t?s=>e[t]((e,...t)=>s(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,s)=>(e[t]===s||(e[t]=s,"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 s,r=this.index(e),n=this.normalize(t,this.proxyOf.nodes[r]).reverse();r=this.index(e);for(let i of n)this.proxyOf.nodes.splice(r+1,0,i);for(let i in this.indexes)s=this.indexes[i],r<s&&(this.indexes[i]=s+n.length);return this.markDirty(),this}insertBefore(e,t){let s,r=this.index(e),n=0===r&&"prepend",i=this.normalize(t,this.proxyOf.nodes[r],n).reverse();r=this.index(e);for(let o of i)this.proxyOf.nodes.splice(r,0,o);for(let o in this.indexes)s=this.indexes[o],r<=s&&(this.indexes[o]=s+i.length);return this.markDirty(),this}normalize(t,s){if("string"==typeof t)t=_g(kg(t).nodes);else if(void 0===t)t=[];else if(Array.isArray(t)){t=t.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===t.type&&"document"!==this.type){t=t.nodes.slice(0);for(let e of t)e.parent&&e.parent.removeChild(e,"ignore")}else if(t.type)t=[t];else if(t.prop){if(void 0===t.value)throw new Error("Value field is missed in node creation");"string"!=typeof t.value&&(t.value=String(t.value)),t=[new Rg(t)]}else if(t.selector)t=[new Ig(t)];else if(t.name)t=[new xg(t)];else{if(!t.text)throw new Error("Unknown node type in node creation");t=[new Mg(t)]}return t.map(t=>(t[Eg]||e.rebuild(t),(t=t.proxyOf).parent&&t.parent.removeChild(t),t[Ag]&&Tg(t),void 0===t.raws.before&&s&&void 0!==s.raws.before&&(t.raws.before=s.raws.before.replace(/\S/g,"")),t.parent=this.proxyOf,t))}prepend(...e){e=e.reverse();for(let t of e){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;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let s in this.indexes)t=this.indexes[s],t>=e&&(this.indexes[s]=t-1);return this.markDirty(),this}replaceValues(e,t,s){return s||(s=t,t={}),this.walkDecls(r=>{t.props&&!t.props.includes(r.prop)||t.fast&&!r.value.includes(t.fast)||(r.value=r.value.replace(e,s))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,s)=>{let r;try{r=e(t,s)}catch(n){throw t.addToError(n)}return!1!==r&&t.walk&&(r=t.walk(e)),r})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("atrule"===s.type&&e.test(s.name))return t(s,r)}):this.walk((s,r)=>{if("atrule"===s.type&&s.name===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("atrule"===e.type)return t(e,s)}))}walkComments(e){return this.walk((t,s)=>{if("comment"===t.type)return e(t,s)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("decl"===s.type&&e.test(s.prop))return t(s,r)}):this.walk((s,r)=>{if("decl"===s.type&&s.prop===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("decl"===e.type)return t(e,s)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((s,r)=>{if("rule"===s.type&&e.test(s.selector))return t(s,r)}):this.walk((s,r)=>{if("rule"===s.type&&s.selector===e)return t(s,r)}):(t=e,this.walk((e,s)=>{if("rule"===e.type)return t(e,s)}))}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]}};Pg.registerParse=e=>{kg=e},Pg.registerRule=e=>{Ig=e},Pg.registerAtRule=e=>{xg=e},Pg.registerRoot=e=>{Og=e};var Lg=Pg;Pg.default=Pg,Pg.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,xg.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ig.prototype):"decl"===e.type?Object.setPrototypeOf(e,Rg.prototype):"comment"===e.type?Object.setPrototypeOf(e,Mg.prototype):"root"===e.type&&Object.setPrototypeOf(e,Og.prototype),e[Eg]=!0,e.nodes&&e.nodes.forEach(e=>{Pg.rebuild(e)})};let Fg,Dg,Bg=Lg,Ug=class extends Bg{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Fg(new Dg,this,e).stringify()}};Ug.registerLazyResult=e=>{Fg=e},Ug.registerProcessor=e=>{Dg=e};var jg=Ug;Ug.default=Ug;let zg={};var Vg=function(e){zg[e]||(zg[e]=!0,"undefined"!=typeof console&&console.warn&&console.warn(e))};let Wg=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 s in t)this[s]=t[s]}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}};var Yg=Wg;Wg.default=Wg;let Gg=Yg,Zg=class{constructor(e,t,s){this.processor=e,this.messages=[],this.root=t,this.opts=s,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 s=new Gg(e,t);return this.messages.push(s),s}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}};var Jg=Zg;Zg.default=Zg;const Xg="'".charCodeAt(0),Hg='"'.charCodeAt(0),Kg="\\".charCodeAt(0),$g="/".charCodeAt(0),qg="\n".charCodeAt(0),Qg=" ".charCodeAt(0),ey="\f".charCodeAt(0),ty="\t".charCodeAt(0),sy="\r".charCodeAt(0),ry="[".charCodeAt(0),ny="]".charCodeAt(0),iy="(".charCodeAt(0),oy=")".charCodeAt(0),ay="{".charCodeAt(0),ly="}".charCodeAt(0),cy=";".charCodeAt(0),hy="*".charCodeAt(0),uy=":".charCodeAt(0),py="@".charCodeAt(0),dy=/[\t\n\f\r "#'()/;[\\\]{}]/g,fy=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,my=/.[\r\n"'(/\\]/,gy=/[\da-f]/i;let yy=Lg,wy=class extends yy{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)}};var by=wy;wy.default=wy,yy.registerAtRule(wy);let vy,Cy,Sy=Lg,ky=class extends Sy{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,s){let r=super.normalize(e);if(t)if("prepend"===s)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let n of r)n.raws.before=t.raws.before;return r}removeChild(e,t){let s=this.index(e);return!t&&0===s&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[s].raws.before),super.removeChild(e)}toResult(e={}){return new vy(new Cy,this,e).stringify()}};ky.registerLazyResult=e=>{vy=e},ky.registerProcessor=e=>{Cy=e};var Iy=ky;ky.default=ky,Sy.registerRoot(ky);let xy={comma:e=>xy.split(e,[","],!0),space:e=>xy.split(e,[" ","\n","\t"]),split(e,t,s){let r=[],n="",i=!1,o=0,a=!1,l="",c=!1;for(let h of e)c?c=!1:"\\"===h?c=!0:a?h===l&&(a=!1):'"'===h||"'"===h?(a=!0,l=h):"("===h?o+=1:")"===h?o>0&&(o-=1):0===o&&t.includes(h)&&(i=!0),i?(""!==n&&r.push(n.trim()),n="",i=!1):n+=h;return(s||""!==n)&&r.push(n.trim()),r}};var Oy=xy;xy.default=xy;let Ay=Lg,Ey=Oy,Ry=class extends Ay{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Ey.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,s=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(s)}};var My=Ry;Ry.default=Ry,Ay.registerRule(Ry);let Ny=Bm,_y=function(e,t={}){let s,r,n,i,o,a,l,c,h,u,p=e.css.valueOf(),d=t.ignoreErrors,f=p.length,m=0,g=[],y=[];function w(t){throw e.error("Unclosed "+t,m)}return{back:function(e){y.push(e)},endOfFile:function(){return 0===y.length&&m>=f},nextToken:function(e){if(y.length)return y.pop();if(m>=f)return;let t=!!e&&e.ignoreUnclosed;switch(s=p.charCodeAt(m),s){case qg:case Qg:case ty:case sy:case ey:r=m;do{r+=1,s=p.charCodeAt(r)}while(s===Qg||s===qg||s===ty||s===sy||s===ey);u=["space",p.slice(m,r)],m=r-1;break;case ry:case ny:case ay:case ly:case uy:case cy:case oy:{let e=String.fromCharCode(s);u=[e,e,m];break}case iy:if(c=g.length?g.pop()[1]:"",h=p.charCodeAt(m+1),"url"===c&&h!==Xg&&h!==Hg&&h!==Qg&&h!==qg&&h!==ty&&h!==ey&&h!==sy){r=m;do{if(a=!1,r=p.indexOf(")",r+1),-1===r){if(d||t){r=m;break}w("bracket")}for(l=r;p.charCodeAt(l-1)===Kg;)l-=1,a=!a}while(a);u=["brackets",p.slice(m,r+1),m,r],m=r}else r=p.indexOf(")",m+1),i=p.slice(m,r+1),-1===r||my.test(i)?u=["(","(",m]:(u=["brackets",i,m,r],m=r);break;case Xg:case Hg:n=s===Xg?"'":'"',r=m;do{if(a=!1,r=p.indexOf(n,r+1),-1===r){if(d||t){r=m+1;break}w("string")}for(l=r;p.charCodeAt(l-1)===Kg;)l-=1,a=!a}while(a);u=["string",p.slice(m,r+1),m,r],m=r;break;case py:dy.lastIndex=m+1,dy.test(p),r=0===dy.lastIndex?p.length-1:dy.lastIndex-2,u=["at-word",p.slice(m,r+1),m,r],m=r;break;case Kg:for(r=m,o=!0;p.charCodeAt(r+1)===Kg;)r+=1,o=!o;if(s=p.charCodeAt(r+1),o&&s!==$g&&s!==Qg&&s!==qg&&s!==ty&&s!==sy&&s!==ey&&(r+=1,gy.test(p.charAt(r)))){for(;gy.test(p.charAt(r+1));)r+=1;p.charCodeAt(r+1)===Qg&&(r+=1)}u=["word",p.slice(m,r+1),m,r],m=r;break;default:s===$g&&p.charCodeAt(m+1)===hy?(r=p.indexOf("*/",m+2)+1,0===r&&(d||t?r=p.length:w("comment")),u=["comment",p.slice(m,r+1),m,r],m=r):(fy.lastIndex=m+1,fy.test(p),r=0===fy.lastIndex?p.length-1:fy.lastIndex-2,u=["word",p.slice(m,r+1),m,r],g.push(u),m=r)}return m++,u},position:function(){return m}}},Ty=Sg,Py=by,Ly=Iy,Fy=My;const Dy={empty:!0,space:!0};let By=Lg,Uy=class{constructor(e){this.input=e,this.root=new Ly,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,s,r,n=new Py;n.name=e[1].slice(1),""===n.name&&this.unnamedAtrule(n,e),this.init(n,e[2]);let i=!1,o=!1,a=[],l=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?l.push("("===t?")":"]"):"{"===t&&l.length>0?l.push("}"):t===l[l.length-1]&&l.pop(),0===l.length){if(";"===t){n.source.end=this.getPosition(e[2]),n.source.end.offset++,this.semicolon=!0;break}if("{"===t){o=!0;break}if("}"===t){if(a.length>0){for(r=a.length-1,s=a[r];s&&"space"===s[0];)s=a[--r];s&&(n.source.end=this.getPosition(s[3]||s[2]),n.source.end.offset++)}this.end(e);break}a.push(e)}else a.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(e=a[a.length-1],n.source.end=this.getPosition(e[3]||e[2]),n.source.end.offset++,this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let s,r=0;for(let n=t-1;n>=0&&(s=e[n],"space"===s[0]||(r+=1,2!==r));n--);throw this.input.error("Missed semicolon","word"===s[0]?s[3]+1:s[2])}colon(e){let t,s,r,n=0;for(let[i,o]of e.entries()){if(t=o,s=t[0],"("===s&&(n+=1),")"===s&&(n-=1),0===n&&":"===s){if(r){if("word"===r[0]&&"progid"===r[1])continue;return i}this.doubleColon(t)}r=t}return!1}comment(e){let t=new Ty;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let s=e[1].slice(2,-2);if(/^\s*$/.test(s))t.text="",t.raws.left=s,t.raws.right="";else{let e=s.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=_y(this.input)}decl(e,t){let s=new Ny;this.init(s,e[0][2]);let r,n=e[e.length-1];for(";"===n[0]&&(this.semicolon=!0,e.pop()),s.source.end=this.getPosition(n[3]||n[2]||function(e){for(let t=e.length-1;t>=0;t--){let s=e[t],r=s[3]||s[2];if(r)return r}}(e)),s.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),s.raws.before+=e.shift()[1];for(s.source.start=this.getPosition(e[0][2]),s.prop="";e.length;){let t=e[0][0];if(":"===t||"space"===t||"comment"===t)break;s.prop+=e.shift()[1]}for(s.raws.between="";e.length;){if(r=e.shift(),":"===r[0]){s.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),s.raws.between+=r[1]}"_"!==s.prop[0]&&"*"!==s.prop[0]||(s.raws.before+=s.prop[0],s.prop=s.prop.slice(1));let i,o=[];for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)o.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(r=e[a],"!important"===r[1].toLowerCase()){s.important=!0;let t=this.stringFrom(e,a);t=this.spacesFromEnd(e)+t," !important"!==t&&(s.raws.important=t);break}if("important"===r[1].toLowerCase()){let t=e.slice(0),r="";for(let e=a;e>0;e--){let s=t[e][0];if(0===r.trim().indexOf("!")&&"space"!==s)break;r=t.pop()[1]+r}0===r.trim().indexOf("!")&&(s.important=!0,s.raws.important=r,e=t)}if("space"!==r[0]&&"comment"!==r[0])break}e.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(s.raws.between+=o.map(e=>e[1]).join(""),o=[]),this.raw(s,"value",o.concat(e),t),s.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 Fy;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,s=null,r=!1,n=null,i=[],o=e[1].startsWith("--"),a=[],l=e;for(;l;){if(s=l[0],a.push(l),"("===s||"["===s)n||(n=l),i.push("("===s?")":"]");else if(o&&r&&"{"===s)n||(n=l),i.push("}");else if(0===i.length){if(";"===s){if(r)return void this.decl(a,o);break}if("{"===s)return void this.rule(a);if("}"===s){this.tokenizer.back(a.pop()),t=!0;break}":"===s&&(r=!0)}else s===i[i.length-1]&&(i.pop(),0===i.length&&(n=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),i.length>0&&this.unclosedBracket(n),t&&r){if(!o)for(;a.length&&(l=a[a.length-1][0],"space"===l||"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(),e[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,s,r){let n,i,o,a,l=s.length,c="",h=!0;for(let u=0;u<l;u+=1)n=s[u],i=n[0],"space"!==i||u!==l-1||r?"comment"===i?(a=s[u-1]?s[u-1][0]:"empty",o=s[u+1]?s[u+1][0]:"empty",Dy[a]||Dy[o]||","===c.slice(-1)?h=!1:c+=n[1]):c+=n[1]:h=!1;if(!h){let r=s.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:r,value:c}}e[t]=c}rule(e){e.pop();let t=new Fy;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)s=e.pop()[1]+s;return s}spacesAndCommentsFromStart(e){let t,s="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)s+=e.shift()[1];return s}spacesFromEnd(e){let t,s="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)s=e.pop()[1]+s;return s}stringFrom(e,t){let s="";for(let r=t;r<e.length;r++)s+=e[r][1];return e.splice(t,e.length-t),s}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})}},jy=lg;function zy(e,t){let s=new jy(e,t),r=new Uy(s);try{r.parse()}catch(n){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===n.name&&t&&t.from&&(/\.scss$/i.test(t.from)?n.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(t.from)?n.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(t.from)&&(n.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),n}return r.root}var Vy=zy;zy.default=zy,By.registerParse(zy);let{isClean:Wy,my:Yy}=Cm,Gy=bg,Zy=Am,Jy=Lg,Xy=jg,Hy=Vg,Ky=Jg,$y=Vy,qy=Iy;const Qy={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},ew={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},tw={Once:!0,postcssPlugin:!0,prepare:!0};function sw(e){return"object"==typeof e&&"function"==typeof e.then}function rw(e){let t=!1,s=Qy[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[s,s+"-"+t,0,s+"Exit",s+"Exit-"+t]:t?[s,s+"-"+t,s+"Exit",s+"Exit-"+t]:e.append?[s,0,s+"Exit"]:[s,s+"Exit"]}function nw(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:rw(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function iw(e){return e[Wy]=!1,e.nodes&&e.nodes.forEach(e=>iw(e)),e}let ow={},aw=class e{constructor(t,s,r){let n;if(this.stringified=!1,this.processed=!1,"object"!=typeof s||null===s||"root"!==s.type&&"document"!==s.type)if(s instanceof e||s instanceof Ky)n=iw(s.root),s.map&&(void 0===r.map&&(r.map={}),r.map.inline||(r.map.inline=!1),r.map.prev=s.map);else{let e=$y;r.syntax&&(e=r.syntax.parse),r.parser&&(e=r.parser),e.parse&&(e=e.parse);try{n=e(s,r)}catch(i){this.processed=!0,this.error=i}n&&!n[Yy]&&Jy.rebuild(n)}else n=iw(s);this.result=new Ky(t,n,r),this.helpers={...ow,postcss:ow,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 new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let s=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(s.postcssVersion&&"production"!==process.env.NODE_ENV){let e=s.postcssPlugin,t=s.postcssVersion,r=this.result.processor.version,n=t.split("."),i=r.split(".");(n[0]!==i[0]||parseInt(n[1])>parseInt(i[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+r+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=s.postcssPlugin,e.setMessage()}catch(Kb){console&&console.error&&console.error(Kb)}return e}prepareVisitors(){this.listeners={};let e=(e,t,s)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,s])};for(let t of this.plugins)if("object"==typeof t)for(let s in t){if(!ew[s]&&/^[A-Z]/.test(s))throw new Error(`Unknown event ${s} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!tw[s])if("object"==typeof t[s])for(let r in t[s])e(t,"*"===r?s:s+"-"+r.toLowerCase(),t[s][r]);else"function"==typeof t[s]&&e(t,s,t[s])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let s=0;s<this.plugins.length;s++){let t=this.plugins[s],r=this.runOnRoot(t);if(sw(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Wy];){e[Wy]=!0;let s=[nw(e)];for(;s.length>0;){let e=this.visitTick(s);if(sw(e))try{await e}catch(t){let e=s[s.length-1].node;throw this.handleError(t,e)}}}if(this.listeners.OnceExit)for(let[s,r]of this.listeners.OnceExit){this.result.lastPlugin=s;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(t){throw this.handleError(t)}}}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));return sw(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(t){throw this.handleError(t)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=Zy;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new Gy(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[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(sw(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Wy];)e[Wy]=!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"production"!==process.env.NODE_ENV&&("from"in this.opts||Hy("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(s){throw this.handleError(s,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(sw(e))throw this.getAsyncError()}}visitTick(e){let t=e[e.length-1],{node:s,visitors:r}=t;if("root"!==s.type&&"document"!==s.type&&!s.parent)return void e.pop();if(r.length>0&&t.visitorIndex<r.length){let[e,n]=r[t.visitorIndex];t.visitorIndex+=1,t.visitorIndex===r.length&&(t.visitors=[],t.visitorIndex=0),this.result.lastPlugin=e;try{return n(s.toProxy(),this.helpers)}catch(i){throw this.handleError(i,s)}}if(0!==t.iterator){let r,n=t.iterator;for(;r=s.nodes[s.indexes[n]];)if(s.indexes[n]+=1,!r[Wy])return r[Wy]=!0,void e.push(nw(r));t.iterator=0,delete s.indexes[n]}let n=t.events;for(;t.eventIndex<n.length;){let e=n[t.eventIndex];if(t.eventIndex+=1,0===e)return void(s.nodes&&s.nodes.length&&(s[Wy]=!0,t.iterator=s.getIterator()));if(this.listeners[e])return void(t.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Wy]=!0;let t=rw(e);for(let s of t)if(0===s)e.nodes&&e.each(e=>{e[Wy]||this.walkSync(e)});else{let t=this.listeners[s];if(t&&this.visitSync(t,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"}};aw.registerPostcss=e=>{ow=e};var lw=aw;aw.default=aw,qy.registerLazyResult(aw),Xy.registerLazyResult(aw);let cw=bg,hw=Am,uw=Vg,pw=Vy;const dw=Jg;let fw=class{constructor(e,t,s){let r;t=t.toString(),this.stringified=!1,this._processor=e,this._css=t,this._opts=s,this._map=void 0;let n=hw;this.result=new dw(this._processor,r,this._opts),this.result.css=t;let i=this;Object.defineProperty(this.result,"root",{get:()=>i.root});let o=new cw(n,r,this._opts,t);if(o.isMap()){let[e,t]=o.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else o.clearAnnotation(),this.result.css=o.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"production"!==process.env.NODE_ENV&&("from"in this._opts||uw("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),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(){if(this._root)return this._root;let e,t=pw;try{e=t(this._css,this._opts)}catch(s){this.error=s}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var mw=fw;fw.default=fw;let gw=mw,yw=lw,ww=jg,bw=Iy,vw=class{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let s of e)if(!0===s.postcss?s=s():s.postcss&&(s=s.postcss),"object"==typeof s&&Array.isArray(s.plugins))t=t.concat(s.plugins);else if("object"==typeof s&&s.postcssPlugin)t.push(s);else if("function"==typeof s)t.push(s);else{if("object"!=typeof s||!s.parse&&!s.stringify)throw new Error(s+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(e,t={}){return this.plugins.length||t.parser||t.stringifier||t.syntax?new yw(this,e,t):new gw(this,e,t)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Cw=vw;vw.default=vw,bw.registerProcessor(vw),ww.registerProcessor(vw);let Sw=Bm,kw=Jm,Iw=Sg,xw=by,Ow=lg,Aw=Iy,Ew=My;function Rw(e,t){if(Array.isArray(e))return e.map(e=>Rw(e));let{inputs:s,...r}=e;if(s){t=[];for(let e of s){let s={...e,__proto__:Ow.prototype};s.map&&(s.map={...s.map,__proto__:kw.prototype}),t.push(s)}}if(r.nodes&&(r.nodes=e.nodes.map(e=>Rw(e,t))),r.source){let{inputId:e,...s}=r.source;r.source=s,null!=e&&(r.source.input=t[e])}if("root"===r.type)return new Aw(r);if("decl"===r.type)return new Sw(r);if("rule"===r.type)return new Ew(r);if("comment"===r.type)return new Iw(r);if("atrule"===r.type)return new xw(r);throw new Error("Unknown node type: "+e.type)}var Mw=Rw;Rw.default=Rw;let Nw=vm,_w=Bm,Tw=lw,Pw=Lg,Lw=Cw,Fw=Am,Dw=Mw,Bw=jg,Uw=Yg,jw=Sg,zw=by,Vw=Jg,Ww=lg,Yw=Vy,Gw=Oy,Zw=My,Jw=Iy,Xw=Lm;function Hw(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Lw(e)}Hw.plugin=function(e,t){let s,r=!1;function n(...s){console&&console.warn&&!r&&(r=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));let n=t(...s);return n.postcssPlugin=e,n.postcssVersion=(new Lw).version,n}return Object.defineProperty(n,"postcss",{get:()=>(s||(s=n()),s)}),n.process=function(e,t,s){return Hw([n(s)]).process(e,t)},n},Hw.stringify=Fw,Hw.parse=Yw,Hw.fromJSON=Dw,Hw.list=Gw,Hw.comment=e=>new jw(e),Hw.atRule=e=>new zw(e),Hw.decl=e=>new _w(e),Hw.rule=e=>new Zw(e),Hw.root=e=>new Jw(e),Hw.document=e=>new Bw(e),Hw.CssSyntaxError=Nw,Hw.Declaration=_w,Hw.Container=Pw,Hw.Processor=Lw,Hw.Document=Bw,Hw.Comment=jw,Hw.Warning=Uw,Hw.AtRule=zw,Hw.Result=Vw,Hw.Input=Ww,Hw.Rule=Zw,Hw.Root=Jw,Hw.Node=Xw,Tw.registerPostcss(Hw);var Kw=Hw;Hw.default=Hw;const $w=hm(Kw);$w.stringify,$w.fromJSON,$w.plugin,$w.parse,$w.list,$w.document,$w.comment,$w.atRule,$w.rule,$w.decl,$w.root,$w.CssSyntaxError,$w.Declaration,$w.Container,$w.Processor,$w.Document,$w.Comment,$w.Warning,$w.AtRule,$w.Result,$w.Input,$w.Rule,$w.Root,$w.Node;class qw{constructor(...e){cm(this,"parentElement",null),cm(this,"parentNode",null),cm(this,"ownerDocument"),cm(this,"firstChild",null),cm(this,"lastChild",null),cm(this,"previousSibling",null),cm(this,"nextSibling",null),cm(this,"ELEMENT_NODE",1),cm(this,"TEXT_NODE",3),cm(this,"nodeType"),cm(this,"nodeName"),cm(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof qw))return!1;if(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 new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const Qw={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},eb={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},tb={};function sb(e){if(tb[e])return tb[e];const t=globalThis[e],s=t.prototype,r=e in Qw?Qw[e]:void 0,n=Boolean(r&&r.every(e=>{var t,r;return Boolean(null==(r=null==(t=Object.getOwnPropertyDescriptor(s,e))?void 0:t.get)?void 0:r.toString().includes("[native code]"))})),i=e in eb?eb[e]:void 0,o=Boolean(i&&i.every(e=>{var t;return"function"==typeof s[e]&&(null==(t=s[e])?void 0:t.toString().includes("[native code]"))}));if(n&&o&&!globalThis.Zone)return tb[e]=t.prototype,t.prototype;try{const r=document.createElement("iframe");document.body.appendChild(r);const n=r.contentWindow;if(!n)return t.prototype;const i=n[e].prototype;return document.body.removeChild(r),i?tb[e]=i:s}catch{return s}}const rb={};function nb(e,t,s){var r;const n=`${e}.${String(s)}`;if(rb[n])return rb[n].call(t);const i=sb(e),o=null==(r=Object.getOwnPropertyDescriptor(i,s))?void 0:r.get;return o?(rb[n]=o,o.call(t)):t[s]}const ib={};function ob(e,t,s){const r=`${e}.${String(s)}`;if(ib[r])return ib[r].bind(t);const n=sb(e)[s];return"function"!=typeof n?t[s]:(ib[r]=n,n.bind(t))}const ab={childNodes:function(e){return nb("Node",e,"childNodes")},parentNode:function(e){return nb("Node",e,"parentNode")},parentElement:function(e){return nb("Node",e,"parentElement")},textContent:function(e){return nb("Node",e,"textContent")},contains:function(e,t){return ob("Node",e,"contains")(t)},getRootNode:function(e){return ob("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?nb("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?nb("Element",e,"shadowRoot"):null},querySelector:function(e,t){return nb("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return nb("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sb("MutationObserver").constructor}};const lb="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.";let cb={map:{},getId:()=>(console.error(lb),-1),getNode:()=>(console.error(lb),null),removeNodeFromMap(){console.error(lb)},has:()=>(console.error(lb),!1),reset(){console.error(lb)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cb=new Proxy(cb,{get:(e,t,s)=>("map"===t&&console.error(lb),Reflect.get(e,t,s))}));let hb=Date.now;function ub(e){if(!e)return null;return e.nodeType===e.ELEMENT_NODE?e:ab.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(hb=()=>(new Date).getTime());function pb(e){var t;let s=null;return"getRootNode"in e&&(null==(t=ab.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ab.host(ab.getRootNode(e))&&(s=ab.host(ab.getRootNode(e))),s}function db(e){let t,s=e;for(;t=pb(s);)s=t;return s}function fb(e){const t=e.ownerDocument;if(!t)return!1;const s=db(e);return ab.contains(t,s)}const mb=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){iu(this,"id",1),iu(this,"styleIDMap",new WeakMap),iu(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let s;return s=void 0===t?this.id++:t,this.styleIDMap.set(e,s),this.idStyleMap.set(s,e),s}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return cb},closestElementOfNode:ub,getBaseDimension:function e(t,s){var r,n;const i=null==(n=null==(r=t.ownerDocument)?void 0:r.defaultView)?void 0:n.frameElement;if(!i||i===s)return{x:0,y:0,relativeScale:1,absoluteScale:1};const o=i.getBoundingClientRect(),a=e(i,s),l=o.height/i.clientHeight;return{x:o.x*a.relativeScale+a.x,y:o.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,s){const r=t[s[0]];return 1===s.length?r:e(r.cssRules[s[1]].cssRules,s.slice(2))},getPositionsAndIndex:function(e){const t=[...e],s=t.pop();return{positions:t,index:s}},getRootShadowHost:db,getShadowHost:pb,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,s,r,n;const i=e.document;return{left:i.scrollingElement?i.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:i.documentElement.scrollLeft||(null==i?void 0:i.body)&&(null==(t=ab.parentElement(i.body))?void 0:t.scrollLeft)||(null==(s=null==i?void 0:i.body)?void 0:s.scrollLeft)||0,top:i.scrollingElement?i.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==i?void 0:i.documentElement.scrollTop)||(null==i?void 0:i.body)&&(null==(r=ab.parentElement(i.body))?void 0:r.scrollTop)||(null==(n=null==i?void 0:i.body)?void 0:n.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof qw&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(ab.shadowRoot(e)))},hookSetter:function e(t,s,r,n,i=window){const o=i.Object.getOwnPropertyDescriptor(t,s);return i.Object.defineProperty(t,s,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>e(t,s,o||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(ab.contains(t,e)||fb(e))},isAncestorRemoved:function e(t,s){if(function(e){const t=e&&"host"in e&&"mode"in e&&gu.host(e)||null;return Boolean(t&&"shadowRoot"in t&&gu.shadowRoot(t)===e)}(t))return!1;const r=s.getId(t);if(!s.has(r))return!0;const n=ab.parentNode(t);return(!n||n.nodeType!==t.DOCUMENT_NODE)&&(!n||e(n,s))},isBlocked:function(e,t,s,r){if(!e)return!1;const n=ub(e);if(!n)return!1;try{if("string"==typeof t){if(n.classList.contains(t))return!0;if(r&&null!==n.closest("."+t))return!0}else if(wu(n,t,r))return!0}catch(i){}if(s){if(n.matches(s))return!0;if(r&&null!==n.closest(s))return!0}return!1},isIgnored:function(e,t,s){return!("TITLE"!==e.tagName||!s.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,s){s(t.value);for(let r=t.children.length-1;r>=0;r--)e(t.children[r],s)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return hb},on:function(e,t,s=document){const r={capture:!0,passive:!0};return s.addEventListener(e,t,r),()=>s.removeEventListener(e,t,r)},patch:function(e,t,s){try{if(!(t in e))return()=>{};const r=e[t],n=s(r);return"function"==typeof n&&(n.prototype=n.prototype||{},Object.defineProperties(n,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=n,()=>{e[t]=r}}catch{return()=>{}}},polyfill: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)},queueToResolveTrees:function(e){const t={},s=(e,s)=>{const r={value:e,parent:s,children:[]};return t[e.node.id]=r,r},r=[];for(const n of e){const{nextId:e,parentId:i}=n;if(e&&e in t){const i=t[e];if(i.parent){const e=i.parent.children.indexOf(i);i.parent.children.splice(e,0,s(n,i.parent))}else{const e=r.indexOf(i);r.splice(e,0,s(n,null))}}else if(i in t){const e=t[i];e.children.push(s(n,e))}else r.push(s(n,null))}return r},shadowHostInDom:fb,throttle:function(e,t,s={}){let r=null,n=0;return function(...i){const o=Date.now();n||!1!==s.leading||(n=o);const a=t-(o-n),l=this;a<=0||a>t?(r&&(clearTimeout(r),r=null),n=o,e.apply(l,i)):r||!1===s.trailing||(r=setTimeout(()=>{n=!1===s.leading?0:Date.now(),r=null,e.apply(l,i)},a))}},uniqueTextMutations:function(e){const t=new Set,s=[];for(let r=e.length;r--;){const n=e[r];t.has(n.id)||(s.push(n),t.add(n.id))}return s}},Symbol.toStringTag,{value:"Module"}));for(var gb="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yb="undefined"==typeof Uint8Array?[]:new Uint8Array(256),wb=0;wb<64;wb++)yb[gb.charCodeAt(wb)]=wb;"undefined"!=typeof window&&window.Blob&&new Blob([(e=>Uint8Array.from(atob(e),e=>e.charCodeAt(0)))("KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJyYXkoMjU2KTsKICBmb3IgKHZhciBpID0gMDsgaSA8IGNoYXJzLmxlbmd0aDsgaSsrKSB7CiAgICBsb29rdXBbY2hhcnMuY2hhckNvZGVBdChpKV0gPSBpOwogIH0KICB2YXIgZW5jb2RlID0gZnVuY3Rpb24oYXJyYXlidWZmZXIpIHsKICAgIHZhciBieXRlcyA9IG5ldyBVaW50OEFycmF5KGFycmF5YnVmZmVyKSwgaTIsIGxlbiA9IGJ5dGVzLmxlbmd0aCwgYmFzZTY0ID0gIiI7CiAgICBmb3IgKGkyID0gMDsgaTIgPCBsZW47IGkyICs9IDMpIHsKICAgICAgYmFzZTY0ICs9IGNoYXJzW2J5dGVzW2kyXSA+PiAyXTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMl0gJiAzKSA8PCA0IHwgYnl0ZXNbaTIgKyAxXSA+PiA0XTsKICAgICAgYmFzZTY0ICs9IGNoYXJzWyhieXRlc1tpMiArIDFdICYgMTUpIDw8IDIgfCBieXRlc1tpMiArIDJdID4+IDZdOwogICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaTIgKyAyXSAmIDYzXTsKICAgIH0KICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgIj0iOwogICAgfSBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgIj09IjsKICAgIH0KICAgIHJldHVybiBiYXNlNjQ7CiAgfTsKICBjb25zdCBsYXN0QmxvYk1hcCA9IC8qIEBfX1BVUkVfXyAqLyBuZXcgTWFwKCk7CiAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gLyogQF9fUFVSRV9fICovIG5ldyBNYXAoKTsKICBhc3luYyBmdW5jdGlvbiBnZXRUcmFuc3BhcmVudEJsb2JGb3Iod2lkdGgsIGhlaWdodCwgZGF0YVVSTE9wdGlvbnMpIHsKICAgIGNvbnN0IGlkID0gYCR7d2lkdGh9LSR7aGVpZ2h0fWA7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBpZiAodHJhbnNwYXJlbnRCbG9iTWFwLmhhcyhpZCkpIHJldHVybiB0cmFuc3BhcmVudEJsb2JNYXAuZ2V0KGlkKTsKICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsKICAgICAgb2Zmc2NyZWVuLmdldENvbnRleHQoIjJkIik7CiAgICAgIGNvbnN0IGJsb2IgPSBhd2FpdCBvZmZzY3JlZW4uY29udmVydFRvQmxvYihkYXRhVVJMT3B0aW9ucyk7CiAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0gYXdhaXQgYmxvYi5hcnJheUJ1ZmZlcigpOwogICAgICBjb25zdCBiYXNlNjQgPSBlbmNvZGUoYXJyYXlCdWZmZXIpOwogICAgICB0cmFuc3BhcmVudEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICByZXR1cm4gYmFzZTY0OwogICAgfSBlbHNlIHsKICAgICAgcmV0dXJuICIiOwogICAgfQogIH0KICBjb25zdCB3b3JrZXIgPSBzZWxmOwogIHdvcmtlci5vbm1lc3NhZ2UgPSBhc3luYyBmdW5jdGlvbihlKSB7CiAgICBpZiAoIk9mZnNjcmVlbkNhbnZhcyIgaW4gZ2xvYmFsVGhpcykgewogICAgICBjb25zdCB7IGlkLCBiaXRtYXAsIHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zIH0gPSBlLmRhdGE7CiAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKAogICAgICAgIHdpZHRoLAogICAgICAgIGhlaWdodCwKICAgICAgICBkYXRhVVJMT3B0aW9ucwogICAgICApOwogICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOwogICAgICBjb25zdCBjdHggPSBvZmZzY3JlZW4uZ2V0Q29udGV4dCgiMmQiKTsKICAgICAgY3R4LmRyYXdJbWFnZShiaXRtYXAsIDAsIDApOwogICAgICBiaXRtYXAuY2xvc2UoKTsKICAgICAgY29uc3QgYmxvYiA9IGF3YWl0IG9mZnNjcmVlbi5jb252ZXJ0VG9CbG9iKGRhdGFVUkxPcHRpb25zKTsKICAgICAgY29uc3QgdHlwZSA9IGJsb2IudHlwZTsKICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSBhd2FpdCBibG9iLmFycmF5QnVmZmVyKCk7CiAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7CiAgICAgIGlmICghbGFzdEJsb2JNYXAuaGFzKGlkKSAmJiBhd2FpdCB0cmFuc3BhcmVudEJhc2U2NCA9PT0gYmFzZTY0KSB7CiAgICAgICAgbGFzdEJsb2JNYXAuc2V0KGlkLCBiYXNlNjQpOwogICAgICAgIHJldHVybiB3b3JrZXIucG9zdE1lc3NhZ2UoeyBpZCB9KTsKICAgICAgfQogICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KSByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7CiAgICAgIHdvcmtlci5wb3N0TWVzc2FnZSh7CiAgICAgICAgaWQsCiAgICAgICAgdHlwZSwKICAgICAgICBiYXNlNjQsCiAgICAgICAgd2lkdGgsCiAgICAgICAgaGVpZ2h0CiAgICAgIH0pOwogICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7CiAgICB9IGVsc2UgewogICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=")],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(qh=e.contentWindow)?void 0:qh.Array.from)||Array.from,document.body.removeChild(e)}}catch(Kb){console.debug("Unable to override Array.from",Kb)}var bb;new yu,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(bb||(bb={}));class vb{constructor(e){ru(this,"fileName"),ru(this,"functionName"),ru(this,"lineNumber"),ru(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const Cb=/(^|@)\S+:\d+/,Sb=/^\s*at .*(\S+:\d+|\(native\))/m,kb=/^(eval@)?(\[native code])?$/,Ib={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Sb)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Sb)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const s=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=s?t.replace(s[0],""):t;const r=t.split(/\s+/).slice(1),n=this.extractLocation(s?s[1]:r.pop()),i=r.join(" ")||void 0,o=["eval","<anonymous>"].indexOf(n[0])>-1?void 0:n[0];return new vb({functionName:i,fileName:o,lineNumber:n[1],columnNumber:n[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(kb)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new vb({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,s=e.match(t),r=s&&s[1]?s[1]:void 0,n=this.extractLocation(e.replace(t,""));return new vb({functionName:r,fileName:n[0],lineNumber:n[1],columnNumber:n[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,s=e.message.split("\n"),r=[];for(let n=2,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new vb({fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,s=e.stacktrace.split("\n"),r=[];for(let n=0,i=s.length;n<i;n+=2){const e=t.exec(s[n]);e&&r.push(new vb({functionName:e[3]||void 0,fileName:e[2],lineNumber:parseFloat(e[1])}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Cb)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),s=this.extractLocation(t.pop()),r=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new vb({functionName:r,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})},this)}};function xb(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let s=e.localName;if(!s)break;s=s.toLowerCase();const r=e.parentElement,n=[];if(r.children&&r.children.length>0)for(let e=0;e<r.children.length;e++){const t=r.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===s&&n.push(t)}n.length>1&&(s+=`:eq(${n.indexOf(e)})`),t=s+(t?">"+t:""),e=r}return t}function Ob(e){return"[object Object]"===Object.prototype.toString.call(e)}function Ab(e,t){if(0===t)return!0;const s=Object.keys(e);for(const r of s)if(Ob(e[r])&&Ab(e[r],t-1))return!0;return!1}function Eb(e,t){const s={numOfKeysLimit:50,depthOfLimit:4};Object.assign(s,t);const r=[],n=[];return JSON.stringify(e,function(e,t){if(r.length>0){const s=r.indexOf(this);~s?r.splice(s+1):r.push(this),~s?n.splice(s,1/0,e):n.push(e),~r.indexOf(t)&&(t=r[0]===t?"[Circular ~]":"[Circular ~."+n.slice(0,r.indexOf(t)).join(".")+"]")}else r.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Ob(e)&&Object.keys(e).length>s.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Ob(e)&&Ab(e,s.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();s.stringLengthLimit&&t.length>s.stringLengthLimit&&(t=`${t.slice(0,s.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const s in t){const r=t[s];Array.isArray(r)?e[s]=xb(r.length?r[0]:null):e[s]=r}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Rb={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Mb(e,t,s){const r=s?Object.assign({},Rb,s):Rb,n=r.logger;if(!n)return()=>{};let i;i="string"==typeof n?t[n]:n;let o=0,a=!1;const l=[];if(r.level.includes("error")){const s=t=>{const s=t.message,n=t.error,i=Ib.parse(n).map(e=>e.toString()),o=[Eb(s,r.stringifyOptions)];e({level:"error",trace:i,payload:o})};t.addEventListener("error",s),l.push(()=>{t.removeEventListener("error",s)});const n=t=>{let s,n;t.reason instanceof Error?(s=t.reason,n=[Eb(`Uncaught (in promise) ${s.name}: ${s.message}`,r.stringifyOptions)]):(s=new Error,n=[Eb("Uncaught (in promise)",r.stringifyOptions),Eb(t.reason,r.stringifyOptions)]);const i=Ib.parse(s).map(e=>e.toString());e({level:"error",trace:i,payload:n})};t.addEventListener("unhandledrejection",n),l.push(()=>{t.removeEventListener("unhandledrejection",n)})}for(const h of r.level)l.push(c(i,h));return()=>{l.forEach(e=>e())};function c(t,s){return t[s]?mb.patch(t,s,t=>(...n)=>{if(t.apply(this,n),!("assert"===s&&n[0]||a)){a=!0;try{const t=Ib.parse(new Error).map(e=>e.toString()).splice(1),i=("assert"===s?n.slice(1):n).map(e=>Eb(e,r.stringifyOptions));o++,o<r.lengthThreshold?e({level:s,trace:t,payload:i}):o===r.lengthThreshold&&e({level:"warn",trace:[],payload:[Eb("The number of log records reached the threshold.")]})}catch(i){t("rrweb logger error:",i,...n)}finally{a=!1}}}):()=>{}}}const Nb={recordOptions:{blockClass:"bf-nocapture",blockSelector:void 0,ignoreClass:"bf-ignore-input",ignoreCSSAttributes:void 0,maskTextClass:"bf-mask",maskTextSelector:void 0,maskAllInputs:!0,maskInputOptions:{password:!0},maskInputFn:void 0,maskTextFn:void 0},recordConsolePlugin:{level:["error"],lengthThreshold:Number.POSITIVE_INFINITY,stringifyOptions:{stringLengthLimit:Number.POSITIVE_INFINITY,numOfKeysLimit:Number.POSITIVE_INFINITY,depthOfLimit:Number.POSITIVE_INFINITY}},samplingOptions:{scroll:150,media:1e3,canvas:8,input:"last"}};class _b{constructor(e){var t;__publicField(this,"options"),__publicField(this,"stop"),this.options={...Nb.recordOptions,emit:e,plugins:[(t=Nb.recordConsolePlugin,{name:"rrweb/console@1",observer:Mb,options:t})],sampling:Nb.samplingOptions},this.stop=null}static mockImplementation(e){throw new Error("Method not implemented.")}start(){this.stop=Yh(this.options)??null}getMirror(){return Yh.mirror}takeFullSnapshot(){return Yh.takeFullSnapshot()}}class Tb{constructor(e){__publicField(this,"recordingManager"),__publicField(this,"isRunning"),__publicField(this,"events"),this.recordingManager=e,this.isRunning=!1,this.events=[]}start(){this.isRunning=!0}handle(e){this.isInitializingEvent(e)?this.events.push(e):this.stop(e)}isInitializingEvent(e){return[2,4].includes(e.type)||this.isSelectionEvent(e)||this.isConsoleEvent(e)}isSelectionEvent(e){return 3===e.type&&14===e.data.source}isConsoleEvent(e){return 6===e.type}stop(e){this.stamp(this.events,e.timestamp-1),this.publish(...this.events,e),this.events=[],this.isRunning=!1}stamp(e,t){e.forEach(e=>e.timestamp=t)}publish(...e){e.forEach(e=>{this.recordingManager.publishEvent(e)})}}function Pb(e,t){void 0===t&&(t={});for(var s=function(e){for(var t=[],s=0;s<e.length;){var r=e[s];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)t.push({type:"CHAR",index:s,value:e[s++]});else{var n=1,i="";if("?"===e[a=s+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<e.length;)if("\\"!==e[a]){if(")"===e[a]){if(0===--n){a++;break}}else if("("===e[a]&&(n++,"?"!==e[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));i+=e[a++]}else i+=e[a++]+e[a++];if(n)throw new TypeError("Unbalanced pattern at ".concat(s));if(!i)throw new TypeError("Missing pattern at ".concat(s));t.push({type:"PATTERN",index:s,value:i}),s=a}else{for(var o="",a=s+1;a<e.length;){var l=e.charCodeAt(a);if(!(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||95===l))break;o+=e[a++]}if(!o)throw new TypeError("Missing parameter name at ".concat(s));t.push({type:"NAME",index:s,value:o}),s=a}else t.push({type:"CLOSE",index:s,value:e[s++]});else t.push({type:"OPEN",index:s,value:e[s++]});else t.push({type:"ESCAPED_CHAR",index:s++,value:e[s++]});else t.push({type:"MODIFIER",index:s,value:e[s++]})}return t.push({type:"END",index:s,value:""}),t}(e),r=t.prefixes,n=void 0===r?"./":r,i=t.delimiter,o=void 0===i?"/#?":i,a=[],l=0,c=0,h="",u=function(e){if(c<s.length&&s[c].type===e)return s[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var r=s[c],n=r.type,i=r.index;throw new TypeError("Unexpected ".concat(n," at ").concat(i,", expected ").concat(e))},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t},f=function(e){var t=a[a.length-1],s=e||(t&&"string"==typeof t?t:"");if(t&&!s)throw new TypeError('Must have text between two parameters, missing text after "'.concat(t.name,'"'));return!s||function(e){for(var t=0,s=o;t<s.length;t++){var r=s[t];if(e.indexOf(r)>-1)return!0}return!1}(s)?"[^".concat(Fb(o),"]+?"):"(?:(?!".concat(Fb(s),")[^").concat(Fb(o),"])+?")};c<s.length;){var m=u("CHAR"),g=u("NAME"),y=u("PATTERN");if(g||y){var w=m||"";-1===n.indexOf(w)&&(h+=w,w=""),h&&(a.push(h),h=""),a.push({name:g||l++,prefix:w,suffix:"",pattern:y||f(w),modifier:u("MODIFIER")||""})}else{var b=m||u("ESCAPED_CHAR");if(b)h+=b;else if(h&&(a.push(h),h=""),u("OPEN")){w=d();var v=u("NAME")||"",C=u("PATTERN")||"",S=d();p("CLOSE"),a.push({name:v||(C?l++:""),pattern:v&&!C?f(w):C,prefix:w,suffix:S,modifier:u("MODIFIER")||""})}else p("END")}}return a}function Lb(e,t){var s=[];return function(e,t,s){void 0===s&&(s={});var r=s.decode,n=void 0===r?function(e){return e}:r;return function(s){var r=e.exec(s);if(!r)return!1;for(var i=r[0],o=r.index,a=Object.create(null),l=function(e){if(void 0===r[e])return"continue";var s=t[e-1];"*"===s.modifier||"+"===s.modifier?a[s.name]=r[e].split(s.prefix+s.suffix).map(function(e){return n(e,s)}):a[s.name]=n(r[e],s)},c=1;c<r.length;c++)l(c);return{path:i,index:o,params:a}}}(Ub(e,s,t),s,t)}function Fb(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Db(e){return e&&e.sensitive?"":"i"}function Bb(e,t,s){return function(e,t,s){void 0===s&&(s={});for(var r=s.strict,n=void 0!==r&&r,i=s.start,o=void 0===i||i,a=s.end,l=void 0===a||a,c=s.encode,h=void 0===c?function(e){return e}:c,u=s.delimiter,p=void 0===u?"/#?":u,d=s.endsWith,f="[".concat(Fb(void 0===d?"":d),"]|$"),m="[".concat(Fb(p),"]"),g=o?"^":"",y=0,w=e;y<w.length;y++){var b=w[y];if("string"==typeof b)g+=Fb(h(b));else{var v=Fb(h(b.prefix)),C=Fb(h(b.suffix));if(b.pattern)if(t&&t.push(b),v||C)if("+"===b.modifier||"*"===b.modifier){var S="*"===b.modifier?"?":"";g+="(?:".concat(v,"((?:").concat(b.pattern,")(?:").concat(C).concat(v,"(?:").concat(b.pattern,"))*)").concat(C,")").concat(S)}else g+="(?:".concat(v,"(").concat(b.pattern,")").concat(C,")").concat(b.modifier);else{if("+"===b.modifier||"*"===b.modifier)throw new TypeError('Can not repeat "'.concat(b.name,'" without a prefix and suffix'));g+="(".concat(b.pattern,")").concat(b.modifier)}else g+="(?:".concat(v).concat(C,")").concat(b.modifier)}}if(l)n||(g+="".concat(m,"?")),g+=s.endsWith?"(?=".concat(f,")"):"$";else{var k=e[e.length-1],I="string"==typeof k?m.indexOf(k[k.length-1])>-1:void 0===k;n||(g+="(?:".concat(m,"(?=").concat(f,"))?")),I||(g+="(?=".concat(m,"|").concat(f,")"))}return new RegExp(g,Db(s))}(Pb(e,s),t,s)}function Ub(e,t,s){return e instanceof RegExp?function(e,t){if(!t)return e;for(var s=/\((?:\?<(.*?)>)?(?!\?)/g,r=0,n=s.exec(e.source);n;)t.push({name:n[1]||r++,prefix:"",suffix:"",modifier:"",pattern:""}),n=s.exec(e.source);return e}(e,t):Array.isArray(e)?function(e,t,s){var r=e.map(function(e){return Ub(e,t,s).source});return new RegExp("(?:".concat(r.join("|"),")"),Db(s))}(e,t,s):Bb(e,t,s)}function jb(e,t){if(function(){if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e}()&&!t)return!1;const s=window.location.pathname;for(const n of e)try{if(Lb(n,{decode:decodeURIComponent})(s))return!1}catch(r){if(n===s)return!1}return!0}const zb=[eu.MouseMove,eu.MouseInteraction,eu.Scroll,eu.ViewportResize,eu.Input,eu.TouchMove,eu.MediaInteraction,eu.Drag];class Vb{constructor(e){__publicField(this,"agent"),__publicField(this,"recorder"),__publicField(this,"stasher"),this.agent=e,this.recorder=new _b(this.handleEvent.bind(this)),this.stasher=new Tb(this)}start(){this.recorder.start()}handleEvent(e){const t=new URL(window.location.href),s=t.origin+t.pathname;if(jb(this.agent.recordingBlocklist,this.agent._allowLocalhostRecording)){if(this.agent.sessionManager.isIdle){if(!this.isInteractiveEvent(e))return;this.agent.handleActivityDuringIdle()}if(this.isClick(e)){let t=Yh.mirror.getNode(e.data.id);t&&this.nodeIsInteresting(t)&&(e.conversionData={},e.conversionData.eventType="click",e.conversionData.textContent=t.textContent,e.conversionData.htmlElement=t.nodeName?.toLowerCase(),e.conversionData.location=s)}this.isCustom(e)&&(e.conversionData={},e.conversionData.eventType="custom",e.conversionData.customEventType=e.data.tag,e.conversionData.location=s),this.stasher.isRunning?this.stasher.handle(e):this.publishEvent(e)}}publishEvent(e){this.agent.sender.handle(e),this.agent.timer&&this.agent.timer.restart()}startRecorderWithStasher(){this.stasher.start(),this.recorder=new _b(this.handleEvent.bind(this)),this.recorder.start()}isClick(e){return e.type===Qh.IncrementalSnapshot&&e.data.source===eu.MouseInteraction&&e.data.type===tu.Click}nodeIsInteresting(e){return"BUTTON"===e.nodeName||"ANCHOR"===e.nodeName}isCustom(e){return e.type===Qh.Custom}isInteractiveEvent(e){return e.type===Qh.IncrementalSnapshot&&zb.includes(e.data?.source)}}class Wb{constructor(e,t){__publicField(this,"agent"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timeoutId"),this.agent=e,this.MAX_IDLE_TIME=t,this.timeoutId=0}restart(){this.stop(),this.start()}stop(){clearTimeout(this.timeoutId)}start(){this.timeoutId=window.setTimeout(this.agent.handleTimeout.bind(this.agent),this.MAX_IDLE_TIME)}}const Yb=class e{constructor(){__publicField(this,"sessionId",null),__publicField(this,"lastScreenViewEventTime",0),__publicField(this,"isIdle",!1)}static getInstance(){return e.instance||(e.instance=new e),e.instance}determineSessionState(e){return!this.sessionId&&e?"new":this.sessionId&&e&&this.sessionId!==e?"changed":this.sessionId===e&&null!==this.sessionId?"active":"expired"}handleSessionTransition(e,t){switch(e){case"new":case"changed":this.updateIdleStatus(!1),t.takeFullSnapshot?.()}}updateSession(e,t={}){const s=this.determineSessionState(e);this.handleSessionTransition(s,t),this.sessionId=e}updateLastScreenViewEventTime(){this.lastScreenViewEventTime=Date.now()}updateIdleStatus(e){this.isIdle=e}getLastScreenViewEventTime(){return this.lastScreenViewEventTime}getCurrentSessionId(){return this.sessionId}};__publicField(Yb,"instance");let Gb=Yb;const Zb=class e{constructor(){__publicField(this,"recordingManager"),__publicField(this,"sender"),__publicField(this,"MAX_IDLE_TIME"),__publicField(this,"timer"),__publicField(this,"sendEvents"),__publicField(this,"sendScreenViewEvent"),__publicField(this,"recordingBlocklist",[]),__publicField(this,"_allowLocalhostRecording"),__publicField(this,"sessionCreationPromise",null),this.recordingManager=new Vb(this),this.sender=new $h(this)}get sessionManager(){return e._sessionManager}async start({sendEvents:e,sendScreenViewEvent:t,recordingBlocklist:s,_allowLocalhostRecording:r}){this.sendEvents=e,this.sendScreenViewEvent=t,this.recordingBlocklist=s,this._allowLocalhostRecording=r,this.MAX_IDLE_TIME=6e4,this.timer=new Wb(this,this.MAX_IDLE_TIME),this.sender.start(),this.recordingManager.start()}handleTimeout(){this.recordingManager.recorder.stop&&this.recordingManager.recorder.stop(),this.sender.send(),this.recordingManager.startRecorderWithStasher(),e._sessionManager.updateIdleStatus(!0)}handleActivityDuringIdle(){null===e._sessionManager.getCurrentSessionId()&&(e._sessionManager.getLastScreenViewEventTime()>Date.now()-5e3||this.sessionCreationPromise||(this.sessionCreationPromise=this.createSession().finally(()=>{this.sessionCreationPromise=null})))}takeFullSnapshot(){return this.recordingManager.recorder.takeFullSnapshot()}static handleCustomEvent(e){Yh.addCustomEvent(e,null)}async createSession(){if(this.sendScreenViewEvent)try{this.sendScreenViewEvent({__path:window.location.href,__title:document.title,__is_session_refresh:!0})}catch(e){console.error("Failed to send screen_view event:",e)}}};__publicField(Zb,"_sessionManager",Gb.getInstance());let Jb=Zb;function Xb(e){return e.replace(/([-_][a-z])/gi,e=>e.toUpperCase().replace("-","").replace("_",""))}class Hb extends _e{constructor(e){if(super({sdk:"web",sdkVersion:"0.0.26",...e}),__publicField(this,"lastPath",""),__publicField(this,"debounceTimer",null),__publicField(this,"agent"),__publicField(this,"sessionManager",Gb.getInstance()),__publicField(this,"recordingBlocklist",[]),__publicField(this,"isRecordingActive",!1),this.options=e,this.agent=new Jb,this.recordingBlocklist=e.recordingBlocklist||[],!this.isServer()){this.setGlobalProperties({__referrer:document.referrer});const e=this.isTrackingDisabled();this.options.trackOutgoingLinks&&!e&&this.trackOutgoingLinks(),this.options.trackScreenViews&&this.trackScreenViews(),this.options.trackAttributes&&!e&&this.trackAttributes(),this.options.enableRecording&&!e&&(this.startRecording(),this.isRecordingActive=!0,console.log("Brainfish has started ambient learning"))}}debounce(e,t){this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(e,t)}isServer(){return"undefined"==typeof document}trackOutgoingLinks(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("a");if(s&&t){const e=s.getAttribute("href");e?.startsWith("http")&&super.track("link_out",{href:e,text:s.innerText||s.getAttribute("title")||t.getAttribute("alt")||t.getAttribute("title")})}})}trackScreenViews(){if(this.isServer())return;this.screenView();const e=history.pushState;history.pushState=function(...t){const s=e.apply(this,t);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),s};const t=history.replaceState;history.replaceState=function(...e){const s=t.apply(this,e);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),s},window.addEventListener("popstate",function(){window.dispatchEvent(new Event("locationchange"))});const s=()=>this.debounce(()=>this.screenView(),100);this.options.trackHashChanges?window.addEventListener("hashchange",s):window.addEventListener("locationchange",s)}trackAttributes(){this.isServer()||document.addEventListener("click",e=>{const t=e.target,s=t.closest("button"),r=t.closest("a"),n=s?.getAttribute("data-track")?s:r?.getAttribute("data-track")?r:null;if(n){const e={};for(const s of n.attributes)s.name.startsWith("data-")&&"data-track"!==s.name&&(e[Xb(s.name.replace(/^data-/,""))]=s.value);const t=n.getAttribute("data-track");t&&super.track(t,e)}})}startRecording(){this.isServer()||this.agent.start({sendEvents:this.recordEventsToServer.bind(this),sendScreenViewEvent:this.sendScreenViewEvent.bind(this),recordingBlocklist:this.recordingBlocklist,_allowLocalhostRecording:this.options._allowLocalhostRecording})}async screenView(e,t){if(this.isServer())return;let s,r;if("string"==typeof e?(s=e,r=t):(s=window.location.href,r=e),this.lastPath===s)return;this.lastPath=s;const n={...r??{},__path:s,__title:document.title};this.sendScreenViewEvent(n)}async recordEventsToServer(e){const t=await this.record(e);this.sessionManager.updateSession(t,{takeFullSnapshot:()=>{this.agent.takeFullSnapshot()}})}sendScreenViewEvent(e){super.track("screen_view",e),this.sessionManager.updateLastScreenViewEventTime()}disableTracking(){super.disableTracking(),this.isRecordingActive&&(this.agent.recordingManager.recorder.stop&&this.agent.recordingManager.recorder.stop(),this.isRecordingActive=!1,console.log("Brainfish has stopped ambient learning"))}enableTracking(){super.enableTracking()}}(e=>{if(e.BrainfishAnalytics&&"q"in e.BrainfishAnalytics){const t=e.BrainfishAnalytics.q||[],s=t.findIndex(e=>"init"===e[0]);if(-1===s)return void console.warn("BrainfishAnalytics has not been initialized.");const[r]=t.splice(s,1),n=new Hb(r[1]);t.forEach(e=>{e[0]in n&&n[e[0]](...e.slice(1))}),e.BrainfishAnalytics=(e,...t)=>{const s=n[e]?n[e].bind(n):void 0;if("function"==typeof s)return s(...t);console.warn(`Method ${e} does not exist on BrainfishAnalytics`)}}})(window)}();
|
|
2
2
|
//# sourceMappingURL=tracker.js.map
|