rewindlog 0.0.0-stage → 2.0.0
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/LICENSE +19 -0
- package/README.md +190 -2
- package/dist/BankingSecurity.d.ts +61 -0
- package/dist/ReplayStudio.d.ts +10 -0
- package/dist/ReportTranslator.d.ts +72 -0
- package/dist/RewindLog.d.ts +368 -0
- package/dist/RewindLogFloatingWidget.d.ts +22 -0
- package/dist/enterprise.d.ts +8 -0
- package/dist/index.d.ts +42 -0
- package/dist/lite.d.ts +9 -0
- package/dist/rewindlog.cjs.js +630 -0
- package/dist/rewindlog.es.js +18264 -0
- package/dist/rewindlog.min.js +630 -0
- package/dist/style.css +1 -0
- package/dist/vanilla-widget.d.ts +9 -0
- package/package.json +85 -4
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
(function(Re,ot){typeof exports=="object"&&typeof module<"u"?ot(exports):typeof define=="function"&&define.amd?define(["exports"],ot):(Re=typeof globalThis<"u"?globalThis:Re||self,ot(Re.RewindLog={}))})(this,function(Re){"use strict";var vp=Object.defineProperty;var wp=(Re,ot,Vt)=>ot in Re?vp(Re,ot,{enumerable:!0,configurable:!0,writable:!0,value:Vt}):Re[ot]=Vt;var Pe=(Re,ot,Vt)=>wp(Re,typeof ot!="symbol"?ot+"":ot,Vt);var ot=Object.defineProperty,Vt=(t,e,r)=>e in t?ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,$=(t,e,r)=>Vt(t,typeof e!="symbol"?e+"":e,r),Js,Pc=Object.defineProperty,$c=(t,e,r)=>e in t?Pc(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Xs=(t,e,r)=>$c(t,typeof e!="symbol"?e+"":e,r),fe=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(fe||{});const Qs={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Zs={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},fr={},Ln={};let eo=0;const jc=()=>!!globalThis.Zone;function Pn(t){if(fr[t])return fr[t];const e=globalThis[t],r=e.prototype,n=t in Qs?Qs[t]:void 0,i=!!(n&&n.every(l=>{var c,u;return!!((u=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&u.toString().includes("[native code]"))})),s=t in Zs?Zs[t]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!jc())return fr[t]=e.prototype,e.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return e.prototype;const u=c[t].prototype;if(!u)return l.remove(),r;const a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Ln[t]=()=>l.remove()):l.remove(),fr[t]=u}catch{return r}}const $n={};function at(t,e,r){var n,i;const s=(n=$n[t])==null?void 0:n[r];if(s)return s.call(e);const o=Pn(t),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?(($n[t]||($n[t]={}))[r]=l,l.call(e)):e[r]}const jn={};function to(t,e,r){const n=`${t}.${String(r)}`;if(jn[n])return jn[n].bind(e);const s=Pn(t)[r];return typeof s!="function"?e[r]:(jn[n]=s,s.bind(e))}function Bc(t){return at("Node",t,"ownerDocument")}function Fc(t){return at("Node",t,"childNodes")}function Uc(t){return at("Node",t,"parentNode")}function Wc(t){return at("Node",t,"parentElement")}function zc(t){return at("Node",t,"textContent")}function Hc(t){return at("Node",t,"firstChild")}function qc(t){return at("Node",t,"lastChild")}function Vc(t){return at("Node",t,"nextSibling")}function Gc(t){return at("Node",t,"previousSibling")}function Kc(t,e){return to("Node",t,"contains")(e)}function Yc(t){return to("Node",t,"getRootNode")()}function Jc(t){return!t||!("host"in t)?null:at("ShadowRoot",t,"host")}function Xc(t){return t.styleSheets}function Qc(t){return!t||!("shadowRoot"in t)?null:at("Element",t,"shadowRoot")}function Zc(t,e){return at("Element",t,"querySelector")(e)}function eu(t,e){return at("Element",t,"querySelectorAll")(e)}function tu(){const t=Pn("MutationObserver");eo++;let e=!1;return[t.constructor,()=>{if(e||(e=!0,--eo!==0))return;const r=Ln.MutationObserver;if(r)try{r()}finally{delete fr.MutationObserver,delete Ln.MutationObserver}}]}let ro=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(ro=()=>new Date().getTime());function ru(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}const Ye={ownerDocument:Bc,childNodes:Fc,parentNode:Uc,parentElement:Wc,textContent:zc,firstChild:Hc,lastChild:qc,nextSibling:Vc,previousSibling:Gc,contains:Kc,getRootNode:Yc,host:Jc,styleSheets:Xc,shadowRoot:Qc,querySelector:Zc,querySelectorAll:eu,nowTimestamp:ro,mutationObserverCtor:tu,patch:ru};function Bn(t){return t.nodeType===t.ELEMENT_NODE}function hr(t){const e=t&&"host"in t&&"mode"in t&&Ye.host(t)||null;return!!(e&&"shadowRoot"in e&&Ye.shadowRoot(e)===t)}function pr(t){return Object.prototype.toString.call(t)==="[object ShadowRoot]"}function nu(t){return t.includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}function iu(t){const{cssText:e}=t;if(e.split('"').length<3)return e;const r=["@import",`url(${JSON.stringify(t.href)})`];return t.layerName===""?r.push("layer"):t.layerName&&r.push(`layer(${t.layerName})`),t.supportsText&&r.push(`supports(${t.supportsText})`),t.media.length&&r.push(t.media.mediaText),r.join(" ")+";"}function Fn(t){try{const e=t.rules||t.cssRules;if(!e)return null;let r=t.href;!r&&t.ownerNode&&(r=t.ownerNode.baseURI);const n=Array.from(e,i=>no(i,r)).join("");return nu(n)}catch{return null}}function no(t,e){if(ou(t)){let r;try{r=Fn(t.styleSheet)||iu(t)}catch{r=t.cssText}return t.styleSheet.href?Wr(r,t.styleSheet.href):r}else{let r=t.cssText;return au(t)&&t.selectorText.includes(":")&&(r=su(r)),e?Wr(r,e):r}}function su(t){const e=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return t.replace(e,"$1\\$2")}function ou(t){return"styleSheet"in t}function au(t){return"selectorText"in t}class Un{constructor(){Xs(this,"idNodeMap",new Map),Xs(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i));const n=Ye.shadowRoot(e);n&&this.removeNodeFromMap(n)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function io(){return new Un}function Fr({element:t,maskInputOptions:e,tagName:r,type:n,value:i,maskInputFn:s}){let o=i||"";const l=n&&St(n);return(e[r.toLowerCase()]||l&&e[l])&&(s?o=s(o,t):o="*".repeat(o.length)),o}function St(t){return t.toLowerCase()}const so="__rrweb_original__";function lu(t){const e=t.getContext("2d");if(!e)return!0;const r=50;for(let n=0;n<t.width;n+=r)for(let i=0;i<t.height;i+=r){const s=e.getImageData,o=so in s?s[so]:s;if(new Uint32Array(o.call(e,n,i,Math.min(r,t.width-n),Math.min(r,t.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}function cu(t,e){return!t||!e||t.type!==e.type?!1:t.type===fe.Document?t.compatMode===e.compatMode:t.type===fe.DocumentType?t.name===e.name&&t.publicId===e.publicId&&t.systemId===e.systemId:t.type===fe.Comment||t.type===fe.Text||t.type===fe.CDATA?t.textContent===e.textContent:t.type===fe.Element?t.tagName===e.tagName&&JSON.stringify(t.attributes)===JSON.stringify(e.attributes)&&t.isSVG===e.isSVG&&t.needBlock===e.needBlock:!1}function Ur(t){const e=t.type;return t.hasAttribute("data-rr-is-password")?"password":e?St(e):null}function Wn(t,e){let r;try{r=new URL(t,e??window.location.href)}catch{return null}const n=/\.([0-9a-z]+)(?:$)/i,i=r.pathname.match(n);return(i==null?void 0:i[1])??null}function uu(t){let e="";return t.indexOf("//")>-1?e=t.split("/").slice(0,3).join("/"):e=t.split("/")[0],e=e.split("?")[0],e}const du=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,fu=/^(?:[a-z+]+:)?\/\//i,hu=/^www\..*/i,pu=/^(data:)([^,]*),(.*)/i;function Wr(t,e){return(t||"").replace(du,(r,n,i,s,o,l)=>{const c=i||o||l,u=n||s||"";if(!c)return r;if(fu.test(c)||hu.test(c))return`url(${u}${c}${u})`;if(pu.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${uu(e)+c}${u})`;const a=c.split("#")[0],h=c.substring(a.length),d=e.split("#")[0].split("/"),f=a.split("/");d.pop();for(const m of f)m!=="."&&(m===".."?d.pop():d.push(m));return`url(${u}${d.join("/")}${h}${u})`})}const oo="(?:/\\*[^*]*\\*/)|[\\s;]",mu=new RegExp(`${oo}|\\b(0)px?`,"g"),gu=new RegExp(oo,"g");function zr(t,e=!1){return e?t.replace(gu,""):t.replace(mu,"$1")}function yu(t,e,r=!1){const n=Array.from(e.childNodes),i=[];let s=0;if(n.length>1&&t&&typeof t=="string"){let o=zr(t,r);const l=o.length/t.length;for(let c=1;c<n.length;c++)if(n[c].textContent&&typeof n[c].textContent=="string"){const u=zr(n[c].textContent,r),a=100;let h=3;for(;h<u.length&&(u[h].match(/[a-zA-Z0-9]/)||u.indexOf(u.substring(0,h),1)!==-1);h++);for(;h<u.length;h++){let d=u.substring(0,h),f=o.split(d),m=-1;if(f.length===2)m=f[0].length;else if(f.length>2&&f[0]===""&&n[c-1].textContent!=="")m=o.indexOf(d,1);else if(f.length===1){if(d=d.substring(0,d.length-1),f=o.split(d),f.length<=1)return i.push(t),i;h=a+1}else h===u.length-1&&(m=o.indexOf(d));if(f.length>=2&&h>a){const p=n[c-1].textContent;if(p&&typeof p=="string"){const y=zr(p).length;m=o.indexOf(d,y)}m===-1&&(m=f[0].length)}if(m!==-1){let p=Math.floor(m/l);for(;p>0&&p<t.length;){if(s+=1,s>50*n.length)return i.push(t),i;const y=zr(t.substring(0,p),r);if(y.length===m){i.push(t.substring(0,p)),t=t.substring(p),o=o.substring(m);break}else y.length<m?p+=Math.max(1,Math.floor((m-y.length)/l)):p-=Math.max(1,Math.floor((y.length-m)*l))}break}}}}return i.push(t),i}function bu(t,e){return yu(t,e).join("/* rr_split */")}let vu=1;const wu=new RegExp("[^a-z0-9-_:]"),Hr=-2;function ao(){return vu++}function Su(t){if(t instanceof HTMLFormElement)return"form";const e=St(t.tagName);return wu.test(e)?"div":e}let Gt,lo;const xu=/^[^ \t\n\r\u000c]+/,Cu=/^[, \t\n\r\u000c]+/;function Ru(t,e){if(e.trim()==="")return e;let r=0;function n(s){let o;const l=s.exec(e.substring(r));return l?(o=l[0],r+=o.length,o):""}const i=[];for(;n(Cu),!(r>=e.length);){let s=n(xu);if(s.slice(-1)===",")s=Kt(t,s.substring(0,s.length-1)),i.push(s);else{let o="";s=Kt(t,s);let l=!1;for(;;){const c=e.charAt(r);if(c===""){i.push((s+o).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){r+=1,i.push((s+o).trim());break}else c==="("&&(l=!0);o+=c,r+=1}}}return i.join(", ")}const co=new WeakMap;function Kt(t,e){return!e||e.trim()===""?e:zn(t,e)}function Eu(t){return!!(t.tagName==="svg"||t.ownerSVGElement)}function zn(t,e){let r=co.get(t);if(r||(r=t.createElement("a"),co.set(t,r)),!e)e="";else if(e.startsWith("blob:")||e.startsWith("data:"))return e;return r.setAttribute("href",e),r.href}function uo(t,e,r,n){return n&&(r==="src"||r==="href"&&!(e==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&["table","td","th"].includes(e)?Kt(t,n):r==="srcset"?Ru(t,n):r==="style"?Wr(n,zn(t)):e==="object"&&r==="data"?Kt(t,n):n)}function fo(t,e,r){return["video","audio"].includes(t)&&St(e)==="autoplay"}function ku(t,e,r){try{if(typeof e=="string"){if(t.classList.contains(e))return!0}else for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}if(r)return t.matches(r)}catch{}return!1}function qr(t,e,r){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return r?qr(Ye.parentNode(t),e,r):!1;for(let n=t.classList.length;n--;){const i=t.classList[n];if(e.test(i))return!0}return r?qr(Ye.parentNode(t),e,r):!1}function ho(t,e,r,n){let i;if(Bn(t)){if(i=t,!Ye.childNodes(i).length)return!1}else{if(Ye.parentElement(t)===null)return!1;i=Ye.parentElement(t)}try{if(typeof e=="string"){if(n){if(i.closest(`.${e}`))return!0}else if(i.classList.contains(e))return!0}else if(qr(i,e,n))return!0;if(r){if(n){if(i.closest(r))return!0}else if(i.matches(r))return!0}}catch{}return!1}function Mu(t,e,r){const n=t.contentWindow;if(!n)return;let i=!1,s;try{s=n.document.readyState}catch{return}if(s!=="complete"){const l=setTimeout(()=>{i||(e(),i=!0)},r);t.addEventListener("load",()=>{clearTimeout(l),i=!0,e()});return}const o="about:blank";if(n.location.href!==o||t.src===o||t.src==="")return setTimeout(e,0),t.addEventListener("load",e);t.addEventListener("load",e)}function Tu(t,e,r){let n=!1,i;try{i=t.sheet}catch{return}if(i)return;const s=setTimeout(()=>{n||(e(),n=!0)},r);t.addEventListener("load",()=>{clearTimeout(s),n=!0,e()})}function Au(t,e){const{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:o,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:u,maskInputFn:a,dataURLOptions:h={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p=!1,cssCaptured:y=!1}=e,v=Iu(r,n);switch(t.nodeType){case t.DOCUMENT_NODE:return t.compatMode!=="CSS1Compat"?{type:fe.Document,childNodes:[],compatMode:t.compatMode}:{type:fe.Document,childNodes:[]};case t.DOCUMENT_TYPE_NODE:return{type:fe.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:v};case t.ELEMENT_NODE:return Nu(t,{doc:r,blockClass:i,blockSelector:s,inlineStylesheet:l,maskInputOptions:c,maskInputFn:a,dataURLOptions:h,inlineImages:d,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:p,rootId:v});case t.TEXT_NODE:return Ou(t,{doc:r,needsMask:o,maskTextFn:u,rootId:v,cssCaptured:y});case t.CDATA_SECTION_NODE:return{type:fe.CDATA,textContent:"",rootId:v};case t.COMMENT_NODE:return{type:fe.Comment,textContent:Ye.textContent(t)||"",rootId:v};default:return!1}}function Iu(t,e){if(!e.hasNode(t))return;const r=e.getId(t);return r===1?void 0:r}function Ou(t,e){const{needsMask:r,maskTextFn:n,rootId:i,cssCaptured:s}=e,o=Ye.parentNode(t),l=o&&o.tagName;let c="";const u=l==="STYLE"?!0:void 0,a=l==="SCRIPT"?!0:void 0;return a?c="SCRIPT_PLACEHOLDER":s||(c=Ye.textContent(t),u&&c&&(c=Wr(c,zn(e.doc)))),!u&&!a&&c&&r&&(c=n?n(c,Ye.parentElement(t)):c.replace(/[\S]/g,"*")),{type:fe.Text,textContent:c||"",rootId:i}}function Nu(t,e){const{doc:r,blockClass:n,blockSelector:i,inlineStylesheet:s,maskInputOptions:o={},maskInputFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:a,keepIframeSrcFn:h,newlyAddedElement:d=!1,rootId:f}=e,m=ku(t,n,i),p=Su(t);let y={};const v=t.attributes.length;for(let b=0;b<v;b++){const C=t.attributes[b];fo(p,C.name,C.value)||(y[C.name]=uo(r,p,St(C.name),C.value))}if(p==="link"&&s){const b=Array.from(r.styleSheets).find(S=>S.href===t.href);let C=null;b&&(C=Fn(b)),C&&(delete y.rel,delete y.href,y._cssText=C)}if(p==="style"&&t.sheet){let b=Fn(t.sheet);b&&(t.childNodes.length>1&&(b=bu(b,t)),y._cssText=b)}if(["input","textarea","select"].includes(p)){const b=t.value,C=t.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&b?y.value=Fr({element:t,type:Ur(t),tagName:p,value:b,maskInputOptions:o,maskInputFn:l}):C&&(y.checked=C)}if(p==="option"&&(t.selected&&!o.select?y.selected=!0:delete y.selected),p==="dialog"&&t.open&&(y.rr_open_mode=t.matches("dialog:modal")?"modal":"non-modal"),p==="canvas"&&a){if(t.__context==="2d")lu(t)||(y.rr_dataURL=t.toDataURL(c.type,c.quality));else if(!("__context"in t)){const b=t.toDataURL(c.type,c.quality),C=r.createElement("canvas");C.width=t.width,C.height=t.height;const S=C.toDataURL(c.type,c.quality);b!==S&&(y.rr_dataURL=b)}}if(p==="img"&&u){Gt||(Gt=r.createElement("canvas"),lo=Gt.getContext("2d"));const b=t,C=b.currentSrc||b.getAttribute("src")||"<unknown-src>",S=b.crossOrigin,x=()=>{b.removeEventListener("load",x);try{Gt.width=b.naturalWidth,Gt.height=b.naturalHeight,lo.drawImage(b,0,0),y.rr_dataURL=Gt.toDataURL(c.type,c.quality)}catch(k){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x);return}else console.warn(`Cannot inline img src=${C}! Error: ${k}`)}b.crossOrigin==="anonymous"&&(S?y.crossOrigin=S:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?x():b.addEventListener("load",x)}if(["audio","video"].includes(p)){const b=y;b.rr_mediaState=t.paused?"paused":"played",b.rr_mediaCurrentTime=t.currentTime,b.rr_mediaPlaybackRate=t.playbackRate,b.rr_mediaMuted=t.muted,b.rr_mediaLoop=t.loop,b.rr_mediaVolume=t.volume}if(d||(t.scrollLeft&&(y.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(y.rr_scrollTop=t.scrollTop)),m){const{width:b,height:C}=t.getBoundingClientRect();y={class:y.class,rr_width:`${b}px`,rr_height:`${C}px`}}p==="iframe"&&!h(y.src)&&(t.contentDocument||(y.rr_src=y.src),delete y.src);let w;try{customElements.get(p)&&(w=!0)}catch{}return{type:fe.Element,tagName:p,attributes:y,childNodes:[],isSVG:Eu(t)||void 0,needBlock:m,rootId:f,isCustom:w}}function Le(t){return t==null?"":t.toLowerCase()}function po(t){return t===!0||t==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:t==="all",headMetaDescKeywords:t==="all",headTitleMutations:t==="all"}:t||{}}function _u(t,e){if(e.comment&&t.type===fe.Comment)return!0;if(t.type===fe.Element){if(e.script&&(t.tagName==="script"||t.tagName==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||t.tagName==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Wn(t.attributes.href)==="js"))return!0;if(e.headFavicon&&(t.tagName==="link"&&t.attributes.rel==="shortcut icon"||t.tagName==="meta"&&(Le(t.attributes.name).match(/^msapplication-tile(image|color)$/)||Le(t.attributes.name)==="application-name"||Le(t.attributes.rel)==="icon"||Le(t.attributes.rel)==="apple-touch-icon"||Le(t.attributes.rel)==="shortcut icon")))return!0;if(t.tagName==="meta"){if(e.headMetaDescKeywords&&Le(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(Le(t.attributes.property).match(/^(og|twitter|fb):/)||Le(t.attributes.name).match(/^(og|twitter):/)||Le(t.attributes.name)==="pinterest"))return!0;if(e.headMetaRobots&&(Le(t.attributes.name)==="robots"||Le(t.attributes.name)==="googlebot"||Le(t.attributes.name)==="bingbot"))return!0;if(e.headMetaHttpEquiv&&t.attributes["http-equiv"]!==void 0)return!0;if(e.headMetaAuthorship&&(Le(t.attributes.name)==="author"||Le(t.attributes.name)==="generator"||Le(t.attributes.name)==="framework"||Le(t.attributes.name)==="publisher"||Le(t.attributes.name)==="progid"||Le(t.attributes.property).match(/^article:/)||Le(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&(Le(t.attributes.name)==="google-site-verification"||Le(t.attributes.name)==="yandex-verification"||Le(t.attributes.name)==="csrf-token"||Le(t.attributes.name)==="p:domain_verify"||Le(t.attributes.name)==="verify-v1"||Le(t.attributes.name)==="verification"||Le(t.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Yt(t,e){const{doc:r,mirror:n,blockClass:i,blockSelector:s,maskTextClass:o,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:u=!0,maskInputOptions:a={},maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m={},inlineImages:p=!1,recordCanvas:y=!1,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b=5e3,onStylesheetLoad:C,stylesheetLoadTimeout:S=5e3,keepIframeSrcFn:x=()=>!1,newlyAddedElement:k=!1,cssCaptured:I=!1}=e;let{needsMask:B}=e,{preserveWhiteSpace:_=!0}=e;B||(B=ho(t,o,l,B===void 0));const H=Au(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:B,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,dataURLOptions:m,inlineImages:p,recordCanvas:y,keepIframeSrcFn:x,newlyAddedElement:k,cssCaptured:I});if(!H)return console.warn(t,"not serialized"),null;let z;n.hasNode(t)?z=n.getId(t):_u(H,f)||!_&&H.type===fe.Text&&!H.textContent.replace(/^\s+|\s+$/gm,"").length?z=Hr:z=ao();const A=Object.assign(H,{id:z});if(n.add(t,A),z===Hr)return null;v&&v(t);let be=!c;if(A.type===fe.Element){be=be&&!A.needBlock,delete A.needBlock;const ne=Ye.shadowRoot(t);ne&&pr(ne)&&(A.isShadowHost=!0)}if((A.type===fe.Document||A.type===fe.Element)&&be){f.headWhitespace&&A.type===fe.Element&&A.tagName==="head"&&(_=!1);const ne={doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:B,maskTextClass:o,maskTextSelector:l,skipChild:c,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:y,preserveWhiteSpace:_,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:x,cssCaptured:!1};if(!(A.type===fe.Element&&A.tagName==="textarea"&&A.attributes.value!==void 0)){A.type===fe.Element&&A.attributes._cssText!==void 0&&typeof A.attributes._cssText=="string"&&(ne.cssCaptured=!0);for(const de of Array.from(Ye.childNodes(t))){const j=Yt(de,ne);j&&A.childNodes.push(j)}}let F=null;if(Bn(t)&&(F=Ye.shadowRoot(t)))for(const de of Array.from(Ye.childNodes(F))){const j=Yt(de,ne);j&&(pr(F)&&(j.isShadow=!0),A.childNodes.push(j))}}const he=Ye.parentNode(t);return he&&hr(he)&&pr(he)&&(A.isShadow=!0),A.type===fe.Element&&A.tagName==="iframe"&&Mu(t,()=>{const ne=t.contentDocument;if(ne&&w){const F=Yt(ne,{doc:ne,mirror:n,blockClass:i,blockSelector:s,needsMask:B,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:y,preserveWhiteSpace:_,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:x});F&&w(t,F)}},b),A.type===fe.Element&&A.tagName==="link"&&typeof A.attributes.rel=="string"&&(A.attributes.rel==="stylesheet"||A.attributes.rel==="preload"&&typeof A.attributes.href=="string"&&Wn(A.attributes.href)==="css")&&Tu(t,()=>{if(C){const ne=Yt(t,{doc:r,mirror:n,blockClass:i,blockSelector:s,needsMask:B,maskTextClass:o,maskTextSelector:l,skipChild:!1,inlineStylesheet:u,maskInputOptions:a,maskTextFn:h,maskInputFn:d,slimDOMOptions:f,dataURLOptions:m,inlineImages:p,recordCanvas:y,preserveWhiteSpace:_,onSerialize:v,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:C,stylesheetLoadTimeout:S,keepIframeSrcFn:x});ne&&C(t,ne)}},S),A}function Du(t,e){const{mirror:r=new Un,blockClass:n="rr-block",blockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:o=null,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:u=!1,maskAllInputs:a=!1,maskTextFn:h,maskInputFn:d,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:p,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:S=()=>!1}=e,x=a===!0?{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}:a===!1?{password:!0}:a,k=po(f);return Yt(t,{doc:t,mirror:r,blockClass:n,blockSelector:i,maskTextClass:s,maskTextSelector:o,skipChild:!1,inlineStylesheet:l,maskInputOptions:x,maskTextFn:h,maskInputFn:d,slimDOMOptions:k,dataURLOptions:m,inlineImages:c,recordCanvas:u,preserveWhiteSpace:p,onSerialize:y,onIframeLoad:v,iframeLoadTimeout:w,onStylesheetLoad:b,stylesheetLoadTimeout:C,keepIframeSrcFn:S,newlyAddedElement:!1})}const Lu=/(max|min)-device-(width|height)/,mo=new RegExp(Lu.source,"g"),Pu={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(t){t.params.match(mo)&&(t.params=t.params.replace(mo,"$1-$2"))}}}},$u={postcssPlugin:"postcss-hover-classes",prepare:function(){const t=[];return{Rule:function(e){t.indexOf(e)===-1&&(t.push(e),e.selectors.forEach(function(r){r.includes(":hover")&&(e.selector+=`,
|
|
2
|
+
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function ju(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Bu(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var Vr={exports:{}},go;function Fu(){if(go)return Vr.exports;go=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return Vr.exports=e(),Vr.exports.createColors=e,Vr.exports}const ht=Bu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hn,yo;function qn(){if(yo)return Hn;yo=1;let t=Fu(),e=ht;class r extends Error{constructor(i,s,o,l,c,u){super(i),this.name="CssSyntaxError",this.reason=i,c&&(this.file=c),l&&(this.source=l),u&&(this.plugin=u),typeof s<"u"&&typeof o<"u"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let s=this.source;i==null&&(i=t.isColorSupported),e&&i&&(s=e(s));let o=s.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),u=String(c).length,a,h;if(i){let{bold:d,gray:f,red:m}=t.createColors(!0);a=p=>d(m(p)),h=p=>f(p)}else a=h=d=>d;return o.slice(l,c).map((d,f)=>{let m=l+1+f,p=" "+(" "+m).slice(-u)+" | ";if(m===this.line){let y=h(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(p)+d+`
|
|
3
|
+
`+y+a("^")}return" "+h(p)+d}).join(`
|
|
4
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
5
|
+
|
|
6
|
+
`+i+`
|
|
7
|
+
`),this.name+": "+this.message+i}}return Hn=r,r.default=r,Hn}var Gr={},bo;function Vn(){return bo||(bo=1,Gr.isClean=Symbol("isClean"),Gr.my=Symbol("my")),Gr}var Gn,vo;function wo(){if(vo)return Gn;vo=1;const t={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:" ",beforeRule:`
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(i){this.builder=i}atrule(i,s){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let c=(i.raws.between||"")+(s?";":"");this.builder(o+l+c,i)}}beforeAfter(i,s){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):s==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,c=0;for(;l&&l.type!=="root";)c+=1,l=l.parent;if(o.includes(`
|
|
13
|
+
`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<c;a++)o+=u}return o}block(i,s){let o=this.raw(i,"between","beforeOpen");this.builder(s+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let s=i.nodes.length-1;for(;s>0&&i.nodes[s].type==="comment";)s-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let c=i.nodes[l],u=this.raw(c,"before");u&&this.builder(u),this.stringify(c,s!==l||o)}}comment(i){let s=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+s+i.text+o+"*/",i)}decl(i,s){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),s&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,s,o){let l;if(o||(o=s),s&&(l=i.raws[s],typeof l<"u"))return l;let c=i.parent;if(o==="before"&&(!c||c.type==="root"&&c.first===i||c&&c.type==="document"))return"";if(!c)return t[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let a="raw"+e(o);this[a]?l=this[a](u,i):u.walk(h=>{if(l=h.raws[s],typeof l<"u")return!1})}return typeof l>"u"&&(l=t[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return s=o.raws.after,s.includes(`
|
|
14
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(i,s){let o;return i.walkComments(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
15
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,s){let o;return i.walkDecls(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
16
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let s;return i.walk(o=>{if(o.type!=="decl"&&(s=o.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(i){let s;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before<"u")return s=o.raws.before,s.includes(`
|
|
17
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(i){let s;return i.walkDecls(o=>{if(typeof o.raws.between<"u")return s=o.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(s=o.raws.after,typeof s<"u"))return!1}),s}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before<"u"){let c=o.raws.before.split(`
|
|
18
|
+
`);return s=c[c.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(s=o.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(i,s){let o=i[s],l=i.raws[s];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,s){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,s)}}return Gn=r,r.default=r,Gn}var Kn,So;function Kr(){if(So)return Kn;So=1;let t=wo();function e(r,n){new t(n).stringify(r)}return Kn=e,e.default=e,Kn}var Yn,xo;function Yr(){if(xo)return Yn;xo=1;let{isClean:t,my:e}=Vn(),r=qn(),n=wo(),i=Kr();function s(l,c){let u=new l.constructor;for(let a in l){if(!Object.prototype.hasOwnProperty.call(l,a)||a==="proxyCache")continue;let h=l[a],d=typeof h;a==="parent"&&d==="object"?c&&(u[a]=c):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(f=>s(f,u)):(d==="object"&&h!==null&&(h=s(h)),u[a]=h)}return u}class o{constructor(c={}){this.raws={},this[t]=!1,this[e]=!0;for(let u in c)if(u==="nodes"){this.nodes=[];for(let a of c[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=c[u]}addToError(c){if(c.postcssNode=this,c.stack&&this.source&&/\n\s{4}at /.test(c.stack)){let u=this.source;c.stack=c.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return c}after(c){return this.parent.insertAfter(this,c),this}assign(c={}){for(let u in c)this[u]=c[u];return this}before(c){return this.parent.insertBefore(this,c),this}cleanRaws(c){delete this.raws.before,delete this.raws.after,c||delete this.raws.between}clone(c={}){let u=s(this);for(let a in c)u[a]=c[a];return u}cloneAfter(c={}){let u=this.clone(c);return this.parent.insertAfter(this,u),u}cloneBefore(c={}){let u=this.clone(c);return this.parent.insertBefore(this,u),u}error(c,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(c,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(c)}getProxyProcessor(){return{get(c,u){return u==="proxyOf"?c:u==="root"?()=>c.root().toProxy():c[u]},set(c,u,a){return c[u]===a||(c[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&c.markDirty()),!0}}}markDirty(){if(this[t]){this[t]=!1;let c=this;for(;c=c.parent;)c[t]=!1}}next(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c+1]}positionBy(c,u){let a=this.source.start;if(c.index)a=this.positionInside(c.index,u);else if(c.word){u=this.toString();let h=u.indexOf(c.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(c,u){let a=u||this.toString(),h=this.source.start.column,d=this.source.start.line;for(let f=0;f<c;f++)a[f]===`
|
|
19
|
+
`?(h=1,d+=1):h+=1;return{column:h,line:d}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(c.word){let h=this.toString(),d=h.indexOf(c.word);d!==-1&&(u=this.positionInside(d,h),a=this.positionInside(d+c.word.length,h))}else c.start?u={column:c.start.column,line:c.start.line}:c.index&&(u=this.positionInside(c.index)),c.end?a={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?a=this.positionInside(c.endIndex):c.index&&(a=this.positionInside(c.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(c,u){return new n().raw(this,c,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let u=this,a=!1;for(let h of c)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,u){let a={},h=u==null;u=u||new Map;let d=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))a[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,u):p);else if(typeof m=="object"&&m.toJSON)a[f]=m.toJSON(null,u);else if(f==="source"){let p=u.get(m.input);p==null&&(p=d,u.set(m.input,d),d++),a[f]={end:m.end,inputId:p,start:m.start}}else a[f]=m}return h&&(a.inputs=[...u.keys()].map(f=>f.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=i){c.stringify&&(c=c.stringify);let u="";return c(this,a=>{u+=a}),u}warn(c,u,a){let h={node:this};for(let d in a)h[d]=a[d];return c.warn(u,h)}get proxyOf(){return this}}return Yn=o,o.default=o,Yn}var Jn,Co;function Jr(){if(Co)return Jn;Co=1;let t=Yr();class e extends t{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Jn=e,e.default=e,Jn}var Xn,Ro;function Uu(){if(Ro)return Xn;Ro=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Xn={nanoid:(n=21)=>{let i="",s=n;for(;s--;)i+=t[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s;for(;l--;)o+=n[Math.random()*n.length|0];return o}},Xn}var Qn,Eo;function ko(){if(Eo)return Qn;Eo=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=ht,{existsSync:r,readFileSync:n}=ht,{dirname:i,join:s}=ht;function o(c){return Buffer?Buffer.from(c,"base64").toString():window.atob(c)}class l{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,d=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(d.test(u)||f.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return o(u.substr(RegExp.lastMatch.length));let m=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),d=u.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,d)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(a instanceof t)return e.fromSourceMap(a).toString();if(a instanceof e)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=s(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Qn=l,l.default=l,Qn}var Zn,Mo;function Xr(){if(Mo)return Zn;Mo=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=ht,{fileURLToPath:r,pathToFileURL:n}=ht,{isAbsolute:i,resolve:s}=ht,{nanoid:o}=Uu(),l=ht,c=qn(),u=ko(),a=Symbol("fromOffsetCache"),h=!!(t&&e),d=!!(s&&i);class f{constructor(p,y={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,y.from&&(!d||/^\w+:\/\//.test(y.from)||i(y.from)?this.file=y.from:this.file=s(y.from)),d&&h){let v=new u(this.css,y);if(v.text){this.map=v;let w=v.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(p,y,v,w={}){let b,C,S;if(y&&typeof y=="object"){let k=y,I=v;if(typeof k.offset=="number"){let B=this.fromOffset(k.offset);y=B.line,v=B.col}else y=k.line,v=k.column;if(typeof I.offset=="number"){let B=this.fromOffset(I.offset);C=B.line,S=B.col}else C=I.line,S=I.column}else if(!v){let k=this.fromOffset(y);y=k.line,v=k.col}let x=this.origin(y,v,C,S);return x?b=new c(p,x.endLine===void 0?x.line:{column:x.column,line:x.line},x.endLine===void 0?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,w.plugin):b=new c(p,C===void 0?y:{column:v,line:y},C===void 0?v:{column:S,line:C},this.css,this.file,w.plugin),b.input={column:v,endColumn:S,endLine:C,line:y,source:this.css},this.file&&(n&&(b.input.url=n(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let y,v;if(this[a])v=this[a];else{let b=this.css.split(`
|
|
20
|
+
`);v=new Array(b.length);let C=0;for(let S=0,x=b.length;S<x;S++)v[S]=C,C+=b[S].length+1;this[a]=v}y=v[v.length-1];let w=0;if(p>=y)w=v.length-1;else{let b=v.length-2,C;for(;w<b;)if(C=w+(b-w>>1),p<v[C])b=C-1;else if(p>=v[C+1])w=C+1;else{w=C;break}}return{col:p-v[w]+1,line:w+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:s(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,y,v,w){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:y,line:p});if(!C.source)return!1;let S;typeof v=="number"&&(S=b.originalPositionFor({column:w,line:v}));let x;i(C.source)?x=n(C.source):x=new URL(C.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let k={column:C.column,endColumn:S&&S.column,endLine:S&&S.line,line:C.line,url:x.toString()};if(x.protocol==="file:")if(r)k.file=r(x);else throw new Error("file: protocol is not available in this PostCSS build");let I=b.sourceContentFor(C.source);return I&&(k.source=I),k}toJSON(){let p={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(p[y]=this[y]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return Zn=f,f.default=f,l&&l.registerInput&&l.registerInput(f),Zn}var ei,To;function Ao(){if(To)return ei;To=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=ht,{dirname:r,relative:n,resolve:i,sep:s}=ht,{pathToFileURL:o}=ht,l=Xr(),c=!!(t&&e),u=!!(r&&i&&n&&s);class a{constructor(d,f,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let f=`
|
|
21
|
+
`;this.css.includes(`\r
|
|
22
|
+
`)&&(f=`\r
|
|
23
|
+
`),this.css+=f+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let f=this.toUrl(this.path(d.file)),m=d.root||r(d.file),p;this.mapOpts.sourcesContent===!1?(p=new t(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let f=this.root.nodes.length-1;f>=0;f--)d=this.root.nodes[f],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&c&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,f=>{d+=f}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new e({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 e({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},y,v;this.stringify(this.root,(w,b,C)=>{if(this.css+=w,b&&C!=="end"&&(p.generated.line=d,p.generated.column=f-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),y=w.match(/\n/g),y?(d+=y.length,v=w.lastIndexOf(`
|
|
24
|
+
`),f=w.length-v):f+=w.length,b&&C!=="start"){let S=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==S.last||S.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=n(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ei=a,ei}var ti,Io;function Qr(){if(Io)return ti;Io=1;let t=Yr();class e extends t{constructor(n){super(n),this.type="comment"}}return ti=e,e.default=e,ti}var ri,Oo;function $t(){if(Oo)return ri;Oo=1;let{isClean:t,my:e}=Vn(),r=Jr(),n=Qr(),i=Yr(),s,o,l,c;function u(d){return d.map(f=>(f.nodes&&(f.nodes=u(f.nodes)),delete f.source,f))}function a(d){if(d[t]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)a(f)}class h extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,y;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],y=f(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[m]+=1;return delete this.indexes[m],y}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(y=>typeof y=="function"?(v,w)=>y(v.toProxy(),w):y)):m==="every"||m==="some"?p=>f[m]((y,...v)=>p(y.toProxy(),...v)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),y=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let w of y)this.proxyOf.nodes.splice(p+1,0,w);let v;for(let w in this.indexes)v=this.indexes[w],p<v&&(this.indexes[w]=v+y.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),y=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],y).reverse();p=this.index(f);for(let b of v)this.proxyOf.nodes.splice(p,0,b);let w;for(let b in this.indexes)w=this.indexes[b],p<=w&&(this.indexes[b]=w+v.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=u(s(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new o(f)];else if(f.name)f=[new l(f)];else if(f.text)f=[new n(f)];else throw new Error("Unknown node type in node creation");return f.map(y=>(y[e]||h.rebuild(y),y=y.proxyOf,y.parent&&y.parent.removeChild(y),y[t]&&a(y),typeof y.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(y.raws.before=m.raws.before.replace(/\S/g,"")),y.parent=this.proxyOf,y))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(y=>{m.props&&!m.props.includes(y.prop)||m.fast&&!y.value.includes(m.fast)||(y.value=y.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let y;try{y=f(m,p)}catch(v){throw m.addToError(v)}return y!==!1&&m.walk&&(y=m.walk(f)),y})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="atrule")return m(p,y)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="decl")return m(p,y)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="rule")return m(p,y)}))}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]}}return h.registerParse=d=>{s=d},h.registerRule=d=>{o=d},h.registerAtRule=d=>{l=d},h.registerRoot=d=>{c=d},ri=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,l.prototype):d.type==="rule"?Object.setPrototypeOf(d,o.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,n.prototype):d.type==="root"&&Object.setPrototypeOf(d,c.prototype),d[e]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},ri}var ni,No;function ii(){if(No)return ni;No=1;let t=$t(),e,r;class n extends t{constructor(s){super({type:"document",...s}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},ni=n,n.default=n,ni}var si,_o;function Do(){if(_o)return si;_o=1;let t={};return si=function(r){t[r]||(t[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},si}var oi,Lo;function Po(){if(Lo)return oi;Lo=1;class t{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}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}}return oi=t,t.default=t,oi}var ai,$o;function li(){if($o)return ai;$o=1;let t=Po();class e{constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new t(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return ai=e,e.default=e,ai}var ci,jo;function Wu(){if(jo)return ci;jo=1;const t=39,e=34,r=92,n=47,i=10,s=32,o=12,l=9,c=13,u=91,a=93,h=40,d=41,f=123,m=125,p=59,y=42,v=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,x=/[\da-f]/i;return ci=function(I,B={}){let _=I.css.valueOf(),H=B.ignoreErrors,z,A,be,he,ne,F,de,j,X,T,U=_.length,D=0,te=[],ie=[];function Ce(){return D}function se(ee){throw I.error("Unclosed "+ee,D)}function le(){return ie.length===0&&D>=U}function pe(ee){if(ie.length)return ie.pop();if(D>=U)return;let Ie=ee?ee.ignoreUnclosed:!1;switch(z=_.charCodeAt(D),z){case i:case s:case l:case c:case o:{A=D;do A+=1,z=_.charCodeAt(A);while(z===s||z===i||z===l||z===c||z===o);T=["space",_.slice(D,A)],D=A-1;break}case u:case a:case f:case m:case v:case p:case d:{let re=String.fromCharCode(z);T=[re,re,D];break}case h:{if(j=te.length?te.pop()[1]:"",X=_.charCodeAt(D+1),j==="url"&&X!==t&&X!==e&&X!==s&&X!==i&&X!==l&&X!==o&&X!==c){A=D;do{if(F=!1,A=_.indexOf(")",A+1),A===-1)if(H||Ie){A=D;break}else se("bracket");for(de=A;_.charCodeAt(de-1)===r;)de-=1,F=!F}while(F);T=["brackets",_.slice(D,A+1),D,A],D=A}else A=_.indexOf(")",D+1),he=_.slice(D,A+1),A===-1||S.test(he)?T=["(","(",D]:(T=["brackets",he,D,A],D=A);break}case t:case e:{be=z===t?"'":'"',A=D;do{if(F=!1,A=_.indexOf(be,A+1),A===-1)if(H||Ie){A=D+1;break}else se("string");for(de=A;_.charCodeAt(de-1)===r;)de-=1,F=!F}while(F);T=["string",_.slice(D,A+1),D,A],D=A;break}case w:{b.lastIndex=D+1,b.test(_),b.lastIndex===0?A=_.length-1:A=b.lastIndex-2,T=["at-word",_.slice(D,A+1),D,A],D=A;break}case r:{for(A=D,ne=!0;_.charCodeAt(A+1)===r;)A+=1,ne=!ne;if(z=_.charCodeAt(A+1),ne&&z!==n&&z!==s&&z!==i&&z!==l&&z!==c&&z!==o&&(A+=1,x.test(_.charAt(A)))){for(;x.test(_.charAt(A+1));)A+=1;_.charCodeAt(A+1)===s&&(A+=1)}T=["word",_.slice(D,A+1),D,A],D=A;break}default:{z===n&&_.charCodeAt(D+1)===y?(A=_.indexOf("*/",D+2)+1,A===0&&(H||Ie?A=_.length:se("comment")),T=["comment",_.slice(D,A+1),D,A],D=A):(C.lastIndex=D+1,C.test(_),C.lastIndex===0?A=_.length-1:A=C.lastIndex-2,T=["word",_.slice(D,A+1),D,A],te.push(T),D=A);break}}return D++,T}function Te(ee){ie.push(ee)}return{back:Te,endOfFile:le,nextToken:pe,position:Ce}},ci}var ui,Bo;function di(){if(Bo)return ui;Bo=1;let t=$t();class e extends t{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return ui=e,e.default=e,t.registerAtRule(e),ui}var fi,Fo;function mr(){if(Fo)return fi;Fo=1;let t=$t(),e,r;class n extends t{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let c=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of c)u.raws.before=o.raws.before}return c}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},fi=n,n.default=n,t.registerRoot(n),fi}var hi,Uo;function Wo(){if(Uo)return hi;Uo=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let r=[" ",`
|
|
25
|
+
`," "];return t.split(e,r)},split(e,r,n){let i=[],s="",o=!1,l=0,c=!1,u="",a=!1;for(let h of e)a?a=!1:h==="\\"?a=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&i.push(s.trim()),i}};return hi=t,t.default=t,hi}var pi,zo;function mi(){if(zo)return pi;zo=1;let t=$t(),e=Wo();class r extends t{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return e.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return pi=r,r.default=r,t.registerRule(r),pi}var gi,Ho;function zu(){if(Ho)return gi;Ho=1;let t=Jr(),e=Wu(),r=Qr(),n=di(),i=mr(),s=mi();const o={empty:!0,space:!0};function l(u){for(let a=u.length-1;a>=0;a--){let h=u[a],d=h[3]||h[2];if(d)return d}}class c{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let d,f,m,p=!1,y=!1,v=[],w=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),d=a[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){y=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,f=v[m];f&&f[0]==="space";)f=v[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(a);break}else v.push(a);else v.push(a);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(h.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(h,"params",v),p&&(a=v[v.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),y&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=a[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(a){let h=0,d,f,m;for(let[p,y]of a.entries()){if(d=y,f=d[0],f==="("&&(h+=1),f===")"&&(h-=1),h===0&&f===":")if(!m)this.doubleColon(d);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=d}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let d=a[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=e(this.input)}decl(a,h){let d=new t;this.init(d,a[0][2]);let f=a[a.length-1];for(f[0]===";"&&(this.semicolon=!0,a.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(a)),d.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),d.raws.before+=a.shift()[1];for(d.source.start=this.getPosition(a[0][2]),d.prop="";a.length;){let w=a[0][0];if(w===":"||w==="space"||w==="comment")break;d.prop+=a.shift()[1]}d.raws.between="";let m;for(;a.length;)if(m=a.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],y;for(;a.length&&(y=a[0][0],!(y!=="space"&&y!=="comment"));)p.push(a.shift());this.precheckMissedSemicolon(a);for(let w=a.length-1;w>=0;w--){if(m=a[w],m[1].toLowerCase()==="!important"){d.important=!0;let b=this.stringFrom(a,w);b=this.spacesFromEnd(a)+b,b!==" !important"&&(d.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=a.slice(0),C="";for(let S=w;S>0;S--){let x=b[S][0];if(C.trim().indexOf("!")===0&&x!=="space")break;C=b.pop()[1]+C}C.trim().indexOf("!")===0&&(d.important=!0,d.raws.important=C,a=b)}if(m[0]!=="space"&&m[0]!=="comment")break}a.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(d.raws.between+=p.map(w=>w[1]).join(""),p=[]),this.raw(d,"value",p.concat(a),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new s;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}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(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,d=null,f=!1,m=null,p=[],y=a[1].startsWith("--"),v=[],w=a;for(;w;){if(d=w[0],v.push(w),d==="("||d==="[")m||(m=w),p.push(d==="("?")":"]");else if(y&&f&&d==="{")m||(m=w),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(v,y);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!y)for(;v.length&&(w=v[v.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,y)}else this.unknownWord(v)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,d,f){let m,p,y=d.length,v="",w=!0,b,C;for(let S=0;S<y;S+=1)m=d[S],p=m[0],p==="space"&&S===y-1&&!f?w=!1:p==="comment"?(C=d[S-1]?d[S-1][0]:"empty",b=d[S+1]?d[S+1][0]:"empty",!o[C]&&!o[b]?v.slice(-1)===","?w=!1:v+=m[1]:w=!1):v+=m[1];if(!w){let S=d.reduce((x,k)=>x+k[1],"");a.raws[h]={raw:S,value:v}}a[h]=v}rule(a){a.pop();let h=new s;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)d=a.pop()[1]+d;return d}spacesAndCommentsFromStart(a){let h,d="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)d+=a.shift()[1];return d}spacesFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],h==="space");)d=a.pop()[1]+d;return d}stringFrom(a,h){let d="";for(let f=h;f<a.length;f++)d+=a[f][1];return a.splice(h,a.length-h),d}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return gi=c,gi}var yi,qo;function bi(){if(qo)return yi;qo=1;let t=$t(),e=zu(),r=Xr();function n(i,s){let o=new r(i,s),l=new e(o);try{l.parse()}catch(c){throw process.env.NODE_ENV!=="production"&&c.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?c.message+=`
|
|
26
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?c.message+=`
|
|
27
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(c.message+=`
|
|
28
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),c}return l.root}return yi=n,n.default=n,t.registerParse(n),yi}var vi,Vo;function Go(){if(Vo)return vi;Vo=1;let{isClean:t,my:e}=Vn(),r=Ao(),n=Kr(),i=$t(),s=ii(),o=Do(),l=li(),c=bi(),u=mr();const a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let S=!1,x=a[C.type];return C.type==="decl"?S=C.prop.toLowerCase():C.type==="atrule"&&(S=C.name.toLowerCase()),S&&C.append?[x,x+"-"+S,f,x+"Exit",x+"Exit-"+S]:S?[x,x+"-"+S,x+"Exit",x+"Exit-"+S]:C.append?[x,f,x+"Exit"]:[x,x+"Exit"]}function y(C){let S;return C.type==="document"?S=["Document",f,"DocumentExit"]:C.type==="root"?S=["Root",f,"RootExit"]:S=p(C),{eventIndex:0,events:S,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[t]=!1,C.nodes&&C.nodes.forEach(S=>v(S)),C}let w={};class b{constructor(S,x,k){this.stringified=!1,this.processed=!1;let I;if(typeof x=="object"&&x!==null&&(x.type==="root"||x.type==="document"))I=v(x);else if(x instanceof b||x instanceof l)I=v(x.root),x.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=x.map);else{let B=c;k.syntax&&(B=k.syntax.parse),k.parser&&(B=k.parser),B.parse&&(B=B.parse);try{I=B(x,k)}catch(_){this.processed=!0,this.error=_}I&&!I[e]&&i.rebuild(I)}this.result=new l(S,I,k),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(B=>typeof B=="object"&&B.prepare?{...B,...B.prepare(this.result)}:B)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,x){let k=this.result.lastPlugin;try{if(x&&x.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=k.postcssPlugin,S.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let I=k.postcssPlugin,B=k.postcssVersion,_=this.result.processor.version,H=B.split("."),z=_.split(".");(H[0]!==z[0]||parseInt(H[1])>parseInt(z[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+_+", but "+I+" uses "+B+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(x,k,I)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([x,I])};for(let x of this.plugins)if(typeof x=="object")for(let k in x){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${x.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[k])if(typeof x[k]=="object")for(let I in x[k])I==="*"?S(x,k,x[k][I]):S(x,k+"-"+I.toLowerCase(),x[k][I]);else typeof x[k]=="function"&&S(x,k,x[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let x=this.plugins[S],k=this.runOnRoot(x);if(m(k))try{await k}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];){S[t]=!0;let x=[y(S)];for(;x.length>0;){let k=this.visitTick(x);if(m(k))try{await k}catch(I){let B=x[x.length-1].node;throw this.handleError(I,B)}}}if(this.listeners.OnceExit)for(let[x,k]of this.listeners.OnceExit){this.result.lastPlugin=x;try{if(S.type==="document"){let I=S.nodes.map(B=>k(B,this.helpers));await Promise.all(I)}else await k(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let x=this.result.root.nodes.map(k=>S.Once(k,this.helpers));return m(x[0])?Promise.all(x):x}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(x){throw this.handleError(x)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,x=n;S.syntax&&(x=S.syntax.stringify),S.stringifier&&(x=S.stringifier),x.stringify&&(x=x.stringify);let I=new r(x,this.result.root,this.result.opts).generate();return this.result.css=I[0],this.result.map=I[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 S of this.plugins){let x=this.runOnRoot(S);if(m(x))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];)S[t]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let x of S.nodes)this.visitSync(this.listeners.OnceExit,x);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,x){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(S,x)}toString(){return this.css}visitSync(S,x){for(let[k,I]of S){this.result.lastPlugin=k;let B;try{B=I(x,this.helpers)}catch(_){throw this.handleError(_,x.proxyOf)}if(x.type!=="root"&&x.type!=="document"&&!x.parent)return!0;if(m(B))throw this.getAsyncError()}}visitTick(S){let x=S[S.length-1],{node:k,visitors:I}=x;if(k.type!=="root"&&k.type!=="document"&&!k.parent){S.pop();return}if(I.length>0&&x.visitorIndex<I.length){let[_,H]=I[x.visitorIndex];x.visitorIndex+=1,x.visitorIndex===I.length&&(x.visitors=[],x.visitorIndex=0),this.result.lastPlugin=_;try{return H(k.toProxy(),this.helpers)}catch(z){throw this.handleError(z,k)}}if(x.iterator!==0){let _=x.iterator,H;for(;H=k.nodes[k.indexes[_]];)if(k.indexes[_]+=1,!H[t]){H[t]=!0,S.push(y(H));return}x.iterator=0,delete k.indexes[_]}let B=x.events;for(;x.eventIndex<B.length;){let _=B[x.eventIndex];if(x.eventIndex+=1,_===f){k.nodes&&k.nodes.length&&(k[t]=!0,x.iterator=k.getIterator());return}else if(this.listeners[_]){x.visitors=this.listeners[_];return}}S.pop()}walkSync(S){S[t]=!0;let x=p(S);for(let k of x)if(k===f)S.nodes&&S.each(I=>{I[t]||this.walkSync(I)});else{let I=this.listeners[k];if(I&&this.visitSync(I,S.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=C=>{w=C},vi=b,b.default=b,u.registerLazyResult(b),s.registerLazyResult(b),vi}var wi,Ko;function Hu(){if(Ko)return wi;Ko=1;let t=Ao(),e=Kr(),r=Do(),n=bi();const i=li();class s{constructor(l,c,u){c=c.toString(),this.stringified=!1,this._processor=l,this._css=c,this._opts=u,this._map=void 0;let a,h=e;this.result=new i(this._processor,a,this._opts),this.result.css=c;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new t(h,a,this._opts,c);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,c){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("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(l,c)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,c=n;try{l=c(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return wi=s,s.default=s,wi}var Si,Yo;function qu(){if(Yo)return Si;Yo=1;let t=Hu(),e=Go(),r=ii(),n=mr();class i{constructor(o=[]){this.version="8.4.38",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let c of o)if(c.postcss===!0?c=c():c.postcss&&(c=c.postcss),typeof c=="object"&&Array.isArray(c.plugins))l=l.concat(c.plugins);else if(typeof c=="object"&&c.postcssPlugin)l.push(c);else if(typeof c=="function")l.push(c);else if(typeof c=="object"&&(c.parse||c.stringify)){if(process.env.NODE_ENV!=="production")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.")}else throw new Error(c+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new t(this,o,l):new e(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return Si=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),Si}var xi,Jo;function Vu(){if(Jo)return xi;Jo=1;let t=Jr(),e=ko(),r=Qr(),n=di(),i=Xr(),s=mr(),o=mi();function l(c,u){if(Array.isArray(c))return c.map(d=>l(d));let{inputs:a,...h}=c;if(a){u=[];for(let d of a){let f={...d,__proto__:i.prototype};f.map&&(f.map={...f.map,__proto__:e.prototype}),u.push(f)}}if(h.nodes&&(h.nodes=c.nodes.map(d=>l(d,u))),h.source){let{inputId:d,...f}=h.source;h.source=f,d!=null&&(h.source.input=u[d])}if(h.type==="root")return new s(h);if(h.type==="decl")return new t(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+c.type)}return xi=l,l.default=l,xi}var Ci,Xo;function Gu(){if(Xo)return Ci;Xo=1;let t=qn(),e=Jr(),r=Go(),n=$t(),i=qu(),s=Kr(),o=Vu(),l=ii(),c=Po(),u=Qr(),a=di(),h=li(),d=Xr(),f=bi(),m=Wo(),p=mi(),y=mr(),v=Yr();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new i(b)}return w.plugin=function(C,S){let x=!1;function k(...B){console&&console.warn&&!x&&(x=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
29
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
30
|
+
https://www.w3ctech.com/topic/2226`));let _=S(...B);return _.postcssPlugin=C,_.postcssVersion=new i().version,_}let I;return Object.defineProperty(k,"postcss",{get(){return I||(I=k()),I}}),k.process=function(B,_,H){return w([k(H)]).process(B,_)},k},w.stringify=s,w.parse=f,w.fromJSON=o,w.list=m,w.comment=b=>new u(b),w.atRule=b=>new a(b),w.decl=b=>new e(b),w.rule=b=>new p(b),w.root=b=>new y(b),w.document=b=>new l(b),w.CssSyntaxError=t,w.Declaration=e,w.Container=n,w.Processor=i,w.Document=l,w.Comment=u,w.Warning=c,w.AtRule=a,w.Result=h,w.Input=d,w.Rule=p,w.Root=y,w.Node=v,r.registerPostcss(w),Ci=w,w.default=w,Ci}var Ku=Gu();const $e=ju(Ku);$e.stringify,$e.fromJSON,$e.plugin,$e.parse,$e.list,$e.document,$e.comment,$e.atRule,$e.rule,$e.decl,$e.root,$e.CssSyntaxError,$e.Declaration,$e.Container,$e.Processor,$e.Document,$e.Comment,$e.Warning,$e.AtRule,$e.Result,$e.Input,$e.Rule,$e.Root,$e.Node;const Qo={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function Yu(t){let e=Qo[t.tagName]?Qo[t.tagName]:t.tagName;return e==="link"&&t.attributes._cssText&&(e="style"),e}function Zr(t,e){const r=e==null?void 0:e.stylesWithHoverClass.get(t);if(r)return r;let n=t;try{n=$e([Pu,$u]).process(t).css}catch(i){console.warn("Failed to adapt css for replay",i)}return e==null||e.stylesWithHoverClass.set(t,n),n}function Zo(){return{stylesWithHoverClass:new Map}}const Ju="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",ea="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",ta=new WeakSet;function Xu(t){if(!t||t.tagName!=="IFRAME"||!("sandbox"in t))return!1;const e=Array.from(t.sandbox);return e.length===1&&e[0]==="allow-same-origin"}function Qu(t){if(t.UNSAFE_allowUnprotectedRebuild)return;const e=t.doc.defaultView;if(e&&!(ta.has(t.doc)&&Xu(e.frameElement)))throw new Error(Ju)}function Zu(t,e,r,n){const i=[];for(const u of t.childNodes)u.type===fe.Text&&i.push(u);const s=e.split("/* rr_split */");for(;s.length>1&&s.length>i.length;)s.splice(-2,2,s.slice(-2).join(""));let o="";r&&(o=Zr(s.join(""),n));let l=0,c=-1;for(let u=0;u<i.length&&u!==s.length;u++){const a=i[u];let h=s[u];const d=u<s.length-1?s[u+1]:null;if(r&&d){let f=l,m=d.length;m=Math.min(m,30);let p=!1;for(;m>2;m--){const y=d.substring(0,m),v=o.substring(l).indexOf(y);if(p=v!==-1,p){f+=v;break}}p||(f+=h.length),h=o.substring(l,f),l=f}else r&&(h=o.substring(l));c!==-1&&(h=h.substring(c)),d&&(c!==-1||h.endsWith("0p")&&d.startsWith("x"))&&(c=d.indexOf("}"),c!==-1&&(c+=1,h+=d.substring(0,c))),a.textContent=h}}function ed(t,e,r,n){const{doc:i,hackCss:s,cache:o}=n;t.childNodes.length?Zu(t,r,s,o):(s&&(r=Zr(r,o)),e.appendChild(i.createTextNode(r)))}function td(t,e){var r;const{doc:n,hackCss:i,cache:s}=e;switch(t.type){case fe.Document:return n.implementation.createDocument(null,"",null);case fe.DocumentType:return n.implementation.createDocumentType(t.name||"html",t.publicId,t.systemId);case fe.Element:{const o=Yu(t);let l;t.isSVG?l=n.createElementNS("http://www.w3.org/2000/svg",o):(t.isCustom&&((r=n.defaultView)!=null&&r.customElements)&&!n.defaultView.customElements.get(t.tagName)&&n.defaultView.customElements.define(t.tagName,class extends n.defaultView.HTMLElement{}),l=n.createElement(o));const c={};for(const u in t.attributes){if(!Object.prototype.hasOwnProperty.call(t.attributes,u))continue;let a=t.attributes[u];if(!(o==="option"&&u==="selected"&&a===!1)&&a!==null){if(a===!0&&(a=""),u.startsWith("rr_")){c[u]=a;continue}if(typeof a=="string"){if(o==="style"&&u==="_cssText"){ed(t,l,a,e);continue}else if(o==="textarea"&&u==="value"){l.appendChild(n.createTextNode(a)),t.childNodes=[];continue}}try{if(t.isSVG&&u==="xlink:href")l.setAttributeNS("http://www.w3.org/1999/xlink",u,a.toString());else if(u==="onload"||u==="onclick"||u.substring(0,7)==="onmouse")l.setAttribute("_"+u,a.toString());else if(o==="meta"&&t.attributes["http-equiv"]==="Content-Security-Policy"&&u==="content"){l.setAttribute("csp-content",a.toString());continue}else o==="link"&&(t.attributes.rel==="preload"&&t.attributes.as==="script"||t.attributes.rel==="modulepreload")||o==="link"&&t.attributes.rel==="prefetch"&&typeof t.attributes.href=="string"&&Wn(t.attributes.href)==="js"||(o==="img"&&t.attributes.srcset&&t.attributes.rr_dataURL?l.setAttribute("rrweb-original-srcset",t.attributes.srcset):l.setAttribute(u,a.toString()))}catch{}}}for(const u in c){const a=c[u];if(o==="canvas"&&u==="rr_dataURL"){const h=n.createElement("img");h.onload=()=>{const d=l.getContext("2d");d&&d.drawImage(h,0,0,h.width,h.height)},h.src=a.toString(),l.RRNodeType&&(l.rr_dataURL=a.toString())}else if(o==="img"&&u==="rr_dataURL"){const h=l;h.currentSrc.startsWith("data:")||(h.setAttribute("rrweb-original-src",t.attributes.src),h.src=a.toString())}if(u==="rr_width")l.style.setProperty("width",a.toString());else if(u==="rr_height")l.style.setProperty("height",a.toString());else if(u==="rr_mediaCurrentTime"&&typeof a=="number")l.currentTime=a;else if(u==="rr_mediaState")switch(a){case"played":l.play().catch(h=>console.warn("media playback error",h));break;case"paused":l.pause();break}else u==="rr_mediaPlaybackRate"&&typeof a=="number"?l.playbackRate=a:u==="rr_mediaMuted"&&typeof a=="boolean"?l.muted=a:u==="rr_mediaLoop"&&typeof a=="boolean"?l.loop=a:u==="rr_mediaVolume"&&typeof a=="number"?l.volume=a:u==="rr_open_mode"&&l.setAttribute("rr_open_mode",a)}if(t.isShadowHost)if(!l.shadowRoot)l.attachShadow({mode:"open"});else for(;l.shadowRoot.firstChild;)l.shadowRoot.removeChild(l.shadowRoot.firstChild);return(o==="input"||o==="textarea")&&l.setAttribute("autocomplete","off"),l}case fe.Text:return t.isStyle&&i?n.createTextNode(Zr(t.textContent,s)):n.createTextNode(t.textContent);case fe.CDATA:return n.createCDATASection(t.textContent);case fe.Comment:return n.createComment(t.textContent);default:return null}}function gr(t,e){const{doc:r,mirror:n,skipChild:i=!1,hackCss:s=!0,afterAppend:o,cache:l}=e;if(n.has(t.id)){const u=n.getNode(t.id),a=n.getMeta(u);if(cu(a,t))return n.getNode(t.id)}let c=td(t,{doc:r,hackCss:s,cache:l});if(!c)return null;if(t.rootId&&n.getNode(t.rootId)!==r&&n.replace(t.rootId,r),t.type===fe.Document&&(r.close(),r.open(),t.compatMode==="BackCompat"&&t.childNodes&&t.childNodes[0].type!==fe.DocumentType&&(t.childNodes[0].type===fe.Element&&"xmlns"in t.childNodes[0].attributes&&t.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),c=r),n.add(c,t),(t.type===fe.Document||t.type===fe.Element)&&!i)for(const u of t.childNodes){const a=gr(u,{doc:r,mirror:n,skipChild:!1,hackCss:s,afterAppend:o,cache:l});if(!a){console.warn("Failed to rebuild",u);continue}if(u.isShadow&&Bn(c)&&c.shadowRoot)c.shadowRoot.appendChild(a);else if(t.type===fe.Document&&u.type==fe.Element){const h=a;let d=null;h.childNodes.forEach(f=>{f.nodeName==="BODY"&&(d=f)}),d?(h.removeChild(d),c.appendChild(a),h.appendChild(d)):c.appendChild(a)}else c.appendChild(a);o&&o(a,u.id)}return c}function rd(t,e){function r(n){e(n)}for(const n of t.getIds())t.has(n)&&r(t.getNode(n))}function nd(t,e){const r=e.getMeta(t);if((r==null?void 0:r.type)!==fe.Element)return;const n=t;for(const i in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,i)&&i.startsWith("rr_")))continue;const s=r.attributes[i];i==="rr_scrollLeft"&&(n.scrollLeft=s),i==="rr_scrollTop"&&(n.scrollTop=s)}}function id(t,e){Qu(e);const{doc:r,onVisit:n,hackCss:i=!0,afterAppend:s,cache:o,mirror:l=new Un}=e,c=gr(t,{doc:r,mirror:l,skipChild:!1,hackCss:i,afterAppend:s,cache:o});return rd(l,u=>{n&&n(u),nd(u,l)}),c}function sd(t){var e;if(!t.root.isConnected)throw new Error(ea);const r=t.root.ownerDocument.createElement("iframe");for(const[i,s]of Object.entries(t.iframeAttributes||{}))i!=="sandbox"&&r.setAttribute(i,s);r.setAttribute("sandbox","allow-same-origin"),t.root.appendChild(r);const n=r.contentDocument;if(!n||!r.contentWindow)throw(e=r.parentNode)==null||e.removeChild(r),new Error(ea);return ta.add(n),r}var od=Object.defineProperty,ad=(t,e,r)=>e in t?od(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,G=(t,e,r)=>ad(t,typeof e!="symbol"?e+"":e,r),ld=Object.defineProperty,cd=(t,e,r)=>e in t?ld(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ra=(t,e,r)=>cd(t,typeof e!="symbol"?e+"":e,r);const na={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ia={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},yr={},Ri={};let sa=0;const ud=()=>!!globalThis.Zone;function Ei(t){if(yr[t])return yr[t];const e=globalThis[t],r=e.prototype,n=t in na?na[t]:void 0,i=!!(n&&n.every(l=>{var c,u;return!!((u=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&u.toString().includes("[native code]"))})),s=t in ia?ia[t]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!ud())return yr[t]=e.prototype,e.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return e.prototype;const u=c[t].prototype;if(!u)return l.remove(),r;const a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),Ri[t]=()=>l.remove()):l.remove(),yr[t]=u}catch{return r}}const ki={};function lt(t,e,r){var n,i;const s=(n=ki[t])==null?void 0:n[r];if(s)return s.call(e);const o=Ei(t),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?((ki[t]||(ki[t]={}))[r]=l,l.call(e)):e[r]}const Mi={};function oa(t,e,r){const n=`${t}.${String(r)}`;if(Mi[n])return Mi[n].bind(e);const s=Ei(t)[r];return typeof s!="function"?e[r]:(Mi[n]=s,s.bind(e))}function dd(t){return lt("Node",t,"ownerDocument")}function fd(t){return lt("Node",t,"childNodes")}function hd(t){return lt("Node",t,"parentNode")}function pd(t){return lt("Node",t,"parentElement")}function md(t){return lt("Node",t,"textContent")}function gd(t){return lt("Node",t,"firstChild")}function yd(t){return lt("Node",t,"lastChild")}function bd(t){return lt("Node",t,"nextSibling")}function vd(t){return lt("Node",t,"previousSibling")}function wd(t,e){return oa("Node",t,"contains")(e)}function Sd(t){return oa("Node",t,"getRootNode")()}function xd(t){return!t||!("host"in t)?null:lt("ShadowRoot",t,"host")}function Cd(t){return t.styleSheets}function Rd(t){return!t||!("shadowRoot"in t)?null:lt("Element",t,"shadowRoot")}function Ed(t,e){return lt("Element",t,"querySelector")(e)}function kd(t,e){return lt("Element",t,"querySelectorAll")(e)}function Md(){const t=Ei("MutationObserver");sa++;let e=!1;return[t.constructor,()=>{if(e||(e=!0,--sa!==0))return;const r=Ri.MutationObserver;if(r)try{r()}finally{delete yr.MutationObserver,delete Ri.MutationObserver}}]}let aa=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(aa=()=>new Date().getTime());function Td(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}const Ad={ownerDocument:dd,childNodes:fd,parentNode:hd,parentElement:pd,textContent:md,firstChild:gd,lastChild:yd,nextSibling:bd,previousSibling:vd,contains:wd,getRootNode:Sd,host:xd,styleSheets:Cd,shadowRoot:Rd,querySelector:Ed,querySelectorAll:kd,nowTimestamp:aa,mutationObserverCtor:Md,patch:Td};let Id=class{constructor(){ra(this,"idNodeMap",new Map),ra(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(i=>this.removeNodeFromMap(i));const n=Ad.shadowRoot(e);n&&this.removeNodeFromMap(n)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Od(){return new Id}function Nd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function _d(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}var en={exports:{}},la;function Dd(){if(la)return en.exports;la=1;var t=String,e=function(){return{isColorSupported:!1,reset:t,bold:t,dim:t,italic:t,underline:t,inverse:t,hidden:t,strikethrough:t,black:t,red:t,green:t,yellow:t,blue:t,magenta:t,cyan:t,white:t,gray:t,bgBlack:t,bgRed:t,bgGreen:t,bgYellow:t,bgBlue:t,bgMagenta:t,bgCyan:t,bgWhite:t}};return en.exports=e(),en.exports.createColors=e,en.exports}const pt=_d(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Ti,ca;function Ai(){if(ca)return Ti;ca=1;let t=Dd(),e=pt;class r extends Error{constructor(i,s,o,l,c,u){super(i),this.name="CssSyntaxError",this.reason=i,c&&(this.file=c),l&&(this.source=l),u&&(this.plugin=u),typeof s<"u"&&typeof o<"u"&&(typeof s=="number"?(this.line=s,this.column=o):(this.line=s.line,this.column=s.column,this.endLine=o.line,this.endColumn=o.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}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(i){if(!this.source)return"";let s=this.source;i==null&&(i=t.isColorSupported),e&&i&&(s=e(s));let o=s.split(/\r?\n/),l=Math.max(this.line-3,0),c=Math.min(this.line+2,o.length),u=String(c).length,a,h;if(i){let{bold:d,gray:f,red:m}=t.createColors(!0);a=p=>d(m(p)),h=p=>f(p)}else a=h=d=>d;return o.slice(l,c).map((d,f)=>{let m=l+1+f,p=" "+(" "+m).slice(-u)+" | ";if(m===this.line){let y=h(p.replace(/\d/g," "))+d.slice(0,this.column-1).replace(/[^\t]/g," ");return a(">")+h(p)+d+`
|
|
31
|
+
`+y+a("^")}return" "+h(p)+d}).join(`
|
|
32
|
+
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
33
|
+
|
|
34
|
+
`+i+`
|
|
35
|
+
`),this.name+": "+this.message+i}}return Ti=r,r.default=r,Ti}var tn={},ua;function Ii(){return ua||(ua=1,tn.isClean=Symbol("isClean"),tn.my=Symbol("my")),tn}var Oi,da;function fa(){if(da)return Oi;da=1;const t={after:`
|
|
36
|
+
`,beforeClose:`
|
|
37
|
+
`,beforeComment:`
|
|
38
|
+
`,beforeDecl:`
|
|
39
|
+
`,beforeOpen:" ",beforeRule:`
|
|
40
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function e(n){return n[0].toUpperCase()+n.slice(1)}class r{constructor(i){this.builder=i}atrule(i,s){let o="@"+i.name,l=i.params?this.rawValue(i,"params"):"";if(typeof i.raws.afterName<"u"?o+=i.raws.afterName:l&&(o+=" "),i.nodes)this.block(i,o+l);else{let c=(i.raws.between||"")+(s?";":"");this.builder(o+l+c,i)}}beforeAfter(i,s){let o;i.type==="decl"?o=this.raw(i,null,"beforeDecl"):i.type==="comment"?o=this.raw(i,null,"beforeComment"):s==="before"?o=this.raw(i,null,"beforeRule"):o=this.raw(i,null,"beforeClose");let l=i.parent,c=0;for(;l&&l.type!=="root";)c+=1,l=l.parent;if(o.includes(`
|
|
41
|
+
`)){let u=this.raw(i,null,"indent");if(u.length)for(let a=0;a<c;a++)o+=u}return o}block(i,s){let o=this.raw(i,"between","beforeOpen");this.builder(s+o+"{",i,"start");let l;i.nodes&&i.nodes.length?(this.body(i),l=this.raw(i,"after")):l=this.raw(i,"after","emptyBody"),l&&this.builder(l),this.builder("}",i,"end")}body(i){let s=i.nodes.length-1;for(;s>0&&i.nodes[s].type==="comment";)s-=1;let o=this.raw(i,"semicolon");for(let l=0;l<i.nodes.length;l++){let c=i.nodes[l],u=this.raw(c,"before");u&&this.builder(u),this.stringify(c,s!==l||o)}}comment(i){let s=this.raw(i,"left","commentLeft"),o=this.raw(i,"right","commentRight");this.builder("/*"+s+i.text+o+"*/",i)}decl(i,s){let o=this.raw(i,"between","colon"),l=i.prop+o+this.rawValue(i,"value");i.important&&(l+=i.raws.important||" !important"),s&&(l+=";"),this.builder(l,i)}document(i){this.body(i)}raw(i,s,o){let l;if(o||(o=s),s&&(l=i.raws[s],typeof l<"u"))return l;let c=i.parent;if(o==="before"&&(!c||c.type==="root"&&c.first===i||c&&c.type==="document"))return"";if(!c)return t[o];let u=i.root();if(u.rawCache||(u.rawCache={}),typeof u.rawCache[o]<"u")return u.rawCache[o];if(o==="before"||o==="after")return this.beforeAfter(i,o);{let a="raw"+e(o);this[a]?l=this[a](u,i):u.walk(h=>{if(l=h.raws[s],typeof l<"u")return!1})}return typeof l>"u"&&(l=t[o]),u.rawCache[o]=l,l}rawBeforeClose(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length>0&&typeof o.raws.after<"u")return s=o.raws.after,s.includes(`
|
|
42
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawBeforeComment(i,s){let o;return i.walkComments(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
43
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeDecl"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeDecl(i,s){let o;return i.walkDecls(l=>{if(typeof l.raws.before<"u")return o=l.raws.before,o.includes(`
|
|
44
|
+
`)&&(o=o.replace(/[^\n]+$/,"")),!1}),typeof o>"u"?o=this.raw(s,null,"beforeRule"):o&&(o=o.replace(/\S/g,"")),o}rawBeforeOpen(i){let s;return i.walk(o=>{if(o.type!=="decl"&&(s=o.raws.between,typeof s<"u"))return!1}),s}rawBeforeRule(i){let s;return i.walk(o=>{if(o.nodes&&(o.parent!==i||i.first!==o)&&typeof o.raws.before<"u")return s=o.raws.before,s.includes(`
|
|
45
|
+
`)&&(s=s.replace(/[^\n]+$/,"")),!1}),s&&(s=s.replace(/\S/g,"")),s}rawColon(i){let s;return i.walkDecls(o=>{if(typeof o.raws.between<"u")return s=o.raws.between.replace(/[^\s:]/g,""),!1}),s}rawEmptyBody(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length===0&&(s=o.raws.after,typeof s<"u"))return!1}),s}rawIndent(i){if(i.raws.indent)return i.raws.indent;let s;return i.walk(o=>{let l=o.parent;if(l&&l!==i&&l.parent&&l.parent===i&&typeof o.raws.before<"u"){let c=o.raws.before.split(`
|
|
46
|
+
`);return s=c[c.length-1],s=s.replace(/\S/g,""),!1}}),s}rawSemicolon(i){let s;return i.walk(o=>{if(o.nodes&&o.nodes.length&&o.last.type==="decl"&&(s=o.raws.semicolon,typeof s<"u"))return!1}),s}rawValue(i,s){let o=i[s],l=i.raws[s];return l&&l.value===o?l.raw:o}root(i){this.body(i),i.raws.after&&this.builder(i.raws.after)}rule(i){this.block(i,this.rawValue(i,"selector")),i.raws.ownSemicolon&&this.builder(i.raws.ownSemicolon,i,"end")}stringify(i,s){if(!this[i.type])throw new Error("Unknown AST node type "+i.type+". Maybe you need to change PostCSS stringifier.");this[i.type](i,s)}}return Oi=r,r.default=r,Oi}var Ni,ha;function rn(){if(ha)return Ni;ha=1;let t=fa();function e(r,n){new t(n).stringify(r)}return Ni=e,e.default=e,Ni}var _i,pa;function nn(){if(pa)return _i;pa=1;let{isClean:t,my:e}=Ii(),r=Ai(),n=fa(),i=rn();function s(l,c){let u=new l.constructor;for(let a in l){if(!Object.prototype.hasOwnProperty.call(l,a)||a==="proxyCache")continue;let h=l[a],d=typeof h;a==="parent"&&d==="object"?c&&(u[a]=c):a==="source"?u[a]=h:Array.isArray(h)?u[a]=h.map(f=>s(f,u)):(d==="object"&&h!==null&&(h=s(h)),u[a]=h)}return u}class o{constructor(c={}){this.raws={},this[t]=!1,this[e]=!0;for(let u in c)if(u==="nodes"){this.nodes=[];for(let a of c[u])typeof a.clone=="function"?this.append(a.clone()):this.append(a)}else this[u]=c[u]}addToError(c){if(c.postcssNode=this,c.stack&&this.source&&/\n\s{4}at /.test(c.stack)){let u=this.source;c.stack=c.stack.replace(/\n\s{4}at /,`$&${u.input.from}:${u.start.line}:${u.start.column}$&`)}return c}after(c){return this.parent.insertAfter(this,c),this}assign(c={}){for(let u in c)this[u]=c[u];return this}before(c){return this.parent.insertBefore(this,c),this}cleanRaws(c){delete this.raws.before,delete this.raws.after,c||delete this.raws.between}clone(c={}){let u=s(this);for(let a in c)u[a]=c[a];return u}cloneAfter(c={}){let u=this.clone(c);return this.parent.insertAfter(this,u),u}cloneBefore(c={}){let u=this.clone(c);return this.parent.insertBefore(this,u),u}error(c,u={}){if(this.source){let{end:a,start:h}=this.rangeBy(u);return this.source.input.error(c,{column:h.column,line:h.line},{column:a.column,line:a.line},u)}return new r(c)}getProxyProcessor(){return{get(c,u){return u==="proxyOf"?c:u==="root"?()=>c.root().toProxy():c[u]},set(c,u,a){return c[u]===a||(c[u]=a,(u==="prop"||u==="value"||u==="name"||u==="params"||u==="important"||u==="text")&&c.markDirty()),!0}}}markDirty(){if(this[t]){this[t]=!1;let c=this;for(;c=c.parent;)c[t]=!1}}next(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c+1]}positionBy(c,u){let a=this.source.start;if(c.index)a=this.positionInside(c.index,u);else if(c.word){u=this.toString();let h=u.indexOf(c.word);h!==-1&&(a=this.positionInside(h,u))}return a}positionInside(c,u){let a=u||this.toString(),h=this.source.start.column,d=this.source.start.line;for(let f=0;f<c;f++)a[f]===`
|
|
47
|
+
`?(h=1,d+=1):h+=1;return{column:h,line:d}}prev(){if(!this.parent)return;let c=this.parent.index(this);return this.parent.nodes[c-1]}rangeBy(c){let u={column:this.source.start.column,line:this.source.start.line},a=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:u.column+1,line:u.line};if(c.word){let h=this.toString(),d=h.indexOf(c.word);d!==-1&&(u=this.positionInside(d,h),a=this.positionInside(d+c.word.length,h))}else c.start?u={column:c.start.column,line:c.start.line}:c.index&&(u=this.positionInside(c.index)),c.end?a={column:c.end.column,line:c.end.line}:typeof c.endIndex=="number"?a=this.positionInside(c.endIndex):c.index&&(a=this.positionInside(c.index+1));return(a.line<u.line||a.line===u.line&&a.column<=u.column)&&(a={column:u.column+1,line:u.line}),{end:a,start:u}}raw(c,u){return new n().raw(this,c,u)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...c){if(this.parent){let u=this,a=!1;for(let h of c)h===this?a=!0:a?(this.parent.insertAfter(u,h),u=h):this.parent.insertBefore(u,h);a||this.remove()}return this}root(){let c=this;for(;c.parent&&c.parent.type!=="document";)c=c.parent;return c}toJSON(c,u){let a={},h=u==null;u=u||new Map;let d=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))a[f]=m.map(p=>typeof p=="object"&&p.toJSON?p.toJSON(null,u):p);else if(typeof m=="object"&&m.toJSON)a[f]=m.toJSON(null,u);else if(f==="source"){let p=u.get(m.input);p==null&&(p=d,u.set(m.input,d),d++),a[f]={end:m.end,inputId:p,start:m.start}}else a[f]=m}return h&&(a.inputs=[...u.keys()].map(f=>f.toJSON())),a}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(c=i){c.stringify&&(c=c.stringify);let u="";return c(this,a=>{u+=a}),u}warn(c,u,a){let h={node:this};for(let d in a)h[d]=a[d];return c.warn(u,h)}get proxyOf(){return this}}return _i=o,o.default=o,_i}var Di,ma;function sn(){if(ma)return Di;ma=1;let t=nn();class e extends t{constructor(n){n&&typeof n.value<"u"&&typeof n.value!="string"&&(n={...n,value:String(n.value)}),super(n),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Di=e,e.default=e,Di}var Li,ga;function Ld(){if(ga)return Li;ga=1;let t="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Li={nanoid:(n=21)=>{let i="",s=n;for(;s--;)i+=t[Math.random()*64|0];return i},customAlphabet:(n,i=21)=>(s=i)=>{let o="",l=s;for(;l--;)o+=n[Math.random()*n.length|0];return o}},Li}var Pi,ya;function ba(){if(ya)return Pi;ya=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=pt,{existsSync:r,readFileSync:n}=pt,{dirname:i,join:s}=pt;function o(c){return Buffer?Buffer.from(c,"base64").toString():window.atob(c)}class l{constructor(u,a){if(a.map===!1)return;this.loadAnnotation(u),this.inline=this.startWith(this.annotation,"data:");let h=a.map?a.map.prev:void 0,d=this.loadMap(a.from,h);!this.mapFile&&a.from&&(this.mapFile=a.from),this.mapFile&&(this.root=i(this.mapFile)),d&&(this.text=d)}consumer(){return this.consumerCache||(this.consumerCache=new t(this.text)),this.consumerCache}decodeInline(u){let a=/^data:application\/json;charset=utf-?8;base64,/,h=/^data:application\/json;base64,/,d=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(d.test(u)||f.test(u))return decodeURIComponent(u.substr(RegExp.lastMatch.length));if(a.test(u)||h.test(u))return o(u.substr(RegExp.lastMatch.length));let m=u.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(u){return u.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(u){return typeof u!="object"?!1:typeof u.mappings=="string"||typeof u._mappings=="string"||Array.isArray(u.sections)}loadAnnotation(u){let a=u.match(/\/\*\s*# sourceMappingURL=/gm);if(!a)return;let h=u.lastIndexOf(a.pop()),d=u.indexOf("*/",h);h>-1&&d>-1&&(this.annotation=this.getAnnotationURL(u.substring(h,d)))}loadFile(u){if(this.root=i(u),r(u))return this.mapFile=u,n(u,"utf-8").toString().trim()}loadMap(u,a){if(a===!1)return!1;if(a){if(typeof a=="string")return a;if(typeof a=="function"){let h=a(u);if(h){let d=this.loadFile(h);if(!d)throw new Error("Unable to load previous source map: "+h.toString());return d}}else{if(a instanceof t)return e.fromSourceMap(a).toString();if(a instanceof e)return a.toString();if(this.isMap(a))return JSON.stringify(a);throw new Error("Unsupported previous source map format: "+a.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let h=this.annotation;return u&&(h=s(i(u),h)),this.loadFile(h)}}}startWith(u,a){return u?u.substr(0,a.length)===a:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Pi=l,l.default=l,Pi}var $i,va;function on(){if(va)return $i;va=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=pt,{fileURLToPath:r,pathToFileURL:n}=pt,{isAbsolute:i,resolve:s}=pt,{nanoid:o}=Ld(),l=pt,c=Ai(),u=ba(),a=Symbol("fromOffsetCache"),h=!!(t&&e),d=!!(s&&i);class f{constructor(p,y={}){if(p===null||typeof p>"u"||typeof p=="object"&&!p.toString)throw new Error(`PostCSS received ${p} instead of CSS string`);if(this.css=p.toString(),this.css[0]==="\uFEFF"||this.css[0]===""?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,y.from&&(!d||/^\w+:\/\//.test(y.from)||i(y.from)?this.file=y.from:this.file=s(y.from)),d&&h){let v=new u(this.css,y);if(v.text){this.map=v;let w=v.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+o(6)+">"),this.map&&(this.map.file=this.from)}error(p,y,v,w={}){let b,C,S;if(y&&typeof y=="object"){let k=y,I=v;if(typeof k.offset=="number"){let B=this.fromOffset(k.offset);y=B.line,v=B.col}else y=k.line,v=k.column;if(typeof I.offset=="number"){let B=this.fromOffset(I.offset);C=B.line,S=B.col}else C=I.line,S=I.column}else if(!v){let k=this.fromOffset(y);y=k.line,v=k.col}let x=this.origin(y,v,C,S);return x?b=new c(p,x.endLine===void 0?x.line:{column:x.column,line:x.line},x.endLine===void 0?x.column:{column:x.endColumn,line:x.endLine},x.source,x.file,w.plugin):b=new c(p,C===void 0?y:{column:v,line:y},C===void 0?v:{column:S,line:C},this.css,this.file,w.plugin),b.input={column:v,endColumn:S,endLine:C,line:y,source:this.css},this.file&&(n&&(b.input.url=n(this.file).toString()),b.input.file=this.file),b}fromOffset(p){let y,v;if(this[a])v=this[a];else{let b=this.css.split(`
|
|
48
|
+
`);v=new Array(b.length);let C=0;for(let S=0,x=b.length;S<x;S++)v[S]=C,C+=b[S].length+1;this[a]=v}y=v[v.length-1];let w=0;if(p>=y)w=v.length-1;else{let b=v.length-2,C;for(;w<b;)if(C=w+(b-w>>1),p<v[C])b=C-1;else if(p>=v[C+1])w=C+1;else{w=C;break}}return{col:p-v[w]+1,line:w+1}}mapResolve(p){return/^\w+:\/\//.test(p)?p:s(this.map.consumer().sourceRoot||this.map.root||".",p)}origin(p,y,v,w){if(!this.map)return!1;let b=this.map.consumer(),C=b.originalPositionFor({column:y,line:p});if(!C.source)return!1;let S;typeof v=="number"&&(S=b.originalPositionFor({column:w,line:v}));let x;i(C.source)?x=n(C.source):x=new URL(C.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let k={column:C.column,endColumn:S&&S.column,endLine:S&&S.line,line:C.line,url:x.toString()};if(x.protocol==="file:")if(r)k.file=r(x);else throw new Error("file: protocol is not available in this PostCSS build");let I=b.sourceContentFor(C.source);return I&&(k.source=I),k}toJSON(){let p={};for(let y of["hasBOM","css","file","id"])this[y]!=null&&(p[y]=this[y]);return this.map&&(p.map={...this.map},p.map.consumerCache&&(p.map.consumerCache=void 0)),p}get from(){return this.file||this.id}}return $i=f,f.default=f,l&&l.registerInput&&l.registerInput(f),$i}var ji,wa;function Sa(){if(wa)return ji;wa=1;let{SourceMapConsumer:t,SourceMapGenerator:e}=pt,{dirname:r,relative:n,resolve:i,sep:s}=pt,{pathToFileURL:o}=pt,l=on(),c=!!(t&&e),u=!!(r&&i&&n&&s);class a{constructor(d,f,m,p){this.stringify=d,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=p,this.originalCSS=p,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let d;this.isInline()?d="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?d=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?d=this.mapOpts.annotation(this.opts.to,this.root):d=this.outputFile()+".map";let f=`
|
|
49
|
+
`;this.css.includes(`\r
|
|
50
|
+
`)&&(f=`\r
|
|
51
|
+
`),this.css+=f+"/*# sourceMappingURL="+d+" */"}applyPrevMaps(){for(let d of this.previous()){let f=this.toUrl(this.path(d.file)),m=d.root||r(d.file),p;this.mapOpts.sourcesContent===!1?(p=new t(d.text),p.sourcesContent&&(p.sourcesContent=null)):p=d.consumer(),this.map.applySourceMap(p,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let d;for(let f=this.root.nodes.length-1;f>=0;f--)d=this.root.nodes[f],d.type==="comment"&&d.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),u&&c&&this.isMap())return this.generateMap();{let d="";return this.stringify(this.root,f=>{d+=f}),[d]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let d=this.previous()[0].consumer();d.file=this.outputFile(),this.map=e.fromSourceMap(d,{ignoreInvalidMapping:!0})}else this.map=new e({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 e({file:this.outputFile(),ignoreInvalidMapping:!0});let d=1,f=1,m="<no source>",p={generated:{column:0,line:0},original:{column:0,line:0},source:""},y,v;this.stringify(this.root,(w,b,C)=>{if(this.css+=w,b&&C!=="end"&&(p.generated.line=d,p.generated.column=f-1,b.source&&b.source.start?(p.source=this.sourcePath(b),p.original.line=b.source.start.line,p.original.column=b.source.start.column-1,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,this.map.addMapping(p))),y=w.match(/\n/g),y?(d+=y.length,v=w.lastIndexOf(`
|
|
52
|
+
`),f=w.length-v):f+=w.length,b&&C!=="start"){let S=b.parent||{raws:{}};(!(b.type==="decl"||b.type==="atrule"&&!b.nodes)||b!==S.last||S.raws.semicolon)&&(b.source&&b.source.end?(p.source=this.sourcePath(b),p.original.line=b.source.end.line,p.original.column=b.source.end.column-1,p.generated.line=d,p.generated.column=f-2,this.map.addMapping(p)):(p.source=m,p.original.line=1,p.original.column=0,p.generated.line=d,p.generated.column=f-1,this.map.addMapping(p)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(d=>d.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let d=this.mapOpts.annotation;return typeof d<"u"&&d!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}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(d=>d.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(d){if(this.mapOpts.absolute||d.charCodeAt(0)===60||/^\w+:\/\//.test(d))return d;let f=this.memoizedPaths.get(d);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(i(m,this.mapOpts.annotation)));let p=n(m,d);return this.memoizedPaths.set(d,p),p}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(d=>{if(d.source&&d.source.input.map){let f=d.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let d=new l(this.originalCSS,this.opts);d.map&&this.previousMaps.push(d.map)}return this.previousMaps}setSourcesContent(){let d={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!d[m]){d[m]=!0;let p=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(p,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(d){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(d.source.input.from):this.toUrl(this.path(d.source.input.from))}toBase64(d){return Buffer?Buffer.from(d).toString("base64"):window.btoa(unescape(encodeURIComponent(d)))}toFileUrl(d){let f=this.memoizedFileURLs.get(d);if(f)return f;if(o){let m=o(d).toString();return this.memoizedFileURLs.set(d,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(d){let f=this.memoizedURLs.get(d);if(f)return f;s==="\\"&&(d=d.replace(/\\/g,"/"));let m=encodeURI(d).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(d,m),m}}return ji=a,ji}var Bi,xa;function an(){if(xa)return Bi;xa=1;let t=nn();class e extends t{constructor(n){super(n),this.type="comment"}}return Bi=e,e.default=e,Bi}var Fi,Ca;function jt(){if(Ca)return Fi;Ca=1;let{isClean:t,my:e}=Ii(),r=sn(),n=an(),i=nn(),s,o,l,c;function u(d){return d.map(f=>(f.nodes&&(f.nodes=u(f.nodes)),delete f.source,f))}function a(d){if(d[t]=!1,d.proxyOf.nodes)for(let f of d.proxyOf.nodes)a(f)}class h extends i{append(...f){for(let m of f){let p=this.normalize(m,this.last);for(let y of p)this.proxyOf.nodes.push(y)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),p,y;for(;this.indexes[m]<this.proxyOf.nodes.length&&(p=this.indexes[m],y=f(this.proxyOf.nodes[p],p),y!==!1);)this.indexes[m]+=1;return delete this.indexes[m],y}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...p)=>f[m](...p.map(y=>typeof y=="function"?(v,w)=>y(v.toProxy(),w):y)):m==="every"||m==="some"?p=>f[m]((y,...v)=>p(y.toProxy(),...v)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(p=>p.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,p){return f[m]===p||(f[m]=p,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let p=this.index(f),y=this.normalize(m,this.proxyOf.nodes[p]).reverse();p=this.index(f);for(let w of y)this.proxyOf.nodes.splice(p+1,0,w);let v;for(let w in this.indexes)v=this.indexes[w],p<v&&(this.indexes[w]=v+y.length);return this.markDirty(),this}insertBefore(f,m){let p=this.index(f),y=p===0?"prepend":!1,v=this.normalize(m,this.proxyOf.nodes[p],y).reverse();p=this.index(f);for(let b of v)this.proxyOf.nodes.splice(p,0,b);let w;for(let b in this.indexes)w=this.indexes[b],p<=w&&(this.indexes[b]=w+v.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=u(s(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let y of f)y.parent&&y.parent.removeChild(y,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new o(f)];else if(f.name)f=[new l(f)];else if(f.text)f=[new n(f)];else throw new Error("Unknown node type in node creation");return f.map(y=>(y[e]||h.rebuild(y),y=y.proxyOf,y.parent&&y.parent.removeChild(y),y[t]&&a(y),typeof y.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(y.raws.before=m.raws.before.replace(/\S/g,"")),y.parent=this.proxyOf,y))}prepend(...f){f=f.reverse();for(let m of f){let p=this.normalize(m,this.first,"prepend").reverse();for(let y of p)this.proxyOf.nodes.unshift(y);for(let y in this.indexes)this.indexes[y]=this.indexes[y]+p.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let p in this.indexes)m=this.indexes[p],m>=f&&(this.indexes[p]=m-1);return this.markDirty(),this}replaceValues(f,m,p){return p||(p=m,m={}),this.walkDecls(y=>{m.props&&!m.props.includes(y.prop)||m.fast&&!y.value.includes(m.fast)||(y.value=y.value.replace(f,p))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,p)=>{let y;try{y=f(m,p)}catch(v){throw m.addToError(v)}return y!==!1&&m.walk&&(y=m.walk(f)),y})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="atrule"&&f.test(p.name))return m(p,y)}):this.walk((p,y)=>{if(p.type==="atrule"&&p.name===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="atrule")return m(p,y)}))}walkComments(f){return this.walk((m,p)=>{if(m.type==="comment")return f(m,p)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="decl"&&f.test(p.prop))return m(p,y)}):this.walk((p,y)=>{if(p.type==="decl"&&p.prop===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="decl")return m(p,y)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((p,y)=>{if(p.type==="rule"&&f.test(p.selector))return m(p,y)}):this.walk((p,y)=>{if(p.type==="rule"&&p.selector===f)return m(p,y)}):(m=f,this.walk((p,y)=>{if(p.type==="rule")return m(p,y)}))}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]}}return h.registerParse=d=>{s=d},h.registerRule=d=>{o=d},h.registerAtRule=d=>{l=d},h.registerRoot=d=>{c=d},Fi=h,h.default=h,h.rebuild=d=>{d.type==="atrule"?Object.setPrototypeOf(d,l.prototype):d.type==="rule"?Object.setPrototypeOf(d,o.prototype):d.type==="decl"?Object.setPrototypeOf(d,r.prototype):d.type==="comment"?Object.setPrototypeOf(d,n.prototype):d.type==="root"&&Object.setPrototypeOf(d,c.prototype),d[e]=!0,d.nodes&&d.nodes.forEach(f=>{h.rebuild(f)})},Fi}var Ui,Ra;function Wi(){if(Ra)return Ui;Ra=1;let t=jt(),e,r;class n extends t{constructor(s){super({type:"document",...s}),this.nodes||(this.nodes=[])}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},Ui=n,n.default=n,Ui}var zi,Ea;function ka(){if(Ea)return zi;Ea=1;let t={};return zi=function(r){t[r]||(t[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},zi}var Hi,Ma;function Ta(){if(Ma)return Hi;Ma=1;class t{constructor(r,n={}){if(this.type="warning",this.text=r,n.node&&n.node.source){let i=n.node.rangeBy(n);this.line=i.start.line,this.column=i.start.column,this.endLine=i.end.line,this.endColumn=i.end.column}for(let i in n)this[i]=n[i]}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}}return Hi=t,t.default=t,Hi}var qi,Aa;function Vi(){if(Aa)return qi;Aa=1;let t=Ta();class e{constructor(n,i,s){this.processor=n,this.messages=[],this.root=i,this.opts=s,this.css=void 0,this.map=void 0}toString(){return this.css}warn(n,i={}){i.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(i.plugin=this.lastPlugin.postcssPlugin);let s=new t(n,i);return this.messages.push(s),s}warnings(){return this.messages.filter(n=>n.type==="warning")}get content(){return this.css}}return qi=e,e.default=e,qi}var Gi,Ia;function Pd(){if(Ia)return Gi;Ia=1;const t=39,e=34,r=92,n=47,i=10,s=32,o=12,l=9,c=13,u=91,a=93,h=40,d=41,f=123,m=125,p=59,y=42,v=58,w=64,b=/[\t\n\f\r "#'()/;[\\\]{}]/g,C=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,x=/[\da-f]/i;return Gi=function(I,B={}){let _=I.css.valueOf(),H=B.ignoreErrors,z,A,be,he,ne,F,de,j,X,T,U=_.length,D=0,te=[],ie=[];function Ce(){return D}function se(ee){throw I.error("Unclosed "+ee,D)}function le(){return ie.length===0&&D>=U}function pe(ee){if(ie.length)return ie.pop();if(D>=U)return;let Ie=ee?ee.ignoreUnclosed:!1;switch(z=_.charCodeAt(D),z){case i:case s:case l:case c:case o:{A=D;do A+=1,z=_.charCodeAt(A);while(z===s||z===i||z===l||z===c||z===o);T=["space",_.slice(D,A)],D=A-1;break}case u:case a:case f:case m:case v:case p:case d:{let re=String.fromCharCode(z);T=[re,re,D];break}case h:{if(j=te.length?te.pop()[1]:"",X=_.charCodeAt(D+1),j==="url"&&X!==t&&X!==e&&X!==s&&X!==i&&X!==l&&X!==o&&X!==c){A=D;do{if(F=!1,A=_.indexOf(")",A+1),A===-1)if(H||Ie){A=D;break}else se("bracket");for(de=A;_.charCodeAt(de-1)===r;)de-=1,F=!F}while(F);T=["brackets",_.slice(D,A+1),D,A],D=A}else A=_.indexOf(")",D+1),he=_.slice(D,A+1),A===-1||S.test(he)?T=["(","(",D]:(T=["brackets",he,D,A],D=A);break}case t:case e:{be=z===t?"'":'"',A=D;do{if(F=!1,A=_.indexOf(be,A+1),A===-1)if(H||Ie){A=D+1;break}else se("string");for(de=A;_.charCodeAt(de-1)===r;)de-=1,F=!F}while(F);T=["string",_.slice(D,A+1),D,A],D=A;break}case w:{b.lastIndex=D+1,b.test(_),b.lastIndex===0?A=_.length-1:A=b.lastIndex-2,T=["at-word",_.slice(D,A+1),D,A],D=A;break}case r:{for(A=D,ne=!0;_.charCodeAt(A+1)===r;)A+=1,ne=!ne;if(z=_.charCodeAt(A+1),ne&&z!==n&&z!==s&&z!==i&&z!==l&&z!==c&&z!==o&&(A+=1,x.test(_.charAt(A)))){for(;x.test(_.charAt(A+1));)A+=1;_.charCodeAt(A+1)===s&&(A+=1)}T=["word",_.slice(D,A+1),D,A],D=A;break}default:{z===n&&_.charCodeAt(D+1)===y?(A=_.indexOf("*/",D+2)+1,A===0&&(H||Ie?A=_.length:se("comment")),T=["comment",_.slice(D,A+1),D,A],D=A):(C.lastIndex=D+1,C.test(_),C.lastIndex===0?A=_.length-1:A=C.lastIndex-2,T=["word",_.slice(D,A+1),D,A],te.push(T),D=A);break}}return D++,T}function Te(ee){ie.push(ee)}return{back:Te,endOfFile:le,nextToken:pe,position:Ce}},Gi}var Ki,Oa;function Yi(){if(Oa)return Ki;Oa=1;let t=jt();class e extends t{constructor(n){super(n),this.type="atrule"}append(...n){return this.proxyOf.nodes||(this.nodes=[]),super.append(...n)}prepend(...n){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...n)}}return Ki=e,e.default=e,t.registerAtRule(e),Ki}var Ji,Na;function br(){if(Na)return Ji;Na=1;let t=jt(),e,r;class n extends t{constructor(s){super(s),this.type="root",this.nodes||(this.nodes=[])}normalize(s,o,l){let c=super.normalize(s);if(o){if(l==="prepend")this.nodes.length>1?o.raws.before=this.nodes[1].raws.before:delete o.raws.before;else if(this.first!==o)for(let u of c)u.raws.before=o.raws.before}return c}removeChild(s,o){let l=this.index(s);return!o&&l===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[l].raws.before),super.removeChild(s)}toResult(s={}){return new e(new r,this,s).stringify()}}return n.registerLazyResult=i=>{e=i},n.registerProcessor=i=>{r=i},Ji=n,n.default=n,t.registerRoot(n),Ji}var Xi,_a;function Da(){if(_a)return Xi;_a=1;let t={comma(e){return t.split(e,[","],!0)},space(e){let r=[" ",`
|
|
53
|
+
`," "];return t.split(e,r)},split(e,r,n){let i=[],s="",o=!1,l=0,c=!1,u="",a=!1;for(let h of e)a?a=!1:h==="\\"?a=!0:c?h===u&&(c=!1):h==='"'||h==="'"?(c=!0,u=h):h==="("?l+=1:h===")"?l>0&&(l-=1):l===0&&r.includes(h)&&(o=!0),o?(s!==""&&i.push(s.trim()),s="",o=!1):s+=h;return(n||s!=="")&&i.push(s.trim()),i}};return Xi=t,t.default=t,Xi}var Qi,La;function Zi(){if(La)return Qi;La=1;let t=jt(),e=Da();class r extends t{constructor(i){super(i),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return e.comma(this.selector)}set selectors(i){let s=this.selector?this.selector.match(/,\s*/):null,o=s?s[0]:","+this.raw("between","beforeOpen");this.selector=i.join(o)}}return Qi=r,r.default=r,t.registerRule(r),Qi}var es,Pa;function $d(){if(Pa)return es;Pa=1;let t=sn(),e=Pd(),r=an(),n=Yi(),i=br(),s=Zi();const o={empty:!0,space:!0};function l(u){for(let a=u.length-1;a>=0;a--){let h=u[a],d=h[3]||h[2];if(d)return d}}class c{constructor(a){this.input=a,this.root=new i,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:a,start:{column:1,line:1,offset:0}}}atrule(a){let h=new n;h.name=a[1].slice(1),h.name===""&&this.unnamedAtrule(h,a),this.init(h,a[2]);let d,f,m,p=!1,y=!1,v=[],w=[];for(;!this.tokenizer.endOfFile();){if(a=this.tokenizer.nextToken(),d=a[0],d==="("||d==="["?w.push(d==="("?")":"]"):d==="{"&&w.length>0?w.push("}"):d===w[w.length-1]&&w.pop(),w.length===0)if(d===";"){h.source.end=this.getPosition(a[2]),h.source.end.offset++,this.semicolon=!0;break}else if(d==="{"){y=!0;break}else if(d==="}"){if(v.length>0){for(m=v.length-1,f=v[m];f&&f[0]==="space";)f=v[--m];f&&(h.source.end=this.getPosition(f[3]||f[2]),h.source.end.offset++)}this.end(a);break}else v.push(a);else v.push(a);if(this.tokenizer.endOfFile()){p=!0;break}}h.raws.between=this.spacesAndCommentsFromEnd(v),v.length?(h.raws.afterName=this.spacesAndCommentsFromStart(v),this.raw(h,"params",v),p&&(a=v[v.length-1],h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++,this.spaces=h.raws.between,h.raws.between="")):(h.raws.afterName="",h.params=""),y&&(h.nodes=[],this.current=h)}checkMissedSemicolon(a){let h=this.colon(a);if(h===!1)return;let d=0,f;for(let m=h-1;m>=0&&(f=a[m],!(f[0]!=="space"&&(d+=1,d===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(a){let h=0,d,f,m;for(let[p,y]of a.entries()){if(d=y,f=d[0],f==="("&&(h+=1),f===")"&&(h-=1),h===0&&f===":")if(!m)this.doubleColon(d);else{if(m[0]==="word"&&m[1]==="progid")continue;return p}m=d}return!1}comment(a){let h=new r;this.init(h,a[2]),h.source.end=this.getPosition(a[3]||a[2]),h.source.end.offset++;let d=a[1].slice(2,-2);if(/^\s*$/.test(d))h.text="",h.raws.left=d,h.raws.right="";else{let f=d.match(/^(\s*)([^]*\S)(\s*)$/);h.text=f[2],h.raws.left=f[1],h.raws.right=f[3]}}createTokenizer(){this.tokenizer=e(this.input)}decl(a,h){let d=new t;this.init(d,a[0][2]);let f=a[a.length-1];for(f[0]===";"&&(this.semicolon=!0,a.pop()),d.source.end=this.getPosition(f[3]||f[2]||l(a)),d.source.end.offset++;a[0][0]!=="word";)a.length===1&&this.unknownWord(a),d.raws.before+=a.shift()[1];for(d.source.start=this.getPosition(a[0][2]),d.prop="";a.length;){let w=a[0][0];if(w===":"||w==="space"||w==="comment")break;d.prop+=a.shift()[1]}d.raws.between="";let m;for(;a.length;)if(m=a.shift(),m[0]===":"){d.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),d.raws.between+=m[1];(d.prop[0]==="_"||d.prop[0]==="*")&&(d.raws.before+=d.prop[0],d.prop=d.prop.slice(1));let p=[],y;for(;a.length&&(y=a[0][0],!(y!=="space"&&y!=="comment"));)p.push(a.shift());this.precheckMissedSemicolon(a);for(let w=a.length-1;w>=0;w--){if(m=a[w],m[1].toLowerCase()==="!important"){d.important=!0;let b=this.stringFrom(a,w);b=this.spacesFromEnd(a)+b,b!==" !important"&&(d.raws.important=b);break}else if(m[1].toLowerCase()==="important"){let b=a.slice(0),C="";for(let S=w;S>0;S--){let x=b[S][0];if(C.trim().indexOf("!")===0&&x!=="space")break;C=b.pop()[1]+C}C.trim().indexOf("!")===0&&(d.important=!0,d.raws.important=C,a=b)}if(m[0]!=="space"&&m[0]!=="comment")break}a.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(d.raws.between+=p.map(w=>w[1]).join(""),p=[]),this.raw(d,"value",p.concat(a),h),d.value.includes(":")&&!h&&this.checkMissedSemicolon(a)}doubleColon(a){throw this.input.error("Double colon",{offset:a[2]},{offset:a[2]+a[1].length})}emptyRule(a){let h=new s;this.init(h,a[2]),h.selector="",h.raws.between="",this.current=h}end(a){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(a[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(a)}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(a){if(this.spaces+=a[1],this.current.nodes){let h=this.current.nodes[this.current.nodes.length-1];h&&h.type==="rule"&&!h.raws.ownSemicolon&&(h.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(a){let h=this.input.fromOffset(a);return{column:h.col,line:h.line,offset:a}}init(a,h){this.current.push(a),a.source={input:this.input,start:this.getPosition(h)},a.raws.before=this.spaces,this.spaces="",a.type!=="comment"&&(this.semicolon=!1)}other(a){let h=!1,d=null,f=!1,m=null,p=[],y=a[1].startsWith("--"),v=[],w=a;for(;w;){if(d=w[0],v.push(w),d==="("||d==="[")m||(m=w),p.push(d==="("?")":"]");else if(y&&f&&d==="{")m||(m=w),p.push("}");else if(p.length===0)if(d===";")if(f){this.decl(v,y);return}else break;else if(d==="{"){this.rule(v);return}else if(d==="}"){this.tokenizer.back(v.pop()),h=!0;break}else d===":"&&(f=!0);else d===p[p.length-1]&&(p.pop(),p.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(h=!0),p.length>0&&this.unclosedBracket(m),h&&f){if(!y)for(;v.length&&(w=v[v.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(v.pop());this.decl(v,y)}else this.unknownWord(v)}parse(){let a;for(;!this.tokenizer.endOfFile();)switch(a=this.tokenizer.nextToken(),a[0]){case"space":this.spaces+=a[1];break;case";":this.freeSemicolon(a);break;case"}":this.end(a);break;case"comment":this.comment(a);break;case"at-word":this.atrule(a);break;case"{":this.emptyRule(a);break;default:this.other(a);break}this.endFile()}precheckMissedSemicolon(){}raw(a,h,d,f){let m,p,y=d.length,v="",w=!0,b,C;for(let S=0;S<y;S+=1)m=d[S],p=m[0],p==="space"&&S===y-1&&!f?w=!1:p==="comment"?(C=d[S-1]?d[S-1][0]:"empty",b=d[S+1]?d[S+1][0]:"empty",!o[C]&&!o[b]?v.slice(-1)===","?w=!1:v+=m[1]:w=!1):v+=m[1];if(!w){let S=d.reduce((x,k)=>x+k[1],"");a.raws[h]={raw:S,value:v}}a[h]=v}rule(a){a.pop();let h=new s;this.init(h,a[0][2]),h.raws.between=this.spacesAndCommentsFromEnd(a),this.raw(h,"selector",a),this.current=h}spacesAndCommentsFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],!(h!=="space"&&h!=="comment"));)d=a.pop()[1]+d;return d}spacesAndCommentsFromStart(a){let h,d="";for(;a.length&&(h=a[0][0],!(h!=="space"&&h!=="comment"));)d+=a.shift()[1];return d}spacesFromEnd(a){let h,d="";for(;a.length&&(h=a[a.length-1][0],h==="space");)d=a.pop()[1]+d;return d}stringFrom(a,h){let d="";for(let f=h;f<a.length;f++)d+=a[f][1];return a.splice(h,a.length-h),d}unclosedBlock(){let a=this.current.source.start;throw this.input.error("Unclosed block",a.line,a.column)}unclosedBracket(a){throw this.input.error("Unclosed bracket",{offset:a[2]},{offset:a[2]+1})}unexpectedClose(a){throw this.input.error("Unexpected }",{offset:a[2]},{offset:a[2]+1})}unknownWord(a){throw this.input.error("Unknown word",{offset:a[0][2]},{offset:a[0][2]+a[0][1].length})}unnamedAtrule(a,h){throw this.input.error("At-rule without name",{offset:h[2]},{offset:h[2]+h[1].length})}}return es=c,es}var ts,$a;function rs(){if($a)return ts;$a=1;let t=jt(),e=$d(),r=on();function n(i,s){let o=new r(i,s),l=new e(o);try{l.parse()}catch(c){throw process.env.NODE_ENV!=="production"&&c.name==="CssSyntaxError"&&s&&s.from&&(/\.scss$/i.test(s.from)?c.message+=`
|
|
54
|
+
You tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser`:/\.sass/i.test(s.from)?c.message+=`
|
|
55
|
+
You tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser`:/\.less$/i.test(s.from)&&(c.message+=`
|
|
56
|
+
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser`)),c}return l.root}return ts=n,n.default=n,t.registerParse(n),ts}var ns,ja;function Ba(){if(ja)return ns;ja=1;let{isClean:t,my:e}=Ii(),r=Sa(),n=rn(),i=jt(),s=Wi(),o=ka(),l=Vi(),c=rs(),u=br();const a={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={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},d={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(C){return typeof C=="object"&&typeof C.then=="function"}function p(C){let S=!1,x=a[C.type];return C.type==="decl"?S=C.prop.toLowerCase():C.type==="atrule"&&(S=C.name.toLowerCase()),S&&C.append?[x,x+"-"+S,f,x+"Exit",x+"Exit-"+S]:S?[x,x+"-"+S,x+"Exit",x+"Exit-"+S]:C.append?[x,f,x+"Exit"]:[x,x+"Exit"]}function y(C){let S;return C.type==="document"?S=["Document",f,"DocumentExit"]:C.type==="root"?S=["Root",f,"RootExit"]:S=p(C),{eventIndex:0,events:S,iterator:0,node:C,visitorIndex:0,visitors:[]}}function v(C){return C[t]=!1,C.nodes&&C.nodes.forEach(S=>v(S)),C}let w={};class b{constructor(S,x,k){this.stringified=!1,this.processed=!1;let I;if(typeof x=="object"&&x!==null&&(x.type==="root"||x.type==="document"))I=v(x);else if(x instanceof b||x instanceof l)I=v(x.root),x.map&&(typeof k.map>"u"&&(k.map={}),k.map.inline||(k.map.inline=!1),k.map.prev=x.map);else{let B=c;k.syntax&&(B=k.syntax.parse),k.parser&&(B=k.parser),B.parse&&(B=B.parse);try{I=B(x,k)}catch(_){this.processed=!0,this.error=_}I&&!I[e]&&i.rebuild(I)}this.result=new l(S,I,k),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(B=>typeof B=="object"&&B.prepare?{...B,...B.prepare(this.result)}:B)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(S){return this.async().catch(S)}finally(S){return this.async().then(S,S)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(S,x){let k=this.result.lastPlugin;try{if(x&&x.addToError(S),this.error=S,S.name==="CssSyntaxError"&&!S.plugin)S.plugin=k.postcssPlugin,S.setMessage();else if(k.postcssVersion&&process.env.NODE_ENV!=="production"){let I=k.postcssPlugin,B=k.postcssVersion,_=this.result.processor.version,H=B.split("."),z=_.split(".");(H[0]!==z[0]||parseInt(H[1])>parseInt(z[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+_+", but "+I+" uses "+B+". Perhaps this is the source of the error below.")}}catch(I){console&&console.error&&console.error(I)}return S}prepareVisitors(){this.listeners={};let S=(x,k,I)=>{this.listeners[k]||(this.listeners[k]=[]),this.listeners[k].push([x,I])};for(let x of this.plugins)if(typeof x=="object")for(let k in x){if(!h[k]&&/^[A-Z]/.test(k))throw new Error(`Unknown event ${k} in ${x.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[k])if(typeof x[k]=="object")for(let I in x[k])I==="*"?S(x,k,x[k][I]):S(x,k+"-"+I.toLowerCase(),x[k][I]);else typeof x[k]=="function"&&S(x,k,x[k])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let S=0;S<this.plugins.length;S++){let x=this.plugins[S],k=this.runOnRoot(x);if(m(k))try{await k}catch(I){throw this.handleError(I)}}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];){S[t]=!0;let x=[y(S)];for(;x.length>0;){let k=this.visitTick(x);if(m(k))try{await k}catch(I){let B=x[x.length-1].node;throw this.handleError(I,B)}}}if(this.listeners.OnceExit)for(let[x,k]of this.listeners.OnceExit){this.result.lastPlugin=x;try{if(S.type==="document"){let I=S.nodes.map(B=>k(B,this.helpers));await Promise.all(I)}else await k(S,this.helpers)}catch(I){throw this.handleError(I)}}}return this.processed=!0,this.stringify()}runOnRoot(S){this.result.lastPlugin=S;try{if(typeof S=="object"&&S.Once){if(this.result.root.type==="document"){let x=this.result.root.nodes.map(k=>S.Once(k,this.helpers));return m(x[0])?Promise.all(x):x}return S.Once(this.result.root,this.helpers)}else if(typeof S=="function")return S(this.result.root,this.result)}catch(x){throw this.handleError(x)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let S=this.result.opts,x=n;S.syntax&&(x=S.syntax.stringify),S.stringifier&&(x=S.stringifier),x.stringify&&(x=x.stringify);let I=new r(x,this.result.root,this.result.opts).generate();return this.result.css=I[0],this.result.map=I[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 S of this.plugins){let x=this.runOnRoot(S);if(m(x))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let S=this.result.root;for(;!S[t];)S[t]=!0,this.walkSync(S);if(this.listeners.OnceExit)if(S.type==="document")for(let x of S.nodes)this.visitSync(this.listeners.OnceExit,x);else this.visitSync(this.listeners.OnceExit,S)}return this.result}then(S,x){return process.env.NODE_ENV!=="production"&&("from"in this.opts||o("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(S,x)}toString(){return this.css}visitSync(S,x){for(let[k,I]of S){this.result.lastPlugin=k;let B;try{B=I(x,this.helpers)}catch(_){throw this.handleError(_,x.proxyOf)}if(x.type!=="root"&&x.type!=="document"&&!x.parent)return!0;if(m(B))throw this.getAsyncError()}}visitTick(S){let x=S[S.length-1],{node:k,visitors:I}=x;if(k.type!=="root"&&k.type!=="document"&&!k.parent){S.pop();return}if(I.length>0&&x.visitorIndex<I.length){let[_,H]=I[x.visitorIndex];x.visitorIndex+=1,x.visitorIndex===I.length&&(x.visitors=[],x.visitorIndex=0),this.result.lastPlugin=_;try{return H(k.toProxy(),this.helpers)}catch(z){throw this.handleError(z,k)}}if(x.iterator!==0){let _=x.iterator,H;for(;H=k.nodes[k.indexes[_]];)if(k.indexes[_]+=1,!H[t]){H[t]=!0,S.push(y(H));return}x.iterator=0,delete k.indexes[_]}let B=x.events;for(;x.eventIndex<B.length;){let _=B[x.eventIndex];if(x.eventIndex+=1,_===f){k.nodes&&k.nodes.length&&(k[t]=!0,x.iterator=k.getIterator());return}else if(this.listeners[_]){x.visitors=this.listeners[_];return}}S.pop()}walkSync(S){S[t]=!0;let x=p(S);for(let k of x)if(k===f)S.nodes&&S.each(I=>{I[t]||this.walkSync(I)});else{let I=this.listeners[k];if(I&&this.visitSync(I,S.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return b.registerPostcss=C=>{w=C},ns=b,b.default=b,u.registerLazyResult(b),s.registerLazyResult(b),ns}var is,Fa;function jd(){if(Fa)return is;Fa=1;let t=Sa(),e=rn(),r=ka(),n=rs();const i=Vi();class s{constructor(l,c,u){c=c.toString(),this.stringified=!1,this._processor=l,this._css=c,this._opts=u,this._map=void 0;let a,h=e;this.result=new i(this._processor,a,this._opts),this.result.css=c;let d=this;Object.defineProperty(this.result,"root",{get(){return d.root}});let f=new t(h,a,this._opts,c);if(f.isMap()){let[m,p]=f.generate();m&&(this.result.css=m),p&&(this.result.map=p)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(l){return this.async().catch(l)}finally(l){return this.async().then(l,l)}sync(){if(this.error)throw this.error;return this.result}then(l,c){return process.env.NODE_ENV!=="production"&&("from"in this._opts||r("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(l,c)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let l,c=n;try{l=c(this._css,this._opts)}catch(u){this.error=u}if(this.error)throw this.error;return this._root=l,l}get[Symbol.toStringTag](){return"NoWorkResult"}}return is=s,s.default=s,is}var ss,Ua;function Bd(){if(Ua)return ss;Ua=1;let t=jd(),e=Ba(),r=Wi(),n=br();class i{constructor(o=[]){this.version="8.4.38",this.plugins=this.normalize(o)}normalize(o){let l=[];for(let c of o)if(c.postcss===!0?c=c():c.postcss&&(c=c.postcss),typeof c=="object"&&Array.isArray(c.plugins))l=l.concat(c.plugins);else if(typeof c=="object"&&c.postcssPlugin)l.push(c);else if(typeof c=="function")l.push(c);else if(typeof c=="object"&&(c.parse||c.stringify)){if(process.env.NODE_ENV!=="production")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.")}else throw new Error(c+" is not a PostCSS plugin");return l}process(o,l={}){return!this.plugins.length&&!l.parser&&!l.stringifier&&!l.syntax?new t(this,o,l):new e(this,o,l)}use(o){return this.plugins=this.plugins.concat(this.normalize([o])),this}}return ss=i,i.default=i,n.registerProcessor(i),r.registerProcessor(i),ss}var os,Wa;function Fd(){if(Wa)return os;Wa=1;let t=sn(),e=ba(),r=an(),n=Yi(),i=on(),s=br(),o=Zi();function l(c,u){if(Array.isArray(c))return c.map(d=>l(d));let{inputs:a,...h}=c;if(a){u=[];for(let d of a){let f={...d,__proto__:i.prototype};f.map&&(f.map={...f.map,__proto__:e.prototype}),u.push(f)}}if(h.nodes&&(h.nodes=c.nodes.map(d=>l(d,u))),h.source){let{inputId:d,...f}=h.source;h.source=f,d!=null&&(h.source.input=u[d])}if(h.type==="root")return new s(h);if(h.type==="decl")return new t(h);if(h.type==="rule")return new o(h);if(h.type==="comment")return new r(h);if(h.type==="atrule")return new n(h);throw new Error("Unknown node type: "+c.type)}return os=l,l.default=l,os}var as,za;function Ud(){if(za)return as;za=1;let t=Ai(),e=sn(),r=Ba(),n=jt(),i=Bd(),s=rn(),o=Fd(),l=Wi(),c=Ta(),u=an(),a=Yi(),h=Vi(),d=on(),f=rs(),m=Da(),p=Zi(),y=br(),v=nn();function w(...b){return b.length===1&&Array.isArray(b[0])&&(b=b[0]),new i(b)}return w.plugin=function(C,S){let x=!1;function k(...B){console&&console.warn&&!x&&(x=!0,console.warn(C+`: postcss.plugin was deprecated. Migration guide:
|
|
57
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(C+`: 里面 postcss.plugin 被弃用. 迁移指南:
|
|
58
|
+
https://www.w3ctech.com/topic/2226`));let _=S(...B);return _.postcssPlugin=C,_.postcssVersion=new i().version,_}let I;return Object.defineProperty(k,"postcss",{get(){return I||(I=k()),I}}),k.process=function(B,_,H){return w([k(H)]).process(B,_)},k},w.stringify=s,w.parse=f,w.fromJSON=o,w.list=m,w.comment=b=>new u(b),w.atRule=b=>new a(b),w.decl=b=>new e(b),w.rule=b=>new p(b),w.root=b=>new y(b),w.document=b=>new l(b),w.CssSyntaxError=t,w.Declaration=e,w.Container=n,w.Processor=i,w.Document=l,w.Comment=u,w.Warning=c,w.AtRule=a,w.Result=h,w.Input=d,w.Rule=p,w.Root=y,w.Node=v,r.registerPostcss(w),as=w,w.default=w,as}var Wd=Ud();const Be=Nd(Wd);Be.stringify,Be.fromJSON,Be.plugin,Be.parse,Be.list,Be.document,Be.comment,Be.atRule,Be.rule,Be.decl,Be.root,Be.CssSyntaxError,Be.Declaration,Be.Container,Be.Processor,Be.Document,Be.Comment,Be.Warning,Be.AtRule,Be.Result,Be.Input,Be.Rule,Be.Root,Be.Node;var xe=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(xe||{});function zd(t){const e={},r=/;(?![^(]*\))/g,n=/:(.+)/,i=/\/\*.*?\*\//g;return t.replace(i,"").split(r).forEach(function(s){if(s){const o=s.split(n);o.length>1&&(e[ls(o[0].trim())]=o[1].trim())}}),e}function Ha(t){const e=[];for(const r in t){const n=t[r];if(typeof n!="string")continue;const i=Gd(r);e.push(`${i}: ${n};`)}return e.join(" ")}const Hd=/-([a-z])/g,qd=/^--[a-zA-Z0-9-]+$/,ls=t=>qd.test(t)?t:t.replace(Hd,(e,r)=>r?r.toUpperCase():""),Vd=/\B([A-Z])/g,Gd=t=>t.replace(Vd,"-$1").toLowerCase();class mt{constructor(...e){G(this,"parentElement",null),G(this,"parentNode",null),G(this,"ownerDocument"),G(this,"firstChild",null),G(this,"lastChild",null),G(this,"previousSibling",null),G(this,"nextSibling",null),G(this,"ELEMENT_NODE",1),G(this,"TEXT_NODE",3),G(this,"nodeType"),G(this,"nodeName"),G(this,"RRNodeType")}get childNodes(){const e=[];let r=this.firstChild;for(;r;)e.push(r),r=r.nextSibling;return e}contains(e){if(e instanceof mt){if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0}else return!1;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}class cs extends mt{constructor(...e){super(e),G(this,"nodeType",9),G(this,"nodeName","#document"),G(this,"compatMode","CSS1Compat"),G(this,"RRNodeType",xe.Document),G(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(e=>e.RRNodeType===xe.Element&&e.tagName==="HTML")||null}get body(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(r=>r.RRNodeType===xe.Element&&r.tagName==="BODY"))||null}get head(){var e;return((e=this.documentElement)==null?void 0:e.childNodes.find(r=>r.RRNodeType===xe.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(e){const r=e.RRNodeType;if((r===xe.Element||r===xe.DocumentType)&&this.childNodes.some(i=>i.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===xe.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const n=us(this,e);return n.parentElement=null,n}insertBefore(e,r){const n=e.RRNodeType;if((n===xe.Element||n===xe.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===n))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${n===xe.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);const i=Ya(this,e,r);return i.parentElement=null,i}removeChild(e){return Ja(this,e)}open(){this.firstChild=null,this.lastChild=null}close(){}write(e){let r;if(e==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":e==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){const n=this.createDocumentType("html",r,"");this.open(),this.appendChild(n)}}createDocument(e,r,n){return new cs}createDocumentType(e,r,n){const i=new qa(e,r,n);return i.ownerDocument=this,i}createElement(e){const r=new ln(e);return r.ownerDocument=this,r}createElementNS(e,r){return this.createElement(r)}createTextNode(e){const r=new Va(e);return r.ownerDocument=this,r}createComment(e){const r=new Ga(e);return r.ownerDocument=this,r}createCDATASection(e){const r=new Ka(e);return r.ownerDocument=this,r}toString(){return"RRDocument"}}class qa extends mt{constructor(e,r,n){super(),G(this,"nodeType",10),G(this,"RRNodeType",xe.DocumentType),G(this,"name"),G(this,"publicId"),G(this,"systemId"),G(this,"textContent",null),this.name=e,this.publicId=r,this.systemId=n,this.nodeName=e}toString(){return"RRDocumentType"}}class ln extends mt{constructor(e){super(),G(this,"nodeType",1),G(this,"RRNodeType",xe.Element),G(this,"tagName"),G(this,"attributes",{}),G(this,"shadowRoot",null),G(this,"scrollLeft"),G(this,"scrollTop"),this.tagName=e.toUpperCase(),this.nodeName=e.toUpperCase()}get textContent(){let e="";return this.childNodes.forEach(r=>e+=r.textContent),e}set textContent(e){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(e))}get classList(){return new Jd(this.attributes.class,e=>{this.attributes.class=e})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){const e=this.attributes.style?zd(this.attributes.style):{},r=/\B([A-Z])/g;return e.setProperty=(n,i,s)=>{if(r.test(n))return;const o=ls(n);i?e[o]=i:delete e[o],s==="important"&&(e[o]+=" !important"),this.attributes.style=Ha(e)},e.removeProperty=n=>{if(r.test(n))return"";const i=ls(n),s=e[i]||"";return delete e[i],this.attributes.style=Ha(e),s},e}getAttribute(e){return this.attributes[e]===void 0?null:this.attributes[e]}setAttribute(e,r){this.attributes[e]=r}setAttributeNS(e,r,n){this.setAttribute(r,n)}removeAttribute(e){delete this.attributes[e]}appendChild(e){return us(this,e)}insertBefore(e,r){return Ya(this,e,r)}removeChild(e){return Ja(this,e)}attachShadow(e){const r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(e){return!0}toString(){let e="";for(const r in this.attributes)e+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${e}`}}class Kd extends ln{constructor(){super(...arguments),G(this,"currentTime"),G(this,"volume"),G(this,"paused"),G(this,"muted"),G(this,"playbackRate"),G(this,"loop")}attachShadow(e){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}}class Yd extends ln{constructor(){super(...arguments),G(this,"tagName","DIALOG"),G(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}}class Va extends mt{constructor(e){super(),G(this,"nodeType",3),G(this,"nodeName","#text"),G(this,"RRNodeType",xe.Text),G(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRText text=${JSON.stringify(this.data)}`}}class Ga extends mt{constructor(e){super(),G(this,"nodeType",8),G(this,"nodeName","#comment"),G(this,"RRNodeType",xe.Comment),G(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRComment text=${JSON.stringify(this.data)}`}}class Ka extends mt{constructor(e){super(),G(this,"nodeName","#cdata-section"),G(this,"nodeType",4),G(this,"RRNodeType",xe.CDATA),G(this,"data"),this.data=e}get textContent(){return this.data}set textContent(e){this.data=e}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}}class Jd{constructor(e,r){if(G(this,"onChange"),G(this,"classes",[]),G(this,"add",(...n)=>{for(const i of n){const s=String(i);this.classes.indexOf(s)>=0||this.classes.push(s)}this.onChange&&this.onChange(this.classes.join(" "))}),G(this,"remove",(...n)=>{this.classes=this.classes.filter(i=>n.indexOf(i)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),e){const n=e.trim().split(/\s+/);this.classes.push(...n)}this.onChange=r}}function us(t,e){return e.parentNode&&e.parentNode.removeChild(e),t.lastChild?(t.lastChild.nextSibling=e,e.previousSibling=t.lastChild):(t.firstChild=e,e.previousSibling=null),t.lastChild=e,e.nextSibling=null,e.parentNode=t,e.parentElement=t,e.ownerDocument=t.ownerDocument,e}function Ya(t,e,r){if(!r)return us(t,e);if(r.parentNode!==t)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return e===r||(e.parentNode&&e.parentNode.removeChild(e),e.previousSibling=r.previousSibling,r.previousSibling=e,e.nextSibling=r,e.previousSibling?e.previousSibling.nextSibling=e:t.firstChild=e,e.parentElement=t,e.parentNode=t,e.ownerDocument=t.ownerDocument),e}function Ja(t,e){if(e.parentNode!==t)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return e.previousSibling?e.previousSibling.nextSibling=e.nextSibling:t.firstChild=e.nextSibling,e.nextSibling?e.nextSibling.previousSibling=e.previousSibling:t.lastChild=e.previousSibling,e.previousSibling=null,e.nextSibling=null,e.parentElement=null,e.parentNode=null,e}var ct=(t=>(t[t.PLACEHOLDER=0]="PLACEHOLDER",t[t.ELEMENT_NODE=1]="ELEMENT_NODE",t[t.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",t[t.TEXT_NODE=3]="TEXT_NODE",t[t.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",t[t.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",t[t.ENTITY_NODE=6]="ENTITY_NODE",t[t.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",t[t.COMMENT_NODE=8]="COMMENT_NODE",t[t.DOCUMENT_NODE=9]="DOCUMENT_NODE",t[t.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",t[t.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",t))(ct||{});const ds={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},Xd={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};let bt=null;function cn(t,e,r,n=e.mirror||e.ownerDocument.mirror){t=Qd(t,e,r,n),Xa(t,e,r,n),Zd(t,e,r)}function Qd(t,e,r,n){var i;if(r.afterAppend&&!bt&&(bt=new WeakSet,setTimeout(()=>{bt=null},0)),!fs(t,e)){const s=un(e,r.mirror,n);(i=t.parentNode)==null||i.replaceChild(s,t),t=s}switch(e.RRNodeType){case xe.Document:{if(!Jt(t,e,r.mirror,n)){const s=n.getMeta(e);s&&(r.mirror.removeNodeFromMap(t),t.close(),t.open(),r.mirror.add(t,s),bt==null||bt.add(t))}break}case xe.Element:{const s=t,o=e;switch(o.tagName){case"IFRAME":{const l=t.contentDocument;if(!l)break;cn(l,e.contentDocument,r,n);break}}o.shadowRoot&&(s.shadowRoot||s.attachShadow({mode:"open"}),Xa(s.shadowRoot,o.shadowRoot,r,n)),ef(s,o,n);break}}return t}function Zd(t,e,r){var n;switch(e.RRNodeType){case xe.Document:{const i=e.scrollData;i&&r.applyScroll(i,!0);break}case xe.Element:{const i=t,s=e;switch(s.scrollData&&r.applyScroll(s.scrollData,!0),s.inputData&&r.applyInput(s.inputData),s.tagName){case"AUDIO":case"VIDEO":{const o=t,l=s;l.paused!==void 0&&(l.paused?o.pause():o.play()),l.muted!==void 0&&(o.muted=l.muted),l.volume!==void 0&&(o.volume=l.volume),l.currentTime!==void 0&&(o.currentTime=l.currentTime),l.playbackRate!==void 0&&(o.playbackRate=l.playbackRate),l.loop!==void 0&&(o.loop=l.loop);break}case"CANVAS":{const o=e;if(o.rr_dataURL!==null){const l=document.createElement("img");l.onload=()=>{const c=i.getContext("2d");c&&c.drawImage(l,0,0,l.width,l.height)},l.src=o.rr_dataURL}o.canvasMutations.forEach(l=>r.applyCanvas(l.event,l.mutation,t));break}case"STYLE":{const o=i.sheet;o&&e.rules.forEach(l=>r.applyStyleSheetMutation(l,o));break}case"DIALOG":{const o=i,l=s,c=o.open,u=o.matches("dialog:modal"),a=l.open,h=l.isModal,d=u!==h,f=c!==a;if((d||c&&f)&&o.close(),a&&(f||d))try{h?o.showModal():o.show()}catch(m){console.warn(m)}break}}break}case xe.Text:case xe.Comment:case xe.CDATA:{t.textContent!==e.data&&(t.textContent=e.data);break}}bt!=null&&bt.has(t)&&(bt.delete(t),(n=r.afterAppend)==null||n.call(r,t,r.mirror.getId(t)))}function ef(t,e,r){const n=t.attributes,i=e.attributes;for(const s in i){const o=i[s],l=r.getMeta(e);if(l!=null&&l.isSVG&&ds[s])t.setAttributeNS(ds[s],s,o);else if(e.tagName==="CANVAS"&&s==="rr_dataURL"){const c=document.createElement("img");c.src=o,c.onload=()=>{const u=t.getContext("2d");u&&u.drawImage(c,0,0,c.width,c.height)}}else{if(e.tagName==="IFRAME"&&s==="srcdoc")continue;try{t.setAttribute(s,o)}catch(c){console.warn(c)}}}for(const{name:s}of Array.from(n))s in i||t.removeAttribute(s);e.scrollLeft&&(t.scrollLeft=e.scrollLeft),e.scrollTop&&(t.scrollTop=e.scrollTop)}function Xa(t,e,r,n){const i=Array.from(t.childNodes),s=e.childNodes;if(i.length===0&&s.length===0)return;let o=0,l=i.length-1,c=0,u=s.length-1,a=i[o],h=i[l],d=s[c],f=s[u],m,p;for(;o<=l&&c<=u;)if(a===void 0)a=i[++o];else if(h===void 0)h=i[--l];else if(Jt(a,d,r.mirror,n))a=i[++o],d=s[++c];else if(Jt(h,f,r.mirror,n))h=i[--l],f=s[--u];else if(Jt(a,f,r.mirror,n)){try{t.insertBefore(a,h.nextSibling)}catch(w){console.warn(w)}a=i[++o],f=s[--u]}else if(Jt(h,d,r.mirror,n)){try{t.insertBefore(h,a)}catch(w){console.warn(w)}h=i[--l],d=s[++c]}else{if(!m){m={};for(let b=o;b<=l;b++){const C=i[b];C&&r.mirror.hasNode(C)&&(m[r.mirror.getId(C)]=b)}}p=m[n.getId(d)];const w=i[p];if(p!==void 0&&w&&Jt(w,d,r.mirror,n)){try{t.insertBefore(w,a)}catch(b){console.warn(b)}i[p]=void 0}else{const b=un(d,r.mirror,n);t.nodeName==="#document"&&a&&(b.nodeType===b.DOCUMENT_TYPE_NODE&&a.nodeType===a.DOCUMENT_TYPE_NODE||b.nodeType===b.ELEMENT_NODE&&a.nodeType===a.ELEMENT_NODE)&&(t.removeChild(a),r.mirror.removeNodeFromMap(a),a=i[++o]);try{t.insertBefore(b,a||null)}catch(C){console.warn(C)}}d=s[++c]}if(o>l){const w=s[u+1];let b=null;for(w&&(b=r.mirror.getNode(n.getId(w)));c<=u;++c){const C=un(s[c],r.mirror,n);try{t.insertBefore(C,b)}catch(S){console.warn(S)}}}else if(c>u)for(;o<=l;o++){const w=i[o];if(!(!w||w.parentNode!==t))try{t.removeChild(w),r.mirror.removeNodeFromMap(w)}catch(b){console.warn(b)}}let y=t.firstChild,v=e.firstChild;for(;y!==null&&v!==null;)cn(y,v,r,n),y=y.nextSibling,v=v.nextSibling}function un(t,e,r){const n=r.getId(t),i=r.getMeta(t);let s=null;if(n>-1&&(s=e.getNode(n)),s!==null&&fs(s,t))return s;switch(t.RRNodeType){case xe.Document:s=new Document;break;case xe.DocumentType:s=document.implementation.createDocumentType(t.name,t.publicId,t.systemId);break;case xe.Element:{let o=t.tagName.toLowerCase();o=Xd[o]||o,i&&"isSVG"in i&&(i!=null&&i.isSVG)?s=document.createElementNS(ds.svg,o):s=document.createElement(t.tagName);break}case xe.Text:s=document.createTextNode(t.data);break;case xe.Comment:s=document.createComment(t.data);break;case xe.CDATA:s=document.createCDATASection(t.data);break}i&&e.add(s,{...i});try{bt==null||bt.add(s)}catch{}return s}function fs(t,e){return t.nodeType!==e.nodeType?!1:t.nodeType!==t.ELEMENT_NODE||t.tagName.toUpperCase()===e.tagName}function Jt(t,e,r,n){const i=r.getId(t),s=n.getId(e);return i===-1||i!==s?!1:fs(t,e)}class Xt extends cs{constructor(e){super(),G(this,"UNSERIALIZED_STARTING_ID",-2),G(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),G(this,"mirror",hf()),G(this,"scrollData",null),e&&(this.mirror=e)}get unserializedId(){return this._unserializedId--}createDocument(e,r,n){return new Xt}createDocumentType(e,r,n){const i=new tf(e,r,n);return i.ownerDocument=this,i}createElement(e){const r=e.toUpperCase();let n;switch(r){case"AUDIO":case"VIDEO":n=new rf(r);break;case"IFRAME":n=new af(r,this.mirror);break;case"CANVAS":n=new sf(r);break;case"STYLE":n=new of(r);break;case"DIALOG":n=new nf(r);break;default:n=new dn(r);break}return n.ownerDocument=this,n}createComment(e){const r=new cf(e);return r.ownerDocument=this,r}createCDATASection(e){const r=new uf(e);return r.ownerDocument=this,r}createTextNode(e){const r=new lf(e);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}}const tf=qa;class dn extends ln{constructor(){super(...arguments),G(this,"inputData",null),G(this,"scrollData",null)}}class rf extends Kd{}class nf extends Yd{}class sf extends dn{constructor(){super(...arguments),G(this,"rr_dataURL",null),G(this,"canvasMutations",[])}getContext(){return null}}class of extends dn{constructor(){super(...arguments),G(this,"rules",[])}}class af extends dn{constructor(e,r){super(e),G(this,"contentDocument",new Xt),this.contentDocument.mirror=r}}const lf=Va,cf=Ga,uf=Ka;function df(t){return t instanceof HTMLFormElement?"FORM":t.tagName.toUpperCase()}function Qa(t,e,r,n){let i;switch(t.nodeType){case ct.DOCUMENT_NODE:n&&n.nodeName==="IFRAME"?i=n.contentDocument:(i=e,i.compatMode=t.compatMode);break;case ct.DOCUMENT_TYPE_NODE:{const o=t;i=e.createDocumentType(o.name,o.publicId,o.systemId);break}case ct.ELEMENT_NODE:{const o=t,l=df(o);i=e.createElement(l);const c=i;for(const{name:u,value:a}of Array.from(o.attributes))c.attributes[u]=a;o.scrollLeft&&(c.scrollLeft=o.scrollLeft),o.scrollTop&&(c.scrollTop=o.scrollTop);break}case ct.TEXT_NODE:i=e.createTextNode(t.textContent||"");break;case ct.CDATA_SECTION_NODE:i=e.createCDATASection(t.data);break;case ct.COMMENT_NODE:i=e.createComment(t.textContent||"");break;case ct.DOCUMENT_FRAGMENT_NODE:i=n.attachShadow({mode:"open"});break;default:return null}let s=r.getMeta(t);return e instanceof Xt&&(s||(s=Za(i,e.unserializedId),r.add(t,s)),e.mirror.add(i,{...s})),i}function ff(t,e=Od(),r=new Xt){function n(i,s){const o=Qa(i,r,e,s);if(o!==null)if((s==null?void 0:s.nodeName)!=="IFRAME"&&i.nodeType!==ct.DOCUMENT_FRAGMENT_NODE&&(s==null||s.appendChild(o),o.parentNode=s,o.parentElement=s),i.nodeName==="IFRAME"){const l=i.contentDocument;l&&n(l,o)}else(i.nodeType===ct.DOCUMENT_NODE||i.nodeType===ct.ELEMENT_NODE||i.nodeType===ct.DOCUMENT_FRAGMENT_NODE)&&(i.nodeType===ct.ELEMENT_NODE&&i.shadowRoot&&n(i.shadowRoot,o),i.childNodes.forEach(l=>n(l,o)))}return n(t,null),r}function hf(){return new pf}class pf{constructor(){G(this,"idNodeMap",new Map),G(this,"nodeMetaMap",new WeakMap)}getId(e){var r;return e?((r=this.getMeta(e))==null?void 0:r.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 r=this.getId(e);this.idNodeMap.delete(r),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,r){const n=r.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,r)}replace(e,r){const n=this.getNode(e);if(n){const i=this.nodeMetaMap.get(n);i&&this.nodeMetaMap.set(r,i)}this.idNodeMap.set(e,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Za(t,e){switch(t.RRNodeType){case xe.Document:return{id:e,type:t.RRNodeType,childNodes:[]};case xe.DocumentType:{const r=t;return{id:e,type:t.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case xe.Element:return{id:e,type:t.RRNodeType,tagName:t.tagName.toLowerCase(),attributes:{},childNodes:[]};case xe.Text:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case xe.Comment:return{id:e,type:t.RRNodeType,textContent:t.textContent||""};case xe.CDATA:return{id:e,type:t.RRNodeType,textContent:""}}}const el={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},tl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},vr={},hs={};let rl=0;const mf=()=>!!globalThis.Zone;function ps(t){if(vr[t])return vr[t];const e=globalThis[t],r=e.prototype,n=t in el?el[t]:void 0,i=!!(n&&n.every(l=>{var c,u;return!!((u=(c=Object.getOwnPropertyDescriptor(r,l))==null?void 0:c.get)!=null&&u.toString().includes("[native code]"))})),s=t in tl?tl[t]:void 0,o=!!(s&&s.every(l=>{var c;return typeof r[l]=="function"&&((c=r[l])==null?void 0:c.toString().includes("[native code]"))}));if(i&&o&&!mf())return vr[t]=e.prototype,e.prototype;try{const l=document.createElement("iframe");l.style.display="none",document.body.appendChild(l);const c=l.contentWindow;if(!c)return e.prototype;const u=c[t].prototype;if(!u)return l.remove(),r;const a=navigator.userAgent;return a.includes("Safari")&&!a.includes("Chrome")?(l.classList.add("rr-block"),l.setAttribute("__rrwebUntaintedMutationObserver",""),hs[t]=()=>l.remove()):l.remove(),vr[t]=u}catch{return r}}const ms={};function ut(t,e,r){var n,i;const s=(n=ms[t])==null?void 0:n[r];if(s)return s.call(e);const o=ps(t),l=(i=Object.getOwnPropertyDescriptor(o,r))==null?void 0:i.get;return l?((ms[t]||(ms[t]={}))[r]=l,l.call(e)):e[r]}const gs={};function nl(t,e,r){const n=`${t}.${String(r)}`;if(gs[n])return gs[n].bind(e);const s=ps(t)[r];return typeof s!="function"?e[r]:(gs[n]=s,s.bind(e))}function gf(t){return ut("Node",t,"ownerDocument")}function yf(t){return ut("Node",t,"childNodes")}function bf(t){return ut("Node",t,"parentNode")}function vf(t){return ut("Node",t,"parentElement")}function wf(t){return ut("Node",t,"textContent")}function Sf(t){return ut("Node",t,"firstChild")}function xf(t){return ut("Node",t,"lastChild")}function Cf(t){return ut("Node",t,"nextSibling")}function Rf(t){return ut("Node",t,"previousSibling")}function Ef(t,e){return nl("Node",t,"contains")(e)}function kf(t){return nl("Node",t,"getRootNode")()}function Mf(t){return!t||!("host"in t)?null:ut("ShadowRoot",t,"host")}function Tf(t){return t.styleSheets}function Af(t){return!t||!("shadowRoot"in t)?null:ut("Element",t,"shadowRoot")}function If(t,e){return ut("Element",t,"querySelector")(e)}function Of(t,e){return ut("Element",t,"querySelectorAll")(e)}function il(){const t=ps("MutationObserver");rl++;let e=!1;return[t.constructor,()=>{if(e||(e=!0,--rl!==0))return;const r=hs.MutationObserver;if(r)try{r()}finally{delete vr.MutationObserver,delete hs.MutationObserver}}]}let wr=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(wr=()=>new Date().getTime());function Bt(t,e,r){try{if(!(e in t))return()=>{};const n=t[e],i=r(n);return typeof i=="function"&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:n}})),t[e]=i,()=>{t[e]=n}}catch{return()=>{}}}const ue={ownerDocument:gf,childNodes:yf,parentNode:bf,parentElement:vf,textContent:wf,firstChild:Sf,lastChild:xf,nextSibling:Cf,previousSibling:Rf,contains:Ef,getRootNode:kf,host:Mf,styleSheets:Tf,shadowRoot:Af,querySelector:If,querySelectorAll:Of,nowTimestamp:wr,mutationObserverCtor:il,patch:Bt};function Je(t,e,r=document){const n={capture:!0,passive:!0};return r.addEventListener(t,e,n),()=>r.removeEventListener(t,e,n)}const Qt=`Please stop import mirror directly. Instead of that,\r
|
|
59
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
60
|
+
or you can use record.mirror to access the mirror instance during recording.`;let sl={map:{},getId(){return console.error(Qt),-1},getNode(){return console.error(Qt),null},removeNodeFromMap(){console.error(Qt)},has(){return console.error(Qt),!1},reset(){console.error(Qt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(sl=new Proxy(sl,{get(t,e,r){return e==="map"&&console.error(Qt),Reflect.get(t,e,r)}}));function Sr(t,e,r={}){let n=null,i=0;return function(...s){const o=Date.now();!i&&r.leading===!1&&(i=o);const l=e-(o-i),c=this;l<=0||l>e?(n&&(clearTimeout(n),n=null),i=o,t.apply(c,s)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{i=r.leading===!1?0:Date.now(),n=null,t.apply(c,s)},l))}}function fn(t,e,r,n,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,n?r:{set(o){setTimeout(()=>{r.set.call(this,o)},0),s&&s.set&&s.set.call(this,o)}}),()=>fn(t,e,s||{},!0)}function ol(t){var e,r,n,i;const s=t.document;return{left:s.scrollingElement?s.scrollingElement.scrollLeft:t.pageXOffset!==void 0?t.pageXOffset:s.documentElement.scrollLeft||(s==null?void 0:s.body)&&((e=ue.parentElement(s.body))==null?void 0:e.scrollLeft)||((r=s==null?void 0:s.body)==null?void 0:r.scrollLeft)||0,top:s.scrollingElement?s.scrollingElement.scrollTop:t.pageYOffset!==void 0?t.pageYOffset:(s==null?void 0:s.documentElement.scrollTop)||(s==null?void 0:s.body)&&((n=ue.parentElement(s.body))==null?void 0:n.scrollTop)||((i=s==null?void 0:s.body)==null?void 0:i.scrollTop)||0}}function al(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ll(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function cl(t){return t?t.nodeType===t.ELEMENT_NODE?t:ue.parentElement(t):null}function rt(t,e,r,n){if(!t)return!1;const i=cl(t);if(!i)return!1;try{if(typeof e=="string"){if(i.classList.contains(e)||n&&i.closest("."+e)!==null)return!0}else if(qr(i,e,n))return!0}catch{}return!!(r&&(i.matches(r)||n&&i.closest(r)!==null))}function Nf(t,e){return e.getId(t)!==-1}function ys(t,e,r){return t.tagName==="TITLE"&&r.headTitleMutations?!0:e.getId(t)===Hr}function ul(t,e){if(hr(t))return!1;const r=e.getId(t);if(!e.has(r))return!0;const n=ue.parentNode(t);return n&&n.nodeType===t.DOCUMENT_NODE?!1:n?ul(n,e):!0}function bs(t){return!!t.changedTouches}function dl(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function _f(t){const e={},r=(i,s)=>{const o={value:i,parent:s,children:[]};return e[i.node.id]=o,o},n=[];for(const i of t){const{nextId:s,parentId:o}=i;if(s&&s in e){const l=e[s];if(l.parent){const c=l.parent.children.indexOf(l);l.parent.children.splice(c,0,r(i,l.parent))}else{const c=n.indexOf(l);n.splice(c,0,r(i,null))}continue}if(o in e){const l=e[o];l.children.push(r(i,l));continue}n.push(r(i,null))}return n}function fl(t,e){e(t.value);for(let r=t.children.length-1;r>=0;r--)fl(t.children[r],e)}function xr(t,e){return!!(t.nodeName==="IFRAME"&&e.getMeta(t))}function hl(t,e){return!!(t.nodeName==="LINK"&&t.nodeType===t.ELEMENT_NODE&&t.getAttribute&&t.getAttribute("rel")==="stylesheet"&&e.getMeta(t))}function pl(t,e){var r,n;const i=(n=(r=t.ownerDocument)==null?void 0:r.defaultView)==null?void 0:n.frameElement;if(!i||i===e)return{x:0,y:0,relativeScale:1,absoluteScale:1};const s=i.getBoundingClientRect(),o=pl(i,e),l=s.height/i.clientHeight;return{x:s.x*o.relativeScale+o.x,y:s.y*o.relativeScale+o.y,relativeScale:l,absoluteScale:o.absoluteScale*l}}function Ft(t){return t?t instanceof mt&&"shadowRoot"in t?!!t.shadowRoot:!!ue.shadowRoot(t):!1}function Cr(t,e){const r=t==null?void 0:t[e[0]];return r?e.length===1?r:Cr(r.cssRules,e.slice(1)):null}function ml(t){const e=[...t],r=e.pop();return{positions:e,index:r}}function Df(t){const e=new Set,r=[];for(let n=t.length;n--;){const i=t[n];e.has(i.id)||(r.push(i),e.add(i.id))}return r}class gl{constructor(){$(this,"id",1),$(this,"styleIDMap",new WeakMap),$(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,r){if(this.has(e))return this.getId(e);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}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 yl(t){var e;let r=null;return"getRootNode"in t&&((e=ue.getRootNode(t))==null?void 0:e.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&ue.host(ue.getRootNode(t))&&(r=ue.host(ue.getRootNode(t))),r}function Lf(t){let e=t,r;for(;r=yl(e);)e=r;return e}function Pf(t){const e=ue.ownerDocument(t);if(!e)return!1;const r=Lf(t);return ue.contains(e,r)}function vs(t){const e=ue.ownerDocument(t);return e?ue.contains(e,t)||Pf(t):!1}var Z=(t=>(t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin",t[t.Asset=7]="Asset",t[t.Annotation=8]="Annotation",t))(Z||{}),K=(t=>(t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration",t[t.Selection=14]="Selection",t[t.AdoptedStyleSheet=15]="AdoptedStyleSheet",t[t.CustomElement=16]="CustomElement",t))(K||{}),Ae=(t=>(t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel",t))(Ae||{}),xt=(t=>(t[t.Mouse=0]="Mouse",t[t.Pen=1]="Pen",t[t.Touch=2]="Touch",t))(xt||{}),Ct=(t=>(t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2",t))(Ct||{}),It=(t=>(t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange",t[t.RateChange=4]="RateChange",t))(It||{}),Me=(t=>(t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Annotation="annotation",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back",t.Destroy="destroy",t))(Me||{}),Rt=(t=>(t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment",t))(Rt||{});const bl=(t,e)=>`${t}@${e}`;class $f{constructor(){$(this,"frozen",!1),$(this,"locked",!1),$(this,"texts",[]),$(this,"attributes",[]),$(this,"attributeMap",new WeakMap),$(this,"removes",[]),$(this,"mapRemoves",[]),$(this,"movedMap",{}),$(this,"addedSet",new Set),$(this,"movedSet",new Set),$(this,"droppedSet",new Set),$(this,"removesSubTreeCache",new Set),$(this,"mutationCb"),$(this,"blockClass"),$(this,"blockSelector"),$(this,"maskTextClass"),$(this,"maskTextSelector"),$(this,"inlineStylesheet"),$(this,"maskInputOptions"),$(this,"maskTextFn"),$(this,"maskInputFn"),$(this,"keepIframeSrcFn"),$(this,"recordCanvas"),$(this,"inlineImages"),$(this,"slimDOMOptions"),$(this,"dataURLOptions"),$(this,"doc"),$(this,"mirror"),$(this,"iframeManager"),$(this,"stylesheetManager"),$(this,"shadowDomManager"),$(this,"processedNodeManager"),$(this,"unattachedDoc"),$(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),$(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],r=new Set;for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const d of this.movedSet){const f=ue.parentNode(d);this.removesSubTreeCache.has(f)&&!this.movedSet.has(f)||this.addedSet.add(d)}let n=null,i=null,s=-1,o=null,l=!1;const c=new Set,u=this.addedSet.values();let a=u.next();for(;this.addedSet.size;){if(n!==null&&this.addedSet.has(ue.previousSibling(n)))o=n,n=ue.previousSibling(n);else{for(this.addedSet.has(a.value)||(a=u.next()),n=a.value;;){if(i=ue.parentNode(n),this.addedSet.has(i)){n=i;continue}break}if(c.has(i))i=null;else if(i){if(vs(i)?(l=vl(this.droppedSet,i)||this.removesSubTreeCache.has(i),l&&vl(this.movedSet,n)&&(l=!1)):l=!0,this.addedSet.has(ue.lastChild(i)))n=ue.lastChild(i),o=null;else for(;;){if(o=ue.nextSibling(n),this.addedSet.has(o)){n=o;continue}break}if(s=hr(i)?this.mirror.getId(yl(n)):this.mirror.getId(i),s===-1&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=ue.host(i);s=this.mirror.getId(p)}}}if(this.addedSet.delete(n),!i||s===-1){c.add(n);continue}else if(l){this.droppedSet.add(n);continue}let d=!1;if(n.nodeType===Node.TEXT_NODE){const p=i.tagName;if(p==="TEXTAREA")continue;p==="STYLE"&&r.has(s)&&(d=!0)}let f=o?this.mirror.getId(o):null;for(;f===Hr;)o=o&&ue.nextSibling(o),f=o&&this.mirror.getId(o);if(f===-1){console.warn("Couldn't record new node. Couldn't find mirror id for nextSibling:",o),n=null;continue}const m=Yt(n,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:p=>{xr(p,this.mirror)&&this.iframeManager.addIframe(p),hl(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Ft(n)&&this.shadowDomManager.addShadowRoot(ue.shadowRoot(n),this.doc)},onIframeLoad:(p,y)=>{this.iframeManager.attachIframe(p,y),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,y)=>{this.stylesheetManager.attachLinkElement(p,y)},cssCaptured:d});m&&(e.push({parentId:s,nextId:f,node:m}),r.add(m.id))}const h={texts:this.texts.map(d=>{const f=d.node,m=ue.parentNode(f);return m&&m.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(m),{id:this.mirror.getId(f),value:d.value}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),attributes:this.attributes.map(d=>{const{attributes:f}=d;if(typeof f.style=="string"){const m=JSON.stringify(d.styleDiff),p=JSON.stringify(d._unchangedStyles);m.length<f.style.length&&(m+p).split("var(").length===f.style.split("var(").length&&(f.style=d.styleDiff)}return{id:this.mirror.getId(d.node),attributes:f}}).filter(d=>!r.has(d.id)).filter(d=>this.mirror.has(d.id)),removes:this.removes,adds:e};!h.texts.length&&!h.attributes.length&&!h.removes.length&&!h.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(h))}),$(this,"genTextAreaValueMutation",e=>{let r=this.attributeMap.get(e);r||(r={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(e,r));const n=Array.from(ue.childNodes(e),i=>ue.textContent(i)||"").join("");r.attributes.value=Fr({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:Ur(e),value:n,maskInputFn:this.maskInputFn})}),$(this,"processMutation",e=>{if(!ys(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const r=ue.textContent(e.target);!rt(e.target,this.blockClass,this.blockSelector,!1)&&r!==e.oldValue&&this.texts.push({value:ho(e.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,cl(e.target)):r.replace(/[\S]/g,"*"):r,node:e.target});break}case"attributes":{const r=e.target,n=St(r.tagName);let i=e.attributeName,s=e.target.getAttribute(i);if(i==="value"){const l=Ur(r);s=Fr({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:l,value:s,maskInputFn:this.maskInputFn})}if(rt(e.target,this.blockClass,this.blockSelector,!1)||s===e.oldValue)return;let o=this.attributeMap.get(e.target);if(n==="iframe"&&i==="src"&&!this.keepIframeSrcFn(s))if(!r.contentDocument)i="rr_src";else return;if(o||(o={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(e.target,o)),i==="type"&&n==="input"&&(e.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!fo(n,i))if(o.attributes[i]=uo(this.doc,n,St(i),s),i==="style"){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const l=this.unattachedDoc.createElement("span");e.oldValue&&l.setAttribute("style",e.oldValue);for(const c of Array.from(r.style)){const u=r.style.getPropertyValue(c),a=r.style.getPropertyPriority(c);u!==l.style.getPropertyValue(c)||a!==l.style.getPropertyPriority(c)?a===""?o.styleDiff[c]=u:o.styleDiff[c]=[u,a]:o._unchangedStyles[c]=[u,a]}for(const c of Array.from(l.style))r.style.getPropertyValue(c)===""&&(o.styleDiff[c]=!1)}else i==="open"&&r.tagName==="DIALOG"&&(r.matches("dialog:modal")?o.attributes.rr_open_mode="modal":o.attributes.rr_open_mode="non-modal");break}case"childList":{if(rt(e.target,this.blockClass,this.blockSelector,!0))return;if(e.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(e.target);return}e.addedNodes.forEach(r=>this.genAdds(r,e.target)),e.removedNodes.forEach(r=>{vs(r)||this.shadowDomManager.removeShadowRootsIn(r);const n=this.mirror.getId(r),i=hr(e.target)?this.mirror.getId(ue.host(e.target)):this.mirror.getId(e.target);rt(e.target,this.blockClass,this.blockSelector,!1)||ys(r,this.mirror,this.slimDOMOptions)||!Nf(r,this.mirror)||(this.addedSet.has(r)?(ws(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(e.target)&&n===-1||ul(e.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[bl(n,i)]?ws(this.movedSet,r):(this.removes.push({parentId:i,id:n,isShadow:hr(e.target)&&pr(e.target)?!0:void 0}),jf(r,this.removesSubTreeCache))),this.mapRemoves.push(r))});break}}}),$(this,"genAdds",(e,r)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(ys(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[bl(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);rt(e,this.blockClass,this.blockSelector,!1)||(ue.childNodes(e).forEach(n=>this.genAdds(n)),Ft(e)&&ue.childNodes(ue.shadowRoot(e)).forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","processedNodeManager"].forEach(r=>{this[r]=e[r]})}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1,this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0}unlock(){this.locked=!1,this.emit()}}function ws(t,e){t.delete(e),ue.childNodes(e).forEach(r=>ws(t,r))}function jf(t,e){const r=[t];for(;r.length;){const n=r.pop();e.has(n)||(e.add(n),ue.childNodes(n).forEach(i=>r.push(i)))}}function vl(t,e){return t.size===0?!1:wl(t,e)}function wl(t,e){if(t.has(e))return!0;const r=ue.parentNode(e);return r?wl(t,r):!1}let Rr;function Bf(t){Rr=t}function Ff(){Rr=void 0}const Ee=t=>Rr?(...r)=>{try{return t(...r)}catch(n){if(Rr&&Rr(n)===!0)return;throw n}}:t,Zt=new Set;function Er(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch{}return t&&t.target}function Sl(t,e){const r=new $f;Zt.add(r),r.init(t);const[n,i]=il(),s=new n(Ee(r.processMutations.bind(r)));return s.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),()=>{s.disconnect(),Zt.delete(r),i()}}function Uf({mousemoveCb:t,sampling:e,doc:r,mirror:n}){if(e.mousemove===!1)return()=>{};const i=typeof e.mousemove=="number"?e.mousemove:50,s=typeof e.mousemoveCallback=="number"?e.mousemoveCallback:500;let o=[],l;const c=Sr(Ee(h=>{const d=Date.now()-l;t(o.map(f=>(f.timeOffset-=d,f)),h),o=[],l=null}),s),u=Ee(Sr(Ee(h=>{const d=Er(h),{clientX:f,clientY:m}=bs(h)?h.changedTouches[0]:h;l||(l=wr()),o.push({x:f,y:m,id:n.getId(d),timeOffset:wr()-l}),c(typeof DragEvent<"u"&&h instanceof DragEvent?K.Drag:h instanceof MouseEvent?K.MouseMove:K.TouchMove)}),i,{trailing:!1})),a=[Je("mousemove",u,r),Je("touchmove",u,r),Je("drag",u,r)];return Ee(()=>{a.forEach(h=>h())})}function Wf({mouseInteractionCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:s}){if(s.mouseInteraction===!1)return()=>{};const o=s.mouseInteraction===!0||s.mouseInteraction===void 0?{}:s.mouseInteraction,l=[];let c=null;const u=a=>h=>{const d=Er(h);if(rt(d,n,i,!0))return;let f=null,m=a;if("pointerType"in h){switch(h.pointerType){case"mouse":f=xt.Mouse;break;case"touch":f=xt.Touch;break;case"pen":f=xt.Pen;break}f===xt.Touch?Ae[a]===Ae.MouseDown?m="TouchStart":Ae[a]===Ae.MouseUp&&(m="TouchEnd"):xt.Pen}else bs(h)&&(f=xt.Touch);f!==null?(c=f,(m.startsWith("Touch")&&f===xt.Touch||m.startsWith("Mouse")&&f===xt.Mouse)&&(f=null)):Ae[a]===Ae.Click&&(f=c,c=null);const p=bs(h)?h.changedTouches[0]:h;if(!p)return;const y=r.getId(d),{clientX:v,clientY:w}=p;Ee(t)({type:Ae[m],id:y,x:v,y:w,...f!==null&&{pointerType:f}})};return Object.keys(Ae).filter(a=>Number.isNaN(Number(a))&&!a.endsWith("_Departed")&&o[a]!==!1).forEach(a=>{let h=St(a);const d=u(a);if(window.PointerEvent)switch(Ae[a]){case Ae.MouseDown:case Ae.MouseUp:h=h.replace("mouse","pointer");break;case Ae.TouchStart:case Ae.TouchEnd:return}l.push(Je(h,d,e))}),Ee(()=>{l.forEach(a=>a())})}function xl({scrollCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,sampling:s}){const o=Ee(Sr(Ee(l=>{const c=Er(l);if(!c||rt(c,n,i,!0))return;const u=r.getId(c);if(c===e&&e.defaultView){const a=ol(e.defaultView);t({id:u,x:a.left,y:a.top})}else t({id:u,x:c.scrollLeft,y:c.scrollTop})}),s.scroll||100));return Je("scroll",o,e)}function zf({viewportResizeCb:t},{win:e}){let r=-1,n=-1;const i=Ee(Sr(Ee(()=>{const s=al(),o=ll();(r!==s||n!==o)&&(t({width:Number(o),height:Number(s)}),r=s,n=o)}),200));return Je("resize",i,e)}const Hf=["INPUT","TEXTAREA","SELECT"],Cl=new WeakMap;function qf({inputCb:t,doc:e,mirror:r,blockClass:n,blockSelector:i,ignoreClass:s,ignoreSelector:o,maskInputOptions:l,maskInputFn:c,sampling:u,userTriggeredOnInput:a}){function h(w){let b=Er(w);const C=w.isTrusted,S=b&&b.tagName;if(b&&S==="OPTION"&&(b=ue.parentElement(b)),!b||!S||Hf.indexOf(S)<0||rt(b,n,i,!0)||b.classList.contains(s)||o&&b.matches(o))return;let x=b.value,k=!1;const I=Ur(b)||"";I==="radio"||I==="checkbox"?k=b.checked:(l[S.toLowerCase()]||l[I])&&(x=Fr({element:b,maskInputOptions:l,tagName:S,type:I,value:x,maskInputFn:c})),d(b,a?{text:x,isChecked:k,userTriggered:C}:{text:x,isChecked:k});const B=b.name;I==="radio"&&B&&k&&e.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach(_=>{if(_!==b){const H=_.value;d(_,a?{text:H,isChecked:!k,userTriggered:!1}:{text:H,isChecked:!k})}})}function d(w,b){const C=Cl.get(w);if(!C||C.text!==b.text||C.isChecked!==b.isChecked){Cl.set(w,b);const S=r.getId(w);Ee(t)({...b,id:S})}}const m=(u.input==="last"?["change"]:["input","change"]).map(w=>Je(w,Ee(h),e)),p=e.defaultView;if(!p)return()=>{m.forEach(w=>w())};const y=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),v=[[p.HTMLInputElement.prototype,"value"],[p.HTMLInputElement.prototype,"checked"],[p.HTMLSelectElement.prototype,"value"],[p.HTMLTextAreaElement.prototype,"value"],[p.HTMLSelectElement.prototype,"selectedIndex"],[p.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&m.push(...v.map(w=>fn(w[0],w[1],{set(){Ee(h)({target:this,isTrusted:!1})}},!1,p))),Ee(()=>{m.forEach(w=>w())})}function hn(t){const e=[];function r(n,i){if(pn("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||pn("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||pn("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||pn("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const o=Array.from(n.parentRule.cssRules).indexOf(n);return i.unshift(o),r(n.parentRule,i)}else if(n.parentStyleSheet){const o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);i.unshift(o)}return i}return r(t,e)}function Ot(t,e,r){let n,i;return t?(t.ownerNode?n=e.getId(t.ownerNode):i=r.getId(t),{styleId:i,id:n}):{}}function Vf({styleSheetRuleCb:t,mirror:e,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const i=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Ee((a,h,d)=>{const[f,m]=d,{id:p,styleId:y}=Ot(h,e,r.styleMirror);return(p&&p!==-1||y&&y!==-1)&&t({id:p,styleId:y,adds:[{rule:f,index:m}]}),a.apply(h,d)})}),n.CSSStyleSheet.prototype.addRule=function(a,h,d=this.cssRules.length){const f=`${a} { ${h} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[f,d])};const s=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:Ee((a,h,d)=>{const[f]=d,{id:m,styleId:p}=Ot(h,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,removes:[{index:f}]}),a.apply(h,d)})}),n.CSSStyleSheet.prototype.removeRule=function(a){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[a])};let o;n.CSSStyleSheet.prototype.replace&&(o=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Ee((a,h,d)=>{const[f]=d,{id:m,styleId:p}=Ot(h,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replace:f}),a.apply(h,d)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:Ee((a,h,d)=>{const[f]=d,{id:m,styleId:p}=Ot(h,e,r.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,replaceSync:f}),a.apply(h,d)})}));const c={};mn("CSSGroupingRule")?c.CSSGroupingRule=n.CSSGroupingRule:(mn("CSSMediaRule")&&(c.CSSMediaRule=n.CSSMediaRule),mn("CSSConditionRule")&&(c.CSSConditionRule=n.CSSConditionRule),mn("CSSSupportsRule")&&(c.CSSSupportsRule=n.CSSSupportsRule));const u={};return Object.entries(c).forEach(([a,h])=>{u[a]={insertRule:h.prototype.insertRule,deleteRule:h.prototype.deleteRule},h.prototype.insertRule=new Proxy(u[a].insertRule,{apply:Ee((d,f,m)=>{const[p,y]=m,{id:v,styleId:w}=Ot(f.parentStyleSheet,e,r.styleMirror);return(v&&v!==-1||w&&w!==-1)&&t({id:v,styleId:w,adds:[{rule:p,index:[...hn(f),y||0]}]}),d.apply(f,m)})}),h.prototype.deleteRule=new Proxy(u[a].deleteRule,{apply:Ee((d,f,m)=>{const[p]=m,{id:y,styleId:v}=Ot(f.parentStyleSheet,e,r.styleMirror);return(y&&y!==-1||v&&v!==-1)&&t({id:y,styleId:v,removes:[{index:[...hn(f),p]}]}),d.apply(f,m)})})}),Ee(()=>{n.CSSStyleSheet.prototype.insertRule=i,n.CSSStyleSheet.prototype.deleteRule=s,o&&(n.CSSStyleSheet.prototype.replace=o),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach(([a,h])=>{h.prototype.insertRule=u[a].insertRule,h.prototype.deleteRule=u[a].deleteRule})})}function Rl({mirror:t,stylesheetManager:e},r){var n,i,s;let o=null;r.nodeName==="#document"?o=t.getId(r):o=t.getId(ue.host(r));const l=r.nodeName==="#document"?(n=r.defaultView)==null?void 0:n.Document:(s=(i=r.ownerDocument)==null?void 0:i.defaultView)==null?void 0:s.ShadowRoot,c=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return o===null||o===-1||!l||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var u;return(u=c.get)==null?void 0:u.call(this)},set(u){var a;const h=(a=c.set)==null?void 0:a.call(this,u);if(o!==null&&o!==-1)try{e.adoptStyleSheets(u,o)}catch{}return h}}),Ee(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function Gf({styleDeclarationCb:t,mirror:e,ignoreCSSAttributes:r,stylesheetManager:n},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:Ee((l,c,u)=>{var a;const[h,d,f]=u;if(r.has(h))return s.apply(c,[h,d,f]);const{id:m,styleId:p}=Ot((a=c.parentRule)==null?void 0:a.parentStyleSheet,e,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&t({id:m,styleId:p,set:{property:h,value:d,priority:f},index:hn(c.parentRule)}),l.apply(c,u)})});const o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Ee((l,c,u)=>{var a;const[h]=u;if(r.has(h))return o.apply(c,[h]);const{id:d,styleId:f}=Ot((a=c.parentRule)==null?void 0:a.parentStyleSheet,e,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&t({id:d,styleId:f,remove:{property:h},index:hn(c.parentRule)}),l.apply(c,u)})}),Ee(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=o})}function Kf({mediaInteractionCb:t,blockClass:e,blockSelector:r,mirror:n,sampling:i,doc:s}){const o=Ee(c=>Sr(Ee(u=>{const a=Er(u);if(!a||rt(a,e,r,!0))return;const{currentTime:h,volume:d,muted:f,playbackRate:m,loop:p}=a;t({type:c,id:n.getId(a),currentTime:h,volume:d,muted:f,playbackRate:m,loop:p})}),i.media||500)),l=[Je("play",o(It.Play),s),Je("pause",o(It.Pause),s),Je("seeked",o(It.Seeked),s),Je("volumechange",o(It.VolumeChange),s),Je("ratechange",o(It.RateChange),s)];return Ee(()=>{l.forEach(c=>c())})}function Yf({fontCb:t,doc:e}){const r=e.defaultView;if(!r)return()=>{};const n=[],i=new WeakMap,s=r.FontFace;r.FontFace=function(c,u,a){const h=new s(c,u,a);return i.set(h,{family:c,buffer:typeof u!="string",descriptors:a,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),h};const o=Bt(e.fonts,"add",function(l){return function(c){return setTimeout(Ee(()=>{const u=i.get(c);u&&(t(u),i.delete(c))}),0),l.apply(this,[c])}});return n.push(()=>{r.FontFace=s}),n.push(o),Ee(()=>{n.forEach(l=>l())})}function Jf(t){const{doc:e,mirror:r,blockClass:n,blockSelector:i,selectionCb:s}=t;let o=!0;const l=Ee(()=>{const c=e.getSelection();if(!c||o&&(c!=null&&c.isCollapsed))return;o=c.isCollapsed||!1;const u=[],a=c.rangeCount||0;for(let h=0;h<a;h++){const d=c.getRangeAt(h),{startContainer:f,startOffset:m,endContainer:p,endOffset:y}=d;rt(f,n,i,!0)||rt(p,n,i,!0)||u.push({start:r.getId(f),startOffset:m,end:r.getId(p),endOffset:y})}s({ranges:u})});return l(),Je("selectionchange",l)}function Xf({doc:t,customElementCb:e}){const r=t.defaultView;return!r||!r.customElements?()=>{}:Bt(r.customElements,"define",function(i){return function(s,o,l){try{e({define:{name:s}})}catch{console.warn(`Custom element callback failed for ${s}`)}return i.apply(this,[s,o,l])}})}function Qf(t,e){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:o,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:u,styleDeclarationCb:a,canvasMutationCb:h,fontCb:d,selectionCb:f,customElementCb:m}=t;t.mutationCb=(...p)=>{e.mutation&&e.mutation(...p),r(...p)},t.mousemoveCb=(...p)=>{e.mousemove&&e.mousemove(...p),n(...p)},t.mouseInteractionCb=(...p)=>{e.mouseInteraction&&e.mouseInteraction(...p),i(...p)},t.scrollCb=(...p)=>{e.scroll&&e.scroll(...p),s(...p)},t.viewportResizeCb=(...p)=>{e.viewportResize&&e.viewportResize(...p),o(...p)},t.inputCb=(...p)=>{e.input&&e.input(...p),l(...p)},t.mediaInteractionCb=(...p)=>{e.mediaInteaction&&e.mediaInteaction(...p),c(...p)},t.styleSheetRuleCb=(...p)=>{e.styleSheetRule&&e.styleSheetRule(...p),u(...p)},t.styleDeclarationCb=(...p)=>{e.styleDeclaration&&e.styleDeclaration(...p),a(...p)},t.canvasMutationCb=(...p)=>{e.canvasMutation&&e.canvasMutation(...p),h(...p)},t.fontCb=(...p)=>{e.font&&e.font(...p),d(...p)},t.selectionCb=(...p)=>{e.selection&&e.selection(...p),f(...p)},t.customElementCb=(...p)=>{e.customElement&&e.customElement(...p),m(...p)}}function Zf(t,e={}){const r=t.doc.defaultView;if(!r)return()=>{};Qf(t,e);let n;t.recordDOM&&(n=Sl(t,t.doc));const i=Uf(t),s=Wf(t),o=xl(t),l=zf(t,{win:r}),c=qf(t),u=Kf(t);let a=()=>{},h=()=>{},d=()=>{},f=()=>{};t.recordDOM&&(a=Vf(t,{win:r}),h=Rl(t,t.doc),d=Gf(t,{win:r}),t.collectFonts&&(f=Yf(t)));const m=Jf(t),p=Xf(t),y=[];for(const v of t.plugins)y.push(v.observer(v.callback,r,v.options));return Ee(()=>{n==null||n(),i(),s(),o(),l(),c(),u(),a(),h(),d(),f(),m(),p(),y.forEach(v=>v())})}function pn(t){return typeof window[t]<"u"}function mn(t){return!!(typeof window[t]<"u"&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class El{constructor(e){$(this,"iframeIdToRemoteIdMap",new WeakMap),$(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,r,n,i){const s=n||this.getIdToRemoteIdMap(e),o=i||this.getRemoteIdToIdMap(e);let l=s.get(r);return l||(l=this.generateIdFn(),s.set(r,l),o.set(l,r)),l}getIds(e,r){const n=this.getIdToRemoteIdMap(e),i=this.getRemoteIdToIdMap(e);return r.map(s=>this.getId(e,s,n,i))}getRemoteId(e,r,n){const i=n||this.getRemoteIdToIdMap(e);if(typeof r!="number")return r;const s=i.get(r);return s||-1}getRemoteIds(e,r){const n=this.getRemoteIdToIdMap(e);return r.map(i=>this.getRemoteId(e,i,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let r=this.iframeIdToRemoteIdMap.get(e);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(e,r)),r}getRemoteIdToIdMap(e){let r=this.iframeRemoteIdToIdMap.get(e);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(e,r)),r}}class eh{constructor(e){$(this,"iframes",new WeakMap),$(this,"crossOriginIframeMap",new WeakMap),$(this,"crossOriginIframeMirror",new El(ao)),$(this,"crossOriginIframeStyleMirror"),$(this,"crossOriginIframeRootIdMap",new WeakMap),$(this,"mirror"),$(this,"mutationCb"),$(this,"wrappedEmit"),$(this,"loadListener"),$(this,"unloadListener"),$(this,"attachedWindows",new Map),$(this,"messageHandler",r=>this.handleMessage(r)),$(this,"stylesheetManager"),$(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new El(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.messageHandler)}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}addUnloadListener(e){this.unloadListener=e}attachIframe(e,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.watchIframeWindow(e),(n=this.loadListener)==null||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}destroy(){window.removeEventListener("message",this.messageHandler),this.attachedWindows.forEach(e=>e())}watchIframeWindow(e){const r=e.contentWindow;if(!r||this.attachedWindows.has(r))return;const n=[],i=()=>{this.attachedWindows.delete(r),n.forEach(s=>{try{s()}catch{}})};this.attachedWindows.set(r,i),this.recordCrossOriginIframes&&n.push(Je("message",this.messageHandler,r)),n.push(Je("pagehide",s=>{var o;if(s.persisted)return;const l=r.document;i(),(o=this.unloadListener)==null||o.call(this,l)},r))}handleMessage(e){const r=e;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!e.source)return;const i=this.crossOriginIframeMap.get(e.source);if(!i)return;const s=this.transformCrossOriginEvent(i,r.data.event);s&&this.wrappedEmit(s,r.data.isCheckout)}transformCrossOriginEvent(e,r){var n;switch(r.type){case Z.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(r.data.node,e);const i=r.data.node.id;return this.crossOriginIframeRootIdMap.set(e,i),this.patchRootIdOnNode(r.data.node,i),{timestamp:r.timestamp,type:Z.IncrementalSnapshot,data:{source:K.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Annotation:case Z.Plugin:return r;case Z.Custom:return this.replaceIds(r.data.payload,e,["id","parentId","previousId","nextId"]),r;case Z.IncrementalSnapshot:switch(r.data.source){case K.Mutation:return r.data.adds.forEach(i=>{this.replaceIds(i,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(i.node,e);const s=this.crossOriginIframeRootIdMap.get(e);s&&this.patchRootIdOnNode(i.node,s)}),r.data.removes.forEach(i=>{this.replaceIds(i,e,["parentId","id"])}),r.data.attributes.forEach(i=>{this.replaceIds(i,e,["id"])}),r.data.texts.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case K.Drag:case K.TouchMove:case K.MouseMove:return r.data.positions.forEach(i=>{this.replaceIds(i,e,["id"])}),r;case K.ViewportResize:return!1;case K.MediaInteraction:case K.MouseInteraction:case K.Scroll:case K.CanvasMutation:case K.Input:return this.replaceIds(r.data,e,["id"]),r;case K.StyleSheetRule:case K.StyleDeclaration:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleId"]),r;case K.Font:return r;case K.Selection:return r.data.ranges.forEach(i=>{this.replaceIds(i,e,["start","end"])}),r;case K.AdoptedStyleSheet:return this.replaceIds(r.data,e,["id"]),this.replaceStyleIds(r.data,e,["styleIds"]),(n=r.data.styles)==null||n.forEach(i=>{this.replaceStyleIds(i,e,["styleId"])}),r}}return!1}replace(e,r,n,i){for(const s of i)!Array.isArray(r[s])&&typeof r[s]!="number"||(Array.isArray(r[s])?r[s]=e.getIds(n,r[s]):r[s]=e.getId(n,r[s]));return r}replaceIds(e,r,n){return this.replace(this.crossOriginIframeMirror,e,r,n)}replaceStyleIds(e,r,n){return this.replace(this.crossOriginIframeStyleMirror,e,r,n)}replaceIdOnNode(e,r){this.replaceIds(e,r,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(e,r){e.type!==Rt.Document&&!e.rootId&&(e.rootId=r),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class th{constructor(e){$(this,"shadowDoms",new Map),$(this,"mutationCb"),$(this,"scrollCb"),$(this,"bypassOptions"),$(this,"mirror"),$(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,r){if(!pr(e)||this.shadowDoms.has(e))return;const n=[];this.shadowDoms.set(e,n);const i=Sl({...this.bypassOptions,doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);n.push(i),n.push(xl({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{this.shadowDoms.get(e)===n&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(ue.host(e))),n.push(Rl({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRootsIn(e){if(this.shadowDoms.size===0)return;const r=ue.shadowRoot(e);r&&(this.shadowDoms.has(r)&&this.removeShadowRoot(r),this.removeShadowRootsIn(r)),ue.childNodes(e).forEach(n=>this.removeShadowRootsIn(n))}removeShadowRoot(e){const r=this.shadowDoms.get(e);this.shadowDoms.delete(e),r==null||r.forEach(Ss)}observeAttachShadow(e){!e.contentWindow||!e.contentDocument||this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,r){const n=this;this.restoreHandlers.push(Bt(e.prototype,"attachShadow",function(i){return function(s){const o=i.call(this,s),l=ue.shadowRoot(this);return l&&vs(this)&&n.addShadowRoot(l,r),o}}))}reset(){this.restoreHandlers.forEach(Ss),this.restoreHandlers=[];const e=this.shadowDoms;this.shadowDoms=new Map,e.forEach(r=>r.forEach(Ss))}}function Ss(t){try{t()}catch{}}for(var er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kr=typeof Uint8Array>"u"?[]:new Uint8Array(256),gn=0;gn<er.length;gn++)kr[er.charCodeAt(gn)]=gn;var rh=function(t){var e=new Uint8Array(t),r,n=e.length,i="";for(r=0;r<n;r+=3)i+=er[e[r]>>2],i+=er[(e[r]&3)<<4|e[r+1]>>4],i+=er[(e[r+1]&15)<<2|e[r+2]>>6],i+=er[e[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},nh=function(t){var e=t.length*.75,r=t.length,n,i=0,s,o,l,c;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var u=new ArrayBuffer(e),a=new Uint8Array(u);for(n=0;n<r;n+=4)s=kr[t.charCodeAt(n)],o=kr[t.charCodeAt(n+1)],l=kr[t.charCodeAt(n+2)],c=kr[t.charCodeAt(n+3)],a[i++]=s<<2|o>>4,a[i++]=(o&15)<<4|l>>2,a[i++]=(l&3)<<6|c&63;return u};const kl=new Map;function ih(t,e){let r=kl.get(t);return r||(r=new Map,kl.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}const Ml=(t,e,r)=>{if(!t||!(Al(t,e)||typeof t=="object"))return;const n=t.constructor.name,i=ih(r,n);let s=i.indexOf(t);return s===-1&&(s=i.length,i.push(t)),s};function yn(t,e,r){if(t instanceof Array)return t.map(n=>yn(n,e,r));if(t===null)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const n=t.constructor.name,i=rh(t);return{rr_type:n,base64:i}}else{if(t instanceof DataView)return{rr_type:t.constructor.name,args:[yn(t.buffer,e,r),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const n=t.constructor.name,{src:i}=t;return{rr_type:n,src:i}}else if(t instanceof HTMLCanvasElement){const n="HTMLImageElement",i=t.toDataURL();return{rr_type:n,src:i}}else{if(t instanceof ImageData)return{rr_type:t.constructor.name,args:[yn(t.data,e,r),t.width,t.height]};if(Al(t,e)||typeof t=="object"){const n=t.constructor.name,i=Ml(t,e,r);return{rr_type:n,index:i}}}}return t}const Tl=(t,e,r)=>t.map(n=>yn(n,e,r)),Al=(t,e)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(i=>typeof e[i]=="function").find(i=>t instanceof e[i]);function sh(t,e,r,n){const i=[],s=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const o of s)try{if(typeof e.CanvasRenderingContext2D.prototype[o]!="function")continue;const l=Bt(e.CanvasRenderingContext2D.prototype,o,function(c){return function(...u){return rt(this.canvas,r,n,!0)||setTimeout(()=>{const a=Tl(u,e,this);t(this.canvas,{type:Ct["2D"],property:o,args:a})},0),c.apply(this,u)}});i.push(l)}catch{const l=fn(e.CanvasRenderingContext2D.prototype,o,{set(c){t(this.canvas,{type:Ct["2D"],property:o,args:[c],setter:!0})}});i.push(l)}return()=>{i.forEach(o=>o())}}function oh(t){return t==="experimental-webgl"?"webgl":t}function Il(t,e,r,n){const i=[];try{const s=Bt(t.HTMLCanvasElement.prototype,"getContext",function(o){return function(l,...c){if(!rt(this,e,r,!0)){const u=oh(l);if("__context"in this||(this.__context=u),n&&["webgl","webgl2"].includes(u))if(c[0]&&typeof c[0]=="object"){const a=c[0];a.preserveDrawingBuffer||(a.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return o.apply(this,[l,...c])}});i.push(s)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(s=>s())}}function Ol(t,e,r,n,i,s){const o=[],l=Object.getOwnPropertyNames(t);for(const c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof t[c]!="function")continue;const u=Bt(t,c,function(a){return function(...h){const d=a.apply(this,h);if(Ml(d,s,this),"tagName"in this.canvas&&!rt(this.canvas,n,i,!0)){const f=Tl(h,s,this),m={type:e,property:c,args:f};r(this.canvas,m)}return d}});o.push(u)}catch{const u=fn(t,c,{set(a){r(this.canvas,{type:e,property:c,args:[a],setter:!0})}});o.push(u)}return o}function ah(t,e,r,n){const i=[];return typeof e.WebGLRenderingContext<"u"&&i.push(...Ol(e.WebGLRenderingContext.prototype,Ct.WebGL,t,r,n,e)),typeof e.WebGL2RenderingContext<"u"&&i.push(...Ol(e.WebGL2RenderingContext.prototype,Ct.WebGL2,t,r,n,e)),()=>{i.forEach(s=>s())}}const Nl=`(function() {
|
|
61
|
+
"use strict";
|
|
62
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
63
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
64
|
+
for (var i = 0; i < chars.length; i++) {
|
|
65
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
66
|
+
}
|
|
67
|
+
var encode = function(arraybuffer) {
|
|
68
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
69
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
70
|
+
base64 += chars[bytes[i2] >> 2];
|
|
71
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
72
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
73
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
74
|
+
}
|
|
75
|
+
if (len % 3 === 2) {
|
|
76
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
77
|
+
} else if (len % 3 === 1) {
|
|
78
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
79
|
+
}
|
|
80
|
+
return base64;
|
|
81
|
+
};
|
|
82
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
83
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
84
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
85
|
+
const id = \`\${width}-\${height}\`;
|
|
86
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
87
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
88
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
89
|
+
offscreen.getContext("2d");
|
|
90
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
91
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
92
|
+
const base64 = encode(arrayBuffer);
|
|
93
|
+
transparentBlobMap.set(id, base64);
|
|
94
|
+
return base64;
|
|
95
|
+
} else {
|
|
96
|
+
return "";
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const worker = self;
|
|
100
|
+
worker.onmessage = async function(e) {
|
|
101
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
102
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
103
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
104
|
+
width,
|
|
105
|
+
height,
|
|
106
|
+
dataURLOptions
|
|
107
|
+
);
|
|
108
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
109
|
+
const ctx = offscreen.getContext("2d");
|
|
110
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
111
|
+
bitmap.close();
|
|
112
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
113
|
+
const type = blob.type;
|
|
114
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
115
|
+
const base64 = encode(arrayBuffer);
|
|
116
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
117
|
+
lastBlobMap.set(id, base64);
|
|
118
|
+
return worker.postMessage({ id });
|
|
119
|
+
}
|
|
120
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
121
|
+
worker.postMessage({
|
|
122
|
+
id,
|
|
123
|
+
type,
|
|
124
|
+
base64,
|
|
125
|
+
width,
|
|
126
|
+
height
|
|
127
|
+
});
|
|
128
|
+
lastBlobMap.set(id, base64);
|
|
129
|
+
} else {
|
|
130
|
+
return worker.postMessage({ id: e.data.id });
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
})();
|
|
134
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
135
|
+
`,_l=typeof self<"u"&&self.Blob&&new Blob([Nl],{type:"text/javascript;charset=utf-8"});function lh(t){let e;try{if(e=_l&&(self.URL||self.webkitURL).createObjectURL(_l),!e)throw"";const r=new Worker(e,{name:t==null?void 0:t.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Nl),{name:t==null?void 0:t.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}class ch{constructor(e){$(this,"pendingCanvasMutations",new Map),$(this,"rafStamps",{latestId:0,invokeId:null}),$(this,"mirror"),$(this,"mutationCb"),$(this,"resetObservers"),$(this,"frozen",!1),$(this,"locked",!1),$(this,"processMutation",(c,u)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(u)});const{sampling:r="all",win:n,blockClass:i,blockSelector:s,recordCanvas:o,dataURLOptions:l}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&r==="all"&&this.initCanvasMutationObserver(n,i,s),o&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,i,s,{dataURLOptions:l})}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,r,n,i,s){const o=Il(r,n,i,!0),l=new Map,c=new lh;c.onmessage=m=>{const{id:p}=m.data;if(l.set(p,!1),!("base64"in m.data))return;const{base64:y,type:v,width:w,height:b}=m.data;this.mutationCb({id:p,type:Ct["2D"],commands:[{property:"clearRect",args:[0,0,w,b]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:v}]},0,0]}]})};const u=1e3/e;let a=0,h;const d=()=>{const m=[];return r.document.querySelectorAll("canvas").forEach(p=>{rt(p,n,i,!0)||m.push(p)}),m},f=m=>{if(a&&m-a<u){h=requestAnimationFrame(f);return}a=m,d().forEach(async p=>{var y;const v=this.mirror.getId(p);if(l.get(v)||p.width===0||p.height===0)return;if(l.set(v,!0),["webgl","webgl2"].includes(p.__context)){const b=p.getContext(p.__context);((y=b==null?void 0:b.getContextAttributes())==null?void 0:y.preserveDrawingBuffer)===!1&&b.clear(b.COLOR_BUFFER_BIT)}const w=await createImageBitmap(p);c.postMessage({id:v,bitmap:w,width:p.width,height:p.height,dataURLOptions:s.dataURLOptions},[w])}),h=requestAnimationFrame(f)};h=requestAnimationFrame(f),this.resetObservers=()=>{o(),cancelAnimationFrame(h)}}initCanvasMutationObserver(e,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=Il(e,r,n,!1),s=sh(this.processMutation.bind(this),e,r,n),o=ah(this.processMutation.bind(this),e,r,n);this.resetObservers=()=>{i(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=r=>{this.rafStamps.latestId=r,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||r===-1)return;const i=n.map(o=>{const{type:l,...c}=o;return c}),{type:s}=n[0];this.mutationCb({id:r,type:s,commands:i}),this.pendingCanvasMutations.delete(e)}}class uh{constructor(e){$(this,"trackedLinkElements",new WeakSet),$(this,"mutationCb"),$(this,"adoptedStyleSheetCb"),$(this,"styleMirror",new gl),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,r){if(e.length===0)return;const n={id:r,styleIds:[]},i=[];for(const s of e){let o;this.styleMirror.has(s)?o=this.styleMirror.getId(s):(o=this.styleMirror.add(s),i.push({styleId:o,rules:Array.from(s.rules||CSSRule,(l,c)=>({rule:no(l,s.href),index:c}))})),n.styleIds.push(o)}i.length>0&&(n.styles=i),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class dh{constructor(){$(this,"nodeMap",new WeakMap),$(this,"active",!1)}inOtherBuffer(e,r){const n=this.nodeMap.get(e);return n&&Array.from(n).some(i=>i!==r)}add(e,r){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(r))}destroy(){}}let We,bn,Nt,Mr=!1;try{if(Array.from([1],t=>t*2)[0]!==2){const t=document.createElement("iframe");document.body.appendChild(t),Array.from=((Js=t.contentWindow)==null?void 0:Js.Array.from)||Array.from,document.body.removeChild(t)}}catch(t){console.debug("Unable to override Array.from",t)}const dt=io();function gt(t={}){const{emit:e,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:i="rr-block",blockSelector:s=null,ignoreClass:o="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:u=null,inlineStylesheet:a=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:y,packFn:v,sampling:w={},dataURLOptions:b={},mousemoveWait:C,recordDOM:S=!0,recordCanvas:x=!1,recordCrossOriginIframes:k=!1,recordAfter:I=t.recordAfter==="DOMContentLoaded"?t.recordAfter:"load",userTriggeredOnInput:B=!1,collectFonts:_=!1,inlineImages:H=!1,plugins:z,keepIframeSrcFn:A=()=>!1,ignoreCSSAttributes:be=new Set([]),errorHandler:he}=t;Bf(he);const ne=k?window.parent===window:!0;let F=!1;if(!ne)try{window.parent.document&&(F=!1)}catch{F=!0}if(ne&&!e)throw new Error("emit function is required");if(!ne&&!F)return()=>{};C!==void 0&&w.mousemove===void 0&&(w.mousemove=C),dt.reset();const de=h===!0?{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}:d!==void 0?d:{password:!0},j=po(f);dl();let X,T=0;const U=ee=>{for(const Ie of z||[])Ie.eventProcessor&&(ee=Ie.eventProcessor(ee));return v&&!F&&(ee=v(ee)),ee};We=(ee,Ie)=>{const re=ee;if(re.timestamp=wr(),re.type!==Z.FullSnapshot&&!(re.type===Z.IncrementalSnapshot&&re.data.source===K.Mutation)){Nt.unfreeze();for(const ze of Zt)if(ze.isFrozen())ze.unfreeze();else break}if(ne)e==null||e(U(re),Ie);else if(F){const ze={type:"rrweb",event:U(re),origin:window.location.origin,isCheckout:Ie};window.parent.postMessage(ze,"*")}if(re.type===Z.FullSnapshot)X=re,T=0;else if(re.type===Z.IncrementalSnapshot){if(re.data.source===K.Mutation&&re.data.isAttachIframe)return;T++;const ze=n&&T>=n,ae=r&&re.timestamp-X.timestamp>r;(ze||ae)&&bn(!0)}};const D=ee=>{We({type:Z.IncrementalSnapshot,data:{source:K.Mutation,...ee}})},te=ee=>We({type:Z.IncrementalSnapshot,data:{source:K.Scroll,...ee}}),ie=ee=>We({type:Z.IncrementalSnapshot,data:{source:K.CanvasMutation,...ee}}),Ce=ee=>We({type:Z.IncrementalSnapshot,data:{source:K.AdoptedStyleSheet,...ee}}),se=new uh({mutationCb:D,adoptedStyleSheetCb:Ce}),le=new eh({mirror:dt,mutationCb:D,stylesheetManager:se,recordCrossOriginIframes:k,wrappedEmit:We});for(const ee of z||[])ee.getMirror&&ee.getMirror({nodeMirror:dt,crossOriginIframeMirror:le.crossOriginIframeMirror,crossOriginIframeStyleMirror:le.crossOriginIframeStyleMirror});const pe=new dh;Nt=new ch({recordCanvas:x,mutationCb:ie,win:window,blockClass:i,blockSelector:s,mirror:dt,sampling:w.canvas,dataURLOptions:b});const Te=new th({mutationCb:D,scrollCb:te,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:u,inlineStylesheet:a,maskInputOptions:de,dataURLOptions:b,maskTextFn:p,maskInputFn:m,recordCanvas:x,inlineImages:H,sampling:w,slimDOMOptions:j,iframeManager:le,stylesheetManager:se,canvasManager:Nt,keepIframeSrcFn:A,processedNodeManager:pe},mirror:dt});bn=(ee=!1)=>{if(!S)return;We({type:Z.Meta,data:{href:window.location.href,width:ll(),height:al()}},ee),se.reset(),Te.init(),Nt.lock(),Zt.forEach(re=>re.lock());const Ie=Du(document,{mirror:dt,blockClass:i,blockSelector:s,maskTextClass:c,maskTextSelector:u,inlineStylesheet:a,maskAllInputs:de,maskTextFn:p,maskInputFn:m,slimDOM:j,dataURLOptions:b,recordCanvas:x,inlineImages:H,onSerialize:re=>{xr(re,dt)&&le.addIframe(re),hl(re,dt)&&se.trackLinkElement(re),Ft(re)&&Te.addShadowRoot(ue.shadowRoot(re),document)},onIframeLoad:(re,ze)=>{le.attachIframe(re,ze),Te.observeAttachShadow(re)},onStylesheetLoad:(re,ze)=>{se.attachLinkElement(re,ze)},keepIframeSrcFn:A});if(!Ie)return console.warn("Failed to snapshot the document");We({type:Z.FullSnapshot,data:{node:Ie,initialOffset:ol(window)}},ee),Nt.unlock(),Zt.forEach(re=>re.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&se.adoptStyleSheets(document.adoptedStyleSheets,dt.getId(document))};try{const ee=[],Ie=ae=>{var je;return Ee(Zf)({mutationCb:D,mousemoveCb:(ve,vt)=>We({type:Z.IncrementalSnapshot,data:{source:vt,positions:ve}}),mouseInteractionCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.MouseInteraction,...ve}}),scrollCb:te,viewportResizeCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.ViewportResize,...ve}}),inputCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.Input,...ve}}),mediaInteractionCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.MediaInteraction,...ve}}),styleSheetRuleCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.StyleSheetRule,...ve}}),styleDeclarationCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.StyleDeclaration,...ve}}),canvasMutationCb:ie,fontCb:ve=>We({type:Z.IncrementalSnapshot,data:{source:K.Font,...ve}}),selectionCb:ve=>{We({type:Z.IncrementalSnapshot,data:{source:K.Selection,...ve}})},customElementCb:ve=>{We({type:Z.IncrementalSnapshot,data:{source:K.CustomElement,...ve}})},blockClass:i,ignoreClass:o,ignoreSelector:l,maskTextClass:c,maskTextSelector:u,maskInputOptions:de,inlineStylesheet:a,sampling:w,recordDOM:S,recordCanvas:x,inlineImages:H,userTriggeredOnInput:B,collectFonts:_,doc:ae,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:A,blockSelector:s,slimDOMOptions:j,dataURLOptions:b,mirror:dt,iframeManager:le,stylesheetManager:se,shadowDomManager:Te,processedNodeManager:pe,canvasManager:Nt,ignoreCSSAttributes:be,plugins:((je=z==null?void 0:z.filter(ve=>ve.observer))==null?void 0:je.map(ve=>({observer:ve.observer,options:ve.options,callback:vt=>We({type:Z.Plugin,data:{plugin:ve.name,payload:vt}})})))||[]},y)},re=new Map;le.addLoadListener(ae=>{try{const je=ae.contentDocument;if(re.has(je))return;re.set(je,Ie(je))}catch(je){console.warn(je)}}),le.addUnloadListener(ae=>{const je=re.get(ae);je&&(re.delete(ae),je(),Te.removeShadowRootsIn(ae),dt.removeNodeFromMap(ae))});const ze=()=>{bn(),ee.push(Ie(document)),Mr=!0};return["interactive","complete"].includes(document.readyState)?ze():(ee.push(Je("DOMContentLoaded",()=>{We({type:Z.DomContentLoaded,data:{}}),I==="DOMContentLoaded"&&ze()})),ee.push(Je("load",()=>{We({type:Z.Load,data:{}}),I==="load"&&ze()},window))),()=>{[...ee,...re.values()].forEach(ae=>{try{ae()}catch(je){String(je).toLowerCase().includes("cross-origin")||console.warn(je)}}),re.clear(),le.destroy(),pe.destroy(),Te.reset(),Nt.reset(),Mr=!1,Ff()}}catch(ee){console.warn(ee)}}gt.addCustomEvent=(t,e)=>{if(!Mr)throw new Error("please add custom event after start recording");We({type:Z.Custom,data:{tag:t,payload:e}})},gt.addAnnotation=t=>{if(!Mr)throw new Error("please add annotation after recording started");We({type:Z.Annotation,data:t})},gt.freezePage=()=>{Nt.freeze(),Zt.forEach(t=>t.freeze())},gt.takeFullSnapshot=t=>{if(!Mr)throw new Error("please take full snapshot after start recording");bn(t)},gt.mirror=dt;function fh(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(i){i(r)}),(n=t.get("*"))&&n.slice().map(function(i){i(e,r)})}}}function hh(t=window,e=document){if("scrollBehavior"in e.documentElement.style&&t.__forceSmoothScrollPolyfill__!==!0)return;const r=t.HTMLElement||t.Element,n=468,i={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:r.prototype.scroll||c,scrollIntoView:r.prototype.scrollIntoView},s=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now;function o(v){const w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(v)}const l=o(t.navigator.userAgent)?1:0;function c(v,w){this.scrollLeft=v,this.scrollTop=w}function u(v){return .5*(1-Math.cos(Math.PI*v))}function a(v){if(v===null||typeof v!="object"||v.behavior===void 0||v.behavior==="auto"||v.behavior==="instant")return!0;if(typeof v=="object"&&v.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+v.behavior+" is not a valid value for enumeration ScrollBehavior.")}function h(v,w){if(w==="Y")return v.clientHeight+l<v.scrollHeight;if(w==="X")return v.clientWidth+l<v.scrollWidth}function d(v,w){const b=t.getComputedStyle(v,null)["overflow"+w];return b==="auto"||b==="scroll"}function f(v){const w=h(v,"Y")&&d(v,"Y"),b=h(v,"X")&&d(v,"X");return w||b}function m(v){for(;v!==e.body&&f(v)===!1;)v=v.parentNode||v.host;return v}function p(v){const w=s();let b,C,S,x=(w-v.startTime)/n;x=x>1?1:x,b=u(x),C=v.startX+(v.x-v.startX)*b,S=v.startY+(v.y-v.startY)*b,v.method.call(v.scrollable,C,S),(C!==v.x||S!==v.y)&&t.requestAnimationFrame(p.bind(t,v))}function y(v,w,b){let C,S,x,k;const I=s();v===e.body?(C=t,S=t.scrollX||t.pageXOffset,x=t.scrollY||t.pageYOffset,k=i.scroll):(C=v,S=v.scrollLeft,x=v.scrollTop,k=c),p({scrollable:C,method:k,startTime:I,startX:S,startY:x,x:w,y:b})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(a(arguments[0])===!0){i.scroll.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:t.scrollY||t.pageYOffset);return}y.call(t,e.body,arguments[0].left!==void 0?~~arguments[0].left:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:t.scrollY||t.pageYOffset)}},t.scrollBy=function(){if(arguments[0]!==void 0){if(a(arguments[0])){i.scrollBy.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}y.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(a(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}const v=arguments[0].left,w=arguments[0].top;y.call(this,this,typeof v>"u"?this.scrollLeft:~~v,typeof w>"u"?this.scrollTop:~~w)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(a(arguments[0])===!0){i.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(a(arguments[0])===!0){i.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}const v=m(this),w=v.getBoundingClientRect(),b=this.getBoundingClientRect();v!==e.body?(y.call(this,v,v.scrollLeft+b.left-w.left,v.scrollTop+b.top-w.top),t.getComputedStyle(v).position!=="fixed"&&t.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):t.scrollBy({left:b.left,top:b.top,behavior:"smooth"})}}class ph{constructor(e=[],r){$(this,"timeOffset",0),$(this,"speed"),$(this,"actions"),$(this,"raf",null),$(this,"lastTimestamp"),this.actions=e,this.speed=r.speed}addAction(e){const r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=e.delay)this.actions.push(e);else{const n=this.findActionIndex(e);this.actions.splice(n,0,e)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){const e=performance.now();for(this.timeOffset+=(e-this.lastTimestamp)*this.speed,this.lastTimestamp=e;this.actions.length;){const r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(e){this.speed=e}isActive(){return this.raf!==null}findActionIndex(e){let r=0,n=this.actions.length-1;for(;r<=n;){const i=Math.floor((r+n)/2);if(this.actions[i].delay<e.delay)r=i+1;else if(this.actions[i].delay>e.delay)n=i-1;else return i+1}return r}}function Dl(t,e){if(t.type===Z.IncrementalSnapshot&&t.data.source===K.MouseMove&&t.data.positions&&t.data.positions.length){const r=t.data.positions[0].timeOffset,n=t.timestamp+r;return t.delay=n-e,n-e}return t.delay=t.timestamp-e,t.delay}/*! *****************************************************************************
|
|
136
|
+
Copyright (c) Microsoft Corporation.
|
|
137
|
+
|
|
138
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
139
|
+
purpose with or without fee is hereby granted.
|
|
140
|
+
|
|
141
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
142
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
143
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
144
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
145
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
146
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
147
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
148
|
+
***************************************************************************** */function Ll(t,e){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var n,i,s=r.call(t),o=[];try{for(;(e===void 0||e-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(l){i={error:l}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o}var tr;(function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"})(tr||(tr={}));var Pl={type:"xstate.init"};function xs(t){return t===void 0?[]:[].concat(t)}function rr(t){return{type:"xstate.assign",assignment:t}}function $l(t,e){return typeof(t=typeof t=="string"&&e&&e[t]?e[t]:t)=="string"?{type:t}:typeof t=="function"?{type:t.name,exec:t}:t}function vn(t){return function(e){return t===e}}function jl(t){return typeof t=="string"?{type:t}:t}function Bl(t,e){return{value:t,context:e,actions:[],changed:!1,matches:vn(t)}}function Fl(t,e,r){var n=e,i=!1;return[t.filter(function(s){if(s.type==="xstate.assign"){i=!0;var o=Object.assign({},n);return typeof s.assignment=="function"?o=s.assignment(n,r):Object.keys(s.assignment).forEach(function(l){o[l]=typeof s.assignment[l]=="function"?s.assignment[l](n,r):s.assignment[l]}),n=o,!1}return!0}),n,i]}function Ul(t,e){e===void 0&&(e={});var r=Ll(Fl(xs(t.states[t.initial].entry).map(function(o){return $l(o,e.actions)}),t.context,Pl),2),n=r[0],i=r[1],s={config:t,_options:e,initialState:{value:t.initial,actions:n,context:i,matches:vn(t.initial)},transition:function(o,l){var c,u,a=typeof o=="string"?{value:o,context:t.context}:o,h=a.value,d=a.context,f=jl(l),m=t.states[h];if(m.on){var p=xs(m.on[f.type]);try{for(var y=function(F){var de=typeof Symbol=="function"&&Symbol.iterator,j=de&&F[de],X=0;if(j)return j.call(F);if(F&&typeof F.length=="number")return{next:function(){return F&&X>=F.length&&(F=void 0),{value:F&&F[X++],done:!F}}};throw new TypeError(de?"Object is not iterable.":"Symbol.iterator is not defined.")}(p),v=y.next();!v.done;v=y.next()){var w=v.value;if(w===void 0)return Bl(h,d);var b=typeof w=="string"?{target:w}:w,C=b.target,S=b.actions,x=S===void 0?[]:S,k=b.cond,I=k===void 0?function(){return!0}:k,B=C===void 0,_=C??h,H=t.states[_];if(I(d,f)){var z=Ll(Fl((B?xs(x):[].concat(m.exit,x,H.entry).filter(function(F){return F})).map(function(F){return $l(F,s._options.actions)}),d,f),3),A=z[0],be=z[1],he=z[2],ne=C??h;return{value:ne,context:be,actions:A,changed:C!==h||A.length>0||he,matches:vn(ne)}}}}catch(F){c={error:F}}finally{try{v&&!v.done&&(u=y.return)&&u.call(y)}finally{if(c)throw c.error}}}return Bl(h,d)}};return s}var Wl=function(t,e){return t.actions.forEach(function(r){var n=r.exec;return n&&n(t.context,e)})};function zl(t){var e=t.initialState,r=tr.NotStarted,n=new Set,i={_machine:t,send:function(s){r===tr.Running&&(e=t.transition(e,s),Wl(e,jl(s)),n.forEach(function(o){return o(e)}))},subscribe:function(s){return n.add(s),s(e),{unsubscribe:function(){return n.delete(s)}}},start:function(s){if(s){var o=typeof s=="object"?s:{context:t.config.context,value:s};e={value:o.value,actions:[],context:o.context,matches:vn(o.value)}}return r=tr.Running,Wl(e,Pl),i},stop:function(){return r=tr.Stopped,n.clear(),i},get state(){return e},get status(){return r}};return i}function mh(t,e){for(let r=t.length-1;r>=0;r--){const n=t[r];if(n.type===Z.Meta&&n.timestamp<=e)return t.slice(r)}return t}function gh(t,{getCastFn:e,applyEventsSynchronously:r,emitter:n}){const i=Ul({id:"player",context:t,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:rr({lastPlayedEvent:(s,o)=>o.type==="CAST_EVENT"?o.payload.event:s.lastPlayedEvent}),recordTimeOffset:rr((s,o)=>{let l=s.timeOffset;return"payload"in o&&"timeOffset"in o.payload&&(l=o.payload.timeOffset),{...s,timeOffset:l,baselineTime:s.events[0].timestamp+l}}),play(s){var o;const{timer:l,events:c,baselineTime:u,lastPlayedEvent:a}=s;l.clear();for(const m of c)Dl(m,u);const h=mh(c,u);let d=a==null?void 0:a.timestamp;(a==null?void 0:a.type)===Z.IncrementalSnapshot&&a.data.source===K.MouseMove&&(d=a.timestamp+((o=a.data.positions[0])==null?void 0:o.timeOffset)),u<(d||0)&&n.emit(Me.PlayBack);const f=new Array;for(const m of h)if(!(d&&d<u&&(m.timestamp<=d||m===a)))if(m.timestamp<u)f.push(m);else{const p=e(m,!1);l.addAction({doAction:()=>{p()},delay:m.delay})}r(f),n.emit(Me.Flush),l.start()},pause(s){s.timer.clear()},resetLastPlayedEvent:rr(s=>({...s,lastPlayedEvent:null})),startLive:rr({baselineTime:(s,o)=>(s.timer.start(),o.type==="TO_LIVE"&&o.payload.baselineTime?o.payload.baselineTime:Date.now())}),addEvent:rr((s,o)=>{const{baselineTime:l,timer:c,events:u}=s;if(o.type==="ADD_EVENT"){const{event:a}=o.payload;Dl(a,l);let h=u.length-1;if(!u[h]||u[h].timestamp<=a.timestamp)u.push(a);else{let m=-1,p=0;for(;p<=h;){const y=Math.floor((p+h)/2);u[y].timestamp<=a.timestamp?p=y+1:h=y-1}m===-1&&(m=p),u.splice(m,0,a)}const d=a.timestamp<l,f=e(a,d);d?f():c.isActive()&&c.addAction({doAction:()=>{f()},delay:a.delay})}return{...s,events:u}})}});return zl(i)}function yh(t){const e=Ul({id:"speed",context:t,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,n)=>{"payload"in n&&r.timer.setSpeed(n.payload.speed)},recordSpeed:rr({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return zl(e)}const bh=t=>[`.${t} { background: currentColor }`,"noscript { display: none !important; }"],Hl=new Map;function ql(t,e){let r=Hl.get(t);return r||(r=new Map,Hl.set(t,r)),r.has(e)||r.set(e,[]),r.get(e)}function _t(t,e,r){return async n=>{if(n&&typeof n=="object"&&"rr_type"in n)if(r&&(r.isUnchanged=!1),n.rr_type==="ImageBitmap"&&"args"in n){const i=await _t(t,e,r)(n.args);return await createImageBitmap.apply(null,i)}else if("index"in n){if(r||e===null)return n;const{rr_type:i,index:s}=n;return ql(e,i)[s]}else if("args"in n){const{rr_type:i,args:s}=n,o=window[i];return new o(...await Promise.all(s.map(_t(t,e,r))))}else{if("base64"in n)return nh(n.base64);if("src"in n){const i=t.get(n.src);if(i)return i;{const s=new Image;return s.src=n.src,t.set(n.src,s),s}}else if("data"in n&&n.rr_type==="Blob"){const i=await Promise.all(n.data.map(_t(t,e,r)));return new Blob(i,{type:n.type})}}else if(Array.isArray(n))return await Promise.all(n.map(_t(t,e,r)));return n}}function vh(t,e){try{return e===Ct.WebGL?t.getContext("webgl")||t.getContext("experimental-webgl"):t.getContext("webgl2")}catch{return null}}const wh=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function Sh(t,e){if(!(e!=null&&e.constructor))return;const{name:r}=e.constructor;if(!wh.includes(r))return;const n=ql(t,r);n.includes(e)||n.push(e)}async function xh({mutation:t,target:e,type:r,imageMap:n,errorHandler:i}){try{const s=vh(e,r);if(!s)return;if(t.setter){s[t.property]=t.args[0];return}const o=s[t.property],l=await Promise.all(t.args.map(_t(n,s))),c=o.apply(s,l);Sh(s,c);const u=!1}catch(s){i(t,s)}}async function Ch({event:t,mutations:e,target:r,imageMap:n,errorHandler:i}){const s=r.getContext("2d");if(!s){i(e[0],new Error("Canvas context is null"));return}const o=e.map(async c=>Promise.all(c.args.map(_t(n,s))));(await Promise.all(o)).forEach((c,u)=>{const a=e[u];try{if(a.setter){s[a.property]=a.args[0];return}const h=s[a.property];a.property==="drawImage"&&typeof a.args[0]=="string"?(n.get(t),h.apply(s,a.args)):h.apply(s,c)}catch(h){i(a,h)}})}async function Vl({event:t,mutation:e,target:r,imageMap:n,canvasEventMap:i,errorHandler:s}){try{const o=i.get(t)||e,l="commands"in o?o.commands:[o];if([Ct.WebGL,Ct.WebGL2].includes(e.type)){for(let c=0;c<l.length;c++){const u=l[c];await xh({mutation:u,type:e.type,target:r,imageMap:n,errorHandler:s})}return}await Ch({event:t,mutations:l,target:r,imageMap:n,errorHandler:s})}catch(o){s(e,o)}}class Rh{constructor(e){$(this,"mediaMap",new Map),$(this,"warn"),$(this,"service"),$(this,"speedService"),$(this,"emitter"),$(this,"getCurrentTime"),$(this,"metadataCallbackMap",new Map),this.warn=e.warn,this.service=e.service,this.speedService=e.speedService,this.emitter=e.emitter,this.getCurrentTime=e.getCurrentTime,this.emitter.on(Me.Start,this.start.bind(this)),this.emitter.on(Me.SkipStart,this.start.bind(this)),this.emitter.on(Me.Pause,this.pause.bind(this)),this.emitter.on(Me.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(e={pause:!1}){this.mediaMap.forEach((r,n)=>{this.syncTargetWithState(n),e.pause&&n.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:e,target:r,mediaState:n}){if(n.isPlaying){const s=(e-n.lastInteractionTimeOffset)/1e3*n.playbackRate,o="duration"in r&&r.duration;if(Number.isNaN(o)){this.waitForMetadata(r);return}let l=n.currentTimeAtLastInteraction+s;r.loop&&o!==!1&&(l=l%o),r.currentTime=l}else r.pause(),r.currentTime=n.currentTimeAtLastInteraction}waitForMetadata(e){if(this.metadataCallbackMap.has(e)||!("addEventListener"in e))return;const r=()=>{this.metadataCallbackMap.delete(e);const n=this.mediaMap.get(e);n&&this.seekTo({time:this.getCurrentTime(),target:e,mediaState:n})};this.metadataCallbackMap.set(e,r),e.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:e,timeOffset:r,mutation:n}){const i=this.mediaMap.get(e),{type:s,playbackRate:o,currentTime:l,muted:c,volume:u,loop:a}=n;return{isPlaying:s===It.Play||s!==It.Pause&&((i==null?void 0:i.isPlaying)||e.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:l??(i==null?void 0:i.currentTimeAtLastInteraction)??0,lastInteractionTimeOffset:r,playbackRate:o??(i==null?void 0:i.playbackRate)??1,volume:u??(i==null?void 0:i.volume)??1,muted:c??(i==null?void 0:i.muted)??e.getAttribute("muted")===null,loop:a??(i==null?void 0:i.loop)??e.getAttribute("loop")===null}}syncTargetWithState(e){const r=this.mediaMap.get(e);if(!r)return;const{muted:n,loop:i,volume:s,isPlaying:o}=r,l=this.service.state.matches("paused"),c=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:e,mediaState:r}),e.volume!==s&&(e.volume=s),e.muted=n,e.loop=i,e.playbackRate!==c&&(e.playbackRate=c),o&&!l?e.play():e.pause()}catch(u){this.warn(`Failed to replay media interactions: ${u.message||u}`)}}addMediaElements(e,r,n){if(!["AUDIO","VIDEO"].includes(e.nodeName))return;const i=e,s=n.getMeta(i);if(!s||!("attributes"in s))return;const o=this.service.state.matches("paused"),l=s.attributes;let c=!1;l.rr_mediaState?c=l.rr_mediaState==="played":c=i.getAttribute("autoplay")!==null,c&&o&&i.pause();let u=1;typeof l.rr_mediaPlaybackRate=="number"&&(u=l.rr_mediaPlaybackRate);let a=!1;typeof l.rr_mediaMuted=="boolean"?a=l.rr_mediaMuted:a=i.getAttribute("muted")!==null;let h=!1;typeof l.rr_mediaLoop=="boolean"?h=l.rr_mediaLoop:h=i.getAttribute("loop")!==null;let d=1;typeof l.rr_mediaVolume=="number"&&(d=l.rr_mediaVolume);let f=0;typeof l.rr_mediaCurrentTime=="number"&&(f=l.rr_mediaCurrentTime),this.mediaMap.set(i,{isPlaying:c,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:u,volume:d,muted:a,loop:h}),this.syncTargetWithState(i)}mediaMutation({target:e,timeOffset:r,mutation:n}){this.mediaMap.set(e,this.getMediaStateFromMutation({target:e,timeOffset:r,mutation:n})),this.syncTargetWithState(e)}isSupportedMediaElement(e){return["AUDIO","VIDEO"].includes(e.nodeName)}reset(){this.mediaMap.clear()}}function wn(t,e){if(t.nodeName!=="DIALOG"||t instanceof mt)return;const r=t,n=r.open,i=n&&r.matches("dialog:modal"),s=r.getAttribute("rr_open_mode"),o=typeof(e==null?void 0:e.attributes.open)=="string"||typeof r.getAttribute("open")=="string",l=s==="modal";if(!(n&&!(i&&s==="non-modal"||!i&&l))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}n&&r.close(),o&&(l?r.showModal():r.show())}}function Eh(t,e){if(t.nodeName!=="DIALOG"||t instanceof mt)return;const r=t;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}e.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}const kh=5*1e3,Mh=fh,Gl="[replayer]",Cs={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function Kl(t){return t.type==Z.IncrementalSnapshot&&(t.data.source==K.TouchMove||t.data.source==K.MouseInteraction&&t.data.type==Ae.TouchStart)}class Th{constructor(e,r){if($(this,"wrapper"),$(this,"iframe"),$(this,"UNSAFE_replayCanvas",!1),$(this,"service"),$(this,"speedService"),$(this,"config"),$(this,"usingVirtualDom",!1),$(this,"virtualDom",new Xt),$(this,"mouse"),$(this,"mouseTail",null),$(this,"tailPositions",[]),$(this,"emitter",Mh()),$(this,"nextUserInteractionEvent"),$(this,"legacy_missingNodeRetryMap",{}),$(this,"cache",Zo()),$(this,"imageMap",new Map),$(this,"canvasEventMap",new Map),$(this,"mirror",io()),$(this,"styleMirror",new gl),$(this,"mediaManager"),$(this,"firstFullSnapshot",null),$(this,"newDocumentQueue",[]),$(this,"mousePos",null),$(this,"touchActive",null),$(this,"lastMouseDownEvent",null),$(this,"lastHoveredRootNode"),$(this,"lastSelectionData",null),$(this,"constructedStyleMutations",[]),$(this,"adoptedStyleSheets",[]),$(this,"handleResize",l=>{this.iframe.style.display="inherit";for(const c of[this.mouseTail,this.iframe])c&&(c.setAttribute("width",String(l.width)),c.setAttribute("height",String(l.height)))}),$(this,"applyEventsSynchronously",l=>{for(const c of l){switch(c.type){case Z.DomContentLoaded:case Z.Load:continue;case Z.FullSnapshot:case Z.Meta:case Z.Plugin:case Z.IncrementalSnapshot:break}this.getCastFn(c,!0)()}}),$(this,"getCastFn",(l,c=!1)=>{let u;switch(l.type){case Z.DomContentLoaded:case Z.Load:break;case Z.Annotation:u=()=>this.emitter.emit(Me.Annotation,l);break;case Z.Custom:u=()=>{this.emitter.emit(Me.CustomEvent,l)};break;case Z.Meta:u=()=>this.emitter.emit(Me.Resize,{width:l.data.width,height:l.data.height});break;case Z.FullSnapshot:u=()=>{var h;if(this.firstFullSnapshot){if(this.firstFullSnapshot===l){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(l,c),(h=this.iframe.contentWindow)==null||h.scrollTo(l.data.initialOffset)};break;case Z.IncrementalSnapshot:u=()=>{if(this.applyIncremental(l,c),!c&&(l===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(const h of this.service.state.context.events)if(!(h.timestamp<=l.timestamp)&&this.isUserInteraction(h)){h.delay-l.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=h);break}if(this.nextUserInteractionEvent){const h=this.nextUserInteractionEvent.delay-l.delay,d={speed:Math.min(Math.round(h/kh),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:d}),this.emitter.emit(Me.SkipStart,d)}}};break}return()=>{u&&u();for(const d of this.config.plugins||[])d.handler&&d.handler(l,c,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:l}});const h=this.service.state.context.events.length-1;if(!this.config.liveMode&&l===this.service.state.context.events[h]){const d=()=>{h<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(Me.Finish))};let f=50;l.type===Z.IncrementalSnapshot&&l.data.source===K.MouseMove&&l.data.positions.length&&(f+=Math.max(0,-l.data.positions[0].timeOffset)),setTimeout(d,f)}this.emitter.emit(Me.EventCast,l)}}),!(r!=null&&r.liveMode)&&e.length<2)throw new Error("Replayer need at least 2 events.");const n={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:Cs,useVirtualDom:!0,logger:console};this.config=Object.assign({},n,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(Me.Resize,this.handleResize),this.setupDom();for(const l of this.config.plugins||[])l.getMirror&&l.getMirror({nodeMirror:this.mirror});this.emitter.on(Me.Flush,()=>{if(this.usingVirtualDom){const l={mirror:this.mirror,applyCanvas:(c,u,a)=>{Vl({event:c,mutation:u,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(c,u)=>{c.source===K.StyleSheetRule?this.applyStyleSheetRule(c,u):c.source===K.StyleDeclaration&&this.applyStyleDeclaration(c,u)},afterAppend:(c,u)=>{for(const a of this.config.plugins||[])a.onBuild&&a.onBuild(c,{id:u,replayer:this})}};if(this.iframe.contentDocument)try{cn(this.iframe.contentDocument,this.virtualDom,l,this.virtualDom.mirror)}catch(c){this.warn(c)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(const c in this.legacy_missingNodeRetryMap)try{const u=this.legacy_missingNodeRetryMap[c],a=un(u.node,this.mirror,this.virtualDom.mirror);cn(a,u.node,l,this.virtualDom.mirror),u.node=a}catch(u){this.warn(u)}this.constructedStyleMutations.forEach(c=>{this.applyStyleSheetMutation(c)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(c=>{this.applyAdoptedStyleSheet(c)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){const[l,c]=this.lastMouseDownEvent;l.dispatchEvent(c)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(Me.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});const i=new ph([],{speed:this.config.speed});this.service=gh({events:e.map(l=>r&&r.unpackFn?r.unpackFn(l):l).sort((l,c)=>l.timestamp-c.timestamp),timer:i,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(l=>{this.emitter.emit(Me.StateChange,{player:l})}),this.speedService=yh({normalSpeed:-1,timer:i}),this.speedService.start(),this.speedService.subscribe(l=>{this.emitter.emit(Me.StateChange,{speed:l})}),this.mediaManager=new Rh({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});const s=this.service.state.context.events.find(l=>l.type===Z.Meta),o=this.service.state.context.events.find(l=>l.type===Z.FullSnapshot);if(s){const{width:l,height:c}=s.data;setTimeout(()=>{this.emitter.emit(Me.Resize,{width:l,height:c})},0)}o&&setTimeout(()=>{var l;this.firstFullSnapshot||(this.firstFullSnapshot=o,this.rebuildFullSnapshot(o),(l=this.iframe.contentWindow)==null||l.scrollTo(o.data.initialOffset))},1),this.service.state.context.events.find(Kl)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(e,r){return this.emitter.on(e,r),this}off(e,r){return this.emitter.off(e,r),this}setConfig(e){Object.keys(e).forEach(r=>{e[r],this.config[r]=e[r]}),this.config.skipInactive||this.backToNormal(),typeof e.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:e.speed}}),typeof e.mouseTail<"u"&&(e.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){const e=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:e.timestamp,endTime:r.timestamp,totalTime:r.timestamp-e.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){const{baselineTime:e,events:r}=this.service.state.context;return e-r[0].timestamp}getMirror(){return this.mirror}play(e=0){var r,n;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:e}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:e}})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.remove("rrweb-paused"),this.emitter.emit(Me.Start)}pause(e){var r,n;e===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof e=="number"&&(this.play(e),this.service.send({type:"PAUSE"})),(n=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||n.classList.add("rrweb-paused"),this.emitter.emit(Me.Pause)}resume(e=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(e),this.emitter.emit(Me.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(Me.Destroy)}startLive(e){this.service.send({type:"TO_LIVE",payload:{baselineTime:e}})}addEvent(e){const r=this.config.unpackFn?this.config.unpackFn(e):e;Kl(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Zo()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=sd({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(hh(this.iframe.contentWindow,this.iframe.contentDocument),dl(this.iframe.contentWindow))}rebuildFullSnapshot(e,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};const n=[],i=new Set,s=(c,u)=>{if(c.nodeName==="DIALOG"&&i.add(c),this.collectIframeAndAttachDocument(n,c),this.mediaManager.isSupportedMediaElement(c)){const{events:a}=this.service.state.context;this.mediaManager.addMediaElements(c,e.timestamp-a[0].timestamp,this.mirror)}for(const a of this.config.plugins||[])a.onBuild&&a.onBuild(c,{id:u,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),id(e.data.node,{doc:this.iframe.contentDocument,afterAppend:s,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),s(this.iframe.contentDocument,e.data.node.id);for(const{mutationInQueue:c,builtNode:u}of n)this.attachDocumentToIframe(c,u),this.newDocumentQueue=this.newDocumentQueue.filter(a=>a!==c);const{documentElement:o,head:l}=this.iframe.contentDocument;this.insertStyleRules(o,l),i.forEach(c=>wn(c)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(Me.FullsnapshotRebuilded,e),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(e,r){var n;const i=bh(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&i.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!i.length)if(this.usingVirtualDom){const s=this.virtualDom.createElement("style");this.virtualDom.mirror.add(s,Za(s,this.virtualDom.unserializedId)),e.insertBefore(s,r),s.rules.push({source:K.StyleSheetRule,adds:i.map((o,l)=>({rule:o,index:l}))})}else{const s=document.createElement("style");e.insertBefore(s,r);for(let o=0;o<i.length;o++)(n=s.sheet)==null||n.insertRule(i[o],o)}}attachDocumentToIframe(e,r){const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,i=[],s=new Set,o=(l,c)=>{l.nodeName==="DIALOG"&&s.add(l),this.collectIframeAndAttachDocument(i,l);const u=n.getMeta(l);if((u==null?void 0:u.type)===Rt.Element&&(u==null?void 0:u.tagName.toUpperCase())==="HTML"){const{documentElement:a,head:h}=r.contentDocument;this.insertStyleRules(a,h)}if(!this.usingVirtualDom)for(const a of this.config.plugins||[])a.onBuild&&a.onBuild(l,{id:c,replayer:this})};gr(e.node,{doc:r.contentDocument,mirror:n,hackCss:!0,skipChild:!1,afterAppend:o,cache:this.cache}),o(r.contentDocument,e.node.id);for(const{mutationInQueue:l,builtNode:c}of i)this.attachDocumentToIframe(l,c),this.newDocumentQueue=this.newDocumentQueue.filter(u=>u!==l);s.forEach(l=>wn(l))}collectIframeAndAttachDocument(e,r){if(xr(r,this.mirror)){const n=this.newDocumentQueue.find(i=>i.parentId===this.mirror.getId(r));n&&e.push({mutationInQueue:n,builtNode:r})}}waitForStylesheetLoad(){var e;const r=(e=this.iframe.contentDocument)==null?void 0:e.head;if(r){const n=new Set;let i,s=this.service.state;const o=()=>{s=this.service.state};this.emitter.on(Me.Start,o),this.emitter.on(Me.Pause,o);const l=()=>{this.emitter.off(Me.Start,o),this.emitter.off(Me.Pause,o)};r.querySelectorAll('link[rel="stylesheet"]').forEach(c=>{c.sheet||(n.add(c),c.addEventListener("load",()=>{n.delete(c),n.size===0&&i!==-1&&(s.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(Me.LoadStylesheetEnd),i&&clearTimeout(i),l())}))}),n.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(Me.LoadStylesheetStart),i=setTimeout(()=>{s.matches("playing")&&this.play(this.getCurrentTime()),i=-1,l()},this.config.loadTimeout))}}async preloadAllImages(){const e=[];for(const r of this.service.state.context.events)r.type===Z.IncrementalSnapshot&&r.data.source===K.CanvasMutation&&(e.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(i=>{this.preloadImages(i,r)}));return Promise.all(e)}preloadImages(e,r){if(e.property==="drawImage"&&typeof e.args[0]=="string"&&!this.imageMap.has(r)){const n=document.createElement("canvas"),i=n.getContext("2d"),s=i==null?void 0:i.createImageData(n.width,n.height);i==null||i.putImageData(s,0,0)}}async deserializeAndPreloadCanvasEvents(e,r){if(!this.canvasEventMap.has(r)){const n={isUnchanged:!0};if("commands"in e){const i=await Promise.all(e.commands.map(async s=>{const o=await Promise.all(s.args.map(_t(this.imageMap,null,n)));return{...s,args:o}}));n.isUnchanged===!1&&this.canvasEventMap.set(r,{...e,commands:i})}else{const i=await Promise.all(e.args.map(_t(this.imageMap,null,n)));n.isUnchanged===!1&&this.canvasEventMap.set(r,{...e,args:i})}}}applyIncremental(e,r){var n,i,s;const{data:o}=e;switch(o.source){case K.Mutation:{try{this.applyMutation(o,r)}catch(l){this.warn(`Exception in mutation ${l.message||l}`,o)}break}case K.Drag:case K.TouchMove:case K.MouseMove:if(r){const l=o.positions[o.positions.length-1];this.mousePos={x:l.x,y:l.y,id:l.id,debugData:o}}else o.positions.forEach(l=>{const c={doAction:()=>{this.moveAndHover(l.x,l.y,l.id,r,o)},delay:l.timeOffset+e.timestamp-this.service.state.context.baselineTime};this.timer.addAction(c)}),this.timer.addAction({doAction(){},delay:e.delay-((n=o.positions[0])==null?void 0:n.timeOffset)});break;case K.MouseInteraction:{if(o.id===-1)break;const l=new Event(St(Ae[o.type])),c=this.mirror.getNode(o.id);if(!c)return this.debugNodeNotFound(o,o.id);this.emitter.emit(Me.MouseInteraction,{type:o.type,target:c});const{triggerFocus:u}=this.config;switch(o.type){case Ae.Blur:"blur"in c&&c.blur();break;case Ae.Focus:u&&c.focus&&c.focus({preventScroll:!0});break;case Ae.Click:case Ae.TouchStart:case Ae.TouchEnd:case Ae.MouseDown:case Ae.MouseUp:r?(o.type===Ae.TouchStart?this.touchActive=!0:o.type===Ae.TouchEnd&&(this.touchActive=!1),o.type===Ae.MouseDown?this.lastMouseDownEvent=[c,l]:o.type===Ae.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:o.x||0,y:o.y||0,id:o.id,debugData:o}):(o.type===Ae.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(o.x||0,o.y||0,o.id,r,o),o.type===Ae.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):o.type===Ae.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):o.type===Ae.TouchEnd?this.mouse.classList.remove("touch-active"):c.dispatchEvent(l));break;case Ae.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:c.dispatchEvent(l)}break}case K.Scroll:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.scrollData=o;break}this.applyScroll(o,r);break}case K.ViewportResize:this.emitter.emit(Me.Resize,{width:o.width,height:o.height});break;case K.Input:{if(o.id===-1)break;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.inputData=o;break}this.applyInput(o);break}case K.MediaInteraction:{const l=this.usingVirtualDom?this.virtualDom.mirror.getNode(o.id):this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);const c=l,{events:u}=this.service.state.context;this.mediaManager.mediaMutation({target:c,timeOffset:e.timestamp-u[0].timestamp,mutation:o});break}case K.StyleSheetRule:case K.StyleDeclaration:{this.usingVirtualDom?o.styleId?this.constructedStyleMutations.push(o):o.id&&((i=this.virtualDom.mirror.getNode(o.id))==null||i.rules.push(o)):this.applyStyleSheetMutation(o);break}case K.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){const l=this.virtualDom.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);l.canvasMutations.push({event:e,mutation:o})}else{const l=this.mirror.getNode(o.id);if(!l)return this.debugNodeNotFound(o,o.id);Vl({event:e,mutation:o,target:l,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case K.Font:{try{const l=new FontFace(o.family,o.buffer?new Uint8Array(JSON.parse(o.fontSource)):o.fontSource,o.descriptors);(s=this.iframe.contentDocument)==null||s.fonts.add(l)}catch(l){this.warn(l)}break}case K.Selection:{if(r){this.lastSelectionData=o;break}this.applySelection(o);break}case K.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(o):this.applyAdoptedStyleSheet(o);break}}}applyMutation(e,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,ff(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(const u in this.legacy_missingNodeRetryMap)try{const a=this.legacy_missingNodeRetryMap[u],h=Qa(a.node,this.virtualDom,this.mirror);h&&(a.node=h)}catch(a){this.warn(a)}const n=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;e.removes=e.removes.filter(u=>n.getNode(u.id)?!0:(this.warnNodeNotFound(e,u.id),!1)),e.removes.forEach(u=>{var a;const h=n.getNode(u.id);if(!h)return;let d=n.getNode(u.parentId);if(!d)return this.warnNodeNotFound(e,u.parentId);if(u.isShadow&&Ft(d)&&(d=d.shadowRoot),n.removeNodeFromMap(h),d)try{d.removeChild(h),this.usingVirtualDom&&h.nodeName==="#text"&&d.nodeName==="STYLE"&&((a=d.rules)==null?void 0:a.length)>0&&(d.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",d,h,e);else throw f}});const i={...this.legacy_missingNodeRetryMap},s=[],o=u=>{let a=null;return u.nextId&&(a=n.getNode(u.nextId)),u.nextId!==null&&u.nextId!==void 0&&u.nextId!==-1&&!a},l=u=>{var a,h;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let d=n.getNode(u.parentId);if(!d)return u.node.type===Rt.Document?this.newDocumentQueue.push(u):s.push(u);u.node.isShadow&&(Ft(d)||d.attachShadow({mode:"open"}),d=d.shadowRoot);let f=null,m=null;if(u.previousId&&(f=n.getNode(u.previousId)),u.nextId&&(m=n.getNode(u.nextId)),o(u))return s.push(u);if(u.node.rootId&&!n.getNode(u.node.rootId))return;const p=u.node.rootId?n.getNode(u.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(xr(d,n)){this.attachDocumentToIframe(u,d);return}const y=(b,C)=>{if(!this.usingVirtualDom){wn(b);for(const S of this.config.plugins||[])S.onBuild&&S.onBuild(b,{id:C,replayer:this})}},v=gr(u.node,{doc:p,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:y});if(u.previousId===-1||u.nextId===-1){i[u.node.id]={node:v,mutation:u};return}const w=n.getMeta(d);if(w&&w.type===Rt.Element&&u.node.type===Rt.Text){const b=Array.isArray(d.childNodes)?d.childNodes:Array.from(d.childNodes);if(w.tagName==="textarea")for(const C of b)C.nodeType===d.TEXT_NODE&&d.removeChild(C);else if(w.tagName==="style"&&b.length===1)for(const C of b)C.nodeType===d.TEXT_NODE&&!n.hasNode(C)&&(v.textContent=C.textContent,d.removeChild(C))}else if((w==null?void 0:w.type)===Rt.Document){const b=d;u.node.type===Rt.DocumentType&&((a=b.childNodes[0])==null?void 0:a.nodeType)===Node.DOCUMENT_TYPE_NODE&&b.removeChild(b.childNodes[0]),v.nodeName==="HTML"&&b.documentElement&&b.removeChild(b.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?d.insertBefore(v,f.nextSibling):m&&m.parentNode?d.contains(m)?d.insertBefore(v,m):d.insertBefore(v,null):d.appendChild(v),y(v,u.node.id),this.usingVirtualDom&&v.nodeName==="#text"&&d.nodeName==="STYLE"&&((h=d.rules)==null?void 0:h.length)>0&&(d.rules=[]),xr(v,this.mirror)){const b=this.mirror.getId(v),C=this.newDocumentQueue.find(S=>S.parentId===b);C&&(this.attachDocumentToIframe(C,v),this.newDocumentQueue=this.newDocumentQueue.filter(S=>S!==C))}(u.previousId||u.nextId)&&this.legacy_resolveMissingNode(i,d,v,u)};e.adds.forEach(u=>{l(u)});const c=Date.now();for(;s.length;){const u=_f(s);if(s.length=0,Date.now()-c>500){this.warn("Timeout in the loop, please check the resolve tree data:",u);break}for(const a of u)n.getNode(a.value.parentId)?fl(a,d=>{l(d)}):this.debug("Drop resolve tree since there is no parent for the root node.",a)}Object.keys(i).length&&Object.assign(this.legacy_missingNodeRetryMap,i),Df(e.texts).forEach(u=>{var a;const h=n.getNode(u.id);if(!h)return e.removes.find(f=>f.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);const d=h.parentElement;if(u.value&&d&&d.tagName==="STYLE"?h.textContent=Zr(u.value,this.cache):h.textContent=u.value,this.usingVirtualDom){const f=h.parentNode;((a=f==null?void 0:f.rules)==null?void 0:a.length)>0&&(f.rules=[])}}),e.attributes.forEach(u=>{var a;const h=n.getNode(u.id);if(!h)return e.removes.find(d=>d.id===u.id)?void 0:this.warnNodeNotFound(e,u.id);for(const d in u.attributes)if(typeof d=="string"){const f=u.attributes[d];if(f===null)h.removeAttribute(d),d==="open"&&Eh(h,u);else if(typeof f=="string")try{if(d==="_cssText"&&(h.nodeName==="LINK"||h.nodeName==="STYLE"))try{const m=n.getMeta(h),p=gr({...m,attributes:{...m.attributes,...u.attributes}},{doc:h.ownerDocument,mirror:n,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,u.attributes);const y=h.nextSibling,v=h.parentNode;if(p&&v){v.removeChild(h),v.insertBefore(p,y),n.replace(u.id,p);break}}catch{}if(d==="value"&&h.nodeName==="TEXTAREA"){const m=h;m.childNodes.forEach(y=>m.removeChild(y));const p=(a=h.ownerDocument)==null?void 0:a.createTextNode(f);p&&m.appendChild(p)}else h.setAttribute(d,f);d==="rr_open_mode"&&h.nodeName==="DIALOG"&&wn(h,u)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(d==="style"){const m=f,p=h;for(const y in m)if(m[y]===!1)p.style.removeProperty(y);else if(m[y]instanceof Array){const v=m[y];p.style.setProperty(y,v[0],v[1])}else{const v=m[y];p.style.setProperty(y,v)}}}})}applyScroll(e,r){var n,i;const s=this.mirror.getNode(e.id);if(!s)return this.debugNodeNotFound(e,e.id);const o=this.mirror.getMeta(s);if(s===this.iframe.contentDocument)(n=this.iframe.contentWindow)==null||n.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else if((o==null?void 0:o.type)===Rt.Document)(i=s.defaultView)==null||i.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"});else try{s.scrollTo({top:e.y,left:e.x,behavior:r?"auto":"smooth"})}catch{}}applyInput(e){const r=this.mirror.getNode(e.id);if(!r)return this.debugNodeNotFound(e,e.id);try{r.checked=e.isChecked,r.value=e.text}catch{}}applySelection(e){try{const r=new Set,n=e.ranges.map(({start:i,startOffset:s,end:o,endOffset:l})=>{const c=this.mirror.getNode(i),u=this.mirror.getNode(o);if(!c||!u)return;const a=new Range;a.setStart(c,s),a.setEnd(u,l);const h=c.ownerDocument,d=h==null?void 0:h.getSelection();return d&&r.add(d),{range:a,selection:d}});r.forEach(i=>i.removeAllRanges()),n.forEach(i=>{var s;return i&&((s=i.selection)==null?void 0:s.addRange(i.range))})}catch{}}applyStyleSheetMutation(e){var r;let n=null;e.styleId?n=this.styleMirror.getStyle(e.styleId):e.id&&(n=((r=this.mirror.getNode(e.id))==null?void 0:r.sheet)||null),n&&(e.source===K.StyleSheetRule?this.applyStyleSheetRule(e,n):e.source===K.StyleDeclaration&&this.applyStyleDeclaration(e,n))}applyStyleSheetRule(e,r){var n,i,s,o;if((n=e.adds)==null||n.forEach(({rule:l,index:c})=>{try{if(Array.isArray(c)){const{positions:u,index:a}=ml(c),h=Cr(r.cssRules,u);h==null||h.insertRule(l,a)}else{const u=c===void 0?void 0:Math.min(c,r.cssRules.length);r==null||r.insertRule(l,u)}}catch{}}),(i=e.removes)==null||i.forEach(({index:l})=>{try{if(Array.isArray(l)){const{positions:c,index:u}=ml(l),a=Cr(r.cssRules,c);a==null||a.deleteRule(u||0)}else r==null||r.deleteRule(l)}catch{}}),typeof e.replace=="string")try{(s=r.replace)==null||s.call(r,e.replace)}catch{}if(typeof e.replaceSync=="string")try{(o=r.replaceSync)==null||o.call(r,e.replaceSync)}catch{}}applyStyleDeclaration(e,r){if(e.set){const n=Cr(r.rules,e.index);n!=null&&n.style&&n.style.setProperty(e.set.property,e.set.value,e.set.priority)}if(e.remove){const n=Cr(r.rules,e.index);n!=null&&n.style&&n.style.removeProperty(e.remove.property)}}applyAdoptedStyleSheet(e){var r;const n=this.mirror.getNode(e.id);if(!n)return;(r=e.styles)==null||r.forEach(l=>{var c;let u=null,a=null;if(Ft(n)?a=((c=n.ownerDocument)==null?void 0:c.defaultView)||null:n.nodeName==="#document"&&(a=n.defaultView),!!a)try{u=new a.CSSStyleSheet,this.styleMirror.add(u,l.styleId),this.applyStyleSheetRule({source:K.StyleSheetRule,adds:l.rules},u)}catch{}});const i=10;let s=0;const o=(l,c)=>{const u=c.map(a=>this.styleMirror.getStyle(a)).filter(a=>a!==null);Ft(l)?l.shadowRoot.adoptedStyleSheets=u:l.nodeName==="#document"&&(l.adoptedStyleSheets=u),u.length!==c.length&&s<i&&(setTimeout(()=>o(l,c),0+100*s),s++)};o(n,e.styleIds)}legacy_resolveMissingNode(e,r,n,i){const{previousId:s,nextId:o}=i,l=s&&e[s],c=o&&e[o];if(l){const{node:u,mutation:a}=l;r.insertBefore(u,n),delete e[a.node.id],delete this.legacy_missingNodeRetryMap[a.node.id],(a.previousId||a.nextId)&&this.legacy_resolveMissingNode(e,r,u,a)}if(c){const{node:u,mutation:a}=c;r.insertBefore(u,n.nextSibling),delete e[a.node.id],delete this.legacy_missingNodeRetryMap[a.node.id],(a.previousId||a.nextId)&&this.legacy_resolveMissingNode(e,r,u,a)}}moveAndHover(e,r,n,i,s){const o=this.mirror.getNode(n);if(!o)return this.debugNodeNotFound(s,n);const l=pl(o,this.iframe),c=e*l.absoluteScale+l.x,u=r*l.absoluteScale+l.y;this.mouse.style.left=`${c}px`,this.mouse.style.top=`${u}px`,i||this.drawMouseTail({x:c,y:u}),this.hoverElements(o)}drawMouseTail(e){if(!this.mouseTail)return;const{lineCap:r,lineWidth:n,strokeStyle:i,duration:s}=this.config.mouseTail===!0?Cs:Object.assign({},Cs,this.config.mouseTail),o=()=>{if(!this.mouseTail)return;const l=this.mouseTail.getContext("2d");!l||!this.tailPositions.length||(l.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),l.beginPath(),l.lineWidth=n,l.lineCap=r,l.strokeStyle=i,l.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(c=>l.lineTo(c.x,c.y)),l.stroke())};this.tailPositions.push(e),o(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(l=>l!==e),o()},s/this.speedService.state.context.timer.speed)}hoverElements(e){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(i=>{i.classList.remove(":hover")}),this.lastHoveredRootNode=e.getRootNode();let n=e;for(;n;)n.classList&&n.classList.add(":hover"),n=n.parentElement}isUserInteraction(e){return e.type!==Z.IncrementalSnapshot?!1:e.data.source>K.Mutation&&e.data.source<=K.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(Me.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(e,r){this.warn(`Node with id '${r}' not found. `,e)}warnCanvasMutationFailed(e,r){this.warn("Has error on canvas update",r,"canvas mutation:",e)}debugNodeNotFound(e,r){this.debug(`Node with id '${r}' not found. `,e)}warn(...e){this.config.showWarning&&this.config.logger.warn(Gl,...e)}debug(...e){this.config.showDebug&&this.config.logger.log(Gl,...e)}}const{addCustomEvent:Ep,addAnnotation:kp}=gt,{freezePage:Mp}=gt,{takeFullSnapshot:Tp}=gt,Ah=["authorization","cookie","set-cookie","x-api-key","proxy-authorization","x-auth-token","x-csrf-token","x-xsrf-token","x-signature","x-hmac-signature","x-pin-token","x-otp-token","x-biometric-token","x-core-banking-key","x-client-secret"],Ih=["password","passwd","passcode","pin","mpin","atm_pin","otp","otp_code","token","access_token","accesstoken","refresh_token","refreshtoken","id_token","authorization","secret","client_secret","api_key","apikey","private_key","signature","digital_signature","biometric","biometric_data","pan","card_number","cardnumber","credit_card","creditcard","debit_card","cvv","cvc","cvv2","cid","expiry_date","track_data","account_number","accountnumber","account_no","no_rekening","norek","nomor_rekening","iban","swift_code","saldo","balance","available_balance","ledger_balance","nik","no_ktp","npwp","ssn","tax_id","mother_maiden_name","nama_gadis_ibu_kandung","ibu_kandung","date_of_birth","tanggal_lahir"],Oh=/^(token|access_token|refresh_token|auth|key|api_key|secret|password|pin|mpin|otp|cvv|pan|card|account|account_no|norek|no_rekening|nik|npwp|signature|session|session_id|jwt)$/i,Nh=/\beyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}\b/g,_h=/\b(?:\d[ -]*?){13,19}\b/g,Dh=/\b\d{16}\b/g,Lh=/\b([A-Za-z0-9._%+-])([A-Za-z0-9._%+-]*?)@([A-Za-z0-9.-]+\.[A-Za-z]{2,})\b/g,Ph=/\b(\+62|62|0)8(\d{1,2})(\d{4,7})(\d{2,3})\b/g;function Yl(t){if(t.length<13||t.length>19||/^(\d)\1+$/.test(t))return!1;let e=0,r=!1;for(let n=t.length-1;n>=0;n--){let i=parseInt(t.charAt(n),10);r&&(i*=2,i>9&&(i-=9)),e+=i,r=!r}return e%10===0}function Ve(t,e){if(!t||t.length<5)return t;let r=0,n=t.replace(Nh,()=>(r++,"[REDACTED_JWT_TOKEN]"));return n=n.replace(_h,i=>{const s=i.replace(/\D/g,"");if(s.length>=13&&s.length<=19){const o=/^\d{4}[ -]\d{4}[ -]\d{4}[ -]\d{4}$/.test(i.trim());if(Yl(s)||o){r++;const l=s.slice(0,4),c=s.slice(-4);return`${l}-****-****-${c}`}}return i}),n=n.replace(Dh,i=>(r++,`${i.slice(0,4)}********${i.slice(-4)}`)),n=n.replace(Lh,(i,s,o,l)=>(r++,`${s}***@${l}`)),n=n.replace(Ph,(i,s,o,l,c)=>(r++,`${s}8${o}****${c}`)),r>0&&e&&e(r),n}function Sn(t,e){var r;if(!t)return t;try{const n=typeof window<"u"&&((r=window.location)!=null&&r.origin)?window.location.origin:"https://localhost",i=new URL(t,n);let s=0;return i.searchParams.forEach((o,l)=>{Oh.test(l.trim())&&(i.searchParams.set(l,"[REDACTED_QUERY_PARAM]"),s++)}),s>0&&e&&e(s),/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t)?i.toString():`${i.pathname}${i.search}${i.hash}`}catch{return Ve(t,e)}}async function nr(t){var o,l,c;if(typeof window>"u"||!((o=window.crypto)!=null&&o.subtle))return"crypto-subtle-unavailable";const e=JSON.stringify({domEventsCount:t.domEvents.length,firstDomTimestamp:((l=t.domEvents[0])==null?void 0:l.timestamp)??0,lastDomTimestamp:((c=t.domEvents[t.domEvents.length-1])==null?void 0:c.timestamp)??0,networkLogs:t.networkLogs,consoleLogs:t.consoleLogs??[],errorLogs:t.errorLogs??[]}),n=new TextEncoder().encode(e),i=await window.crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(i)).map(u=>u.toString(16).padStart(2,"0")).join("")}function Rs(t){let e="";for(let r=0;r<t.byteLength;r++)e+=String.fromCharCode(t[r]);return window.btoa(e)}function Es(t){const e=window.atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}async function Jl(t,e,r){const n=new TextEncoder,i=await window.crypto.subtle.importKey("raw",n.encode(t),{name:"PBKDF2"},!1,["deriveKey"]);return window.crypto.subtle.deriveKey({name:"PBKDF2",salt:e,iterations:r,hash:"SHA-256"},i,{name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}async function ks(t,e){const n=window.crypto.getRandomValues(new Uint8Array(16)),i=window.crypto.getRandomValues(new Uint8Array(12)),s=await Jl(e,n,1e5),o=new TextEncoder,l=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:i},s,o.encode(t));return{rewindlogEncrypted:!0,version:"1.0",algorithm:"AES-256-GCM",kdf:"PBKDF2-SHA256",iterations:1e5,saltBase64:Rs(n),ivBase64:Rs(i),ciphertextBase64:Rs(new Uint8Array(l)),exportedAt:new Date().toISOString(),complianceProfile:"BANKING_PCI_DSS_V4_OJK_UUPDP"}}async function Ms(t,e){const r=Es(t.saltBase64),n=Es(t.ivBase64),i=Es(t.ciphertextBase64),s=await Jl(e,r,t.iterations||1e5),o=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:n},s,i);return new TextDecoder().decode(o)}function $h(t){return typeof t=="object"&&t!==null&&t.rewindlogEncrypted===!0&&typeof t.ciphertextBase64=="string"}function xn(t){const e=Math.max(0,Math.floor(t)),r=Math.floor(e/1e3),n=Math.floor(r/60),i=r%60;return`${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}`}function ir(t){if(!t)return"-";try{return new Date(t).toLocaleTimeString("id-ID",{hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return new Date(t).toLocaleTimeString()}}function Tr(t){try{const e=new URL(t,"https://localhost");return`${e.hostname==="localhost"?"Server Lokal":e.hostname}${e.pathname}`}catch{return t}}function Xl(t){const e=t.status;return e===0?"Gagal terhubung ke server (Koneksi terputus / diblokir / timeout).":e>=200&&e<300?t.durationMs>1500?`Berhasil (Kode ${e}), namun respons server cukup lambat (${(t.durationMs/1e3).toFixed(2)} detik).`:`Berhasil diproses oleh server dengan cepat (${t.durationMs} ms).`:e===400?"Ditolak oleh server (Kode 400): Format data yang dikirim tidak sesuai.":e===401||e===403?`Akses ditolak (Kode ${e}): Sesi login habis atau pengguna tidak memiliki hak akses.`:e===404?"Data atau layanan tidak ditemukan di server (Kode 404).":e===429?"Terlalu banyak permintaan dalam waktu singkat (Kode 429 - Rate Limit).":e>=500?`Terjadi gangguan internal pada Server Backend (Kode ${e}).`:`Respons server dengan kode status ${e}.`}function yt(t){var _,H,z,A,be,he,ne,F,de;const e=t.domEvents??[],r=t.networkLogs??[],n=t.consoleLogs??[],i=t.errorLogs??[],s=t.breadcrumbs??[],o=((_=e[0])==null?void 0:_.timestamp)??((H=t.metadata)==null?void 0:H.sessionStartedAt)??Date.now(),l=((z=e[e.length-1])==null?void 0:z.timestamp)??((A=t.metadata)==null?void 0:A.exportedTimestamp)??o,c=Math.max(0,l-o),u=Math.max(1,Math.round(c/1e3)),a=u>=60?`${Math.floor(u/60)} menit ${u%60} detik`:`${u} detik`,h=r.filter(j=>j.status===0||j.status>=400),d=r.filter(j=>j.status>=200&&j.status<400&&j.durationMs>=1500),f=r.filter(j=>j.status>=200&&j.status<400),m=r.length>0?Math.round(r.reduce((j,X)=>j+(X.durationMs||0),0)/r.length):0,p=n.filter(j=>j.level==="error"),y=n.filter(j=>j.level==="warn"),v=i.length+p.length,w=((he=(be=t.metadata)==null?void 0:be.securityAudit)==null?void 0:he.totalRedactionsCount)??r.length*2;let b="SEHAT",C="Sistem & Koneksi Berjalan Normal",S="",x="",k="Tim Support / Operasional (Verifikasi Alur Pengguna)";const I=[];if(h.length>0||i.length>0?(b="KRITIS",C="Terdeteksi Gangguan Teknis Saat Pengguna Menggunakan Aplikasi"):(p.length>0||d.length>0||y.length>0)&&(b="PERLU_PERHATIAN",C="Aplikasi Berjalan Namun Ditemukan Peringatan / Respons Lambat"),h.length>0){const j=h[0],X=Tr(j.url);S=`Saat pengguna melakukan aktivitas di layar, aplikasi gagal berkomunikasi dengan server pada layanan "${X}" (${Xl(j)}).`,x=j.status>=500||j.status===0?`Gangguan berasal dari sisi Server Backend / Jaringan API (${j.method} ${X} menghasilkan status ${j.status||"ERR"}), bukan karena kesalahan klik pengguna.`:`Permintaan ditolak oleh server (Status ${j.status}) pada layanan ${X}. Perlu pengecekan validasi data atau hak akses sesi pengguna.`,k=j.status>=500||j.status===0?"Tim Backend / Core Banking API & Infrastruktur":"Tim Aplikasi (Frontend & Backend)",I.push(`Periksa layanan API "${X}" pada waktu ${ir(j.timestamp)}.`,"Gunakan tab Network di Replay Studio untuk melihat detail payload yang sudah disensor secara aman.")}else if(i.length>0||p.length>0){const j=((ne=i[0])==null?void 0:ne.message)||((F=p[0])==null?void 0:F.message)||"Kesalahan internal aplikasi";S=`Seluruh koneksi jaringan ke server berhasil (${f.length}/${r.length} sukses), namun terjadi kendala internal pada tampilan/sistem aplikasi: "${j}".`,x="Koneksi API normal, tetapi terdapat error logika pada aplikasi web (Frontend/Controller) atau ketidaksesuaian data saat memproses transaksi.",k="Tim Frontend Web / Core Application Engineer",I.push("Putar ulang video di Replay Studio dan klik penanda merah pada timeline untuk melihat detik persis munculnya error.",`Tinjau pesan error: "${j}".`)}else if(d.length>0){const j=[...d].sort((X,T)=>T.durationMs-X.durationMs)[0];S=`Tidak ada error yang menghentikan sistem, tetapi server membutuhkan waktu ${(j.durationMs/1e3).toFixed(2)} detik untuk memproses permintaan ke "${Tr(j.url)}". Hal ini dapat membuat tombol atau layar terasa lambat bagi pengguna.`,x=`Kinerja respons API melambat (${j.durationMs} ms, di atas batas normal 1.500 ms).`,k="Tim Backend Performance / Database",I.push(`Optimalkan waktu respons endpoint "${Tr(j.url)}".`,"Tambahkan indikator loading pada layar agar pengguna tidak mengira tombol macet.")}else S=`Selama ${a} rekaman berlangsung, pengguna melakukan ${e.length} interaksi layar dan ${r.length} panggilan data ke server. Seluruh koneksi jaringan berhasil (100% sukses) tanpa ditemukan error sistem.`,x="Tidak ditemukan kegagalan sistem maupun gangguan jaringan. Jika pengguna melaporkan kendala, kemungkinan berkaitan dengan tampilan/aturan bisnis (business rule) yang dapat dilihat langsung pada rekaman video.",k="Tim Product / Customer Support / QA",I.push("Tonton pemutaran ulang video (Replay) untuk melihat apa yang dilihat pengguna di layar.","Konfirmasi apakah hasil di layar sudah sesuai dengan ekspektasi prosedur operasional (SOP).");const B=[];return B.push({id:"step_start",timestamp:o,relativeTimeLabel:"00:00",timeClockLabel:ir(o),category:"start",badgeText:"MULAI REKAMAN",titlePlain:"Sesi Rekaman Layar Dimulai",detailPlain:`Pengguna membuka halaman aplikasi (${(de=t.metadata)!=null&&de.viewport?`Resolusi layar ${t.metadata.viewport.width}x${t.metadata.viewport.height}`:"Tampilan Web"}).`}),s.forEach((j,X)=>{const T=Math.max(0,j.timestamp-o);B.push({id:j.id||`bc_${X}`,timestamp:j.timestamp,relativeTimeLabel:xn(T),timeClockLabel:ir(j.timestamp),category:j.category==="security"?"security":"user-action",badgeText:j.category==="security"?"KEAMANAN BANK":"AKTIVITAS PENGGUNA",titlePlain:j.category==="security"?"Perlindungan Keamanan & Privasi Aktif":"Interaksi Pengguna di Layar",detailPlain:j.message})}),r.forEach((j,X)=>{const T=Math.max(0,j.timestamp-o),U=j.status===0||j.status>=400,D=!U&&j.durationMs>=1500,te=Tr(j.url),ie=j.method==="POST"?"Mengirim data transaksi ke":j.method==="PUT"||j.method==="PATCH"?"Memperbarui data pada":j.method==="DELETE"?"Menghapus data pada":"Mengambil data dari";B.push({id:j.id||`net_step_${X}`,timestamp:j.timestamp,relativeTimeLabel:xn(T),timeClockLabel:ir(j.timestamp),category:U?"network-fail":D?"network-slow":"network-ok",badgeText:U?`GAGAL KONEKSI (${j.status||"ERR"})`:D?`KONEKSI LAMBAT (${(j.durationMs/1e3).toFixed(1)}s)`:`KONEKSI SUKSES (${j.status})`,titlePlain:`${ie} ${te}`,detailPlain:Xl(j),technicalNote:`${(j.type||"http").toUpperCase()} ${j.method} ${j.url} • ${j.durationMs}ms`})}),n.forEach((j,X)=>{if(j.level!=="warn"&&j.level!=="error")return;const T=Math.max(0,j.timestamp-o);B.push({id:j.id||`con_step_${X}`,timestamp:j.timestamp,relativeTimeLabel:xn(T),timeClockLabel:ir(j.timestamp),category:j.level==="error"?"error":"warning",badgeText:j.level==="error"?" LOG ERROR":"PERINGATAN SISTEM",titlePlain:j.level==="error"?"Aplikasi Mencatat Pesan Error Internal":"Aplikasi Mencatat Peringatan (Warning)",detailPlain:j.message})}),i.forEach((j,X)=>{const T=Math.max(0,j.timestamp-o);B.push({id:j.id||`err_step_${X}`,timestamp:j.timestamp,relativeTimeLabel:xn(T),timeClockLabel:ir(j.timestamp),category:"error",badgeText:"ERROR SISTEM",titlePlain:"Terjadi Gangguan Eksekusi pada Aplikasi",detailPlain:j.message,technicalNote:j.type})}),B.sort((j,X)=>j.timestamp-X.timestamp),{overallStatus:b,statusHeadline:C,plainExplanation:S,rootCauseDiagnosis:x,recommendedTeam:k,recommendedActionSteps:I,keyMetrics:{sessionDurationLabel:a,totalUserInteractions:e.length,totalNetworkRequests:r.length,successfulNetworkRequests:f.length,failedNetworkRequests:h.length,slowNetworkRequests:d.length,averageNetworkDurationMs:m,systemErrorsCount:v,consoleWarningsCount:y.length,protectedPiiCount:w},storyline:B}}function sr(t){var h,d,f;const e=yt(t),r=t.issue,n=t.metadata,i=e.overallStatus==="KRITIS"?"#dc2626":e.overallStatus==="PERLU_PERHATIAN"?"#d97706":"#059669",s=e.overallStatus==="KRITIS"?"#fef2f2":e.overallStatus==="PERLU_PERHATIAN"?"#fffbeb":"#ecfdf5",o=m=>m.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,"""),l=`<!doctype html>
|
|
149
|
+
<html lang="id">
|
|
150
|
+
<head>
|
|
151
|
+
<meta charset="UTF-8" />
|
|
152
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
153
|
+
<title>Laporan Insiden RewindLog — ${o((n==null?void 0:n.reportId)||"Bug Report")}</title>
|
|
154
|
+
<style>
|
|
155
|
+
* { box-sizing: border-box; }
|
|
156
|
+
body {
|
|
157
|
+
font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
158
|
+
background: #f8fafc;
|
|
159
|
+
color: #0f172a;
|
|
160
|
+
margin: 0;
|
|
161
|
+
padding: 32px 20px;
|
|
162
|
+
line-height: 1.55;
|
|
163
|
+
}
|
|
164
|
+
.container {
|
|
165
|
+
max-width: 920px;
|
|
166
|
+
margin: 0 auto;
|
|
167
|
+
background: #ffffff;
|
|
168
|
+
border: 1px solid #e2e8f0;
|
|
169
|
+
border-radius: 12px;
|
|
170
|
+
padding: 32px;
|
|
171
|
+
box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
|
|
172
|
+
}
|
|
173
|
+
.top-bar {
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: space-between;
|
|
176
|
+
align-items: flex-start;
|
|
177
|
+
border-bottom: 2px solid #f1f5f9;
|
|
178
|
+
padding-bottom: 20px;
|
|
179
|
+
margin-bottom: 24px;
|
|
180
|
+
gap: 16px;
|
|
181
|
+
flex-wrap: wrap;
|
|
182
|
+
}
|
|
183
|
+
.badge {
|
|
184
|
+
display: inline-block;
|
|
185
|
+
background: #eff6ff;
|
|
186
|
+
color: #1d4ed8;
|
|
187
|
+
border: 1px solid #bfdbfe;
|
|
188
|
+
font-size: 12px;
|
|
189
|
+
font-weight: 700;
|
|
190
|
+
padding: 4px 10px;
|
|
191
|
+
border-radius: 999px;
|
|
192
|
+
text-transform: uppercase;
|
|
193
|
+
margin-bottom: 8px;
|
|
194
|
+
}
|
|
195
|
+
h1 { margin: 0 0 6px 0; font-size: 24px; color: #0f172a; }
|
|
196
|
+
h2 { margin: 24px 0 12px 0; font-size: 17px; color: #1e293b; border-bottom: 1px solid #e2e8f0; padding-bottom: 6px; }
|
|
197
|
+
.verdict-box {
|
|
198
|
+
background: ${s};
|
|
199
|
+
border: 2px solid ${i};
|
|
200
|
+
border-radius: 10px;
|
|
201
|
+
padding: 18px 20px;
|
|
202
|
+
margin-bottom: 24px;
|
|
203
|
+
}
|
|
204
|
+
.verdict-title {
|
|
205
|
+
font-size: 18px;
|
|
206
|
+
font-weight: 800;
|
|
207
|
+
color: ${i};
|
|
208
|
+
margin-bottom: 6px;
|
|
209
|
+
}
|
|
210
|
+
.grid-4 {
|
|
211
|
+
display: grid;
|
|
212
|
+
grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
|
|
213
|
+
gap: 12px;
|
|
214
|
+
margin-bottom: 24px;
|
|
215
|
+
}
|
|
216
|
+
.metric-card {
|
|
217
|
+
background: #f8fafc;
|
|
218
|
+
border: 1px solid #e2e8f0;
|
|
219
|
+
border-radius: 8px;
|
|
220
|
+
padding: 14px;
|
|
221
|
+
}
|
|
222
|
+
.metric-label { font-size: 12px; color: #64748b; font-weight: 600; text-transform: uppercase; }
|
|
223
|
+
.metric-value { font-size: 20px; font-weight: 800; color: #0f172a; margin-top: 4px; }
|
|
224
|
+
.info-box {
|
|
225
|
+
background: #f8fafc;
|
|
226
|
+
border-left: 4px solid #2563eb;
|
|
227
|
+
padding: 14px 18px;
|
|
228
|
+
border-radius: 6px;
|
|
229
|
+
margin-bottom: 16px;
|
|
230
|
+
}
|
|
231
|
+
.timeline {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex-direction: column;
|
|
234
|
+
gap: 10px;
|
|
235
|
+
}
|
|
236
|
+
.step {
|
|
237
|
+
border: 1px solid #e2e8f0;
|
|
238
|
+
border-radius: 8px;
|
|
239
|
+
padding: 12px 16px;
|
|
240
|
+
background: #ffffff;
|
|
241
|
+
}
|
|
242
|
+
.step-header {
|
|
243
|
+
display: flex;
|
|
244
|
+
justify-content: space-between;
|
|
245
|
+
align-items: center;
|
|
246
|
+
font-size: 12px;
|
|
247
|
+
color: #64748b;
|
|
248
|
+
margin-bottom: 4px;
|
|
249
|
+
}
|
|
250
|
+
.step-badge {
|
|
251
|
+
font-weight: 700;
|
|
252
|
+
color: #1e293b;
|
|
253
|
+
background: #f1f5f9;
|
|
254
|
+
padding: 2px 8px;
|
|
255
|
+
border-radius: 4px;
|
|
256
|
+
}
|
|
257
|
+
.step-title { font-weight: 700; font-size: 14px; color: #0f172a; }
|
|
258
|
+
.step-detail { font-size: 13px; color: #334155; margin-top: 2px; }
|
|
259
|
+
.print-btn {
|
|
260
|
+
background: #0f172a;
|
|
261
|
+
color: #ffffff;
|
|
262
|
+
border: none;
|
|
263
|
+
border-radius: 6px;
|
|
264
|
+
padding: 10px 16px;
|
|
265
|
+
font-weight: 600;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
display: inline-flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 6px;
|
|
270
|
+
transition: background 0.15s ease;
|
|
271
|
+
}
|
|
272
|
+
.print-btn:hover {
|
|
273
|
+
background: #334155;
|
|
274
|
+
}
|
|
275
|
+
.top-actions {
|
|
276
|
+
display: flex;
|
|
277
|
+
gap: 8px;
|
|
278
|
+
flex-wrap: wrap;
|
|
279
|
+
}
|
|
280
|
+
.filter-bar {
|
|
281
|
+
display: flex;
|
|
282
|
+
gap: 8px;
|
|
283
|
+
margin-bottom: 14px;
|
|
284
|
+
flex-wrap: wrap;
|
|
285
|
+
}
|
|
286
|
+
.filter-btn {
|
|
287
|
+
background: #f1f5f9;
|
|
288
|
+
color: #475569;
|
|
289
|
+
border: 1px solid #cbd5e1;
|
|
290
|
+
padding: 6px 14px;
|
|
291
|
+
border-radius: 20px;
|
|
292
|
+
font-size: 12px;
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
}
|
|
296
|
+
.filter-btn.active {
|
|
297
|
+
background: #2563eb;
|
|
298
|
+
color: #ffffff;
|
|
299
|
+
border-color: #2563eb;
|
|
300
|
+
}
|
|
301
|
+
@media print {
|
|
302
|
+
body { background: #fff; padding: 0; }
|
|
303
|
+
.container { border: none; box-shadow: none; padding: 0; }
|
|
304
|
+
.print-btn, .top-actions, .filter-bar { display: none !important; }
|
|
305
|
+
}
|
|
306
|
+
</style>
|
|
307
|
+
</head>
|
|
308
|
+
<body>
|
|
309
|
+
<div class="container">
|
|
310
|
+
<div class="top-bar">
|
|
311
|
+
<div>
|
|
312
|
+
<span class="badge">Laporan Insiden RewindLog • Standalone Portable Viewer</span>
|
|
313
|
+
<h1>${o((r==null?void 0:r.title)||"Laporan Kendala Operasional Aplikasi")}</h1>
|
|
314
|
+
<div style="font-size: 13px; color: #64748b;">
|
|
315
|
+
ID Laporan: <strong>${o((n==null?void 0:n.reportId)||"-")}</strong> •
|
|
316
|
+
Waktu Ekspor: <strong>${o(n!=null&&n.exportedAt?new Date(n.exportedAt).toLocaleString("id-ID"):"-")}</strong> •
|
|
317
|
+
Pelapor: <strong>${o(((h=n==null?void 0:n.user)==null?void 0:h.name)||"Operator Cabang")} (${o(((d=n==null?void 0:n.user)==null?void 0:d.role)||"-")})</strong>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
<div class="top-actions">
|
|
321
|
+
<button class="print-btn" onclick="window.print()">🖨️ Cetak / PDF</button>
|
|
322
|
+
<button class="print-btn" style="background: #0284c7;" onclick="downloadRawJsonPayload()">📥 Unduh JSON</button>
|
|
323
|
+
<button class="print-btn" style="background: #16a34a;" onclick="copyTicketText()">📋 Salin Tiket</button>
|
|
324
|
+
</div>
|
|
325
|
+
</div>
|
|
326
|
+
|
|
327
|
+
<div class="verdict-box">
|
|
328
|
+
<div class="verdict-title">Status: ${o(e.overallStatus)} — ${o(e.statusHeadline)}</div>
|
|
329
|
+
<div style="font-size: 14px; color: #1e293b; margin-bottom: 10px;">
|
|
330
|
+
<strong>Penjelasan Singkat (Bahasa Awam):</strong><br/>
|
|
331
|
+
${o(e.plainExplanation)}
|
|
332
|
+
</div>
|
|
333
|
+
<div style="font-size: 13px; color: #334155;">
|
|
334
|
+
<strong>Diagnosis Penyebab:</strong> ${o(e.rootCauseDiagnosis)}<br/>
|
|
335
|
+
<strong>Rekomendasi Tim Penanganan:</strong> <span style="font-weight: 700; text-decoration: underline;">${o(e.recommendedTeam)}</span>
|
|
336
|
+
</div>
|
|
337
|
+
</div>
|
|
338
|
+
|
|
339
|
+
${r!=null&&r.description?`<div class="info-box">
|
|
340
|
+
<strong>Catatan Pelapor / Kronologi Keluhan:</strong><br/>
|
|
341
|
+
${o(r.description)}
|
|
342
|
+
</div>`:""}
|
|
343
|
+
|
|
344
|
+
<div class="grid-4">
|
|
345
|
+
<div class="metric-card">
|
|
346
|
+
<div class="metric-label">Durasi Sesi Rekaman</div>
|
|
347
|
+
<div class="metric-value">${o(e.keyMetrics.sessionDurationLabel)}</div>
|
|
348
|
+
<div style="font-size: 12px; color: #64748b;">${e.keyMetrics.totalUserInteractions} interaksi layar</div>
|
|
349
|
+
</div>
|
|
350
|
+
<div class="metric-card">
|
|
351
|
+
<div class="metric-label">Koneksi ke Server (API)</div>
|
|
352
|
+
<div class="metric-value">${e.keyMetrics.successfulNetworkRequests} / ${e.keyMetrics.totalNetworkRequests} Sukses</div>
|
|
353
|
+
<div style="font-size: 12px; color: #64748b;">Rata-rata respons ${e.keyMetrics.averageNetworkDurationMs} ms</div>
|
|
354
|
+
</div>
|
|
355
|
+
<div class="metric-card">
|
|
356
|
+
<div class="metric-label">Error & Peringatan</div>
|
|
357
|
+
<div class="metric-value">${e.keyMetrics.systemErrorsCount} Error</div>
|
|
358
|
+
<div style="font-size: 12px; color: #64748b;">${e.keyMetrics.consoleWarningsCount} peringatan sistem</div>
|
|
359
|
+
</div>
|
|
360
|
+
<div class="metric-card">
|
|
361
|
+
<div class="metric-label">Keamanan Data Bank</div>
|
|
362
|
+
<div class="metric-value">${e.keyMetrics.protectedPiiCount} Disensor</div>
|
|
363
|
+
<div style="font-size: 12px; color: #059669; font-weight: 600;">✓ PCI-DSS & OJK Aman</div>
|
|
364
|
+
</div>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<h2>Langkah Tindak Lanjut yang Disarankan</h2>
|
|
368
|
+
<ul>
|
|
369
|
+
${e.recommendedActionSteps.map(m=>`<li style="margin-bottom: 6px; font-size: 14px;">${o(m)}</li>`).join("")}
|
|
370
|
+
</ul>
|
|
371
|
+
|
|
372
|
+
<h2>Kronologi Kejadian Langkah-demi-Langkah (Interaktif)</h2>
|
|
373
|
+
<div class="filter-bar">
|
|
374
|
+
<button class="filter-btn active" onclick="filterTimeline('all', this)">Semua Langkah (${e.storyline.length})</button>
|
|
375
|
+
<button class="filter-btn" onclick="filterTimeline('critical', this)">Hanya Error & API Gagal</button>
|
|
376
|
+
<button class="filter-btn" onclick="filterTimeline('network', this)">Aktivitas Jaringan (API)</button>
|
|
377
|
+
<button class="filter-btn" onclick="filterTimeline('action', this)">Interaksi Pengguna</button>
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<div class="timeline" id="timelineContainer">
|
|
381
|
+
${e.storyline.map(m=>`<div class="step" data-category="${o(m.category)}">
|
|
382
|
+
<div class="step-header">
|
|
383
|
+
<span class="step-badge">${o(m.badgeText)}</span>
|
|
384
|
+
<span>Pukul ${o(m.timeClockLabel)} (Detik ke-${o(m.relativeTimeLabel)})</span>
|
|
385
|
+
</div>
|
|
386
|
+
<div class="step-title">${o(m.titlePlain)}</div>
|
|
387
|
+
<div class="step-detail">${o(m.detailPlain)}</div>
|
|
388
|
+
${m.technicalNote?`<div style="font-size: 11px; color: #64748b; margin-top: 4px; font-family: monospace;">Info Teknis: ${o(m.technicalNote)}</div>`:""}
|
|
389
|
+
</div>`).join("")}
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<div style="margin-top: 28px; padding-top: 16px; border-top: 1px solid #e2e8f0; font-size: 12px; color: #64748b; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;">
|
|
393
|
+
<div>
|
|
394
|
+
<strong>Bukti Kepatuhan Keamanan Perbankan (SHA-256):</strong> ${o(((f=n==null?void 0:n.securityAudit)==null?void 0:f.integrityHashSha256)||"Signed at export")}
|
|
395
|
+
</div>
|
|
396
|
+
<div>
|
|
397
|
+
<span style="color: #059669; font-weight: 600;">✓ RewindLog Standalone Edition (Nol Server Diperlukan)</span>
|
|
398
|
+
</div>
|
|
399
|
+
</div>
|
|
400
|
+
</div>
|
|
401
|
+
|
|
402
|
+
<script id="rewindlog-raw-payload" type="application/json">
|
|
403
|
+
${JSON.stringify(t).replace(/<\//g,"<\\/")}
|
|
404
|
+
<\/script>
|
|
405
|
+
|
|
406
|
+
<script>
|
|
407
|
+
function downloadRawJsonPayload() {
|
|
408
|
+
var raw = document.getElementById('rewindlog-raw-payload').textContent;
|
|
409
|
+
var blob = new Blob([raw], { type: 'application/json' });
|
|
410
|
+
var url = URL.createObjectURL(blob);
|
|
411
|
+
var a = document.createElement('a');
|
|
412
|
+
a.href = url;
|
|
413
|
+
a.download = 'rewindlog-${(n==null?void 0:n.reportId)||Date.now()}.json';
|
|
414
|
+
document.body.appendChild(a);
|
|
415
|
+
a.click();
|
|
416
|
+
document.body.removeChild(a);
|
|
417
|
+
setTimeout(function() { URL.revokeObjectURL(url); }, 1000);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
function filterTimeline(type, btn) {
|
|
421
|
+
document.querySelectorAll('.filter-btn').forEach(function(b) { b.classList.remove('active'); });
|
|
422
|
+
btn.classList.add('active');
|
|
423
|
+
var steps = document.querySelectorAll('#timelineContainer .step');
|
|
424
|
+
steps.forEach(function(el) {
|
|
425
|
+
var cat = el.getAttribute('data-category');
|
|
426
|
+
if (type === 'all') {
|
|
427
|
+
el.style.display = 'block';
|
|
428
|
+
} else if (type === 'critical') {
|
|
429
|
+
el.style.display = (cat === 'error' || cat === 'network-fail') ? 'block' : 'none';
|
|
430
|
+
} else if (type === 'network') {
|
|
431
|
+
el.style.display = (cat.indexOf('network') !== -1) ? 'block' : 'none';
|
|
432
|
+
} else if (type === 'action') {
|
|
433
|
+
el.style.display = (cat === 'user-action' || cat === 'start') ? 'block' : 'none';
|
|
434
|
+
}
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
function copyTicketText() {
|
|
439
|
+
var title = ${JSON.stringify((r==null?void 0:r.title)||"Kendala Operasional")};
|
|
440
|
+
var status = ${JSON.stringify(e.overallStatus)};
|
|
441
|
+
var text = '🚨 [LAPORAN REWINDLOG] ' + title + ' (' + status + ')\\n' +
|
|
442
|
+
'ID: ${o((n==null?void 0:n.reportId)||"-")}\\n' +
|
|
443
|
+
'Waktu: ${o(n!=null&&n.exportedAt?new Date(n.exportedAt).toLocaleString("id-ID"):"-")}\\n' +
|
|
444
|
+
'Ringkasan: ' + ${JSON.stringify(e.plainExplanation)} + '\\n' +
|
|
445
|
+
'Penyebab: ' + ${JSON.stringify(e.rootCauseDiagnosis)} + '\\n' +
|
|
446
|
+
'Rekomendasi Tim: ' + ${JSON.stringify(e.recommendedTeam)};
|
|
447
|
+
navigator.clipboard.writeText(text).then(function() {
|
|
448
|
+
alert('Ringkasan tiket berhasil disalin ke clipboard!');
|
|
449
|
+
}).catch(function() {
|
|
450
|
+
alert('Gagal menyalin ke clipboard.');
|
|
451
|
+
});
|
|
452
|
+
}
|
|
453
|
+
<\/script>
|
|
454
|
+
</body>
|
|
455
|
+
</html>`,c=new Blob([l],{type:"text/html;charset=utf-8"}),u=URL.createObjectURL(c),a=document.createElement("a");a.href=u,a.download=`rewindlog-laporan-mudah-dibaca-${Date.now()}.html`,document.body.appendChild(a),a.click(),document.body.removeChild(a),setTimeout(()=>URL.revokeObjectURL(u),1e3)}function Ql(t){var o,l,c,u;const e=t.executiveSummary??yt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 **KRITIS (ON-CALL ALERT)**":e.overallStatus==="PERLU_PERHATIAN"?"🟡 **PERLU PERHATIAN**":"🟢 **NORMAL / SEHAT**",s=e.storyline.slice(-5).map(a=>`* **[${a.timeClockLabel}]** \`${a.badgeText}\`: ${a.titlePlain} — *${a.detailPlain}*`).join(`
|
|
456
|
+
`);return[`### 🚨 [ON-CALL INCIDENT] RewindLog Alert: ${(n==null?void 0:n.title)||"Kendala Operasional Aplikasi"}`,`**ID Insiden:** \`${(r==null?void 0:r.reportId)||"N/A"}\` | **Status:** ${i}`,`**Rekomendasi Tim On-Call:** 🎯 **${e.recommendedTeam}**`,`**Pelapor:** **${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"}** (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"}) | **Waktu:** ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"}`,`**URL Terdampak:** \`${(r==null?void 0:r.url)||"-"}\``,"","> **Ringkasan Kejadian (Bahasa Awam):**",`> ${e.plainExplanation.replace(/\n/g,`
|
|
457
|
+
> `)}`,"","**Diagnosis Akar Masalah:**",`${e.rootCauseDiagnosis}`,"","**Metrik & Kepatuhan Bank:**",`* **Koneksi API:** ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} Berhasil (Rata-rata ${e.keyMetrics.averageNetworkDurationMs} ms)`,`* **Error Sistem:** ${e.keyMetrics.systemErrorsCount} Error runtime, ${e.keyMetrics.consoleWarningsCount} peringatan`,`* **Keamanan Data (PCI-DSS & OJK):** 🛡️ ${e.keyMetrics.protectedPiiCount} data sensitif nasabah otomatis disensor`,"","**5 Langkah Terakhir Sebelum Kendala:**",s,"",`*SHA-256 Tamper-Proof Seal: \`${((u=(c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)==null?void 0:u.slice(0,32))||"Signed"}...\`*`].join(`
|
|
458
|
+
`)}function Zl(t){var c,u,a;const e=t.executiveSummary??yt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 KRITIS":e.overallStatus==="PERLU_PERHATIAN"?"🟡 PERLU PERHATIAN":"🟢 SEHAT",s=(c=t.networkLogs)==null?void 0:c.filter(h=>h.status===0||h.status>=400).slice(-1)[0],o=(u=t.errorLogs)==null?void 0:u.slice(-1)[0],l=o?`Error: ${o.message.slice(0,60)}`:s?`API Fail: ${s.method} ${Tr(s.url)} (${s.status})`:e.statusHeadline;return[`🚨 [RewindLog ${i}] ${(n==null?void 0:n.title)||"Kendala Operasional"} @ ${(r==null?void 0:r.url)||"Aplikasi"}`,`↳ Detail: ${l} | Tim: ${e.recommendedTeam} | Durasi: ${e.keyMetrics.sessionDurationLabel} | Pelapor: ${((a=r==null?void 0:r.user)==null?void 0:a.name)||"Operator"} | 🛡️ PCI-DSS Disensor`].join(`
|
|
459
|
+
`)}function ec(t){var o,l,c;const e=t.executiveSummary??yt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"#ffebe6":e.overallStatus==="PERLU_PERHATIAN"?"#fff0b3":"#e3fcef",s=e.storyline.slice(-6).map(u=>`* [${u.timeClockLabel} / +${u.relativeTimeLabel}] *${u.badgeText}*: ${u.titlePlain} - ${u.detailPlain}`).join(`
|
|
460
|
+
`);return[`h2. 🚨 Laporan Insiden RewindLog: ${(n==null?void 0:n.title)||"Kendala Operasional"}`,`{panel:title=Status Insiden: ${e.overallStatus} - ${e.statusHeadline}|bgColor=${i}}`,`*ID Laporan:* ${(r==null?void 0:r.reportId)||"N/A"}`,`*Rekomendasi Tim Penanganan:* *${e.recommendedTeam}*`,`*Pelapor:* ${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"} (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"})`,`*Waktu Kejadian:* ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"}`,`*Halaman URL:* ${(r==null?void 0:r.url)||"-"}`,"{panel}","","h3. 📋 Penjelasan Singkat (Non-Teknis)",`${e.plainExplanation}`,"","h3. 🔍 Diagnosis Akar Masalah",`${e.rootCauseDiagnosis}`,"","h3. 📊 Metrik Sesi Pengguna",`* *Durasi & Interaksi:* ${e.keyMetrics.sessionDurationLabel} (${e.keyMetrics.totalUserInteractions} interaksi layar)`,`* *Koneksi API:* ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} sukses (Rata-rata respons: ${e.keyMetrics.averageNetworkDurationMs} ms)`,`* *Error & Peringatan:* ${e.keyMetrics.systemErrorsCount} error, ${e.keyMetrics.consoleWarningsCount} peringatan sistem`,`* *Kepatuhan Data Bank (OJK / PCI-DSS):* 🛡️ ${e.keyMetrics.protectedPiiCount} data sensitif disensor otomatis`,"","h3. ⏱️ 6 Langkah Terakhir Sebelum Kendala Terjadi",s,"","h3. 🔒 Verifikasi Keamanan SHA-256",`{code}${((c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)||"Signed at runtime"}{code}`].join(`
|
|
461
|
+
`)}function tc(t){var o,l,c,u;const e=t.executiveSummary??yt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?":red_circle: *KRITIS*":e.overallStatus==="PERLU_PERHATIAN"?":warning: *PERLU PERHATIAN*":":white_check_mark: *SEHAT*",s=e.storyline.slice(-5).map(a=>`• \`+${a.relativeTimeLabel}\` *${a.badgeText}*: ${a.titlePlain} — _${a.detailPlain}_`).join(`
|
|
462
|
+
`);return[`🚨 *LAPORAN INSIDEN REWINDLOG* | \`${(r==null?void 0:r.reportId)||"N/A"}\``,`*Status:* ${i} — *${e.statusHeadline}*`,`*Judul:* ${(n==null?void 0:n.title)||"Kendala Operasional"}`,`*Rekomendasi Tim:* :dart: \`${e.recommendedTeam}\``,`*Pelapor:* *${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"}* (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"}) | ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleTimeString("id-ID"):"-"}`,`*URL:* \`${(r==null?void 0:r.url)||"-"}\``,"",">>> *Penjelasan Singkat (Non-Teknis):*",`${e.plainExplanation}`,"","*Diagnosis Akar Masalah:*",`${e.rootCauseDiagnosis}`,"","*Metrik Sesi:*",`• Durasi Layar: *${e.keyMetrics.sessionDurationLabel}* (${e.keyMetrics.totalUserInteractions} aksi)`,`• API: *${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests}* sukses (${e.keyMetrics.averageNetworkDurationMs} ms avg)`,`• Error: *${e.keyMetrics.systemErrorsCount}* | Warning: *${e.keyMetrics.consoleWarningsCount}*`,`• Proteksi PII (PCI-DSS & OJK): :shield: *${e.keyMetrics.protectedPiiCount}* data rahasia disensor`,"","*Kronologi Langkah Terakhir:*",s,"",`_SHA-256 Tamper-Proof Hash: \`${((u=(c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)==null?void 0:u.slice(0,32))||"Signed"}...\`_`].join(`
|
|
463
|
+
`)}function Ts(t){var o,l;const e=t.executiveSummary??yt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 KRITIS":e.overallStatus==="PERLU_PERHATIAN"?"🟡 PERLU PERHATIAN":"🟢 SEHAT",s=e.storyline.slice(-5).map(c=>`• [${c.timeClockLabel}] *${c.badgeText}*: ${c.titlePlain}`).join(`
|
|
464
|
+
`);return["🚨 *LAPORAN INSIDEN REWINDLOG*","━━━━━━━━━━━━━━━━━━━━━━━━━━",`*ID Laporan:* ${(r==null?void 0:r.reportId)||"N/A"}`,`*Status:* ${i} - ${e.statusHeadline}`,`*Judul:* ${(n==null?void 0:n.title)||"Kendala Operasional"}`,`*Tim Penanganan:* 🎯 ${e.recommendedTeam}`,`*Pelapor:* ${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"} (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"})`,`*Waktu:* ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"}`,"","📋 *KRONOLOGI MASALAH (BAHASA AWAM):*",`${e.plainExplanation}`,"","🔍 *DIAGNOSIS PENYEBAB:*",`${e.rootCauseDiagnosis}`,"","📊 *RINGKASAN TEKNIS:*",`• Durasi Sesi: ${e.keyMetrics.sessionDurationLabel}`,`• API Server: ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} sukses`,`• Error Terdeteksi: ${e.keyMetrics.systemErrorsCount} error`,`• Sensor Data Bank: 🛡️ ${e.keyMetrics.protectedPiiCount} data rahasia otomatis disensor (PCI-DSS/OJK)`,"","⏱️ *LANGKAH SEBELUM GANGGUAN:*",s,"","🔒 *Verifikasi Integritas:* SHA-256 Valid"].join(`
|
|
465
|
+
`)}function rc(t){var o,l,c;const e=t.executiveSummary??yt(t),r=t.metadata,n=t.issue,i=e.overallStatus==="KRITIS"?"🔴 **KRITIS**":e.overallStatus==="PERLU_PERHATIAN"?"🟡 **PERLU PERHATIAN**":"🟢 **SEHAT**",s=e.storyline.slice(-6).map(u=>`1. **[${u.timeClockLabel} / +${u.relativeTimeLabel}]** \`${u.badgeText}\`: ${u.titlePlain} - *${u.detailPlain}*`).join(`
|
|
466
|
+
`);return[`# 🚨 Laporan Insiden RewindLog: ${(n==null?void 0:n.title)||"Kendala Operasional"}`,"","| Parameter | Nilai |","| :--- | :--- |",`| **Status Insiden** | ${i} — ${e.statusHeadline} |`,`| **ID Laporan** | \`${(r==null?void 0:r.reportId)||"N/A"}\` |`,`| **Rekomendasi Tim** | **${e.recommendedTeam}** |`,`| **Pelapor** | ${((o=r==null?void 0:r.user)==null?void 0:o.name)||"Operator"} (${((l=r==null?void 0:r.user)==null?void 0:l.role)||"-"}) |`,`| **Waktu Kejadian** | ${r!=null&&r.exportedAt?new Date(r.exportedAt).toLocaleString("id-ID"):"-"} |`,`| **URL Halaman** | \`${(r==null?void 0:r.url)||"-"}\` |`,"","## 📋 Penjelasan Singkat (Non-Teknis)",`> ${e.plainExplanation.replace(/\n/g,`
|
|
467
|
+
> `)}`,"","## 🔍 Diagnosis Akar Masalah",`${e.rootCauseDiagnosis}`,"","## 📊 Metrik Sesi Pengguna",`- **Durasi & Interaksi:** ${e.keyMetrics.sessionDurationLabel} (${e.keyMetrics.totalUserInteractions} interaksi layar)`,`- **Koneksi API:** ${e.keyMetrics.successfulNetworkRequests}/${e.keyMetrics.totalNetworkRequests} sukses (rata-rata respons: ${e.keyMetrics.averageNetworkDurationMs} ms)`,`- **Error & Peringatan:** ${e.keyMetrics.systemErrorsCount} error, ${e.keyMetrics.consoleWarningsCount} peringatan`,`- **Keamanan Data (PCI-DSS & OJK):** 🛡️ ${e.keyMetrics.protectedPiiCount} data rahasia nasabah disensor otomatis`,"","## ⏱️ Kronologi Langkah Terakhir",s,"","## 🛡️ Tanda Tangan Integritas (SHA-256)","```text",`${((c=r==null?void 0:r.securityAudit)==null?void 0:c.integrityHashSha256)||"Signed"}`,"```"].join(`
|
|
468
|
+
`)}function Et(t,e="whatsapp"){switch(e){case"whatsapp":return Ts(t);case"teams":return Ql(t);case"slack":return tc(t);case"jira":return ec(t);case"markdown":return rc(t);case"compact":return Zl(t);default:return Ts(t)}}const nc="2.0.0-banking-enterprise",jh=6,Bh=6e4,Fh=50,Uh=100,Wh=50,zh=100,Hh=65536;class As{constructor(e={}){Pe(this,"mode");Pe(this,"domEvents",[[]]);Pe(this,"networkLogs",[]);Pe(this,"consoleLogs",[]);Pe(this,"errorLogs",[]);Pe(this,"breadcrumbs",[]);Pe(this,"config");Pe(this,"redactedHeaders");Pe(this,"redactedBodyKeys");Pe(this,"user",null);Pe(this,"tags",{});Pe(this,"totalRedactionsCount",0);Pe(this,"stopRrwebRecorder",null);Pe(this,"originalFetch",null);Pe(this,"originalXHROpen",null);Pe(this,"originalXHRSend",null);Pe(this,"originalXHRSetRequestHeader",null);Pe(this,"originalConsole",{});Pe(this,"boundErrorHandler",null);Pe(this,"boundRejectionHandler",null);Pe(this,"boundUnloadHandler",null);Pe(this,"isStarted",!1);Pe(this,"sessionStartedAt",Date.now());Pe(this,"lastCheckoutAt",Date.now());Pe(this,"listeners",new Set);this.mode=e.mode??"enterprise";const r=this.mode==="lite"?void 0:"/api/v1/rewindlog/ingest";this.config={mode:this.mode,ticketFormat:e.ticketFormat??"whatsapp",checkoutEveryNms:e.checkoutEveryNms??Bh,maxDomBlocks:e.maxDomBlocks??jh,maxNetworkLogs:e.maxNetworkLogs??Fh,maxConsoleLogs:e.maxConsoleLogs??Uh,maxErrorLogs:e.maxErrorLogs??Wh,maxBreadcrumbs:e.maxBreadcrumbs??zh,maxBodyLength:e.maxBodyLength??Hh,bankingComplianceMode:e.bankingComplianceMode??!0,maskAllInputs:e.maskAllInputs??!1,blockClass:e.blockClass??"rewindlog-block",maskTextClass:e.maskTextClass??"rewindlog-mask",captureConsole:e.captureConsole??!0,captureExceptions:e.captureExceptions??!0,wipeMemoryOnUnload:e.wipeMemoryOnUnload??!0,ignoreUrls:e.ignoreUrls??["/api/v1/rewindlog","/healthz","/readyz","/metrics"],environment:e.environment??"production",release:e.release??"2.0.0",endpointUrl:e.endpointUrl??r},this.setTag("edition",this.mode==="lite"?"lite-ephemeral-ram":"enterprise-infra-storage"),this.redactedHeaders=new Set([...Ah,...(e.additionalRedactedHeaders??[]).map(n=>n.trim().toLowerCase())]),this.redactedBodyKeys=new Set([...Ih,...(e.additionalRedactedBodyKeys??[]).map(n=>n.trim().toLowerCase())]),e.user&&(this.user=this.sanitizeUserObject(e.user))}start(){this.isStarted||typeof window>"u"||(this.isStarted=!0,this.sessionStartedAt=Date.now(),this.lastCheckoutAt=Date.now(),this.initDomRecorder(),this.initNetworkInterceptor(),this.config.captureConsole&&this.initConsoleInterceptor(),this.config.captureExceptions&&this.initExceptionInterceptor(),this.config.wipeMemoryOnUnload&&(this.boundUnloadHandler=()=>{this.purgeMemory(!1)},window.addEventListener("pagehide",this.boundUnloadHandler)),this.addBreadcrumb({category:"security",message:"RewindLog Banking-Grade SDK initialized (PCI-DSS v4.0 / OJK / UU-PDP mode)",data:{environment:this.config.environment,bankingComplianceMode:this.config.bankingComplianceMode,maskAllInputs:this.config.maskAllInputs}}),this.notifyListeners())}stop(){this.isStarted&&(this.stopRrwebRecorder&&(this.stopRrwebRecorder(),this.stopRrwebRecorder=null),this.originalFetch&&(window.fetch=this.originalFetch,this.originalFetch=null),this.originalXHROpen&&(XMLHttpRequest.prototype.open=this.originalXHROpen,this.originalXHROpen=null),this.originalXHRSend&&(XMLHttpRequest.prototype.send=this.originalXHRSend,this.originalXHRSend=null),this.originalXHRSetRequestHeader&&(XMLHttpRequest.prototype.setRequestHeader=this.originalXHRSetRequestHeader,this.originalXHRSetRequestHeader=null),this.boundUnloadHandler&&(window.removeEventListener("pagehide",this.boundUnloadHandler),this.boundUnloadHandler=null),this.restoreConsole(),this.restoreExceptionInterceptor(),this.isStarted=!1,this.notifyListeners())}setMaskAllInputs(e){this.config.maskAllInputs!==e&&(this.config.maskAllInputs=e,this.isStarted&&(this.stopRrwebRecorder&&(this.stopRrwebRecorder(),this.stopRrwebRecorder=null),this.domEvents.push([]),this.domEvents.length>this.config.maxDomBlocks&&this.domEvents.shift(),this.initDomRecorder()),this.addBreadcrumb({category:"security",message:`Strict DOM maskAllInputs set to ${e}`}),this.notifyListeners())}purgeMemory(e=!0){if(this.domEvents=[[]],this.networkLogs=[],this.consoleLogs=[],this.errorLogs=[],this.breadcrumbs=[],this.totalRedactionsCount=0,this.lastCheckoutAt=Date.now(),e&&this.isStarted){try{gt.takeFullSnapshot(!0)}catch{}this.addBreadcrumb({category:"security",message:"In-memory Ring Buffers cryptographically purged (Session Zeroized)"})}this.notifyListeners()}setUser(e){var r;this.user=e?this.sanitizeUserObject(e):null,this.addBreadcrumb({category:"lifecycle",message:e?`Authenticated operator set (${(r=this.user)==null?void 0:r.id})`:"User context cleared"}),this.notifyListeners()}sanitizeUserObject(e){return{...e,email:e.email?this.config.bankingComplianceMode?Ve(e.email,r=>this.incrementRedactions(r)):e.email:void 0}}setTag(e,r){this.tags[e]=this.config.bankingComplianceMode?Ve(r,n=>this.incrementRedactions(n)):r,this.notifyListeners()}addBreadcrumb(e){const r=this.config.bankingComplianceMode?Ve(e.message,n=>this.incrementRedactions(n)):e.message;this.breadcrumbs.push({id:this.generateId("bc"),timestamp:Date.now(),...e,message:r}),this.breadcrumbs.length>this.config.maxBreadcrumbs&&this.breadcrumbs.shift(),this.notifyListeners()}captureException(e,r){const n=e instanceof Error?e:new Error(String(e)),i=r?`${r}: ${n.message}`:n.message;this.recordErrorLog({id:this.generateId("err"),type:"manual",message:this.config.bankingComplianceMode?Ve(i,s=>this.incrementRedactions(s)):i,stack:n.stack?this.config.bankingComplianceMode?Ve(n.stack):n.stack:void 0,timestamp:Date.now()})}subscribe(e){return this.listeners.add(e),e(this.getStats()),()=>{this.listeners.delete(e)}}getStats(){const e=this.domEvents.map(i=>i.length),r=e.reduce((i,s)=>i+s,0),n=Math.max(1,Math.round((r*340+this.networkLogs.length*1400+this.consoleLogs.length*220+this.errorLogs.length*450)/1024));return{mode:this.mode,isEphemeralRamOnly:this.mode==="lite",hasEndpointConfigured:!!this.config.endpointUrl,ticketFormat:this.config.ticketFormat,isRecording:this.isStarted,bankingComplianceMode:this.config.bankingComplianceMode,maskAllInputs:this.config.maskAllInputs,activeDomBlocks:this.domEvents.length,maxDomBlocks:this.config.maxDomBlocks,domBlockSizes:e,totalDomEvents:r,networkLogsCount:this.networkLogs.length,maxNetworkLogs:this.config.maxNetworkLogs,consoleLogsCount:this.consoleLogs.length,errorLogsCount:this.errorLogs.length,breadcrumbsCount:this.breadcrumbs.length,totalRedactionsCount:this.totalRedactionsCount,estimatedMemoryKB:n,sessionStartedAt:this.sessionStartedAt,lastCheckoutAt:this.lastCheckoutAt}}getMode(){return this.mode}getTicketFormat(){return this.config.ticketFormat}setTicketFormat(e){this.config.ticketFormat=e,this.notifyListeners()}setMode(e){this.mode!==e&&(this.mode=e,this.config.mode=e,e==="lite"?this.config.endpointUrl=void 0:this.config.endpointUrl=this.config.endpointUrl||"/api/v1/rewindlog/ingest",this.setTag("edition",e==="lite"?"lite-ephemeral-ram":"enterprise-infra-storage"),this.addBreadcrumb({category:"lifecycle",message:`Switched RewindLog operating mode to ${e.toUpperCase()} edition`,data:{mode:e}}),this.notifyListeners())}getQuickShareTicket(e="whatsapp",r){const n=this.getSnapshot(r);return Et(n,e)}exportStandaloneHtmlReport(e){const r=this.getSnapshot(e);sr(r)}forceCheckout(){if(this.isStarted)try{gt.takeFullSnapshot(!0)}catch{}}initDomRecorder(){try{const e=gt({emit:(r,n)=>{n&&(this.domEvents.push([]),this.lastCheckoutAt=Date.now(),this.domEvents.length>this.config.maxDomBlocks&&this.domEvents.shift()),this.domEvents.length===0&&this.domEvents.push([]),this.domEvents[this.domEvents.length-1].push(r),this.notifyListeners()},checkoutEveryNms:this.config.checkoutEveryNms,maskAllInputs:this.config.maskAllInputs,maskInputOptions:{password:!0,tel:this.config.bankingComplianceMode,email:this.config.bankingComplianceMode},maskInputFn:(r,n)=>{if(!r)return r;if(this.config.maskAllInputs)return"•".repeat(Math.min(r.length,12));const i=n?`${n.getAttribute("name")||""} ${n.getAttribute("id")||""} ${n.getAttribute("placeholder")||""} ${n.getAttribute("autocomplete")||""}`.toLowerCase():"";return/(password|pin|mpin|otp|cvv|cvc|pan|card|rekening|norek|nik|npwp|secret|token|saldo|balance)/.test(i)?(this.incrementRedactions(1),"•".repeat(Math.min(r.length,10))):this.config.bankingComplianceMode?Ve(r,s=>this.incrementRedactions(s)):r},maskTextSelector:this.config.bankingComplianceMode?"*":void 0,maskTextFn:r=>!r||!this.config.bankingComplianceMode?r:Ve(r,n=>this.incrementRedactions(n)),blockClass:this.config.blockClass,maskTextClass:this.config.maskTextClass});this.stopRrwebRecorder=e??null}catch(e){this.safeConsoleError("[RewindLog] Failed to initialize DOM recorder:",e)}}initNetworkInterceptor(){this.patchFetch(),this.patchXHR()}shouldIgnoreUrl(e){return e?this.config.endpointUrl&&e.includes(this.config.endpointUrl)?!0:this.config.ignoreUrls.some(r=>typeof r=="string"?e.includes(r):r.test(e)):!1}patchFetch(){if(typeof window.fetch!="function")return;const e=window.fetch.bind(window);this.originalFetch=e,window.fetch=async(r,n)=>{const i=performance.now(),s=Date.now();let o="GET",l="",c={},u=null;try{typeof r=="string"?l=r:r instanceof URL?l=r.toString():r instanceof Request&&(l=r.url,o=r.method||"GET",c=this.sanitizeHeaders(r.headers)),n!=null&&n.method?o=n.method.toUpperCase():o=o.toUpperCase(),n!=null&&n.headers&&(c={...c,...this.sanitizeHeaders(n.headers)}),(n==null?void 0:n.body)!==void 0&&(n==null?void 0:n.body)!==null&&(u=this.sanitizeBodyText(this.serializeBody(n.body)))}catch{}if(this.shouldIgnoreUrl(l))return e(r,n);const a=this.config.bankingComplianceMode?Sn(l,h=>this.incrementRedactions(h)):l;try{const h=await e(r,n),d=Math.round(performance.now()-i),f=this.sanitizeHeaders(h.headers);try{h.clone().text().then(p=>{this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:h.status,ok:h.ok,requestHeaders:c,responseHeaders:f,requestBody:u,responseBody:this.sanitizeBodyText(p),durationMs:d,timestamp:s})}).catch(()=>{this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:h.status,ok:h.ok,requestHeaders:c,responseHeaders:f,requestBody:u,responseBody:"[Unable to read response stream]",durationMs:d,timestamp:s})})}catch{this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:h.status,ok:h.ok,requestHeaders:c,responseHeaders:f,requestBody:u,responseBody:"[Response clone failed]",durationMs:d,timestamp:s})}return h}catch(h){const d=Math.round(performance.now()-i),f=h instanceof Error?h.message:"Network Request Failed";throw this.recordNetworkLog({id:this.generateId("net"),type:"fetch",method:o,url:a,status:0,ok:!1,requestHeaders:c,requestBody:u,responseBody:`Network Error: ${f}`,durationMs:d,timestamp:s,error:f}),h}}}patchXHR(){if(typeof XMLHttpRequest>"u")return;const e=this,r=XMLHttpRequest.prototype.open,n=XMLHttpRequest.prototype.send,i=XMLHttpRequest.prototype.setRequestHeader;this.originalXHROpen=r,this.originalXHRSend=n,this.originalXHRSetRequestHeader=i,XMLHttpRequest.prototype.open=function(s,o,l=!0,c,u){return this._rewindMethod=(s||"GET").toUpperCase(),this._rewindUrl=typeof o=="string"?o:o.toString(),this._rewindHeaders={},r.call(this,s,o,l,c??null,u??null)},XMLHttpRequest.prototype.setRequestHeader=function(s,o){try{this._rewindHeaders||(this._rewindHeaders={});const l=s.trim().toLowerCase();e.redactedHeaders.has(l)?e.incrementRedactions(1):this._rewindHeaders[s]=e.config.bankingComplianceMode?Ve(o,c=>e.incrementRedactions(c)):o}catch{}return i.call(this,s,o)},XMLHttpRequest.prototype.send=function(s){const o=this._rewindUrl||"";if(e.shouldIgnoreUrl(o))return n.call(this,s);const l=e.config.bankingComplianceMode?Sn(o,a=>e.incrementRedactions(a)):o;this._rewindStartTime=performance.now();const c=Date.now();this._rewindRequestBody=e.sanitizeBodyText(e.serializeBody(s));const u=()=>{var a;try{const h=this._rewindStartTime?Math.round(performance.now()-this._rewindStartTime):0;let d=null;this.responseType===""||this.responseType==="text"?d=typeof this.responseText=="string"?this.responseText:null:this.responseType==="json"?d=this.response!==void 0?JSON.stringify(this.response):null:d=`[${this.responseType} payload]`;const f=((a=this.getAllResponseHeaders)==null?void 0:a.call(this))||"",m=e.parseRawXHRHeaders(f);e.recordNetworkLog({id:e.generateId("net"),type:"xhr",method:this._rewindMethod||"GET",url:l,status:this.status,ok:this.status>=200&&this.status<300,requestHeaders:this._rewindHeaders,responseHeaders:m,requestBody:this._rewindRequestBody??null,responseBody:e.sanitizeBodyText(d),durationMs:h,timestamp:c})}catch{}finally{this.removeEventListener("loadend",u)}};return this.addEventListener("loadend",u),n.call(this,s)}}initConsoleInterceptor(){["log","info","warn","error"].forEach(r=>{var i;const n=(i=console[r])==null?void 0:i.bind(console);typeof n=="function"&&(this.originalConsole[r]=n,console[r]=(...s)=>{try{const o=s.map(c=>this.formatConsoleArg(c)),l=o.join(" ");if(!l.startsWith("[RewindLog]")){const c=this.config.bankingComplianceMode?Ve(l,u=>this.incrementRedactions(u)):l;this.consoleLogs.push({id:this.generateId("con"),level:r,message:this.truncateString(c,4e3),args:o.map(u=>this.truncateString(this.config.bankingComplianceMode?Ve(u):u,2e3)),timestamp:Date.now()}),this.consoleLogs.length>this.config.maxConsoleLogs&&this.consoleLogs.shift(),this.notifyListeners()}}catch{}n(...s)})})}restoreConsole(){["log","info","warn","error"].forEach(r=>{this.originalConsole[r]&&(console[r]=this.originalConsole[r])}),this.originalConsole={}}initExceptionInterceptor(){this.boundErrorHandler=e=>{const r=e.message||"Uncaught Window Error";this.recordErrorLog({id:this.generateId("err"),type:"uncaught-error",message:this.config.bankingComplianceMode?Ve(r,n=>this.incrementRedactions(n)):r,stack:e.error instanceof Error&&e.error.stack?this.config.bankingComplianceMode?Ve(e.error.stack):e.error.stack:void 0,source:e.filename,lineno:e.lineno,colno:e.colno,timestamp:Date.now()})},this.boundRejectionHandler=e=>{const r=e.reason,n=r instanceof Error?r.message:typeof r=="string"?r:"Unhandled Promise Rejection";this.recordErrorLog({id:this.generateId("err"),type:"unhandled-rejection",message:this.config.bankingComplianceMode?Ve(n,i=>this.incrementRedactions(i)):n,stack:r instanceof Error&&r.stack?this.config.bankingComplianceMode?Ve(r.stack):r.stack:void 0,timestamp:Date.now()})},window.addEventListener("error",this.boundErrorHandler),window.addEventListener("unhandledrejection",this.boundRejectionHandler)}restoreExceptionInterceptor(){this.boundErrorHandler&&(window.removeEventListener("error",this.boundErrorHandler),this.boundErrorHandler=null),this.boundRejectionHandler&&(window.removeEventListener("unhandledrejection",this.boundRejectionHandler),this.boundRejectionHandler=null)}sanitizeHeaders(e){const r={};if(!e)return r;try{const n=(i,s)=>{if(this.redactedHeaders.has(i.trim().toLowerCase())){this.incrementRedactions(1);return}r[i]=this.config.bankingComplianceMode?Ve(s,o=>this.incrementRedactions(o)):s};if(e instanceof Headers)e.forEach((i,s)=>n(s,i));else if(Array.isArray(e))for(const[i,s]of e)n(i,s);else if(typeof e=="object")for(const[i,s]of Object.entries(e))s!==void 0&&n(i,String(s))}catch{}return r}parseRawXHRHeaders(e){const r={};if(!e)return r;const n=e.trim().split(/[\r\n]+/);for(const i of n){const s=i.split(": "),o=s.shift(),l=s.join(": ");o&&(this.redactedHeaders.has(o.trim().toLowerCase())?this.incrementRedactions(1):r[o.trim()]=this.config.bankingComplianceMode?Ve(l,c=>this.incrementRedactions(c)):l)}return r}sanitizeBodyText(e){if(e==null)return null;const r=e.trim();if(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))try{const i=JSON.parse(r),s=this.scrubJsonValue(i,0);return this.truncateString(JSON.stringify(s,null,2),this.config.maxBodyLength)}catch{}const n=this.config.bankingComplianceMode?Ve(e,i=>this.incrementRedactions(i)):e;return this.truncateString(n,this.config.maxBodyLength)}scrubJsonValue(e,r){if(r>8||e===null||e===void 0)return e;if(typeof e=="string")return this.config.bankingComplianceMode?Ve(e,n=>this.incrementRedactions(n)):e;if(Array.isArray(e))return e.map(n=>this.scrubJsonValue(n,r+1));if(typeof e=="object"){const n={};for(const[i,s]of Object.entries(e)){const o=i.trim().toLowerCase();this.redactedBodyKeys.has(o)?(this.incrementRedactions(1),n[i]="[REDACTED_BANKING_PII]"):n[i]=this.scrubJsonValue(s,r+1)}return n}return e}serializeBody(e){if(e==null)return null;if(typeof e=="string")return e;if(e instanceof URLSearchParams){const r={};return e.forEach((n,i)=>{this.redactedBodyKeys.has(i.trim().toLowerCase())?(this.incrementRedactions(1),r[i]="[REDACTED_BANKING_PII]"):r[i]=this.config.bankingComplianceMode?Ve(n,s=>this.incrementRedactions(s)):n}),new URLSearchParams(r).toString()}if(e instanceof FormData){const r={};return e.forEach((n,i)=>{this.redactedBodyKeys.has(i.trim().toLowerCase())?(this.incrementRedactions(1),r[i]="[REDACTED_BANKING_PII]"):r[i]=typeof n=="string"?this.config.bankingComplianceMode?Ve(n,s=>this.incrementRedactions(s)):n:`[File: ${n.name}]`}),JSON.stringify(r)}return e instanceof Blob?`[Blob: ${e.type||"unknown"}, ${e.size} bytes]`:e instanceof ArrayBuffer||ArrayBuffer.isView(e)?`[Binary data: ${e.byteLength} bytes]`:"[Stream or Document Body]"}formatConsoleArg(e){if(typeof e=="string")return e;if(e instanceof Error)return`${e.name}: ${e.message}${e.stack?`
|
|
469
|
+
${e.stack}`:""}`;if(typeof e=="object"&&e!==null)try{return JSON.stringify(this.scrubJsonValue(e,0))}catch{return Object.prototype.toString.call(e)}return String(e)}truncateString(e,r){return e.length<=r?e:`${e.slice(0,r)}... [Truncated ${e.length-r} chars]`}incrementRedactions(e){this.totalRedactionsCount+=e}recordNetworkLog(e){this.networkLogs.push(e),this.networkLogs.length>this.config.maxNetworkLogs&&this.networkLogs.shift(),this.notifyListeners()}recordErrorLog(e){this.errorLogs.push(e),this.errorLogs.length>this.config.maxErrorLogs&&this.errorLogs.shift(),this.notifyListeners()}buildMetadata(e,r,n,i=!1){const s=Date.now(),o=typeof window<"u"?window.location.href:"";return{reportId:this.generateId("rwl"),sdkVersion:nc,environment:this.config.environment,release:this.config.release,exportedAt:new Date(s).toISOString(),exportedTimestamp:s,sessionStartedAt:this.sessionStartedAt,sessionDurationMs:s-this.sessionStartedAt,url:this.config.bankingComplianceMode?Sn(o):o,userAgent:typeof navigator<"u"?navigator.userAgent:"",language:typeof navigator<"u"?navigator.language:"en",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC",viewport:{width:typeof window<"u"?window.innerWidth:0,height:typeof window<"u"?window.innerHeight:0,devicePixelRatio:typeof window<"u"&&window.devicePixelRatio||1},user:this.user?{...this.user}:null,tags:{...this.tags},securityAudit:{complianceProfile:"BANKING_PCI_DSS_V4_OJK_UUPDP",piiScrubbingEnabled:this.config.bankingComplianceMode,maskAllDomInputs:this.config.maskAllInputs,domTextPatternMasking:this.config.bankingComplianceMode,urlQuerySanitization:this.config.bankingComplianceMode,totalRedactionsCount:this.totalRedactionsCount,integrityAlgorithm:"SHA-256",integrityHashSha256:n,encryptedAtRest:i},ringBufferStats:{activeDomBlocks:this.domEvents.length,maxDomBlocks:this.config.maxDomBlocks,checkoutIntervalMs:this.config.checkoutEveryNms,totalDomEvents:e,networkLogsCount:this.networkLogs.length,maxNetworkLogs:this.config.maxNetworkLogs,consoleLogsCount:this.consoleLogs.length,errorLogsCount:this.errorLogs.length,estimatedPayloadKB:r}}}getSnapshot(e,r,n=!1){const i=this.domEvents.flat(),s=this.getStats(),o={...e?{issue:e}:{},metadata:this.buildMetadata(i.length,s.estimatedMemoryKB,r,n),networkLogs:[...this.networkLogs],consoleLogs:[...this.consoleLogs],errorLogs:[...this.errorLogs],breadcrumbs:[...this.breadcrumbs],domEvents:i};return{executiveSummary:yt(o),...o}}exportBugReport(e){const r=(e==null?void 0:e.download)??!0,n=e!=null&&e.title||e!=null&&e.description||e!=null&&e.severity||e!=null&&e.stepsToReproduce?{title:e.title,description:e.description,severity:e.severity??"high",stepsToReproduce:e.stepsToReproduce,reportedBy:e.reportedBy??this.user??void 0}:void 0,i=this.getSnapshot(n);return r&&typeof document<"u"&&nr(i).then(s=>{i.metadata.securityAudit.integrityHashSha256=s,this.triggerFileDownload(JSON.stringify(i,null,2),`rewindlog-${i.metadata.exportedTimestamp}.json`)}).catch(()=>{this.triggerFileDownload(JSON.stringify(i,null,2),`rewindlog-${i.metadata.exportedTimestamp}.json`)}),i}async exportSecureBankingReport(e){const r=e.title||e.description||e.severity||e.stepsToReproduce?{title:e.title,description:e.description,severity:e.severity??"high",stepsToReproduce:e.stepsToReproduce,reportedBy:e.reportedBy??this.user??void 0}:void 0,n=!!(e.passphrase&&e.passphrase.trim().length>0),i=this.getSnapshot(r,void 0,n),s=await nr(i);if(i.metadata.securityAudit.integrityHashSha256=s,(e.download??!0)&&typeof document<"u"){const l=i.metadata.exportedTimestamp;if(n&&e.passphrase){const c=await ks(JSON.stringify(i),e.passphrase.trim());this.triggerFileDownload(JSON.stringify(c,null,2),`rewindlog-encrypted-${l}.json`)}else this.triggerFileDownload(JSON.stringify(i,null,2),`rewindlog-${l}.json`)}return{payload:i,sha256Hex:s,encrypted:n}}triggerFileDownload(e,r){try{const n=new Blob([e],{type:"application/json"}),i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download=r,document.body.appendChild(s),s.click(),document.body.removeChild(s),setTimeout(()=>{URL.revokeObjectURL(i)},1e3)}catch(n){this.safeConsoleError("[RewindLog] Failed to trigger file download:",n)}}async sendBugReport(e,r){const n=e||this.config.endpointUrl||"/api/v1/rewindlog/ingest",i=this.getSnapshot(r),s=await nr(i);i.metadata.securityAudit.integrityHashSha256=s;const l=await(this.originalFetch??window.fetch.bind(window))(n,{method:"POST",headers:{"Content-Type":"application/json","X-RewindLog-Version":nc,"X-RewindLog-Integrity-SHA256":s},body:JSON.stringify(i)});let c={};try{c=await l.json()}catch{}return{ok:l.ok,status:l.status,payload:i,fileName:c.fileName,reportId:c.reportId,sha256:c.sha256??s}}notifyListeners(){if(this.listeners.size===0)return;const e=this.getStats();this.listeners.forEach(r=>{try{r(e)}catch{}})}safeConsoleError(...e){(this.originalConsole.error??console.error)(...e)}generateId(e){return`${e}_${Date.now().toString(36)}_${Math.random().toString(36).slice(2,7)}`}}var Is={exports:{}},Ar={},Os={exports:{}},me={};/**
|
|
470
|
+
* @license React
|
|
471
|
+
* react.production.min.js
|
|
472
|
+
*
|
|
473
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
474
|
+
*
|
|
475
|
+
* This source code is licensed under the MIT license found in the
|
|
476
|
+
* LICENSE file in the root directory of this source tree.
|
|
477
|
+
*/var ic;function qh(){if(ic)return me;ic=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),a=Symbol.for("react.lazy"),h=Symbol.iterator;function d(T){return T===null||typeof T!="object"?null:(T=h&&T[h]||T["@@iterator"],typeof T=="function"?T:null)}var f={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,p={};function y(T,U,D){this.props=T,this.context=U,this.refs=p,this.updater=D||f}y.prototype.isReactComponent={},y.prototype.setState=function(T,U){if(typeof T!="object"&&typeof T!="function"&&T!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,T,U,"setState")},y.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function v(){}v.prototype=y.prototype;function w(T,U,D){this.props=T,this.context=U,this.refs=p,this.updater=D||f}var b=w.prototype=new v;b.constructor=w,m(b,y.prototype),b.isPureReactComponent=!0;var C=Array.isArray,S=Object.prototype.hasOwnProperty,x={current:null},k={key:!0,ref:!0,__self:!0,__source:!0};function I(T,U,D){var te,ie={},Ce=null,se=null;if(U!=null)for(te in U.ref!==void 0&&(se=U.ref),U.key!==void 0&&(Ce=""+U.key),U)S.call(U,te)&&!k.hasOwnProperty(te)&&(ie[te]=U[te]);var le=arguments.length-2;if(le===1)ie.children=D;else if(1<le){for(var pe=Array(le),Te=0;Te<le;Te++)pe[Te]=arguments[Te+2];ie.children=pe}if(T&&T.defaultProps)for(te in le=T.defaultProps,le)ie[te]===void 0&&(ie[te]=le[te]);return{$$typeof:t,type:T,key:Ce,ref:se,props:ie,_owner:x.current}}function B(T,U){return{$$typeof:t,type:T.type,key:U,ref:T.ref,props:T.props,_owner:T._owner}}function _(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function H(T){var U={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(D){return U[D]})}var z=/\/+/g;function A(T,U){return typeof T=="object"&&T!==null&&T.key!=null?H(""+T.key):U.toString(36)}function be(T,U,D,te,ie){var Ce=typeof T;(Ce==="undefined"||Ce==="boolean")&&(T=null);var se=!1;if(T===null)se=!0;else switch(Ce){case"string":case"number":se=!0;break;case"object":switch(T.$$typeof){case t:case e:se=!0}}if(se)return se=T,ie=ie(se),T=te===""?"."+A(se,0):te,C(ie)?(D="",T!=null&&(D=T.replace(z,"$&/")+"/"),be(ie,U,D,"",function(Te){return Te})):ie!=null&&(_(ie)&&(ie=B(ie,D+(!ie.key||se&&se.key===ie.key?"":(""+ie.key).replace(z,"$&/")+"/")+T)),U.push(ie)),1;if(se=0,te=te===""?".":te+":",C(T))for(var le=0;le<T.length;le++){Ce=T[le];var pe=te+A(Ce,le);se+=be(Ce,U,D,pe,ie)}else if(pe=d(T),typeof pe=="function")for(T=pe.call(T),le=0;!(Ce=T.next()).done;)Ce=Ce.value,pe=te+A(Ce,le++),se+=be(Ce,U,D,pe,ie);else if(Ce==="object")throw U=String(T),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.");return se}function he(T,U,D){if(T==null)return T;var te=[],ie=0;return be(T,te,"","",function(Ce){return U.call(D,Ce,ie++)}),te}function ne(T){if(T._status===-1){var U=T._result;U=U(),U.then(function(D){(T._status===0||T._status===-1)&&(T._status=1,T._result=D)},function(D){(T._status===0||T._status===-1)&&(T._status=2,T._result=D)}),T._status===-1&&(T._status=0,T._result=U)}if(T._status===1)return T._result.default;throw T._result}var F={current:null},de={transition:null},j={ReactCurrentDispatcher:F,ReactCurrentBatchConfig:de,ReactCurrentOwner:x};function X(){throw Error("act(...) is not supported in production builds of React.")}return me.Children={map:he,forEach:function(T,U,D){he(T,function(){U.apply(this,arguments)},D)},count:function(T){var U=0;return he(T,function(){U++}),U},toArray:function(T){return he(T,function(U){return U})||[]},only:function(T){if(!_(T))throw Error("React.Children.only expected to receive a single React element child.");return T}},me.Component=y,me.Fragment=r,me.Profiler=i,me.PureComponent=w,me.StrictMode=n,me.Suspense=c,me.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j,me.act=X,me.cloneElement=function(T,U,D){if(T==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+T+".");var te=m({},T.props),ie=T.key,Ce=T.ref,se=T._owner;if(U!=null){if(U.ref!==void 0&&(Ce=U.ref,se=x.current),U.key!==void 0&&(ie=""+U.key),T.type&&T.type.defaultProps)var le=T.type.defaultProps;for(pe in U)S.call(U,pe)&&!k.hasOwnProperty(pe)&&(te[pe]=U[pe]===void 0&&le!==void 0?le[pe]:U[pe])}var pe=arguments.length-2;if(pe===1)te.children=D;else if(1<pe){le=Array(pe);for(var Te=0;Te<pe;Te++)le[Te]=arguments[Te+2];te.children=le}return{$$typeof:t,type:T.type,key:ie,ref:Ce,props:te,_owner:se}},me.createContext=function(T){return T={$$typeof:o,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},T.Provider={$$typeof:s,_context:T},T.Consumer=T},me.createElement=I,me.createFactory=function(T){var U=I.bind(null,T);return U.type=T,U},me.createRef=function(){return{current:null}},me.forwardRef=function(T){return{$$typeof:l,render:T}},me.isValidElement=_,me.lazy=function(T){return{$$typeof:a,_payload:{_status:-1,_result:T},_init:ne}},me.memo=function(T,U){return{$$typeof:u,type:T,compare:U===void 0?null:U}},me.startTransition=function(T){var U=de.transition;de.transition={};try{T()}finally{de.transition=U}},me.unstable_act=X,me.useCallback=function(T,U){return F.current.useCallback(T,U)},me.useContext=function(T){return F.current.useContext(T)},me.useDebugValue=function(){},me.useDeferredValue=function(T){return F.current.useDeferredValue(T)},me.useEffect=function(T,U){return F.current.useEffect(T,U)},me.useId=function(){return F.current.useId()},me.useImperativeHandle=function(T,U,D){return F.current.useImperativeHandle(T,U,D)},me.useInsertionEffect=function(T,U){return F.current.useInsertionEffect(T,U)},me.useLayoutEffect=function(T,U){return F.current.useLayoutEffect(T,U)},me.useMemo=function(T,U){return F.current.useMemo(T,U)},me.useReducer=function(T,U,D){return F.current.useReducer(T,U,D)},me.useRef=function(T){return F.current.useRef(T)},me.useState=function(T){return F.current.useState(T)},me.useSyncExternalStore=function(T,U,D){return F.current.useSyncExternalStore(T,U,D)},me.useTransition=function(){return F.current.useTransition()},me.version="18.3.1",me}var Ir={exports:{}};/**
|
|
478
|
+
* @license React
|
|
479
|
+
* react.development.js
|
|
480
|
+
*
|
|
481
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
482
|
+
*
|
|
483
|
+
* This source code is licensed under the MIT license found in the
|
|
484
|
+
* LICENSE file in the root directory of this source tree.
|
|
485
|
+
*/Ir.exports;var sc;function Vh(){return sc||(sc=1,function(t,e){process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var r="18.3.1",n=Symbol.for("react.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),y=Symbol.iterator,v="@@iterator";function w(g){if(g===null||typeof g!="object")return null;var R=y&&g[y]||g[v];return typeof R=="function"?R:null}var b={current:null},C={transition:null},S={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},x={current:null},k={},I=null;function B(g){I=g}k.setExtraStackFrame=function(g){I=g},k.getCurrentStack=null,k.getStackAddendum=function(){var g="";I&&(g+=I);var R=k.getCurrentStack;return R&&(g+=R()||""),g};var _=!1,H=!1,z=!1,A=!1,be=!1,he={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:C,ReactCurrentOwner:x};he.ReactDebugCurrentFrame=k,he.ReactCurrentActQueue=S;function ne(g){{for(var R=arguments.length,O=new Array(R>1?R-1:0),P=1;P<R;P++)O[P-1]=arguments[P];de("warn",g,O)}}function F(g){{for(var R=arguments.length,O=new Array(R>1?R-1:0),P=1;P<R;P++)O[P-1]=arguments[P];de("error",g,O)}}function de(g,R,O){{var P=he.ReactDebugCurrentFrame,q=P.getStackAddendum();q!==""&&(R+="%s",O=O.concat([q]));var oe=O.map(function(J){return String(J)});oe.unshift("Warning: "+R),Function.prototype.apply.call(console[g],console,oe)}}var j={};function X(g,R){{var O=g.constructor,P=O&&(O.displayName||O.name)||"ReactClass",q=P+"."+R;if(j[q])return;F("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",R,P),j[q]=!0}}var T={isMounted:function(g){return!1},enqueueForceUpdate:function(g,R,O){X(g,"forceUpdate")},enqueueReplaceState:function(g,R,O,P){X(g,"replaceState")},enqueueSetState:function(g,R,O,P){X(g,"setState")}},U=Object.assign,D={};Object.freeze(D);function te(g,R,O){this.props=g,this.context=R,this.refs=D,this.updater=O||T}te.prototype.isReactComponent={},te.prototype.setState=function(g,R){if(typeof g!="object"&&typeof g!="function"&&g!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,g,R,"setState")},te.prototype.forceUpdate=function(g){this.updater.enqueueForceUpdate(this,g,"forceUpdate")};{var ie={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},Ce=function(g,R){Object.defineProperty(te.prototype,g,{get:function(){ne("%s(...) is deprecated in plain JavaScript React classes. %s",R[0],R[1])}})};for(var se in ie)ie.hasOwnProperty(se)&&Ce(se,ie[se])}function le(){}le.prototype=te.prototype;function pe(g,R,O){this.props=g,this.context=R,this.refs=D,this.updater=O||T}var Te=pe.prototype=new le;Te.constructor=pe,U(Te,te.prototype),Te.isPureReactComponent=!0;function ee(){var g={current:null};return Object.seal(g),g}var Ie=Array.isArray;function re(g){return Ie(g)}function ze(g){{var R=typeof Symbol=="function"&&Symbol.toStringTag,O=R&&g[Symbol.toStringTag]||g.constructor.name||"Object";return O}}function ae(g){try{return je(g),!1}catch{return!0}}function je(g){return""+g}function ve(g){if(ae(g))return F("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ze(g)),je(g)}function vt(g,R,O){var P=g.displayName;if(P)return P;var q=R.displayName||R.name||"";return q!==""?O+"("+q+")":O}function kt(g){return g.displayName||"Context"}function Xe(g){if(g==null)return null;if(typeof g.tag=="number"&&F("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof g=="function")return g.displayName||g.name||null;if(typeof g=="string")return g;switch(g){case s:return"Fragment";case i:return"Portal";case l:return"Profiler";case o:return"StrictMode";case h:return"Suspense";case d:return"SuspenseList"}if(typeof g=="object")switch(g.$$typeof){case u:var R=g;return kt(R)+".Consumer";case c:var O=g;return kt(O._context)+".Provider";case a:return vt(g,g.render,"ForwardRef");case f:var P=g.displayName||null;return P!==null?P:Xe(g.type)||"Memo";case m:{var q=g,oe=q._payload,J=q._init;try{return Xe(J(oe))}catch{return null}}}return null}var Mt=Object.prototype.hasOwnProperty,Dt={key:!0,ref:!0,__self:!0,__source:!0},it,Wt,Tt;Tt={};function N(g){if(Mt.call(g,"ref")){var R=Object.getOwnPropertyDescriptor(g,"ref").get;if(R&&R.isReactWarning)return!1}return g.ref!==void 0}function Q(g){if(Mt.call(g,"key")){var R=Object.getOwnPropertyDescriptor(g,"key").get;if(R&&R.isReactWarning)return!1}return g.key!==void 0}function Oe(g,R){var O=function(){it||(it=!0,F("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};O.isReactWarning=!0,Object.defineProperty(g,"key",{get:O,configurable:!0})}function et(g,R){var O=function(){Wt||(Wt=!0,F("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",R))};O.isReactWarning=!0,Object.defineProperty(g,"ref",{get:O,configurable:!0})}function nt(g){if(typeof g.ref=="string"&&x.current&&g.__self&&x.current.stateNode!==g.__self){var R=Xe(x.current.type);Tt[R]||(F('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R,g.ref),Tt[R]=!0)}}var ft=function(g,R,O,P,q,oe,J){var ce={$$typeof:n,type:g,key:R,ref:O,props:J,_owner:oe};return ce._store={},Object.defineProperty(ce._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ce,"_self",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.defineProperty(ce,"_source",{configurable:!1,enumerable:!1,writable:!1,value:q}),Object.freeze&&(Object.freeze(ce.props),Object.freeze(ce)),ce};function or(g,R,O){var P,q={},oe=null,J=null,ce=null,ke=null;if(R!=null){N(R)&&(J=R.ref,nt(R)),Q(R)&&(ve(R.key),oe=""+R.key),ce=R.__self===void 0?null:R.__self,ke=R.__source===void 0?null:R.__source;for(P in R)Mt.call(R,P)&&!Dt.hasOwnProperty(P)&&(q[P]=R[P])}var De=arguments.length-2;if(De===1)q.children=O;else if(De>1){for(var Fe=Array(De),Ue=0;Ue<De;Ue++)Fe[Ue]=arguments[Ue+2];Object.freeze&&Object.freeze(Fe),q.children=Fe}if(g&&g.defaultProps){var qe=g.defaultProps;for(P in qe)q[P]===void 0&&(q[P]=qe[P])}if(oe||J){var Ke=typeof g=="function"?g.displayName||g.name||"Unknown":g;oe&&Oe(q,Ke),J&&et(q,Ke)}return ft(g,oe,J,ce,ke,x.current,q)}function _r(g,R){var O=ft(g.type,R,g.ref,g._self,g._source,g._owner,g.props);return O}function Dr(g,R,O){if(g==null)throw new Error("React.cloneElement(...): The argument must be a React element, but you passed "+g+".");var P,q=U({},g.props),oe=g.key,J=g.ref,ce=g._self,ke=g._source,De=g._owner;if(R!=null){N(R)&&(J=R.ref,De=x.current),Q(R)&&(ve(R.key),oe=""+R.key);var Fe;g.type&&g.type.defaultProps&&(Fe=g.type.defaultProps);for(P in R)Mt.call(R,P)&&!Dt.hasOwnProperty(P)&&(R[P]===void 0&&Fe!==void 0?q[P]=Fe[P]:q[P]=R[P])}var Ue=arguments.length-2;if(Ue===1)q.children=O;else if(Ue>1){for(var qe=Array(Ue),Ke=0;Ke<Ue;Ke++)qe[Ke]=arguments[Ke+2];q.children=qe}return ft(g.type,oe,J,ce,ke,De,q)}function wt(g){return typeof g=="object"&&g!==null&&g.$$typeof===n}var Rn=".",_s=":";function Lr(g){var R=/[=:]/g,O={"=":"=0",":":"=2"},P=g.replace(R,function(q){return O[q]});return"$"+P}var Pr=!1,Lt=/\/+/g;function ar(g){return g.replace(Lt,"$&/")}function zt(g,R){return typeof g=="object"&&g!==null&&g.key!=null?(ve(g.key),Lr(""+g.key)):R.toString(36)}function Ht(g,R,O,P,q){var oe=typeof g;(oe==="undefined"||oe==="boolean")&&(g=null);var J=!1;if(g===null)J=!0;else switch(oe){case"string":case"number":J=!0;break;case"object":switch(g.$$typeof){case n:case i:J=!0}}if(J){var ce=g,ke=q(ce),De=P===""?Rn+zt(ce,0):P;if(re(ke)){var Fe="";De!=null&&(Fe=ar(De)+"/"),Ht(ke,R,Fe,"",function(bp){return bp})}else ke!=null&&(wt(ke)&&(ke.key&&(!ce||ce.key!==ke.key)&&ve(ke.key),ke=_r(ke,O+(ke.key&&(!ce||ce.key!==ke.key)?ar(""+ke.key)+"/":"")+De)),R.push(ke));return 1}var Ue,qe,Ke=0,Ze=P===""?Rn:P+_s;if(re(g))for(var Dn=0;Dn<g.length;Dn++)Ue=g[Dn],qe=Ze+zt(Ue,Dn),Ke+=Ht(Ue,R,O,qe,q);else{var Ys=w(g);if(typeof Ys=="function"){var _c=g;Ys===_c.entries&&(Pr||ne("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Pr=!0);for(var gp=Ys.call(_c),Dc,yp=0;!(Dc=gp.next()).done;)Ue=Dc.value,qe=Ze+zt(Ue,yp++),Ke+=Ht(Ue,R,O,qe,q)}else if(oe==="object"){var Lc=String(g);throw new Error("Objects are not valid as a React child (found: "+(Lc==="[object Object]"?"object with keys {"+Object.keys(g).join(", ")+"}":Lc)+"). If you meant to render a collection of children, use an array instead.")}}return Ke}function lr(g,R,O){if(g==null)return g;var P=[],q=0;return Ht(g,P,"","",function(oe){return R.call(O,oe,q++)}),P}function En(g){var R=0;return lr(g,function(){R++}),R}function Ds(g,R,O){lr(g,function(){R.apply(this,arguments)},O)}function kn(g){return lr(g,function(R){return R})||[]}function Mn(g){if(!wt(g))throw new Error("React.Children.only expected to receive a single React element child.");return g}function Ls(g){var R={$$typeof:u,_currentValue:g,_currentValue2:g,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};R.Provider={$$typeof:c,_context:R};var O=!1,P=!1,q=!1;{var oe={$$typeof:u,_context:R};Object.defineProperties(oe,{Provider:{get:function(){return P||(P=!0,F("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?")),R.Provider},set:function(J){R.Provider=J}},_currentValue:{get:function(){return R._currentValue},set:function(J){R._currentValue=J}},_currentValue2:{get:function(){return R._currentValue2},set:function(J){R._currentValue2=J}},_threadCount:{get:function(){return R._threadCount},set:function(J){R._threadCount=J}},Consumer:{get:function(){return O||(O=!0,F("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")),R.Consumer}},displayName:{get:function(){return R.displayName},set:function(J){q||(ne("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",J),q=!0)}}}),R.Consumer=oe}return R._currentRenderer=null,R._currentRenderer2=null,R}var qt=-1,cr=0,$r=1,Ps=2;function $s(g){if(g._status===qt){var R=g._result,O=R();if(O.then(function(oe){if(g._status===cr||g._status===qt){var J=g;J._status=$r,J._result=oe}},function(oe){if(g._status===cr||g._status===qt){var J=g;J._status=Ps,J._result=oe}}),g._status===qt){var P=g;P._status=cr,P._result=O}}if(g._status===$r){var q=g._result;return q===void 0&&F(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
486
|
+
|
|
487
|
+
Your code should look like:
|
|
488
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
489
|
+
|
|
490
|
+
Did you accidentally put curly braces around the import?`,q),"default"in q||F(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
491
|
+
|
|
492
|
+
Your code should look like:
|
|
493
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,q),q.default}else throw g._result}function js(g){var R={_status:qt,_result:g},O={$$typeof:m,_payload:R,_init:$s};{var P,q;Object.defineProperties(O,{defaultProps:{configurable:!0,get:function(){return P},set:function(oe){F("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),P=oe,Object.defineProperty(O,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return q},set:function(oe){F("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),q=oe,Object.defineProperty(O,"propTypes",{enumerable:!0})}}})}return O}function Bs(g){g!=null&&g.$$typeof===f?F("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof g!="function"?F("forwardRef requires a render function but was given %s.",g===null?"null":typeof g):g.length!==0&&g.length!==2&&F("forwardRef render functions accept exactly two parameters: props and ref. %s",g.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),g!=null&&(g.defaultProps!=null||g.propTypes!=null)&&F("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");var R={$$typeof:a,render:g};{var O;Object.defineProperty(R,"displayName",{enumerable:!1,configurable:!0,get:function(){return O},set:function(P){O=P,!g.name&&!g.displayName&&(g.displayName=P)}})}return R}var E;E=Symbol.for("react.module.reference");function W(g){return!!(typeof g=="string"||typeof g=="function"||g===s||g===l||be||g===o||g===h||g===d||A||g===p||_||H||z||typeof g=="object"&&g!==null&&(g.$$typeof===m||g.$$typeof===f||g.$$typeof===c||g.$$typeof===u||g.$$typeof===a||g.$$typeof===E||g.getModuleId!==void 0))}function V(g,R){W(g)||F("memo: The first argument must be a component. Instead received: %s",g===null?"null":typeof g);var O={$$typeof:f,type:g,compare:R===void 0?null:R};{var P;Object.defineProperty(O,"displayName",{enumerable:!1,configurable:!0,get:function(){return P},set:function(q){P=q,!g.name&&!g.displayName&&(g.displayName=q)}})}return O}function Y(){var g=b.current;return g===null&&F(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
494
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
495
|
+
2. You might be breaking the Rules of Hooks
|
|
496
|
+
3. You might have more than one copy of React in the same app
|
|
497
|
+
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`),g}function Ne(g){var R=Y();if(g._context!==void 0){var O=g._context;O.Consumer===g?F("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):O.Provider===g&&F("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return R.useContext(g)}function _e(g){var R=Y();return R.useState(g)}function Se(g,R,O){var P=Y();return P.useReducer(g,R,O)}function ye(g){var R=Y();return R.useRef(g)}function Qe(g,R){var O=Y();return O.useEffect(g,R)}function He(g,R){var O=Y();return O.useInsertionEffect(g,R)}function Ge(g,R){var O=Y();return O.useLayoutEffect(g,R)}function st(g,R){var O=Y();return O.useCallback(g,R)}function Pt(g,R){var O=Y();return O.useMemo(g,R)}function At(g,R,O){var P=Y();return P.useImperativeHandle(g,R,O)}function tt(g,R){{var O=Y();return O.useDebugValue(g,R)}}function jr(){var g=Y();return g.useTransition()}function Fs(g){var R=Y();return R.useDeferredValue(g)}function Us(){var g=Y();return g.useId()}function Xh(g,R,O){var P=Y();return P.useSyncExternalStore(g,R,O)}var Br=0,fc,hc,pc,mc,gc,yc,bc;function vc(){}vc.__reactDisabledLog=!0;function Qh(){{if(Br===0){fc=console.log,hc=console.info,pc=console.warn,mc=console.error,gc=console.group,yc=console.groupCollapsed,bc=console.groupEnd;var g={configurable:!0,enumerable:!0,value:vc,writable:!0};Object.defineProperties(console,{info:g,log:g,warn:g,error:g,group:g,groupCollapsed:g,groupEnd:g})}Br++}}function Zh(){{if(Br--,Br===0){var g={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:U({},g,{value:fc}),info:U({},g,{value:hc}),warn:U({},g,{value:pc}),error:U({},g,{value:mc}),group:U({},g,{value:gc}),groupCollapsed:U({},g,{value:yc}),groupEnd:U({},g,{value:bc})})}Br<0&&F("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ws=he.ReactCurrentDispatcher,zs;function Tn(g,R,O){{if(zs===void 0)try{throw Error()}catch(q){var P=q.stack.trim().match(/\n( *(at )?)/);zs=P&&P[1]||""}return`
|
|
498
|
+
`+zs+g}}var Hs=!1,An;{var ep=typeof WeakMap=="function"?WeakMap:Map;An=new ep}function wc(g,R){if(!g||Hs)return"";{var O=An.get(g);if(O!==void 0)return O}var P;Hs=!0;var q=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=Ws.current,Ws.current=null,Qh();try{if(R){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(Ze){P=Ze}Reflect.construct(g,[],J)}else{try{J.call()}catch(Ze){P=Ze}g.call(J.prototype)}}else{try{throw Error()}catch(Ze){P=Ze}g()}}catch(Ze){if(Ze&&P&&typeof Ze.stack=="string"){for(var ce=Ze.stack.split(`
|
|
499
|
+
`),ke=P.stack.split(`
|
|
500
|
+
`),De=ce.length-1,Fe=ke.length-1;De>=1&&Fe>=0&&ce[De]!==ke[Fe];)Fe--;for(;De>=1&&Fe>=0;De--,Fe--)if(ce[De]!==ke[Fe]){if(De!==1||Fe!==1)do if(De--,Fe--,Fe<0||ce[De]!==ke[Fe]){var Ue=`
|
|
501
|
+
`+ce[De].replace(" at new "," at ");return g.displayName&&Ue.includes("<anonymous>")&&(Ue=Ue.replace("<anonymous>",g.displayName)),typeof g=="function"&&An.set(g,Ue),Ue}while(De>=1&&Fe>=0);break}}}finally{Hs=!1,Ws.current=oe,Zh(),Error.prepareStackTrace=q}var qe=g?g.displayName||g.name:"",Ke=qe?Tn(qe):"";return typeof g=="function"&&An.set(g,Ke),Ke}function tp(g,R,O){return wc(g,!1)}function rp(g){var R=g.prototype;return!!(R&&R.isReactComponent)}function In(g,R,O){if(g==null)return"";if(typeof g=="function")return wc(g,rp(g));if(typeof g=="string")return Tn(g);switch(g){case h:return Tn("Suspense");case d:return Tn("SuspenseList")}if(typeof g=="object")switch(g.$$typeof){case a:return tp(g.render);case f:return In(g.type,R,O);case m:{var P=g,q=P._payload,oe=P._init;try{return In(oe(q),R,O)}catch{}}}return""}var Sc={},xc=he.ReactDebugCurrentFrame;function On(g){if(g){var R=g._owner,O=In(g.type,g._source,R?R.type:null);xc.setExtraStackFrame(O)}else xc.setExtraStackFrame(null)}function np(g,R,O,P,q){{var oe=Function.call.bind(Mt);for(var J in g)if(oe(g,J)){var ce=void 0;try{if(typeof g[J]!="function"){var ke=Error((P||"React class")+": "+O+" type `"+J+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof g[J]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ke.name="Invariant Violation",ke}ce=g[J](R,J,P,O,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(De){ce=De}ce&&!(ce instanceof Error)&&(On(q),F("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",P||"React class",O,J,typeof ce),On(null)),ce instanceof Error&&!(ce.message in Sc)&&(Sc[ce.message]=!0,On(q),F("Failed %s type: %s",O,ce.message),On(null))}}}function ur(g){if(g){var R=g._owner,O=In(g.type,g._source,R?R.type:null);B(O)}else B(null)}var qs;qs=!1;function Cc(){if(x.current){var g=Xe(x.current.type);if(g)return`
|
|
502
|
+
|
|
503
|
+
Check the render method of \``+g+"`."}return""}function ip(g){if(g!==void 0){var R=g.fileName.replace(/^.*[\\\/]/,""),O=g.lineNumber;return`
|
|
504
|
+
|
|
505
|
+
Check your code at `+R+":"+O+"."}return""}function sp(g){return g!=null?ip(g.__source):""}var Rc={};function op(g){var R=Cc();if(!R){var O=typeof g=="string"?g:g.displayName||g.name;O&&(R=`
|
|
506
|
+
|
|
507
|
+
Check the top-level render call using <`+O+">.")}return R}function Ec(g,R){if(!(!g._store||g._store.validated||g.key!=null)){g._store.validated=!0;var O=op(R);if(!Rc[O]){Rc[O]=!0;var P="";g&&g._owner&&g._owner!==x.current&&(P=" It was passed a child from "+Xe(g._owner.type)+"."),ur(g),F('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',O,P),ur(null)}}}function kc(g,R){if(typeof g=="object"){if(re(g))for(var O=0;O<g.length;O++){var P=g[O];wt(P)&&Ec(P,R)}else if(wt(g))g._store&&(g._store.validated=!0);else if(g){var q=w(g);if(typeof q=="function"&&q!==g.entries)for(var oe=q.call(g),J;!(J=oe.next()).done;)wt(J.value)&&Ec(J.value,R)}}}function Mc(g){{var R=g.type;if(R==null||typeof R=="string")return;var O;if(typeof R=="function")O=R.propTypes;else if(typeof R=="object"&&(R.$$typeof===a||R.$$typeof===f))O=R.propTypes;else return;if(O){var P=Xe(R);np(O,g.props,"prop",P,g)}else if(R.PropTypes!==void 0&&!qs){qs=!0;var q=Xe(R);F("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",q||"Unknown")}typeof R.getDefaultProps=="function"&&!R.getDefaultProps.isReactClassApproved&&F("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ap(g){{for(var R=Object.keys(g.props),O=0;O<R.length;O++){var P=R[O];if(P!=="children"&&P!=="key"){ur(g),F("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),ur(null);break}}g.ref!==null&&(ur(g),F("Invalid attribute `ref` supplied to `React.Fragment`."),ur(null))}}function Tc(g,R,O){var P=W(g);if(!P){var q="";(g===void 0||typeof g=="object"&&g!==null&&Object.keys(g).length===0)&&(q+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var oe=sp(R);oe?q+=oe:q+=Cc();var J;g===null?J="null":re(g)?J="array":g!==void 0&&g.$$typeof===n?(J="<"+(Xe(g.type)||"Unknown")+" />",q=" Did you accidentally export a JSX literal instead of a component?"):J=typeof g,F("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",J,q)}var ce=or.apply(this,arguments);if(ce==null)return ce;if(P)for(var ke=2;ke<arguments.length;ke++)kc(arguments[ke],g);return g===s?ap(ce):Mc(ce),ce}var Ac=!1;function lp(g){var R=Tc.bind(null,g);return R.type=g,Ac||(Ac=!0,ne("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")),Object.defineProperty(R,"type",{enumerable:!1,get:function(){return ne("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:g}),g}}),R}function cp(g,R,O){for(var P=Dr.apply(this,arguments),q=2;q<arguments.length;q++)kc(arguments[q],P.type);return Mc(P),P}function up(g,R){var O=C.transition;C.transition={};var P=C.transition;C.transition._updatedFibers=new Set;try{g()}finally{if(C.transition=O,O===null&&P._updatedFibers){var q=P._updatedFibers.size;q>10&&ne("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),P._updatedFibers.clear()}}}var Ic=!1,Nn=null;function dp(g){if(Nn===null)try{var R=("require"+Math.random()).slice(0,7),O=t&&t[R];Nn=O.call(t,"timers").setImmediate}catch{Nn=function(q){Ic===!1&&(Ic=!0,typeof MessageChannel>"u"&&F("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var oe=new MessageChannel;oe.port1.onmessage=q,oe.port2.postMessage(void 0)}}return Nn(g)}var dr=0,Oc=!1;function Nc(g){{var R=dr;dr++,S.current===null&&(S.current=[]);var O=S.isBatchingLegacy,P;try{if(S.isBatchingLegacy=!0,P=g(),!O&&S.didScheduleLegacyUpdate){var q=S.current;q!==null&&(S.didScheduleLegacyUpdate=!1,Ks(q))}}catch(qe){throw _n(R),qe}finally{S.isBatchingLegacy=O}if(P!==null&&typeof P=="object"&&typeof P.then=="function"){var oe=P,J=!1,ce={then:function(qe,Ke){J=!0,oe.then(function(Ze){_n(R),dr===0?Vs(Ze,qe,Ke):qe(Ze)},function(Ze){_n(R),Ke(Ze)})}};return!Oc&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){J||(Oc=!0,F("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),ce}else{var ke=P;if(_n(R),dr===0){var De=S.current;De!==null&&(Ks(De),S.current=null);var Fe={then:function(qe,Ke){S.current===null?(S.current=[],Vs(ke,qe,Ke)):qe(ke)}};return Fe}else{var Ue={then:function(qe,Ke){qe(ke)}};return Ue}}}}function _n(g){g!==dr-1&&F("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),dr=g}function Vs(g,R,O){{var P=S.current;if(P!==null)try{Ks(P),dp(function(){P.length===0?(S.current=null,R(g)):Vs(g,R,O)})}catch(q){O(q)}else R(g)}}var Gs=!1;function Ks(g){if(!Gs){Gs=!0;var R=0;try{for(;R<g.length;R++){var O=g[R];do O=O(!0);while(O!==null)}g.length=0}catch(P){throw g=g.slice(R+1),P}finally{Gs=!1}}}var fp=Tc,hp=cp,pp=lp,mp={map:lr,forEach:Ds,count:En,toArray:kn,only:Mn};e.Children=mp,e.Component=te,e.Fragment=s,e.Profiler=l,e.PureComponent=pe,e.StrictMode=o,e.Suspense=h,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=he,e.act=Nc,e.cloneElement=hp,e.createContext=Ls,e.createElement=fp,e.createFactory=pp,e.createRef=ee,e.forwardRef=Bs,e.isValidElement=wt,e.lazy=js,e.memo=V,e.startTransition=up,e.unstable_act=Nc,e.useCallback=st,e.useContext=Ne,e.useDebugValue=tt,e.useDeferredValue=Fs,e.useEffect=Qe,e.useId=Us,e.useImperativeHandle=At,e.useInsertionEffect=He,e.useLayoutEffect=Ge,e.useMemo=Pt,e.useReducer=Se,e.useRef=ye,e.useState=_e,e.useSyncExternalStore=Xh,e.useTransition=jr,e.version=r,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Ir,Ir.exports)),Ir.exports}process.env.NODE_ENV==="production"?Os.exports=qh():Os.exports=Vh();var we=Os.exports;/**
|
|
508
|
+
* @license React
|
|
509
|
+
* react-jsx-runtime.production.min.js
|
|
510
|
+
*
|
|
511
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
512
|
+
*
|
|
513
|
+
* This source code is licensed under the MIT license found in the
|
|
514
|
+
* LICENSE file in the root directory of this source tree.
|
|
515
|
+
*/var oc;function Gh(){if(oc)return Ar;oc=1;var t=we,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,i=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var a,h={},d=null,f=null;u!==void 0&&(d=""+u),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(f=c.ref);for(a in c)n.call(c,a)&&!s.hasOwnProperty(a)&&(h[a]=c[a]);if(l&&l.defaultProps)for(a in c=l.defaultProps,c)h[a]===void 0&&(h[a]=c[a]);return{$$typeof:e,type:l,key:d,ref:f,props:h,_owner:i.current}}return Ar.Fragment=r,Ar.jsx=o,Ar.jsxs=o,Ar}var Or={};/**
|
|
516
|
+
* @license React
|
|
517
|
+
* react-jsx-runtime.development.js
|
|
518
|
+
*
|
|
519
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
520
|
+
*
|
|
521
|
+
* This source code is licensed under the MIT license found in the
|
|
522
|
+
* LICENSE file in the root directory of this source tree.
|
|
523
|
+
*/var ac;function Kh(){return ac||(ac=1,process.env.NODE_ENV!=="production"&&function(){var t=we,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),a=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator,p="@@iterator";function y(E){if(E===null||typeof E!="object")return null;var W=m&&E[m]||E[p];return typeof W=="function"?W:null}var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(E){{for(var W=arguments.length,V=new Array(W>1?W-1:0),Y=1;Y<W;Y++)V[Y-1]=arguments[Y];b("error",E,V)}}function b(E,W,V){{var Y=v.ReactDebugCurrentFrame,Ne=Y.getStackAddendum();Ne!==""&&(W+="%s",V=V.concat([Ne]));var _e=V.map(function(Se){return String(Se)});_e.unshift("Warning: "+W),Function.prototype.apply.call(console[E],console,_e)}}var C=!1,S=!1,x=!1,k=!1,I=!1,B;B=Symbol.for("react.module.reference");function _(E){return!!(typeof E=="string"||typeof E=="function"||E===n||E===s||I||E===i||E===u||E===a||k||E===f||C||S||x||typeof E=="object"&&E!==null&&(E.$$typeof===d||E.$$typeof===h||E.$$typeof===o||E.$$typeof===l||E.$$typeof===c||E.$$typeof===B||E.getModuleId!==void 0))}function H(E,W,V){var Y=E.displayName;if(Y)return Y;var Ne=W.displayName||W.name||"";return Ne!==""?V+"("+Ne+")":V}function z(E){return E.displayName||"Context"}function A(E){if(E==null)return null;if(typeof E.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case n:return"Fragment";case r:return"Portal";case s:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case a:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case l:var W=E;return z(W)+".Consumer";case o:var V=E;return z(V._context)+".Provider";case c:return H(E,E.render,"ForwardRef");case h:var Y=E.displayName||null;return Y!==null?Y:A(E.type)||"Memo";case d:{var Ne=E,_e=Ne._payload,Se=Ne._init;try{return A(Se(_e))}catch{return null}}}return null}var be=Object.assign,he=0,ne,F,de,j,X,T,U;function D(){}D.__reactDisabledLog=!0;function te(){{if(he===0){ne=console.log,F=console.info,de=console.warn,j=console.error,X=console.group,T=console.groupCollapsed,U=console.groupEnd;var E={configurable:!0,enumerable:!0,value:D,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}he++}}function ie(){{if(he--,he===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:be({},E,{value:ne}),info:be({},E,{value:F}),warn:be({},E,{value:de}),error:be({},E,{value:j}),group:be({},E,{value:X}),groupCollapsed:be({},E,{value:T}),groupEnd:be({},E,{value:U})})}he<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Ce=v.ReactCurrentDispatcher,se;function le(E,W,V){{if(se===void 0)try{throw Error()}catch(Ne){var Y=Ne.stack.trim().match(/\n( *(at )?)/);se=Y&&Y[1]||""}return`
|
|
524
|
+
`+se+E}}var pe=!1,Te;{var ee=typeof WeakMap=="function"?WeakMap:Map;Te=new ee}function Ie(E,W){if(!E||pe)return"";{var V=Te.get(E);if(V!==void 0)return V}var Y;pe=!0;var Ne=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var _e;_e=Ce.current,Ce.current=null,te();try{if(W){var Se=function(){throw Error()};if(Object.defineProperty(Se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Se,[])}catch(tt){Y=tt}Reflect.construct(E,[],Se)}else{try{Se.call()}catch(tt){Y=tt}E.call(Se.prototype)}}else{try{throw Error()}catch(tt){Y=tt}E()}}catch(tt){if(tt&&Y&&typeof tt.stack=="string"){for(var ye=tt.stack.split(`
|
|
525
|
+
`),Qe=Y.stack.split(`
|
|
526
|
+
`),He=ye.length-1,Ge=Qe.length-1;He>=1&&Ge>=0&&ye[He]!==Qe[Ge];)Ge--;for(;He>=1&&Ge>=0;He--,Ge--)if(ye[He]!==Qe[Ge]){if(He!==1||Ge!==1)do if(He--,Ge--,Ge<0||ye[He]!==Qe[Ge]){var st=`
|
|
527
|
+
`+ye[He].replace(" at new "," at ");return E.displayName&&st.includes("<anonymous>")&&(st=st.replace("<anonymous>",E.displayName)),typeof E=="function"&&Te.set(E,st),st}while(He>=1&&Ge>=0);break}}}finally{pe=!1,Ce.current=_e,ie(),Error.prepareStackTrace=Ne}var Pt=E?E.displayName||E.name:"",At=Pt?le(Pt):"";return typeof E=="function"&&Te.set(E,At),At}function re(E,W,V){return Ie(E,!1)}function ze(E){var W=E.prototype;return!!(W&&W.isReactComponent)}function ae(E,W,V){if(E==null)return"";if(typeof E=="function")return Ie(E,ze(E));if(typeof E=="string")return le(E);switch(E){case u:return le("Suspense");case a:return le("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case c:return re(E.render);case h:return ae(E.type,W,V);case d:{var Y=E,Ne=Y._payload,_e=Y._init;try{return ae(_e(Ne),W,V)}catch{}}}return""}var je=Object.prototype.hasOwnProperty,ve={},vt=v.ReactDebugCurrentFrame;function kt(E){if(E){var W=E._owner,V=ae(E.type,E._source,W?W.type:null);vt.setExtraStackFrame(V)}else vt.setExtraStackFrame(null)}function Xe(E,W,V,Y,Ne){{var _e=Function.call.bind(je);for(var Se in E)if(_e(E,Se)){var ye=void 0;try{if(typeof E[Se]!="function"){var Qe=Error((Y||"React class")+": "+V+" type `"+Se+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[Se]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Qe.name="Invariant Violation",Qe}ye=E[Se](W,Se,Y,V,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(He){ye=He}ye&&!(ye instanceof Error)&&(kt(Ne),w("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Y||"React class",V,Se,typeof ye),kt(null)),ye instanceof Error&&!(ye.message in ve)&&(ve[ye.message]=!0,kt(Ne),w("Failed %s type: %s",V,ye.message),kt(null))}}}var Mt=Array.isArray;function Dt(E){return Mt(E)}function it(E){{var W=typeof Symbol=="function"&&Symbol.toStringTag,V=W&&E[Symbol.toStringTag]||E.constructor.name||"Object";return V}}function Wt(E){try{return Tt(E),!1}catch{return!0}}function Tt(E){return""+E}function N(E){if(Wt(E))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",it(E)),Tt(E)}var Q=v.ReactCurrentOwner,Oe={key:!0,ref:!0,__self:!0,__source:!0},et,nt;function ft(E){if(je.call(E,"ref")){var W=Object.getOwnPropertyDescriptor(E,"ref").get;if(W&&W.isReactWarning)return!1}return E.ref!==void 0}function or(E){if(je.call(E,"key")){var W=Object.getOwnPropertyDescriptor(E,"key").get;if(W&&W.isReactWarning)return!1}return E.key!==void 0}function _r(E,W){typeof E.ref=="string"&&Q.current}function Dr(E,W){{var V=function(){et||(et=!0,w("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};V.isReactWarning=!0,Object.defineProperty(E,"key",{get:V,configurable:!0})}}function wt(E,W){{var V=function(){nt||(nt=!0,w("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",W))};V.isReactWarning=!0,Object.defineProperty(E,"ref",{get:V,configurable:!0})}}var Rn=function(E,W,V,Y,Ne,_e,Se){var ye={$$typeof:e,type:E,key:W,ref:V,props:Se,_owner:_e};return ye._store={},Object.defineProperty(ye._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ye,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Y}),Object.defineProperty(ye,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ne}),Object.freeze&&(Object.freeze(ye.props),Object.freeze(ye)),ye};function _s(E,W,V,Y,Ne){{var _e,Se={},ye=null,Qe=null;V!==void 0&&(N(V),ye=""+V),or(W)&&(N(W.key),ye=""+W.key),ft(W)&&(Qe=W.ref,_r(W,Ne));for(_e in W)je.call(W,_e)&&!Oe.hasOwnProperty(_e)&&(Se[_e]=W[_e]);if(E&&E.defaultProps){var He=E.defaultProps;for(_e in He)Se[_e]===void 0&&(Se[_e]=He[_e])}if(ye||Qe){var Ge=typeof E=="function"?E.displayName||E.name||"Unknown":E;ye&&Dr(Se,Ge),Qe&&wt(Se,Ge)}return Rn(E,ye,Qe,Ne,Y,Q.current,Se)}}var Lr=v.ReactCurrentOwner,Pr=v.ReactDebugCurrentFrame;function Lt(E){if(E){var W=E._owner,V=ae(E.type,E._source,W?W.type:null);Pr.setExtraStackFrame(V)}else Pr.setExtraStackFrame(null)}var ar;ar=!1;function zt(E){return typeof E=="object"&&E!==null&&E.$$typeof===e}function Ht(){{if(Lr.current){var E=A(Lr.current.type);if(E)return`
|
|
528
|
+
|
|
529
|
+
Check the render method of \``+E+"`."}return""}}function lr(E){return""}var En={};function Ds(E){{var W=Ht();if(!W){var V=typeof E=="string"?E:E.displayName||E.name;V&&(W=`
|
|
530
|
+
|
|
531
|
+
Check the top-level render call using <`+V+">.")}return W}}function kn(E,W){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var V=Ds(W);if(En[V])return;En[V]=!0;var Y="";E&&E._owner&&E._owner!==Lr.current&&(Y=" It was passed a child from "+A(E._owner.type)+"."),Lt(E),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',V,Y),Lt(null)}}function Mn(E,W){{if(typeof E!="object")return;if(Dt(E))for(var V=0;V<E.length;V++){var Y=E[V];zt(Y)&&kn(Y,W)}else if(zt(E))E._store&&(E._store.validated=!0);else if(E){var Ne=y(E);if(typeof Ne=="function"&&Ne!==E.entries)for(var _e=Ne.call(E),Se;!(Se=_e.next()).done;)zt(Se.value)&&kn(Se.value,W)}}}function Ls(E){{var W=E.type;if(W==null||typeof W=="string")return;var V;if(typeof W=="function")V=W.propTypes;else if(typeof W=="object"&&(W.$$typeof===c||W.$$typeof===h))V=W.propTypes;else return;if(V){var Y=A(W);Xe(V,E.props,"prop",Y,E)}else if(W.PropTypes!==void 0&&!ar){ar=!0;var Ne=A(W);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ne||"Unknown")}typeof W.getDefaultProps=="function"&&!W.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function qt(E){{for(var W=Object.keys(E.props),V=0;V<W.length;V++){var Y=W[V];if(Y!=="children"&&Y!=="key"){Lt(E),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Y),Lt(null);break}}E.ref!==null&&(Lt(E),w("Invalid attribute `ref` supplied to `React.Fragment`."),Lt(null))}}var cr={};function $r(E,W,V,Y,Ne,_e){{var Se=_(E);if(!Se){var ye="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ye+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Qe=lr();Qe?ye+=Qe:ye+=Ht();var He;E===null?He="null":Dt(E)?He="array":E!==void 0&&E.$$typeof===e?(He="<"+(A(E.type)||"Unknown")+" />",ye=" Did you accidentally export a JSX literal instead of a component?"):He=typeof E,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",He,ye)}var Ge=_s(E,W,V,Ne,_e);if(Ge==null)return Ge;if(Se){var st=W.children;if(st!==void 0)if(Y)if(Dt(st)){for(var Pt=0;Pt<st.length;Pt++)Mn(st[Pt],E);Object.freeze&&Object.freeze(st)}else w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Mn(st,E)}if(je.call(W,"key")){var At=A(E),tt=Object.keys(W).filter(function(Us){return Us!=="key"}),jr=tt.length>0?"{key: someKey, "+tt.join(": ..., ")+": ...}":"{key: someKey}";if(!cr[At+jr]){var Fs=tt.length>0?"{"+tt.join(": ..., ")+": ...}":"{}";w(`A props object containing a "key" prop is being spread into JSX:
|
|
532
|
+
let props = %s;
|
|
533
|
+
<%s {...props} />
|
|
534
|
+
React keys must be passed directly to JSX without using spread:
|
|
535
|
+
let props = %s;
|
|
536
|
+
<%s key={someKey} {...props} />`,jr,At,Fs,At),cr[At+jr]=!0}}return E===n?qt(Ge):Ls(Ge),Ge}}function Ps(E,W,V){return $r(E,W,V,!0)}function $s(E,W,V){return $r(E,W,V,!1)}var js=$s,Bs=Ps;Or.Fragment=n,Or.jsx=js,Or.jsxs=Bs}()),Or}process.env.NODE_ENV==="production"?Is.exports=Gh():Is.exports=Kh();var M=Is.exports;const Yh=({sdk:t,stats:e,onExportSuccess:r,onOpenReplayStudio:n,ticketFormat:i})=>{const[s,o]=we.useState(!1),[l,c]=we.useState(""),[u,a]=we.useState(null),[h,d]=we.useState(i||(e==null?void 0:e.ticketFormat)||"whatsapp"),[f,m]=we.useState(!1),[p,y]=we.useState(null),[v,w]=we.useState(!1),b=((e==null?void 0:e.errorLogsCount)??0)>0,C=((e==null?void 0:e.mode)??"enterprise")==="lite",S=H=>{switch(H){case"teams":return"Microsoft Teams";case"slack":return"Slack";case"whatsapp":return"WhatsApp";case"jira":return"Jira";case"markdown":return"Markdown";case"compact":return"Ringkasan Cepat";default:return"WhatsApp"}},x=H=>{t&&(t.setMode(H),y(null))},k=()=>{if(!t)return;const H=t.exportBugReport({title:l.trim()||(C?"Laporan Kendala (Mode Lite RAM)":"Laporan Kendala Enterprise"),description:l.trim()||void 0,severity:b?"critical":"high",download:!0});r(H),c(""),o(!1)},I=()=>{if(!t)return;const H=t.getSnapshot({title:l.trim()||(C?"Laporan Kendala (Mode Lite Standalone)":"Laporan Kendala Operasional"),description:l.trim()||void 0,severity:b?"critical":"high"});sr(H),o(!1)},B=async(H=h)=>{if(!t)return;const z=t.getSnapshot({title:l.trim()||(C?"Laporan Kendala Operasional (Lite)":"Laporan Kendala Operasional"),description:l.trim()||void 0,severity:b?"critical":"high"}),A=Et(z,H);try{await navigator.clipboard.writeText(A);const be=H==="whatsapp"?"WhatsApp":H.toUpperCase();a(`✓ Laporan berhasil disalin untuk ${be}! Tinggal tempel ke chat.`),setTimeout(()=>a(null),3500)}catch{a("Gagal mengakses clipboard."),setTimeout(()=>a(null),2500)}},_=async()=>{var H;if(!(!t||f)){m(!0),y(null);try{const z=await t.sendBugReport(void 0,{title:l.trim()||"Laporan Insiden dari Widget Enterprise",description:l.trim()||void 0,severity:b?"critical":"high"});z.ok?(y({reportId:z.reportId||z.payload.metadata.reportId,sha256:((H=z.sha256)==null?void 0:H.slice(0,16))||"Verified"}),r(z.payload),setTimeout(()=>{c("")},1500)):alert(`Gagal mengirim ke infra: status ${z.status}`)}catch(z){alert(`Gagal koneksi ke server ingest infra: ${z instanceof Error?z.message:String(z)}`)}finally{m(!1)}}};return M.jsxs("div",{className:"rewindlog-block",style:ge.floatingRoot,children:[s&&M.jsxs("div",{style:ge.drawerCard,children:[M.jsxs("div",{style:ge.drawerHeader,children:[M.jsxs("div",{children:[M.jsxs("div",{style:ge.headerTitleRow,children:[M.jsx("span",{style:ge.headerIcon,children:b?"🚨":"🛟"}),M.jsx("h4",{style:ge.drawerTitle,children:"Laporkan Masalah"})]}),M.jsx("p",{style:ge.drawerSubtitle,children:"🛡️ Privasi Terjaga • Rekaman 5 Menit Terakhir Disertakan"})]}),M.jsx("button",{type:"button",onClick:()=>o(!1),style:ge.closeBtn,title:"Tutup",children:"✕"})]}),M.jsx("div",{style:ge.inputContainer,children:M.jsx("textarea",{rows:2,value:l,onChange:H=>c(H.target.value),placeholder:"Ceritakan singkat kendalanya... (misal: tombol bayar tidak merespons)",style:ge.textarea})}),M.jsxs("div",{style:ge.trustBadgeRow,children:[M.jsxs("span",{children:["📹 ",(e==null?void 0:e.totalDomEvents)??0," Aksi Layar"]}),M.jsxs("span",{children:["🌐 ",(e==null?void 0:e.networkLogsCount)??0," Koneksi API"]}),M.jsx("span",{style:{color:"#34d399"},children:"✓ Data Nasabah Disensor"})]}),u&&M.jsx("div",{style:ge.copiedAlert,children:u}),p&&M.jsxs("div",{style:ge.infraSuccessAlert,children:["✓ ",M.jsx("strong",{children:"Terkirim ke Server Tim Teknis!"}),M.jsx("br",{}),M.jsxs("span",{style:{fontSize:"0.72rem",color:"#93c5fd"},children:["ID Tiket: ",p.reportId]})]}),M.jsxs("div",{style:ge.actionStack,children:[C?M.jsxs(M.Fragment,{children:[M.jsxs("button",{type:"button",onClick:()=>B(h),style:ge.litePrimaryBtn,children:["📋 Salin Laporan ke ",S(h)]}),M.jsxs("div",{style:ge.secondaryRow,children:[M.jsx("button",{type:"button",onClick:I,style:ge.secondaryBtn,title:"Unduh laporan dalam format file dokumen HTML yang bisa dibuka offline",children:"📄 Unduh HTML"}),M.jsx("button",{type:"button",onClick:()=>w(H=>!H),style:ge.toggleAdvancedBtn,children:v?"▲ Tutup Opsi":"⚙️ Opsi Lain"})]})]}):M.jsxs(M.Fragment,{children:[M.jsx("button",{type:"button",onClick:_,disabled:f,style:{...ge.primaryEnterpriseBtn,opacity:f?.7:1},children:f?"⏳ Mengirim Laporan...":"🚀 Kirim Laporan ke Tim Teknis"}),M.jsxs("div",{style:ge.secondaryRow,children:[M.jsx("button",{type:"button",onClick:()=>B(h),style:ge.secondaryBtn,children:"📋 Salin Tiket"}),M.jsx("button",{type:"button",onClick:()=>{o(!1),n()},style:ge.secondaryBtn,children:"▶ Reka Ulang"}),M.jsx("button",{type:"button",onClick:()=>w(H=>!H),style:ge.toggleAdvancedBtn,children:v?"▲":"⚙️"})]})]}),v&&M.jsxs("div",{style:ge.advancedDrawer,children:[M.jsx("div",{style:ge.advancedSectionHeader,children:"Pilihan Format Tiket:"}),M.jsx("div",{style:ge.formatSelectorRow,children:["whatsapp","teams","slack","jira","markdown","compact"].map(H=>M.jsx("button",{type:"button",onClick:()=>{d(H),B(H)},style:{...ge.formatPill,...h===H?ge.formatPillActive:{}},children:H==="whatsapp"?"WA":H==="teams"?"Teams":H==="compact"?"1-Line":H.toUpperCase()},H))}),M.jsx("div",{style:ge.advancedSectionHeader,children:"Mode Operasi SDK:"}),M.jsxs("div",{style:ge.modeTabs,children:[M.jsx("button",{type:"button",onClick:()=>x("lite"),style:{...ge.modeTabBtn,...C?ge.modeTabActiveLite:{}},children:"⚡ Lite (RAM Sementara)"}),M.jsx("button",{type:"button",onClick:()=>x("enterprise"),style:{...ge.modeTabBtn,...C?{}:ge.modeTabActiveEnterprise},children:"🏢 Enterprise (Server)"})]}),M.jsxs("div",{style:{marginTop:"0.5rem",display:"flex",gap:"0.4rem"},children:[M.jsx("button",{type:"button",onClick:k,style:ge.utilityBtn,children:"📦 Unduh JSON Mentah"}),M.jsx("button",{type:"button",onClick:I,style:ge.utilityBtn,children:"📄 Unduh Dokumen HTML"})]})]})]})]}),M.jsxs("button",{type:"button",onClick:()=>o(H=>!H),style:{...ge.triggerPill,backgroundColor:b?"#dc2626":C?"#059669":"#0284c7"},"aria-label":"Buka formulir lapor kendala",children:[M.jsx("span",{style:ge.pulseDot}),M.jsx("span",{children:b?"🚨 Ada Kendala? Lapor di Sini":"🛟 Lapor Kendala"})]})]})},ge={floatingRoot:{position:"fixed",right:"20px",bottom:"20px",zIndex:950,display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"0.55rem",fontFamily:"Inter, system-ui, -apple-system, sans-serif"},triggerPill:{display:"flex",alignItems:"center",gap:"0.5rem",color:"#ffffff",border:"1px solid rgba(255, 255, 255, 0.2)",borderRadius:"9999px",padding:"0.65rem 1.15rem",fontSize:"0.84rem",fontWeight:700,cursor:"pointer",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.35)",transition:"all 0.2s ease"},pulseDot:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:"#ffffff",boxShadow:"0 0 8px rgba(255, 255, 255, 0.9)"},drawerCard:{width:"340px",backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"1rem",padding:"1.15rem",boxShadow:"0 20px 45px rgba(0, 0, 0, 0.7)",color:"#f8fafc",animation:"fadeIn 0.15s ease-out"},drawerHeader:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"0.75rem"},headerTitleRow:{display:"flex",alignItems:"center",gap:"0.45rem"},headerIcon:{fontSize:"1.1rem"},drawerTitle:{margin:0,fontSize:"1rem",fontWeight:700,color:"#f8fafc"},drawerSubtitle:{margin:"0.2rem 0 0 0",fontSize:"0.72rem",color:"#94a3b8",lineHeight:1.3},closeBtn:{backgroundColor:"transparent",border:"none",color:"#64748b",fontSize:"1.15rem",cursor:"pointer",padding:"2px 4px",lineHeight:1,transition:"color 0.15s ease"},inputContainer:{marginBottom:"0.65rem"},textarea:{width:"100%",boxSizing:"border-box",padding:"0.6rem 0.75rem",borderRadius:"0.5rem",border:"1px solid #334155",backgroundColor:"#1e293b",color:"#f8fafc",fontSize:"0.82rem",outline:"none",resize:"none",lineHeight:1.4},trustBadgeRow:{display:"flex",justifyContent:"space-between",fontSize:"0.7rem",color:"#94a3b8",padding:"0.35rem 0.5rem",backgroundColor:"rgba(30, 41, 59, 0.6)",borderRadius:"0.4rem",marginBottom:"0.75rem",fontWeight:500},copiedAlert:{backgroundColor:"#059669",color:"#ffffff",borderRadius:"0.45rem",padding:"0.5rem 0.75rem",fontSize:"0.76rem",fontWeight:700,textAlign:"center",marginBottom:"0.65rem",boxShadow:"0 4px 12px rgba(5, 150, 105, 0.35)"},infraSuccessAlert:{backgroundColor:"rgba(2, 132, 199, 0.2)",border:"1px solid #0284c7",color:"#ffffff",borderRadius:"0.45rem",padding:"0.5rem 0.75rem",fontSize:"0.76rem",fontWeight:600,textAlign:"center",marginBottom:"0.65rem"},actionStack:{display:"flex",flexDirection:"column",gap:"0.5rem"},litePrimaryBtn:{backgroundColor:"#059669",color:"#ffffff",border:"none",borderRadius:"0.5rem",padding:"0.7rem 1rem",fontSize:"0.85rem",fontWeight:700,cursor:"pointer",width:"100%",textAlign:"center",boxShadow:"0 4px 14px rgba(5, 150, 105, 0.35)",transition:"background 0.15s ease"},primaryEnterpriseBtn:{backgroundColor:"#0284c7",color:"#ffffff",border:"none",borderRadius:"0.5rem",padding:"0.7rem 1rem",fontSize:"0.85rem",fontWeight:700,cursor:"pointer",width:"100%",textAlign:"center",boxShadow:"0 4px 14px rgba(2, 132, 199, 0.35)",transition:"background 0.15s ease"},secondaryRow:{display:"flex",gap:"0.45rem"},secondaryBtn:{flex:1,backgroundColor:"#1e293b",color:"#cbd5e1",border:"1px solid #334155",borderRadius:"0.45rem",padding:"0.5rem",fontSize:"0.76rem",fontWeight:600,cursor:"pointer",textAlign:"center",transition:"all 0.15s ease"},toggleAdvancedBtn:{backgroundColor:"#1e293b",color:"#94a3b8",border:"1px solid #334155",borderRadius:"0.45rem",padding:"0.5rem 0.65rem",fontSize:"0.76rem",fontWeight:600,cursor:"pointer",whiteSpace:"nowrap"},advancedDrawer:{marginTop:"0.35rem",padding:"0.65rem",backgroundColor:"#1e293b",borderRadius:"0.5rem",border:"1px solid #334155"},advancedSectionHeader:{fontSize:"0.7rem",color:"#94a3b8",fontWeight:600,marginBottom:"0.35rem"},formatSelectorRow:{display:"flex",gap:"0.3rem",marginBottom:"0.65rem",flexWrap:"wrap"},formatPill:{backgroundColor:"#0f172a",color:"#94a3b8",border:"1px solid #334155",borderRadius:"0.35rem",padding:"0.25rem 0.55rem",fontSize:"0.68rem",fontWeight:600,cursor:"pointer"},formatPillActive:{backgroundColor:"#0284c7",color:"#ffffff",borderColor:"#38bdf8"},modeTabs:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"0.35rem",backgroundColor:"#0f172a",padding:"3px",borderRadius:"0.4rem"},modeTabBtn:{backgroundColor:"transparent",border:"none",color:"#94a3b8",padding:"0.35rem",fontSize:"0.7rem",fontWeight:600,borderRadius:"0.3rem",cursor:"pointer"},modeTabActiveLite:{backgroundColor:"#059669",color:"#ffffff",fontWeight:700},modeTabActiveEnterprise:{backgroundColor:"#0284c7",color:"#ffffff",fontWeight:700},utilityBtn:{flex:1,backgroundColor:"#0f172a",color:"#cbd5e1",border:"1px solid #334155",borderRadius:"0.35rem",padding:"0.4rem 0.5rem",fontSize:"0.7rem",fontWeight:600,cursor:"pointer",textAlign:"center"}};function Nr(t){const e=Math.max(0,Math.floor(t)),r=Math.floor(e/1e3),n=Math.floor(r/60),i=r%60,s=Math.floor(e%1e3/100);return`${String(n).padStart(2,"0")}:${String(i).padStart(2,"0")}.${s}`}const Jh=({report:t,onImportReport:e,onLoadLiveSession:r})=>{var Wt,Tt;const n=we.useRef(null),i=we.useRef(null),s=we.useRef(null),o=we.useRef(null),[l,c]=we.useState(!1),[u,a]=we.useState(1),[h,d]=we.useState(!0),[f,m]=we.useState(0),[p,y]=we.useState(0),[v,w]=we.useState(0),[b,C]=we.useState("summary"),[S,x]=we.useState(null),[k,I]=we.useState(null),[B,_]=we.useState("Sesi Aktif Saat Ini"),[H,z]=we.useState("unsigned"),[A,be]=we.useState(null),[he,ne]=we.useState(""),[F,de]=we.useState(!1),[j,X]=we.useState(!1),[T,U]=we.useState([]),[D,te]=we.useState(!1),[ie,Ce]=we.useState(!1),[se,le]=we.useState(null),pe=async()=>{const N=!D;if(te(N),N){Ce(!0);try{const[Q,Oe]=await Promise.all([fetch("/api/v1/rewindlog/reports"),fetch("/api/v1/rewindlog/license")]);if(Q.ok){const et=await Q.json();U(Array.isArray(et.reports)?et.reports:[])}Oe.ok&&le(await Oe.json())}catch{}finally{Ce(!1)}}},Te=async N=>{I(null);try{const Q=await fetch(`/api/v1/rewindlog/reports/${encodeURIComponent(N)}`);if(!Q.ok)throw new Error(`HTTP ${Q.status}`);const Oe=await Q.json();_(`🗄️ Server: ${N}`),te(!1),e(Oe,N)}catch(Q){I(Q instanceof Error?Q.message:"Gagal memuat laporan dari server.")}},ee=(t==null?void 0:t.domEvents)??[],Ie=((t==null?void 0:t.networkLogs)??[]).map((N,Q)=>({...N,id:N.id||`net_${Q}`,ok:N.ok!==void 0?N.ok:N.status>=200&&N.status<300})),re=(t==null?void 0:t.consoleLogs)??[],ze=(t==null?void 0:t.errorLogs)??[],ae=we.useMemo(()=>t?t.executiveSummary??yt(t):null,[t]);we.useEffect(()=>{var Q,Oe;if(!t){z("unsigned");return}const N=(Oe=(Q=t.metadata)==null?void 0:Q.securityAudit)==null?void 0:Oe.integrityHashSha256;if(!N){z("unsigned");return}z("checking"),nr(t).then(et=>{z(et===N?"verified":"tampered")}).catch(()=>{z("unsigned")})},[t]),we.useEffect(()=>{if(n.current){if(s.current){try{s.current.pause(),s.current.destroy()}catch{}s.current=null}if(n.current.innerHTML="",c(!1),m(0),x(Ie.length>0?0:null),ee.length<2){y(0),w(0);return}try{const N=new Th(ee,{root:n.current,speed:u,skipInactive:h,showWarning:!1,showDebug:!1,blockClass:"rewindlog-block",mouseTail:{duration:500,lineCap:"round",lineWidth:2,strokeStyle:"#38bdf8"}});N.disableInteract(),s.current=N;const Q=N.getMetaData();w(Q.startTime),y(Math.max(Q.totalTime,1));const Oe=()=>{if(!i.current||!N.wrapper||!N.iframe)return;const et=i.current.clientWidth-24,nt=i.current.clientHeight-24,ft=Number(N.iframe.width)||1024,or=Number(N.iframe.height)||640,_r=et/ft,Dr=nt/or,wt=Math.min(_r,Dr,1);N.wrapper.style.transform=`scale(${wt})`,N.wrapper.style.transformOrigin="top left",N.wrapper.style.width=`${ft}px`,N.wrapper.style.height=`${or}px`};return setTimeout(Oe,60),window.addEventListener("resize",Oe),N.on("finish",()=>{c(!1),m(Q.totalTime)}),N.pause(0),()=>{window.removeEventListener("resize",Oe);try{N.pause(),N.destroy()}catch{}}}catch(N){console.error("[RewindLog] Replayer initialization error:",N)}}},[t]),we.useEffect(()=>{if(!l||!s.current)return;const N=window.setInterval(()=>{if(s.current)try{const Q=s.current.getCurrentTime();Q>=p?(m(p),c(!1)):m(Math.max(0,Q))}catch{}},80);return()=>window.clearInterval(N)},[l,p]);const je=()=>{const N=s.current;if(!(!N||ee.length<2))if(l)N.pause(),c(!1);else{const Q=f>=p?0:f;N.play(Q),c(!0)}},ve=N=>{const Q=s.current;if(!Q||ee.length<2)return;const Oe=Math.max(0,Math.min(p,N));m(Oe),l?Q.play(Oe):Q.pause(Oe)},vt=N=>{a(N),s.current&&s.current.setConfig({speed:N})},kt=()=>{const N=!h;d(N),s.current&&s.current.setConfig({skipInactive:N})},Xe=N=>{if(!v)return;const Q=Math.max(0,Math.min(p,N-v));ve(Q)},Mt=N=>{var et;const Q=(et=N.target.files)==null?void 0:et[0];if(!Q)return;I(null);const Oe=new FileReader;Oe.onload=()=>{try{const nt=JSON.parse(String(Oe.result));if($h(nt)){be({envelope:nt,fileName:Q.name}),ne("");return}const ft=nt;if(!Array.isArray(ft.domEvents)||!Array.isArray(ft.networkLogs))throw new Error("Format JSON tidak valid: domEvents atau networkLogs tidak ditemukan.");_(Q.name),e(ft,Q.name)}catch(nt){I(nt instanceof Error?nt.message:"Gagal membaca file laporan JSON.")}},Oe.readAsText(Q),N.target.value=""},Dt=async N=>{if(N.preventDefault(),!(!A||!he.trim())){de(!0),I(null);try{const Q=await Ms(A.envelope,he.trim()),Oe=JSON.parse(Q);_(`🔓 ${A.fileName} (Terdekripsi AES-256-GCM)`),be(null),ne(""),e(Oe,A.fileName)}catch{I("Dekripsi AES-256-GCM gagal: Passphrase salah atau file telah dimodifikasi.")}finally{de(!1)}}},it=S!==null?Ie[S]??null:null;return M.jsxs("div",{style:L.wrapper,children:[M.jsxs("div",{style:L.toolbar,children:[M.jsxs("div",{style:L.toolbarLeft,children:[M.jsxs("span",{style:L.sourceBadge,children:["Sumber: ",B]}),H==="verified"&&M.jsx("span",{style:L.verifiedBadge,children:"✓ SHA-256 Terverifikasi (Asli & Utuh)"}),H==="tampered"&&M.jsx("span",{style:L.tamperedBadge,children:"⚠ Peringatan: Isi File Telah Diubah!"})]}),M.jsxs("div",{style:L.toolbarActions,children:[t&&M.jsxs(M.Fragment,{children:[M.jsxs("div",{style:{display:"inline-flex",alignItems:"center",gap:"4px"},children:[M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"whatsapp")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format WhatsApp",children:j?"✓ Tersalin!":"📋 Salin WA"}),M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"jira")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format Jira Markup",children:"📋 Jira"}),M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"teams")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format Microsoft Teams (On-Call Alert)",children:"📋 Teams"}),M.jsx("button",{type:"button",onClick:async()=>{try{await navigator.clipboard.writeText(Et(t,"slack")),X(!0),setTimeout(()=>X(!1),2500)}catch{}},style:L.actionBtnSecondary,title:"Salin ringkasan insiden format Slack mrkdwn",children:"📋 Slack"})]}),M.jsx("button",{type:"button",onClick:()=>sr(t),style:L.htmlReportBtn,title:"Unduh laporan dalam format dokumen HTML yang mudah dibaca oleh tim Non-Teknis atau disimpan sebagai PDF",children:"📄 Unduh Laporan Visual (HTML / PDF)"})]}),M.jsx("button",{type:"button",onClick:pe,style:L.actionBtnSecondary,title:"Lihat daftar laporan yang tersimpan di penyimpanan server (Folder Report/)",children:"🗄️ Arsip Server (Report/)"}),M.jsx("button",{type:"button",onClick:()=>{_("Sesi Aktif Saat Ini"),r()},style:L.actionBtnSecondary,children:"Muat Sesi Aktif"}),M.jsx("input",{ref:o,type:"file",accept:".json,application/json",onChange:Mt,style:{display:"none"}}),M.jsx("button",{type:"button",onClick:()=>{var N;return(N=o.current)==null?void 0:N.click()},style:L.actionBtnPrimary,children:"📂 Buka File Laporan (.json)"})]})]}),k&&M.jsx("div",{style:L.errorAlert,children:k}),D&&M.jsxs("div",{style:L.decryptBox,children:[M.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.6rem"},children:[M.jsxs("div",{children:[M.jsx("strong",{style:{color:"#38bdf8",fontSize:"0.88rem"},children:"🗄️ Daftar Laporan Insiden di Server Infrastruktur (GET /api/v1/rewindlog/reports)"}),se&&M.jsxs("div",{style:{fontSize:"0.74rem",color:se.valid?"#34d399":"#f87171",marginTop:"2px"},children:["🏢 ",se.company," • ",se.isTrial?`Trial (${se.daysRemaining} hari tersisa)`:"Lisensi Enterprise Aktif"]})]}),M.jsx("button",{type:"button",onClick:()=>te(!1),style:L.actionBtnSecondary,children:"Tutup"})]}),ie?M.jsx("div",{style:{fontSize:"0.82rem",color:"#94a3b8"},children:"Memuat arsip server..."}):T.length===0?M.jsx("div",{style:{fontSize:"0.82rem",color:"#94a3b8"},children:"Belum ada laporan tersimpan di server."}):M.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.45rem",maxHeight:"200px",overflowY:"auto"},children:T.map(N=>M.jsxs("div",{onClick:()=>Te(N.fileName),style:{display:"flex",justifyContent:"space-between",alignItems:"center",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.4rem",padding:"0.55rem 0.85rem",cursor:"pointer"},children:[M.jsxs("div",{children:[M.jsxs("div",{style:{fontSize:"0.84rem",fontWeight:700,color:"#f8fafc"},children:["[",N.overallStatus,"] ",N.title," — ",M.jsx("code",{style:{color:"#38bdf8"},children:N.fileName})]}),M.jsxs("div",{style:{fontSize:"0.75rem",color:"#94a3b8"},children:["🎯 ",N.recommendedTeam," • ",N.domEventsCount," DOM Events • ",N.networkLogsCount," Network Calls • ",N.sizeKB," KB"]})]}),M.jsx("span",{style:{fontSize:"0.78rem",fontWeight:700,color:"#38bdf8"},children:"▶ Putar Laporan"})]},N.fileName))})]}),A&&M.jsx("div",{style:L.decryptBox,children:M.jsxs("form",{onSubmit:Dt,style:L.decryptForm,children:[M.jsxs("div",{children:[M.jsxs("strong",{style:{color:"#38bdf8"},children:["🔐 File Laporan Perbankan Terenkripsi (",A.fileName,")"]}),M.jsxs("div",{style:{fontSize:"0.8rem",color:"#94a3b8",marginTop:"0.2rem"},children:["Algoritma: ",A.envelope.algorithm," • KDF:"," ",A.envelope.kdf," (",A.envelope.iterations.toLocaleString()," iterasi)"]})]}),M.jsxs("div",{style:L.decryptInputRow,children:[M.jsx("input",{type:"password",value:he,onChange:N=>ne(N.target.value),placeholder:"Masukkan Passphrase Dekripsi...",required:!0,style:L.decryptInput}),M.jsx("button",{type:"submit",disabled:F,style:L.actionBtnPrimary,children:F?"Membuka Enkripsi...":"🔓 Buka & Tampilkan Laporan"}),M.jsx("button",{type:"button",onClick:()=>be(null),style:L.actionBtnSecondary,children:"Batal"})]})]})}),ae&&M.jsxs("div",{style:{...L.executiveCard,borderColor:ae.overallStatus==="KRITIS"?"#ef4444":ae.overallStatus==="PERLU_PERHATIAN"?"#f59e0b":"#10b981"},children:[M.jsxs("div",{style:L.executiveTopRow,children:[M.jsxs("div",{style:L.executiveHeadlineGroup,children:[M.jsxs("span",{style:{...L.executiveStatusBadge,backgroundColor:ae.overallStatus==="KRITIS"?"#dc2626":ae.overallStatus==="PERLU_PERHATIAN"?"#d97706":"#059669"},children:["STATUS: ",ae.overallStatus.replace("_"," ")]}),M.jsx("h3",{style:L.executiveHeadline,children:ae.statusHeadline})]}),M.jsxs("div",{style:L.assignedTeamBadge,children:["🎯 ",M.jsx("strong",{children:"Tim Penanganan:"})," ",ae.recommendedTeam]})]}),M.jsxs("p",{style:L.executivePlainText,children:[M.jsx("strong",{children:"Apa yang Terjadi (Bahasa Awam):"})," ",ae.plainExplanation]}),M.jsxs("div",{style:L.executiveDiagnosisBox,children:[M.jsxs("div",{children:[M.jsx("strong",{children:"Diagnosis Penyebab:"})," ",ae.rootCauseDiagnosis]}),M.jsxs("div",{style:L.actionStepsRow,children:[M.jsx("strong",{children:"Saran Tindakan:"})," ",ae.recommendedActionSteps.join(" • ")]})]}),M.jsxs("div",{style:L.executiveMetricsGrid,children:[M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Durasi & Interaksi Layar"}),M.jsxs("strong",{style:L.execMetricValue,children:[ae.keyMetrics.sessionDurationLabel," (",ae.keyMetrics.totalUserInteractions," aksi)"]})]}),M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Koneksi Server (API)"}),M.jsxs("strong",{style:L.execMetricValue,children:[ae.keyMetrics.successfulNetworkRequests,"/",ae.keyMetrics.totalNetworkRequests," Sukses (Rata-rata"," ",ae.keyMetrics.averageNetworkDurationMs," ms)"]})]}),M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Gangguan / Error Aplikasi"}),M.jsxs("strong",{style:{...L.execMetricValue,color:ae.keyMetrics.systemErrorsCount>0?"#fda4af":"#a7f3d0"},children:[ae.keyMetrics.systemErrorsCount," Error •"," ",ae.keyMetrics.consoleWarningsCount," Peringatan"]})]}),M.jsxs("div",{style:L.execMetricBox,children:[M.jsx("span",{style:L.execMetricLabel,children:"Keamanan Data Nasabah"}),M.jsxs("strong",{style:{...L.execMetricValue,color:"#38bdf8"},children:["🛡️ ",ae.keyMetrics.protectedPiiCount," Data Rahasia Disensor"]})]})]})]}),M.jsxs("div",{style:L.splitLayout,children:[M.jsxs("div",{style:L.playerPanel,children:[M.jsxs("div",{ref:i,style:L.viewportHost,children:[ee.length<2&&M.jsx("div",{style:L.emptyStage,children:"Belum ada rekaman layar untuk diputar. Lakukan aktivitas di halaman utama atau buka file laporan JSON."}),M.jsx("div",{ref:n,style:L.playerMount})]}),M.jsxs("div",{style:L.controlsBar,children:[M.jsxs("div",{style:L.scrubberContainer,children:[M.jsx("input",{type:"range",min:0,max:Math.max(p,1),value:Math.min(f,Math.max(p,1)),onChange:N=>ve(Number(N.target.value)),style:L.scrubber}),p>0&&M.jsxs("div",{style:L.markersTrack,children:[Ie.map((N,Q)=>{const Oe=Math.max(0,Math.min(100,(N.timestamp-v)/p*100));return M.jsx("span",{title:`${N.method} ${N.url} (${N.status})`,onClick:()=>{C("network"),x(Q),Xe(N.timestamp)},style:{...L.timelineMarker,left:`${Oe}%`,backgroundColor:N.ok?"#38bdf8":"#ef4444"}},N.id||Q)}),ze.map((N,Q)=>{const Oe=Math.max(0,Math.min(100,(N.timestamp-v)/p*100));return M.jsx("span",{title:`Error: ${N.message}`,onClick:()=>{C("errors"),Xe(N.timestamp)},style:{...L.timelineMarker,left:`${Oe}%`,backgroundColor:"#f43f5e",height:"10px"}},N.id||Q)})]})]}),M.jsxs("div",{style:L.transportRow,children:[M.jsxs("div",{style:L.transportLeft,children:[M.jsx("button",{type:"button",onClick:je,disabled:ee.length<2,style:L.playButton,children:l?"⏸ Jeda Video":"▶ Putar Rekaman Layar"}),M.jsxs("span",{style:L.timeReadout,children:[Nr(f)," / ",Nr(p)]})]}),M.jsxs("div",{style:L.transportRight,children:[M.jsxs("label",{style:L.skipToggle,children:[M.jsx("input",{type:"checkbox",checked:h,onChange:kt}),M.jsx("span",{children:"Lewati Waktu Diam"})]}),M.jsx("div",{style:L.speedGroup,children:[1,2,4].map(N=>M.jsxs("button",{type:"button",onClick:()=>vt(N),style:{...L.speedBtn,backgroundColor:u===N?"#2563eb":"#1e293b",color:u===N?"#ffffff":"#94a3b8"},children:[N,"x"]},N))})]})]})]})]}),M.jsxs("div",{style:L.inspectorPanel,children:[M.jsxs("div",{style:L.inspectorTabs,children:[M.jsxs("button",{type:"button",onClick:()=>C("summary"),style:{...L.tabBtn,borderBottomColor:b==="summary"?"#10b981":"transparent",color:b==="summary"?"#a7f3d0":"#94a3b8"},children:["📋 Kronologi Awam (",(ae==null?void 0:ae.storyline.length)??0,")"]}),M.jsxs("button",{type:"button",onClick:()=>C("network"),style:{...L.tabBtn,borderBottomColor:b==="network"?"#38bdf8":"transparent",color:b==="network"?"#f8fafc":"#94a3b8"},children:["Network (",Ie.length,")"]}),M.jsxs("button",{type:"button",onClick:()=>C("console"),style:{...L.tabBtn,borderBottomColor:b==="console"?"#38bdf8":"transparent",color:b==="console"?"#f8fafc":"#94a3b8"},children:["Console (",re.length,")"]}),M.jsxs("button",{type:"button",onClick:()=>C("errors"),style:{...L.tabBtn,borderBottomColor:b==="errors"?"#f43f5e":"transparent",color:b==="errors"?"#f8fafc":"#94a3b8"},children:["Error (",ze.length,")"]}),M.jsx("button",{type:"button",onClick:()=>C("metadata"),style:{...L.tabBtn,borderBottomColor:b==="metadata"?"#38bdf8":"transparent",color:b==="metadata"?"#f8fafc":"#94a3b8"},children:"Info & Audit"})]}),M.jsxs("div",{style:L.inspectorBody,children:[b==="summary"&&M.jsxs("div",{style:L.logList,children:[M.jsxs("div",{style:L.storylineHint,children:["💡 ",M.jsx("strong",{children:"Panduan Non-Teknis:"})," Berikut urutan kejadian yang dialami pengguna dalam bahasa sehari-hari. Klik langkah mana saja untuk melihat kejadiannya di video sebelah kiri."]}),!ae||ae.storyline.length===0?M.jsx("div",{style:L.emptyInspector,children:"Belum ada kronologi aktivitas."}):ae.storyline.map(N=>{const Q=N.category==="error"||N.category==="network-fail"?"#ef4444":N.category==="warning"||N.category==="network-slow"?"#f59e0b":N.category==="security"?"#10b981":"#38bdf8";return M.jsxs("div",{onClick:()=>Xe(N.timestamp),style:{...L.storyStepCard,borderLeftColor:Q},children:[M.jsxs("div",{style:L.storyStepHeader,children:[M.jsx("span",{style:{...L.storyBadge,color:Q},children:N.badgeText}),M.jsxs("span",{style:L.relTimeText,children:["Pukul ",N.timeClockLabel," • ▶ Menit ",N.relativeTimeLabel]})]}),M.jsx("div",{style:L.storyTitle,children:N.titlePlain}),M.jsx("div",{style:L.storyDetail,children:N.detailPlain}),N.technicalNote&&M.jsxs("div",{style:L.storyTechNote,children:["Teknis: ",N.technicalNote]})]},N.id)})]}),b==="network"&&M.jsx("div",{style:L.networkTabLayout,children:Ie.length===0?M.jsx("div",{style:L.emptyInspector,children:"Tidak ada panggilan jaringan (Network) terekam."}):M.jsxs(M.Fragment,{children:[M.jsx("div",{style:L.networkList,children:Ie.map((N,Q)=>{const Oe=v?N.timestamp-v:0,et=f>=Oe,nt=S===Q;return M.jsxs("div",{onClick:()=>{x(Q),Xe(N.timestamp)},style:{...L.networkRow,backgroundColor:nt?"#1e293b":"transparent",opacity:et||f===0?1:.55},children:[M.jsxs("div",{style:L.networkRowTop,children:[M.jsx("span",{style:{...L.statusBadge,backgroundColor:N.status>=200&&N.status<300?"#065f46":N.status>=400||N.status===0?"#7f1d1d":"#334155"},children:N.status||"ERR"}),M.jsx("span",{style:L.methodBadge,children:N.method}),M.jsx("span",{style:L.typeTag,children:N.type.toUpperCase()}),M.jsxs("span",{style:L.durationText,children:[N.durationMs,"ms"]}),M.jsxs("span",{style:L.relTimeText,children:["@",Nr(Math.max(0,Oe))]})]}),M.jsx("div",{style:L.urlText,title:N.url,children:N.url})]},N.id||Q)})}),it&&M.jsxs("div",{style:L.networkDetailPane,children:[M.jsx("div",{style:L.detailHeader,children:M.jsxs("strong",{children:[it.method," ",it.url]})}),M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Request Headers (Authorization, Cookie & PIN Token Dihapus):"}),M.jsx("pre",{style:L.codeBlock,children:it.requestHeaders&&Object.keys(it.requestHeaders).length>0?JSON.stringify(it.requestHeaders,null,2):"{ /* Tidak ada header non-sensitif */ }"})]}),it.requestBody&&M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Request Body (Data Perbankan & PII Disensor):"}),M.jsx("pre",{style:L.codeBlock,children:it.requestBody})]}),M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Response Body (Cloned Stream):"}),M.jsx("pre",{style:L.codeBlock,children:it.responseBody||"[Response body kosong]"})]})]})]})}),b==="console"&&M.jsx("div",{style:L.logList,children:re.length===0?M.jsx("div",{style:L.emptyInspector,children:"Tidak ada log console yang tercatat."}):re.map(N=>{const Q=v?N.timestamp-v:0;return M.jsxs("div",{onClick:()=>Xe(N.timestamp),style:{...L.consoleItem,borderLeftColor:N.level==="error"?"#ef4444":N.level==="warn"?"#f59e0b":"#38bdf8"},children:[M.jsxs("div",{style:L.consoleHeader,children:[M.jsx("span",{style:L.consoleLevel,children:N.level.toUpperCase()}),M.jsxs("span",{style:L.relTimeText,children:["@",Nr(Math.max(0,Q))," (Klik untuk lompat)"]})]}),M.jsx("pre",{style:L.consoleMessage,children:N.message})]},N.id)})}),b==="errors"&&M.jsx("div",{style:L.logList,children:ze.length===0?M.jsx("div",{style:L.emptyInspector,children:"Tidak ditemukan exception atau error sistem pada sesi ini."}):ze.map(N=>{const Q=v?N.timestamp-v:0;return M.jsxs("div",{onClick:()=>Xe(N.timestamp),style:L.errorCard,children:[M.jsxs("div",{style:L.consoleHeader,children:[M.jsx("span",{style:L.errorBadge,children:N.type}),M.jsxs("span",{style:L.relTimeText,children:["@",Nr(Math.max(0,Q))]})]}),M.jsx("div",{style:L.errorTitle,children:N.message}),N.stack&&M.jsx("pre",{style:L.codeBlock,children:N.stack})]},N.id)})}),b==="metadata"&&M.jsxs("div",{style:L.metadataPane,children:[(t==null?void 0:t.issue)&&M.jsxs("div",{style:L.issueCard,children:[M.jsx("div",{style:L.detailLabel,children:"Catatan Keluhan Pelapor"}),M.jsxs("div",{style:L.issueTitle,children:["[",((Wt=t.issue.severity)==null?void 0:Wt.toUpperCase())||"HIGH","] ",t.issue.title]}),t.issue.description&&M.jsx("p",{style:L.issueDesc,children:t.issue.description})]}),((Tt=t==null?void 0:t.metadata)==null?void 0:Tt.securityAudit)&&M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Audit Keamanan & Kepatuhan Perbankan (PCI-DSS v4.0 / OJK / UU-PDP)"}),M.jsx("pre",{style:L.codeBlock,children:JSON.stringify(t.metadata.securityAudit,null,2)})]}),M.jsxs("div",{style:L.detailSection,children:[M.jsx("div",{style:L.detailLabel,children:"Detail Perangkat & Ring Buffer"}),M.jsx("pre",{style:L.codeBlock,children:JSON.stringify((t==null?void 0:t.metadata)??{note:"File laporan versi awal (berisi domEvents & networkLogs)",domEventsCount:ee.length,networkLogsCount:Ie.length},null,2)})]})]})]})]})]})]})},L={wrapper:{display:"flex",flexDirection:"column",gap:"1rem"},toolbar:{display:"flex",flexWrap:"wrap",justifyContent:"space-between",alignItems:"center",gap:"0.75rem",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.75rem",padding:"0.85rem 1.25rem"},toolbarLeft:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:"0.65rem"},sourceBadge:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",color:"#38bdf8",fontSize:"0.76rem",fontWeight:600,padding:"0.25rem 0.65rem",borderRadius:"9999px"},verifiedBadge:{backgroundColor:"#064e3b",border:"1px solid #10b981",color:"#a7f3d0",fontSize:"0.74rem",fontWeight:700,padding:"0.22rem 0.6rem",borderRadius:"9999px"},tamperedBadge:{backgroundColor:"#7f1d1d",border:"1px solid #ef4444",color:"#fecaca",fontSize:"0.74rem",fontWeight:700,padding:"0.22rem 0.6rem",borderRadius:"9999px"},toolbarActions:{display:"flex",flexWrap:"wrap",gap:"0.55rem"},htmlReportBtn:{backgroundColor:"#059669",color:"#ffffff",border:"none",borderRadius:"0.45rem",padding:"0.5rem 0.9rem",fontSize:"0.82rem",fontWeight:700,cursor:"pointer"},actionBtnPrimary:{backgroundColor:"#2563eb",color:"#ffffff",border:"none",borderRadius:"0.45rem",padding:"0.5rem 0.9rem",fontSize:"0.82rem",fontWeight:600,cursor:"pointer"},actionBtnSecondary:{backgroundColor:"#0f172a",color:"#e2e8f0",border:"1px solid #475569",borderRadius:"0.45rem",padding:"0.5rem 0.9rem",fontSize:"0.82rem",fontWeight:600,cursor:"pointer"},errorAlert:{backgroundColor:"#7f1d1d",border:"1px solid #ef4444",color:"#fecaca",padding:"0.75rem 1rem",borderRadius:"0.5rem",fontSize:"0.85rem"},decryptBox:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",borderRadius:"0.65rem",padding:"1rem 1.25rem"},decryptForm:{display:"flex",flexDirection:"column",gap:"0.75rem"},decryptInputRow:{display:"flex",gap:"0.6rem",flexWrap:"wrap"},decryptInput:{flex:1,minWidth:"240px",padding:"0.55rem 0.8rem",borderRadius:"0.4rem",border:"1px solid #475569",backgroundColor:"#1e293b",color:"#f8fafc",fontSize:"0.88rem"},executiveCard:{backgroundColor:"#1e293b",border:"2px solid #10b981",borderRadius:"0.75rem",padding:"1.15rem 1.35rem",display:"flex",flexDirection:"column",gap:"0.75rem"},executiveTopRow:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"0.75rem"},executiveHeadlineGroup:{display:"flex",alignItems:"center",gap:"0.65rem",flexWrap:"wrap"},executiveStatusBadge:{color:"#ffffff",fontSize:"0.72rem",fontWeight:800,padding:"0.25rem 0.65rem",borderRadius:"0.35rem",letterSpacing:"0.04em"},executiveHeadline:{margin:0,fontSize:"1.05rem",fontWeight:700,color:"#f8fafc"},assignedTeamBadge:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",color:"#e0f2fe",fontSize:"0.8rem",padding:"0.35rem 0.75rem",borderRadius:"0.45rem"},executivePlainText:{margin:0,fontSize:"0.9rem",color:"#e2e8f0",lineHeight:1.55},executiveDiagnosisBox:{backgroundColor:"#0f172a",borderLeft:"3px solid #38bdf8",borderRadius:"0.4rem",padding:"0.65rem 0.85rem",fontSize:"0.83rem",color:"#cbd5e1",display:"flex",flexDirection:"column",gap:"0.3rem"},actionStepsRow:{color:"#93c5fd",fontSize:"0.8rem"},executiveMetricsGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:"0.65rem"},execMetricBox:{backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"0.45rem",padding:"0.55rem 0.75rem",display:"flex",flexDirection:"column",gap:"0.15rem"},execMetricLabel:{fontSize:"0.7rem",color:"#94a3b8",textTransform:"uppercase",fontWeight:600},execMetricValue:{fontSize:"0.86rem",color:"#f8fafc"},splitLayout:{display:"grid",gridTemplateColumns:"minmax(480px, 1.3fr) minmax(380px, 1fr)",gap:"1rem",minHeight:"560px"},playerPanel:{display:"flex",flexDirection:"column",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.75rem",overflow:"hidden"},viewportHost:{position:"relative",flex:1,minHeight:"430px",backgroundColor:"#090d16",padding:"12px",overflow:"hidden"},playerMount:{width:"100%",height:"100%"},emptyStage:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#64748b",fontSize:"0.9rem",textAlign:"center",padding:"2rem"},controlsBar:{borderTop:"1px solid #334155",backgroundColor:"#0f172a",padding:"0.85rem 1rem"},scrubberContainer:{position:"relative",marginBottom:"0.65rem"},scrubber:{width:"100%",cursor:"pointer",accentColor:"#38bdf8"},markersTrack:{position:"relative",height:"8px",marginTop:"2px"},timelineMarker:{position:"absolute",top:0,width:"6px",height:"8px",borderRadius:"2px",transform:"translateX(-50%)",cursor:"pointer"},transportRow:{display:"flex",justifyContent:"space-between",alignItems:"center",flexWrap:"wrap",gap:"0.5rem"},transportLeft:{display:"flex",alignItems:"center",gap:"0.75rem"},playButton:{backgroundColor:"#0284c7",color:"#ffffff",border:"none",borderRadius:"0.4rem",padding:"0.45rem 0.9rem",fontWeight:600,fontSize:"0.85rem",cursor:"pointer"},timeReadout:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace",fontSize:"0.82rem",color:"#94a3b8"},transportRight:{display:"flex",alignItems:"center",gap:"0.85rem"},skipToggle:{display:"flex",alignItems:"center",gap:"0.35rem",fontSize:"0.8rem",color:"#cbd5e1",cursor:"pointer"},speedGroup:{display:"flex",gap:"0.25rem"},speedBtn:{border:"1px solid #334155",borderRadius:"0.3rem",padding:"0.25rem 0.5rem",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},inspectorPanel:{display:"flex",flexDirection:"column",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"0.75rem",overflow:"hidden",maxHeight:"580px"},inspectorTabs:{display:"flex",backgroundColor:"#0f172a",borderBottom:"1px solid #334155"},tabBtn:{flex:1,backgroundColor:"transparent",border:"none",borderBottom:"2px solid transparent",padding:"0.65rem 0.35rem",fontSize:"0.75rem",fontWeight:600,cursor:"pointer"},inspectorBody:{flex:1,overflowY:"auto",padding:"0.75rem"},storylineHint:{backgroundColor:"#0f172a",border:"1px solid #334155",borderRadius:"0.4rem",padding:"0.55rem 0.7rem",fontSize:"0.76rem",color:"#cbd5e1",lineHeight:1.45},storyStepCard:{backgroundColor:"#0f172a",border:"1px solid #334155",borderLeft:"4px solid #38bdf8",borderRadius:"0.4rem",padding:"0.6rem 0.75rem",cursor:"pointer"},storyStepHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"0.25rem"},storyBadge:{fontSize:"0.68rem",fontWeight:800,letterSpacing:"0.03em"},storyTitle:{fontSize:"0.84rem",fontWeight:700,color:"#f8fafc",marginBottom:"0.2rem"},storyDetail:{fontSize:"0.78rem",color:"#cbd5e1",lineHeight:1.4},storyTechNote:{marginTop:"0.3rem",fontSize:"0.7rem",color:"#64748b",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},networkTabLayout:{display:"flex",flexDirection:"column",gap:"0.75rem",height:"100%"},networkList:{display:"flex",flexDirection:"column",gap:"0.35rem",maxHeight:"210px",overflowY:"auto",borderBottom:"1px solid #334155",paddingBottom:"0.5rem"},networkRow:{padding:"0.5rem 0.65rem",borderRadius:"0.4rem",border:"1px solid #334155",cursor:"pointer"},networkRowTop:{display:"flex",alignItems:"center",gap:"0.45rem",marginBottom:"0.25rem"},statusBadge:{fontSize:"0.7rem",fontWeight:700,padding:"0.1rem 0.4rem",borderRadius:"0.25rem",color:"#ffffff"},methodBadge:{fontSize:"0.75rem",fontWeight:700,color:"#e2e8f0"},typeTag:{fontSize:"0.68rem",color:"#94a3b8",backgroundColor:"#0f172a",padding:"0.1rem 0.35rem",borderRadius:"0.25rem"},durationText:{fontSize:"0.75rem",color:"#38bdf8",marginLeft:"auto"},relTimeText:{fontSize:"0.72rem",color:"#64748b",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},urlText:{fontSize:"0.76rem",color:"#cbd5e1",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},networkDetailPane:{flex:1,overflowY:"auto",backgroundColor:"#0f172a",borderRadius:"0.45rem",border:"1px solid #334155",padding:"0.75rem"},detailHeader:{fontSize:"0.8rem",color:"#38bdf8",marginBottom:"0.6rem",wordBreak:"break-all"},detailSection:{marginBottom:"0.75rem"},detailLabel:{fontSize:"0.74rem",fontWeight:600,color:"#94a3b8",marginBottom:"0.3rem",textTransform:"uppercase",letterSpacing:"0.03em"},codeBlock:{margin:0,padding:"0.55rem",backgroundColor:"#090d16",border:"1px solid #1e293b",borderRadius:"0.35rem",fontSize:"0.74rem",color:"#e2e8f0",overflowX:"auto",maxHeight:"150px",overflowY:"auto"},logList:{display:"flex",flexDirection:"column",gap:"0.5rem"},consoleItem:{backgroundColor:"#0f172a",border:"1px solid #334155",borderLeft:"3px solid #38bdf8",borderRadius:"0.35rem",padding:"0.55rem 0.7rem",cursor:"pointer"},consoleHeader:{display:"flex",justifyContent:"space-between",marginBottom:"0.3rem"},consoleLevel:{fontSize:"0.7rem",fontWeight:700,color:"#cbd5e1"},consoleMessage:{margin:0,fontSize:"0.76rem",color:"#e2e8f0",whiteSpace:"pre-wrap",wordBreak:"break-word"},errorCard:{backgroundColor:"#450a0a",border:"1px solid #7f1d1d",borderRadius:"0.4rem",padding:"0.65rem",cursor:"pointer"},errorBadge:{backgroundColor:"#dc2626",color:"#ffffff",fontSize:"0.68rem",fontWeight:700,padding:"0.1rem 0.4rem",borderRadius:"0.25rem",textTransform:"uppercase"},errorTitle:{fontSize:"0.82rem",fontWeight:600,color:"#fecaca",margin:"0.35rem 0"},metadataPane:{display:"flex",flexDirection:"column",gap:"0.75rem"},issueCard:{backgroundColor:"#0f172a",border:"1px solid #38bdf8",borderRadius:"0.45rem",padding:"0.75rem"},issueTitle:{fontSize:"0.9rem",fontWeight:700,color:"#f8fafc",marginBottom:"0.35rem"},issueDesc:{margin:0,fontSize:"0.82rem",color:"#cbd5e1"},emptyInspector:{color:"#64748b",fontSize:"0.85rem",textAlign:"center",padding:"2rem 1rem"}};function Ns(t){if(typeof document>"u")return{destroy:()=>{}};const e=document.getElementById("rewindlog-vanilla-widget-root");e&&e.remove();const r=document.createElement("div");r.id="rewindlog-vanilla-widget-root",r.className="rewindlog-block",r.style.cssText=`
|
|
537
|
+
position: fixed;
|
|
538
|
+
right: 20px;
|
|
539
|
+
bottom: 20px;
|
|
540
|
+
z-index: 999999;
|
|
541
|
+
font-family: Inter, system-ui, -apple-system, sans-serif;
|
|
542
|
+
`;const n=document.createElement("button");n.type="button",n.style.cssText=`
|
|
543
|
+
display: flex;
|
|
544
|
+
align-items: center;
|
|
545
|
+
gap: 8px;
|
|
546
|
+
background-color: #0284c7;
|
|
547
|
+
color: #ffffff;
|
|
548
|
+
border: 1px solid rgba(255, 255, 255, 0.25);
|
|
549
|
+
border-radius: 9999px;
|
|
550
|
+
padding: 10px 18px;
|
|
551
|
+
font-size: 13px;
|
|
552
|
+
font-weight: 700;
|
|
553
|
+
cursor: pointer;
|
|
554
|
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
|
|
555
|
+
transition: transform 0.15s ease, background-color 0.2s ease;
|
|
556
|
+
`,n.innerHTML=`
|
|
557
|
+
<span style="width: 8px; height: 8px; border-radius: 50%; background-color: #ffffff; box-shadow: 0 0 6px #fff;"></span>
|
|
558
|
+
<span>🛟 Lapor Kendala</span>
|
|
559
|
+
`;const i=document.createElement("div");i.style.cssText=`
|
|
560
|
+
display: none;
|
|
561
|
+
position: absolute;
|
|
562
|
+
right: 0;
|
|
563
|
+
bottom: 52px;
|
|
564
|
+
width: 320px;
|
|
565
|
+
background-color: #0f172a;
|
|
566
|
+
border: 1px solid #334155;
|
|
567
|
+
border-radius: 14px;
|
|
568
|
+
padding: 16px;
|
|
569
|
+
box-shadow: 0 20px 45px rgba(0, 0, 0, 0.75);
|
|
570
|
+
color: #f8fafc;
|
|
571
|
+
box-sizing: border-box;
|
|
572
|
+
`;const s=t.getStats(),o=t.getTicketFormat(),l=o==="teams"?"Microsoft Teams":o==="slack"?"Slack":o==="jira"?"Jira":"WhatsApp";i.innerHTML=`
|
|
573
|
+
<div style="display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px;">
|
|
574
|
+
<div>
|
|
575
|
+
<h4 style="margin: 0; font-size: 15px; font-weight: 700; color: #f8fafc;">Laporkan Kendala</h4>
|
|
576
|
+
<p style="margin: 3px 0 0 0; font-size: 11px; color: #94a3b8;">🛡️ Privasi Terjaga • Rekaman 5 Menit Terakhir</p>
|
|
577
|
+
</div>
|
|
578
|
+
<button id="rewindlog-vanilla-close" type="button" style="background: none; border: none; color: #94a3b8; font-size: 16px; cursor: pointer; padding: 2px;">✕</button>
|
|
579
|
+
</div>
|
|
580
|
+
|
|
581
|
+
<textarea id="rewindlog-vanilla-note" rows="2" placeholder="Ceritakan singkat kendalanya... (opsional)" style="
|
|
582
|
+
width: 100%;
|
|
583
|
+
box-sizing: border-box;
|
|
584
|
+
padding: 8px 10px;
|
|
585
|
+
border-radius: 8px;
|
|
586
|
+
border: 1px solid #334155;
|
|
587
|
+
background-color: #1e293b;
|
|
588
|
+
color: #f8fafc;
|
|
589
|
+
font-size: 12px;
|
|
590
|
+
outline: none;
|
|
591
|
+
resize: none;
|
|
592
|
+
margin-bottom: 8px;
|
|
593
|
+
font-family: inherit;
|
|
594
|
+
"></textarea>
|
|
595
|
+
|
|
596
|
+
<div style="display: flex; justify-content: space-between; font-size: 10px; color: #94a3b8; padding: 5px 8px; background: rgba(30, 41, 59, 0.6); border-radius: 6px; margin-bottom: 10px;">
|
|
597
|
+
<span>📹 5 Menit Terakhir</span>
|
|
598
|
+
<span style="color: #34d399;">✓ Data Nasabah Disensor</span>
|
|
599
|
+
</div>
|
|
600
|
+
|
|
601
|
+
<div id="rewindlog-vanilla-feedback" style="display: none; background: #059669; color: #fff; border-radius: 6px; padding: 6px 10px; font-size: 11px; font-weight: 700; text-align: center; margin-bottom: 8px;"></div>
|
|
602
|
+
|
|
603
|
+
<div style="display: flex; flex-direction: column; gap: 6px;">
|
|
604
|
+
<button id="rewindlog-vanilla-copy-btn" type="button" style="
|
|
605
|
+
background-color: #059669;
|
|
606
|
+
color: #ffffff;
|
|
607
|
+
border: none;
|
|
608
|
+
border-radius: 8px;
|
|
609
|
+
padding: 9px 12px;
|
|
610
|
+
font-size: 12px;
|
|
611
|
+
font-weight: 700;
|
|
612
|
+
cursor: pointer;
|
|
613
|
+
width: 100%;
|
|
614
|
+
text-align: center;
|
|
615
|
+
">📋 Salin Laporan ke ${l}</button>
|
|
616
|
+
|
|
617
|
+
<button id="rewindlog-vanilla-html-btn" type="button" style="
|
|
618
|
+
background-color: #1e293b;
|
|
619
|
+
color: #cbd5e1;
|
|
620
|
+
border: 1px solid #334155;
|
|
621
|
+
border-radius: 8px;
|
|
622
|
+
padding: 7px 10px;
|
|
623
|
+
font-size: 11px;
|
|
624
|
+
font-weight: 600;
|
|
625
|
+
cursor: pointer;
|
|
626
|
+
width: 100%;
|
|
627
|
+
text-align: center;
|
|
628
|
+
">📄 Unduh Dokumen Laporan (HTML)</button>
|
|
629
|
+
</div>
|
|
630
|
+
`,r.appendChild(i),r.appendChild(n),document.body.appendChild(r);let c=!1;const u=()=>{c=!c,i.style.display=c?"block":"none"};n.addEventListener("click",u);const a=i.querySelector("#rewindlog-vanilla-close");a&&a.addEventListener("click",()=>{c=!1,i.style.display="none"});const h=i.querySelector("#rewindlog-vanilla-copy-btn"),d=i.querySelector("#rewindlog-vanilla-feedback"),f=i.querySelector("#rewindlog-vanilla-note");h&&h.addEventListener("click",async()=>{const p=f?f.value.trim():"",y=t.getSnapshot({title:p||"Laporan Kendala Aplikasi",description:p||void 0,severity:(s.errorLogsCount??0)>0?"critical":"high"}),v=Et(y,t.getTicketFormat());try{await navigator.clipboard.writeText(v),d&&(d.textContent=`✓ Laporan tersalin untuk ${l}! Tinggal tempel ke chat.`,d.style.display="block",setTimeout(()=>{d.style.display="none"},3500))}catch{alert("Gagal menyalin ke clipboard")}});const m=i.querySelector("#rewindlog-vanilla-html-btn");return m&&m.addEventListener("click",()=>{const p=f?f.value.trim():"",y=t.getSnapshot({title:p||"Laporan Kendala Aplikasi",description:p||void 0,severity:(s.errorLogsCount??0)>0?"critical":"high"});sr(y)}),{destroy:()=>{r.remove()}}}let Ut=null,Cn=null;function lc(t={}){if(Ut)return Ut;const{autoInjectWidget:e=!0,...r}=t,n=new As(r);return n.start(),Ut=n,e&&typeof document<"u"&&(Cn=Ns(n)),n}function cc(){return Ut}function uc(){Ut&&(Ut.stop(),Ut=null),Cn&&(Cn.destroy(),Cn=null)}const dc={init:lc,getInstance:cc,destroy:uc,RewindLogSDK:As,injectVanillaWidget:Ns,generateExecutiveSummary:yt,exportReadableHtmlReport:sr,formatTicketClipboardSummary:Et,computeTelemetrySha256:nr,encryptPayloadWithAesGcm:ks,decryptPayloadWithAesGcm:Ms};typeof window<"u"&&(window.RewindLog=dc),Re.ReplayStudio=Jh,Re.RewindLogFloatingWidget=Yh,Re.RewindLogSDK=As,Re.computeTelemetrySha256=nr,Re.decryptPayloadWithAesGcm=Ms,Re.default=dc,Re.destroy=uc,Re.encryptPayloadWithAesGcm=ks,Re.exportReadableHtmlReport=sr,Re.formatCompactOneLiner=Zl,Re.formatJiraTicket=ec,Re.formatMarkdownTicket=rc,Re.formatSlackTicket=tc,Re.formatTeamsTicket=Ql,Re.formatTicketClipboardSummary=Et,Re.formatWhatsAppTicket=Ts,Re.generateExecutiveSummary=yt,Re.getInstance=cc,Re.init=lc,Re.injectVanillaWidget=Ns,Re.passesLuhnCheck=Yl,Re.sanitizeBankingUrl=Sn,Re.scrubBankingFreeText=Ve,Object.defineProperties(Re,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|