@sailfish-ai/recorder 1.7.42 → 1.7.47
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/constants.js +2 -0
- package/dist/exponentialBackoff.js +1 -0
- package/dist/inAppReportIssueModal.js +106 -43
- package/dist/index.js +4 -64
- 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/dist/types/inAppReportIssueModal.d.ts +24 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/websocket.js +64 -35
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";for(var a,u=[],m=0;m<256;++m)u.push((m+256).toString(16).slice(1));var b=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(b)}var w={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(e,a,m){if(w.randomUUID&&!e)return w.randomUUID();var b=(e=e||{}).random||(e.rng||rng)();return b[6]=15&b[6]|64,b[8]=63&b[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()}(b)}const S="X-Sf3-Rid",x=0,C=1,I=2,O=3,E=4,_=[".js",".mjs",".cjs",".ts",".css",".scss",".sass",".less",".styl",".stylus",".png",".jpg",".jpeg",".gif",".svg",".webp",".avif",".bmp",".ico",".tiff",".tif",".heic",".woff",".woff2",".ttf",".otf",".eot",".mp4",".webm",".ogv",".mp3",".wav",".flac",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".csv",".json",".xml",".txt",".zip",".rar",".gz",".tar",".7z",".map",".webmanifest"];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,b,w=u.call(e),S=[];try{for(;(void 0===a||a-- >0)&&!(m=w.next()).done;)S.push(m.value)}catch(e){b={error:e}}finally{try{m&&!m.done&&(u=w.return)&&u.call(w)}finally{if(b)throw b.error}}return S}var D=function(){return function Event2(e,a){this.target=a,this.type=e}}(),F=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}(D),$=function(e){function CloseEvent2(a,u,m){void 0===a&&(a=1e3),void 0===u&&(u="");var b=e.call(this,"close",m)||this;return b.wasClean=!0,b.code=a,b.reason=u,b}return __extends(CloseEvent2,e),CloseEvent2}(D),j={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},U=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?j.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?j.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 b=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),w=b.next();!w.done;w=b.next()){var S=w.value;this._callEventListener(e,S)}}catch(e){a={error:e}}finally{try{w&&!w.done&&(u=b.return)&&u.call(b)}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?j.reconnectionDelayGrowFactor:a,m=e.minReconnectionDelay,b=void 0===m?j.minReconnectionDelay:m,w=e.maxReconnectionDelay,S=void 0===w?j.maxReconnectionDelay:w,x=0;return this._retryCount>0&&(x=b*Math.pow(u,this._retryCount-1))>S&&(x=S),this._debug("next delay",x),x},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?j.maxRetries:u,b=a.connectionTimeout,w=void 0===b?j.connectionTimeout:b,S=a.WebSocket,x=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===(C=x)||!C||2!==C.CLOSING)throw Error("No valid WebSocket class provided");var C;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 x(a,e._protocols):new x(a),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 F(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 $(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}();const B="recordingEvents";let V=null;function openDb$1(){return function hasIndexedDB$1(){return"undefined"!=typeof globalThis&&!!globalThis.indexedDB}()?V||(V=new Promise(e=>{try{const a=globalThis.indexedDB.open("leapsEventDB",1);a.onupgradeneeded=()=>{const e=a.result;e.objectStoreNames.contains(B)||e.createObjectStore(B,{keyPath:"id",autoIncrement:!0})},a.onsuccess=()=>e(a.result),a.onerror=()=>e(null),a.onblocked=()=>{e(null)}}catch{e(null)}}),V):Promise.resolve(null)}function withStore$1(e,a){return openDb$1().then(u=>u?new Promise(m=>{try{const b=u.transaction(B,e),w=b.objectStore(B);Promise.resolve(a(w)).then(e=>{b.oncomplete=()=>m(e),b.onerror=()=>m(null)}).catch(()=>m(null))}catch{m(null)}}):null)}async function saveEventToIDB(e){await withStore$1("readwrite",a=>{a.add({timestamp:Date.now(),data:e})})}async function deleteEventsByIds(e){await withStore$1("readwrite",async a=>{for(const u of e)a.delete(u)})}const H="notifyMessages";let q=null;function openDb(){return function hasIndexedDB(){return"undefined"!=typeof globalThis&&!!globalThis.indexedDB}()?q||(q=new Promise(e=>{try{const a=globalThis.indexedDB.open("leapsNotifyDB",1);a.onupgradeneeded=()=>{const e=a.result;e.objectStoreNames.contains(H)||e.createObjectStore(H,{keyPath:"id",autoIncrement:!0})},a.onsuccess=()=>e(a.result),a.onerror=()=>e(null),a.onblocked=()=>e(null)}catch{e(null)}}),q):Promise.resolve(null)}async function withStore(e,a){const u=await openDb();return u?new Promise(m=>{try{const b=u.transaction(H,e),w=b.objectStore(H);Promise.resolve(a(w)).then(e=>{b.oncomplete=()=>m(e),b.onerror=()=>m(null)}).catch(()=>m(null))}catch{m(null)}}):null}async function saveNotifyMessageToIDB(e){await withStore("readwrite",a=>{a.add({value:e})})}async function deleteNotifyMessageById(e){await withStore("readwrite",a=>{a.delete(e)})}function buildBatches(e,a,u){const m={};for(const a of e){const e=a.data.sessionId||"unknown";m[e]||(m[e]=[]),m[e].push(a)}const b=[];for(const e in m){const w=m[e];let S=[],x=0;for(const e of w){const m=a(e);x+m>u&&(S.length>0&&(b.push(S),S=[],x=0),m>u)||(S.push(e),x+=m)}S.length>0&&b.push(S)}return b}function eventSize(e){return new Blob([JSON.stringify(e)]).size}let Y=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Y=()=>(new Date).getTime());let J=null;function isWebSocketOpen(e){return(null==e?void 0:e.readyState)===WebSocket.OPEN}async function flushNotifyQueue(){const e=await async function getAllNotifyMessages(){return await withStore("readonly",e=>new Promise(a=>{const u=e.getAll();u.onsuccess=()=>a(u.result),u.onerror=()=>a([])}))??[]}();if(isWebSocketOpen(J))try{for(const a of e)J.send(a.value),await deleteNotifyMessageById(a.id)}catch(e){}}async function flushBufferedEvents(){var e,a;if(!isWebSocketOpen(J))return;const u=await async function getAllIndexedEvents(){return await withStore$1("readonly",e=>new Promise(a=>{const u=e.getAll();u.onsuccess=()=>a(u.result),u.onerror=()=>a([])}))??[]}(),m={};for(const b of u){const u=(null==(a=null==(e=null==b?void 0:b.data)?void 0:e.data)?void 0:a.sessionId)??"unknown-session";m[u]||(m[u]=[]),m[u].push(b)}for(const e of Object.values(m)){const a=buildBatches(e,e=>eventSize(e.data),52428800);for(const e of a){if(!isWebSocketOpen(J))break;const a=e.map(e=>e.data),u=e.map(e=>e.id).filter(e=>null!=e);try{const e=JSON.stringify({type:"events",events:a,mapUuid:window.sfMapUuid});J.send(e),await deleteEventsByIds(u)}catch(e){}}}}function sendEvent(e){const a=JSON.stringify({type:"event",event:e,mapUuid:window.sfMapUuid});if(isWebSocketOpen(J))try{J.send(a)}catch(a){saveEventToIDB(e)}else saveEventToIDB(e)}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),b=new URL(e).protocol;return J=new U(`${"https:"===b?"wss":"ws"}://${m}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.7.42`,[],{connectionTimeout:3e4}),J.addEventListener("open",()=>{(async()=>{await flushNotifyQueue(),setInterval(()=>flushBufferedEvents(),1e4)})()}),J.addEventListener("close",()=>{console.log("WebSocket closed.")}),J}function sendMessage(e){const a=JSON.stringify(e);if(isWebSocketOpen(J))try{J.send(a)}catch(e){saveNotifyMessageToIDB(a)}else saveNotifyMessageToIDB(a)}function sendGraphQLRequest(e,a,u,m=5,b=2e3,w=2){const S=`${u.backendApi}/graphql/?apiKey=${u.apiKey}`;return function exponentialBackoff(e,a,u=5,m=2e3,b=2){let w=0;const attemptRequest=async()=>{try{return await e()}catch(e){if(w++,w>u)throw e;const a=m*Math.pow(b,w-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,b,w)}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,m,b,w,S,x,C){return sendGraphQLRequest("StartSession","mutation StartSession(\n $apiKey: UUID!,\n $recordingSessionId: UUID!,\n $serviceIdentifier: String!,\n $serviceVersion: String,\n $mapUuid: String,\n $gitSha: String,\n $library: String,\n $serviceAdditionalMetadata: JSON,\n $startRecordingFilePath: String,\n $startRecordingLineNumber: Int\n ) {\n startRecordingSession(\n companyApiKey: $apiKey,\n sessionId: $recordingSessionId,\n serviceIdentifier: $serviceIdentifier,\n serviceVersion: $serviceVersion,\n mapUuid: $mapUuid,\n gitSha: $gitSha,\n library: $library,\n serviceAdditionalMetadata: $serviceAdditionalMetadata,\n startRecordingFilePath: $startRecordingFilePath,\n startRecordingLineNumber: $startRecordingLineNumber\n ) {\n id\n }\n }",{apiKey:e,recordingSessionId:a,backendApi:u,serviceIdentifier:m,serviceVersion:b,mapUuid:w,gitSha:S,library:x,serviceAdditionalMetadata:C,startRecordingFilePath:null,startRecordingLineNumber:null})}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})}function createTriageFromRecorder(e,a,u,m,b,w){return sendGraphQLRequest("CreateTriageFromRecorder","mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description\n ) {\n id\n }\n }\n ",{apiKey:e,recordingSessionId:u,timestampStart:m,timestampEnd:b,description:w,backendApi:a})}let X=null,Q={mode:"lookback",description:""},ee=null,te=null,ne=null,re=!1;const se={resolveSessionId:null,apiKey:null,backendApi:null,triageBaseUrl:"https://app.sailfishqa.com"};function getShortcutKeyCmdCtrlLabel(){return function isMacPlatform(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)?e.platform.toLowerCase().includes("mac"):/mac/i.test(navigator.userAgent)}()?"⌘":"Ctrl"}function setupIssueReporting(e){se.apiKey=e.apiKey,se.backendApi=e.backendApi,se.resolveSessionId=e.getSessionId,window.addEventListener("keydown",a=>{const u=function isTypingInInput(){const e=document.activeElement;return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}(),m=a.key.toLowerCase(),b=a.metaKey||a.ctrlKey;if(!u&&e.enableShortcuts&&!b){if("e"===m)return a.preventDefault(),void injectModalHTML("lookback");if("n"===m)return a.preventDefault(),void injectModalHTML("startnow")}const w=!!document.getElementById("sf-report-issue-modal");if(w||re){if(!b&&"escape"===m&&w&&!re)return a.preventDefault(),void closeModal();if(b&&"enter"===m&&w){const e=document.getElementById("sf-issue-submit-btn");e&&!e.disabled&&(a.preventDefault(),e.click())}if(b&&"escape"===m&&re&&(a.preventDefault(),stopRecording()),!u&&!b&&"r"===m&&w&&"startnow"===Q.mode){const e=document.getElementById("sf-start-recording-btn");e&&(a.preventDefault(),e.click())}}})}function openReportIssueModal(e){re?stopRecording():(injectModalHTML(),X&&document.body.appendChild(X),se.triageBaseUrl=e??"https://app.sailfishqa.com")}function closeModal(){document.activeElement instanceof HTMLElement&&document.activeElement.blur(),(null==X?void 0:X.parentNode)&&X.parentNode.removeChild(X),X=null,re||(Q={mode:"lookback",description:"",occurredInThisTab:!0},ee=null,te=null),ne&&clearInterval(ne)}function injectModalHTML(e="lookback"){X&&(X.remove(),X=null),X=document.createElement("div"),X.id="sf-report-issue-modal";const a="startnow"===e;X.innerHTML=`\n <div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>\n <div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);\n background:#fff; padding:24px; border-radius:12px;\n width:476px; max-width:90%; z-index:9999;\n box-shadow:0 4px 20px rgba(0,0,0,0.15); font-family:sans-serif;">\n\n <button id="sf-modal-close-btn"\n style="position:absolute; top:24px; right:24px;">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M18 6L6 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6 6L18 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n\n <h2 style="font-size:18px; font-weight:600; margin-bottom:16px;">Report Issue</h2>\n\n <div id="sf-issue-tabs" style="display:flex; gap:4px; margin-bottom:16px; background:#f1f5f9; padding:6px; border-radius:6px; width: fit-content;">\n <button id="sf-tab-lookback" data-mode="lookback" class="sf-issue-tab ${a?"":"active"}"\n style="padding:6px 12px; border:none; background:${a?"transparent":"white"}; color: ${a?"#64748B":"#0F172A"}; border-radius:4px; font-size:14px; cursor:pointer; font-weight:500; height:32px; display: flex; align-items: center; gap: 8px;">\n Existing <span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; width: 16px; height: 16px; font-size: 12px; display: flex; align-items: center; justify-content: center; color: #94A3B8; font-weight: 500;">E</span>\n </button>\n <button id="sf-tab-startnow" data-mode="startnow" class="sf-issue-tab ${a?"active":""}"\n style="padding:6px 12px; border:none; background:${a?"white":"transparent"}; color: ${a?"#0F172A":"#64748B"}; border-radius:4px; font-size:14px; cursor:pointer; font-weight:500; height:32px; display: flex; align-items: center; gap: 8px;">\n Capture new <span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; width: 16px; height: 16px; font-size: 12px; display: flex; align-items: center; justify-content: center; color: #94A3B8; font-weight: 500;">N</span>\n </button>\n </div>\n\n <div id="sf-issue-mode-info" style="display:flex; align-items:flex-start; gap:8px; margin-bottom:24px;">\n <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-top:4px;">\n <g clip-path="url(#clip0_2477_11797)">\n <path d="M6.99935 12.8333C10.221 12.8333 12.8327 10.2216 12.8327 6.99996C12.8327 3.7783 10.221 1.16663 6.99935 1.16663C3.77769 1.16663 1.16602 3.7783 1.16602 6.99996C1.16602 10.2216 3.77769 12.8333 6.99935 12.8333Z" stroke="#A1A1AA" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7 9.33333V7" stroke="#A1A1AA" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7 4.66663H7.00583" stroke="#A1A1AA" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n </g>\n <defs><clipPath id="clip0_2477_11797"><rect width="14" height="14" fill="white"/></clipPath></defs>\n </svg>\n <div style="font-size:14px;">\n ${a?"I want to reproduce the issue right now.":"Something already happened. Capture the past few minutes."}\n </div>\n </div>\n\n <label for="sf-issue-description" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">\n What happened? (optional)\n </label>\n <textarea id="sf-issue-description" placeholder="Add description here"\n style="width:100%; height:80px; padding:8px 12px; font-size:14px;\n border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;\n resize:none; outline:none;"></textarea>\n\n <div id="sf-lookback-container" style="display:${a?"none":"block"}; margin-bottom:20px;">\n <label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">\n When did this happen?\n </label>\n <div style="display:flex; align-items:center; justify-content:space-between; gap:12px;">\n <div style="position:relative; display:flex; align-items:center; gap:6px;">\n <select id="sf-lookback-minutes"\n style="\n background: white;\n padding: 4px 8px;\n font-size: 14px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n color: #64748B;\n font-family: sans-serif;\n outline: none;\n box-shadow: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 28px;\n cursor: pointer;\n font-size: 14px;\n line-height: 20px;\n ">\n ${Array.from({length:15},(e,a)=>{const u=a+1;return`<option value="${u}" ${2===u?"selected":""}>${u}</option>`}).join("")}\n </select>\n <div style="position:absolute; left:32px; top:50%; transform:translateY(-50%); pointer-events:none;">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path d="M4 6L8 10L12 6" stroke="#52525B" stroke-width="1.33333"\n stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <span style="font-size:14px; color: #64748B;">minutes ago</span>\n </div>\n <div>\n <label for="sf-occurred-in-tab"\n style="display:flex; align-items:center; gap:6px; font-size:14px; color:#0F172A; cursor:pointer; white-space:nowrap;">\n <input\n type="checkbox"\n id="sf-occurred-in-tab"\n checked\n disabled\n style="width:16px; height:16px; accent-color:#295DBF; cursor:pointer;"\n />\n The issue occurred in this tab?\n </label>\n </div>\n </div>\n </div>\n\n <div id="sf-modal-footer" style="display:flex; justify-content:${a?"space-between":"flex-end"}; align-items:flex-end;">\n\n <div id="sf-record-button-container" style="display:${a?"block":"none"};">\n <div id="sf-recording-timer-label" style="display:none; font-size:14px; margin-bottom:20px;">\n Recording: <span id="sf-recording-timer-display">00:00</span>\n </div>\n <button id="sf-start-recording-btn"\n style="display:flex; align-items:center; gap:8px; border:1px solid #fc5555;\n background:transparent; padding:6px 12px; font-size:14px;\n color: #fc5555; border-radius:6px; cursor:pointer; font-weight:500;">\n <div id="sf-record-icon" style="padding: 6px; border-radius: 6px; border: 1px solid #fc5555; cursor: pointer;">\n <div style="width: 14px; height: 14px; background: #fc5555; border-radius: 50%; border: 1px solid #991b1b;"></div>\n </div>\n <span>Start Recording</span>\n <span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; width: 16px; height: 16px; font-size: 12px; display: flex; align-items: center; justify-content: center; color: #94A3B8; font-weight: 500;">R</span>\n </button>\n </div>\n\n <button id="sf-issue-submit-btn"\n style="background: #295DBF; color:white; border:none; padding:8px 16px;\n border-radius:6px; font-size:14px; line-height: 24px; font-weight:500;\n cursor:${a?"not-allowed":"pointer"}; opacity:${a?"0.4":"1"}; margin-bottom:1px" ${a?"disabled":""}>\n Report <span style="margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; color: #94A3B8; font-size: 12px; line-height:16px;">\n <span style="background: #F1F5F9; border-radius: 4px; padding: 0 4px; font-weight: 500;">${getShortcutKeyCmdCtrlLabel()}</span>\n +\n <span style="background: #F1F5F9; border-radius: 4px; padding: 0 4px; font-weight: 500;">ENTER</span>\n </span>\n </button>\n </div>\n <div style="display:flex; justify-content:center; font-size: 12px; margin-top: 12px; color: #295dbf;">\n <a href="mailto:info@sailfishqa.com?subject=I'd%20love%20to%20learn%20more&body=Hey%2C%20Sailfish%20AI%20team%20-%20I'd%20love%20to%20learn%20more%20about%20Sailfish%20AI!">Powered by Sailfish AI</a>\n </div>\n </div>\n `,Q.mode=e,document.body.appendChild(X),function bindListeners(){const e=null==X?void 0:X.querySelectorAll(".sf-issue-tab"),a=document.getElementById("sf-start-recording-btn"),u=document.getElementById("sf-modal-close-btn"),m=document.getElementById("sf-issue-submit-btn"),b=document.getElementById("sf-lookback-minutes");null==e||e.forEach(e=>{e.addEventListener("click",e=>{const a=e.currentTarget.dataset.mode;!function setActiveTab(e){Q.mode=e;const a=null==X?void 0:X.querySelector("#sf-tab-lookback"),u=null==X?void 0:X.querySelector("#sf-tab-startnow");"lookback"===e?(a.style.background="white",a.style.color="#0F172A",u.style.background="transparent",u.style.color="#64748B"):(u.style.background="white",u.style.color="#0F172A",a.style.background="transparent",a.style.color="#64748B")}(a),function updateModeSpecificUI(e){const a=document.querySelector("#sf-issue-mode-info div"),u=document.getElementById("sf-issue-submit-btn"),m=document.getElementById("sf-record-button-container"),b=document.getElementById("sf-recording-timer-label"),w=document.getElementById("sf-recording-timer-display"),S=document.getElementById("sf-modal-footer"),x=document.getElementById("sf-lookback-container");if(!(a&&u&&m&&b&&w&&S&&x))return;if("startnow"===e){m.style.display="block",x.style.display="none",S.style.justifyContent="space-between",a.textContent="I want to reproduce the issue right now.";const e=null!==ee&&null!==te;if(u.disabled=!e,u.style.opacity=e?"1":"0.4",u.style.cursor=e?"pointer":"not-allowed",ee&&te){const e=Math.floor((te-ee)/1e3),a=String(Math.floor(e/60)).padStart(2,"0"),u=String(e%60).padStart(2,"0");b.style.display="block",w.textContent=`${a}:${u}`}else b.style.display="none"}else m.style.display="none",b.style.display="none",x.style.display="block",S.style.justifyContent="flex-end",a.textContent="Something already happened. Capture the past few minutes.",u.disabled=!1,u.style.opacity="1",u.style.cursor="pointer"}(a)})}),u&&(u.onclick=closeModal);b&&b.addEventListener("change",()=>{"lookback"===Q.mode&&(m.disabled=!1,m.style.opacity="1",m.style.cursor="pointer")});a&&(a.onclick=()=>{const e=document.getElementById("sf-issue-description");e&&(Q.description=e.value),function startCountdownThenRecord(){if(document.getElementById("sf-countdown-overlay"))return;const e=document.createElement("div");e.id="sf-countdown-overlay",e.style.cssText="\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.6);\n z-index: 10001;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 80px;\n font-weight: bold;\n color: white;\n font-family: sans-serif;\n ";let a=3;e.textContent=a.toString(),document.body.appendChild(e);const u=setInterval(()=>{a--,a>0?e.textContent=a.toString():(clearInterval(u),document.body.removeChild(e),ee=Date.now(),re=!0,closeModal(),function showFloatingTimer(){const e=document.createElement("div");e.id="sf-recording-indicator",e.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n padding: 8px 12px;\n font-family: sans-serif;\n font-size: 14px;\n display: flex;\n align-items: start;\n gap: 24px;\n z-index: 10000;\n cursor: pointer;\n ",e.innerHTML=`\n <div style="display:flex; align-items:center; gap:8px;">\n <div style="width:32px; height:32px; background:#FC5555; border-radius:6px; border:1px solid #991b1b; display:flex; align-items:center; justify-content:center;">\n <div style="width:10px; height:10px; background:white; border-radius:2px;"></div>\n </div>\n <div style="display:flex; flex-direction:column; font-size:14px; line-height:20px;">\n <span id="sf-recording-timer" style="font-weight:600; color: #171717;">00:00</span>\n <span style="font-size:12px; line-height:12px; color: #71717A;">Max time 15 mins</span>\n </div>\n </div>\n <div style="display:flex; align-items:center; gap:4px; margin-left:auto; font-size:14px; color:#0F172A;">\n <span style="color: #71717A;">stop</span>\n <span style="display: inline-flex; align-items: center; gap: 4px; color: #94A3B8; font-size: 12px; line-height:16px;">\n <span style="background: #F1F5F9; border-radius: 4px; border:1px solid #cbd5e1; padding: 0 4px; font-weight: 500;">${getShortcutKeyCmdCtrlLabel()}</span>\n +\n <span style="background: #F1F5F9; border-radius: 4px; border:1px solid #cbd5e1; padding: 0 4px; font-weight: 500;">ESC</span>\n </span>\n </div>\n `,e.addEventListener("click",()=>stopRecording()),document.body.appendChild(e);const a=e.querySelector("#sf-recording-timer");if(!a)return;ne=setInterval(()=>{const e=Date.now()-(ee??Date.now()),u=Math.floor(e/6e4).toString().padStart(2,"0"),m=Math.floor(e%6e4/1e3).toString().padStart(2,"0");a.textContent=`${u}:${m}`},1e3)}())},1e3)}()});null==X||X.addEventListener("click",e=>{var a;if(e.target.closest("#sf-issue-submit-btn")){const e=(null==(a=document.getElementById("sf-issue-description"))?void 0:a.value)||"",u=Q.mode;let m,w;if(Q.description=e,"startnow"===u)m=ee??Date.now()-3e5,w=te??Date.now();else{const e=60*Number((null==b?void 0:b.value)||"2")*1e3;w=Date.now(),m=w-e}closeModal(),async function createTriage(e,a,u){var m,b;try{showTriageStatusModal(!0);const w=await createTriageFromRecorder(se.apiKey,se.backendApi,function getSessionIdSafely(){if(!se.resolveSessionId)throw new Error("getSessionId not defined");return se.resolveSessionId()}(),e,a,u),S=null==(b=null==(m=null==w?void 0:w.data)?void 0:m.createTriageFromRecorder)?void 0:b.id;S?showTriageStatusModal(!1,S):(console.error("No Triage ID returned from backend."),showTriageStatusModal(!1,null))}catch(e){console.error("Error creating triage:",e),showTriageStatusModal(!1,null)}}(`${m}`,`${w}`,e)}})}()}function stopRecording(){var e;te=Date.now(),re=!1,ne&&clearInterval(ne),null==(e=document.getElementById("sf-recording-indicator"))||e.remove(),function reopenModalAfterStop(){injectModalHTML("startnow");const e=document.getElementById("sf-start-recording-btn");if(e){const a=e.querySelector("span");a&&(a.textContent="Re-record")}const a=document.getElementById("sf-recording-timer-label"),u=document.getElementById("sf-recording-timer-display");if(a&&u&&ee&&te){const e=Math.floor((te-ee)/1e3),m=Math.floor(e/60).toString().padStart(2,"0"),b=(e%60).toString().padStart(2,"0");u.textContent=`${m}:${b}`,a.style.display="block"}const m=document.getElementById("sf-issue-description");m&&(m.value=Q.description);const b=document.querySelector('input[value="startnow"]');b&&(b.checked=!0);const w=document.getElementById("sf-inline-record-chip"),S=document.getElementById("sf-inline-record-timer");if(w&&S){const e=Math.floor(((te??0)-(ee??0))/1e3),a=Math.floor(e/60).toString().padStart(2,"0"),u=Math.floor(e%60).toString().padStart(2,"0");S.textContent=`${a}:${u}`,S.style.color="black",w.style.display="flex"}const x=document.getElementById("sf-issue-submit-btn");x.disabled=!1,x.style.opacity="1",x.style.cursor="pointer"}()}function showTriageStatusModal(e,a){var u;!function removeExistingModals(){var e,a;null==(e=document.getElementById("sf-report-issue-modal"))||e.remove(),null==(a=document.getElementById("sf-triage-status-modal"))||a.remove()}();const m=a?`${se.triageBaseUrl}/triage/${a}?from=inAppReportIssue`:"",b=document.createElement("div");b.id="sf-triage-status-modal",Object.assign(b.style,{position:"fixed",inset:"0",zIndex:"9998",display:"flex",alignItems:"center",justifyContent:"center"});const w=e?"Reporting Issue...":"Issue reported!",S=e?'<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>':"",x=e?'<div style="display:flex; justify-content:center; align-items:center; padding: 40px 0;">\n <div style="width:24px; height:24px; border:2px solid #295dbf; border-top:2px solid white; border-radius:50%; animation:spin 1s linear infinite;"></div>\n </div>':"",C=e?"":'<div id="sf-copied-status" style="display:none; font-size:12px; font-weight:500; color:white;\n background-color:#22c55e; padding:4px 8px; border-radius:6px; white-space:nowrap; align-items:center; gap:6px;">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21 7.5L9 19.5L3 13.5L5.25 11.25L9 15L18.75 5.25L21 7.5Z" fill="white"/>\n </svg>\n Copied\n </div>';b.innerHTML=`\n <div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>\n <div id="sf-triage-card"\n style="position:relative; background:#fff; padding:24px; border-radius:12px; width:300px; max-width:90%;\n font-family:sans-serif; box-shadow:0 4px 20px rgba(0,0,0,0.15);\n z-index:9999; opacity:1; transition:opacity 300ms ease;">\n <div style="position:absolute; top:24px; right:48px;">${C}</div>\n\n <button id="sf-triage-modal-close"\n style="position:absolute; top:24px; right:16px; background:none; border:none; cursor:pointer;">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M18 6L6 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6 6L18 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n\n <h2 style="font-size:18px; font-weight:600; margin-bottom:${e?8:40}px; line-height:28px;">${w}</h2>\n ${S}\n ${x}\n\n <div style="display:flex; justify-content:flex-end; align-items:center; gap:8px;">\n <button id="sf-copy-triage-link"\n style="background:white; border:1px solid #e2e8f0; padding:8px 16px; border-radius:6px;\n font-size:14px; color: #0f172a; cursor:pointer;">\n Share\n </button>\n <button id="sf-view-triage-btn"\n style="display:flex; align-items:center; gap:8px; background:#295dbf; border:none;\n padding:8px 16px; border-radius:6px; font-size:14px; color:white; cursor:pointer;">\n View\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 8.66667V12.6667C12 13.0203 11.8595 13.3594 11.6095 13.6095C11.3594 13.8595 11.0203 14 10.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V5.33333C2 4.97971 2.14048 4.64057 2.39052 4.39052C2.64057 4.14048 2.97971 4 3.33333 4H7.33333" stroke="white" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10 2H14V6" stroke="white" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6.66602 9.33333L13.9993 2" stroke="white" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n </div>\n </div>\n <style>\n @keyframes spin { to { transform: rotate(360deg); } }\n </style>\n `,document.body.appendChild(b);const I=b.querySelector("#sf-triage-card");null==(u=document.getElementById("sf-triage-modal-close"))||u.addEventListener("click",()=>{fadeCardAndRemove(b,I,300)});const O=document.getElementById("sf-copy-triage-link"),E=document.getElementById("sf-view-triage-btn");e?(O.disabled=!0,O.style.opacity="0.4",O.style.cursor="not-allowed",E.disabled=!0,E.style.opacity="0.4",E.style.cursor="not-allowed"):(O.disabled=!1,O.addEventListener("click",()=>{navigator.clipboard.writeText(m).then(()=>{const e=document.getElementById("sf-copied-status");e&&(e.style.display="flex")})}),E.disabled=!1,E.addEventListener("click",()=>{a&&window.open(m,"_blank")}),setTimeout(()=>fadeCardAndRemove(b,I,300),1e4))}function fadeCardAndRemove(e,a,u=300){a.style.opacity="0",a.addEventListener("transitionend",()=>e.remove(),{once:!0}),setTimeout(()=>e.remove(),u+100)}var oe=Object.defineProperty,b$1=(e,a,u)=>((e,a,u)=>a in e?oe(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u),ie=Object.defineProperty,xn=(e,a,u)=>((e,a,u)=>a in e?ie(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u),le=(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))(le||{});function vr(e){return e.nodeType===e.ELEMENT_NODE}function We(e){const a=null==e?void 0:e.host;return(null==a?void 0:a.shadowRoot)===e}function ze(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 ce=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:b,maskInputFn:w}){let S=b||"",x="";const C=m&&fe(m);let I=!1;return(a[u.toLowerCase()]||C&&a[C])&&(x=w?w(S,e):"*".repeat(S.length),I=S!==x),{value:x,masked:I}}function fe(e){return e.toLowerCase()}const pe="__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 de=1;const he=new RegExp("[^a-z0-9-_:]");function Ir(){return de++}let me,ge;const ye=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,be=/^(?:[a-z+]+:)?\/\//i,we=/^www\..*/i,ve=/^(data:)([^,]*),(.*)/i;function Pt(e,a){return(e||"").replace(ye,(e,u,m,b,w,S)=>{const x=m||w||S,C=u||b||"";if(!x)return e;if(be.test(x)||we.test(x))return`url(${C}${x}${C})`;if(ve.test(x))return`url(${C}${x}${C})`;if("/"===x[0])return`url(${C}${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)+x}${C})`;const I=a.split("/"),O=x.split("/");I.pop();for(const e of O)"."!==e&&(".."===e?I.pop():I.push(e));return`url(${C}${I.join("/")}${C})`})}const ke=/^[^ \t\n\r\u000c]+/,xe=/^[, \t\n\r\u000c]+/;const Ce=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=Ce.get(e);if(u||(u=e.createElement("a"),Ce.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 Di(e,a){if(""===a.trim())return a;let u=0;function n(e){let m;const b=e.exec(a.substring(u));return b?(m=b[0],u+=m.length,m):""}const m=[];for(;n(xe),!(u>=a.length);){let b=n(ke);if(","===b.slice(-1))b=At(e,b.substring(0,b.length-1)),m.push(b);else{let w="";b=At(e,b);let S=!1;for(;;){const e=a.charAt(u);if(""===e){m.push((b+w).trim());break}if(S)")"===e&&(S=!1);else{if(","===e){u+=1,m.push((b+w).trim());break}"("===e&&(S=!0)}w+=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 Nt(e,a,u){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!u&&Nt(e.parentNode,a,u);for(let u=e.classList.length;u--;){const m=e.classList[u];if(a.test(m))return!0}return!!u&&Nt(e.parentNode,a,u)}function Er(e,a,u,m){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 a){if(m){if(b.closest(`.${a}`))return!0}else if(b.classList.contains(a))return!0}else if(Nt(b,a,m))return!0;if(u)if(m){if(b.closest(u))return!0}else if(b.matches(u))return!0}catch{}return!1}function zi(e,a){const{doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:S,inlineStylesheet:x,maskInputOptions:C={},maskTextFn:I,maskInputFn:O,dataURLOptions:E={},inlineImages:_,recordCanvas:D,keepIframeSrcFn:F,newlyAddedElement:$=!1}=a,j=function Bi(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:le.Document,childNodes:[],compatMode:e.compatMode}:{type:le.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:le.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:j};case e.ELEMENT_NODE:return function Vi(e,a){const{doc:u,blockClass:m,blockSelector:b,inlineStylesheet:w,maskInputOptions:S={},maskInputFn:x,dataURLOptions:C={},inlineImages:I,recordCanvas:O,keepIframeSrcFn:E,newlyAddedElement:_=!1,rootId:D}=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,b),$=function Oi(e){if(e instanceof HTMLFormElement)return"form";const a=fe(e.tagName);return he.test(a)?"div":a}(e);let j={};const U=e.attributes.length;for(let a=0;a<U;a++){const m=e.attributes[a];Or($,m.name,m.value)||(j[m.name]=Mr(u,$,fe(m.name),m.value))}if("link"===$&&w){const a=Array.from(u.styleSheets).find(a=>a.href===e.href);let m=null;a&&(m=Tt(a)),m&&(delete j.rel,delete j.href,j._cssText=Pt(m,a.href))}if("style"===$&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const a=Tt(e.sheet);a&&(j._cssText=Pt(a,$t(u)))}if("input"===$||"textarea"===$||"select"===$){const a=e.value,u=e.checked;if("radio"!==j.type&&"checkbox"!==j.type&&"submit"!==j.type&&"button"!==j.type&&a){const u=Zt({element:e,type:Yt(e),tagName:$,value:a,maskInputOptions:S,maskInputFn:x});j.value=u.value,u.masked&&(j.masked=!0)}else u&&(j.checked=u)}if("option"===$&&(e.selected&&!S.select?j.selected=!0:delete j.selected),"canvas"===$&&O)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 b=a.getImageData,w=pe in b?b[pe]:b;if(new Uint32Array(w.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)||(j.rr_dataURL=e.toDataURL(C.type,C.quality));else if(!("__context"in e)){const a=e.toDataURL(C.type,C.quality),m=u.createElement("canvas");m.width=e.width,m.height=e.height;a!==m.toDataURL(C.type,C.quality)&&(j.rr_dataURL=a)}if("img"===$&&I){me||(me=u.createElement("canvas"),ge=me.getContext("2d"));const a=e,m=a.currentSrc||a.getAttribute("src")||"<unknown-src>",b=a.crossOrigin,A=()=>{a.removeEventListener("load",A);try{me.width=a.naturalWidth,me.height=a.naturalHeight,ge.drawImage(a,0,0),j.rr_dataURL=me.toDataURL(C.type,C.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&&(b?j.crossOrigin=b:a.removeAttribute("crossorigin"))};a.complete&&0!==a.naturalWidth?A():a.addEventListener("load",A)}if("audio"===$||"video"===$){const a=j;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&&(j.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(j.rr_scrollTop=e.scrollTop)),F){const{width:a,height:u}=e.getBoundingClientRect();j={class:j.class,rr_width:`${a}px`,rr_height:`${u}px`}}let B;"iframe"===$&&!E(j.src)&&(e.contentDocument||(j.rr_src=j.src),delete j.src);try{customElements.get($)&&(B=!0)}catch{}return{type:le.Element,tagName:$,attributes:j,childNodes:[],isSVG:Fi(e)||void 0,needBlock:F,rootId:D,isCustom:B}}(e,{doc:u,blockClass:b,blockSelector:w,inlineStylesheet:x,maskInputOptions:C,maskInputFn:O,dataURLOptions:E,inlineImages:_,recordCanvas:D,keepIframeSrcFn:F,newlyAddedElement:$,rootId:j});case e.TEXT_NODE:return function ji(e,a){var u;const{needsMask:m,maskTextFn:b,rootId:w}=a,S=e.parentNode&&e.parentNode.tagName;let x=e.textContent;const C="STYLE"===S||void 0,I="SCRIPT"===S||void 0;if(C&&x){try{e.nextSibling||e.previousSibling||null!=(u=e.parentNode.sheet)&&u.cssRules&&(x=Tt(e.parentNode.sheet))}catch(a){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${a}`,e)}x=Pt(x,$t(a.doc))}return I&&(x="SCRIPT_PLACEHOLDER"),!C&&!I&&x&&m&&(x=b?b(x,e.parentElement):x.replace(/[\S]/g,"*")),{type:le.Text,textContent:x||"",isStyle:C,rootId:w}}(e,{doc:u,needsMask:S,maskTextFn:I,rootId:j});case e.CDATA_SECTION_NODE:return{type:le.CDATA,textContent:"",rootId:j};case e.COMMENT_NODE:return{type:le.Comment,textContent:e.textContent||"",rootId:j};default:return!1}}function N(e){return null==e?"":e.toLowerCase()}function Se(e,a){const{doc:u,mirror:m,blockClass:b,blockSelector:w,maskTextClass:S,maskTextSelector:x,skipChild:C=!1,inlineStylesheet:I=!0,maskInputOptions:O={},maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F={},inlineImages:$=!1,recordCanvas:j=!1,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V=5e3,onStylesheetLoad:H,stylesheetLoadTimeout:q=5e3,keepIframeSrcFn:Y=()=>!1,newlyAddedElement:J=!1}=a;let{needsMask:X}=a,{preserveWhiteSpace:Q=!0}=a;X||(X=Er(e,S,x,void 0===X));const ee=zi(e,{doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:X,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,dataURLOptions:F,inlineImages:$,recordCanvas:j,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===le.Comment||e.type===le.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&&(N(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===N(e.attributes.name)||"icon"===N(e.attributes.rel)||"apple-touch-icon"===N(e.attributes.rel)||"shortcut icon"===N(e.attributes.rel)))||"meta"===e.tagName&&(a.headMetaDescKeywords&&N(e.attributes.name).match(/^description|keywords$/)||a.headMetaSocial&&(N(e.attributes.property).match(/^(og|twitter|fb):/)||N(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===N(e.attributes.name))||a.headMetaRobots&&("robots"===N(e.attributes.name)||"googlebot"===N(e.attributes.name)||"bingbot"===N(e.attributes.name))||a.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"]||a.headMetaAuthorship&&("author"===N(e.attributes.name)||"generator"===N(e.attributes.name)||"framework"===N(e.attributes.name)||"publisher"===N(e.attributes.name)||"progid"===N(e.attributes.name)||N(e.attributes.property).match(/^article:/)||N(e.attributes.property).match(/^product:/))||a.headMetaVerification&&("google-site-verification"===N(e.attributes.name)||"yandex-verification"===N(e.attributes.name)||"csrf-token"===N(e.attributes.name)||"p:domain_verify"===N(e.attributes.name)||"verify-v1"===N(e.attributes.name)||"verification"===N(e.attributes.name)||"shopify-checkout-api-token"===N(e.attributes.name)))))}(ee,D)||!Q&&ee.type===le.Text&&!ee.isStyle&&!ee.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Ir();const ne=Object.assign(ee,{id:te});if(m.add(e,ne),-2===te)return null;U&&U(e);let re=!C;if(ne.type===le.Element){re=re&&!ne.needBlock,delete ne.needBlock;const a=e.shadowRoot;a&&ze(a)&&(ne.isShadowHost=!0)}if((ne.type===le.Document||ne.type===le.Element)&&re){D.headWhitespace&&ne.type===le.Element&&"head"===ne.tagName&&(Q=!1);const a={doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:X,maskTextClass:S,maskTextSelector:x,skipChild:C,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F,inlineImages:$,recordCanvas:j,preserveWhiteSpace:Q,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V,onStylesheetLoad:H,stylesheetLoadTimeout:q,keepIframeSrcFn:Y};if(ne.type!==le.Element||"textarea"!==ne.tagName||void 0===ne.attributes.value)for(const u of Array.from(e.childNodes)){const e=Se(u,a);e&&ne.childNodes.push(e)}if(vr(e)&&e.shadowRoot)for(const u of Array.from(e.shadowRoot.childNodes)){const m=Se(u,a);m&&(ze(e.shadowRoot)&&(m.isShadow=!0),ne.childNodes.push(m))}}return e.parentNode&&We(e.parentNode)&&ze(e.parentNode)&&(ne.isShadow=!0),ne.type===le.Element&&"iframe"===ne.tagName&&function _i(e,a,u){const m=e.contentWindow;if(!m)return;let b,w=!1;try{b=m.document.readyState}catch{return}if("complete"!==b){const m=setTimeout(()=>{w||(a(),w=!0)},u);return void e.addEventListener("load",()=>{clearTimeout(m),w=!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&&B){const u=Se(a,{doc:a,mirror:m,blockClass:b,blockSelector:w,needsMask:X,maskTextClass:S,maskTextSelector:x,skipChild:!1,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F,inlineImages:$,recordCanvas:j,preserveWhiteSpace:Q,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V,onStylesheetLoad:H,stylesheetLoadTimeout:q,keepIframeSrcFn:Y});u&&B(e,u)}},V),ne.type===le.Element&&"link"===ne.tagName&&"string"==typeof ne.attributes.rel&&("stylesheet"===ne.attributes.rel||"preload"===ne.attributes.rel&&"string"==typeof ne.attributes.href&&"css"===xr(ne.attributes.href))&&function Wi(e,a,u){let m,b=!1;try{m=e.sheet}catch{return}if(m)return;const w=setTimeout(()=>{b||(a(),b=!0)},u);e.addEventListener("load",()=>{clearTimeout(w),b=!0,a()})}(e,()=>{if(H){const a=Se(e,{doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:X,maskTextClass:S,maskTextSelector:x,skipChild:!1,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F,inlineImages:$,recordCanvas:j,preserveWhiteSpace:Q,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V,onStylesheetLoad:H,stylesheetLoadTimeout:q,keepIframeSrcFn:Y});a&&H(e,a)}},q),ne}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:{}},Oe=String,Rr=function(){return{isColorSupported:!1,reset:Oe,bold:Oe,dim:Oe,italic:Oe,underline:Oe,inverse:Oe,hidden:Oe,strikethrough:Oe,black:Oe,red:Oe,green:Oe,yellow:Oe,blue:Oe,magenta:Oe,cyan:Oe,white:Oe,gray:Oe,bgBlack:Oe,bgRed:Oe,bgGreen:Oe,bgYellow:Oe,bgBlue:Oe,bgMagenta:Oe,bgCyan:Oe,bgWhite:Oe,blackBright:Oe,redBright:Oe,greenBright:Oe,yellowBright:Oe,blueBright:Oe,magentaBright:Oe,cyanBright:Oe,whiteBright:Oe,bgBlackBright:Oe,bgRedBright:Oe,bgGreenBright:Oe,bgYellowBright:Oe,bgBlueBright:Oe,bgMagentaBright:Oe,bgCyanBright:Oe,bgWhiteBright:Oe}};Ie.exports=Rr(),Ie.exports.createColors=Rr;var Ee=Ie.exports;const Me=$i(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Te=Ee,Le=Me,Ae=class Lr extends Error{constructor(e,a,u,m,b,w){super(e),this.name="CssSyntaxError",this.reason=e,b&&(this.file=b),m&&(this.source=m),w&&(this.plugin=w),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=Te.isColorSupported);let n=e=>e,r=e=>e,i=e=>e;if(e){let{bold:e,gray:a,red:u}=Te.createColors(!0);r=a=>e(u(a)),n=e=>a(e),Le&&(i=e=>Le(e))}let u=a.split(/\r?\n/),m=Math.max(this.line-3,0),b=Math.min(this.line+2,u.length),w=String(b).length;return u.slice(m,b).map((e,a)=>{let u=m+1+a,b=" "+(" "+u).slice(-w)+" | ";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),w=e.slice(u,m),S=n(b.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,a-1)).replace(/[^\t]/g," ");return r(">")+n(b)+i(w)+"\n "+S+r("^")}let a=n(b.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(b)+i(e)+"\n "+a+r("^")}return" "+n(b)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var De=Ae;Ae.default=Ae;const je={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Ue=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 b=(e.raws.between||"")+(a?";":"");this.builder(u+m+b,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,b=0;for(;m&&"root"!==m.type;)b+=1,m=m.parent;if(u.includes("\n")){let a=this.raw(e,null,"indent");if(a.length)for(let e=0;e<b;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 b=e.nodes[m],w=this.raw(b,"before");w&&this.builder(w),this.stringify(b,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 b=e.parent;if("before"===u&&(!b||"root"===b.type&&b.first===e||b&&"document"===b.type))return"";if(!b)return je[u];let w=e.root();if(w.rawCache||(w.rawCache={}),typeof w.rawCache[u]<"u")return w.rawCache[u];if("before"===u||"after"===u)return this.beforeAfter(e,u);{let b="raw"+function Ki(e){return e[0].toUpperCase()+e.slice(1)}(u);this[b]?m=this[b](w,e):w.walk(e=>{if(m=e.raws[a],typeof m<"u")return!1})}return typeof m>"u"&&(m=je[u]),w.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=Ue;Ue.default=Ue;let Ve=Be;function ks(e,a){new Ve(a).stringify(e)}var Ge=ks;ks.default=ks;var He={};He.isClean=Symbol("isClean"),He.my=Symbol("my");let qe=De,Ye=Be,Je=Ge,{isClean:Xe,my:Qe}=He;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 b=e[m],w=typeof b;"parent"===m&&"object"===w?a&&(u[m]=a):"source"===m?u[m]=b:Array.isArray(b)?u[m]=b.map(e=>Cs(e,u)):("object"===w&&null!==b&&(b=Cs(b)),u[m]=b)}return u}function Pe(e,a){if(a&&typeof a.offset<"u")return a.offset;let u=1,m=1,b=0;for(let w=0;w<e.length;w++){if(m===a.line&&u===a.column){b=w;break}"\n"===e[w]?(u=1,m+=1):u+=1}return b}let et=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[Xe]=!1,this[Qe]=!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 qe(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[Xe]=!0}markDirty(){if(this[Xe]){this[Xe]=!1;let e=this;for(;e=e.parent;)e[Xe]=!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,b=Pe(m,this.source.start),w=b+e;for(let e=b;e<w;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,b=m.slice(Pe(m,this.source.start),Pe(m,this.source.end)).indexOf(e.word);-1!==b&&(a=this.positionInside(b),u=this.positionInside(b+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 Ye).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 b=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 w=a.get(m.input);null==w&&(w=b,a.set(m.input,b),b++),u[e]={end:m.end,inputId:w,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=Je){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 nt=et;et.default=et;let st=nt,ot=class extends st{constructor(e){super(e),this.type="comment"}};var it=ot;ot.default=ot;let at=nt,lt=class extends at{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 ct=lt;lt.default=lt;let ut,pt,dt,ht,gt=it,yt=ct,bt=nt,{isClean:wt,my:vt}=He;function _r(e){return e.map(e=>(e.nodes&&(e.nodes=_r(e.nodes)),delete e.source,e))}function Wr(e){if(e[wt]=!1,e.proxyOf.nodes)for(let a of e.proxyOf.nodes)Wr(a)}let St=class zr extends bt{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),b=this.normalize(a,this.proxyOf.nodes[m]).reverse();m=this.index(e);for(let e of b)this.proxyOf.nodes.splice(m+1,0,e);for(let e in this.indexes)u=this.indexes[e],m<u&&(this.indexes[e]=u+b.length);return this.markDirty(),this}insertBefore(e,a){let u,m=this.index(e),b=0===m&&"prepend",w=this.normalize(a,this.proxyOf.nodes[m],b).reverse();m=this.index(e);for(let e of w)this.proxyOf.nodes.splice(m,0,e);for(let e in this.indexes)u=this.indexes[e],m<=u&&(this.indexes[e]=u+w.length);return this.markDirty(),this}normalize(e,a){if("string"==typeof e)e=_r(pt(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 yt(e)]}else if(e.selector||e.selectors)e=[new ht(e)];else if(e.name)e=[new ut(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new gt(e)]}return e.map(e=>(e[vt]||zr.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[wt]&&Wr(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=>{pt=e},St.registerRule=e=>{ht=e},St.registerAtRule=e=>{ut=e},St.registerRoot=e=>{dt=e};var kt=St;St.default=St,St.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,ut.prototype):"rule"===e.type?Object.setPrototypeOf(e,ht.prototype):"decl"===e.type?Object.setPrototypeOf(e,yt.prototype):"comment"===e.type?Object.setPrototypeOf(e,gt.prototype):"root"===e.type&&Object.setPrototypeOf(e,dt.prototype),e[vt]=!0,e.nodes&&e.nodes.forEach(e=>{St.rebuild(e)})};let xt=kt,Ct=class extends xt{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 It=Ct;Ct.default=Ct,xt.registerAtRule(Ct);let Et,Mt,Rt=kt,Lt=class extends Rt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Et(new Mt,this,e).stringify()}};Lt.registerLazyResult=e=>{Et=e},Lt.registerProcessor=e=>{Mt=e};var Dt=Lt;Lt.default=Lt;var Ft={nanoid:(e=21)=>{let a="",u=0|e;for(;u--;)a+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return a}};let{existsSync:jt,readFileSync:Ut}=Me,{dirname:Wt,join:Bt}=Me,{SourceMapConsumer:Vt,SourceMapGenerator:Ht}=Me;let Kt=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=Wt(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new Vt(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=Wt(e),jt(e))return this.mapFile=e,Ut(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 Vt)return Ht.fromSourceMap(a).toString();if(a instanceof Ht)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=Bt(Wt(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 Jt=Kt;Kt.default=Kt;let{nanoid:Xt}=Ft,{isAbsolute:Qt,resolve:en}=Me,{SourceMapConsumer:tn,SourceMapGenerator:nn}=Me,{fileURLToPath:rn,pathToFileURL:sn}=Me,on=De,an=Jt,ln=Me,cn=Symbol("fromOffsetCache"),un=!(!tn||!nn),pn=!(!en||!Qt),dn=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&&(!pn||/^\w+:\/\//.test(a.from)||Qt(a.from)?this.file=a.from:this.file=en(a.from)),pn&&un){let e=new an(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 "+Xt(6)+">"),this.map&&(this.map.file=this.from)}error(e,a,u,m={}){let b,w,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);w=e.line,b=e.col}else w=m.line,b=m.column}else if(!u){let e=this.fromOffset(a);a=e.line,u=e.col}let x=this.origin(a,u,w,b);return S=x?new on(e,void 0===x.endLine?x.line:{column:x.column,line:x.line},void 0===x.endLine?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,m.plugin):new on(e,void 0===w?a:{column:u,line:a},void 0===w?u:{column:b,line:w},this.css,this.file,m.plugin),S.input={column:u,endColumn:b,endLine:w,line:a,source:this.css},this.file&&(sn&&(S.input.url=sn(this.file).toString()),S.input.file=this.file),S}fromOffset(e){let a,u;if(this[cn])u=this[cn];else{let e=this.css.split("\n");u=new Array(e.length);let a=0;for(let m=0,b=e.length;m<b;m++)u[m]=a,a+=e[m].length+1;this[cn]=u}a=u[u.length-1];let m=0;if(e>=a)m=u.length-1;else{let a,b=u.length-2;for(;m<b;)if(a=m+(b-m>>1),e<u[a])b=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:en(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,a,u,m){if(!this.map)return!1;let b,w,S=this.map.consumer(),x=S.originalPositionFor({column:a,line:e});if(!x.source)return!1;"number"==typeof u&&(b=S.originalPositionFor({column:m,line:u})),w=Qt(x.source)?sn(x.source):new URL(x.source,this.map.consumer().sourceRoot||sn(this.map.mapFile));let C={column:x.column,endColumn:b&&b.column,endLine:b&&b.line,line:x.line,url:w.toString()};if("file:"===w.protocol){if(!rn)throw new Error("file: protocol is not available in this PostCSS build");C.file=rn(w)}let I=S.sourceContentFor(x.source);return I&&(C.source=I),C}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 hn=dn;dn.default=dn,ln&&ln.registerInput&&ln.registerInput(dn);let fn,mn,gn=kt,yn=class extends gn{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 fn(new mn,this,e).stringify()}};yn.registerLazyResult=e=>{fn=e},yn.registerProcessor=e=>{mn=e};var bn=yn;yn.default=yn,gn.registerRoot(yn);let wn={comma:e=>wn.split(e,[","],!0),space(e){let a=[" ","\n","\t"];return wn.split(e,a)},split(e,a,u){let m=[],b="",w=!1,S=0,x=!1,C="",I=!1;for(let u of e)I?I=!1:"\\"===u?I=!0:x?u===C&&(x=!1):'"'===u||"'"===u?(x=!0,C=u):"("===u?S+=1:")"===u?S>0&&(S-=1):0===S&&a.includes(u)&&(w=!0),w?(""!==b&&m.push(b.trim()),b="",w=!1):b+=u;return(u||""!==b)&&m.push(b.trim()),m}};var Sn=wn;wn.default=wn;let In=kt,On=Sn,En=class extends In{get selectors(){return On.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 Mn=En;En.default=En,In.registerRule(En);let Tn=It,Rn=it,_n=ct,Ln=hn,Pn=Jt,Nn=bn,An=Mn;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__:Ln.prototype};u.map&&(u.map={...u.map,__proto__:Pn.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 Nn(m);if("decl"===m.type)return new _n(m);if("rule"===m.type)return new An(m);if("comment"===m.type)return new Rn(m);if("atrule"===m.type)return new Tn(m);throw new Error("Unknown node type: "+e.type)}var Dn=Ze;Ze.default=Ze;let{dirname:Fn,relative:jn,resolve:Un,sep:zn}=Me,{SourceMapConsumer:Wn,SourceMapGenerator:Bn}=Me,{pathToFileURL:Vn}=Me,Zn=hn,qn=!(!Wn||!Bn),Kn=!!(Fn&&Un&&jn&&zn);var Qn=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||Fn(e.file);!1===this.mapOpts.sourcesContent?(a=new Wn(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(),Kn&&qn&&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=Bn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Bn({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 Bn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,a,u=1,m=1,b="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(S,x,C)=>{if(this.css+=S,x&&"end"!==C&&(w.generated.line=u,w.generated.column=m-1,x.source&&x.source.start?(w.source=this.sourcePath(x),w.original.line=x.source.start.line,w.original.column=x.source.start.column-1,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,this.map.addMapping(w))),a=S.match(/\n/g),a?(u+=a.length,e=S.lastIndexOf("\n"),m=S.length-e):m+=S.length,x&&"start"!==C){let e=x.parent||{raws:{}};("decl"!==x.type&&("atrule"!==x.type||x.nodes)||x!==e.last||e.raws.semicolon)&&(x.source&&x.source.end?(w.source=this.sourcePath(x),w.original.line=x.source.end.line,w.original.column=x.source.end.column-1,w.generated.line=u,w.generated.column=m-2,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,w.generated.line=u,w.generated.column=m-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 a=this.memoizedPaths.get(e);if(a)return a;let u=this.opts.to?Fn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(u=Fn(Un(u,this.mapOpts.annotation)));let m=jn(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 Zn(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(Vn){let a=Vn(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;"\\"===zn&&(e=e.replace(/\\/g,"/"));let u=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,u),u}};const nr=/[\t\n\f\r "#'()/;[\\\]{}]/g,rr=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,sr=/.[\r\n"'(/\\]/,or=/[\da-f]/i;let ir=It,ar=it,lr=ct,cr=bn,ur=Mn,Xa=function(e,a={}){let u,m,b,w,S,x,C,I,O,E,_=e.css.valueOf(),D=a.ignoreErrors,F=_.length,$=0,j=[],U=[];function y2(a){throw e.error("Unclosed "+a,$)}return{back:function A(e){U.push(e)},endOfFile:function v(){return 0===U.length&&$>=F},nextToken:function P2(e){if(U.length)return U.pop();if($>=F)return;let a=!!e&&e.ignoreUnclosed;switch(u=_.charCodeAt($),u){case 10:case 32:case 9:case 13:case 12:w=$;do{w+=1,u=_.charCodeAt(w)}while(32===u||10===u||9===u||13===u||12===u);x=["space",_.slice($,w)],$=w-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(u);x=[e,e,$];break}case 40:if(E=j.length?j.pop()[1]:"",O=_.charCodeAt($+1),"url"===E&&39!==O&&34!==O&&32!==O&&10!==O&&9!==O&&12!==O&&13!==O){w=$;do{if(C=!1,w=_.indexOf(")",w+1),-1===w){if(D||a){w=$;break}y2("bracket")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["brackets",_.slice($,w+1),$,w],$=w}else w=_.indexOf(")",$+1),m=_.slice($,w+1),-1===w||sr.test(m)?x=["(","(",$]:(x=["brackets",m,$,w],$=w);break;case 39:case 34:S=39===u?"'":'"',w=$;do{if(C=!1,w=_.indexOf(S,w+1),-1===w){if(D||a){w=$+1;break}y2("string")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["string",_.slice($,w+1),$,w],$=w;break;case 64:nr.lastIndex=$+1,nr.test(_),w=0===nr.lastIndex?_.length-1:nr.lastIndex-2,x=["at-word",_.slice($,w+1),$,w],$=w;break;case 92:for(w=$,b=!0;92===_.charCodeAt(w+1);)w+=1,b=!b;if(u=_.charCodeAt(w+1),b&&47!==u&&32!==u&&10!==u&&9!==u&&13!==u&&12!==u&&(w+=1,or.test(_.charAt(w)))){for(;or.test(_.charAt(w+1));)w+=1;32===_.charCodeAt(w+1)&&(w+=1)}x=["word",_.slice($,w+1),$,w],$=w;break;default:47===u&&42===_.charCodeAt($+1)?(w=_.indexOf("*/",$+2)+1,0===w&&(D||a?w=_.length:y2("comment")),x=["comment",_.slice($,w+1),$,w],$=w):(rr.lastIndex=$+1,rr.test(_),w=0===rr.lastIndex?_.length-1:rr.lastIndex-2,x=["word",_.slice($,w+1),$,w],j.push(x),$=w)}return $++,x},position:function S2(){return $}}};const pr={empty:!0,space:!0};var dr=class{constructor(e){this.input=e,this.root=new cr,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 ir;a.name=e[1].slice(1),""===a.name&&this.unnamedAtrule(a,e),this.init(a,e[2]);let u,m,b,w=!1,S=!1,x=[],C=[];for(;!this.tokenizer.endOfFile();){if(u=(e=this.tokenizer.nextToken())[0],"("===u||"["===u?C.push("("===u?")":"]"):"{"===u&&C.length>0?C.push("}"):u===C[C.length-1]&&C.pop(),0===C.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(x.length>0){for(b=x.length-1,m=x[b];m&&"space"===m[0];)m=x[--b];m&&(a.source.end=this.getPosition(m[3]||m[2]),a.source.end.offset++)}this.end(e);break}x.push(e)}else x.push(e);if(this.tokenizer.endOfFile()){w=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(a.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(a,"params",x),w&&(e=x[x.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 b=a-1;b>=0&&(u=e[b],"space"===u[0]||(m+=1,2!==m));b--);throw this.input.error("Missed semicolon","word"===u[0]?u[3]+1:u[2])}colon(e){let a,u,m,b=0;for(let[w,S]of e.entries()){if(u=S,m=u[0],"("===m&&(b+=1),")"===m&&(b-=1),0===b&&":"===m){if(a){if("word"===a[0]&&"progid"===a[1])continue;return w}this.doubleColon(u)}a=u}return!1}comment(e){let a=new ar;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 lr;this.init(u,e[0][2]);let m,b=e[e.length-1];for(";"===b[0]&&(this.semicolon=!0,e.pop()),u.source.end=this.getPosition(b[3]||b[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 w,S=[];for(;e.length&&(w=e[0][0],"space"===w||"comment"===w);)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),b="";for(let e=a;e>0;e--){let a=m[e][0];if(b.trim().startsWith("!")&&"space"!==a)break;b=m.pop()[1]+b}b.trim().startsWith("!")&&(u.important=!0,u.raws.important=b,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 ur;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,b=null,w=[],S=e[1].startsWith("--"),x=[],C=e;for(;C;){if(u=C[0],x.push(C),"("===u||"["===u)b||(b=C),w.push("("===u?")":"]");else if(S&&m&&"{"===u)b||(b=C),w.push("}");else if(0===w.length){if(";"===u){if(m)return void this.decl(x,S);break}if("{"===u)return void this.rule(x);if("}"===u){this.tokenizer.back(x.pop()),a=!0;break}":"===u&&(m=!0)}else u===w[w.length-1]&&(w.pop(),0===w.length&&(b=null));C=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),w.length>0&&this.unclosedBracket(b),a&&m){if(!S)for(;x.length&&(C=x[x.length-1][0],"space"===C||"comment"===C);)this.tokenizer.back(x.pop());this.decl(x,S)}else this.unknownWord(x)}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 b,w,S,x,C=u.length,I="",O=!0;for(let e=0;e<C;e+=1)b=u[e],w=b[0],"space"!==w||e!==C-1||m?"comment"===w?(x=u[e-1]?u[e-1][0]:"empty",S=u[e+1]?u[e+1][0]:"empty",pr[x]||pr[S]||","===I.slice(-1)?O=!1:I+=b[1]):I+=b[1]:O=!1;if(!O){let m=u.reduce((e,a)=>e+a[1],"");e.raws[a]={raw:m,value:I}}e[a]=I}rule(e){e.pop();let a=new ur;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 hr=kt,fr=hn,mr=dr;function _t(e,a){let u=new fr(e,a),m=new mr(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 gr=_t;_t.default=_t,hr.registerParse(_t);let yr=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 wr=yr;yr.default=yr;let Sr=wr,Cr=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 Sr(e,a);return this.messages.push(u),u}warnings(){return this.messages.filter(e=>"warning"===e.type)}};var Tr=Cr;Cr.default=Cr;let Pr={};var so=function(e){Pr[e]||(Pr[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Nr=kt,Ar=Dt,Dr=Qn,Fr=gr,$r=Tr,jr=bn,Ur=Ge,{isClean:Br,my:Vr}=He,Gr=so;const Hr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Zr={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},qr={Once:!0,postcssPlugin:!0,prepare:!0};function Ne(e){return"object"==typeof e&&"function"==typeof e.then}function no(e){let a=!1,u=Hr[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[Br]=!1,e.nodes&&e.nodes.forEach(e=>Ps(e)),e}let Kr={},Yr=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 $r)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=Fr;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[Vr]&&Nr.rebuild(m)}else m=Ps(a);this.result=new $r(e,m,u),this.helpers={...Kr,postcss:Kr,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,b=a.split("."),w=m.split(".");(b[0]!==w[0]||parseInt(b[1])>parseInt(w[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(!Zr[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!qr[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(Ne(u))try{await u}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Br];){e[Br]=!0;let a=[Gn(e)];for(;a.length>0;){let e=this.visitTick(a);if(Ne(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 Ne(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=Ur;e.syntax&&(a=e.syntax.stringify),e.stringifier&&(a=e.stringifier),a.stringify&&(a=a.stringify);let u=new Dr(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(Ne(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Br];)e[Br]=!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||Gr("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(Ne(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,b]=m[a.visitorIndex];a.visitorIndex+=1,a.visitorIndex===m.length&&(a.visitors=[],a.visitorIndex=0),this.result.lastPlugin=e;try{return b(u.toProxy(),this.helpers)}catch(e){throw this.handleError(e,u)}}if(0!==a.iterator){let m,b=a.iterator;for(;m=u.nodes[u.indexes[b]];)if(u.indexes[b]+=1,!m[Br])return m[Br]=!0,void e.push(Gn(m));a.iterator=0,delete u.indexes[b]}let b=a.events;for(;a.eventIndex<b.length;){let e=b[a.eventIndex];if(a.eventIndex+=1,0===e)return void(u.nodes&&u.nodes.length&&(u[Br]=!0,a.iterator=u.getIterator()));if(this.listeners[e])return void(a.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Br]=!0;let a=no(e);for(let u of a)if(0===u)e.nodes&&e.each(e=>{e[Br]||this.walkSync(e)});else{let a=this.listeners[u];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};Yr.registerPostcss=e=>{Kr=e};var Jr=Yr;Yr.default=Yr,jr.registerLazyResult(Yr),Ar.registerLazyResult(Yr);let Xr=Qn,Qr=gr;const es=Tr;let ts=Ge,ns=so,rs=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=Qr;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,b=ts;this.result=new es(this._processor,m,this._opts),this.result.css=a;let w=this;Object.defineProperty(this.result,"root",{get:()=>w.root});let S=new Xr(b,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||ns("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 ss=rs;rs.default=rs;let os=Dt,as=Jr,ls=ss,cs=bn,us=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 as(this,e,a):new ls(this,e,a)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ps=us;us.default=us,cs.registerProcessor(us),os.registerProcessor(us);let ds=It,hs=it,ms=kt,gs=De,ys=ct,bs=Dt,ws=Dn,vs=hn,Ss=Jr,xs=Sn,Is=nt,Os=gr,Es=ps,Ms=Tr,Ts=bn,Rs=Mn,_s=Ge,Ls=wr;function L$1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Es(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 b=a(...u);return b.postcssPlugin=e,b.postcssVersion=(new Es).version,b}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=_s,L$1.parse=Os,L$1.fromJSON=ws,L$1.list=xs,L$1.comment=e=>new hs(e),L$1.atRule=e=>new ds(e),L$1.decl=e=>new ys(e),L$1.rule=e=>new Rs(e),L$1.root=e=>new Ts(e),L$1.document=e=>new bs(e),L$1.CssSyntaxError=gs,L$1.Declaration=ys,L$1.Container=ms,L$1.Processor=Es,L$1.Document=bs,L$1.Comment=hs,L$1.Warning=Ls,L$1.AtRule=ds,L$1.Result=Ms,L$1.Input=vs,L$1.Rule=Rs,L$1.Root=Ts,L$1.Node=Is,Ss.registerPostcss(L$1);var Ns=L$1;L$1.default=L$1;const As=Yi(Ns);As.stringify,As.fromJSON,As.plugin,As.parse,As.list,As.document,As.comment,As.atRule,As.rule,As.decl,As.root,As.CssSyntaxError,As.Declaration,As.Container,As.Processor,As.Document,As.Comment,As.Warning,As.AtRule,As.Result,As.Input,As.Rule,As.Root,As.Node;var $s=(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))($s||{}),js=(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))(js||{}),Ws=(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))(Ws||{}),Vs=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Vs||{}),Gs=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Gs||{}),Hs=(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))(Hs||{});function G(e,a,u=document){const m={capture:!0,passive:!0};return u.addEventListener(e,a,m),()=>u.removeEventListener(e,a,m)}const Zs="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 qs={map:{},getId:()=>(console.error(Zs),-1),getNode:()=>(console.error(Zs),null),removeNodeFromMap(){console.error(Zs)},has:()=>(console.error(Zs),!1),reset(){console.error(Zs)}};function $e(e,a,u={}){let m=null,b=0;return function(...w){const S=Date.now();!b&&!1===u.leading&&(b=S);const x=a-(S-b),C=this;x<=0||x>a?(m&&(clearTimeout(m),m=null),b=S,e.apply(C,w)):!m&&!1!==u.trailing&&(m=setTimeout(()=>{b=!1===u.leading?0:Date.now(),m=null,e.apply(C,w)},x))}}function qt(e,a,u,m,b=window){const w=b.Object.getOwnPropertyDescriptor(e,a);return b.Object.defineProperty(e,a,m?u:{set(e){setTimeout(()=>{u.set.call(this,e)},0),w&&w.set&&w.set.call(this,e)}}),()=>qt(e,a,w||{},!0)}function Re(e,a,u){try{if(!(a in e))return()=>{};const m=e[a],b=u(m);return"function"==typeof b&&(b.prototype=b.prototype||{},Object.defineProperties(b,{__rrweb_original__:{enumerable:!1,value:m}})),e[a]=b,()=>{e[a]=m}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(qs=new Proxy(qs,{get:(e,a,u)=>("map"===a&&console.error(Zs),Reflect.get(e,a,u))}));let Ks,Ys=Date.now;function po(e){var a,u,m,b,w,S;const x=e.document;return{left:x.scrollingElement?x.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==x?void 0:x.documentElement.scrollLeft)||(null==(u=null==(a=null==x?void 0:x.body)?void 0:a.parentElement)?void 0:u.scrollLeft)||(null==(m=null==x?void 0:x.body)?void 0:m.scrollLeft)||0,top:x.scrollingElement?x.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==x?void 0:x.documentElement.scrollTop)||(null==(w=null==(b=null==x?void 0:x.body)?void 0:b.parentElement)?void 0:w.scrollTop)||(null==(S=null==x?void 0:x.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 b=go(e);if(!b)return!1;try{if("string"==typeof a){if(b.classList.contains(a)||m&&null!==b.closest("."+a))return!0}else if(Nt(b,a,m))return!0}catch{}return!(!u||!(b.matches(u)||m&&null!==b.closest(u)))}function fs(e,a,u){return!("TITLE"!==e.tagName||!u.headTitleMutations)||-2===a.getId(e)}function yo(e,a){if(We(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 Ds(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())||(Ys=()=>(new Date).getTime());class _l{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 zl(e){const a=e.ownerDocument;if(!a)return!1;const u=function Wl(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)||zl(e))}const M=e=>Ks?(...a)=>{try{return e(...a)}catch(e){if(Ks&&!0===Ks(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 b=u||this.getIdToRemoteIdMap(e),w=m||this.getRemoteIdToIdMap(e);let S=b.get(a);return S||(S=this.generateIdFn(),b.set(a,S),w.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 $s.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:$s.IncrementalSnapshot,data:{source:js.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:a.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case $s.Meta:case $s.Load:case $s.DomContentLoaded:return!1;case $s.Plugin:return a;case $s.Custom:return this.replaceIds(a.data.payload,e,["id","parentId","previousId","nextId"]),a;case $s.IncrementalSnapshot:switch(a.data.source){case js.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 js.Drag:case js.TouchMove:case js.MouseMove:return a.data.positions.forEach(a=>{this.replaceIds(a,e,["id"])}),a;case js.ViewportResize:return!1;case js.MediaInteraction:case js.MouseInteraction:case js.Scroll:case js.CanvasMutation:case js.Input:return this.replaceIds(a.data,e,["id"]),a;case js.StyleSheetRule:case js.StyleDeclaration:return this.replaceIds(a.data,e,["id"]),this.replaceStyleIds(a.data,e,["styleId"]),a;case js.Font:return a;case js.Selection:return a.data.ranges.forEach(a=>{this.replaceIds(a,e,["start","end"])}),a;case js.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 b of m)!Array.isArray(a[b])&&"number"!=typeof a[b]||(Array.isArray(a[b])?a[b]=e.getIds(u,a[b]):a[b]=e.getId(u,a[b]));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!==le.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 b=We(m.parentNode)?this.mirror.getId(So(m)):this.mirror.getId(m.parentNode),w=r(m);if(-1===b||-1===w)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:b,nextId:w,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 b={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};!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))}),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 b=this.attributeMap.get(e.target);if("IFRAME"===a.tagName&&"src"===u&&!this.keepIframeSrcFn(m)){if(a.contentDocument)return;u="rr_src"}if(b||(b={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(b),this.attributeMap.set(e.target,b)),"type"===u&&"INPUT"===a.tagName&&"password"===(e.oldValue||"").toLowerCase()&&a.setAttribute("data-rr-is-password","true"),!Or(a.tagName,u)&&(b.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),w=a.style.getPropertyPriority(e);m!==u.style.getPropertyValue(e)||w!==u.style.getPropertyPriority(e)?b.styleDiff[e]=""===w?m:[m,w]:b._unchangedStyles[e]=[m,w]}for(const e of Array.from(u.style))""===a.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(a=>this.genAdds(a,e.target)),e.removedNodes.forEach(a=>{const u=this.mirror.getId(a),m=We(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:!(!We(e.target)||!ze(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 Xs=[];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 b=new Zl;Xs.push(b),b.init(e);let w=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]&&(w=window[S]);const x=new w(M(b.processMutations.bind(b)));return x.observe(a,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),x}function Xl({mouseInteractionCb:e,doc:a,mirror:u,blockClass:m,blockSelector:b,sampling:w}){if(!1===w.mouseInteraction)return()=>{};const S=!0===w.mouseInteraction||void 0===w.mouseInteraction?{}:w.mouseInteraction,x=[];let C=null;return Object.keys(Ws).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==S[e]).forEach(w=>{let S=fe(w);const I=(a=>w=>{const S=tt(w);if(Z(S,m,b,!0))return;let x=null,I=a;if("pointerType"in w){switch(w.pointerType){case"mouse":x=Vs.Mouse;break;case"touch":x=Vs.Touch;break;case"pen":x=Vs.Pen}x===Vs.Touch?Ws[a]===Ws.MouseDown?I="TouchStart":Ws[a]===Ws.MouseUp&&(I="TouchEnd"):Vs.Pen}else Ds(w)&&(x=Vs.Touch);null!==x?(C=x,(I.startsWith("Touch")&&x===Vs.Touch||I.startsWith("Mouse")&&x===Vs.Mouse)&&(x=null)):Ws[a]===Ws.Click&&(x=C,C=null);const O=Ds(w)?w.changedTouches[0]:w;if(!O)return;const E=u.getId(S),{clientX:_,clientY:D}=O;M(e)({type:Ws[I],id:E,x:_,y:D,...null!==x&&{pointerType:x}})})(w);if(window.PointerEvent)switch(Ws[w]){case Ws.MouseDown:case Ws.MouseUp:S=S.replace("mouse","pointer");break;case Ws.TouchStart:case Ws.TouchEnd:return}x.push(G(S,I,a))}),M(()=>{x.forEach(e=>e())})}function xo({scrollCb:e,doc:a,mirror:u,blockClass:m,blockSelector:b,sampling:w}){return G("scroll",M($e(M(w=>{const S=tt(w);if(!S||Z(S,m,b,!0))return;const x=u.getId(S);if(S===a&&a.defaultView){const u=po(a.defaultView);e({id:x,x:u.left,y:u.top})}else e({id:x,x:S.scrollLeft,y:S.scrollTop})}),w.scroll||100)),a)}const Qs=["INPUT","TEXTAREA","SELECT"],eo=new WeakMap;function ql({deviceChangeCb:e}){const t=(a,u)=>{const m=a.device.productName?[a.device.productName]:["Unknown USB Device"];e({type:"USB",action:u,devices:m,timestamp:Date.now()})},s=(a,u)=>{const m=a.device.productName?[a.device.productName]:["Unknown HID Device"];e({type:"HID",action:u,devices:m,timestamp:Date.now()})},r=()=>{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)})},i=()=>{const a=navigator.onLine?"online":"offline";e({type:"Network",action:"status",status:a,timestamp:Date.now()})},a=[G("online",()=>{i()},window),G("offline",()=>{i()},window)];"usb"in navigator&&(navigator.usb.addEventListener("connect",e=>t(e,"connect")),navigator.usb.addEventListener("disconnect",e=>t(e,"disconnect"))),"hid"in navigator&&(navigator.hid.addEventListener("connect",e=>s(e,"connect")),navigator.hid.addEventListener("disconnect",e=>s(e,"disconnect"))),navigator.mediaDevices.addEventListener("devicechange",r);const u=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);return()=>{navigator.usb.removeEventListener("connect",t),navigator.usb.removeEventListener("disconnect",t),navigator.hid.removeEventListener("connect",s),navigator.hid.removeEventListener("disconnect",s),a.forEach(e=>e()),navigator.mediaDevices.removeEventListener("devicechange",r),clearInterval(u)}}function zt(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,b;return e?(e.ownerNode?m=a.getId(e.ownerNode):b=u.getId(e),{styleId:b,id:m}):{}}function Io({mirror:e,stylesheetManager:a},u){var m,b,w;let S=null;S="#document"===u.nodeName?e.getId(u):e.getId(u.host);const x="#document"===u.nodeName?null==(m=u.defaultView)?void 0:m.Document:null==(w=null==(b=u.ownerDocument)?void 0:b.defaultView)?void 0:w.ShadowRoot,C=null!=x&&x.prototype?Object.getOwnPropertyDescriptor(null==x?void 0:x.prototype,"adoptedStyleSheets"):void 0;return null!==S&&-1!==S&&x&&C?(Object.defineProperty(u,"adoptedStyleSheets",{configurable:C.configurable,enumerable:C.enumerable,get(){var e;return null==(e=C.get)?void 0:e.call(this)},set(e){var u;const m=null==(u=C.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:C.configurable,enumerable:C.enumerable,get:C.get,set:C.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:b,scrollCb:w,viewportResizeCb:S,inputCb:x,typingCb:C,deviceChangeCb:I,mediaInteractionCb:O,styleSheetRuleCb:E,styleDeclarationCb:_,canvasMutationCb:D,fontCb:F,selectionCb:$,customElementCb:j}=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),b(...e)},e.scrollCb=(...e)=>{a.scroll&&a.scroll(...e),w(...e)},e.viewportResizeCb=(...e)=>{a.viewportResize&&a.viewportResize(...e),S(...e)},e.inputCb=(...e)=>{a.input&&a.input(...e),x(...e)},e.typingCb=(...e)=>{a.typing&&a.typing(...e),C(...e)},e.deviceChangeCb=(...e)=>{a.device&&a.device(...e),I(...e)},e.mediaInteractionCb=(...e)=>{a.mediaInteaction&&a.mediaInteaction(...e),O(...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),D(...e)},e.fontCb=(...e)=>{a.font&&a.font(...e),F(...e)},e.selectionCb=(...e)=>{a.selection&&a.selection(...e),$(...e)},e.customElementCb=(...e)=>{a.customElement&&a.customElement(...e),j(...e)}}(e,a),e.recordDOM&&(m=Co(e,e.doc));const b=function $l({mousemoveCb:e,sampling:a,doc:u,mirror:m}){if(!1===a.mousemove)return()=>{};const b="number"==typeof a.mousemove?a.mousemove:50,w="number"==typeof a.mousemoveCallback?a.mousemoveCallback:500;let S,x=[];const C=$e(M(a=>{const u=Date.now()-S;e(x.map(e=>(e.timeOffset-=u,e)),a),x=[],S=null}),w),I=M($e(M(e=>{const a=tt(e),{clientX:u,clientY:b}=Ds(e)?e.changedTouches[0]:e;S||(S=Ys()),x.push({x:u,y:b,id:m.getId(a),timeOffset:Ys()-S}),C(typeof DragEvent<"u"&&e instanceof DragEvent?js.Drag:e instanceof MouseEvent?js.MouseMove:js.TouchMove)}),b,{trailing:!1})),O=[G("mousemove",I,u),G("touchmove",I,u),G("drag",I,u)];return M(()=>{O.forEach(e=>e())})}(e),w=Xl(e),S=xo(e),x=function Hl({viewportResizeCb:e},{win:a}){let u=-1,m=-1;const b=M($e(M(()=>{const a=fo(),b=mo();(u!==a||m!==b)&&(e({width:Number(b),height:Number(a)}),u=a,m=b)}),200));return G("resize",b,a)}(e,{win:u}),C=function Kl({inputCb:e,doc:a,mirror:u,blockClass:m,blockSelector:b,ignoreClass:w,ignoreSelector:S,maskInputOptions:x,maskInputFn:C,sampling:I,userTriggeredOnInput:O}){function p(e){let u=tt(e);const I=e.isTrusted,E=u&&u.tagName;if(u&&"OPTION"===E&&(u=u.parentElement),!u||!E||Qs.indexOf(E)<0||Z(u,m,b,!0)||u.classList.contains(w)||S&&u.matches(S))return;let _=u.value,D=!1;const F=Yt(u)||"",{value:$,masked:j}=Zt({element:u,maskInputOptions:x,tagName:E,type:F,value:_,maskInputFn:C});_=$,("radio"===F||"checkbox"===F)&&(D=u.checked),f(u,O?{text:_,isChecked:D,masked:j,userTriggered:I}:{text:_,isChecked:D,masked:j});const U=u.name;"radio"===F&&U&&D&&a.querySelectorAll(`input[type='radio'][name='${U}']`).forEach(e=>{if(e!==u){const a=e.value;f(e,O?{text:a,isChecked:!D,masked:j,userTriggered:!1}:{text:a,isChecked:!D,masked:j})}})}function f(a,m){const b=eo.get(a);if(!b||b.text!==m.text||b.isChecked!==m.isChecked||b.masked!==m.masked){eo.set(a,m);const b=u.getId(a);M(e)({...m,id:b})}}const E=("last"===I.input?["change"]:["input","change"]).map(e=>G(e,M(p),a)),_=a.defaultView;if(!_)return()=>{E.forEach(e=>e())};const D=_.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 D&&D.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),I=function Ql({typingCb:e,doc:a,maskInputOptions:u,maskInputFn:m}){const b=G("keydown",a=>{const b=a.target;let w=!1;const S={key:a.key,code:a.code,altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey},x=b&&b.tagName,C=Yt(b)||"";let I=b.value;if(b&&("INPUT"==b.tagName||"TEXTAREA"==b.tagName)){const{value:e,masked:a}=Zt({element:b,maskInputOptions:u,tagName:x,type:C,value:I,maskInputFn:m});I=e,w=a}e({source:js.Typing,id:null==b?void 0:b.id,text:I,isMasked:w,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 b=Array.from((null==(a=e.parentNode)?void 0:a.children)||[]);b.length>1&&(m+=`:nth-child(${b.indexOf(e)+1})`),u.unshift(m),e=e.parentElement}return u.join(" > ")})(b),keyInfo:S})},a);return()=>{b()}}(e),O=ql(e),E=function su({mediaInteractionCb:e,blockClass:a,blockSelector:u,mirror:m,sampling:b,doc:w}){const S=M(w=>$e(M(b=>{const S=tt(b);if(!S||Z(S,a,u,!0))return;const{currentTime:x,volume:C,muted:I,playbackRate:O,loop:E}=S;e({type:w,id:m.getId(S),currentTime:x,volume:C,muted:I,playbackRate:O,loop:E})}),b.media||500)),x=[G("play",S(Hs.Play),w),G("pause",S(Hs.Pause),w),G("seeked",S(Hs.Seeked),w),G("volumechange",S(Hs.VolumeChange),w),G("ratechange",S(Hs.RateChange),w)];return M(()=>{x.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 b=m.CSSStyleSheet.prototype.insertRule;m.CSSStyleSheet.prototype.insertRule=new Proxy(b,{apply:M((m,b,w)=>{const[S,x]=w,{id:C,styleId:I}=ue(b,a,u.styleMirror);return(C&&-1!==C||I&&-1!==I)&&e({id:C,styleId:I,adds:[{rule:S,index:x}]}),m.apply(b,w)})});const w=m.CSSStyleSheet.prototype.deleteRule;let S,x;m.CSSStyleSheet.prototype.deleteRule=new Proxy(w,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,removes:[{index:S}]}),m.apply(b,w)})}),m.CSSStyleSheet.prototype.replace&&(S=m.CSSStyleSheet.prototype.replace,m.CSSStyleSheet.prototype.replace=new Proxy(S,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,replace:S}),m.apply(b,w)})})),m.CSSStyleSheet.prototype.replaceSync&&(x=m.CSSStyleSheet.prototype.replaceSync,m.CSSStyleSheet.prototype.replaceSync=new Proxy(x,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,replaceSync:S}),m.apply(b,w)})}));const C={};mt("CSSGroupingRule")?C.CSSGroupingRule=m.CSSGroupingRule:(mt("CSSMediaRule")&&(C.CSSMediaRule=m.CSSMediaRule),mt("CSSConditionRule")&&(C.CSSConditionRule=m.CSSConditionRule),mt("CSSSupportsRule")&&(C.CSSSupportsRule=m.CSSSupportsRule));const I={};return Object.entries(C).forEach(([m,b])=>{I[m]={insertRule:b.prototype.insertRule,deleteRule:b.prototype.deleteRule},b.prototype.insertRule=new Proxy(I[m].insertRule,{apply:M((m,b,w)=>{const[S,x]=w,{id:C,styleId:I}=ue(b.parentStyleSheet,a,u.styleMirror);return(C&&-1!==C||I&&-1!==I)&&e({id:C,styleId:I,adds:[{rule:S,index:[...zt(b),x||0]}]}),m.apply(b,w)})}),b.prototype.deleteRule=new Proxy(I[m].deleteRule,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b.parentStyleSheet,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,removes:[{index:[...zt(b),S]}]}),m.apply(b,w)})})}),M(()=>{m.CSSStyleSheet.prototype.insertRule=b,m.CSSStyleSheet.prototype.deleteRule=w,S&&(m.CSSStyleSheet.prototype.replace=S),x&&(m.CSSStyleSheet.prototype.replaceSync=x),Object.entries(C).forEach(([e,a])=>{a.prototype.insertRule=I[e].insertRule,a.prototype.deleteRule=I[e].deleteRule})})}(e,{win:u}),d3=Io(e,e.doc),g2=function tu({styleDeclarationCb:e,mirror:a,ignoreCSSAttributes:u,stylesheetManager:m},{win:b}){const w=b.CSSStyleDeclaration.prototype.setProperty;b.CSSStyleDeclaration.prototype.setProperty=new Proxy(w,{apply:M((b,S,x)=>{var C;const[I,O,E]=x;if(u.has(I))return w.apply(S,[I,O,E]);const{id:_,styleId:D}=ue(null==(C=S.parentRule)?void 0:C.parentStyleSheet,a,m.styleMirror);return(_&&-1!==_||D&&-1!==D)&&e({id:_,styleId:D,set:{property:I,value:O,priority:E},index:zt(S.parentRule)}),b.apply(S,x)})});const S=b.CSSStyleDeclaration.prototype.removeProperty;return b.CSSStyleDeclaration.prototype.removeProperty=new Proxy(S,{apply:M((b,w,x)=>{var C;const[I]=x;if(u.has(I))return S.apply(w,[I]);const{id:O,styleId:E}=ue(null==(C=w.parentRule)?void 0:C.parentStyleSheet,a,m.styleMirror);return(O&&-1!==O||E&&-1!==E)&&e({id:O,styleId:E,remove:{property:I},index:zt(w.parentRule)}),b.apply(w,x)})}),M(()=>{b.CSSStyleDeclaration.prototype.setProperty=w,b.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=[],b=new WeakMap,w=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 w(e,m,u);return b.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=b.get(u);a&&(e(a),b.delete(u))}),0),a.apply(this,[u])}});return m.push(()=>{u.FontFace=w}),m.push(S),M(()=>{m.forEach(e=>e())})}(e)));const _=function ru(e){const{doc:a,mirror:u,blockClass:m,blockSelector:b,selectionCb:w}=e;let S=!0;const x=M(()=>{const e=a.getSelection();if(!e||S&&null!=e&&e.isCollapsed)return;S=e.isCollapsed||!1;const x=[],C=e.rangeCount||0;for(let a=0;a<C;a++){const w=e.getRangeAt(a),{startContainer:S,startOffset:C,endContainer:I,endOffset:O}=w;Z(S,m,b,!0)||Z(I,m,b,!0)||x.push({start:u.getId(S),startOffset:C,end:u.getId(I),endOffset:O})}w({ranges:x})});return x(),G("selectionchange",x)}(e),D=function ou({doc:e,customElementCb:a}){const u=e.defaultView;return u&&u.customElements?Re(u.customElements,"define",function(e){return function(u,m,b){try{a({define:{name:u}})}catch{console.warn(`Custom element callback failed for ${u}`)}return e.apply(this,[u,m,b])}}):()=>{}}(e),F=[];for(const a of e.plugins)F.push(a.observer(a.callback,u,a.options));return M(()=>{Xs.forEach(e=>e.reset()),null==m||m.disconnect(),b(),w(),S(),x(),C(),I(),E(),f(),d3(),g2(),h(),_(),D(),O(),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 to="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",oo=typeof self<"u"&&self.Blob&&new Blob([(io=to,Uint8Array.from(atob(io),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var io;function uu(e){let a;try{if(a=oo&&(self.URL||self.webkitURL).createObjectURL(oo),!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,"+to,{name:null==e?void 0:e.name})}finally{a&&(self.URL||self.webkitURL).revokeObjectURL(a)}}for(var ao="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lo=typeof Uint8Array>"u"?[]:new Uint8Array(256),co=0;co<64;co++)lo[ao.charCodeAt(co)]=co;const uo=new Map;const Oo=(e,a,u)=>{if(!e||!Ro(e,a)&&"object"!=typeof e)return;const m=function pu(e,a){let u=uo.get(e);return u||(u=new Map,uo.set(e,u)),u.has(a)||u.set(a,[]),u.get(a)}(u,e.constructor.name);let b=m.indexOf(e);return-1===b&&(b=m.length,m.push(e)),b};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,b="";for(a=0;a<m;a+=3)b+=ao[u[a]>>2],b+=ao[(3&u[a])<<4|u[a+1]>>4],b+=ao[(15&u[a+1])<<2|u[a+2]>>6],b+=ao[63&u[a+2]];return m%3==2?b=b.substring(0,b.length-1)+"=":m%3==1&&(b=b.substring(0,b.length-2)+"=="),b}(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 b=[];try{const w=Re(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(b,...w){if(!Z(this,a,u,!0)){const e=function fu(e){return"experimental-webgl"===e?"webgl":e}(b);if("__context"in this||(this.__context=e),m&&["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 tr(e,a,u,m,b,w){const S=[],x=Object.getOwnPropertyNames(e);for(const C of x)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(C))try{if("function"!=typeof e[C])continue;const x=Re(e,C,function(e){return function(...S){const x=e.apply(this,S);if(Oo(x,w,this),"tagName"in this.canvas&&!Z(this.canvas,m,b,!0)){const e=Eo(S,w,this),m={type:a,property:C,args:e};u(this.canvas,m)}return x}});S.push(x)}catch{const m=qt(e,C,{set(e){u(this.canvas,{type:a,property:C,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:b,recordCanvas:w,dataURLOptions:S}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,w&&"all"===a&&this.initCanvasMutationObserver(u,m,b),w&&"number"==typeof a&&this.initCanvasFPSObserver(a,u,m,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,a,u,m,b){const w=er(a,u,m,!0),S=new Map,x=new uu;x.onmessage=e=>{const{id:a}=e.data;if(S.set(a,!1),!("base64"in e.data))return;const{base64:u,type:m,width:b,height:w}=e.data;this.mutationCb({id:a,type:Gs["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:m}]},0,0]}]})};const C=1e3/e;let I,O=0;const d3=e=>{O&&e-O<C||(O=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);x.postMessage({id:u,bitmap:m,width:e.width,height:e.height,dataURLOptions:b.dataURLOptions},[m])})),I=requestAnimationFrame(d3)};I=requestAnimationFrame(d3),this.resetObservers=()=>{w(),cancelAnimationFrame(I)}}initCanvasMutationObserver(e,a,u){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const m=er(e,a,u,!1),b=function du(e,a,u,m){const b=[],w=Object.getOwnPropertyNames(a.CanvasRenderingContext2D.prototype);for(const S of w)try{if("function"!=typeof a.CanvasRenderingContext2D.prototype[S])continue;const w=Re(a.CanvasRenderingContext2D.prototype,S,function(b){return function(...w){return Z(this.canvas,u,m,!0)||setTimeout(()=>{const u=Eo(w,a,this);e(this.canvas,{type:Gs["2D"],property:S,args:u})},0),b.apply(this,w)}});b.push(w)}catch{const u=qt(a.CanvasRenderingContext2D.prototype,S,{set(a){e(this.canvas,{type:Gs["2D"],property:S,args:[a],setter:!0})}});b.push(u)}return()=>{b.forEach(e=>e())}}(this.processMutation.bind(this),e,a,u),w=function mu(e,a,u,m){const b=[];return b.push(...tr(a.WebGLRenderingContext.prototype,Gs.WebGL,e,u,m,a)),typeof a.WebGL2RenderingContext<"u"&&b.push(...tr(a.WebGL2RenderingContext.prototype,Gs.WebGL2,e,u,m,a)),()=>{b.forEach(e=>e())}}(this.processMutation.bind(this),e,a,u);this.resetObservers=()=>{m(),b(),w()}}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:b}=u[0];this.mutationCb({id:a,type:b,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(!ze(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 b=e.call(this,m);return this.shadowRoot&&vo(this)&&u.addShadowRoot(this.shadowRoot,a),b}}))}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 _l),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 ho,Mo,_o,Po=!1;var No;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(No=e.contentWindow)?void 0:No.Array.from)||Array.from,document.body.removeChild(e)}}catch(io){console.debug("Unable to override Array.from",io)}const Ao=function Ci(){return new ce}();function ae(e={}){const{emit:a,checkoutEveryNms:u,checkoutEveryNth:m,blockClass:b="rr-block",blockSelector:w=null,ignoreClass:S="rr-ignore",ignoreSelector:x=null,maskTextClass:C="rr-mask",maskTextSelector:I=null,inlineStylesheet:O=!0,maskAllInputs:E,maskInputOptions:_,slimDOMOptions:D,maskInputFn:F,maskTextFn:$,hooks:j,packFn:U,sampling:B={},dataURLOptions:V={},mousemoveWait:H,recordDOM:q=!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:ne,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:se=new Set([]),errorHandler:oe}=e;!function Bl(e){Ks=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!==H&&void 0===B.mousemove&&(B.mousemove=H),Ao.reset();const pe=!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},de=!0===D||"all"===D?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===D,headMetaDescKeywords:"all"===D,headTitleMutations:"all"===D}:D||{};!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 he,me=0;const vn=e=>{for(const a of ne||[])a.eventProcessor&&(e=a.eventProcessor(e));return U&&!le&&(e=U(e)),e};ho=(e,b)=>{var w;const S=e;if(S.timestamp=Ys(),null!=(w=Xs[0])&&w.isFrozen()&&S.type!==$s.FullSnapshot&&!(S.type===$s.IncrementalSnapshot&&S.data.source===js.Mutation)&&Xs.forEach(e=>e.unfreeze()),ie)null==a||a(vn(S),b);else if(le){const e={type:"@sailfish-rrweb/rrweb",event:vn(S),origin:window.location.origin,isCheckout:b};window.parent.postMessage(e,"*")}if(S.type===$s.FullSnapshot)he=S,me=0;else if(S.type===$s.IncrementalSnapshot){if(S.data.source===js.Mutation&&S.data.isAttachIframe)return;me++;const e=m&&me>=m,a=u&&S.timestamp-he.timestamp>u;(e||a)&&Mo(!0)}};const rt=e=>{ho({type:$s.IncrementalSnapshot,data:{source:js.Mutation,...e}})},kn=e=>ho({type:$s.IncrementalSnapshot,data:{source:js.Scroll,...e}}),Cn=e=>ho({type:$s.IncrementalSnapshot,data:{source:js.CanvasMutation,...e}}),ge=new bu({mutationCb:rt,adoptedStyleSheetCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.AdoptedStyleSheet,...e}})}),ye=new Vl({mirror:Ao,mutationCb:rt,stylesheetManager:ge,recordCrossOriginIframes:J,wrappedEmit:ho});for(const e of ne||[])e.getMirror&&e.getMirror({nodeMirror:Ao,crossOriginIframeMirror:ye.crossOriginIframeMirror,crossOriginIframeStyleMirror:ye.crossOriginIframeStyleMirror});const be=new yu;_o=new gu({recordCanvas:Y,mutationCb:Cn,win:window,blockClass:b,blockSelector:w,mirror:Ao,sampling:B.canvas,dataURLOptions:V});const we=new wu({mutationCb:rt,scrollCb:kn,bypassOptions:{blockClass:b,blockSelector:w,maskTextClass:C,maskTextSelector:I,inlineStylesheet:O,maskInputOptions:pe,dataURLOptions:V,maskTextFn:$,maskInputFn:F,recordCanvas:Y,inlineImages:te,sampling:B,slimDOMOptions:de,iframeManager:ye,stylesheetManager:ge,canvasManager:_o,keepIframeSrcFn:re,processedNodeManager:be},mirror:Ao});Mo=(e=!1)=>{if(!q)return;ho({type:$s.Meta,data:{href:window.location.href,width:mo(),height:fo()}},e),ge.reset(),we.init(),Xs.forEach(e=>e.lock());const a=function Zi(e,a){const{mirror:u=new ce,blockClass:m="rr-block",blockSelector:b=null,maskTextClass:w="rr-mask",maskTextSelector:S=null,inlineStylesheet:x=!0,inlineImages:C=!1,recordCanvas:I=!1,maskAllInputs:O=!1,maskTextFn:E,maskInputFn:_,slimDOM:D=!1,dataURLOptions:F,preserveWhiteSpace:$,onSerialize:j,onIframeLoad:U,iframeLoadTimeout:B,onStylesheetLoad:V,stylesheetLoadTimeout:H,keepIframeSrcFn:q=()=>!1}=a||{};return Se(e,{doc:e,mirror:u,blockClass:m,blockSelector:b,maskTextClass:w,maskTextSelector:S,skipChild:!1,inlineStylesheet:x,maskInputOptions:!0===O?{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===O?{password:!0}:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:!0===D||"all"===D?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===D,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===D?{}:D,dataURLOptions:F,inlineImages:C,recordCanvas:I,preserveWhiteSpace:$,onSerialize:j,onIframeLoad:U,iframeLoadTimeout:B,onStylesheetLoad:V,stylesheetLoadTimeout:H,keepIframeSrcFn:q,newlyAddedElement:!1})}(document,{mirror:Ao,blockClass:b,blockSelector:w,maskTextClass:C,maskTextSelector:I,inlineStylesheet:O,maskAllInputs:pe,maskTextFn:$,maskInputFn:F,slimDOM:de,dataURLOptions:V,recordCanvas:Y,inlineImages:te,onSerialize:e=>{wo(e,Ao)&&ye.addIframe(e),bo(e,Ao)&&ge.trackLinkElement(e),Fs(e)&&we.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,a)=>{ye.attachIframe(e,a),we.observeAttachShadow(e)},onStylesheetLoad:(e,a)=>{ge.attachLinkElement(e,a)},keepIframeSrcFn:re});if(!a)return console.warn("Failed to snapshot the document");ho({type:$s.FullSnapshot,data:{node:a,initialOffset:po(window)}},e),Xs.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ge.adoptStyleSheets(document.adoptedStyleSheets,Ao.getId(document))};try{const e=[],K=e=>{var a;return M(au)({mutationCb:rt,mousemoveCb:(e,a)=>ho({type:$s.IncrementalSnapshot,data:{source:a,positions:e}}),mouseInteractionCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.MouseInteraction,...e}}),scrollCb:kn,viewportResizeCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.ViewportResize,...e}}),inputCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.Input,...e}}),mediaInteractionCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.MediaInteraction,...e}}),styleSheetRuleCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.StyleSheetRule,...e}}),styleDeclarationCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.StyleDeclaration,...e}}),canvasMutationCb:Cn,fontCb:e=>ho({type:$s.IncrementalSnapshot,data:{source:js.Font,...e}}),selectionCb:e=>{ho({type:$s.IncrementalSnapshot,data:{source:js.Selection,...e}})},customElementCb:e=>{ho({type:$s.IncrementalSnapshot,data:{source:js.CustomElement,...e}})},typingCb:e=>{ho({type:$s.IncrementalSnapshot,data:{...e}})},deviceChangeCb:e=>{ho({type:$s.Device,data:{...e}})},blockClass:b,ignoreClass:S,ignoreSelector:x,maskTextClass:C,maskTextSelector:I,maskInputOptions:pe,inlineStylesheet:O,sampling:B,recordDOM:q,recordCanvas:Y,inlineImages:te,userTriggeredOnInput:Q,collectFonts:ee,doc:e,maskInputFn:F,maskTextFn:$,keepIframeSrcFn:re,blockSelector:w,slimDOMOptions:de,dataURLOptions:V,mirror:Ao,iframeManager:ye,stylesheetManager:ge,shadowDomManager:we,processedNodeManager:be,canvasManager:_o,ignoreCSSAttributes:se,plugins:(null==(a=null==ne?void 0:ne.filter(e=>e.observer))?void 0:a.map(e=>({observer:e.observer,options:e.options,callback:a=>ho({type:$s.Plugin,data:{plugin:e.name,payload:a}})})))||[]},j)};ye.addLoadListener(a=>{try{e.push(K(a.contentDocument))}catch(e){console.warn(e)}});const W=()=>{Mo(),e.push(K(document)),Po=!0};return"interactive"===document.readyState||"complete"===document.readyState?W():(e.push(G("DOMContentLoaded",()=>{ho({type:$s.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&W()})),e.push(G("load",()=>{ho({type:$s.Load,data:{}}),"load"===X&&W()},window))),()=>{e.forEach(e=>e()),be.destroy(),Po=!1,function jl(){Ks=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(!Po)throw new Error("please add custom event after start recording");ho({type:$s.Custom,data:{tag:e,payload:a}})},ae.addSailfishEvent=(e,a)=>{if(!Po)throw new Error("please add Sailfish event after start recording");ho({type:e,data:{tag:"sailfish-zendesk-test-tag",payload:a}})},ae.freezePage=()=>{Xs.forEach(e=>e.freeze())},ae.takeFullSnapshot=e=>{if(!Po)throw new Error("please take full snapshot after start recording");Mo(e)},ae.mirror=Ao;var Do={exports:{}},Fo=String,Lo=function(){return{isColorSupported:!1,reset:Fo,bold:Fo,dim:Fo,italic:Fo,underline:Fo,inverse:Fo,hidden:Fo,strikethrough:Fo,black:Fo,red:Fo,green:Fo,yellow:Fo,blue:Fo,magenta:Fo,cyan:Fo,white:Fo,gray:Fo,bgBlack:Fo,bgRed:Fo,bgGreen:Fo,bgYellow:Fo,bgBlue:Fo,bgMagenta:Fo,bgCyan:Fo,bgWhite:Fo,blackBright:Fo,redBright:Fo,greenBright:Fo,yellowBright:Fo,blueBright:Fo,magentaBright:Fo,cyanBright:Fo,whiteBright:Fo,bgBlackBright:Fo,bgRedBright:Fo,bgGreenBright:Fo,bgYellowBright:Fo,bgBlueBright:Fo,bgMagentaBright:Fo,bgCyanBright:Fo,bgWhiteBright:Fo}};Do.exports=Lo(),Do.exports.createColors=Lo;var $o=Do.exports;const jo=vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let Uo=$o,Vo=jo,Go=class To extends Error{constructor(e,a,u,m,b,w){super(e),this.name="CssSyntaxError",this.reason=e,b&&(this.file=b),m&&(this.source=m),w&&(this.plugin=w),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=Uo.isColorSupported);let n=e=>e,r=e=>e,i=e=>e;if(e){let{bold:e,gray:a,red:u}=Uo.createColors(!0);r=a=>e(u(a)),n=e=>a(e),Vo&&(i=e=>Vo(e))}let u=a.split(/\r?\n/),m=Math.max(this.line-3,0),b=Math.min(this.line+2,u.length),w=String(b).length;return u.slice(m,b).map((e,a)=>{let u=m+1+a,b=" "+(" "+u).slice(-w)+" | ";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),w=e.slice(u,m),S=n(b.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,a-1)).replace(/[^\t]/g," ");return r(">")+n(b)+i(w)+"\n "+S+r("^")}let a=n(b.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(b)+i(e)+"\n "+a+r("^")}return" "+n(b)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ho=Go;Go.default=Go;const Zo={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let qo=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 b=(e.raws.between||"")+(a?";":"");this.builder(u+m+b,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,b=0;for(;m&&"root"!==m.type;)b+=1,m=m.parent;if(u.includes("\n")){let a=this.raw(e,null,"indent");if(a.length)for(let e=0;e<b;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 b=e.nodes[m],w=this.raw(b,"before");w&&this.builder(w),this.stringify(b,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 b=e.parent;if("before"===u&&(!b||"root"===b.type&&b.first===e||b&&"document"===b.type))return"";if(!b)return Zo[u];let w=e.root();if(w.rawCache||(w.rawCache={}),typeof w.rawCache[u]<"u")return w.rawCache[u];if("before"===u||"after"===u)return this.beforeAfter(e,u);{let b="raw"+function Iu(e){return e[0].toUpperCase()+e.slice(1)}(u);this[b]?m=this[b](w,e):w.walk(e=>{if(m=e.raws[a],typeof m<"u")return!1})}return typeof m>"u"&&(m=Zo[u]),w.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 Ko=qo;qo.default=qo;let Yo=Ko;function zs(e,a){new Yo(a).stringify(e)}var Jo=zs;zs.default=zs;var Xo={};Xo.isClean=Symbol("isClean"),Xo.my=Symbol("my");let Qo=Ho,ei=Ko,ti=Jo,{isClean:si,my:ii}=Xo;function Bs(e,a){let u=new e.constructor;for(let m in e){if(!Object.prototype.hasOwnProperty.call(e,m)||"proxyCache"===m)continue;let b=e[m],w=typeof b;"parent"===m&&"object"===w?a&&(u[m]=a):"source"===m?u[m]=b:Array.isArray(b)?u[m]=b.map(e=>Bs(e,u)):("object"===w&&null!==b&&(b=Bs(b)),u[m]=b)}return u}function Fe(e,a){if(a&&typeof a.offset<"u")return a.offset;let u=1,m=1,b=0;for(let w=0;w<e.length;w++){if(m===a.line&&u===a.column){b=w;break}"\n"===e[w]?(u=1,m+=1):u+=1}return b}let ai=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[si]=!1,this[ii]=!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=Bs(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 Qo(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[si]=!0}markDirty(){if(this[si]){this[si]=!1;let e=this;for(;e=e.parent;)e[si]=!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,b=Fe(m,this.source.start),w=b+e;for(let e=b;e<w;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,b=m.slice(Fe(m,this.source.start),Fe(m,this.source.end)).indexOf(e.word);-1!==b&&(a=this.positionInside(b),u=this.positionInside(b+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 ei).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 b=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 w=a.get(m.input);null==w&&(w=b,a.set(m.input,b),b++),u[e]={end:m.end,inputId:w,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=ti){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 li=ai;ai.default=ai;let ci=li,ui=class extends ci{constructor(e){super(e),this.type="comment"}};var pi=ui;ui.default=ui;let di=li,hi=class extends di{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 fi=hi;hi.default=hi;let mi,gi,yi,Ii,Mi=pi,Ti=fi,Ri=li,{isClean:Li,my:Pi}=Xo;function Wo(e){return e.map(e=>(e.nodes&&(e.nodes=Wo(e.nodes)),delete e.source,e))}function zo(e){if(e[Li]=!1,e.proxyOf.nodes)for(let a of e.proxyOf.nodes)zo(a)}let Ni=class Bo extends Ri{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),b=this.normalize(a,this.proxyOf.nodes[m]).reverse();m=this.index(e);for(let e of b)this.proxyOf.nodes.splice(m+1,0,e);for(let e in this.indexes)u=this.indexes[e],m<u&&(this.indexes[e]=u+b.length);return this.markDirty(),this}insertBefore(e,a){let u,m=this.index(e),b=0===m&&"prepend",w=this.normalize(a,this.proxyOf.nodes[m],b).reverse();m=this.index(e);for(let e of w)this.proxyOf.nodes.splice(m,0,e);for(let e in this.indexes)u=this.indexes[e],m<=u&&(this.indexes[e]=u+w.length);return this.markDirty(),this}normalize(e,a){if("string"==typeof e)e=Wo(gi(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 Ti(e)]}else if(e.selector||e.selectors)e=[new Ii(e)];else if(e.name)e=[new mi(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Mi(e)]}return e.map(e=>(e[Pi]||Bo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Li]&&zo(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)}))}};Ni.registerParse=e=>{gi=e},Ni.registerRule=e=>{Ii=e},Ni.registerAtRule=e=>{mi=e},Ni.registerRoot=e=>{yi=e};var Ai=Ni;Ni.default=Ni,Ni.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,mi.prototype):"rule"===e.type?Object.setPrototypeOf(e,Ii.prototype):"decl"===e.type?Object.setPrototypeOf(e,Ti.prototype):"comment"===e.type?Object.setPrototypeOf(e,Mi.prototype):"root"===e.type&&Object.setPrototypeOf(e,yi.prototype),e[Pi]=!0,e.nodes&&e.nodes.forEach(e=>{Ni.rebuild(e)})};let Hi=Ai,qi=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 Ji=qi;qi.default=qi,Hi.registerAtRule(qi);let Xi,Qi,ea=Ai,ta=class extends ea{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Xi(new Qi,this,e).stringify()}};ta.registerLazyResult=e=>{Xi=e},ta.registerProcessor=e=>{Qi=e};var na=ta;ta.default=ta;var ra={nanoid:(e=21)=>{let a="",u=0|e;for(;u--;)a+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return a}};let{existsSync:sa,readFileSync:oa}=jo,{dirname:ia,join:aa}=jo,{SourceMapConsumer:la,SourceMapGenerator:ca}=jo;let ua=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=ia(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new la(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 Bu(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=ia(e),sa(e))return this.mapFile=e,oa(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 la)return ca.fromSourceMap(a).toString();if(a instanceof ca)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=aa(ia(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 pa=ua;ua.default=ua;let{nanoid:ha}=ra,{isAbsolute:fa,resolve:ma}=jo,{SourceMapConsumer:ga,SourceMapGenerator:ya}=jo,{fileURLToPath:ba,pathToFileURL:wa}=jo,va=Ho,Sa=pa,ka=jo,xa=Symbol("fromOffsetCache"),Ca=!(!ga||!ya),Ia=!(!ma||!fa),Oa=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&&(!Ia||/^\w+:\/\//.test(a.from)||fa(a.from)?this.file=a.from:this.file=ma(a.from)),Ia&&Ca){let e=new Sa(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 "+ha(6)+">"),this.map&&(this.map.file=this.from)}error(e,a,u,m={}){let b,w,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);w=e.line,b=e.col}else w=m.line,b=m.column}else if(!u){let e=this.fromOffset(a);a=e.line,u=e.col}let x=this.origin(a,u,w,b);return S=x?new va(e,void 0===x.endLine?x.line:{column:x.column,line:x.line},void 0===x.endLine?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,m.plugin):new va(e,void 0===w?a:{column:u,line:a},void 0===w?u:{column:b,line:w},this.css,this.file,m.plugin),S.input={column:u,endColumn:b,endLine:w,line:a,source:this.css},this.file&&(wa&&(S.input.url=wa(this.file).toString()),S.input.file=this.file),S}fromOffset(e){let a,u;if(this[xa])u=this[xa];else{let e=this.css.split("\n");u=new Array(e.length);let a=0;for(let m=0,b=e.length;m<b;m++)u[m]=a,a+=e[m].length+1;this[xa]=u}a=u[u.length-1];let m=0;if(e>=a)m=u.length-1;else{let a,b=u.length-2;for(;m<b;)if(a=m+(b-m>>1),e<u[a])b=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:ma(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,a,u,m){if(!this.map)return!1;let b,w,S=this.map.consumer(),x=S.originalPositionFor({column:a,line:e});if(!x.source)return!1;"number"==typeof u&&(b=S.originalPositionFor({column:m,line:u})),w=fa(x.source)?wa(x.source):new URL(x.source,this.map.consumer().sourceRoot||wa(this.map.mapFile));let C={column:x.column,endColumn:b&&b.column,endLine:b&&b.line,line:x.line,url:w.toString()};if("file:"===w.protocol){if(!ba)throw new Error("file: protocol is not available in this PostCSS build");C.file=ba(w)}let I=S.sourceContentFor(x.source);return I&&(C.source=I),C}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 Ea=Oa;Oa.default=Oa,ka&&ka.registerInput&&ka.registerInput(Oa);let Ma,Ta,Ra=Ai,_a=class extends Ra{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 Ma(new Ta,this,e).stringify()}};_a.registerLazyResult=e=>{Ma=e},_a.registerProcessor=e=>{Ta=e};var La=_a;_a.default=_a,Ra.registerRoot(_a);let Pa={comma:e=>Pa.split(e,[","],!0),space(e){let a=[" ","\n","\t"];return Pa.split(e,a)},split(e,a,u){let m=[],b="",w=!1,S=0,x=!1,C="",I=!1;for(let u of e)I?I=!1:"\\"===u?I=!0:x?u===C&&(x=!1):'"'===u||"'"===u?(x=!0,C=u):"("===u?S+=1:")"===u?S>0&&(S-=1):0===S&&a.includes(u)&&(w=!0),w?(""!==b&&m.push(b.trim()),b="",w=!1):b+=u;return(u||""!==b)&&m.push(b.trim()),m}};var Na=Pa;Pa.default=Pa;let Aa=Ai,Da=Na,Fa=class extends Aa{get selectors(){return Da.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 $a=Fa;Fa.default=Fa,Aa.registerRule(Fa);let ja=Ji,Ua=pi,za=fi,Wa=Ea,Ba=pa,Va=La,Ga=$a;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__:Wa.prototype};u.map&&(u.map={...u.map,__proto__:Ba.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 Va(m);if("decl"===m.type)return new za(m);if("rule"===m.type)return new Ga(m);if("comment"===m.type)return new Ua(m);if("atrule"===m.type)return new ja(m);throw new Error("Unknown node type: "+e.type)}var Za=Ke;Ke.default=Ke;let{dirname:qa,relative:Ka,resolve:Ya,sep:Ja}=jo,{SourceMapConsumer:Qa,SourceMapGenerator:el}=jo,{pathToFileURL:tl}=jo,nl=Ea,rl=!(!Qa||!el),sl=!!(qa&&Ya&&Ka&&Ja);var ol=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||qa(e.file);!1===this.mapOpts.sourcesContent?(a=new Qa(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(),sl&&rl&&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=el.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new el({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 el({file:this.outputFile(),ignoreInvalidMapping:!0});let e,a,u=1,m=1,b="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(S,x,C)=>{if(this.css+=S,x&&"end"!==C&&(w.generated.line=u,w.generated.column=m-1,x.source&&x.source.start?(w.source=this.sourcePath(x),w.original.line=x.source.start.line,w.original.column=x.source.start.column-1,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,this.map.addMapping(w))),a=S.match(/\n/g),a?(u+=a.length,e=S.lastIndexOf("\n"),m=S.length-e):m+=S.length,x&&"start"!==C){let e=x.parent||{raws:{}};("decl"!==x.type&&("atrule"!==x.type||x.nodes)||x!==e.last||e.raws.semicolon)&&(x.source&&x.source.end?(w.source=this.sourcePath(x),w.original.line=x.source.end.line,w.original.column=x.source.end.column-1,w.generated.line=u,w.generated.column=m-2,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,w.generated.line=u,w.generated.column=m-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 a=this.memoizedPaths.get(e);if(a)return a;let u=this.opts.to?qa(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(u=qa(Ya(u,this.mapOpts.annotation)));let m=Ka(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 nl(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(tl){let a=tl(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;"\\"===Ja&&(e=e.replace(/\\/g,"/"));let u=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,u),u}};const il=/[\t\n\f\r "#'()/;[\\\]{}]/g,al=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,ll=/.[\r\n"'(/\\]/,cl=/[\da-f]/i;let ul=Ji,pl=pi,dl=fi,hl=La,fl=$a,kc=function(e,a={}){let u,m,b,w,S,x,C,I,O,E,_=e.css.valueOf(),D=a.ignoreErrors,F=_.length,$=0,j=[],U=[];function y2(a){throw e.error("Unclosed "+a,$)}return{back:function A(e){U.push(e)},endOfFile:function v(){return 0===U.length&&$>=F},nextToken:function P2(e){if(U.length)return U.pop();if($>=F)return;let a=!!e&&e.ignoreUnclosed;switch(u=_.charCodeAt($),u){case 10:case 32:case 9:case 13:case 12:w=$;do{w+=1,u=_.charCodeAt(w)}while(32===u||10===u||9===u||13===u||12===u);x=["space",_.slice($,w)],$=w-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(u);x=[e,e,$];break}case 40:if(E=j.length?j.pop()[1]:"",O=_.charCodeAt($+1),"url"===E&&39!==O&&34!==O&&32!==O&&10!==O&&9!==O&&12!==O&&13!==O){w=$;do{if(C=!1,w=_.indexOf(")",w+1),-1===w){if(D||a){w=$;break}y2("bracket")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["brackets",_.slice($,w+1),$,w],$=w}else w=_.indexOf(")",$+1),m=_.slice($,w+1),-1===w||ll.test(m)?x=["(","(",$]:(x=["brackets",m,$,w],$=w);break;case 39:case 34:S=39===u?"'":'"',w=$;do{if(C=!1,w=_.indexOf(S,w+1),-1===w){if(D||a){w=$+1;break}y2("string")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["string",_.slice($,w+1),$,w],$=w;break;case 64:il.lastIndex=$+1,il.test(_),w=0===il.lastIndex?_.length-1:il.lastIndex-2,x=["at-word",_.slice($,w+1),$,w],$=w;break;case 92:for(w=$,b=!0;92===_.charCodeAt(w+1);)w+=1,b=!b;if(u=_.charCodeAt(w+1),b&&47!==u&&32!==u&&10!==u&&9!==u&&13!==u&&12!==u&&(w+=1,cl.test(_.charAt(w)))){for(;cl.test(_.charAt(w+1));)w+=1;32===_.charCodeAt(w+1)&&(w+=1)}x=["word",_.slice($,w+1),$,w],$=w;break;default:47===u&&42===_.charCodeAt($+1)?(w=_.indexOf("*/",$+2)+1,0===w&&(D||a?w=_.length:y2("comment")),x=["comment",_.slice($,w+1),$,w],$=w):(al.lastIndex=$+1,al.test(_),w=0===al.lastIndex?_.length-1:al.lastIndex-2,x=["word",_.slice($,w+1),$,w],j.push(x),$=w)}return $++,x},position:function S2(){return $}}};const ml={empty:!0,space:!0};var gl=class{constructor(e){this.input=e,this.root=new hl,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 ul;a.name=e[1].slice(1),""===a.name&&this.unnamedAtrule(a,e),this.init(a,e[2]);let u,m,b,w=!1,S=!1,x=[],C=[];for(;!this.tokenizer.endOfFile();){if(u=(e=this.tokenizer.nextToken())[0],"("===u||"["===u?C.push("("===u?")":"]"):"{"===u&&C.length>0?C.push("}"):u===C[C.length-1]&&C.pop(),0===C.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(x.length>0){for(b=x.length-1,m=x[b];m&&"space"===m[0];)m=x[--b];m&&(a.source.end=this.getPosition(m[3]||m[2]),a.source.end.offset++)}this.end(e);break}x.push(e)}else x.push(e);if(this.tokenizer.endOfFile()){w=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(a.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(a,"params",x),w&&(e=x[x.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 b=a-1;b>=0&&(u=e[b],"space"===u[0]||(m+=1,2!==m));b--);throw this.input.error("Missed semicolon","word"===u[0]?u[3]+1:u[2])}colon(e){let a,u,m,b=0;for(let[w,S]of e.entries()){if(u=S,m=u[0],"("===m&&(b+=1),")"===m&&(b-=1),0===b&&":"===m){if(a){if("word"===a[0]&&"progid"===a[1])continue;return w}this.doubleColon(u)}a=u}return!1}comment(e){let a=new pl;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 dl;this.init(u,e[0][2]);let m,b=e[e.length-1];for(";"===b[0]&&(this.semicolon=!0,e.pop()),u.source.end=this.getPosition(b[3]||b[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 w,S=[];for(;e.length&&(w=e[0][0],"space"===w||"comment"===w);)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),b="";for(let e=a;e>0;e--){let a=m[e][0];if(b.trim().startsWith("!")&&"space"!==a)break;b=m.pop()[1]+b}b.trim().startsWith("!")&&(u.important=!0,u.raws.important=b,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 fl;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,b=null,w=[],S=e[1].startsWith("--"),x=[],C=e;for(;C;){if(u=C[0],x.push(C),"("===u||"["===u)b||(b=C),w.push("("===u?")":"]");else if(S&&m&&"{"===u)b||(b=C),w.push("}");else if(0===w.length){if(";"===u){if(m)return void this.decl(x,S);break}if("{"===u)return void this.rule(x);if("}"===u){this.tokenizer.back(x.pop()),a=!0;break}":"===u&&(m=!0)}else u===w[w.length-1]&&(w.pop(),0===w.length&&(b=null));C=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),w.length>0&&this.unclosedBracket(b),a&&m){if(!S)for(;x.length&&(C=x[x.length-1][0],"space"===C||"comment"===C);)this.tokenizer.back(x.pop());this.decl(x,S)}else this.unknownWord(x)}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 b,w,S,x,C=u.length,I="",O=!0;for(let e=0;e<C;e+=1)b=u[e],w=b[0],"space"!==w||e!==C-1||m?"comment"===w?(x=u[e-1]?u[e-1][0]:"empty",S=u[e+1]?u[e+1][0]:"empty",ml[x]||ml[S]||","===I.slice(-1)?O=!1:I+=b[1]):I+=b[1]:O=!1;if(!O){let m=u.reduce((e,a)=>e+a[1],"");e.raws[a]={raw:m,value:I}}e[a]=I}rule(e){e.pop();let a=new fl;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 yl=Ai,bl=Ea,wl=gl;function Gt(e,a){let u=new bl(e,a),m=new wl(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 vl=Gt;Gt.default=Gt,yl.registerParse(Gt);let Sl=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 kl=Sl;Sl.default=Sl;let xl=kl,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 xl(e,a);return this.messages.push(u),u}warnings(){return this.messages.filter(e=>"warning"===e.type)}};var Il=Cl;Cl.default=Cl;let Ol={};var ni=function(e){Ol[e]||(Ol[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let El=Ai,Ml=na,Tl=ol,Rl=vl,Ll=Il,Pl=La,Nl=Jo,{isClean:Al,my:Dl}=Xo,Jl=ni;const ec={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},tc={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},nc={Once:!0,postcssPlugin:!0,prepare:!0};function _e(e){return"object"==typeof e&&"function"==typeof e.then}function ri(e){let a=!1,u=ec[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[Al]=!1,e.nodes&&e.nodes.forEach(e=>Js(e)),e}let rc={},sc=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 Ll)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=Rl;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[Dl]&&El.rebuild(m)}else m=Js(a);this.result=new Ll(e,m,u),this.helpers={...rc,postcss:rc,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,b=a.split("."),w=m.split(".");(b[0]!==w[0]||parseInt(b[1])>parseInt(w[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(!tc[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!nc[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(_e(u))try{await u}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Al];){e[Al]=!0;let a=[br(e)];for(;a.length>0;){let e=this.visitTick(a);if(_e(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 _e(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=Nl;e.syntax&&(a=e.syntax.stringify),e.stringifier&&(a=e.stringifier),a.stringify&&(a=a.stringify);let u=new Tl(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(_e(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[Al];)e[Al]=!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||Jl("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(_e(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,b]=m[a.visitorIndex];a.visitorIndex+=1,a.visitorIndex===m.length&&(a.visitors=[],a.visitorIndex=0),this.result.lastPlugin=e;try{return b(u.toProxy(),this.helpers)}catch(e){throw this.handleError(e,u)}}if(0!==a.iterator){let m,b=a.iterator;for(;m=u.nodes[u.indexes[b]];)if(u.indexes[b]+=1,!m[Al])return m[Al]=!0,void e.push(br(m));a.iterator=0,delete u.indexes[b]}let b=a.events;for(;a.eventIndex<b.length;){let e=b[a.eventIndex];if(a.eventIndex+=1,0===e)return void(u.nodes&&u.nodes.length&&(u[Al]=!0,a.iterator=u.getIterator()));if(this.listeners[e])return void(a.visitors=this.listeners[e])}e.pop()}walkSync(e){e[Al]=!0;let a=ri(e);for(let u of a)if(0===u)e.nodes&&e.each(e=>{e[Al]||this.walkSync(e)});else{let a=this.listeners[u];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};sc.registerPostcss=e=>{rc=e};var oc=sc;sc.default=sc,Pl.registerLazyResult(sc),Ml.registerLazyResult(sc);let ic=ol,ac=vl;const lc=Il;let cc=Jo,uc=ni,pc=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=ac;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,b=cc;this.result=new lc(this._processor,m,this._opts),this.result.css=a;let w=this;Object.defineProperty(this.result,"root",{get:()=>w.root});let S=new ic(b,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||uc("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 dc=pc;pc.default=pc;let hc=na,fc=oc,mc=dc,gc=La,yc=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 fc(this,e,a):new mc(this,e,a)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var bc=yc;yc.default=yc,gc.registerProcessor(yc),hc.registerProcessor(yc);let wc=Ji,vc=pi,Sc=Ai,xc=Ho,Ic=fi,Oc=na,Ec=Za,Mc=Ea,Tc=oc,Rc=Na,_c=li,Lc=vl,Pc=bc,Nc=Il,Ac=La,Dc=$a,Fc=Jo,$c=kl;function T$1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Pc(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 b=a(...u);return b.postcssPlugin=e,b.postcssVersion=(new Pc).version,b}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=Fc,T$1.parse=Lc,T$1.fromJSON=Ec,T$1.list=Rc,T$1.comment=e=>new vc(e),T$1.atRule=e=>new wc(e),T$1.decl=e=>new Ic(e),T$1.rule=e=>new Dc(e),T$1.root=e=>new Ac(e),T$1.document=e=>new Oc(e),T$1.CssSyntaxError=xc,T$1.Declaration=Ic,T$1.Container=Sc,T$1.Processor=Pc,T$1.Document=Oc,T$1.Comment=vc,T$1.Warning=$c,T$1.AtRule=wc,T$1.Result=Nc,T$1.Input=Mc,T$1.Rule=Dc,T$1.Root=Ac,T$1.Node=_c,Tc.registerPostcss(T$1);var jc=T$1;T$1.default=T$1;const Uc=Su(jc);var zc;Uc.stringify,Uc.fromJSON,Uc.plugin,Uc.parse,Uc.list,Uc.document,Uc.comment,Uc.atRule,Uc.rule,Uc.decl,Uc.root,Uc.CssSyntaxError,Uc.Declaration,Uc.Container,Uc.Processor,Uc.Document,Uc.Comment,Uc.Warning,Uc.AtRule,Uc.Result,Uc.Input,Uc.Rule,Uc.Root,Uc.Node,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(zc||(zc={}));const{addCustomEvent:Wc}=ae,{addSailfishEvent:Bc}=ae,{freezePage:Vc}=ae,{takeFullSnapshot:Gc}=ae;var Hc=Object.defineProperty,y=(e,a,u)=>((e,a,u)=>a in e?Hc(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u);let Zc=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 qc=/(^|@)\S+:\d+/,Kc=/^\s*at .*(\S+:\d+|\(native\))/m,Yc=/^(eval@)?(\[native code])?$/,Jc={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(Kc)?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(Kc)},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),b=this.extractLocation(u?u[1]:m.pop()),w=m.join(" ")||void 0,S=["eval","<anonymous>"].indexOf(b[0])>-1?void 0:b[0];return new Zc({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(Yc)},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 Zc({functionName:e});{const a=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=e.match(a),m=u&&u[1]?u[1]:void 0,b=this.extractLocation(e.replace(a,""));return new Zc({functionName:m,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 a=/Line (\d+).*script (?:in )?(\S+)/i,u=e.message.split("\n"),m=[];for(let e=2,b=u.length;e<b;e+=2){const b=a.exec(u[e]);b&&m.push(new Zc({fileName:b[2],lineNumber:parseFloat(b[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,b=u.length;e<b;e+=2){const b=a.exec(u[e]);b&&m.push(new Zc({functionName:b[3]||void 0,fileName:b[2],lineNumber:parseFloat(b[1])}))}return m},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(qc)&&!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 Zc({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,b=[];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&&b.push(a)}b.length>1&&(u+=`:eq(${b.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=[],b=[];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?b.splice(u,1/0,e):b.push(e),~m.indexOf(a)&&(a=m[0]===a?"[Circular ~]":"[Circular ~."+b.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 Xc={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({},Xc,u):Xc,b=m.logger;if(!b)return()=>{};let w;w="string"==typeof b?a[b]:b;let S=0,x=!1;const C=[];if(m.level.includes("error")){const l=a=>{const u=a.message,b=a.error,w=Jc.parse(b).map(e=>e.toString()),S=[g(u,m.stringifyOptions)];e({level:"error",trace:w,payload:S})};a.addEventListener("error",l),C.push(()=>{a.removeEventListener("error",l)});const f=a=>{let u,b;a.reason instanceof Error?(u=a.reason,b=[g(`Uncaught (in promise) ${u.name}: ${u.message}`,m.stringifyOptions)]):(u=new Error,b=[g("Uncaught (in promise)",m.stringifyOptions),g(a.reason,m.stringifyOptions)]);const w=Jc.parse(u).map(e=>e.toString());e({level:"error",trace:w,payload:b})};a.addEventListener("unhandledrejection",f),C.push(()=>{a.removeEventListener("unhandledrejection",f)})}for(const e of m.level)C.push(p(w,e));return()=>{C.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],b=u(m);return"function"==typeof b&&(b.prototype=b.prototype||{},Object.defineProperties(b,{__rrweb_original__:{enumerable:!1,value:m}})),e[a]=b,()=>{e[a]=m}}catch{return()=>{}}}(a,u,a=>(...b)=>{if(a.apply(this,b),!("assert"===u&&b[0]||x)){x=!0;try{const a=Jc.parse(new Error).map(e=>e.toString()).splice(1),w=("assert"===u?b.slice(1):b).map(e=>g(e,m.stringifyOptions));S++,S<m.lengthThreshold?e({level:u,trace:a,payload:w}):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,...b)}finally{x=!1}}}):()=>{}}}var Qc,lu=(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))(lu||{}),cu={},hu={exports:{}},ku={exports:{}},xu={};var Cu,Ou,Eu,Mu,Tu,Ru,_u,Lu,Pu,Nu,Au,Du,Fu,$u,ju,Uu,zu={};function requireReactIs(){return Ou||(Ou=1,"production"===process.env.NODE_ENV?ku.exports=function requireReactIs_production_min(){if(Qc)return xu;Qc=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,b=e?Symbol.for("react.strict_mode"):60108,w=e?Symbol.for("react.profiler"):60114,S=e?Symbol.for("react.provider"):60109,x=e?Symbol.for("react.context"):60110,C=e?Symbol.for("react.async_mode"):60111,I=e?Symbol.for("react.concurrent_mode"):60111,O=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,D=e?Symbol.for("react.memo"):60115,F=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,j=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.responder"):60118,B=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 C:case I:case m:case w:case b:case E:return e;default:switch(e=e&&e.$$typeof){case x:case O:case F:case D:case S:return e;default:return _}}case u:return _}}}function A(e){return z(e)===I}return xu.AsyncMode=C,xu.ConcurrentMode=I,xu.ContextConsumer=x,xu.ContextProvider=S,xu.Element=a,xu.ForwardRef=O,xu.Fragment=m,xu.Lazy=F,xu.Memo=D,xu.Portal=u,xu.Profiler=w,xu.StrictMode=b,xu.Suspense=E,xu.isAsyncMode=function(e){return A(e)||z(e)===C},xu.isConcurrentMode=A,xu.isContextConsumer=function(e){return z(e)===x},xu.isContextProvider=function(e){return z(e)===S},xu.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},xu.isForwardRef=function(e){return z(e)===O},xu.isFragment=function(e){return z(e)===m},xu.isLazy=function(e){return z(e)===F},xu.isMemo=function(e){return z(e)===D},xu.isPortal=function(e){return z(e)===u},xu.isProfiler=function(e){return z(e)===w},xu.isStrictMode=function(e){return z(e)===b},xu.isSuspense=function(e){return z(e)===E},xu.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===m||e===I||e===w||e===b||e===E||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===D||e.$$typeof===S||e.$$typeof===x||e.$$typeof===O||e.$$typeof===j||e.$$typeof===U||e.$$typeof===B||e.$$typeof===$)},xu.typeOf=z,xu}():ku.exports=function requireReactIs_development(){return Cu||(Cu=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,b=e?Symbol.for("react.strict_mode"):60108,w=e?Symbol.for("react.profiler"):60114,S=e?Symbol.for("react.provider"):60109,x=e?Symbol.for("react.context"):60110,C=e?Symbol.for("react.async_mode"):60111,I=e?Symbol.for("react.concurrent_mode"):60111,O=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,D=e?Symbol.for("react.memo"):60115,F=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,j=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function typeOf(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case a:var $=e.type;switch($){case C:case I:case m:case w:case b:case E:return $;default:var j=$&&$.$$typeof;switch(j){case x:case O:case F:case D:case S:return j;default:return _}}case u:return _}}}var V=C,H=I,q=x,Y=S,J=a,X=O,Q=m,ee=F,te=D,ne=u,re=w,se=b,oe=E,ie=!1;function isConcurrentMode(e){return typeOf(e)===I}zu.AsyncMode=V,zu.ConcurrentMode=H,zu.ContextConsumer=q,zu.ContextProvider=Y,zu.Element=J,zu.ForwardRef=X,zu.Fragment=Q,zu.Lazy=ee,zu.Memo=te,zu.Portal=ne,zu.Profiler=re,zu.StrictMode=se,zu.Suspense=oe,zu.isAsyncMode=function isAsyncMode(e){return ie||(ie=!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)===C},zu.isConcurrentMode=isConcurrentMode,zu.isContextConsumer=function isContextConsumer(e){return typeOf(e)===x},zu.isContextProvider=function isContextProvider(e){return typeOf(e)===S},zu.isElement=function isElement(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},zu.isForwardRef=function isForwardRef(e){return typeOf(e)===O},zu.isFragment=function isFragment(e){return typeOf(e)===m},zu.isLazy=function isLazy(e){return typeOf(e)===F},zu.isMemo=function isMemo(e){return typeOf(e)===D},zu.isPortal=function isPortal(e){return typeOf(e)===u},zu.isProfiler=function isProfiler(e){return typeOf(e)===w},zu.isStrictMode=function isStrictMode(e){return typeOf(e)===b},zu.isSuspense=function isSuspense(e){return typeOf(e)===E},zu.isValidElementType=function isValidElementType(e){return"string"==typeof e||"function"==typeof e||e===m||e===I||e===w||e===b||e===E||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===D||e.$$typeof===S||e.$$typeof===x||e.$$typeof===O||e.$$typeof===j||e.$$typeof===U||e.$$typeof===B||e.$$typeof===$)},zu.typeOf=typeOf}()),zu}()),ku.exports}function requireObjectAssign(){if(Mu)return Eu;Mu=1;var e=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;return Eu=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,b){for(var w,S,x=function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(m),C=1;C<arguments.length;C++){for(var I in w=Object(arguments[C]))a.call(w,I)&&(x[I]=w[I]);if(e){S=e(w);for(var O=0;O<S.length;O++)u.call(w,S[O])&&(x[S[O]]=w[S[O]])}}return x},Eu}function requireReactPropTypesSecret(){if(Ru)return Tu;Ru=1;return Tu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function requireHas(){return Lu?_u:(Lu=1,_u=Function.call.bind(Object.prototype.hasOwnProperty))}function requireCheckPropTypes(){if(Nu)return Pu;Nu=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,b,w,S,x){if("production"!==process.env.NODE_ENV)for(var C in m)if(u(m,C)){var I;try{if("function"!=typeof m[C]){var O=Error((S||"React class")+": "+w+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}I=m[C](b,C,S,w,null,e)}catch(e){I=e}if(!I||I instanceof Error||printWarning((S||"React class")+": type specification of "+w+" `"+C+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof I+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),I instanceof Error&&!(I.message in a)){a[I.message]=!0;var E=x?x():"";printWarning("Failed "+w+" type: "+I.message+(null!=E?E:""))}}}return checkPropTypes.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},Pu=checkPropTypes}function requireFactoryWithTypeCheckers(){if(Du)return Au;Du=1;var e=requireReactIs(),a=requireObjectAssign(),u=requireReactPropTypesSecret(),m=requireHas(),b=requireCheckPropTypes(),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){}}),Au=function(w,S){var x="function"==typeof Symbol&&Symbol.iterator;var C="<<anonymous>>",I={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,b,w,S){if("function"!=typeof e)return new PropTypeError("Property `"+S+"` of component `"+b+"` has invalid PropType notation inside arrayOf.");var x=a[m];if(!Array.isArray(x))return new PropTypeError("Invalid "+w+" `"+S+"` of type `"+getPropType(x)+"` supplied to `"+b+"`, expected an array.");for(var C=0;C<x.length;C++){var I=e(x,C,b,w,S+"["+C+"]",u);if(I instanceof Error)return I}return null})},element:function createElementTypeChecker(){return createChainableTypeChecker(function validate(e,a,u,m,b){var S=e[a];return w(S)?null:new PropTypeError("Invalid "+m+" `"+b+"` of type `"+getPropType(S)+"` supplied to `"+u+"`, expected a single ReactElement.")})}(),elementType:function createElementTypeTypeChecker(){return createChainableTypeChecker(function validate(a,u,m,b,w){var S=a[u];return e.isValidElementType(S)?null:new PropTypeError("Invalid "+b+" `"+w+"` of type `"+getPropType(S)+"` supplied to `"+m+"`, expected a single ReactElement type.")})}(),instanceOf:function createInstanceTypeChecker(e){return createChainableTypeChecker(function validate(a,u,m,b,w){if(!(a[u]instanceof e)){var S=e.name||C;return new PropTypeError("Invalid "+b+" `"+w+"` of type `"+function getClassName(e){return e.constructor&&e.constructor.name?e.constructor.name:C}(a[u])+"` supplied to `"+m+"`, expected instance of `"+S+"`.")}return null})},node:function createNodeChecker(){return createChainableTypeChecker(function validate(e,a,u,m,b){return isNode(e[a])?null:new PropTypeError("Invalid "+m+" `"+b+"` supplied to `"+u+"`, expected a ReactNode.")})}(),objectOf:function createObjectOfTypeChecker(e){return createChainableTypeChecker(function validate(a,b,w,S,x){if("function"!=typeof e)return new PropTypeError("Property `"+x+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var C=a[b],I=getPropType(C);if("object"!==I)return new PropTypeError("Invalid "+S+" `"+x+"` of type `"+I+"` supplied to `"+w+"`, expected an object.");for(var O in C)if(m(C,O)){var E=e(C,O,w,S,x+"."+O,u);if(E instanceof Error)return E}return null})},oneOf:function createEnumTypeChecker(e){if(!Array.isArray(e))return"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;return createChainableTypeChecker(function validate(a,u,m,b,w){for(var S=a[u],x=0;x<e.length;x++)if(is(S,e[x]))return null;var C=JSON.stringify(e,function replacer(e,a){return"symbol"===getPreciseType(a)?String(a):a});return new PropTypeError("Invalid "+b+" `"+w+"` of value `"+String(S)+"` supplied to `"+m+"`, expected one of "+C+".")})},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 b=e[a];if("function"!=typeof b)return printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+getPostfixForTypeWarning(b)+" at index "+a+"."),emptyFunctionThatReturnsNull}return createChainableTypeChecker(function validate(a,b,w,S,x){for(var C=[],I=0;I<e.length;I++){var O=(0,e[I])(a,b,w,S,x,u);if(null==O)return null;O.data&&m(O.data,"expectedType")&&C.push(O.data.expectedType)}return new PropTypeError("Invalid "+S+" `"+x+"` supplied to `"+w+"`"+(C.length>0?", expected one of type ["+C.join(", ")+"]":"")+".")})},shape:function createShapeTypeChecker(e){return createChainableTypeChecker(function validate(a,m,b,w,S){var x=a[m],C=getPropType(x);if("object"!==C)return new PropTypeError("Invalid "+w+" `"+S+"` of type `"+C+"` supplied to `"+b+"`, expected `object`.");for(var I in e){var O=e[I];if("function"!=typeof O)return invalidValidatorError(b,w,S,I,getPreciseType(O));var E=O(x,I,b,w,S+"."+I,u);if(E)return E}return null})},exact:function createStrictShapeTypeChecker(e){return createChainableTypeChecker(function validate(b,w,S,x,C){var I=b[w],O=getPropType(I);if("object"!==O)return new PropTypeError("Invalid "+x+" `"+C+"` of type `"+O+"` supplied to `"+S+"`, expected `object`.");var E=a({},b[w],e);for(var _ in E){var D=e[_];if(m(e,_)&&"function"!=typeof D)return invalidValidatorError(S,x,C,_,getPreciseType(D));if(!D)return new PropTypeError("Invalid "+x+" `"+C+"` key `"+_+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(b[w],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var F=D(I,_,S,x,C+"."+_,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(b,w,x,I,O,E,_){if(I=I||C,E=E||x,_!==u){if(S){var D=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 D.name="Invariant Violation",D}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var F=I+":"+x;!a[F]&&m<3&&(printWarning("You are manually calling a React.PropTypes validation function for the `"+E+"` prop on `"+I+"`. 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==w[x]?b?null===w[x]?new PropTypeError("The "+O+" `"+E+"` is marked as required in `"+I+"`, but its value is `null`."):new PropTypeError("The "+O+" `"+E+"` is marked as required in `"+I+"`, but its value is `undefined`."):null:e(w,x,I,O,E)}var b=checkType.bind(null,!1);return b.isRequired=checkType.bind(null,!0),b}function createPrimitiveTypeChecker(e){return createChainableTypeChecker(function validate(a,u,m,b,w,S){var x=a[u];return getPropType(x)!==e?new PropTypeError("Invalid "+b+" `"+w+"` of type `"+getPreciseType(x)+"` supplied to `"+m+"`, expected `"+e+"`.",{expectedType:e}):null})}function invalidValidatorError(e,a,u,m,b){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 `"+b+"`.")}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||w(e))return!0;var a=function getIteratorFn(e){var a=e&&(x&&e[x]||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 b=u.value;if(b&&!isNode(b[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,I.checkPropTypes=b,I.resetWarningCache=b.resetWarningCache,I.PropTypes=I,I},Au}function requireFactoryWithThrowingShims(){if($u)return Fu;$u=1;var e=requireReactPropTypesSecret();function emptyFunction(){}function emptyFunctionWithReset(){}return emptyFunctionWithReset.resetWarningCache=emptyFunction,Fu=function(){function shim(a,u,m,b,w,S){if(S!==e){var x=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 x.name="Invariant Violation",x}}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}}function requirePropTypes(){if(ju)return hu.exports;if(ju=1,"production"!==process.env.NODE_ENV){var e=requireReactIs();hu.exports=requireFactoryWithTypeCheckers()(e.isElement,true)}else hu.exports=requireFactoryWithThrowingShims()();return hu.exports}var Wu=function requireLib(){return Uu||(Uu=1,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}}(requirePropTypes());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,b=function _objectWithoutPropertiesLoose(e,a){if(null==e)return{};var u,m,b={},w=Object.keys(e);for(m=0;m<w.length;m++)u=w[m],a.indexOf(u)>=0||(b[u]=e[u]);return b}(e,a);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(e);for(m=0;m<w.length;m++)u=w[m],a.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(e,u)&&(b[u]=e[u])}return b}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 b=function canUseDOM2(){return!("undefined"==typeof window||!window.document||!window.document.createElement)};a.ZendeskAPI=function ZendeskAPI2(){if(b&&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 w=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(b&&!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(){b&&window.zE&&(delete window.zE,delete window.zESettings)}},{key:"render",value:function render(){return null}}]),Zendesk2}(u.Component);a.default=w,w.propTypes={zendeskKey:m.default.string.isRequired,defer:m.default.bool}}(cu)),cu}();function suppressConsoleLogsDuringCall(e){const a=console.log,u=console.warn,m=console.error;console.log=()=>{},console.warn=()=>{},console.error=()=>{};try{e()}finally{console.log=a,console.warn=u,console.error=m}}const Vu="zendesk_chat",Gu="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}const getUrlAndStoredUuids=()=>({page_visit_uuid:sessionStorage.getItem("pageVisitUUID"),prev_page_visit_uuid:sessionStorage.getItem("prevPageVisitUUID"),href:location.origin+location.pathname});function initializeDomContentEvents(e){document.addEventListener("readystatechange",()=>{const a={type:24,data:{source:0,info:""},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()};switch(document.readyState){case"loading":a.data.source=x;break;case"complete":a.data.source=I}a.data.info&&sendEvent(a)}),document.addEventListener("DOMContentLoaded",()=>{sendEvent({type:24,data:{source:C},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()})}),window.addEventListener("beforeunload",()=>{sendEvent({type:24,data:{source:O},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()})}),window.addEventListener("unload",()=>{sendEvent({type:24,data:{source:E},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()})})}function initializeConsolePlugin(e,a){const{name:u,observer:m}=(e=>({name:"@sailfish-rrweb/rrweb/console@1",observer:R,options:e}))(e);m(e=>{sendEvent({type:lu.Plugin,timestamp:Date.now(),data:{plugin:u,payload:e},sessionId:a,...getUrlAndStoredUuids()})},window,e)}async function initializeRecording(e,a,u,m){const b=initializeWebSocket(a,u,m);try{ae({emit(e){Object.assign(e,getUrlAndStoredUuids()),e.sessionId=m,sendEvent(e)},maskInputOptions:{text:!0},maskInputFn:maskInputFn,maskTextClass:"sailfishSanitize",...e}),suppressConsoleLogsDuringCall(()=>{Wu.ZendeskAPI("messenger:set","conversationTags",[`sailfish-session-${m}`])});const handleWidgetOpen=()=>{ae.addSailfishEvent(lu.SailfishCustom,{action:"customer support chat opened",element_id:Vu,provider:Gu})},handleWidgetClose=()=>{ae.addSailfishEvent(lu.SailfishCustom,{action:"customer support chat closed",element_id:Vu,provider:Gu})},handleUnreadMessages=e=>{ae.addSailfishEvent(lu.SailfishCustom,{action:"zendesk unreadmessages",element_id:Vu,provider:Gu})};suppressConsoleLogsDuringCall(()=>{Wu.ZendeskAPI("messenger:on","open",handleWidgetOpen),Wu.ZendeskAPI("messenger:on","close",handleWidgetClose),Wu.ZendeskAPI("messenger:on","unreadMessages",handleUnreadMessages)})}catch(e){console.error("Error importing plugins!",e)}return b}let Hu=null,Zu=null;function identify(e,a={},u=!1){const m={type:"identify",userId:e,traits:a};Hu&&Hu.userId===e&&JSON.stringify(Hu.traits)===JSON.stringify(a)||(Hu={userId:e,traits:a,overwrite:u},sendMessage(m))}function addOrUpdateMetadata(e){const a={type:"addOrUpdateMetadata",metadata:e};Zu&&JSON.stringify(Zu)===JSON.stringify(e)||(Zu=e,sendMessage(a))}function trackingEvent(e){sendMessage({type:"trackingEvent",trackingData:e,timestamp:Y()})}const qu="undefined"!=typeof globalThis&&void 0!==globalThis.window,Ku="undefined"!=typeof globalThis&&void 0!==globalThis.document,Yu="undefined"!=typeof globalThis&&"localStorage"in globalThis,Ju="undefined"!=typeof globalThis&&"sessionStorage"in globalThis,Xu=["t.co","*.twitter.com","*.gravatar.com","*.googleapis.com","*.amazonaws.com","*.smooch.io","*.zendesk.com","*.zdassets.com"],Qu=[400,403],ep="CORS",tp=1,np="dynamicPassedHosts",rp="dynamicExcludedHosts",sp="sailfishApiKey",op="sailfishBackendApi",ip=new Set,ap=new Set,lp=ip.add;ip.add=e=>{const a=null==e?void 0:e.trim();if(!a||ip.has(a))return ip;lp.call(ip,a),ap.has(a)&&ap.delete(a);const u=consolidateDynamicExclusions(ip);ip.clear();for(const e of u)lp.call(ip,e);try{if(Yu){const e={version:1,entries:{}},a=Date.now();for(const u of ip)e.entries[u]=a;localStorage.setItem(rp,JSON.stringify(e))}}catch(e){}return updateExcludedHostsStorageAndBackend(ip),ip};const cp=ap.add;function updateExcludedHostsStorageAndBackend(e){if(!Ju)return;const a=sessionStorage.getItem(sp)||"",u=sessionStorage.getItem(op)||"";u&&sendDomainsToNotPropagateHeaderTo(a,[...e,...Xu],u).catch(e=>console.error("Failed to send domains to not propagate header to:",e))}function consolidateDynamicExclusions(e,a=3){const u={};for(const a of e){const[e,...m]=a.split("/"),b=m.length?`/${m.join("/")}`:"/";(u[e]??(u[e]=[])).push(b)}const m=new Set;for(const e in u){let gather=function(u,b){if(u.count>=a&&b.length>0){const a="/"+b.join("/")+"/*";return void m.add(`${e}${a}`)}for(const[e,a]of u.children)gather(a,b.concat(e))};const b=u[e];if(b.length<a){for(const a of b)m.add(`${e}${a}`);continue}const w={count:0,children:new Map};for(const e of b){w.count++;const a=e.split("/").filter(Boolean);let u=w;for(const e of a)u.children.has(e)||u.children.set(e,{count:0,children:new Map}),u=u.children.get(e),u.count++}gather(w,[])}return m}ap.add=e=>{const a=null==e?void 0:e.trim();if(!a)return ap;try{if(Yu){const e=localStorage.getItem(np);let u;if(e){const a=JSON.parse(e);u=Array.isArray(a)?{version:1,entries:Object.fromEntries(a.map(e=>[e,Date.now()]))}:a&&"object"==typeof a&&"entries"in a&&"object"==typeof a.entries?a:{version:1,entries:{}}}else u={version:1,entries:{}};u.entries[a]=Date.now(),u.version=1,localStorage.setItem(np,JSON.stringify(u))}}catch(e){}return ap.has(a)||cp.call(ap,a),ap},Yu&&(()=>{const e=localStorage.getItem(rp);if(e)try{const a=JSON.parse(e);if(1!==a.version)return void localStorage.removeItem(rp);const u=Date.now(),m={};for(const[e,b]of Object.entries(a.entries))u-b<6048e5&&(ip.add(e),m[e]=b);localStorage.setItem(rp,JSON.stringify({version:1,entries:m}))}catch(e){localStorage.removeItem(rp)}})(),Yu&&(()=>{const e=localStorage.getItem(np);if(e)try{const a=JSON.parse(e);if(1!==a.version)return void localStorage.removeItem(np);const u=Date.now(),m={};for(const[e,b]of Object.entries(a.entries))u-b<6048e5&&(ap.add(e),m[e]=b);localStorage.setItem(np,JSON.stringify({version:1,entries:m}))}catch(e){localStorage.removeItem(np)}})();const up="ignore",pp={recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!1,inlineImages:!1,recordPassword:!1,recordRealName:!0,recordCreditCardInfo:!1,recordSsn:!1,recordDob:!1,sampling:{}},dp={level:["info","log","warn","error"],lengthThreshold:1e4,stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:20,depthOfLimit:4},logger:"console"};function trackDomainChanges(){let e=window.location.href.split("?")[0];const checkDomainChange=(a=!1)=>{const u=window.location.href.split("?")[0];if(a||u!==e){e=u;const a=v4(),m=sessionStorage.getItem("pageVisitUUID");sessionStorage.setItem("pageVisitUUID",a),sessionStorage.setItem("prevPageVisitUUID",m);sendMessage({type:"routeChange",data:{url:u,timestamp:Date.now(),page_visit_uuid:a,prev_page_visit_uuid:m}})}},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 qu?(window.name||(window.name=v4()),window.name):v4()}function matchUrlWithWildcard(e,a){let u,m;if("string"==typeof e?u=e:"undefined"!=typeof URL&&e instanceof URL?u=e.href:"undefined"!=typeof Request&&e instanceof Request?u=e.url:null!=e&&"function"==typeof e.toString&&(u=e.toString()),!u)return!1;try{const e="undefined"!=typeof window?window.location.href:"http://localhost/";m=new URL(u,e)}catch{return!1}const{hostname:b,pathname:w,port:S,protocol:x}=m;if(!/^https?:$/.test(x))return!1;const C=b.startsWith("www.")?b.slice(4).toLowerCase():b.toLowerCase();return a.some(e=>{const a=String(e||"").replace(/^[a-zA-Z]+:\/\//,"");let[u,m]=a.split("/",2),b="";u.includes(":")&&([u,b]=u.split(":"));const x=u.replace(/\./g,"\\.").replace(/\*/g,".*"),I=new RegExp(`^${x}$`,"i"),O=C.startsWith("www.")?C.slice(4):C;if(b&&S!==b)return!1;if(u.startsWith("*.")){const e=u.slice(2).toLowerCase();if(!(C===e||O===e||C.endsWith("."+e)))return!1;if(m){const e=m.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(w)}return!0}if(!I.test(O)&&!I.test(C))return!1;if(m){const e=m.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(w)}return!0})}function shouldSkipHeadersPropagation(e,a=[]){let u;try{u=new URL("string"==typeof e?e:String((null==e?void 0:e.url)??e),window.location.href)}catch{return!0}for(const e of _)if(u.pathname.toLowerCase().endsWith(e))return!0;if(matchUrlWithWildcard(e,[...Xu,...a]))return!0;const m=u.hostname;return!!ip.has(m)}function setupFetchInterceptor(e=[]){const a=window.fetch,u=getOrSetSessionId(),m=new Map;window.fetch=new Proxy(a,{apply:async(a,b,w)=>{let x,C=w[0],I=w[1]||{};if("string"==typeof C)x=C;else if(C instanceof Request)x=C.url;else{if(!(C instanceof URL))return a.apply(b,w);x=C.href}return new URL(x,window.location.href).hostname,shouldSkipHeadersPropagation(x,e)?a.apply(b,w):async function injectHeaderWrapper(e,a,u,b,w,x,C){var I,O;if(!x)return e.apply(a,u);const E=new URL(C,window.location.href),_=E.hostname,D="/"===E.pathname?_:`${_}${E.pathname}`,F=v4(),$=getUrlAndStoredUuids(),j=w.method||"GET",U=Date.now();try{let I=await async function injectHeader(e,a,u,m,b,w,x){if(u instanceof Request){const C=u.clone(),I=new Headers(C.headers);I.set(S,`${b}/${w}/${x}`);const O=new Request(C,{headers:I});return await e.call(a,O,m)}{const C={...m},I=new Headers(m.headers||{});return I.set(S,`${b}/${w}/${x}`),C.headers=I,await e.call(a,u,C)}}(e,a,b,w,x,$.page_visit_uuid,F),O=!1;Qu.includes(I.status)&&(I=await async function retryWithoutPropagateHeaders(e,a,u,b){const w=new URL(b).hostname;try{let b=u[0],x=u[1]||{};if("string"==typeof b||b instanceof URL){const u={...x},C=new Headers(x.headers||{});C.delete(S),u.headers=C;const I=await e.call(a,b,u);return!I.ok&&Qu.includes(I.status)||(ip.add(w),m.set(w,up)),I}if(b instanceof Request){const u=b.clone(),C=new Headers(u.headers);C.delete(S);const I=new Request(u,{headers:C}),O=await e.call(a,I,x);return!O.ok&&Qu.includes(O.status)||(ip.add(w),m.set(w,up)),O}return e.apply(a,u)}catch(e){throw e}}(e,a,u,C),O=!0);const E=Date.now(),B=I.status,V=I.ok,H=V?"":`Request Error: ${I.statusText}`;V?ap.add(_):ip.add(D);return sendEvent({type:27,timestamp:E,sessionId:x,data:{request_id:F,session_id:x,timestamp_start:U,timestamp_end:E,response_code:B,success:V,error:H,method:j,url:C},...$}),I}catch(m){const b=Date.now(),w=!1,S=(null==(I=m.response)?void 0:I.status)||500,E=m.message||"Fetch request failed";if(m instanceof TypeError&&(null==(O=null==m?void 0:m.message)?void 0:O.toLowerCase().includes(ep.toLowerCase())))return ip.add(D),e.apply(a,u);ap.add(_);throw sendEvent({type:27,timestamp:b,sessionId:x,data:{request_id:F,session_id:x,timestamp_start:U,timestamp_end:b,response_code:S,success:w,error:E,method:j,url:C},...$}),m}}(a,b,w,C,I,u,x)}})}async function startRecording({apiKey:e,backendApi:a="https://api-service.sailfishqa.com",domainsToPropagateHeaderTo:u=[],domainsToNotPropagateHeaderTo:m=[],serviceVersion:b,serviceIdentifier:w,gitSha:x,serviceAdditionalMetadata:C}){var I,O;const E=x??function getCompileTimeGitSha(){var e,a,u;try{const e=globalThis;if(e&&"string"==typeof e.__GIT_SHA__&&e.__GIT_SHA__)return e.__GIT_SHA__}catch{}try{const a="undefined"!=typeof process?process:void 0;if(null==(e=null==a?void 0:a.env)?void 0:e.GIT_SHA)return String(a.env.GIT_SHA)}catch{}try{const e=import.meta;if(null==(a=null==e?void 0:e.env)?void 0:a.VITE_GIT_SHA)return String(e.env.VITE_GIT_SHA);if(null==(u=null==e?void 0:e.env)?void 0:u.GIT_SHA)return String(e.env.GIT_SHA)}catch{}}(),_=w??"",D=b??"",F=function getMapUuidFromWindow(){try{const e=window;if(e&&"string"==typeof e.sfMapUuid&&e.sfMapUuid)return e.sfMapUuid}catch{}}(),$=getOrSetSessionId();initializeDomContentEvents($),initializeConsolePlugin(dp,$),function storeCredentialsAndConnection({apiKey:e,backendApi:a}){Ju&&(sessionStorage.setItem("sailfishApiKey",e),sessionStorage.setItem("sailfishBackendApi",a))}({apiKey:e,backendApi:a}),trackDomainChanges();const j=new Set(ip);m.forEach(e=>{(null==e?void 0:e.trim())&&ip.add(e.trim())});Array.from(ip).filter(e=>!j.has(e)).length&&updateExcludedHostsStorageAndBackend(ip),u.forEach(e=>{(null==e?void 0:e.trim())&&ap.add(e.trim())}),sessionStorage.setItem(sp,e),sessionStorage.setItem(op,a),function setupXMLHttpRequestInterceptor(e=[]){const a=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send,m=XMLHttpRequest.prototype.setRequestHeader,b=getOrSetSessionId();XMLHttpRequest.prototype.setRequestHeader=function(e,a){return this._capturedRequestHeaders||(this._capturedRequestHeaders={}),this._capturedRequestHeaders[e]=a,m.call(this,e,a)},XMLHttpRequest.prototype.open=function(e,u,...m){return this._requestUrl="string"==typeof u&&u.length>0?u:null,this._requestMethod=e,this._capturedRequestHeaders={},a.apply(this,[e,u,...m])},XMLHttpRequest.prototype.send=function(...a){const m=this._requestUrl;if(!m)return u.apply(this,a);const w=new URL(m,window.location.href),x=w.hostname,C="/"===w.pathname?x:`${x}${w.pathname}`;if(shouldSkipHeadersPropagation(m,e))return u.apply(this,a);const I=sessionStorage.getItem("pageVisitUUID"),O=v4(),E=`${b}/${I}/${O}`;try{this.setRequestHeader(S,E)}catch(e){console.warn(`Could not set X-Sf3-Rid for ${m}`,e)}const _=Date.now();let D=!1;const emitFinished=(e,a,u)=>{if(D)return;D=!0;const w=Date.now();sendEvent({type:27,timestamp:w,sessionId:b,data:{request_id:O,session_id:b,timestamp_start:_,timestamp_end:w,response_code:a,success:e,error:u,method:this._requestMethod,url:m},...getUrlAndStoredUuids()}),e?ap.add(x):ip.add(C)};return this.addEventListener("load",()=>{const e=this.status||0;if(e>=200&&e<300)emitFinished(!0,e,"");else{const a=this.statusText||`HTTP ${e}`;emitFinished(!1,e,a)}},{once:!0}),this.addEventListener("error",()=>{const e=this.status||0,a=0===e?"Network or CORS failure":this.statusText||`Error ${e}`;emitFinished(!1,e,a)},{once:!0}),u.apply(this,a)}}(m),setupFetchInterceptor(m),async function gatherAndCacheDeviceInfo(){sendMessage({type:"deviceInfo",data:{deviceInfo:{language:navigator.language,userAgent:navigator.userAgent}}})}();try{const u=(null==(I=(await fetchCaptureSettings(e,a)).data)?void 0:I.captureSettingsFromApiKey)||pp,m=await startRecordingSession(e,$,a,_,D,F,E,"JS/TS",C);if(null==(O=m.data)?void 0:O.startRecordingSession){await initializeRecording(u,a,e,$);!function sendMapUuidIfAvailable(e="",a=""){window.sfMapUuid&&sendMessage({type:"mapUuid",data:{mapUuid:window.sfMapUuid,serviceIdentifier:e,serviceVersion:a}})}(w,b)}else console.error("Failed to start recording session:",m.errors||m)}catch(e){console.error("Error starting recording:",e)}}qu&&(!function sendUserDeviceUuid(){sendMessage({type:"userDeviceUuid",userDeviceUuid:function getOrSetUserDeviceUuid(){let e=null;if(Yu)try{e=localStorage.getItem("sailfishUserDeviceUuid")}catch{}if(!e){e=v4();try{Yu&&localStorage.setItem("sailfishUserDeviceUuid",e)}catch{}}return e}()})}(),function sendTimeZone(){sendMessage({type:"timeZone",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}()),Ku&&document.addEventListener("visibilitychange",function handleVisibilityChange(){"visible"===document.visibilityState&&getOrSetSessionId()}),qu&&window.addEventListener("beforeunload",()=>{window.name="",function clearPageVisitUuid(){Ju&&(sessionStorage.removeItem("pageVisitUUID"),sessionStorage.removeItem("prevPageVisitUUID"))}()});const initRecorder=async e=>{if("undefined"!=typeof window)return startRecording(e).then(()=>{setupIssueReporting({apiKey:e.apiKey,backendApi:e.backendApi??"https://api-service.sailfishqa.com",getSessionId:()=>getOrSetSessionId(),enableShortcuts:e.enableShortcuts??!1})})};export{pp as DEFAULT_CAPTURE_SETTINGS,dp as DEFAULT_CONSOLE_RECORDING_SETTINGS,rp as DYNAMIC_EXCLUDED_HOSTS_KEY,np as DYNAMIC_PASSED_HOSTS_KEY,tp as STORAGE_VERSION,addOrUpdateMetadata,buildBatches,consolidateDynamicExclusions,createTriageFromRecorder,ip as dynamicExcludedHosts,ap as dynamicPassedHosts,eventSize,fetchCaptureSettings,flushBufferedEvents,getUrlAndStoredUuids,identify,initRecorder,initializeConsolePlugin,initializeDomContentEvents,initializeRecording,initializeWebSocket,matchUrlWithWildcard,Y as nowTimestamp,openReportIssueModal,sendDomainsToNotPropagateHeaderTo,sendEvent,sendGraphQLRequest,sendMessage,startRecording,startRecordingSession,trackingEvent};
|
|
1
|
+
import e from"react";for(var a,u=[],m=0;m<256;++m)u.push((m+256).toString(16).slice(1));var b=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(b)}var w={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function v4(e,a,m){if(w.randomUUID&&!e)return w.randomUUID();var b=(e=e||{}).random||(e.rng||rng)();return b[6]=15&b[6]|64,b[8]=63&b[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()}(b)}const S="X-Sf3-Rid",x=0,C=1,I=2,O=3,E=4,_=[".js",".mjs",".cjs",".ts",".css",".scss",".sass",".less",".styl",".stylus",".png",".jpg",".jpeg",".gif",".svg",".webp",".avif",".bmp",".ico",".tiff",".tif",".heic",".woff",".woff2",".ttf",".otf",".eot",".mp4",".webm",".ogv",".mp3",".wav",".flac",".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".csv",".json",".xml",".txt",".zip",".rar",".gz",".tar",".7z",".map",".webmanifest"];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,b,w=u.call(e),S=[];try{for(;(void 0===a||a-- >0)&&!(m=w.next()).done;)S.push(m.value)}catch(e){b={error:e}}finally{try{m&&!m.done&&(u=w.return)&&u.call(w)}finally{if(b)throw b.error}}return S}var D=function(){return function Event2(e,a){this.target=a,this.type=e}}(),F=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}(D),$=function(e){function CloseEvent2(a,u,m){void 0===a&&(a=1e3),void 0===u&&(u="");var b=e.call(this,"close",m)||this;return b.wasClean=!0,b.code=a,b.reason=u,b}return __extends(CloseEvent2,e),CloseEvent2}(D),j={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+4e3*Math.random(),minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},U=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?j.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?j.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 b=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),w=b.next();!w.done;w=b.next()){var S=w.value;this._callEventListener(e,S)}}catch(e){a={error:e}}finally{try{w&&!w.done&&(u=b.return)&&u.call(b)}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?j.reconnectionDelayGrowFactor:a,m=e.minReconnectionDelay,b=void 0===m?j.minReconnectionDelay:m,w=e.maxReconnectionDelay,S=void 0===w?j.maxReconnectionDelay:w,x=0;return this._retryCount>0&&(x=b*Math.pow(u,this._retryCount-1))>S&&(x=S),this._debug("next delay",x),x},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?j.maxRetries:u,b=a.connectionTimeout,w=void 0===b?j.connectionTimeout:b,S=a.WebSocket,x=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===(C=x)||!C||2!==C.CLOSING)throw Error("No valid WebSocket class provided");var C;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 x(a,e._protocols):new x(a),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 F(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 $(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}();const B="recordingEvents";let V=null;function openDb$1(){return function hasIndexedDB$1(){return"undefined"!=typeof globalThis&&!!globalThis.indexedDB}()?V||(V=new Promise(e=>{try{const a=globalThis.indexedDB.open("leapsEventDB",1);a.onupgradeneeded=()=>{const e=a.result;e.objectStoreNames.contains(B)||e.createObjectStore(B,{keyPath:"id",autoIncrement:!0})},a.onsuccess=()=>e(a.result),a.onerror=()=>e(null),a.onblocked=()=>{e(null)}}catch{e(null)}}),V):Promise.resolve(null)}function withStore$1(e,a){return openDb$1().then(u=>u?new Promise(m=>{try{const b=u.transaction(B,e),w=b.objectStore(B);Promise.resolve(a(w)).then(e=>{b.oncomplete=()=>m(e),b.onerror=()=>m(null)}).catch(()=>m(null))}catch{m(null)}}):null)}async function saveEventToIDB(e){await withStore$1("readwrite",a=>{a.add({timestamp:Date.now(),data:e})})}async function deleteEventsByIds(e){await withStore$1("readwrite",async a=>{for(const u of e)a.delete(u)})}const H="notifyMessages";let q=null;function openDb(){return function hasIndexedDB(){return"undefined"!=typeof globalThis&&!!globalThis.indexedDB}()?q||(q=new Promise(e=>{try{const a=globalThis.indexedDB.open("leapsNotifyDB",1);a.onupgradeneeded=()=>{const e=a.result;e.objectStoreNames.contains(H)||e.createObjectStore(H,{keyPath:"id",autoIncrement:!0})},a.onsuccess=()=>e(a.result),a.onerror=()=>e(null),a.onblocked=()=>e(null)}catch{e(null)}}),q):Promise.resolve(null)}async function withStore(e,a){const u=await openDb();return u?new Promise(m=>{try{const b=u.transaction(H,e),w=b.objectStore(H);Promise.resolve(a(w)).then(e=>{b.oncomplete=()=>m(e),b.onerror=()=>m(null)}).catch(()=>m(null))}catch{m(null)}}):null}async function saveNotifyMessageToIDB(e){await withStore("readwrite",a=>{a.add({value:e})})}async function deleteNotifyMessageById(e){await withStore("readwrite",a=>{a.delete(e)})}function buildBatches(e,a,u){const m={};for(const a of e){const e=a.data.sessionId||"unknown";m[e]||(m[e]=[]),m[e].push(a)}const b=[];for(const e in m){const w=m[e];let S=[],x=0;for(const e of w){const m=a(e);x+m>u&&(S.length>0&&(b.push(S),S=[],x=0),m>u)||(S.push(e),x+=m)}S.length>0&&b.push(S)}return b}function eventSize(e){return new Blob([JSON.stringify(e)]).size}let Y=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(Y=()=>(new Date).getTime());let J=null,X=!1,Q=null,ee=null;function isWebSocketOpen(e){return(null==e?void 0:e.readyState)===WebSocket.OPEN}async function flushNotifyQueue(){const e=await async function getAllNotifyMessages(){return await withStore("readonly",e=>new Promise(a=>{const u=e.getAll();u.onsuccess=()=>a(u.result),u.onerror=()=>a([])}))??[]}();if(isWebSocketOpen(J))try{for(const a of e)J.send(a.value),await deleteNotifyMessageById(a.id)}catch(e){}}async function flushBufferedEvents(){if(isWebSocketOpen(J))if(Q)await Q;else{Q=(async()=>{var e,a;const u=await async function getAllIndexedEvents(){return await withStore$1("readonly",e=>new Promise(a=>{const u=e.getAll();u.onsuccess=()=>a(u.result),u.onerror=()=>a([])}))??[]}(),m={};for(const b of u){const u=(null==(a=null==(e=null==b?void 0:b.data)?void 0:e.data)?void 0:a.sessionId)??"unknown-session";m[u]||(m[u]=[]),m[u].push(b)}for(const e of Object.values(m)){const a=buildBatches(e,e=>eventSize(e.data),52428800);for(const e of a){if(!isWebSocketOpen(J))break;const a=e.map(e=>e.data),u=e.map(e=>e.id).filter(e=>null!=e);try{const e=JSON.stringify({type:"events",events:a,mapUuid:window.sfMapUuid});J.send(e),await deleteEventsByIds(u)}catch(e){}}}})();try{await Q}finally{Q=null}}}function sendEvent(e){if(X||!isWebSocketOpen(J))return void saveEventToIDB(e);const a=JSON.stringify({type:"event",event:e,mapUuid:window.sfMapUuid});try{J.send(a)}catch(a){saveEventToIDB(e)}}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),b=new URL(e).protocol;return J=new U(`${"https:"===b?"wss":"ws"}://${m}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.7.47`,[],{connectionTimeout:3e4}),J.addEventListener("open",()=>{(async()=>{try{X=!0,await flushNotifyQueue(),await flushBufferedEvents()}finally{X=!1}null!=ee&&clearInterval(ee),ee=window.setInterval(()=>{flushBufferedEvents()},2e3)})()}),J.addEventListener("close",()=>{console.log("WebSocket closed.")}),J}function sendMessage(e){const a=JSON.stringify(e);if(isWebSocketOpen(J))try{J.send(a)}catch(e){saveNotifyMessageToIDB(a)}else saveNotifyMessageToIDB(a)}function sendGraphQLRequest(e,a,u,m=5,b=2e3,w=2){const S=`${u.backendApi}/graphql/?apiKey=${u.apiKey}`;return function exponentialBackoff(e,a,u=5,m=2e3,b=2){let w=0;const attemptRequest=async()=>{try{return await e()}catch(e){if(w++,w>u)throw e;const a=m*Math.pow(b,w-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,b,w)}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,m,b,w,S,x,C){return sendGraphQLRequest("StartSession","mutation StartSession(\n $apiKey: UUID!,\n $recordingSessionId: UUID!,\n $serviceIdentifier: String!,\n $serviceVersion: String,\n $mapUuid: String,\n $gitSha: String,\n $library: String,\n $serviceAdditionalMetadata: JSON,\n $startRecordingFilePath: String,\n $startRecordingLineNumber: Int\n ) {\n startRecordingSession(\n companyApiKey: $apiKey,\n sessionId: $recordingSessionId,\n serviceIdentifier: $serviceIdentifier,\n serviceVersion: $serviceVersion,\n mapUuid: $mapUuid,\n gitSha: $gitSha,\n library: $library,\n serviceAdditionalMetadata: $serviceAdditionalMetadata,\n startRecordingFilePath: $startRecordingFilePath,\n startRecordingLineNumber: $startRecordingLineNumber\n ) {\n id\n }\n }",{apiKey:e,recordingSessionId:a,backendApi:u,serviceIdentifier:m,serviceVersion:b,mapUuid:w,gitSha:S,library:x,serviceAdditionalMetadata:C,startRecordingFilePath:null,startRecordingLineNumber:null})}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})}function createTriageFromRecorder(e,a,u,m,b,w){return sendGraphQLRequest("CreateTriageFromRecorder","mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description\n ) {\n id\n }\n }\n ",{apiKey:e,recordingSessionId:u,timestampStart:m,timestampEnd:b,description:w,backendApi:a})}const te={enabled:!1,openModalExistingMode:{key:"e",requireCmdCtrl:!1},openModalCaptureNewMode:{key:"n",requireCmdCtrl:!1},closeModal:{key:"escape",requireCmdCtrl:!1},submitReport:{key:"enter",requireCmdCtrl:!0},startRecording:{key:"r",requireCmdCtrl:!1},stopRecording:{key:"escape",requireCmdCtrl:!0}},ne={shortcuts:{...te},resolveSessionId:null,apiKey:null,backendApi:null,triageBaseUrl:"https://app.sailfishqa.com"};let re=null,se={mode:"lookback",description:""},oe=null,ie=null,le=null,ce=!1;function getShortcutKeyCmdCtrlLabel(){return function isMacPlatform(){const e=navigator.userAgentData;return(null==e?void 0:e.platform)?e.platform.toLowerCase().includes("mac"):/mac/i.test(navigator.userAgent)}()?"⌘":"Ctrl"}function getShortcutLabelFromContext(e){return function getShortcutLabel(e){const a=[];return e.requireCmdCtrl&&a.push(getShortcutKeyCmdCtrlLabel()),a.push(function formatShortcutKeyLabel(e){return({escape:"esc"}[e.toLowerCase()]||e).toUpperCase()}(e.key)),a.map(e=>`<span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; padding: 0 4px; font-weight: 500; font-size: 12px; color: #94A3B8; line-height: 16px;">${e}</span>`).join(e.requireCmdCtrl?" + ":"")}(ne.shortcuts[e])}function setupIssueReporting(e){ne.apiKey=e.apiKey,ne.backendApi=e.backendApi,ne.resolveSessionId=e.getSessionId,ne.shortcuts=function mergeShortcutsConfig(e){const a={...te};if(!e)return a;"boolean"==typeof e.enabled&&(a.enabled=e.enabled);const u=["openModalExistingMode","openModalCaptureNewMode","closeModal","submitReport","startRecording","stopRecording"];for(const m of u){const u=e[m];u&&"object"==typeof u&&(a[m]={...a[m],...u},a[m].key=a[m].key.toLowerCase())}return a}(e.shortcuts);const{shortcuts:a}=ne;window.addEventListener("keydown",e=>{const u=function isTypingInInput(){const e=document.activeElement;return e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}(),m=e.key.toLowerCase(),b=e.metaKey||e.ctrlKey,w=!!document.getElementById("sf-report-issue-modal"),S=!u&&(a.enabled||w),shortcutUsed=e=>m===a[e].key&&b===a[e].requireCmdCtrl,x=w?e=>{setActiveTab(e),updateModeSpecificUI(e)}:injectModalHTML;if(S&&shortcutUsed("openModalExistingMode"))return e.preventDefault(),void x("lookback");if(S&&shortcutUsed("openModalCaptureNewMode"))return e.preventDefault(),void x("startnow");if(w&&!ce&&shortcutUsed("closeModal"))return e.preventDefault(),void closeModal();if(w&&shortcutUsed("submitReport")){const a=document.getElementById("sf-issue-submit-btn");return void(a&&!a.disabled&&(e.preventDefault(),a.click()))}if(ce&&m===a.stopRecording.key&&b===a.stopRecording.requireCmdCtrl)return e.preventDefault(),void stopRecording();if(w&&"startnow"===se.mode&&m===a.startRecording.key&&b===a.startRecording.requireCmdCtrl&&!u){const a=document.getElementById("sf-start-recording-btn");return void(a&&(e.preventDefault(),a.click()))}})}function openReportIssueModal(e){ce?stopRecording():(injectModalHTML(),re&&document.body.appendChild(re),ne.triageBaseUrl=e??"https://app.sailfishqa.com")}function closeModal(){document.activeElement instanceof HTMLElement&&document.activeElement.blur(),(null==re?void 0:re.parentNode)&&re.parentNode.removeChild(re),re=null,ce||(se={mode:"lookback",description:"",occurredInThisTab:!0},oe=null,ie=null),le&&clearInterval(le)}function injectModalHTML(e="lookback"){re&&(re.remove(),re=null),re=document.createElement("div"),re.id="sf-report-issue-modal";const a="startnow"===e;re.innerHTML=`\n <div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>\n <div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);\n background:#fff; padding:24px; border-radius:12px;\n width:476px; max-width:90%; z-index:9999;\n box-shadow:0 4px 20px rgba(0,0,0,0.15); font-family:sans-serif;">\n\n <button id="sf-modal-close-btn"\n style="position:absolute; top:24px; right:24px;">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M18 6L6 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6 6L18 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n\n <h2 style="font-size:18px; font-weight:600; margin-bottom:16px;">Report Issue</h2>\n\n <div id="sf-issue-tabs" style="display:flex; gap:4px; margin-bottom:16px; background:#f1f5f9; padding:6px; border-radius:6px; width: fit-content;">\n <button id="sf-tab-lookback" data-mode="lookback" class="sf-issue-tab ${a?"":"active"}"\n style="padding:6px 12px; border:none; background:${a?"transparent":"white"}; color: ${a?"#64748B":"#0F172A"}; border-radius:4px; font-size:14px; cursor:pointer; font-weight:500; height:32px; display: flex; align-items: center; gap: 8px;">\n Existing ${getShortcutLabelFromContext("openModalExistingMode")}\n </button>\n <button id="sf-tab-startnow" data-mode="startnow" class="sf-issue-tab ${a?"active":""}"\n style="padding:6px 12px; border:none; background:${a?"white":"transparent"}; color: ${a?"#0F172A":"#64748B"}; border-radius:4px; font-size:14px; cursor:pointer; font-weight:500; height:32px; display: flex; align-items: center; gap: 8px;">\n Capture new ${getShortcutLabelFromContext("openModalCaptureNewMode")}\n </button>\n </div>\n\n <div id="sf-issue-mode-info" style="display:flex; align-items:flex-start; gap:8px; margin-bottom:24px;">\n <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-top:4px;">\n <g clip-path="url(#clip0_2477_11797)">\n <path d="M6.99935 12.8333C10.221 12.8333 12.8327 10.2216 12.8327 6.99996C12.8327 3.7783 10.221 1.16663 6.99935 1.16663C3.77769 1.16663 1.16602 3.7783 1.16602 6.99996C1.16602 10.2216 3.77769 12.8333 6.99935 12.8333Z" stroke="#A1A1AA" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7 9.33333V7" stroke="#A1A1AA" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M7 4.66663H7.00583" stroke="#A1A1AA" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n </g>\n <defs><clipPath id="clip0_2477_11797"><rect width="14" height="14" fill="white"/></clipPath></defs>\n </svg>\n <div style="font-size:14px;">\n ${a?"I want to reproduce the issue right now.":"Something already happened. Capture the past few minutes."}\n </div>\n </div>\n\n <label for="sf-issue-description" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">\n What happened? (optional)\n </label>\n <textarea id="sf-issue-description" placeholder="Add description here"\n style="width:100%; height:80px; padding:8px 12px; font-size:14px;\n border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;\n resize:none; outline:none;">${se.description}</textarea>\n\n <div id="sf-lookback-container" style="display:${a?"none":"block"}; margin-bottom:20px;">\n <label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">\n When did this happen?\n </label>\n <div style="display:flex; align-items:center; justify-content:space-between; gap:12px;">\n <div style="position:relative; display:flex; align-items:center; gap:6px;">\n <select id="sf-lookback-minutes"\n style="\n background: white;\n padding: 4px 8px;\n font-size: 14px;\n border: 1px solid #cbd5e1;\n border-radius: 6px;\n color: #64748B;\n font-family: sans-serif;\n outline: none;\n box-shadow: none;\n appearance: none;\n -webkit-appearance: none;\n -moz-appearance: none;\n padding-right: 28px;\n cursor: pointer;\n font-size: 14px;\n line-height: 20px;\n ">\n ${Array.from({length:15},(e,a)=>{const u=a+1;return`<option value="${u}" ${2===u?"selected":""}>${u}</option>`}).join("")}\n </select>\n <div style="position:absolute; left:32px; top:50%; transform:translateY(-50%); pointer-events:none;">\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none"\n xmlns="http://www.w3.org/2000/svg">\n <path d="M4 6L8 10L12 6" stroke="#52525B" stroke-width="1.33333"\n stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </div>\n <span style="font-size:14px; color: #64748B;">minutes ago</span>\n </div>\n <div>\n <label for="sf-occurred-in-tab"\n style="display:flex; align-items:center; gap:6px; font-size:14px; color:#0F172A; cursor:pointer; white-space:nowrap;">\n <input\n type="checkbox"\n id="sf-occurred-in-tab"\n checked\n disabled\n style="width:16px; height:16px; accent-color:#295DBF; cursor:pointer;"\n />\n The issue occurred in this tab?\n </label>\n </div>\n </div>\n </div>\n\n <div id="sf-modal-footer" style="display:flex; justify-content:${a?"space-between":"flex-end"}; align-items:flex-end;">\n\n <div id="sf-record-button-container" style="display:${a?"block":"none"};">\n <div id="sf-recording-timer-label" style="display:none; font-size:14px; margin-bottom:20px;">\n Recording: <span id="sf-recording-timer-display">00:00</span>\n </div>\n <button id="sf-start-recording-btn"\n style="display:flex; align-items:center; gap:8px; border:1px solid #fc5555;\n background:transparent; padding:6px 12px; font-size:14px;\n color: #fc5555; border-radius:6px; cursor:pointer; font-weight:500;">\n <div id="sf-record-icon" style="padding: 6px; border-radius: 6px; border: 1px solid #fc5555; cursor: pointer;">\n <div style="width: 14px; height: 14px; background: #fc5555; border-radius: 50%; border: 1px solid #991b1b;"></div>\n </div>\n <span>Start Recording</span>\n ${getShortcutLabelFromContext("startRecording")}\n </button>\n </div>\n\n <button id="sf-issue-submit-btn"\n style="background: #295DBF; color:white; border:none; padding:8px 16px;\n border-radius:6px; font-size:14px; line-height: 24px; font-weight:500;\n cursor:${a?"not-allowed":"pointer"}; opacity:${a?"0.4":"1"}; margin-bottom:1px" ${a?"disabled":""}>\n Report <span style="margin-left: 8px; display: inline-flex; align-items: center; gap: 4px; color: #94A3B8; font-size: 12px; line-height:16px;">\n ${getShortcutLabelFromContext("submitReport")}\n </span>\n </button>\n </div>\n <div style="display:flex; justify-content:center; font-size: 12px; margin-top: 12px; color: #295dbf;">\n <a href="mailto:info@sailfishqa.com?subject=I'd%20love%20to%20learn%20more&body=Hey%2C%20Sailfish%20AI%20team%20-%20I'd%20love%20to%20learn%20more%20about%20Sailfish%20AI!">Powered by Sailfish AI</a>\n </div>\n </div>\n `,se.mode=e,document.body.appendChild(re),function bindListeners(){const e=null==re?void 0:re.querySelectorAll(".sf-issue-tab"),a=document.getElementById("sf-start-recording-btn"),u=document.getElementById("sf-modal-close-btn"),m=document.getElementById("sf-issue-submit-btn"),b=document.getElementById("sf-lookback-minutes");null==e||e.forEach(e=>{e.addEventListener("click",e=>{const a=e.currentTarget.dataset.mode;setActiveTab(a),updateModeSpecificUI(a)})}),u&&(u.onclick=closeModal);b&&b.addEventListener("change",()=>{"lookback"===se.mode&&(m.disabled=!1,m.style.opacity="1",m.style.cursor="pointer")});a&&(a.onclick=()=>{const e=document.getElementById("sf-issue-description");e&&(se.description=e.value),function startCountdownThenRecord(){if(document.getElementById("sf-countdown-overlay"))return;const e=document.createElement("div");e.id="sf-countdown-overlay",e.style.cssText="\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.6);\n z-index: 10001;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 80px;\n font-weight: bold;\n color: white;\n font-family: sans-serif;\n ";let a=3;e.textContent=a.toString(),document.body.appendChild(e);const u=setInterval(()=>{a--,a>0?e.textContent=a.toString():(clearInterval(u),document.body.removeChild(e),oe=Date.now(),ce=!0,closeModal(),function showFloatingTimer(){const e=document.createElement("div");e.id="sf-recording-indicator",e.style.cssText="\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n padding: 8px 12px;\n font-family: sans-serif;\n font-size: 14px;\n display: flex;\n align-items: start;\n gap: 24px;\n z-index: 10000;\n cursor: pointer;\n ",e.innerHTML=`\n <div style="display:flex; align-items:center; gap:8px;">\n <div style="width:32px; height:32px; background:#FC5555; border-radius:6px; border:1px solid #991b1b; display:flex; align-items:center; justify-content:center;">\n <div style="width:10px; height:10px; background:white; border-radius:2px;"></div>\n </div>\n <div style="display:flex; flex-direction:column; font-size:14px; line-height:20px;">\n <span id="sf-recording-timer" style="font-weight:600; color: #171717;">00:00</span>\n <span style="font-size:12px; line-height:12px; color: #71717A;">Max time 15 mins</span>\n </div>\n </div>\n <div style="display:flex; align-items:center; gap:4px; margin-left:auto; font-size:14px; color:#0F172A;">\n <span style="color: #71717A;">stop</span>\n <span style="display: inline-flex; align-items: center; gap: 4px; color: #94A3B8; font-size: 12px; line-height:16px;">\n ${getShortcutLabelFromContext("stopRecording")}\n </span>\n </div>\n `,e.addEventListener("click",()=>stopRecording()),document.body.appendChild(e);const a=e.querySelector("#sf-recording-timer");if(!a)return;le=setInterval(()=>{const e=Date.now()-(oe??Date.now()),u=Math.floor(e/6e4).toString().padStart(2,"0"),m=Math.floor(e%6e4/1e3).toString().padStart(2,"0");a.textContent=`${u}:${m}`},1e3)}())},1e3)}()});null==re||re.addEventListener("click",e=>{var a;if(e.target.closest("#sf-issue-submit-btn")){const e=(null==(a=document.getElementById("sf-issue-description"))?void 0:a.value)||"",u=se.mode;let m,w;if(se.description=e,"startnow"===u)m=oe??Date.now()-3e5,w=ie??Date.now();else{const e=60*Number((null==b?void 0:b.value)||"2")*1e3;w=Date.now(),m=w-e}closeModal(),async function createTriage(e,a,u){var m,b;try{showTriageStatusModal(!0);const w=await createTriageFromRecorder(ne.apiKey,ne.backendApi,function getSessionIdSafely(){if(!ne.resolveSessionId)throw new Error("getSessionId not defined");return ne.resolveSessionId()}(),e,a,u),S=null==(b=null==(m=null==w?void 0:w.data)?void 0:m.createTriageFromRecorder)?void 0:b.id;S?showTriageStatusModal(!1,S):(console.error("No Triage ID returned from backend."),showTriageStatusModal(!1,null))}catch(e){console.error("Error creating triage:",e),showTriageStatusModal(!1,null)}}(`${m}`,`${w}`,e)}})}()}function setActiveTab(e){se.mode=e;const a=null==re?void 0:re.querySelector("#sf-tab-lookback"),u=null==re?void 0:re.querySelector("#sf-tab-startnow");"lookback"===e?(a.style.background="white",a.style.color="#0F172A",u.style.background="transparent",u.style.color="#64748B"):(u.style.background="white",u.style.color="#0F172A",a.style.background="transparent",a.style.color="#64748B")}function updateModeSpecificUI(e){const a=document.querySelector("#sf-issue-mode-info div"),u=document.getElementById("sf-issue-submit-btn"),m=document.getElementById("sf-record-button-container"),b=document.getElementById("sf-recording-timer-label"),w=document.getElementById("sf-recording-timer-display"),S=document.getElementById("sf-modal-footer"),x=document.getElementById("sf-lookback-container");if(a&&u&&m&&b&&w&&S&&x)if("startnow"===e){m.style.display="block",x.style.display="none",S.style.justifyContent="space-between",a.textContent="I want to reproduce the issue right now.";const e=null!==oe&&null!==ie;if(u.disabled=!e,u.style.opacity=e?"1":"0.4",u.style.cursor=e?"pointer":"not-allowed",oe&&ie){const e=Math.floor((ie-oe)/1e3),a=String(Math.floor(e/60)).padStart(2,"0"),u=String(e%60).padStart(2,"0");b.style.display="block",w.textContent=`${a}:${u}`}else b.style.display="none"}else m.style.display="none",b.style.display="none",x.style.display="block",S.style.justifyContent="flex-end",a.textContent="Something already happened. Capture the past few minutes.",u.disabled=!1,u.style.opacity="1",u.style.cursor="pointer"}function stopRecording(){var e;ie=Date.now(),ce=!1,le&&clearInterval(le),null==(e=document.getElementById("sf-recording-indicator"))||e.remove(),function reopenModalAfterStop(){injectModalHTML("startnow");const e=document.getElementById("sf-start-recording-btn");if(e){const a=e.querySelector("span");a&&(a.textContent="Re-record")}const a=document.getElementById("sf-recording-timer-label"),u=document.getElementById("sf-recording-timer-display");if(a&&u&&oe&&ie){const e=Math.floor((ie-oe)/1e3),m=Math.floor(e/60).toString().padStart(2,"0"),b=(e%60).toString().padStart(2,"0");u.textContent=`${m}:${b}`,a.style.display="block"}const m=document.getElementById("sf-issue-description");m&&(m.value=se.description);const b=document.querySelector('input[value="startnow"]');b&&(b.checked=!0);const w=document.getElementById("sf-inline-record-chip"),S=document.getElementById("sf-inline-record-timer");if(w&&S){const e=Math.floor(((ie??0)-(oe??0))/1e3),a=Math.floor(e/60).toString().padStart(2,"0"),u=Math.floor(e%60).toString().padStart(2,"0");S.textContent=`${a}:${u}`,S.style.color="black",w.style.display="flex"}const x=document.getElementById("sf-issue-submit-btn");x.disabled=!1,x.style.opacity="1",x.style.cursor="pointer"}()}function showTriageStatusModal(e,a){var u;!function removeExistingModals(){var e,a;null==(e=document.getElementById("sf-report-issue-modal"))||e.remove(),null==(a=document.getElementById("sf-triage-status-modal"))||a.remove()}();const m=a?`${ne.triageBaseUrl}/triage/${a}?from=inAppReportIssue`:"",b=document.createElement("div");b.id="sf-triage-status-modal",Object.assign(b.style,{position:"fixed",inset:"0",zIndex:"9998",display:"flex",alignItems:"center",justifyContent:"center"});const w=e?"Reporting Issue...":"Issue reported!",S=e?'<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>':"",x=e?'<div style="display:flex; justify-content:center; align-items:center; padding: 40px 0;">\n <div style="width:24px; height:24px; border:2px solid #295dbf; border-top:2px solid white; border-radius:50%; animation:spin 1s linear infinite;"></div>\n </div>':"",C=e?"":'<div id="sf-copied-status" style="display:none; font-size:12px; font-weight:500; color:white;\n background-color:#22c55e; padding:4px 8px; border-radius:6px; white-space:nowrap; align-items:center; gap:6px;">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21 7.5L9 19.5L3 13.5L5.25 11.25L9 15L18.75 5.25L21 7.5Z" fill="white"/>\n </svg>\n Copied\n </div>';b.innerHTML=`\n <div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>\n <div id="sf-triage-card"\n style="position:relative; background:#fff; padding:24px; border-radius:12px; width:300px; max-width:90%;\n font-family:sans-serif; box-shadow:0 4px 20px rgba(0,0,0,0.15);\n z-index:9999; opacity:1; transition:opacity 300ms ease;">\n <div style="position:absolute; top:24px; right:48px;">${C}</div>\n\n <button id="sf-triage-modal-close"\n style="position:absolute; top:24px; right:16px; background:none; border:none; cursor:pointer;">\n <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M18 6L6 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6 6L18 18" stroke="#71717A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n\n <h2 style="font-size:18px; font-weight:600; margin-bottom:${e?8:40}px; line-height:28px;">${w}</h2>\n ${S}\n ${x}\n\n <div style="display:flex; justify-content:flex-end; align-items:center; gap:8px;">\n <button id="sf-copy-triage-link"\n style="background:white; border:1px solid #e2e8f0; padding:8px 16px; border-radius:6px;\n font-size:14px; color: #0f172a; cursor:pointer;">\n Share\n </button>\n <button id="sf-view-triage-btn"\n style="display:flex; align-items:center; gap:8px; background:#295dbf; border:none;\n padding:8px 16px; border-radius:6px; font-size:14px; color:white; cursor:pointer;">\n View\n <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M12 8.66667V12.6667C12 13.0203 11.8595 13.3594 11.6095 13.6095C11.3594 13.8595 11.0203 14 10.6667 14H3.33333C2.97971 14 2.64057 13.8595 2.39052 13.6095C2.14048 13.3594 2 13.0203 2 12.6667V5.33333C2 4.97971 2.14048 4.64057 2.39052 4.39052C2.64057 4.14048 2.97971 4 3.33333 4H7.33333" stroke="white" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M10 2H14V6" stroke="white" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M6.66602 9.33333L13.9993 2" stroke="white" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n </button>\n </div>\n </div>\n <style>\n @keyframes spin { to { transform: rotate(360deg); } }\n </style>\n `,document.body.appendChild(b);const I=b.querySelector("#sf-triage-card");null==(u=document.getElementById("sf-triage-modal-close"))||u.addEventListener("click",()=>{fadeCardAndRemove(b,I,300)});const O=document.getElementById("sf-copy-triage-link"),E=document.getElementById("sf-view-triage-btn");e?(O.disabled=!0,O.style.opacity="0.4",O.style.cursor="not-allowed",E.disabled=!0,E.style.opacity="0.4",E.style.cursor="not-allowed"):(O.disabled=!1,O.addEventListener("click",()=>{navigator.clipboard.writeText(m).then(()=>{const e=document.getElementById("sf-copied-status");e&&(e.style.display="flex")})}),E.disabled=!1,E.addEventListener("click",()=>{a&&window.open(m,"_blank")}),setTimeout(()=>fadeCardAndRemove(b,I,300),1e4))}function fadeCardAndRemove(e,a,u=300){a.style.opacity="0",a.addEventListener("transitionend",()=>e.remove(),{once:!0}),setTimeout(()=>e.remove(),u+100)}var pe=Object.defineProperty,b$1=(e,a,u)=>((e,a,u)=>a in e?pe(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u),de=Object.defineProperty,xn=(e,a,u)=>((e,a,u)=>a in e?de(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u),he=(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))(he||{});function vr(e){return e.nodeType===e.ELEMENT_NODE}function We(e){const a=null==e?void 0:e.host;return(null==a?void 0:a.shadowRoot)===e}function ze(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 me=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:b,maskInputFn:w}){let S=b||"",x="";const C=m&&fe(m);let I=!1;return(a[u.toLowerCase()]||C&&a[C])&&(x=w?w(S,e):"*".repeat(S.length),I=S!==x),{value:x,masked:I}}function fe(e){return e.toLowerCase()}const ye="__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 ge=1;const be=new RegExp("[^a-z0-9-_:]");function Ir(){return ge++}let we,ve;const ke=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,xe=/^(?:[a-z+]+:)?\/\//i,Ce=/^www\..*/i,Ie=/^(data:)([^,]*),(.*)/i;function Pt(e,a){return(e||"").replace(ke,(e,u,m,b,w,S)=>{const x=m||w||S,C=u||b||"";if(!x)return e;if(xe.test(x)||Ce.test(x))return`url(${C}${x}${C})`;if(Ie.test(x))return`url(${C}${x}${C})`;if("/"===x[0])return`url(${C}${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)+x}${C})`;const I=a.split("/"),O=x.split("/");I.pop();for(const e of O)"."!==e&&(".."===e?I.pop():I.push(e));return`url(${C}${I.join("/")}${C})`})}const Oe=/^[^ \t\n\r\u000c]+/,Ee=/^[, \t\n\r\u000c]+/;const Me=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=Me.get(e);if(u||(u=e.createElement("a"),Me.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 Di(e,a){if(""===a.trim())return a;let u=0;function n(e){let m;const b=e.exec(a.substring(u));return b?(m=b[0],u+=m.length,m):""}const m=[];for(;n(Ee),!(u>=a.length);){let b=n(Oe);if(","===b.slice(-1))b=At(e,b.substring(0,b.length-1)),m.push(b);else{let w="";b=At(e,b);let S=!1;for(;;){const e=a.charAt(u);if(""===e){m.push((b+w).trim());break}if(S)")"===e&&(S=!1);else{if(","===e){u+=1,m.push((b+w).trim());break}"("===e&&(S=!0)}w+=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 Nt(e,a,u){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!u&&Nt(e.parentNode,a,u);for(let u=e.classList.length;u--;){const m=e.classList[u];if(a.test(m))return!0}return!!u&&Nt(e.parentNode,a,u)}function Er(e,a,u,m){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 a){if(m){if(b.closest(`.${a}`))return!0}else if(b.classList.contains(a))return!0}else if(Nt(b,a,m))return!0;if(u)if(m){if(b.closest(u))return!0}else if(b.matches(u))return!0}catch{}return!1}function zi(e,a){const{doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:S,inlineStylesheet:x,maskInputOptions:C={},maskTextFn:I,maskInputFn:O,dataURLOptions:E={},inlineImages:_,recordCanvas:D,keepIframeSrcFn:F,newlyAddedElement:$=!1}=a,j=function Bi(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:he.Document,childNodes:[],compatMode:e.compatMode}:{type:he.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:he.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:j};case e.ELEMENT_NODE:return function Vi(e,a){const{doc:u,blockClass:m,blockSelector:b,inlineStylesheet:w,maskInputOptions:S={},maskInputFn:x,dataURLOptions:C={},inlineImages:I,recordCanvas:O,keepIframeSrcFn:E,newlyAddedElement:_=!1,rootId:D}=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,b),$=function Oi(e){if(e instanceof HTMLFormElement)return"form";const a=fe(e.tagName);return be.test(a)?"div":a}(e);let j={};const U=e.attributes.length;for(let a=0;a<U;a++){const m=e.attributes[a];Or($,m.name,m.value)||(j[m.name]=Mr(u,$,fe(m.name),m.value))}if("link"===$&&w){const a=Array.from(u.styleSheets).find(a=>a.href===e.href);let m=null;a&&(m=Tt(a)),m&&(delete j.rel,delete j.href,j._cssText=Pt(m,a.href))}if("style"===$&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const a=Tt(e.sheet);a&&(j._cssText=Pt(a,$t(u)))}if("input"===$||"textarea"===$||"select"===$){const a=e.value,u=e.checked;if("radio"!==j.type&&"checkbox"!==j.type&&"submit"!==j.type&&"button"!==j.type&&a){const u=Zt({element:e,type:Yt(e),tagName:$,value:a,maskInputOptions:S,maskInputFn:x});j.value=u.value,u.masked&&(j.masked=!0)}else u&&(j.checked=u)}if("option"===$&&(e.selected&&!S.select?j.selected=!0:delete j.selected),"canvas"===$&&O)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 b=a.getImageData,w=ye in b?b[ye]:b;if(new Uint32Array(w.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)||(j.rr_dataURL=e.toDataURL(C.type,C.quality));else if(!("__context"in e)){const a=e.toDataURL(C.type,C.quality),m=u.createElement("canvas");m.width=e.width,m.height=e.height;a!==m.toDataURL(C.type,C.quality)&&(j.rr_dataURL=a)}if("img"===$&&I){we||(we=u.createElement("canvas"),ve=we.getContext("2d"));const a=e,m=a.currentSrc||a.getAttribute("src")||"<unknown-src>",b=a.crossOrigin,A=()=>{a.removeEventListener("load",A);try{we.width=a.naturalWidth,we.height=a.naturalHeight,ve.drawImage(a,0,0),j.rr_dataURL=we.toDataURL(C.type,C.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&&(b?j.crossOrigin=b:a.removeAttribute("crossorigin"))};a.complete&&0!==a.naturalWidth?A():a.addEventListener("load",A)}if("audio"===$||"video"===$){const a=j;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&&(j.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(j.rr_scrollTop=e.scrollTop)),F){const{width:a,height:u}=e.getBoundingClientRect();j={class:j.class,rr_width:`${a}px`,rr_height:`${u}px`}}let B;"iframe"===$&&!E(j.src)&&(e.contentDocument||(j.rr_src=j.src),delete j.src);try{customElements.get($)&&(B=!0)}catch{}return{type:he.Element,tagName:$,attributes:j,childNodes:[],isSVG:Fi(e)||void 0,needBlock:F,rootId:D,isCustom:B}}(e,{doc:u,blockClass:b,blockSelector:w,inlineStylesheet:x,maskInputOptions:C,maskInputFn:O,dataURLOptions:E,inlineImages:_,recordCanvas:D,keepIframeSrcFn:F,newlyAddedElement:$,rootId:j});case e.TEXT_NODE:return function ji(e,a){var u;const{needsMask:m,maskTextFn:b,rootId:w}=a,S=e.parentNode&&e.parentNode.tagName;let x=e.textContent;const C="STYLE"===S||void 0,I="SCRIPT"===S||void 0;if(C&&x){try{e.nextSibling||e.previousSibling||null!=(u=e.parentNode.sheet)&&u.cssRules&&(x=Tt(e.parentNode.sheet))}catch(a){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${a}`,e)}x=Pt(x,$t(a.doc))}return I&&(x="SCRIPT_PLACEHOLDER"),!C&&!I&&x&&m&&(x=b?b(x,e.parentElement):x.replace(/[\S]/g,"*")),{type:he.Text,textContent:x||"",isStyle:C,rootId:w}}(e,{doc:u,needsMask:S,maskTextFn:I,rootId:j});case e.CDATA_SECTION_NODE:return{type:he.CDATA,textContent:"",rootId:j};case e.COMMENT_NODE:return{type:he.Comment,textContent:e.textContent||"",rootId:j};default:return!1}}function N(e){return null==e?"":e.toLowerCase()}function Se(e,a){const{doc:u,mirror:m,blockClass:b,blockSelector:w,maskTextClass:S,maskTextSelector:x,skipChild:C=!1,inlineStylesheet:I=!0,maskInputOptions:O={},maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F={},inlineImages:$=!1,recordCanvas:j=!1,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V=5e3,onStylesheetLoad:H,stylesheetLoadTimeout:q=5e3,keepIframeSrcFn:Y=()=>!1,newlyAddedElement:J=!1}=a;let{needsMask:X}=a,{preserveWhiteSpace:Q=!0}=a;X||(X=Er(e,S,x,void 0===X));const ee=zi(e,{doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:X,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,dataURLOptions:F,inlineImages:$,recordCanvas:j,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===he.Comment||e.type===he.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&&(N(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===N(e.attributes.name)||"icon"===N(e.attributes.rel)||"apple-touch-icon"===N(e.attributes.rel)||"shortcut icon"===N(e.attributes.rel)))||"meta"===e.tagName&&(a.headMetaDescKeywords&&N(e.attributes.name).match(/^description|keywords$/)||a.headMetaSocial&&(N(e.attributes.property).match(/^(og|twitter|fb):/)||N(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===N(e.attributes.name))||a.headMetaRobots&&("robots"===N(e.attributes.name)||"googlebot"===N(e.attributes.name)||"bingbot"===N(e.attributes.name))||a.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"]||a.headMetaAuthorship&&("author"===N(e.attributes.name)||"generator"===N(e.attributes.name)||"framework"===N(e.attributes.name)||"publisher"===N(e.attributes.name)||"progid"===N(e.attributes.name)||N(e.attributes.property).match(/^article:/)||N(e.attributes.property).match(/^product:/))||a.headMetaVerification&&("google-site-verification"===N(e.attributes.name)||"yandex-verification"===N(e.attributes.name)||"csrf-token"===N(e.attributes.name)||"p:domain_verify"===N(e.attributes.name)||"verify-v1"===N(e.attributes.name)||"verification"===N(e.attributes.name)||"shopify-checkout-api-token"===N(e.attributes.name)))))}(ee,D)||!Q&&ee.type===he.Text&&!ee.isStyle&&!ee.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Ir();const ne=Object.assign(ee,{id:te});if(m.add(e,ne),-2===te)return null;U&&U(e);let re=!C;if(ne.type===he.Element){re=re&&!ne.needBlock,delete ne.needBlock;const a=e.shadowRoot;a&&ze(a)&&(ne.isShadowHost=!0)}if((ne.type===he.Document||ne.type===he.Element)&&re){D.headWhitespace&&ne.type===he.Element&&"head"===ne.tagName&&(Q=!1);const a={doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:X,maskTextClass:S,maskTextSelector:x,skipChild:C,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F,inlineImages:$,recordCanvas:j,preserveWhiteSpace:Q,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V,onStylesheetLoad:H,stylesheetLoadTimeout:q,keepIframeSrcFn:Y};if(ne.type!==he.Element||"textarea"!==ne.tagName||void 0===ne.attributes.value)for(const u of Array.from(e.childNodes)){const e=Se(u,a);e&&ne.childNodes.push(e)}if(vr(e)&&e.shadowRoot)for(const u of Array.from(e.shadowRoot.childNodes)){const m=Se(u,a);m&&(ze(e.shadowRoot)&&(m.isShadow=!0),ne.childNodes.push(m))}}return e.parentNode&&We(e.parentNode)&&ze(e.parentNode)&&(ne.isShadow=!0),ne.type===he.Element&&"iframe"===ne.tagName&&function _i(e,a,u){const m=e.contentWindow;if(!m)return;let b,w=!1;try{b=m.document.readyState}catch{return}if("complete"!==b){const m=setTimeout(()=>{w||(a(),w=!0)},u);return void e.addEventListener("load",()=>{clearTimeout(m),w=!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&&B){const u=Se(a,{doc:a,mirror:m,blockClass:b,blockSelector:w,needsMask:X,maskTextClass:S,maskTextSelector:x,skipChild:!1,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F,inlineImages:$,recordCanvas:j,preserveWhiteSpace:Q,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V,onStylesheetLoad:H,stylesheetLoadTimeout:q,keepIframeSrcFn:Y});u&&B(e,u)}},V),ne.type===he.Element&&"link"===ne.tagName&&"string"==typeof ne.attributes.rel&&("stylesheet"===ne.attributes.rel||"preload"===ne.attributes.rel&&"string"==typeof ne.attributes.href&&"css"===xr(ne.attributes.href))&&function Wi(e,a,u){let m,b=!1;try{m=e.sheet}catch{return}if(m)return;const w=setTimeout(()=>{b||(a(),b=!0)},u);e.addEventListener("load",()=>{clearTimeout(w),b=!0,a()})}(e,()=>{if(H){const a=Se(e,{doc:u,mirror:m,blockClass:b,blockSelector:w,needsMask:X,maskTextClass:S,maskTextSelector:x,skipChild:!1,inlineStylesheet:I,maskInputOptions:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:D,dataURLOptions:F,inlineImages:$,recordCanvas:j,preserveWhiteSpace:Q,onSerialize:U,onIframeLoad:B,iframeLoadTimeout:V,onStylesheetLoad:H,stylesheetLoadTimeout:q,keepIframeSrcFn:Y});a&&H(e,a)}},q),ne}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 Te={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}};Te.exports=Rr(),Te.exports.createColors=Rr;var Ae=Te.exports;const De=$i(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let je=Ae,Ue=De,Be=class Lr extends Error{constructor(e,a,u,m,b,w){super(e),this.name="CssSyntaxError",this.reason=e,b&&(this.file=b),m&&(this.source=m),w&&(this.plugin=w),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=je.isColorSupported);let n=e=>e,r=e=>e,i=e=>e;if(e){let{bold:e,gray:a,red:u}=je.createColors(!0);r=a=>e(u(a)),n=e=>a(e),Ue&&(i=e=>Ue(e))}let u=a.split(/\r?\n/),m=Math.max(this.line-3,0),b=Math.min(this.line+2,u.length),w=String(b).length;return u.slice(m,b).map((e,a)=>{let u=m+1+a,b=" "+(" "+u).slice(-w)+" | ";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),w=e.slice(u,m),S=n(b.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,a-1)).replace(/[^\t]/g," ");return r(">")+n(b)+i(w)+"\n "+S+r("^")}let a=n(b.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(b)+i(e)+"\n "+a+r("^")}return" "+n(b)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Ve=Be;Be.default=Be;const Ge={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let He=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 b=(e.raws.between||"")+(a?";":"");this.builder(u+m+b,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,b=0;for(;m&&"root"!==m.type;)b+=1,m=m.parent;if(u.includes("\n")){let a=this.raw(e,null,"indent");if(a.length)for(let e=0;e<b;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 b=e.nodes[m],w=this.raw(b,"before");w&&this.builder(w),this.stringify(b,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 b=e.parent;if("before"===u&&(!b||"root"===b.type&&b.first===e||b&&"document"===b.type))return"";if(!b)return Ge[u];let w=e.root();if(w.rawCache||(w.rawCache={}),typeof w.rawCache[u]<"u")return w.rawCache[u];if("before"===u||"after"===u)return this.beforeAfter(e,u);{let b="raw"+function Ki(e){return e[0].toUpperCase()+e.slice(1)}(u);this[b]?m=this[b](w,e):w.walk(e=>{if(m=e.raws[a],typeof m<"u")return!1})}return typeof m>"u"&&(m=Ge[u]),w.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 qe=He;He.default=He;let Ye=qe;function ks(e,a){new Ye(a).stringify(e)}var Je=ks;ks.default=ks;var Xe={};Xe.isClean=Symbol("isClean"),Xe.my=Symbol("my");let Qe=Ve,et=qe,nt=Je,{isClean:st,my:ot}=Xe;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 b=e[m],w=typeof b;"parent"===m&&"object"===w?a&&(u[m]=a):"source"===m?u[m]=b:Array.isArray(b)?u[m]=b.map(e=>Cs(e,u)):("object"===w&&null!==b&&(b=Cs(b)),u[m]=b)}return u}function Pe(e,a){if(a&&typeof a.offset<"u")return a.offset;let u=1,m=1,b=0;for(let w=0;w<e.length;w++){if(m===a.line&&u===a.column){b=w;break}"\n"===e[w]?(u=1,m+=1):u+=1}return b}let it=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[st]=!1,this[ot]=!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 Qe(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[st]=!0}markDirty(){if(this[st]){this[st]=!1;let e=this;for(;e=e.parent;)e[st]=!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,b=Pe(m,this.source.start),w=b+e;for(let e=b;e<w;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,b=m.slice(Pe(m,this.source.start),Pe(m,this.source.end)).indexOf(e.word);-1!==b&&(a=this.positionInside(b),u=this.positionInside(b+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 et).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 b=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 w=a.get(m.input);null==w&&(w=b,a.set(m.input,b),b++),u[e]={end:m.end,inputId:w,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=nt){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 at=it;it.default=it;let lt=at,ct=class extends lt{constructor(e){super(e),this.type="comment"}};var ut=ct;ct.default=ct;let pt=at,dt=class extends pt{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 ht=dt;dt.default=dt;let yt,gt,bt,wt,vt=ut,St=ht,kt=at,{isClean:xt,my:Ct}=Xe;function _r(e){return e.map(e=>(e.nodes&&(e.nodes=_r(e.nodes)),delete e.source,e))}function Wr(e){if(e[xt]=!1,e.proxyOf.nodes)for(let a of e.proxyOf.nodes)Wr(a)}let It=class zr extends kt{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),b=this.normalize(a,this.proxyOf.nodes[m]).reverse();m=this.index(e);for(let e of b)this.proxyOf.nodes.splice(m+1,0,e);for(let e in this.indexes)u=this.indexes[e],m<u&&(this.indexes[e]=u+b.length);return this.markDirty(),this}insertBefore(e,a){let u,m=this.index(e),b=0===m&&"prepend",w=this.normalize(a,this.proxyOf.nodes[m],b).reverse();m=this.index(e);for(let e of w)this.proxyOf.nodes.splice(m,0,e);for(let e in this.indexes)u=this.indexes[e],m<=u&&(this.indexes[e]=u+w.length);return this.markDirty(),this}normalize(e,a){if("string"==typeof e)e=_r(gt(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 St(e)]}else if(e.selector||e.selectors)e=[new wt(e)];else if(e.name)e=[new yt(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new vt(e)]}return e.map(e=>(e[Ct]||zr.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[xt]&&Wr(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)}))}};It.registerParse=e=>{gt=e},It.registerRule=e=>{wt=e},It.registerAtRule=e=>{yt=e},It.registerRoot=e=>{bt=e};var Et=It;It.default=It,It.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,yt.prototype):"rule"===e.type?Object.setPrototypeOf(e,wt.prototype):"decl"===e.type?Object.setPrototypeOf(e,St.prototype):"comment"===e.type?Object.setPrototypeOf(e,vt.prototype):"root"===e.type&&Object.setPrototypeOf(e,bt.prototype),e[Ct]=!0,e.nodes&&e.nodes.forEach(e=>{It.rebuild(e)})};let Mt=Et,Rt=class extends Mt{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=Rt;Rt.default=Rt,Mt.registerAtRule(Rt);let Dt,Ft,jt=Et,Ut=class extends jt{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new Dt(new Ft,this,e).stringify()}};Ut.registerLazyResult=e=>{Dt=e},Ut.registerProcessor=e=>{Ft=e};var Wt=Ut;Ut.default=Ut;var Bt={nanoid:(e=21)=>{let a="",u=0|e;for(;u--;)a+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return a}};let{existsSync:Vt,readFileSync:Ht}=De,{dirname:Kt,join:Jt}=De,{SourceMapConsumer:Xt,SourceMapGenerator:Qt}=De;let en=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=Kt(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new Xt(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=Kt(e),Vt(e))return this.mapFile=e,Ht(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 Xt)return Qt.fromSourceMap(a).toString();if(a instanceof Qt)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=Jt(Kt(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 tn=en;en.default=en;let{nanoid:nn}=Bt,{isAbsolute:rn,resolve:sn}=De,{SourceMapConsumer:on,SourceMapGenerator:an}=De,{fileURLToPath:ln,pathToFileURL:cn}=De,un=Ve,pn=tn,dn=De,hn=Symbol("fromOffsetCache"),fn=!(!on||!an),mn=!(!sn||!rn),yn=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&&(!mn||/^\w+:\/\//.test(a.from)||rn(a.from)?this.file=a.from:this.file=sn(a.from)),mn&&fn){let e=new pn(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 "+nn(6)+">"),this.map&&(this.map.file=this.from)}error(e,a,u,m={}){let b,w,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);w=e.line,b=e.col}else w=m.line,b=m.column}else if(!u){let e=this.fromOffset(a);a=e.line,u=e.col}let x=this.origin(a,u,w,b);return S=x?new un(e,void 0===x.endLine?x.line:{column:x.column,line:x.line},void 0===x.endLine?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,m.plugin):new un(e,void 0===w?a:{column:u,line:a},void 0===w?u:{column:b,line:w},this.css,this.file,m.plugin),S.input={column:u,endColumn:b,endLine:w,line:a,source:this.css},this.file&&(cn&&(S.input.url=cn(this.file).toString()),S.input.file=this.file),S}fromOffset(e){let a,u;if(this[hn])u=this[hn];else{let e=this.css.split("\n");u=new Array(e.length);let a=0;for(let m=0,b=e.length;m<b;m++)u[m]=a,a+=e[m].length+1;this[hn]=u}a=u[u.length-1];let m=0;if(e>=a)m=u.length-1;else{let a,b=u.length-2;for(;m<b;)if(a=m+(b-m>>1),e<u[a])b=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:sn(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,a,u,m){if(!this.map)return!1;let b,w,S=this.map.consumer(),x=S.originalPositionFor({column:a,line:e});if(!x.source)return!1;"number"==typeof u&&(b=S.originalPositionFor({column:m,line:u})),w=rn(x.source)?cn(x.source):new URL(x.source,this.map.consumer().sourceRoot||cn(this.map.mapFile));let C={column:x.column,endColumn:b&&b.column,endLine:b&&b.line,line:x.line,url:w.toString()};if("file:"===w.protocol){if(!ln)throw new Error("file: protocol is not available in this PostCSS build");C.file=ln(w)}let I=S.sourceContentFor(x.source);return I&&(C.source=I),C}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 gn=yn;yn.default=yn,dn&&dn.registerInput&&dn.registerInput(yn);let bn,wn,Sn=Et,In=class extends Sn{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 bn(new wn,this,e).stringify()}};In.registerLazyResult=e=>{bn=e},In.registerProcessor=e=>{wn=e};var On=In;In.default=In,Sn.registerRoot(In);let En={comma:e=>En.split(e,[","],!0),space(e){let a=[" ","\n","\t"];return En.split(e,a)},split(e,a,u){let m=[],b="",w=!1,S=0,x=!1,C="",I=!1;for(let u of e)I?I=!1:"\\"===u?I=!0:x?u===C&&(x=!1):'"'===u||"'"===u?(x=!0,C=u):"("===u?S+=1:")"===u?S>0&&(S-=1):0===S&&a.includes(u)&&(w=!0),w?(""!==b&&m.push(b.trim()),b="",w=!1):b+=u;return(u||""!==b)&&m.push(b.trim()),m}};var Mn=En;En.default=En;let Tn=Et,Rn=Mn,_n=class extends Tn{get selectors(){return Rn.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 Ln=_n;_n.default=_n,Tn.registerRule(_n);let Pn=Lt,Nn=ut,An=ht,Dn=gn,Fn=tn,jn=On,Un=Ln;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__:Dn.prototype};u.map&&(u.map={...u.map,__proto__:Fn.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 jn(m);if("decl"===m.type)return new An(m);if("rule"===m.type)return new Un(m);if("comment"===m.type)return new Nn(m);if("atrule"===m.type)return new Pn(m);throw new Error("Unknown node type: "+e.type)}var zn=Ze;Ze.default=Ze;let{dirname:Wn,relative:Bn,resolve:Vn,sep:qn}=De,{SourceMapConsumer:Zn,SourceMapGenerator:Kn}=De,{pathToFileURL:Qn}=De,nr=gn,rr=!(!Zn||!Kn),sr=!!(Wn&&Vn&&Bn&&qn);var or=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||Wn(e.file);!1===this.mapOpts.sourcesContent?(a=new Zn(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(),sr&&rr&&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=Kn.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new Kn({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 Kn({file:this.outputFile(),ignoreInvalidMapping:!0});let e,a,u=1,m=1,b="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(S,x,C)=>{if(this.css+=S,x&&"end"!==C&&(w.generated.line=u,w.generated.column=m-1,x.source&&x.source.start?(w.source=this.sourcePath(x),w.original.line=x.source.start.line,w.original.column=x.source.start.column-1,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,this.map.addMapping(w))),a=S.match(/\n/g),a?(u+=a.length,e=S.lastIndexOf("\n"),m=S.length-e):m+=S.length,x&&"start"!==C){let e=x.parent||{raws:{}};("decl"!==x.type&&("atrule"!==x.type||x.nodes)||x!==e.last||e.raws.semicolon)&&(x.source&&x.source.end?(w.source=this.sourcePath(x),w.original.line=x.source.end.line,w.original.column=x.source.end.column-1,w.generated.line=u,w.generated.column=m-2,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,w.generated.line=u,w.generated.column=m-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 a=this.memoizedPaths.get(e);if(a)return a;let u=this.opts.to?Wn(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(u=Wn(Vn(u,this.mapOpts.annotation)));let m=Bn(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 nr(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(Qn){let a=Qn(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;"\\"===qn&&(e=e.replace(/\\/g,"/"));let u=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,u),u}};const ir=/[\t\n\f\r "#'()/;[\\\]{}]/g,ar=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,lr=/.[\r\n"'(/\\]/,cr=/[\da-f]/i;let ur=Lt,pr=ut,dr=ht,hr=On,fr=Ln,Xa=function(e,a={}){let u,m,b,w,S,x,C,I,O,E,_=e.css.valueOf(),D=a.ignoreErrors,F=_.length,$=0,j=[],U=[];function y2(a){throw e.error("Unclosed "+a,$)}return{back:function A(e){U.push(e)},endOfFile:function v(){return 0===U.length&&$>=F},nextToken:function P2(e){if(U.length)return U.pop();if($>=F)return;let a=!!e&&e.ignoreUnclosed;switch(u=_.charCodeAt($),u){case 10:case 32:case 9:case 13:case 12:w=$;do{w+=1,u=_.charCodeAt(w)}while(32===u||10===u||9===u||13===u||12===u);x=["space",_.slice($,w)],$=w-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(u);x=[e,e,$];break}case 40:if(E=j.length?j.pop()[1]:"",O=_.charCodeAt($+1),"url"===E&&39!==O&&34!==O&&32!==O&&10!==O&&9!==O&&12!==O&&13!==O){w=$;do{if(C=!1,w=_.indexOf(")",w+1),-1===w){if(D||a){w=$;break}y2("bracket")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["brackets",_.slice($,w+1),$,w],$=w}else w=_.indexOf(")",$+1),m=_.slice($,w+1),-1===w||lr.test(m)?x=["(","(",$]:(x=["brackets",m,$,w],$=w);break;case 39:case 34:S=39===u?"'":'"',w=$;do{if(C=!1,w=_.indexOf(S,w+1),-1===w){if(D||a){w=$+1;break}y2("string")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["string",_.slice($,w+1),$,w],$=w;break;case 64:ir.lastIndex=$+1,ir.test(_),w=0===ir.lastIndex?_.length-1:ir.lastIndex-2,x=["at-word",_.slice($,w+1),$,w],$=w;break;case 92:for(w=$,b=!0;92===_.charCodeAt(w+1);)w+=1,b=!b;if(u=_.charCodeAt(w+1),b&&47!==u&&32!==u&&10!==u&&9!==u&&13!==u&&12!==u&&(w+=1,cr.test(_.charAt(w)))){for(;cr.test(_.charAt(w+1));)w+=1;32===_.charCodeAt(w+1)&&(w+=1)}x=["word",_.slice($,w+1),$,w],$=w;break;default:47===u&&42===_.charCodeAt($+1)?(w=_.indexOf("*/",$+2)+1,0===w&&(D||a?w=_.length:y2("comment")),x=["comment",_.slice($,w+1),$,w],$=w):(ar.lastIndex=$+1,ar.test(_),w=0===ar.lastIndex?_.length-1:ar.lastIndex-2,x=["word",_.slice($,w+1),$,w],j.push(x),$=w)}return $++,x},position:function S2(){return $}}};const mr={empty:!0,space:!0};var yr=class{constructor(e){this.input=e,this.root=new hr,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 ur;a.name=e[1].slice(1),""===a.name&&this.unnamedAtrule(a,e),this.init(a,e[2]);let u,m,b,w=!1,S=!1,x=[],C=[];for(;!this.tokenizer.endOfFile();){if(u=(e=this.tokenizer.nextToken())[0],"("===u||"["===u?C.push("("===u?")":"]"):"{"===u&&C.length>0?C.push("}"):u===C[C.length-1]&&C.pop(),0===C.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(x.length>0){for(b=x.length-1,m=x[b];m&&"space"===m[0];)m=x[--b];m&&(a.source.end=this.getPosition(m[3]||m[2]),a.source.end.offset++)}this.end(e);break}x.push(e)}else x.push(e);if(this.tokenizer.endOfFile()){w=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(a.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(a,"params",x),w&&(e=x[x.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 b=a-1;b>=0&&(u=e[b],"space"===u[0]||(m+=1,2!==m));b--);throw this.input.error("Missed semicolon","word"===u[0]?u[3]+1:u[2])}colon(e){let a,u,m,b=0;for(let[w,S]of e.entries()){if(u=S,m=u[0],"("===m&&(b+=1),")"===m&&(b-=1),0===b&&":"===m){if(a){if("word"===a[0]&&"progid"===a[1])continue;return w}this.doubleColon(u)}a=u}return!1}comment(e){let a=new pr;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 dr;this.init(u,e[0][2]);let m,b=e[e.length-1];for(";"===b[0]&&(this.semicolon=!0,e.pop()),u.source.end=this.getPosition(b[3]||b[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 w,S=[];for(;e.length&&(w=e[0][0],"space"===w||"comment"===w);)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),b="";for(let e=a;e>0;e--){let a=m[e][0];if(b.trim().startsWith("!")&&"space"!==a)break;b=m.pop()[1]+b}b.trim().startsWith("!")&&(u.important=!0,u.raws.important=b,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 fr;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,b=null,w=[],S=e[1].startsWith("--"),x=[],C=e;for(;C;){if(u=C[0],x.push(C),"("===u||"["===u)b||(b=C),w.push("("===u?")":"]");else if(S&&m&&"{"===u)b||(b=C),w.push("}");else if(0===w.length){if(";"===u){if(m)return void this.decl(x,S);break}if("{"===u)return void this.rule(x);if("}"===u){this.tokenizer.back(x.pop()),a=!0;break}":"===u&&(m=!0)}else u===w[w.length-1]&&(w.pop(),0===w.length&&(b=null));C=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),w.length>0&&this.unclosedBracket(b),a&&m){if(!S)for(;x.length&&(C=x[x.length-1][0],"space"===C||"comment"===C);)this.tokenizer.back(x.pop());this.decl(x,S)}else this.unknownWord(x)}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 b,w,S,x,C=u.length,I="",O=!0;for(let e=0;e<C;e+=1)b=u[e],w=b[0],"space"!==w||e!==C-1||m?"comment"===w?(x=u[e-1]?u[e-1][0]:"empty",S=u[e+1]?u[e+1][0]:"empty",mr[x]||mr[S]||","===I.slice(-1)?O=!1:I+=b[1]):I+=b[1]:O=!1;if(!O){let m=u.reduce((e,a)=>e+a[1],"");e.raws[a]={raw:m,value:I}}e[a]=I}rule(e){e.pop();let a=new fr;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 gr=Et,wr=gn,Sr=yr;function _t(e,a){let u=new wr(e,a),m=new Sr(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 Cr=_t;_t.default=_t,gr.registerParse(_t);let Tr=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 Pr=Tr;Tr.default=Tr;let Nr=Pr,Ar=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 Nr(e,a);return this.messages.push(u),u}warnings(){return this.messages.filter(e=>"warning"===e.type)}};var Dr=Ar;Ar.default=Ar;let Fr={};var so=function(e){Fr[e]||(Fr[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let $r=Et,jr=Wt,Ur=or,Br=Cr,Vr=Dr,Gr=On,Hr=Je,{isClean:qr,my:Zr}=Xe,Kr=so;const Yr={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},Jr={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},Xr={Once:!0,postcssPlugin:!0,prepare:!0};function Ne(e){return"object"==typeof e&&"function"==typeof e.then}function no(e){let a=!1,u=Yr[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[qr]=!1,e.nodes&&e.nodes.forEach(e=>Ps(e)),e}let Qr={},es=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 Vr)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=Br;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[Zr]&&$r.rebuild(m)}else m=Ps(a);this.result=new Vr(e,m,u),this.helpers={...Qr,postcss:Qr,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,b=a.split("."),w=m.split(".");(b[0]!==w[0]||parseInt(b[1])>parseInt(w[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(!Jr[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!Xr[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(Ne(u))try{await u}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qr];){e[qr]=!0;let a=[Gn(e)];for(;a.length>0;){let e=this.visitTick(a);if(Ne(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 Ne(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=Hr;e.syntax&&(a=e.syntax.stringify),e.stringifier&&(a=e.stringifier),a.stringify&&(a=a.stringify);let u=new Ur(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(Ne(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[qr];)e[qr]=!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||Kr("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(Ne(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,b]=m[a.visitorIndex];a.visitorIndex+=1,a.visitorIndex===m.length&&(a.visitors=[],a.visitorIndex=0),this.result.lastPlugin=e;try{return b(u.toProxy(),this.helpers)}catch(e){throw this.handleError(e,u)}}if(0!==a.iterator){let m,b=a.iterator;for(;m=u.nodes[u.indexes[b]];)if(u.indexes[b]+=1,!m[qr])return m[qr]=!0,void e.push(Gn(m));a.iterator=0,delete u.indexes[b]}let b=a.events;for(;a.eventIndex<b.length;){let e=b[a.eventIndex];if(a.eventIndex+=1,0===e)return void(u.nodes&&u.nodes.length&&(u[qr]=!0,a.iterator=u.getIterator()));if(this.listeners[e])return void(a.visitors=this.listeners[e])}e.pop()}walkSync(e){e[qr]=!0;let a=no(e);for(let u of a)if(0===u)e.nodes&&e.each(e=>{e[qr]||this.walkSync(e)});else{let a=this.listeners[u];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};es.registerPostcss=e=>{Qr=e};var ts=es;es.default=es,Gr.registerLazyResult(es),jr.registerLazyResult(es);let ns=or,rs=Cr;const ss=Dr;let os=Je,as=so,ls=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=rs;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,b=os;this.result=new ss(this._processor,m,this._opts),this.result.css=a;let w=this;Object.defineProperty(this.result,"root",{get:()=>w.root});let S=new ns(b,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||as("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 cs=ls;ls.default=ls;let us=Wt,ps=ts,ds=cs,hs=On,ms=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 ps(this,e,a):new ds(this,e,a)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var ys=ms;ms.default=ms,hs.registerProcessor(ms),us.registerProcessor(ms);let gs=Lt,bs=ut,ws=Et,vs=Ve,Ss=ht,xs=Wt,Is=zn,Os=gn,Es=ts,Ms=Mn,Ts=at,Rs=Cr,_s=ys,Ls=Dr,Ns=On,As=Ln,$s=Je,js=Pr;function L$1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new _s(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 b=a(...u);return b.postcssPlugin=e,b.postcssVersion=(new _s).version,b}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=$s,L$1.parse=Rs,L$1.fromJSON=Is,L$1.list=Ms,L$1.comment=e=>new bs(e),L$1.atRule=e=>new gs(e),L$1.decl=e=>new Ss(e),L$1.rule=e=>new As(e),L$1.root=e=>new Ns(e),L$1.document=e=>new xs(e),L$1.CssSyntaxError=vs,L$1.Declaration=Ss,L$1.Container=ws,L$1.Processor=_s,L$1.Document=xs,L$1.Comment=bs,L$1.Warning=js,L$1.AtRule=gs,L$1.Result=Ls,L$1.Input=Os,L$1.Rule=As,L$1.Root=Ns,L$1.Node=Ts,Es.registerPostcss(L$1);var Ws=L$1;L$1.default=L$1;const Vs=Yi(Ws);Vs.stringify,Vs.fromJSON,Vs.plugin,Vs.parse,Vs.list,Vs.document,Vs.comment,Vs.atRule,Vs.rule,Vs.decl,Vs.root,Vs.CssSyntaxError,Vs.Declaration,Vs.Container,Vs.Processor,Vs.Document,Vs.Comment,Vs.Warning,Vs.AtRule,Vs.Result,Vs.Input,Vs.Rule,Vs.Root,Vs.Node;var Gs=(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))(Gs||{}),Hs=(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))(Hs||{}),qs=(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))(qs||{}),Zs=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Zs||{}),Ks=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Ks||{}),Ys=(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))(Ys||{});function G(e,a,u=document){const m={capture:!0,passive:!0};return u.addEventListener(e,a,m),()=>u.removeEventListener(e,a,m)}const Xs="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 Qs={map:{},getId:()=>(console.error(Xs),-1),getNode:()=>(console.error(Xs),null),removeNodeFromMap(){console.error(Xs)},has:()=>(console.error(Xs),!1),reset(){console.error(Xs)}};function $e(e,a,u={}){let m=null,b=0;return function(...w){const S=Date.now();!b&&!1===u.leading&&(b=S);const x=a-(S-b),C=this;x<=0||x>a?(m&&(clearTimeout(m),m=null),b=S,e.apply(C,w)):!m&&!1!==u.trailing&&(m=setTimeout(()=>{b=!1===u.leading?0:Date.now(),m=null,e.apply(C,w)},x))}}function qt(e,a,u,m,b=window){const w=b.Object.getOwnPropertyDescriptor(e,a);return b.Object.defineProperty(e,a,m?u:{set(e){setTimeout(()=>{u.set.call(this,e)},0),w&&w.set&&w.set.call(this,e)}}),()=>qt(e,a,w||{},!0)}function Re(e,a,u){try{if(!(a in e))return()=>{};const m=e[a],b=u(m);return"function"==typeof b&&(b.prototype=b.prototype||{},Object.defineProperties(b,{__rrweb_original__:{enumerable:!1,value:m}})),e[a]=b,()=>{e[a]=m}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(Qs=new Proxy(Qs,{get:(e,a,u)=>("map"===a&&console.error(Xs),Reflect.get(e,a,u))}));let eo,to=Date.now;function po(e){var a,u,m,b,w,S;const x=e.document;return{left:x.scrollingElement?x.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:(null==x?void 0:x.documentElement.scrollLeft)||(null==(u=null==(a=null==x?void 0:x.body)?void 0:a.parentElement)?void 0:u.scrollLeft)||(null==(m=null==x?void 0:x.body)?void 0:m.scrollLeft)||0,top:x.scrollingElement?x.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==x?void 0:x.documentElement.scrollTop)||(null==(w=null==(b=null==x?void 0:x.body)?void 0:b.parentElement)?void 0:w.scrollTop)||(null==(S=null==x?void 0:x.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 b=go(e);if(!b)return!1;try{if("string"==typeof a){if(b.classList.contains(a)||m&&null!==b.closest("."+a))return!0}else if(Nt(b,a,m))return!0}catch{}return!(!u||!(b.matches(u)||m&&null!==b.closest(u)))}function fs(e,a,u){return!("TITLE"!==e.tagName||!u.headTitleMutations)||-2===a.getId(e)}function yo(e,a){if(We(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 Ds(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())||(to=()=>(new Date).getTime());class _l{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 zl(e){const a=e.ownerDocument;if(!a)return!1;const u=function Wl(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)||zl(e))}const M=e=>eo?(...a)=>{try{return e(...a)}catch(e){if(eo&&!0===eo(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 b=u||this.getIdToRemoteIdMap(e),w=m||this.getRemoteIdToIdMap(e);let S=b.get(a);return S||(S=this.generateIdFn(),b.set(a,S),w.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 Gs.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:Gs.IncrementalSnapshot,data:{source:Hs.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:a.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Gs.Meta:case Gs.Load:case Gs.DomContentLoaded:return!1;case Gs.Plugin:return a;case Gs.Custom:return this.replaceIds(a.data.payload,e,["id","parentId","previousId","nextId"]),a;case Gs.IncrementalSnapshot:switch(a.data.source){case Hs.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 Hs.Drag:case Hs.TouchMove:case Hs.MouseMove:return a.data.positions.forEach(a=>{this.replaceIds(a,e,["id"])}),a;case Hs.ViewportResize:return!1;case Hs.MediaInteraction:case Hs.MouseInteraction:case Hs.Scroll:case Hs.CanvasMutation:case Hs.Input:return this.replaceIds(a.data,e,["id"]),a;case Hs.StyleSheetRule:case Hs.StyleDeclaration:return this.replaceIds(a.data,e,["id"]),this.replaceStyleIds(a.data,e,["styleId"]),a;case Hs.Font:return a;case Hs.Selection:return a.data.ranges.forEach(a=>{this.replaceIds(a,e,["start","end"])}),a;case Hs.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 b of m)!Array.isArray(a[b])&&"number"!=typeof a[b]||(Array.isArray(a[b])?a[b]=e.getIds(u,a[b]):a[b]=e.getId(u,a[b]));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!==he.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 b=We(m.parentNode)?this.mirror.getId(So(m)):this.mirror.getId(m.parentNode),w=r(m);if(-1===b||-1===w)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:b,nextId:w,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 b={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};!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))}),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 b=this.attributeMap.get(e.target);if("IFRAME"===a.tagName&&"src"===u&&!this.keepIframeSrcFn(m)){if(a.contentDocument)return;u="rr_src"}if(b||(b={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(b),this.attributeMap.set(e.target,b)),"type"===u&&"INPUT"===a.tagName&&"password"===(e.oldValue||"").toLowerCase()&&a.setAttribute("data-rr-is-password","true"),!Or(a.tagName,u)&&(b.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),w=a.style.getPropertyPriority(e);m!==u.style.getPropertyValue(e)||w!==u.style.getPropertyPriority(e)?b.styleDiff[e]=""===w?m:[m,w]:b._unchangedStyles[e]=[m,w]}for(const e of Array.from(u.style))""===a.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(a=>this.genAdds(a,e.target)),e.removedNodes.forEach(a=>{const u=this.mirror.getId(a),m=We(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:!(!We(e.target)||!ze(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 oo=[];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 b=new Zl;oo.push(b),b.init(e);let w=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]&&(w=window[S]);const x=new w(M(b.processMutations.bind(b)));return x.observe(a,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),x}function Xl({mouseInteractionCb:e,doc:a,mirror:u,blockClass:m,blockSelector:b,sampling:w}){if(!1===w.mouseInteraction)return()=>{};const S=!0===w.mouseInteraction||void 0===w.mouseInteraction?{}:w.mouseInteraction,x=[];let C=null;return Object.keys(qs).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==S[e]).forEach(w=>{let S=fe(w);const I=(a=>w=>{const S=tt(w);if(Z(S,m,b,!0))return;let x=null,I=a;if("pointerType"in w){switch(w.pointerType){case"mouse":x=Zs.Mouse;break;case"touch":x=Zs.Touch;break;case"pen":x=Zs.Pen}x===Zs.Touch?qs[a]===qs.MouseDown?I="TouchStart":qs[a]===qs.MouseUp&&(I="TouchEnd"):Zs.Pen}else Ds(w)&&(x=Zs.Touch);null!==x?(C=x,(I.startsWith("Touch")&&x===Zs.Touch||I.startsWith("Mouse")&&x===Zs.Mouse)&&(x=null)):qs[a]===qs.Click&&(x=C,C=null);const O=Ds(w)?w.changedTouches[0]:w;if(!O)return;const E=u.getId(S),{clientX:_,clientY:D}=O;M(e)({type:qs[I],id:E,x:_,y:D,...null!==x&&{pointerType:x}})})(w);if(window.PointerEvent)switch(qs[w]){case qs.MouseDown:case qs.MouseUp:S=S.replace("mouse","pointer");break;case qs.TouchStart:case qs.TouchEnd:return}x.push(G(S,I,a))}),M(()=>{x.forEach(e=>e())})}function xo({scrollCb:e,doc:a,mirror:u,blockClass:m,blockSelector:b,sampling:w}){return G("scroll",M($e(M(w=>{const S=tt(w);if(!S||Z(S,m,b,!0))return;const x=u.getId(S);if(S===a&&a.defaultView){const u=po(a.defaultView);e({id:x,x:u.left,y:u.top})}else e({id:x,x:S.scrollLeft,y:S.scrollTop})}),w.scroll||100)),a)}const io=["INPUT","TEXTAREA","SELECT"],ao=new WeakMap;function ql({deviceChangeCb:e}){const t=(a,u)=>{const m=a.device.productName?[a.device.productName]:["Unknown USB Device"];e({type:"USB",action:u,devices:m,timestamp:Date.now()})},s=(a,u)=>{const m=a.device.productName?[a.device.productName]:["Unknown HID Device"];e({type:"HID",action:u,devices:m,timestamp:Date.now()})},r=()=>{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)})},i=()=>{const a=navigator.onLine?"online":"offline";e({type:"Network",action:"status",status:a,timestamp:Date.now()})},a=[G("online",()=>{i()},window),G("offline",()=>{i()},window)];"usb"in navigator&&(navigator.usb.addEventListener("connect",e=>t(e,"connect")),navigator.usb.addEventListener("disconnect",e=>t(e,"disconnect"))),"hid"in navigator&&(navigator.hid.addEventListener("connect",e=>s(e,"connect")),navigator.hid.addEventListener("disconnect",e=>s(e,"disconnect"))),navigator.mediaDevices.addEventListener("devicechange",r);const u=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);return()=>{navigator.usb.removeEventListener("connect",t),navigator.usb.removeEventListener("disconnect",t),navigator.hid.removeEventListener("connect",s),navigator.hid.removeEventListener("disconnect",s),a.forEach(e=>e()),navigator.mediaDevices.removeEventListener("devicechange",r),clearInterval(u)}}function zt(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,b;return e?(e.ownerNode?m=a.getId(e.ownerNode):b=u.getId(e),{styleId:b,id:m}):{}}function Io({mirror:e,stylesheetManager:a},u){var m,b,w;let S=null;S="#document"===u.nodeName?e.getId(u):e.getId(u.host);const x="#document"===u.nodeName?null==(m=u.defaultView)?void 0:m.Document:null==(w=null==(b=u.ownerDocument)?void 0:b.defaultView)?void 0:w.ShadowRoot,C=null!=x&&x.prototype?Object.getOwnPropertyDescriptor(null==x?void 0:x.prototype,"adoptedStyleSheets"):void 0;return null!==S&&-1!==S&&x&&C?(Object.defineProperty(u,"adoptedStyleSheets",{configurable:C.configurable,enumerable:C.enumerable,get(){var e;return null==(e=C.get)?void 0:e.call(this)},set(e){var u;const m=null==(u=C.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:C.configurable,enumerable:C.enumerable,get:C.get,set:C.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:b,scrollCb:w,viewportResizeCb:S,inputCb:x,typingCb:C,deviceChangeCb:I,mediaInteractionCb:O,styleSheetRuleCb:E,styleDeclarationCb:_,canvasMutationCb:D,fontCb:F,selectionCb:$,customElementCb:j}=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),b(...e)},e.scrollCb=(...e)=>{a.scroll&&a.scroll(...e),w(...e)},e.viewportResizeCb=(...e)=>{a.viewportResize&&a.viewportResize(...e),S(...e)},e.inputCb=(...e)=>{a.input&&a.input(...e),x(...e)},e.typingCb=(...e)=>{a.typing&&a.typing(...e),C(...e)},e.deviceChangeCb=(...e)=>{a.device&&a.device(...e),I(...e)},e.mediaInteractionCb=(...e)=>{a.mediaInteaction&&a.mediaInteaction(...e),O(...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),D(...e)},e.fontCb=(...e)=>{a.font&&a.font(...e),F(...e)},e.selectionCb=(...e)=>{a.selection&&a.selection(...e),$(...e)},e.customElementCb=(...e)=>{a.customElement&&a.customElement(...e),j(...e)}}(e,a),e.recordDOM&&(m=Co(e,e.doc));const b=function $l({mousemoveCb:e,sampling:a,doc:u,mirror:m}){if(!1===a.mousemove)return()=>{};const b="number"==typeof a.mousemove?a.mousemove:50,w="number"==typeof a.mousemoveCallback?a.mousemoveCallback:500;let S,x=[];const C=$e(M(a=>{const u=Date.now()-S;e(x.map(e=>(e.timeOffset-=u,e)),a),x=[],S=null}),w),I=M($e(M(e=>{const a=tt(e),{clientX:u,clientY:b}=Ds(e)?e.changedTouches[0]:e;S||(S=to()),x.push({x:u,y:b,id:m.getId(a),timeOffset:to()-S}),C(typeof DragEvent<"u"&&e instanceof DragEvent?Hs.Drag:e instanceof MouseEvent?Hs.MouseMove:Hs.TouchMove)}),b,{trailing:!1})),O=[G("mousemove",I,u),G("touchmove",I,u),G("drag",I,u)];return M(()=>{O.forEach(e=>e())})}(e),w=Xl(e),S=xo(e),x=function Hl({viewportResizeCb:e},{win:a}){let u=-1,m=-1;const b=M($e(M(()=>{const a=fo(),b=mo();(u!==a||m!==b)&&(e({width:Number(b),height:Number(a)}),u=a,m=b)}),200));return G("resize",b,a)}(e,{win:u}),C=function Kl({inputCb:e,doc:a,mirror:u,blockClass:m,blockSelector:b,ignoreClass:w,ignoreSelector:S,maskInputOptions:x,maskInputFn:C,sampling:I,userTriggeredOnInput:O}){function p(e){let u=tt(e);const I=e.isTrusted,E=u&&u.tagName;if(u&&"OPTION"===E&&(u=u.parentElement),!u||!E||io.indexOf(E)<0||Z(u,m,b,!0)||u.classList.contains(w)||S&&u.matches(S))return;let _=u.value,D=!1;const F=Yt(u)||"",{value:$,masked:j}=Zt({element:u,maskInputOptions:x,tagName:E,type:F,value:_,maskInputFn:C});_=$,("radio"===F||"checkbox"===F)&&(D=u.checked),f(u,O?{text:_,isChecked:D,masked:j,userTriggered:I}:{text:_,isChecked:D,masked:j});const U=u.name;"radio"===F&&U&&D&&a.querySelectorAll(`input[type='radio'][name='${U}']`).forEach(e=>{if(e!==u){const a=e.value;f(e,O?{text:a,isChecked:!D,masked:j,userTriggered:!1}:{text:a,isChecked:!D,masked:j})}})}function f(a,m){const b=ao.get(a);if(!b||b.text!==m.text||b.isChecked!==m.isChecked||b.masked!==m.masked){ao.set(a,m);const b=u.getId(a);M(e)({...m,id:b})}}const E=("last"===I.input?["change"]:["input","change"]).map(e=>G(e,M(p),a)),_=a.defaultView;if(!_)return()=>{E.forEach(e=>e())};const D=_.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 D&&D.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),I=function Ql({typingCb:e,doc:a,maskInputOptions:u,maskInputFn:m}){const b=G("keydown",a=>{const b=a.target;let w=!1;const S={key:a.key,code:a.code,altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey},x=b&&b.tagName,C=Yt(b)||"";let I=b.value;if(b&&("INPUT"==b.tagName||"TEXTAREA"==b.tagName)){const{value:e,masked:a}=Zt({element:b,maskInputOptions:u,tagName:x,type:C,value:I,maskInputFn:m});I=e,w=a}e({source:Hs.Typing,id:null==b?void 0:b.id,text:I,isMasked:w,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 b=Array.from((null==(a=e.parentNode)?void 0:a.children)||[]);b.length>1&&(m+=`:nth-child(${b.indexOf(e)+1})`),u.unshift(m),e=e.parentElement}return u.join(" > ")})(b),keyInfo:S})},a);return()=>{b()}}(e),O=ql(e),E=function su({mediaInteractionCb:e,blockClass:a,blockSelector:u,mirror:m,sampling:b,doc:w}){const S=M(w=>$e(M(b=>{const S=tt(b);if(!S||Z(S,a,u,!0))return;const{currentTime:x,volume:C,muted:I,playbackRate:O,loop:E}=S;e({type:w,id:m.getId(S),currentTime:x,volume:C,muted:I,playbackRate:O,loop:E})}),b.media||500)),x=[G("play",S(Ys.Play),w),G("pause",S(Ys.Pause),w),G("seeked",S(Ys.Seeked),w),G("volumechange",S(Ys.VolumeChange),w),G("ratechange",S(Ys.RateChange),w)];return M(()=>{x.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 b=m.CSSStyleSheet.prototype.insertRule;m.CSSStyleSheet.prototype.insertRule=new Proxy(b,{apply:M((m,b,w)=>{const[S,x]=w,{id:C,styleId:I}=ue(b,a,u.styleMirror);return(C&&-1!==C||I&&-1!==I)&&e({id:C,styleId:I,adds:[{rule:S,index:x}]}),m.apply(b,w)})});const w=m.CSSStyleSheet.prototype.deleteRule;let S,x;m.CSSStyleSheet.prototype.deleteRule=new Proxy(w,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,removes:[{index:S}]}),m.apply(b,w)})}),m.CSSStyleSheet.prototype.replace&&(S=m.CSSStyleSheet.prototype.replace,m.CSSStyleSheet.prototype.replace=new Proxy(S,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,replace:S}),m.apply(b,w)})})),m.CSSStyleSheet.prototype.replaceSync&&(x=m.CSSStyleSheet.prototype.replaceSync,m.CSSStyleSheet.prototype.replaceSync=new Proxy(x,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,replaceSync:S}),m.apply(b,w)})}));const C={};mt("CSSGroupingRule")?C.CSSGroupingRule=m.CSSGroupingRule:(mt("CSSMediaRule")&&(C.CSSMediaRule=m.CSSMediaRule),mt("CSSConditionRule")&&(C.CSSConditionRule=m.CSSConditionRule),mt("CSSSupportsRule")&&(C.CSSSupportsRule=m.CSSSupportsRule));const I={};return Object.entries(C).forEach(([m,b])=>{I[m]={insertRule:b.prototype.insertRule,deleteRule:b.prototype.deleteRule},b.prototype.insertRule=new Proxy(I[m].insertRule,{apply:M((m,b,w)=>{const[S,x]=w,{id:C,styleId:I}=ue(b.parentStyleSheet,a,u.styleMirror);return(C&&-1!==C||I&&-1!==I)&&e({id:C,styleId:I,adds:[{rule:S,index:[...zt(b),x||0]}]}),m.apply(b,w)})}),b.prototype.deleteRule=new Proxy(I[m].deleteRule,{apply:M((m,b,w)=>{const[S]=w,{id:x,styleId:C}=ue(b.parentStyleSheet,a,u.styleMirror);return(x&&-1!==x||C&&-1!==C)&&e({id:x,styleId:C,removes:[{index:[...zt(b),S]}]}),m.apply(b,w)})})}),M(()=>{m.CSSStyleSheet.prototype.insertRule=b,m.CSSStyleSheet.prototype.deleteRule=w,S&&(m.CSSStyleSheet.prototype.replace=S),x&&(m.CSSStyleSheet.prototype.replaceSync=x),Object.entries(C).forEach(([e,a])=>{a.prototype.insertRule=I[e].insertRule,a.prototype.deleteRule=I[e].deleteRule})})}(e,{win:u}),d3=Io(e,e.doc),g2=function tu({styleDeclarationCb:e,mirror:a,ignoreCSSAttributes:u,stylesheetManager:m},{win:b}){const w=b.CSSStyleDeclaration.prototype.setProperty;b.CSSStyleDeclaration.prototype.setProperty=new Proxy(w,{apply:M((b,S,x)=>{var C;const[I,O,E]=x;if(u.has(I))return w.apply(S,[I,O,E]);const{id:_,styleId:D}=ue(null==(C=S.parentRule)?void 0:C.parentStyleSheet,a,m.styleMirror);return(_&&-1!==_||D&&-1!==D)&&e({id:_,styleId:D,set:{property:I,value:O,priority:E},index:zt(S.parentRule)}),b.apply(S,x)})});const S=b.CSSStyleDeclaration.prototype.removeProperty;return b.CSSStyleDeclaration.prototype.removeProperty=new Proxy(S,{apply:M((b,w,x)=>{var C;const[I]=x;if(u.has(I))return S.apply(w,[I]);const{id:O,styleId:E}=ue(null==(C=w.parentRule)?void 0:C.parentStyleSheet,a,m.styleMirror);return(O&&-1!==O||E&&-1!==E)&&e({id:O,styleId:E,remove:{property:I},index:zt(w.parentRule)}),b.apply(w,x)})}),M(()=>{b.CSSStyleDeclaration.prototype.setProperty=w,b.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=[],b=new WeakMap,w=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 w(e,m,u);return b.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=b.get(u);a&&(e(a),b.delete(u))}),0),a.apply(this,[u])}});return m.push(()=>{u.FontFace=w}),m.push(S),M(()=>{m.forEach(e=>e())})}(e)));const _=function ru(e){const{doc:a,mirror:u,blockClass:m,blockSelector:b,selectionCb:w}=e;let S=!0;const x=M(()=>{const e=a.getSelection();if(!e||S&&null!=e&&e.isCollapsed)return;S=e.isCollapsed||!1;const x=[],C=e.rangeCount||0;for(let a=0;a<C;a++){const w=e.getRangeAt(a),{startContainer:S,startOffset:C,endContainer:I,endOffset:O}=w;Z(S,m,b,!0)||Z(I,m,b,!0)||x.push({start:u.getId(S),startOffset:C,end:u.getId(I),endOffset:O})}w({ranges:x})});return x(),G("selectionchange",x)}(e),D=function ou({doc:e,customElementCb:a}){const u=e.defaultView;return u&&u.customElements?Re(u.customElements,"define",function(e){return function(u,m,b){try{a({define:{name:u}})}catch{console.warn(`Custom element callback failed for ${u}`)}return e.apply(this,[u,m,b])}}):()=>{}}(e),F=[];for(const a of e.plugins)F.push(a.observer(a.callback,u,a.options));return M(()=>{oo.forEach(e=>e.reset()),null==m||m.disconnect(),b(),w(),S(),x(),C(),I(),E(),f(),d3(),g2(),h(),_(),D(),O(),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 lo="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK",co=typeof self<"u"&&self.Blob&&new Blob([(uo=lo,Uint8Array.from(atob(uo),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var uo;function uu(e){let a;try{if(a=co&&(self.URL||self.webkitURL).createObjectURL(co),!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,"+lo,{name:null==e?void 0:e.name})}finally{a&&(self.URL||self.webkitURL).revokeObjectURL(a)}}for(var ho="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo=typeof Uint8Array>"u"?[]:new Uint8Array(256),_o=0;_o<64;_o++)Mo[ho.charCodeAt(_o)]=_o;const Po=new Map;const Oo=(e,a,u)=>{if(!e||!Ro(e,a)&&"object"!=typeof e)return;const m=function pu(e,a){let u=Po.get(e);return u||(u=new Map,Po.set(e,u)),u.has(a)||u.set(a,[]),u.get(a)}(u,e.constructor.name);let b=m.indexOf(e);return-1===b&&(b=m.length,m.push(e)),b};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,b="";for(a=0;a<m;a+=3)b+=ho[u[a]>>2],b+=ho[(3&u[a])<<4|u[a+1]>>4],b+=ho[(15&u[a+1])<<2|u[a+2]>>6],b+=ho[63&u[a+2]];return m%3==2?b=b.substring(0,b.length-1)+"=":m%3==1&&(b=b.substring(0,b.length-2)+"=="),b}(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 b=[];try{const w=Re(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(b,...w){if(!Z(this,a,u,!0)){const e=function fu(e){return"experimental-webgl"===e?"webgl":e}(b);if("__context"in this||(this.__context=e),m&&["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 tr(e,a,u,m,b,w){const S=[],x=Object.getOwnPropertyNames(e);for(const C of x)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(C))try{if("function"!=typeof e[C])continue;const x=Re(e,C,function(e){return function(...S){const x=e.apply(this,S);if(Oo(x,w,this),"tagName"in this.canvas&&!Z(this.canvas,m,b,!0)){const e=Eo(S,w,this),m={type:a,property:C,args:e};u(this.canvas,m)}return x}});S.push(x)}catch{const m=qt(e,C,{set(e){u(this.canvas,{type:a,property:C,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:b,recordCanvas:w,dataURLOptions:S}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,w&&"all"===a&&this.initCanvasMutationObserver(u,m,b),w&&"number"==typeof a&&this.initCanvasFPSObserver(a,u,m,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,a,u,m,b){const w=er(a,u,m,!0),S=new Map,x=new uu;x.onmessage=e=>{const{id:a}=e.data;if(S.set(a,!1),!("base64"in e.data))return;const{base64:u,type:m,width:b,height:w}=e.data;this.mutationCb({id:a,type:Ks["2D"],commands:[{property:"clearRect",args:[0,0,b,w]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:u}],type:m}]},0,0]}]})};const C=1e3/e;let I,O=0;const d3=e=>{O&&e-O<C||(O=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);x.postMessage({id:u,bitmap:m,width:e.width,height:e.height,dataURLOptions:b.dataURLOptions},[m])})),I=requestAnimationFrame(d3)};I=requestAnimationFrame(d3),this.resetObservers=()=>{w(),cancelAnimationFrame(I)}}initCanvasMutationObserver(e,a,u){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const m=er(e,a,u,!1),b=function du(e,a,u,m){const b=[],w=Object.getOwnPropertyNames(a.CanvasRenderingContext2D.prototype);for(const S of w)try{if("function"!=typeof a.CanvasRenderingContext2D.prototype[S])continue;const w=Re(a.CanvasRenderingContext2D.prototype,S,function(b){return function(...w){return Z(this.canvas,u,m,!0)||setTimeout(()=>{const u=Eo(w,a,this);e(this.canvas,{type:Ks["2D"],property:S,args:u})},0),b.apply(this,w)}});b.push(w)}catch{const u=qt(a.CanvasRenderingContext2D.prototype,S,{set(a){e(this.canvas,{type:Ks["2D"],property:S,args:[a],setter:!0})}});b.push(u)}return()=>{b.forEach(e=>e())}}(this.processMutation.bind(this),e,a,u),w=function mu(e,a,u,m){const b=[];return b.push(...tr(a.WebGLRenderingContext.prototype,Ks.WebGL,e,u,m,a)),typeof a.WebGL2RenderingContext<"u"&&b.push(...tr(a.WebGL2RenderingContext.prototype,Ks.WebGL2,e,u,m,a)),()=>{b.forEach(e=>e())}}(this.processMutation.bind(this),e,a,u);this.resetObservers=()=>{m(),b(),w()}}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:b}=u[0];this.mutationCb({id:a,type:b,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(!ze(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 b=e.call(this,m);return this.shadowRoot&&vo(this)&&u.addShadowRoot(this.shadowRoot,a),b}}))}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 _l),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 No,Ao,Do,Fo=!1;var $o;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==($o=e.contentWindow)?void 0:$o.Array.from)||Array.from,document.body.removeChild(e)}}catch(uo){console.debug("Unable to override Array.from",uo)}const jo=function Ci(){return new me}();function ae(e={}){const{emit:a,checkoutEveryNms:u,checkoutEveryNth:m,blockClass:b="rr-block",blockSelector:w=null,ignoreClass:S="rr-ignore",ignoreSelector:x=null,maskTextClass:C="rr-mask",maskTextSelector:I=null,inlineStylesheet:O=!0,maskAllInputs:E,maskInputOptions:_,slimDOMOptions:D,maskInputFn:F,maskTextFn:$,hooks:j,packFn:U,sampling:B={},dataURLOptions:V={},mousemoveWait:H,recordDOM:q=!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:ne,keepIframeSrcFn:re=()=>!1,ignoreCSSAttributes:se=new Set([]),errorHandler:oe}=e;!function Bl(e){eo=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!==H&&void 0===B.mousemove&&(B.mousemove=H),jo.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},pe=!0===D||"all"===D?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===D,headMetaDescKeywords:"all"===D,headTitleMutations:"all"===D}:D||{};!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 de,he=0;const vn=e=>{for(const a of ne||[])a.eventProcessor&&(e=a.eventProcessor(e));return U&&!le&&(e=U(e)),e};No=(e,b)=>{var w;const S=e;if(S.timestamp=to(),null!=(w=oo[0])&&w.isFrozen()&&S.type!==Gs.FullSnapshot&&!(S.type===Gs.IncrementalSnapshot&&S.data.source===Hs.Mutation)&&oo.forEach(e=>e.unfreeze()),ie)null==a||a(vn(S),b);else if(le){const e={type:"@sailfish-rrweb/rrweb",event:vn(S),origin:window.location.origin,isCheckout:b};window.parent.postMessage(e,"*")}if(S.type===Gs.FullSnapshot)de=S,he=0;else if(S.type===Gs.IncrementalSnapshot){if(S.data.source===Hs.Mutation&&S.data.isAttachIframe)return;he++;const e=m&&he>=m,a=u&&S.timestamp-de.timestamp>u;(e||a)&&Ao(!0)}};const rt=e=>{No({type:Gs.IncrementalSnapshot,data:{source:Hs.Mutation,...e}})},kn=e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.Scroll,...e}}),Cn=e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.CanvasMutation,...e}}),ye=new bu({mutationCb:rt,adoptedStyleSheetCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.AdoptedStyleSheet,...e}})}),ge=new Vl({mirror:jo,mutationCb:rt,stylesheetManager:ye,recordCrossOriginIframes:J,wrappedEmit:No});for(const e of ne||[])e.getMirror&&e.getMirror({nodeMirror:jo,crossOriginIframeMirror:ge.crossOriginIframeMirror,crossOriginIframeStyleMirror:ge.crossOriginIframeStyleMirror});const be=new yu;Do=new gu({recordCanvas:Y,mutationCb:Cn,win:window,blockClass:b,blockSelector:w,mirror:jo,sampling:B.canvas,dataURLOptions:V});const we=new wu({mutationCb:rt,scrollCb:kn,bypassOptions:{blockClass:b,blockSelector:w,maskTextClass:C,maskTextSelector:I,inlineStylesheet:O,maskInputOptions:ce,dataURLOptions:V,maskTextFn:$,maskInputFn:F,recordCanvas:Y,inlineImages:te,sampling:B,slimDOMOptions:pe,iframeManager:ge,stylesheetManager:ye,canvasManager:Do,keepIframeSrcFn:re,processedNodeManager:be},mirror:jo});Ao=(e=!1)=>{if(!q)return;No({type:Gs.Meta,data:{href:window.location.href,width:mo(),height:fo()}},e),ye.reset(),we.init(),oo.forEach(e=>e.lock());const a=function Zi(e,a){const{mirror:u=new me,blockClass:m="rr-block",blockSelector:b=null,maskTextClass:w="rr-mask",maskTextSelector:S=null,inlineStylesheet:x=!0,inlineImages:C=!1,recordCanvas:I=!1,maskAllInputs:O=!1,maskTextFn:E,maskInputFn:_,slimDOM:D=!1,dataURLOptions:F,preserveWhiteSpace:$,onSerialize:j,onIframeLoad:U,iframeLoadTimeout:B,onStylesheetLoad:V,stylesheetLoadTimeout:H,keepIframeSrcFn:q=()=>!1}=a||{};return Se(e,{doc:e,mirror:u,blockClass:m,blockSelector:b,maskTextClass:w,maskTextSelector:S,skipChild:!1,inlineStylesheet:x,maskInputOptions:!0===O?{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===O?{password:!0}:O,maskTextFn:E,maskInputFn:_,slimDOMOptions:!0===D||"all"===D?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===D,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===D?{}:D,dataURLOptions:F,inlineImages:C,recordCanvas:I,preserveWhiteSpace:$,onSerialize:j,onIframeLoad:U,iframeLoadTimeout:B,onStylesheetLoad:V,stylesheetLoadTimeout:H,keepIframeSrcFn:q,newlyAddedElement:!1})}(document,{mirror:jo,blockClass:b,blockSelector:w,maskTextClass:C,maskTextSelector:I,inlineStylesheet:O,maskAllInputs:ce,maskTextFn:$,maskInputFn:F,slimDOM:pe,dataURLOptions:V,recordCanvas:Y,inlineImages:te,onSerialize:e=>{wo(e,jo)&&ge.addIframe(e),bo(e,jo)&&ye.trackLinkElement(e),Fs(e)&&we.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,a)=>{ge.attachIframe(e,a),we.observeAttachShadow(e)},onStylesheetLoad:(e,a)=>{ye.attachLinkElement(e,a)},keepIframeSrcFn:re});if(!a)return console.warn("Failed to snapshot the document");No({type:Gs.FullSnapshot,data:{node:a,initialOffset:po(window)}},e),oo.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&ye.adoptStyleSheets(document.adoptedStyleSheets,jo.getId(document))};try{const e=[],K=e=>{var a;return M(au)({mutationCb:rt,mousemoveCb:(e,a)=>No({type:Gs.IncrementalSnapshot,data:{source:a,positions:e}}),mouseInteractionCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.MouseInteraction,...e}}),scrollCb:kn,viewportResizeCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.ViewportResize,...e}}),inputCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.Input,...e}}),mediaInteractionCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.MediaInteraction,...e}}),styleSheetRuleCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.StyleSheetRule,...e}}),styleDeclarationCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.StyleDeclaration,...e}}),canvasMutationCb:Cn,fontCb:e=>No({type:Gs.IncrementalSnapshot,data:{source:Hs.Font,...e}}),selectionCb:e=>{No({type:Gs.IncrementalSnapshot,data:{source:Hs.Selection,...e}})},customElementCb:e=>{No({type:Gs.IncrementalSnapshot,data:{source:Hs.CustomElement,...e}})},typingCb:e=>{No({type:Gs.IncrementalSnapshot,data:{...e}})},deviceChangeCb:e=>{No({type:Gs.Device,data:{...e}})},blockClass:b,ignoreClass:S,ignoreSelector:x,maskTextClass:C,maskTextSelector:I,maskInputOptions:ce,inlineStylesheet:O,sampling:B,recordDOM:q,recordCanvas:Y,inlineImages:te,userTriggeredOnInput:Q,collectFonts:ee,doc:e,maskInputFn:F,maskTextFn:$,keepIframeSrcFn:re,blockSelector:w,slimDOMOptions:pe,dataURLOptions:V,mirror:jo,iframeManager:ge,stylesheetManager:ye,shadowDomManager:we,processedNodeManager:be,canvasManager:Do,ignoreCSSAttributes:se,plugins:(null==(a=null==ne?void 0:ne.filter(e=>e.observer))?void 0:a.map(e=>({observer:e.observer,options:e.options,callback:a=>No({type:Gs.Plugin,data:{plugin:e.name,payload:a}})})))||[]},j)};ge.addLoadListener(a=>{try{e.push(K(a.contentDocument))}catch(e){console.warn(e)}});const W=()=>{Ao(),e.push(K(document)),Fo=!0};return"interactive"===document.readyState||"complete"===document.readyState?W():(e.push(G("DOMContentLoaded",()=>{No({type:Gs.DomContentLoaded,data:{}}),"DOMContentLoaded"===X&&W()})),e.push(G("load",()=>{No({type:Gs.Load,data:{}}),"load"===X&&W()},window))),()=>{e.forEach(e=>e()),be.destroy(),Fo=!1,function jl(){eo=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(!Fo)throw new Error("please add custom event after start recording");No({type:Gs.Custom,data:{tag:e,payload:a}})},ae.addSailfishEvent=(e,a)=>{if(!Fo)throw new Error("please add Sailfish event after start recording");No({type:e,data:{tag:"sailfish-zendesk-test-tag",payload:a}})},ae.freezePage=()=>{oo.forEach(e=>e.freeze())},ae.takeFullSnapshot=e=>{if(!Fo)throw new Error("please take full snapshot after start recording");Ao(e)},ae.mirror=jo;var Uo={exports:{}},Vo=String,Lo=function(){return{isColorSupported:!1,reset:Vo,bold:Vo,dim:Vo,italic:Vo,underline:Vo,inverse:Vo,hidden:Vo,strikethrough:Vo,black:Vo,red:Vo,green:Vo,yellow:Vo,blue:Vo,magenta:Vo,cyan:Vo,white:Vo,gray:Vo,bgBlack:Vo,bgRed:Vo,bgGreen:Vo,bgYellow:Vo,bgBlue:Vo,bgMagenta:Vo,bgCyan:Vo,bgWhite:Vo,blackBright:Vo,redBright:Vo,greenBright:Vo,yellowBright:Vo,blueBright:Vo,magentaBright:Vo,cyanBright:Vo,whiteBright:Vo,bgBlackBright:Vo,bgRedBright:Vo,bgGreenBright:Vo,bgYellowBright:Vo,bgBlueBright:Vo,bgMagentaBright:Vo,bgCyanBright:Vo,bgWhiteBright:Vo}};Uo.exports=Lo(),Uo.exports.createColors=Lo;var Go=Uo.exports;const Ho=vu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));let qo=Go,Zo=Ho,Ko=class To extends Error{constructor(e,a,u,m,b,w){super(e),this.name="CssSyntaxError",this.reason=e,b&&(this.file=b),m&&(this.source=m),w&&(this.plugin=w),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=qo.isColorSupported);let n=e=>e,r=e=>e,i=e=>e;if(e){let{bold:e,gray:a,red:u}=qo.createColors(!0);r=a=>e(u(a)),n=e=>a(e),Zo&&(i=e=>Zo(e))}let u=a.split(/\r?\n/),m=Math.max(this.line-3,0),b=Math.min(this.line+2,u.length),w=String(b).length;return u.slice(m,b).map((e,a)=>{let u=m+1+a,b=" "+(" "+u).slice(-w)+" | ";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),w=e.slice(u,m),S=n(b.replace(/\d/g," "))+e.slice(0,Math.min(this.column-1,a-1)).replace(/[^\t]/g," ");return r(">")+n(b)+i(w)+"\n "+S+r("^")}let a=n(b.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return r(">")+n(b)+i(e)+"\n "+a+r("^")}return" "+n(b)+i(e)}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}};var Yo=Ko;Ko.default=Ko;const Jo={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};let Xo=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 b=(e.raws.between||"")+(a?";":"");this.builder(u+m+b,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,b=0;for(;m&&"root"!==m.type;)b+=1,m=m.parent;if(u.includes("\n")){let a=this.raw(e,null,"indent");if(a.length)for(let e=0;e<b;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 b=e.nodes[m],w=this.raw(b,"before");w&&this.builder(w),this.stringify(b,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 b=e.parent;if("before"===u&&(!b||"root"===b.type&&b.first===e||b&&"document"===b.type))return"";if(!b)return Jo[u];let w=e.root();if(w.rawCache||(w.rawCache={}),typeof w.rawCache[u]<"u")return w.rawCache[u];if("before"===u||"after"===u)return this.beforeAfter(e,u);{let b="raw"+function Iu(e){return e[0].toUpperCase()+e.slice(1)}(u);this[b]?m=this[b](w,e):w.walk(e=>{if(m=e.raws[a],typeof m<"u")return!1})}return typeof m>"u"&&(m=Jo[u]),w.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 Qo=Xo;Xo.default=Xo;let ei=Qo;function zs(e,a){new ei(a).stringify(e)}var ti=zs;zs.default=zs;var si={};si.isClean=Symbol("isClean"),si.my=Symbol("my");let ii=Yo,ai=Qo,li=ti,{isClean:ci,my:ui}=si;function Bs(e,a){let u=new e.constructor;for(let m in e){if(!Object.prototype.hasOwnProperty.call(e,m)||"proxyCache"===m)continue;let b=e[m],w=typeof b;"parent"===m&&"object"===w?a&&(u[m]=a):"source"===m?u[m]=b:Array.isArray(b)?u[m]=b.map(e=>Bs(e,u)):("object"===w&&null!==b&&(b=Bs(b)),u[m]=b)}return u}function Fe(e,a){if(a&&typeof a.offset<"u")return a.offset;let u=1,m=1,b=0;for(let w=0;w<e.length;w++){if(m===a.line&&u===a.column){b=w;break}"\n"===e[w]?(u=1,m+=1):u+=1}return b}let pi=class{get proxyOf(){return this}constructor(e={}){this.raws={},this[ci]=!1,this[ui]=!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=Bs(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 ii(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[ci]=!0}markDirty(){if(this[ci]){this[ci]=!1;let e=this;for(;e=e.parent;)e[ci]=!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,b=Fe(m,this.source.start),w=b+e;for(let e=b;e<w;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,b=m.slice(Fe(m,this.source.start),Fe(m,this.source.end)).indexOf(e.word);-1!==b&&(a=this.positionInside(b),u=this.positionInside(b+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 ai).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 b=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 w=a.get(m.input);null==w&&(w=b,a.set(m.input,b),b++),u[e]={end:m.end,inputId:w,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=li){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 di=pi;pi.default=pi;let hi=di,fi=class extends hi{constructor(e){super(e),this.type="comment"}};var mi=fi;fi.default=fi;let yi=di,gi=class extends yi{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 Ii=gi;gi.default=gi;let Mi,Ti,Ri,Li,Pi=mi,Ni=Ii,Ai=di,{isClean:Hi,my:qi}=si;function Wo(e){return e.map(e=>(e.nodes&&(e.nodes=Wo(e.nodes)),delete e.source,e))}function zo(e){if(e[Hi]=!1,e.proxyOf.nodes)for(let a of e.proxyOf.nodes)zo(a)}let Ji=class Bo extends Ai{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),b=this.normalize(a,this.proxyOf.nodes[m]).reverse();m=this.index(e);for(let e of b)this.proxyOf.nodes.splice(m+1,0,e);for(let e in this.indexes)u=this.indexes[e],m<u&&(this.indexes[e]=u+b.length);return this.markDirty(),this}insertBefore(e,a){let u,m=this.index(e),b=0===m&&"prepend",w=this.normalize(a,this.proxyOf.nodes[m],b).reverse();m=this.index(e);for(let e of w)this.proxyOf.nodes.splice(m,0,e);for(let e in this.indexes)u=this.indexes[e],m<=u&&(this.indexes[e]=u+w.length);return this.markDirty(),this}normalize(e,a){if("string"==typeof e)e=Wo(Ti(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 Ni(e)]}else if(e.selector||e.selectors)e=[new Li(e)];else if(e.name)e=[new Mi(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new Pi(e)]}return e.map(e=>(e[qi]||Bo.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[Hi]&&zo(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)}))}};Ji.registerParse=e=>{Ti=e},Ji.registerRule=e=>{Li=e},Ji.registerAtRule=e=>{Mi=e},Ji.registerRoot=e=>{Ri=e};var Xi=Ji;Ji.default=Ji,Ji.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,Mi.prototype):"rule"===e.type?Object.setPrototypeOf(e,Li.prototype):"decl"===e.type?Object.setPrototypeOf(e,Ni.prototype):"comment"===e.type?Object.setPrototypeOf(e,Pi.prototype):"root"===e.type&&Object.setPrototypeOf(e,Ri.prototype),e[qi]=!0,e.nodes&&e.nodes.forEach(e=>{Ji.rebuild(e)})};let Qi=Xi,ea=class extends Qi{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 ta=ea;ea.default=ea,Qi.registerAtRule(ea);let na,ra,sa=Xi,oa=class extends sa{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(e={}){return new na(new ra,this,e).stringify()}};oa.registerLazyResult=e=>{na=e},oa.registerProcessor=e=>{ra=e};var ia=oa;oa.default=oa;var aa={nanoid:(e=21)=>{let a="",u=0|e;for(;u--;)a+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return a}};let{existsSync:la,readFileSync:ca}=Ho,{dirname:ua,join:pa}=Ho,{SourceMapConsumer:ha,SourceMapGenerator:fa}=Ho;let ma=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=ua(this.mapFile)),m&&(this.text=m)}consumer(){return this.consumerCache||(this.consumerCache=new ha(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 Bu(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=ua(e),la(e))return this.mapFile=e,ca(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 ha)return fa.fromSourceMap(a).toString();if(a instanceof fa)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=pa(ua(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 ya=ma;ma.default=ma;let{nanoid:ga}=aa,{isAbsolute:ba,resolve:wa}=Ho,{SourceMapConsumer:va,SourceMapGenerator:Sa}=Ho,{fileURLToPath:ka,pathToFileURL:xa}=Ho,Ca=Yo,Ia=ya,Oa=Ho,Ea=Symbol("fromOffsetCache"),Ma=!(!va||!Sa),Ta=!(!wa||!ba),Ra=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&&(!Ta||/^\w+:\/\//.test(a.from)||ba(a.from)?this.file=a.from:this.file=wa(a.from)),Ta&&Ma){let e=new Ia(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 "+ga(6)+">"),this.map&&(this.map.file=this.from)}error(e,a,u,m={}){let b,w,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);w=e.line,b=e.col}else w=m.line,b=m.column}else if(!u){let e=this.fromOffset(a);a=e.line,u=e.col}let x=this.origin(a,u,w,b);return S=x?new Ca(e,void 0===x.endLine?x.line:{column:x.column,line:x.line},void 0===x.endLine?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,m.plugin):new Ca(e,void 0===w?a:{column:u,line:a},void 0===w?u:{column:b,line:w},this.css,this.file,m.plugin),S.input={column:u,endColumn:b,endLine:w,line:a,source:this.css},this.file&&(xa&&(S.input.url=xa(this.file).toString()),S.input.file=this.file),S}fromOffset(e){let a,u;if(this[Ea])u=this[Ea];else{let e=this.css.split("\n");u=new Array(e.length);let a=0;for(let m=0,b=e.length;m<b;m++)u[m]=a,a+=e[m].length+1;this[Ea]=u}a=u[u.length-1];let m=0;if(e>=a)m=u.length-1;else{let a,b=u.length-2;for(;m<b;)if(a=m+(b-m>>1),e<u[a])b=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:wa(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,a,u,m){if(!this.map)return!1;let b,w,S=this.map.consumer(),x=S.originalPositionFor({column:a,line:e});if(!x.source)return!1;"number"==typeof u&&(b=S.originalPositionFor({column:m,line:u})),w=ba(x.source)?xa(x.source):new URL(x.source,this.map.consumer().sourceRoot||xa(this.map.mapFile));let C={column:x.column,endColumn:b&&b.column,endLine:b&&b.line,line:x.line,url:w.toString()};if("file:"===w.protocol){if(!ka)throw new Error("file: protocol is not available in this PostCSS build");C.file=ka(w)}let I=S.sourceContentFor(x.source);return I&&(C.source=I),C}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 _a=Ra;Ra.default=Ra,Oa&&Oa.registerInput&&Oa.registerInput(Ra);let La,Pa,Na=Xi,Aa=class extends Na{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 La(new Pa,this,e).stringify()}};Aa.registerLazyResult=e=>{La=e},Aa.registerProcessor=e=>{Pa=e};var Da=Aa;Aa.default=Aa,Na.registerRoot(Aa);let Fa={comma:e=>Fa.split(e,[","],!0),space(e){let a=[" ","\n","\t"];return Fa.split(e,a)},split(e,a,u){let m=[],b="",w=!1,S=0,x=!1,C="",I=!1;for(let u of e)I?I=!1:"\\"===u?I=!0:x?u===C&&(x=!1):'"'===u||"'"===u?(x=!0,C=u):"("===u?S+=1:")"===u?S>0&&(S-=1):0===S&&a.includes(u)&&(w=!0),w?(""!==b&&m.push(b.trim()),b="",w=!1):b+=u;return(u||""!==b)&&m.push(b.trim()),m}};var $a=Fa;Fa.default=Fa;let ja=Xi,Ua=$a,za=class extends ja{get selectors(){return Ua.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 Wa=za;za.default=za,ja.registerRule(za);let Ba=ta,Va=mi,Ga=Ii,qa=_a,Za=ya,Ka=Da,Ya=Wa;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__:qa.prototype};u.map&&(u.map={...u.map,__proto__:Za.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 Ka(m);if("decl"===m.type)return new Ga(m);if("rule"===m.type)return new Ya(m);if("comment"===m.type)return new Va(m);if("atrule"===m.type)return new Ba(m);throw new Error("Unknown node type: "+e.type)}var Ja=Ke;Ke.default=Ke;let{dirname:Qa,relative:el,resolve:tl,sep:nl}=Ho,{SourceMapConsumer:rl,SourceMapGenerator:sl}=Ho,{pathToFileURL:ol}=Ho,il=_a,al=!(!rl||!sl),ll=!!(Qa&&tl&&el&&nl);var cl=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||Qa(e.file);!1===this.mapOpts.sourcesContent?(a=new rl(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(),ll&&al&&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=sl.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new sl({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 sl({file:this.outputFile(),ignoreInvalidMapping:!0});let e,a,u=1,m=1,b="<no source>",w={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(S,x,C)=>{if(this.css+=S,x&&"end"!==C&&(w.generated.line=u,w.generated.column=m-1,x.source&&x.source.start?(w.source=this.sourcePath(x),w.original.line=x.source.start.line,w.original.column=x.source.start.column-1,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,this.map.addMapping(w))),a=S.match(/\n/g),a?(u+=a.length,e=S.lastIndexOf("\n"),m=S.length-e):m+=S.length,x&&"start"!==C){let e=x.parent||{raws:{}};("decl"!==x.type&&("atrule"!==x.type||x.nodes)||x!==e.last||e.raws.semicolon)&&(x.source&&x.source.end?(w.source=this.sourcePath(x),w.original.line=x.source.end.line,w.original.column=x.source.end.column-1,w.generated.line=u,w.generated.column=m-2,this.map.addMapping(w)):(w.source=b,w.original.line=1,w.original.column=0,w.generated.line=u,w.generated.column=m-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 a=this.memoizedPaths.get(e);if(a)return a;let u=this.opts.to?Qa(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(u=Qa(tl(u,this.mapOpts.annotation)));let m=el(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 il(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(ol){let a=ol(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;"\\"===nl&&(e=e.replace(/\\/g,"/"));let u=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,u),u}};const ul=/[\t\n\f\r "#'()/;[\\\]{}]/g,pl=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,dl=/.[\r\n"'(/\\]/,hl=/[\da-f]/i;let fl=ta,ml=mi,yl=Ii,gl=Da,bl=Wa,kc=function(e,a={}){let u,m,b,w,S,x,C,I,O,E,_=e.css.valueOf(),D=a.ignoreErrors,F=_.length,$=0,j=[],U=[];function y2(a){throw e.error("Unclosed "+a,$)}return{back:function A(e){U.push(e)},endOfFile:function v(){return 0===U.length&&$>=F},nextToken:function P2(e){if(U.length)return U.pop();if($>=F)return;let a=!!e&&e.ignoreUnclosed;switch(u=_.charCodeAt($),u){case 10:case 32:case 9:case 13:case 12:w=$;do{w+=1,u=_.charCodeAt(w)}while(32===u||10===u||9===u||13===u||12===u);x=["space",_.slice($,w)],$=w-1;break;case 91:case 93:case 123:case 125:case 58:case 59:case 41:{let e=String.fromCharCode(u);x=[e,e,$];break}case 40:if(E=j.length?j.pop()[1]:"",O=_.charCodeAt($+1),"url"===E&&39!==O&&34!==O&&32!==O&&10!==O&&9!==O&&12!==O&&13!==O){w=$;do{if(C=!1,w=_.indexOf(")",w+1),-1===w){if(D||a){w=$;break}y2("bracket")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["brackets",_.slice($,w+1),$,w],$=w}else w=_.indexOf(")",$+1),m=_.slice($,w+1),-1===w||dl.test(m)?x=["(","(",$]:(x=["brackets",m,$,w],$=w);break;case 39:case 34:S=39===u?"'":'"',w=$;do{if(C=!1,w=_.indexOf(S,w+1),-1===w){if(D||a){w=$+1;break}y2("string")}for(I=w;92===_.charCodeAt(I-1);)I-=1,C=!C}while(C);x=["string",_.slice($,w+1),$,w],$=w;break;case 64:ul.lastIndex=$+1,ul.test(_),w=0===ul.lastIndex?_.length-1:ul.lastIndex-2,x=["at-word",_.slice($,w+1),$,w],$=w;break;case 92:for(w=$,b=!0;92===_.charCodeAt(w+1);)w+=1,b=!b;if(u=_.charCodeAt(w+1),b&&47!==u&&32!==u&&10!==u&&9!==u&&13!==u&&12!==u&&(w+=1,hl.test(_.charAt(w)))){for(;hl.test(_.charAt(w+1));)w+=1;32===_.charCodeAt(w+1)&&(w+=1)}x=["word",_.slice($,w+1),$,w],$=w;break;default:47===u&&42===_.charCodeAt($+1)?(w=_.indexOf("*/",$+2)+1,0===w&&(D||a?w=_.length:y2("comment")),x=["comment",_.slice($,w+1),$,w],$=w):(pl.lastIndex=$+1,pl.test(_),w=0===pl.lastIndex?_.length-1:pl.lastIndex-2,x=["word",_.slice($,w+1),$,w],j.push(x),$=w)}return $++,x},position:function S2(){return $}}};const wl={empty:!0,space:!0};var vl=class{constructor(e){this.input=e,this.root=new gl,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let a=new fl;a.name=e[1].slice(1),""===a.name&&this.unnamedAtrule(a,e),this.init(a,e[2]);let u,m,b,w=!1,S=!1,x=[],C=[];for(;!this.tokenizer.endOfFile();){if(u=(e=this.tokenizer.nextToken())[0],"("===u||"["===u?C.push("("===u?")":"]"):"{"===u&&C.length>0?C.push("}"):u===C[C.length-1]&&C.pop(),0===C.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(x.length>0){for(b=x.length-1,m=x[b];m&&"space"===m[0];)m=x[--b];m&&(a.source.end=this.getPosition(m[3]||m[2]),a.source.end.offset++)}this.end(e);break}x.push(e)}else x.push(e);if(this.tokenizer.endOfFile()){w=!0;break}}a.raws.between=this.spacesAndCommentsFromEnd(x),x.length?(a.raws.afterName=this.spacesAndCommentsFromStart(x),this.raw(a,"params",x),w&&(e=x[x.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 b=a-1;b>=0&&(u=e[b],"space"===u[0]||(m+=1,2!==m));b--);throw this.input.error("Missed semicolon","word"===u[0]?u[3]+1:u[2])}colon(e){let a,u,m,b=0;for(let[w,S]of e.entries()){if(u=S,m=u[0],"("===m&&(b+=1),")"===m&&(b-=1),0===b&&":"===m){if(a){if("word"===a[0]&&"progid"===a[1])continue;return w}this.doubleColon(u)}a=u}return!1}comment(e){let a=new ml;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 yl;this.init(u,e[0][2]);let m,b=e[e.length-1];for(";"===b[0]&&(this.semicolon=!0,e.pop()),u.source.end=this.getPosition(b[3]||b[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 w,S=[];for(;e.length&&(w=e[0][0],"space"===w||"comment"===w);)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),b="";for(let e=a;e>0;e--){let a=m[e][0];if(b.trim().startsWith("!")&&"space"!==a)break;b=m.pop()[1]+b}b.trim().startsWith("!")&&(u.important=!0,u.raws.important=b,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 bl;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,b=null,w=[],S=e[1].startsWith("--"),x=[],C=e;for(;C;){if(u=C[0],x.push(C),"("===u||"["===u)b||(b=C),w.push("("===u?")":"]");else if(S&&m&&"{"===u)b||(b=C),w.push("}");else if(0===w.length){if(";"===u){if(m)return void this.decl(x,S);break}if("{"===u)return void this.rule(x);if("}"===u){this.tokenizer.back(x.pop()),a=!0;break}":"===u&&(m=!0)}else u===w[w.length-1]&&(w.pop(),0===w.length&&(b=null));C=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(a=!0),w.length>0&&this.unclosedBracket(b),a&&m){if(!S)for(;x.length&&(C=x[x.length-1][0],"space"===C||"comment"===C);)this.tokenizer.back(x.pop());this.decl(x,S)}else this.unknownWord(x)}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 b,w,S,x,C=u.length,I="",O=!0;for(let e=0;e<C;e+=1)b=u[e],w=b[0],"space"!==w||e!==C-1||m?"comment"===w?(x=u[e-1]?u[e-1][0]:"empty",S=u[e+1]?u[e+1][0]:"empty",wl[x]||wl[S]||","===I.slice(-1)?O=!1:I+=b[1]):I+=b[1]:O=!1;if(!O){let m=u.reduce((e,a)=>e+a[1],"");e.raws[a]={raw:m,value:I}}e[a]=I}rule(e){e.pop();let a=new bl;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 Sl=Xi,kl=_a,xl=vl;function Gt(e,a){let u=new kl(e,a),m=new xl(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 Cl=Gt;Gt.default=Gt,Sl.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 Ol=Il;Il.default=Il;let El=Ol,Ml=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 El(e,a);return this.messages.push(u),u}warnings(){return this.messages.filter(e=>"warning"===e.type)}};var Tl=Ml;Ml.default=Ml;let Rl={};var ni=function(e){Rl[e]||(Rl[e]=!0,typeof console<"u"&&console.warn&&console.warn(e))};let Ll=Xi,Pl=ia,Nl=cl,Al=Cl,Dl=Tl,Jl=Da,ec=ti,{isClean:tc,my:nc}=si,rc=ni;const sc={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},oc={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},ic={Once:!0,postcssPlugin:!0,prepare:!0};function _e(e){return"object"==typeof e&&"function"==typeof e.then}function ri(e){let a=!1,u=sc[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[tc]=!1,e.nodes&&e.nodes.forEach(e=>Js(e)),e}let ac={},lc=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 Dl)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=Al;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[nc]&&Ll.rebuild(m)}else m=Js(a);this.result=new Dl(e,m,u),this.helpers={...ac,postcss:ac,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,b=a.split("."),w=m.split(".");(b[0]!==w[0]||parseInt(b[1])>parseInt(w[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(!oc[a]&&/^[A-Z]/.test(a))throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!ic[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(_e(u))try{await u}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tc];){e[tc]=!0;let a=[br(e)];for(;a.length>0;){let e=this.visitTick(a);if(_e(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 _e(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=ec;e.syntax&&(a=e.syntax.stringify),e.stringifier&&(a=e.stringifier),a.stringify&&(a=a.stringify);let u=new Nl(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(_e(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let e=this.result.root;for(;!e[tc];)e[tc]=!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||rc("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(_e(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,b]=m[a.visitorIndex];a.visitorIndex+=1,a.visitorIndex===m.length&&(a.visitors=[],a.visitorIndex=0),this.result.lastPlugin=e;try{return b(u.toProxy(),this.helpers)}catch(e){throw this.handleError(e,u)}}if(0!==a.iterator){let m,b=a.iterator;for(;m=u.nodes[u.indexes[b]];)if(u.indexes[b]+=1,!m[tc])return m[tc]=!0,void e.push(br(m));a.iterator=0,delete u.indexes[b]}let b=a.events;for(;a.eventIndex<b.length;){let e=b[a.eventIndex];if(a.eventIndex+=1,0===e)return void(u.nodes&&u.nodes.length&&(u[tc]=!0,a.iterator=u.getIterator()));if(this.listeners[e])return void(a.visitors=this.listeners[e])}e.pop()}walkSync(e){e[tc]=!0;let a=ri(e);for(let u of a)if(0===u)e.nodes&&e.each(e=>{e[tc]||this.walkSync(e)});else{let a=this.listeners[u];if(a&&this.visitSync(a,e.toProxy()))return}}warnings(){return this.sync().warnings()}};lc.registerPostcss=e=>{ac=e};var cc=lc;lc.default=lc,Jl.registerLazyResult(lc),Pl.registerLazyResult(lc);let uc=cl,pc=Cl;const dc=Tl;let hc=ti,fc=ni,mc=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=pc;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,b=hc;this.result=new dc(this._processor,m,this._opts),this.result.css=a;let w=this;Object.defineProperty(this.result,"root",{get:()=>w.root});let S=new uc(b,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||fc("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 yc=mc;mc.default=mc;let gc=ia,bc=cc,wc=yc,vc=Da,Sc=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 bc(this,e,a):new wc(this,e,a)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}};var xc=Sc;Sc.default=Sc,vc.registerProcessor(Sc),gc.registerProcessor(Sc);let Ic=ta,Oc=mi,Ec=Xi,Mc=Yo,Tc=Ii,Rc=ia,_c=Ja,Lc=_a,Pc=cc,Nc=$a,Ac=di,Dc=Cl,Fc=xc,$c=Tl,jc=Da,Uc=Wa,zc=ti,Wc=Ol;function T$1(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new Fc(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 b=a(...u);return b.postcssPlugin=e,b.postcssVersion=(new Fc).version,b}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=zc,T$1.parse=Dc,T$1.fromJSON=_c,T$1.list=Nc,T$1.comment=e=>new Oc(e),T$1.atRule=e=>new Ic(e),T$1.decl=e=>new Tc(e),T$1.rule=e=>new Uc(e),T$1.root=e=>new jc(e),T$1.document=e=>new Rc(e),T$1.CssSyntaxError=Mc,T$1.Declaration=Tc,T$1.Container=Ec,T$1.Processor=Fc,T$1.Document=Rc,T$1.Comment=Oc,T$1.Warning=Wc,T$1.AtRule=Ic,T$1.Result=$c,T$1.Input=Lc,T$1.Rule=Uc,T$1.Root=jc,T$1.Node=Ac,Pc.registerPostcss(T$1);var Bc=T$1;T$1.default=T$1;const Vc=Su(Bc);var Gc;Vc.stringify,Vc.fromJSON,Vc.plugin,Vc.parse,Vc.list,Vc.document,Vc.comment,Vc.atRule,Vc.rule,Vc.decl,Vc.root,Vc.CssSyntaxError,Vc.Declaration,Vc.Container,Vc.Processor,Vc.Document,Vc.Comment,Vc.Warning,Vc.AtRule,Vc.Result,Vc.Input,Vc.Rule,Vc.Root,Vc.Node,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Gc||(Gc={}));const{addCustomEvent:Hc}=ae,{addSailfishEvent:qc}=ae,{freezePage:Zc}=ae,{takeFullSnapshot:Kc}=ae;var Yc=Object.defineProperty,y=(e,a,u)=>((e,a,u)=>a in e?Yc(e,a,{enumerable:!0,configurable:!0,writable:!0,value:u}):e[a]=u)(e,"symbol"!=typeof a?a+"":a,u);let Jc=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 Xc=/(^|@)\S+:\d+/,Qc=/^\s*at .*(\S+:\d+|\(native\))/m,lu=/^(eval@)?(\[native code])?$/,cu={parse:function(e){return e?typeof e.stacktrace<"u"||typeof e["opera#sourceloc"]<"u"?this.parseOpera(e):e.stack&&e.stack.match(Qc)?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(Qc)},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),b=this.extractLocation(u?u[1]:m.pop()),w=m.join(" ")||void 0,S=["eval","<anonymous>"].indexOf(b[0])>-1?void 0:b[0];return new Jc({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(lu)},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 Jc({functionName:e});{const a=/((.*".+"[^@]*)?[^@]*)(?:@)/,u=e.match(a),m=u&&u[1]?u[1]:void 0,b=this.extractLocation(e.replace(a,""));return new Jc({functionName:m,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 a=/Line (\d+).*script (?:in )?(\S+)/i,u=e.message.split("\n"),m=[];for(let e=2,b=u.length;e<b;e+=2){const b=a.exec(u[e]);b&&m.push(new Jc({fileName:b[2],lineNumber:parseFloat(b[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,b=u.length;e<b;e+=2){const b=a.exec(u[e]);b&&m.push(new Jc({functionName:b[3]||void 0,fileName:b[2],lineNumber:parseFloat(b[1])}))}return m},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Xc)&&!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 Jc({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,b=[];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&&b.push(a)}b.length>1&&(u+=`:eq(${b.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=[],b=[];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?b.splice(u,1/0,e):b.push(e),~m.indexOf(a)&&(a=m[0]===a?"[Circular ~]":"[Circular ~."+b.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 hu={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({},hu,u):hu,b=m.logger;if(!b)return()=>{};let w;w="string"==typeof b?a[b]:b;let S=0,x=!1;const C=[];if(m.level.includes("error")){const l=a=>{const u=a.message,b=a.error,w=cu.parse(b).map(e=>e.toString()),S=[g(u,m.stringifyOptions)];e({level:"error",trace:w,payload:S})};a.addEventListener("error",l),C.push(()=>{a.removeEventListener("error",l)});const f=a=>{let u,b;a.reason instanceof Error?(u=a.reason,b=[g(`Uncaught (in promise) ${u.name}: ${u.message}`,m.stringifyOptions)]):(u=new Error,b=[g("Uncaught (in promise)",m.stringifyOptions),g(a.reason,m.stringifyOptions)]);const w=cu.parse(u).map(e=>e.toString());e({level:"error",trace:w,payload:b})};a.addEventListener("unhandledrejection",f),C.push(()=>{a.removeEventListener("unhandledrejection",f)})}for(const e of m.level)C.push(p(w,e));return()=>{C.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],b=u(m);return"function"==typeof b&&(b.prototype=b.prototype||{},Object.defineProperties(b,{__rrweb_original__:{enumerable:!1,value:m}})),e[a]=b,()=>{e[a]=m}}catch{return()=>{}}}(a,u,a=>(...b)=>{if(a.apply(this,b),!("assert"===u&&b[0]||x)){x=!0;try{const a=cu.parse(new Error).map(e=>e.toString()).splice(1),w=("assert"===u?b.slice(1):b).map(e=>g(e,m.stringifyOptions));S++,S<m.lengthThreshold?e({level:u,trace:a,payload:w}):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,...b)}finally{x=!1}}}):()=>{}}}var ku,xu=(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))(xu||{}),Cu={},Ou={exports:{}},Eu={exports:{}},Mu={};var Tu,Ru,_u,Lu,Pu,Nu,Au,Du,Fu,$u,ju,Uu,zu,Wu,Vu,Gu,Hu={};function requireReactIs(){return Ru||(Ru=1,"production"===process.env.NODE_ENV?Eu.exports=function requireReactIs_production_min(){if(ku)return Mu;ku=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,b=e?Symbol.for("react.strict_mode"):60108,w=e?Symbol.for("react.profiler"):60114,S=e?Symbol.for("react.provider"):60109,x=e?Symbol.for("react.context"):60110,C=e?Symbol.for("react.async_mode"):60111,I=e?Symbol.for("react.concurrent_mode"):60111,O=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,D=e?Symbol.for("react.memo"):60115,F=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,j=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.responder"):60118,B=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 C:case I:case m:case w:case b:case E:return e;default:switch(e=e&&e.$$typeof){case x:case O:case F:case D:case S:return e;default:return _}}case u:return _}}}function A(e){return z(e)===I}return Mu.AsyncMode=C,Mu.ConcurrentMode=I,Mu.ContextConsumer=x,Mu.ContextProvider=S,Mu.Element=a,Mu.ForwardRef=O,Mu.Fragment=m,Mu.Lazy=F,Mu.Memo=D,Mu.Portal=u,Mu.Profiler=w,Mu.StrictMode=b,Mu.Suspense=E,Mu.isAsyncMode=function(e){return A(e)||z(e)===C},Mu.isConcurrentMode=A,Mu.isContextConsumer=function(e){return z(e)===x},Mu.isContextProvider=function(e){return z(e)===S},Mu.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},Mu.isForwardRef=function(e){return z(e)===O},Mu.isFragment=function(e){return z(e)===m},Mu.isLazy=function(e){return z(e)===F},Mu.isMemo=function(e){return z(e)===D},Mu.isPortal=function(e){return z(e)===u},Mu.isProfiler=function(e){return z(e)===w},Mu.isStrictMode=function(e){return z(e)===b},Mu.isSuspense=function(e){return z(e)===E},Mu.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===m||e===I||e===w||e===b||e===E||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===D||e.$$typeof===S||e.$$typeof===x||e.$$typeof===O||e.$$typeof===j||e.$$typeof===U||e.$$typeof===B||e.$$typeof===$)},Mu.typeOf=z,Mu}():Eu.exports=function requireReactIs_development(){return Tu||(Tu=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,b=e?Symbol.for("react.strict_mode"):60108,w=e?Symbol.for("react.profiler"):60114,S=e?Symbol.for("react.provider"):60109,x=e?Symbol.for("react.context"):60110,C=e?Symbol.for("react.async_mode"):60111,I=e?Symbol.for("react.concurrent_mode"):60111,O=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,_=e?Symbol.for("react.suspense_list"):60120,D=e?Symbol.for("react.memo"):60115,F=e?Symbol.for("react.lazy"):60116,$=e?Symbol.for("react.block"):60121,j=e?Symbol.for("react.fundamental"):60117,U=e?Symbol.for("react.responder"):60118,B=e?Symbol.for("react.scope"):60119;function typeOf(e){if("object"==typeof e&&null!==e){var _=e.$$typeof;switch(_){case a:var $=e.type;switch($){case C:case I:case m:case w:case b:case E:return $;default:var j=$&&$.$$typeof;switch(j){case x:case O:case F:case D:case S:return j;default:return _}}case u:return _}}}var V=C,H=I,q=x,Y=S,J=a,X=O,Q=m,ee=F,te=D,ne=u,re=w,se=b,oe=E,ie=!1;function isConcurrentMode(e){return typeOf(e)===I}Hu.AsyncMode=V,Hu.ConcurrentMode=H,Hu.ContextConsumer=q,Hu.ContextProvider=Y,Hu.Element=J,Hu.ForwardRef=X,Hu.Fragment=Q,Hu.Lazy=ee,Hu.Memo=te,Hu.Portal=ne,Hu.Profiler=re,Hu.StrictMode=se,Hu.Suspense=oe,Hu.isAsyncMode=function isAsyncMode(e){return ie||(ie=!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)===C},Hu.isConcurrentMode=isConcurrentMode,Hu.isContextConsumer=function isContextConsumer(e){return typeOf(e)===x},Hu.isContextProvider=function isContextProvider(e){return typeOf(e)===S},Hu.isElement=function isElement(e){return"object"==typeof e&&null!==e&&e.$$typeof===a},Hu.isForwardRef=function isForwardRef(e){return typeOf(e)===O},Hu.isFragment=function isFragment(e){return typeOf(e)===m},Hu.isLazy=function isLazy(e){return typeOf(e)===F},Hu.isMemo=function isMemo(e){return typeOf(e)===D},Hu.isPortal=function isPortal(e){return typeOf(e)===u},Hu.isProfiler=function isProfiler(e){return typeOf(e)===w},Hu.isStrictMode=function isStrictMode(e){return typeOf(e)===b},Hu.isSuspense=function isSuspense(e){return typeOf(e)===E},Hu.isValidElementType=function isValidElementType(e){return"string"==typeof e||"function"==typeof e||e===m||e===I||e===w||e===b||e===E||e===_||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===D||e.$$typeof===S||e.$$typeof===x||e.$$typeof===O||e.$$typeof===j||e.$$typeof===U||e.$$typeof===B||e.$$typeof===$)},Hu.typeOf=typeOf}()),Hu}()),Eu.exports}function requireObjectAssign(){if(Lu)return _u;Lu=1;var e=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable;return _u=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,b){for(var w,S,x=function toObject(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(m),C=1;C<arguments.length;C++){for(var I in w=Object(arguments[C]))a.call(w,I)&&(x[I]=w[I]);if(e){S=e(w);for(var O=0;O<S.length;O++)u.call(w,S[O])&&(x[S[O]]=w[S[O]])}}return x},_u}function requireReactPropTypesSecret(){if(Nu)return Pu;Nu=1;return Pu="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function requireHas(){return Du?Au:(Du=1,Au=Function.call.bind(Object.prototype.hasOwnProperty))}function requireCheckPropTypes(){if($u)return Fu;$u=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,b,w,S,x){if("production"!==process.env.NODE_ENV)for(var C in m)if(u(m,C)){var I;try{if("function"!=typeof m[C]){var O=Error((S||"React class")+": "+w+" type `"+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof m[C]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw O.name="Invariant Violation",O}I=m[C](b,C,S,w,null,e)}catch(e){I=e}if(!I||I instanceof Error||printWarning((S||"React class")+": type specification of "+w+" `"+C+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof I+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),I instanceof Error&&!(I.message in a)){a[I.message]=!0;var E=x?x():"";printWarning("Failed "+w+" type: "+I.message+(null!=E?E:""))}}}return checkPropTypes.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(a={})},Fu=checkPropTypes}function requireFactoryWithTypeCheckers(){if(Uu)return ju;Uu=1;var e=requireReactIs(),a=requireObjectAssign(),u=requireReactPropTypesSecret(),m=requireHas(),b=requireCheckPropTypes(),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){}}),ju=function(w,S){var x="function"==typeof Symbol&&Symbol.iterator;var C="<<anonymous>>",I={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,b,w,S){if("function"!=typeof e)return new PropTypeError("Property `"+S+"` of component `"+b+"` has invalid PropType notation inside arrayOf.");var x=a[m];if(!Array.isArray(x))return new PropTypeError("Invalid "+w+" `"+S+"` of type `"+getPropType(x)+"` supplied to `"+b+"`, expected an array.");for(var C=0;C<x.length;C++){var I=e(x,C,b,w,S+"["+C+"]",u);if(I instanceof Error)return I}return null})},element:function createElementTypeChecker(){return createChainableTypeChecker(function validate(e,a,u,m,b){var S=e[a];return w(S)?null:new PropTypeError("Invalid "+m+" `"+b+"` of type `"+getPropType(S)+"` supplied to `"+u+"`, expected a single ReactElement.")})}(),elementType:function createElementTypeTypeChecker(){return createChainableTypeChecker(function validate(a,u,m,b,w){var S=a[u];return e.isValidElementType(S)?null:new PropTypeError("Invalid "+b+" `"+w+"` of type `"+getPropType(S)+"` supplied to `"+m+"`, expected a single ReactElement type.")})}(),instanceOf:function createInstanceTypeChecker(e){return createChainableTypeChecker(function validate(a,u,m,b,w){if(!(a[u]instanceof e)){var S=e.name||C;return new PropTypeError("Invalid "+b+" `"+w+"` of type `"+function getClassName(e){return e.constructor&&e.constructor.name?e.constructor.name:C}(a[u])+"` supplied to `"+m+"`, expected instance of `"+S+"`.")}return null})},node:function createNodeChecker(){return createChainableTypeChecker(function validate(e,a,u,m,b){return isNode(e[a])?null:new PropTypeError("Invalid "+m+" `"+b+"` supplied to `"+u+"`, expected a ReactNode.")})}(),objectOf:function createObjectOfTypeChecker(e){return createChainableTypeChecker(function validate(a,b,w,S,x){if("function"!=typeof e)return new PropTypeError("Property `"+x+"` of component `"+w+"` has invalid PropType notation inside objectOf.");var C=a[b],I=getPropType(C);if("object"!==I)return new PropTypeError("Invalid "+S+" `"+x+"` of type `"+I+"` supplied to `"+w+"`, expected an object.");for(var O in C)if(m(C,O)){var E=e(C,O,w,S,x+"."+O,u);if(E instanceof Error)return E}return null})},oneOf:function createEnumTypeChecker(e){if(!Array.isArray(e))return"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;return createChainableTypeChecker(function validate(a,u,m,b,w){for(var S=a[u],x=0;x<e.length;x++)if(is(S,e[x]))return null;var C=JSON.stringify(e,function replacer(e,a){return"symbol"===getPreciseType(a)?String(a):a});return new PropTypeError("Invalid "+b+" `"+w+"` of value `"+String(S)+"` supplied to `"+m+"`, expected one of "+C+".")})},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 b=e[a];if("function"!=typeof b)return printWarning("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+getPostfixForTypeWarning(b)+" at index "+a+"."),emptyFunctionThatReturnsNull}return createChainableTypeChecker(function validate(a,b,w,S,x){for(var C=[],I=0;I<e.length;I++){var O=(0,e[I])(a,b,w,S,x,u);if(null==O)return null;O.data&&m(O.data,"expectedType")&&C.push(O.data.expectedType)}return new PropTypeError("Invalid "+S+" `"+x+"` supplied to `"+w+"`"+(C.length>0?", expected one of type ["+C.join(", ")+"]":"")+".")})},shape:function createShapeTypeChecker(e){return createChainableTypeChecker(function validate(a,m,b,w,S){var x=a[m],C=getPropType(x);if("object"!==C)return new PropTypeError("Invalid "+w+" `"+S+"` of type `"+C+"` supplied to `"+b+"`, expected `object`.");for(var I in e){var O=e[I];if("function"!=typeof O)return invalidValidatorError(b,w,S,I,getPreciseType(O));var E=O(x,I,b,w,S+"."+I,u);if(E)return E}return null})},exact:function createStrictShapeTypeChecker(e){return createChainableTypeChecker(function validate(b,w,S,x,C){var I=b[w],O=getPropType(I);if("object"!==O)return new PropTypeError("Invalid "+x+" `"+C+"` of type `"+O+"` supplied to `"+S+"`, expected `object`.");var E=a({},b[w],e);for(var _ in E){var D=e[_];if(m(e,_)&&"function"!=typeof D)return invalidValidatorError(S,x,C,_,getPreciseType(D));if(!D)return new PropTypeError("Invalid "+x+" `"+C+"` key `"+_+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(b[w],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var F=D(I,_,S,x,C+"."+_,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(b,w,x,I,O,E,_){if(I=I||C,E=E||x,_!==u){if(S){var D=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 D.name="Invariant Violation",D}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var F=I+":"+x;!a[F]&&m<3&&(printWarning("You are manually calling a React.PropTypes validation function for the `"+E+"` prop on `"+I+"`. 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==w[x]?b?null===w[x]?new PropTypeError("The "+O+" `"+E+"` is marked as required in `"+I+"`, but its value is `null`."):new PropTypeError("The "+O+" `"+E+"` is marked as required in `"+I+"`, but its value is `undefined`."):null:e(w,x,I,O,E)}var b=checkType.bind(null,!1);return b.isRequired=checkType.bind(null,!0),b}function createPrimitiveTypeChecker(e){return createChainableTypeChecker(function validate(a,u,m,b,w,S){var x=a[u];return getPropType(x)!==e?new PropTypeError("Invalid "+b+" `"+w+"` of type `"+getPreciseType(x)+"` supplied to `"+m+"`, expected `"+e+"`.",{expectedType:e}):null})}function invalidValidatorError(e,a,u,m,b){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 `"+b+"`.")}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||w(e))return!0;var a=function getIteratorFn(e){var a=e&&(x&&e[x]||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 b=u.value;if(b&&!isNode(b[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,I.checkPropTypes=b,I.resetWarningCache=b.resetWarningCache,I.PropTypes=I,I},ju}function requireFactoryWithThrowingShims(){if(Wu)return zu;Wu=1;var e=requireReactPropTypesSecret();function emptyFunction(){}function emptyFunctionWithReset(){}return emptyFunctionWithReset.resetWarningCache=emptyFunction,zu=function(){function shim(a,u,m,b,w,S){if(S!==e){var x=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 x.name="Invariant Violation",x}}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}}function requirePropTypes(){if(Vu)return Ou.exports;if(Vu=1,"production"!==process.env.NODE_ENV){var e=requireReactIs();Ou.exports=requireFactoryWithTypeCheckers()(e.isElement,true)}else Ou.exports=requireFactoryWithThrowingShims()();return Ou.exports}var qu=function requireLib(){return Gu||(Gu=1,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}}(requirePropTypes());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,b=function _objectWithoutPropertiesLoose(e,a){if(null==e)return{};var u,m,b={},w=Object.keys(e);for(m=0;m<w.length;m++)u=w[m],a.indexOf(u)>=0||(b[u]=e[u]);return b}(e,a);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(e);for(m=0;m<w.length;m++)u=w[m],a.indexOf(u)>=0||Object.prototype.propertyIsEnumerable.call(e,u)&&(b[u]=e[u])}return b}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 b=function canUseDOM2(){return!("undefined"==typeof window||!window.document||!window.document.createElement)};a.ZendeskAPI=function ZendeskAPI2(){if(b&&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 w=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(b&&!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(){b&&window.zE&&(delete window.zE,delete window.zESettings)}},{key:"render",value:function render(){return null}}]),Zendesk2}(u.Component);a.default=w,w.propTypes={zendeskKey:m.default.string.isRequired,defer:m.default.bool}}(Cu)),Cu}();function suppressConsoleLogsDuringCall(e){const a=console.log,u=console.warn,m=console.error;console.log=()=>{},console.warn=()=>{},console.error=()=>{};try{e()}finally{console.log=a,console.warn=u,console.error=m}}const Zu="zendesk_chat",Ku="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}const getUrlAndStoredUuids=()=>({page_visit_uuid:sessionStorage.getItem("pageVisitUUID"),prev_page_visit_uuid:sessionStorage.getItem("prevPageVisitUUID"),href:location.origin+location.pathname});function initializeDomContentEvents(e){document.addEventListener("readystatechange",()=>{const a={type:24,data:{source:0,info:""},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()};switch(document.readyState){case"loading":a.data.source=x;break;case"complete":a.data.source=I}a.data.info&&sendEvent(a)}),document.addEventListener("DOMContentLoaded",()=>{sendEvent({type:24,data:{source:C},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()})}),window.addEventListener("beforeunload",()=>{sendEvent({type:24,data:{source:O},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()})}),window.addEventListener("unload",()=>{sendEvent({type:24,data:{source:E},timestamp:Date.now(),sessionId:e,...getUrlAndStoredUuids()})})}function initializeConsolePlugin(e,a){const{name:u,observer:m}=(e=>({name:"@sailfish-rrweb/rrweb/console@1",observer:R,options:e}))(e);m(e=>{sendEvent({type:xu.Plugin,timestamp:Date.now(),data:{plugin:u,payload:e},sessionId:a,...getUrlAndStoredUuids()})},window,e)}async function initializeRecording(e,a,u,m){const b=initializeWebSocket(a,u,m);try{ae({emit(e){Object.assign(e,getUrlAndStoredUuids()),e.sessionId=m,sendEvent(e)},maskInputOptions:{text:!0},maskInputFn:maskInputFn,maskTextClass:"sailfishSanitize",...e}),suppressConsoleLogsDuringCall(()=>{qu.ZendeskAPI("messenger:set","conversationTags",[`sailfish-session-${m}`])});const handleWidgetOpen=()=>{ae.addSailfishEvent(xu.SailfishCustom,{action:"customer support chat opened",element_id:Zu,provider:Ku})},handleWidgetClose=()=>{ae.addSailfishEvent(xu.SailfishCustom,{action:"customer support chat closed",element_id:Zu,provider:Ku})},handleUnreadMessages=e=>{ae.addSailfishEvent(xu.SailfishCustom,{action:"zendesk unreadmessages",element_id:Zu,provider:Ku})};suppressConsoleLogsDuringCall(()=>{qu.ZendeskAPI("messenger:on","open",handleWidgetOpen),qu.ZendeskAPI("messenger:on","close",handleWidgetClose),qu.ZendeskAPI("messenger:on","unreadMessages",handleUnreadMessages)})}catch(e){console.error("Error importing plugins!",e)}return b}let Yu=null,Ju=null;function identify(e,a={},u=!1){const m={type:"identify",userId:e,traits:a};Yu&&Yu.userId===e&&JSON.stringify(Yu.traits)===JSON.stringify(a)||(Yu={userId:e,traits:a,overwrite:u},sendMessage(m))}function addOrUpdateMetadata(e){const a={type:"addOrUpdateMetadata",metadata:e};Ju&&JSON.stringify(Ju)===JSON.stringify(e)||(Ju=e,sendMessage(a))}function trackingEvent(e){sendMessage({type:"trackingEvent",trackingData:e,timestamp:Y()})}const Xu="undefined"!=typeof globalThis&&void 0!==globalThis.window,Qu="undefined"!=typeof globalThis&&void 0!==globalThis.document,ep="undefined"!=typeof globalThis&&"localStorage"in globalThis,tp="undefined"!=typeof globalThis&&"sessionStorage"in globalThis,np=["t.co","*.twitter.com","*.gravatar.com","*.googleapis.com","*.amazonaws.com","*.smooch.io","*.zendesk.com","*.zdassets.com"],rp=[400,403],sp="CORS",op=1,ip="dynamicPassedHosts",ap="dynamicExcludedHosts",lp="sailfishApiKey",cp="sailfishBackendApi",up=new Set,pp=new Set,dp=up.add;up.add=e=>{const a=null==e?void 0:e.trim();if(!a||up.has(a))return up;dp.call(up,a),pp.has(a)&&pp.delete(a);const u=consolidateDynamicExclusions(up);up.clear();for(const e of u)dp.call(up,e);try{if(ep){const e={version:1,entries:{}},a=Date.now();for(const u of up)e.entries[u]=a;localStorage.setItem(ap,JSON.stringify(e))}}catch(e){}return function updateExcludedHostsStorageAndBackend(e){if(!tp)return;const a=sessionStorage.getItem(lp)||"",u=sessionStorage.getItem(cp)||"";if(!u)return;sendDomainsToNotPropagateHeaderTo(a,[...e,...np],u).catch(e=>console.error("Failed to send domains to not propagate header to:",e))}(up),up};const hp=pp.add;function consolidateDynamicExclusions(e,a=3){const u={};for(const a of e){const[e,...m]=a.split("/"),b=m.length?`/${m.join("/")}`:"/";(u[e]??(u[e]=[])).push(b)}const m=new Set;for(const e in u){let gather=function(u,b){if(u.count>=a&&b.length>0){const a="/"+b.join("/")+"/*";return void m.add(`${e}${a}`)}for(const[e,a]of u.children)gather(a,b.concat(e))};const b=u[e];if(b.length<a){for(const a of b)m.add(`${e}${a}`);continue}const w={count:0,children:new Map};for(const e of b){w.count++;const a=e.split("/").filter(Boolean);let u=w;for(const e of a)u.children.has(e)||u.children.set(e,{count:0,children:new Map}),u=u.children.get(e),u.count++}gather(w,[])}return m}pp.add=e=>{const a=null==e?void 0:e.trim();if(!a)return pp;try{if(ep){const e=localStorage.getItem(ip);let u;if(e){const a=JSON.parse(e);u=Array.isArray(a)?{version:1,entries:Object.fromEntries(a.map(e=>[e,Date.now()]))}:a&&"object"==typeof a&&"entries"in a&&"object"==typeof a.entries?a:{version:1,entries:{}}}else u={version:1,entries:{}};u.entries[a]=Date.now(),u.version=1,localStorage.setItem(ip,JSON.stringify(u))}}catch(e){}return pp.has(a)||hp.call(pp,a),pp},ep&&(()=>{const e=localStorage.getItem(ap);if(e)try{const a=JSON.parse(e);if(1!==a.version)return void localStorage.removeItem(ap);const u=Date.now(),m={};for(const[e,b]of Object.entries(a.entries))u-b<6048e5&&(up.add(e),m[e]=b);localStorage.setItem(ap,JSON.stringify({version:1,entries:m}))}catch(e){localStorage.removeItem(ap)}})(),ep&&(()=>{const e=localStorage.getItem(ip);if(e)try{const a=JSON.parse(e);if(1!==a.version)return void localStorage.removeItem(ip);const u=Date.now(),m={};for(const[e,b]of Object.entries(a.entries))u-b<6048e5&&(pp.add(e),m[e]=b);localStorage.setItem(ip,JSON.stringify({version:1,entries:m}))}catch(e){localStorage.removeItem(ip)}})();const fp={recordCanvas:!1,recordCrossOriginIframes:!1,collectFonts:!1,inlineImages:!1,recordPassword:!1,recordRealName:!0,recordCreditCardInfo:!1,recordSsn:!1,recordDob:!1,sampling:{}},mp={level:["info","log","warn","error"],lengthThreshold:1e4,stringifyOptions:{stringLengthLimit:1e3,numOfKeysLimit:20,depthOfLimit:4},logger:"console"};function trackDomainChanges(){let e=window.location.href.split("?")[0];const checkDomainChange=(a=!1)=>{const u=window.location.href.split("?")[0];if(a||u!==e){e=u;const a=v4(),m=sessionStorage.getItem("pageVisitUUID");sessionStorage.setItem("pageVisitUUID",a),sessionStorage.setItem("prevPageVisitUUID",m);sendMessage({type:"routeChange",data:{url:u,timestamp:Date.now(),page_visit_uuid:a,prev_page_visit_uuid:m,session_id:getOrSetSessionId()}})}},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 Xu?(window.name||(window.name=v4()),window.name):v4()}function matchUrlWithWildcard(e,a){let u,m;if("string"==typeof e?u=e:"undefined"!=typeof URL&&e instanceof URL?u=e.href:"undefined"!=typeof Request&&e instanceof Request?u=e.url:null!=e&&"function"==typeof e.toString&&(u=e.toString()),!u)return!1;try{const e="undefined"!=typeof window?window.location.href:"http://localhost/";m=new URL(u,e)}catch{return!1}const{hostname:b,pathname:w,port:S,protocol:x}=m;if(!/^https?:$/.test(x))return!1;const C=b.startsWith("www.")?b.slice(4).toLowerCase():b.toLowerCase();return a.some(e=>{const a=String(e||"").replace(/^[a-zA-Z]+:\/\//,"");let[u,m]=a.split("/",2),b="";u.includes(":")&&([u,b]=u.split(":"));const x=u.replace(/\./g,"\\.").replace(/\*/g,".*"),I=new RegExp(`^${x}$`,"i"),O=C.startsWith("www.")?C.slice(4):C;if(b&&S!==b)return!1;if(u.startsWith("*.")){const e=u.slice(2).toLowerCase();if(!(C===e||O===e||C.endsWith("."+e)))return!1;if(m){const e=m.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(w)}return!0}if(!I.test(O)&&!I.test(C))return!1;if(m){const e=m.replace(/\*/g,".*").replace(/\/$/,"");return new RegExp(`^/${e}`,"i").test(w)}return!0})}function shouldSkipHeadersPropagation(e,a=[]){let u;try{u=new URL("string"==typeof e?e:String((null==e?void 0:e.url)??e),window.location.href)}catch{return!0}for(const e of _)if(u.pathname.toLowerCase().endsWith(e))return!0;return!!matchUrlWithWildcard(e,[...np,...a])}function setupFetchInterceptor(e=[]){const a=window.fetch,u=getOrSetSessionId();window.fetch=new Proxy(a,{apply:async(a,m,b)=>{let w,x=b[0],C=b[1]||{};if("string"==typeof x)w=x;else if(x instanceof Request)w=x.url;else{if(!(x instanceof URL))return a.apply(m,b);w=x.href}return new URL(w,window.location.href).hostname,shouldSkipHeadersPropagation(w,e)?a.apply(m,b):async function injectHeaderWrapper(e,a,u,m,b,w,x){var C,I;if(!w)return e.apply(a,u);const O=v4(),E=getUrlAndStoredUuids(),_=b.method||"GET",D=Date.now();try{let C=await async function injectHeader(e,a,u,m,b,w,x){if(u instanceof Request){const C=u.clone(),I=new Headers(C.headers);I.set(S,`${b}/${w}/${x}`);const O=new Request(C,{headers:I});return await e.call(a,O,m)}{const C={...m},I=new Headers(m.headers||{});return I.set(S,`${b}/${w}/${x}`),C.headers=I,await e.call(a,u,C)}}(e,a,m,b,w,E.page_visit_uuid,O),I=!1;rp.includes(C.status)&&(C=await async function retryWithoutPropagateHeaders(e,a,u,m){try{let m=u[0],b=u[1]||{};if("string"==typeof m||m instanceof URL){const u={...b},w=new Headers(b.headers||{});w.delete(S),u.headers=w;return await e.call(a,m,u)}if(m instanceof Request){const u=m.clone(),w=new Headers(u.headers);w.delete(S);const x=new Request(u,{headers:w});return await e.call(a,x,b)}return e.apply(a,u)}catch(e){throw e}}(e,a,u),I=!0);const F=Date.now(),$=C.status,j=C.ok,U=j?"":`Request Error: ${C.statusText}`;return sendEvent({type:27,timestamp:F,sessionId:w,data:{request_id:O,session_id:w,timestamp_start:D,timestamp_end:F,response_code:$,success:j,error:U,method:_,url:x,retry_without_trace_id:I},...E}),C}catch(m){const b=Date.now(),S=!1,F=(null==(C=m.response)?void 0:C.status)||500,$=m.message||"Fetch request failed";if(m instanceof TypeError&&(null==(I=null==m?void 0:m.message)?void 0:I.toLowerCase().includes(sp.toLowerCase())))return e.apply(a,u);throw sendEvent({type:27,timestamp:b,sessionId:w,data:{request_id:O,session_id:w,timestamp_start:D,timestamp_end:b,response_code:F,success:S,error:$,method:_,url:x},...E}),m}}(a,m,b,x,C,u,w)}})}async function startRecording({apiKey:e,backendApi:a="https://api-service.sailfishqa.com",domainsToPropagateHeaderTo:u=[],domainsToNotPropagateHeaderTo:m=[],serviceVersion:b,serviceIdentifier:w,gitSha:x,serviceAdditionalMetadata:C}){var I,O;const E=x??function getCompileTimeGitSha(){var e,a,u;try{const e=globalThis;if(e&&"string"==typeof e.__GIT_SHA__&&e.__GIT_SHA__)return e.__GIT_SHA__}catch{}try{const a="undefined"!=typeof process?process:void 0;if(null==(e=null==a?void 0:a.env)?void 0:e.GIT_SHA)return String(a.env.GIT_SHA)}catch{}try{const e=import.meta;if(null==(a=null==e?void 0:e.env)?void 0:a.VITE_GIT_SHA)return String(e.env.VITE_GIT_SHA);if(null==(u=null==e?void 0:e.env)?void 0:u.GIT_SHA)return String(e.env.GIT_SHA)}catch{}}(),_=w??"",D=b??"",F=function getMapUuidFromWindow(){try{const e=window;if(e&&"string"==typeof e.sfMapUuid&&e.sfMapUuid)return e.sfMapUuid}catch{}}(),$=getOrSetSessionId();initializeDomContentEvents($),initializeConsolePlugin(mp,$),function storeCredentialsAndConnection({apiKey:e,backendApi:a}){tp&&(sessionStorage.setItem("sailfishApiKey",e),sessionStorage.setItem("sailfishBackendApi",a))}({apiKey:e,backendApi:a}),trackDomainChanges(),sessionStorage.setItem(lp,e),sessionStorage.setItem(cp,a),function setupXMLHttpRequestInterceptor(e=[]){const a=XMLHttpRequest.prototype.open,u=XMLHttpRequest.prototype.send,m=XMLHttpRequest.prototype.setRequestHeader,b=getOrSetSessionId();XMLHttpRequest.prototype.setRequestHeader=function(e,a){return this._capturedRequestHeaders||(this._capturedRequestHeaders={}),this._capturedRequestHeaders[e]=a,m.call(this,e,a)},XMLHttpRequest.prototype.open=function(e,u,...m){return this._requestUrl="string"==typeof u&&u.length>0?u:null,this._requestMethod=e,this._capturedRequestHeaders={},a.apply(this,[e,u,...m])},XMLHttpRequest.prototype.send=function(...a){const m=this._requestUrl;if(!m)return u.apply(this,a);if(shouldSkipHeadersPropagation(m,e))return u.apply(this,a);const w=sessionStorage.getItem("pageVisitUUID"),x=v4(),C=`${b}/${w}/${x}`;try{this.setRequestHeader(S,C)}catch(e){console.warn(`Could not set X-Sf3-Rid for ${m}`,e)}const I=Date.now();let O=!1;const emitFinished=(e,a,u)=>{if(O)return;O=!0;const w=Date.now();sendEvent({type:27,timestamp:w,sessionId:b,data:{request_id:x,session_id:b,timestamp_start:I,timestamp_end:w,response_code:a,success:e,error:u,method:this._requestMethod,url:m},...getUrlAndStoredUuids()})};return this.addEventListener("load",()=>{const e=this.status||0;if(e>=200&&e<300)emitFinished(!0,e,"");else{const a=this.statusText||`HTTP ${e}`;emitFinished(!1,e,a)}},{once:!0}),this.addEventListener("error",()=>{const e=this.status||0,a=0===e?"Network or CORS failure":this.statusText||`Error ${e}`;emitFinished(!1,e,a)},{once:!0}),u.apply(this,a)}}(m),setupFetchInterceptor(m),async function gatherAndCacheDeviceInfo(){sendMessage({type:"deviceInfo",data:{deviceInfo:{language:navigator.language,userAgent:navigator.userAgent}}})}();try{const u=(null==(I=(await fetchCaptureSettings(e,a)).data)?void 0:I.captureSettingsFromApiKey)||fp,m=await startRecordingSession(e,$,a,_,D,F,E,"JS/TS",C);if(null==(O=m.data)?void 0:O.startRecordingSession){await initializeRecording(u,a,e,$);!function sendMapUuidIfAvailable(e="",a=""){window.sfMapUuid&&sendMessage({type:"mapUuid",data:{mapUuid:window.sfMapUuid,serviceIdentifier:e,serviceVersion:a}})}(w,b)}else console.error("Failed to start recording session:",m.errors||m)}catch(e){console.error("Error starting recording:",e)}}Xu&&(!function sendUserDeviceUuid(){sendMessage({type:"userDeviceUuid",userDeviceUuid:function getOrSetUserDeviceUuid(){let e=null;if(ep)try{e=localStorage.getItem("sailfishUserDeviceUuid")}catch{}if(!e){e=v4();try{ep&&localStorage.setItem("sailfishUserDeviceUuid",e)}catch{}}return e}()})}(),function sendTimeZone(){sendMessage({type:"timeZone",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})}()),Qu&&document.addEventListener("visibilitychange",function handleVisibilityChange(){"visible"===document.visibilityState&&getOrSetSessionId()}),Xu&&window.addEventListener("beforeunload",()=>{window.name="",function clearPageVisitUuid(){tp&&(sessionStorage.removeItem("pageVisitUUID"),sessionStorage.removeItem("prevPageVisitUUID"))}()});const initRecorder=async e=>{if(console.log("Initializing Sailfish Recorder with options:",e),"undefined"!=typeof window)return startRecording(e).then(()=>{setupIssueReporting({apiKey:e.apiKey,backendApi:e.backendApi??"https://api-service.sailfishqa.com",getSessionId:()=>getOrSetSessionId(),shortcuts:e.reportIssueShortcuts})})};export{fp as DEFAULT_CAPTURE_SETTINGS,mp as DEFAULT_CONSOLE_RECORDING_SETTINGS,ap as DYNAMIC_EXCLUDED_HOSTS_KEY,ip as DYNAMIC_PASSED_HOSTS_KEY,op as STORAGE_VERSION,addOrUpdateMetadata,buildBatches,consolidateDynamicExclusions,createTriageFromRecorder,up as dynamicExcludedHosts,pp as dynamicPassedHosts,eventSize,fetchCaptureSettings,flushBufferedEvents,getUrlAndStoredUuids,identify,initRecorder,initializeConsolePlugin,initializeDomContentEvents,initializeRecording,initializeWebSocket,matchUrlWithWildcard,Y as nowTimestamp,openReportIssueModal,sendDomainsToNotPropagateHeaderTo,sendEvent,sendGraphQLRequest,sendMessage,startRecording,startRecordingSession,trackingEvent};
|