@sailfish-ai/recorder 1.6.1 → 1.6.2
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/recording.js +36 -10
- package/dist/sailfish-recorder.cjs.js +1 -1
- package/dist/sailfish-recorder.cjs.js.br +0 -0
- package/dist/sailfish-recorder.cjs.js.gz +0 -0
- package/dist/sailfish-recorder.es.js +1 -1
- package/dist/sailfish-recorder.es.js.br +0 -0
- package/dist/sailfish-recorder.es.js.gz +0 -0
- package/dist/sailfish-recorder.umd.js +1 -1
- package/dist/sailfish-recorder.umd.js.br +0 -0
- package/dist/sailfish-recorder.umd.js.gz +0 -0
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
for(var e,i=[],a=0;a<256;++a)i.push((a+256).toString(16).slice(1));var u=new Uint8Array(16);function rng(){if(!e&&!(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(u)}var b={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(e,a,u){if(b.randomUUID&&!e)return b.randomUUID();var w=(e=e||{}).random||(e.rng||rng)();return w[6]=15&w[6]|64,w[8]=63&w[8]|128,function unsafeStringify(e,a=0){return(i[e[a+0]]+i[e[a+1]]+i[e[a+2]]+i[e[a+3]]+"-"+i[e[a+4]]+i[e[a+5]]+"-"+i[e[a+6]]+i[e[a+7]]+"-"+i[e[a+8]]+i[e[a+9]]+"-"+i[e[a+10]]+i[e[a+11]]+i[e[a+12]]+i[e[a+13]]+i[e[a+14]]+i[e[a+15]]).toLowerCase()}(w)}var extendStatics=function(e,i){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])})(e,i)};function __extends(e,i){function __(){this.constructor=e}extendStatics(e,i),e.prototype=null===i?Object.create(i):(__.prototype=i.prototype,new __)}function __read(e,i){var a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;var u,b,w=a.call(e),S=[];try{for(;(void 0===i||i-- >0)&&!(u=w.next()).done;)S.push(u.value)}catch(e){b={error:e}}finally{try{u&&!u.done&&(a=w.return)&&a.call(w)}finally{if(b)throw b.error}}return S}var w=function(){return function Event2(e,i){this.target=i,this.type=e}}(),S=function(e){function ErrorEvent2(i,a){var u=e.call(this,"error",a)||this;return u.message=i.message,u.error=i,u}return __extends(ErrorEvent2,e),ErrorEvent2}(w),v=function(e){function CloseEvent2(i,a,u){void 0===i&&(i=1e3),void 0===a&&(a="");var b=e.call(this,"close",u)||this;return b.wasClean=!0,b.code=i,b.reason=a,b}return __extends(CloseEvent2,e),CloseEvent2}(w),k={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},C=function(){function ReconnectingWebSocket2(e,i,a){var u=this;void 0===a&&(a={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){u._debug("open event");var i=u._options.minUptime,a=void 0===i?k.minUptime:i;clearTimeout(u._connectTimeout),u._uptimeTimeout=setTimeout((function(){return u._acceptOpen()}),a),u._ws.binaryType=u._binaryType,u._messageQueue.forEach((function(e){return u._ws.send(e)})),u._messageQueue=[],u.onopen&&u.onopen(e),u._listeners.open.forEach((function(i){return u._callEventListener(e,i)}))},this._handleMessage=function(e){u._debug("message event"),u.onmessage&&u.onmessage(e),u._listeners.message.forEach((function(i){return u._callEventListener(e,i)}))},this._handleError=function(e){u._debug("error event",e.message),u._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),u.onerror&&u.onerror(e),u._debug("exec error listeners"),u._listeners.error.forEach((function(i){return u._callEventListener(e,i)})),u._connect()},this._handleClose=function(e){u._debug("close event"),u._clearTimeouts(),u._shouldReconnect&&u._connect(),u.onclose&&u.onclose(e),u._listeners.close.forEach((function(i){return u._callEventListener(e,i)}))},this._url=e,this._protocols=i,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(ReconnectingWebSocket2,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"CONNECTING",{get:function(){return ReconnectingWebSocket2.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"OPEN",{get:function(){return ReconnectingWebSocket2.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"CLOSING",{get:function(){return ReconnectingWebSocket2.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"CLOSED",{get:function(){return ReconnectingWebSocket2.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce((function(e,i){return"string"==typeof i?e+=i.length:i instanceof Blob?e+=i.size:e+=i.byteLength,e}),0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?ReconnectingWebSocket2.CLOSED:ReconnectingWebSocket2.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),ReconnectingWebSocket2.prototype.close=function(e,i){void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws?this._ws.readyState!==this.CLOSED?this._ws.close(e,i):this._debug("close: already closed"):this._debug("close enqueued: no ws instance")},ReconnectingWebSocket2.prototype.reconnect=function(e,i){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED?(this._disconnect(e,i),this._connect()):this._connect()},ReconnectingWebSocket2.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var i=this._options.maxEnqueuedMessages,a=void 0===i?k.maxEnqueuedMessages:i;this._messageQueue.length<a&&(this._debug("enqueue",e),this._messageQueue.push(e))}},ReconnectingWebSocket2.prototype.addEventListener=function(e,i){this._listeners[e]&&this._listeners[e].push(i)},ReconnectingWebSocket2.prototype.dispatchEvent=function(e){var i,a,u=this._listeners[e.type];if(u)try{for(var b=function __values(e){var i="function"==typeof Symbol&&e[Symbol.iterator],a=0;return i?i.call(e):{next:function(){return e&&a>=e.length&&(e=void 0),{value:e&&e[a++],done:!e}}}}(u),w=b.next();!w.done;w=b.next()){var S=w.value;this._callEventListener(e,S)}}catch(e){i={error:e}}finally{try{w&&!w.done&&(a=b.return)&&a.call(b)}finally{if(i)throw i.error}}return!0},ReconnectingWebSocket2.prototype.removeEventListener=function(e,i){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==i})))},ReconnectingWebSocket2.prototype._debug=function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];this._options.debug&&console.log.apply(console,function __spread(){for(var e=[],i=0;i<arguments.length;i++)e=e.concat(__read(arguments[i]));return e}(["RWS>"],e))},ReconnectingWebSocket2.prototype._getNextDelay=function(){var e=this._options,i=e.reconnectionDelayGrowFactor,a=void 0===i?k.reconnectionDelayGrowFactor:i,u=e.minReconnectionDelay,b=void 0===u?k.minReconnectionDelay:u,w=e.maxReconnectionDelay,S=void 0===w?k.maxReconnectionDelay:w,v=0;return this._retryCount>0&&(v=b*Math.pow(a,this._retryCount-1))>S&&(v=S),this._debug("next delay",v),v},ReconnectingWebSocket2.prototype._wait=function(){var e=this;return new Promise((function(i){setTimeout(i,e._getNextDelay())}))},ReconnectingWebSocket2.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var i=e();if("string"==typeof i)return Promise.resolve(i);if(i.then)return i}throw Error("Invalid URL")},ReconnectingWebSocket2.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var i=this._options,a=i.maxRetries,u=void 0===a?k.maxRetries:a,b=i.connectionTimeout,w=void 0===b?k.connectionTimeout:b,S=i.WebSocket,v=void 0===S?function(){if("undefined"!=typeof WebSocket)return WebSocket}():S;if(this._retryCount>=u)this._debug("max retries reached",this._retryCount,">=",u);else{if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),void 0===(C=v)||!C||2!==C.CLOSING)throw Error("No valid WebSocket class provided");var C;this._wait().then((function(){return e._getNextUrl(e._url)})).then((function(i){e._closeCalled||(e._debug("connect",{url:i,protocols:e._protocols}),e._ws=e._protocols?new v(i,e._protocols):new v(i),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout((function(){return e._handleTimeout()}),w))}))}}},ReconnectingWebSocket2.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new S(Error("TIMEOUT"),this))},ReconnectingWebSocket2.prototype._disconnect=function(e,i){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,i),this._handleClose(new v(e,i,this))}catch(e){}}},ReconnectingWebSocket2.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},ReconnectingWebSocket2.prototype._callEventListener=function(e,i){"handleEvent"in i?i.handleEvent(e):i(e)},ReconnectingWebSocket2.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},ReconnectingWebSocket2.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},ReconnectingWebSocket2.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},ReconnectingWebSocket2}();let I=null;const x=[];function initializeWebSocket(e,i,a){const u=function getWebSocketHost(e){const i=document.createElement("a");return i.href=e,`${i.hostname}${i.port?`:${i.port}`:""}`}(e),b=new URL(e).protocol;return I=new C(`${"https:"===b?"wss":"ws"}://${u}/ws/notify/?apiKey=${i}&sessionId=${a}&sender=JS%2FTS&version=1.6.1`,[],{connectionTimeout:3e4}),I.addEventListener("open",(()=>{!function flushMessageQueue(){if(I&&I.readyState===WebSocket.OPEN)for(;x.length>0;){const e=x.shift();e&&I.send(e)}}()})),I.addEventListener("close",(()=>{I=null})),I}function sendMessage(e){const i=JSON.stringify(e);I&&I.readyState===WebSocket.OPEN?I.send(i):x.push(i)}const O=new Error("request for lock canceled");var __awaiter$2=function(e,i,a,u){return new(a||(a=Promise))((function(b,w){function fulfilled(e){try{step(u.next(e))}catch(e){w(e)}}function rejected(e){try{step(u.throw(e))}catch(e){w(e)}}function step(e){e.done?b(e.value):function adopt(e){return e instanceof a?e:new a((function(i){i(e)}))}(e.value).then(fulfilled,rejected)}step((u=u.apply(e,i||[])).next())}))};class Semaphore{constructor(e,i=O){this._value=e,this._cancelError=i,this._queue=[],this._weightedWaiters=[]}acquire(e=1,i=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(((a,u)=>{const b={resolve:a,reject:u,weight:e,priority:i},w=findIndexFromEnd(this._queue,(e=>i<=e.priority));-1===w&&e<=this._value?this._dispatchItem(b):this._queue.splice(w+1,0,b)}))}runExclusive(e){return __awaiter$2(this,arguments,void 0,(function*(e,i=1,a=0){const[u,b]=yield this.acquire(i,a);try{return yield e(u)}finally{b()}}))}waitForUnlock(e=1,i=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,i)?Promise.resolve():new Promise((a=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function insertSorted(e,i){const a=findIndexFromEnd(e,(e=>i.priority<=e.priority));e.splice(a+1,0,i)}(this._weightedWaiters[e-1],{resolve:a,priority:i})}))}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach((e=>e.reject(this._cancelError))),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const i=this._value;this._value-=e.weight,e.resolve([i,this._newReleaser(e.weight)])}_newReleaser(e){let i=!1;return()=>{i||(i=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const i=this._weightedWaiters[e-1];i&&(i.forEach((e=>e.resolve())),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let i=this._value;i>0;i--){const a=this._weightedWaiters[i-1];if(!a)continue;const u=a.findIndex((i=>i.priority<=e));(-1===u?a:a.splice(0,u)).forEach((e=>e.resolve()))}}}_couldLockImmediately(e,i){return(0===this._queue.length||this._queue[0].priority<i)&&e<=this._value}}function findIndexFromEnd(e,i){for(let a=e.length-1;a>=0;a--)if(i(e[a]))return a;return-1}var __awaiter$1=function(e,i,a,u){return new(a||(a=Promise))((function(b,w){function fulfilled(e){try{step(u.next(e))}catch(e){w(e)}}function rejected(e){try{step(u.throw(e))}catch(e){w(e)}}function step(e){e.done?b(e.value):function adopt(e){return e instanceof a?e:new a((function(i){i(e)}))}(e.value).then(fulfilled,rejected)}step((u=u.apply(e,i||[])).next())}))};const _=52428800;let N=[];const D=new class Mutex{constructor(e){this._semaphore=new Semaphore(1,e)}acquire(){return __awaiter$1(this,arguments,void 0,(function*(e=0){const[,i]=yield this._semaphore.acquire(1,e);return i}))}runExclusive(e,i=0){return this._semaphore.runExclusive((()=>e()),1,i)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};function cacheEvents(e){D.runExclusive((()=>{N.push(e)}))}function sendRecordingEvents(e){D.runExclusive((()=>{if(e&&e.readyState===WebSocket.OPEN&&N.length>0){let i=[],a=0;const sendBatch=()=>{if(i.length>0){const u=JSON.stringify({type:"events",events:i});e.send(u),i=[],a=0}};for(const u of N){const b=new Blob([JSON.stringify(u)]).size;b>_?(console.error(`Event Type: ${u.type||"unknown"} exceeds 50MB limit! It may be rejected by the backend.`),e.send(JSON.stringify({type:"events",events:[u]}))):(a+b>_&&sendBatch(),i.push(u),a+=b)}sendBatch(),N=[]}}))}function sendGraphQLRequest(e,i,a,u=5,b=2e3,w=2){const S=`${a.backendApi}/graphql/?apiKey=${a.apiKey}`;return function exponentialBackoff(e,i,a=5,u=2e3,b=2){let w=0;const attemptRequest=async()=>{try{return await e()}catch(e){if(w++,w>a)throw e;const i=u*Math.pow(b,w-1);return await new Promise((e=>setTimeout(e,i))),attemptRequest()}};return attemptRequest()}((()=>fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationName:e,query:i,variables:a})}).then((e=>{if(!e.ok)throw new Error(`GraphQL request failed with status ${e.status}`);return e.json()}))),0,u,b,w)}function fetchCaptureSettings(e,i){return sendGraphQLRequest("GetCaptureSettingsFromApiKey","\n query GetCaptureSettingsFromApiKey($apiKey: String!) {\n captureSettingsFromApiKey(apiKey: $apiKey) {\n recordCanvas\n recordCrossOriginIframes\n collectFonts\n inlineImages\n recordPassword\n recordRealName\n recordCreditCardInfo\n recordSsn\n recordDob\n sampling\n }\n }\n ",{apiKey:e,backendApi:i})}function startRecordingSession(e,i,a){return sendGraphQLRequest("StartSession","mutation StartSession($apiKey: UUID!, $recordingSessionId: UUID!) {\n startRecordingSession(companyApiKey: $apiKey, sessionId: $recordingSessionId) {\n id\n }\n }",{apiKey:e,recordingSessionId:i,backendApi:a})}function sendDomainsToNotPropagateHeaderTo(e,i,a){return sendGraphQLRequest("DomainsToNotPassHeaderTo","mutation DomainsToNotPassHeaderTo($apiKey: String!, $domains: [String!]!) {\n domainsToNotPassHeaderTo(apiKey: $apiKey, domains: $domains)\n }",{apiKey:e,domains:i,backendApi:a})}var A=Object.defineProperty,y$1=(e,i,a)=>((e,i,a)=>i in e?A(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a)(e,"symbol"!=typeof i?i+"":i,a);let F=class d{constructor(e){y$1(this,"fileName"),y$1(this,"functionName"),y$1(this,"lineNumber"),y$1(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",i=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${i})`:`${this.fileName}:${e}:${i}`}};const W=/(^|@)\S+:\d+/,j=/^\s*at .*(\S+:\d+|\(native\))/m,V=/^(eval@)?(\[native code])?$/,$={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(j)?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 i=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!i)throw new Error(`Cannot parse given url: ${e}`);return[i[1],i[2]||void 0,i[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(j)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let i=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const a=i.match(/ (\((.+):(\d+):(\d+)\)$)/);i=a?i.replace(a[0],""):i;const u=i.split(/\s+/).slice(1),b=this.extractLocation(a?a[1]:u.pop()),w=u.join(" ")||void 0,S=["eval","<anonymous>"].indexOf(b[0])>-1?void 0:b[0];return new F({functionName:w,fileName:S,lineNumber:b[1],columnNumber:b[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(V)}),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 F({functionName:e});{const i=/((.*".+"[^@]*)?[^@]*)(?:@)/,a=e.match(i),u=a&&a[1]?a[1]:void 0,b=this.extractLocation(e.replace(i,""));return new F({functionName:u,fileName:b[0],lineNumber:b[1],columnNumber:b[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 i=/Line (\d+).*script (?:in )?(\S+)/i,a=e.message.split("\n"),u=[];for(let e=2,b=a.length;e<b;e+=2){const b=i.exec(a[e]);b&&u.push(new F({fileName:b[2],lineNumber:parseFloat(b[1])}))}return u},parseOpera10:function(e){const i=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,a=e.stacktrace.split("\n"),u=[];for(let e=0,b=a.length;e<b;e+=2){const b=i.exec(a[e]);b&&u.push(new F({functionName:b[3]||void 0,fileName:b[2],lineNumber:parseFloat(b[1])}))}return u},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(W)&&!e.match(/^Error created at/)}),this).map((function(e){const i=e.split("@"),a=this.extractLocation(i.pop()),u=(i.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new F({functionName:u,fileName:a[0],lineNumber:a[1],columnNumber:a[2]})}),this)}};function T(e){if(!e||!e.outerHTML)return"";let i="";for(;e.parentElement;){let a=e.localName;if(!a)break;a=a.toLowerCase();const u=e.parentElement,b=[];if(u.children&&u.children.length>0)for(let e=0;e<u.children.length;e++){const i=u.children[e];i.localName&&i.localName.toLowerCase&&i.localName.toLowerCase()===a&&b.push(i)}b.length>1&&(a+=`:eq(${b.indexOf(e)})`),i=a+(i?">"+i:""),e=u}return i}function L$1(e){return"[object Object]"===Object.prototype.toString.call(e)}function k$1(e,i){if(0===i)return!0;const a=Object.keys(e);for(const u of a)if(L$1(e[u])&&k$1(e[u],i-1))return!0;return!1}function g(e,i){const a={numOfKeysLimit:50,depthOfLimit:4};Object.assign(a,i);const u=[],b=[];return JSON.stringify(e,(function(e,i){if(u.length>0){const a=u.indexOf(this);~a?u.splice(a+1):u.push(this),~a?b.splice(a,1/0,e):b.push(e),~u.indexOf(i)&&(i=u[0]===i?"[Circular ~]":"[Circular ~."+b.slice(0,u.indexOf(i)).join(".")+"]")}else u.push(i);if(null===i)return i;if(void 0===i)return"undefined";if(function c(e){return!!(L$1(e)&&Object.keys(e).length>a.numOfKeysLimit||"function"==typeof e||L$1(e)&&k$1(e,a.depthOfLimit))}(i))return function o(e){let i=e.toString();return a.stringLengthLimit&&i.length>a.stringLengthLimit&&(i=`${i.slice(0,a.stringLengthLimit)}...`),i}(i);if("bigint"==typeof i)return i.toString()+"n";if(i instanceof Event){const e={};for(const a in i){const u=i[a];Array.isArray(u)?e[a]=T(u.length?u[0]:null):e[a]=u}return e}return i instanceof Node?i instanceof HTMLElement?i?i.outerHTML:"":i.nodeName:i instanceof Error?i.stack?i.stack+"\nEnd of stack for Error object":i.name+": "+i.message:i}))}const G={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 R$1(e,i,a){const u=a?Object.assign({},G,a):G,b=u.logger;if(!b)return()=>{};let w;w="string"==typeof b?i[b]:b;let S=0,v=!1;const k=[];if(u.level.includes("error")){const l=i=>{const a=i.message,b=i.error,w=$.parse(b).map((e=>e.toString())),S=[g(a,u.stringifyOptions)];e({level:"error",trace:w,payload:S})};i.addEventListener("error",l),k.push((()=>{i.removeEventListener("error",l)}));const f=i=>{let a,b;i.reason instanceof Error?(a=i.reason,b=[g(`Uncaught (in promise) ${a.name}: ${a.message}`,u.stringifyOptions)]):(a=new Error,b=[g("Uncaught (in promise)",u.stringifyOptions),g(i.reason,u.stringifyOptions)]);const w=$.parse(a).map((e=>e.toString()));e({level:"error",trace:w,payload:b})};i.addEventListener("unhandledrejection",f),k.push((()=>{i.removeEventListener("unhandledrejection",f)}))}for(const e of u.level)k.push(p(w,e));return()=>{k.forEach((e=>e()))};function p(i,a){return i[a]?function P(e,i,a){try{if(!(i in e))return()=>{};const u=e[i],b=a(u);return"function"==typeof b&&(b.prototype=b.prototype||{},Object.defineProperties(b,{__rrweb_original__:{enumerable:!1,value:u}})),e[i]=b,()=>{e[i]=u}}catch{return()=>{}}}(i,a,(i=>(...b)=>{if(i.apply(this,b),!("assert"===a&&b[0]||v)){v=!0;try{const i=$.parse(new Error).map((e=>e.toString())).splice(1),w=("assert"===a?b.slice(1):b).map((e=>g(e,u.stringifyOptions)));S++,S<u.lengthThreshold?e({level:a,trace:i,payload:w}):S===u.lengthThreshold&&e({level:"warn",trace:[],payload:[g("The number of log records reached the threshold.")]})}catch(e){i("@sailfish-rrweb/rrweb logger error:",e,...b)}finally{v=!1}}})):()=>{}}}var H=Object.defineProperty,y=(e,i,a)=>((e,i,a)=>i in e?H(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a)(e,"symbol"!=typeof i?i+"":i,a),B=Object.defineProperty,lr=(e,i,a)=>((e,i,a)=>i in e?B(e,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[i]=a)(e,"symbol"!=typeof i?i+"":i,a),Z=(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))(Z||{});function Vr(e){return e.nodeType===e.ELEMENT_NODE}function Ie(e){const i=null==e?void 0:e.host;return(null==i?void 0:i.shadowRoot)===e}function ve(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Qe(e){try{const i=e.rules||e.cssRules;return i?function en(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(i,jr).join("")):null}catch{return null}}function jr(e){let i;if(function sn(e){return"styleSheet"in e}(e))try{i=Qe(e.styleSheet)||function tn(e){const{cssText:i}=e;if(i.split('"').length<3)return i;const a=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?a.push("layer"):e.layerName&&a.push(`layer(${e.layerName})`),e.supportsText&&a.push(`supports(${e.supportsText})`),e.media.length&&a.push(e.media.mediaText),a.join(" ")+";"}(e)}catch{}else if(function nn(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function rn(e){const i=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(i,"$1\\$2")}(e.cssText);return i||e.cssText}class Hr{constructor(){lr(this,"idNodeMap",new Map),lr(this,"nodeMetaMap",new WeakMap)}getId(e){var i;return e?(null==(i=this.getMeta(e))?void 0:i.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const i=this.getId(e);this.idNodeMap.delete(i),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,i){const a=i.id;this.idNodeMap.set(a,e),this.nodeMetaMap.set(e,i)}replace(e,i){const a=this.getNode(e);if(a){const e=this.nodeMetaMap.get(a);e&&this.nodeMetaMap.set(i,e)}this.idNodeMap.set(e,i)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Zt({element:e,maskInputOptions:i,tagName:a,type:u,value:b,maskInputFn:w}){let S=b||"",v="";const k=u&&ae(u);let C=!1;return(i[a.toLowerCase()]||k&&i[k])&&(v=w?w(S,e):"*".repeat(S.length),C=S!==v),{value:v,masked:C}}function ae(e){return e.toLowerCase()}const q="__rrweb_original__";function Yt(e){const i=e.type;return e.hasAttribute("data-rr-is-password")?"password":i?ae(i):null}function Br(e,i){let a;try{a=new URL(e,i??window.location.href)}catch{return null}const u=a.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==u?void 0:u[1])??null}let Y=1;const K=new RegExp("[^a-z0-9-_:]");function Gr(){return Y++}let J,Q;const ee=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,te=/^(?:[a-z+]+:)?\/\//i,re=/^www\..*/i,ne=/^(data:)([^,]*),(.*)/i;function qe(e,i){return(e||"").replace(ee,((e,a,u,b,w,S)=>{const v=u||w||S,k=a||b||"";if(!v)return e;if(te.test(v)||re.test(v))return`url(${k}${v}${k})`;if(ne.test(v))return`url(${k}${v}${k})`;if("/"===v[0])return`url(${k}${function hn(e){let i="";return i=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],i=i.split("?")[0],i}(i)+v}${k})`;const C=i.split("/"),I=v.split("/");C.pop();for(const e of I)"."!==e&&(".."===e?C.pop():C.push(e));return`url(${k}${C.join("/")}${k})`}))}const oe=/^[^ \t\n\r\u000c]+/,ie=/^[, \t\n\r\u000c]+/;const le=new WeakMap;function et(e,i){return i&&""!==i.trim()?ct(e,i):i}function bn(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function ct(e,i){let a=le.get(e);if(a||(a=e.createElement("a"),le.set(e,a)),i){if(i.startsWith("blob:")||i.startsWith("data:"))return i}else i="";return a.setAttribute("href",i),a.href}function Zr(e,i,a,u){return u&&("src"===a||"href"===a&&("use"!==i||"#"!==u[0])||"xlink:href"===a&&"#"!==u[0]||"background"===a&&("table"===i||"td"===i||"th"===i)?et(e,u):"srcset"===a?function Sn(e,i){if(""===i.trim())return i;let a=0;function s(e){let u;const b=e.exec(i.substring(a));return b?(u=b[0],a+=u.length,u):""}const u=[];for(;s(ie),!(a>=i.length);){let b=s(oe);if(","===b.slice(-1))b=et(e,b.substring(0,b.length-1)),u.push(b);else{let w="";b=et(e,b);let S=!1;for(;;){const e=i.charAt(a);if(""===e){u.push((b+w).trim());break}if(S)")"===e&&(S=!1);else{if(","===e){a+=1,u.push((b+w).trim());break}"("===e&&(S=!0)}w+=e,a+=1}}}return u.join(", ")}(e,u):"style"===a?qe(u,ct(e)):"object"===i&&"data"===a?et(e,u):u)}function Yr(e,i,a){return("video"===e||"audio"===e)&&"autoplay"===i}function tt(e,i,a){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!a&&tt(e.parentNode,i,a);for(let a=e.classList.length;a--;){const u=e.classList[a];if(i.test(u))return!0}return!!a&&tt(e.parentNode,i,a)}function Xr(e,i,a,u){let b;if(Vr(e)){if(b=e,!b.childNodes.length)return!1}else{if(null===e.parentElement)return!1;b=e.parentElement}try{if("string"==typeof i){if(u){if(b.closest(`.${i}`))return!0}else if(b.classList.contains(i))return!0}else if(tt(b,i,u))return!0;if(a)if(u){if(b.closest(a))return!0}else if(b.matches(a))return!0}catch{}return!1}function vn(e,i){const{doc:a,mirror:u,blockClass:b,blockSelector:w,needsMask:S,inlineStylesheet:v,maskInputOptions:k={},maskTextFn:C,maskInputFn:I,dataURLOptions:x={},inlineImages:O,recordCanvas:_,keepIframeSrcFn:N,newlyAddedElement:D=!1}=i,A=function Mn(e,i){if(!i.hasNode(e))return;const a=i.getId(e);return 1===a?void 0:a}(a,u);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Z.Document,childNodes:[],compatMode:e.compatMode}:{type:Z.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Z.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:A};case e.ELEMENT_NODE:return function xn(e,i){const{doc:a,blockClass:u,blockSelector:b,inlineStylesheet:w,maskInputOptions:S={},maskInputFn:v,dataURLOptions:k={},inlineImages:C,recordCanvas:I,keepIframeSrcFn:x,newlyAddedElement:O=!1,rootId:_}=i,N=function wn(e,i,a){try{if("string"==typeof i){if(e.classList.contains(i))return!0}else for(let a=e.classList.length;a--;){const u=e.classList[a];if(i.test(u))return!0}if(a)return e.matches(a)}catch{}return!1}(e,u,b),D=function un(e){if(e instanceof HTMLFormElement)return"form";const i=ae(e.tagName);return K.test(i)?"div":i}(e);let A={};const F=e.attributes.length;for(let i=0;i<F;i++){const u=e.attributes[i];Yr(D,u.name,u.value)||(A[u.name]=Zr(a,D,ae(u.name),u.value))}if("link"===D&&w){const i=Array.from(a.styleSheets).find((i=>i.href===e.href));let u=null;i&&(u=Qe(i)),u&&(delete A.rel,delete A.href,A._cssText=qe(u,i.href))}if("style"===D&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const i=Qe(e.sheet);i&&(A._cssText=qe(i,ct(a)))}if("input"===D||"textarea"===D||"select"===D){const i=e.value,a=e.checked;if("radio"!==A.type&&"checkbox"!==A.type&&"submit"!==A.type&&"button"!==A.type&&i){const a=Zt({element:e,type:Yt(e),tagName:D,value:i,maskInputOptions:S,maskInputFn:v});A.value=a.value,a.masked&&(A.masked=!0)}else a&&(A.checked=a)}if("option"===D&&(e.selected&&!S.select?A.selected=!0:delete A.selected),"canvas"===D&&I)if("2d"===e.__context)(function an(e){const i=e.getContext("2d");if(!i)return!0;for(let a=0;a<e.width;a+=50)for(let u=0;u<e.height;u+=50){const b=i.getImageData,w=q in b?b[q]:b;if(new Uint32Array(w.call(i,a,u,Math.min(50,e.width-a),Math.min(50,e.height-u)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(A.rr_dataURL=e.toDataURL(k.type,k.quality));else if(!("__context"in e)){const i=e.toDataURL(k.type,k.quality),u=a.createElement("canvas");u.width=e.width,u.height=e.height;i!==u.toDataURL(k.type,k.quality)&&(A.rr_dataURL=i)}if("img"===D&&C){J||(J=a.createElement("canvas"),Q=J.getContext("2d"));const i=e,u=i.currentSrc||i.getAttribute("src")||"<unknown-src>",b=i.crossOrigin,P2=()=>{i.removeEventListener("load",P2);try{J.width=i.naturalWidth,J.height=i.naturalHeight,Q.drawImage(i,0,0),A.rr_dataURL=J.toDataURL(k.type,k.quality)}catch(e){if("anonymous"!==i.crossOrigin)return i.crossOrigin="anonymous",void(i.complete&&0!==i.naturalWidth?P2():i.addEventListener("load",P2));console.warn(`Cannot inline img src=${u}! Error: ${e}`)}"anonymous"===i.crossOrigin&&(b?A.crossOrigin=b:i.removeAttribute("crossorigin"))};i.complete&&0!==i.naturalWidth?P2():i.addEventListener("load",P2)}if("audio"===D||"video"===D){const i=A;i.rr_mediaState=e.paused?"paused":"played",i.rr_mediaCurrentTime=e.currentTime,i.rr_mediaPlaybackRate=e.playbackRate,i.rr_mediaMuted=e.muted,i.rr_mediaLoop=e.loop,i.rr_mediaVolume=e.volume}if(O||(e.scrollLeft&&(A.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(A.rr_scrollTop=e.scrollTop)),N){const{width:i,height:a}=e.getBoundingClientRect();A={class:A.class,rr_width:`${i}px`,rr_height:`${a}px`}}let W;"iframe"===D&&!x(A.src)&&(e.contentDocument||(A.rr_src=A.src),delete A.src);try{customElements.get(D)&&(W=!0)}catch{}return{type:Z.Element,tagName:D,attributes:A,childNodes:[],isSVG:bn(e)||void 0,needBlock:N,rootId:_,isCustom:W}}(e,{doc:a,blockClass:b,blockSelector:w,inlineStylesheet:v,maskInputOptions:k,maskInputFn:I,dataURLOptions:x,inlineImages:O,recordCanvas:_,keepIframeSrcFn:N,newlyAddedElement:D,rootId:A});case e.TEXT_NODE:return function kn(e,i){var a;const{needsMask:u,maskTextFn:b,rootId:w}=i,S=e.parentNode&&e.parentNode.tagName;let v=e.textContent;const k="STYLE"===S||void 0,C="SCRIPT"===S||void 0;if(k&&v){try{e.nextSibling||e.previousSibling||null!=(a=e.parentNode.sheet)&&a.cssRules&&(v=Qe(e.parentNode.sheet))}catch(i){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${i}`,e)}v=qe(v,ct(i.doc))}return C&&(v="SCRIPT_PLACEHOLDER"),!k&&!C&&v&&u&&(v=b?b(v,e.parentElement):v.replace(/[\S]/g,"*")),{type:Z.Text,textContent:v||"",isStyle:k,rootId:w}}(e,{doc:a,needsMask:S,maskTextFn:C,rootId:A});case e.CDATA_SECTION_NODE:return{type:Z.CDATA,textContent:"",rootId:A};case e.COMMENT_NODE:return{type:Z.Comment,textContent:e.textContent||"",rootId:A};default:return!1}}function L(e){return null==e?"":e.toLowerCase()}function pe(e,i){const{doc:a,mirror:u,blockClass:b,blockSelector:w,maskTextClass:S,maskTextSelector:v,skipChild:k=!1,inlineStylesheet:C=!0,maskInputOptions:I={},maskTextFn:x,maskInputFn:O,slimDOMOptions:_,dataURLOptions:N={},inlineImages:D=!1,recordCanvas:A=!1,onSerialize:F,onIframeLoad:W,iframeLoadTimeout:j=5e3,onStylesheetLoad:V,stylesheetLoadTimeout:$=5e3,keepIframeSrcFn:G=()=>!1,newlyAddedElement:H=!1}=i;let{needsMask:B}=i,{preserveWhiteSpace:q=!0}=i;B||(B=Xr(e,S,v,void 0===B));const Y=vn(e,{doc:a,mirror:u,blockClass:b,blockSelector:w,needsMask:B,inlineStylesheet:C,maskInputOptions:I,maskTextFn:x,maskInputFn:O,dataURLOptions:N,inlineImages:D,recordCanvas:A,keepIframeSrcFn:G,newlyAddedElement:H});if(!Y)return console.warn(e,"not serialized"),null;let K;K=u.hasNode(e)?u.getId(e):function On(e,i){return!!(i.comment&&e.type===Z.Comment||e.type===Z.Element&&(i.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"===Br(e.attributes.href))||i.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(L(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===L(e.attributes.name)||"icon"===L(e.attributes.rel)||"apple-touch-icon"===L(e.attributes.rel)||"shortcut icon"===L(e.attributes.rel)))||"meta"===e.tagName&&(i.headMetaDescKeywords&&L(e.attributes.name).match(/^description|keywords$/)||i.headMetaSocial&&(L(e.attributes.property).match(/^(og|twitter|fb):/)||L(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===L(e.attributes.name))||i.headMetaRobots&&("robots"===L(e.attributes.name)||"googlebot"===L(e.attributes.name)||"bingbot"===L(e.attributes.name))||i.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"]||i.headMetaAuthorship&&("author"===L(e.attributes.name)||"generator"===L(e.attributes.name)||"framework"===L(e.attributes.name)||"publisher"===L(e.attributes.name)||"progid"===L(e.attributes.name)||L(e.attributes.property).match(/^article:/)||L(e.attributes.property).match(/^product:/))||i.headMetaVerification&&("google-site-verification"===L(e.attributes.name)||"yandex-verification"===L(e.attributes.name)||"csrf-token"===L(e.attributes.name)||"p:domain_verify"===L(e.attributes.name)||"verify-v1"===L(e.attributes.name)||"verification"===L(e.attributes.name)||"shopify-checkout-api-token"===L(e.attributes.name)))))}(Y,_)||!q&&Y.type===Z.Text&&!Y.isStyle&&!Y.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Gr();const J=Object.assign(Y,{id:K});if(u.add(e,J),-2===K)return null;F&&F(e);let Q=!k;if(J.type===Z.Element){Q=Q&&!J.needBlock,delete J.needBlock;const i=e.shadowRoot;i&&ve(i)&&(J.isShadowHost=!0)}if((J.type===Z.Document||J.type===Z.Element)&&Q){_.headWhitespace&&J.type===Z.Element&&"head"===J.tagName&&(q=!1);const i={doc:a,mirror:u,blockClass:b,blockSelector:w,needsMask:B,maskTextClass:S,maskTextSelector:v,skipChild:k,inlineStylesheet:C,maskInputOptions:I,maskTextFn:x,maskInputFn:O,slimDOMOptions:_,dataURLOptions:N,inlineImages:D,recordCanvas:A,preserveWhiteSpace:q,onSerialize:F,onIframeLoad:W,iframeLoadTimeout:j,onStylesheetLoad:V,stylesheetLoadTimeout:$,keepIframeSrcFn:G};if(J.type!==Z.Element||"textarea"!==J.tagName||void 0===J.attributes.value)for(const a of Array.from(e.childNodes)){const e=pe(a,i);e&&J.childNodes.push(e)}if(Vr(e)&&e.shadowRoot)for(const a of Array.from(e.shadowRoot.childNodes)){const u=pe(a,i);u&&(ve(e.shadowRoot)&&(u.isShadow=!0),J.childNodes.push(u))}}return e.parentNode&&Ie(e.parentNode)&&ve(e.parentNode)&&(J.isShadow=!0),J.type===Z.Element&&"iframe"===J.tagName&&function Cn(e,i,a){const u=e.contentWindow;if(!u)return;let b,w=!1;try{b=u.document.readyState}catch{return}if("complete"!==b){const u=setTimeout((()=>{w||(i(),w=!0)}),a);return void e.addEventListener("load",(()=>{clearTimeout(u),w=!0,i()}))}const S="about:blank";if(u.location.href!==S||e.src===S||""===e.src)return setTimeout(i,0),e.addEventListener("load",i);e.addEventListener("load",i)}(e,(()=>{const i=e.contentDocument;if(i&&W){const a=pe(i,{doc:i,mirror:u,blockClass:b,blockSelector:w,needsMask:B,maskTextClass:S,maskTextSelector:v,skipChild:!1,inlineStylesheet:C,maskInputOptions:I,maskTextFn:x,maskInputFn:O,slimDOMOptions:_,dataURLOptions:N,inlineImages:D,recordCanvas:A,preserveWhiteSpace:q,onSerialize:F,onIframeLoad:W,iframeLoadTimeout:j,onStylesheetLoad:V,stylesheetLoadTimeout:$,keepIframeSrcFn:G});a&&W(e,a)}}),j),J.type===Z.Element&&"link"===J.tagName&&"string"==typeof J.attributes.rel&&("stylesheet"===J.attributes.rel||"preload"===J.attributes.rel&&"string"==typeof J.attributes.href&&"css"===Br(J.attributes.href))&&function In(e,i,a){let u,b=!1;try{u=e.sheet}catch{return}if(u)return;const w=setTimeout((()=>{b||(i(),b=!0)}),a);e.addEventListener("load",(()=>{clearTimeout(w),b=!0,i()}))}(e,(()=>{if(V){const i=pe(e,{doc:a,mirror:u,blockClass:b,blockSelector:w,needsMask:B,maskTextClass:S,maskTextSelector:v,skipChild:!1,inlineStylesheet:C,maskInputOptions:I,maskTextFn:x,maskInputFn:O,slimDOMOptions:_,dataURLOptions:N,inlineImages:D,recordCanvas:A,preserveWhiteSpace:q,onSerialize:F,onIframeLoad:W,iframeLoadTimeout:j,onStylesheetLoad:V,stylesheetLoadTimeout:$,keepIframeSrcFn:G});i&&V(e,i)}}),$),J}function En(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tn(e){if(e.__esModule)return e;var i=e.default;if("function"==typeof i){var a=function s(){return this instanceof s?Reflect.construct(i,arguments,this.constructor):i.apply(this,arguments)};a.prototype=i.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(e).forEach((function(i){var u=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(a,i,u.get?u:{enumerable:!0,get:function(){return e[i]}})})),a}var ce={exports:{}},ue=String,$r=function(){return{isColorSupported:!1,reset:ue,bold:ue,dim:ue,italic:ue,underline:ue,inverse:ue,hidden:ue,strikethrough:ue,black:ue,red:ue,green:ue,yellow:ue,blue:ue,magenta:ue,cyan:ue,white:ue,gray:ue,bgBlack:ue,bgRed:ue,bgGreen:ue,bgYellow:ue,bgBlue:ue,bgMagenta:ue,bgCyan:ue,bgWhite:ue}};ce.exports=$r(),ce.exports.createColors=$r;var he=ce.exports;const de=Tn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let fe=he,me=de,ge=class Jr extends Error{constructor(e,i,a,u,b,w){super(e),this.name="CssSyntaxError",this.reason=e,b&&(this.file=b),u&&(this.source=u),w&&(this.plugin=w),typeof i<"u"&&typeof a<"u"&&("number"==typeof i?(this.line=i,this.column=a):(this.line=i.line,this.column=i.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Jr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let i=this.source;null==e&&(e=fe.isColorSupported),me&&e&&(i=me(i));let a,u,b=i.split(/\r?\n/),w=Math.max(this.line-3,0),S=Math.min(this.line+2,b.length),v=String(S).length;if(e){let{bold:e,gray:i,red:b}=fe.createColors(!0);a=i=>e(b(i)),u=e=>i(e)}else a=u=e=>e;return b.slice(w,S).map(((e,i)=>{let b=w+1+i,S=" "+(" "+b).slice(-v)+" | ";if(b===this.line){let i=u(S.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+u(S)+e+"\n "+i+a("^")}return" "+u(S)+e})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var ye=ge;ge.default=ge;var be={};be.isClean=Symbol("isClean"),be.my=Symbol("my");const we={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let ke=class{constructor(e){this.builder=e}atrule(e,i){let a="@"+e.name,u=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?a+=e.raws.afterName:u&&(a+=" "),e.nodes)this.block(e,a+u);else{let b=(e.raws.between||"")+(i?";":"");this.builder(a+u+b,e)}}beforeAfter(e,i){let a;a="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===i?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let u=e.parent,b=0;for(;u&&"root"!==u.type;)b+=1,u=u.parent;if(a.includes("\n")){let i=this.raw(e,null,"indent");if(i.length)for(let e=0;e<b;e++)a+=i}return a}block(e,i){let a,u=this.raw(e,"between","beforeOpen");this.builder(i+u+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),a=this.raw(e,"after")):a=this.raw(e,"after","emptyBody"),a&&this.builder(a),this.builder("}",e,"end")}body(e){let i=e.nodes.length-1;for(;i>0&&"comment"===e.nodes[i].type;)i-=1;let a=this.raw(e,"semicolon");for(let u=0;u<e.nodes.length;u++){let b=e.nodes[u],w=this.raw(b,"before");w&&this.builder(w),this.stringify(b,i!==u||a)}}comment(e){let i=this.raw(e,"left","commentLeft"),a=this.raw(e,"right","commentRight");this.builder("/*"+i+e.text+a+"*/",e)}decl(e,i){let a=this.raw(e,"between","colon"),u=e.prop+a+this.rawValue(e,"value");e.important&&(u+=e.raws.important||" !important"),i&&(u+=";"),this.builder(u,e)}document(e){this.body(e)}raw(e,i,a){let u;if(a||(a=i),i&&(u=e.raws[i],typeof u<"u"))return u;let b=e.parent;if("before"===a&&(!b||"root"===b.type&&b.first===e||b&&"document"===b.type))return"";if(!b)return we[a];let w=e.root();if(w.rawCache||(w.rawCache={}),typeof w.rawCache[a]<"u")return w.rawCache[a];if("before"===a||"after"===a)return this.beforeAfter(e,a);{let b="raw"+function Pn(e){return e[0].toUpperCase()+e.slice(1)}(a);this[b]?u=this[b](w,e):w.walk((e=>{if(u=e.raws[i],typeof u<"u")return!1}))}return typeof u>"u"&&(u=we[a]),w.rawCache[a]=u,u}rawBeforeClose(e){let i;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return i=e.raws.after,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),i&&(i=i.replace(/\S/g,"")),i}rawBeforeComment(e,i){let a;return e.walkComments((e=>{if(typeof e.raws.before<"u")return a=e.raws.before,a.includes("\n")&&(a=a.replace(/[^\n]+$/,"")),!1})),typeof a>"u"?a=this.raw(i,null,"beforeDecl"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeDecl(e,i){let a;return e.walkDecls((e=>{if(typeof e.raws.before<"u")return a=e.raws.before,a.includes("\n")&&(a=a.replace(/[^\n]+$/,"")),!1})),typeof a>"u"?a=this.raw(i,null,"beforeRule"):a&&(a=a.replace(/\S/g,"")),a}rawBeforeOpen(e){let i;return e.walk((e=>{if("decl"!==e.type&&(i=e.raws.between,typeof i<"u"))return!1})),i}rawBeforeRule(e){let i;return e.walk((a=>{if(a.nodes&&(a.parent!==e||e.first!==a)&&typeof a.raws.before<"u")return i=a.raws.before,i.includes("\n")&&(i=i.replace(/[^\n]+$/,"")),!1})),i&&(i=i.replace(/\S/g,"")),i}rawColon(e){let i;return e.walkDecls((e=>{if(typeof e.raws.between<"u")return i=e.raws.between.replace(/[^\s:]/g,""),!1})),i}rawEmptyBody(e){let i;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(i=e.raws.after,typeof i<"u"))return!1})),i}rawIndent(e){if(e.raws.indent)return e.raws.indent;let i;return e.walk((a=>{let u=a.parent;if(u&&u!==e&&u.parent&&u.parent===e&&typeof a.raws.before<"u"){let e=a.raws.before.split("\n");return i=e[e.length-1],i=i.replace(/\S/g,""),!1}})),i}rawSemicolon(e){let i;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(i=e.raws.semicolon,typeof i<"u"))return!1})),i}rawValue(e,i){let a=e[i],u=e.raws[i];return u&&u.value===a?u.raw:a}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,i){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,i)}};var Me=ke;ke.default=ke;let xe=Me;function Tt(e,i){new xe(i).stringify(e)}var Oe=Tt;Tt.default=Tt;let{isClean:Re,my:_e}=be,Le=ye,Ne=Me,Ae=Oe;function Lt(e,i){let a=new e.constructor;for(let u in e){if(!Object.prototype.hasOwnProperty.call(e,u)||"proxyCache"===u)continue;let b=e[u],w=typeof b;"parent"===u&&"object"===w?i&&(a[u]=i):"source"===u?a[u]=b:Array.isArray(b)?a[u]=b.map((e=>Lt(e,a))):("object"===w&&null!==b&&(b=Lt(b)),a[u]=b)}return a}let Fe=class{constructor(e={}){this.raws={},this[Re]=!1,this[_e]=!0;for(let i in e)if("nodes"===i){this.nodes=[];for(let a of e[i])"function"==typeof a.clone?this.append(a.clone()):this.append(a)}else this[i]=e[i]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let i=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${i.input.from}:${i.start.line}:${i.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let i in e)this[i]=e[i];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 i=Lt(this);for(let a in e)i[a]=e[a];return i}cloneAfter(e={}){let i=this.clone(e);return this.parent.insertAfter(this,i),i}cloneBefore(e={}){let i=this.clone(e);return this.parent.insertBefore(this,i),i}error(e,i={}){if(this.source){let{end:a,start:u}=this.rangeBy(i);return this.source.input.error(e,{column:u.column,line:u.line},{column:a.column,line:a.line},i)}return new Le(e)}getProxyProcessor(){return{get:(e,i)=>"proxyOf"===i?e:"root"===i?()=>e.root().toProxy():e[i],set:(e,i,a)=>(e[i]===a||(e[i]=a,("prop"===i||"value"===i||"name"===i||"params"===i||"important"===i||"text"===i)&&e.markDirty()),!0)}}markDirty(){if(this[Re]){this[Re]=!1;let e=this;for(;e=e.parent;)e[Re]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,i){let a=this.source.start;if(e.index)a=this.positionInside(e.index,i);else if(e.word){let u=(i=this.toString()).indexOf(e.word);-1!==u&&(a=this.positionInside(u,i))}return a}positionInside(e,i){let a=i||this.toString(),u=this.source.start.column,b=this.source.start.line;for(let i=0;i<e;i++)"\n"===a[i]?(u=1,b+=1):u+=1;return{column:u,line:b}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let i={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:i.column+1,line:i.line};if(e.word){let u=this.toString(),b=u.indexOf(e.word);-1!==b&&(i=this.positionInside(b,u),a=this.positionInside(b+e.word.length,u))}else e.start?i={column:e.start.column,line:e.start.line}:e.index&&(i=this.positionInside(e.index)),e.end?a={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?a=this.positionInside(e.endIndex):e.index&&(a=this.positionInside(e.index+1));return(a.line<i.line||a.line===i.line&&a.column<=i.column)&&(a={column:i.column+1,line:i.line}),{end:a,start:i}}raw(e,i){return(new Ne).raw(this,e,i)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let i=this,a=!1;for(let u of e)u===this?a=!0:a?(this.parent.insertAfter(i,u),i=u):this.parent.insertBefore(i,u);a||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,i){let a={},u=null==i;i=i||new Map;let b=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let u=this[e];if(Array.isArray(u))a[e]=u.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,i):e));else if("object"==typeof u&&u.toJSON)a[e]=u.toJSON(null,i);else if("source"===e){let w=i.get(u.input);null==w&&(w=b,i.set(u.input,b),b++),a[e]={end:u.end,inputId:w,start:u.start}}else a[e]=u}return u&&(a.inputs=[...i.keys()].map((e=>e.toJSON()))),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ae){e.stringify&&(e=e.stringify);let i="";return e(this,(e=>{i+=e})),i}warn(e,i,a){let u={node:this};for(let e in a)u[e]=a[e];return e.warn(i,u)}get proxyOf(){return this}};var We=Fe;Fe.default=Fe;let Ue=We,ze=class extends Ue{constructor(e){e&&typeof e.value<"u"&&"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 je=ze;ze.default=ze;var Ve={nanoid:(e=21)=>{let i="",a=e;for(;a--;)i+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return i}};let{SourceMapConsumer:$e,SourceMapGenerator:He}=de,{existsSync:Be,readFileSync:Xe}=de,{dirname:Ye,join:Ke}=de;let rt=class{constructor(e,i){if(!1===i.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let a=i.map?i.map.prev:void 0,u=this.loadMap(i.from,a);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=Ye(this.mapFile)),u&&(this.text=u)}consumer(){return this.consumerCache||(this.consumerCache=new $e(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 function Xn(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}(e.substr(RegExp.lastMatch.length));let i=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)}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 i=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let a=e.lastIndexOf(i.pop()),u=e.indexOf("*/",a);a>-1&&u>-1&&(this.annotation=this.getAnnotationURL(e.substring(a,u)))}loadFile(e){if(this.root=Ye(e),Be(e))return this.mapFile=e,Xe(e,"utf-8").toString().trim()}loadMap(e,i){if(!1===i)return!1;if(i){if("string"==typeof i)return i;if("function"!=typeof i){if(i instanceof $e)return He.fromSourceMap(i).toString();if(i instanceof He)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}{let a=i(e);if(a){let e=this.loadFile(a);if(!e)throw new Error("Unable to load previous source map: "+a.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let i=this.annotation;return e&&(i=Ke(Ye(e),i)),this.loadFile(i)}}}startWith(e,i){return!!e&&e.substr(0,i.length)===i}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var nt=rt;rt.default=rt;let{SourceMapConsumer:st,SourceMapGenerator:it}=de,{fileURLToPath:lt,pathToFileURL:ut}=de,{isAbsolute:ht,resolve:pt}=de,{nanoid:dt}=Ve,ft=de,gt=ye,bt=nt,wt=Symbol("fromOffsetCache"),St=!(!st||!it),vt=!(!pt||!ht),kt=class{constructor(e,i={}){if(null===e||typeof e>"u"||"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,i.from&&(!vt||/^\w+:\/\//.test(i.from)||ht(i.from)?this.file=i.from:this.file=pt(i.from)),vt&&St){let e=new bt(this.css,i);if(e.text){this.map=e;let i=e.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}}this.file||(this.id="<input css "+dt(6)+">"),this.map&&(this.map.file=this.from)}error(e,i,a,u={}){let b,w,S;if(i&&"object"==typeof i){let e=i,u=a;if("number"==typeof e.offset){let u=this.fromOffset(e.offset);i=u.line,a=u.col}else i=e.line,a=e.column;if("number"==typeof u.offset){let e=this.fromOffset(u.offset);w=e.line,S=e.col}else w=u.line,S=u.column}else if(!a){let e=this.fromOffset(i);i=e.line,a=e.col}let v=this.origin(i,a,w,S);return b=v?new gt(e,void 0===v.endLine?v.line:{column:v.column,line:v.line},void 0===v.endLine?v.column:{column:v.endColumn,line:v.endLine},v.source,v.file,u.plugin):new gt(e,void 0===w?i:{column:a,line:i},void 0===w?a:{column:S,line:w},this.css,this.file,u.plugin),b.input={column:a,endColumn:S,endLine:w,line:i,source:this.css},this.file&&(ut&&(b.input.url=ut(this.file).toString()),b.input.file=this.file),b}fromOffset(e){let i,a;if(this[wt])a=this[wt];else{let e=this.css.split("\n");a=new Array(e.length);let i=0;for(let u=0,b=e.length;u<b;u++)a[u]=i,i+=e[u].length+1;this[wt]=a}i=a[a.length-1];let u=0;if(e>=i)u=a.length-1;else{let i,b=a.length-2;for(;u<b;)if(i=u+(b-u>>1),e<a[i])b=i-1;else{if(!(e>=a[i+1])){u=i;break}u=i+1}}return{col:e-a[u]+1,line:u+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:pt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,i,a,u){if(!this.map)return!1;let b,w,S=this.map.consumer(),v=S.originalPositionFor({column:i,line:e});if(!v.source)return!1;"number"==typeof a&&(b=S.originalPositionFor({column:u,line:a})),w=ht(v.source)?ut(v.source):new URL(v.source,this.map.consumer().sourceRoot||ut(this.map.mapFile));let k={column:v.column,endColumn:b&&b.column,endLine:b&&b.line,line:v.line,url:w.toString()};if("file:"===w.protocol){if(!lt)throw new Error("file: protocol is not available in this PostCSS build");k.file=lt(w)}let C=S.sourceContentFor(v.source);return C&&(k.source=C),k}toJSON(){let e={};for(let i of["hasBOM","css","file","id"])null!=this[i]&&(e[i]=this[i]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}};var Ct=kt;kt.default=kt,ft&&ft.registerInput&&ft.registerInput(kt);let{SourceMapConsumer:It,SourceMapGenerator:Mt}=de,{dirname:Ot,relative:Rt,resolve:Et,sep:_t}=de,{pathToFileURL:Nt}=de,Dt=Ct,Pt=!(!It||!Mt),At=!!(Ot&&Et&&Rt&&_t);var Ft=class{constructor(e,i,a,u){this.stringify=e,this.mapOpts=a.map||{},this.root=i,this.opts=a,this.css=u,this.originalCSS=u,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 i="\n";this.css.includes("\r\n")&&(i="\r\n"),this.css+=i+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let i,a=this.toUrl(this.path(e.file)),u=e.root||Ot(e.file);!1===this.mapOpts.sourcesContent?(i=new It(e.text),i.sourcesContent&&(i.sourcesContent=null)):i=e.consumer(),this.map.applySourceMap(i,a,this.toUrl(this.path(u)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let i=this.root.nodes.length-1;i>=0;i--)e=this.root.nodes[i],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(i)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),At&&Pt&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(i=>{e+=i})),[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=Mt.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Mt({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 Mt({file:this.outputFile(),ignoreInvalidMapping:!0});let e,i,a=1,u=1,b="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((S,v,k)=>{if(this.css+=S,v&&"end"!==k&&(w.generated.line=a,w.generated.column=u-1,v.source&&v.source.start?(w.source=this.sourcePath(v),w.original.line=v.source.start.line,w.original.column=v.source.start.column-1,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,this.map.addMapping(w))),e=S.match(/\n/g),e?(a+=e.length,i=S.lastIndexOf("\n"),u=S.length-i):u+=S.length,v&&"start"!==k){let e=v.parent||{raws:{}};("decl"!==v.type&&("atrule"!==v.type||v.nodes)||v!==e.last||e.raws.semicolon)&&(v.source&&v.source.end?(w.source=this.sourcePath(v),w.original.line=v.source.end.line,w.original.column=v.source.end.column-1,w.generated.line=a,w.generated.column=u-2,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,w.generated.line=a,w.generated.column=u-1,this.map.addMapping(w)))}}))}isAnnotation(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let i=this.memoizedPaths.get(e);if(i)return i;let a=this.opts.to?Ot(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(a=Ot(Et(a,this.mapOpts.annotation)));let u=Rt(a,e);return this.memoizedPaths.set(e,u),u}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let i=e.source.input.map;this.previousMaps.includes(i)||this.previousMaps.push(i)}}));else{let e=new Dt(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((i=>{if(i.source){let a=i.source.input.from;if(a&&!e[a]){e[a]=!0;let u=this.usesFileUrls?this.toFileUrl(a):this.toUrl(this.path(a));this.map.setSourceContent(u,i.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 i=this.memoizedFileURLs.get(e);if(i)return i;if(Nt){let i=Nt(e).toString();return this.memoizedFileURLs.set(e,i),i}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let i=this.memoizedURLs.get(e);if(i)return i;"\\"===_t&&(e=e.replace(/\\/g,"/"));let a=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,a),a}};let Wt=We,Ut=class extends Wt{constructor(e){super(e),this.type="comment"}};var jt=Ut;Ut.default=Ut;let Vt,$t,Xt,qt,{isClean:Kt,my:Jt}=be,Qt=je,er=jt,tr=We;function us(e){return e.map((e=>(e.nodes&&(e.nodes=us(e.nodes)),delete e.source,e)))}function hs(e){if(e[Kt]=!1,e.proxyOf.nodes)for(let i of e.proxyOf.nodes)hs(i)}let rr=class ps extends tr{append(...e){for(let i of e){let e=this.normalize(i,this.last);for(let i of e)this.proxyOf.nodes.push(i)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let i of this.nodes)i.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let i,a,u=this.getIterator();for(;this.indexes[u]<this.proxyOf.nodes.length&&(i=this.indexes[u],a=e(this.proxyOf.nodes[i],i),!1!==a);)this.indexes[u]+=1;return delete this.indexes[u],a}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,i)=>"proxyOf"===i?e:e[i]?"each"===i||"string"==typeof i&&i.startsWith("walk")?(...a)=>e[i](...a.map((e=>"function"==typeof e?(i,a)=>e(i.toProxy(),a):e))):"every"===i||"some"===i?a=>e[i](((e,...i)=>a(e.toProxy(),...i))):"root"===i?()=>e.root().toProxy():"nodes"===i?e.nodes.map((e=>e.toProxy())):"first"===i||"last"===i?e[i].toProxy():e[i]:e[i],set:(e,i,a)=>(e[i]===a||(e[i]=a,("name"===i||"params"===i||"selector"===i)&&e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,i){let a,u=this.index(e),b=this.normalize(i,this.proxyOf.nodes[u]).reverse();u=this.index(e);for(let e of b)this.proxyOf.nodes.splice(u+1,0,e);for(let e in this.indexes)a=this.indexes[e],u<a&&(this.indexes[e]=a+b.length);return this.markDirty(),this}insertBefore(e,i){let a,u=this.index(e),b=0===u&&"prepend",w=this.normalize(i,this.proxyOf.nodes[u],b).reverse();u=this.index(e);for(let e of w)this.proxyOf.nodes.splice(u,0,e);for(let e in this.indexes)a=this.indexes[e],u<=a&&(this.indexes[e]=a+w.length);return this.markDirty(),this}normalize(e,i){if("string"==typeof e)e=us(Vt(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let i of e)i.parent&&i.parent.removeChild(i,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Qt(e)]}else if(e.selector)e=[new $t(e)];else if(e.name)e=[new Xt(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new er(e)]}return e.map((e=>(e[Jt]||ps.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Kt]&&hs(e),typeof e.raws.before>"u"&&i&&typeof i.raws.before<"u"&&(e.raws.before=i.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let i of e){let e=this.normalize(i,this.first,"prepend").reverse();for(let i of e)this.proxyOf.nodes.unshift(i);for(let i in this.indexes)this.indexes[i]=this.indexes[i]+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 i;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let a in this.indexes)i=this.indexes[a],i>=e&&(this.indexes[a]=i-1);return this.markDirty(),this}replaceValues(e,i,a){return a||(a=i,i={}),this.walkDecls((u=>{i.props&&!i.props.includes(u.prop)||i.fast&&!u.value.includes(i.fast)||(u.value=u.value.replace(e,a))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((i,a)=>{let u;try{u=e(i,a)}catch(e){throw i.addToError(e)}return!1!==u&&i.walk&&(u=i.walk(e)),u}))}walkAtRules(e,i){return i?e instanceof RegExp?this.walk(((a,u)=>{if("atrule"===a.type&&e.test(a.name))return i(a,u)})):this.walk(((a,u)=>{if("atrule"===a.type&&a.name===e)return i(a,u)})):(i=e,this.walk(((e,a)=>{if("atrule"===e.type)return i(e,a)})))}walkComments(e){return this.walk(((i,a)=>{if("comment"===i.type)return e(i,a)}))}walkDecls(e,i){return i?e instanceof RegExp?this.walk(((a,u)=>{if("decl"===a.type&&e.test(a.prop))return i(a,u)})):this.walk(((a,u)=>{if("decl"===a.type&&a.prop===e)return i(a,u)})):(i=e,this.walk(((e,a)=>{if("decl"===e.type)return i(e,a)})))}walkRules(e,i){return i?e instanceof RegExp?this.walk(((a,u)=>{if("rule"===a.type&&e.test(a.selector))return i(a,u)})):this.walk(((a,u)=>{if("rule"===a.type&&a.selector===e)return i(a,u)})):(i=e,this.walk(((e,a)=>{if("rule"===e.type)return i(e,a)})))}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]}};rr.registerParse=e=>{Vt=e},rr.registerRule=e=>{$t=e},rr.registerAtRule=e=>{Xt=e},rr.registerRoot=e=>{qt=e};var nr=rr;rr.default=rr,rr.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Xt.prototype):"rule"===e.type?Object.setPrototypeOf(e,$t.prototype):"decl"===e.type?Object.setPrototypeOf(e,Qt.prototype):"comment"===e.type?Object.setPrototypeOf(e,er.prototype):"root"===e.type&&Object.setPrototypeOf(e,qt.prototype),e[Jt]=!0,e.nodes&&e.nodes.forEach((e=>{rr.rebuild(e)}))};let sr,cr,ur=nr,hr=class extends ur{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new sr(new cr,this,e).stringify()}};hr.registerLazyResult=e=>{sr=e},hr.registerProcessor=e=>{cr=e};var pr=hr;hr.default=hr;let dr={};var ms=function(e){dr[e]||(dr[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let fr=class{constructor(e,i={}){if(this.type="warning",this.text=e,i.node&&i.node.source){let e=i.node.rangeBy(i);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in i)this[e]=i[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var mr=fr;fr.default=fr;let gr=mr,yr=class{constructor(e,i,a){this.processor=e,this.messages=[],this.root=i,this.opts=a,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let a=new gr(e,i);return this.messages.push(a),a}warnings(){return this.messages.filter((e=>"warning"===e.type))}get content(){return this.css}};var br=yr;yr.default=yr;const wr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Sr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,vr=/.[\r\n"'(/\\]/,kr=/[\da-f]/i;let Cr=nr,Ir=class extends Cr{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 Mr=Ir;Ir.default=Ir,Cr.registerAtRule(Ir);let xr,Or,Er=nr,Ar=class extends Er{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,i,a){let u=super.normalize(e);if(i)if("prepend"===a)this.nodes.length>1?i.raws.before=this.nodes[1].raws.before:delete i.raws.before;else if(this.first!==i)for(let e of u)e.raws.before=i.raws.before;return u}removeChild(e,i){let a=this.index(e);return!i&&0===a&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[a].raws.before),super.removeChild(e)}toResult(e={}){return new xr(new Or,this,e).stringify()}};Ar.registerLazyResult=e=>{xr=e},Ar.registerProcessor=e=>{Or=e};var Fr=Ar;Ar.default=Ar,Er.registerRoot(Ar);let Wr={comma:e=>Wr.split(e,[","],!0),space(e){let i=[" ","\n","\t"];return Wr.split(e,i)},split(e,i,a){let u=[],b="",w=!1,S=0,v=!1,k="",C=!1;for(let a of e)C?C=!1:"\\"===a?C=!0:v?a===k&&(v=!1):'"'===a||"'"===a?(v=!0,k=a):"("===a?S+=1:")"===a?S>0&&(S-=1):0===S&&i.includes(a)&&(w=!0),w?(""!==b&&u.push(b.trim()),b="",w=!1):b+=a;return(a||""!==b)&&u.push(b.trim()),u}};var zr=Wr;Wr.default=Wr;let qr=nr,Kr=zr,Qr=class extends qr{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return Kr.comma(this.selector)}set selectors(e){let i=this.selector?this.selector.match(/,\s*/):null,a=i?i[0]:","+this.raw("between","beforeOpen");this.selector=e.join(a)}};var ln=Qr;Qr.default=Qr,qr.registerRule(Qr);let cn=je,vo=function(e,i={}){let a,u,b,w,S,v,k,C,I,x,O=e.css.valueOf(),_=i.ignoreErrors,N=O.length,D=0,A=[],F=[];function m(i){throw e.error("Unclosed "+i,D)}return{back:function P2(e){F.push(e)},endOfFile:function C2(){return 0===F.length&&D>=N},nextToken:function E(e){if(F.length)return F.pop();if(D>=N)return;let i=!!e&&e.ignoreUnclosed;switch(a=O.charCodeAt(D),a){case 10:case 32:case 9:case 13:case 12:u=D;do{u+=1,a=O.charCodeAt(u)}while(32===a||10===a||9===a||13===a||12===a);x=["space",O.slice(D,u)],D=u-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(a);x=[e,e,D];break}case 40:if(C=A.length?A.pop()[1]:"",I=O.charCodeAt(D+1),"url"===C&&39!==I&&34!==I&&32!==I&&10!==I&&9!==I&&12!==I&&13!==I){u=D;do{if(v=!1,u=O.indexOf(")",u+1),-1===u){if(_||i){u=D;break}m("bracket")}for(k=u;92===O.charCodeAt(k-1);)k-=1,v=!v}while(v);x=["brackets",O.slice(D,u+1),D,u],D=u}else u=O.indexOf(")",D+1),w=O.slice(D,u+1),-1===u||vr.test(w)?x=["(","(",D]:(x=["brackets",w,D,u],D=u);break;case 39:case 34:b=39===a?"'":'"',u=D;do{if(v=!1,u=O.indexOf(b,u+1),-1===u){if(_||i){u=D+1;break}m("string")}for(k=u;92===O.charCodeAt(k-1);)k-=1,v=!v}while(v);x=["string",O.slice(D,u+1),D,u],D=u;break;case 64:wr.lastIndex=D+1,wr.test(O),u=0===wr.lastIndex?O.length-1:wr.lastIndex-2,x=["at-word",O.slice(D,u+1),D,u],D=u;break;case 92:for(u=D,S=!0;92===O.charCodeAt(u+1);)u+=1,S=!S;if(a=O.charCodeAt(u+1),S&&47!==a&&32!==a&&10!==a&&9!==a&&13!==a&&12!==a&&(u+=1,kr.test(O.charAt(u)))){for(;kr.test(O.charAt(u+1));)u+=1;32===O.charCodeAt(u+1)&&(u+=1)}x=["word",O.slice(D,u+1),D,u],D=u;break;default:47===a&&42===O.charCodeAt(D+1)?(u=O.indexOf("*/",D+2)+1,0===u&&(_||i?u=O.length:m("comment")),x=["comment",O.slice(D,u+1),D,u],D=u):(Sr.lastIndex=D+1,Sr.test(O),u=0===Sr.lastIndex?O.length-1:Sr.lastIndex-2,x=["word",O.slice(D,u+1),D,u],A.push(x),D=u)}return D++,x},position:function b2(){return D}}},pn=jt,dn=Mr,fn=Fr,mn=ln;const gn={empty:!0,space:!0};var yn=class{constructor(e){this.input=e,this.root=new fn,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 i=new dn;i.name=e[1].slice(1),""===i.name&&this.unnamedAtrule(i,e),this.init(i,e[2]);let a,u,b,w=!1,S=!1,v=[],k=[];for(;!this.tokenizer.endOfFile();){if(a=(e=this.tokenizer.nextToken())[0],"("===a||"["===a?k.push("("===a?")":"]"):"{"===a&&k.length>0?k.push("}"):a===k[k.length-1]&&k.pop(),0===k.length){if(";"===a){i.source.end=this.getPosition(e[2]),i.source.end.offset++,this.semicolon=!0;break}if("{"===a){S=!0;break}if("}"===a){if(v.length>0){for(b=v.length-1,u=v[b];u&&"space"===u[0];)u=v[--b];u&&(i.source.end=this.getPosition(u[3]||u[2]),i.source.end.offset++)}this.end(e);break}v.push(e)}else v.push(e);if(this.tokenizer.endOfFile()){w=!0;break}}i.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(i.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(i,"params",v),w&&(e=v[v.length-1],i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++,this.spaces=i.raws.between,i.raws.between="")):(i.raws.afterName="",i.params=""),S&&(i.nodes=[],this.current=i)}checkMissedSemicolon(e){let i=this.colon(e);if(!1===i)return;let a,u=0;for(let b=i-1;b>=0&&(a=e[b],"space"===a[0]||(u+=1,2!==u));b--);throw this.input.error("Missed semicolon","word"===a[0]?a[3]+1:a[2])}colon(e){let i,a,u,b=0;for(let[w,S]of e.entries()){if(i=S,a=i[0],"("===a&&(b+=1),")"===a&&(b-=1),0===b&&":"===a){if(u){if("word"===u[0]&&"progid"===u[1])continue;return w}this.doubleColon(i)}u=i}return!1}comment(e){let i=new pn;this.init(i,e[2]),i.source.end=this.getPosition(e[3]||e[2]),i.source.end.offset++;let a=e[1].slice(2,-2);if(/^\s*$/.test(a))i.text="",i.raws.left=a,i.raws.right="";else{let e=a.match(/^(\s*)([^]*\S)(\s*)$/);i.text=e[2],i.raws.left=e[1],i.raws.right=e[3]}}createTokenizer(){this.tokenizer=vo(this.input)}decl(e,i){let a=new cn;this.init(a,e[0][2]);let u,b=e[e.length-1];for(";"===b[0]&&(this.semicolon=!0,e.pop()),a.source.end=this.getPosition(b[3]||b[2]||function Oo(e){for(let i=e.length-1;i>=0;i--){let a=e[i],u=a[3]||a[2];if(u)return u}}(e)),a.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),a.raws.before+=e.shift()[1];for(a.source.start=this.getPosition(e[0][2]),a.prop="";e.length;){let i=e[0][0];if(":"===i||"space"===i||"comment"===i)break;a.prop+=e.shift()[1]}for(a.raws.between="";e.length;){if(u=e.shift(),":"===u[0]){a.raws.between+=u[1];break}"word"===u[0]&&/\w/.test(u[1])&&this.unknownWord([u]),a.raws.between+=u[1]}("_"===a.prop[0]||"*"===a.prop[0])&&(a.raws.before+=a.prop[0],a.prop=a.prop.slice(1));let w,S=[];for(;e.length&&(w=e[0][0],"space"===w||"comment"===w);)S.push(e.shift());this.precheckMissedSemicolon(e);for(let i=e.length-1;i>=0;i--){if(u=e[i],"!important"===u[1].toLowerCase()){a.important=!0;let u=this.stringFrom(e,i);u=this.spacesFromEnd(e)+u," !important"!==u&&(a.raws.important=u);break}if("important"===u[1].toLowerCase()){let u=e.slice(0),b="";for(let e=i;e>0;e--){let i=u[e][0];if(0===b.trim().indexOf("!")&&"space"!==i)break;b=u.pop()[1]+b}0===b.trim().indexOf("!")&&(a.important=!0,a.raws.important=b,e=u)}if("space"!==u[0]&&"comment"!==u[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(a.raws.between+=S.map((e=>e[1])).join(""),S=[]),this.raw(a,"value",S.concat(e),i),a.value.includes(":")&&!i&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let i=new mn;this.init(i,e[2]),i.selector="",i.raws.between="",this.current=i}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 i=this.input.fromOffset(e);return{column:i.col,line:i.line,offset:e}}init(e,i){this.current.push(e),e.source={input:this.input,start:this.getPosition(i)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let i=!1,a=null,u=!1,b=null,w=[],S=e[1].startsWith("--"),v=[],k=e;for(;k;){if(a=k[0],v.push(k),"("===a||"["===a)b||(b=k),w.push("("===a?")":"]");else if(S&&u&&"{"===a)b||(b=k),w.push("}");else if(0===w.length){if(";"===a){if(u)return void this.decl(v,S);break}if("{"===a)return void this.rule(v);if("}"===a){this.tokenizer.back(v.pop()),i=!0;break}":"===a&&(u=!0)}else a===w[w.length-1]&&(w.pop(),0===w.length&&(b=null));k=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(i=!0),w.length>0&&this.unclosedBracket(b),i&&u){if(!S)for(;v.length&&(k=v[v.length-1][0],"space"===k||"comment"===k);)this.tokenizer.back(v.pop());this.decl(v,S)}else this.unknownWord(v)}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,i,a,u){let b,w,S,v,k=a.length,C="",I=!0;for(let e=0;e<k;e+=1)b=a[e],w=b[0],"space"!==w||e!==k-1||u?"comment"===w?(v=a[e-1]?a[e-1][0]:"empty",S=a[e+1]?a[e+1][0]:"empty",gn[v]||gn[S]||","===C.slice(-1)?I=!1:C+=b[1]):C+=b[1]:I=!1;if(!I){let u=a.reduce(((e,i)=>e+i[1]),"");e.raws[i]={raw:u,value:C}}e[i]=C}rule(e){e.pop();let i=new mn;this.init(i,e[0][2]),i.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(i,"selector",e),this.current=i}spacesAndCommentsFromEnd(e){let i,a="";for(;e.length&&(i=e[e.length-1][0],"space"===i||"comment"===i);)a=e.pop()[1]+a;return a}spacesAndCommentsFromStart(e){let i,a="";for(;e.length&&(i=e[0][0],"space"===i||"comment"===i);)a+=e.shift()[1];return a}spacesFromEnd(e){let i,a="";for(;e.length&&(i=e[e.length-1][0],"space"===i);)a=e.pop()[1]+a;return a}stringFrom(e,i){let a="";for(let u=i;u<e.length;u++)a+=e[u][1];return e.splice(i,e.length-i),a}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,i){throw this.input.error("At-rule without name",{offset:i[2]},{offset:i[2]+i[1].length})}};let _n=nr,Ln=yn,Nn=Ct;function ot(e,i){let a=new Nn(e,i),u=new Ln(a);try{u.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&i&&i.from&&(/\.scss$/i.test(i.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(i.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(i.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return u.root}var Dn=ot;ot.default=ot,_n.registerParse(ot);let{isClean:An,my:Fn}=be,Wn=Ft,Un=Oe,zn=nr,jn=pr,Vn=ms,$n=br,Gn=Dn,Hn=Fr;const Bn={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zn={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},qn={Once:!0,postcssPlugin:!0,prepare:!0};function Ce(e){return"object"==typeof e&&"function"==typeof e.then}function vs(e){let i=!1,a=Bn[e.type];return"decl"===e.type?i=e.prop.toLowerCase():"atrule"===e.type&&(i=e.name.toLowerCase()),i&&e.append?[a,a+"-"+i,0,a+"Exit",a+"Exit-"+i]:i?[a,a+"-"+i,a+"Exit",a+"Exit-"+i]:e.append?[a,0,a+"Exit"]:[a,a+"Exit"]}function Rr(e){let i;return i="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:vs(e),{eventIndex:0,events:i,iterator:0,node:e,visitorIndex:0,visitors:[]}}function zt(e){return e[An]=!1,e.nodes&&e.nodes.forEach((e=>zt(e))),e}let Yn={},Kn=class Ms{constructor(e,i,a){let u;if(this.stringified=!1,this.processed=!1,"object"!=typeof i||null===i||"root"!==i.type&&"document"!==i.type)if(i instanceof Ms||i instanceof $n)u=zt(i.root),i.map&&(typeof a.map>"u"&&(a.map={}),a.map.inline||(a.map.inline=!1),a.map.prev=i.map);else{let e=Gn;a.syntax&&(e=a.syntax.parse),a.parser&&(e=a.parser),e.parse&&(e=e.parse);try{u=e(i,a)}catch(e){this.processed=!0,this.error=e}u&&!u[Fn]&&zn.rebuild(u)}else u=zt(i);this.result=new $n(e,u,a),this.helpers={...Yn,postcss:Yn,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,i){let a=this.result.lastPlugin;try{if(i&&i.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(a.postcssVersion&&"production"!==process.env.NODE_ENV){let e=a.postcssPlugin,i=a.postcssVersion,u=this.result.processor.version,b=i.split("."),w=u.split(".");(b[0]!==w[0]||parseInt(b[1])>parseInt(w[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+u+", but "+e+" uses "+i+". Perhaps this is the source of the error below.")}}else e.plugin=a.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let t=(e,i,a)=>{this.listeners[i]||(this.listeners[i]=[]),this.listeners[i].push([e,a])};for(let e of this.plugins)if("object"==typeof e)for(let i in e){if(!Zn[i]&&/^[A-Z]/.test(i))throw new Error(`Unknown event ${i} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qn[i])if("object"==typeof e[i])for(let a in e[i])t(e,"*"===a?i:i+"-"+a.toLowerCase(),e[i][a]);else"function"==typeof e[i]&&t(e,i,e[i])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let i=this.plugins[e],a=this.runOnRoot(i);if(Ce(a))try{await a}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[An];){e[An]=!0;let i=[Rr(e)];for(;i.length>0;){let e=this.visitTick(i);if(Ce(e))try{await e}catch(e){let a=i[i.length-1].node;throw this.handleError(e,a)}}}if(this.listeners.OnceExit)for(let[i,a]of this.listeners.OnceExit){this.result.lastPlugin=i;try{if("document"===e.type){let i=e.nodes.map((e=>a(e,this.helpers)));await Promise.all(i)}else await a(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let i=this.result.root.nodes.map((i=>e.Once(i,this.helpers)));return Ce(i[0])?Promise.all(i):i}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,i=Un;e.syntax&&(i=e.syntax.stringify),e.stringifier&&(i=e.stringifier),i.stringify&&(i=i.stringify);let a=new Wn(i,this.result.root,this.result.opts).generate();return this.result.css=a[0],this.result.map=a[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(Ce(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[An];)e[An]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let i of e.nodes)this.visitSync(this.listeners.OnceExit,i);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,i){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Vn("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,i)}toString(){return this.css}visitSync(e,i){for(let[a,u]of e){let e;this.result.lastPlugin=a;try{e=u(i,this.helpers)}catch(e){throw this.handleError(e,i.proxyOf)}if("root"!==i.type&&"document"!==i.type&&!i.parent)return!0;if(Ce(e))throw this.getAsyncError()}}visitTick(e){let i=e[e.length-1],{node:a,visitors:u}=i;if("root"!==a.type&&"document"!==a.type&&!a.parent)return void e.pop();if(u.length>0&&i.visitorIndex<u.length){let[e,b]=u[i.visitorIndex];i.visitorIndex+=1,i.visitorIndex===u.length&&(i.visitors=[],i.visitorIndex=0),this.result.lastPlugin=e;try{return b(a.toProxy(),this.helpers)}catch(e){throw this.handleError(e,a)}}if(0!==i.iterator){let u,b=i.iterator;for(;u=a.nodes[a.indexes[b]];)if(a.indexes[b]+=1,!u[An])return u[An]=!0,void e.push(Rr(u));i.iterator=0,delete a.indexes[b]}let b=i.events;for(;i.eventIndex<b.length;){let e=b[i.eventIndex];if(i.eventIndex+=1,0===e)return void(a.nodes&&a.nodes.length&&(a[An]=!0,i.iterator=a.getIterator()));if(this.listeners[e])return void(i.visitors=this.listeners[e])}e.pop()}walkSync(e){e[An]=!0;let i=vs(e);for(let a of i)if(0===a)e.nodes&&e.each((e=>{e[An]||this.walkSync(e)}));else{let i=this.listeners[a];if(i&&this.visitSync(i,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"}};Kn.registerPostcss=e=>{Yn=e};var Jn=Kn;Kn.default=Kn,Hn.registerLazyResult(Kn),jn.registerLazyResult(Kn);let Qn=Ft,es=Oe,ts=ms,rs=Dn;const ns=br;let ss=class{constructor(e,i,a){i=i.toString(),this.stringified=!1,this._processor=e,this._css=i,this._opts=a,this._map=void 0;let u,b=es;this.result=new ns(this._processor,u,this._opts),this.result.css=i;let w=this;Object.defineProperty(this.result,"root",{get:()=>w.root});let S=new Qn(b,u,this._opts,i);if(S.isMap()){let[e,i]=S.generate();e&&(this.result.css=e),i&&(this.result.map=i)}else S.clearAnnotation(),this.result.css=S.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,i){return"production"!==process.env.NODE_ENV&&("from"in this._opts||ts("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,i)}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,i=rs;try{e=i(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}};var os=ss;ss.default=ss;let is=os,as=Jn,ls=pr,cs=Fr,ds=class{constructor(e=[]){this.version="8.4.39",this.plugins=this.normalize(e)}normalize(e){let i=[];for(let a of e)if(!0===a.postcss?a=a():a.postcss&&(a=a.postcss),"object"==typeof a&&Array.isArray(a.plugins))i=i.concat(a.plugins);else if("object"==typeof a&&a.postcssPlugin)i.push(a);else if("function"==typeof a)i.push(a);else{if("object"!=typeof a||!a.parse&&!a.stringify)throw new Error(a+" 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 i}process(e,i={}){return this.plugins.length||i.parser||i.stringifier||i.syntax?new as(this,e,i):new is(this,e,i)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var fs=ds;ds.default=ds,cs.registerProcessor(ds),ls.registerProcessor(ds);let gs=je,ys=nt,bs=jt,ws=Mr,Ss=Ct,ks=Fr,Cs=ln;function Ee(e,i){if(Array.isArray(e))return e.map((e=>Ee(e)));let{inputs:a,...u}=e;if(a){i=[];for(let e of a){let a={...e,__proto__:Ss.prototype};a.map&&(a.map={...a.map,__proto__:ys.prototype}),i.push(a)}}if(u.nodes&&(u.nodes=e.nodes.map((e=>Ee(e,i)))),u.source){let{inputId:e,...a}=u.source;u.source=a,null!=e&&(u.source.input=i[e])}if("root"===u.type)return new ks(u);if("decl"===u.type)return new gs(u);if("rule"===u.type)return new Cs(u);if("comment"===u.type)return new bs(u);if("atrule"===u.type)return new ws(u);throw new Error("Unknown node type: "+e.type)}var Is=Ee;Ee.default=Ee;let xs=ye,Os=je,Rs=Jn,Es=nr,Ls=fs,Ts=Oe,$s=Is,Gs=pr,qs=mr,Ks=jt,Js=Mr,Qs=br,eo=Ct,to=Dn,ro=zr,no=ln,so=Fr,oo=We;function R(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Ls(e)}R.plugin=function(e,i){let a,u=!1;function s(...a){console&&console.warn&&!u&&(u=!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 b=i(...a);return b.postcssPlugin=e,b.postcssVersion=(new Ls).version,b}return Object.defineProperty(s,"postcss",{get:()=>(a||(a=s()),a)}),s.process=function(e,i,a){return R([s(a)]).process(e,i)},s},R.stringify=Ts,R.parse=to,R.fromJSON=$s,R.list=ro,R.comment=e=>new Ks(e),R.atRule=e=>new Js(e),R.decl=e=>new Os(e),R.rule=e=>new no(e),R.root=e=>new so(e),R.document=e=>new Gs(e),R.CssSyntaxError=xs,R.Declaration=Os,R.Container=Es,R.Processor=Ls,R.Document=Gs,R.Comment=Ks,R.Warning=qs,R.AtRule=Js,R.Result=Qs,R.Input=eo,R.Rule=no,R.Root=so,R.Node=oo,Rs.registerPostcss(R);var io=R;R.default=R;const ao=En(io);ao.stringify,ao.fromJSON,ao.plugin,ao.parse,ao.list,ao.document,ao.comment,ao.atRule,ao.rule,ao.decl,ao.root,ao.CssSyntaxError,ao.Declaration,ao.Container,ao.Processor,ao.Document,ao.Comment,ao.Warning,ao.AtRule,ao.Result,ao.Input,ao.Rule,ao.Root,ao.Node;var lo=(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))(lo||{}),co=(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))(co||{}),uo=(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))(uo||{}),ho=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ho||{}),po=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(po||{}),fo=(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))(fo||{});function U(e,i,a=document){const u={capture:!0,passive:!0};return a.addEventListener(e,i,u),()=>a.removeEventListener(e,i,u)}const mo="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 go={map:{},getId:()=>(console.error(mo),-1),getNode:()=>(console.error(mo),null),removeNodeFromMap(){console.error(mo)},has:()=>(console.error(mo),!1),reset(){console.error(mo)}};function Te(e,i,a={}){let u=null,b=0;return function(...w){const S=Date.now();!b&&!1===a.leading&&(b=S);const v=i-(S-b),k=this;v<=0||v>i?(u&&(clearTimeout(u),u=null),b=S,e.apply(k,w)):!u&&!1!==a.trailing&&(u=setTimeout((()=>{b=!1===a.leading?0:Date.now(),u=null,e.apply(k,w)}),v))}}function mt(e,i,a,u,b=window){const w=b.Object.getOwnPropertyDescriptor(e,i);return b.Object.defineProperty(e,i,u?a:{set(e){setTimeout((()=>{a.set.call(this,e)}),0),w&&w.set&&w.set.call(this,e)}}),()=>mt(e,i,w||{},!0)}function Se(e,i,a){try{if(!(i in e))return()=>{};const u=e[i],b=a(u);return"function"==typeof b&&(b.prototype=b.prototype||{},Object.defineProperties(b,{__rrweb_original__:{enumerable:!1,value:u}})),e[i]=b,()=>{e[i]=u}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(go=new Proxy(go,{get:(e,i,a)=>("map"===i&&console.error(mo),Reflect.get(e,i,a))}));let yo,bo=Date.now;function Ns(e){var i,a,u,b,w,S;const v=e.document;return{left:v.scrollingElement?v.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==v?void 0:v.documentElement.scrollLeft)||(null==(a=null==(i=null==v?void 0:v.body)?void 0:i.parentElement)?void 0:a.scrollLeft)||(null==(u=null==v?void 0:v.body)?void 0:u.scrollLeft)||0,top:v.scrollingElement?v.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==v?void 0:v.documentElement.scrollTop)||(null==(w=null==(b=null==v?void 0:v.body)?void 0:b.parentElement)?void 0:w.scrollTop)||(null==(S=null==v?void 0:v.body)?void 0:S.scrollTop)||0}}function Ds(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Ps(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function As(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function z(e,i,a,u){if(!e)return!1;const b=As(e);if(!b)return!1;try{if("string"==typeof i){if(b.classList.contains(i)||u&&null!==b.closest("."+i))return!0}else if(tt(b,i,u))return!0}catch{}return!(!a||!(b.matches(a)||u&&null!==b.closest(a)))}function xt(e,i,a){return!("TITLE"!==e.tagName||!a.headTitleMutations)||-2===i.getId(e)}function Fs(e,i){if(Ie(e))return!1;const a=i.getId(e);return!i.has(a)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||Fs(e.parentNode,i))}function Ht(e){return!!e.changedTouches}function Ws(e,i){return!("IFRAME"!==e.nodeName||!i.getMeta(e))}function _s(e,i){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!i.getMeta(e))}function Bt(e){return!(null==e||!e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(bo=()=>(new Date).getTime());class vi{constructor(){y(this,"id",1),y(this,"styleIDMap",new WeakMap),y(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,i){if(this.has(e))return this.getId(e);let a;return a=void 0===i?this.id++:i,this.styleIDMap.set(e,a),this.idStyleMap.set(a,e),a}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 Us(e){var i,a;let u=null;return(null==(a=null==(i=e.getRootNode)?void 0:i.call(e))?void 0:a.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(u=e.getRootNode().host),u}function ki(e){const i=e.ownerDocument;if(!i)return!1;const a=function Mi(e){let i,a=e;for(;i=Us(a);)a=i;return a}(e);return i.contains(a)}function zs(e){const i=e.ownerDocument;return!!i&&(i.contains(e)||ki(e))}const M=e=>yo?(...i)=>{try{return e(...i)}catch(e){if(yo&&!0===yo(e))return;throw e}}:e;class Tr{constructor(e){y(this,"iframeIdToRemoteIdMap",new WeakMap),y(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,i,a,u){const b=a||this.getIdToRemoteIdMap(e),w=u||this.getRemoteIdToIdMap(e);let S=b.get(i);return S||(S=this.generateIdFn(),b.set(i,S),w.set(S,i)),S}getIds(e,i){const a=this.getIdToRemoteIdMap(e),u=this.getRemoteIdToIdMap(e);return i.map((i=>this.getId(e,i,a,u)))}getRemoteId(e,i,a){const u=a||this.getRemoteIdToIdMap(e);if("number"!=typeof i)return i;return u.get(i)||-1}getRemoteIds(e,i){const a=this.getRemoteIdToIdMap(e);return i.map((i=>this.getRemoteId(e,i,a)))}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 i=this.iframeIdToRemoteIdMap.get(e);return i||(i=new Map,this.iframeIdToRemoteIdMap.set(e,i)),i}getRemoteIdToIdMap(e){let i=this.iframeRemoteIdToIdMap.get(e);return i||(i=new Map,this.iframeRemoteIdToIdMap.set(e,i)),i}}class Ri{constructor(e){y(this,"iframes",new WeakMap),y(this,"crossOriginIframeMap",new WeakMap),y(this,"crossOriginIframeMirror",new Tr(Gr)),y(this,"crossOriginIframeStyleMirror"),y(this,"crossOriginIframeRootIdMap",new WeakMap),y(this,"mirror"),y(this,"mutationCb"),y(this,"wrappedEmit"),y(this,"loadListener"),y(this,"stylesheetManager"),y(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Tr(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,i){var a,u;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:i}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(a=e.contentWindow)||a.addEventListener("message",this.handleMessage.bind(this))),null==(u=this.loadListener)||u.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 i=e;"@sailfish-rrweb/rrweb"!==i.data.type||(i.origin,i.data.origin)}transformCrossOriginEvent(e,i){var a;switch(i.type){case lo.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(i.data.node,e);const a=i.data.node.id;return this.crossOriginIframeRootIdMap.set(e,a),this.patchRootIdOnNode(i.data.node,a),{timestamp:i.timestamp,type:lo.IncrementalSnapshot,data:{source:co.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:i.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case lo.Meta:case lo.Load:case lo.DomContentLoaded:return!1;case lo.Plugin:return i;case lo.Custom:return this.replaceIds(i.data.payload,e,["id","parentId","previousId","nextId"]),i;case lo.IncrementalSnapshot:switch(i.data.source){case co.Mutation:return i.data.adds.forEach((i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const a=this.crossOriginIframeRootIdMap.get(e);a&&this.patchRootIdOnNode(i.node,a)})),i.data.removes.forEach((i=>{this.replaceIds(i,e,["parentId","id"])})),i.data.attributes.forEach((i=>{this.replaceIds(i,e,["id"])})),i.data.texts.forEach((i=>{this.replaceIds(i,e,["id"])})),i;case co.Drag:case co.TouchMove:case co.MouseMove:return i.data.positions.forEach((i=>{this.replaceIds(i,e,["id"])})),i;case co.ViewportResize:return!1;case co.MediaInteraction:case co.MouseInteraction:case co.Scroll:case co.CanvasMutation:case co.Input:return this.replaceIds(i.data,e,["id"]),i;case co.StyleSheetRule:case co.StyleDeclaration:return this.replaceIds(i.data,e,["id"]),this.replaceStyleIds(i.data,e,["styleId"]),i;case co.Font:return i;case co.Selection:return i.data.ranges.forEach((i=>{this.replaceIds(i,e,["start","end"])})),i;case co.AdoptedStyleSheet:return this.replaceIds(i.data,e,["id"]),this.replaceStyleIds(i.data,e,["styleIds"]),null==(a=i.data.styles)||a.forEach((i=>{this.replaceStyleIds(i,e,["styleId"])})),i}}return!1}replace(e,i,a,u){for(const b of u)!Array.isArray(i[b])&&"number"!=typeof i[b]||(Array.isArray(i[b])?i[b]=e.getIds(a,i[b]):i[b]=e.getId(a,i[b]));return i}replaceIds(e,i,a){return this.replace(this.crossOriginIframeMirror,e,i,a)}replaceStyleIds(e,i,a){return this.replace(this.crossOriginIframeStyleMirror,e,i,a)}replaceIdOnNode(e,i){this.replaceIds(e,i,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,i)}))}patchRootIdOnNode(e,i){e.type!==Z.Document&&!e.rootId&&(e.rootId=i),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,i)}))}}function Lr(e){return"__ln"in e}class Ei{constructor(){y(this,"length",0),y(this,"head",null),y(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let i=this.head;for(let a=0;a<e;a++)i=(null==i?void 0:i.next)||null;return i}addNode(e){const i={value:e,previous:null,next:null};if(e.__ln=i,e.previousSibling&&Lr(e.previousSibling)){const a=e.previousSibling.__ln.next;i.next=a,i.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=i,a&&(a.previous=i)}else if(e.nextSibling&&Lr(e.nextSibling)&&e.nextSibling.__ln.previous){const a=e.nextSibling.__ln.previous;i.previous=a,i.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=i,a&&(a.next=i)}else this.head&&(this.head.previous=i),i.next=this.head,this.head=i;null===i.next&&(this.tail=i),this.length++}removeNode(e){const i=e.__ln;this.head&&(i.previous?(i.previous.next=i.next,i.next?i.next.previous=i.previous:this.tail=i.previous):(this.head=i.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Nr=(e,i)=>`${e}@${i}`;class Ti{constructor(){y(this,"frozen",!1),y(this,"locked",!1),y(this,"texts",[]),y(this,"attributes",[]),y(this,"attributeMap",new WeakMap),y(this,"removes",[]),y(this,"mapRemoves",[]),y(this,"movedMap",{}),y(this,"addedSet",new Set),y(this,"movedSet",new Set),y(this,"droppedSet",new Set),y(this,"mutationCb"),y(this,"blockClass"),y(this,"blockSelector"),y(this,"maskTextClass"),y(this,"maskTextSelector"),y(this,"inlineStylesheet"),y(this,"maskInputOptions"),y(this,"maskTextFn"),y(this,"maskInputFn"),y(this,"keepIframeSrcFn"),y(this,"recordCanvas"),y(this,"inlineImages"),y(this,"slimDOMOptions"),y(this,"dataURLOptions"),y(this,"doc"),y(this,"mirror"),y(this,"iframeManager"),y(this,"stylesheetManager"),y(this,"shadowDomManager"),y(this,"canvasManager"),y(this,"processedNodeManager"),y(this,"unattachedDoc"),y(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),y(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],i=new Set,a=new Ei,n=e=>{let i=e,a=-2;for(;-2===a;)i=i&&i.nextSibling,a=i&&this.mirror.getId(i);return a},o=u=>{if(!u.parentNode||!zs(u)||"TEXTAREA"===u.parentNode.tagName)return;const b=Ie(u.parentNode)?this.mirror.getId(Us(u)):this.mirror.getId(u.parentNode),w=n(u);if(-1===b||-1===w)return a.addNode(u);const S=pe(u,{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=>{Ws(e,this.mirror)&&this.iframeManager.addIframe(e),_s(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Bt(u)&&this.shadowDomManager.addShadowRoot(u.shadowRoot,this.doc)},onIframeLoad:(e,i)=>{this.iframeManager.attachIframe(e,i),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,i)=>{this.stylesheetManager.attachLinkElement(e,i)}});S&&(e.push({parentId:b,nextId:w,node:S}),i.add(S.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Dr(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||o(e);for(const e of this.addedSet)!Pr(this.droppedSet,e)&&!Dr(this.removes,e,this.mirror)||Pr(this.movedSet,e)?o(e):this.droppedSet.add(e);let u=null;for(;a.length;){let e=null;if(u){const i=this.mirror.getId(u.value.parentNode),a=n(u.value);-1!==i&&-1!==a&&(e=u)}if(!e){let i=a.tail;for(;i;){const a=i;if(i=i.previous,a){const i=this.mirror.getId(a.value.parentNode);if(-1===n(a.value))continue;if(-1!==i){e=a;break}{const i=a.value;if(i.parentNode&&i.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const u=i.parentNode.host;if(-1!==this.mirror.getId(u)){e=a;break}}}}}}if(!e){for(;a.head;)a.removeNode(a.head.value);break}u=e.previous,a.removeNode(e.value),o(e.value)}const b={texts:this.texts.map((e=>{const i=e.node;return i.parentNode&&"TEXTAREA"===i.parentNode.tagName&&this.genTextAreaValueMutation(i.parentNode),{id:this.mirror.getId(i),value:e.value}})).filter((e=>!i.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:i}=e;if("string"==typeof i.style){const a=JSON.stringify(e.styleDiff),u=JSON.stringify(e._unchangedStyles);a.length<i.style.length&&(a+u).split("var(").length===i.style.split("var(").length&&(i.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:i}})).filter((e=>!i.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!b.texts.length&&!b.attributes.length&&!b.removes.length&&!b.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(b))})),y(this,"genTextAreaValueMutation",(e=>{let i=this.attributeMap.get(e);i||(i={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e,i)),i.attributes.value=Array.from(e.childNodes,(e=>e.textContent||"")).join("")})),y(this,"processMutation",(e=>{if(!xt(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const i=e.target.textContent;!z(e.target,this.blockClass,this.blockSelector,!1)&&i!==e.oldValue&&this.texts.push({value:Xr(e.target,this.maskTextClass,this.maskTextSelector,!0)&&i?this.maskTextFn?this.maskTextFn(i,As(e.target)):i.replace(/[\S]/g,"*"):i,node:e.target});break}case"attributes":{const i=e.target;let a=e.attributeName,u=e.target.getAttribute(a);if("value"===a){const e=Yt(i);u=Zt({element:i,maskInputOptions:this.maskInputOptions,tagName:i.tagName,type:e,value:u,maskInputFn:this.maskInputFn}).value}if(z(e.target,this.blockClass,this.blockSelector,!1)||u===e.oldValue)return;let b=this.attributeMap.get(e.target);if("IFRAME"===i.tagName&&"src"===a&&!this.keepIframeSrcFn(u)){if(i.contentDocument)return;a="rr_src"}if(b||(b={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(b),this.attributeMap.set(e.target,b)),"type"===a&&"INPUT"===i.tagName&&"password"===(e.oldValue||"").toLowerCase()&&i.setAttribute("data-rr-is-password","true"),!Yr(i.tagName,a)&&(b.attributes[a]=Zr(this.doc,ae(i.tagName),ae(a),u),"style"===a)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");e.oldValue&&a.setAttribute("style",e.oldValue);for(const e of Array.from(i.style)){const u=i.style.getPropertyValue(e),w=i.style.getPropertyPriority(e);u!==a.style.getPropertyValue(e)||w!==a.style.getPropertyPriority(e)?b.styleDiff[e]=""===w?u:[u,w]:b._unchangedStyles[e]=[u,w]}for(const e of Array.from(a.style))""===i.style.getPropertyValue(e)&&(b.styleDiff[e]=!1)}break}case"childList":if(z(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((i=>this.genAdds(i,e.target))),e.removedNodes.forEach((i=>{const a=this.mirror.getId(i),u=Ie(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);z(e.target,this.blockClass,this.blockSelector,!1)||xt(i,this.mirror,this.slimDOMOptions)||!function Ci(e,i){return-1!==i.getId(e)}(i,this.mirror)||(this.addedSet.has(i)?(Gt(this.addedSet,i),this.droppedSet.add(i)):this.addedSet.has(e.target)&&-1===a||Fs(e.target,this.mirror)||(this.movedSet.has(i)&&this.movedMap[Nr(a,u)]?Gt(this.movedSet,i):this.removes.push({parentId:u,id:a,isShadow:!(!Ie(e.target)||!ve(e.target))||void 0})),this.mapRemoves.push(i))}))}})),y(this,"genAdds",((e,i)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(xt(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let a=null;i&&this.mirror.hasNode(i)&&(a=this.mirror.getId(i)),a&&-1!==a&&(this.movedMap[Nr(this.mirror.getId(e),a)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);z(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Bt(e)&&e.shadowRoot.childNodes.forEach((i=>{this.processedNodeManager.add(i,this),this.genAdds(i,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((i=>{this[i]=e[i]}))}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 Gt(e,i){e.delete(i),i.childNodes.forEach((i=>Gt(e,i)))}function Dr(e,i,a){return 0!==e.length&&function Li(e,i,a){let u=i.parentNode;for(;u;){const i=a.getId(u);if(e.some((e=>e.id===i)))return!0;u=u.parentNode}return!1}(e,i,a)}function Pr(e,i){return 0!==e.size&&Vs(e,i)}function Vs(e,i){const{parentNode:a}=i;return!!a&&(!!e.has(a)||Vs(e,a))}const wo=[];function De(e){try{if("composedPath"in e){const i=e.composedPath();if(i.length)return i[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function js(e,i){var a,u;const b=new Ti;wo.push(b),b.init(e);let w=window.MutationObserver||window.__rrMutationObserver;const S=null==(u=null==(a=null==window?void 0:window.Zone)?void 0:a.__symbol__)?void 0:u.call(a,"MutationObserver");S&&window[S]&&(w=window[S]);const v=new w(M(b.processMutations.bind(b)));return v.observe(i,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),v}function Di({mouseInteractionCb:e,doc:i,mirror:a,blockClass:u,blockSelector:b,sampling:w}){if(!1===w.mouseInteraction)return()=>{};const S=!0===w.mouseInteraction||void 0===w.mouseInteraction?{}:w.mouseInteraction,v=[];let k=null;return Object.keys(uo).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==S[e])).forEach((w=>{let S=ae(w);const C=(i=>w=>{const S=De(w);if(z(S,u,b,!0))return;let v=null,C=i;if("pointerType"in w){switch(w.pointerType){case"mouse":v=ho.Mouse;break;case"touch":v=ho.Touch;break;case"pen":v=ho.Pen}v===ho.Touch?uo[i]===uo.MouseDown?C="TouchStart":uo[i]===uo.MouseUp&&(C="TouchEnd"):ho.Pen}else Ht(w)&&(v=ho.Touch);null!==v?(k=v,(C.startsWith("Touch")&&v===ho.Touch||C.startsWith("Mouse")&&v===ho.Mouse)&&(v=null)):uo[i]===uo.Click&&(v=k,k=null);const I=Ht(w)?w.changedTouches[0]:w;if(!I)return;const x=a.getId(S),{clientX:O,clientY:_}=I;M(e)({type:uo[C],id:x,x:O,y:_,...null!==v&&{pointerType:v}})})(w);if(window.PointerEvent)switch(uo[w]){case uo.MouseDown:case uo.MouseUp:S=S.replace("mouse","pointer");break;case uo.TouchStart:case uo.TouchEnd:return}v.push(U(S,C,i))})),M((()=>{v.forEach((e=>e()))}))}function Hs({scrollCb:e,doc:i,mirror:a,blockClass:u,blockSelector:b,sampling:w}){const S=M(Te(M((w=>{const S=De(w);if(!S||z(S,u,b,!0))return;const v=a.getId(S);if(S===i&&i.defaultView){const a=Ns(i.defaultView);e({id:v,x:a.left,y:a.top})}else e({id:v,x:S.scrollLeft,y:S.scrollTop})})),w.scroll||100));return U("scroll",S,i)}const So=["INPUT","TEXTAREA","SELECT"],ko=new WeakMap;function at(e){return function r(e,i){if(Ge("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||Ge("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||Ge("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||Ge("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const a=Array.from(e.parentRule.cssRules).indexOf(e);i.unshift(a)}else if(e.parentStyleSheet){const a=Array.from(e.parentStyleSheet.cssRules).indexOf(e);i.unshift(a)}return i}(e,[])}function se(e,i,a){let u,b;return e?(e.ownerNode?u=i.getId(e.ownerNode):b=a.getId(e),{styleId:b,id:u}):{}}function Bs({mirror:e,stylesheetManager:i},a){var u,b,w;let S=null;S="#document"===a.nodeName?e.getId(a):e.getId(a.host);const v="#document"===a.nodeName?null==(u=a.defaultView)?void 0:u.Document:null==(w=null==(b=a.ownerDocument)?void 0:b.defaultView)?void 0:w.ShadowRoot,k=null!=v&&v.prototype?Object.getOwnPropertyDescriptor(null==v?void 0:v.prototype,"adoptedStyleSheets"):void 0;return null!==S&&-1!==S&&v&&k?(Object.defineProperty(a,"adoptedStyleSheets",{configurable:k.configurable,enumerable:k.enumerable,get(){var e;return null==(e=k.get)?void 0:e.call(this)},set(e){var a;const u=null==(a=k.set)?void 0:a.call(this,e);if(null!==S&&-1!==S)try{i.adoptStyleSheets(e,S)}catch{}return u}}),M((()=>{Object.defineProperty(a,"adoptedStyleSheets",{configurable:k.configurable,enumerable:k.enumerable,get:k.get,set:k.set})}))):()=>{}}function Bi(e,i={}){const a=e.doc.defaultView;if(!a)return()=>{};let u;!function Hi(e,i){const{mutationCb:a,mousemoveCb:u,mouseInteractionCb:b,scrollCb:w,viewportResizeCb:S,inputCb:v,mediaInteractionCb:k,styleSheetRuleCb:C,styleDeclarationCb:I,canvasMutationCb:x,fontCb:O,selectionCb:_,customElementCb:N}=e;e.mutationCb=(...e)=>{i.mutation&&i.mutation(...e),a(...e)},e.mousemoveCb=(...e)=>{i.mousemove&&i.mousemove(...e),u(...e)},e.mouseInteractionCb=(...e)=>{i.mouseInteraction&&i.mouseInteraction(...e),b(...e)},e.scrollCb=(...e)=>{i.scroll&&i.scroll(...e),w(...e)},e.viewportResizeCb=(...e)=>{i.viewportResize&&i.viewportResize(...e),S(...e)},e.inputCb=(...e)=>{i.input&&i.input(...e),v(...e)},e.mediaInteractionCb=(...e)=>{i.mediaInteaction&&i.mediaInteaction(...e),k(...e)},e.styleSheetRuleCb=(...e)=>{i.styleSheetRule&&i.styleSheetRule(...e),C(...e)},e.styleDeclarationCb=(...e)=>{i.styleDeclaration&&i.styleDeclaration(...e),I(...e)},e.canvasMutationCb=(...e)=>{i.canvasMutation&&i.canvasMutation(...e),x(...e)},e.fontCb=(...e)=>{i.font&&i.font(...e),O(...e)},e.selectionCb=(...e)=>{i.selection&&i.selection(...e),_(...e)},e.customElementCb=(...e)=>{i.customElement&&i.customElement(...e),N(...e)}}(e,i),e.recordDOM&&(u=js(e,e.doc));const b=function Ni({mousemoveCb:e,sampling:i,doc:a,mirror:u}){if(!1===i.mousemove)return()=>{};const b="number"==typeof i.mousemove?i.mousemove:50,w="number"==typeof i.mousemoveCallback?i.mousemoveCallback:500;let S,v=[];const k=Te(M((i=>{const a=Date.now()-S;e(v.map((e=>(e.timeOffset-=a,e))),i),v=[],S=null})),w),C=M(Te(M((e=>{const i=De(e),{clientX:a,clientY:b}=Ht(e)?e.changedTouches[0]:e;S||(S=bo()),v.push({x:a,y:b,id:u.getId(i),timeOffset:bo()-S}),k(typeof DragEvent<"u"&&e instanceof DragEvent?co.Drag:e instanceof MouseEvent?co.MouseMove:co.TouchMove)})),b,{trailing:!1})),I=[U("mousemove",C,a),U("touchmove",C,a),U("drag",C,a)];return M((()=>{I.forEach((e=>e()))}))}(e),w=Di(e),S=Hs(e),v=function Pi({viewportResizeCb:e},{win:i}){let a=-1,u=-1;return U("resize",M(Te(M((()=>{const i=Ds(),b=Ps();(a!==i||u!==b)&&(e({width:Number(b),height:Number(i)}),a=i,u=b)})),200)),i)}(e,{win:a}),k=function Fi({inputCb:e,doc:i,mirror:a,blockClass:u,blockSelector:b,ignoreClass:w,ignoreSelector:S,maskInputOptions:v,maskInputFn:k,sampling:C,userTriggeredOnInput:I}){function p(e){let a=De(e);const C=e.isTrusted,x=a&&a.tagName;if(a&&"OPTION"===x&&(a=a.parentElement),!a||!x||So.indexOf(x)<0||z(a,u,b,!0)||a.classList.contains(w)||S&&a.matches(S))return;let O=a.value,_=!1;const N=Yt(a)||"",{value:D,masked:A}=Zt({element:a,maskInputOptions:v,tagName:x,type:N,value:O,maskInputFn:k});O=D,("radio"===N||"checkbox"===N)&&(_=a.checked),f(a,I?{text:O,isChecked:_,masked:A,userTriggered:C}:{text:O,isChecked:_,masked:A});const F=a.name;"radio"===N&&F&&_&&i.querySelectorAll(`input[type="radio"][name="${F}"]`).forEach((e=>{if(e!==a){const i=e.value;f(e,I?{text:i,isChecked:!_,masked:A,userTriggered:!1}:{text:i,isChecked:!_,masked:A})}}))}function f(i,u){const b=ko.get(i);if(!b||b.text!==u.text||b.isChecked!==u.isChecked||b.masked!==u.masked){ko.set(i,u);const b=a.getId(i);M(e)({...u,id:b})}}const x=("last"===C.input?["change"]:["input","change"]).map((e=>U(e,M(p),i))),O=i.defaultView;if(!O)return()=>{x.forEach((e=>e()))};const _=O.Object.getOwnPropertyDescriptor(O.HTMLInputElement.prototype,"value"),N=[[O.HTMLInputElement.prototype,"value"],[O.HTMLInputElement.prototype,"checked"],[O.HTMLSelectElement.prototype,"value"],[O.HTMLTextAreaElement.prototype,"value"],[O.HTMLSelectElement.prototype,"selectedIndex"],[O.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&x.push(...N.map((e=>mt(e[0],e[1],{set(){M(p)({target:this,isTrusted:!1})}},!1,O)))),M((()=>{x.forEach((e=>e()))}))}(e),C=function Ui({mediaInteractionCb:e,blockClass:i,blockSelector:a,mirror:u,sampling:b,doc:w}){const S=M((w=>Te(M((b=>{const S=De(b);if(!S||z(S,i,a,!0))return;const{currentTime:v,volume:k,muted:C,playbackRate:I,loop:x}=S;e({type:w,id:u.getId(S),currentTime:v,volume:k,muted:C,playbackRate:I,loop:x})})),b.media||500))),v=[U("play",S(fo.Play),w),U("pause",S(fo.Pause),w),U("seeked",S(fo.Seeked),w),U("volumechange",S(fo.VolumeChange),w),U("ratechange",S(fo.RateChange),w)];return M((()=>{v.forEach((e=>e()))}))}(e);let h=()=>{},p=()=>{},f=()=>{},d3=()=>{};e.recordDOM&&(h=function Wi({styleSheetRuleCb:e,mirror:i,stylesheetManager:a},{win:u}){if(!u.CSSStyleSheet||!u.CSSStyleSheet.prototype)return()=>{};const b=u.CSSStyleSheet.prototype.insertRule;u.CSSStyleSheet.prototype.insertRule=new Proxy(b,{apply:M(((u,b,w)=>{const[S,v]=w,{id:k,styleId:C}=se(b,i,a.styleMirror);return(k&&-1!==k||C&&-1!==C)&&e({id:k,styleId:C,adds:[{rule:S,index:v}]}),u.apply(b,w)}))});const w=u.CSSStyleSheet.prototype.deleteRule;let S,v;u.CSSStyleSheet.prototype.deleteRule=new Proxy(w,{apply:M(((u,b,w)=>{const[S]=w,{id:v,styleId:k}=se(b,i,a.styleMirror);return(v&&-1!==v||k&&-1!==k)&&e({id:v,styleId:k,removes:[{index:S}]}),u.apply(b,w)}))}),u.CSSStyleSheet.prototype.replace&&(S=u.CSSStyleSheet.prototype.replace,u.CSSStyleSheet.prototype.replace=new Proxy(S,{apply:M(((u,b,w)=>{const[S]=w,{id:v,styleId:k}=se(b,i,a.styleMirror);return(v&&-1!==v||k&&-1!==k)&&e({id:v,styleId:k,replace:S}),u.apply(b,w)}))})),u.CSSStyleSheet.prototype.replaceSync&&(v=u.CSSStyleSheet.prototype.replaceSync,u.CSSStyleSheet.prototype.replaceSync=new Proxy(v,{apply:M(((u,b,w)=>{const[S]=w,{id:v,styleId:k}=se(b,i,a.styleMirror);return(v&&-1!==v||k&&-1!==k)&&e({id:v,styleId:k,replaceSync:S}),u.apply(b,w)}))}));const k={};Ze("CSSGroupingRule")?k.CSSGroupingRule=u.CSSGroupingRule:(Ze("CSSMediaRule")&&(k.CSSMediaRule=u.CSSMediaRule),Ze("CSSConditionRule")&&(k.CSSConditionRule=u.CSSConditionRule),Ze("CSSSupportsRule")&&(k.CSSSupportsRule=u.CSSSupportsRule));const C={};return Object.entries(k).forEach((([u,b])=>{C[u]={insertRule:b.prototype.insertRule,deleteRule:b.prototype.deleteRule},b.prototype.insertRule=new Proxy(C[u].insertRule,{apply:M(((u,b,w)=>{const[S,v]=w,{id:k,styleId:C}=se(b.parentStyleSheet,i,a.styleMirror);return(k&&-1!==k||C&&-1!==C)&&e({id:k,styleId:C,adds:[{rule:S,index:[...at(b),v||0]}]}),u.apply(b,w)}))}),b.prototype.deleteRule=new Proxy(C[u].deleteRule,{apply:M(((u,b,w)=>{const[S]=w,{id:v,styleId:k}=se(b.parentStyleSheet,i,a.styleMirror);return(v&&-1!==v||k&&-1!==k)&&e({id:v,styleId:k,removes:[{index:[...at(b),S]}]}),u.apply(b,w)}))})})),M((()=>{u.CSSStyleSheet.prototype.insertRule=b,u.CSSStyleSheet.prototype.deleteRule=w,S&&(u.CSSStyleSheet.prototype.replace=S),v&&(u.CSSStyleSheet.prototype.replaceSync=v),Object.entries(k).forEach((([e,i])=>{i.prototype.insertRule=C[e].insertRule,i.prototype.deleteRule=C[e].deleteRule}))}))}(e,{win:a}),p=Bs(e,e.doc),f=function _i({styleDeclarationCb:e,mirror:i,ignoreCSSAttributes:a,stylesheetManager:u},{win:b}){const w=b.CSSStyleDeclaration.prototype.setProperty;b.CSSStyleDeclaration.prototype.setProperty=new Proxy(w,{apply:M(((b,S,v)=>{var k;const[C,I,x]=v;if(a.has(C))return w.apply(S,[C,I,x]);const{id:O,styleId:_}=se(null==(k=S.parentRule)?void 0:k.parentStyleSheet,i,u.styleMirror);return(O&&-1!==O||_&&-1!==_)&&e({id:O,styleId:_,set:{property:C,value:I,priority:x},index:at(S.parentRule)}),b.apply(S,v)}))});const S=b.CSSStyleDeclaration.prototype.removeProperty;return b.CSSStyleDeclaration.prototype.removeProperty=new Proxy(S,{apply:M(((b,w,v)=>{var k;const[C]=v;if(a.has(C))return S.apply(w,[C]);const{id:I,styleId:x}=se(null==(k=w.parentRule)?void 0:k.parentStyleSheet,i,u.styleMirror);return(I&&-1!==I||x&&-1!==x)&&e({id:I,styleId:x,remove:{property:C},index:at(w.parentRule)}),b.apply(w,v)}))}),M((()=>{b.CSSStyleDeclaration.prototype.setProperty=w,b.CSSStyleDeclaration.prototype.removeProperty=S}))}(e,{win:a}),e.collectFonts&&(d3=function zi({fontCb:e,doc:i}){const a=i.defaultView;if(!a)return()=>{};const u=[],b=new WeakMap,w=a.FontFace;a.FontFace=function(e,i,a){const u=new w(e,i,a);return b.set(u,{family:e,buffer:"string"!=typeof i,descriptors:a,fontSource:"string"==typeof i?i:JSON.stringify(Array.from(new Uint8Array(i)))}),u};const S=Se(i.fonts,"add",(function(i){return function(a){return setTimeout(M((()=>{const i=b.get(a);i&&(e(i),b.delete(a))})),0),i.apply(this,[a])}}));return u.push((()=>{a.FontFace=w})),u.push(S),M((()=>{u.forEach((e=>e()))}))}(e)));const I=function Vi(e){const{doc:i,mirror:a,blockClass:u,blockSelector:b,selectionCb:w}=e;let S=!0;const v=M((()=>{const e=i.getSelection();if(!e||S&&null!=e&&e.isCollapsed)return;S=e.isCollapsed||!1;const v=[],k=e.rangeCount||0;for(let i=0;i<k;i++){const w=e.getRangeAt(i),{startContainer:S,startOffset:k,endContainer:C,endOffset:I}=w;z(S,u,b,!0)||z(C,u,b,!0)||v.push({start:a.getId(S),startOffset:k,end:a.getId(C),endOffset:I})}w({ranges:v})}));return v(),U("selectionchange",v)}(e),x=function ji({doc:e,customElementCb:i}){const a=e.defaultView;return a&&a.customElements?Se(a.customElements,"define",(function(e){return function(a,u,b){try{i({define:{name:a}})}catch{console.warn(`Custom element callback failed for ${a}`)}return e.apply(this,[a,u,b])}})):()=>{}}(e),O=[];for(const i of e.plugins)O.push(i.observer(i.callback,a,i.options));return M((()=>{wo.forEach((e=>e.reset())),null==u||u.disconnect(),b(),w(),S(),v(),k(),C(),h(),p(),f(),d3(),I(),x(),O.forEach((e=>e()))}))}function Ge(e){return typeof window[e]<"u"}function Ze(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}const Co="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",Io=typeof self<"u"&&self.Blob&&new Blob([(Mo=Co,Uint8Array.from(atob(Mo),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Mo;function Zi(e){let i;try{if(i=Io&&(self.URL||self.webkitURL).createObjectURL(Io),!i)throw"";const a=new Worker(i,{name:null==e?void 0:e.name});return a.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(i)})),a}catch{return new Worker("data:text/javascript;base64,"+Co,{name:null==e?void 0:e.name})}finally{i&&(self.URL||self.webkitURL).revokeObjectURL(i)}}for(var xo="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ro=typeof Uint8Array>"u"?[]:new Uint8Array(256),Eo=0;Eo<64;Eo++)Ro[xo.charCodeAt(Eo)]=Eo;const _o=new Map;const Zs=(e,i,a)=>{if(!e||!Xs(e,i)&&"object"!=typeof e)return;const u=function $i(e,i){let a=_o.get(e);return a||(a=new Map,_o.set(e,a)),a.has(i)||a.set(i,[]),a.get(i)}(a,e.constructor.name);let b=u.indexOf(e);return-1===b&&(b=u.length,u.push(e)),b};function Je(e,i,a){if(e instanceof Array)return e.map((e=>Je(e,i,a)));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){const i=e.constructor.name,a=function(e){var i,a=new Uint8Array(e),u=a.length,b="";for(i=0;i<u;i+=3)b+=xo[a[i]>>2],b+=xo[(3&a[i])<<4|a[i+1]>>4],b+=xo[(15&a[i+1])<<2|a[i+2]>>6],b+=xo[63&a[i+2]];return u%3==2?b=b.substring(0,b.length-1)+"=":u%3==1&&(b=b.substring(0,b.length-2)+"=="),b}(e);return{rr_type:i,base64:a}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Je(e.buffer,i,a),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const i=e.constructor.name,{src:a}=e;return{rr_type:i,src:a}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Je(e.data,i,a),e.width,e.height]};if(Xs(e,i)||"object"==typeof e){return{rr_type:e.constructor.name,index:Zs(e,i,a)}}return e}const Ys=(e,i,a)=>e.map((e=>Je(e,i,a))),Xs=(e,i)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof i[e])).find((a=>e instanceof i[a]));function _r(e,i,a,u){const b=[];try{const w=Se(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(b,...w){if(!z(this,i,a,!0)){const e=function Ki(e){return"experimental-webgl"===e?"webgl":e}(b);if("__context"in this||(this.__context=e),u&&["webgl","webgl2"].includes(e))if(w[0]&&"object"==typeof w[0]){const e=w[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else w.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[b,...w])}}));b.push(w)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{b.forEach((e=>e()))}}function Ur(e,i,a,u,b,w){const S=[],v=Object.getOwnPropertyNames(e);for(const k of v)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(k))try{if("function"!=typeof e[k])continue;const v=Se(e,k,(function(e){return function(...S){const v=e.apply(this,S);if(Zs(v,w,this),"tagName"in this.canvas&&!z(this.canvas,u,b,!0)){const e=Ys(S,w,this),u={type:i,property:k,args:e};a(this.canvas,u)}return v}}));S.push(v)}catch{const u=mt(e,k,{set(e){a(this.canvas,{type:i,property:k,args:[e],setter:!0})}});S.push(u)}return S}class qi{constructor(e){y(this,"pendingCanvasMutations",new Map),y(this,"rafStamps",{latestId:0,invokeId:null}),y(this,"mirror"),y(this,"mutationCb"),y(this,"resetObservers"),y(this,"frozen",!1),y(this,"locked",!1),y(this,"processMutation",((e,i)=>{(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(i)}));const{sampling:i="all",win:a,blockClass:u,blockSelector:b,recordCanvas:w,dataURLOptions:S}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,w&&"all"===i&&this.initCanvasMutationObserver(a,u,b),w&&"number"==typeof i&&this.initCanvasFPSObserver(i,a,u,b,{dataURLOptions:S})}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,i,a,u,b){const w=_r(i,a,u,!0),S=new Map,v=new Zi;v.onmessage=e=>{const{id:i}=e.data;if(S.set(i,!1),!("base64"in e.data))return;const{base64:a,type:u,width:b,height:w}=e.data;this.mutationCb({id:i,type:po["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:a}],type:u}]},0,0]}]})};const k=1e3/e;let C,I=0;const d3=e=>{I&&e-I<k||(I=e,(()=>{const e=[];return i.document.querySelectorAll("canvas").forEach((i=>{z(i,a,u,!0)||e.push(i)})),e})().forEach((async e=>{var i;const a=this.mirror.getId(e);if(S.get(a)||0===e.width||0===e.height)return;if(S.set(a,!0),["webgl","webgl2"].includes(e.__context)){const a=e.getContext(e.__context);!1===(null==(i=null==a?void 0:a.getContextAttributes())?void 0:i.preserveDrawingBuffer)&&a.clear(a.COLOR_BUFFER_BIT)}const u=await createImageBitmap(e);v.postMessage({id:a,bitmap:u,width:e.width,height:e.height,dataURLOptions:b.dataURLOptions},[u])}))),C=requestAnimationFrame(d3)};C=requestAnimationFrame(d3),this.resetObservers=()=>{w(),cancelAnimationFrame(C)}}initCanvasMutationObserver(e,i,a){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const u=_r(e,i,a,!1),b=function Ji(e,i,a,u){const b=[],w=Object.getOwnPropertyNames(i.CanvasRenderingContext2D.prototype);for(const S of w)try{if("function"!=typeof i.CanvasRenderingContext2D.prototype[S])continue;const w=Se(i.CanvasRenderingContext2D.prototype,S,(function(b){return function(...w){return z(this.canvas,a,u,!0)||setTimeout((()=>{const a=Ys(w,i,this);e(this.canvas,{type:po["2D"],property:S,args:a})}),0),b.apply(this,w)}}));b.push(w)}catch{const a=mt(i.CanvasRenderingContext2D.prototype,S,{set(i){e(this.canvas,{type:po["2D"],property:S,args:[i],setter:!0})}});b.push(a)}return()=>{b.forEach((e=>e()))}}(this.processMutation.bind(this),e,i,a),w=function Qi(e,i,a,u){const b=[];return b.push(...Ur(i.WebGLRenderingContext.prototype,po.WebGL,e,a,u,i)),typeof i.WebGL2RenderingContext<"u"&&b.push(...Ur(i.WebGL2RenderingContext.prototype,po.WebGL2,e,a,u,i)),()=>{b.forEach((e=>e()))}}(this.processMutation.bind(this),e,i,a);this.resetObservers=()=>{u(),b(),w()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,i)=>{const a=this.mirror.getId(i);this.flushPendingCanvasMutationFor(i,a)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,i){if(this.frozen||this.locked)return;const a=this.pendingCanvasMutations.get(e);if(!a||-1===i)return;const u=a.map((e=>{const{type:i,...a}=e;return a})),{type:b}=a[0];this.mutationCb({id:i,type:b,commands:u}),this.pendingCanvasMutations.delete(e)}}class ea{constructor(){y(this,"nodeMap",new WeakMap),y(this,"active",!1)}inOtherBuffer(e,i){const a=this.nodeMap.get(e);return a&&Array.from(a).some((e=>e!==i))}add(e,i){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(i))}destroy(){}}class ta{constructor(e){y(this,"shadowDoms",new WeakSet),y(this,"mutationCb"),y(this,"scrollCb"),y(this,"bypassOptions"),y(this,"mirror"),y(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,i){if(!ve(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const a=js({...this.bypassOptions,doc:i,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>a.disconnect())),this.restoreHandlers.push(Hs({...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(e.host)),this.restoreHandlers.push(Bs({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,i){const a=this;this.restoreHandlers.push(Se(e.prototype,"attachShadow",(function(e){return function(u){const b=e.call(this,u);return this.shadowRoot&&zs(this)&&a.addShadowRoot(this.shadowRoot,i),b}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class ra{constructor(e){y(this,"trackedLinkElements",new WeakSet),y(this,"mutationCb"),y(this,"adoptedStyleSheetCb"),y(this,"styleMirror",new vi),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,i){"_cssText"in i.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:i.id,attributes:i.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,i){if(0===e.length)return;const a={id:i,styleIds:[]},u=[];for(const i of e){let e;this.styleMirror.has(i)?e=this.styleMirror.getId(i):(e=this.styleMirror.add(i),u.push({styleId:e,rules:Array.from(i.rules||CSSRule,((e,i)=>({rule:jr(e),index:i})))})),a.styleIds.push(e)}u.length>0&&(a.styles=u),this.adoptedStyleSheetCb(a)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let Lo,To,No,Do=!1;var Po;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Po=e.contentWindow)?void 0:Po.Array.from)||Array.from,document.body.removeChild(e)}}catch(Mo){console.debug("Unable to override Array.from",Mo)}const Ao=function on(){return new Hr}();function yt(e={}){const{emit:i,checkoutEveryNms:a,checkoutEveryNth:u,blockClass:b="rr-block",blockSelector:w=null,ignoreClass:S="rr-ignore",ignoreSelector:v=null,maskTextClass:k="rr-mask",maskTextSelector:C=null,inlineStylesheet:I=!0,maskAllInputs:x,maskInputOptions:O,slimDOMOptions:_,maskInputFn:N,maskTextFn:D,hooks:A,packFn:F,sampling:W={},dataURLOptions:j={},mousemoveWait:V,recordDOM:$=!0,recordCanvas:G=!1,recordCrossOriginIframes:H=!1,recordAfter:B=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:Z=!1,collectFonts:q=!1,inlineImages:Y=!1,plugins:K,keepIframeSrcFn:J=()=>!1,ignoreCSSAttributes:Q=new Set([]),errorHandler:ee}=e;!function xi(e){yo=e}(ee);const te=!H||window.parent===window;let re=!1;if(!te)try{window.parent.document&&(re=!1)}catch{re=!0}if(te&&!i)throw new Error("emit function is required");if(!te&&!re)return()=>{};void 0!==V&&void 0===W.mousemove&&(W.mousemove=V),Ao.reset();const ne=!0===x?{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!==O?O:{password:!0},oe=!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===_,headMetaDescKeywords:"all"===_,headTitleMutations:"all"===_}:_||{};!function Ii(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),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let i=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===i)return!0}while(i=i&&i.parentNode);return!1})}();let ie,le=0;const or=e=>{for(const i of K||[])i.eventProcessor&&(e=i.eventProcessor(e));return F&&!re&&(e=F(e)),e};Lo=(e,b)=>{var w;const S=e;if(S.timestamp=bo(),null!=(w=wo[0])&&w.isFrozen()&&S.type!==lo.FullSnapshot&&!(S.type===lo.IncrementalSnapshot&&S.data.source===co.Mutation)&&wo.forEach((e=>e.unfreeze())),te)null==i||i(or(S),b);else if(re){const e={type:"@sailfish-rrweb/rrweb",event:or(S),origin:window.location.origin,isCheckout:b};window.parent.postMessage(e,"*")}if(S.type===lo.FullSnapshot)ie=S,le=0;else if(S.type===lo.IncrementalSnapshot){if(S.data.source===co.Mutation&&S.data.isAttachIframe)return;le++;const e=u&&le>=u,i=a&&S.timestamp-ie.timestamp>a;(e||i)&&To(!0)}};const Pe=e=>{Lo({type:lo.IncrementalSnapshot,data:{source:co.Mutation,...e}})},ir=e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.Scroll,...e}}),ar=e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.CanvasMutation,...e}}),ce=new ra({mutationCb:Pe,adoptedStyleSheetCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.AdoptedStyleSheet,...e}})}),ue=new Ri({mirror:Ao,mutationCb:Pe,stylesheetManager:ce,recordCrossOriginIframes:H,wrappedEmit:Lo});for(const e of K||[])e.getMirror&&e.getMirror({nodeMirror:Ao,crossOriginIframeMirror:ue.crossOriginIframeMirror,crossOriginIframeStyleMirror:ue.crossOriginIframeStyleMirror});const he=new ea;No=new qi({recordCanvas:G,mutationCb:ar,win:window,blockClass:b,blockSelector:w,mirror:Ao,sampling:W.canvas,dataURLOptions:j});const de=new ta({mutationCb:Pe,scrollCb:ir,bypassOptions:{blockClass:b,blockSelector:w,maskTextClass:k,maskTextSelector:C,inlineStylesheet:I,maskInputOptions:ne,dataURLOptions:j,maskTextFn:D,maskInputFn:N,recordCanvas:G,inlineImages:Y,sampling:W,slimDOMOptions:oe,iframeManager:ue,stylesheetManager:ce,canvasManager:No,keepIframeSrcFn:J,processedNodeManager:he},mirror:Ao});To=(e=!1)=>{if(!$)return;Lo({type:lo.Meta,data:{href:window.location.href,width:Ps(),height:Ds()}},e),ce.reset(),de.init(),wo.forEach((e=>e.lock()));const i=function Rn(e,i){const{mirror:a=new Hr,blockClass:u="rr-block",blockSelector:b=null,maskTextClass:w="rr-mask",maskTextSelector:S=null,inlineStylesheet:v=!0,inlineImages:k=!1,recordCanvas:C=!1,maskAllInputs:I=!1,maskTextFn:x,maskInputFn:O,slimDOM:_=!1,dataURLOptions:N,preserveWhiteSpace:D,onSerialize:A,onIframeLoad:F,iframeLoadTimeout:W,onStylesheetLoad:j,stylesheetLoadTimeout:V,keepIframeSrcFn:$=()=>!1}=i||{};return pe(e,{doc:e,mirror:a,blockClass:u,blockSelector:b,maskTextClass:w,maskTextSelector:S,skipChild:!1,inlineStylesheet:v,maskInputOptions:!0===I?{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===I?{password:!0}:I,maskTextFn:x,maskInputFn:O,slimDOMOptions:!0===_||"all"===_?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===_,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===_?{}:_,dataURLOptions:N,inlineImages:k,recordCanvas:C,preserveWhiteSpace:D,onSerialize:A,onIframeLoad:F,iframeLoadTimeout:W,onStylesheetLoad:j,stylesheetLoadTimeout:V,keepIframeSrcFn:$,newlyAddedElement:!1})}(document,{mirror:Ao,blockClass:b,blockSelector:w,maskTextClass:k,maskTextSelector:C,inlineStylesheet:I,maskAllInputs:ne,maskTextFn:D,maskInputFn:N,slimDOM:oe,dataURLOptions:j,recordCanvas:G,inlineImages:Y,onSerialize:e=>{Ws(e,Ao)&&ue.addIframe(e),_s(e,Ao)&&ce.trackLinkElement(e),Bt(e)&&de.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,i)=>{ue.attachIframe(e,i),de.observeAttachShadow(e)},onStylesheetLoad:(e,i)=>{ce.attachLinkElement(e,i)},keepIframeSrcFn:J});if(!i)return console.warn("Failed to snapshot the document");Lo({type:lo.FullSnapshot,data:{node:i,initialOffset:Ns(window)}},e),wo.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ce.adoptStyleSheets(document.adoptedStyleSheets,Ao.getId(document))};try{const e=[],X=e=>{var i;return M(Bi)({mutationCb:Pe,mousemoveCb:(e,i)=>Lo({type:lo.IncrementalSnapshot,data:{source:i,positions:e}}),mouseInteractionCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.MouseInteraction,...e}}),scrollCb:ir,viewportResizeCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.ViewportResize,...e}}),inputCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.Input,...e}}),mediaInteractionCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.MediaInteraction,...e}}),styleSheetRuleCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.StyleSheetRule,...e}}),styleDeclarationCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.StyleDeclaration,...e}}),canvasMutationCb:ar,fontCb:e=>Lo({type:lo.IncrementalSnapshot,data:{source:co.Font,...e}}),selectionCb:e=>{Lo({type:lo.IncrementalSnapshot,data:{source:co.Selection,...e}})},customElementCb:e=>{Lo({type:lo.IncrementalSnapshot,data:{source:co.CustomElement,...e}})},blockClass:b,ignoreClass:S,ignoreSelector:v,maskTextClass:k,maskTextSelector:C,maskInputOptions:ne,inlineStylesheet:I,sampling:W,recordDOM:$,recordCanvas:G,inlineImages:Y,userTriggeredOnInput:Z,collectFonts:q,doc:e,maskInputFn:N,maskTextFn:D,keepIframeSrcFn:J,blockSelector:w,slimDOMOptions:oe,dataURLOptions:j,mirror:Ao,iframeManager:ue,stylesheetManager:ce,shadowDomManager:de,processedNodeManager:he,canvasManager:No,ignoreCSSAttributes:Q,plugins:(null==(i=null==K?void 0:K.filter((e=>e.observer)))?void 0:i.map((e=>({observer:e.observer,options:e.options,callback:i=>Lo({type:lo.Plugin,data:{plugin:e.name,payload:i}})}))))||[]},A)};ue.addLoadListener((i=>{try{e.push(X(i.contentDocument))}catch(e){console.warn(e)}}));const x2=()=>{To(),e.push(X(document)),Do=!0};return"interactive"===document.readyState||"complete"===document.readyState?x2():(e.push(U("DOMContentLoaded",(()=>{Lo({type:lo.DomContentLoaded,data:{}}),"DOMContentLoaded"===B&&x2()}))),e.push(U("load",(()=>{Lo({type:lo.Load,data:{}}),"load"===B&&x2()}),window))),()=>{e.forEach((e=>e())),he.destroy(),Do=!1,function Oi(){yo=void 0}()}}catch(e){console.warn(e)}}yt.addCustomEvent=(e,i)=>{if(!Do)throw new Error("please add custom event after start recording");Lo({type:lo.Custom,data:{tag:e,payload:i}})},yt.freezePage=()=>{wo.forEach((e=>e.freeze()))},yt.takeFullSnapshot=e=>{if(!Do)throw new Error("please take full snapshot after start recording");To(e)},yt.mirror=Ao;var Fo=(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))(Fo||{});function maskInputFn(e,i){var a;if("hidden"===i.type)return"";const u={creditCard:/\b(?:\d[ -]*?){13,16}\b/,ssn:/\b\d{3}-\d{2}-\d{4}\b/};return i.closest(".mask")?"*".repeat(e.length):i.hasAttribute("data-cc")||(null==(a=i.getAttribute("autocomplete"))?void 0:a.startsWith("cc-"))||u.creditCard.test(e)?"**** **** **** "+e.slice(-4):i.hasAttribute("data-ssn")||u.ssn.test(e)?"***-**-"+e.slice(-4):i.hasAttribute("data-dob")?"**/**/"+e.slice(-4):e}function initializeConsolePlugin(e){const{name:i,observer:a}=(e=>({name:"@sailfish-rrweb/rrweb/console@1",observer:R$1,options:e}))(e);a((e=>cacheEvents({type:Fo.Plugin,timestamp:Date.now(),data:{plugin:i,payload:e}})),window,e)}async function initializeRecording(e,i,a,u){const b=initializeWebSocket(i,a,u);try{yt({emit(e){cacheEvents(e)},maskInputOptions:{text:!0},maskInputFn:maskInputFn,maskTextClass:"sailfishSanitize",...e}),setInterval((()=>sendRecordingEvents(b)),1e4)}catch(e){console.error("Error importing plugins!",e)}return b}let Wo=null,Uo=null;function identify(e,i={},a=!1){const u={type:"identify",userId:e,traits:i};Wo&&Wo.userId===e&&JSON.stringify(Wo.traits)===JSON.stringify(i)||(Wo={userId:e,traits:i,overwrite:a},sendMessage(u))}function addOrUpdateMetadata(e){const i={type:"addOrUpdateMetadata",metadata:e};Uo&&JSON.stringify(Uo)===JSON.stringify(e)||(Uo=e,sendMessage(i))}const zo=["t.co","*.twitter.com","*.gravatar.com","*.googleapis.com","*.amazonaws.com","*.smooch.io","*.zendesk.com"],jo={recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!1,inlineImages:!1,recordPassword:!1,recordRealName:!0,recordCreditCardInfo:!1,recordSsn:!1,recordDob:!1,sampling:{}},Vo={level:["info","log","warn","error"],lengthThreshold:1e4,stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:20,depthOfLimit:1},logger:"console"};function trackDomainChanges(){let e=window.location.href;const checkDomainChange=(i=!1)=>{const a=window.location.href;if(i||a!==e){e=a;sendMessage({type:"routeChange",data:{url:a,timestamp:Date.now()}})}},i=function debounce(e,i){let a;return function(...u){clearTimeout(a),a=setTimeout((()=>e(...u)),i)}}((()=>checkDomainChange()),500);checkDomainChange(!0),setInterval(i,1e3)}function getOrSetSessionId(){return window.name||(window.name=v4()),window.name}function matchUrlWithWildcard(e,i){if(!e||"string"!=typeof e)throw new Error("Invalid URL input");const a=(e.match(/^[a-zA-Z]+:\/\//)?e:`http://${e}`).replace(/^[a-zA-Z]+:\/\//,""),u=new URL("http://"+a),{hostname:b,pathname:w,port:S}=u,v=b.startsWith("www.")?b.slice(4).toLowerCase():b.toLowerCase();return i.some((e=>{const i=e.replace(/^[a-zA-Z]+:\/\//,"");let[a,u]=i.split("/",2),b="";a.includes(":")&&([a,b]=a.split(":"));const k=a.replace(/\./g,"\\.").replace(/\*/g,".*"),C=new RegExp(`^${k}$`,"i"),I=v.startsWith("www.")?v.slice(4):v;if(b&&S!==b)return!1;if(a.startsWith("*.")&&(v===a.slice(2)||I===a.slice(2))){if(u){const e=u.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(w)}return!0}if(!C.test(I)&&!C.test(v))return!1;if(u){const e=u.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(w)}return!0}))}async function startRecording({apiKey:e,backendApi:i="https://api-service.sailfishqa.com",domainsToPropagateHeaderTo:a=[],domainsToNotPropagateHeaderTo:u=[],serviceVersion:b=""}){var w,S;initializeConsolePlugin(Vo);let v=getOrSetSessionId();!function storeCredentialsAndConnection({apiKey:e,backendApi:i}){sessionStorage.setItem("sailfishApiKey",e),sessionStorage.setItem("sailfishBackendApi",i)}({apiKey:e,backendApi:i}),trackDomainChanges(),u.length>0&&sendDomainsToNotPropagateHeaderTo(e,u,i).catch((e=>console.error("Failed to send domains to not propagate header to:",e))),function setupXMLHttpRequestInterceptor(e,i=[]){const a=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send,b=getOrSetSessionId(),w=[...zo,...e];XMLHttpRequest.prototype.open=function(e,i,...u){return this._requestUrl="string"==typeof i&&i.length>0?i:null,a.apply(this,[e,i,...u])},XMLHttpRequest.prototype.send=function(...e){const a=this._requestUrl;if(!a)return u.apply(this,e);if(matchUrlWithWildcard(a,w))return u.apply(this,e);const S=0===i.length||matchUrlWithWildcard(a,i);if(b&&S)try{this.setRequestHeader("X-Sf3-Rid",b)}catch(e){console.warn(`Could not set X-Sf3-Rid header for ${a}`,e)}return u.apply(this,e)}}(u,a),function setupFetchInterceptor(e,i=[]){const a=window.fetch,u=getOrSetSessionId(),b=[...zo,...e],w=new Map;function injectHeader(e,i,a,u,b,w){if(w){if(u instanceof Request){const a=u.clone(),S=new Headers(a.headers);S.set("X-Sf3-Rid",w);const v=new Request(a,{headers:S});return e.call(i,v,b)}{const a={...b},S=new Headers(b.headers||{});return S.set("X-Sf3-Rid",w),a.headers=S,e.call(i,u,a)}}return e.apply(i,a)}window.fetch=new Proxy(a,{apply:(e,a,S)=>{let v,k=S[0],C=S[1]||{};if("string"==typeof k)v=k;else if(k instanceof Request)v=k.url;else{if(!(k instanceof URL))return e.apply(a,S);v=k.href}if(w.has(v)){const i=w.get(v);if("ignore"===i)return e.apply(a,S);if("propagate"===i)return injectHeader(e,a,S,k,C,u)}return matchUrlWithWildcard(v,b)?(w.set(v,"ignore"),e.apply(a,S)):0===i.length||matchUrlWithWildcard(v,i)?(w.set(v,"propagate"),injectHeader(e,a,S,k,C,u)):(w.set(v,"ignore"),e.apply(a,S))}})}(u,a),async function gatherAndCacheDeviceInfo(){sendMessage({type:"deviceInfo",data:{deviceInfo:{language:navigator.language,userAgent:navigator.userAgent}}})}();try{const a=(null==(w=(await fetchCaptureSettings(e,i)).data)?void 0:w.captureSettingsFromApiKey)||jo,u=await startRecordingSession(e,v,i);if(null==(S=u.data)?void 0:S.startRecordingSession){const u=await initializeRecording(a,i,e,v);!function sendMapUuidIfAvailable(e){window.sfMapUuid&&sendMessage({type:"mapUuid",data:{mapUuid:window.sfMapUuid,serviceVersion:e}})}(b),setInterval((()=>sendRecordingEvents(u)),1e4)}else console.error("Failed to start recording session:",u.errors||u)}catch(e){console.error("Error starting recording:",e)}}!function sendUserDeviceUuid(){sendMessage({type:"userDeviceUuid",userDeviceUuid:function getOrSetUserDeviceUuid(){let e=localStorage.getItem("sailfishUserDeviceUuid");e||(e=v4(),localStorage.setItem("sailfishUserDeviceUuid",e));return e}()})}(),function sendTimeZone(){sendMessage({type:"timeZone",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}(),document.addEventListener("visibilitychange",(function handleVisibilityChange(){"visible"===document.visibilityState&&getOrSetSessionId()}));export{jo as DEFAULT_CAPTURE_SETTINGS,Vo as DEFAULT_CONSOLE_RECORDING_SETTINGS,addOrUpdateMetadata,cacheEvents,fetchCaptureSettings,identify,initializeConsolePlugin,initializeRecording,initializeWebSocket,matchUrlWithWildcard,sendDomainsToNotPropagateHeaderTo,sendGraphQLRequest,sendMessage,sendRecordingEvents,startRecording,startRecordingSession};
|
|
1
|
+
import e from"react";for(var a,u=[],m=0;m<256;++m)u.push((m+256).toString(16).slice(1));var w=new Uint8Array(16);function rng(){if(!a&&!(a="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return a(w)}var b={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(e,a,m){if(b.randomUUID&&!e)return b.randomUUID();var w=(e=e||{}).random||(e.rng||rng)();return w[6]=15&w[6]|64,w[8]=63&w[8]|128,function unsafeStringify(e,a=0){return(u[e[a+0]]+u[e[a+1]]+u[e[a+2]]+u[e[a+3]]+"-"+u[e[a+4]]+u[e[a+5]]+"-"+u[e[a+6]]+u[e[a+7]]+"-"+u[e[a+8]]+u[e[a+9]]+"-"+u[e[a+10]]+u[e[a+11]]+u[e[a+12]]+u[e[a+13]]+u[e[a+14]]+u[e[a+15]]).toLowerCase()}(w)}var extendStatics=function(e,a){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var u in a)a.hasOwnProperty(u)&&(e[u]=a[u])})(e,a)};function __extends(e,a){function __(){this.constructor=e}extendStatics(e,a),e.prototype=null===a?Object.create(a):(__.prototype=a.prototype,new __)}function __read(e,a){var u="function"==typeof Symbol&&e[Symbol.iterator];if(!u)return e;var m,w,b=u.call(e),S=[];try{for(;(void 0===a||a-- >0)&&!(m=b.next()).done;)S.push(m.value)}catch(e){w={error:e}}finally{try{m&&!m.done&&(u=b.return)&&u.call(b)}finally{if(w)throw w.error}}return S}var S=function(){return function Event2(e,a){this.target=a,this.type=e}}(),C=function(e){function ErrorEvent2(a,u){var m=e.call(this,"error",u)||this;return m.message=a.message,m.error=a,m}return __extends(ErrorEvent2,e),ErrorEvent2}(S),O=function(e){function CloseEvent2(a,u,m){void 0===a&&(a=1e3),void 0===u&&(u="");var w=e.call(this,"close",m)||this;return w.wasClean=!0,w.code=a,w.reason=u,w}return __extends(CloseEvent2,e),CloseEvent2}(S),x={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},I=function(){function ReconnectingWebSocket2(e,a,u){var m=this;void 0===u&&(u={}),this._listeners={error:[],message:[],open:[],close:[]},this._retryCount=-1,this._shouldReconnect=!0,this._connectLock=!1,this._binaryType="blob",this._closeCalled=!1,this._messageQueue=[],this.onclose=null,this.onerror=null,this.onmessage=null,this.onopen=null,this._handleOpen=function(e){m._debug("open event");var a=m._options.minUptime,u=void 0===a?x.minUptime:a;clearTimeout(m._connectTimeout),m._uptimeTimeout=setTimeout((function(){return m._acceptOpen()}),u),m._ws.binaryType=m._binaryType,m._messageQueue.forEach((function(e){return m._ws.send(e)})),m._messageQueue=[],m.onopen&&m.onopen(e),m._listeners.open.forEach((function(a){return m._callEventListener(e,a)}))},this._handleMessage=function(e){m._debug("message event"),m.onmessage&&m.onmessage(e),m._listeners.message.forEach((function(a){return m._callEventListener(e,a)}))},this._handleError=function(e){m._debug("error event",e.message),m._disconnect(void 0,"TIMEOUT"===e.message?"timeout":void 0),m.onerror&&m.onerror(e),m._debug("exec error listeners"),m._listeners.error.forEach((function(a){return m._callEventListener(e,a)})),m._connect()},this._handleClose=function(e){m._debug("close event"),m._clearTimeouts(),m._shouldReconnect&&m._connect(),m.onclose&&m.onclose(e),m._listeners.close.forEach((function(a){return m._callEventListener(e,a)}))},this._url=e,this._protocols=a,this._options=u,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}return Object.defineProperty(ReconnectingWebSocket2,"CONNECTING",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2,"OPEN",{get:function(){return 1},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2,"CLOSING",{get:function(){return 2},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2,"CLOSED",{get:function(){return 3},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"CONNECTING",{get:function(){return ReconnectingWebSocket2.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"OPEN",{get:function(){return ReconnectingWebSocket2.OPEN},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"CLOSING",{get:function(){return ReconnectingWebSocket2.CLOSING},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"CLOSED",{get:function(){return ReconnectingWebSocket2.CLOSED},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"binaryType",{get:function(){return this._ws?this._ws.binaryType:this._binaryType},set:function(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"retryCount",{get:function(){return Math.max(this._retryCount,0)},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"bufferedAmount",{get:function(){return this._messageQueue.reduce((function(e,a){return"string"==typeof a?e+=a.length:a instanceof Blob?e+=a.size:e+=a.byteLength,e}),0)+(this._ws?this._ws.bufferedAmount:0)},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"extensions",{get:function(){return this._ws?this._ws.extensions:""},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"protocol",{get:function(){return this._ws?this._ws.protocol:""},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"readyState",{get:function(){return this._ws?this._ws.readyState:this._options.startClosed?ReconnectingWebSocket2.CLOSED:ReconnectingWebSocket2.CONNECTING},enumerable:!0,configurable:!0}),Object.defineProperty(ReconnectingWebSocket2.prototype,"url",{get:function(){return this._ws?this._ws.url:""},enumerable:!0,configurable:!0}),ReconnectingWebSocket2.prototype.close=function(e,a){void 0===e&&(e=1e3),this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),this._ws?this._ws.readyState!==this.CLOSED?this._ws.close(e,a):this._debug("close: already closed"):this._debug("close enqueued: no ws instance")},ReconnectingWebSocket2.prototype.reconnect=function(e,a){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,this._ws&&this._ws.readyState!==this.CLOSED?(this._disconnect(e,a),this._connect()):this._connect()},ReconnectingWebSocket2.prototype.send=function(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",e),this._ws.send(e);else{var a=this._options.maxEnqueuedMessages,u=void 0===a?x.maxEnqueuedMessages:a;this._messageQueue.length<u&&(this._debug("enqueue",e),this._messageQueue.push(e))}},ReconnectingWebSocket2.prototype.addEventListener=function(e,a){this._listeners[e]&&this._listeners[e].push(a)},ReconnectingWebSocket2.prototype.dispatchEvent=function(e){var a,u,m=this._listeners[e.type];if(m)try{for(var w=function __values(e){var a="function"==typeof Symbol&&e[Symbol.iterator],u=0;return a?a.call(e):{next:function(){return e&&u>=e.length&&(e=void 0),{value:e&&e[u++],done:!e}}}}(m),b=w.next();!b.done;b=w.next()){var S=b.value;this._callEventListener(e,S)}}catch(e){a={error:e}}finally{try{b&&!b.done&&(u=w.return)&&u.call(w)}finally{if(a)throw a.error}}return!0},ReconnectingWebSocket2.prototype.removeEventListener=function(e,a){this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter((function(e){return e!==a})))},ReconnectingWebSocket2.prototype._debug=function(){for(var e=[],a=0;a<arguments.length;a++)e[a]=arguments[a];this._options.debug&&console.log.apply(console,function __spread(){for(var e=[],a=0;a<arguments.length;a++)e=e.concat(__read(arguments[a]));return e}(["RWS>"],e))},ReconnectingWebSocket2.prototype._getNextDelay=function(){var e=this._options,a=e.reconnectionDelayGrowFactor,u=void 0===a?x.reconnectionDelayGrowFactor:a,m=e.minReconnectionDelay,w=void 0===m?x.minReconnectionDelay:m,b=e.maxReconnectionDelay,S=void 0===b?x.maxReconnectionDelay:b,C=0;return this._retryCount>0&&(C=w*Math.pow(u,this._retryCount-1))>S&&(C=S),this._debug("next delay",C),C},ReconnectingWebSocket2.prototype._wait=function(){var e=this;return new Promise((function(a){setTimeout(a,e._getNextDelay())}))},ReconnectingWebSocket2.prototype._getNextUrl=function(e){if("string"==typeof e)return Promise.resolve(e);if("function"==typeof e){var a=e();if("string"==typeof a)return Promise.resolve(a);if(a.then)return a}throw Error("Invalid URL")},ReconnectingWebSocket2.prototype._connect=function(){var e=this;if(!this._connectLock&&this._shouldReconnect){this._connectLock=!0;var a=this._options,u=a.maxRetries,m=void 0===u?x.maxRetries:u,w=a.connectionTimeout,b=void 0===w?x.connectionTimeout:w,S=a.WebSocket,C=void 0===S?function(){if("undefined"!=typeof WebSocket)return WebSocket}():S;if(this._retryCount>=m)this._debug("max retries reached",this._retryCount,">=",m);else{if(this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),void 0===(O=C)||!O||2!==O.CLOSING)throw Error("No valid WebSocket class provided");var O;this._wait().then((function(){return e._getNextUrl(e._url)})).then((function(a){e._closeCalled||(e._debug("connect",{url:a,protocols:e._protocols}),e._ws=e._protocols?new C(a,e._protocols):new C(a),e._ws.binaryType=e._binaryType,e._connectLock=!1,e._addListeners(),e._connectTimeout=setTimeout((function(){return e._handleTimeout()}),b))}))}}},ReconnectingWebSocket2.prototype._handleTimeout=function(){this._debug("timeout event"),this._handleError(new C(Error("TIMEOUT"),this))},ReconnectingWebSocket2.prototype._disconnect=function(e,a){if(void 0===e&&(e=1e3),this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,a),this._handleClose(new O(e,a,this))}catch(e){}}},ReconnectingWebSocket2.prototype._acceptOpen=function(){this._debug("accept open"),this._retryCount=0},ReconnectingWebSocket2.prototype._callEventListener=function(e,a){"handleEvent"in a?a.handleEvent(e):a(e)},ReconnectingWebSocket2.prototype._removeListeners=function(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))},ReconnectingWebSocket2.prototype._addListeners=function(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))},ReconnectingWebSocket2.prototype._clearTimeouts=function(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)},ReconnectingWebSocket2}();let E=null;const _=[];function initializeWebSocket(e,a,u){const m=function getWebSocketHost(e){const a=document.createElement("a");return a.href=e,`${a.hostname}${a.port?`:${a.port}`:""}`}(e),w=new URL(e).protocol;return E=new I(`${"https:"===w?"wss":"ws"}://${m}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.6.2`,[],{connectionTimeout:3e4}),E.addEventListener("open",(()=>{!function flushMessageQueue(){if(E&&E.readyState===WebSocket.OPEN)for(;_.length>0;){const e=_.shift();e&&E.send(e)}}()})),E.addEventListener("close",(()=>{E=null})),E}function sendMessage(e){const a=JSON.stringify(e);E&&E.readyState===WebSocket.OPEN?E.send(a):_.push(a)}const N=new Error("request for lock canceled");var __awaiter$2=function(e,a,u,m){return new(u||(u=Promise))((function(w,b){function fulfilled(e){try{step(m.next(e))}catch(e){b(e)}}function rejected(e){try{step(m.throw(e))}catch(e){b(e)}}function step(e){e.done?w(e.value):function adopt(e){return e instanceof u?e:new u((function(a){a(e)}))}(e.value).then(fulfilled,rejected)}step((m=m.apply(e,a||[])).next())}))};class Semaphore{constructor(e,a=N){this._value=e,this._cancelError=a,this._queue=[],this._weightedWaiters=[]}acquire(e=1,a=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return new Promise(((u,m)=>{const w={resolve:u,reject:m,weight:e,priority:a},b=findIndexFromEnd(this._queue,(e=>a<=e.priority));-1===b&&e<=this._value?this._dispatchItem(w):this._queue.splice(b+1,0,w)}))}runExclusive(e){return __awaiter$2(this,arguments,void 0,(function*(e,a=1,u=0){const[m,w]=yield this.acquire(a,u);try{return yield e(m)}finally{w()}}))}waitForUnlock(e=1,a=0){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,a)?Promise.resolve():new Promise((u=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function insertSorted(e,a){const u=findIndexFromEnd(e,(e=>a.priority<=e.priority));e.splice(u+1,0,a)}(this._weightedWaiters[e-1],{resolve:u,priority:a})}))}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw new Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach((e=>e.reject(this._cancelError))),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){const a=this._value;this._value-=e.weight,e.resolve([a,this._newReleaser(e.weight)])}_newReleaser(e){let a=!1;return()=>{a||(a=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){const a=this._weightedWaiters[e-1];a&&(a.forEach((e=>e.resolve())),this._weightedWaiters[e-1]=[])}else{const e=this._queue[0].priority;for(let a=this._value;a>0;a--){const u=this._weightedWaiters[a-1];if(!u)continue;const m=u.findIndex((a=>a.priority<=e));(-1===m?u:u.splice(0,m)).forEach((e=>e.resolve()))}}}_couldLockImmediately(e,a){return(0===this._queue.length||this._queue[0].priority<a)&&e<=this._value}}function findIndexFromEnd(e,a){for(let u=e.length-1;u>=0;u--)if(a(e[u]))return u;return-1}var __awaiter$1=function(e,a,u,m){return new(u||(u=Promise))((function(w,b){function fulfilled(e){try{step(m.next(e))}catch(e){b(e)}}function rejected(e){try{step(m.throw(e))}catch(e){b(e)}}function step(e){e.done?w(e.value):function adopt(e){return e instanceof u?e:new u((function(a){a(e)}))}(e.value).then(fulfilled,rejected)}step((m=m.apply(e,a||[])).next())}))};const F=52428800;let W=[];const U=new class Mutex{constructor(e){this._semaphore=new Semaphore(1,e)}acquire(){return __awaiter$1(this,arguments,void 0,(function*(e=0){const[,a]=yield this._semaphore.acquire(1,e);return a}))}runExclusive(e,a=0){return this._semaphore.runExclusive((()=>e()),1,a)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}};function cacheEvents(e){U.runExclusive((()=>{W.push(e)}))}function sendRecordingEvents(e){U.runExclusive((()=>{if(e&&e.readyState===WebSocket.OPEN&&W.length>0){let a=[],u=0;const sendBatch=()=>{if(a.length>0){const m=JSON.stringify({type:"events",events:a});e.send(m),a=[],u=0}};for(const m of W){const w=new Blob([JSON.stringify(m)]).size;w>F?(console.error(`Event Type: ${m.type||"unknown"} exceeds 50MB limit! It may be rejected by the backend.`),e.send(JSON.stringify({type:"events",events:[m]}))):(u+w>F&&sendBatch(),a.push(m),u+=w)}sendBatch(),W=[]}}))}function sendGraphQLRequest(e,a,u,m=5,w=2e3,b=2){const S=`${u.backendApi}/graphql/?apiKey=${u.apiKey}`;return function exponentialBackoff(e,a,u=5,m=2e3,w=2){let b=0;const attemptRequest=async()=>{try{return await e()}catch(e){if(b++,b>u)throw e;const a=m*Math.pow(w,b-1);return await new Promise((e=>setTimeout(e,a))),attemptRequest()}};return attemptRequest()}((()=>fetch(S,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationName:e,query:a,variables:u})}).then((e=>{if(!e.ok)throw new Error(`GraphQL request failed with status ${e.status}`);return e.json()}))),0,m,w,b)}function fetchCaptureSettings(e,a){return sendGraphQLRequest("GetCaptureSettingsFromApiKey","\n query GetCaptureSettingsFromApiKey($apiKey: String!) {\n captureSettingsFromApiKey(apiKey: $apiKey) {\n recordCanvas\n recordCrossOriginIframes\n collectFonts\n inlineImages\n recordPassword\n recordRealName\n recordCreditCardInfo\n recordSsn\n recordDob\n sampling\n }\n }\n ",{apiKey:e,backendApi:a})}function startRecordingSession(e,a,u){return sendGraphQLRequest("StartSession","mutation StartSession($apiKey: UUID!, $recordingSessionId: UUID!) {\n startRecordingSession(companyApiKey: $apiKey, sessionId: $recordingSessionId) {\n id\n }\n }",{apiKey:e,recordingSessionId:a,backendApi:u})}function sendDomainsToNotPropagateHeaderTo(e,a,u){return sendGraphQLRequest("DomainsToNotPassHeaderTo","mutation DomainsToNotPassHeaderTo($apiKey: String!, $domains: [String!]!) {\n domainsToNotPassHeaderTo(apiKey: $apiKey, domains: $domains)\n }",{apiKey:e,domains:a,backendApi:u})}var j=Object.defineProperty,b$1=(e,a,u)=>((e,a,u)=>a in e?j(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u),$=Object.defineProperty,xn=(e,a,u)=>((e,a,u)=>a in e?$(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u),B=(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))(B||{});function vr(e){return e.nodeType===e.ELEMENT_NODE}function _e(e){const a=null==e?void 0:e.host;return(null==a?void 0:a.shadowRoot)===e}function Be(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function Tt(e){try{const a=e.rules||e.cssRules;return a?function wi(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}(Array.from(a,kr).join("")):null}catch{return null}}function kr(e){let a;if(function vi(e){return"styleSheet"in e}(e))try{a=Tt(e.styleSheet)||function bi(e){const{cssText:a}=e;if(a.split('"').length<3)return a;const u=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?u.push("layer"):e.layerName&&u.push(`layer(${e.layerName})`),e.supportsText&&u.push(`supports(${e.supportsText})`),e.media.length&&u.push(e.media.mediaText),u.join(" ")+";"}(e)}catch{}else if(function ki(e){return"selectorText"in e}(e)&&e.selectorText.includes(":"))return function Si(e){const a=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(a,"$1\\$2")}(e.cssText);return a||e.cssText}let V=class{constructor(){xn(this,"idNodeMap",new Map),xn(this,"nodeMetaMap",new WeakMap)}getId(e){var a;return e?(null==(a=this.getMeta(e))?void 0:a.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const a=this.getId(e);this.idNodeMap.delete(a),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,a){const u=a.id;this.idNodeMap.set(u,e),this.nodeMetaMap.set(e,a)}replace(e,a){const u=this.getNode(e);if(u){const e=this.nodeMetaMap.get(u);e&&this.nodeMetaMap.set(a,e)}this.idNodeMap.set(e,a)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Zt({element:e,maskInputOptions:a,tagName:u,type:m,value:w,maskInputFn:b}){let S=w||"",C="";const O=m&&fe(m);let x=!1;return(a[u.toLowerCase()]||O&&a[O])&&(C=b?b(S,e):"*".repeat(S.length),x=S!==C),{value:C,masked:x}}function fe(e){return e.toLowerCase()}const q="__rrweb_original__";function Yt(e){const a=e.type;return e.hasAttribute("data-rr-is-password")?"password":a?fe(a):null}function xr(e,a){let u;try{u=new URL(e,a??window.location.href)}catch{return null}const m=u.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==m?void 0:m[1])??null}let H=1;const Y=new RegExp("[^a-z0-9-_:]");function Ir(){return H++}let J,X;const Q=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ee=/^(?:[a-z+]+:)?\/\//i,te=/^www\..*/i,re=/^(data:)([^,]*),(.*)/i;function Pt(e,a){return(e||"").replace(Q,((e,u,m,w,b,S)=>{const C=m||b||S,O=u||w||"";if(!C)return e;if(ee.test(C)||te.test(C))return`url(${O}${C}${O})`;if(re.test(C))return`url(${O}${C}${O})`;if("/"===C[0])return`url(${O}${function Ei(e){let a="";return a=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],a=a.split("?")[0],a}(a)+C}${O})`;const x=a.split("/"),I=C.split("/");x.pop();for(const e of I)"."!==e&&(".."===e?x.pop():x.push(e));return`url(${O}${x.join("/")}${O})`}))}const ne=/^[^ \t\n\r\u000c]+/,se=/^[, \t\n\r\u000c]+/;const oe=new WeakMap;function At(e,a){return a&&""!==a.trim()?$t(e,a):a}function Fi(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function $t(e,a){let u=oe.get(e);if(u||(u=e.createElement("a"),oe.set(e,u)),a){if(a.startsWith("blob:")||a.startsWith("data:"))return a}else a="";return u.setAttribute("href",a),u.href}function Mr(e,a,u,m){return m&&("src"===u||"href"===u&&("use"!==a||"#"!==m[0])||"xlink:href"===u&&"#"!==m[0]||"background"===u&&("table"===a||"td"===a||"th"===a)?At(e,m):"srcset"===u?function Ni(e,a){if(""===a.trim())return a;let u=0;function n(e){let m;const w=e.exec(a.substring(u));return w?(m=w[0],u+=m.length,m):""}const m=[];for(;n(se),!(u>=a.length);){let w=n(ne);if(","===w.slice(-1))w=At(e,w.substring(0,w.length-1)),m.push(w);else{let b="";w=At(e,w);let S=!1;for(;;){const e=a.charAt(u);if(""===e){m.push((w+b).trim());break}if(S)")"===e&&(S=!1);else{if(","===e){u+=1,m.push((w+b).trim());break}"("===e&&(S=!0)}b+=e,u+=1}}}return m.join(", ")}(e,m):"style"===u?Pt(m,$t(e)):"object"===a&&"data"===u?At(e,m):m)}function Or(e,a,u){return("video"===e||"audio"===e)&&"autoplay"===a}function Dt(e,a,u){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!u&&Dt(e.parentNode,a,u);for(let u=e.classList.length;u--;){const m=e.classList[u];if(a.test(m))return!0}return!!u&&Dt(e.parentNode,a,u)}function Er(e,a,u,m){let w;if(vr(e)){if(w=e,!w.childNodes.length)return!1}else{if(null===e.parentElement)return!1;w=e.parentElement}try{if("string"==typeof a){if(m){if(w.closest(`.${a}`))return!0}else if(w.classList.contains(a))return!0}else if(Dt(w,a,m))return!0;if(u)if(m){if(w.closest(u))return!0}else if(w.matches(u))return!0}catch{}return!1}function Bi(e,a){const{doc:u,mirror:m,blockClass:w,blockSelector:b,needsMask:S,inlineStylesheet:C,maskInputOptions:O={},maskTextFn:x,maskInputFn:I,dataURLOptions:E={},inlineImages:_,recordCanvas:N,keepIframeSrcFn:F,newlyAddedElement:W=!1}=a,U=function zi(e,a){if(!a.hasNode(e))return;const u=a.getId(e);return 1===u?void 0:u}(u,m);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:B.Document,childNodes:[],compatMode:e.compatMode}:{type:B.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:B.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:U};case e.ELEMENT_NODE:return function Vi(e,a){const{doc:u,blockClass:m,blockSelector:w,inlineStylesheet:b,maskInputOptions:S={},maskInputFn:C,dataURLOptions:O={},inlineImages:x,recordCanvas:I,keepIframeSrcFn:E,newlyAddedElement:_=!1,rootId:N}=a,F=function Ui(e,a,u){try{if("string"==typeof a){if(e.classList.contains(a))return!0}else for(let u=e.classList.length;u--;){const m=e.classList[u];if(a.test(m))return!0}if(u)return e.matches(u)}catch{}return!1}(e,m,w),W=function Oi(e){if(e instanceof HTMLFormElement)return"form";const a=fe(e.tagName);return Y.test(a)?"div":a}(e);let U={};const j=e.attributes.length;for(let a=0;a<j;a++){const m=e.attributes[a];Or(W,m.name,m.value)||(U[m.name]=Mr(u,W,fe(m.name),m.value))}if("link"===W&&b){const a=Array.from(u.styleSheets).find((a=>a.href===e.href));let m=null;a&&(m=Tt(a)),m&&(delete U.rel,delete U.href,U._cssText=Pt(m,a.href))}if("style"===W&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const a=Tt(e.sheet);a&&(U._cssText=Pt(a,$t(u)))}if("input"===W||"textarea"===W||"select"===W){const a=e.value,u=e.checked;if("radio"!==U.type&&"checkbox"!==U.type&&"submit"!==U.type&&"button"!==U.type&&a){const u=Zt({element:e,type:Yt(e),tagName:W,value:a,maskInputOptions:S,maskInputFn:C});U.value=u.value,u.masked&&(U.masked=!0)}else u&&(U.checked=u)}if("option"===W&&(e.selected&&!S.select?U.selected=!0:delete U.selected),"canvas"===W&&I)if("2d"===e.__context)(function xi(e){const a=e.getContext("2d");if(!a)return!0;for(let u=0;u<e.width;u+=50)for(let m=0;m<e.height;m+=50){const w=a.getImageData,b=q in w?w[q]:w;if(new Uint32Array(b.call(a,u,m,Math.min(50,e.width-u),Math.min(50,e.height-m)).data.buffer).some((e=>0!==e)))return!1}return!0})(e)||(U.rr_dataURL=e.toDataURL(O.type,O.quality));else if(!("__context"in e)){const a=e.toDataURL(O.type,O.quality),m=u.createElement("canvas");m.width=e.width,m.height=e.height;a!==m.toDataURL(O.type,O.quality)&&(U.rr_dataURL=a)}if("img"===W&&x){J||(J=u.createElement("canvas"),X=J.getContext("2d"));const a=e,m=a.currentSrc||a.getAttribute("src")||"<unknown-src>",w=a.crossOrigin,A=()=>{a.removeEventListener("load",A);try{J.width=a.naturalWidth,J.height=a.naturalHeight,X.drawImage(a,0,0),U.rr_dataURL=J.toDataURL(O.type,O.quality)}catch(e){if("anonymous"!==a.crossOrigin)return a.crossOrigin="anonymous",void(a.complete&&0!==a.naturalWidth?A():a.addEventListener("load",A));console.warn(`Cannot inline img src=${m}! Error: ${e}`)}"anonymous"===a.crossOrigin&&(w?U.crossOrigin=w:a.removeAttribute("crossorigin"))};a.complete&&0!==a.naturalWidth?A():a.addEventListener("load",A)}if("audio"===W||"video"===W){const a=U;a.rr_mediaState=e.paused?"paused":"played",a.rr_mediaCurrentTime=e.currentTime,a.rr_mediaPlaybackRate=e.playbackRate,a.rr_mediaMuted=e.muted,a.rr_mediaLoop=e.loop,a.rr_mediaVolume=e.volume}if(_||(e.scrollLeft&&(U.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(U.rr_scrollTop=e.scrollTop)),F){const{width:a,height:u}=e.getBoundingClientRect();U={class:U.class,rr_width:`${a}px`,rr_height:`${u}px`}}let $;"iframe"===W&&!E(U.src)&&(e.contentDocument||(U.rr_src=U.src),delete U.src);try{customElements.get(W)&&($=!0)}catch{}return{type:B.Element,tagName:W,attributes:U,childNodes:[],isSVG:Fi(e)||void 0,needBlock:F,rootId:N,isCustom:$}}(e,{doc:u,blockClass:w,blockSelector:b,inlineStylesheet:C,maskInputOptions:O,maskInputFn:I,dataURLOptions:E,inlineImages:_,recordCanvas:N,keepIframeSrcFn:F,newlyAddedElement:W,rootId:U});case e.TEXT_NODE:return function ji(e,a){var u;const{needsMask:m,maskTextFn:w,rootId:b}=a,S=e.parentNode&&e.parentNode.tagName;let C=e.textContent;const O="STYLE"===S||void 0,x="SCRIPT"===S||void 0;if(O&&C){try{e.nextSibling||e.previousSibling||null!=(u=e.parentNode.sheet)&&u.cssRules&&(C=Tt(e.parentNode.sheet))}catch(a){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${a}`,e)}C=Pt(C,$t(a.doc))}return x&&(C="SCRIPT_PLACEHOLDER"),!O&&!x&&C&&m&&(C=w?w(C,e.parentElement):C.replace(/[\S]/g,"*")),{type:B.Text,textContent:C||"",isStyle:O,rootId:b}}(e,{doc:u,needsMask:S,maskTextFn:x,rootId:U});case e.CDATA_SECTION_NODE:return{type:B.CDATA,textContent:"",rootId:U};case e.COMMENT_NODE:return{type:B.Comment,textContent:e.textContent||"",rootId:U};default:return!1}}function D(e){return null==e?"":e.toLowerCase()}function Se(e,a){const{doc:u,mirror:m,blockClass:w,blockSelector:b,maskTextClass:S,maskTextSelector:C,skipChild:O=!1,inlineStylesheet:x=!0,maskInputOptions:I={},maskTextFn:E,maskInputFn:_,slimDOMOptions:N,dataURLOptions:F={},inlineImages:W=!1,recordCanvas:U=!1,onSerialize:j,onIframeLoad:$,iframeLoadTimeout:V=5e3,onStylesheetLoad:q,stylesheetLoadTimeout:H=5e3,keepIframeSrcFn:Y=()=>!1,newlyAddedElement:J=!1}=a;let{needsMask:X}=a,{preserveWhiteSpace:Q=!0}=a;X||(X=Er(e,S,C,void 0===X));const ee=Bi(e,{doc:u,mirror:m,blockClass:w,blockSelector:b,needsMask:X,inlineStylesheet:x,maskInputOptions:I,maskTextFn:E,maskInputFn:_,dataURLOptions:F,inlineImages:W,recordCanvas:U,keepIframeSrcFn:Y,newlyAddedElement:J});if(!ee)return console.warn(e,"not serialized"),null;let te;te=m.hasNode(e)?m.getId(e):function Gi(e,a){return!!(a.comment&&e.type===B.Comment||e.type===B.Element&&(a.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"===xr(e.attributes.href))||a.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(D(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===D(e.attributes.name)||"icon"===D(e.attributes.rel)||"apple-touch-icon"===D(e.attributes.rel)||"shortcut icon"===D(e.attributes.rel)))||"meta"===e.tagName&&(a.headMetaDescKeywords&&D(e.attributes.name).match(/^description|keywords$/)||a.headMetaSocial&&(D(e.attributes.property).match(/^(og|twitter|fb):/)||D(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===D(e.attributes.name))||a.headMetaRobots&&("robots"===D(e.attributes.name)||"googlebot"===D(e.attributes.name)||"bingbot"===D(e.attributes.name))||a.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"]||a.headMetaAuthorship&&("author"===D(e.attributes.name)||"generator"===D(e.attributes.name)||"framework"===D(e.attributes.name)||"publisher"===D(e.attributes.name)||"progid"===D(e.attributes.name)||D(e.attributes.property).match(/^article:/)||D(e.attributes.property).match(/^product:/))||a.headMetaVerification&&("google-site-verification"===D(e.attributes.name)||"yandex-verification"===D(e.attributes.name)||"csrf-token"===D(e.attributes.name)||"p:domain_verify"===D(e.attributes.name)||"verify-v1"===D(e.attributes.name)||"verification"===D(e.attributes.name)||"shopify-checkout-api-token"===D(e.attributes.name)))))}(ee,N)||!Q&&ee.type===B.Text&&!ee.isStyle&&!ee.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Ir();const re=Object.assign(ee,{id:te});if(m.add(e,re),-2===te)return null;j&&j(e);let ne=!O;if(re.type===B.Element){ne=ne&&!re.needBlock,delete re.needBlock;const a=e.shadowRoot;a&&Be(a)&&(re.isShadowHost=!0)}if((re.type===B.Document||re.type===B.Element)&&ne){N.headWhitespace&&re.type===B.Element&&"head"===re.tagName&&(Q=!1);const a={doc:u,mirror:m,blockClass:w,blockSelector:b,needsMask:X,maskTextClass:S,maskTextSelector:C,skipChild:O,inlineStylesheet:x,maskInputOptions:I,maskTextFn:E,maskInputFn:_,slimDOMOptions:N,dataURLOptions:F,inlineImages:W,recordCanvas:U,preserveWhiteSpace:Q,onSerialize:j,onIframeLoad:$,iframeLoadTimeout:V,onStylesheetLoad:q,stylesheetLoadTimeout:H,keepIframeSrcFn:Y};if(re.type!==B.Element||"textarea"!==re.tagName||void 0===re.attributes.value)for(const u of Array.from(e.childNodes)){const e=Se(u,a);e&&re.childNodes.push(e)}if(vr(e)&&e.shadowRoot)for(const u of Array.from(e.shadowRoot.childNodes)){const m=Se(u,a);m&&(Be(e.shadowRoot)&&(m.isShadow=!0),re.childNodes.push(m))}}return e.parentNode&&_e(e.parentNode)&&Be(e.parentNode)&&(re.isShadow=!0),re.type===B.Element&&"iframe"===re.tagName&&function Wi(e,a,u){const m=e.contentWindow;if(!m)return;let w,b=!1;try{w=m.document.readyState}catch{return}if("complete"!==w){const m=setTimeout((()=>{b||(a(),b=!0)}),u);return void e.addEventListener("load",(()=>{clearTimeout(m),b=!0,a()}))}const S="about:blank";if(m.location.href!==S||e.src===S||""===e.src)return setTimeout(a,0),e.addEventListener("load",a);e.addEventListener("load",a)}(e,(()=>{const a=e.contentDocument;if(a&&$){const u=Se(a,{doc:a,mirror:m,blockClass:w,blockSelector:b,needsMask:X,maskTextClass:S,maskTextSelector:C,skipChild:!1,inlineStylesheet:x,maskInputOptions:I,maskTextFn:E,maskInputFn:_,slimDOMOptions:N,dataURLOptions:F,inlineImages:W,recordCanvas:U,preserveWhiteSpace:Q,onSerialize:j,onIframeLoad:$,iframeLoadTimeout:V,onStylesheetLoad:q,stylesheetLoadTimeout:H,keepIframeSrcFn:Y});u&&$(e,u)}}),V),re.type===B.Element&&"link"===re.tagName&&"string"==typeof re.attributes.rel&&("stylesheet"===re.attributes.rel||"preload"===re.attributes.rel&&"string"==typeof re.attributes.href&&"css"===xr(re.attributes.href))&&function _i(e,a,u){let m,w=!1;try{m=e.sheet}catch{return}if(m)return;const b=setTimeout((()=>{w||(a(),w=!0)}),u);e.addEventListener("load",(()=>{clearTimeout(b),w=!0,a()}))}(e,(()=>{if(q){const a=Se(e,{doc:u,mirror:m,blockClass:w,blockSelector:b,needsMask:X,maskTextClass:S,maskTextSelector:C,skipChild:!1,inlineStylesheet:x,maskInputOptions:I,maskTextFn:E,maskInputFn:_,slimDOMOptions:N,dataURLOptions:F,inlineImages:W,recordCanvas:U,preserveWhiteSpace:Q,onSerialize:j,onIframeLoad:$,iframeLoadTimeout:V,onStylesheetLoad:q,stylesheetLoadTimeout:H,keepIframeSrcFn:Y});a&&q(e,a)}}),H),re}function Yi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function $i(e){if(e.__esModule)return e;var a=e.default;if("function"==typeof a){var u=function n(){return this instanceof n?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};u.prototype=a.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(e).forEach((function(a){var m=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,m.get?m:{enumerable:!0,get:function(){return e[a]}})})),u}var ie={exports:{}},le=String,Rr=function(){return{isColorSupported:!1,reset:le,bold:le,dim:le,italic:le,underline:le,inverse:le,hidden:le,strikethrough:le,black:le,red:le,green:le,yellow:le,blue:le,magenta:le,cyan:le,white:le,gray:le,bgBlack:le,bgRed:le,bgGreen:le,bgYellow:le,bgBlue:le,bgMagenta:le,bgCyan:le,bgWhite:le,blackBright:le,redBright:le,greenBright:le,yellowBright:le,blueBright:le,magentaBright:le,cyanBright:le,whiteBright:le,bgBlackBright:le,bgRedBright:le,bgGreenBright:le,bgYellowBright:le,bgBlueBright:le,bgMagentaBright:le,bgCyanBright:le,bgWhiteBright:le}};ie.exports=Rr(),ie.exports.createColors=Rr;var ce=ie.exports;const he=$i(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let pe=ce,de=he,me=class Lr extends Error{constructor(e,a,u,m,w,b){super(e),this.name="CssSyntaxError",this.reason=e,w&&(this.file=w),m&&(this.source=m),b&&(this.plugin=b),typeof a<"u"&&typeof u<"u"&&("number"==typeof a?(this.line=a,this.column=u):(this.line=a.line,this.column=a.column,this.endLine=u.line,this.endColumn=u.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,Lr)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let a=this.source;null==e&&(e=pe.isColorSupported);let n=e=>e,r=e=>e,i=e=>e;if(e){let{bold:e,gray:a,red:u}=pe.createColors(!0);r=a=>e(u(a)),n=e=>a(e),de&&(i=e=>de(e))}let u=a.split(/\r?\n/),m=Math.max(this.line-3,0),w=Math.min(this.line+2,u.length),b=String(w).length;return u.slice(m,w).map(((e,a)=>{let u=m+1+a,w=" "+(" "+u).slice(-b)+" | ";if(u===this.line){if(e.length>160){let a=20,u=Math.max(0,this.column-a),m=Math.max(this.column+a,this.endColumn+a),b=e.slice(u,m),S=n(w.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,a-1)).replace(/[^\t]/g," ");return r(">")+n(w)+i(b)+"\n "+S+r("^")}let a=n(w.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(w)+i(e)+"\n "+a+r("^")}return" "+n(w)+i(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var ye=me;me.default=me;const ge={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let we=class{constructor(e){this.builder=e}atrule(e,a){let u="@"+e.name,m=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?u+=e.raws.afterName:m&&(u+=" "),e.nodes)this.block(e,u+m);else{let w=(e.raws.between||"")+(a?";":"");this.builder(u+m+w,e)}}beforeAfter(e,a){let u;u="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===a?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let m=e.parent,w=0;for(;m&&"root"!==m.type;)w+=1,m=m.parent;if(u.includes("\n")){let a=this.raw(e,null,"indent");if(a.length)for(let e=0;e<w;e++)u+=a}return u}block(e,a){let u,m=this.raw(e,"between","beforeOpen");this.builder(a+m+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),u=this.raw(e,"after")):u=this.raw(e,"after","emptyBody"),u&&this.builder(u),this.builder("}",e,"end")}body(e){let a=e.nodes.length-1;for(;a>0&&"comment"===e.nodes[a].type;)a-=1;let u=this.raw(e,"semicolon");for(let m=0;m<e.nodes.length;m++){let w=e.nodes[m],b=this.raw(w,"before");b&&this.builder(b),this.stringify(w,a!==m||u)}}comment(e){let a=this.raw(e,"left","commentLeft"),u=this.raw(e,"right","commentRight");this.builder("/*"+a+e.text+u+"*/",e)}decl(e,a){let u=this.raw(e,"between","colon"),m=e.prop+u+this.rawValue(e,"value");e.important&&(m+=e.raws.important||" !important"),a&&(m+=";"),this.builder(m,e)}document(e){this.body(e)}raw(e,a,u){let m;if(u||(u=a),a&&(m=e.raws[a],typeof m<"u"))return m;let w=e.parent;if("before"===u&&(!w||"root"===w.type&&w.first===e||w&&"document"===w.type))return"";if(!w)return ge[u];let b=e.root();if(b.rawCache||(b.rawCache={}),typeof b.rawCache[u]<"u")return b.rawCache[u];if("before"===u||"after"===u)return this.beforeAfter(e,u);{let w="raw"+function Ki(e){return e[0].toUpperCase()+e.slice(1)}(u);this[w]?m=this[w](b,e):b.walk((e=>{if(m=e.raws[a],typeof m<"u")return!1}))}return typeof m>"u"&&(m=ge[u]),b.rawCache[u]=m,m}rawBeforeClose(e){let a;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return a=e.raws.after,a.includes("\n")&&(a=a.replace(/[^\n]+$/,"")),!1})),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(e,a){let u;return e.walkComments((e=>{if(typeof e.raws.before<"u")return u=e.raws.before,u.includes("\n")&&(u=u.replace(/[^\n]+$/,"")),!1})),typeof u>"u"?u=this.raw(a,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(e,a){let u;return e.walkDecls((e=>{if(typeof e.raws.before<"u")return u=e.raws.before,u.includes("\n")&&(u=u.replace(/[^\n]+$/,"")),!1})),typeof u>"u"?u=this.raw(a,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(e){let a;return e.walk((e=>{if("decl"!==e.type&&(a=e.raws.between,typeof a<"u"))return!1})),a}rawBeforeRule(e){let a;return e.walk((u=>{if(u.nodes&&(u.parent!==e||e.first!==u)&&typeof u.raws.before<"u")return a=u.raws.before,a.includes("\n")&&(a=a.replace(/[^\n]+$/,"")),!1})),a&&(a=a.replace(/\S/g,"")),a}rawColon(e){let a;return e.walkDecls((e=>{if(typeof e.raws.between<"u")return a=e.raws.between.replace(/[^\s:]/g,""),!1})),a}rawEmptyBody(e){let a;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(a=e.raws.after,typeof a<"u"))return!1})),a}rawIndent(e){if(e.raws.indent)return e.raws.indent;let a;return e.walk((u=>{let m=u.parent;if(m&&m!==e&&m.parent&&m.parent===e&&typeof u.raws.before<"u"){let e=u.raws.before.split("\n");return a=e[e.length-1],a=a.replace(/\S/g,""),!1}})),a}rawSemicolon(e){let a;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(a=e.raws.semicolon,typeof a<"u"))return!1})),a}rawValue(e,a){let u=e[a],m=e.raws[a];return m&&m.value===u?m.raw:u}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,a){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,a)}};var be=we;we.default=we;let ve=be;function ks(e,a){new ve(a).stringify(e)}var ke=ks;ks.default=ks;var Ce={};Ce.isClean=Symbol("isClean"),Ce.my=Symbol("my");let Oe=ye,xe=be,Ie=ke,{isClean:Ee,my:Me}=Ce;function Cs(e,a){let u=new e.constructor;for(let m in e){if(!Object.prototype.hasOwnProperty.call(e,m)||"proxyCache"===m)continue;let w=e[m],b=typeof w;"parent"===m&&"object"===b?a&&(u[m]=a):"source"===m?u[m]=w:Array.isArray(w)?u[m]=w.map((e=>Cs(e,u))):("object"===b&&null!==w&&(w=Cs(w)),u[m]=w)}return u}function Pe(e,a){if(a&&typeof a.offset<"u")return a.offset;let u=1,m=1,w=0;for(let b=0;b<e.length;b++){if(m===a.line&&u===a.column){w=b;break}"\n"===e[b]?(u=1,m+=1):u+=1}return w}let Te=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Ee]=!1,this[Me]=!0;for(let a in e)if("nodes"===a){this.nodes=[];for(let u of e[a])"function"==typeof u.clone?this.append(u.clone()):this.append(u)}else this[a]=e[a]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let a=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${a.input.from}:${a.start.line}:${a.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let a in e)this[a]=e[a];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 a=Cs(this);for(let u in e)a[u]=e[u];return a}cloneAfter(e={}){let a=this.clone(e);return this.parent.insertAfter(this,a),a}cloneBefore(e={}){let a=this.clone(e);return this.parent.insertBefore(this,a),a}error(e,a={}){if(this.source){let{end:u,start:m}=this.rangeBy(a);return this.source.input.error(e,{column:m.column,line:m.line},{column:u.column,line:u.line},a)}return new Oe(e)}getProxyProcessor(){return{get:(e,a)=>"proxyOf"===a?e:"root"===a?()=>e.root().toProxy():e[a],set:(e,a,u)=>(e[a]===u||(e[a]=u,("prop"===a||"value"===a||"name"===a||"params"===a||"important"===a||"text"===a)&&e.markDirty()),!0)}}markClean(){this[Ee]=!0}markDirty(){if(this[Ee]){this[Ee]=!1;let e=this;for(;e=e.parent;)e[Ee]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e){let a=this.source.start;if(e.index)a=this.positionInside(e.index);else if(e.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,m=u.slice(Pe(u,this.source.start),Pe(u,this.source.end)).indexOf(e.word);-1!==m&&(a=this.positionInside(m))}return a}positionInside(e){let a=this.source.start.column,u=this.source.start.line,m="document"in this.source.input?this.source.input.document:this.source.input.css,w=Pe(m,this.source.start),b=w+e;for(let e=w;e<b;e++)"\n"===m[e]?(a=1,u+=1):a+=1;return{column:a,line:u}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let a={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:a.column+1,line:a.line};if(e.word){let m="document"in this.source.input?this.source.input.document:this.source.input.css,w=m.slice(Pe(m,this.source.start),Pe(m,this.source.end)).indexOf(e.word);-1!==w&&(a=this.positionInside(w),u=this.positionInside(w+e.word.length))}else e.start?a={column:e.start.column,line:e.start.line}:e.index&&(a=this.positionInside(e.index)),e.end?u={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?u=this.positionInside(e.endIndex):e.index&&(u=this.positionInside(e.index+1));return(u.line<a.line||u.line===a.line&&u.column<=a.column)&&(u={column:a.column+1,line:a.line}),{end:u,start:a}}raw(e,a){return(new xe).raw(this,e,a)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let a=this,u=!1;for(let m of e)m===this?u=!0:u?(this.parent.insertAfter(a,m),a=m):this.parent.insertBefore(a,m);u||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,a){let u={},m=null==a;a=a||new Map;let w=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let m=this[e];if(Array.isArray(m))u[e]=m.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,a):e));else if("object"==typeof m&&m.toJSON)u[e]=m.toJSON(null,a);else if("source"===e){let b=a.get(m.input);null==b&&(b=w,a.set(m.input,w),w++),u[e]={end:m.end,inputId:b,start:m.start}}else u[e]=m}return m&&(u.inputs=[...a.keys()].map((e=>e.toJSON()))),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Ie){e.stringify&&(e=e.stringify);let a="";return e(this,(e=>{a+=e})),a}warn(e,a,u){let m={node:this};for(let e in u)m[e]=u[e];return e.warn(a,m)}};var Le=Te;Te.default=Te;let Ne=Le,Ae=class extends Ne{constructor(e){super(e),this.type="comment"}};var Ue=Ae;Ae.default=Ae;let je=Le,ze=class extends je{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&typeof e.value<"u"&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};var Ve=ze;ze.default=ze;let Ge,qe,He,Ye,Je=Ue,Xe=Ve,Qe=Le,{isClean:et,my:nt}=Ce;function Wr(e){return e.map((e=>(e.nodes&&(e.nodes=Wr(e.nodes)),delete e.source,e)))}function _r(e){if(e[et]=!1,e.proxyOf.nodes)for(let a of e.proxyOf.nodes)_r(a)}let st=class Br extends Qe{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]}append(...e){for(let a of e){let e=this.normalize(a,this.last);for(let a of e)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let a of this.nodes)a.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let a,u,m=this.getIterator();for(;this.indexes[m]<this.proxyOf.nodes.length&&(a=this.indexes[m],u=e(this.proxyOf.nodes[a],a),!1!==u);)this.indexes[m]+=1;return delete this.indexes[m],u}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,a)=>"proxyOf"===a?e:e[a]?"each"===a||"string"==typeof a&&a.startsWith("walk")?(...u)=>e[a](...u.map((e=>"function"==typeof e?(a,u)=>e(a.toProxy(),u):e))):"every"===a||"some"===a?u=>e[a](((e,...a)=>u(e.toProxy(),...a))):"root"===a?()=>e.root().toProxy():"nodes"===a?e.nodes.map((e=>e.toProxy())):"first"===a||"last"===a?e[a].toProxy():e[a]:e[a],set:(e,a,u)=>(e[a]===u||(e[a]=u,("name"===a||"params"===a||"selector"===a)&&e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,a){let u,m=this.index(e),w=this.normalize(a,this.proxyOf.nodes[m]).reverse();m=this.index(e);for(let e of w)this.proxyOf.nodes.splice(m+1,0,e);for(let e in this.indexes)u=this.indexes[e],m<u&&(this.indexes[e]=u+w.length);return this.markDirty(),this}insertBefore(e,a){let u,m=this.index(e),w=0===m&&"prepend",b=this.normalize(a,this.proxyOf.nodes[m],w).reverse();m=this.index(e);for(let e of b)this.proxyOf.nodes.splice(m,0,e);for(let e in this.indexes)u=this.indexes[e],m<=u&&(this.indexes[e]=u+b.length);return this.markDirty(),this}normalize(e,a){if("string"==typeof e)e=Wr(qe(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let a of e)a.parent&&a.parent.removeChild(a,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let a of e)a.parent&&a.parent.removeChild(a,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new Xe(e)]}else if(e.selector||e.selectors)e=[new Ye(e)];else if(e.name)e=[new Ge(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Je(e)]}return e.map((e=>(e[nt]||Br.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[et]&&_r(e),e.raws||(e.raws={}),typeof e.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(e.raws.before=a.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let a of e){let e=this.normalize(a,this.first,"prepend").reverse();for(let a of e)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+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 a;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let u in this.indexes)a=this.indexes[u],a>=e&&(this.indexes[u]=a-1);return this.markDirty(),this}replaceValues(e,a,u){return u||(u=a,a={}),this.walkDecls((m=>{a.props&&!a.props.includes(m.prop)||a.fast&&!m.value.includes(a.fast)||(m.value=m.value.replace(e,u))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((a,u)=>{let m;try{m=e(a,u)}catch(e){throw a.addToError(e)}return!1!==m&&a.walk&&(m=a.walk(e)),m}))}walkAtRules(e,a){return a?e instanceof RegExp?this.walk(((u,m)=>{if("atrule"===u.type&&e.test(u.name))return a(u,m)})):this.walk(((u,m)=>{if("atrule"===u.type&&u.name===e)return a(u,m)})):(a=e,this.walk(((e,u)=>{if("atrule"===e.type)return a(e,u)})))}walkComments(e){return this.walk(((a,u)=>{if("comment"===a.type)return e(a,u)}))}walkDecls(e,a){return a?e instanceof RegExp?this.walk(((u,m)=>{if("decl"===u.type&&e.test(u.prop))return a(u,m)})):this.walk(((u,m)=>{if("decl"===u.type&&u.prop===e)return a(u,m)})):(a=e,this.walk(((e,u)=>{if("decl"===e.type)return a(e,u)})))}walkRules(e,a){return a?e instanceof RegExp?this.walk(((u,m)=>{if("rule"===u.type&&e.test(u.selector))return a(u,m)})):this.walk(((u,m)=>{if("rule"===u.type&&u.selector===e)return a(u,m)})):(a=e,this.walk(((e,u)=>{if("rule"===e.type)return a(e,u)})))}};st.registerParse=e=>{qe=e},st.registerRule=e=>{Ye=e},st.registerAtRule=e=>{Ge=e},st.registerRoot=e=>{He=e};var ot=st;st.default=st,st.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Ge.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ye.prototype):"decl"===e.type?Object.setPrototypeOf(e,Xe.prototype):"comment"===e.type?Object.setPrototypeOf(e,Je.prototype):"root"===e.type&&Object.setPrototypeOf(e,He.prototype),e[nt]=!0,e.nodes&&e.nodes.forEach((e=>{st.rebuild(e)}))};let it=ot,at=class extends it{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 lt=at;at.default=at,it.registerAtRule(at);let ct,ut,ht=ot,pt=class extends ht{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new ct(new ut,this,e).stringify()}};pt.registerLazyResult=e=>{ct=e},pt.registerProcessor=e=>{ut=e};var dt=pt;pt.default=pt;var yt={nanoid:(e=21)=>{let a="",u=0|e;for(;u--;)a+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return a}};let{existsSync:gt,readFileSync:wt}=he,{dirname:bt,join:vt}=he,{SourceMapConsumer:St,SourceMapGenerator:kt}=he;let Ct=class{constructor(e,a){if(!1===a.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let u=a.map?a.map.prev:void 0,m=this.loadMap(a.from,u);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=bt(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new St(this.text)),this.consumerCache}decodeInline(e){let a=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(a)return decodeURIComponent(e.substr(a[0].length));let u=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(u)return function da(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}(e.substr(u[0].length));let m=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}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 a=e.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let u=e.lastIndexOf(a.pop()),m=e.indexOf("*/",u);u>-1&&m>-1&&(this.annotation=this.getAnnotationURL(e.substring(u,m)))}loadFile(e){if(this.root=bt(e),gt(e))return this.mapFile=e,wt(e,"utf-8").toString().trim()}loadMap(e,a){if(!1===a)return!1;if(a){if("string"==typeof a)return a;if("function"!=typeof a){if(a instanceof St)return kt.fromSourceMap(a).toString();if(a instanceof kt)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}{let u=a(e);if(u){let e=this.loadFile(u);if(!e)throw new Error("Unable to load previous source map: "+u.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let a=this.annotation;return e&&(a=vt(bt(e),a)),this.loadFile(a)}}}startWith(e,a){return!!e&&e.substr(0,a.length)===a}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var xt=Ct;Ct.default=Ct;let{nanoid:It}=yt,{isAbsolute:Et,resolve:Mt}=he,{SourceMapConsumer:Rt,SourceMapGenerator:_t}=he,{fileURLToPath:Lt,pathToFileURL:Nt}=he,Ft=ye,Ut=xt,jt=he,zt=Symbol("fromOffsetCache"),Vt=!(!Rt||!_t),Ht=!(!Mt||!Et),Kt=class{get from(){return this.file||this.id}constructor(e,a={}){if(null===e||typeof e>"u"||"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,this.document=this.css,a.document&&(this.document=a.document.toString()),a.from&&(!Ht||/^\w+:\/\//.test(a.from)||Et(a.from)?this.file=a.from:this.file=Mt(a.from)),Ht&&Vt){let e=new Ut(this.css,a);if(e.text){this.map=e;let a=e.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+It(6)+">"),this.map&&(this.map.file=this.from)}error(e,a,u,m={}){let w,b,S;if(a&&"object"==typeof a){let e=a,m=u;if("number"==typeof e.offset){let m=this.fromOffset(e.offset);a=m.line,u=m.col}else a=e.line,u=e.column;if("number"==typeof m.offset){let e=this.fromOffset(m.offset);b=e.line,w=e.col}else b=m.line,w=m.column}else if(!u){let e=this.fromOffset(a);a=e.line,u=e.col}let C=this.origin(a,u,b,w);return S=C?new Ft(e,void 0===C.endLine?C.line:{column:C.column,line:C.line},void 0===C.endLine?C.column:{column:C.endColumn,line:C.endLine},C.source,C.file,m.plugin):new Ft(e,void 0===b?a:{column:u,line:a},void 0===b?u:{column:w,line:b},this.css,this.file,m.plugin),S.input={column:u,endColumn:w,endLine:b,line:a,source:this.css},this.file&&(Nt&&(S.input.url=Nt(this.file).toString()),S.input.file=this.file),S}fromOffset(e){let a,u;if(this[zt])u=this[zt];else{let e=this.css.split("\n");u=new Array(e.length);let a=0;for(let m=0,w=e.length;m<w;m++)u[m]=a,a+=e[m].length+1;this[zt]=u}a=u[u.length-1];let m=0;if(e>=a)m=u.length-1;else{let a,w=u.length-2;for(;m<w;)if(a=m+(w-m>>1),e<u[a])w=a-1;else{if(!(e>=u[a+1])){m=a;break}m=a+1}}return{col:e-u[m]+1,line:m+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Mt(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,a,u,m){if(!this.map)return!1;let w,b,S=this.map.consumer(),C=S.originalPositionFor({column:a,line:e});if(!C.source)return!1;"number"==typeof u&&(w=S.originalPositionFor({column:m,line:u})),b=Et(C.source)?Nt(C.source):new URL(C.source,this.map.consumer().sourceRoot||Nt(this.map.mapFile));let O={column:C.column,endColumn:w&&w.column,endLine:w&&w.line,line:C.line,url:b.toString()};if("file:"===b.protocol){if(!Lt)throw new Error("file: protocol is not available in this PostCSS build");O.file=Lt(b)}let x=S.sourceContentFor(C.source);return x&&(O.source=x),O}toJSON(){let e={};for(let a of["hasBOM","css","file","id"])null!=this[a]&&(e[a]=this[a]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var Jt=Kt;Kt.default=Kt,jt&&jt.registerInput&&jt.registerInput(Kt);let Xt,Qt,rr=ot,nr=class extends rr{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,a,u){let m=super.normalize(e);if(a)if("prepend"===u)this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let e of m)e.raws.before=a.raws.before;return m}removeChild(e,a){let u=this.index(e);return!a&&0===u&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(e)}toResult(e={}){return new Xt(new Qt,this,e).stringify()}};nr.registerLazyResult=e=>{Xt=e},nr.registerProcessor=e=>{Qt=e};var sr=nr;nr.default=nr,rr.registerRoot(nr);let or={comma:e=>or.split(e,[","],!0),space(e){let a=[" ","\n","\t"];return or.split(e,a)},split(e,a,u){let m=[],w="",b=!1,S=0,C=!1,O="",x=!1;for(let u of e)x?x=!1:"\\"===u?x=!0:C?u===O&&(C=!1):'"'===u||"'"===u?(C=!0,O=u):"("===u?S+=1:")"===u?S>0&&(S-=1):0===S&&a.includes(u)&&(b=!0),b?(""!==w&&m.push(w.trim()),w="",b=!1):w+=u;return(u||""!==w)&&m.push(w.trim()),m}};var ir=or;or.default=or;let ar=ot,lr=ir,cr=class extends ar{get selectors(){return lr.comma(this.selector)}set selectors(e){let a=this.selector?this.selector.match(/,\s*/):null,u=a?a[0]:","+this.raw("between","beforeOpen");this.selector=e.join(u)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var ur=cr;cr.default=cr,ar.registerRule(cr);let hr=lt,pr=Ue,dr=Ve,fr=Jt,mr=xt,yr=sr,gr=ur;function Ze(e,a){if(Array.isArray(e))return e.map((e=>Ze(e)));let{inputs:u,...m}=e;if(u){a=[];for(let e of u){let u={...e,__proto__:fr.prototype};u.map&&(u.map={...u.map,__proto__:mr.prototype}),a.push(u)}}if(m.nodes&&(m.nodes=e.nodes.map((e=>Ze(e,a)))),m.source){let{inputId:e,...u}=m.source;m.source=u,null!=e&&(m.source.input=a[e])}if("root"===m.type)return new yr(m);if("decl"===m.type)return new dr(m);if("rule"===m.type)return new gr(m);if("comment"===m.type)return new pr(m);if("atrule"===m.type)return new hr(m);throw new Error("Unknown node type: "+e.type)}var wr=Ze;Ze.default=Ze;let{dirname:Sr,relative:Cr,resolve:Tr,sep:Pr}=he,{SourceMapConsumer:Nr,SourceMapGenerator:Dr}=he,{pathToFileURL:Ar}=he,Fr=Jt,Ur=!(!Nr||!Dr),jr=!!(Sr&&Tr&&Cr&&Pr);var $r=class{constructor(e,a,u,m){this.stringify=e,this.mapOpts=u.map||{},this.root=a,this.opts=u,this.css=m,this.originalCSS=m,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 a="\n";this.css.includes("\r\n")&&(a="\r\n"),this.css+=a+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let a,u=this.toUrl(this.path(e.file)),m=e.root||Sr(e.file);!1===this.mapOpts.sourcesContent?(a=new Nr(e.text),a.sourcesContent&&(a.sourcesContent=null)):a=e.consumer(),this.map.applySourceMap(a,u,this.toUrl(this.path(m)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let a=this.root.nodes.length-1;a>=0;a--)e=this.root.nodes[a],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(a)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),jr&&Ur&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(a=>{e+=a})),[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=Dr.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Dr({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 Dr({file:this.outputFile(),ignoreInvalidMapping:!0});let e,a,u=1,m=1,w="<no source>",b={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((S,C,O)=>{if(this.css+=S,C&&"end"!==O&&(b.generated.line=u,b.generated.column=m-1,C.source&&C.source.start?(b.source=this.sourcePath(C),b.original.line=C.source.start.line,b.original.column=C.source.start.column-1,this.map.addMapping(b)):(b.source=w,b.original.line=1,b.original.column=0,this.map.addMapping(b))),a=S.match(/\n/g),a?(u+=a.length,e=S.lastIndexOf("\n"),m=S.length-e):m+=S.length,C&&"start"!==O){let e=C.parent||{raws:{}};("decl"!==C.type&&("atrule"!==C.type||C.nodes)||C!==e.last||e.raws.semicolon)&&(C.source&&C.source.end?(b.source=this.sourcePath(C),b.original.line=C.source.end.line,b.original.column=C.source.end.column-1,b.generated.line=u,b.generated.column=m-2,this.map.addMapping(b)):(b.source=w,b.original.line=1,b.original.column=0,b.generated.line=u,b.generated.column=m-1,this.map.addMapping(b)))}}))}isAnnotation(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let a=this.memoizedPaths.get(e);if(a)return a;let u=this.opts.to?Sr(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(u=Sr(Tr(u,this.mapOpts.annotation)));let m=Cr(u,e);return this.memoizedPaths.set(e,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let a=e.source.input.map;this.previousMaps.includes(a)||this.previousMaps.push(a)}}));else{let e=new Fr(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((a=>{if(a.source){let u=a.source.input.from;if(u&&!e[u]){e[u]=!0;let m=this.usesFileUrls?this.toFileUrl(u):this.toUrl(this.path(u));this.map.setSourceContent(m,a.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 a=this.memoizedFileURLs.get(e);if(a)return a;if(Ar){let a=Ar(e).toString();return this.memoizedFileURLs.set(e,a),a}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let a=this.memoizedURLs.get(e);if(a)return a;"\\"===Pr&&(e=e.replace(/\\/g,"/"));let u=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,u),u}};const zr=/[\t\n\f\r "#'()/;[\\\]{}]/g,Vr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Gr=/.[\r\n"'(/\\]/,Zr=/[\da-f]/i;let qr=lt,Hr=Ue,Yr=Ve,Kr=sr,Jr=ur,Xa=function(e,a={}){let u,m,w,b,S,C,O,x,I,E,_=e.css.valueOf(),N=a.ignoreErrors,F=_.length,W=0,U=[],j=[];function y2(a){throw e.error("Unclosed "+a,W)}return{back:function A(e){j.push(e)},endOfFile:function v(){return 0===j.length&&W>=F},nextToken:function P2(e){if(j.length)return j.pop();if(W>=F)return;let a=!!e&&e.ignoreUnclosed;switch(u=_.charCodeAt(W),u){case 10:case 32:case 9:case 13:case 12:b=W;do{b+=1,u=_.charCodeAt(b)}while(32===u||10===u||9===u||13===u||12===u);C=["space",_.slice(W,b)],W=b-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(u);C=[e,e,W];break}case 40:if(E=U.length?U.pop()[1]:"",I=_.charCodeAt(W+1),"url"===E&&39!==I&&34!==I&&32!==I&&10!==I&&9!==I&&12!==I&&13!==I){b=W;do{if(O=!1,b=_.indexOf(")",b+1),-1===b){if(N||a){b=W;break}y2("bracket")}for(x=b;92===_.charCodeAt(x-1);)x-=1,O=!O}while(O);C=["brackets",_.slice(W,b+1),W,b],W=b}else b=_.indexOf(")",W+1),m=_.slice(W,b+1),-1===b||Gr.test(m)?C=["(","(",W]:(C=["brackets",m,W,b],W=b);break;case 39:case 34:S=39===u?"'":'"',b=W;do{if(O=!1,b=_.indexOf(S,b+1),-1===b){if(N||a){b=W+1;break}y2("string")}for(x=b;92===_.charCodeAt(x-1);)x-=1,O=!O}while(O);C=["string",_.slice(W,b+1),W,b],W=b;break;case 64:zr.lastIndex=W+1,zr.test(_),b=0===zr.lastIndex?_.length-1:zr.lastIndex-2,C=["at-word",_.slice(W,b+1),W,b],W=b;break;case 92:for(b=W,w=!0;92===_.charCodeAt(b+1);)b+=1,w=!w;if(u=_.charCodeAt(b+1),w&&47!==u&&32!==u&&10!==u&&9!==u&&13!==u&&12!==u&&(b+=1,Zr.test(_.charAt(b)))){for(;Zr.test(_.charAt(b+1));)b+=1;32===_.charCodeAt(b+1)&&(b+=1)}C=["word",_.slice(W,b+1),W,b],W=b;break;default:47===u&&42===_.charCodeAt(W+1)?(b=_.indexOf("*/",W+2)+1,0===b&&(N||a?b=_.length:y2("comment")),C=["comment",_.slice(W,b+1),W,b],W=b):(Vr.lastIndex=W+1,Vr.test(_),b=0===Vr.lastIndex?_.length-1:Vr.lastIndex-2,C=["word",_.slice(W,b+1),W,b],U.push(C),W=b)}return W++,C},position:function S2(){return W}}};const Xr={empty:!0,space:!0};var Qr=class{constructor(e){this.input=e,this.root=new Kr,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 a=new qr;a.name=e[1].slice(1),""===a.name&&this.unnamedAtrule(a,e),this.init(a,e[2]);let u,m,w,b=!1,S=!1,C=[],O=[];for(;!this.tokenizer.endOfFile();){if(u=(e=this.tokenizer.nextToken())[0],"("===u||"["===u?O.push("("===u?")":"]"):"{"===u&&O.length>0?O.push("}"):u===O[O.length-1]&&O.pop(),0===O.length){if(";"===u){a.source.end=this.getPosition(e[2]),a.source.end.offset++,this.semicolon=!0;break}if("{"===u){S=!0;break}if("}"===u){if(C.length>0){for(w=C.length-1,m=C[w];m&&"space"===m[0];)m=C[--w];m&&(a.source.end=this.getPosition(m[3]||m[2]),a.source.end.offset++)}this.end(e);break}C.push(e)}else C.push(e);if(this.tokenizer.endOfFile()){b=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(C),C.length?(a.raws.afterName=this.spacesAndCommentsFromStart(C),this.raw(a,"params",C),b&&(e=C[C.length-1],a.source.end=this.getPosition(e[3]||e[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),S&&(a.nodes=[],this.current=a)}checkMissedSemicolon(e){let a=this.colon(e);if(!1===a)return;let u,m=0;for(let w=a-1;w>=0&&(u=e[w],"space"===u[0]||(m+=1,2!==m));w--);throw this.input.error("Missed semicolon","word"===u[0]?u[3]+1:u[2])}colon(e){let a,u,m,w=0;for(let[b,S]of e.entries()){if(u=S,m=u[0],"("===m&&(w+=1),")"===m&&(w-=1),0===w&&":"===m){if(a){if("word"===a[0]&&"progid"===a[1])continue;return b}this.doubleColon(u)}a=u}return!1}comment(e){let a=new Hr;this.init(a,e[2]),a.source.end=this.getPosition(e[3]||e[2]),a.source.end.offset++;let u=e[1].slice(2,-2);if(/^\s*$/.test(u))a.text="",a.raws.left=u,a.raws.right="";else{let e=u.match(/^(\s*)([^]*\S)(\s*)$/);a.text=e[2],a.raws.left=e[1],a.raws.right=e[3]}}createTokenizer(){this.tokenizer=Xa(this.input)}decl(e,a){let u=new Yr;this.init(u,e[0][2]);let m,w=e[e.length-1];for(";"===w[0]&&(this.semicolon=!0,e.pop()),u.source.end=this.getPosition(w[3]||w[2]||function Ha(e){for(let a=e.length-1;a>=0;a--){let u=e[a],m=u[3]||u[2];if(m)return m}}(e)),u.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),u.raws.before+=e.shift()[1];for(u.source.start=this.getPosition(e[0][2]),u.prop="";e.length;){let a=e[0][0];if(":"===a||"space"===a||"comment"===a)break;u.prop+=e.shift()[1]}for(u.raws.between="";e.length;){if(m=e.shift(),":"===m[0]){u.raws.between+=m[1];break}"word"===m[0]&&/\w/.test(m[1])&&this.unknownWord([m]),u.raws.between+=m[1]}("_"===u.prop[0]||"*"===u.prop[0])&&(u.raws.before+=u.prop[0],u.prop=u.prop.slice(1));let b,S=[];for(;e.length&&(b=e[0][0],"space"===b||"comment"===b);)S.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(m=e[a],"!important"===m[1].toLowerCase()){u.important=!0;let m=this.stringFrom(e,a);m=this.spacesFromEnd(e)+m," !important"!==m&&(u.raws.important=m);break}if("important"===m[1].toLowerCase()){let m=e.slice(0),w="";for(let e=a;e>0;e--){let a=m[e][0];if(w.trim().startsWith("!")&&"space"!==a)break;w=m.pop()[1]+w}w.trim().startsWith("!")&&(u.important=!0,u.raws.important=w,e=m)}if("space"!==m[0]&&"comment"!==m[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(u.raws.between+=S.map((e=>e[1])).join(""),S=[]),this.raw(u,"value",S.concat(e),a),u.value.includes(":")&&!a&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let a=new Jr;this.init(a,e[2]),a.selector="",a.raws.between="",this.current=a}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 a=this.current.nodes[this.current.nodes.length-1];a&&"rule"===a.type&&!a.raws.ownSemicolon&&(a.raws.ownSemicolon=this.spaces,this.spaces="",a.source.end=this.getPosition(e[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(e){let a=this.input.fromOffset(e);return{column:a.col,line:a.line,offset:e}}init(e,a){this.current.push(e),e.source={input:this.input,start:this.getPosition(a)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let a=!1,u=null,m=!1,w=null,b=[],S=e[1].startsWith("--"),C=[],O=e;for(;O;){if(u=O[0],C.push(O),"("===u||"["===u)w||(w=O),b.push("("===u?")":"]");else if(S&&m&&"{"===u)w||(w=O),b.push("}");else if(0===b.length){if(";"===u){if(m)return void this.decl(C,S);break}if("{"===u)return void this.rule(C);if("}"===u){this.tokenizer.back(C.pop()),a=!0;break}":"===u&&(m=!0)}else u===b[b.length-1]&&(b.pop(),0===b.length&&(w=null));O=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),b.length>0&&this.unclosedBracket(w),a&&m){if(!S)for(;C.length&&(O=C[C.length-1][0],"space"===O||"comment"===O);)this.tokenizer.back(C.pop());this.decl(C,S)}else this.unknownWord(C)}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,a,u,m){let w,b,S,C,O=u.length,x="",I=!0;for(let e=0;e<O;e+=1)w=u[e],b=w[0],"space"!==b||e!==O-1||m?"comment"===b?(C=u[e-1]?u[e-1][0]:"empty",S=u[e+1]?u[e+1][0]:"empty",Xr[C]||Xr[S]||","===x.slice(-1)?I=!1:x+=w[1]):x+=w[1]:I=!1;if(!I){let m=u.reduce(((e,a)=>e+a[1]),"");e.raws[a]={raw:m,value:x}}e[a]=x}rule(e){e.pop();let a=new Jr;this.init(a,e[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(a,"selector",e),this.current=a}spacesAndCommentsFromEnd(e){let a,u="";for(;e.length&&(a=e[e.length-1][0],"space"===a||"comment"===a);)u=e.pop()[1]+u;return u}spacesAndCommentsFromStart(e){let a,u="";for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)u+=e.shift()[1];return u}spacesFromEnd(e){let a,u="";for(;e.length&&(a=e[e.length-1][0],"space"===a);)u=e.pop()[1]+u;return u}stringFrom(e,a){let u="";for(let m=a;m<e.length;m++)u+=e[m][1];return e.splice(a,e.length-a),u}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 "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}};let en=ot,tn=Jt,rn=Qr;function Wt(e,a){let u=new tn(e,a),m=new rn(u);try{m.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&a&&a.from&&(/\.scss$/i.test(a.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(a.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(a.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return m.root}var nn=Wt;Wt.default=Wt,en.registerParse(Wt);let sn=class{constructor(e,a={}){if(this.type="warning",this.text=e,a.node&&a.node.source){let e=a.node.rangeBy(a);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in a)this[e]=a[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var on=sn;sn.default=sn;let an=on,ln=class{get content(){return this.css}constructor(e,a,u){this.processor=e,this.messages=[],this.root=a,this.opts=u,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new an(e,a);return this.messages.push(u),u}warnings(){return this.messages.filter((e=>"warning"===e.type))}};var cn=ln;ln.default=ln;let un={};var so=function(e){un[e]||(un[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let hn=ot,pn=dt,dn=$r,fn=nn,mn=cn,yn=sr,gn=ke,{isClean:wn,my:bn}=Ce,Sn=so;const On={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},In={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},En={Once:!0,postcssPlugin:!0,prepare:!0};function De(e){return"object"==typeof e&&"function"==typeof e.then}function no(e){let a=!1,u=On[e.type];return"decl"===e.type?a=e.prop.toLowerCase():"atrule"===e.type&&(a=e.name.toLowerCase()),a&&e.append?[u,u+"-"+a,0,u+"Exit",u+"Exit-"+a]:a?[u,u+"-"+a,u+"Exit",u+"Exit-"+a]:e.append?[u,0,u+"Exit"]:[u,u+"Exit"]}function Gn(e){let a;return a="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:no(e),{eventIndex:0,events:a,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Ps(e){return e[wn]=!1,e.nodes&&e.nodes.forEach((e=>Ps(e))),e}let Mn={},Rn=class ro{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"}constructor(e,a,u){let m;if(this.stringified=!1,this.processed=!1,"object"!=typeof a||null===a||"root"!==a.type&&"document"!==a.type)if(a instanceof ro||a instanceof mn)m=Ps(a.root),a.map&&(typeof u.map>"u"&&(u.map={}),u.map.inline||(u.map.inline=!1),u.map.prev=a.map);else{let e=fn;u.syntax&&(e=u.syntax.parse),u.parser&&(e=u.parser),e.parse&&(e=e.parse);try{m=e(a,u)}catch(e){this.processed=!0,this.error=e}m&&!m[bn]&&hn.rebuild(m)}else m=Ps(a);this.result=new mn(e,m,u),this.helpers={...Mn,postcss:Mn,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,a){let u=this.result.lastPlugin;try{if(a&&a.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(u.postcssVersion&&"production"!==process.env.NODE_ENV){let e=u.postcssPlugin,a=u.postcssVersion,m=this.result.processor.version,w=a.split("."),b=m.split(".");(w[0]!==b[0]||parseInt(w[1])>parseInt(b[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+m+", but "+e+" uses "+a+". Perhaps this is the source of the error below.")}}else e.plugin=u.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let t=(e,a,u)=>{this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push([e,u])};for(let e of this.plugins)if("object"==typeof e)for(let a in e){if(!In[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!En[a])if("object"==typeof e[a])for(let u in e[a])t(e,"*"===u?a:a+"-"+u.toLowerCase(),e[a][u]);else"function"==typeof e[a]&&t(e,a,e[a])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let a=this.plugins[e],u=this.runOnRoot(a);if(De(u))try{await u}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[wn];){e[wn]=!0;let a=[Gn(e)];for(;a.length>0;){let e=this.visitTick(a);if(De(e))try{await e}catch(e){let u=a[a.length-1].node;throw this.handleError(e,u)}}}if(this.listeners.OnceExit)for(let[a,u]of this.listeners.OnceExit){this.result.lastPlugin=a;try{if("document"===e.type){let a=e.nodes.map((e=>u(e,this.helpers)));await Promise.all(a)}else await u(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let a=this.result.root.nodes.map((a=>e.Once(a,this.helpers)));return De(a[0])?Promise.all(a):a}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,a=gn;e.syntax&&(a=e.syntax.stringify),e.stringifier&&(a=e.stringifier),a.stringify&&(a=a.stringify);let u=new dn(a,this.result.root,this.result.opts).generate();return this.result.css=u[0],this.result.map=u[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(De(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[wn];)e[wn]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let a of e.nodes)this.visitSync(this.listeners.OnceExit,a);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,a){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Sn("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,a)}toString(){return this.css}visitSync(e,a){for(let[u,m]of e){let e;this.result.lastPlugin=u;try{e=m(a,this.helpers)}catch(e){throw this.handleError(e,a.proxyOf)}if("root"!==a.type&&"document"!==a.type&&!a.parent)return!0;if(De(e))throw this.getAsyncError()}}visitTick(e){let a=e[e.length-1],{node:u,visitors:m}=a;if("root"!==u.type&&"document"!==u.type&&!u.parent)return void e.pop();if(m.length>0&&a.visitorIndex<m.length){let[e,w]=m[a.visitorIndex];a.visitorIndex+=1,a.visitorIndex===m.length&&(a.visitors=[],a.visitorIndex=0),this.result.lastPlugin=e;try{return w(u.toProxy(),this.helpers)}catch(e){throw this.handleError(e,u)}}if(0!==a.iterator){let m,w=a.iterator;for(;m=u.nodes[u.indexes[w]];)if(u.indexes[w]+=1,!m[wn])return m[wn]=!0,void e.push(Gn(m));a.iterator=0,delete u.indexes[w]}let w=a.events;for(;a.eventIndex<w.length;){let e=w[a.eventIndex];if(a.eventIndex+=1,0===e)return void(u.nodes&&u.nodes.length&&(u[wn]=!0,a.iterator=u.getIterator()));if(this.listeners[e])return void(a.visitors=this.listeners[e])}e.pop()}walkSync(e){e[wn]=!0;let a=no(e);for(let u of a)if(0===u)e.nodes&&e.each((e=>{e[wn]||this.walkSync(e)}));else{let a=this.listeners[u];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Rn.registerPostcss=e=>{Mn=e};var Tn=Rn;Rn.default=Rn,yn.registerLazyResult(Rn),pn.registerLazyResult(Rn);let _n=$r,Pn=nn;const Ln=cn;let Nn=ke,Dn=so,An=class{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,a=Pn;try{e=a(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,a,u){a=a.toString(),this.stringified=!1,this._processor=e,this._css=a,this._opts=u,this._map=void 0;let m,w=Nn;this.result=new Ln(this._processor,m,this._opts),this.result.css=a;let b=this;Object.defineProperty(this.result,"root",{get:()=>b.root});let S=new _n(w,m,this._opts,a);if(S.isMap()){let[e,a]=S.generate();e&&(this.result.css=e),a&&(this.result.map=a)}else S.clearAnnotation(),this.result.css=S.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,a){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Dn("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,a)}toString(){return this._css}warnings(){return[]}};var Fn=An;An.default=An;let Wn=dt,Un=Tn,jn=Fn,zn=sr,Bn=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let a=[];for(let u of e)if(!0===u.postcss?u=u():u.postcss&&(u=u.postcss),"object"==typeof u&&Array.isArray(u.plugins))a=a.concat(u.plugins);else if("object"==typeof u&&u.postcssPlugin)a.push(u);else if("function"==typeof u)a.push(u);else{if("object"!=typeof u||!u.parse&&!u.stringify)throw new Error(u+" 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 a}process(e,a={}){return this.plugins.length||a.parser||a.stringifier||a.syntax?new Un(this,e,a):new jn(this,e,a)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var Vn=Bn;Bn.default=Bn,zn.registerProcessor(Bn),Wn.registerProcessor(Bn);let Zn=lt,qn=Ue,Kn=ot,Qn=ye,es=Ve,ts=dt,rs=wr,ns=Jt,ss=Tn,os=ir,as=Le,ls=nn,cs=Vn,us=cn,hs=sr,ps=ur,ds=ke,ms=on;function L$1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new cs(e)}L$1.plugin=function(e,a){let u,m=!1;function n(...u){console&&console.warn&&!m&&(m=!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 w=a(...u);return w.postcssPlugin=e,w.postcssVersion=(new cs).version,w}return Object.defineProperty(n,"postcss",{get:()=>(u||(u=n()),u)}),n.process=function(e,a,u){return L$1([n(u)]).process(e,a)},n},L$1.stringify=ds,L$1.parse=ls,L$1.fromJSON=rs,L$1.list=os,L$1.comment=e=>new qn(e),L$1.atRule=e=>new Zn(e),L$1.decl=e=>new es(e),L$1.rule=e=>new ps(e),L$1.root=e=>new hs(e),L$1.document=e=>new ts(e),L$1.CssSyntaxError=Qn,L$1.Declaration=es,L$1.Container=Kn,L$1.Processor=cs,L$1.Document=ts,L$1.Comment=qn,L$1.Warning=ms,L$1.AtRule=Zn,L$1.Result=us,L$1.Input=ns,L$1.Rule=ps,L$1.Root=hs,L$1.Node=as,ss.registerPostcss(L$1);var ys=L$1;L$1.default=L$1;const gs=Yi(ys);gs.stringify,gs.fromJSON,gs.plugin,gs.parse,gs.list,gs.document,gs.comment,gs.atRule,gs.rule,gs.decl,gs.root,gs.CssSyntaxError,gs.Declaration,gs.Container,gs.Processor,gs.Document,gs.Comment,gs.Warning,gs.AtRule,gs.Result,gs.Input,gs.Rule,gs.Root,gs.Node;var ws=(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[e.Device=24]="Device",e[e.SailfishCustom=25]="SailfishCustom",e))(ws||{}),bs=(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[e.Typing=17]="Typing",e))(bs||{}),vs=(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))(vs||{}),Ss=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Ss||{}),Os=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Os||{}),xs=(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))(xs||{});function G(e,a,u=document){const m={capture:!0,passive:!0};return u.addEventListener(e,a,m),()=>u.removeEventListener(e,a,m)}const Is="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 Es={map:{},getId:()=>(console.error(Is),-1),getNode:()=>(console.error(Is),null),removeNodeFromMap(){console.error(Is)},has:()=>(console.error(Is),!1),reset(){console.error(Is)}};function $e(e,a,u={}){let m=null,w=0;return function(...b){const S=Date.now();!w&&!1===u.leading&&(w=S);const C=a-(S-w),O=this;C<=0||C>a?(m&&(clearTimeout(m),m=null),w=S,e.apply(O,b)):!m&&!1!==u.trailing&&(m=setTimeout((()=>{w=!1===u.leading?0:Date.now(),m=null,e.apply(O,b)}),C))}}function qt(e,a,u,m,w=window){const b=w.Object.getOwnPropertyDescriptor(e,a);return w.Object.defineProperty(e,a,m?u:{set(e){setTimeout((()=>{u.set.call(this,e)}),0),b&&b.set&&b.set.call(this,e)}}),()=>qt(e,a,b||{},!0)}function Re(e,a,u){try{if(!(a in e))return()=>{};const m=e[a],w=u(m);return"function"==typeof w&&(w.prototype=w.prototype||{},Object.defineProperties(w,{__rrweb_original__:{enumerable:!1,value:m}})),e[a]=w,()=>{e[a]=m}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(Es=new Proxy(Es,{get:(e,a,u)=>("map"===a&&console.error(Is),Reflect.get(e,a,u))}));let Ms,Rs=Date.now;function po(e){var a,u,m,w,b,S;const C=e.document;return{left:C.scrollingElement?C.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==C?void 0:C.documentElement.scrollLeft)||(null==(u=null==(a=null==C?void 0:C.body)?void 0:a.parentElement)?void 0:u.scrollLeft)||(null==(m=null==C?void 0:C.body)?void 0:m.scrollLeft)||0,top:C.scrollingElement?C.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==C?void 0:C.documentElement.scrollTop)||(null==(b=null==(w=null==C?void 0:C.body)?void 0:w.parentElement)?void 0:b.scrollTop)||(null==(S=null==C?void 0:C.body)?void 0:S.scrollTop)||0}}function fo(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function mo(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function go(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Z(e,a,u,m){if(!e)return!1;const w=go(e);if(!w)return!1;try{if("string"==typeof a){if(w.classList.contains(a)||m&&null!==w.closest("."+a))return!0}else if(Dt(w,a,m))return!0}catch{}return!(!u||!(w.matches(u)||m&&null!==w.closest(u)))}function fs(e,a,u){return!("TITLE"!==e.tagName||!u.headTitleMutations)||-2===a.getId(e)}function yo(e,a){if(_e(e))return!1;const u=a.getId(e);return!a.has(u)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||yo(e.parentNode,a))}function Ns(e){return!!e.changedTouches}function wo(e,a){return!("IFRAME"!==e.nodeName||!a.getMeta(e))}function bo(e,a){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!a.getMeta(e))}function Fs(e){return!(null==e||!e.shadowRoot)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Rs=()=>(new Date).getTime());class Wl{constructor(){b$1(this,"id",1),b$1(this,"styleIDMap",new WeakMap),b$1(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,a){if(this.has(e))return this.getId(e);let u;return u=void 0===a?this.id++:a,this.styleIDMap.set(e,u),this.idStyleMap.set(u,e),u}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 So(e){var a,u;let m=null;return(null==(u=null==(a=e.getRootNode)?void 0:a.call(e))?void 0:u.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(m=e.getRootNode().host),m}function Bl(e){const a=e.ownerDocument;if(!a)return!1;const u=function _l(e){let a,u=e;for(;a=So(u);)u=a;return u}(e);return a.contains(u)}function vo(e){const a=e.ownerDocument;return!!a&&(a.contains(e)||Bl(e))}const M=e=>Ms?(...a)=>{try{return e(...a)}catch(e){if(Ms&&!0===Ms(e))return;throw e}}:e;class Yn{constructor(e){b$1(this,"iframeIdToRemoteIdMap",new WeakMap),b$1(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,a,u,m){const w=u||this.getIdToRemoteIdMap(e),b=m||this.getRemoteIdToIdMap(e);let S=w.get(a);return S||(S=this.generateIdFn(),w.set(a,S),b.set(S,a)),S}getIds(e,a){const u=this.getIdToRemoteIdMap(e),m=this.getRemoteIdToIdMap(e);return a.map((a=>this.getId(e,a,u,m)))}getRemoteId(e,a,u){const m=u||this.getRemoteIdToIdMap(e);return"number"!=typeof a?a:m.get(a)||-1}getRemoteIds(e,a){const u=this.getRemoteIdToIdMap(e);return a.map((a=>this.getRemoteId(e,a,u)))}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 a=this.iframeIdToRemoteIdMap.get(e);return a||(a=new Map,this.iframeIdToRemoteIdMap.set(e,a)),a}getRemoteIdToIdMap(e){let a=this.iframeRemoteIdToIdMap.get(e);return a||(a=new Map,this.iframeRemoteIdToIdMap.set(e,a)),a}}class Vl{constructor(e){b$1(this,"iframes",new WeakMap),b$1(this,"crossOriginIframeMap",new WeakMap),b$1(this,"crossOriginIframeMirror",new Yn(Ir)),b$1(this,"crossOriginIframeStyleMirror"),b$1(this,"crossOriginIframeRootIdMap",new WeakMap),b$1(this,"mirror"),b$1(this,"mutationCb"),b$1(this,"wrappedEmit"),b$1(this,"loadListener"),b$1(this,"stylesheetManager"),b$1(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Yn(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,a){var u,m;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:a}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(u=e.contentWindow)||u.addEventListener("message",this.handleMessage.bind(this))),null==(m=this.loadListener)||m.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 a=e;"@sailfish-rrweb/rrweb"!==a.data.type||(a.origin,a.data.origin)}transformCrossOriginEvent(e,a){var u;switch(a.type){case ws.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(a.data.node,e);const u=a.data.node.id;return this.crossOriginIframeRootIdMap.set(e,u),this.patchRootIdOnNode(a.data.node,u),{timestamp:a.timestamp,type:ws.IncrementalSnapshot,data:{source:bs.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:a.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case ws.Meta:case ws.Load:case ws.DomContentLoaded:return!1;case ws.Plugin:return a;case ws.Custom:return this.replaceIds(a.data.payload,e,["id","parentId","previousId","nextId"]),a;case ws.IncrementalSnapshot:switch(a.data.source){case bs.Mutation:return a.data.adds.forEach((a=>{this.replaceIds(a,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(a.node,e);const u=this.crossOriginIframeRootIdMap.get(e);u&&this.patchRootIdOnNode(a.node,u)})),a.data.removes.forEach((a=>{this.replaceIds(a,e,["parentId","id"])})),a.data.attributes.forEach((a=>{this.replaceIds(a,e,["id"])})),a.data.texts.forEach((a=>{this.replaceIds(a,e,["id"])})),a;case bs.Drag:case bs.TouchMove:case bs.MouseMove:return a.data.positions.forEach((a=>{this.replaceIds(a,e,["id"])})),a;case bs.ViewportResize:return!1;case bs.MediaInteraction:case bs.MouseInteraction:case bs.Scroll:case bs.CanvasMutation:case bs.Input:return this.replaceIds(a.data,e,["id"]),a;case bs.StyleSheetRule:case bs.StyleDeclaration:return this.replaceIds(a.data,e,["id"]),this.replaceStyleIds(a.data,e,["styleId"]),a;case bs.Font:return a;case bs.Selection:return a.data.ranges.forEach((a=>{this.replaceIds(a,e,["start","end"])})),a;case bs.AdoptedStyleSheet:return this.replaceIds(a.data,e,["id"]),this.replaceStyleIds(a.data,e,["styleIds"]),null==(u=a.data.styles)||u.forEach((a=>{this.replaceStyleIds(a,e,["styleId"])})),a}}return!1}replace(e,a,u,m){for(const w of m)!Array.isArray(a[w])&&"number"!=typeof a[w]||(Array.isArray(a[w])?a[w]=e.getIds(u,a[w]):a[w]=e.getId(u,a[w]));return a}replaceIds(e,a,u){return this.replace(this.crossOriginIframeMirror,e,a,u)}replaceStyleIds(e,a,u){return this.replace(this.crossOriginIframeStyleMirror,e,a,u)}replaceIdOnNode(e,a){this.replaceIds(e,a,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,a)}))}patchRootIdOnNode(e,a){e.type!==B.Document&&!e.rootId&&(e.rootId=a),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,a)}))}}function $n(e){return"__ln"in e}class Gl{constructor(){b$1(this,"length",0),b$1(this,"head",null),b$1(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let a=this.head;for(let u=0;u<e;u++)a=(null==a?void 0:a.next)||null;return a}addNode(e){const a={value:e,previous:null,next:null};if(e.__ln=a,e.previousSibling&&$n(e.previousSibling)){const u=e.previousSibling.__ln.next;a.next=u,a.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=a,u&&(u.previous=a)}else if(e.nextSibling&&$n(e.nextSibling)&&e.nextSibling.__ln.previous){const u=e.nextSibling.__ln.previous;a.previous=u,a.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=a,u&&(u.next=a)}else this.head&&(this.head.previous=a),a.next=this.head,this.head=a;null===a.next&&(this.tail=a),this.length++}removeNode(e){const a=e.__ln;this.head&&(a.previous?(a.previous.next=a.next,a.next?a.next.previous=a.previous:this.tail=a.previous):(this.head=a.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xn=(e,a)=>`${e}@${a}`;class Zl{constructor(){b$1(this,"frozen",!1),b$1(this,"locked",!1),b$1(this,"texts",[]),b$1(this,"attributes",[]),b$1(this,"attributeMap",new WeakMap),b$1(this,"removes",[]),b$1(this,"mapRemoves",[]),b$1(this,"movedMap",{}),b$1(this,"addedSet",new Set),b$1(this,"movedSet",new Set),b$1(this,"droppedSet",new Set),b$1(this,"mutationCb"),b$1(this,"blockClass"),b$1(this,"blockSelector"),b$1(this,"maskTextClass"),b$1(this,"maskTextSelector"),b$1(this,"inlineStylesheet"),b$1(this,"maskInputOptions"),b$1(this,"maskTextFn"),b$1(this,"maskInputFn"),b$1(this,"keepIframeSrcFn"),b$1(this,"recordCanvas"),b$1(this,"inlineImages"),b$1(this,"slimDOMOptions"),b$1(this,"dataURLOptions"),b$1(this,"doc"),b$1(this,"mirror"),b$1(this,"iframeManager"),b$1(this,"stylesheetManager"),b$1(this,"shadowDomManager"),b$1(this,"canvasManager"),b$1(this,"processedNodeManager"),b$1(this,"unattachedDoc"),b$1(this,"processMutations",(e=>{e.forEach(this.processMutation),this.emit()})),b$1(this,"emit",(()=>{if(this.frozen||this.locked)return;const e=[],a=new Set,u=new Gl,r=e=>{let a=e,u=-2;for(;-2===u;)a=a&&a.nextSibling,u=a&&this.mirror.getId(a);return u},i=m=>{if(!m.parentNode||!vo(m)||"TEXTAREA"===m.parentNode.tagName)return;const w=_e(m.parentNode)?this.mirror.getId(So(m)):this.mirror.getId(m.parentNode),b=r(m);if(-1===w||-1===b)return u.addNode(m);const S=Se(m,{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=>{wo(e,this.mirror)&&this.iframeManager.addIframe(e),bo(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Fs(m)&&this.shadowDomManager.addShadowRoot(m.shadowRoot,this.doc)},onIframeLoad:(e,a)=>{this.iframeManager.attachIframe(e,a),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,a)=>{this.stylesheetManager.attachLinkElement(e,a)}});S&&(e.push({parentId:w,nextId:b,node:S}),a.add(S.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)Hn(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(const e of this.addedSet)!Jn(this.droppedSet,e)&&!Hn(this.removes,e,this.mirror)||Jn(this.movedSet,e)?i(e):this.droppedSet.add(e);let m=null;for(;u.length;){let e=null;if(m){const a=this.mirror.getId(m.value.parentNode),u=r(m.value);-1!==a&&-1!==u&&(e=m)}if(!e){let a=u.tail;for(;a;){const u=a;if(a=a.previous,u){const a=this.mirror.getId(u.value.parentNode);if(-1===r(u.value))continue;if(-1!==a){e=u;break}{const a=u.value;if(a.parentNode&&a.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const m=a.parentNode.host;if(-1!==this.mirror.getId(m)){e=u;break}}}}}}if(!e){for(;u.head;)u.removeNode(u.head.value);break}m=e.previous,u.removeNode(e.value),i(e.value)}const w={texts:this.texts.map((e=>{const a=e.node;return a.parentNode&&"TEXTAREA"===a.parentNode.tagName&&this.genTextAreaValueMutation(a.parentNode),{id:this.mirror.getId(a),value:e.value}})).filter((e=>!a.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:a}=e;if("string"==typeof a.style){const u=JSON.stringify(e.styleDiff),m=JSON.stringify(e._unchangedStyles);u.length<a.style.length&&(u+m).split("var(").length===a.style.split("var(").length&&(a.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:a}})).filter((e=>!a.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!w.texts.length&&!w.attributes.length&&!w.removes.length&&!w.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(w))})),b$1(this,"genTextAreaValueMutation",(e=>{let a=this.attributeMap.get(e);a||(a={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e,a)),a.attributes.value=Array.from(e.childNodes,(e=>e.textContent||"")).join("")})),b$1(this,"processMutation",(e=>{if(!fs(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const a=e.target.textContent;!Z(e.target,this.blockClass,this.blockSelector,!1)&&a!==e.oldValue&&this.texts.push({value:Er(e.target,this.maskTextClass,this.maskTextSelector,!0)&&a?this.maskTextFn?this.maskTextFn(a,go(e.target)):a.replace(/[\S]/g,"*"):a,node:e.target});break}case"attributes":{const a=e.target;let u=e.attributeName,m=e.target.getAttribute(u);if("value"===u){const e=Yt(a);m=Zt({element:a,maskInputOptions:this.maskInputOptions,tagName:a.tagName,type:e,value:m,maskInputFn:this.maskInputFn}).value}if(Z(e.target,this.blockClass,this.blockSelector,!1)||m===e.oldValue)return;let w=this.attributeMap.get(e.target);if("IFRAME"===a.tagName&&"src"===u&&!this.keepIframeSrcFn(m)){if(a.contentDocument)return;u="rr_src"}if(w||(w={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(w),this.attributeMap.set(e.target,w)),"type"===u&&"INPUT"===a.tagName&&"password"===(e.oldValue||"").toLowerCase()&&a.setAttribute("data-rr-is-password","true"),!Or(a.tagName,u)&&(w.attributes[u]=Mr(this.doc,fe(a.tagName),fe(u),m),"style"===u)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const u=this.unattachedDoc.createElement("span");e.oldValue&&u.setAttribute("style",e.oldValue);for(const e of Array.from(a.style)){const m=a.style.getPropertyValue(e),b=a.style.getPropertyPriority(e);m!==u.style.getPropertyValue(e)||b!==u.style.getPropertyPriority(e)?w.styleDiff[e]=""===b?m:[m,b]:w._unchangedStyles[e]=[m,b]}for(const e of Array.from(u.style))""===a.style.getPropertyValue(e)&&(w.styleDiff[e]=!1)}break}case"childList":if(Z(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach((a=>this.genAdds(a,e.target))),e.removedNodes.forEach((a=>{const u=this.mirror.getId(a),m=_e(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Z(e.target,this.blockClass,this.blockSelector,!1)||fs(a,this.mirror,this.slimDOMOptions)||!function Fl(e,a){return-1!==a.getId(e)}(a,this.mirror)||(this.addedSet.has(a)?(Us(this.addedSet,a),this.droppedSet.add(a)):this.addedSet.has(e.target)&&-1===u||yo(e.target,this.mirror)||(this.movedSet.has(a)&&this.movedMap[Xn(u,m)]?Us(this.movedSet,a):this.removes.push({parentId:m,id:u,isShadow:!(!_e(e.target)||!Be(e.target))||void 0})),this.mapRemoves.push(a))}))}})),b$1(this,"genAdds",((e,a)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(fs(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let u=null;a&&this.mirror.hasNode(a)&&(u=this.mirror.getId(a)),u&&-1!==u&&(this.movedMap[Xn(this.mirror.getId(e),u)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Z(e,this.blockClass,this.blockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),Fs(e)&&e.shadowRoot.childNodes.forEach((a=>{this.processedNodeManager.add(a,this),this.genAdds(a,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((a=>{this[a]=e[a]}))}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 Us(e,a){e.delete(a),a.childNodes.forEach((a=>Us(e,a)))}function Hn(e,a,u){return 0!==e.length&&function Yl(e,a,u){let m=a.parentNode;for(;m;){const a=u.getId(m);if(e.some((e=>e.id===a)))return!0;m=m.parentNode}return!1}(e,a,u)}function Jn(e,a){return 0!==e.size&&ko(e,a)}function ko(e,a){const{parentNode:u}=a;return!!u&&(!!e.has(u)||ko(e,u))}const Ts=[];function tt(e){try{if("composedPath"in e){const a=e.composedPath();if(a.length)return a[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Co(e,a){var u,m;const w=new Zl;Ts.push(w),w.init(e);let b=window.MutationObserver||window.__rrMutationObserver;const S=null==(m=null==(u=null==window?void 0:window.Zone)?void 0:u.__symbol__)?void 0:m.call(u,"MutationObserver");S&&window[S]&&(b=window[S]);const C=new b(M(w.processMutations.bind(w)));return C.observe(a,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),C}function Xl({mouseInteractionCb:e,doc:a,mirror:u,blockClass:m,blockSelector:w,sampling:b}){if(!1===b.mouseInteraction)return()=>{};const S=!0===b.mouseInteraction||void 0===b.mouseInteraction?{}:b.mouseInteraction,C=[];let O=null;return Object.keys(vs).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==S[e])).forEach((b=>{let S=fe(b);const x=(a=>b=>{const S=tt(b);if(Z(S,m,w,!0))return;let C=null,x=a;if("pointerType"in b){switch(b.pointerType){case"mouse":C=Ss.Mouse;break;case"touch":C=Ss.Touch;break;case"pen":C=Ss.Pen}C===Ss.Touch?vs[a]===vs.MouseDown?x="TouchStart":vs[a]===vs.MouseUp&&(x="TouchEnd"):Ss.Pen}else Ns(b)&&(C=Ss.Touch);null!==C?(O=C,(x.startsWith("Touch")&&C===Ss.Touch||x.startsWith("Mouse")&&C===Ss.Mouse)&&(C=null)):vs[a]===vs.Click&&(C=O,O=null);const I=Ns(b)?b.changedTouches[0]:b;if(!I)return;const E=u.getId(S),{clientX:_,clientY:N}=I;M(e)({type:vs[x],id:E,x:_,y:N,...null!==C&&{pointerType:C}})})(b);if(window.PointerEvent)switch(vs[b]){case vs.MouseDown:case vs.MouseUp:S=S.replace("mouse","pointer");break;case vs.TouchStart:case vs.TouchEnd:return}C.push(G(S,x,a))})),M((()=>{C.forEach((e=>e()))}))}function xo({scrollCb:e,doc:a,mirror:u,blockClass:m,blockSelector:w,sampling:b}){return G("scroll",M($e(M((b=>{const S=tt(b);if(!S||Z(S,m,w,!0))return;const C=u.getId(S);if(S===a&&a.defaultView){const u=po(a.defaultView);e({id:C,x:u.left,y:u.top})}else e({id:C,x:S.scrollLeft,y:S.scrollTop})})),b.scroll||100)),a)}const _s=["INPUT","TEXTAREA","SELECT"],Ls=new WeakMap;function ql({deviceChangeCb:e}){const a=[],s=(a,u)=>{const m=a.device.productName?[a.device.productName]:["Unknown USB Device"];e({type:"USB",action:u,devices:m,timestamp:Date.now()})},n=(a,u)=>{const m=a.device.productName?[a.device.productName]:["Unknown HID Device"];e({type:"HID",action:u,devices:m,timestamp:Date.now()})},i=()=>{navigator.mediaDevices.enumerateDevices().then((a=>{const u=a.map((e=>`${e.kind}: ${e.label}`));e({type:"MediaDevices",action:"change",devices:u,timestamp:Date.now()})})).catch((e=>{console.error("[Media Device Enumeration Error]",e)}))},o=()=>{const a=navigator.onLine?"online":"offline";e({type:"Network",action:"status",status:a,timestamp:Date.now()})},u=[G("online",(()=>{o()}),window),G("offline",(()=>{o()}),window)];"usb"in navigator&&(navigator.usb.addEventListener("connect",(e=>s(e,"connect"))),navigator.usb.addEventListener("disconnect",(e=>s(e,"disconnect")))),"hid"in navigator&&(navigator.hid.addEventListener("connect",(e=>n(e,"connect"))),navigator.hid.addEventListener("disconnect",(e=>n(e,"disconnect")))),navigator.mediaDevices.addEventListener("devicechange",i);const m=setInterval((()=>{(()=>{const a=navigator.getGamepads(),u=Array.from(a).filter((e=>e)).map((e=>(null==e?void 0:e.id)||"Unknown Gamepad"));0!==u.length&&e({type:"Gamepad",action:"change",devices:u,timestamp:Date.now()})})()}),1e4),w=setInterval((async()=>{await(async()=>{try{if(!navigator.bluetooth)return;const u=await navigator.bluetooth.requestDevice({acceptAllDevices:!0});a.includes(u)||(a.push(u),e({type:"Bluetooth",action:"connect",devices:[u.name||"Unknown Bluetooth Device"],timestamp:Date.now()}),u.addEventListener("gattserverdisconnected",(()=>{const m=a.indexOf(u);m>-1&&a.splice(m,1),e({type:"Bluetooth",action:"disconnect",devices:[u.name||"Unknown Bluetooth Device"],timestamp:Date.now()})})))}catch(e){console.error("[Error Discovering Bluetooth Devices]:",e)}})()}),6e4);return()=>{navigator.usb.removeEventListener("connect",s),navigator.usb.removeEventListener("disconnect",s),navigator.hid.removeEventListener("connect",n),navigator.hid.removeEventListener("disconnect",n),u.forEach((e=>e())),navigator.mediaDevices.removeEventListener("devicechange",i),clearInterval(m),clearInterval(w)}}function Bt(e){return function s(e,a){if(ft("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||ft("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||ft("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||ft("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const u=Array.from(e.parentRule.cssRules).indexOf(e);a.unshift(u)}else if(e.parentStyleSheet){const u=Array.from(e.parentStyleSheet.cssRules).indexOf(e);a.unshift(u)}return a}(e,[])}function ue(e,a,u){let m,w;return e?(e.ownerNode?m=a.getId(e.ownerNode):w=u.getId(e),{styleId:w,id:m}):{}}function Io({mirror:e,stylesheetManager:a},u){var m,w,b;let S=null;S="#document"===u.nodeName?e.getId(u):e.getId(u.host);const C="#document"===u.nodeName?null==(m=u.defaultView)?void 0:m.Document:null==(b=null==(w=u.ownerDocument)?void 0:w.defaultView)?void 0:b.ShadowRoot,O=null!=C&&C.prototype?Object.getOwnPropertyDescriptor(null==C?void 0:C.prototype,"adoptedStyleSheets"):void 0;return null!==S&&-1!==S&&C&&O?(Object.defineProperty(u,"adoptedStyleSheets",{configurable:O.configurable,enumerable:O.enumerable,get(){var e;return null==(e=O.get)?void 0:e.call(this)},set(e){var u;const m=null==(u=O.set)?void 0:u.call(this,e);if(null!==S&&-1!==S)try{a.adoptStyleSheets(e,S)}catch{}return m}}),M((()=>{Object.defineProperty(u,"adoptedStyleSheets",{configurable:O.configurable,enumerable:O.enumerable,get:O.get,set:O.set})}))):()=>{}}function au(e,a={}){const u=e.doc.defaultView;if(!u)return()=>{};let m;!function iu(e,a){const{mutationCb:u,mousemoveCb:m,mouseInteractionCb:w,scrollCb:b,viewportResizeCb:S,inputCb:C,typingCb:O,deviceChangeCb:x,mediaInteractionCb:I,styleSheetRuleCb:E,styleDeclarationCb:_,canvasMutationCb:N,fontCb:F,selectionCb:W,customElementCb:U}=e;e.mutationCb=(...e)=>{a.mutation&&a.mutation(...e),u(...e)},e.mousemoveCb=(...e)=>{a.mousemove&&a.mousemove(...e),m(...e)},e.mouseInteractionCb=(...e)=>{a.mouseInteraction&&a.mouseInteraction(...e),w(...e)},e.scrollCb=(...e)=>{a.scroll&&a.scroll(...e),b(...e)},e.viewportResizeCb=(...e)=>{a.viewportResize&&a.viewportResize(...e),S(...e)},e.inputCb=(...e)=>{a.input&&a.input(...e),C(...e)},e.typingCb=(...e)=>{a.typing&&a.typing(...e),O(...e)},e.deviceChangeCb=(...e)=>{a.device&&a.device(...e),x(...e)},e.mediaInteractionCb=(...e)=>{a.mediaInteaction&&a.mediaInteaction(...e),I(...e)},e.styleSheetRuleCb=(...e)=>{a.styleSheetRule&&a.styleSheetRule(...e),E(...e)},e.styleDeclarationCb=(...e)=>{a.styleDeclaration&&a.styleDeclaration(...e),_(...e)},e.canvasMutationCb=(...e)=>{a.canvasMutation&&a.canvasMutation(...e),N(...e)},e.fontCb=(...e)=>{a.font&&a.font(...e),F(...e)},e.selectionCb=(...e)=>{a.selection&&a.selection(...e),W(...e)},e.customElementCb=(...e)=>{a.customElement&&a.customElement(...e),U(...e)}}(e,a),e.recordDOM&&(m=Co(e,e.doc));const w=function $l({mousemoveCb:e,sampling:a,doc:u,mirror:m}){if(!1===a.mousemove)return()=>{};const w="number"==typeof a.mousemove?a.mousemove:50,b="number"==typeof a.mousemoveCallback?a.mousemoveCallback:500;let S,C=[];const O=$e(M((a=>{const u=Date.now()-S;e(C.map((e=>(e.timeOffset-=u,e))),a),C=[],S=null})),b),x=M($e(M((e=>{const a=tt(e),{clientX:u,clientY:w}=Ns(e)?e.changedTouches[0]:e;S||(S=Rs()),C.push({x:u,y:w,id:m.getId(a),timeOffset:Rs()-S}),O(typeof DragEvent<"u"&&e instanceof DragEvent?bs.Drag:e instanceof MouseEvent?bs.MouseMove:bs.TouchMove)})),w,{trailing:!1})),I=[G("mousemove",x,u),G("touchmove",x,u),G("drag",x,u)];return M((()=>{I.forEach((e=>e()))}))}(e),b=Xl(e),S=xo(e),C=function Hl({viewportResizeCb:e},{win:a}){let u=-1,m=-1;const w=M($e(M((()=>{const a=fo(),w=mo();(u!==a||m!==w)&&(e({width:Number(w),height:Number(a)}),u=a,m=w)})),200));return G("resize",w,a)}(e,{win:u}),O=function Kl({inputCb:e,doc:a,mirror:u,blockClass:m,blockSelector:w,ignoreClass:b,ignoreSelector:S,maskInputOptions:C,maskInputFn:O,sampling:x,userTriggeredOnInput:I}){function p(e){let u=tt(e);const x=e.isTrusted,E=u&&u.tagName;if(u&&"OPTION"===E&&(u=u.parentElement),!u||!E||_s.indexOf(E)<0||Z(u,m,w,!0)||u.classList.contains(b)||S&&u.matches(S))return;let _=u.value,N=!1;const F=Yt(u)||"",{value:W,masked:U}=Zt({element:u,maskInputOptions:C,tagName:E,type:F,value:_,maskInputFn:O});_=W,("radio"===F||"checkbox"===F)&&(N=u.checked),f(u,I?{text:_,isChecked:N,masked:U,userTriggered:x}:{text:_,isChecked:N,masked:U});const j=u.name;"radio"===F&&j&&N&&a.querySelectorAll(`input[type='radio'][name='${j}']`).forEach((e=>{if(e!==u){const a=e.value;f(e,I?{text:a,isChecked:!N,masked:U,userTriggered:!1}:{text:a,isChecked:!N,masked:U})}}))}function f(a,m){const w=Ls.get(a);if(!w||w.text!==m.text||w.isChecked!==m.isChecked||w.masked!==m.masked){Ls.set(a,m);const w=u.getId(a);M(e)({...m,id:w})}}const E=("last"===x.input?["change"]:["input","change"]).map((e=>G(e,M(p),a))),_=a.defaultView;if(!_)return()=>{E.forEach((e=>e()))};const N=_.Object.getOwnPropertyDescriptor(_.HTMLInputElement.prototype,"value"),F=[[_.HTMLInputElement.prototype,"value"],[_.HTMLInputElement.prototype,"checked"],[_.HTMLSelectElement.prototype,"value"],[_.HTMLTextAreaElement.prototype,"value"],[_.HTMLSelectElement.prototype,"selectedIndex"],[_.HTMLOptionElement.prototype,"selected"]];return N&&N.set&&E.push(...F.map((e=>qt(e[0],e[1],{set(){M(p)({target:this,isTrusted:!1})}},!1,_)))),M((()=>{E.forEach((e=>e()))}))}(e),x=function Ql({typingCb:e,doc:a,maskInputOptions:u,maskInputFn:m}){const w=G("keydown",(a=>{const w=a.target;let b=!1;const S={key:a.key,code:a.code,altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey},C=w&&w.tagName,O=Yt(w)||"";let x=w.value;if(w&&("INPUT"==w.tagName||"TEXTAREA"==w.tagName)){const{value:e,masked:a}=Zt({element:w,maskInputOptions:u,tagName:C,type:O,value:x,maskInputFn:m});x=e,b=a}e({source:bs.Typing,id:null==w?void 0:w.id,text:x,isMasked:b,target:(e=>{var a;const u=[];for(;e;){let m=e.tagName.toLowerCase();if(e.id){m+=`#${e.id}`,u.unshift(m);break}if(e.className){const a=e.className.split(/\s+/).filter(Boolean);a.length&&(m+=`.${a.join(".")}`)}const w=Array.from((null==(a=e.parentNode)?void 0:a.children)||[]);w.length>1&&(m+=`:nth-child(${w.indexOf(e)+1})`),u.unshift(m),e=e.parentElement}return u.join(" > ")})(w),keyInfo:S})}),a);return()=>{w()}}(e),I=ql(e),E=function su({mediaInteractionCb:e,blockClass:a,blockSelector:u,mirror:m,sampling:w,doc:b}){const S=M((b=>$e(M((w=>{const S=tt(w);if(!S||Z(S,a,u,!0))return;const{currentTime:C,volume:O,muted:x,playbackRate:I,loop:E}=S;e({type:b,id:m.getId(S),currentTime:C,volume:O,muted:x,playbackRate:I,loop:E})})),w.media||500))),C=[G("play",S(xs.Play),b),G("pause",S(xs.Pause),b),G("seeked",S(xs.Seeked),b),G("volumechange",S(xs.VolumeChange),b),G("ratechange",S(xs.RateChange),b)];return M((()=>{C.forEach((e=>e()))}))}(e);let f=()=>{},d3=()=>{},g2=()=>{},h=()=>{};e.recordDOM&&(f=function eu({styleSheetRuleCb:e,mirror:a,stylesheetManager:u},{win:m}){if(!m.CSSStyleSheet||!m.CSSStyleSheet.prototype)return()=>{};const w=m.CSSStyleSheet.prototype.insertRule;m.CSSStyleSheet.prototype.insertRule=new Proxy(w,{apply:M(((m,w,b)=>{const[S,C]=b,{id:O,styleId:x}=ue(w,a,u.styleMirror);return(O&&-1!==O||x&&-1!==x)&&e({id:O,styleId:x,adds:[{rule:S,index:C}]}),m.apply(w,b)}))});const b=m.CSSStyleSheet.prototype.deleteRule;let S,C;m.CSSStyleSheet.prototype.deleteRule=new Proxy(b,{apply:M(((m,w,b)=>{const[S]=b,{id:C,styleId:O}=ue(w,a,u.styleMirror);return(C&&-1!==C||O&&-1!==O)&&e({id:C,styleId:O,removes:[{index:S}]}),m.apply(w,b)}))}),m.CSSStyleSheet.prototype.replace&&(S=m.CSSStyleSheet.prototype.replace,m.CSSStyleSheet.prototype.replace=new Proxy(S,{apply:M(((m,w,b)=>{const[S]=b,{id:C,styleId:O}=ue(w,a,u.styleMirror);return(C&&-1!==C||O&&-1!==O)&&e({id:C,styleId:O,replace:S}),m.apply(w,b)}))})),m.CSSStyleSheet.prototype.replaceSync&&(C=m.CSSStyleSheet.prototype.replaceSync,m.CSSStyleSheet.prototype.replaceSync=new Proxy(C,{apply:M(((m,w,b)=>{const[S]=b,{id:C,styleId:O}=ue(w,a,u.styleMirror);return(C&&-1!==C||O&&-1!==O)&&e({id:C,styleId:O,replaceSync:S}),m.apply(w,b)}))}));const O={};mt("CSSGroupingRule")?O.CSSGroupingRule=m.CSSGroupingRule:(mt("CSSMediaRule")&&(O.CSSMediaRule=m.CSSMediaRule),mt("CSSConditionRule")&&(O.CSSConditionRule=m.CSSConditionRule),mt("CSSSupportsRule")&&(O.CSSSupportsRule=m.CSSSupportsRule));const x={};return Object.entries(O).forEach((([m,w])=>{x[m]={insertRule:w.prototype.insertRule,deleteRule:w.prototype.deleteRule},w.prototype.insertRule=new Proxy(x[m].insertRule,{apply:M(((m,w,b)=>{const[S,C]=b,{id:O,styleId:x}=ue(w.parentStyleSheet,a,u.styleMirror);return(O&&-1!==O||x&&-1!==x)&&e({id:O,styleId:x,adds:[{rule:S,index:[...Bt(w),C||0]}]}),m.apply(w,b)}))}),w.prototype.deleteRule=new Proxy(x[m].deleteRule,{apply:M(((m,w,b)=>{const[S]=b,{id:C,styleId:O}=ue(w.parentStyleSheet,a,u.styleMirror);return(C&&-1!==C||O&&-1!==O)&&e({id:C,styleId:O,removes:[{index:[...Bt(w),S]}]}),m.apply(w,b)}))})})),M((()=>{m.CSSStyleSheet.prototype.insertRule=w,m.CSSStyleSheet.prototype.deleteRule=b,S&&(m.CSSStyleSheet.prototype.replace=S),C&&(m.CSSStyleSheet.prototype.replaceSync=C),Object.entries(O).forEach((([e,a])=>{a.prototype.insertRule=x[e].insertRule,a.prototype.deleteRule=x[e].deleteRule}))}))}(e,{win:u}),d3=Io(e,e.doc),g2=function tu({styleDeclarationCb:e,mirror:a,ignoreCSSAttributes:u,stylesheetManager:m},{win:w}){const b=w.CSSStyleDeclaration.prototype.setProperty;w.CSSStyleDeclaration.prototype.setProperty=new Proxy(b,{apply:M(((w,S,C)=>{var O;const[x,I,E]=C;if(u.has(x))return b.apply(S,[x,I,E]);const{id:_,styleId:N}=ue(null==(O=S.parentRule)?void 0:O.parentStyleSheet,a,m.styleMirror);return(_&&-1!==_||N&&-1!==N)&&e({id:_,styleId:N,set:{property:x,value:I,priority:E},index:Bt(S.parentRule)}),w.apply(S,C)}))});const S=w.CSSStyleDeclaration.prototype.removeProperty;return w.CSSStyleDeclaration.prototype.removeProperty=new Proxy(S,{apply:M(((w,b,C)=>{var O;const[x]=C;if(u.has(x))return S.apply(b,[x]);const{id:I,styleId:E}=ue(null==(O=b.parentRule)?void 0:O.parentStyleSheet,a,m.styleMirror);return(I&&-1!==I||E&&-1!==E)&&e({id:I,styleId:E,remove:{property:x},index:Bt(b.parentRule)}),w.apply(b,C)}))}),M((()=>{w.CSSStyleDeclaration.prototype.setProperty=b,w.CSSStyleDeclaration.prototype.removeProperty=S}))}(e,{win:u}),e.collectFonts&&(h=function nu({fontCb:e,doc:a}){const u=a.defaultView;if(!u)return()=>{};const m=[],w=new WeakMap,b=u.FontFace;u.FontFace=function(e,a,u){const m="string"==typeof a?a:a instanceof SharedArrayBuffer?new ArrayBuffer(a.byteLength):a;"string"!=typeof a&&a instanceof SharedArrayBuffer&&new Uint8Array(m).set(new Uint8Array(a));const S=new b(e,m,u);return w.set(S,{family:e,buffer:"string"!=typeof a,descriptors:u,fontSource:"string"==typeof a?a:JSON.stringify(Array.from(new Uint8Array(m)))}),S};const S=Re(a.fonts,"add",(function(a){return function(u){return setTimeout(M((()=>{const a=w.get(u);a&&(e(a),w.delete(u))})),0),a.apply(this,[u])}}));return m.push((()=>{u.FontFace=b})),m.push(S),M((()=>{m.forEach((e=>e()))}))}(e)));const _=function ru(e){const{doc:a,mirror:u,blockClass:m,blockSelector:w,selectionCb:b}=e;let S=!0;const C=M((()=>{const e=a.getSelection();if(!e||S&&null!=e&&e.isCollapsed)return;S=e.isCollapsed||!1;const C=[],O=e.rangeCount||0;for(let a=0;a<O;a++){const b=e.getRangeAt(a),{startContainer:S,startOffset:O,endContainer:x,endOffset:I}=b;Z(S,m,w,!0)||Z(x,m,w,!0)||C.push({start:u.getId(S),startOffset:O,end:u.getId(x),endOffset:I})}b({ranges:C})}));return C(),G("selectionchange",C)}(e),N=function ou({doc:e,customElementCb:a}){const u=e.defaultView;return u&&u.customElements?Re(u.customElements,"define",(function(e){return function(u,m,w){try{a({define:{name:u}})}catch{console.warn(`Custom element callback failed for ${u}`)}return e.apply(this,[u,m,w])}})):()=>{}}(e),F=[];for(const a of e.plugins)F.push(a.observer(a.callback,u,a.options));return M((()=>{Ts.forEach((e=>e.reset())),null==m||m.disconnect(),w(),b(),S(),C(),O(),x(),E(),f(),d3(),g2(),h(),_(),N(),I(),F.forEach((e=>e()))}))}function ft(e){return typeof window[e]<"u"}function mt(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}const Ds="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",As=typeof self<"u"&&self.Blob&&new Blob([(Ws=Ds,Uint8Array.from(atob(Ws),(e=>e.charCodeAt(0))))],{type:"text/javascript;charset=utf-8"});var Ws;function uu(e){let a;try{if(a=As&&(self.URL||self.webkitURL).createObjectURL(As),!a)throw"";const u=new Worker(a,{name:null==e?void 0:e.name});return u.addEventListener("error",(()=>{(self.URL||self.webkitURL).revokeObjectURL(a)})),u}catch{return new Worker("data:text/javascript;base64,"+Ds,{name:null==e?void 0:e.name})}finally{a&&(self.URL||self.webkitURL).revokeObjectURL(a)}}for(var js="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$s=typeof Uint8Array>"u"?[]:new Uint8Array(256),Vs=0;Vs<64;Vs++)$s[js.charCodeAt(Vs)]=Vs;const Gs=new Map;const Oo=(e,a,u)=>{if(!e||!Ro(e,a)&&"object"!=typeof e)return;const m=function pu(e,a){let u=Gs.get(e);return u||(u=new Map,Gs.set(e,u)),u.has(a)||u.set(a,[]),u.get(a)}(u,e.constructor.name);let w=m.indexOf(e);return-1===w&&(w=m.length,m.push(e)),w};function Ot(e,a,u){if(e instanceof Array)return e.map((e=>Ot(e,a,u)));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){const a=e.constructor.name,u=function(e){var a,u=new Uint8Array(e),m=u.length,w="";for(a=0;a<m;a+=3)w+=js[u[a]>>2],w+=js[(3&u[a])<<4|u[a+1]>>4],w+=js[(15&u[a+1])<<2|u[a+2]>>6],w+=js[63&u[a+2]];return m%3==2?w=w.substring(0,w.length-1)+"=":m%3==1&&(w=w.substring(0,w.length-2)+"=="),w}(e);return{rr_type:a,base64:u}}if(e instanceof DataView)return{rr_type:e.constructor.name,args:[Ot(e.buffer,a,u),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const a=e.constructor.name,{src:u}=e;return{rr_type:a,src:u}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[Ot(e.data,a,u),e.width,e.height]};if(Ro(e,a)||"object"==typeof e){return{rr_type:e.constructor.name,index:Oo(e,a,u)}}return e}const Eo=(e,a,u)=>e.map((e=>Ot(e,a,u))),Ro=(e,a)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((e=>"function"==typeof a[e])).find((u=>e instanceof a[u]));function er(e,a,u,m){const w=[];try{const b=Re(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(w,...b){if(!Z(this,a,u,!0)){const e=function fu(e){return"experimental-webgl"===e?"webgl":e}(w);if("__context"in this||(this.__context=e),m&&["webgl","webgl2"].includes(e))if(b[0]&&"object"==typeof b[0]){const e=b[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else b.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[w,...b])}}));w.push(b)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{w.forEach((e=>e()))}}function tr(e,a,u,m,w,b){const S=[],C=Object.getOwnPropertyNames(e);for(const O of C)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(O))try{if("function"!=typeof e[O])continue;const C=Re(e,O,(function(e){return function(...S){const C=e.apply(this,S);if(Oo(C,b,this),"tagName"in this.canvas&&!Z(this.canvas,m,w,!0)){const e=Eo(S,b,this),m={type:a,property:O,args:e};u(this.canvas,m)}return C}}));S.push(C)}catch{const m=qt(e,O,{set(e){u(this.canvas,{type:a,property:O,args:[e],setter:!0})}});S.push(m)}return S}class gu{constructor(e){b$1(this,"pendingCanvasMutations",new Map),b$1(this,"rafStamps",{latestId:0,invokeId:null}),b$1(this,"mirror"),b$1(this,"mutationCb"),b$1(this,"resetObservers"),b$1(this,"frozen",!1),b$1(this,"locked",!1),b$1(this,"processMutation",((e,a)=>{(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(a)}));const{sampling:a="all",win:u,blockClass:m,blockSelector:w,recordCanvas:b,dataURLOptions:S}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,b&&"all"===a&&this.initCanvasMutationObserver(u,m,w),b&&"number"==typeof a&&this.initCanvasFPSObserver(a,u,m,w,{dataURLOptions:S})}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,a,u,m,w){const b=er(a,u,m,!0),S=new Map,C=new uu;C.onmessage=e=>{const{id:a}=e.data;if(S.set(a,!1),!("base64"in e.data))return;const{base64:u,type:m,width:w,height:b}=e.data;this.mutationCb({id:a,type:Os["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:m}]},0,0]}]})};const O=1e3/e;let x,I=0;const d3=e=>{I&&e-I<O||(I=e,(()=>{const e=[];return a.document.querySelectorAll("canvas").forEach((a=>{Z(a,u,m,!0)||e.push(a)})),e})().forEach((async e=>{var a;const u=this.mirror.getId(e);if(S.get(u)||0===e.width||0===e.height)return;if(S.set(u,!0),["webgl","webgl2"].includes(e.__context)){const u=e.getContext(e.__context);!1===(null==(a=null==u?void 0:u.getContextAttributes())?void 0:a.preserveDrawingBuffer)&&u.clear(u.COLOR_BUFFER_BIT)}const m=await createImageBitmap(e);C.postMessage({id:u,bitmap:m,width:e.width,height:e.height,dataURLOptions:w.dataURLOptions},[m])}))),x=requestAnimationFrame(d3)};x=requestAnimationFrame(d3),this.resetObservers=()=>{b(),cancelAnimationFrame(x)}}initCanvasMutationObserver(e,a,u){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const m=er(e,a,u,!1),w=function du(e,a,u,m){const w=[],b=Object.getOwnPropertyNames(a.CanvasRenderingContext2D.prototype);for(const S of b)try{if("function"!=typeof a.CanvasRenderingContext2D.prototype[S])continue;const b=Re(a.CanvasRenderingContext2D.prototype,S,(function(w){return function(...b){return Z(this.canvas,u,m,!0)||setTimeout((()=>{const u=Eo(b,a,this);e(this.canvas,{type:Os["2D"],property:S,args:u})}),0),w.apply(this,b)}}));w.push(b)}catch{const u=qt(a.CanvasRenderingContext2D.prototype,S,{set(a){e(this.canvas,{type:Os["2D"],property:S,args:[a],setter:!0})}});w.push(u)}return()=>{w.forEach((e=>e()))}}(this.processMutation.bind(this),e,a,u),b=function mu(e,a,u,m){const w=[];return w.push(...tr(a.WebGLRenderingContext.prototype,Os.WebGL,e,u,m,a)),typeof a.WebGL2RenderingContext<"u"&&w.push(...tr(a.WebGL2RenderingContext.prototype,Os.WebGL2,e,u,m,a)),()=>{w.forEach((e=>e()))}}(this.processMutation.bind(this),e,a,u);this.resetObservers=()=>{m(),w(),b()}}startPendingCanvasMutationFlusher(){requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach(((e,a)=>{const u=this.mirror.getId(a);this.flushPendingCanvasMutationFor(a,u)})),requestAnimationFrame((()=>this.flushPendingCanvasMutations()))}flushPendingCanvasMutationFor(e,a){if(this.frozen||this.locked)return;const u=this.pendingCanvasMutations.get(e);if(!u||-1===a)return;const m=u.map((e=>{const{type:a,...u}=e;return u})),{type:w}=u[0];this.mutationCb({id:a,type:w,commands:m}),this.pendingCanvasMutations.delete(e)}}class yu{constructor(){b$1(this,"nodeMap",new WeakMap),b$1(this,"active",!1)}inOtherBuffer(e,a){const u=this.nodeMap.get(e);return u&&Array.from(u).some((e=>e!==a))}add(e,a){this.active||(this.active=!0,requestAnimationFrame((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(a))}destroy(){}}class wu{constructor(e){b$1(this,"shadowDoms",new WeakSet),b$1(this,"mutationCb"),b$1(this,"scrollCb"),b$1(this,"bypassOptions"),b$1(this,"mirror"),b$1(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,a){if(!Be(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);const u=Co({...this.bypassOptions,doc:a,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>u.disconnect())),this.restoreHandlers.push(xo({...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(e.host)),this.restoreHandlers.push(Io({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,a){const u=this;this.restoreHandlers.push(Re(e.prototype,"attachShadow",(function(e){return function(m){const w=e.call(this,m);return this.shadowRoot&&vo(this)&&u.addShadowRoot(this.shadowRoot,a),w}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}class bu{constructor(e){b$1(this,"trackedLinkElements",new WeakSet),b$1(this,"mutationCb"),b$1(this,"adoptedStyleSheetCb"),b$1(this,"styleMirror",new Wl),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,a){"_cssText"in a.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:a.id,attributes:a.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,a){if(0===e.length)return;const u={id:a,styleIds:[]},m=[];for(const a of e){let e;this.styleMirror.has(a)?e=this.styleMirror.getId(a):(e=this.styleMirror.add(a),m.push({styleId:e,rules:Array.from(a.rules||CSSRule,((e,a)=>({rule:kr(e),index:a})))})),u.styleIds.push(e)}m.length>0&&(u.styles=m),this.adoptedStyleSheetCb(u)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}let Zs,qs,Hs,Ys=!1;var Ks;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Ks=e.contentWindow)?void 0:Ks.Array.from)||Array.from,document.body.removeChild(e)}}catch(Ws){console.debug("Unable to override Array.from",Ws)}const Xs=function Ci(){return new V}();function ae(e={}){const{emit:a,checkoutEveryNms:u,checkoutEveryNth:m,blockClass:w="rr-block",blockSelector:b=null,ignoreClass:S="rr-ignore",ignoreSelector:C=null,maskTextClass:O="rr-mask",maskTextSelector:x=null,inlineStylesheet:I=!0,maskAllInputs:E,maskInputOptions:_,slimDOMOptions:N,maskInputFn:F,maskTextFn:W,hooks:U,packFn:j,sampling:$={},dataURLOptions:B={},mousemoveWait:q,recordDOM:H=!0,recordCanvas:Y=!1,recordCrossOriginIframes:J=!1,recordAfter:X=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:Q=!1,collectFonts:ee=!1,inlineImages:te=!1,plugins:re,keepIframeSrcFn:ne=()=>!1,ignoreCSSAttributes:se=new Set([]),errorHandler:oe}=e;!function zl(e){Ms=e}(oe);const ie=!J||window.parent===window;let le=!1;if(!ie)try{window.parent.document&&(le=!1)}catch{le=!0}if(ie&&!a)throw new Error("emit function is required");if(!ie&&!le)return()=>{};void 0!==q&&void 0===$.mousemove&&($.mousemove=q),Xs.reset();const ce=!0===E?{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!==_?_:{password:!0},he=!0===N||"all"===N?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===N,headMetaDescKeywords:"all"===N,headTitleMutations:"all"===N}:N||{};!function Ul(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),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let a=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===a)return!0}while(a=a&&a.parentNode);return!1})}();let pe,de=0;const vn=e=>{for(const a of re||[])a.eventProcessor&&(e=a.eventProcessor(e));return j&&!le&&(e=j(e)),e};Zs=(e,w)=>{var b;const S=e;if(S.timestamp=Rs(),null!=(b=Ts[0])&&b.isFrozen()&&S.type!==ws.FullSnapshot&&!(S.type===ws.IncrementalSnapshot&&S.data.source===bs.Mutation)&&Ts.forEach((e=>e.unfreeze())),ie)null==a||a(vn(S),w);else if(le){const e={type:"@sailfish-rrweb/rrweb",event:vn(S),origin:window.location.origin,isCheckout:w};window.parent.postMessage(e,"*")}if(S.type===ws.FullSnapshot)pe=S,de=0;else if(S.type===ws.IncrementalSnapshot){if(S.data.source===bs.Mutation&&S.data.isAttachIframe)return;de++;const e=m&&de>=m,a=u&&S.timestamp-pe.timestamp>u;(e||a)&&qs(!0)}};const rt=e=>{Zs({type:ws.IncrementalSnapshot,data:{source:bs.Mutation,...e}})},kn=e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.Scroll,...e}}),Cn=e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.CanvasMutation,...e}}),me=new bu({mutationCb:rt,adoptedStyleSheetCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.AdoptedStyleSheet,...e}})}),ye=new Vl({mirror:Xs,mutationCb:rt,stylesheetManager:me,recordCrossOriginIframes:J,wrappedEmit:Zs});for(const e of re||[])e.getMirror&&e.getMirror({nodeMirror:Xs,crossOriginIframeMirror:ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:ye.crossOriginIframeStyleMirror});const ge=new yu;Hs=new gu({recordCanvas:Y,mutationCb:Cn,win:window,blockClass:w,blockSelector:b,mirror:Xs,sampling:$.canvas,dataURLOptions:B});const we=new wu({mutationCb:rt,scrollCb:kn,bypassOptions:{blockClass:w,blockSelector:b,maskTextClass:O,maskTextSelector:x,inlineStylesheet:I,maskInputOptions:ce,dataURLOptions:B,maskTextFn:W,maskInputFn:F,recordCanvas:Y,inlineImages:te,sampling:$,slimDOMOptions:he,iframeManager:ye,stylesheetManager:me,canvasManager:Hs,keepIframeSrcFn:ne,processedNodeManager:ge},mirror:Xs});qs=(e=!1)=>{if(!H)return;Zs({type:ws.Meta,data:{href:window.location.href,width:mo(),height:fo()}},e),me.reset(),we.init(),Ts.forEach((e=>e.lock()));const a=function Zi(e,a){const{mirror:u=new V,blockClass:m="rr-block",blockSelector:w=null,maskTextClass:b="rr-mask",maskTextSelector:S=null,inlineStylesheet:C=!0,inlineImages:O=!1,recordCanvas:x=!1,maskAllInputs:I=!1,maskTextFn:E,maskInputFn:_,slimDOM:N=!1,dataURLOptions:F,preserveWhiteSpace:W,onSerialize:U,onIframeLoad:j,iframeLoadTimeout:$,onStylesheetLoad:B,stylesheetLoadTimeout:q,keepIframeSrcFn:H=()=>!1}=a||{};return Se(e,{doc:e,mirror:u,blockClass:m,blockSelector:w,maskTextClass:b,maskTextSelector:S,skipChild:!1,inlineStylesheet:C,maskInputOptions:!0===I?{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===I?{password:!0}:I,maskTextFn:E,maskInputFn:_,slimDOMOptions:!0===N||"all"===N?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===N,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===N?{}:N,dataURLOptions:F,inlineImages:O,recordCanvas:x,preserveWhiteSpace:W,onSerialize:U,onIframeLoad:j,iframeLoadTimeout:$,onStylesheetLoad:B,stylesheetLoadTimeout:q,keepIframeSrcFn:H,newlyAddedElement:!1})}(document,{mirror:Xs,blockClass:w,blockSelector:b,maskTextClass:O,maskTextSelector:x,inlineStylesheet:I,maskAllInputs:ce,maskTextFn:W,maskInputFn:F,slimDOM:he,dataURLOptions:B,recordCanvas:Y,inlineImages:te,onSerialize:e=>{wo(e,Xs)&&ye.addIframe(e),bo(e,Xs)&&me.trackLinkElement(e),Fs(e)&&we.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,a)=>{ye.attachIframe(e,a),we.observeAttachShadow(e)},onStylesheetLoad:(e,a)=>{me.attachLinkElement(e,a)},keepIframeSrcFn:ne});if(!a)return console.warn("Failed to snapshot the document");Zs({type:ws.FullSnapshot,data:{node:a,initialOffset:po(window)}},e),Ts.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&me.adoptStyleSheets(document.adoptedStyleSheets,Xs.getId(document))};try{const e=[],K=e=>{var a;return M(au)({mutationCb:rt,mousemoveCb:(e,a)=>Zs({type:ws.IncrementalSnapshot,data:{source:a,positions:e}}),mouseInteractionCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.MouseInteraction,...e}}),scrollCb:kn,viewportResizeCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.ViewportResize,...e}}),inputCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.Input,...e}}),mediaInteractionCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.MediaInteraction,...e}}),styleSheetRuleCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.StyleSheetRule,...e}}),styleDeclarationCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.StyleDeclaration,...e}}),canvasMutationCb:Cn,fontCb:e=>Zs({type:ws.IncrementalSnapshot,data:{source:bs.Font,...e}}),selectionCb:e=>{Zs({type:ws.IncrementalSnapshot,data:{source:bs.Selection,...e}})},customElementCb:e=>{Zs({type:ws.IncrementalSnapshot,data:{source:bs.CustomElement,...e}})},typingCb:e=>{Zs({type:ws.IncrementalSnapshot,data:{...e}})},deviceChangeCb:e=>{Zs({type:ws.Device,data:{...e}})},blockClass:w,ignoreClass:S,ignoreSelector:C,maskTextClass:O,maskTextSelector:x,maskInputOptions:ce,inlineStylesheet:I,sampling:$,recordDOM:H,recordCanvas:Y,inlineImages:te,userTriggeredOnInput:Q,collectFonts:ee,doc:e,maskInputFn:F,maskTextFn:W,keepIframeSrcFn:ne,blockSelector:b,slimDOMOptions:he,dataURLOptions:B,mirror:Xs,iframeManager:ye,stylesheetManager:me,shadowDomManager:we,processedNodeManager:ge,canvasManager:Hs,ignoreCSSAttributes:se,plugins:(null==(a=null==re?void 0:re.filter((e=>e.observer)))?void 0:a.map((e=>({observer:e.observer,options:e.options,callback:a=>Zs({type:ws.Plugin,data:{plugin:e.name,payload:a}})}))))||[]},U)};ye.addLoadListener((a=>{try{e.push(K(a.contentDocument))}catch(e){console.warn(e)}}));const _2=()=>{qs(),e.push(K(document)),Ys=!0};return"interactive"===document.readyState||"complete"===document.readyState?_2():(e.push(G("DOMContentLoaded",(()=>{Zs({type:ws.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&_2()}))),e.push(G("load",(()=>{Zs({type:ws.Load,data:{}}),"load"===X&&_2()}),window))),()=>{e.forEach((e=>e())),ge.destroy(),Ys=!1,function jl(){Ms=void 0}()}}catch(e){console.warn(e)}}function Su(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function vu(e){if(e.__esModule)return e;var a=e.default;if("function"==typeof a){var u=function n(){return this instanceof n?Reflect.construct(a,arguments,this.constructor):a.apply(this,arguments)};u.prototype=a.prototype}else u={};return Object.defineProperty(u,"__esModule",{value:!0}),Object.keys(e).forEach((function(a){var m=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(u,a,m.get?m:{enumerable:!0,get:function(){return e[a]}})})),u}ae.addCustomEvent=(e,a)=>{if(!Ys)throw new Error("please add custom event after start recording");Zs({type:ws.Custom,data:{tag:e,payload:a}})},ae.addSailfishEvent=(e,a)=>{if(!Ys)throw new Error("please add Sailfish event after start recording");Zs({type:e,data:{tag:"sailfish-zendesk-test-tag",payload:a}})},ae.freezePage=()=>{Ts.forEach((e=>e.freeze()))},ae.takeFullSnapshot=e=>{if(!Ys)throw new Error("please take full snapshot after start recording");qs(e)},ae.mirror=Xs;var Qs={exports:{}},eo=String,Lo=function(){return{isColorSupported:!1,reset:eo,bold:eo,dim:eo,italic:eo,underline:eo,inverse:eo,hidden:eo,strikethrough:eo,black:eo,red:eo,green:eo,yellow:eo,blue:eo,magenta:eo,cyan:eo,white:eo,gray:eo,bgBlack:eo,bgRed:eo,bgGreen:eo,bgYellow:eo,bgBlue:eo,bgMagenta:eo,bgCyan:eo,bgWhite:eo,blackBright:eo,redBright:eo,greenBright:eo,yellowBright:eo,blueBright:eo,magentaBright:eo,cyanBright:eo,whiteBright:eo,bgBlackBright:eo,bgRedBright:eo,bgGreenBright:eo,bgYellowBright:eo,bgBlueBright:eo,bgMagentaBright:eo,bgCyanBright:eo,bgWhiteBright:eo}};Qs.exports=Lo(),Qs.exports.createColors=Lo;var to=Qs.exports;const oo=vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let io=to,ao=oo,lo=class To extends Error{constructor(e,a,u,m,w,b){super(e),this.name="CssSyntaxError",this.reason=e,w&&(this.file=w),m&&(this.source=m),b&&(this.plugin=b),typeof a<"u"&&typeof u<"u"&&("number"==typeof a?(this.line=a,this.column=u):(this.line=a.line,this.column=a.column,this.endLine=u.line,this.endColumn=u.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,To)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(e){if(!this.source)return"";let a=this.source;null==e&&(e=io.isColorSupported);let n=e=>e,r=e=>e,i=e=>e;if(e){let{bold:e,gray:a,red:u}=io.createColors(!0);r=a=>e(u(a)),n=e=>a(e),ao&&(i=e=>ao(e))}let u=a.split(/\r?\n/),m=Math.max(this.line-3,0),w=Math.min(this.line+2,u.length),b=String(w).length;return u.slice(m,w).map(((e,a)=>{let u=m+1+a,w=" "+(" "+u).slice(-b)+" | ";if(u===this.line){if(e.length>160){let a=20,u=Math.max(0,this.column-a),m=Math.max(this.column+a,this.endColumn+a),b=e.slice(u,m),S=n(w.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,a-1)).replace(/[^\t]/g," ");return r(">")+n(w)+i(b)+"\n "+S+r("^")}let a=n(w.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(w)+i(e)+"\n "+a+r("^")}return" "+n(w)+i(e)})).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var co=lo;lo.default=lo;const uo={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let ho=class{constructor(e){this.builder=e}atrule(e,a){let u="@"+e.name,m=e.params?this.rawValue(e,"params"):"";if(typeof e.raws.afterName<"u"?u+=e.raws.afterName:m&&(u+=" "),e.nodes)this.block(e,u+m);else{let w=(e.raws.between||"")+(a?";":"");this.builder(u+m+w,e)}}beforeAfter(e,a){let u;u="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===a?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let m=e.parent,w=0;for(;m&&"root"!==m.type;)w+=1,m=m.parent;if(u.includes("\n")){let a=this.raw(e,null,"indent");if(a.length)for(let e=0;e<w;e++)u+=a}return u}block(e,a){let u,m=this.raw(e,"between","beforeOpen");this.builder(a+m+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),u=this.raw(e,"after")):u=this.raw(e,"after","emptyBody"),u&&this.builder(u),this.builder("}",e,"end")}body(e){let a=e.nodes.length-1;for(;a>0&&"comment"===e.nodes[a].type;)a-=1;let u=this.raw(e,"semicolon");for(let m=0;m<e.nodes.length;m++){let w=e.nodes[m],b=this.raw(w,"before");b&&this.builder(b),this.stringify(w,a!==m||u)}}comment(e){let a=this.raw(e,"left","commentLeft"),u=this.raw(e,"right","commentRight");this.builder("/*"+a+e.text+u+"*/",e)}decl(e,a){let u=this.raw(e,"between","colon"),m=e.prop+u+this.rawValue(e,"value");e.important&&(m+=e.raws.important||" !important"),a&&(m+=";"),this.builder(m,e)}document(e){this.body(e)}raw(e,a,u){let m;if(u||(u=a),a&&(m=e.raws[a],typeof m<"u"))return m;let w=e.parent;if("before"===u&&(!w||"root"===w.type&&w.first===e||w&&"document"===w.type))return"";if(!w)return uo[u];let b=e.root();if(b.rawCache||(b.rawCache={}),typeof b.rawCache[u]<"u")return b.rawCache[u];if("before"===u||"after"===u)return this.beforeAfter(e,u);{let w="raw"+function Iu(e){return e[0].toUpperCase()+e.slice(1)}(u);this[w]?m=this[w](b,e):b.walk((e=>{if(m=e.raws[a],typeof m<"u")return!1}))}return typeof m>"u"&&(m=uo[u]),b.rawCache[u]=m,m}rawBeforeClose(e){let a;return e.walk((e=>{if(e.nodes&&e.nodes.length>0&&typeof e.raws.after<"u")return a=e.raws.after,a.includes("\n")&&(a=a.replace(/[^\n]+$/,"")),!1})),a&&(a=a.replace(/\S/g,"")),a}rawBeforeComment(e,a){let u;return e.walkComments((e=>{if(typeof e.raws.before<"u")return u=e.raws.before,u.includes("\n")&&(u=u.replace(/[^\n]+$/,"")),!1})),typeof u>"u"?u=this.raw(a,null,"beforeDecl"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeDecl(e,a){let u;return e.walkDecls((e=>{if(typeof e.raws.before<"u")return u=e.raws.before,u.includes("\n")&&(u=u.replace(/[^\n]+$/,"")),!1})),typeof u>"u"?u=this.raw(a,null,"beforeRule"):u&&(u=u.replace(/\S/g,"")),u}rawBeforeOpen(e){let a;return e.walk((e=>{if("decl"!==e.type&&(a=e.raws.between,typeof a<"u"))return!1})),a}rawBeforeRule(e){let a;return e.walk((u=>{if(u.nodes&&(u.parent!==e||e.first!==u)&&typeof u.raws.before<"u")return a=u.raws.before,a.includes("\n")&&(a=a.replace(/[^\n]+$/,"")),!1})),a&&(a=a.replace(/\S/g,"")),a}rawColon(e){let a;return e.walkDecls((e=>{if(typeof e.raws.between<"u")return a=e.raws.between.replace(/[^\s:]/g,""),!1})),a}rawEmptyBody(e){let a;return e.walk((e=>{if(e.nodes&&0===e.nodes.length&&(a=e.raws.after,typeof a<"u"))return!1})),a}rawIndent(e){if(e.raws.indent)return e.raws.indent;let a;return e.walk((u=>{let m=u.parent;if(m&&m!==e&&m.parent&&m.parent===e&&typeof u.raws.before<"u"){let e=u.raws.before.split("\n");return a=e[e.length-1],a=a.replace(/\S/g,""),!1}})),a}rawSemicolon(e){let a;return e.walk((e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(a=e.raws.semicolon,typeof a<"u"))return!1})),a}rawValue(e,a){let u=e[a],m=e.raws[a];return m&&m.value===u?m.raw:u}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,a){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,a)}};var Mo=ho;ho.default=ho;let Po=Mo;function Bs(e,a){new Po(a).stringify(e)}var No=Bs;Bs.default=Bs;var Do={};Do.isClean=Symbol("isClean"),Do.my=Symbol("my");let Ao=co,Fo=Mo,Wo=No,{isClean:Uo,my:jo}=Do;function zs(e,a){let u=new e.constructor;for(let m in e){if(!Object.prototype.hasOwnProperty.call(e,m)||"proxyCache"===m)continue;let w=e[m],b=typeof w;"parent"===m&&"object"===b?a&&(u[m]=a):"source"===m?u[m]=w:Array.isArray(w)?u[m]=w.map((e=>zs(e,u))):("object"===b&&null!==w&&(w=zs(w)),u[m]=w)}return u}function Fe(e,a){if(a&&typeof a.offset<"u")return a.offset;let u=1,m=1,w=0;for(let b=0;b<e.length;b++){if(m===a.line&&u===a.column){w=b;break}"\n"===e[b]?(u=1,m+=1):u+=1}return w}let $o=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Uo]=!1,this[jo]=!0;for(let a in e)if("nodes"===a){this.nodes=[];for(let u of e[a])"function"==typeof u.clone?this.append(u.clone()):this.append(u)}else this[a]=e[a]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let a=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${a.input.from}:${a.start.line}:${a.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let a in e)this[a]=e[a];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 a=zs(this);for(let u in e)a[u]=e[u];return a}cloneAfter(e={}){let a=this.clone(e);return this.parent.insertAfter(this,a),a}cloneBefore(e={}){let a=this.clone(e);return this.parent.insertBefore(this,a),a}error(e,a={}){if(this.source){let{end:u,start:m}=this.rangeBy(a);return this.source.input.error(e,{column:m.column,line:m.line},{column:u.column,line:u.line},a)}return new Ao(e)}getProxyProcessor(){return{get:(e,a)=>"proxyOf"===a?e:"root"===a?()=>e.root().toProxy():e[a],set:(e,a,u)=>(e[a]===u||(e[a]=u,("prop"===a||"value"===a||"name"===a||"params"===a||"important"===a||"text"===a)&&e.markDirty()),!0)}}markClean(){this[Uo]=!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){let a=this.source.start;if(e.index)a=this.positionInside(e.index);else if(e.word){let u="document"in this.source.input?this.source.input.document:this.source.input.css,m=u.slice(Fe(u,this.source.start),Fe(u,this.source.end)).indexOf(e.word);-1!==m&&(a=this.positionInside(m))}return a}positionInside(e){let a=this.source.start.column,u=this.source.start.line,m="document"in this.source.input?this.source.input.document:this.source.input.css,w=Fe(m,this.source.start),b=w+e;for(let e=w;e<b;e++)"\n"===m[e]?(a=1,u+=1):a+=1;return{column:a,line:u}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let a={column:this.source.start.column,line:this.source.start.line},u=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:a.column+1,line:a.line};if(e.word){let m="document"in this.source.input?this.source.input.document:this.source.input.css,w=m.slice(Fe(m,this.source.start),Fe(m,this.source.end)).indexOf(e.word);-1!==w&&(a=this.positionInside(w),u=this.positionInside(w+e.word.length))}else e.start?a={column:e.start.column,line:e.start.line}:e.index&&(a=this.positionInside(e.index)),e.end?u={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?u=this.positionInside(e.endIndex):e.index&&(u=this.positionInside(e.index+1));return(u.line<a.line||u.line===a.line&&u.column<=a.column)&&(u={column:a.column+1,line:a.line}),{end:u,start:a}}raw(e,a){return(new Fo).raw(this,e,a)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let a=this,u=!1;for(let m of e)m===this?u=!0:u?(this.parent.insertAfter(a,m),a=m):this.parent.insertBefore(a,m);u||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,a){let u={},m=null==a;a=a||new Map;let w=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e)||"parent"===e||"proxyCache"===e)continue;let m=this[e];if(Array.isArray(m))u[e]=m.map((e=>"object"==typeof e&&e.toJSON?e.toJSON(null,a):e));else if("object"==typeof m&&m.toJSON)u[e]=m.toJSON(null,a);else if("source"===e){let b=a.get(m.input);null==b&&(b=w,a.set(m.input,w),w++),u[e]={end:m.end,inputId:b,start:m.start}}else u[e]=m}return m&&(u.inputs=[...a.keys()].map((e=>e.toJSON()))),u}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=Wo){e.stringify&&(e=e.stringify);let a="";return e(this,(e=>{a+=e})),a}warn(e,a,u){let m={node:this};for(let e in u)m[e]=u[e];return e.warn(a,m)}};var Vo=$o;$o.default=$o;let Go=Vo,Zo=class extends Go{constructor(e){super(e),this.type="comment"}};var qo=Zo;Zo.default=Zo;let Ho=Vo,Yo=class extends Ho{get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}constructor(e){e&&typeof e.value<"u"&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}};var Ko=Yo;Yo.default=Yo;let Jo,Xo,Qo,ei,ti=qo,si=Ko,ii=Vo,{isClean:ai,my:li}=Do;function _o(e){return e.map((e=>(e.nodes&&(e.nodes=_o(e.nodes)),delete e.source,e)))}function Bo(e){if(e[ai]=!1,e.proxyOf.nodes)for(let a of e.proxyOf.nodes)Bo(a)}let ci=class zo extends ii{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]}append(...e){for(let a of e){let e=this.normalize(a,this.last);for(let a of e)this.proxyOf.nodes.push(a)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let a of this.nodes)a.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let a,u,m=this.getIterator();for(;this.indexes[m]<this.proxyOf.nodes.length&&(a=this.indexes[m],u=e(this.proxyOf.nodes[a],a),!1!==u);)this.indexes[m]+=1;return delete this.indexes[m],u}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,a)=>"proxyOf"===a?e:e[a]?"each"===a||"string"==typeof a&&a.startsWith("walk")?(...u)=>e[a](...u.map((e=>"function"==typeof e?(a,u)=>e(a.toProxy(),u):e))):"every"===a||"some"===a?u=>e[a](((e,...a)=>u(e.toProxy(),...a))):"root"===a?()=>e.root().toProxy():"nodes"===a?e.nodes.map((e=>e.toProxy())):"first"===a||"last"===a?e[a].toProxy():e[a]:e[a],set:(e,a,u)=>(e[a]===u||(e[a]=u,("name"===a||"params"===a||"selector"===a)&&e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,a){let u,m=this.index(e),w=this.normalize(a,this.proxyOf.nodes[m]).reverse();m=this.index(e);for(let e of w)this.proxyOf.nodes.splice(m+1,0,e);for(let e in this.indexes)u=this.indexes[e],m<u&&(this.indexes[e]=u+w.length);return this.markDirty(),this}insertBefore(e,a){let u,m=this.index(e),w=0===m&&"prepend",b=this.normalize(a,this.proxyOf.nodes[m],w).reverse();m=this.index(e);for(let e of b)this.proxyOf.nodes.splice(m,0,e);for(let e in this.indexes)u=this.indexes[e],m<=u&&(this.indexes[e]=u+b.length);return this.markDirty(),this}normalize(e,a){if("string"==typeof e)e=_o(Xo(e).nodes);else if(typeof e>"u")e=[];else if(Array.isArray(e)){e=e.slice(0);for(let a of e)a.parent&&a.parent.removeChild(a,"ignore")}else if("root"===e.type&&"document"!==this.type){e=e.nodes.slice(0);for(let a of e)a.parent&&a.parent.removeChild(a,"ignore")}else if(e.type)e=[e];else if(e.prop){if(typeof e.value>"u")throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new si(e)]}else if(e.selector||e.selectors)e=[new ei(e)];else if(e.name)e=[new Jo(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new ti(e)]}return e.map((e=>(e[li]||zo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[ai]&&Bo(e),e.raws||(e.raws={}),typeof e.raws.before>"u"&&a&&typeof a.raws.before<"u"&&(e.raws.before=a.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e)))}prepend(...e){e=e.reverse();for(let a of e){let e=this.normalize(a,this.first,"prepend").reverse();for(let a of e)this.proxyOf.nodes.unshift(a);for(let a in this.indexes)this.indexes[a]=this.indexes[a]+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 a;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let u in this.indexes)a=this.indexes[u],a>=e&&(this.indexes[u]=a-1);return this.markDirty(),this}replaceValues(e,a,u){return u||(u=a,a={}),this.walkDecls((m=>{a.props&&!a.props.includes(m.prop)||a.fast&&!m.value.includes(a.fast)||(m.value=m.value.replace(e,u))})),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each(((a,u)=>{let m;try{m=e(a,u)}catch(e){throw a.addToError(e)}return!1!==m&&a.walk&&(m=a.walk(e)),m}))}walkAtRules(e,a){return a?e instanceof RegExp?this.walk(((u,m)=>{if("atrule"===u.type&&e.test(u.name))return a(u,m)})):this.walk(((u,m)=>{if("atrule"===u.type&&u.name===e)return a(u,m)})):(a=e,this.walk(((e,u)=>{if("atrule"===e.type)return a(e,u)})))}walkComments(e){return this.walk(((a,u)=>{if("comment"===a.type)return e(a,u)}))}walkDecls(e,a){return a?e instanceof RegExp?this.walk(((u,m)=>{if("decl"===u.type&&e.test(u.prop))return a(u,m)})):this.walk(((u,m)=>{if("decl"===u.type&&u.prop===e)return a(u,m)})):(a=e,this.walk(((e,u)=>{if("decl"===e.type)return a(e,u)})))}walkRules(e,a){return a?e instanceof RegExp?this.walk(((u,m)=>{if("rule"===u.type&&e.test(u.selector))return a(u,m)})):this.walk(((u,m)=>{if("rule"===u.type&&u.selector===e)return a(u,m)})):(a=e,this.walk(((e,u)=>{if("rule"===e.type)return a(e,u)})))}};ci.registerParse=e=>{Xo=e},ci.registerRule=e=>{ei=e},ci.registerAtRule=e=>{Jo=e},ci.registerRoot=e=>{Qo=e};var ui=ci;ci.default=ci,ci.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Jo.prototype):"rule"===e.type?Object.setPrototypeOf(e,ei.prototype):"decl"===e.type?Object.setPrototypeOf(e,si.prototype):"comment"===e.type?Object.setPrototypeOf(e,ti.prototype):"root"===e.type&&Object.setPrototypeOf(e,Qo.prototype),e[li]=!0,e.nodes&&e.nodes.forEach((e=>{ci.rebuild(e)}))};let hi=ui,pi=class extends hi{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 di=pi;pi.default=pi,hi.registerAtRule(pi);let fi,mi,yi=ui,gi=class extends yi{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new fi(new mi,this,e).stringify()}};gi.registerLazyResult=e=>{fi=e},gi.registerProcessor=e=>{mi=e};var Ii=gi;gi.default=gi;var Mi={nanoid:(e=21)=>{let a="",u=0|e;for(;u--;)a+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return a}};let{existsSync:Ri,readFileSync:Ti}=oo,{dirname:Pi,join:Li}=oo,{SourceMapConsumer:Di,SourceMapGenerator:Ai}=oo;let qi=class{constructor(e,a){if(!1===a.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let u=a.map?a.map.prev:void 0,m=this.loadMap(a.from,u);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=Pi(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new Di(this.text)),this.consumerCache}decodeInline(e){let a=e.match(/^data:application\/json;charset=utf-?8,/)||e.match(/^data:application\/json,/);if(a)return decodeURIComponent(e.substr(a[0].length));let u=e.match(/^data:application\/json;charset=utf-?8;base64,/)||e.match(/^data:application\/json;base64,/);if(u)return function zu(e){return Buffer?Buffer.from(e,"base64").toString():window.atob(e)}(e.substr(u[0].length));let m=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}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 a=e.match(/\/\*\s*# sourceMappingURL=/g);if(!a)return;let u=e.lastIndexOf(a.pop()),m=e.indexOf("*/",u);u>-1&&m>-1&&(this.annotation=this.getAnnotationURL(e.substring(u,m)))}loadFile(e){if(this.root=Pi(e),Ri(e))return this.mapFile=e,Ti(e,"utf-8").toString().trim()}loadMap(e,a){if(!1===a)return!1;if(a){if("string"==typeof a)return a;if("function"!=typeof a){if(a instanceof Di)return Ai.fromSourceMap(a).toString();if(a instanceof Ai)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}{let u=a(e);if(u){let e=this.loadFile(u);if(!e)throw new Error("Unable to load previous source map: "+u.toString());return e}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let a=this.annotation;return e&&(a=Li(Pi(e),a)),this.loadFile(a)}}}startWith(e,a){return!!e&&e.substr(0,a.length)===a}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}};var Hi=qi;qi.default=qi;let{nanoid:Ji}=Mi,{isAbsolute:Xi,resolve:Qi}=oo,{SourceMapConsumer:ea,SourceMapGenerator:ta}=oo,{fileURLToPath:ra,pathToFileURL:na}=oo,sa=co,oa=Hi,ia=oo,aa=Symbol("fromOffsetCache"),la=!(!ea||!ta),ca=!(!Qi||!Xi),ua=class{get from(){return this.file||this.id}constructor(e,a={}){if(null===e||typeof e>"u"||"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,this.document=this.css,a.document&&(this.document=a.document.toString()),a.from&&(!ca||/^\w+:\/\//.test(a.from)||Xi(a.from)?this.file=a.from:this.file=Qi(a.from)),ca&&la){let e=new oa(this.css,a);if(e.text){this.map=e;let a=e.consumer().file;!this.file&&a&&(this.file=this.mapResolve(a))}}this.file||(this.id="<input css "+Ji(6)+">"),this.map&&(this.map.file=this.from)}error(e,a,u,m={}){let w,b,S;if(a&&"object"==typeof a){let e=a,m=u;if("number"==typeof e.offset){let m=this.fromOffset(e.offset);a=m.line,u=m.col}else a=e.line,u=e.column;if("number"==typeof m.offset){let e=this.fromOffset(m.offset);b=e.line,w=e.col}else b=m.line,w=m.column}else if(!u){let e=this.fromOffset(a);a=e.line,u=e.col}let C=this.origin(a,u,b,w);return S=C?new sa(e,void 0===C.endLine?C.line:{column:C.column,line:C.line},void 0===C.endLine?C.column:{column:C.endColumn,line:C.endLine},C.source,C.file,m.plugin):new sa(e,void 0===b?a:{column:u,line:a},void 0===b?u:{column:w,line:b},this.css,this.file,m.plugin),S.input={column:u,endColumn:w,endLine:b,line:a,source:this.css},this.file&&(na&&(S.input.url=na(this.file).toString()),S.input.file=this.file),S}fromOffset(e){let a,u;if(this[aa])u=this[aa];else{let e=this.css.split("\n");u=new Array(e.length);let a=0;for(let m=0,w=e.length;m<w;m++)u[m]=a,a+=e[m].length+1;this[aa]=u}a=u[u.length-1];let m=0;if(e>=a)m=u.length-1;else{let a,w=u.length-2;for(;m<w;)if(a=m+(w-m>>1),e<u[a])w=a-1;else{if(!(e>=u[a+1])){m=a;break}m=a+1}}return{col:e-u[m]+1,line:m+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:Qi(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,a,u,m){if(!this.map)return!1;let w,b,S=this.map.consumer(),C=S.originalPositionFor({column:a,line:e});if(!C.source)return!1;"number"==typeof u&&(w=S.originalPositionFor({column:m,line:u})),b=Xi(C.source)?na(C.source):new URL(C.source,this.map.consumer().sourceRoot||na(this.map.mapFile));let O={column:C.column,endColumn:w&&w.column,endLine:w&&w.line,line:C.line,url:b.toString()};if("file:"===b.protocol){if(!ra)throw new Error("file: protocol is not available in this PostCSS build");O.file=ra(b)}let x=S.sourceContentFor(C.source);return x&&(O.source=x),O}toJSON(){let e={};for(let a of["hasBOM","css","file","id"])null!=this[a]&&(e[a]=this[a]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}};var ha=ua;ua.default=ua,ia&&ia.registerInput&&ia.registerInput(ua);let pa,fa,ma=ui,ya=class extends ma{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,a,u){let m=super.normalize(e);if(a)if("prepend"===u)this.nodes.length>1?a.raws.before=this.nodes[1].raws.before:delete a.raws.before;else if(this.first!==a)for(let e of m)e.raws.before=a.raws.before;return m}removeChild(e,a){let u=this.index(e);return!a&&0===u&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[u].raws.before),super.removeChild(e)}toResult(e={}){return new pa(new fa,this,e).stringify()}};ya.registerLazyResult=e=>{pa=e},ya.registerProcessor=e=>{fa=e};var ga=ya;ya.default=ya,ma.registerRoot(ya);let wa={comma:e=>wa.split(e,[","],!0),space(e){let a=[" ","\n","\t"];return wa.split(e,a)},split(e,a,u){let m=[],w="",b=!1,S=0,C=!1,O="",x=!1;for(let u of e)x?x=!1:"\\"===u?x=!0:C?u===O&&(C=!1):'"'===u||"'"===u?(C=!0,O=u):"("===u?S+=1:")"===u?S>0&&(S-=1):0===S&&a.includes(u)&&(b=!0),b?(""!==w&&m.push(w.trim()),w="",b=!1):w+=u;return(u||""!==w)&&m.push(w.trim()),m}};var ba=wa;wa.default=wa;let va=ui,Sa=ba,ka=class extends va{get selectors(){return Sa.comma(this.selector)}set selectors(e){let a=this.selector?this.selector.match(/,\s*/):null,u=a?a[0]:","+this.raw("between","beforeOpen");this.selector=e.join(u)}constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}};var Ca=ka;ka.default=ka,va.registerRule(ka);let Oa=di,xa=qo,Ia=Ko,Ea=ha,Ma=Hi,Ra=ga,Ta=Ca;function Ke(e,a){if(Array.isArray(e))return e.map((e=>Ke(e)));let{inputs:u,...m}=e;if(u){a=[];for(let e of u){let u={...e,__proto__:Ea.prototype};u.map&&(u.map={...u.map,__proto__:Ma.prototype}),a.push(u)}}if(m.nodes&&(m.nodes=e.nodes.map((e=>Ke(e,a)))),m.source){let{inputId:e,...u}=m.source;m.source=u,null!=e&&(m.source.input=a[e])}if("root"===m.type)return new Ra(m);if("decl"===m.type)return new Ia(m);if("rule"===m.type)return new Ta(m);if("comment"===m.type)return new xa(m);if("atrule"===m.type)return new Oa(m);throw new Error("Unknown node type: "+e.type)}var _a=Ke;Ke.default=Ke;let{dirname:Pa,relative:La,resolve:Na,sep:Da}=oo,{SourceMapConsumer:Aa,SourceMapGenerator:Fa}=oo,{pathToFileURL:Wa}=oo,Ua=ha,ja=!(!Aa||!Fa),$a=!!(Pa&&Na&&La&&Da);var za=class{constructor(e,a,u,m){this.stringify=e,this.mapOpts=u.map||{},this.root=a,this.opts=u,this.css=m,this.originalCSS=m,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 a="\n";this.css.includes("\r\n")&&(a="\r\n"),this.css+=a+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let e of this.previous()){let a,u=this.toUrl(this.path(e.file)),m=e.root||Pa(e.file);!1===this.mapOpts.sourcesContent?(a=new Aa(e.text),a.sourcesContent&&(a.sourcesContent=null)):a=e.consumer(),this.map.applySourceMap(a,u,this.toUrl(this.path(m)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let a=this.root.nodes.length-1;a>=0;a--)e=this.root.nodes[a],"comment"===e.type&&e.text.startsWith("# sourceMappingURL=")&&this.root.removeChild(a)}else this.css&&(this.css=this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),$a&&ja&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,(a=>{e+=a})),[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=Fa.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Fa({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 Fa({file:this.outputFile(),ignoreInvalidMapping:!0});let e,a,u=1,m=1,w="<no source>",b={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,((S,C,O)=>{if(this.css+=S,C&&"end"!==O&&(b.generated.line=u,b.generated.column=m-1,C.source&&C.source.start?(b.source=this.sourcePath(C),b.original.line=C.source.start.line,b.original.column=C.source.start.column-1,this.map.addMapping(b)):(b.source=w,b.original.line=1,b.original.column=0,this.map.addMapping(b))),a=S.match(/\n/g),a?(u+=a.length,e=S.lastIndexOf("\n"),m=S.length-e):m+=S.length,C&&"start"!==O){let e=C.parent||{raws:{}};("decl"!==C.type&&("atrule"!==C.type||C.nodes)||C!==e.last||e.raws.semicolon)&&(C.source&&C.source.end?(b.source=this.sourcePath(C),b.original.line=C.source.end.line,b.original.column=C.source.end.column-1,b.generated.line=u,b.generated.column=m-2,this.map.addMapping(b)):(b.source=w,b.original.line=1,b.original.column=0,b.generated.line=u,b.generated.column=m-1,this.map.addMapping(b)))}}))}isAnnotation(){return!!this.isInline()||(typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:!this.previous().length||this.previous().some((e=>e.annotation)))}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let e=this.mapOpts.annotation;return!(typeof e<"u"&&!0!==e)&&(!this.previous().length||this.previous().some((e=>e.inline)))}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((e=>e.withContent()))}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute||60===e.charCodeAt(0)||/^\w+:\/\//.test(e))return e;let a=this.memoizedPaths.get(e);if(a)return a;let u=this.opts.to?Pa(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(u=Pa(Na(u,this.mapOpts.annotation)));let m=La(u,e);return this.memoizedPaths.set(e,m),m}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk((e=>{if(e.source&&e.source.input.map){let a=e.source.input.map;this.previousMaps.includes(a)||this.previousMaps.push(a)}}));else{let e=new Ua(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk((a=>{if(a.source){let u=a.source.input.from;if(u&&!e[u]){e[u]=!0;let m=this.usesFileUrls?this.toFileUrl(u):this.toUrl(this.path(u));this.map.setSourceContent(m,a.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 a=this.memoizedFileURLs.get(e);if(a)return a;if(Wa){let a=Wa(e).toString();return this.memoizedFileURLs.set(e,a),a}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let a=this.memoizedURLs.get(e);if(a)return a;"\\"===Da&&(e=e.replace(/\\/g,"/"));let u=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,u),u}};const Ba=/[\t\n\f\r "#'()/;[\\\]{}]/g,Va=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,Ga=/.[\r\n"'(/\\]/,Za=/[\da-f]/i;let qa=di,Ya=qo,Ka=Ko,Ja=ga,Qa=Ca,kc=function(e,a={}){let u,m,w,b,S,C,O,x,I,E,_=e.css.valueOf(),N=a.ignoreErrors,F=_.length,W=0,U=[],j=[];function y2(a){throw e.error("Unclosed "+a,W)}return{back:function A(e){j.push(e)},endOfFile:function v(){return 0===j.length&&W>=F},nextToken:function P2(e){if(j.length)return j.pop();if(W>=F)return;let a=!!e&&e.ignoreUnclosed;switch(u=_.charCodeAt(W),u){case 10:case 32:case 9:case 13:case 12:b=W;do{b+=1,u=_.charCodeAt(b)}while(32===u||10===u||9===u||13===u||12===u);C=["space",_.slice(W,b)],W=b-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(u);C=[e,e,W];break}case 40:if(E=U.length?U.pop()[1]:"",I=_.charCodeAt(W+1),"url"===E&&39!==I&&34!==I&&32!==I&&10!==I&&9!==I&&12!==I&&13!==I){b=W;do{if(O=!1,b=_.indexOf(")",b+1),-1===b){if(N||a){b=W;break}y2("bracket")}for(x=b;92===_.charCodeAt(x-1);)x-=1,O=!O}while(O);C=["brackets",_.slice(W,b+1),W,b],W=b}else b=_.indexOf(")",W+1),m=_.slice(W,b+1),-1===b||Ga.test(m)?C=["(","(",W]:(C=["brackets",m,W,b],W=b);break;case 39:case 34:S=39===u?"'":'"',b=W;do{if(O=!1,b=_.indexOf(S,b+1),-1===b){if(N||a){b=W+1;break}y2("string")}for(x=b;92===_.charCodeAt(x-1);)x-=1,O=!O}while(O);C=["string",_.slice(W,b+1),W,b],W=b;break;case 64:Ba.lastIndex=W+1,Ba.test(_),b=0===Ba.lastIndex?_.length-1:Ba.lastIndex-2,C=["at-word",_.slice(W,b+1),W,b],W=b;break;case 92:for(b=W,w=!0;92===_.charCodeAt(b+1);)b+=1,w=!w;if(u=_.charCodeAt(b+1),w&&47!==u&&32!==u&&10!==u&&9!==u&&13!==u&&12!==u&&(b+=1,Za.test(_.charAt(b)))){for(;Za.test(_.charAt(b+1));)b+=1;32===_.charCodeAt(b+1)&&(b+=1)}C=["word",_.slice(W,b+1),W,b],W=b;break;default:47===u&&42===_.charCodeAt(W+1)?(b=_.indexOf("*/",W+2)+1,0===b&&(N||a?b=_.length:y2("comment")),C=["comment",_.slice(W,b+1),W,b],W=b):(Va.lastIndex=W+1,Va.test(_),b=0===Va.lastIndex?_.length-1:Va.lastIndex-2,C=["word",_.slice(W,b+1),W,b],U.push(C),W=b)}return W++,C},position:function S2(){return W}}};const el={empty:!0,space:!0};var tl=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 a=new qa;a.name=e[1].slice(1),""===a.name&&this.unnamedAtrule(a,e),this.init(a,e[2]);let u,m,w,b=!1,S=!1,C=[],O=[];for(;!this.tokenizer.endOfFile();){if(u=(e=this.tokenizer.nextToken())[0],"("===u||"["===u?O.push("("===u?")":"]"):"{"===u&&O.length>0?O.push("}"):u===O[O.length-1]&&O.pop(),0===O.length){if(";"===u){a.source.end=this.getPosition(e[2]),a.source.end.offset++,this.semicolon=!0;break}if("{"===u){S=!0;break}if("}"===u){if(C.length>0){for(w=C.length-1,m=C[w];m&&"space"===m[0];)m=C[--w];m&&(a.source.end=this.getPosition(m[3]||m[2]),a.source.end.offset++)}this.end(e);break}C.push(e)}else C.push(e);if(this.tokenizer.endOfFile()){b=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(C),C.length?(a.raws.afterName=this.spacesAndCommentsFromStart(C),this.raw(a,"params",C),b&&(e=C[C.length-1],a.source.end=this.getPosition(e[3]||e[2]),a.source.end.offset++,this.spaces=a.raws.between,a.raws.between="")):(a.raws.afterName="",a.params=""),S&&(a.nodes=[],this.current=a)}checkMissedSemicolon(e){let a=this.colon(e);if(!1===a)return;let u,m=0;for(let w=a-1;w>=0&&(u=e[w],"space"===u[0]||(m+=1,2!==m));w--);throw this.input.error("Missed semicolon","word"===u[0]?u[3]+1:u[2])}colon(e){let a,u,m,w=0;for(let[b,S]of e.entries()){if(u=S,m=u[0],"("===m&&(w+=1),")"===m&&(w-=1),0===w&&":"===m){if(a){if("word"===a[0]&&"progid"===a[1])continue;return b}this.doubleColon(u)}a=u}return!1}comment(e){let a=new Ya;this.init(a,e[2]),a.source.end=this.getPosition(e[3]||e[2]),a.source.end.offset++;let u=e[1].slice(2,-2);if(/^\s*$/.test(u))a.text="",a.raws.left=u,a.raws.right="";else{let e=u.match(/^(\s*)([^]*\S)(\s*)$/);a.text=e[2],a.raws.left=e[1],a.raws.right=e[3]}}createTokenizer(){this.tokenizer=kc(this.input)}decl(e,a){let u=new Ka;this.init(u,e[0][2]);let m,w=e[e.length-1];for(";"===w[0]&&(this.semicolon=!0,e.pop()),u.source.end=this.getPosition(w[3]||w[2]||function Cc(e){for(let a=e.length-1;a>=0;a--){let u=e[a],m=u[3]||u[2];if(m)return m}}(e)),u.source.end.offset++;"word"!==e[0][0];)1===e.length&&this.unknownWord(e),u.raws.before+=e.shift()[1];for(u.source.start=this.getPosition(e[0][2]),u.prop="";e.length;){let a=e[0][0];if(":"===a||"space"===a||"comment"===a)break;u.prop+=e.shift()[1]}for(u.raws.between="";e.length;){if(m=e.shift(),":"===m[0]){u.raws.between+=m[1];break}"word"===m[0]&&/\w/.test(m[1])&&this.unknownWord([m]),u.raws.between+=m[1]}("_"===u.prop[0]||"*"===u.prop[0])&&(u.raws.before+=u.prop[0],u.prop=u.prop.slice(1));let b,S=[];for(;e.length&&(b=e[0][0],"space"===b||"comment"===b);)S.push(e.shift());this.precheckMissedSemicolon(e);for(let a=e.length-1;a>=0;a--){if(m=e[a],"!important"===m[1].toLowerCase()){u.important=!0;let m=this.stringFrom(e,a);m=this.spacesFromEnd(e)+m," !important"!==m&&(u.raws.important=m);break}if("important"===m[1].toLowerCase()){let m=e.slice(0),w="";for(let e=a;e>0;e--){let a=m[e][0];if(w.trim().startsWith("!")&&"space"!==a)break;w=m.pop()[1]+w}w.trim().startsWith("!")&&(u.important=!0,u.raws.important=w,e=m)}if("space"!==m[0]&&"comment"!==m[0])break}e.some((e=>"space"!==e[0]&&"comment"!==e[0]))&&(u.raws.between+=S.map((e=>e[1])).join(""),S=[]),this.raw(u,"value",S.concat(e),a),u.value.includes(":")&&!a&&this.checkMissedSemicolon(e)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let a=new Qa;this.init(a,e[2]),a.selector="",a.raws.between="",this.current=a}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 a=this.current.nodes[this.current.nodes.length-1];a&&"rule"===a.type&&!a.raws.ownSemicolon&&(a.raws.ownSemicolon=this.spaces,this.spaces="",a.source.end=this.getPosition(e[2]),a.source.end.offset+=a.raws.ownSemicolon.length)}}getPosition(e){let a=this.input.fromOffset(e);return{column:a.col,line:a.line,offset:e}}init(e,a){this.current.push(e),e.source={input:this.input,start:this.getPosition(a)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let a=!1,u=null,m=!1,w=null,b=[],S=e[1].startsWith("--"),C=[],O=e;for(;O;){if(u=O[0],C.push(O),"("===u||"["===u)w||(w=O),b.push("("===u?")":"]");else if(S&&m&&"{"===u)w||(w=O),b.push("}");else if(0===b.length){if(";"===u){if(m)return void this.decl(C,S);break}if("{"===u)return void this.rule(C);if("}"===u){this.tokenizer.back(C.pop()),a=!0;break}":"===u&&(m=!0)}else u===b[b.length-1]&&(b.pop(),0===b.length&&(w=null));O=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),b.length>0&&this.unclosedBracket(w),a&&m){if(!S)for(;C.length&&(O=C[C.length-1][0],"space"===O||"comment"===O);)this.tokenizer.back(C.pop());this.decl(C,S)}else this.unknownWord(C)}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,a,u,m){let w,b,S,C,O=u.length,x="",I=!0;for(let e=0;e<O;e+=1)w=u[e],b=w[0],"space"!==b||e!==O-1||m?"comment"===b?(C=u[e-1]?u[e-1][0]:"empty",S=u[e+1]?u[e+1][0]:"empty",el[C]||el[S]||","===x.slice(-1)?I=!1:x+=w[1]):x+=w[1]:I=!1;if(!I){let m=u.reduce(((e,a)=>e+a[1]),"");e.raws[a]={raw:m,value:x}}e[a]=x}rule(e){e.pop();let a=new Qa;this.init(a,e[0][2]),a.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(a,"selector",e),this.current=a}spacesAndCommentsFromEnd(e){let a,u="";for(;e.length&&(a=e[e.length-1][0],"space"===a||"comment"===a);)u=e.pop()[1]+u;return u}spacesAndCommentsFromStart(e){let a,u="";for(;e.length&&(a=e[0][0],"space"===a||"comment"===a);)u+=e.shift()[1];return u}spacesFromEnd(e){let a,u="";for(;e.length&&(a=e[e.length-1][0],"space"===a);)u=e.pop()[1]+u;return u}stringFrom(e,a){let u="";for(let m=a;m<e.length;m++)u+=e[m][1];return e.splice(a,e.length-a),u}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 "+e[0][1],{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,a){throw this.input.error("At-rule without name",{offset:a[2]},{offset:a[2]+a[1].length})}};let rl=ui,nl=ha,sl=tl;function Gt(e,a){let u=new nl(e,a),m=new sl(u);try{m.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&a&&a.from&&(/\.scss$/i.test(a.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(a.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(a.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return m.root}var ol=Gt;Gt.default=Gt,rl.registerParse(Gt);let il=class{constructor(e,a={}){if(this.type="warning",this.text=e,a.node&&a.node.source){let e=a.node.rangeBy(a);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in a)this[e]=a[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}};var al=il;il.default=il;let ll=al,cl=class{get content(){return this.css}constructor(e,a,u){this.processor=e,this.messages=[],this.root=a,this.opts=u,this.css=void 0,this.map=void 0}toString(){return this.css}warn(e,a={}){a.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(a.plugin=this.lastPlugin.postcssPlugin);let u=new ll(e,a);return this.messages.push(u),u}warnings(){return this.messages.filter((e=>"warning"===e.type))}};var ul=cl;cl.default=cl;let hl={};var ni=function(e){hl[e]||(hl[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let pl=ui,dl=Ii,fl=za,ml=ol,yl=ul,gl=ga,wl=No,{isClean:bl,my:vl}=Do,Sl=ni;const kl={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Cl={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},Ol={Once:!0,postcssPlugin:!0,prepare:!0};function We(e){return"object"==typeof e&&"function"==typeof e.then}function ri(e){let a=!1,u=kl[e.type];return"decl"===e.type?a=e.prop.toLowerCase():"atrule"===e.type&&(a=e.name.toLowerCase()),a&&e.append?[u,u+"-"+a,0,u+"Exit",u+"Exit-"+a]:a?[u,u+"-"+a,u+"Exit",u+"Exit-"+a]:e.append?[u,0,u+"Exit"]:[u,u+"Exit"]}function br(e){let a;return a="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:ri(e),{eventIndex:0,events:a,iterator:0,node:e,visitorIndex:0,visitors:[]}}function Js(e){return e[bl]=!1,e.nodes&&e.nodes.forEach((e=>Js(e))),e}let xl={},Il=class oi{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"}constructor(e,a,u){let m;if(this.stringified=!1,this.processed=!1,"object"!=typeof a||null===a||"root"!==a.type&&"document"!==a.type)if(a instanceof oi||a instanceof yl)m=Js(a.root),a.map&&(typeof u.map>"u"&&(u.map={}),u.map.inline||(u.map.inline=!1),u.map.prev=a.map);else{let e=ml;u.syntax&&(e=u.syntax.parse),u.parser&&(e=u.parser),e.parse&&(e=e.parse);try{m=e(a,u)}catch(e){this.processed=!0,this.error=e}m&&!m[vl]&&pl.rebuild(m)}else m=Js(a);this.result=new yl(e,m,u),this.helpers={...xl,postcss:xl,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,a){let u=this.result.lastPlugin;try{if(a&&a.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(u.postcssVersion&&"production"!==process.env.NODE_ENV){let e=u.postcssPlugin,a=u.postcssVersion,m=this.result.processor.version,w=a.split("."),b=m.split(".");(w[0]!==b[0]||parseInt(w[1])>parseInt(b[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+m+", but "+e+" uses "+a+". Perhaps this is the source of the error below.")}}else e.plugin=u.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let t=(e,a,u)=>{this.listeners[a]||(this.listeners[a]=[]),this.listeners[a].push([e,u])};for(let e of this.plugins)if("object"==typeof e)for(let a in e){if(!Cl[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Ol[a])if("object"==typeof e[a])for(let u in e[a])t(e,"*"===u?a:a+"-"+u.toLowerCase(),e[a][u]);else"function"==typeof e[a]&&t(e,a,e[a])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let a=this.plugins[e],u=this.runOnRoot(a);if(We(u))try{await u}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[bl];){e[bl]=!0;let a=[br(e)];for(;a.length>0;){let e=this.visitTick(a);if(We(e))try{await e}catch(e){let u=a[a.length-1].node;throw this.handleError(e,u)}}}if(this.listeners.OnceExit)for(let[a,u]of this.listeners.OnceExit){this.result.lastPlugin=a;try{if("document"===e.type){let a=e.nodes.map((e=>u(e,this.helpers)));await Promise.all(a)}else await u(e,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let a=this.result.root.nodes.map((a=>e.Once(a,this.helpers)));return We(a[0])?Promise.all(a):a}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,a=wl;e.syntax&&(a=e.syntax.stringify),e.stringifier&&(a=e.stringifier),a.stringify&&(a=a.stringify);let u=new fl(a,this.result.root,this.result.opts).generate();return this.result.css=u[0],this.result.map=u[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(We(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[bl];)e[bl]=!0,this.walkSync(e);if(this.listeners.OnceExit)if("document"===e.type)for(let a of e.nodes)this.visitSync(this.listeners.OnceExit,a);else this.visitSync(this.listeners.OnceExit,e)}return this.result}then(e,a){return"production"!==process.env.NODE_ENV&&("from"in this.opts||Sl("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,a)}toString(){return this.css}visitSync(e,a){for(let[u,m]of e){let e;this.result.lastPlugin=u;try{e=m(a,this.helpers)}catch(e){throw this.handleError(e,a.proxyOf)}if("root"!==a.type&&"document"!==a.type&&!a.parent)return!0;if(We(e))throw this.getAsyncError()}}visitTick(e){let a=e[e.length-1],{node:u,visitors:m}=a;if("root"!==u.type&&"document"!==u.type&&!u.parent)return void e.pop();if(m.length>0&&a.visitorIndex<m.length){let[e,w]=m[a.visitorIndex];a.visitorIndex+=1,a.visitorIndex===m.length&&(a.visitors=[],a.visitorIndex=0),this.result.lastPlugin=e;try{return w(u.toProxy(),this.helpers)}catch(e){throw this.handleError(e,u)}}if(0!==a.iterator){let m,w=a.iterator;for(;m=u.nodes[u.indexes[w]];)if(u.indexes[w]+=1,!m[bl])return m[bl]=!0,void e.push(br(m));a.iterator=0,delete u.indexes[w]}let w=a.events;for(;a.eventIndex<w.length;){let e=w[a.eventIndex];if(a.eventIndex+=1,0===e)return void(u.nodes&&u.nodes.length&&(u[bl]=!0,a.iterator=u.getIterator()));if(this.listeners[e])return void(a.visitors=this.listeners[e])}e.pop()}walkSync(e){e[bl]=!0;let a=ri(e);for(let u of a)if(0===u)e.nodes&&e.each((e=>{e[bl]||this.walkSync(e)}));else{let a=this.listeners[u];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Il.registerPostcss=e=>{xl=e};var El=Il;Il.default=Il,gl.registerLazyResult(Il),dl.registerLazyResult(Il);let Ml=za,Rl=ol;const Tl=ul;let Pl=No,Ll=ni,Nl=class{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,a=Rl;try{e=a(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}constructor(e,a,u){a=a.toString(),this.stringified=!1,this._processor=e,this._css=a,this._opts=u,this._map=void 0;let m,w=Pl;this.result=new Tl(this._processor,m,this._opts),this.result.css=a;let b=this;Object.defineProperty(this.result,"root",{get:()=>b.root});let S=new Ml(w,m,this._opts,a);if(S.isMap()){let[e,a]=S.generate();e&&(this.result.css=e),a&&(this.result.map=a)}else S.clearAnnotation(),this.result.css=S.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,a){return"production"!==process.env.NODE_ENV&&("from"in this._opts||Ll("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,a)}toString(){return this._css}warnings(){return[]}};var Dl=Nl;Nl.default=Nl;let Al=Ii,Jl=El,ec=Dl,tc=ga,rc=class{constructor(e=[]){this.version="8.5.3",this.plugins=this.normalize(e)}normalize(e){let a=[];for(let u of e)if(!0===u.postcss?u=u():u.postcss&&(u=u.postcss),"object"==typeof u&&Array.isArray(u.plugins))a=a.concat(u.plugins);else if("object"==typeof u&&u.postcssPlugin)a.push(u);else if("function"==typeof u)a.push(u);else{if("object"!=typeof u||!u.parse&&!u.stringify)throw new Error(u+" 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 a}process(e,a={}){return this.plugins.length||a.parser||a.stringifier||a.syntax?new Jl(this,e,a):new ec(this,e,a)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var nc=rc;rc.default=rc,tc.registerProcessor(rc),Al.registerProcessor(rc);let sc=di,oc=qo,ic=ui,ac=co,lc=Ko,cc=Ii,uc=_a,hc=ha,pc=El,dc=ba,fc=Vo,mc=ol,yc=nc,gc=ul,wc=ga,bc=Ca,vc=No,Sc=al;function T$1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new yc(e)}T$1.plugin=function(e,a){let u,m=!1;function n(...u){console&&console.warn&&!m&&(m=!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 w=a(...u);return w.postcssPlugin=e,w.postcssVersion=(new yc).version,w}return Object.defineProperty(n,"postcss",{get:()=>(u||(u=n()),u)}),n.process=function(e,a,u){return T$1([n(u)]).process(e,a)},n},T$1.stringify=vc,T$1.parse=mc,T$1.fromJSON=uc,T$1.list=dc,T$1.comment=e=>new oc(e),T$1.atRule=e=>new sc(e),T$1.decl=e=>new lc(e),T$1.rule=e=>new bc(e),T$1.root=e=>new wc(e),T$1.document=e=>new cc(e),T$1.CssSyntaxError=ac,T$1.Declaration=lc,T$1.Container=ic,T$1.Processor=yc,T$1.Document=cc,T$1.Comment=oc,T$1.Warning=Sc,T$1.AtRule=sc,T$1.Result=gc,T$1.Input=hc,T$1.Rule=bc,T$1.Root=wc,T$1.Node=fc,pc.registerPostcss(T$1);var Oc=T$1;T$1.default=T$1;const xc=Su(Oc);var Ic;xc.stringify,xc.fromJSON,xc.plugin,xc.parse,xc.list,xc.document,xc.comment,xc.atRule,xc.rule,xc.decl,xc.root,xc.CssSyntaxError,xc.Declaration,xc.Container,xc.Processor,xc.Document,xc.Comment,xc.Warning,xc.AtRule,xc.Result,xc.Input,xc.Rule,xc.Root,xc.Node,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Ic||(Ic={}));const{addCustomEvent:Ec}=ae,{addSailfishEvent:Mc}=ae,{freezePage:Rc}=ae,{takeFullSnapshot:Tc}=ae;var _c=Object.defineProperty,y=(e,a,u)=>((e,a,u)=>a in e?_c(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u);let Pc=class d{constructor(e){y(this,"fileName"),y(this,"functionName"),y(this,"lineNumber"),y(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",a=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${a})`:`${this.fileName}:${e}:${a}`}};const Lc=/(^|@)\S+:\d+/,Nc=/^\s*at .*(\S+:\d+|\(native\))/m,Dc=/^(eval@)?(\[native code])?$/,Ac={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(Nc)?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 a=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!a)throw new Error(`Cannot parse given url: ${e}`);return[a[1],a[2]||void 0,a[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Nc)}),this).map((function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let a=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const u=a.match(/ (\((.+):(\d+):(\d+)\)$)/);a=u?a.replace(u[0],""):a;const m=a.split(/\s+/).slice(1),w=this.extractLocation(u?u[1]:m.pop()),b=m.join(" ")||void 0,S=["eval","<anonymous>"].indexOf(w[0])>-1?void 0:w[0];return new Pc({functionName:b,fileName:S,lineNumber:w[1],columnNumber:w[2]})}),this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter((function(e){return!e.match(Dc)}),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 Pc({functionName:e});{const a=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=e.match(a),m=u&&u[1]?u[1]:void 0,w=this.extractLocation(e.replace(a,""));return new Pc({functionName:m,fileName:w[0],lineNumber:w[1],columnNumber:w[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 a=/Line (\d+).*script (?:in )?(\S+)/i,u=e.message.split("\n"),m=[];for(let e=2,w=u.length;e<w;e+=2){const w=a.exec(u[e]);w&&m.push(new Pc({fileName:w[2],lineNumber:parseFloat(w[1])}))}return m},parseOpera10:function(e){const a=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,u=e.stacktrace.split("\n"),m=[];for(let e=0,w=u.length;e<w;e+=2){const w=a.exec(u[e]);w&&m.push(new Pc({functionName:w[3]||void 0,fileName:w[2],lineNumber:parseFloat(w[1])}))}return m},parseOpera11:function(e){return e.stack.split("\n").filter((function(e){return!!e.match(Lc)&&!e.match(/^Error created at/)}),this).map((function(e){const a=e.split("@"),u=this.extractLocation(a.pop()),m=(a.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Pc({functionName:m,fileName:u[0],lineNumber:u[1],columnNumber:u[2]})}),this)}};function T(e){if(!e||!e.outerHTML)return"";let a="";for(;e.parentElement;){let u=e.localName;if(!u)break;u=u.toLowerCase();const m=e.parentElement,w=[];if(m.children&&m.children.length>0)for(let e=0;e<m.children.length;e++){const a=m.children[e];a.localName&&a.localName.toLowerCase&&a.localName.toLowerCase()===u&&w.push(a)}w.length>1&&(u+=`:eq(${w.indexOf(e)})`),a=u+(a?">"+a:""),e=m}return a}function L(e){return"[object Object]"===Object.prototype.toString.call(e)}function k(e,a){if(0===a)return!0;const u=Object.keys(e);for(const m of u)if(L(e[m])&&k(e[m],a-1))return!0;return!1}function g(e,a){const u={numOfKeysLimit:50,depthOfLimit:4};Object.assign(u,a);const m=[],w=[];return JSON.stringify(e,(function(e,a){if(m.length>0){const u=m.indexOf(this);~u?m.splice(u+1):m.push(this),~u?w.splice(u,1/0,e):w.push(e),~m.indexOf(a)&&(a=m[0]===a?"[Circular ~]":"[Circular ~."+w.slice(0,m.indexOf(a)).join(".")+"]")}else m.push(a);if(null===a)return a;if(void 0===a)return"undefined";if(function c(e){return!!(L(e)&&Object.keys(e).length>u.numOfKeysLimit||"function"==typeof e||L(e)&&k(e,u.depthOfLimit))}(a))return function o(e){let a=e.toString();return u.stringLengthLimit&&a.length>u.stringLengthLimit&&(a=`${a.slice(0,u.stringLengthLimit)}...`),a}(a);if("bigint"==typeof a)return a.toString()+"n";if(a instanceof Event){const e={};for(const u in a){const m=a[u];Array.isArray(m)?e[u]=T(m.length?m[0]:null):e[u]=m}return e}return a instanceof Node?a instanceof HTMLElement?a?a.outerHTML:"":a.nodeName:a instanceof Error?a.stack?a.stack+"\nEnd of stack for Error object":a.name+": "+a.message:a}))}const Fc={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 R(e,a,u){const m=u?Object.assign({},Fc,u):Fc,w=m.logger;if(!w)return()=>{};let b;b="string"==typeof w?a[w]:w;let S=0,C=!1;const O=[];if(m.level.includes("error")){const l=a=>{const u=a.message,w=a.error,b=Ac.parse(w).map((e=>e.toString())),S=[g(u,m.stringifyOptions)];e({level:"error",trace:b,payload:S})};a.addEventListener("error",l),O.push((()=>{a.removeEventListener("error",l)}));const f=a=>{let u,w;a.reason instanceof Error?(u=a.reason,w=[g(`Uncaught (in promise) ${u.name}: ${u.message}`,m.stringifyOptions)]):(u=new Error,w=[g("Uncaught (in promise)",m.stringifyOptions),g(a.reason,m.stringifyOptions)]);const b=Ac.parse(u).map((e=>e.toString()));e({level:"error",trace:b,payload:w})};a.addEventListener("unhandledrejection",f),O.push((()=>{a.removeEventListener("unhandledrejection",f)}))}for(const e of m.level)O.push(p(b,e));return()=>{O.forEach((e=>e()))};function p(a,u){return a[u]?function P(e,a,u){try{if(!(a in e))return()=>{};const m=e[a],w=u(m);return"function"==typeof w&&(w.prototype=w.prototype||{},Object.defineProperties(w,{__rrweb_original__:{enumerable:!1,value:m}})),e[a]=w,()=>{e[a]=m}}catch{return()=>{}}}(a,u,(a=>(...w)=>{if(a.apply(this,w),!("assert"===u&&w[0]||C)){C=!0;try{const a=Ac.parse(new Error).map((e=>e.toString())).splice(1),b=("assert"===u?w.slice(1):w).map((e=>g(e,m.stringifyOptions)));S++,S<m.lengthThreshold?e({level:u,trace:a,payload:b}):S===m.lengthThreshold&&e({level:"warn",trace:[],payload:[g("The number of log records reached the threshold.")]})}catch(e){a("@sailfish-rrweb/rrweb logger error:",e,...w)}finally{C=!1}}})):()=>{}}}var Wc,Uc=(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[e.Device=24]="Device",e[e.SailfishCustom=25]="SailfishCustom",e))(Uc||{}),jc={},$c={exports:{}},zc={exports:{}},Bc={};var Vc,Gc,Zc,qc,Hc,Yc,Kc,Jc,Xc,Qc,lu,cu,hu,ku,Cu={};function requireReactIs(){return Gc||(Gc=1,"production"===process.env.NODE_ENV?zc.exports=function requireReactIs_production_min(){if(Wc)return Bc;Wc=1;var e="function"==typeof Symbol&&Symbol.for,a=e?Symbol.for("react.element"):60103,u=e?Symbol.for("react.portal"):60106,m=e?Symbol.for("react.fragment"):60107,w=e?Symbol.for("react.strict_mode"):60108,b=e?Symbol.for("react.profiler"):60114,S=e?Symbol.for("react.provider"):60109,C=e?Symbol.for("react.context"):60110,O=e?Symbol.for("react.async_mode"):60111,x=e?Symbol.for("react.concurrent_mode"):60111,I=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,N=e?Symbol.for("react.memo"):60115,F=e?Symbol.for("react.lazy"):60116,W=e?Symbol.for("react.block"):60121,U=e?Symbol.for("react.fundamental"):60117,j=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;function z(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case a:switch(e=e.type){case O:case x:case m:case b:case w:case E:return e;default:switch(e=e&&e.$$typeof){case C:case I:case F:case N:case S:return e;default:return _}}case u:return _}}}function A(e){return z(e)===x}return Bc.AsyncMode=O,Bc.ConcurrentMode=x,Bc.ContextConsumer=C,Bc.ContextProvider=S,Bc.Element=a,Bc.ForwardRef=I,Bc.Fragment=m,Bc.Lazy=F,Bc.Memo=N,Bc.Portal=u,Bc.Profiler=b,Bc.StrictMode=w,Bc.Suspense=E,Bc.isAsyncMode=function(e){return A(e)||z(e)===O},Bc.isConcurrentMode=A,Bc.isContextConsumer=function(e){return z(e)===C},Bc.isContextProvider=function(e){return z(e)===S},Bc.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},Bc.isForwardRef=function(e){return z(e)===I},Bc.isFragment=function(e){return z(e)===m},Bc.isLazy=function(e){return z(e)===F},Bc.isMemo=function(e){return z(e)===N},Bc.isPortal=function(e){return z(e)===u},Bc.isProfiler=function(e){return z(e)===b},Bc.isStrictMode=function(e){return z(e)===w},Bc.isSuspense=function(e){return z(e)===E},Bc.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===m||e===x||e===b||e===w||e===E||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===N||e.$$typeof===S||e.$$typeof===C||e.$$typeof===I||e.$$typeof===U||e.$$typeof===j||e.$$typeof===$||e.$$typeof===W)},Bc.typeOf=z,Bc}():zc.exports=function requireReactIs_development(){return Vc||(Vc=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,a=e?Symbol.for("react.element"):60103,u=e?Symbol.for("react.portal"):60106,m=e?Symbol.for("react.fragment"):60107,w=e?Symbol.for("react.strict_mode"):60108,b=e?Symbol.for("react.profiler"):60114,S=e?Symbol.for("react.provider"):60109,C=e?Symbol.for("react.context"):60110,O=e?Symbol.for("react.async_mode"):60111,x=e?Symbol.for("react.concurrent_mode"):60111,I=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,N=e?Symbol.for("react.memo"):60115,F=e?Symbol.for("react.lazy"):60116,W=e?Symbol.for("react.block"):60121,U=e?Symbol.for("react.fundamental"):60117,j=e?Symbol.for("react.responder"):60118,$=e?Symbol.for("react.scope"):60119;function typeOf(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case a:var W=e.type;switch(W){case O:case x:case m:case b:case w:case E:return W;default:var U=W&&W.$$typeof;switch(U){case C:case I:case F:case N:case S:return U;default:return _}}case u:return _}}}var B=O,V=x,q=C,H=S,Y=a,J=I,X=m,Q=F,ee=N,te=u,re=b,ne=w,se=E,oe=!1;function isConcurrentMode(e){return typeOf(e)===x}Cu.AsyncMode=B,Cu.ConcurrentMode=V,Cu.ContextConsumer=q,Cu.ContextProvider=H,Cu.Element=Y,Cu.ForwardRef=J,Cu.Fragment=X,Cu.Lazy=Q,Cu.Memo=ee,Cu.Portal=te,Cu.Profiler=re,Cu.StrictMode=ne,Cu.Suspense=se,Cu.isAsyncMode=function isAsyncMode(e){return oe||(oe=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),isConcurrentMode(e)||typeOf(e)===O},Cu.isConcurrentMode=isConcurrentMode,Cu.isContextConsumer=function isContextConsumer(e){return typeOf(e)===C},Cu.isContextProvider=function isContextProvider(e){return typeOf(e)===S},Cu.isElement=function isElement(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},Cu.isForwardRef=function isForwardRef(e){return typeOf(e)===I},Cu.isFragment=function isFragment(e){return typeOf(e)===m},Cu.isLazy=function isLazy(e){return typeOf(e)===F},Cu.isMemo=function isMemo(e){return typeOf(e)===N},Cu.isPortal=function isPortal(e){return typeOf(e)===u},Cu.isProfiler=function isProfiler(e){return typeOf(e)===b},Cu.isStrictMode=function isStrictMode(e){return typeOf(e)===w},Cu.isSuspense=function isSuspense(e){return typeOf(e)===E},Cu.isValidElementType=function isValidElementType(e){return"string"==typeof e||"function"==typeof e||e===m||e===x||e===b||e===w||e===E||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===N||e.$$typeof===S||e.$$typeof===C||e.$$typeof===I||e.$$typeof===U||e.$$typeof===j||e.$$typeof===$||e.$$typeof===W)},Cu.typeOf=typeOf}()),Cu}()),zc.exports}function requireObjectAssign(){if(qc)return Zc;qc=1;var e=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;return Zc=function shouldUseNative(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var a={},u=0;u<10;u++)a["_"+String.fromCharCode(u)]=u;if("0123456789"!==Object.getOwnPropertyNames(a).map((function(e){return a[e]})).join(""))return!1;var m={};return"abcdefghijklmnopqrst".split("").forEach((function(e){m[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},m)).join("")}catch(e){return!1}}()?Object.assign:function(m,w){for(var b,S,C=function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(m),O=1;O<arguments.length;O++){for(var x in b=Object(arguments[O]))a.call(b,x)&&(C[x]=b[x]);if(e){S=e(b);for(var I=0;I<S.length;I++)u.call(b,S[I])&&(C[S[I]]=b[S[I]])}}return C},Zc}function requireReactPropTypesSecret(){if(Yc)return Hc;Yc=1;return Hc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function requireHas(){return Jc?Kc:(Jc=1,Kc=Function.call.bind(Object.prototype.hasOwnProperty))}if("production"!==process.env.NODE_ENV){var Ou=requireReactIs();$c.exports=function requireFactoryWithTypeCheckers(){if(cu)return lu;cu=1;var e=requireReactIs(),a=requireObjectAssign(),u=requireReactPropTypesSecret(),m=requireHas(),w=function requireCheckPropTypes(){if(Qc)return Xc;Qc=1;var printWarning=function(){};if("production"!==process.env.NODE_ENV){var e=requireReactPropTypesSecret(),a={},u=requireHas();printWarning=function(e){var a="Warning: "+e;"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}}}function checkPropTypes(m,w,b,S,C){if("production"!==process.env.NODE_ENV)for(var O in m)if(u(m,O)){var x;try{if("function"!=typeof m[O]){var I=Error((S||"React class")+": "+b+" type `"+O+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[O]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw I.name="Invariant Violation",I}x=m[O](w,O,S,b,null,e)}catch(e){x=e}if(!x||x instanceof Error||printWarning((S||"React class")+": type specification of "+b+" `"+O+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof x+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),x instanceof Error&&!(x.message in a)){a[x.message]=!0;var E=C?C():"";printWarning("Failed "+b+" type: "+x.message+(null!=E?E:""))}}}return checkPropTypes.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},Xc=checkPropTypes}(),printWarning=function(){};function emptyFunctionThatReturnsNull(){return null}return"production"!==process.env.NODE_ENV&&(printWarning=function(e){var a="Warning: "+e;"undefined"!=typeof console&&console.error(a);try{throw new Error(a)}catch(e){}}),lu=function(b,S){var C="function"==typeof Symbol&&Symbol.iterator,O="<<anonymous>>",x={array:createPrimitiveTypeChecker("array"),bigint:createPrimitiveTypeChecker("bigint"),bool:createPrimitiveTypeChecker("boolean"),func:createPrimitiveTypeChecker("function"),number:createPrimitiveTypeChecker("number"),object:createPrimitiveTypeChecker("object"),string:createPrimitiveTypeChecker("string"),symbol:createPrimitiveTypeChecker("symbol"),any:function createAnyTypeChecker(){return createChainableTypeChecker(emptyFunctionThatReturnsNull)}(),arrayOf:function createArrayOfTypeChecker(e){return createChainableTypeChecker((function validate(a,m,w,b,S){if("function"!=typeof e)return new PropTypeError("Property `"+S+"` of component `"+w+"` has invalid PropType notation inside arrayOf.");var C=a[m];if(!Array.isArray(C))return new PropTypeError("Invalid "+b+" `"+S+"` of type `"+getPropType(C)+"` supplied to `"+w+"`, expected an array.");for(var O=0;O<C.length;O++){var x=e(C,O,w,b,S+"["+O+"]",u);if(x instanceof Error)return x}return null}))},element:function createElementTypeChecker(){return createChainableTypeChecker((function validate(e,a,u,m,w){var S=e[a];return b(S)?null:new PropTypeError("Invalid "+m+" `"+w+"` of type `"+getPropType(S)+"` supplied to `"+u+"`, expected a single ReactElement.")}))}(),elementType:function createElementTypeTypeChecker(){return createChainableTypeChecker((function validate(a,u,m,w,b){var S=a[u];return e.isValidElementType(S)?null:new PropTypeError("Invalid "+w+" `"+b+"` of type `"+getPropType(S)+"` supplied to `"+m+"`, expected a single ReactElement type.")}))}(),instanceOf:function createInstanceTypeChecker(e){return createChainableTypeChecker((function validate(a,u,m,w,b){if(!(a[u]instanceof e)){var S=e.name||O;return new PropTypeError("Invalid "+w+" `"+b+"` of type `"+function getClassName(e){return e.constructor&&e.constructor.name?e.constructor.name:O}(a[u])+"` supplied to `"+m+"`, expected instance of `"+S+"`.")}return null}))},node:function createNodeChecker(){return createChainableTypeChecker((function validate(e,a,u,m,w){return isNode(e[a])?null:new PropTypeError("Invalid "+m+" `"+w+"` supplied to `"+u+"`, expected a ReactNode.")}))}(),objectOf:function createObjectOfTypeChecker(e){return createChainableTypeChecker((function validate(a,w,b,S,C){if("function"!=typeof e)return new PropTypeError("Property `"+C+"` of component `"+b+"` has invalid PropType notation inside objectOf.");var O=a[w],x=getPropType(O);if("object"!==x)return new PropTypeError("Invalid "+S+" `"+C+"` of type `"+x+"` supplied to `"+b+"`, expected an object.");for(var I in O)if(m(O,I)){var E=e(O,I,b,S,C+"."+I,u);if(E instanceof Error)return E}return null}))},oneOf:function createEnumTypeChecker(e){return Array.isArray(e)?createChainableTypeChecker((function validate(a,u,m,w,b){for(var S=a[u],C=0;C<e.length;C++)if(is(S,e[C]))return null;var O=JSON.stringify(e,(function replacer(e,a){return"symbol"===getPreciseType(a)?String(a):a}));return new PropTypeError("Invalid "+w+" `"+b+"` of value `"+String(S)+"` supplied to `"+m+"`, expected one of "+O+".")})):("production"!==process.env.NODE_ENV&&printWarning(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),emptyFunctionThatReturnsNull)},oneOfType:function createUnionTypeChecker(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&printWarning("Invalid argument supplied to oneOfType, expected an instance of array."),emptyFunctionThatReturnsNull;for(var a=0;a<e.length;a++){var w=e[a];if("function"!=typeof w)return printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+getPostfixForTypeWarning(w)+" at index "+a+"."),emptyFunctionThatReturnsNull}return createChainableTypeChecker((function validate(a,w,b,S,C){for(var O=[],x=0;x<e.length;x++){var I=(0,e[x])(a,w,b,S,C,u);if(null==I)return null;I.data&&m(I.data,"expectedType")&&O.push(I.data.expectedType)}return new PropTypeError("Invalid "+S+" `"+C+"` supplied to `"+b+"`"+(O.length>0?", expected one of type ["+O.join(", ")+"]":"")+".")}))},shape:function createShapeTypeChecker(e){return createChainableTypeChecker((function validate(a,m,w,b,S){var C=a[m],O=getPropType(C);if("object"!==O)return new PropTypeError("Invalid "+b+" `"+S+"` of type `"+O+"` supplied to `"+w+"`, expected `object`.");for(var x in e){var I=e[x];if("function"!=typeof I)return invalidValidatorError(w,b,S,x,getPreciseType(I));var E=I(C,x,w,b,S+"."+x,u);if(E)return E}return null}))},exact:function createStrictShapeTypeChecker(e){return createChainableTypeChecker((function validate(w,b,S,C,O){var x=w[b],I=getPropType(x);if("object"!==I)return new PropTypeError("Invalid "+C+" `"+O+"` of type `"+I+"` supplied to `"+S+"`, expected `object`.");var E=a({},w[b],e);for(var _ in E){var N=e[_];if(m(e,_)&&"function"!=typeof N)return invalidValidatorError(S,C,O,_,getPreciseType(N));if(!N)return new PropTypeError("Invalid "+C+" `"+O+"` key `"+_+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(w[b],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var F=N(x,_,S,C,O+"."+_,u);if(F)return F}return null}))}};function is(e,a){return e===a?0!==e||1/e==1/a:e!=e&&a!=a}function PropTypeError(e,a){this.message=e,this.data=a&&"object"==typeof a?a:{},this.stack=""}function createChainableTypeChecker(e){if("production"!==process.env.NODE_ENV)var a={},m=0;function checkType(w,b,C,x,I,E,_){if(x=x||O,E=E||C,_!==u){if(S){var N=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw N.name="Invariant Violation",N}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var F=x+":"+C;!a[F]&&m<3&&(printWarning("You are manually calling a React.PropTypes validation function for the `"+E+"` prop on `"+x+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),a[F]=!0,m++)}}return null==b[C]?w?null===b[C]?new PropTypeError("The "+I+" `"+E+"` is marked as required in `"+x+"`, but its value is `null`."):new PropTypeError("The "+I+" `"+E+"` is marked as required in `"+x+"`, but its value is `undefined`."):null:e(b,C,x,I,E)}var w=checkType.bind(null,!1);return w.isRequired=checkType.bind(null,!0),w}function createPrimitiveTypeChecker(e){return createChainableTypeChecker((function validate(a,u,m,w,b,S){var C=a[u];return getPropType(C)!==e?new PropTypeError("Invalid "+w+" `"+b+"` of type `"+getPreciseType(C)+"` supplied to `"+m+"`, expected `"+e+"`.",{expectedType:e}):null}))}function invalidValidatorError(e,a,u,m,w){return new PropTypeError((e||"React class")+": "+a+" type `"+u+"."+m+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+w+"`.")}function isNode(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(isNode);if(null===e||b(e))return!0;var a=function getIteratorFn(e){var a=e&&(C&&e[C]||e["@@iterator"]);if("function"==typeof a)return a}(e);if(!a)return!1;var u,m=a.call(e);if(a!==e.entries){for(;!(u=m.next()).done;)if(!isNode(u.value))return!1}else for(;!(u=m.next()).done;){var w=u.value;if(w&&!isNode(w[1]))return!1}return!0;default:return!1}}function getPropType(e){var a=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function isSymbol(e,a){return"symbol"===e||!!a&&("Symbol"===a["@@toStringTag"]||"function"==typeof Symbol&&a instanceof Symbol)}(a,e)?"symbol":a}function getPreciseType(e){if(null==e)return""+e;var a=getPropType(e);if("object"===a){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return a}function getPostfixForTypeWarning(e){var a=getPreciseType(e);switch(a){case"array":case"object":return"an "+a;case"boolean":case"date":case"regexp":return"a "+a;default:return a}}return PropTypeError.prototype=Error.prototype,x.checkPropTypes=w,x.resetWarningCache=w.resetWarningCache,x.PropTypes=x,x},lu}()(Ou.isElement,!0)}else $c.exports=function requireFactoryWithThrowingShims(){if(ku)return hu;ku=1;var e=requireReactPropTypesSecret();function emptyFunction(){}function emptyFunctionWithReset(){}return emptyFunctionWithReset.resetWarningCache=emptyFunction,hu=function(){function shim(a,u,m,w,b,S){if(S!==e){var C=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw C.name="Invariant Violation",C}}function getShim(){return shim}shim.isRequired=shim;var a={array:shim,bigint:shim,bool:shim,func:shim,number:shim,object:shim,string:shim,symbol:shim,any:shim,arrayOf:getShim,element:shim,elementType:shim,instanceOf:getShim,node:shim,objectOf:getShim,oneOf:getShim,oneOfType:getShim,shape:getShim,exact:getShim,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return a.PropTypes=a,a}}()();var xu=$c.exports;!function(a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=a.ZendeskAPI=void 0;var u=e,m=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(xu);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof2(e){return typeof e}:function _typeof2(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _objectWithoutProperties(e,a){if(null==e)return{};var u,m,w=function _objectWithoutPropertiesLoose(e,a){if(null==e)return{};var u,m,w={},b=Object.keys(e);for(m=0;m<b.length;m++)u=b[m],a.indexOf(u)>=0||(w[u]=e[u]);return w}(e,a);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(e);for(m=0;m<b.length;m++)u=b[m],a.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(e,u)&&(w[u]=e[u])}return w}function _createClass(e,a,u){return a&&function _defineProperties(e,a){for(var u=0;u<a.length;u++){var m=a[u];m.enumerable=m.enumerable||!1,m.configurable=!0,"value"in m&&(m.writable=!0),Object.defineProperty(e,m.key,m)}}(e.prototype,a),e}function _setPrototypeOf(e,a){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf2(e,a){return e.__proto__=a,e})(e,a)}function _createSuper(e){return function(){var a,u=_getPrototypeOf(e);if(function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var m=_getPrototypeOf(this).constructor;a=Reflect.construct(u,arguments,m)}else a=u.apply(this,arguments);return function _possibleConstructorReturn(e,a){if(a&&("object"===_typeof(a)||"function"==typeof a))return a;return _assertThisInitialized(e)}(this,a)}}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf2(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function canUseDOM2(){return!("undefined"==typeof window||!window.document||!window.document.createElement)};a.ZendeskAPI=function ZendeskAPI2(){if(w&&window.zE){for(var e=arguments.length,a=new Array(e),u=0;u<e;u++)a[u]=arguments[u];window.zE.apply(null,a)}else console.warn("Zendesk is not initialized yet")};var b=function(e){!function _inherits(e,a){if("function"!=typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),a&&_setPrototypeOf(e,a)}(Zendesk2,e);var a=_createSuper(Zendesk2);function Zendesk2(e){var u;return function _classCallCheck(e,a){if(!(e instanceof a))throw new TypeError("Cannot call a class as a function")}(this,Zendesk2),(u=a.call(this,e)).insertScript=u.insertScript.bind(_assertThisInitialized(u)),u.onScriptLoaded=u.onScriptLoaded.bind(_assertThisInitialized(u)),u}return _createClass(Zendesk2,[{key:"onScriptLoaded",value:function onScriptLoaded(){"function"==typeof this.props.onLoaded&&this.props.onLoaded()}},{key:"insertScript",value:function insertScript(e,a){var u=document.createElement("script");a?u.defer=!0:u.async=!0,u.id="ze-snippet",u.src="https://static.zdassets.com/ekr/snippet.js?key=".concat(e),u.addEventListener("load",this.onScriptLoaded),document.body.appendChild(u)}},{key:"componentDidMount",value:function componentDidMount(){if(w&&!window.zE){var e=this.props,a=e.defer,u=e.zendeskKey,m=_objectWithoutProperties(e,["defer","zendeskKey"]);this.insertScript(u,a),window.zESettings=m}}},{key:"componentWillUnmount",value:function componentWillUnmount(){w&&window.zE&&(delete window.zE,delete window.zESettings)}},{key:"render",value:function render(){return null}}]),Zendesk2}(u.Component);a.default=b,b.propTypes={zendeskKey:m.default.string.isRequired,defer:m.default.bool}}(jc);const Eu="zendesk_chat",Mu="Zendesk";function maskInputFn(e,a){var u;if("hidden"===a.type)return"";const m={creditCard:/\b(?:\d[ -]*?){13,16}\b/,ssn:/\b\d{3}-\d{2}-\d{4}\b/};return a.closest(".mask")?"*".repeat(e.length):a.hasAttribute("data-cc")||(null==(u=a.getAttribute("autocomplete"))?void 0:u.startsWith("cc-"))||m.creditCard.test(e)?"**** **** **** "+e.slice(-4):a.hasAttribute("data-ssn")||m.ssn.test(e)?"***-**-"+e.slice(-4):a.hasAttribute("data-dob")?"**/**/"+e.slice(-4):e}function initializeConsolePlugin(e){const{name:a,observer:u}=(e=>({name:"@sailfish-rrweb/rrweb/console@1",observer:R,options:e}))(e);u((e=>cacheEvents({type:Uc.Plugin,timestamp:Date.now(),data:{plugin:a,payload:e}})),window,e)}async function initializeRecording(e,a,u,m){const w=initializeWebSocket(a,u,m);try{ae({emit(e){e.sessionId=m,cacheEvents(e)},maskInputOptions:{text:!0},maskInputFn:maskInputFn,maskTextClass:"sailfishSanitize",...e}),jc.ZendeskAPI("messenger:set","conversationTags",[`sailfish-session-${m}`]);const handleWidgetOpen=()=>{ae.addSailfishEvent(Uc.SailfishCustom,{action:"customer support chat opened",element_id:Eu,provider:Mu})},handleWidgetClose=()=>{ae.addSailfishEvent(Uc.SailfishCustom,{action:"customer support chat closed",element_id:Eu,provider:Mu})},handleUnreadMessages=e=>{ae.addSailfishEvent(Uc.SailfishCustom,{action:"zendesk unreadmessages",element_id:Eu,provider:Mu})};jc.ZendeskAPI("messenger:on","open",handleWidgetOpen),jc.ZendeskAPI("messenger:on","close",handleWidgetClose),jc.ZendeskAPI("messenger:on","unreadMessages",handleUnreadMessages),setInterval((()=>sendRecordingEvents(w)),1e4)}catch(e){console.error("Error importing plugins!",e)}return w}let Ru=null,Tu=null;function identify(e,a={},u=!1){const m={type:"identify",userId:e,traits:a};Ru&&Ru.userId===e&&JSON.stringify(Ru.traits)===JSON.stringify(a)||(Ru={userId:e,traits:a,overwrite:u},sendMessage(m))}function addOrUpdateMetadata(e){const a={type:"addOrUpdateMetadata",metadata:e};Tu&&JSON.stringify(Tu)===JSON.stringify(e)||(Tu=e,sendMessage(a))}const _u=["t.co","*.twitter.com","*.gravatar.com","*.googleapis.com","*.amazonaws.com","*.smooch.io","*.zendesk.com"],Pu={recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!1,inlineImages:!1,recordPassword:!1,recordRealName:!0,recordCreditCardInfo:!1,recordSsn:!1,recordDob:!1,sampling:{}},Lu={level:["info","log","warn","error"],lengthThreshold:1e4,stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:20,depthOfLimit:1},logger:"console"};function trackDomainChanges(){let e=window.location.href;const checkDomainChange=(a=!1)=>{const u=window.location.href;if(a||u!==e){e=u;sendMessage({type:"routeChange",data:{url:u,timestamp:Date.now()}})}},a=function debounce(e,a){let u;return function(...m){clearTimeout(u),u=setTimeout((()=>e(...m)),a)}}((()=>checkDomainChange()),500);checkDomainChange(!0),setInterval(a,1e3)}function getOrSetSessionId(){return window.name||(window.name=v4()),window.name}function matchUrlWithWildcard(e,a){if(!e||"string"!=typeof e)throw new Error("Invalid URL input");const u=(e.match(/^[a-zA-Z]+:\/\//)?e:`http://${e}`).replace(/^[a-zA-Z]+:\/\//,""),m=new URL("http://"+u),{hostname:w,pathname:b,port:S}=m,C=w.startsWith("www.")?w.slice(4).toLowerCase():w.toLowerCase();return a.some((e=>{const a=e.replace(/^[a-zA-Z]+:\/\//,"");let[u,m]=a.split("/",2),w="";u.includes(":")&&([u,w]=u.split(":"));const O=u.replace(/\./g,"\\.").replace(/\*/g,".*"),x=new RegExp(`^${O}$`,"i"),I=C.startsWith("www.")?C.slice(4):C;if(w&&S!==w)return!1;if(u.startsWith("*.")&&(C===u.slice(2)||I===u.slice(2))){if(m){const e=m.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(b)}return!0}if(!x.test(I)&&!x.test(C))return!1;if(m){const e=m.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(b)}return!0}))}async function startRecording({apiKey:e,backendApi:a="https://api-service.sailfishqa.com",domainsToPropagateHeaderTo:u=[],domainsToNotPropagateHeaderTo:m=[],serviceVersion:w=""}){var b,S;initializeConsolePlugin(Lu);let C=getOrSetSessionId();!function storeCredentialsAndConnection({apiKey:e,backendApi:a}){sessionStorage.setItem("sailfishApiKey",e),sessionStorage.setItem("sailfishBackendApi",a)}({apiKey:e,backendApi:a}),trackDomainChanges(),m.length>0&&sendDomainsToNotPropagateHeaderTo(e,m,a).catch((e=>console.error("Failed to send domains to not propagate header to:",e))),function setupXMLHttpRequestInterceptor(e,a=[]){const u=XMLHttpRequest.prototype.open,m=XMLHttpRequest.prototype.send,w=getOrSetSessionId(),b=[..._u,...e];XMLHttpRequest.prototype.open=function(e,a,...m){return this._requestUrl="string"==typeof a&&a.length>0?a:null,u.apply(this,[e,a,...m])},XMLHttpRequest.prototype.send=function(...e){const u=this._requestUrl;if(!u)return m.apply(this,e);if(matchUrlWithWildcard(u,b))return m.apply(this,e);const S=0===a.length||matchUrlWithWildcard(u,a);if(w&&S)try{this.setRequestHeader("X-Sf3-Rid",w)}catch(e){console.warn(`Could not set X-Sf3-Rid header for ${u}`,e)}return m.apply(this,e)}}(m,u),function setupFetchInterceptor(e,a=[]){const u=window.fetch,m=getOrSetSessionId(),w=[..._u,...e],b=new Map;function injectHeader(e,a,u,m,w,b){if(b){if(m instanceof Request){const u=m.clone(),S=new Headers(u.headers);S.set("X-Sf3-Rid",b);const C=new Request(u,{headers:S});return e.call(a,C,w)}{const u={...w},S=new Headers(w.headers||{});return S.set("X-Sf3-Rid",b),u.headers=S,e.call(a,m,u)}}return e.apply(a,u)}window.fetch=new Proxy(u,{apply:(e,u,S)=>{let C,O=S[0],x=S[1]||{};if("string"==typeof O)C=O;else if(O instanceof Request)C=O.url;else{if(!(O instanceof URL))return e.apply(u,S);C=O.href}if(b.has(C)){const a=b.get(C);if("ignore"===a)return e.apply(u,S);if("propagate"===a)return injectHeader(e,u,S,O,x,m)}return matchUrlWithWildcard(C,w)?(b.set(C,"ignore"),e.apply(u,S)):0===a.length||matchUrlWithWildcard(C,a)?(b.set(C,"propagate"),injectHeader(e,u,S,O,x,m)):(b.set(C,"ignore"),e.apply(u,S))}})}(m,u),async function gatherAndCacheDeviceInfo(){sendMessage({type:"deviceInfo",data:{deviceInfo:{language:navigator.language,userAgent:navigator.userAgent}}})}();try{const u=(null==(b=(await fetchCaptureSettings(e,a)).data)?void 0:b.captureSettingsFromApiKey)||Pu,m=await startRecordingSession(e,C,a);if(null==(S=m.data)?void 0:S.startRecordingSession){const m=await initializeRecording(u,a,e,C);!function sendMapUuidIfAvailable(e){window.sfMapUuid&&sendMessage({type:"mapUuid",data:{mapUuid:window.sfMapUuid,serviceVersion:e}})}(w),setInterval((()=>sendRecordingEvents(m)),1e4)}else console.error("Failed to start recording session:",m.errors||m)}catch(e){console.error("Error starting recording:",e)}}!function sendUserDeviceUuid(){sendMessage({type:"userDeviceUuid",userDeviceUuid:function getOrSetUserDeviceUuid(){let e=localStorage.getItem("sailfishUserDeviceUuid");e||(e=v4(),localStorage.setItem("sailfishUserDeviceUuid",e));return e}()})}(),function sendTimeZone(){sendMessage({type:"timeZone",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}(),document.addEventListener("visibilitychange",(function handleVisibilityChange(){"visible"===document.visibilityState&&getOrSetSessionId()}));export{Pu as DEFAULT_CAPTURE_SETTINGS,Lu as DEFAULT_CONSOLE_RECORDING_SETTINGS,addOrUpdateMetadata,cacheEvents,fetchCaptureSettings,identify,initializeConsolePlugin,initializeRecording,initializeWebSocket,matchUrlWithWildcard,sendDomainsToNotPropagateHeaderTo,sendGraphQLRequest,sendMessage,sendRecordingEvents,startRecording,startRecordingSession};
|