@mindstudio-ai/browser-agent 0.1.82 → 0.1.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +22 -22
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";var __MindStudioBrowserAgent=(()=>{var ir=Object.defineProperty;var
|
|
2
|
-
`);let i=r.length>0?t+1:t;return o+=fr(e.children,i),o}function ai(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e instanceof Error)return e.stack||e.message||String(e);if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function Ie(e){return new Promise(t=>setTimeout(t,e))}function Vt(){let e=null,t=0;for(let n of document.querySelectorAll("*")){let r=n,o=getComputedStyle(r).overflowY;if(o!=="auto"&&o!=="scroll")continue;let i=r.scrollHeight-r.clientHeight;i<=20||i>t&&(t=i,e=r)}return e??document.documentElement}var yc=["log","info","warn","error","debug"];function si(){if(!console.__ms_patched){console.__ms_patched=!0;for(let e of yc){let t=console[e];console[e]=(...n)=>{t&&t.apply(console,n),we({type:"console",level:e,args:n.map(ai),url:location.href})}}}}function li(){window.__ms_error_patched||(window.__ms_error_patched=!0,window.addEventListener("error",e=>{lr({type:"error",message:e.message,stack:e.error&&e.error.stack||"",source:e.filename,line:e.lineno,column:e.colno,url:location.href})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason||{};lr({type:"error",message:t.message||String(t),stack:t.stack||"",url:location.href})}))}function ci(){if(!window.fetch||window.fetch.__ms_patched)return;let e=window.fetch;window.fetch=function(t,n){let r=(n?.method||"GET").toUpperCase(),o=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(o.includes("/__mindstudio_dev__/"))return e.apply(this,[t,n]);let i=Date.now();Ht();let a;try{a=e.apply(this,[t,n])}catch(s){throw st(),s}return a.then(s=>{st();let l={type:"network",method:r,url:o,status:s.status,statusText:s.statusText,duration:Date.now()-i,ok:s.ok};if(s.ok)we(l);else try{s.clone().text().then(c=>{l.body=c.slice(0,1e3),we(l)}).catch(()=>we(l))}catch{we(l)}return s},s=>{throw st(),we({type:"network",method:r,url:o,error:s.message||String(s),duration:Date.now()-i,ok:!1}),s})},window.fetch.__ms_patched=!0}function ui(){document.__ms_click_patched||(document.__ms_click_patched=!0,document.addEventListener("click",e=>{let t=e.target;if(!t)return;let n=(t.textContent||"").trim().slice(0,100);we({type:"interaction",event:"click",target:ve(t),text:n,url:location.href})},!0))}function di(){if(XMLHttpRequest.prototype.open.__ms_patched)return;let e=window.XMLHttpRequest,t=e.prototype.open,n=e.prototype.send;e.prototype.open=function(r,o,...i){return this.__ms_method=r.toUpperCase(),this.__ms_url=String(o),t.apply(this,[r,o,...i])},e.prototype.send=function(r){let o=this.__ms_method||"GET",i=this.__ms_url||"";if(i.includes("/__mindstudio_dev__/"))return n.apply(this,[r]);let a=Date.now();return Ht(),this.addEventListener("loadend",function(){st(),we({type:"network",method:o,url:i,status:this.status,statusText:this.statusText,duration:Date.now()-a,ok:this.status>=200&&this.status<300,...this.status>=400?{body:(this.responseText||"").slice(0,1e3)}:{},via:"xhr"})},{once:!0}),n.apply(this,[r])},XMLHttpRequest.prototype.open.__ms_patched=!0}function Re(e){let t=null;if(e.ref){let n=Ge(),r=n.get(e.ref);if(r&&r.isConnected)if(Fe(r))t={element:r,matched:`${ve(r)} [ref=${e.ref}]`};else throw new Error(`Element [ref=${e.ref}] exists but is hidden (${pr(r)}). It may be inside a closed dialog or collapsed section.`);else{let o=[...n.entries()].filter(([,i])=>i.isConnected&&Fe(i)).slice(0,10).map(([i,a])=>`${ve(a)} [ref=${i}]`).join(", ");throw new Error(`Element [ref=${e.ref}] not found. `+(o?`Available refs: ${o}`:"No refs available \u2014 take a snapshot first."))}}if(!t&&(e.text||e.role&&e.text)){let n=e.text,r=e.role,o=fi(n,r);if(o.length===0){let i=fi(n,r,!0);if(i.length>0)throw new Error(`Found ${r?r+" ":""}"${n}" but it is hidden (${pr(i[0])}). Wait for it to become visible or check if a dialog/modal needs to be opened first.`);let a=r?`${r} "${n}"`:`"${n}"`,s=pi(r);throw new Error(`No element found matching ${a}. `+(s?`Visible ${r||"element"}s: ${s}`:"The page may still be loading \u2014 try a wait command first."))}if(o.length>1){let i=o.filter(mi),a=i.length===1?i[0]:o[0];t={element:a,matched:ve(a)}}else t={element:o[0],matched:ve(o[0])}}if(!t&&e.role&&!e.text){let n=e.role,r=bc(n);if(r.length===0){let o=pi(n);throw new Error(`No visible element with role "${n}" found. `+(o?`Visible ${n}s: ${o}`:"The page may still be loading \u2014 try a wait command first."))}t={element:r[0],matched:ve(r[0])}}if(!t&&e.label){let n=e.label,r=wc(n);if(!r){let o=[...document.querySelectorAll("label")].filter(Fe).map(i=>`"${(i.textContent||"").trim().slice(0,40)}"`).slice(0,8).join(", ");throw new Error(`No input found with label "${n}". `+(o?`Visible labels: ${o}`:"No labels found on the page."))}t={element:r,matched:`${ve(r)} via label "${n}"`}}if(!t&&e.selector){let n=e.selector,r=document.querySelector(n);if(!r)throw new Error(`No element found for selector "${n}".`);if(!Fe(r))throw new Error(`Found element for selector "${n}" but it is hidden (${pr(r)}).`);t={element:r,matched:`${ve(r)} via selector "${n}"`}}if(!t)throw new Error("No targeting field provided (need ref, text, role, label, or selector)");return t}function fi(e,t,n=!1){let r=[],o=e.toLowerCase();for(let i of document.querySelectorAll("*")){if(!n&&!Fe(i)||n&&!i.isConnected||t&&xe(i)!==t)continue;if(Te(i).toLowerCase().includes(o)){r.push(i);continue}i.children.length||(i.textContent||"").trim().toLowerCase().includes(o)&&r.push(i)}return r}function bc(e){let t=[];for(let n of document.querySelectorAll("*"))Fe(n)&&xe(n)===e&&t.push(n);return t}function wc(e){let t=e.toLowerCase();for(let n of document.querySelectorAll("label")){if(!(n.textContent||"").trim().toLowerCase().includes(t))continue;let o=n.getAttribute("for");if(o){let a=document.getElementById(o);if(a&&Fe(a))return a}let i=n.querySelector("input, textarea, select");if(i&&Fe(i))return i}return null}function Fe(e){if(!e.isConnected)return!1;try{let t=getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1}catch{return!1}return!0}function mi(e){if(e.matches('a, button, input, textarea, select, [role="button"], [role="link"], [tabindex]'))return!0;try{return getComputedStyle(e).cursor==="pointer"}catch{return!1}}function pr(e){try{let t=getComputedStyle(e);if(t.display==="none")return"display: none";if(t.visibility==="hidden")return"visibility: hidden"}catch{}return e.getAttribute("aria-hidden")==="true"?'aria-hidden="true"':"hidden"}function pi(e){let t=[];for(let n of document.querySelectorAll("*"))if(Fe(n)&&(e?xe(n)===e&&t.push(n):mi(n)&&t.push(n),t.length>=10))break;return t.length===0?"":t.map(n=>`"${Te(n).slice(0,40)||ve(n)}"`).join(", ")}function hr(e){let t=e.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,o={bubbles:!0,cancelable:!0,clientX:n,clientY:r,button:0};e.dispatchEvent(new PointerEvent("pointerdown",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mousedown",o)),e instanceof HTMLElement&&e.focus(),e.dispatchEvent(new PointerEvent("pointerup",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mouseup",o)),e.dispatchEvent(new MouseEvent("click",o))}var vc=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set,Sc=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set;async function bi(e,t,n={}){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error("type command requires an input or textarea element");e.focus(),hr(e),n.clear&&(hi(e,""),e.dispatchEvent(new Event("input",{bubbles:!0})));for(let r=0;r<t.length;r++){let o=t[r];e.dispatchEvent(new KeyboardEvent("keydown",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keypress",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),hi(e,e.value+o),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keyup",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),await Ie(Cc(o,t.length))}e.dispatchEvent(new Event("change",{bubbles:!0}))}function Cc(e,t){let n=Math.random()*50-25,r;if(e===" "?r=120+n:/[.,!?;:\-]/.test(e)?r=140+n:/[A-Z]/.test(e)?r=115+n:r=85+n,t<=20)return r;let o=Math.max(.1,20/t);return r*o}function hi(e,t){let n=e instanceof HTMLTextAreaElement?Sc:vc;n?n.call(e,t):e.value=t}async function wi(e){let t=e.timeout||5e3,n=Date.now(),r=n+t;for(;Date.now()<r;)try{return{...Re(e),elapsed:Date.now()-n}}catch{await Ie(100)}let o=e.text?`"${e.text}"`:e.role?`role "${e.role}"`:e.selector?`selector "${e.selector}"`:"element";throw new Error(`Timed out waiting for ${o} after ${t}ms`)}var gi=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set;function vi(e,t){if(!(e instanceof HTMLSelectElement))throw new Error("select command requires a <select> element");let n=t.toLowerCase(),r=null;for(let o of e.options)if(o.text.toLowerCase().includes(n)||o.value.toLowerCase()===n||o.label.toLowerCase().includes(n)){r=o;break}if(!r){let o=[...e.options].map(i=>`"${i.text}"`).join(", ");throw new Error(`No option matching "${t}" in select. Available options: ${o}`)}return gi?gi.call(e,r.value):e.value=r.value,e.dispatchEvent(new Event("change",{bubbles:!0})),e.dispatchEvent(new Event("input",{bubbles:!0})),r.text}async function Si(e){try{let t=e.trim(),r=/\breturn\b/.test(t)||/[;{]/.test(t)?e:`return (${e})`,o=(async()=>{}).constructor,i=new o(r);return bt(await i())}catch(t){throw new Error(`evaluate failed: ${t instanceof Error?t.message:String(t)}`)}}var xc=10,zt=500,qt=500,mr=2e4,yi=1e3;function bt(e,t=0,n=new WeakSet){if(e===null)return null;let r=typeof e;if(r==="string"){let i=e;return i.length>mr?`${i.slice(0,mr)}\u2026(+${i.length-mr} chars)`:i}if(r==="number"||r==="boolean")return e;if(r==="undefined")return"[undefined]";if(r==="bigint")return`${e.toString()}n`;if(r==="symbol")return e.toString();if(r==="function"){let i=e.name;return i?`[Function: ${i}]`:"[Function]"}let o=e;if(typeof Element<"u"&&o instanceof Element){let i=o.outerHTML??"";return{__type:"Element",tag:o.tagName.toLowerCase(),id:o.id||void 0,class:o.getAttribute("class")||void 0,text:(o.textContent||"").trim().slice(0,200)||void 0,html:i.length>yi?`${i.slice(0,yi)}\u2026`:i}}if(typeof Node<"u"&&o instanceof Node)return{__type:"Node",nodeName:o.nodeName,text:(o.textContent||"").trim().slice(0,200)||void 0};if(o instanceof Error)return{__type:"Error",name:o.name,message:o.message,stack:o.stack};if(o instanceof Date)return o.toISOString();if(o instanceof RegExp)return o.toString();if(n.has(o))return"[Circular]";if(t>=xc)return"[Max depth]";n.add(o);try{if(Array.isArray(o)){let l=o.slice(0,zt).map(c=>bt(c,t+1,n));return o.length>zt&&l.push(`\u2026(+${o.length-zt} more)`),l}if(o instanceof Map){let l={__type:"Map"},c=0;for(let[u,d]of o){if(c++>=qt){l["\u2026"]=`(+${o.size-qt} more)`;break}l[String(u)]=bt(d,t+1,n)}return l}if(o instanceof Set)return{__type:"Set",values:[...o].slice(0,zt).map(l=>bt(l,t+1,n))};let i=Object.keys(o),a={},s=0;for(let l of i){if(s++>=qt){a["\u2026"]=`(+${i.length-qt} more)`;break}a[l]=bt(o[l],t+1,n)}return a}catch{return`[Unserializable: ${Object.prototype.toString.call(o)}]`}finally{n.delete(o)}}var Ci="__mindstudio-touch-circle",gr="__mindstudio-touch-style",xi=44,Ii=5,Ai=.95,Gt=.5,yr=.45,Mi=600;function Ac(){document.getElementById(Ci)?.remove();let e=document.createElement("div");return e.id=Ci,e.style.cssText=["position: fixed","z-index: 2147483647","pointer-events: none",`width: ${xi}px`,`height: ${xi}px`,"border-radius: 50%","background: rgba(255, 255, 255, 0.08)","border: 2px solid rgba(255, 255, 255, 0.85)","box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1)","backdrop-filter: blur(1px)","-webkit-backdrop-filter: blur(1.5px)","transform: translate(-50%, -50%) scale(1)","transition: transform 100ms ease, opacity 100ms ease, background 100ms ease","opacity: 0","will-change: left, top, transform, opacity"].join("; "),document.documentElement.appendChild(e),e}function Mc(e){e.style.transform="translate(-50%, -50%) scale(0.88)",e.style.background="rgba(255, 255, 255, 0.18)"}function Ei(e){e.style.transform="translate(-50%, -50%) scale(1)",e.style.background="rgba(255, 255, 255, 0.08)"}function ki(){window.parent!==window&&M().zoom.mobilePreview&&wr()}function wr(){let e=M().touch;if(e.active)return;e.active=!0,e.scrollContainer=Vt(),Rc();let t=Ac();e.circleEl=t,e.onMouseMove=n=>{let r=M();if(r.cursor.executing||r.screenshot.capturing){t.style.opacity="0";return}if(t.style.left=`${n.clientX}px`,t.style.top=`${n.clientY}px`,t.style.opacity="1",e.pressed){let o=Math.abs(n.clientX-e.startX),i=Math.abs(n.clientY-e.startY);if(!e.dragging&&(o>Ii||i>Ii)&&(e.dragging=!0),e.dragging){let a=e.scrollContainer||document.documentElement,s=performance.now(),l=s-e.lastMoveTime||16,c=e.lastX-n.clientX,u=e.lastY-n.clientY;e.bouncing&&Tc();let d=a.scrollTop;a.scrollTop+=u,a.scrollLeft+=c;let m=a.scrollTop-d,p=u-m;if(Math.abs(p)>.5){let h=yr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*h,br()}else if(e.overscrollY!==0){let h=yr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*h,(e.overscrollY>0&&u<0||e.overscrollY<0&&u>0)&&(e.overscrollY*=.7),br()}e.velocityX=.8*(c/l)+.2*e.velocityX,e.velocityY=.8*(u/l)+.2*e.velocityY,e.lastMoveTime=s,n.preventDefault()}e.lastX=n.clientX,e.lastY=n.clientY}},e.onMouseDown=n=>{M().cursor.executing||(jt(),e.pressed=!0,e.dragging=!1,e.startX=n.clientX,e.startY=n.clientY,e.lastX=n.clientX,e.lastY=n.clientY,e.velocityX=0,e.velocityY=0,e.lastMoveTime=performance.now(),Mc(t))},e.onMouseUp=()=>{let n=e.dragging;n&&document.addEventListener("click",Ec,{capture:!0,once:!0}),e.pressed=!1,e.dragging=!1,Ei(t),n&&(e.overscrollY!==0&&Li(),(Math.abs(e.velocityX)>Gt/16||Math.abs(e.velocityY)>Gt/16)&&kc())},e.onMouseLeave=()=>{e.pressed=!1,e.dragging=!1,jt(),t.style.opacity="0",Ei(t)},e.onDragStart=n=>n.preventDefault(),document.addEventListener("mousemove",e.onMouseMove),document.addEventListener("mousedown",e.onMouseDown),document.addEventListener("mouseup",e.onMouseUp),document.addEventListener("mouseleave",e.onMouseLeave),document.addEventListener("dragstart",e.onDragStart)}function Ti(){let e=M().touch;e.active&&(e.active=!1,e.pressed=!1,e.dragging=!1,jt(),e.overscrollY!==0&&(e.overscrollY=0,document.body.style.transition="",document.body.style.transform=""),Nc(),e.circleEl&&(e.circleEl.remove(),e.circleEl=null),e.onMouseMove&&document.removeEventListener("mousemove",e.onMouseMove),e.onMouseDown&&document.removeEventListener("mousedown",e.onMouseDown),e.onMouseUp&&document.removeEventListener("mouseup",e.onMouseUp),e.onMouseLeave&&document.removeEventListener("mouseleave",e.onMouseLeave),e.onDragStart&&document.removeEventListener("dragstart",e.onDragStart),e.onMouseMove=null,e.onMouseDown=null,e.onMouseUp=null,e.onMouseLeave=null,e.onDragStart=null)}function Ri(){let{circleEl:e}=M().touch;e&&(e.style.opacity="0")}function Ni(){let e=M().touch;e.active&&e.circleEl&&(e.circleEl.style.opacity="1")}function Ec(e){e.preventDefault(),e.stopPropagation()}function kc(){jt();let e=M().touch,t=e.scrollContainer||document.documentElement,n=e.velocityX*16,r=e.velocityY*16;function o(){let i=M().touch;if(n*=Ai,r*=Ai,Math.abs(n)<Gt&&Math.abs(r)<Gt){i.momentumFrame=null,i.overscrollY!==0&&Li();return}let a=t.scrollTop;t.scrollTop+=r,t.scrollLeft+=n;let s=t.scrollTop-a,l=r-s;if(Math.abs(l)>.5){let c=yr*.5/(1+Math.abs(i.overscrollY)/200);i.overscrollY+=l*c,br(),r*=.7}i.momentumFrame=requestAnimationFrame(o)}e.momentumFrame=requestAnimationFrame(o)}function jt(){let e=M().touch;e.momentumFrame!==null&&(cancelAnimationFrame(e.momentumFrame),e.momentumFrame=null)}function br(){let e=M().touch;document.body.style.transition="none",document.body.style.transform=`translateY(${-e.overscrollY}px)`}function Li(){let e=M().touch;e.bouncing=!0,e.overscrollY=0,document.body.style.transition=`transform ${Mi}ms cubic-bezier(0.2, 0.9, 0.3, 1)`,document.body.style.transform="",e.bounceTimer&&clearTimeout(e.bounceTimer),e.bounceTimer=setTimeout(()=>{let t=M().touch;t.bouncing=!1,t.bounceTimer=null,document.body.style.transition="",document.body.style.transform=""},Mi)}function Tc(){let e=M().touch;e.bouncing&&(e.bouncing=!1,e.bounceTimer&&(clearTimeout(e.bounceTimer),e.bounceTimer=null),document.body.style.transition="")}function Rc(){document.getElementById(gr)?.remove();let e=document.createElement("style");e.id=gr,e.textContent=`
|
|
1
|
+
"use strict";var __MindStudioBrowserAgent=(()=>{var ir=Object.defineProperty;var lc=Object.getOwnPropertyDescriptor;var cc=Object.getOwnPropertyNames;var uc=Object.prototype.hasOwnProperty;var ar=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var dc=(e,t)=>{for(var n in t)ir(e,n,{get:t[n],enumerable:!0})},fc=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of cc(t))!uc.call(e,o)&&o!==n&&ir(e,o,{get:()=>t[o],enumerable:!(r=lc(t,o))||r.enumerable});return e};var pc=e=>fc(ir({},"__esModule",{value:!0}),e);var zh={};dc(zh,{executeSteps:()=>At,getRefMap:()=>qe,resolveElement:()=>Re,takeSnapshot:()=>je,takeSnapshotSync:()=>Ut});var sr="__ms";function mc(){return{ws:{ws:null,clientId:null,reconnectDelay:1e3,closing:!1,busy:!1},cursor:{el:null,rippleEl:null,x:-100,y:-100,hasPosition:!1,hideTimer:null,executing:!1,targetElement:null,trackingFrame:null,moveTimer:null,settledResolve:null,visibilityState:"hidden",preSnapshotState:null},snapshot:{refCounter:0,refMap:new Map},networkIdle:{activeRequests:0},transport:{buffer:[],flushTimer:null,capturing:!1,captured:[],wsGetter:null},messages:{handler:null},nav:{lastUrl:null},screenshot:{capturing:!1},fonts:{initialized:!1,observer:null},zoom:{pipMode:!1,mobilePreview:!1},touch:{circleEl:null,active:!1,pressed:!1,dragging:!1,startX:0,startY:0,lastX:0,lastY:0,onMouseMove:null,onMouseDown:null,onMouseUp:null,onMouseLeave:null,onDragStart:null,momentumFrame:null,overscrollY:0,bouncing:!1,bounceTimer:null,scrollContainer:null,velocityX:0,velocityY:0,lastMoveTime:0},mirror:{recording:!1,stopFn:null},sessionRecording:{active:!1,runId:null,stopFn:null,buffer:[]},authCredsWidget:{initialized:!1,host:null,observer:null,debounceTimer:null,awaitingCode:!1,awaitingCodeTimer:null,codePollTimer:null,codeAttempts:0,codeSubmitted:!1,codeSeenCount:0,blankPolls:0}}}function E(){let e=window;return e[sr]||(e[sr]=mc()),e[sr]}var oi="/__mindstudio_dev__/logs",hc=2e3;function ii(e){E().transport.wsGetter=e}function ai(){let e=E().transport;if(e.buffer.length===0)return;let t=e.buffer;e.buffer=[];let n=e.wsGetter?.();if(n&&n.readyState===WebSocket.OPEN)try{n.send(JSON.stringify({type:"log",entries:t}));return}catch{}try{let r=new XMLHttpRequest;r.open("POST",oi,!0),r.setRequestHeader("Content-Type","application/json"),r.send(JSON.stringify(t))}catch{}}function gc(){let e=E().transport;e.flushTimer||(e.flushTimer=setTimeout(()=>{e.flushTimer=null,ai()},hc))}function yc(){let e=E().transport;e.flushTimer&&(clearTimeout(e.flushTimer),e.flushTimer=null),ai()}function we(e){let t=E().transport;t.buffer.push(e),t.capturing&&t.captured.push(e),gc()}function lr(e){let t=E().transport;t.buffer.push(e),t.capturing&&t.captured.push(e),yc()}function cr(){let e=E().transport;e.capturing=!0,e.captured=[]}function ur(){let e=E().transport;e.capturing=!1;let t=e.captured;return e.captured=[],t}function si(){window.addEventListener("beforeunload",()=>{let e=E().transport;e.buffer.length>0&&navigator.sendBeacon&&navigator.sendBeacon(oi,JSON.stringify(e.buffer))})}var bc={a:"link",button:"button",input:"textbox",textarea:"textbox",select:"combobox",option:"option",h1:"heading",h2:"heading",h3:"heading",h4:"heading",h5:"heading",h6:"heading",nav:"navigation",main:"main",header:"banner",footer:"contentinfo",aside:"complementary",dialog:"dialog",details:"group",summary:"button",img:"img",ul:"list",ol:"list",li:"listitem",table:"table",tr:"row",th:"columnheader",td:"cell",form:"form",article:"article",section:"region",label:"label",fieldset:"group",legend:"legend",p:"paragraph",blockquote:"blockquote",pre:"code",code:"code",hr:"separator",progress:"progressbar"};function xe(e){let t=e.getAttribute("role");if(t)return t==="presentation"||t==="none"?null:t;let n=e.tagName.toLowerCase();if(n==="a")return e.hasAttribute("href")?"link":null;if(n==="section")return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"region":null;if(n==="form")return e.hasAttribute("aria-label")||e.hasAttribute("aria-labelledby")?"form":null;if(n==="img")return e.alt===""?null:"img";if(n==="input")switch(e.type){case"checkbox":return"checkbox";case"radio":return"radio";case"range":return"slider";case"submit":case"button":case"reset":return"button";case"hidden":return null;default:return"textbox"}return bc[n]??null}function li(e){if(e.hasAttribute("onclick")||e.hasAttribute("tabindex")&&e.getAttribute("tabindex")!=="-1")return!0;try{if(getComputedStyle(e).cursor==="pointer")return!0}catch{}return!1}function Te(e){let t=e.getAttribute("aria-label");if(t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let a=n.split(/\s+/).map(s=>{let l=document.getElementById(s);return l?Ge(l):""}).filter(Boolean).join(" ");if(a)return a}let r=e.tagName.toLowerCase();if(r==="input"||r==="textarea"||r==="select"){let a=wc(e);if(a)return a}if(r==="img"){let a=e.alt;if(a)return a.trim()}if(r==="fieldset"){let a=e.querySelector("legend");if(a)return Ge(a)}let o=Ge(e);if(o)return o;let i=e.getAttribute("title");return i?i.trim():""}function Ge(e){if(!e.children.length)return(e.textContent||"").trim();let t=[];for(let n of Array.from(e.childNodes))if(n.nodeType===Node.TEXT_NODE){let r=(n.textContent||"").trim();r&&t.push(r)}else if(n.nodeType===Node.ELEMENT_NODE){let r=n;if(Sc(r))continue;let o=vc(r),i=Ge(r);i&&(o&&t.length>0&&t.push(" "),t.push(i),o&&t.push(" "))}return t.join("").replace(/\s+/g," ").trim()}function wc(e){if(e.id){let n=document.querySelector(`label[for="${CSS.escape(e.id)}"]`);if(n)return Ge(n)}let t=e.closest("label");if(t){let n=t.cloneNode(!0),r=n.querySelector("input, textarea, select");r&&r.remove();let o=n.textContent?.trim();if(o)return o}return null}function vc(e){try{return!getComputedStyle(e).display.includes("inline")}catch{let t=e.tagName.toLowerCase();return["div","p","h1","h2","h3","h4","h5","h6","li","section","article","header","footer","nav","main","aside","blockquote","pre","form","fieldset","table","tr","br"].includes(t)}}function Sc(e){let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||e.getAttribute("aria-hidden")==="true")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden")return!0}catch{}return!1}function dr(e,t){try{let n=getComputedStyle(e,t).content;if(!n||n==="none"||n==="normal")return"";let r=n.match(/^["'](.*)["']$/);return r?r[1]:""}catch{return""}}function Ht(){E().networkIdle.activeRequests++}function st(){let e=E().networkIdle;e.activeRequests=Math.max(0,e.activeRequests-1)}var Cc=2;function ci(e=5e3,t=200){let n=()=>E().networkIdle.activeRequests<=Cc;return new Promise(r=>{let o=Date.now()+e,i=null;function a(){if(Date.now()>o){i&&clearTimeout(i),r();return}n()?i||(i=setTimeout(()=>{n()?r():(i=null,a())},t)):(i&&(clearTimeout(i),i=null),setTimeout(a,50))}a()})}function qe(){return E().snapshot.refMap}async function je(){return await ci(),Ut()}function Ut(){let e=E().snapshot;e.refCounter=0,e.refMap=new Map;let t=document.body;if(!t)return"(empty page)";let n=ui(t);return fr(n,0).trimEnd()}function ve(e){let t=xe(e),n=Te(e),r=n.length>60?n.slice(0,57)+"...":n;if(t&&r)return`${t} "${r}"`;if(t)return t;if(r)return`"${r}"`;let o=e.tagName.toLowerCase();return e.id?`${o}#${e.id}`:o}function ui(e){if(Ic(e))return[];let t=xe(e),n=!t&&li(e),r=t||(n?"clickable":null),o="";if(r){o=Te(e);let u=dr(e,"::before"),d=dr(e,"::after");(u||d)&&(o=[u,o,d].filter(Boolean).join(" ")),o.length>80&&(o=o.slice(0,77)+"...")}let i=Ac(e),a=t==="button"||t==="link"||t==="textbox"||t==="combobox"||t==="checkbox"||t==="radio"||t==="slider"||t==="tab"||t==="menuitem"||n,s=r&&o&&!a,l=null;if(a||s){let u=E().snapshot;u.refCounter++,l=`e${u.refCounter}`,u.refMap.set(l,e)}let c=xc(e);if(r){let u=c.length===0?"":fr(c,0).trim();return[{tag:r,name:o,attrs:i,ref:l,children:u&&u===o?[]:c,element:e}]}if(c.length===0){let u=Ge(e);if(u)return[{tag:null,name:u.length>80?u.slice(0,77)+"...":u,attrs:[],ref:null,children:[],element:e}]}return c}function xc(e){let t=[];for(let n of Array.from(e.childNodes))n.nodeType===Node.ELEMENT_NODE&&t.push(...ui(n));return t}function Ic(e){let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||t==="head"||e.getAttribute("aria-hidden")==="true"||e.id==="__mindstudio-browser-agent"||e.id==="__mindstudio-cursor"||e.id==="__mindstudio-cursor-ripple"||e.id==="__mindstudio-notes-host")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden"&&n.position!=="static")return!0}catch{}return!1}function Ac(e){let t=[],n=e.tagName.toLowerCase();if((n==="dialog"&&e.open||n==="details"&&e.open)&&t.push("open"),e.disabled&&t.push("disabled"),n==="input"){let i=e;(i.type==="checkbox"||i.type==="radio")&&i.checked&&t.push("checked")}if(n==="input"){let i=e;i.type!=="checkbox"&&i.type!=="radio"&&i.type!=="hidden"&&i.type!=="submit"&&i.type!=="button"&&i.type!=="reset"&&(t.push(`value="${i.value}"`),i.placeholder&&t.push(`placeholder="${i.placeholder}"`))}if(n==="textarea"){let i=e;t.push(`value="${i.value}"`),i.placeholder&&t.push(`placeholder="${i.placeholder}"`)}if(n==="select"){let i=e,a=i.options[i.selectedIndex];a&&t.push(`value="${a.text}"`)}let r=n.match(/^h([1-6])$/);r&&t.push(`level=${r[1]}`);let o=e.getAttribute("aria-expanded");return o==="true"&&t.push("expanded"),o==="false"&&t.push("collapsed"),e.getAttribute("aria-selected")==="true"&&t.push("selected"),e.getAttribute("aria-pressed")==="true"&&t.push("pressed"),t}function fr(e,t){let n="";for(let r of e)n+=Ec(r,t);return n}function Ec(e,t){let n=" ".repeat(t),r=[];e.tag&&r.push(e.tag),e.name&&r.push(`"${e.name}"`);for(let a of e.attrs)r.push(`[${a}]`);e.ref&&r.push(`[ref=${e.ref}]`);let o="";r.length>0&&(o+=`${n}${r.join(" ")}
|
|
2
|
+
`);let i=r.length>0?t+1:t;return o+=fr(e.children,i),o}function di(e){if(e===null)return"null";if(e===void 0)return"undefined";if(e instanceof Error)return e.stack||e.message||String(e);if(typeof e=="object")try{return JSON.stringify(e)}catch{return String(e)}return String(e)}function Ie(e){return new Promise(t=>setTimeout(t,e))}function Vt(){let e=null,t=0;for(let n of document.querySelectorAll("*")){let r=n,o=getComputedStyle(r).overflowY;if(o!=="auto"&&o!=="scroll")continue;let i=r.scrollHeight-r.clientHeight;i<=20||i>t&&(t=i,e=r)}return e??document.documentElement}var Mc=["log","info","warn","error","debug"];function fi(){if(!console.__ms_patched){console.__ms_patched=!0;for(let e of Mc){let t=console[e];console[e]=(...n)=>{t&&t.apply(console,n),we({type:"console",level:e,args:n.map(di),url:location.href})}}}}function pi(){window.__ms_error_patched||(window.__ms_error_patched=!0,window.addEventListener("error",e=>{lr({type:"error",message:e.message,stack:e.error&&e.error.stack||"",source:e.filename,line:e.lineno,column:e.colno,url:location.href})}),window.addEventListener("unhandledrejection",e=>{let t=e.reason||{};lr({type:"error",message:t.message||String(t),stack:t.stack||"",url:location.href})}))}function mi(){if(!window.fetch||window.fetch.__ms_patched)return;let e=window.fetch;window.fetch=function(t,n){let r=(n?.method||"GET").toUpperCase(),o=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(o.includes("/__mindstudio_dev__/"))return e.apply(this,[t,n]);let i=Date.now();Ht();let a;try{a=e.apply(this,[t,n])}catch(s){throw st(),s}return a.then(s=>{st();let l={type:"network",method:r,url:o,status:s.status,statusText:s.statusText,duration:Date.now()-i,ok:s.ok};if(s.ok)we(l);else try{s.clone().text().then(c=>{l.body=c.slice(0,1e3),we(l)}).catch(()=>we(l))}catch{we(l)}return s},s=>{throw st(),we({type:"network",method:r,url:o,error:s.message||String(s),duration:Date.now()-i,ok:!1}),s})},window.fetch.__ms_patched=!0}function hi(){document.__ms_click_patched||(document.__ms_click_patched=!0,document.addEventListener("click",e=>{let t=e.target;if(!t)return;let n=(t.textContent||"").trim().slice(0,100);we({type:"interaction",event:"click",target:ve(t),text:n,url:location.href})},!0))}function gi(){if(XMLHttpRequest.prototype.open.__ms_patched)return;let e=window.XMLHttpRequest,t=e.prototype.open,n=e.prototype.send;e.prototype.open=function(r,o,...i){return this.__ms_method=r.toUpperCase(),this.__ms_url=String(o),t.apply(this,[r,o,...i])},e.prototype.send=function(r){let o=this.__ms_method||"GET",i=this.__ms_url||"";if(i.includes("/__mindstudio_dev__/"))return n.apply(this,[r]);let a=Date.now();return Ht(),this.addEventListener("loadend",function(){st(),we({type:"network",method:o,url:i,status:this.status,statusText:this.statusText,duration:Date.now()-a,ok:this.status>=200&&this.status<300,...this.status>=400?{body:(this.responseText||"").slice(0,1e3)}:{},via:"xhr"})},{once:!0}),n.apply(this,[r])},XMLHttpRequest.prototype.open.__ms_patched=!0}function Re(e){let t=null;if(e.ref){let n=qe(),r=n.get(e.ref);if(r&&r.isConnected)if($e(r))t={element:r,matched:`${ve(r)} [ref=${e.ref}]`};else throw new Error(`Element [ref=${e.ref}] exists but is hidden (${pr(r)}). It may be inside a closed dialog or collapsed section.`);else{let o=[...n.entries()].filter(([,i])=>i.isConnected&&$e(i)).slice(0,10).map(([i,a])=>`${ve(a)} [ref=${i}]`).join(", ");throw new Error(`Element [ref=${e.ref}] not found. `+(o?`Available refs: ${o}`:"No refs available \u2014 take a snapshot first."))}}if(!t&&(e.text||e.role&&e.text)){let n=e.text,r=e.role,o=yi(n,r);if(o.length===0){let i=yi(n,r,!0);if(i.length>0)throw new Error(`Found ${r?r+" ":""}"${n}" but it is hidden (${pr(i[0])}). Wait for it to become visible or check if a dialog/modal needs to be opened first.`);let a=r?`${r} "${n}"`:`"${n}"`,s=bi(r);throw new Error(`No element found matching ${a}. `+(s?`Visible ${r||"element"}s: ${s}`:"The page may still be loading \u2014 try a wait command first."))}if(o.length>1){let i=o.filter(wi),a=i.length===1?i[0]:o[0];t={element:a,matched:ve(a)}}else t={element:o[0],matched:ve(o[0])}}if(!t&&e.role&&!e.text){let n=e.role,r=kc(n);if(r.length===0){let o=bi(n);throw new Error(`No visible element with role "${n}" found. `+(o?`Visible ${n}s: ${o}`:"The page may still be loading \u2014 try a wait command first."))}t={element:r[0],matched:ve(r[0])}}if(!t&&e.label){let n=e.label,r=Tc(n);if(!r){let o=[...document.querySelectorAll("label")].filter($e).map(i=>`"${(i.textContent||"").trim().slice(0,40)}"`).slice(0,8).join(", ");throw new Error(`No input found with label "${n}". `+(o?`Visible labels: ${o}`:"No labels found on the page."))}t={element:r,matched:`${ve(r)} via label "${n}"`}}if(!t&&e.selector){let n=e.selector,r=document.querySelector(n);if(!r)throw new Error(`No element found for selector "${n}".`);if(!$e(r))throw new Error(`Found element for selector "${n}" but it is hidden (${pr(r)}).`);t={element:r,matched:`${ve(r)} via selector "${n}"`}}if(!t)throw new Error("No targeting field provided (need ref, text, role, label, or selector)");return t}function yi(e,t,n=!1){let r=[],o=e.toLowerCase();for(let i of document.querySelectorAll("*")){if(!n&&!$e(i)||n&&!i.isConnected||t&&xe(i)!==t)continue;if(Te(i).toLowerCase().includes(o)){r.push(i);continue}i.children.length||(i.textContent||"").trim().toLowerCase().includes(o)&&r.push(i)}return r}function kc(e){let t=[];for(let n of document.querySelectorAll("*"))$e(n)&&xe(n)===e&&t.push(n);return t}function Tc(e){let t=e.toLowerCase();for(let n of document.querySelectorAll("label")){if(!(n.textContent||"").trim().toLowerCase().includes(t))continue;let o=n.getAttribute("for");if(o){let a=document.getElementById(o);if(a&&$e(a))return a}let i=n.querySelector("input, textarea, select");if(i&&$e(i))return i}return null}function $e(e){if(!e.isConnected)return!1;try{let t=getComputedStyle(e);if(t.display==="none"||t.visibility==="hidden")return!1}catch{return!1}return!0}function wi(e){if(e.matches('a, button, input, textarea, select, [role="button"], [role="link"], [tabindex]'))return!0;try{return getComputedStyle(e).cursor==="pointer"}catch{return!1}}function pr(e){try{let t=getComputedStyle(e);if(t.display==="none")return"display: none";if(t.visibility==="hidden")return"visibility: hidden"}catch{}return e.getAttribute("aria-hidden")==="true"?'aria-hidden="true"':"hidden"}function bi(e){let t=[];for(let n of document.querySelectorAll("*"))if($e(n)&&(e?xe(n)===e&&t.push(n):wi(n)&&t.push(n),t.length>=10))break;return t.length===0?"":t.map(n=>`"${Te(n).slice(0,40)||ve(n)}"`).join(", ")}function hr(e){let t=e.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,o={bubbles:!0,cancelable:!0,clientX:n,clientY:r,button:0};e.dispatchEvent(new PointerEvent("pointerdown",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mousedown",o)),e instanceof HTMLElement&&e.focus(),e.dispatchEvent(new PointerEvent("pointerup",{...o,pointerId:1})),e.dispatchEvent(new MouseEvent("mouseup",o)),e.dispatchEvent(new MouseEvent("click",o))}var Rc=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set,Nc=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set;async function xi(e,t,n={}){if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))throw new Error("type command requires an input or textarea element");e.focus(),hr(e),n.clear&&(vi(e,""),e.dispatchEvent(new Event("input",{bubbles:!0})));for(let r=0;r<t.length;r++){let o=t[r];e.dispatchEvent(new KeyboardEvent("keydown",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keypress",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),vi(e,e.value+o),e.dispatchEvent(new Event("input",{bubbles:!0})),e.dispatchEvent(new KeyboardEvent("keyup",{key:o,code:`Key${o.toUpperCase()}`,bubbles:!0})),await Ie(Lc(o,t.length))}e.dispatchEvent(new Event("change",{bubbles:!0}))}function Lc(e,t){let n=Math.random()*50-25,r;if(e===" "?r=120+n:/[.,!?;:\-]/.test(e)?r=140+n:/[A-Z]/.test(e)?r=115+n:r=85+n,t<=20)return r;let o=Math.max(.1,20/t);return r*o}function vi(e,t){let n=e instanceof HTMLTextAreaElement?Nc:Rc;n?n.call(e,t):e.value=t}async function Ii(e){let t=e.timeout||5e3,n=Date.now(),r=n+t;for(;Date.now()<r;)try{return{...Re(e),elapsed:Date.now()-n}}catch{await Ie(100)}let o=e.text?`"${e.text}"`:e.role?`role "${e.role}"`:e.selector?`selector "${e.selector}"`:"element";throw new Error(`Timed out waiting for ${o} after ${t}ms`)}var Si=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"value")?.set;function Ai(e,t){if(!(e instanceof HTMLSelectElement))throw new Error("select command requires a <select> element");let n=t.toLowerCase(),r=null;for(let o of e.options)if(o.text.toLowerCase().includes(n)||o.value.toLowerCase()===n||o.label.toLowerCase().includes(n)){r=o;break}if(!r){let o=[...e.options].map(i=>`"${i.text}"`).join(", ");throw new Error(`No option matching "${t}" in select. Available options: ${o}`)}return Si?Si.call(e,r.value):e.value=r.value,e.dispatchEvent(new Event("change",{bubbles:!0})),e.dispatchEvent(new Event("input",{bubbles:!0})),r.text}async function Ei(e){try{let t=e.trim(),r=/\breturn\b/.test(t)||/[;{]/.test(t)?e:`return (${e})`,o=(async()=>{}).constructor,i=new o(r);return bt(await i())}catch(t){throw new Error(`evaluate failed: ${t instanceof Error?t.message:String(t)}`)}}var Fc=10,zt=500,Gt=500,mr=2e4,Ci=1e3;function bt(e,t=0,n=new WeakSet){if(e===null)return null;let r=typeof e;if(r==="string"){let i=e;return i.length>mr?`${i.slice(0,mr)}\u2026(+${i.length-mr} chars)`:i}if(r==="number"||r==="boolean")return e;if(r==="undefined")return"[undefined]";if(r==="bigint")return`${e.toString()}n`;if(r==="symbol")return e.toString();if(r==="function"){let i=e.name;return i?`[Function: ${i}]`:"[Function]"}let o=e;if(typeof Element<"u"&&o instanceof Element){let i=o.outerHTML??"";return{__type:"Element",tag:o.tagName.toLowerCase(),id:o.id||void 0,class:o.getAttribute("class")||void 0,text:(o.textContent||"").trim().slice(0,200)||void 0,html:i.length>Ci?`${i.slice(0,Ci)}\u2026`:i}}if(typeof Node<"u"&&o instanceof Node)return{__type:"Node",nodeName:o.nodeName,text:(o.textContent||"").trim().slice(0,200)||void 0};if(o instanceof Error)return{__type:"Error",name:o.name,message:o.message,stack:o.stack};if(o instanceof Date)return o.toISOString();if(o instanceof RegExp)return o.toString();if(n.has(o))return"[Circular]";if(t>=Fc)return"[Max depth]";n.add(o);try{if(Array.isArray(o)){let l=o.slice(0,zt).map(c=>bt(c,t+1,n));return o.length>zt&&l.push(`\u2026(+${o.length-zt} more)`),l}if(o instanceof Map){let l={__type:"Map"},c=0;for(let[u,d]of o){if(c++>=Gt){l["\u2026"]=`(+${o.size-Gt} more)`;break}l[String(u)]=bt(d,t+1,n)}return l}if(o instanceof Set)return{__type:"Set",values:[...o].slice(0,zt).map(l=>bt(l,t+1,n))};let i=Object.keys(o),a={},s=0;for(let l of i){if(s++>=Gt){a["\u2026"]=`(+${i.length-Gt} more)`;break}a[l]=bt(o[l],t+1,n)}return a}catch{return`[Unserializable: ${Object.prototype.toString.call(o)}]`}finally{n.delete(o)}}var Mi="__mindstudio-touch-circle",gr="__mindstudio-touch-style",ki=44,Ti=5,Ri=.95,qt=.5,yr=.45,Ni=600;function _c(){document.getElementById(Mi)?.remove();let e=document.createElement("div");return e.id=Mi,e.style.cssText=["position: fixed","z-index: 2147483647","pointer-events: none",`width: ${ki}px`,`height: ${ki}px`,"border-radius: 50%","background: rgba(255, 255, 255, 0.08)","border: 2px solid rgba(255, 255, 255, 0.85)","box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.1)","backdrop-filter: blur(1px)","-webkit-backdrop-filter: blur(1.5px)","transform: translate(-50%, -50%) scale(1)","transition: transform 100ms ease, opacity 100ms ease, background 100ms ease","opacity: 0","will-change: left, top, transform, opacity"].join("; "),document.documentElement.appendChild(e),e}function Oc(e){e.style.transform="translate(-50%, -50%) scale(0.88)",e.style.background="rgba(255, 255, 255, 0.18)"}function Li(e){e.style.transform="translate(-50%, -50%) scale(1)",e.style.background="rgba(255, 255, 255, 0.08)"}function Fi(){window.parent!==window&&E().zoom.mobilePreview&&wr()}function wr(){let e=E().touch;if(e.active)return;e.active=!0,e.scrollContainer=Vt(),Bc();let t=_c();e.circleEl=t,e.onMouseMove=n=>{let r=E();if(r.cursor.executing||r.screenshot.capturing){t.style.opacity="0";return}if(t.style.left=`${n.clientX}px`,t.style.top=`${n.clientY}px`,t.style.opacity="1",e.pressed){let o=Math.abs(n.clientX-e.startX),i=Math.abs(n.clientY-e.startY);if(!e.dragging&&(o>Ti||i>Ti)&&(e.dragging=!0),e.dragging){let a=e.scrollContainer||document.documentElement,s=performance.now(),l=s-e.lastMoveTime||16,c=e.lastX-n.clientX,u=e.lastY-n.clientY;e.bouncing&&Wc();let d=a.scrollTop;a.scrollTop+=u,a.scrollLeft+=c;let m=a.scrollTop-d,p=u-m;if(Math.abs(p)>.5){let h=yr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*h,br()}else if(e.overscrollY!==0){let h=yr/(1+Math.abs(e.overscrollY)/200);e.overscrollY+=p*h,(e.overscrollY>0&&u<0||e.overscrollY<0&&u>0)&&(e.overscrollY*=.7),br()}e.velocityX=.8*(c/l)+.2*e.velocityX,e.velocityY=.8*(u/l)+.2*e.velocityY,e.lastMoveTime=s,n.preventDefault()}e.lastX=n.clientX,e.lastY=n.clientY}},e.onMouseDown=n=>{E().cursor.executing||(jt(),e.pressed=!0,e.dragging=!1,e.startX=n.clientX,e.startY=n.clientY,e.lastX=n.clientX,e.lastY=n.clientY,e.velocityX=0,e.velocityY=0,e.lastMoveTime=performance.now(),Oc(t))},e.onMouseUp=()=>{let n=e.dragging;n&&document.addEventListener("click",Pc,{capture:!0,once:!0}),e.pressed=!1,e.dragging=!1,Li(t),n&&(e.overscrollY!==0&&Pi(),(Math.abs(e.velocityX)>qt/16||Math.abs(e.velocityY)>qt/16)&&Dc())},e.onMouseLeave=()=>{e.pressed=!1,e.dragging=!1,jt(),t.style.opacity="0",Li(t)},e.onDragStart=n=>n.preventDefault(),document.addEventListener("mousemove",e.onMouseMove),document.addEventListener("mousedown",e.onMouseDown),document.addEventListener("mouseup",e.onMouseUp),document.addEventListener("mouseleave",e.onMouseLeave),document.addEventListener("dragstart",e.onDragStart)}function $i(){let e=E().touch;e.active&&(e.active=!1,e.pressed=!1,e.dragging=!1,jt(),e.overscrollY!==0&&(e.overscrollY=0,document.body.style.transition="",document.body.style.transform=""),Hc(),e.circleEl&&(e.circleEl.remove(),e.circleEl=null),e.onMouseMove&&document.removeEventListener("mousemove",e.onMouseMove),e.onMouseDown&&document.removeEventListener("mousedown",e.onMouseDown),e.onMouseUp&&document.removeEventListener("mouseup",e.onMouseUp),e.onMouseLeave&&document.removeEventListener("mouseleave",e.onMouseLeave),e.onDragStart&&document.removeEventListener("dragstart",e.onDragStart),e.onMouseMove=null,e.onMouseDown=null,e.onMouseUp=null,e.onMouseLeave=null,e.onDragStart=null)}function _i(){let{circleEl:e}=E().touch;e&&(e.style.opacity="0")}function Oi(){let e=E().touch;e.active&&e.circleEl&&(e.circleEl.style.opacity="1")}function Pc(e){e.preventDefault(),e.stopPropagation()}function Dc(){jt();let e=E().touch,t=e.scrollContainer||document.documentElement,n=e.velocityX*16,r=e.velocityY*16;function o(){let i=E().touch;if(n*=Ri,r*=Ri,Math.abs(n)<qt&&Math.abs(r)<qt){i.momentumFrame=null,i.overscrollY!==0&&Pi();return}let a=t.scrollTop;t.scrollTop+=r,t.scrollLeft+=n;let s=t.scrollTop-a,l=r-s;if(Math.abs(l)>.5){let c=yr*.5/(1+Math.abs(i.overscrollY)/200);i.overscrollY+=l*c,br(),r*=.7}i.momentumFrame=requestAnimationFrame(o)}e.momentumFrame=requestAnimationFrame(o)}function jt(){let e=E().touch;e.momentumFrame!==null&&(cancelAnimationFrame(e.momentumFrame),e.momentumFrame=null)}function br(){let e=E().touch;document.body.style.transition="none",document.body.style.transform=`translateY(${-e.overscrollY}px)`}function Pi(){let e=E().touch;e.bouncing=!0,e.overscrollY=0,document.body.style.transition=`transform ${Ni}ms cubic-bezier(0.2, 0.9, 0.3, 1)`,document.body.style.transform="",e.bounceTimer&&clearTimeout(e.bounceTimer),e.bounceTimer=setTimeout(()=>{let t=E().touch;t.bouncing=!1,t.bounceTimer=null,document.body.style.transition="",document.body.style.transform=""},Ni)}function Wc(){let e=E().touch;e.bouncing&&(e.bouncing=!1,e.bounceTimer&&(clearTimeout(e.bounceTimer),e.bounceTimer=null),document.body.style.transition="")}function Bc(){document.getElementById(gr)?.remove();let e=document.createElement("style");e.id=gr,e.textContent=`
|
|
3
3
|
*, *::before, *::after {
|
|
4
4
|
cursor: none !important;
|
|
5
5
|
user-select: none !important;
|
|
6
6
|
-webkit-user-select: none !important;
|
|
7
7
|
-webkit-user-drag: none !important;
|
|
8
8
|
}
|
|
9
|
-
`,document.head.appendChild(e)}function
|
|
9
|
+
`,document.head.appendChild(e)}function Hc(){document.getElementById(gr)?.remove()}var Sr="__mindstudio-cursor",Cr="__mindstudio-cursor-ripple",Di="__mindstudio-cursor-hide",Gi="__ms_cursor",Uc=3e4,Vc=280,zc=800,Gc=220,qc=.55,Wi="cubic-bezier(0.65, 0, 0.35, 1)",jc=120,Bi=90,Yc=160,Hi=450,Ui=72,xr=300,Zc=2e3,Yt=10,qi="Remy",Kt="#DD2590",vr=44,lt=64,Xt=31,Vi=32,Zt={x:6.73/Xt*lt,y:5.59/Xt*lt},Xc=`<svg width="${lt}" height="${Math.round(lt*Vi/Xt)}" viewBox="0 0 ${Xt} ${Vi}" fill="none" xmlns="http://www.w3.org/2000/svg" style="display: block; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.28)) drop-shadow(0 4px 8px rgba(0,0,0,0.22));">
|
|
10
10
|
<path d="M12.5448 26L6.72762 5.59339L26 14.8132L17.1816 17.9377L12.5448 26Z" fill="${Kt}" stroke="#ffffff" stroke-width="2" stroke-linejoin="round" paint-order="stroke"/>
|
|
11
|
-
</svg>`,
|
|
11
|
+
</svg>`,ji=`
|
|
12
12
|
background: ${Kt};
|
|
13
13
|
color: white;
|
|
14
14
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
letter-spacing: 0.3px;
|
|
19
19
|
box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 3px 8px rgba(0,0,0,0.18);
|
|
20
20
|
transition: opacity 200ms ease;
|
|
21
|
-
`,
|
|
21
|
+
`,Yi=`
|
|
22
22
|
<div data-cursor-body style="
|
|
23
23
|
position: absolute;
|
|
24
24
|
left: ${-Zt.x}px;
|
|
25
25
|
top: ${-Zt.y}px;
|
|
26
26
|
transform-origin: ${Zt.x}px ${Zt.y}px;
|
|
27
27
|
">
|
|
28
|
-
${
|
|
28
|
+
${Xc}
|
|
29
29
|
<div data-cursor-tag style="
|
|
30
30
|
position: absolute;
|
|
31
31
|
left: ${Math.round(lt*.82)}px;
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
font-size: 15px;
|
|
34
34
|
padding: 6px 10px;
|
|
35
35
|
border-radius: 6px;
|
|
36
|
-
${
|
|
37
|
-
">${
|
|
36
|
+
${ji}
|
|
37
|
+
">${qi}</div>
|
|
38
38
|
</div>
|
|
39
|
-
`,
|
|
39
|
+
`,Zi=`
|
|
40
40
|
<div data-cursor-body style="
|
|
41
41
|
position: absolute;
|
|
42
42
|
left: 0;
|
|
@@ -63,21 +63,21 @@
|
|
|
63
63
|
font-size: 13px;
|
|
64
64
|
padding: 5px 8px;
|
|
65
65
|
border-radius: 5px;
|
|
66
|
-
${
|
|
67
|
-
">${
|
|
66
|
+
${ji}
|
|
67
|
+
">${qi}</div>
|
|
68
68
|
</div>
|
|
69
|
-
`;function Vi(){window.parent!==window&&Ir()}function Ir(){let e=M().cursor,t=document.getElementById(Fi);if(t){e.el=t,e.rippleEl=document.getElementById($i);return}let n=M().zoom.mobilePreview,r=document.createElement("div");r.id=Fi,r.innerHTML=n?Ui:Hi,r.style.cssText=["position: fixed","top: -100px","left: -100px","z-index: 2147483647","pointer-events: none","will-change: left, top, transform, opacity","opacity: 0"].join("; ");let o=document.createElement("div");o.id=$i,o.style.cssText=["position: fixed","z-index: 2147483646","pointer-events: none","width: 0","height: 0","box-sizing: border-box","border-radius: 50%",`border: 2px solid ${Kt}`,"box-shadow: 0 0 0 1px rgba(255,255,255,0.7), inset 0 0 0 1px rgba(255,255,255,0.7)","opacity: 0","transform: translate(-50%, -50%)"].join("; "),document.documentElement.appendChild(o),document.documentElement.appendChild(r),e.el=r,e.rippleEl=o}function Jt(){let e=M().cursor;e.trackingFrame!==null&&(cancelAnimationFrame(e.trackingFrame),e.trackingFrame=null),e.targetElement=null}function Cr(e,t){let n=e.getBoundingClientRect(),r=t==="text"?n.left+Math.min(Math.max(n.width*.3,16),n.width/2):n.left+n.width/2;return{x:Math.max(Yt,Math.min(r,window.innerWidth-Yt)),y:Math.max(Yt,Math.min(n.top+n.height/2,window.innerHeight-Yt))}}function zi(){let e=M().cursor;e.el&&(e.el.style.transition="none",e.el.style.left=`${e.x}px`,e.el.style.top=`${e.y}px`)}function xr(){let e=M().cursor;if(e.settledResolve){let t=e.settledResolve;e.settledResolve=null,t()}}function Wc(e,t){let n=M().cursor,r={x:n.x,y:n.y},o=Cr(e,t),i=Math.hypot(o.x-r.x,o.y-r.y),a=Math.min(Fc,Math.max(Lc,$c+i*_c)),s=performance.now(),l=c=>{if(!n.el||!e.isConnected){n.trackingFrame=null,xr();return}let u=Cr(e,t),d=Math.min((c-s)/a,1),f=d<.5?4*d*d*d:1-Math.pow(-2*d+2,3)/2;if(n.x=r.x+(u.x-r.x)*f,n.y=r.y+(u.y-r.y)*f,zi(),d<1){n.trackingFrame=requestAnimationFrame(l);return}n.trackingFrame=null,xr(),Bc(e,t)};n.trackingFrame=requestAnimationFrame(l)}function Bc(e,t){let n=M().cursor,r=()=>{if(!n.el||n.targetElement!==e||!e.isConnected){n.trackingFrame=null;return}let o=Cr(e,t);n.x=o.x,n.y=o.y,zi(),n.trackingFrame=requestAnimationFrame(r)};n.trackingFrame=requestAnimationFrame(r)}async function Qt(e,t={}){let n=M().cursor,r=t.anchor??"center";if((!n.el||!n.el.isConnected)&&(n.el=null,n.rippleEl=null,n.hasPosition=!1,Ir()),!!n.el){if(Ze(),Jt(),xr(),n.targetElement=e,!n.hasPosition){let o=e.getBoundingClientRect(),i=o.left+o.width/2,a=o.top+o.height/2,s=Math.max(window.innerWidth,100),l=Math.max(window.innerHeight,100);Math.random()<.5?(n.x=s+20,n.y=a+(Math.random()-.5)*100):(n.x=i+(Math.random()-.5)*100,n.y=l+20),n.el.style.transition="none",n.el.style.left=`${n.x}px`,n.el.style.top=`${n.y}px`,n.el.style.opacity="0",n.el.offsetWidth,n.hasPosition=!0}return n.el.style.opacity="1",n.visibilityState="visible",Hc(r==="text"),new Promise(o=>{n.settledResolve=o,Wc(e,r)})}}function qi(){return M().cursor.el?.querySelector("[data-cursor-body]")??null}function Hc(e){let t=M().cursor.el?.querySelector("[data-cursor-tag]");t&&(t.style.opacity=e?"0.7":"1")}async function Gi(){let e=M().cursor;if(!e.el)return;let t=qi();if(t&&(t.style.transition=`transform ${_i}ms cubic-bezier(0.4, 0, 1, 1)`,t.style.transform="scale(0.88)"),e.rippleEl){e.rippleEl.style.transition="none",e.rippleEl.style.left=`${e.x}px`,e.rippleEl.style.top=`${e.y}px`,e.rippleEl.style.width="0",e.rippleEl.style.height="0",e.rippleEl.style.opacity="0.8",e.rippleEl.offsetWidth;let n=`${Oi}ms cubic-bezier(0.2, 0.8, 0.2, 1)`;e.rippleEl.style.transition=`width ${n}, height ${n}, opacity ${Oi}ms cubic-bezier(0.6, 0, 0.9, 0.5)`,e.rippleEl.style.width=`${Pi}px`,e.rippleEl.style.height=`${Pi}px`,e.rippleEl.style.opacity="0"}await Ie(_i)}function ji(){let e=qi();e&&(e.style.transition=`transform ${Oc}ms cubic-bezier(0.2, 0.8, 0.2, 1)`,e.style.transform="scale(1)")}function Uc(e){return e==="visible"||e==="fading-in"||e==="fading-out"||e==="force-visible"}function Ye(e){let t=M().cursor;if(t.visibilityState=e,!(!t.el||!t.el.isConnected))switch(e){case"hidden":case"force-hidden":case"snapshot-hidden":t.el.style.transition="none",t.el.style.opacity="0",t.rippleEl&&(t.rippleEl.style.opacity="0");break;case"fading-in":t.el.style.transition=`opacity ${Sr}ms ease`,t.el.offsetWidth,t.el.style.opacity="1";break;case"visible":case"force-visible":t.el.style.opacity="1";break;case"fading-out":t.el.style.transition=`opacity ${Sr}ms ease`,t.el.style.opacity="0";break}}function Ze(){let e=M().cursor;e.hideTimer&&(clearTimeout(e.hideTimer),e.hideTimer=null)}function wt(e){M().cursor.executing=e,e?Ri():Ni()}function Ar(){Ze()}function en(){let e=M().cursor;e.el&&e.visibilityState!=="force-visible"&&(e.targetElement=null,Ze(),e.hideTimer=setTimeout(()=>{e.visibilityState!=="force-visible"&&(Ye("fading-out"),e.hideTimer=setTimeout(()=>{e.visibilityState==="fading-out"&&(Ye("hidden"),Jt()),e.hideTimer=null},Sr))},Pc))}function Mr(){let e=M().cursor;e.el&&(Ze(),Jt(),e.visibilityState!=="force-hidden"&&e.visibilityState!=="snapshot-hidden"&&(e.el.isConnected&&(e.el.style.transition="none"),Ye("visible")))}function tn(){let e=M().cursor;e.visibilityState!=="snapshot-hidden"&&(Ze(),e.preSnapshotState=e.visibilityState,Ye("snapshot-hidden"))}function nn(){let e=M().cursor,t=e.preSnapshotState;e.preSnapshotState=null,!(!e.el||!t||!Uc(t))&&Ye(t==="fading-in"?"fading-in":"visible")}function Er(e){let t=M().cursor;t.el&&(t.el.innerHTML=e?Ui:Hi)}function rn(e){let t=M().cursor;t.executing||(e==="visible"&&!t.el&&Ir(),t.el&&(e==="visible"?(Ze(),t.hasPosition?Ye("force-visible"):t.visibilityState="force-visible"):e==="hidden"?(Ze(),Ye("force-hidden"),Jt()):en()))}var fe;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(fe||(fe={}));function Vc(e){return e.nodeType===e.ELEMENT_NODE}function Qe(e){var t=e?.host;return t?.shadowRoot===e}function Ke(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function zc(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function kr(e){try{var t=e.rules||e.cssRules;return t?zc(Array.from(t).map(Tr).join("")):null}catch{return null}}function Tr(e){var t=e.cssText;if(qc(e))try{t=kr(e.styleSheet)||t}catch{}return t}function qc(e){return"styleSheet"in e}var Ki=(function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){var r=this.getNode(t);if(r){var o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();function Ji(){return new Ki}function St(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(i?a=i(a):a="*".repeat(a.length)),a}var Zi="__rrweb_original__";function Gc(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,a=Zi in i?i[Zi]:i,s=new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(s.some(function(l){return l!==0}))return!1}return!0}var jc=1,Yc=new RegExp("[^a-z0-9-_:]"),Je=-2;function Rr(){return jc++}function Zc(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return Yc.test(t)?"div":t}function Xc(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function Kc(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ct,Xi,Jc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Qc=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,eu=/^(data:)([^,]*),(.*)/i;function on(e,t){return(e||"").replace(Jc,function(n,r,o,i,a,s){var l=o||a||s,c=r||i||"";if(!l)return n;if(!Qc.test(l)||eu.test(l))return"url(".concat(c).concat(l).concat(c,")");if(l[0]==="/")return"url(".concat(c).concat(Kc(t)+l).concat(c,")");var u=t.split("/"),d=l.split("/");u.pop();for(var f=0,m=d;f<m.length;f++){var p=m[f];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(c).concat(u.join("/")).concat(c,")")})}var tu=/^[^ \t\n\r\u000c]+/,nu=/^[, \t\n\r\u000c]+/;function ru(e,t){if(t.trim()==="")return t;var n=0;function r(c){var u,d=c.exec(t.substring(n));return d?(u=d[0],n+=u.length,u):""}for(var o=[];r(nu),!(n>=t.length);){var i=r(tu);if(i.slice(-1)===",")i=ut(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=ut(e,i);for(var s=!1;;){var l=t.charAt(n);if(l===""){o.push((i+a).trim());break}else if(s)l===")"&&(s=!1);else if(l===","){n+=1,o.push((i+a).trim());break}else l==="("&&(s=!0);a+=l,n+=1}}}return o.join(", ")}function ut(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function ou(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Nr(){var e=document.createElement("a");return e.href="",e.href}function Lr(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?ut(e,r):n==="srcset"&&r?ru(e,r):n==="style"&&r?on(r,Nr()):t==="object"&&n==="data"&&r?ut(e,r):r}function iu(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function vt(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?vt(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?vt(e.parentNode,t,n):!1}function Fr(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(vt(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function au(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()});return}var s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function su(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function lu(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,u=c===void 0?{}:c,d=t.maskTextFn,f=t.maskInputFn,m=t.dataURLOptions,p=m===void 0?{}:m,h=t.inlineImages,y=t.recordCanvas,g=t.keepIframeSrcFn,w=t.newlyAddedElement,v=w===void 0?!1:w,b=cu(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:fe.Document,childNodes:[],compatMode:e.compatMode}:{type:fe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:fe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return du(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:u,maskInputFn:f,dataURLOptions:p,inlineImages:h,recordCanvas:y,keepIframeSrcFn:g,newlyAddedElement:v,rootId:b});case e.TEXT_NODE:return uu(e,{maskTextClass:a,maskTextSelector:s,maskTextFn:d,rootId:b});case e.CDATA_SECTION_NODE:return{type:fe.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:fe.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function cu(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function uu(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,l=e.textContent,c=s==="STYLE"?!0:void 0,u=s==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=Xc(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}l=on(l,Nr())}return u&&(l="SCRIPT_PLACEHOLDER"),!c&&!u&&l&&Fr(e,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*")),{type:fe.Text,textContent:l||"",isStyle:c,rootId:a}}function du(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,a=t.maskInputOptions,s=a===void 0?{}:a,l=t.maskInputFn,c=t.dataURLOptions,u=c===void 0?{}:c,d=t.inlineImages,f=t.recordCanvas,m=t.keepIframeSrcFn,p=t.newlyAddedElement,h=p===void 0?!1:p,y=t.rootId,g=iu(e,r,o),w=Zc(e),v={},b=e.attributes.length,S=0;S<b;S++){var x=e.attributes[S];v[x.name]=Lr(n,w,x.name,x.value)}if(w==="link"&&i){var I=Array.from(n.styleSheets).find(function(q){return q.href===e.href}),C=null;I&&(C=kr(I)),C&&(delete v.rel,delete v.href,v._cssText=on(C,I.href))}if(w==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var C=kr(e.sheet);C&&(v._cssText=on(C,Nr()))}if(w==="input"||w==="textarea"||w==="select"){var E=e.value,k=e.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&E?v.value=St({type:v.type,tagName:w,value:E,maskInputOptions:s,maskInputFn:l}):k&&(v.checked=k)}if(w==="option"&&(e.selected&&!s.select?v.selected=!0:delete v.selected),w==="canvas"&&f){if(e.__context==="2d")Gc(e)||(v.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var T=e.toDataURL(u.type,u.quality),F=document.createElement("canvas");F.width=e.width,F.height=e.height;var D=F.toDataURL(u.type,u.quality);T!==D&&(v.rr_dataURL=T)}}if(w==="img"&&d){ct||(ct=n.createElement("canvas"),Xi=ct.getContext("2d"));var R=e,_=R.crossOrigin;R.crossOrigin="anonymous";var N=function(){try{ct.width=R.naturalWidth,ct.height=R.naturalHeight,Xi.drawImage(R,0,0),v.rr_dataURL=ct.toDataURL(u.type,u.quality)}catch(q){console.warn("Cannot inline img src=".concat(R.currentSrc,"! Error: ").concat(q))}_?v.crossOrigin=_:R.removeAttribute("crossorigin")};R.complete&&R.naturalWidth!==0?N():R.onload=N}if((w==="audio"||w==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),g){var P=e.getBoundingClientRect(),K=P.width,U=P.height;v={class:v.class,rr_width:"".concat(K,"px"),rr_height:"".concat(U,"px")}}return w==="iframe"&&!m(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:fe.Element,tagName:w,attributes:v,childNodes:[],isSVG:ou(e)||void 0,needBlock:g,rootId:y}}function ee(e){return e===void 0?"":e.toLowerCase()}function fu(e,t){if(t.comment&&e.type===fe.Comment)return!0;if(e.type===fe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(e.attributes.name)==="application-name"||ee(e.attributes.rel)==="icon"||ee(e.attributes.rel)==="apple-touch-icon"||ee(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||ee(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ee(e.attributes.name)==="robots"||ee(e.attributes.name)==="googlebot"||ee(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ee(e.attributes.name)==="author"||ee(e.attributes.name)==="generator"||ee(e.attributes.name)==="framework"||ee(e.attributes.name)==="publisher"||ee(e.attributes.name)==="progid"||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ee(e.attributes.name)==="google-site-verification"||ee(e.attributes.name)==="yandex-verification"||ee(e.attributes.name)==="csrf-token"||ee(e.attributes.name)==="p:domain_verify"||ee(e.attributes.name)==="verify-v1"||ee(e.attributes.name)==="verification"||ee(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Xe(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,u=t.inlineStylesheet,d=u===void 0?!0:u,f=t.maskInputOptions,m=f===void 0?{}:f,p=t.maskTextFn,h=t.maskInputFn,y=t.slimDOMOptions,g=t.dataURLOptions,w=g===void 0?{}:g,v=t.inlineImages,b=v===void 0?!1:v,S=t.recordCanvas,x=S===void 0?!1:S,I=t.onSerialize,C=t.onIframeLoad,E=t.iframeLoadTimeout,k=E===void 0?5e3:E,T=t.onStylesheetLoad,F=t.stylesheetLoadTimeout,D=F===void 0?5e3:F,R=t.keepIframeSrcFn,_=R===void 0?function(){return!1}:R,N=t.newlyAddedElement,P=N===void 0?!1:N,K=t.preserveWhiteSpace,U=K===void 0?!0:K,q=lu(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,dataURLOptions:w,inlineImages:b,recordCanvas:x,keepIframeSrcFn:_,newlyAddedElement:P});if(!q)return console.warn(e,"not serialized"),null;var ne;r.hasNode(e)?ne=r.getId(e):fu(q,y)||!U&&q.type===fe.Text&&!q.isStyle&&!q.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Je:ne=Rr();var L=Object.assign(q,{id:ne});if(r.add(e,L),ne===Je)return null;I&&I(e);var W=!c;if(L.type===fe.Element){W=W&&!L.needBlock,delete L.needBlock;var B=e.shadowRoot;B&&Ke(B)&&(L.isShadowHost=!0)}if((L.type===fe.Document||L.type===fe.Element)&&W){y.headWhitespace&&L.type===fe.Element&&L.tagName==="head"&&(U=!1);for(var Y={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:c,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_},O=0,j=Array.from(e.childNodes);O<j.length;O++){var X=j[O],z=Xe(X,Y);z&&L.childNodes.push(z)}if(Vc(e)&&e.shadowRoot)for(var Z=0,H=Array.from(e.shadowRoot.childNodes);Z<H.length;Z++){var X=H[Z],z=Xe(X,Y);z&&(Ke(e.shadowRoot)&&(z.isShadow=!0),L.childNodes.push(z))}}return e.parentNode&&Qe(e.parentNode)&&Ke(e.parentNode)&&(L.isShadow=!0),L.type===fe.Element&&L.tagName==="iframe"&&au(e,function(){var re=e.contentDocument;if(re&&C){var oe=Xe(re,{doc:re,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_});oe&&C(e,oe)}},k),L.type===fe.Element&&L.tagName==="link"&&L.attributes.rel==="stylesheet"&&su(e,function(){if(T){var re=Xe(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_});re&&T(e,re)}},D),L}function Qi(e,t){var n=t||{},r=n.mirror,o=r===void 0?new Ki:r,i=n.blockClass,a=i===void 0?"rr-block":i,s=n.blockSelector,l=s===void 0?null:s,c=n.maskTextClass,u=c===void 0?"rr-mask":c,d=n.maskTextSelector,f=d===void 0?null:d,m=n.inlineStylesheet,p=m===void 0?!0:m,h=n.inlineImages,y=h===void 0?!1:h,g=n.recordCanvas,w=g===void 0?!1:g,v=n.maskAllInputs,b=v===void 0?!1:v,S=n.maskTextFn,x=n.maskInputFn,I=n.slimDOM,C=I===void 0?!1:I,E=n.dataURLOptions,k=n.preserveWhiteSpace,T=n.onSerialize,F=n.onIframeLoad,D=n.iframeLoadTimeout,R=n.onStylesheetLoad,_=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn,P=N===void 0?function(){return!1}:N,K=b===!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}:b===!1?{password:!0}:b,U=C===!0||C==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:C==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:C===!1?{}:C;return Xe(e,{doc:e,mirror:o,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:K,maskTextFn:S,maskInputFn:x,slimDOMOptions:U,dataURLOptions:E,inlineImages:y,recordCanvas:w,preserveWhiteSpace:k,onSerialize:T,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:P,newlyAddedElement:!1})}var pu=/([^\\]):hover/,wg=new RegExp(pu.source,"g");function pe(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var dt=`Please stop import mirror directly. Instead of that,\r
|
|
69
|
+
`;function Xi(){window.parent!==window&&Mr()}function Mr(){let e=E().cursor,t=document.getElementById(Sr);if(t){e.el=t,e.rippleEl=document.getElementById(Cr),Ir();return}let n=E().zoom.mobilePreview,r=document.createElement("div");r.id=Sr,r.innerHTML=n?Zi:Yi,r.style.cssText=["position: fixed","top: -100px","left: -100px","z-index: 2147483647","pointer-events: none","will-change: left, top, transform, opacity","opacity: 0"].join("; ");let o=document.createElement("div");o.id=Cr,o.style.cssText=["position: fixed","z-index: 2147483646","pointer-events: none","width: 0","height: 0","box-sizing: border-box","border-radius: 50%",`border: 2px solid ${Kt}`,"box-shadow: 0 0 0 1px rgba(255,255,255,0.7), inset 0 0 0 1px rgba(255,255,255,0.7)","opacity: 0","transform: translate(-50%, -50%)"].join("; "),document.documentElement.appendChild(o),document.documentElement.appendChild(r),Ir(),e.el=r,e.rippleEl=o;let i=Jc();i&&(e.x=i.x,e.y=i.y,e.hasPosition=!0,kr(r,i),i.visible&&(r.style.opacity="1",e.visibilityState="visible"))}function Ir(){let e=document.getElementById(Di);return e||(e=document.createElement("style"),e.id=Di,e.className="rr-block",document.documentElement.appendChild(e)),e}function Kc(e){let t=Ir(),n=e?`#${Sr}, #${Cr} { opacity: 0 !important; }`:"";t.textContent!==n&&(t.textContent=n)}function Ki(){let e=E().cursor;if(e.hasPosition)try{sessionStorage.setItem(Gi,JSON.stringify({x:e.x,y:e.y,visible:ta(e.visibilityState),ts:Date.now()}))}catch{}}function Jc(){try{let e=sessionStorage.getItem(Gi);if(!e)return null;let t=JSON.parse(e);return typeof t?.x!="number"||typeof t?.y!="number"||Date.now()-(typeof t.ts=="number"?t.ts:0)>Uc?null:{x:t.x,y:t.y,visible:!!t.visible}}catch{return null}}function Jt(){let e=E().cursor;e.trackingFrame!==null&&(cancelAnimationFrame(e.trackingFrame),e.trackingFrame=null),e.moveTimer!==null&&(clearTimeout(e.moveTimer),e.moveTimer=null),e.targetElement=null}function Ar(e,t){let n=e.getBoundingClientRect(),r=t==="text"?n.left+Math.min(Math.max(n.width*.3,16),n.width/2):n.left+n.width/2;return{x:Math.max(Yt,Math.min(r,window.innerWidth-Yt)),y:Math.max(Yt,Math.min(n.top+n.height/2,window.innerHeight-Yt))}}function kr(e,t){e.style.transition="none",e.style.left=`${t.x}px`,e.style.top=`${t.y}px`}function zi(e,t,n){e.style.transition=`left ${n}ms ${Wi}, top ${n}ms ${Wi}`,e.style.left=`${t.x}px`,e.style.top=`${t.y}px`}function Er(){let e=E().cursor;if(e.settledResolve){let t=e.settledResolve;e.settledResolve=null,t()}}function Qc(e,t){let n=E().cursor;if(!n.el){Er();return}let r=Ar(e,t),o=Math.hypot(r.x-n.x,r.y-n.y),i=Math.min(zc,Math.max(Vc,Gc+o*qc));zi(n.el,r,i),n.x=r.x,n.y=r.y,n.moveTimer=setTimeout(()=>{if(n.moveTimer=null,n.el&&e.isConnected){let a=Ar(e,t);Math.hypot(a.x-n.x,a.y-n.y)>1&&(zi(n.el,a,jc),n.x=a.x,n.y=a.y)}Ki(),Er(),e.isConnected&&eu(e,t)},i)}function eu(e,t){let n=E().cursor,r=()=>{if(!n.el||n.targetElement!==e||!e.isConnected){n.trackingFrame=null;return}let o=Ar(e,t);(Math.abs(o.x-n.x)>.5||Math.abs(o.y-n.y)>.5)&&(kr(n.el,o),n.x=o.x,n.y=o.y),n.trackingFrame=requestAnimationFrame(r)};n.trackingFrame=requestAnimationFrame(r)}async function Qt(e,t={}){let n=E().cursor,r=t.anchor??"center";if((!n.el||!n.el.isConnected)&&(n.el=null,n.rippleEl=null,n.hasPosition=!1,Mr()),!!n.el){if(Ze(),Jt(),Er(),n.targetElement=e,!n.hasPosition){let o=e.getBoundingClientRect(),i=o.left+o.width/2,a=o.top+o.height/2,s=Math.max(window.innerWidth,100),l=Math.max(window.innerHeight,100);Math.random()<.5?(n.x=s+20,n.y=a+(Math.random()-.5)*100):(n.x=i+(Math.random()-.5)*100,n.y=l+20),kr(n.el,{x:n.x,y:n.y}),n.el.style.opacity="0",n.el.offsetWidth,n.hasPosition=!0}return n.el.style.opacity!=="1"&&(n.el.style.opacity="1"),n.visibilityState="visible",tu(r==="text"),new Promise(o=>{n.settledResolve=o,Qc(e,r)})}}function Ji(){return E().cursor.el?.querySelector("[data-cursor-body]")??null}function tu(e){let t=E().cursor.el?.querySelector("[data-cursor-tag]");t&&(t.style.opacity=e?"0.7":"1")}async function Qi(){let e=E().cursor;if(!e.el)return;let t=Ji();if(t&&(t.style.transition=`transform ${Bi}ms cubic-bezier(0.4, 0, 1, 1)`,t.style.transform="scale(0.88)"),e.rippleEl){e.rippleEl.style.transition="none",e.rippleEl.style.left=`${e.x}px`,e.rippleEl.style.top=`${e.y}px`,e.rippleEl.style.width="0",e.rippleEl.style.height="0",e.rippleEl.style.opacity="0.8",e.rippleEl.offsetWidth;let n=`${Hi}ms cubic-bezier(0.2, 0.8, 0.2, 1)`;e.rippleEl.style.transition=`width ${n}, height ${n}, opacity ${Hi}ms cubic-bezier(0.6, 0, 0.9, 0.5)`,e.rippleEl.style.width=`${Ui}px`,e.rippleEl.style.height=`${Ui}px`,e.rippleEl.style.opacity="0"}await Ie(Bi)}function ea(){let e=Ji();e&&(e.style.transition=`transform ${Yc}ms cubic-bezier(0.2, 0.8, 0.2, 1)`,e.style.transform="scale(1)")}function ta(e){return e==="visible"||e==="fading-in"||e==="fading-out"||e==="force-visible"}function Ye(e){let t=E().cursor;if(t.visibilityState=e,!(!t.el||!t.el.isConnected))switch(Kc(e==="snapshot-hidden"),e){case"snapshot-hidden":break;case"hidden":case"force-hidden":t.el.style.transition="none",t.el.style.opacity="0",t.rippleEl&&(t.rippleEl.style.opacity="0");break;case"fading-in":t.el.style.transition=`opacity ${xr}ms ease`,t.el.offsetWidth,t.el.style.opacity="1";break;case"visible":case"force-visible":t.el.style.opacity!=="1"&&(t.el.style.opacity="1");break;case"fading-out":t.el.style.transition=`opacity ${xr}ms ease`,t.el.style.opacity="0";break}}function Ze(){let e=E().cursor;e.hideTimer&&(clearTimeout(e.hideTimer),e.hideTimer=null)}function wt(e){E().cursor.executing=e,e?_i():Oi()}function Tr(){Ze()}function en(){let e=E().cursor;e.el&&e.visibilityState!=="force-visible"&&(e.targetElement=null,Ze(),e.hideTimer=setTimeout(()=>{e.visibilityState!=="force-visible"&&(Ye("fading-out"),e.hideTimer=setTimeout(()=>{e.visibilityState==="fading-out"&&(Ye("hidden"),Jt()),e.hideTimer=null},xr))},Zc))}function Rr(){let e=E().cursor;e.el&&(Ze(),Jt(),e.visibilityState!=="force-hidden"&&e.visibilityState!=="snapshot-hidden"&&(e.el.isConnected&&(e.el.style.transition="none"),Ye("visible")),Ki())}function tn(){let e=E().cursor;e.visibilityState!=="snapshot-hidden"&&(Ze(),e.preSnapshotState=e.visibilityState,Ye("snapshot-hidden"))}function nn(){let e=E().cursor,t=e.preSnapshotState;e.preSnapshotState=null,!(!e.el||!t||!ta(t))&&Ye(t==="fading-in"?"fading-in":"visible")}function Nr(e){let t=E().cursor;t.el&&(t.el.innerHTML=e?Zi:Yi)}function rn(e){let t=E().cursor;t.executing||(e==="visible"&&!t.el&&Mr(),t.el&&(e==="visible"?(Ze(),t.hasPosition?Ye("force-visible"):t.visibilityState="force-visible"):e==="hidden"?(Ze(),Ye("force-hidden"),Jt()):en()))}var fe;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(fe||(fe={}));function nu(e){return e.nodeType===e.ELEMENT_NODE}function Qe(e){var t=e?.host;return t?.shadowRoot===e}function Ke(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ru(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function Lr(e){try{var t=e.rules||e.cssRules;return t?ru(Array.from(t).map(Fr).join("")):null}catch{return null}}function Fr(e){var t=e.cssText;if(ou(e))try{t=Lr(e.styleSheet)||t}catch{}return t}function ou(e){return"styleSheet"in e}var ia=(function(){function e(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}return e.prototype.getId=function(t){var n;if(!t)return-1;var r=(n=this.getMeta(t))===null||n===void 0?void 0:n.id;return r??-1},e.prototype.getNode=function(t){return this.idNodeMap.get(t)||null},e.prototype.getIds=function(){return Array.from(this.idNodeMap.keys())},e.prototype.getMeta=function(t){return this.nodeMetaMap.get(t)||null},e.prototype.removeNodeFromMap=function(t){var n=this,r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(function(o){return n.removeNodeFromMap(o)})},e.prototype.has=function(t){return this.idNodeMap.has(t)},e.prototype.hasNode=function(t){return this.nodeMetaMap.has(t)},e.prototype.add=function(t,n){var r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)},e.prototype.replace=function(t,n){var r=this.getNode(t);if(r){var o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)},e.prototype.reset=function(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap},e})();function aa(){return new ia}function St(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(i?a=i(a):a="*".repeat(a.length)),a}var ra="__rrweb_original__";function iu(e){var t=e.getContext("2d");if(!t)return!0;for(var n=50,r=0;r<e.width;r+=n)for(var o=0;o<e.height;o+=n){var i=t.getImageData,a=ra in i?i[ra]:i,s=new Uint32Array(a.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer);if(s.some(function(l){return l!==0}))return!1}return!0}var au=1,su=new RegExp("[^a-z0-9-_:]"),Je=-2;function $r(){return au++}function lu(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return su.test(t)?"div":t}function cu(e){return e.cssRules?Array.from(e.cssRules).map(function(t){return t.cssText||""}).join(""):""}function uu(e){var t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}var ct,oa,du=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,fu=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,pu=/^(data:)([^,]*),(.*)/i;function on(e,t){return(e||"").replace(du,function(n,r,o,i,a,s){var l=o||a||s,c=r||i||"";if(!l)return n;if(!fu.test(l)||pu.test(l))return"url(".concat(c).concat(l).concat(c,")");if(l[0]==="/")return"url(".concat(c).concat(uu(t)+l).concat(c,")");var u=t.split("/"),d=l.split("/");u.pop();for(var f=0,m=d;f<m.length;f++){var p=m[f];p!=="."&&(p===".."?u.pop():u.push(p))}return"url(".concat(c).concat(u.join("/")).concat(c,")")})}var mu=/^[^ \t\n\r\u000c]+/,hu=/^[, \t\n\r\u000c]+/;function gu(e,t){if(t.trim()==="")return t;var n=0;function r(c){var u,d=c.exec(t.substring(n));return d?(u=d[0],n+=u.length,u):""}for(var o=[];r(hu),!(n>=t.length);){var i=r(mu);if(i.slice(-1)===",")i=ut(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=ut(e,i);for(var s=!1;;){var l=t.charAt(n);if(l===""){o.push((i+a).trim());break}else if(s)l===")"&&(s=!1);else if(l===","){n+=1,o.push((i+a).trim());break}else l==="("&&(s=!0);a+=l,n+=1}}}return o.join(", ")}function ut(e,t){if(!t||t.trim()==="")return t;var n=e.createElement("a");return n.href=t,n.href}function yu(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function _r(){var e=document.createElement("a");return e.href="",e.href}function Or(e,t,n,r){return n==="src"||n==="href"&&r&&!(t==="use"&&r[0]==="#")||n==="xlink:href"&&r&&r[0]!=="#"||n==="background"&&r&&(t==="table"||t==="td"||t==="th")?ut(e,r):n==="srcset"&&r?gu(e,r):n==="style"&&r?on(r,_r()):t==="object"&&n==="data"&&r?ut(e,r):r}function bu(e,t,n){if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?e.matches(n):!1}function vt(e,t,n){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return n?vt(e.parentNode,t,n):!1;for(var r=e.classList.length;r--;){var o=e.classList[r];if(t.test(o))return!0}return n?vt(e.parentNode,t,n):!1}function Pr(e,t,n){var r=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(r===null)return!1;if(typeof t=="string"){if(r.classList.contains(t)||r.closest(".".concat(t)))return!0}else if(vt(r,t,!0))return!0;return!!(n&&(r.matches(n)||r.closest(n)))}function wu(e,t,n){var r=e.contentWindow;if(r){var o=!1,i;try{i=r.document.readyState}catch{return}if(i!=="complete"){var a=setTimeout(function(){o||(t(),o=!0)},n);e.addEventListener("load",function(){clearTimeout(a),o=!0,t()});return}var s="about:blank";if(r.location.href!==s||e.src===s||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}}function vu(e,t,n){var r=!1,o;try{o=e.sheet}catch{return}if(!o){var i=setTimeout(function(){r||(t(),r=!0)},n);e.addEventListener("load",function(){clearTimeout(i),r=!0,t()})}}function Su(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.inlineStylesheet,c=t.maskInputOptions,u=c===void 0?{}:c,d=t.maskTextFn,f=t.maskInputFn,m=t.dataURLOptions,p=m===void 0?{}:m,h=t.inlineImages,y=t.recordCanvas,g=t.keepIframeSrcFn,w=t.newlyAddedElement,v=w===void 0?!1:w,b=Cu(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:fe.Document,childNodes:[],compatMode:e.compatMode}:{type:fe.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:fe.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return Iu(e,{doc:n,blockClass:o,blockSelector:i,inlineStylesheet:l,maskInputOptions:u,maskInputFn:f,dataURLOptions:p,inlineImages:h,recordCanvas:y,keepIframeSrcFn:g,newlyAddedElement:v,rootId:b});case e.TEXT_NODE:return xu(e,{maskTextClass:a,maskTextSelector:s,maskTextFn:d,rootId:b});case e.CDATA_SECTION_NODE:return{type:fe.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:fe.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}function Cu(e,t){if(t.hasNode(e)){var n=t.getId(e);return n===1?void 0:n}}function xu(e,t){var n,r=t.maskTextClass,o=t.maskTextSelector,i=t.maskTextFn,a=t.rootId,s=e.parentNode&&e.parentNode.tagName,l=e.textContent,c=s==="STYLE"?!0:void 0,u=s==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((n=e.parentNode.sheet)===null||n===void 0)&&n.cssRules&&(l=cu(e.parentNode.sheet))}catch(d){console.warn("Cannot get CSS styles from text's parentNode. Error: ".concat(d),e)}l=on(l,_r())}return u&&(l="SCRIPT_PLACEHOLDER"),!c&&!u&&l&&Pr(e,r,o)&&(l=i?i(l):l.replace(/[\S]/g,"*")),{type:fe.Text,textContent:l||"",isStyle:c,rootId:a}}function Iu(e,t){for(var n=t.doc,r=t.blockClass,o=t.blockSelector,i=t.inlineStylesheet,a=t.maskInputOptions,s=a===void 0?{}:a,l=t.maskInputFn,c=t.dataURLOptions,u=c===void 0?{}:c,d=t.inlineImages,f=t.recordCanvas,m=t.keepIframeSrcFn,p=t.newlyAddedElement,h=p===void 0?!1:p,y=t.rootId,g=bu(e,r,o),w=lu(e),v={},b=e.attributes.length,S=0;S<b;S++){var x=e.attributes[S];v[x.name]=Or(n,w,x.name,x.value)}if(w==="link"&&i){var I=Array.from(n.styleSheets).find(function(G){return G.href===e.href}),C=null;I&&(C=Lr(I)),C&&(delete v.rel,delete v.href,v._cssText=on(C,I.href))}if(w==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){var C=Lr(e.sheet);C&&(v._cssText=on(C,_r()))}if(w==="input"||w==="textarea"||w==="select"){var M=e.value,k=e.checked;v.type!=="radio"&&v.type!=="checkbox"&&v.type!=="submit"&&v.type!=="button"&&M?v.value=St({type:v.type,tagName:w,value:M,maskInputOptions:s,maskInputFn:l}):k&&(v.checked=k)}if(w==="option"&&(e.selected&&!s.select?v.selected=!0:delete v.selected),w==="canvas"&&f){if(e.__context==="2d")iu(e)||(v.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){var T=e.toDataURL(u.type,u.quality),F=document.createElement("canvas");F.width=e.width,F.height=e.height;var D=F.toDataURL(u.type,u.quality);T!==D&&(v.rr_dataURL=T)}}if(w==="img"&&d){ct||(ct=n.createElement("canvas"),oa=ct.getContext("2d"));var R=e,_=R.crossOrigin;R.crossOrigin="anonymous";var N=function(){try{ct.width=R.naturalWidth,ct.height=R.naturalHeight,oa.drawImage(R,0,0),v.rr_dataURL=ct.toDataURL(u.type,u.quality)}catch(G){console.warn("Cannot inline img src=".concat(R.currentSrc,"! Error: ").concat(G))}_?v.crossOrigin=_:R.removeAttribute("crossorigin")};R.complete&&R.naturalWidth!==0?N():R.onload=N}if((w==="audio"||w==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),g){var P=e.getBoundingClientRect(),K=P.width,U=P.height;v={class:v.class,rr_width:"".concat(K,"px"),rr_height:"".concat(U,"px")}}return w==="iframe"&&!m(v.src)&&(e.contentDocument||(v.rr_src=v.src),delete v.src),{type:fe.Element,tagName:w,attributes:v,childNodes:[],isSVG:yu(e)||void 0,needBlock:g,rootId:y}}function ee(e){return e===void 0?"":e.toLowerCase()}function Au(e,t){if(t.comment&&e.type===fe.Comment)return!0;if(e.type===fe.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&e.attributes.rel==="preload"&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ee(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ee(e.attributes.name)==="application-name"||ee(e.attributes.rel)==="icon"||ee(e.attributes.rel)==="apple-touch-icon"||ee(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ee(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ee(e.attributes.property).match(/^(og|twitter|fb):/)||ee(e.attributes.name).match(/^(og|twitter):/)||ee(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ee(e.attributes.name)==="robots"||ee(e.attributes.name)==="googlebot"||ee(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ee(e.attributes.name)==="author"||ee(e.attributes.name)==="generator"||ee(e.attributes.name)==="framework"||ee(e.attributes.name)==="publisher"||ee(e.attributes.name)==="progid"||ee(e.attributes.property).match(/^article:/)||ee(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ee(e.attributes.name)==="google-site-verification"||ee(e.attributes.name)==="yandex-verification"||ee(e.attributes.name)==="csrf-token"||ee(e.attributes.name)==="p:domain_verify"||ee(e.attributes.name)==="verify-v1"||ee(e.attributes.name)==="verification"||ee(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Xe(e,t){var n=t.doc,r=t.mirror,o=t.blockClass,i=t.blockSelector,a=t.maskTextClass,s=t.maskTextSelector,l=t.skipChild,c=l===void 0?!1:l,u=t.inlineStylesheet,d=u===void 0?!0:u,f=t.maskInputOptions,m=f===void 0?{}:f,p=t.maskTextFn,h=t.maskInputFn,y=t.slimDOMOptions,g=t.dataURLOptions,w=g===void 0?{}:g,v=t.inlineImages,b=v===void 0?!1:v,S=t.recordCanvas,x=S===void 0?!1:S,I=t.onSerialize,C=t.onIframeLoad,M=t.iframeLoadTimeout,k=M===void 0?5e3:M,T=t.onStylesheetLoad,F=t.stylesheetLoadTimeout,D=F===void 0?5e3:F,R=t.keepIframeSrcFn,_=R===void 0?function(){return!1}:R,N=t.newlyAddedElement,P=N===void 0?!1:N,K=t.preserveWhiteSpace,U=K===void 0?!0:K,G=Su(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,dataURLOptions:w,inlineImages:b,recordCanvas:x,keepIframeSrcFn:_,newlyAddedElement:P});if(!G)return console.warn(e,"not serialized"),null;var ne;r.hasNode(e)?ne=r.getId(e):Au(G,y)||!U&&G.type===fe.Text&&!G.isStyle&&!G.textContent.replace(/^\s+|\s+$/gm,"").length?ne=Je:ne=$r();var L=Object.assign(G,{id:ne});if(r.add(e,L),ne===Je)return null;I&&I(e);var W=!c;if(L.type===fe.Element){W=W&&!L.needBlock,delete L.needBlock;var B=e.shadowRoot;B&&Ke(B)&&(L.isShadowHost=!0)}if((L.type===fe.Document||L.type===fe.Element)&&W){y.headWhitespace&&L.type===fe.Element&&L.tagName==="head"&&(U=!1);for(var Y={doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:c,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_},O=0,j=Array.from(e.childNodes);O<j.length;O++){var X=j[O],z=Xe(X,Y);z&&L.childNodes.push(z)}if(nu(e)&&e.shadowRoot)for(var Z=0,H=Array.from(e.shadowRoot.childNodes);Z<H.length;Z++){var X=H[Z],z=Xe(X,Y);z&&(Ke(e.shadowRoot)&&(z.isShadow=!0),L.childNodes.push(z))}}return e.parentNode&&Qe(e.parentNode)&&Ke(e.parentNode)&&(L.isShadow=!0),L.type===fe.Element&&L.tagName==="iframe"&&wu(e,function(){var re=e.contentDocument;if(re&&C){var oe=Xe(re,{doc:re,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_});oe&&C(e,oe)}},k),L.type===fe.Element&&L.tagName==="link"&&L.attributes.rel==="stylesheet"&&vu(e,function(){if(T){var re=Xe(e,{doc:n,mirror:r,blockClass:o,blockSelector:i,maskTextClass:a,maskTextSelector:s,skipChild:!1,inlineStylesheet:d,maskInputOptions:m,maskTextFn:p,maskInputFn:h,slimDOMOptions:y,dataURLOptions:w,inlineImages:b,recordCanvas:x,preserveWhiteSpace:U,onSerialize:I,onIframeLoad:C,iframeLoadTimeout:k,onStylesheetLoad:T,stylesheetLoadTimeout:D,keepIframeSrcFn:_});re&&T(e,re)}},D),L}function sa(e,t){var n=t||{},r=n.mirror,o=r===void 0?new ia:r,i=n.blockClass,a=i===void 0?"rr-block":i,s=n.blockSelector,l=s===void 0?null:s,c=n.maskTextClass,u=c===void 0?"rr-mask":c,d=n.maskTextSelector,f=d===void 0?null:d,m=n.inlineStylesheet,p=m===void 0?!0:m,h=n.inlineImages,y=h===void 0?!1:h,g=n.recordCanvas,w=g===void 0?!1:g,v=n.maskAllInputs,b=v===void 0?!1:v,S=n.maskTextFn,x=n.maskInputFn,I=n.slimDOM,C=I===void 0?!1:I,M=n.dataURLOptions,k=n.preserveWhiteSpace,T=n.onSerialize,F=n.onIframeLoad,D=n.iframeLoadTimeout,R=n.onStylesheetLoad,_=n.stylesheetLoadTimeout,N=n.keepIframeSrcFn,P=N===void 0?function(){return!1}:N,K=b===!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}:b===!1?{password:!0}:b,U=C===!0||C==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:C==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:C===!1?{}:C;return Xe(e,{doc:e,mirror:o,blockClass:a,blockSelector:l,maskTextClass:u,maskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:K,maskTextFn:S,maskInputFn:x,slimDOMOptions:U,dataURLOptions:M,inlineImages:y,recordCanvas:w,preserveWhiteSpace:k,onSerialize:T,onIframeLoad:F,iframeLoadTimeout:D,onStylesheetLoad:R,stylesheetLoadTimeout:_,keepIframeSrcFn:P,newlyAddedElement:!1})}var Eu=/([^\\]):hover/,Lg=new RegExp(Eu.source,"g");function pe(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var dt=`Please stop import mirror directly. Instead of that,\r
|
|
70
70
|
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
71
|
-
or you can use record.mirror to access the mirror instance during recording.`,ea={map:{},getId(){return console.error(dt),-1},getNode(){return console.error(dt),null},removeNodeFromMap(){console.error(dt)},has(){return console.error(dt),!1},reset(){console.error(dt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ea=new Proxy(ea,{get(e,t,n){return t==="map"&&console.error(dt),Reflect.get(e,t,n)}}));function ft(e,t,n={}){let r=null,o=0;return function(...i){let a=Date.now();!o&&n.leading===!1&&(o=a);let s=t-(a-o),l=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},s))}}function et(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>et(e,t,i||{},!0)}function Ae(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function sn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ln(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ae(e,t,n,r){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(vt(o,t,r))return!0;return!!(n&&(e.matches(n)||r&&o.closest(n)!==null))}function ta(e,t){return t.getId(e)!==-1}function cn(e,t){return t.getId(e)===Je}function $r(e,t){if(Qe(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?$r(e.parentNode,t):!0:!0}function _r(e){return!!e.changedTouches}function na(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function un(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function dn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function fn(e){return!!e?.shadowRoot}var an=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!==null&&n!==void 0?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};var G=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(G||{}),V=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(V||{}),pn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(pn||{}),$e=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))($e||{});function ra(e){return"__ln"in e}var Or=class{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&ra(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&ra(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}},oa=(e,t)=>`${e}@${t}`,mn=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Or,r=s=>{let l=s,c=Je;for(;c===Je;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},o=s=>{var l,c,u,d;let f=null;((c=(l=s.getRootNode)===null||l===void 0?void 0:l.call(s))===null||c===void 0?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&s.getRootNode().host&&(f=s.getRootNode().host);let m=f;for(;((d=(u=m?.getRootNode)===null||u===void 0?void 0:u.call(m))===null||d===void 0?void 0:d.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&m.getRootNode().host;)m=m.getRootNode().host;let p=!this.doc.contains(s)&&(!m||!this.doc.contains(m));if(!s.parentNode||p)return;let h=Qe(s.parentNode)?this.mirror.getId(f):this.mirror.getId(s.parentNode),y=r(s);if(h===-1||y===-1)return n.addNode(s);let g=Xe(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:w=>{un(w,this.mirror)&&this.iframeManager.addIframe(w),dn(w,this.mirror)&&this.stylesheetManager.trackLinkElement(w),fn(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(w,v)=>{this.iframeManager.attachIframe(w,v),this.shadowDomManager.observeAttachShadow(w)},onStylesheetLoad:(w,v)=>{this.stylesheetManager.attachLinkElement(w,v)}});g&&t.push({parentId:h,nextId:y,node:g})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of Array.from(this.movedSet.values()))ia(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||o(s);for(let s of Array.from(this.addedSet.values()))!aa(this.droppedSet,s)&&!ia(this.removes,s,this.mirror)||aa(this.movedSet,s)?o(s):this.droppedSet.add(s);let i=null;for(;n.length;){let s=null;if(i){let l=this.mirror.getId(i.value.parentNode),c=r(i.value);l!==-1&&c!==-1&&(s=i)}if(!s)for(let l=n.length-1;l>=0;l--){let c=n.get(l);if(c){let u=this.mirror.getId(c.value.parentNode);if(r(c.value)===-1)continue;if(u!==-1){s=c;break}else{let f=c.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=f.parentNode.host;if(this.mirror.getId(m)!==-1){s=c;break}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}i=s.previous,n.removeNode(s.value),o(s.value)}let a={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>({id:this.mirror.getId(s.node),attributes:s.attributes})).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!cn(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!ae(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Fr(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=St({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ae(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){let i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});let a=o.attributes.style;for(let s of Array.from(n.style)){let l=n.style.getPropertyValue(s),c=n.style.getPropertyPriority(s);(l!==i.style.getPropertyValue(s)||c!==i.style.getPropertyPriority(s))&&(c===""?a[s]=l:a[s]=[l,c])}for(let s of Array.from(i.style))n.style.getPropertyValue(s)===""&&(a[s]=!1)}else o.attributes[t.attributeName]=Lr(this.doc,n.tagName,t.attributeName,r);break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=Qe(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||cn(n,this.mirror)||!ta(n,this.mirror)||(this.addedSet.has(n)?(Pr(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||$r(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[oa(r,o)]?Pr(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Qe(t.target)&&Ke(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(cn(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[oa(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Pr(e,t){e.delete(t),t.childNodes.forEach(n=>Pr(e,n))}function ia(e,t,n){return e.length===0?!1:sa(e,t,n)}function sa(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:sa(e,r,n)}function aa(e,t){return e.size===0?!1:la(e,t)}function la(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:la(e,n):!1}var Ve=[],da=typeof CSSGroupingRule<"u",fa=typeof CSSMediaRule<"u",pa=typeof CSSSupportsRule<"u",ma=typeof CSSConditionRule<"u";function Ct(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Dr(e,t){var n,r;let o=new mn;Ve.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver,a=(r=(n=window?.Zone)===null||n===void 0?void 0:n.__symbol__)===null||r===void 0?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);let s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function mu({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,a=[],s,l=ft(d=>{let f=Date.now()-s;e(a.map(m=>(m.timeOffset-=f,m)),d),a=[],s=null},i),c=ft(d=>{let f=Ct(d),{clientX:m,clientY:p}=_r(d)?d.changedTouches[0]:d;s||(s=Date.now()),a.push({x:m,y:p,id:r.getId(f),timeOffset:Date.now()-s}),l(typeof DragEvent<"u"&&d instanceof DragEvent?V.Drag:d instanceof MouseEvent?V.MouseMove:V.TouchMove)},o,{trailing:!1}),u=[pe("mousemove",c,n),pe("touchmove",c,n),pe("drag",c,n)];return()=>{u.forEach(d=>d())}}function hu({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,s=[],l=c=>u=>{let d=Ct(u);if(ae(d,r,o,!0))return;let f=_r(u)?u.changedTouches[0]:u;if(!f)return;let m=n.getId(d),{clientX:p,clientY:h}=f;e({type:pn[c],id:m,x:p,y:h})};return Object.keys(pn).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let u=c.toLowerCase(),d=l(c);s.push(pe(u,d,t))}),()=>{s.forEach(c=>c())}}function Wr({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){let a=ft(s=>{let l=Ct(s);if(!l||ae(l,r,o,!0))return;let c=n.getId(l);if(l===t){let u=t.scrollingElement||t.documentElement;e({id:c,x:u.scrollLeft,y:u.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},i.scroll||100);return pe("scroll",a,t)}function gu({viewportResizeCb:e}){let t=-1,n=-1,r=ft(()=>{let o=sn(),i=ln();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return pe("resize",r,window)}function ca(e,t){let n=Object.assign({},e);return t||delete n.userTriggered,n}var yu=["INPUT","TEXTAREA","SELECT"],ua=new WeakMap;function bu({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:a,maskInputFn:s,sampling:l,userTriggeredOnInput:c}){function u(g){let w=Ct(g),v=g.isTrusted;if(w&&w.tagName==="OPTION"&&(w=w.parentElement),!w||!w.tagName||yu.indexOf(w.tagName)<0||ae(w,r,o,!0))return;let b=w.type;if(w.classList.contains(i))return;let S=w.value,x=!1;b==="radio"||b==="checkbox"?x=w.checked:(a[w.tagName.toLowerCase()]||a[b])&&(S=St({maskInputOptions:a,tagName:w.tagName,type:b,value:S,maskInputFn:s})),d(w,ca({text:S,isChecked:x,userTriggered:v},c));let I=w.name;b==="radio"&&I&&x&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(C=>{C!==w&&d(C,ca({text:C.value,isChecked:!x,userTriggered:!1},c))})}function d(g,w){let v=ua.get(g);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){ua.set(g,w);let b=n.getId(g);e(Object.assign(Object.assign({},w),{id:b}))}}let m=(l.input==="last"?["change"]:["input","change"]).map(g=>pe(g,u,t)),p=t.defaultView;if(!p)return()=>{m.forEach(g=>g())};let h=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[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 h&&h.set&&m.push(...y.map(g=>et(g[0],g[1],{set(){u({target:this})}},!1,p))),()=>{m.forEach(g=>g())}}function hn(e){let t=[];function n(r,o){if(da&&r.parentRule instanceof CSSGroupingRule||fa&&r.parentRule instanceof CSSMediaRule||pa&&r.parentRule instanceof CSSSupportsRule||ma&&r.parentRule instanceof CSSConditionRule){let a=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(a)}else if(r.parentStyleSheet){let a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function Ue(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function wu({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(u,d){let{id:f,styleId:m}=Ue(this,t,n.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,adds:[{rule:u,index:d}]}),o.apply(this,[u,d])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,removes:[{index:u}]}),i.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replace:u}),a.apply(this,[u])});let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replaceSync:u}),s.apply(this,[u])});let l={};da?l.CSSGroupingRule=r.CSSGroupingRule:(fa&&(l.CSSMediaRule=r.CSSMediaRule),ma&&(l.CSSConditionRule=r.CSSConditionRule),pa&&(l.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=function(f,m){let{id:p,styleId:h}=Ue(this.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,adds:[{rule:f,index:[...hn(this),m||0]}]}),c[u].insertRule.apply(this,[f,m])},d.prototype.deleteRule=function(f){let{id:m,styleId:p}=Ue(this.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:[...hn(this),f]}]}),c[u].deleteRule.apply(this,[f])}}),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})}}function Br({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(n.host);let s=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(i=(o=n.ownerDocument)===null||o===void 0?void 0:o.defaultView)===null||i===void 0?void 0:i.ShadowRoot,l=Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets");return a===null||a===-1||!s||!l?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)===null||c===void 0?void 0:c.call(this)},set(c){var u;let d=(u=l.set)===null||u===void 0?void 0:u.call(this,c);if(a!==null&&a!==-1)try{t.adoptStyleSheets(c,a)}catch{}return d}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})}function vu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(s,l,c){var u;if(n.has(s))return i.apply(this,[s,l,c]);let{id:d,styleId:f}=Ue((u=this.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:s,value:l,priority:c},index:hn(this.parentRule)}),i.apply(this,[s,l,c])};let a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(s){var l;if(n.has(s))return a.apply(this,[s]);let{id:c,styleId:u}=Ue((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,remove:{property:s},index:hn(this.parentRule)}),a.apply(this,[s])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}function Su({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){let i=s=>ft(l=>{let c=Ct(l);if(!c||ae(c,t,n,!0))return;let{currentTime:u,volume:d,muted:f,playbackRate:m}=c;e({type:s,id:r.getId(c),currentTime:u,volume:d,muted:f,playbackRate:m})},o.media||500),a=[pe("play",i(0)),pe("pause",i(1)),pe("seeked",i(2)),pe("volumechange",i(3)),pe("ratechange",i(4))];return()=>{a.forEach(s=>s())}}function Cu({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,u){let d=new i(l,c,u);return o.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};let a=Ae(t.fonts,"add",function(s){return function(l){return setTimeout(()=>{let c=o.get(l);c&&(e(c),o.delete(l))},0),s.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(s=>s())}}function xu(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=()=>{let l=t.getSelection();if(!l||a&&l?.isCollapsed)return;a=l.isCollapsed||!1;let c=[],u=l.rangeCount||0;for(let d=0;d<u;d++){let f=l.getRangeAt(d),{startContainer:m,startOffset:p,endContainer:h,endOffset:y}=f;ae(m,r,o,!0)||ae(h,r,o,!0)||c.push({start:n.getId(m),startOffset:p,end:n.getId(h),endOffset:y})}i({ranges:c})};return s(),pe("selectionchange",s)}function Iu(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),n(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),r(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),o(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),i(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),s(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),l(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),u(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),d(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),f(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),m(...p)}}function ha(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};Iu(e,t);let r=Dr(e,e.doc),o=mu(e),i=hu(e),a=Wr(e),s=gu(e),l=bu(e),c=Su(e),u=wu(e,{win:n}),d=Br(e,e.doc),f=vu(e,{win:n}),m=e.collectFonts?Cu(e):()=>{},p=xu(e),h=[];for(let y of e.plugins)h.push(y.observer(y.callback,n,y.options));return()=>{Ve.forEach(y=>y.reset()),r.disconnect(),o(),i(),a(),s(),l(),c(),u(),d(),f(),m(),p(),h.forEach(y=>y())}}var xt=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t),s=i.get(n);return s||(s=this.generateIdFn(),i.set(n,s),a.set(s,n)),s}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};var gn=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new xt(Rr),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(r=this.loadListener)===null||r===void 0||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){if(t.data.type==="rrweb"){if(!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let o=this.transformCrossOriginEvent(r,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}}transformCrossOriginEvent(t,n){var r;switch(n.type){case G.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t),{timestamp:n.timestamp,type:G.IncrementalSnapshot,data:{source:V.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case G.Meta:case G.Load:case G.DomContentLoaded:return!1;case G.Plugin:return n;case G.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case G.IncrementalSnapshot:switch(n.data.source){case V.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case V.Drag:case V.TouchMove:case V.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case V.ViewportResize:return!1;case V.MediaInteraction:case V.MouseInteraction:case V.Scroll:case V.CanvasMutation:case V.Input:return this.replaceIds(n.data,t,["id"]),n;case V.StyleSheetRule:case V.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case V.Font:return n;case V.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case V.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)===null||r===void 0||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}};var yn=class{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;let n=this;this.restorePatches.push(Ae(Element.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),i}}))}addShadowRoot(t,n){Ke(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),Dr(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Wr(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),Br({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){let n=this;this.restorePatches.push(Ae(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),i}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}};function ga(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function ya(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}var pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Au=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(It=0;It<pt.length;It++)Au[pt.charCodeAt(It)]=It;var It,ba=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=pt[t[n]>>2],o+=pt[(t[n]&3)<<4|t[n+1]>>4],o+=pt[(t[n+1]&15)<<2|t[n+2]>>6],o+=pt[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};var wa=new Map;function Mu(e,t){let n=wa.get(e);return n||(n=new Map,wa.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Hr=(e,t,n)=>{if(!e||!(va(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=Mu(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function bn(e,t,n){if(e instanceof Array)return e.map(r=>bn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=ba(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[bn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[bn(e.data,t,n),e.width,e.height]};if(va(e,t)||typeof e=="object"){let r=e.constructor.name,o=Hr(e,t,n);return{rr_type:r,index:o}}}}return e}var wn=(e,t,n)=>[...e].map(r=>bn(r,t,n)),va=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function Sa(e,t,n,r){let o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let s=Ae(t.CanvasRenderingContext2D.prototype,a,function(l){return function(...c){return ae(this.canvas,n,r,!0)||setTimeout(()=>{let u=wn([...c],t,this);e(this.canvas,{type:$e["2D"],property:a,args:u})},0),l.apply(this,c)}});o.push(s)}catch{let l=et(t.CanvasRenderingContext2D.prototype,a,{set(c){e(this.canvas,{type:$e["2D"],property:a,args:[c],setter:!0})}});o.push(l)}return()=>{o.forEach(a=>a())}}function Ur(e,t,n){let r=[];try{let o=Ae(e.HTMLCanvasElement.prototype,"getContext",function(i){return function(a,...s){return ae(this,t,n,!0)||"__context"in this||(this.__context=a),i.apply(this,[a,...s])}});r.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(o=>o())}}function Ca(e,t,n,r,o,i,a){let s=[],l=Object.getOwnPropertyNames(e);for(let c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;let u=Ae(e,c,function(d){return function(...f){let m=d.apply(this,f);if(Hr(m,a,this),!ae(this.canvas,r,o,!0)){let p=wn([...f],a,this),h={type:t,property:c,args:p};n(this.canvas,h)}return m}});s.push(u)}catch{let d=et(e,c,{set(f){n(this.canvas,{type:t,property:c,args:[f],setter:!0})}});s.push(d)}return s}function xa(e,t,n,r,o){let i=[];return i.push(...Ca(t.WebGLRenderingContext.prototype,$e.WebGL,e,n,r,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Ca(t.WebGL2RenderingContext.prototype,$e.WebGL2,e,n,r,o,t)),()=>{i.forEach(a=>a())}}var Vr=null;try{Ia=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof ar=="function"&&ar("worker_threads"),Vr=Ia.Worker}catch{}var Ia;function Eu(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}function Aa(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=Eu(e,o),a=i.indexOf(`
|
|
72
|
-
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:"");return function(c){return new
|
|
73
|
-
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:""),l=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(l)}function Ma(e,t,n){var r;return function(i){return r=r||Tu(e,t,n),new Worker(r,i)}}var Ru=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function Ea(){return Ru}function ka(e,t,n){return Ea()?Aa(e,t,n):Ma(e,t,n)}var Ta=ka("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);var vn=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,recordCanvas:a,dataURLOptions:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,o,i),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r,o,i){let a=Ur(n,r,o),s=new Map,l=new Ta;l.onmessage=p=>{let{id:h}=p.data;if(s.set(h,!1),!("base64"in p.data))return;let{base64:y,type:g,width:w,height:v}=p.data;this.mutationCb({id:h,type:$e["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:g}]},0,0]}]})};let c=1e3/t,u=0,d,f=()=>{let p=[];return n.document.querySelectorAll("canvas").forEach(h=>{ae(h,r,o,!0)||p.push(h)}),p},m=p=>{if(u&&p-u<c){d=requestAnimationFrame(m);return}u=p,f().forEach(h=>ya(this,void 0,void 0,function*(){var y;let g=this.mirror.getId(h);if(s.get(g))return;if(s.set(g,!0),["webgl","webgl2"].includes(h.__context)){let v=h.getContext(h.__context);((y=v?.getContextAttributes())===null||y===void 0?void 0:y.preserveDrawingBuffer)===!1&&v?.clear(v.COLOR_BUFFER_BIT)}let w=yield createImageBitmap(h);l.postMessage({id:g,bitmap:w,width:h.width,height:h.height,dataURLOptions:i.dataURLOptions},[w])})),d=requestAnimationFrame(m)};d=requestAnimationFrame(m),this.resetObservers=()=>{a(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=Ur(t,n,r),i=Sa(this.processMutation.bind(this),t,n,r),a=xa(this.processMutation.bind(this),t,n,r,this.mirror);this.resetObservers=()=>{o(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(a=>ga(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}};var Sn=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new an,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let a;if(this.styleMirror.has(i))a=this.styleMirror.getId(i);else{a=this.styleMirror.add(i);let s=Array.from(i.rules||CSSRule);o.push({styleId:a,rules:s.map((l,c)=>({rule:Tr(l),index:c}))})}r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}};function ce(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var se,Cn,zr,xn=!1,Me=Ji();function _e(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",maskTextClass:s="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:h,packFn:y,sampling:g={},dataURLOptions:w={},mousemoveWait:v,recordCanvas:b=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:x=!1,collectFonts:I=!1,inlineImages:C=!1,plugins:E,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:T=new Set([])}=e,F=S?window.parent===window:!0,D=!1;if(!F)try{window.parent.document,D=!1}catch{D=!0}if(F&&!t)throw new Error("emit function is required");v!==void 0&&g.mousemove===void 0&&(g.mousemove=v),Me.reset();let R=u===!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},_=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};na();let N,P=0,K=O=>{for(let j of E||[])j.eventProcessor&&(O=j.eventProcessor(O));return y&&(O=y(O)),O};se=(O,j)=>{var X;if(!((X=Ve[0])===null||X===void 0)&&X.isFrozen()&&O.type!==G.FullSnapshot&&!(O.type===G.IncrementalSnapshot&&O.data.source===V.Mutation)&&Ve.forEach(z=>z.unfreeze()),F)t?.(K(O),j);else if(D){let z={type:"rrweb",event:K(O),isCheckout:j};window.parent.postMessage(z,"*")}if(O.type===G.FullSnapshot)N=O,P=0;else if(O.type===G.IncrementalSnapshot){if(O.data.source===V.Mutation&&O.data.isAttachIframe)return;P++;let z=r&&P>=r,Z=n&&O.timestamp-N.timestamp>n;(z||Z)&&Cn(!0)}};let U=O=>{se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.Mutation},O)}))},q=O=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.Scroll},O)})),ne=O=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.CanvasMutation},O)})),L=O=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.AdoptedStyleSheet},O)})),W=new Sn({mutationCb:U,adoptedStyleSheetCb:L}),B=new gn({mirror:Me,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:S,wrappedEmit:se});for(let O of E||[])O.getMirror&&O.getMirror({nodeMirror:Me,crossOriginIframeMirror:B.crossOriginIframeMirror,crossOriginIframeStyleMirror:B.crossOriginIframeStyleMirror});zr=new vn({recordCanvas:b,mutationCb:ne,win:window,blockClass:o,blockSelector:i,mirror:Me,sampling:g.canvas,dataURLOptions:w});let Y=new yn({mutationCb:U,scrollCb:q,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:R,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:b,inlineImages:C,sampling:g,slimDOMOptions:_,iframeManager:B,stylesheetManager:W,canvasManager:zr,keepIframeSrcFn:k},mirror:Me});Cn=(O=!1)=>{var j,X,z,Z,H,re;se(ce({type:G.Meta,data:{href:window.location.href,width:ln(),height:sn()}}),O),W.reset(),Ve.forEach(le=>le.lock());let oe=Qi(document,{mirror:Me,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:R,maskTextFn:p,slimDOM:_,dataURLOptions:w,recordCanvas:b,inlineImages:C,onSerialize:le=>{un(le,Me)&&B.addIframe(le),dn(le,Me)&&W.trackLinkElement(le),fn(le)&&Y.addShadowRoot(le.shadowRoot,document)},onIframeLoad:(le,We)=>{B.attachIframe(le,We),Y.observeAttachShadow(le)},onStylesheetLoad:(le,We)=>{W.attachLinkElement(le,We)},keepIframeSrcFn:k});if(!oe)return console.warn("Failed to snapshot the document");se(ce({type:G.FullSnapshot,data:{node:oe,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(j=document?.body)===null||j===void 0?void 0:j.parentElement)===null||X===void 0?void 0:X.scrollLeft)||((z=document?.body)===null||z===void 0?void 0:z.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((H=(Z=document?.body)===null||Z===void 0?void 0:Z.parentElement)===null||H===void 0?void 0:H.scrollTop)||((re=document?.body)===null||re===void 0?void 0:re.scrollTop)||0}}})),Ve.forEach(le=>le.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,Me.getId(document))};try{let O=[];O.push(pe("DOMContentLoaded",()=>{se(ce({type:G.DomContentLoaded,data:{}}))}));let j=z=>{var Z;return ha({mutationCb:U,mousemoveCb:(H,re)=>se(ce({type:G.IncrementalSnapshot,data:{source:re,positions:H}})),mouseInteractionCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.MouseInteraction},H)})),scrollCb:q,viewportResizeCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.ViewportResize},H)})),inputCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.Input},H)})),mediaInteractionCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.MediaInteraction},H)})),styleSheetRuleCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.StyleSheetRule},H)})),styleDeclarationCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.StyleDeclaration},H)})),canvasMutationCb:ne,fontCb:H=>se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.Font},H)})),selectionCb:H=>{se(ce({type:G.IncrementalSnapshot,data:Object.assign({source:V.Selection},H)}))},blockClass:o,ignoreClass:a,maskTextClass:s,maskTextSelector:l,maskInputOptions:R,inlineStylesheet:c,sampling:g,recordCanvas:b,inlineImages:C,userTriggeredOnInput:x,collectFonts:I,doc:z,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:k,blockSelector:i,slimDOMOptions:_,dataURLOptions:w,mirror:Me,iframeManager:B,stylesheetManager:W,shadowDomManager:Y,canvasManager:zr,ignoreCSSAttributes:T,plugins:((Z=E?.filter(H=>H.observer))===null||Z===void 0?void 0:Z.map(H=>({observer:H.observer,options:H.options,callback:re=>se(ce({type:G.Plugin,data:{plugin:H.name,payload:re}}))})))||[]},h)};B.addLoadListener(z=>{O.push(j(z.contentDocument))});let X=()=>{Cn(),O.push(j(document)),xn=!0};return document.readyState==="interactive"||document.readyState==="complete"?X():O.push(pe("load",()=>{se(ce({type:G.Load,data:{}})),X()},window)),()=>{O.forEach(z=>z()),xn=!1}}catch(O){console.warn(O)}}_e.addCustomEvent=(e,t)=>{if(!xn)throw new Error("please add custom event after start recording");se(ce({type:G.Custom,data:{tag:e,payload:t}}))};_e.freezePage=()=>{Ve.forEach(e=>e.freeze())};_e.takeFullSnapshot=e=>{if(!xn)throw new Error("please take full snapshot after start recording");Cn(e)};_e.mirror=Me;function Nu(){try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function qr(){let e=M().sessionRecording;if(!e.active)try{let t=_e({emit:n=>e.buffer.push(n),collectFonts:!0,sampling:{mousemove:!1,mouseInteraction:!1}});t&&(e.active=!0,e.runId=Nu(),e.stopFn=t)}catch{}}function Gr(){let e=M().sessionRecording;return!e.active||!e.runId||e.buffer.length===0?null:{events:e.buffer.splice(0),runId:e.runId}}function jr(){return M().sessionRecording.active}var Lu=["backgroundColor","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","borderRadius","borderColor","borderWidth","borderStyle","boxShadow","opacity","width","height","display","flexDirection","justifyContent","alignItems","gap"];function Fu(e,t){let n=t??Lu;if(e.ref||e.text||e.role||e.label||e.selector){let{element:i,matched:a}=Re(e);return{...Ra(i,e.ref,n),matched:a}}let r=Ge(),o=[];for(let[i,a]of r)a.isConnected&&o.push(Ra(a,i,n));return o}function Ra(e,t,n){let r=window.getComputedStyle(e),o={};t&&(o.ref=t),o.tag=e.tagName.toLowerCase();let i=e.textContent?.trim();i&&(o.text=i.length>60?i.slice(0,60)+"\u2026":i);for(let a of n){let s=r.getPropertyValue(a.replace(/([A-Z])/g,"-$1").toLowerCase());s&&(o[a]=s)}return o}var Na=25,In=25,mt="__mindstudio_pending_nav",La=300,Xr=1e4;function $u(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:t.pathname===window.location.pathname&&t.search===window.location.search&&t.hash===window.location.hash}catch{return!1}}function Fa(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:($u(e)||(window.history.pushState(null,"",t.pathname+t.search+t.hash),window.dispatchEvent(new PopStateEvent("popstate"))),!0)}catch{return!1}}async function Yr(e=300,t=2e3){return new Promise(n=>{let r=Date.now()+t,o=Date.now(),i=Vt(),a=window.scrollY,s=window.scrollX,l=document.body.scrollTop,c=document.documentElement.scrollTop,u=document.body.scrollHeight,d=document.body.scrollWidth,f=i.scrollTop,m=i.scrollLeft;function p(){if(Date.now()>r){n();return}let h=window.scrollY,y=window.scrollX,g=document.body.scrollTop,w=document.documentElement.scrollTop,v=document.body.scrollHeight,b=document.body.scrollWidth,S=i.scrollTop,x=i.scrollLeft;(h!==a||y!==s||g!==l||w!==c||v!==u||b!==d||S!==f||x!==m)&&(a=h,s=y,l=g,c=w,u=v,d=b,f=S,m=x,o=Date.now()),Date.now()-o>=e?n():requestAnimationFrame(p)}requestAnimationFrame(p)})}var _u=150;async function Zr(e){let t=Ou(e),n=t.map(a=>({el:a,top:a.scrollTop,left:a.scrollLeft})),r=document.documentElement.style.scrollBehavior;document.documentElement.style.scrollBehavior="auto",e.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),document.documentElement.style.scrollBehavior=r;let o=t.map(a=>({top:a.scrollTop,left:a.scrollLeft})),i=[];for(let a=0;a<t.length;a++)(n[a].top!==o[a].top||n[a].left!==o[a].left)&&i.push({el:t[a],fromTop:n[a].top,fromLeft:n[a].left,toTop:o[a].top,toLeft:o[a].left});if(i.length===0){await new Promise(a=>requestAnimationFrame(()=>a()));return}for(let a of i)a.el.scrollTop=a.fromTop,a.el.scrollLeft=a.fromLeft;await new Promise(a=>{let s=performance.now();function l(c){let u=c-s,d=Math.min(u/_u,1),f=1-Math.pow(1-d,3);for(let m of i)m.el.scrollTop=m.fromTop+(m.toTop-m.fromTop)*f,m.el.scrollLeft=m.fromLeft+(m.toLeft-m.fromLeft)*f;d<1?requestAnimationFrame(l):a()}requestAnimationFrame(l)})}function Ou(e){let t=[],n=e.parentElement;for(;n;){let r=getComputedStyle(n),o=r.overflowY,i=r.overflowX;(o==="auto"||o==="scroll"||i==="auto"||i==="scroll")&&t.push(n),n=n.parentElement}return t.push(document.scrollingElement||document.documentElement),t}var Pu=new Set(["click","type","select"]);function Du(e){return e.some(t=>Pu.has(t.command))}async function At(e,t){let n=Date.now(),r=[],o=[],i="",a=!1,s=new Set(["click","type","select"]),l=t.some(u=>s.has(u.command));l&&(wt(!0),Ar()),cr(),Du(t)&&qr();try{for(let u=0;u<t.length;u++){let d=t[u],f=d.command;try{if(u>0&&await Ie(Na+Math.random()*In-In/2),f==="navigate"){let p=d.url;if(!p)throw new Error('navigate command requires a "url" field');if(Fa(p)){r.push({index:u,command:f,result:"ok"}),await Ie(La);continue}let h=t.slice(u+1);if(h.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:h,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.href=p,await new Promise((y,g)=>{setTimeout(()=>g(new Error("Navigation did not complete within timeout")),Xr)})}if(f==="reload"){let p=t.slice(u+1);if(p.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:p,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.reload(),await new Promise((h,y)=>{setTimeout(()=>y(new Error("Reload did not complete within timeout")),Xr)})}let m=await Oa(d);r.push({index:u,command:f,...m})}catch(m){r.push({index:u,command:f,error:m instanceof Error?m.message:String(m)});break}}try{i=await je()}catch{}}finally{o=ur(),l&&(wt(!1),jr()?Mr():en())}let c=Gr();return{id:e,steps:r,snapshot:i,logs:o,duration:Date.now()-n,...c?{events:c.events,runId:c.runId}:{}}}function $a(){try{let e=sessionStorage.getItem(mt);if(!e)return null;let t=JSON.parse(e);return typeof t?.id=="string"?t.id:null}catch{return null}}async function _a(){let e=null;try{let a=sessionStorage.getItem(mt);if(!a)return null;sessionStorage.removeItem(mt),e=JSON.parse(a)}catch{return null}if(!e)return null;let t=[...e.completedSteps],n=[],r="",o=e.remainingSteps.some(a=>a.command==="click"||a.command==="type"||a.command==="select");o&&(wt(!0),Ar(),qr()),cr();try{for(let a=0;a<e.remainingSteps.length;a++){let s=e.remainingSteps[a],l=s.command,c=e.stepOffset+a;try{if(a>0&&await Ie(Na+Math.random()*In-In/2),l==="navigate"){let d=s.url;if(!d)throw new Error('navigate command requires a "url" field');if(Fa(d)){t.push({index:c,command:l,result:"ok"}),await Ie(La);continue}let f=e.remainingSteps.slice(a+1);if(f.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e.id,startTime:e.startTime,completedSteps:t,remainingSteps:f,stepOffset:c+1}))}catch{}t.push({index:c,command:l,result:"ok"}),window.location.href=d,await new Promise((m,p)=>{setTimeout(()=>p(new Error("Navigation did not complete within timeout")),Xr)})}let u=await Oa(s);t.push({index:c,command:l,...u})}catch(u){t.push({index:c,command:l,error:u instanceof Error?u.message:String(u)});break}}try{r=await je()}catch{}}finally{n=ur(),o&&(wt(!1),jr()?Mr():en())}let i=Gr();return{id:e.id,steps:t,snapshot:r,logs:n,duration:Date.now()-e.startTime,...i?{events:i.events,runId:i.runId}:{}}}async function Oa(e){switch(e.command){case"snapshot":return{result:await je()};case"click":{let{element:t,matched:n}=Re(e);return await Zr(t),await Qt(t),await Gi(),hr(t),ji(),await Yr(),await Ie(250),{result:"ok",matched:n}}case"type":{let{element:t,matched:n}=Re(e),r=e.text;if(!r&&r!=="")throw new Error('type command requires a "text" field');return await Zr(t),await Qt(t,{anchor:"text"}),await bi(t,r,{clear:!!e.clear}),await Yr(),{result:"ok",matched:n}}case"select":{let{element:t,matched:n}=Re(e),r=e.option;if(!r)throw new Error('select command requires an "option" field');await Zr(t),await Qt(t);let o=vi(t,r);return await Yr(),{result:`selected "${o}"`,matched:n}}case"wait":{let{matched:t,elapsed:n}=await wi(e);return{result:"ok",matched:t,elapsed:n}}case"styles":{let t=e.properties;return{result:Fu(e,t)}}case"evaluate":{let t=e.script;if(!t)throw new Error('evaluate command requires a "script" field');return{result:await Si(t)}}default:throw new Error(`Unknown command: ${e.command}`)}}var Wu="/__mindstudio_dev__/ws",Bu=1e3,Hu=1e4;function Da(){let e=M().ws;e.ws||(ei(Mn),window.addEventListener("beforeunload",()=>{e.closing=!0,e.ws&&e.ws.close()}),Wa())}function Mn(){let{ws:e}=M().ws;return e&&e.readyState===WebSocket.OPEN?e:null}function Uu(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${Wu}`}function Jr(){return window.parent!==window?"iframe":"standalone"}function Qr(){try{return location.search.includes("ms_sandbox=1")?(sessionStorage.setItem("__ms_sandbox","1"),!0):sessionStorage.getItem("__ms_sandbox")==="1"}catch{return location.search.includes("ms_sandbox=1")}}function Wa(){let e=M().ws;if(!e.closing){try{e.ws=new WebSocket(Uu())}catch{Pa();return}e.ws.onopen=()=>{try{let t=(()=>{try{return sessionStorage.getItem("__ms_mirror")==="1"}catch{return!1}})();e.ws.send(JSON.stringify({type:"hello",mode:Jr(),url:location.href,viewport:{w:window.innerWidth,h:window.innerHeight},mirror:t,sandbox:Qr(),resumingCommandId:$a()}))}catch{e.ws?.close()}},e.ws.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case"ack":e.clientId=n.clientId,e.reconnectDelay=Bu,zu();break;case"command":Vu(n.id,n.steps);break;case"broadcast":qu(n.action,n.payload);break}},e.ws.onclose=()=>{e.ws=null,e.clientId=null,e.closing||Pa()},e.ws.onerror=()=>{}}}function Pa(){let e=M().ws;e.closing||(setTimeout(()=>Wa(),e.reconnectDelay),e.reconnectDelay=Math.min(e.reconnectDelay*2,Hu))}async function Vu(e,t){let n=M().ws;if(n.busy){An({id:e,steps:[],snapshot:"",logs:[],duration:0,error:"Browser agent is busy"});return}n.busy=!0,Kr("command-started",{id:e,steps:t.map(r=>r.command)});try{let r=await At(e,t);An(r),Kr("command-completed",{id:e,success:!0})}catch{An({id:e,steps:[],snapshot:"",logs:[],duration:0}),Kr("command-completed",{id:e,success:!1})}finally{M().ws.busy=!1}}function An(e){try{let t=Mn();t&&t.send(JSON.stringify({type:"result",...e}))}catch{}}async function zu(){let e=await _a();e&&An(e)}function Kr(e,t){window.parent!==window&&window.parent.postMessage({channel:"mindstudio-browser-agent",command:e,...t},"*")}function qu(e,t){e==="reload"&&(document.cookie="__ms_auth=; Max-Age=0; Path=/; Secure; SameSite=None",location.href="/")}var Gu=Object.defineProperty,be=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}},Nt=(e,t)=>{for(var n in t)Gu(e,n,{get:t[n],enumerable:!0})};function ju(e){if(e===!0)return"soft";if(e===!1)return"disabled";if(typeof e=="string"){let t=e.toLowerCase().trim();if(t==="auto")return"auto";if(t==="full")return"full";if(t==="soft"||t==="disabled")return t}return"soft"}function Yu(e="soft"){switch(e){case"auto":{A.session.styleMap=new Map,A.session.nodeMap=new Map;return}case"soft":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap,A.computedStyle=new WeakMap,A.measureHints=new WeakMap,A.baseStyle=new he(50),A.defaultStyle=new he(30),A.image=new he(100),A.background=new he(100),A.resource=new he(150),A.compress=new he(50),A.font=new Set;return}default:{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}}}var he,A,ge=be(()=>{"use strict";he=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let n=this.keys().next().value;n!==void 0&&this.delete(n)}return super.set(e,t)}},A={image:new he(100),background:new he(100),resource:new he(150),defaultStyle:new he(30),baseStyle:new he(50),compress:new he(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function Ao(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let n=t[2].trim();return n.startsWith("#")?null:n}function ws(e,t=1){let n=e.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of n[1].split(",")){let i=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!i)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!vs.test(a[1].trim()))continue;let s=o.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),l=1;if(s){let c=parseFloat(s[1]);l=/dpi/i.test(s[2])?c/96:c}r.push({url:i[2].trim(),dppx:l})}return r.length?(r.sort((o,i)=>o.dppx-i.dppx),(r.find(o=>o.dppx>=t)||r[r.length-1]).url):null}function Zu(e){if(!e||e==="none")return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==6?`matrix(${r})`:(o[4]="0",o[5]="0",`matrix(${o.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==16?`matrix3d(${r})`:(o[12]="0",o[13]="0",`matrix3d(${o.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}function Un(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}function Xu(e,t){if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let n=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(e,n).href}catch{return e}}var vs,Yn=be(()=>{"use strict";vs=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i});function Ku(e="[snapDOM]",{ttlMs:t=5*6e4,maxEntries:n=12}={}){let r=new Map,o=0;function i(a,s,l){if(o>=n)return;let c=Date.now();(r.get(s)||0)>c||(r.set(s,c+t),o++,a==="warn"&&console&&console.warn?console.warn(`${e} ${l}`):console&&console.error&&console.error(`${e} ${l}`))}return{warnOnce(a,s){i("warn",a,s)},errorOnce(a,s){i("error",a,s)},reset(){r.clear(),o=0}}}function Ju(e){return/^data:|^blob:|^about:blank$/i.test(e)}function Qu(e,t){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=t.includes("{url}")?t.split("{url}")[0]:t,o=new URL(r||".",n),i=new URL(e,n);if(i.origin===o.origin)return!0;let a=i.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch{}return!1}function ed(e,t){if(!t||Ju(e)||Qu(e,t))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(e,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!t}}function td(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",Un(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${Un(e)}`;let n=t.includes("?")?"&":"?";return`${t}${n}url=${encodeURIComponent(e)}`}function Ba(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(e)})}function nd(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}async function Ce(e,t={}){let n=t.as??"blob",r=t.timeout??3e3,o=t.useProxy||"",i=t.errorTTL??8e3,a=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if(n==="text")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,y="",g=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(y)?atob(g):decodeURIComponent(g),v=new Uint8Array([...w].map(S=>S.charCodeAt(0))),b=new Blob([v],{type:(y||"").split(";")[0]||""});return{ok:!0,data:b,status:200,url:e,fromCache:!1,mime:b.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let y=await fetch(e);if(!y.ok)return{ok:!1,data:null,status:y.status,url:e,fromCache:!1,reason:"http_error"};let g=await y.blob(),w=g.type||y.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ba(g),status:y.status,url:e,fromCache:!1,mime:w}:n==="text"?{ok:!0,data:await g.text(),status:y.status,url:e,fromCache:!1,mime:w}:{ok:!0,data:g,status:y.status,url:e,fromCache:!1,mime:w}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:e,fromCache:!1};let l=nd(e,{as:n,timeout:r,useProxy:o,errorTTL:i}),c=Et.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Et.delete(l);let u=Ln.get(l);if(u)return u;let d=ed(e,o)?td(e,o):e,f=t.credentials;if(!f)try{let y=typeof location<"u"&&location.href?location.href:"http://localhost/",g=new URL(e,y);f=typeof location<"u"&&g.origin===location.origin?"include":"omit"}catch{f="omit"}let m=new AbortController,p=setTimeout(()=>m.abort("timeout"),r),h=(async()=>{try{let y=await fetch(d,{signal:m.signal,credentials:f,headers:a});if(!y.ok){let v={ok:!1,data:null,status:y.status,url:d,fromCache:!1,reason:"http_error"};if(i>0&&Et.set(l,{until:Date.now()+i,result:v}),!s){let b=`${y.status} ${y.statusText||""}`.trim();io.warnOnce(`http:${y.status}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,`HTTP error ${b} while fetching ${n} ${e}`)}return t.onError&&t.onError(v),v}if(n==="text")return{ok:!0,data:await y.text(),status:y.status,url:d,fromCache:!1};let g=await y.blob(),w=g.type||y.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Ba(g),status:y.status,url:d,fromCache:!1,mime:w}:{ok:!0,data:g,status:y.status,url:d,fromCache:!1,mime:w}}catch(y){let g=y&&typeof y=="object"&&"name"in y&&y.name==="AbortError"?String(y.message||"").includes("timeout")?"timeout":"abort":"network",w={ok:!1,data:null,status:0,url:d,fromCache:!1,reason:g};if(!/^blob:/i.test(e)&&i>0&&Et.set(l,{until:Date.now()+i,result:w}),!s){let v=`${g}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,b=g==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${e}`:g==="abort"?`Request aborted while fetching ${n} ${e}`:`Network/CORS issue while fetching ${n} ${e}. A proxy may be required`;io.errorOnce(v,b)}return t.onError&&t.onError(w),w}finally{clearTimeout(p),Ln.delete(l)}})();return Ln.set(l,h),h}var io,Ln,Et,rt=be(()=>{"use strict";Yn(),io=Ku("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),Ln=new Map,Et=new Map});async function Ss(e,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||e.trim()==="none")return e;let n=ws(e,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??Ao(e);if(!n)return e;let r=Xu(n),o=Un(r),i=(t.useProxy||"")+"|"+o;if(A.background.has(i)){let a=A.background.get(i);return a?`url("${a}")`:"none"}try{let a=await Ce(o,{as:"dataURL",useProxy:t.useProxy});return a.ok?(A.background.set(i,a.data),`url("${a.data}")`):(A.background.set(i,null),"none")}catch{return A.background.set(i,null),"none"}}var rd=be(()=>{"use strict";ge(),Yn(),rt()});function Cs(e){if(e=String(e).toLowerCase(),Eo.has(e)){let i={};return A.defaultStyle.set(e,i),i}if(A.defaultStyle.has(e))return A.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let n=document.createElement(e);n.style.all="initial",t.appendChild(n);let r=getComputedStyle(n),o={};for(let i of r){if(Mo(i))continue;let a=r.getPropertyValue(i);o[i]=a}return t.removeChild(n),A.defaultStyle.set(e,o),o}function Mo(e){let t=lo.get(e);if(t===void 0){let n=String(e).toLowerCase();t=Es.has(n)||Ms.test(n)||As.test(n),lo.set(e,t)}return t}function xs(e,t){return!Ts.has(e)&&(t==="inline"||ks.has(e)||ko.has(e))}function od(e,t,n){let r=(t.display||"").toLowerCase();if(r==="inline"||ko.has(e))return!1;if(n)return!0;if((t.float||"none").toLowerCase()!=="none")return!1;let o=(t.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!Ls.has(r)}function ao(e,t,n=!0,r=!1){if(t=String(t||"").toLowerCase(),Eo.has(t))return"";let o=[],i=Cs(t),a=(e.display||"").toLowerCase(),s=a==="inline",l=xs(t,a),c=e["text-wrap-mode"]||e["white-space"]||"",u=l&&n&&!s&&(c==="nowrap"||c==="pre"),d=l&&n&&!u,f=!1;for(let m in e){if(Mo(m))continue;let p=e[m];if(d){if(Rs.has(m))continue;if(Ns.has(m)){p&&p!==i[m]&&(o.push(`${m}:${p}`),p!=="auto"&&(f=!0));continue}}if(p&&p!==i[m]){if(!u&&(m==="width"||m==="inline-size")&&p.endsWith("px")&&p.includes(".")){let h=parseFloat(p);if(Number.isFinite(h)){o.push(`${m}:${Math.ceil(h*16)/16}px`);continue}}o.push(`${m}:${p}`)}}if(d&&!s&&!r&&!f){let m=e.width;m&&m!=="auto"&&m!==i.width&&o.push(`min-width:${m}`)}return o.sort(),o.join(";")}function id(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),typeof e.querySelectorAll=="function"&&e.querySelectorAll("*").forEach(n=>t.add(n.tagName.toLowerCase())),Array.from(t))}function ad(e){let t=new Map;for(let r of e){let o=Cs(r);if(!o)continue;let i=Object.entries(o).map(([a,s])=>`${a}:${s};`).sort().join("");i&&(t.has(i)||t.set(i,[]),t.get(i).push(r))}let n="";for(let[r,o]of t.entries())n+=`${o.join(",")} { ${r} }
|
|
74
|
-
`;return n}function sd(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),n=new Map,r=1;for(let o of t)n.set(o,`c${r++}`);return n}function ld(e){try{let t=e?.ownerDocument;if(!t)return typeof window<"u"?window:null;let n=t.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===t)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function J(e,t=null){let n=()=>{let i={length:0,getPropertyValue:()=>"",item:()=>""};return i[Symbol.iterator]=function*(){},i};if(e?.nodeType!==1){let i=typeof window<"u"?window:null;if(i&&typeof i.getComputedStyle=="function")try{return i.getComputedStyle(e,t)||n()}catch{return n()}return n()}let r=A.computedStyle.get(e);r||(r=new Map,A.computedStyle.set(e,r));let o=r.get(t);if(!o){let i=ld(e),a=null;try{a=i&&typeof i.getComputedStyle=="function"?i.getComputedStyle(e,t):null}catch{}if(!a&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{e.ownerDocument===document&&(a=window.getComputedStyle(e,t))}catch{}o=a||n(),r.set(t,o)}return o}function Ha(e){let t={};for(let n of e)t[n]=e.getPropertyValue(n);for(let n of Fs){let r=t[`border-${n}-style`],o=t[`border-${n}-width`];(r==="none"||r==="hidden"||o==="0px")&&(delete t[`border-${n}-style`],delete t[`border-${n}-width`],delete t[`border-${n}-color`])}return t}function so(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&n++,i===")"&&n--,i===","&&n===0&&(t.push(e.slice(r,o).trim()),r=o+1)}return t.push(e.slice(r).trim()),t}var Is,Eo,cd,As,Ms,Es,lo,ks,ko,Ts,Rs,Ns,Ls,Fs,Zn=be(()=>{"use strict";ge(),Is=new Set(["meta","script","noscript","title","link","template"]),Eo=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),cd=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"],As=/(?:^|-)(animation|transition)(?:-|$)/i,Ms=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Es=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),lo=new Map,ks=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),ko=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Ts=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Rs=new Set(["width","max-width","inline-size","max-inline-size"]),Ns=new Set(["min-width","min-inline-size"]),Ls=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]),Fs=["top","right","bottom","left"]});function Fn(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function tt(e=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,e)})}function ud(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),n=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||n}function De(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),n=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),r=/applewebkit/i.test(e),o=/mobile/i.test(e),i=!/safari/i.test(e),a=r&&o&&i,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),c=/ipad|iphone|ipod/.test(t)&&r;return n||a||s||l||c}function dd(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}var ot=be(()=>{"use strict"});function Q(e,t,n){let r=e&&typeof e=="object"&&(e.options||e);r&&r.debug&&(n!==void 0?console.warn("[snapdom]",t,n):console.warn("[snapdom]",t))}var $s=be(()=>{"use strict"}),Ee=be(()=>{"use strict";rd(),Zn(),ot(),Yn(),$s()}),_s={};Nt(_s,{decodeSvgFromDataURL:()=>To,encodeSvgToDataURL:()=>Ro,fixSafariShadows:()=>No,toCanvas:()=>Xn});function fd(e){try{let t=e.match(/<svg\b[^>]*>/i);if(!t)return e;let n=t[0],r=parseFloat((n.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((n.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0)return e;let i=Math.min(1,Pe/r,Pe/o,Math.sqrt(Vn/(r*o)));if(i>=1)return e;let a=Math.max(1,Math.floor(r*i)),s=Math.max(1,Math.floor(o*i));return console.warn(`[snapDOM] Capture ${Math.round(r)}\xD7${Math.round(o)}px exceeds the browser image-decode limit (${Pe}px/side); downscaling to ${a}\xD7${s}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),e.replace(n,n.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${s}`))}catch{return e}}function pd(e,t){let n=["x","y","width","height"].map(x=>Number(t?.[x]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=e.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let o=r[0],i=(o.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(i||"").trim().split(/[\s,]+/).map(Number);if(a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[s,l,c,u]=a,d=Math.max(s,n[0]),f=Math.max(l,n[1]),m=Math.min(s+c,n[0]+n[2]),p=Math.min(l+u,n[1]+n[3]);if(!(m>d)||!(p>f))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let h=parseFloat((o.match(/\bwidth="([\d.]+)/i)||[])[1]),y=parseFloat((o.match(/\bheight="([\d.]+)/i)||[])[1]),g=Number.isFinite(h)&&h>0?h/c:1,w=Number.isFinite(y)&&y>0?y/u:1,v=Math.max(1,(m-d)*g),b=Math.max(1,(p-f)*w),S=o.replace(/(\bwidth=")[^"]*/i,`$1${v}`).replace(/(\bheight=")[^"]*/i,`$1${b}`).replace(/(\bviewBox=")[^"]*/i,`$1${d} ${f} ${m-d} ${p-f}`);return e.replace(o,S)}function Ua(e){return typeof e=="string"&&/^data:image\/svg\+xml/i.test(e)}function To(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}function md(e){let t=e.indexOf(",");if(t<0)return"";let n=e.slice(t+1,t+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function Ro(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function Os(e){let t=[],n="",r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===";"&&r===0?(t.push(n),n=""):n+=i}return n.trim()&&t.push(n),t.map(o=>o.trim()).filter(Boolean)}function hd(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let a=e[i];a==="("&&r++,a===")"&&(r=Math.max(0,r-1)),a===","&&r===0?(t.push(n.trim()),n=""):n+=a}n.trim()&&t.push(n.trim());let o=[];for(let i of t){if(/\binset\b/i.test(i))continue;let a=i.match(/-?\d+(?:\.\d+)?px/gi)||[],[s="0px",l="0px",c="0px"]=a;c=`${parseFloat(c)/2}px`;let u=i.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),d=!!u&&u!==",";o.push(`drop-shadow(${s} ${l} ${c}${d?` ${u}`:""})`)}return o.join(" ")}function Ps(e){let t=Os(e),n=null,r=null,o=null,i=[];for(let s of t){let l=s.indexOf(":");if(l<0)continue;let c=s.slice(0,l).trim().toLowerCase(),u=s.slice(l+1).trim();c==="box-shadow"?o=u:c==="filter"?n=u:c==="-webkit-filter"?r=u:i.push([c,u])}if(o){let s=hd(o);s&&(n=n?`${n} ${s}`:s,r=r?`${r} ${s}`:s)}let a=[...i];return n&&a.push(["filter",n]),r&&a.push(["-webkit-filter",r]),a.map(([s,l])=>`${s}:${l}`).join(";")}function gd(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,(t,n,r)=>`${n}{${Ps(r)}}`)}function yd(e){return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(t,n)=>t.replace(n,gd(n))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(t,n,r)=>`style=${n}${Ps(r)}${n}`),e}function bd(){return $n||($n=(async()=>{try{let e='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',t=new Image;t.decoding="sync",t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,await t.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(t,0,0);let o=r.getImageData(2,18,1,1).data[3]>128,i=r.getImageData(2,2,1,1).data[3]>128;return{native:o||i,flippedY:i&&!o}}catch{return{native:!1,flippedY:!1}}})(),$n)}function wd(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("?n++:i===")"?n=Math.max(0,n-1):i===","&&n===0&&(t.push(e.slice(r,o)),r=o+1)}return t.push(e.slice(r)),t.map(o=>{let i=0,a=0,s="",l=0;for(;l<o.length;){let c=o[l];if(c==="("?i++:c===")"&&(i=Math.max(0,i-1)),i===0&&(l===0||o[l-1]===" ")){let u=/^-?\d*\.?\d+px/.exec(o.slice(l));if(u){a++,s+=a===2?`${-parseFloat(u[0])}px`:u[0],l+=u[0].length;continue}}s+=c,l++}return s}).join(",")}function vd(e,t){let n=r=>Os(r).map(o=>{let i=o.indexOf(":");if(i<0)return o;let a=o.slice(0,i).trim().toLowerCase();return a==="text-shadow"||t&&a==="box-shadow"?`${a}:${wd(o.slice(i+1))}`:o}).join(";");return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,o)=>r.replace(o,o.replace(/([^{}]+)\{([^}]*)\}/g,(i,a,s)=>`${a}{${n(s)}}`))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(r,o,i)=>`style=${o}${n(i)}${o}`),e}async function No(e){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(e))return{svg:e,naturalOnly:!1};let{native:t,flippedY:n}=await bd();try{let r=e;return t||(r=yd(r)),n&&(r=vd(r,t)),{svg:r,naturalOnly:!0}}catch{return{svg:e,naturalOnly:!0}}}async function Sd(e,t){e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(e);try{let n=document.createElement("canvas");n.width=16,n.height=16;let r=()=>new Promise(a=>{requestAnimationFrame(a),setTimeout(a,50)}),o=n.getContext("2d",{willReadFrequently:!0});if(!o){await r(),await r();return}let i=performance.now()+(t?600:150);for(;;){o.clearRect(0,0,16,16);try{o.drawImage(e,0,0,16,16)}catch{return}let a=o.getImageData(0,0,16,16).data,s=!1;for(let l=3;l<a.length;l+=4)if(a[l]>0){s=!0;break}if(s||performance.now()>i)return;await r()}}finally{try{e.remove()}catch{}}}async function Xn(e,t){let{width:n,height:r,scale:o=1,dpr:i=1,meta:a={},backgroundColor:s,crop:l=null}=t,c=e,u=!1,d=!1;if(l&&!Ua(e))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(Ua(e)){let k=(md(e).match(/<svg\b[^>]*>/i)||[])[0]||"",T=parseFloat((k.match(/\bwidth="([\d.]+)/i)||[])[1]),F=parseFloat((k.match(/\bheight="([\d.]+)/i)||[])[1]),D=Number.isFinite(T)&&Number.isFinite(F)&&T>0&&F>0&&Math.min(1,Pe/T,Pe/F,Math.sqrt(Vn/(T*F)))<1;if(l||D||De())try{let R=To(e);if(l&&(R=pd(R,l)),De()){let _=await No(R);R=_.svg,u=_.naturalOnly,d=/@font-face|data:image\//i.test(R)}(D||l)&&(R=fd(R)),c=Ro(R)}catch(R){if(l)throw R;c=e}}let f=new Image;f.loading="eager",f.decoding="sync",f.crossOrigin="anonymous",f.src=c,await f.decode(),De()&&await Sd(f,d);let m=f.naturalWidth,p=f.naturalHeight,h=l?m:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:m,y=l?p:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:p,g,w,v=Number.isFinite(n),b=Number.isFinite(r);if(v&&b)g=Math.max(1,n),w=Math.max(1,r);else if(v){let k=n/Math.max(1,h);g=n,w=y*k}else if(b){let k=r/Math.max(1,y);w=r,g=h*k}else g=m,w=p;g=g*o,w=w*o;let S=g*i,x=w*i,I=Math.max(S/Pe,x/Pe,Math.sqrt(S*x/Vn));I>1&&(console.warn(`[snapDOM] Output ${Math.round(S)}\xD7${Math.round(x)}px exceeds the browser canvas limit (${Pe}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),g/=I,w/=I);let C=document.createElement("canvas");C.width=g*i,C.height=w*i,C.style.width=`${g}px`,C.style.height=`${w}px`;let E=C.getContext("2d");if(i!==1&&E.scale(i,i),s&&(E.save(),E.fillStyle=s,E.fillRect(0,0,g,w),E.restore()),u&&(Math.round(g*i)!==m||Math.round(w*i)!==p)){let k=document.createElement("canvas");k.width=m,k.height=p,k.getContext("2d").drawImage(f,0,0),E.drawImage(k,0,0,g,w)}else E.drawImage(f,0,0,g,w);return C}var Pe,Vn,$n,Lt=be(()=>{"use strict";ot(),Pe=16384,Vn=16384*16384,$n=null}),_n={};Nt(_n,{rasterize:()=>Ds});async function Ds(e,t){let n=await Xn(e,t),r=await new Promise(i=>{let a=()=>i(n.toDataURL(`image/${t.format}`,t.quality));try{n.toBlob(s=>{if(!s)return a();let l=new FileReader;l.onload=()=>i(String(l.result||"")),l.onerror=a,l.readAsDataURL(s)},`image/${t.format}`,t.quality)}catch{a()}}),o=new Image;return o.src=r,await o.decode(),o.style.width=`${n.width/t.dpr}px`,o.style.height=`${n.height/t.dpr}px`,o}var On=be(()=>{"use strict";Lt()}),co={};Nt(co,{toImg:()=>Va,toSvg:()=>Va});async function Va(e,t){let{scale:n=1,width:r,height:o,meta:i={}}=t,a=Number.isFinite(r),s=Number.isFinite(o),l=Number.isFinite(n)&&n!==1||a||s;if(De()&&l)try{let{svg:u}=await No(To(e)),d=(u.match(/<svg\b[^>]*>/i)||[])[0]||"",f=parseFloat((d.match(/\bwidth="([\d.]+)/i)||[])[1]),m=parseFloat((d.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(f)||!Number.isFinite(m))throw new Error("svg without dimensions");let p=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:f,h=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:m,y,g;a&&s?(y=r,g=o):a?(y=r,g=Math.round(h*(r/Math.max(1,p)))):s?(g=o,y=Math.round(p*(o/Math.max(1,h)))):(y=Math.round(f*n),g=Math.round(m*n));let w=u.replace(/width="[^"]*"/,`width="${y}"`).replace(/height="[^"]*"/,`height="${g}"`),v=new Image;return v.decoding="sync",v.loading="eager",v.src=Ro(w),await v.decode(),v.style.width=`${y}px`,v.style.height=`${g}px`,v}catch(u){return Q(t,"safari vector toImg failed, falling back to PNG",u),Ds(e,{...t,format:"png",quality:1,meta:i})}let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=e,await c.decode(),a&&s)c.style.width=`${r}px`,c.style.height=`${o}px`;else if(a){let u=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:c.naturalWidth,d=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:c.naturalHeight,f=r/Math.max(1,u);c.style.width=`${r}px`,c.style.height=`${Math.round(d*f)}px`}else if(s){let u=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:c.naturalWidth,d=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:c.naturalHeight,f=o/Math.max(1,d);c.style.height=`${o}px`,c.style.width=`${Math.round(u*f)}px`}else{let u=Math.round(c.naturalWidth*n),d=Math.round(c.naturalHeight*n);if(c.style.width=`${u}px`,c.style.height=`${d}px`,typeof e=="string"&&e.startsWith("data:image/svg+xml"))try{let f=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${u}"`).replace(/height="[^"]*"/,`height="${d}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,c.src=e}catch(f){Q(t,"SVG width/height patch in toImg failed",f)}}return c}var za=be(()=>{"use strict";Ee(),On(),Lt()}),Ws={};Nt(Ws,{toBlob:()=>Bs});async function Bs(e,t){let n=t.type;if(n==="svg"){let o=decodeURIComponent(e.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=await Xn(e,t);return new Promise(o=>r.toBlob(i=>o(i),`image/${n}`,t.quality))}var Hs=be(()=>{"use strict";Lt()}),Us={};Nt(Us,{download:()=>Cd});async function qa(e,t){let n=new File([e],t,{type:e.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:t})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function Cd(e,t){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(t?.type||"").toLowerCase(),o=n.has(r)?r:"",i=(t?.format||o||"").toLowerCase(),a=i==="jpg"?"jpeg":i||"png",s=t?.filename||`snapdom.${a}`,l={...t||{},format:a,type:a};l.dpr=1;let c=ud();if(a==="svg"){let f=await Bs(e,{...l,type:"svg"});if(c&&await qa(f,s))return;let m=URL.createObjectURL(f),p=document.createElement("a");p.href=m,p.download=s,document.body.appendChild(p),p.click(),URL.revokeObjectURL(m),p.remove();return}let u=await Xn(e,l);if(c){let f=`image/${a}`,m=await new Promise(p=>u.toBlob(p,f,t?.quality));if(m&&await qa(m,s))return}let d=document.createElement("a");d.href=u.toDataURL(`image/${a}`,t?.quality),d.download=s,document.body.appendChild(d),d.click(),d.remove()}var xd=be(()=>{"use strict";Hs(),Lt(),ot()});Ee();Ee();ge();var uo=new WeakMap,Tt=new Map,Id=2e3,zn=0;function Pn(){zn++,Tt.size>Id&&Tt.clear()}var Ad="[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]";function eo(e){let t=e&&(e.nodeType===1?e:e.parentElement);return!!(t&&t.closest&&t.closest(Ad))}function Vs(e){for(let t of e)if(!eo(t.target)){if(t.type==="childList"){let n=!0;for(let r of t.addedNodes)if(!eo(r)){n=!1;break}if(n){for(let r of t.removedNodes)if(!eo(r)){n=!1;break}}if(n)continue}return!0}return!1}var Ga=!1;function Md(e=document.documentElement){if(Ga)return;Ga=!0;let t=n=>{Vs(n)&&Pn()};try{new MutationObserver(t).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(t).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let n=document.fonts;n&&(n.addEventListener?.("loadingdone",Pn),n.ready?.then(()=>Pn()).catch(()=>{}))}catch{}}var Ed=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function ja(e){let t=uo.get(e);if(t&&t.epoch===zn){let n=t.snapshot&&t.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function kd(e,t={}){let n={},r=t.excludeStyleProps;for(let d=0;d<e.length;d++){let f=e[d];if(Mo(f)||r&&(r instanceof RegExp&&r.test(f)||typeof r=="function"&&r(f)))continue;let m=e.getPropertyValue(f);(f==="background-image"||f==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),n[f]=m}let o=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let d of o)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}let i=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let d of i)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}if(t.embedFonts){let d=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let f of d)if(!n[f])try{let m=e.getPropertyValue(f);m&&(n[f]=m)}catch{}}try{(n["content-visibility"]||e.getPropertyValue("content-visibility"))==="hidden"&&(n["content-visibility"]="hidden")}catch{}let a=!1;{let d=e.getPropertyValue("background-image");if(d&&d!=="none"&&(a=!0),!a){let f=e.getPropertyValue("background-color");f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"&&(a=!0)}if(!a)for(let f of Ed){let m=e.getPropertyValue(f);if(m&&m!=="none"){a=!0;break}}if(!a){let f=e.getPropertyValue("background");f&&/url\s*\(/i.test(f)&&(a=!0)}}Object.defineProperty(n,"__needsBgInline",{value:a,enumerable:!1});let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,l=parseFloat(e.getPropertyValue("border-right-width")||0)||0,c=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(s===0&&l===0&&c===0&&u===0){let d=(e.getPropertyValue("border-image-source")||"").trim(),f=d&&d!=="none",m=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let p of m)delete n[p];f||(n.border="none")}return n}function Td(e){for(let t=e.firstChild;t;t=t.nextSibling){if(t.nodeType===3&&/\S/.test(t.nodeValue||""))return!0;if(t.nodeType===1){let n=J(t).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function Rd(e,t,n){try{if(typeof e.computedStyleMap=="function"){let o=e.computedStyleMap().get("width");if(o!=null)return!Ya(String(o).trim().toLowerCase())}}catch{}let r=e.style&&(e.style.width||e.style.inlineSize);return r&&!Ya(String(r).trim().toLowerCase())?!0:Ld(e,t)?n||Fd(e,t):!1}var Nd=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function Ya(e){return Nd.has(e)||e.startsWith("fit-content")}function Ld(e,t){let n=e.getBoundingClientRect().width-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)-(parseFloat(t.borderLeftWidth)||0)-(parseFloat(t.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,o=-1/0,i=null;for(let a=e.firstChild;a;a=a.nextSibling){let s;if(a.nodeType===3){if(!/\S/.test(a.nodeValue||"")||(i=i||document.createRange(),i.selectNode(a),s=i.getBoundingClientRect(),!s.width&&!s.height))continue}else if(a.nodeType===1){let l=J(a);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;s=a.getBoundingClientRect()}else continue;s.left<r&&(r=s.left),s.right>o&&(o=s.right)}return o===-1/0?!1:o-r<n-.5}function Fd(e,t){let n=e.parentElement;if(!n)return!1;let r=J(n),o=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(t.marginLeft)||0)-(parseFloat(t.marginRight)||0);return o>0?Math.abs(e.getBoundingClientRect().width-o)>.5:!1}var Za=new WeakMap;function $d(e){let t=Za.get(e);return t||(t=Object.entries(e).sort((n,r)=>n[0]<r[0]?-1:n[0]>r[0]?1:0).map(([n,r])=>`${n}:${r}`).join(";"),Za.set(e,t),t)}function _d(e,t=null,n={}){let r=uo.get(e),o=!!(n&&n.embedFonts),i=n&&n.excludeStyleProps||null;if(r&&r.epoch===zn&&r.embedFonts===o&&r.excludeStyleProps===i)return r.snapshot;let a=t||getComputedStyle(e),s=kd(a,n);return Hd(e,a,s),uo.set(e,{epoch:zn,snapshot:s,embedFonts:o,excludeStyleProps:i}),s}function Od(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:Tt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:t||{}}:{session:A.session,persist:{snapshotKeyCache:Tt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:e||t||{}}}function Pd(e,t,n){if(!(!e.style||e.style.length===0))for(let r=0;r<e.style.length;r++){let o=e.style[r],i=n.getPropertyValue(o);i&&t.style.setProperty(o,i)}}async function Ne(e,t,n,r){if(e.tagName==="STYLE")return;let o=Od(n,r),i=o.options&&o.options.cache||"auto";i!=="disabled"&&Md(document.documentElement),i==="disabled"&&!o.session.__bumpedForDisabled&&(Pn(),Tt.clear(),o.session.__bumpedForDisabled=!0);let{session:a,persist:s}=o;if(!a.styleCache.has(e)){let y=null;try{y=getComputedStyle(e)}catch{}a.styleCache.set(e,y||getComputedStyle(document.documentElement))}let l=a.styleCache.get(e);e.getAttribute?.("style")&&Pd(e,t,l);let c=l.getPropertyValue("animation-name");t&&t.style&&c&&c!=="none"&&t.style.setProperty("animation","none","important");let u=_d(e,l,o.options),d=zs(e);if(d){let y=l.getPropertyValue("min-width");(!y||y==="auto"||y==="0px")&&(u["min-width"]="0px")}let f=e.tagName?.toLowerCase()||"div",m=$d(u),p=!0;if(xs(f,(u.display||"").toLowerCase())){p=Td(e),p&&od(f,u,d)&&Rd(e,l,d)&&(p=!1),m=`${m}|${f}${p?"|c":""}${d?"|f":""}`;let y=u["text-wrap-mode"]||u["white-space"]||"";p&&y!=="nowrap"&&y!=="pre"&&(a.reconcileRisk=(a.reconcileRisk||0)+1)}let h=s.snapshotKeyCache.get(m);h===void 0&&(h=ao(u,f,p,d),s.snapshotKeyCache.set(m,h)),a.styleMap.set(t,h)}function Dd(e){return e.backgroundImage&&e.backgroundImage!=="none"||e.backgroundColor&&e.backgroundColor!=="rgba(0, 0, 0, 0)"&&e.backgroundColor!=="transparent"||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0?!0:(e.overflowBlock||e.overflowY||"visible")!=="visible"}function zs(e){let t=e.parentElement;if(!t)return!1;let n=J(t).display||"";return n.includes("flex")||n.includes("grid")}function Wd(e){for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let t=e.firstElementChild,n=e.lastElementChild;if(t&&t.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=e.firstElementChild;r;r=r.nextElementSibling){let o=J(r);if(o.display==="none")continue;let i=o.position;if(i!=="absolute"&&i!=="fixed")return!0}return!1}function Bd(e){let t=e.getBoundingClientRect().top,n=-1/0,r=null;for(let o=e.firstChild;o;o=o.nextSibling){if(o.nodeType===3){if(!/\S/.test(o.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(o);let s=r.getBoundingClientRect();(s.width||s.height)&&(n=Math.max(n,s.bottom));continue}if(o.nodeType!==1)continue;let i=J(o);if(i.display==="none")continue;let a=i.position;a==="absolute"||a==="fixed"||i.float&&i.float!=="none"||(n=Math.max(n,o.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-t}function Hd(e,t,n){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let r=e.tagName&&e.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||t.aspectRatio&&t.aspectRatio!=="none"&&t.aspectRatio!=="auto")return;let o=t.display||"";if(o.includes("flex")||o.includes("grid"))return;let i=t.position;if(i==="absolute"||i==="fixed"||i==="sticky"||t.transform!=="none"||Dd(t)||zs(e))return;let a=t.overflowX||t.overflow||"visible",s=t.overflowY||t.overflow||"visible";if(a!=="visible"||s!=="visible")return;let l=t.clip;if(l&&l!=="auto"&&l!=="rect(auto, auto, auto, auto)"||t.visibility==="hidden"||t.opacity==="0"||!Wd(e))return;let c=parseFloat(t.height),u=Bd(e);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}Zn();var qs=["fill","stroke","color","background-color","stop-color"],Ud=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function fo(e){let t=e;for(;t&&t.nodeType===1;){if(t.namespaceURI==="http://www.w3.org/2000/svg"){if(t.localName==="mask"||t.localName==="clipPath")return!1;if(Ud.has(t.localName))return!0}t=t.parentNode}return!1}var Xa=new Map;function Vd(e,t){let n=t+"::"+e.toLowerCase(),r=Xa.get(n);if(r)return r;let o=document,i=t==="http://www.w3.org/2000/svg"?o.createElementNS(t,e):o.createElement(e),a=o.createElement("div");a.setAttribute("data-snapdom-internal",""),a.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",a.appendChild(i),o.documentElement.appendChild(a);let s=getComputedStyle(i),l={};for(let c of qs)l[c]=s.getPropertyValue(c)||"";return a.remove(),Xa.set(n,l),l}function zd(e,t){if(e?.nodeType!==1||t?.nodeType!==1||fo(e))return;let n=e.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(s&&typeof s.value=="string"&&s.value.includes("var(")){r=!0;break}}}let o=null;if(r)try{o=getComputedStyle(e)}catch{}if(r){let i=e.style;if(i&&i.length){let a=new Set;for(let s=0;s<i.length;s++){let l=i[s];if(a.has(l))continue;a.add(l);let c=i.getPropertyValue(l);if(!c||!c.includes("var("))continue;let u=o&&o.getPropertyValue(l);if(u)try{t.style.setProperty(l,u.trim(),i.getPropertyPriority(l))}catch{}}}}if(r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(!s||typeof s.value!="string"||!s.value.includes("var("))continue;let l=s.name,c=o&&o.getPropertyValue(l);if(c)try{t.style.setProperty(l,c.trim())}catch{}}}if(!r){if(!o)try{o=getComputedStyle(e)}catch{o=null}if(!o)return;let i=e.namespaceURI||"html",a=Vd(e.tagName,i);for(let s of qs){let l=o.getPropertyValue(s)||"",c=a[s]||"";if(l&&l!==c)try{t.style.setProperty(s,l.trim())}catch{}}}}Ee();Ee();ge();rt();rt();function nt(e){return!!(!e||e.startsWith("data:")||e.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(e)&&e.length<200)}var Ka="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";function qd(e,t){return!e||e?.nodeType!==1?!1:e.matches?.("picture")||e.querySelector("picture")?!0:t?!!(e.matches?.(Ka)||e.querySelector(Ka)):!1}var Gd=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i;function qn(e,t){if(!e)return null;let n=0;try{n=t?t.getBoundingClientRect().width||t.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let i of e.split(",")){let a=i.trim().split(/\s+/);if(!a[0])continue;let s=a[1]||"",l=1;/^\d*\.?\d+x$/i.test(s)?l=parseFloat(s):/^\d+w$/i.test(s)&&(l=parseInt(s,10)/n),r.push({url:a[0],d:l})}if(!r.length)return null;r.sort((i,a)=>i.d-a.d);let o=window.devicePixelRatio||1;return(r.find(i=>i.d>=o)||r[r.length-1]).url}function Gs(e,t){let n=e.currentSrc||"";if(n&&!nt(n))return n;let r=t.querySelectorAll("source[srcset]"),o=null;for(let i of r){let a=i.getAttribute("srcset");if(!a||nt(a))continue;let s=i.getAttribute("type");if(s&&!Gd.test(s.trim()))continue;let l=i.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return qn(a,e)}catch{}o||(o=qn(a,e))}return o}function jd(e){let t=[e.getAttribute("data-src"),e.getAttribute("data-lazy-src"),e.getAttribute("data-original"),e.getAttribute("data-hi-res-src")];for(let r of t)if(r&&!nt(r))return r;let n=e.getAttribute("data-srcset")||e.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!nt(r))return r}return null}function Yd(e={}){let t=e.pictureResolver&&typeof e.pictureResolver=="object"?e.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:t.resolveLazySrc!==!1,silent:t.silent??!1,useProxy:typeof e.useProxy=="string"?e.useProxy:""}}async function Zd(e,t={}){if(!e||e?.nodeType!==1||t.resolvePicturePlaceholders===!1)return null;let{timeout:n,concurrency:r,resolveLazySrc:o,silent:i,useProxy:a}=Yd(t);if(!qd(e,o))return null;let s=[],l=[];async function c(f){let m=await Ce(f,{as:"dataURL",timeout:n,useProxy:a,silent:!0});return m.ok?m.data:null}async function u(f){for(let m=0;m<f.length;m+=r){let p=f.slice(m,m+r);await Promise.allSettled(p.map(h=>h()))}}let d=Array.from(e.querySelectorAll("picture"));e.matches?.("picture")&&d.unshift(e);for(let f of d){let m=f.querySelector("img");if(!m)continue;let p=m.getAttribute("src")||"";if(!nt(p))continue;let h=Gs(m,f);h&&l.push(async()=>{let y=await c(h);if(!y){i||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${h.slice(0,60)}`);return}let g=m.getAttribute("src"),w=m.getAttribute("srcset"),v=m.getAttribute("sizes"),b=[];m.src=y,m.setAttribute("src",y),m.removeAttribute("srcset"),m.removeAttribute("sizes");let S=f.querySelectorAll("source");for(let x of S)b.push({el:x,parent:x.parentElement,next:x.nextSibling}),x.remove();s.push(()=>{g!==null?m.setAttribute("src",g):m.removeAttribute("src"),w!==null&&m.setAttribute("srcset",w),v!==null&&m.setAttribute("sizes",v);for(let{el:x,parent:I,next:C}of b)I&&I.insertBefore(x,C)})})}if(o){let f=Array.from(e.querySelectorAll("img"));e.localName==="img"&&f.unshift(e);for(let m of f){if(m.closest("picture")&&nt(m.getAttribute("src")||""))continue;let p=m.getAttribute("src")||"",h=jd(m);h&&nt(p)&&l.push(async()=>{let y=await c(h);if(!y)return;let g=m.getAttribute("src");m.src=y,m.setAttribute("src",y),m.removeAttribute("srcset"),m.removeAttribute("sizes"),s.push(()=>{g!==null?m.setAttribute("src",g):m.removeAttribute("src")})})}}return l.length===0?null:(await u(l),async function(){for(let f of s)try{f()}catch{}})}function to(e,t,n){return n?Promise.all(e.map(r=>new Promise(o=>t(r,o)))):Promise.all(e.map(r=>new Promise(o=>{function i(){Fn(a=>{!(a&&typeof a.timeRemaining=="function")||a.timeRemaining()>0?t(r,o):i()},{fast:n})}i()})))}function Xd(e,t){if(e=e.trim(),!e)return e;let n=t?`[data-sd-slotted~="${t}"]`:"[data-sd-slotted]";return e.endsWith(":not([data-sd-slotted])")||e.endsWith(`:not(${n})`)?e:`${e}:not(${n})`}function Kd(e,t,n=!0,r){return e.split(",").map(o=>o.trim()).filter(Boolean).map(o=>{if(o.startsWith(":where(")||o.startsWith("@"))return o;let i=n?Xd(o,r):o;return`:where(${t} ${i})`}).join(", ")}function Jd(e,t,n){return e?(e=e.replace(/:host\(([^)]+)\)/g,(r,o)=>`:where(${t}:is(${o.trim()}))`),e=e.replace(/:host\b/g,`:where(${t})`),e=e.replace(/:host-context\(([^)]+)\)/g,(r,o)=>`:where(:where(${o.trim()}) ${t})`),e=e.replace(/::slotted\(([^)]+)\)/g,(r,o)=>`:where(${t} ${o.trim()})`),e=e.replace(/(^|})(\s*)([^@}{]+){/g,(r,o,i,a)=>{let s=Kd(a,t,!0,n);return`${o}${i}${s}{`}),e):""}function Qd(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}function ef(e){let t="";try{e.querySelectorAll("style").forEach(r=>{t+=(r.textContent||"")+`
|
|
71
|
+
or you can use record.mirror to access the mirror instance during recording.`,la={map:{},getId(){return console.error(dt),-1},getNode(){return console.error(dt),null},removeNodeFromMap(){console.error(dt)},has(){return console.error(dt),!1},reset(){console.error(dt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(la=new Proxy(la,{get(e,t,n){return t==="map"&&console.error(dt),Reflect.get(e,t,n)}}));function ft(e,t,n={}){let r=null,o=0;return function(...i){let a=Date.now();!o&&n.leading===!1&&(o=a);let s=t-(a-o),l=this;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(l,i)):!r&&n.trailing!==!1&&(r=setTimeout(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(l,i)},s))}}function et(e,t,n,r,o=window){let i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(a){setTimeout(()=>{n.set.call(this,a)},0),i&&i.set&&i.set.call(this,a)}}),()=>et(e,t,i||{},!0)}function Ae(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}function sn(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function ln(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ae(e,t,n,r){if(!e)return!1;let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(!o)return!1;if(typeof t=="string"){if(o.classList.contains(t)||r&&o.closest("."+t)!==null)return!0}else if(vt(o,t,r))return!0;return!!(n&&(e.matches(n)||r&&o.closest(n)!==null))}function ca(e,t){return t.getId(e)!==-1}function cn(e,t){return t.getId(e)===Je}function Dr(e,t){if(Qe(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Dr(e.parentNode,t):!0:!0}function Wr(e){return!!e.changedTouches}function ua(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}function un(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function dn(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function fn(e){return!!e?.shadowRoot}var an=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var n;return(n=this.styleIDMap.get(t))!==null&&n!==void 0?n:-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};var q=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(q||{}),V=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e))(V||{}),pn=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(pn||{}),_e=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(_e||{});function da(e){return"__ln"in e}var Br=class{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){let n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&da(t.previousSibling)){let r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&da(t.nextSibling)&&t.nextSibling.__ln.previous){let r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;this.length++}removeNode(t){let n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next&&(n.next.previous=n.previous)):(this.head=n.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}},fa=(e,t)=>`${e}@${t}`,mn=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let t=[],n=new Br,r=s=>{let l=s,c=Je;for(;c===Je;)l=l&&l.nextSibling,c=l&&this.mirror.getId(l);return c},o=s=>{var l,c,u,d;let f=null;((c=(l=s.getRootNode)===null||l===void 0?void 0:l.call(s))===null||c===void 0?void 0:c.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&s.getRootNode().host&&(f=s.getRootNode().host);let m=f;for(;((d=(u=m?.getRootNode)===null||u===void 0?void 0:u.call(m))===null||d===void 0?void 0:d.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&m.getRootNode().host;)m=m.getRootNode().host;let p=!this.doc.contains(s)&&(!m||!this.doc.contains(m));if(!s.parentNode||p)return;let h=Qe(s.parentNode)?this.mirror.getId(f):this.mirror.getId(s.parentNode),y=r(s);if(h===-1||y===-1)return n.addNode(s);let g=Xe(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:w=>{un(w,this.mirror)&&this.iframeManager.addIframe(w),dn(w,this.mirror)&&this.stylesheetManager.trackLinkElement(w),fn(s)&&this.shadowDomManager.addShadowRoot(s.shadowRoot,this.doc)},onIframeLoad:(w,v)=>{this.iframeManager.attachIframe(w,v),this.shadowDomManager.observeAttachShadow(w)},onStylesheetLoad:(w,v)=>{this.stylesheetManager.attachLinkElement(w,v)}});g&&t.push({parentId:h,nextId:y,node:g})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let s of Array.from(this.movedSet.values()))pa(this.removes,s,this.mirror)&&!this.movedSet.has(s.parentNode)||o(s);for(let s of Array.from(this.addedSet.values()))!ma(this.droppedSet,s)&&!pa(this.removes,s,this.mirror)||ma(this.movedSet,s)?o(s):this.droppedSet.add(s);let i=null;for(;n.length;){let s=null;if(i){let l=this.mirror.getId(i.value.parentNode),c=r(i.value);l!==-1&&c!==-1&&(s=i)}if(!s)for(let l=n.length-1;l>=0;l--){let c=n.get(l);if(c){let u=this.mirror.getId(c.value.parentNode);if(r(c.value)===-1)continue;if(u!==-1){s=c;break}else{let f=c.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let m=f.parentNode.host;if(this.mirror.getId(m)!==-1){s=c;break}}}}}if(!s){for(;n.head;)n.removeNode(n.head.value);break}i=s.previous,n.removeNode(s.value),o(s.value)}let a={texts:this.texts.map(s=>({id:this.mirror.getId(s.node),value:s.value})).filter(s=>this.mirror.has(s.id)),attributes:this.attributes.map(s=>({id:this.mirror.getId(s.node),attributes:s.attributes})).filter(s=>this.mirror.has(s.id)),removes:this.removes,adds:t};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.adds.length||(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(a))},this.processMutation=t=>{if(!cn(t.target,this.mirror))switch(t.type){case"characterData":{let n=t.target.textContent;!ae(t.target,this.blockClass,this.blockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Pr(t.target,this.maskTextClass,this.maskTextSelector)&&n?this.maskTextFn?this.maskTextFn(n):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{let n=t.target,r=t.target.getAttribute(t.attributeName);if(t.attributeName==="value"&&(r=St({maskInputOptions:this.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:r,maskInputFn:this.maskInputFn})),ae(t.target,this.blockClass,this.blockSelector,!1)||r===t.oldValue)return;let o=this.attributes.find(i=>i.node===t.target);if(n.tagName==="IFRAME"&&t.attributeName==="src"&&!this.keepIframeSrcFn(r))if(!n.contentDocument)t.attributeName="rr_src";else return;if(o||(o={node:t.target,attributes:{}},this.attributes.push(o)),t.attributeName==="style"){let i=this.doc.createElement("span");t.oldValue&&i.setAttribute("style",t.oldValue),(o.attributes.style===void 0||o.attributes.style===null)&&(o.attributes.style={});let a=o.attributes.style;for(let s of Array.from(n.style)){let l=n.style.getPropertyValue(s),c=n.style.getPropertyPriority(s);(l!==i.style.getPropertyValue(s)||c!==i.style.getPropertyPriority(s))&&(c===""?a[s]=l:a[s]=[l,c])}for(let s of Array.from(i.style))n.style.getPropertyValue(s)===""&&(a[s]=!1)}else o.attributes[t.attributeName]=Or(this.doc,n.tagName,t.attributeName,r);break}case"childList":{if(ae(t.target,this.blockClass,this.blockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{let r=this.mirror.getId(n),o=Qe(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);ae(t.target,this.blockClass,this.blockSelector,!1)||cn(n,this.mirror)||!ca(n,this.mirror)||(this.addedSet.has(n)?(Hr(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||Dr(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[fa(r,o)]?Hr(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Qe(t.target)&&Ke(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(this.mirror.hasNode(t)){if(cn(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[fa(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);ae(t,this.blockClass,this.blockSelector,!1)||t.childNodes.forEach(r=>this.genAdds(r))}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager"].forEach(n=>{this[n]=t[n]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function Hr(e,t){e.delete(t),t.childNodes.forEach(n=>Hr(e,n))}function pa(e,t,n){return e.length===0?!1:ha(e,t,n)}function ha(e,t,n){let{parentNode:r}=t;if(!r)return!1;let o=n.getId(r);return e.some(i=>i.id===o)?!0:ha(e,r,n)}function ma(e,t){return e.size===0?!1:ga(e,t)}function ga(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:ga(e,n):!1}var Ve=[],wa=typeof CSSGroupingRule<"u",va=typeof CSSMediaRule<"u",Sa=typeof CSSSupportsRule<"u",Ca=typeof CSSConditionRule<"u";function Ct(e){try{if("composedPath"in e){let t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch{return e.target}}function Ur(e,t){var n,r;let o=new mn;Ve.push(o),o.init(e);let i=window.MutationObserver||window.__rrMutationObserver,a=(r=(n=window?.Zone)===null||n===void 0?void 0:n.__symbol__)===null||r===void 0?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);let s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function Mu({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let o=typeof t.mousemove=="number"?t.mousemove:50,i=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500,a=[],s,l=ft(d=>{let f=Date.now()-s;e(a.map(m=>(m.timeOffset-=f,m)),d),a=[],s=null},i),c=ft(d=>{let f=Ct(d),{clientX:m,clientY:p}=Wr(d)?d.changedTouches[0]:d;s||(s=Date.now()),a.push({x:m,y:p,id:r.getId(f),timeOffset:Date.now()-s}),l(typeof DragEvent<"u"&&d instanceof DragEvent?V.Drag:d instanceof MouseEvent?V.MouseMove:V.TouchMove)},o,{trailing:!1}),u=[pe("mousemove",c,n),pe("touchmove",c,n),pe("drag",c,n)];return()=>{u.forEach(d=>d())}}function ku({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){if(i.mouseInteraction===!1)return()=>{};let a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,s=[],l=c=>u=>{let d=Ct(u);if(ae(d,r,o,!0))return;let f=Wr(u)?u.changedTouches[0]:u;if(!f)return;let m=n.getId(d),{clientX:p,clientY:h}=f;e({type:pn[c],id:m,x:p,y:h})};return Object.keys(pn).filter(c=>Number.isNaN(Number(c))&&!c.endsWith("_Departed")&&a[c]!==!1).forEach(c=>{let u=c.toLowerCase(),d=l(c);s.push(pe(u,d,t))}),()=>{s.forEach(c=>c())}}function Vr({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,sampling:i}){let a=ft(s=>{let l=Ct(s);if(!l||ae(l,r,o,!0))return;let c=n.getId(l);if(l===t){let u=t.scrollingElement||t.documentElement;e({id:c,x:u.scrollLeft,y:u.scrollTop})}else e({id:c,x:l.scrollLeft,y:l.scrollTop})},i.scroll||100);return pe("scroll",a,t)}function Tu({viewportResizeCb:e}){let t=-1,n=-1,r=ft(()=>{let o=sn(),i=ln();(t!==o||n!==i)&&(e({width:Number(i),height:Number(o)}),t=o,n=i)},200);return pe("resize",r,window)}function ya(e,t){let n=Object.assign({},e);return t||delete n.userTriggered,n}var Ru=["INPUT","TEXTAREA","SELECT"],ba=new WeakMap;function Nu({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,ignoreClass:i,maskInputOptions:a,maskInputFn:s,sampling:l,userTriggeredOnInput:c}){function u(g){let w=Ct(g),v=g.isTrusted;if(w&&w.tagName==="OPTION"&&(w=w.parentElement),!w||!w.tagName||Ru.indexOf(w.tagName)<0||ae(w,r,o,!0))return;let b=w.type;if(w.classList.contains(i))return;let S=w.value,x=!1;b==="radio"||b==="checkbox"?x=w.checked:(a[w.tagName.toLowerCase()]||a[b])&&(S=St({maskInputOptions:a,tagName:w.tagName,type:b,value:S,maskInputFn:s})),d(w,ya({text:S,isChecked:x,userTriggered:v},c));let I=w.name;b==="radio"&&I&&x&&t.querySelectorAll(`input[type="radio"][name="${I}"]`).forEach(C=>{C!==w&&d(C,ya({text:C.value,isChecked:!x,userTriggered:!1},c))})}function d(g,w){let v=ba.get(g);if(!v||v.text!==w.text||v.isChecked!==w.isChecked){ba.set(g,w);let b=n.getId(g);e(Object.assign(Object.assign({},w),{id:b}))}}let m=(l.input==="last"?["change"]:["input","change"]).map(g=>pe(g,u,t)),p=t.defaultView;if(!p)return()=>{m.forEach(g=>g())};let h=p.Object.getOwnPropertyDescriptor(p.HTMLInputElement.prototype,"value"),y=[[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 h&&h.set&&m.push(...y.map(g=>et(g[0],g[1],{set(){u({target:this})}},!1,p))),()=>{m.forEach(g=>g())}}function hn(e){let t=[];function n(r,o){if(wa&&r.parentRule instanceof CSSGroupingRule||va&&r.parentRule instanceof CSSMediaRule||Sa&&r.parentRule instanceof CSSSupportsRule||Ca&&r.parentRule instanceof CSSConditionRule){let a=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(a)}else if(r.parentStyleSheet){let a=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(a)}return o}return n(e,t)}function Ue(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function Lu({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){let o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=function(u,d){let{id:f,styleId:m}=Ue(this,t,n.styleMirror);return(f&&f!==-1||m&&m!==-1)&&e({id:f,styleId:m,adds:[{rule:u,index:d}]}),o.apply(this,[u,d])};let i=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,removes:[{index:u}]}),i.apply(this,[u])};let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replace:u}),a.apply(this,[u])});let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=function(u){let{id:d,styleId:f}=Ue(this,t,n.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,replaceSync:u}),s.apply(this,[u])});let l={};wa?l.CSSGroupingRule=r.CSSGroupingRule:(va&&(l.CSSMediaRule=r.CSSMediaRule),Ca&&(l.CSSConditionRule=r.CSSConditionRule),Sa&&(l.CSSSupportsRule=r.CSSSupportsRule));let c={};return Object.entries(l).forEach(([u,d])=>{c[u]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=function(f,m){let{id:p,styleId:h}=Ue(this.parentStyleSheet,t,n.styleMirror);return(p&&p!==-1||h&&h!==-1)&&e({id:p,styleId:h,adds:[{rule:f,index:[...hn(this),m||0]}]}),c[u].insertRule.apply(this,[f,m])},d.prototype.deleteRule=function(f){let{id:m,styleId:p}=Ue(this.parentStyleSheet,t,n.styleMirror);return(m&&m!==-1||p&&p!==-1)&&e({id:m,styleId:p,removes:[{index:[...hn(this),f]}]}),c[u].deleteRule.apply(this,[f])}}),()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=i,a&&(r.CSSStyleSheet.prototype.replace=a),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(l).forEach(([u,d])=>{d.prototype.insertRule=c[u].insertRule,d.prototype.deleteRule=c[u].deleteRule})}}function zr({mirror:e,stylesheetManager:t},n){var r,o,i;let a=null;n.nodeName==="#document"?a=e.getId(n):a=e.getId(n.host);let s=n.nodeName==="#document"?(r=n.defaultView)===null||r===void 0?void 0:r.Document:(i=(o=n.ownerDocument)===null||o===void 0?void 0:o.defaultView)===null||i===void 0?void 0:i.ShadowRoot,l=Object.getOwnPropertyDescriptor(s?.prototype,"adoptedStyleSheets");return a===null||a===-1||!s||!l?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var c;return(c=l.get)===null||c===void 0?void 0:c.call(this)},set(c){var u;let d=(u=l.set)===null||u===void 0?void 0:u.call(this,c);if(a!==null&&a!==-1)try{t.adoptStyleSheets(c,a)}catch{}return d}}),()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})}function Fu({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){let i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(s,l,c){var u;if(n.has(s))return i.apply(this,[s,l,c]);let{id:d,styleId:f}=Ue((u=this.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:s,value:l,priority:c},index:hn(this.parentRule)}),i.apply(this,[s,l,c])};let a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(s){var l;if(n.has(s))return a.apply(this,[s]);let{id:c,styleId:u}=Ue((l=this.parentRule)===null||l===void 0?void 0:l.parentStyleSheet,t,r.styleMirror);return(c&&c!==-1||u&&u!==-1)&&e({id:c,styleId:u,remove:{property:s},index:hn(this.parentRule)}),a.apply(this,[s])},()=>{o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}function $u({mediaInteractionCb:e,blockClass:t,blockSelector:n,mirror:r,sampling:o}){let i=s=>ft(l=>{let c=Ct(l);if(!c||ae(c,t,n,!0))return;let{currentTime:u,volume:d,muted:f,playbackRate:m}=c;e({type:s,id:r.getId(c),currentTime:u,volume:d,muted:f,playbackRate:m})},o.media||500),a=[pe("play",i(0)),pe("pause",i(1)),pe("seeked",i(2)),pe("volumechange",i(3)),pe("ratechange",i(4))];return()=>{a.forEach(s=>s())}}function _u({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],o=new WeakMap,i=n.FontFace;n.FontFace=function(l,c,u){let d=new i(l,c,u);return o.set(d,{family:l,buffer:typeof c!="string",descriptors:u,fontSource:typeof c=="string"?c:JSON.stringify(Array.from(new Uint8Array(c)))}),d};let a=Ae(t.fonts,"add",function(s){return function(l){return setTimeout(()=>{let c=o.get(l);c&&(e(c),o.delete(l))},0),s.apply(this,[l])}});return r.push(()=>{n.FontFace=i}),r.push(a),()=>{r.forEach(s=>s())}}function Ou(e){let{doc:t,mirror:n,blockClass:r,blockSelector:o,selectionCb:i}=e,a=!0,s=()=>{let l=t.getSelection();if(!l||a&&l?.isCollapsed)return;a=l.isCollapsed||!1;let c=[],u=l.rangeCount||0;for(let d=0;d<u;d++){let f=l.getRangeAt(d),{startContainer:m,startOffset:p,endContainer:h,endOffset:y}=f;ae(m,r,o,!0)||ae(h,r,o,!0)||c.push({start:n.getId(m),startOffset:p,end:n.getId(h),endOffset:y})}i({ranges:c})};return s(),pe("selectionchange",s)}function Pu(e,t){let{mutationCb:n,mousemoveCb:r,mouseInteractionCb:o,scrollCb:i,viewportResizeCb:a,inputCb:s,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:d,fontCb:f,selectionCb:m}=e;e.mutationCb=(...p)=>{t.mutation&&t.mutation(...p),n(...p)},e.mousemoveCb=(...p)=>{t.mousemove&&t.mousemove(...p),r(...p)},e.mouseInteractionCb=(...p)=>{t.mouseInteraction&&t.mouseInteraction(...p),o(...p)},e.scrollCb=(...p)=>{t.scroll&&t.scroll(...p),i(...p)},e.viewportResizeCb=(...p)=>{t.viewportResize&&t.viewportResize(...p),a(...p)},e.inputCb=(...p)=>{t.input&&t.input(...p),s(...p)},e.mediaInteractionCb=(...p)=>{t.mediaInteaction&&t.mediaInteaction(...p),l(...p)},e.styleSheetRuleCb=(...p)=>{t.styleSheetRule&&t.styleSheetRule(...p),c(...p)},e.styleDeclarationCb=(...p)=>{t.styleDeclaration&&t.styleDeclaration(...p),u(...p)},e.canvasMutationCb=(...p)=>{t.canvasMutation&&t.canvasMutation(...p),d(...p)},e.fontCb=(...p)=>{t.font&&t.font(...p),f(...p)},e.selectionCb=(...p)=>{t.selection&&t.selection(...p),m(...p)}}function xa(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};Pu(e,t);let r=Ur(e,e.doc),o=Mu(e),i=ku(e),a=Vr(e),s=Tu(e),l=Nu(e),c=$u(e),u=Lu(e,{win:n}),d=zr(e,e.doc),f=Fu(e,{win:n}),m=e.collectFonts?_u(e):()=>{},p=Ou(e),h=[];for(let y of e.plugins)h.push(y.observer(y.callback,n,y.options));return()=>{Ve.forEach(y=>y.reset()),r.disconnect(),o(),i(),a(),s(),l(),c(),u(),d(),f(),m(),p(),h.forEach(y=>y())}}var xt=class{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){let i=r||this.getIdToRemoteIdMap(t),a=o||this.getRemoteIdToIdMap(t),s=i.get(n);return s||(s=this.generateIdFn(),i.set(n,s),a.set(s,n)),s}getIds(t,n){let r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(i=>this.getId(t,i,r,o))}getRemoteId(t,n,r){let o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;let i=o.get(n);return i||-1}getRemoteIds(t,n){let r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}};var gn=class{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new xt($r),this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new xt(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){var r;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(r=this.loadListener)===null||r===void 0||r.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){if(t.data.type==="rrweb"){if(!t.source)return;let r=this.crossOriginIframeMap.get(t.source);if(!r)return;let o=this.transformCrossOriginEvent(r,t.data.event);o&&this.wrappedEmit(o,t.data.isCheckout)}}transformCrossOriginEvent(t,n){var r;switch(n.type){case q.FullSnapshot:return this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t),{timestamp:n.timestamp,type:q.IncrementalSnapshot,data:{source:V.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}};case q.Meta:case q.Load:case q.DomContentLoaded:return!1;case q.Plugin:return n;case q.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case q.IncrementalSnapshot:switch(n.data.source){case V.Mutation:return n.data.adds.forEach(o=>{this.replaceIds(o,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(o.node,t)}),n.data.removes.forEach(o=>{this.replaceIds(o,t,["parentId","id"])}),n.data.attributes.forEach(o=>{this.replaceIds(o,t,["id"])}),n.data.texts.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case V.Drag:case V.TouchMove:case V.MouseMove:return n.data.positions.forEach(o=>{this.replaceIds(o,t,["id"])}),n;case V.ViewportResize:return!1;case V.MediaInteraction:case V.MouseInteraction:case V.Scroll:case V.CanvasMutation:case V.Input:return this.replaceIds(n.data,t,["id"]),n;case V.StyleSheetRule:case V.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case V.Font:return n;case V.Selection:return n.data.ranges.forEach(o=>{this.replaceIds(o,t,["start","end"])}),n;case V.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),(r=n.data.styles)===null||r===void 0||r.forEach(o=>{this.replaceStyleIds(o,t,["styleId"])}),n}}}replace(t,n,r,o){for(let i of o)!Array.isArray(n[i])&&typeof n[i]!="number"||(Array.isArray(n[i])?n[i]=t.getIds(r,n[i]):n[i]=t.getId(r,n[i]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}};var yn=class{constructor(t){this.shadowDoms=new WeakSet,this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;let n=this;this.restorePatches.push(Ae(Element.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,this.ownerDocument),i}}))}addShadowRoot(t,n){Ke(t)&&(this.shadowDoms.has(t)||(this.shadowDoms.add(t),Ur(Object.assign(Object.assign({},this.bypassOptions),{doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),Vr(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),zr({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t)},0)))}observeAttachShadow(t){if(t.contentWindow){let n=this;this.restorePatches.push(Ae(t.contentWindow.HTMLElement.prototype,"attachShadow",function(r){return function(o){let i=r.call(this,o);return this.shadowRoot&&n.addShadowRoot(this.shadowRoot,t.contentDocument),i}}))}}reset(){this.restorePatches.forEach(t=>t()),this.shadowDoms=new WeakSet}};function Ia(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Aa(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}var pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Du=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(It=0;It<pt.length;It++)Du[pt.charCodeAt(It)]=It;var It,Ea=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=pt[t[n]>>2],o+=pt[(t[n]&3)<<4|t[n+1]>>4],o+=pt[(t[n+1]&15)<<2|t[n+2]>>6],o+=pt[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};var Ma=new Map;function Wu(e,t){let n=Ma.get(e);return n||(n=new Map,Ma.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var Gr=(e,t,n)=>{if(!e||!(ka(e,t)||typeof e=="object"))return;let r=e.constructor.name,o=Wu(n,r),i=o.indexOf(e);return i===-1&&(i=o.length,o.push(e)),i};function bn(e,t,n){if(e instanceof Array)return e.map(r=>bn(r,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){let r=e.constructor.name,o=Ea(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[bn(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){let r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[bn(e.data,t,n),e.width,e.height]};if(ka(e,t)||typeof e=="object"){let r=e.constructor.name,o=Gr(e,t,n);return{rr_type:r,index:o}}}}return e}var wn=(e,t,n)=>[...e].map(r=>bn(r,t,n)),ka=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function Ta(e,t,n,r){let o=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;let s=Ae(t.CanvasRenderingContext2D.prototype,a,function(l){return function(...c){return ae(this.canvas,n,r,!0)||setTimeout(()=>{let u=wn([...c],t,this);e(this.canvas,{type:_e["2D"],property:a,args:u})},0),l.apply(this,c)}});o.push(s)}catch{let l=et(t.CanvasRenderingContext2D.prototype,a,{set(c){e(this.canvas,{type:_e["2D"],property:a,args:[c],setter:!0})}});o.push(l)}return()=>{o.forEach(a=>a())}}function qr(e,t,n){let r=[];try{let o=Ae(e.HTMLCanvasElement.prototype,"getContext",function(i){return function(a,...s){return ae(this,t,n,!0)||"__context"in this||(this.__context=a),i.apply(this,[a,...s])}});r.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{r.forEach(o=>o())}}function Ra(e,t,n,r,o,i,a){let s=[],l=Object.getOwnPropertyNames(e);for(let c of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(c))try{if(typeof e[c]!="function")continue;let u=Ae(e,c,function(d){return function(...f){let m=d.apply(this,f);if(Gr(m,a,this),!ae(this.canvas,r,o,!0)){let p=wn([...f],a,this),h={type:t,property:c,args:p};n(this.canvas,h)}return m}});s.push(u)}catch{let d=et(e,c,{set(f){n(this.canvas,{type:t,property:c,args:[f],setter:!0})}});s.push(d)}return s}function Na(e,t,n,r,o){let i=[];return i.push(...Ra(t.WebGLRenderingContext.prototype,_e.WebGL,e,n,r,o,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Ra(t.WebGL2RenderingContext.prototype,_e.WebGL2,e,n,r,o,t)),()=>{i.forEach(a=>a())}}var jr=null;try{La=typeof module<"u"&&typeof module.require=="function"&&module.require("worker_threads")||typeof __non_webpack_require__=="function"&&__non_webpack_require__("worker_threads")||typeof ar=="function"&&ar("worker_threads"),jr=La.Worker}catch{}var La;function Bu(e,t){return Buffer.from(e,"base64").toString(t?"utf16":"utf8")}function Fa(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=Bu(e,o),a=i.indexOf(`
|
|
72
|
+
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:"");return function(c){return new jr(s,Object.assign({},c,{eval:!0}))}}function Hu(e,t){var n=atob(e);if(t){for(var r=new Uint8Array(n.length),o=0,i=n.length;o<i;++o)r[o]=n.charCodeAt(o);return String.fromCharCode.apply(null,new Uint16Array(r.buffer))}return n}function Uu(e,t,n){var r=t===void 0?null:t,o=n===void 0?!1:n,i=Hu(e,o),a=i.indexOf(`
|
|
73
|
+
`,10)+1,s=i.substring(a)+(r?"//# sourceMappingURL="+r:""),l=new Blob([s],{type:"application/javascript"});return URL.createObjectURL(l)}function $a(e,t,n){var r;return function(i){return r=r||Uu(e,t,n),new Worker(r,i)}}var Vu=Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]";function _a(){return Vu}function Oa(e,t,n){return _a()?Fa(e,t,n):$a(e,t,n)}var Pa=Oa("Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBTT0ZUV0FSRSBJTkNMVURJTkcgQUxMIElNUExJRUQgV0FSUkFOVElFUyBPRiBNRVJDSEFOVEFCSUxJVFkNCiAgICBBTkQgRklUTkVTUy4gSU4gTk8gRVZFTlQgU0hBTEwgVEhFIEFVVEhPUiBCRSBMSUFCTEUgRk9SIEFOWSBTUEVDSUFMLCBESVJFQ1QsDQogICAgSU5ESVJFQ1QsIE9SIENPTlNFUVVFTlRJQUwgREFNQUdFUyBPUiBBTlkgREFNQUdFUyBXSEFUU09FVkVSIFJFU1VMVElORyBGUk9NDQogICAgTE9TUyBPRiBVU0UsIERBVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTiBBQ1RJT04gT0YgQ09OVFJBQ1QsIE5FR0xJR0VOQ0UgT1INCiAgICBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SDQogICAgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4NCiAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLw0KDQogICAgZnVuY3Rpb24gX19hd2FpdGVyKHRoaXNBcmcsIF9hcmd1bWVudHMsIFAsIGdlbmVyYXRvcikgew0KICAgICAgICBmdW5jdGlvbiBhZG9wdCh2YWx1ZSkgeyByZXR1cm4gdmFsdWUgaW5zdGFuY2VvZiBQID8gdmFsdWUgOiBuZXcgUChmdW5jdGlvbiAocmVzb2x2ZSkgeyByZXNvbHZlKHZhbHVlKTsgfSk7IH0NCiAgICAgICAgcmV0dXJuIG5ldyAoUCB8fCAoUCA9IFByb21pc2UpKShmdW5jdGlvbiAocmVzb2x2ZSwgcmVqZWN0KSB7DQogICAgICAgICAgICBmdW5jdGlvbiBmdWxmaWxsZWQodmFsdWUpIHsgdHJ5IHsgc3RlcChnZW5lcmF0b3IubmV4dCh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiByZWplY3RlZCh2YWx1ZSkgeyB0cnkgeyBzdGVwKGdlbmVyYXRvclsidGhyb3ciXSh2YWx1ZSkpOyB9IGNhdGNoIChlKSB7IHJlamVjdChlKTsgfSB9DQogICAgICAgICAgICBmdW5jdGlvbiBzdGVwKHJlc3VsdCkgeyByZXN1bHQuZG9uZSA/IHJlc29sdmUocmVzdWx0LnZhbHVlKSA6IGFkb3B0KHJlc3VsdC52YWx1ZSkudGhlbihmdWxmaWxsZWQsIHJlamVjdGVkKTsgfQ0KICAgICAgICAgICAgc3RlcCgoZ2VuZXJhdG9yID0gZ2VuZXJhdG9yLmFwcGx5KHRoaXNBcmcsIF9hcmd1bWVudHMgfHwgW10pKS5uZXh0KCkpOw0KICAgICAgICB9KTsNCiAgICB9CgogICAgLyoKICAgICAqIGJhc2U2NC1hcnJheWJ1ZmZlciAxLjAuMSA8aHR0cHM6Ly9naXRodWIuY29tL25pa2xhc3ZoL2Jhc2U2NC1hcnJheWJ1ZmZlcj4KICAgICAqIENvcHlyaWdodCAoYykgMjAyMSBOaWtsYXMgdm9uIEhlcnR6ZW4gPGh0dHBzOi8vaGVydHplbi5jb20+CiAgICAgKiBSZWxlYXNlZCB1bmRlciBNSVQgTGljZW5zZQogICAgICovCiAgICB2YXIgY2hhcnMgPSAnQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyc7CiAgICAvLyBVc2UgYSBsb29rdXAgdGFibGUgdG8gZmluZCB0aGUgaW5kZXguCiAgICB2YXIgbG9va3VwID0gdHlwZW9mIFVpbnQ4QXJyYXkgPT09ICd1bmRlZmluZWQnID8gW10gOiBuZXcgVWludDhBcnJheSgyNTYpOwogICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjaGFycy5sZW5ndGg7IGkrKykgewogICAgICAgIGxvb2t1cFtjaGFycy5jaGFyQ29kZUF0KGkpXSA9IGk7CiAgICB9CiAgICB2YXIgZW5jb2RlID0gZnVuY3Rpb24gKGFycmF5YnVmZmVyKSB7CiAgICAgICAgdmFyIGJ5dGVzID0gbmV3IFVpbnQ4QXJyYXkoYXJyYXlidWZmZXIpLCBpLCBsZW4gPSBieXRlcy5sZW5ndGgsIGJhc2U2NCA9ICcnOwogICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gMykgewogICAgICAgICAgICBiYXNlNjQgKz0gY2hhcnNbYnl0ZXNbaV0gPj4gMl07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1soKGJ5dGVzW2ldICYgMykgPDwgNCkgfCAoYnl0ZXNbaSArIDFdID4+IDQpXTsKICAgICAgICAgICAgYmFzZTY0ICs9IGNoYXJzWygoYnl0ZXNbaSArIDFdICYgMTUpIDw8IDIpIHwgKGJ5dGVzW2kgKyAyXSA+PiA2KV07CiAgICAgICAgICAgIGJhc2U2NCArPSBjaGFyc1tieXRlc1tpICsgMl0gJiA2M107CiAgICAgICAgfQogICAgICAgIGlmIChsZW4gJSAzID09PSAyKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDEpICsgJz0nOwogICAgICAgIH0KICAgICAgICBlbHNlIGlmIChsZW4gJSAzID09PSAxKSB7CiAgICAgICAgICAgIGJhc2U2NCA9IGJhc2U2NC5zdWJzdHJpbmcoMCwgYmFzZTY0Lmxlbmd0aCAtIDIpICsgJz09JzsKICAgICAgICB9CiAgICAgICAgcmV0dXJuIGJhc2U2NDsKICAgIH07CgogICAgY29uc3QgbGFzdEJsb2JNYXAgPSBuZXcgTWFwKCk7DQogICAgY29uc3QgdHJhbnNwYXJlbnRCbG9iTWFwID0gbmV3IE1hcCgpOw0KICAgIGZ1bmN0aW9uIGdldFRyYW5zcGFyZW50QmxvYkZvcih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rpb24gKGUpIHsNCiAgICAgICAgcmV0dXJuIF9fYXdhaXRlcih0aGlzLCB2b2lkIDAsIHZvaWQgMCwgZnVuY3Rpb24qICgpIHsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgY29uc3QgeyBpZCwgYml0bWFwLCB3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucyB9ID0gZS5kYXRhOw0KICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zcGFyZW50QmFzZTY0ID0gZ2V0VHJhbnNwYXJlbnRCbG9iRm9yKHdpZHRoLCBoZWlnaHQsIGRhdGFVUkxPcHRpb25zKTsNCiAgICAgICAgICAgICAgICBjb25zdCBvZmZzY3JlZW4gPSBuZXcgT2Zmc2NyZWVuQ2FudmFzKHdpZHRoLCBoZWlnaHQpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGN0eCA9IG9mZnNjcmVlbi5nZXRDb250ZXh0KCcyZCcpOw0KICAgICAgICAgICAgICAgIGN0eC5kcmF3SW1hZ2UoYml0bWFwLCAwLCAwKTsNCiAgICAgICAgICAgICAgICBiaXRtYXAuY2xvc2UoKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IHR5cGUgPSBibG9iLnR5cGU7DQogICAgICAgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=",null,!1);var vn=class{constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(l,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(l)||this.pendingCanvasMutations.set(l,[]),this.pendingCanvasMutations.get(l).push(c)};let{sampling:n="all",win:r,blockClass:o,blockSelector:i,recordCanvas:a,dataURLOptions:s}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&n==="all"&&this.initCanvasMutationObserver(r,o,i),a&&typeof n=="number"&&this.initCanvasFPSObserver(n,r,o,i,{dataURLOptions:s})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(t,n,r,o,i){let a=qr(n,r,o),s=new Map,l=new Pa;l.onmessage=p=>{let{id:h}=p.data;if(s.set(h,!1),!("base64"in p.data))return;let{base64:y,type:g,width:w,height:v}=p.data;this.mutationCb({id:h,type:_e["2D"],commands:[{property:"clearRect",args:[0,0,w,v]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:g}]},0,0]}]})};let c=1e3/t,u=0,d,f=()=>{let p=[];return n.document.querySelectorAll("canvas").forEach(h=>{ae(h,r,o,!0)||p.push(h)}),p},m=p=>{if(u&&p-u<c){d=requestAnimationFrame(m);return}u=p,f().forEach(h=>Aa(this,void 0,void 0,function*(){var y;let g=this.mirror.getId(h);if(s.get(g))return;if(s.set(g,!0),["webgl","webgl2"].includes(h.__context)){let v=h.getContext(h.__context);((y=v?.getContextAttributes())===null||y===void 0?void 0:y.preserveDrawingBuffer)===!1&&v?.clear(v.COLOR_BUFFER_BIT)}let w=yield createImageBitmap(h);l.postMessage({id:g,bitmap:w,width:h.width,height:h.height,dataURLOptions:i.dataURLOptions},[w])})),d=requestAnimationFrame(m)};d=requestAnimationFrame(m),this.resetObservers=()=>{a(),cancelAnimationFrame(d)}}initCanvasMutationObserver(t,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();let o=qr(t,n,r),i=Ta(this.processMutation.bind(this),t,n,r),a=Na(this.processMutation.bind(this),t,n,r,this.mirror);this.resetObservers=()=>{o(),i(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let t=n=>{this.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{let r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;let r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;let o=r.map(a=>Ia(a,["type"])),{type:i}=r[0];this.mutationCb({id:n,type:i,commands:o}),this.pendingCanvasMutations.delete(t)}};var Sn=class{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new an,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;let r={id:n,styleIds:[]},o=[];for(let i of t){let a;if(this.styleMirror.has(i))a=this.styleMirror.getId(i);else{a=this.styleMirror.add(i);let s=Array.from(i.rules||CSSRule);o.push({styleId:a,rules:s.map((l,c)=>({rule:Fr(l),index:c}))})}r.styleIds.push(a)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}};function ce(e){return Object.assign(Object.assign({},e),{timestamp:Date.now()})}var se,Cn,Yr,xn=!1,Ee=aa();function Ne(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:i=null,ignoreClass:a="rr-ignore",maskTextClass:s="rr-mask",maskTextSelector:l=null,inlineStylesheet:c=!0,maskAllInputs:u,maskInputOptions:d,slimDOMOptions:f,maskInputFn:m,maskTextFn:p,hooks:h,packFn:y,sampling:g={},dataURLOptions:w={},mousemoveWait:v,recordCanvas:b=!1,recordCrossOriginIframes:S=!1,userTriggeredOnInput:x=!1,collectFonts:I=!1,inlineImages:C=!1,plugins:M,keepIframeSrcFn:k=()=>!1,ignoreCSSAttributes:T=new Set([])}=e,F=S?window.parent===window:!0,D=!1;if(!F)try{window.parent.document,D=!1}catch{D=!0}if(F&&!t)throw new Error("emit function is required");v!==void 0&&g.mousemove===void 0&&(g.mousemove=v),Ee.reset();let R=u===!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},_=f===!0||f==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:f==="all",headMetaDescKeywords:f==="all"}:f||{};ua();let N,P=0,K=O=>{for(let j of M||[])j.eventProcessor&&(O=j.eventProcessor(O));return y&&(O=y(O)),O};se=(O,j)=>{var X;if(!((X=Ve[0])===null||X===void 0)&&X.isFrozen()&&O.type!==q.FullSnapshot&&!(O.type===q.IncrementalSnapshot&&O.data.source===V.Mutation)&&Ve.forEach(z=>z.unfreeze()),F)t?.(K(O),j);else if(D){let z={type:"rrweb",event:K(O),isCheckout:j};window.parent.postMessage(z,"*")}if(O.type===q.FullSnapshot)N=O,P=0;else if(O.type===q.IncrementalSnapshot){if(O.data.source===V.Mutation&&O.data.isAttachIframe)return;P++;let z=r&&P>=r,Z=n&&O.timestamp-N.timestamp>n;(z||Z)&&Cn(!0)}};let U=O=>{se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Mutation},O)}))},G=O=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Scroll},O)})),ne=O=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.CanvasMutation},O)})),L=O=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.AdoptedStyleSheet},O)})),W=new Sn({mutationCb:U,adoptedStyleSheetCb:L}),B=new gn({mirror:Ee,mutationCb:U,stylesheetManager:W,recordCrossOriginIframes:S,wrappedEmit:se});for(let O of M||[])O.getMirror&&O.getMirror({nodeMirror:Ee,crossOriginIframeMirror:B.crossOriginIframeMirror,crossOriginIframeStyleMirror:B.crossOriginIframeStyleMirror});Yr=new vn({recordCanvas:b,mutationCb:ne,win:window,blockClass:o,blockSelector:i,mirror:Ee,sampling:g.canvas,dataURLOptions:w});let Y=new yn({mutationCb:U,scrollCb:G,bypassOptions:{blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,inlineStylesheet:c,maskInputOptions:R,dataURLOptions:w,maskTextFn:p,maskInputFn:m,recordCanvas:b,inlineImages:C,sampling:g,slimDOMOptions:_,iframeManager:B,stylesheetManager:W,canvasManager:Yr,keepIframeSrcFn:k},mirror:Ee});Cn=(O=!1)=>{var j,X,z,Z,H,re;se(ce({type:q.Meta,data:{href:window.location.href,width:ln(),height:sn()}}),O),W.reset(),Ve.forEach(le=>le.lock());let oe=sa(document,{mirror:Ee,blockClass:o,blockSelector:i,maskTextClass:s,maskTextSelector:l,inlineStylesheet:c,maskAllInputs:R,maskTextFn:p,slimDOM:_,dataURLOptions:w,recordCanvas:b,inlineImages:C,onSerialize:le=>{un(le,Ee)&&B.addIframe(le),dn(le,Ee)&&W.trackLinkElement(le),fn(le)&&Y.addShadowRoot(le.shadowRoot,document)},onIframeLoad:(le,We)=>{B.attachIframe(le,We),Y.observeAttachShadow(le)},onStylesheetLoad:(le,We)=>{W.attachLinkElement(le,We)},keepIframeSrcFn:k});if(!oe)return console.warn("Failed to snapshot the document");se(ce({type:q.FullSnapshot,data:{node:oe,initialOffset:{left:window.pageXOffset!==void 0?window.pageXOffset:document?.documentElement.scrollLeft||((X=(j=document?.body)===null||j===void 0?void 0:j.parentElement)===null||X===void 0?void 0:X.scrollLeft)||((z=document?.body)===null||z===void 0?void 0:z.scrollLeft)||0,top:window.pageYOffset!==void 0?window.pageYOffset:document?.documentElement.scrollTop||((H=(Z=document?.body)===null||Z===void 0?void 0:Z.parentElement)===null||H===void 0?void 0:H.scrollTop)||((re=document?.body)===null||re===void 0?void 0:re.scrollTop)||0}}})),Ve.forEach(le=>le.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&W.adoptStyleSheets(document.adoptedStyleSheets,Ee.getId(document))};try{let O=[];O.push(pe("DOMContentLoaded",()=>{se(ce({type:q.DomContentLoaded,data:{}}))}));let j=z=>{var Z;return xa({mutationCb:U,mousemoveCb:(H,re)=>se(ce({type:q.IncrementalSnapshot,data:{source:re,positions:H}})),mouseInteractionCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.MouseInteraction},H)})),scrollCb:G,viewportResizeCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.ViewportResize},H)})),inputCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Input},H)})),mediaInteractionCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.MediaInteraction},H)})),styleSheetRuleCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.StyleSheetRule},H)})),styleDeclarationCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.StyleDeclaration},H)})),canvasMutationCb:ne,fontCb:H=>se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Font},H)})),selectionCb:H=>{se(ce({type:q.IncrementalSnapshot,data:Object.assign({source:V.Selection},H)}))},blockClass:o,ignoreClass:a,maskTextClass:s,maskTextSelector:l,maskInputOptions:R,inlineStylesheet:c,sampling:g,recordCanvas:b,inlineImages:C,userTriggeredOnInput:x,collectFonts:I,doc:z,maskInputFn:m,maskTextFn:p,keepIframeSrcFn:k,blockSelector:i,slimDOMOptions:_,dataURLOptions:w,mirror:Ee,iframeManager:B,stylesheetManager:W,shadowDomManager:Y,canvasManager:Yr,ignoreCSSAttributes:T,plugins:((Z=M?.filter(H=>H.observer))===null||Z===void 0?void 0:Z.map(H=>({observer:H.observer,options:H.options,callback:re=>se(ce({type:q.Plugin,data:{plugin:H.name,payload:re}}))})))||[]},h)};B.addLoadListener(z=>{O.push(j(z.contentDocument))});let X=()=>{Cn(),O.push(j(document)),xn=!0};return document.readyState==="interactive"||document.readyState==="complete"?X():O.push(pe("load",()=>{se(ce({type:q.Load,data:{}})),X()},window)),()=>{O.forEach(z=>z()),xn=!1}}catch(O){console.warn(O)}}Ne.addCustomEvent=(e,t)=>{if(!xn)throw new Error("please add custom event after start recording");se(ce({type:q.Custom,data:{tag:e,payload:t}}))};Ne.freezePage=()=>{Ve.forEach(e=>e.freeze())};Ne.takeFullSnapshot=e=>{if(!xn)throw new Error("please take full snapshot after start recording");Cn(e)};Ne.mirror=Ee;function zu(){try{if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID()}catch{}return`run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Zr(){let e=E().sessionRecording;if(!e.active)try{let t=Ne({emit:n=>e.buffer.push(n),collectFonts:!0,sampling:{mousemove:!1,mouseInteraction:!1}});t&&(e.active=!0,e.runId=zu(),e.stopFn=t)}catch{}}function Xr(){let e=E().sessionRecording;return!e.active||!e.runId||e.buffer.length===0?null:{events:e.buffer.splice(0),runId:e.runId}}function Kr(){return E().sessionRecording.active}function Jr(e,t){Wa("ms-step",{command:e,index:t})}function Da(e){Wa("ms-navigation",{url:e})}function Wa(e,t){if(E().sessionRecording.active)try{Ne.addCustomEvent(e,t)}catch{}}var Gu=["backgroundColor","color","fontFamily","fontSize","fontWeight","fontStyle","lineHeight","letterSpacing","textAlign","textDecoration","textTransform","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","margin","marginTop","marginRight","marginBottom","marginLeft","borderRadius","borderColor","borderWidth","borderStyle","boxShadow","opacity","width","height","display","flexDirection","justifyContent","alignItems","gap"];function qu(e,t){let n=t??Gu;if(e.ref||e.text||e.role||e.label||e.selector){let{element:i,matched:a}=Re(e);return{...Ba(i,e.ref,n),matched:a}}let r=qe(),o=[];for(let[i,a]of r)a.isConnected&&o.push(Ba(a,i,n));return o}function Ba(e,t,n){let r=window.getComputedStyle(e),o={};t&&(o.ref=t),o.tag=e.tagName.toLowerCase();let i=e.textContent?.trim();i&&(o.text=i.length>60?i.slice(0,60)+"\u2026":i);for(let a of n){let s=r.getPropertyValue(a.replace(/([A-Z])/g,"-$1").toLowerCase());s&&(o[a]=s)}return o}var Ha=25,In=25,mt="__mindstudio_pending_nav",Ua=300,to=1e4;function ju(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:t.pathname===window.location.pathname&&t.search===window.location.search&&t.hash===window.location.hash}catch{return!1}}function Va(e){try{let t=new URL(e,window.location.origin);return t.origin!==window.location.origin?!1:(ju(e)||(window.history.pushState(null,"",t.pathname+t.search+t.hash),window.dispatchEvent(new PopStateEvent("popstate"))),!0)}catch{return!1}}async function Qr(e=300,t=2e3){return new Promise(n=>{let r=Date.now()+t,o=Date.now(),i=Vt(),a=window.scrollY,s=window.scrollX,l=document.body.scrollTop,c=document.documentElement.scrollTop,u=document.body.scrollHeight,d=document.body.scrollWidth,f=i.scrollTop,m=i.scrollLeft;function p(){if(Date.now()>r){n();return}let h=window.scrollY,y=window.scrollX,g=document.body.scrollTop,w=document.documentElement.scrollTop,v=document.body.scrollHeight,b=document.body.scrollWidth,S=i.scrollTop,x=i.scrollLeft;(h!==a||y!==s||g!==l||w!==c||v!==u||b!==d||S!==f||x!==m)&&(a=h,s=y,l=g,c=w,u=v,d=b,f=S,m=x,o=Date.now()),Date.now()-o>=e?n():requestAnimationFrame(p)}requestAnimationFrame(p)})}var Yu=150;async function eo(e){let t=Zu(e),n=t.map(a=>({el:a,top:a.scrollTop,left:a.scrollLeft})),r=document.documentElement.style.scrollBehavior;document.documentElement.style.scrollBehavior="auto",e.scrollIntoView({block:"center",inline:"nearest",behavior:"instant"}),document.documentElement.style.scrollBehavior=r;let o=t.map(a=>({top:a.scrollTop,left:a.scrollLeft})),i=[];for(let a=0;a<t.length;a++)(n[a].top!==o[a].top||n[a].left!==o[a].left)&&i.push({el:t[a],fromTop:n[a].top,fromLeft:n[a].left,toTop:o[a].top,toLeft:o[a].left});if(i.length===0){await new Promise(a=>requestAnimationFrame(()=>a()));return}for(let a of i)a.el.scrollTop=a.fromTop,a.el.scrollLeft=a.fromLeft;await new Promise(a=>{let s=performance.now();function l(c){let u=c-s,d=Math.min(u/Yu,1),f=1-Math.pow(1-d,3);for(let m of i)m.el.scrollTop=m.fromTop+(m.toTop-m.fromTop)*f,m.el.scrollLeft=m.fromLeft+(m.toLeft-m.fromLeft)*f;d<1?requestAnimationFrame(l):a()}requestAnimationFrame(l)})}function Zu(e){let t=[],n=e.parentElement;for(;n;){let r=getComputedStyle(n),o=r.overflowY,i=r.overflowX;(o==="auto"||o==="scroll"||i==="auto"||i==="scroll")&&t.push(n),n=n.parentElement}return t.push(document.scrollingElement||document.documentElement),t}var Xu=new Set(["click","type","select"]);function Ku(e){return e.some(t=>Xu.has(t.command))}async function At(e,t){let n=Date.now(),r=[],o=[],i="",a=!1,s=new Set(["click","type","select"]),l=t.some(u=>s.has(u.command));l&&(wt(!0),Tr()),cr(),Ku(t)&&Zr();try{for(let u=0;u<t.length;u++){let d=t[u],f=d.command;Jr(f,u);try{if(u>0&&await Ie(Ha+Math.random()*In-In/2),f==="navigate"){let p=d.url;if(!p)throw new Error('navigate command requires a "url" field');if(Va(p)){r.push({index:u,command:f,result:"ok"}),await Ie(Ua);continue}let h=t.slice(u+1);if(h.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:h,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.href=p,await new Promise((y,g)=>{setTimeout(()=>g(new Error("Navigation did not complete within timeout")),to)})}if(f==="reload"){let p=t.slice(u+1);if(p.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e,startTime:n,completedSteps:r,remainingSteps:p,stepOffset:u+1}))}catch{}r.push({index:u,command:f,result:"ok"}),a=!0,window.location.reload(),await new Promise((h,y)=>{setTimeout(()=>y(new Error("Reload did not complete within timeout")),to)})}let m=await qa(d);r.push({index:u,command:f,...m})}catch(m){r.push({index:u,command:f,error:m instanceof Error?m.message:String(m)});break}}try{i=await je()}catch{}}finally{o=ur(),l&&(wt(!1),Kr()?Rr():en())}let c=Xr();return{id:e,steps:r,snapshot:i,logs:o,duration:Date.now()-n,...c?{events:c.events,runId:c.runId}:{}}}function za(){try{let e=sessionStorage.getItem(mt);if(!e)return null;let t=JSON.parse(e);return typeof t?.id=="string"?t.id:null}catch{return null}}async function Ga(){let e=null;try{let a=sessionStorage.getItem(mt);if(!a)return null;sessionStorage.removeItem(mt),e=JSON.parse(a)}catch{return null}if(!e)return null;let t=[...e.completedSteps],n=[],r="",o=e.remainingSteps.some(a=>a.command==="click"||a.command==="type"||a.command==="select");o&&(wt(!0),Tr(),Zr()),cr();try{for(let a=0;a<e.remainingSteps.length;a++){let s=e.remainingSteps[a],l=s.command,c=e.stepOffset+a;Jr(l,c);try{if(a>0&&await Ie(Ha+Math.random()*In-In/2),l==="navigate"){let d=s.url;if(!d)throw new Error('navigate command requires a "url" field');if(Va(d)){t.push({index:c,command:l,result:"ok"}),await Ie(Ua);continue}let f=e.remainingSteps.slice(a+1);if(f.length>0)try{sessionStorage.setItem(mt,JSON.stringify({id:e.id,startTime:e.startTime,completedSteps:t,remainingSteps:f,stepOffset:c+1}))}catch{}t.push({index:c,command:l,result:"ok"}),window.location.href=d,await new Promise((m,p)=>{setTimeout(()=>p(new Error("Navigation did not complete within timeout")),to)})}let u=await qa(s);t.push({index:c,command:l,...u})}catch(u){t.push({index:c,command:l,error:u instanceof Error?u.message:String(u)});break}}try{r=await je()}catch{}}finally{n=ur(),o&&(wt(!1),Kr()?Rr():en())}let i=Xr();return{id:e.id,steps:t,snapshot:r,logs:n,duration:Date.now()-e.startTime,...i?{events:i.events,runId:i.runId}:{}}}async function qa(e){switch(e.command){case"snapshot":return{result:await je()};case"click":{let{element:t,matched:n}=Re(e);return await eo(t),await Qt(t),await Qi(),hr(t),ea(),await Qr(),await Ie(250),{result:"ok",matched:n}}case"type":{let{element:t,matched:n}=Re(e),r=e.text;if(!r&&r!=="")throw new Error('type command requires a "text" field');return await eo(t),await Qt(t,{anchor:"text"}),await xi(t,r,{clear:!!e.clear}),await Qr(),{result:"ok",matched:n}}case"select":{let{element:t,matched:n}=Re(e),r=e.option;if(!r)throw new Error('select command requires an "option" field');await eo(t),await Qt(t);let o=Ai(t,r);return await Qr(),{result:`selected "${o}"`,matched:n}}case"wait":{let{matched:t,elapsed:n}=await Ii(e);return{result:"ok",matched:t,elapsed:n}}case"styles":{let t=e.properties;return{result:qu(e,t)}}case"evaluate":{let t=e.script;if(!t)throw new Error('evaluate command requires a "script" field');return{result:await Ei(t)}}default:throw new Error(`Unknown command: ${e.command}`)}}var Ju="/__mindstudio_dev__/ws",Qu=1e3,ed=1e4;function Ya(){let e=E().ws;e.ws||(ii(En),window.addEventListener("beforeunload",()=>{e.closing=!0,e.ws&&e.ws.close()}),Za())}function En(){let{ws:e}=E().ws;return e&&e.readyState===WebSocket.OPEN?e:null}function td(){return`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${Ju}`}function ro(){return window.parent!==window?"iframe":"standalone"}function oo(){try{return location.search.includes("ms_sandbox=1")?(sessionStorage.setItem("__ms_sandbox","1"),!0):sessionStorage.getItem("__ms_sandbox")==="1"}catch{return location.search.includes("ms_sandbox=1")}}function Za(){let e=E().ws;if(!e.closing){try{e.ws=new WebSocket(td())}catch{ja();return}e.ws.onopen=()=>{try{let t=(()=>{try{return sessionStorage.getItem("__ms_mirror")==="1"}catch{return!1}})();e.ws.send(JSON.stringify({type:"hello",mode:ro(),url:location.href,viewport:{w:window.innerWidth,h:window.innerHeight},mirror:t,sandbox:oo(),resumingCommandId:za()}))}catch{e.ws?.close()}},e.ws.onmessage=t=>{let n;try{n=JSON.parse(t.data)}catch{return}switch(n.type){case"ack":e.clientId=n.clientId,e.reconnectDelay=Qu,rd();break;case"command":nd(n.id,n.steps);break;case"broadcast":od(n.action,n.payload);break}},e.ws.onclose=()=>{e.ws=null,e.clientId=null,e.closing||ja()},e.ws.onerror=()=>{}}}function ja(){let e=E().ws;e.closing||(setTimeout(()=>Za(),e.reconnectDelay),e.reconnectDelay=Math.min(e.reconnectDelay*2,ed))}async function nd(e,t){let n=E().ws;if(n.busy){An({id:e,steps:[],snapshot:"",logs:[],duration:0,error:"Browser agent is busy"});return}n.busy=!0,no("command-started",{id:e,steps:t.map(r=>r.command)});try{let r=await At(e,t);An(r),no("command-completed",{id:e,success:!0})}catch{An({id:e,steps:[],snapshot:"",logs:[],duration:0}),no("command-completed",{id:e,success:!1})}finally{E().ws.busy=!1}}function An(e){try{let t=En();t&&t.send(JSON.stringify({type:"result",...e}))}catch{}}async function rd(){let e=await Ga();e&&An(e)}function no(e,t){window.parent!==window&&window.parent.postMessage({channel:"mindstudio-browser-agent",command:e,...t},"*")}function od(e,t){e==="reload"&&(document.cookie="__ms_auth=; Max-Age=0; Path=/; Secure; SameSite=None",location.href="/")}var id=Object.defineProperty,be=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(r){throw n=[r],r}},Nt=(e,t)=>{for(var n in t)id(e,n,{get:t[n],enumerable:!0})};function ad(e){if(e===!0)return"soft";if(e===!1)return"disabled";if(typeof e=="string"){let t=e.toLowerCase().trim();if(t==="auto")return"auto";if(t==="full")return"full";if(t==="soft"||t==="disabled")return t}return"soft"}function sd(e="soft"){switch(e){case"auto":{A.session.styleMap=new Map,A.session.nodeMap=new Map;return}case"soft":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap,A.computedStyle=new WeakMap,A.measureHints=new WeakMap,A.baseStyle=new he(50),A.defaultStyle=new he(30),A.image=new he(100),A.background=new he(100),A.resource=new he(150),A.compress=new he(50),A.font=new Set;return}default:{A.session.styleMap=new Map,A.session.nodeMap=new Map,A.session.styleCache=new WeakMap;return}}}var he,A,ge=be(()=>{"use strict";he=class extends Map{constructor(e=100,...t){super(...t),this._maxSize=e}set(e,t){if(this.size>=this._maxSize&&!this.has(e)){let n=this.keys().next().value;n!==void 0&&this.delete(n)}return super.set(e,t)}},A={image:new he(100),background:new he(100),resource:new he(150),defaultStyle:new he(30),baseStyle:new he(50),compress:new he(50),computedStyle:new WeakMap,measureHints:new WeakMap,burstAdvice:new WeakMap,warnedReconcile:!1,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}}});function Ro(e){let t=e.match(/url\((['"]?)(.*?)(\1)\)/);if(!t)return null;let n=t[2].trim();return n.startsWith("#")?null:n}function Ts(e,t=1){let n=e.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of n[1].split(",")){let i=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!i)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!Rs.test(a[1].trim()))continue;let s=o.match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)/i),l=1;if(s){let c=parseFloat(s[1]);l=/dpi/i.test(s[2])?c/96:c}r.push({url:i[2].trim(),dppx:l})}return r.length?(r.sort((o,i)=>o.dppx-i.dppx),(r.find(o=>o.dppx>=t)||r[r.length-1]).url):null}function ld(e){if(!e||e==="none")return"";let t=e.replace(/translate[XY]?\([^)]*\)/g,"");return t=t.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==6?`matrix(${r})`:(o[4]="0",o[5]="0",`matrix(${o.join(", ")})`)}),t=t.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let o=r.split(",").map(i=>i.trim());return o.length!==16?`matrix3d(${r})`:(o[12]="0",o[13]="0",`matrix3d(${o.join(", ")})`)}),t.trim().replace(/\s{2,}/g," ")}function Un(e){if(/%[0-9A-Fa-f]{2}/.test(e))return e;try{return encodeURI(e)}catch{return e}}function cd(e,t){if(!e||/^(data|blob|about|#)/i.test(e.trim()))return e;try{let n=t||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(e,n).href}catch{return e}}var Rs,Yn=be(()=>{"use strict";Rs=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i});function ud(e="[snapDOM]",{ttlMs:t=5*6e4,maxEntries:n=12}={}){let r=new Map,o=0;function i(a,s,l){if(o>=n)return;let c=Date.now();(r.get(s)||0)>c||(r.set(s,c+t),o++,a==="warn"&&console&&console.warn?console.warn(`${e} ${l}`):console&&console.error&&console.error(`${e} ${l}`))}return{warnOnce(a,s){i("warn",a,s)},errorOnce(a,s){i("error",a,s)},reset(){r.clear(),o=0}}}function dd(e){return/^data:|^blob:|^about:blank$/i.test(e)}function fd(e,t){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=t.includes("{url}")?t.split("{url}")[0]:t,o=new URL(r||".",n),i=new URL(e,n);if(i.origin===o.origin)return!0;let a=i.searchParams;if(a&&(a.has("url")||a.has("target")))return!0}catch{}return!1}function pd(e,t){if(!t||dd(e)||fd(e,t))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(e,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!t}}function md(e,t){if(!t)return e;if(t.includes("{url}"))return t.replace("{urlRaw}",Un(e)).replace("{url}",encodeURIComponent(e));if(/[?&]url=?$/.test(t))return`${t}${encodeURIComponent(e)}`;if(t.endsWith("?"))return`${t}url=${encodeURIComponent(e)}`;if(t.endsWith("/"))return`${t}${Un(e)}`;let n=t.includes("?")?"&":"?";return`${t}${n}url=${encodeURIComponent(e)}`}function Xa(e){return new Promise((t,n)=>{let r=new FileReader;r.onload=()=>t(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(e)})}function hd(e,t){return[t.as||"blob",t.timeout??3e3,t.useProxy||"",t.errorTTL??8e3,e].join("|")}async function Ce(e,t={}){let n=t.as??"blob",r=t.timeout??3e3,o=t.useProxy||"",i=t.errorTTL??8e3,a=t.headers||{},s=!!t.silent;if(/^data:/i.test(e))try{if(n==="text")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(e),status:200,url:e,fromCache:!1,mime:String(e).slice(5).split(";")[0]||""};let[,y="",g=""]=String(e).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(y)?atob(g):decodeURIComponent(g),v=new Uint8Array([...w].map(S=>S.charCodeAt(0))),b=new Blob([v],{type:(y||"").split(";")[0]||""});return{ok:!0,data:b,status:200,url:e,fromCache:!1,mime:b.type||""}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(e))try{let y=await fetch(e);if(!y.ok)return{ok:!1,data:null,status:y.status,url:e,fromCache:!1,reason:"http_error"};let g=await y.blob(),w=g.type||y.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Xa(g),status:y.status,url:e,fromCache:!1,mime:w}:n==="text"?{ok:!0,data:await g.text(),status:y.status,url:e,fromCache:!1,mime:w}:{ok:!0,data:g,status:y.status,url:e,fromCache:!1,mime:w}}catch{return{ok:!1,data:null,status:0,url:e,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(e))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:e,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:e,fromCache:!1};let l=hd(e,{as:n,timeout:r,useProxy:o,errorTTL:i}),c=Mt.get(l);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Mt.delete(l);let u=Ln.get(l);if(u)return u;let d=pd(e,o)?md(e,o):e,f=t.credentials;if(!f)try{let y=typeof location<"u"&&location.href?location.href:"http://localhost/",g=new URL(e,y);f=typeof location<"u"&&g.origin===location.origin?"include":"omit"}catch{f="omit"}let m=new AbortController,p=setTimeout(()=>m.abort("timeout"),r),h=(async()=>{try{let y=await fetch(d,{signal:m.signal,credentials:f,headers:a});if(!y.ok){let v={ok:!1,data:null,status:y.status,url:d,fromCache:!1,reason:"http_error"};if(i>0&&Mt.set(l,{until:Date.now()+i,result:v}),!s){let b=`${y.status} ${y.statusText||""}`.trim();uo.warnOnce(`http:${y.status}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,`HTTP error ${b} while fetching ${n} ${e}`)}return t.onError&&t.onError(v),v}if(n==="text")return{ok:!0,data:await y.text(),status:y.status,url:d,fromCache:!1};let g=await y.blob(),w=g.type||y.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await Xa(g),status:y.status,url:d,fromCache:!1,mime:w}:{ok:!0,data:g,status:y.status,url:d,fromCache:!1,mime:w}}catch(y){let g=y&&typeof y=="object"&&"name"in y&&y.name==="AbortError"?String(y.message||"").includes("timeout")?"timeout":"abort":"network",w={ok:!1,data:null,status:0,url:d,fromCache:!1,reason:g};if(!/^blob:/i.test(e)&&i>0&&Mt.set(l,{until:Date.now()+i,result:w}),!s){let v=`${g}:${n}:${new URL(e,location?.href??"http://localhost/").origin}`,b=g==="timeout"?`Timeout after ${r}ms. Consider increasing timeout or using a proxy for ${e}`:g==="abort"?`Request aborted while fetching ${n} ${e}`:`Network/CORS issue while fetching ${n} ${e}. A proxy may be required`;uo.errorOnce(v,b)}return t.onError&&t.onError(w),w}finally{clearTimeout(p),Ln.delete(l)}})();return Ln.set(l,h),h}var uo,Ln,Mt,rt=be(()=>{"use strict";Yn(),uo=ud("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),Ln=new Map,Mt=new Map});async function Ns(e,t={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(e)||e.trim()==="none")return e;let n=Ts(e,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??Ro(e);if(!n)return e;let r=cd(n),o=Un(r),i=(t.useProxy||"")+"|"+o;if(A.background.has(i)){let a=A.background.get(i);return a?`url("${a}")`:"none"}try{let a=await Ce(o,{as:"dataURL",useProxy:t.useProxy});return a.ok?(A.background.set(i,a.data),`url("${a.data}")`):(A.background.set(i,null),"none")}catch{return A.background.set(i,null),"none"}}var gd=be(()=>{"use strict";ge(),Yn(),rt()});function Ls(e){if(e=String(e).toLowerCase(),Lo.has(e)){let i={};return A.defaultStyle.set(e,i),i}if(A.defaultStyle.has(e))return A.defaultStyle.get(e);let t=document.getElementById("snapdom-sandbox");t||(t=document.createElement("div"),t.id="snapdom-sandbox",t.setAttribute("data-snapdom-sandbox","true"),t.setAttribute("aria-hidden","true"),t.style.position="absolute",t.style.left="-9999px",t.style.top="-9999px",t.style.width="0px",t.style.height="0px",t.style.overflow="hidden",document.body.appendChild(t));let n=document.createElement(e);n.style.all="initial",t.appendChild(n);let r=getComputedStyle(n),o={};for(let i of r){if(No(i))continue;let a=r.getPropertyValue(i);o[i]=a}return t.removeChild(n),A.defaultStyle.set(e,o),o}function No(e){let t=mo.get(e);if(t===void 0){let n=String(e).toLowerCase();t=Ps.has(n)||Os.test(n)||_s.test(n),mo.set(e,t)}return t}function Fs(e,t){return!Ws.has(e)&&(t==="inline"||Ds.has(e)||Fo.has(e))}function yd(e,t,n){let r=(t.display||"").toLowerCase();if(r==="inline"||Fo.has(e))return!1;if(n)return!0;if((t.float||"none").toLowerCase()!=="none")return!1;let o=(t.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!Us.has(r)}function fo(e,t,n=!0,r=!1){if(t=String(t||"").toLowerCase(),Lo.has(t))return"";let o=[],i=Ls(t),a=(e.display||"").toLowerCase(),s=a==="inline",l=Fs(t,a),c=e["text-wrap-mode"]||e["white-space"]||"",u=l&&n&&!s&&(c==="nowrap"||c==="pre"),d=l&&n&&!u,f=!1;for(let m in e){if(No(m))continue;let p=e[m];if(d){if(Bs.has(m))continue;if(Hs.has(m)){p&&p!==i[m]&&(o.push(`${m}:${p}`),p!=="auto"&&(f=!0));continue}}if(p&&p!==i[m]){if(!u&&(m==="width"||m==="inline-size")&&p.endsWith("px")&&p.includes(".")){let h=parseFloat(p);if(Number.isFinite(h)){o.push(`${m}:${Math.ceil(h*16)/16}px`);continue}}o.push(`${m}:${p}`)}}if(d&&!s&&!r&&!f){let m=e.width;m&&m!=="auto"&&m!==i.width&&o.push(`min-width:${m}`)}return o.sort(),o.join(";")}function bd(e){let t=new Set;return e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(e.tagName&&t.add(e.tagName.toLowerCase()),typeof e.querySelectorAll=="function"&&e.querySelectorAll("*").forEach(n=>t.add(n.tagName.toLowerCase())),Array.from(t))}function wd(e){let t=new Map;for(let r of e){let o=Ls(r);if(!o)continue;let i=Object.entries(o).map(([a,s])=>`${a}:${s};`).sort().join("");i&&(t.has(i)||t.set(i,[]),t.get(i).push(r))}let n="";for(let[r,o]of t.entries())n+=`${o.join(",")} { ${r} }
|
|
74
|
+
`;return n}function vd(e){let t=Array.from(new Set(e.values())).filter(Boolean).sort(),n=new Map,r=1;for(let o of t)n.set(o,`c${r++}`);return n}function Sd(e){try{let t=e?.ownerDocument;if(!t)return typeof window<"u"?window:null;let n=t.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===t)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function J(e,t=null){let n=()=>{let i={length:0,getPropertyValue:()=>"",item:()=>""};return i[Symbol.iterator]=function*(){},i};if(e?.nodeType!==1){let i=typeof window<"u"?window:null;if(i&&typeof i.getComputedStyle=="function")try{return i.getComputedStyle(e,t)||n()}catch{return n()}return n()}let r=A.computedStyle.get(e);r||(r=new Map,A.computedStyle.set(e,r));let o=r.get(t);if(!o){let i=Sd(e),a=null;try{a=i&&typeof i.getComputedStyle=="function"?i.getComputedStyle(e,t):null}catch{}if(!a&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{e.ownerDocument===document&&(a=window.getComputedStyle(e,t))}catch{}o=a||n(),r.set(t,o)}return o}function Ka(e){let t={};for(let n of e)t[n]=e.getPropertyValue(n);for(let n of Vs){let r=t[`border-${n}-style`],o=t[`border-${n}-width`];(r==="none"||r==="hidden"||o==="0px")&&(delete t[`border-${n}-style`],delete t[`border-${n}-width`],delete t[`border-${n}-color`])}return t}function po(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&n++,i===")"&&n--,i===","&&n===0&&(t.push(e.slice(r,o).trim()),r=o+1)}return t.push(e.slice(r).trim()),t}var $s,Lo,Cd,_s,Os,Ps,mo,Ds,Fo,Ws,Bs,Hs,Us,Vs,Zn=be(()=>{"use strict";ge(),$s=new Set(["meta","script","noscript","title","link","template"]),Lo=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Cd=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"],_s=/(?:^|-)(animation|transition)(?:-|$)/i,Os=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Ps=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),mo=new Map,Ds=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),Fo=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Ws=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Bs=new Set(["width","max-width","inline-size","max-inline-size"]),Hs=new Set(["min-width","min-inline-size"]),Us=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]),Vs=["top","right","bottom","left"]});function Fn(e,{fast:t=!1}={}){if(t)return e();"requestIdleCallback"in window?requestIdleCallback(e,{timeout:50}):setTimeout(e,1)}function tt(e=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(t=>{let n=!1,r=()=>{n||(n=!0,t())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,e)})}function xd(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let e=navigator.userAgent||"",t=/iPhone|iPad|iPod/.test(e),n=navigator.maxTouchPoints>2&&/Macintosh/.test(e);return t||n}function De(){if(typeof navigator>"u")return!1;let e=navigator.userAgent||"",t=e.toLowerCase(),n=t.includes("safari")&&!t.includes("chrome")&&!t.includes("crios")&&!t.includes("fxios")&&!t.includes("android"),r=/applewebkit/i.test(e),o=/mobile/i.test(e),i=!/safari/i.test(e),a=r&&o&&i,s=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(e),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(t),c=/ipad|iphone|ipod/.test(t)&&r;return n||a||s||l||c}function Id(){if(typeof navigator>"u")return!1;let e=(navigator.userAgent||"").toLowerCase();return e.includes("firefox")||e.includes("fxios")}var ot=be(()=>{"use strict"});function Q(e,t,n){let r=e&&typeof e=="object"&&(e.options||e);r&&r.debug&&(n!==void 0?console.warn("[snapdom]",t,n):console.warn("[snapdom]",t))}var zs=be(()=>{"use strict"}),Me=be(()=>{"use strict";gd(),Zn(),ot(),Yn(),zs()}),Gs={};Nt(Gs,{decodeSvgFromDataURL:()=>$o,encodeSvgToDataURL:()=>_o,fixSafariShadows:()=>Oo,toCanvas:()=>Xn});function Ad(e){try{let t=e.match(/<svg\b[^>]*>/i);if(!t)return e;let n=t[0],r=parseFloat((n.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((n.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(r)||!Number.isFinite(o)||r<=0||o<=0)return e;let i=Math.min(1,Pe/r,Pe/o,Math.sqrt(Vn/(r*o)));if(i>=1)return e;let a=Math.max(1,Math.floor(r*i)),s=Math.max(1,Math.floor(o*i));return console.warn(`[snapDOM] Capture ${Math.round(r)}\xD7${Math.round(o)}px exceeds the browser image-decode limit (${Pe}px/side); downscaling to ${a}\xD7${s}px. Lower \`scale\` or set \`width\`/\`height\` to control output size.`),e.replace(n,n.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${s}`))}catch{return e}}function Ed(e,t){let n=["x","y","width","height"].map(x=>Number(t?.[x]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[snapdom] canvas crop requires finite x/y and positive width/height");let r=e.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[snapdom] cannot crop a non-SVG capture");let o=r[0],i=(o.match(/\bviewBox="([^"]+)"/i)||[])[1],a=String(i||"").trim().split(/[\s,]+/).map(Number);if(a.length!==4||!a.every(Number.isFinite)||a[2]<=0||a[3]<=0)throw new Error("[snapdom] cannot crop an SVG without a finite viewBox");let[s,l,c,u]=a,d=Math.max(s,n[0]),f=Math.max(l,n[1]),m=Math.min(s+c,n[0]+n[2]),p=Math.min(l+u,n[1]+n[3]);if(!(m>d)||!(p>f))throw new RangeError("[snapdom] canvas crop does not intersect the SVG viewBox");let h=parseFloat((o.match(/\bwidth="([\d.]+)/i)||[])[1]),y=parseFloat((o.match(/\bheight="([\d.]+)/i)||[])[1]),g=Number.isFinite(h)&&h>0?h/c:1,w=Number.isFinite(y)&&y>0?y/u:1,v=Math.max(1,(m-d)*g),b=Math.max(1,(p-f)*w),S=o.replace(/(\bwidth=")[^"]*/i,`$1${v}`).replace(/(\bheight=")[^"]*/i,`$1${b}`).replace(/(\bviewBox=")[^"]*/i,`$1${d} ${f} ${m-d} ${p-f}`);return e.replace(o,S)}function Ja(e){return typeof e=="string"&&/^data:image\/svg\+xml/i.test(e)}function $o(e){let t=e.indexOf(",");return t>=0?decodeURIComponent(e.slice(t+1)):""}function Md(e){let t=e.indexOf(",");if(t<0)return"";let n=e.slice(t+1,t+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function _o(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}function qs(e){let t=[],n="",r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("&&r++,i===")"&&(r=Math.max(0,r-1)),i===";"&&r===0?(t.push(n),n=""):n+=i}return n.trim()&&t.push(n),t.map(o=>o.trim()).filter(Boolean)}function kd(e){let t=[],n="",r=0;for(let i=0;i<e.length;i++){let a=e[i];a==="("&&r++,a===")"&&(r=Math.max(0,r-1)),a===","&&r===0?(t.push(n.trim()),n=""):n+=a}n.trim()&&t.push(n.trim());let o=[];for(let i of t){if(/\binset\b/i.test(i))continue;let a=i.match(/-?\d+(?:\.\d+)?px/gi)||[],[s="0px",l="0px",c="0px"]=a;c=`${parseFloat(c)/2}px`;let u=i.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),d=!!u&&u!==",";o.push(`drop-shadow(${s} ${l} ${c}${d?` ${u}`:""})`)}return o.join(" ")}function js(e){let t=qs(e),n=null,r=null,o=null,i=[];for(let s of t){let l=s.indexOf(":");if(l<0)continue;let c=s.slice(0,l).trim().toLowerCase(),u=s.slice(l+1).trim();c==="box-shadow"?o=u:c==="filter"?n=u:c==="-webkit-filter"?r=u:i.push([c,u])}if(o){let s=kd(o);s&&(n=n?`${n} ${s}`:s,r=r?`${r} ${s}`:s)}let a=[...i];return n&&a.push(["filter",n]),r&&a.push(["-webkit-filter",r]),a.map(([s,l])=>`${s}:${l}`).join(";")}function Td(e){return e.replace(/([^{}]+)\{([^}]*)\}/g,(t,n,r)=>`${n}{${js(r)}}`)}function Rd(e){return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(t,n)=>t.replace(n,Td(n))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(t,n,r)=>`style=${n}${js(r)}${n}`),e}function Nd(){return $n||($n=(async()=>{try{let e='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',t=new Image;t.decoding="sync",t.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,await t.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(t,0,0);let o=r.getImageData(2,18,1,1).data[3]>128,i=r.getImageData(2,2,1,1).data[3]>128;return{native:o||i,flippedY:i&&!o}}catch{return{native:!1,flippedY:!1}}})(),$n)}function Ld(e){let t=[],n=0,r=0;for(let o=0;o<e.length;o++){let i=e[o];i==="("?n++:i===")"?n=Math.max(0,n-1):i===","&&n===0&&(t.push(e.slice(r,o)),r=o+1)}return t.push(e.slice(r)),t.map(o=>{let i=0,a=0,s="",l=0;for(;l<o.length;){let c=o[l];if(c==="("?i++:c===")"&&(i=Math.max(0,i-1)),i===0&&(l===0||o[l-1]===" ")){let u=/^-?\d*\.?\d+px/.exec(o.slice(l));if(u){a++,s+=a===2?`${-parseFloat(u[0])}px`:u[0],l+=u[0].length;continue}}s+=c,l++}return s}).join(",")}function Fd(e,t){let n=r=>qs(r).map(o=>{let i=o.indexOf(":");if(i<0)return o;let a=o.slice(0,i).trim().toLowerCase();return a==="text-shadow"||t&&a==="box-shadow"?`${a}:${Ld(o.slice(i+1))}`:o}).join(";");return e=e.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,o)=>r.replace(o,o.replace(/([^{}]+)\{([^}]*)\}/g,(i,a,s)=>`${a}{${n(s)}}`))),e=e.replace(/style=(['"])([\s\S]*?)\1/gi,(r,o,i)=>`style=${o}${n(i)}${o}`),e}async function Oo(e){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(e))return{svg:e,naturalOnly:!1};let{native:t,flippedY:n}=await Nd();try{let r=e;return t||(r=Rd(r)),n&&(r=Fd(r,t)),{svg:r,naturalOnly:!0}}catch{return{svg:e,naturalOnly:!0}}}async function $d(e,t){e.setAttribute("data-snapdom-internal",""),e.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(e);try{let n=document.createElement("canvas");n.width=16,n.height=16;let r=()=>new Promise(a=>{requestAnimationFrame(a),setTimeout(a,50)}),o=n.getContext("2d",{willReadFrequently:!0});if(!o){await r(),await r();return}let i=performance.now()+(t?600:150);for(;;){o.clearRect(0,0,16,16);try{o.drawImage(e,0,0,16,16)}catch{return}let a=o.getImageData(0,0,16,16).data,s=!1;for(let l=3;l<a.length;l+=4)if(a[l]>0){s=!0;break}if(s||performance.now()>i)return;await r()}}finally{try{e.remove()}catch{}}}async function Xn(e,t){let{width:n,height:r,scale:o=1,dpr:i=1,meta:a={},backgroundColor:s,crop:l=null}=t,c=e,u=!1,d=!1;if(l&&!Ja(e))throw new RangeError("[snapdom] canvas crop requires an SVG capture payload");if(Ja(e)){let k=(Md(e).match(/<svg\b[^>]*>/i)||[])[0]||"",T=parseFloat((k.match(/\bwidth="([\d.]+)/i)||[])[1]),F=parseFloat((k.match(/\bheight="([\d.]+)/i)||[])[1]),D=Number.isFinite(T)&&Number.isFinite(F)&&T>0&&F>0&&Math.min(1,Pe/T,Pe/F,Math.sqrt(Vn/(T*F)))<1;if(l||D||De())try{let R=$o(e);if(l&&(R=Ed(R,l)),De()){let _=await Oo(R);R=_.svg,u=_.naturalOnly,d=/@font-face|data:image\//i.test(R)}(D||l)&&(R=Ad(R)),c=_o(R)}catch(R){if(l)throw R;c=e}}let f=new Image;f.loading="eager",f.decoding="sync",f.crossOrigin="anonymous",f.src=c,await f.decode(),De()&&await $d(f,d);let m=f.naturalWidth,p=f.naturalHeight,h=l?m:Number.isFinite(a.vbW)?a.vbW:Number.isFinite(a.w0)?a.w0:m,y=l?p:Number.isFinite(a.vbH)?a.vbH:Number.isFinite(a.h0)?a.h0:p,g,w,v=Number.isFinite(n),b=Number.isFinite(r);if(v&&b)g=Math.max(1,n),w=Math.max(1,r);else if(v){let k=n/Math.max(1,h);g=n,w=y*k}else if(b){let k=r/Math.max(1,y);w=r,g=h*k}else g=m,w=p;g=g*o,w=w*o;let S=g*i,x=w*i,I=Math.max(S/Pe,x/Pe,Math.sqrt(S*x/Vn));I>1&&(console.warn(`[snapDOM] Output ${Math.round(S)}\xD7${Math.round(x)}px exceeds the browser canvas limit (${Pe}px/side); downscaling. Lower \`scale\`/\`dpr\` or set \`width\`/\`height\`.`),g/=I,w/=I);let C=document.createElement("canvas");C.width=g*i,C.height=w*i,C.style.width=`${g}px`,C.style.height=`${w}px`;let M=C.getContext("2d");if(i!==1&&M.scale(i,i),s&&(M.save(),M.fillStyle=s,M.fillRect(0,0,g,w),M.restore()),u&&(Math.round(g*i)!==m||Math.round(w*i)!==p)){let k=document.createElement("canvas");k.width=m,k.height=p,k.getContext("2d").drawImage(f,0,0),M.drawImage(k,0,0,g,w)}else M.drawImage(f,0,0,g,w);return C}var Pe,Vn,$n,Lt=be(()=>{"use strict";ot(),Pe=16384,Vn=16384*16384,$n=null}),_n={};Nt(_n,{rasterize:()=>Ys});async function Ys(e,t){let n=await Xn(e,t),r=await new Promise(i=>{let a=()=>i(n.toDataURL(`image/${t.format}`,t.quality));try{n.toBlob(s=>{if(!s)return a();let l=new FileReader;l.onload=()=>i(String(l.result||"")),l.onerror=a,l.readAsDataURL(s)},`image/${t.format}`,t.quality)}catch{a()}}),o=new Image;return o.src=r,await o.decode(),o.style.width=`${n.width/t.dpr}px`,o.style.height=`${n.height/t.dpr}px`,o}var On=be(()=>{"use strict";Lt()}),ho={};Nt(ho,{toImg:()=>Qa,toSvg:()=>Qa});async function Qa(e,t){let{scale:n=1,width:r,height:o,meta:i={}}=t,a=Number.isFinite(r),s=Number.isFinite(o),l=Number.isFinite(n)&&n!==1||a||s;if(De()&&l)try{let{svg:u}=await Oo($o(e)),d=(u.match(/<svg\b[^>]*>/i)||[])[0]||"",f=parseFloat((d.match(/\bwidth="([\d.]+)/i)||[])[1]),m=parseFloat((d.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(f)||!Number.isFinite(m))throw new Error("svg without dimensions");let p=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:f,h=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:m,y,g;a&&s?(y=r,g=o):a?(y=r,g=Math.round(h*(r/Math.max(1,p)))):s?(g=o,y=Math.round(p*(o/Math.max(1,h)))):(y=Math.round(f*n),g=Math.round(m*n));let w=u.replace(/width="[^"]*"/,`width="${y}"`).replace(/height="[^"]*"/,`height="${g}"`),v=new Image;return v.decoding="sync",v.loading="eager",v.src=_o(w),await v.decode(),v.style.width=`${y}px`,v.style.height=`${g}px`,v}catch(u){return Q(t,"safari vector toImg failed, falling back to PNG",u),Ys(e,{...t,format:"png",quality:1,meta:i})}let c=new Image;if(c.decoding="sync",c.loading="eager",c.src=e,await c.decode(),a&&s)c.style.width=`${r}px`,c.style.height=`${o}px`;else if(a){let u=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:c.naturalWidth,d=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:c.naturalHeight,f=r/Math.max(1,u);c.style.width=`${r}px`,c.style.height=`${Math.round(d*f)}px`}else if(s){let u=Number.isFinite(i.vbW)?i.vbW:Number.isFinite(i.w0)?i.w0:c.naturalWidth,d=Number.isFinite(i.vbH)?i.vbH:Number.isFinite(i.h0)?i.h0:c.naturalHeight,f=o/Math.max(1,d);c.style.height=`${o}px`,c.style.width=`${Math.round(u*f)}px`}else{let u=Math.round(c.naturalWidth*n),d=Math.round(c.naturalHeight*n);if(c.style.width=`${u}px`,c.style.height=`${d}px`,typeof e=="string"&&e.startsWith("data:image/svg+xml"))try{let f=decodeURIComponent(e.split(",")[1]).replace(/width="[^"]*"/,`width="${u}"`).replace(/height="[^"]*"/,`height="${d}"`);e=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,c.src=e}catch(f){Q(t,"SVG width/height patch in toImg failed",f)}}return c}var es=be(()=>{"use strict";Me(),On(),Lt()}),Zs={};Nt(Zs,{toBlob:()=>Xs});async function Xs(e,t){let n=t.type;if(n==="svg"){let o=decodeURIComponent(e.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=await Xn(e,t);return new Promise(o=>r.toBlob(i=>o(i),`image/${n}`,t.quality))}var Ks=be(()=>{"use strict";Lt()}),Js={};Nt(Js,{download:()=>_d});async function ts(e,t){let n=new File([e],t,{type:e.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:t})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function _d(e,t){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(t?.type||"").toLowerCase(),o=n.has(r)?r:"",i=(t?.format||o||"").toLowerCase(),a=i==="jpg"?"jpeg":i||"png",s=t?.filename||`snapdom.${a}`,l={...t||{},format:a,type:a};l.dpr=1;let c=xd();if(a==="svg"){let f=await Xs(e,{...l,type:"svg"});if(c&&await ts(f,s))return;let m=URL.createObjectURL(f),p=document.createElement("a");p.href=m,p.download=s,document.body.appendChild(p),p.click(),URL.revokeObjectURL(m),p.remove();return}let u=await Xn(e,l);if(c){let f=`image/${a}`,m=await new Promise(p=>u.toBlob(p,f,t?.quality));if(m&&await ts(m,s))return}let d=document.createElement("a");d.href=u.toDataURL(`image/${a}`,t?.quality),d.download=s,document.body.appendChild(d),d.click(),d.remove()}var Od=be(()=>{"use strict";Ks(),Lt(),ot()});Me();Me();ge();var go=new WeakMap,Tt=new Map,Pd=2e3,zn=0;function Pn(){zn++,Tt.size>Pd&&Tt.clear()}var Dd="[data-snapdom-sandbox],[data-snapdom-internal],[data-snapdom]";function io(e){let t=e&&(e.nodeType===1?e:e.parentElement);return!!(t&&t.closest&&t.closest(Dd))}function Qs(e){for(let t of e)if(!io(t.target)){if(t.type==="childList"){let n=!0;for(let r of t.addedNodes)if(!io(r)){n=!1;break}if(n){for(let r of t.removedNodes)if(!io(r)){n=!1;break}}if(n)continue}return!0}return!1}var ns=!1;function Wd(e=document.documentElement){if(ns)return;ns=!0;let t=n=>{Qs(n)&&Pn()};try{new MutationObserver(t).observe(e,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(t).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{let n=document.fonts;n&&(n.addEventListener?.("loadingdone",Pn),n.ready?.then(()=>Pn()).catch(()=>{}))}catch{}}var Bd=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function rs(e){let t=go.get(e);if(t&&t.epoch===zn){let n=t.snapshot&&t.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function Hd(e,t={}){let n={},r=t.excludeStyleProps;for(let d=0;d<e.length;d++){let f=e[d];if(No(f)||r&&(r instanceof RegExp&&r.test(f)||typeof r=="function"&&r(f)))continue;let m=e.getPropertyValue(f);(f==="background-image"||f==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),n[f]=m}let o=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let d of o)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}let i=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let d of i)if(!n[d])try{let f=e.getPropertyValue(d);f&&(n[d]=f)}catch{}if(t.embedFonts){let d=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let f of d)if(!n[f])try{let m=e.getPropertyValue(f);m&&(n[f]=m)}catch{}}try{(n["content-visibility"]||e.getPropertyValue("content-visibility"))==="hidden"&&(n["content-visibility"]="hidden")}catch{}let a=!1;{let d=e.getPropertyValue("background-image");if(d&&d!=="none"&&(a=!0),!a){let f=e.getPropertyValue("background-color");f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"&&(a=!0)}if(!a)for(let f of Bd){let m=e.getPropertyValue(f);if(m&&m!=="none"){a=!0;break}}if(!a){let f=e.getPropertyValue("background");f&&/url\s*\(/i.test(f)&&(a=!0)}}Object.defineProperty(n,"__needsBgInline",{value:a,enumerable:!1});let s=parseFloat(e.getPropertyValue("border-top-width")||0)||0,l=parseFloat(e.getPropertyValue("border-right-width")||0)||0,c=parseFloat(e.getPropertyValue("border-bottom-width")||0)||0,u=parseFloat(e.getPropertyValue("border-left-width")||0)||0;if(s===0&&l===0&&c===0&&u===0){let d=(e.getPropertyValue("border-image-source")||"").trim(),f=d&&d!=="none",m=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color"];for(let p of m)delete n[p];f||(n.border="none")}return n}function Ud(e){for(let t=e.firstChild;t;t=t.nextSibling){if(t.nodeType===3&&/\S/.test(t.nodeValue||""))return!0;if(t.nodeType===1){let n=J(t).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function Vd(e,t,n){try{if(typeof e.computedStyleMap=="function"){let o=e.computedStyleMap().get("width");if(o!=null)return!os(String(o).trim().toLowerCase())}}catch{}let r=e.style&&(e.style.width||e.style.inlineSize);return r&&!os(String(r).trim().toLowerCase())?!0:Gd(e,t)?n||qd(e,t):!1}var zd=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function os(e){return zd.has(e)||e.startsWith("fit-content")}function Gd(e,t){let n=e.getBoundingClientRect().width-(parseFloat(t.paddingLeft)||0)-(parseFloat(t.paddingRight)||0)-(parseFloat(t.borderLeftWidth)||0)-(parseFloat(t.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,o=-1/0,i=null;for(let a=e.firstChild;a;a=a.nextSibling){let s;if(a.nodeType===3){if(!/\S/.test(a.nodeValue||"")||(i=i||document.createRange(),i.selectNode(a),s=i.getBoundingClientRect(),!s.width&&!s.height))continue}else if(a.nodeType===1){let l=J(a);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;s=a.getBoundingClientRect()}else continue;s.left<r&&(r=s.left),s.right>o&&(o=s.right)}return o===-1/0?!1:o-r<n-.5}function qd(e,t){let n=e.parentElement;if(!n)return!1;let r=J(n),o=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(t.marginLeft)||0)-(parseFloat(t.marginRight)||0);return o>0?Math.abs(e.getBoundingClientRect().width-o)>.5:!1}var is=new WeakMap;function jd(e){let t=is.get(e);return t||(t=Object.entries(e).sort((n,r)=>n[0]<r[0]?-1:n[0]>r[0]?1:0).map(([n,r])=>`${n}:${r}`).join(";"),is.set(e,t),t)}function Yd(e,t=null,n={}){let r=go.get(e),o=!!(n&&n.embedFonts),i=n&&n.excludeStyleProps||null;if(r&&r.epoch===zn&&r.embedFonts===o&&r.excludeStyleProps===i)return r.snapshot;let a=t||getComputedStyle(e),s=Hd(a,n);return ef(e,a,s),go.set(e,{epoch:zn,snapshot:s,embedFonts:o,excludeStyleProps:i}),s}function Zd(e,t){return e&&e.session&&e.persist?e:e&&(e.styleMap||e.styleCache||e.nodeMap)?{session:e,persist:{snapshotKeyCache:Tt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:t||{}}:{session:A.session,persist:{snapshotKeyCache:Tt,defaultStyle:A.defaultStyle,baseStyle:A.baseStyle,image:A.image,resource:A.resource,background:A.background,font:A.font},options:e||t||{}}}function Xd(e,t,n){if(!(!e.style||e.style.length===0))for(let r=0;r<e.style.length;r++){let o=e.style[r],i=n.getPropertyValue(o);i&&t.style.setProperty(o,i)}}async function Le(e,t,n,r){if(e.tagName==="STYLE")return;let o=Zd(n,r),i=o.options&&o.options.cache||"auto";i!=="disabled"&&Wd(document.documentElement),i==="disabled"&&!o.session.__bumpedForDisabled&&(Pn(),Tt.clear(),o.session.__bumpedForDisabled=!0);let{session:a,persist:s}=o;if(!a.styleCache.has(e)){let y=null;try{y=getComputedStyle(e)}catch{}a.styleCache.set(e,y||getComputedStyle(document.documentElement))}let l=a.styleCache.get(e);e.getAttribute?.("style")&&Xd(e,t,l);let c=l.getPropertyValue("animation-name");t&&t.style&&c&&c!=="none"&&t.style.setProperty("animation","none","important");let u=Yd(e,l,o.options),d=el(e);if(d){let y=l.getPropertyValue("min-width");(!y||y==="auto"||y==="0px")&&(u["min-width"]="0px")}let f=e.tagName?.toLowerCase()||"div",m=jd(u),p=!0;if(Fs(f,(u.display||"").toLowerCase())){p=Ud(e),p&&yd(f,u,d)&&Vd(e,l,d)&&(p=!1),m=`${m}|${f}${p?"|c":""}${d?"|f":""}`;let y=u["text-wrap-mode"]||u["white-space"]||"";p&&y!=="nowrap"&&y!=="pre"&&(a.reconcileRisk=(a.reconcileRisk||0)+1)}let h=s.snapshotKeyCache.get(m);h===void 0&&(h=fo(u,f,p,d),s.snapshotKeyCache.set(m,h)),a.styleMap.set(t,h)}function Kd(e){return e.backgroundImage&&e.backgroundImage!=="none"||e.backgroundColor&&e.backgroundColor!=="rgba(0, 0, 0, 0)"&&e.backgroundColor!=="transparent"||(parseFloat(e.borderTopWidth)||0)>0||(parseFloat(e.borderBottomWidth)||0)>0||(parseFloat(e.paddingTop)||0)>0||(parseFloat(e.paddingBottom)||0)>0?!0:(e.overflowBlock||e.overflowY||"visible")!=="visible"}function el(e){let t=e.parentElement;if(!t)return!1;let n=J(t).display||"";return n.includes("flex")||n.includes("grid")}function Jd(e){for(let r=e.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let t=e.firstElementChild,n=e.lastElementChild;if(t&&t.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=e.firstElementChild;r;r=r.nextElementSibling){let o=J(r);if(o.display==="none")continue;let i=o.position;if(i!=="absolute"&&i!=="fixed")return!0}return!1}function Qd(e){let t=e.getBoundingClientRect().top,n=-1/0,r=null;for(let o=e.firstChild;o;o=o.nextSibling){if(o.nodeType===3){if(!/\S/.test(o.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(o);let s=r.getBoundingClientRect();(s.width||s.height)&&(n=Math.max(n,s.bottom));continue}if(o.nodeType!==1)continue;let i=J(o);if(i.display==="none")continue;let a=i.position;a==="absolute"||a==="fixed"||i.float&&i.float!=="none"||(n=Math.max(n,o.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-t}function ef(e,t,n){if(e instanceof HTMLElement&&e.style&&e.style.height)return;let r=e.tagName&&e.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||t.aspectRatio&&t.aspectRatio!=="none"&&t.aspectRatio!=="auto")return;let o=t.display||"";if(o.includes("flex")||o.includes("grid"))return;let i=t.position;if(i==="absolute"||i==="fixed"||i==="sticky"||t.transform!=="none"||Kd(t)||el(e))return;let a=t.overflowX||t.overflow||"visible",s=t.overflowY||t.overflow||"visible";if(a!=="visible"||s!=="visible")return;let l=t.clip;if(l&&l!=="auto"&&l!=="rect(auto, auto, auto, auto)"||t.visibility==="hidden"||t.opacity==="0"||!Jd(e))return;let c=parseFloat(t.height),u=Qd(e);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}Zn();var tl=["fill","stroke","color","background-color","stop-color"],tf=new Set(["symbol","defs","pattern","marker","linearGradient","radialGradient","filter"]);function yo(e){let t=e;for(;t&&t.nodeType===1;){if(t.namespaceURI==="http://www.w3.org/2000/svg"){if(t.localName==="mask"||t.localName==="clipPath")return!1;if(tf.has(t.localName))return!0}t=t.parentNode}return!1}var as=new Map;function nf(e,t){let n=t+"::"+e.toLowerCase(),r=as.get(n);if(r)return r;let o=document,i=t==="http://www.w3.org/2000/svg"?o.createElementNS(t,e):o.createElement(e),a=o.createElement("div");a.setAttribute("data-snapdom-internal",""),a.style.cssText="position:absolute;left:-99999px;top:-99999px;contain:strict;display:block;",a.appendChild(i),o.documentElement.appendChild(a);let s=getComputedStyle(i),l={};for(let c of tl)l[c]=s.getPropertyValue(c)||"";return a.remove(),as.set(n,l),l}function rf(e,t){if(e?.nodeType!==1||t?.nodeType!==1||yo(e))return;let n=e.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(s&&typeof s.value=="string"&&s.value.includes("var(")){r=!0;break}}}let o=null;if(r)try{o=getComputedStyle(e)}catch{}if(r){let i=e.style;if(i&&i.length){let a=new Set;for(let s=0;s<i.length;s++){let l=i[s];if(a.has(l))continue;a.add(l);let c=i.getPropertyValue(l);if(!c||!c.includes("var("))continue;let u=o&&o.getPropertyValue(l);if(u)try{t.style.setProperty(l,u.trim(),i.getPropertyPriority(l))}catch{}}}}if(r&&e.attributes?.length){let i=e.attributes;for(let a=0;a<i.length;a++){let s=i[a];if(!s||typeof s.value!="string"||!s.value.includes("var("))continue;let l=s.name,c=o&&o.getPropertyValue(l);if(c)try{t.style.setProperty(l,c.trim())}catch{}}}if(!r){if(!o)try{o=getComputedStyle(e)}catch{o=null}if(!o)return;let i=e.namespaceURI||"html",a=nf(e.tagName,i);for(let s of tl){let l=o.getPropertyValue(s)||"",c=a[s]||"";if(l&&l!==c)try{t.style.setProperty(s,l.trim())}catch{}}}}Me();Me();ge();rt();rt();function nt(e){return!!(!e||e.startsWith("data:")||e.startsWith("blob:")||/^data:image\/(gif|png|svg)/.test(e)&&e.length<200)}var ss="img[data-src], img[data-lazy-src], img[data-original], img[data-hi-res-src], img[data-srcset], img[data-lazy-srcset]";function of(e,t){return!e||e?.nodeType!==1?!1:e.matches?.("picture")||e.querySelector("picture")?!0:t?!!(e.matches?.(ss)||e.querySelector(ss)):!1}var af=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i;function Gn(e,t){if(!e)return null;let n=0;try{n=t?t.getBoundingClientRect().width||t.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let i of e.split(",")){let a=i.trim().split(/\s+/);if(!a[0])continue;let s=a[1]||"",l=1;/^\d*\.?\d+x$/i.test(s)?l=parseFloat(s):/^\d+w$/i.test(s)&&(l=parseInt(s,10)/n),r.push({url:a[0],d:l})}if(!r.length)return null;r.sort((i,a)=>i.d-a.d);let o=window.devicePixelRatio||1;return(r.find(i=>i.d>=o)||r[r.length-1]).url}function nl(e,t){let n=e.currentSrc||"";if(n&&!nt(n))return n;let r=t.querySelectorAll("source[srcset]"),o=null;for(let i of r){let a=i.getAttribute("srcset");if(!a||nt(a))continue;let s=i.getAttribute("type");if(s&&!af.test(s.trim()))continue;let l=i.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return Gn(a,e)}catch{}o||(o=Gn(a,e))}return o}function sf(e){let t=[e.getAttribute("data-src"),e.getAttribute("data-lazy-src"),e.getAttribute("data-original"),e.getAttribute("data-hi-res-src")];for(let r of t)if(r&&!nt(r))return r;let n=e.getAttribute("data-srcset")||e.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!nt(r))return r}return null}function lf(e={}){let t=e.pictureResolver&&typeof e.pictureResolver=="object"?e.pictureResolver:{};return{timeout:t.timeout??5e3,concurrency:t.concurrency??4,resolveLazySrc:t.resolveLazySrc!==!1,silent:t.silent??!1,useProxy:typeof e.useProxy=="string"?e.useProxy:""}}async function cf(e,t={}){if(!e||e?.nodeType!==1||t.resolvePicturePlaceholders===!1)return null;let{timeout:n,concurrency:r,resolveLazySrc:o,silent:i,useProxy:a}=lf(t);if(!of(e,o))return null;let s=[],l=[];async function c(f){let m=await Ce(f,{as:"dataURL",timeout:n,useProxy:a,silent:!0});return m.ok?m.data:null}async function u(f){for(let m=0;m<f.length;m+=r){let p=f.slice(m,m+r);await Promise.allSettled(p.map(h=>h()))}}let d=Array.from(e.querySelectorAll("picture"));e.matches?.("picture")&&d.unshift(e);for(let f of d){let m=f.querySelector("img");if(!m)continue;let p=m.getAttribute("src")||"";if(!nt(p))continue;let h=nl(m,f);h&&l.push(async()=>{let y=await c(h);if(!y){i||console.warn(`[snapdom:picture-resolver] Failed to fetch: ${h.slice(0,60)}`);return}let g=m.getAttribute("src"),w=m.getAttribute("srcset"),v=m.getAttribute("sizes"),b=[];m.src=y,m.setAttribute("src",y),m.removeAttribute("srcset"),m.removeAttribute("sizes");let S=f.querySelectorAll("source");for(let x of S)b.push({el:x,parent:x.parentElement,next:x.nextSibling}),x.remove();s.push(()=>{g!==null?m.setAttribute("src",g):m.removeAttribute("src"),w!==null&&m.setAttribute("srcset",w),v!==null&&m.setAttribute("sizes",v);for(let{el:x,parent:I,next:C}of b)I&&I.insertBefore(x,C)})})}if(o){let f=Array.from(e.querySelectorAll("img"));e.localName==="img"&&f.unshift(e);for(let m of f){if(m.closest("picture")&&nt(m.getAttribute("src")||""))continue;let p=m.getAttribute("src")||"",h=sf(m);h&&nt(p)&&l.push(async()=>{let y=await c(h);if(!y)return;let g=m.getAttribute("src");m.src=y,m.setAttribute("src",y),m.removeAttribute("srcset"),m.removeAttribute("sizes"),s.push(()=>{g!==null?m.setAttribute("src",g):m.removeAttribute("src")})})}}return l.length===0?null:(await u(l),async function(){for(let f of s)try{f()}catch{}})}function ao(e,t,n){return n?Promise.all(e.map(r=>new Promise(o=>t(r,o)))):Promise.all(e.map(r=>new Promise(o=>{function i(){Fn(a=>{!(a&&typeof a.timeRemaining=="function")||a.timeRemaining()>0?t(r,o):i()},{fast:n})}i()})))}function uf(e,t){if(e=e.trim(),!e)return e;let n=t?`[data-sd-slotted~="${t}"]`:"[data-sd-slotted]";return e.endsWith(":not([data-sd-slotted])")||e.endsWith(`:not(${n})`)?e:`${e}:not(${n})`}function df(e,t,n=!0,r){return e.split(",").map(o=>o.trim()).filter(Boolean).map(o=>{if(o.startsWith(":where(")||o.startsWith("@"))return o;let i=n?uf(o,r):o;return`:where(${t} ${i})`}).join(", ")}function ff(e,t,n){return e?(e=e.replace(/:host\(([^)]+)\)/g,(r,o)=>`:where(${t}:is(${o.trim()}))`),e=e.replace(/:host\b/g,`:where(${t})`),e=e.replace(/:host-context\(([^)]+)\)/g,(r,o)=>`:where(:where(${o.trim()}) ${t})`),e=e.replace(/::slotted\(([^)]+)\)/g,(r,o)=>`:where(${t} ${o.trim()})`),e=e.replace(/(^|})(\s*)([^@}{]+){/g,(r,o,i,a)=>{let s=df(a,t,!0,n);return`${o}${i}${s}{`}),e):""}function pf(e){return e.shadowScopeSeq=(e.shadowScopeSeq||0)+1,`s${e.shadowScopeSeq}`}function mf(e){let t="";try{e.querySelectorAll("style").forEach(r=>{t+=(r.textContent||"")+`
|
|
75
75
|
`});let n=e.adoptedStyleSheets||[];for(let r of n)try{if(r&&r.cssRules)for(let o of r.cssRules)t+=o.cssText+`
|
|
76
|
-
`}catch{}}catch{}return t}function
|
|
77
|
-
`:""}function sf(e,t){if(!e)return;let n=r=>{let o=r.getAttribute("data-sd-slotted")||"";t?` ${o} `.includes(` ${t} `)||r.setAttribute("data-sd-slotted",o?`${o} ${t}`:t):r.setAttribute("data-sd-slotted",o)};e.nodeType===Node.ELEMENT_NODE&&n(e),e.querySelectorAll?.("*").forEach(n)}async function lf(e,t=3){let n=()=>{try{return e.contentDocument||e.contentWindow?.document||null}catch{return null}},r=n(),o=0;for(;o<t&&(!r||!r.body&&!r.documentElement);)await new Promise(i=>setTimeout(i,0)),r=n(),o++;return r&&(r.body||r.documentElement)?r:null}function cf(e){let t=e.getBoundingClientRect(),n=0,r=0,o=0,i=0;try{let l=getComputedStyle(e);n=parseFloat(l.borderLeftWidth)||0,r=parseFloat(l.borderRightWidth)||0,o=parseFloat(l.borderTopWidth)||0,i=parseFloat(l.borderBottomWidth)||0}catch{}let a=Math.max(0,Math.round(t.width-(n+r))),s=Math.max(0,Math.round(t.height-(o+i)));return{contentWidth:a,contentHeight:s,rect:t}}function Le(e){let t=0,n=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(n=e.offsetHeight),t===0||n===0)try{let r=getComputedStyle(e);if(t===0){let o=parseFloat(r.width);!isNaN(o)&&o>0&&(t=o)}if(n===0){let o=parseFloat(r.height);!isNaN(o)&&o>0&&(n=o)}}catch{}if(t===0||n===0)try{if(t===0){let r=parseFloat(e.getAttribute("width"));!isNaN(r)&&r>0&&(t=r)}if(n===0){let r=parseFloat(e.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((t===0||n===0)&&(e.naturalWidth||e.naturalHeight))try{t===0&&e.naturalWidth>0&&(t=e.naturalWidth),n===0&&e.naturalHeight>0&&(n=e.naturalHeight)}catch{}return{width:t,height:n}}function uf(e,t,n){let r=e.defaultView,o=r?r.scrollX:0,i=r?r.scrollY:0,a=e.body?e.body.scrollLeft:0,s=e.body?e.body.scrollTop:0,l=e.documentElement?e.documentElement.scrollLeft:0,c=e.documentElement?e.documentElement.scrollTop:0,u=0,d=0,f=0,m=0;try{let h=r&&e.body?r.getComputedStyle(e.body):null;h&&(u=(parseFloat(h.marginTop)||0)+(parseFloat(h.paddingTop)||0),d=(parseFloat(h.marginRight)||0)+(parseFloat(h.paddingRight)||0),f=(parseFloat(h.marginBottom)||0)+(parseFloat(h.paddingBottom)||0),m=(parseFloat(h.marginLeft)||0)+(parseFloat(h.paddingLeft)||0))}catch{}try{e.documentElement.setAttribute("data-sd-pinned","")}catch{}let p=e.createElement("style");return p.setAttribute("data-sd-iframe-pin",""),p.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${u}px ${d}px ${f}px ${m}px !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(p),()=>{try{p.remove()}catch{}try{e.documentElement.removeAttribute("data-sd-pinned")}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(o,i),e.body&&(e.body.scrollLeft=a,e.body.scrollTop=s),e.documentElement&&(e.documentElement.scrollLeft=l,e.documentElement.scrollTop=c)}catch{}}}async function df(e,t,n){let r=await lf(e,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:o,contentHeight:i,rect:a}=cf(e),s=n?.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||typeof s.toPng!="function")throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let l={...n,scale:1,clip:null},c=uf(r,o,i),u=A.session.nodeMap,d=A.session.styleMap,f=A.session.styleCache,m;try{m=await s.toPng(r.documentElement,l)}finally{c(),A.session.nodeMap=u,A.session.styleMap=d,A.session.styleCache=f}m.style.display="block",m.style.width=`${o}px`,m.style.height=`${i}px`;let p=document.createElement("div");return t.nodeMap.set(p,e),Ne(e,p,t,n),p.style.overflow="hidden",p.style.display="block",p.style.width||(p.style.width=`${Math.round(a.width)}px`),p.style.height||(p.style.height=`${Math.round(a.height)}px`),p.appendChild(m),p}function ff(e){let{width:t,height:n}=Le(e),r=e.getBoundingClientRect(),o;try{o=window.getComputedStyle(e)}catch{}let i=o?parseFloat(o.width):NaN,a=o?parseFloat(o.height):NaN,s=Math.round(t||r.width||0),l=Math.round(n||r.height||0),c=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,s||16),u=Number.isFinite(a)&&a>0?Math.round(a):Math.max(12,l||16),d=(e.type||"text").toLowerCase()==="checkbox",f=!!e.checked,m=!!e.indeterminate,p=Math.max(Math.min(c,u),12),h="middle";try{o&&o.verticalAlign&&(h=o.verticalAlign)}catch{}let y=document.createElement("div");y.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),y.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${h};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(p)),g.setAttribute("height",String(p)),g.setAttribute("viewBox",`0 0 ${p} ${p}`),y.appendChild(g);function w(){let v="#0a6ed1";try{o&&(v=o.accentColor||o.color||v)}catch{}let b=2,S=b/2,x=p-b;if(g.innerHTML="",d){let I=document.createElementNS("http://www.w3.org/2000/svg","rect");if(I.setAttribute("x",String(S)),I.setAttribute("y",String(S)),I.setAttribute("width",String(x)),I.setAttribute("height",String(x)),I.setAttribute("rx","2"),I.setAttribute("ry","2"),I.setAttribute("fill",f?v:"none"),I.setAttribute("stroke",v),I.setAttribute("stroke-width",String(b)),g.appendChild(I),f){let C=document.createElementNS("http://www.w3.org/2000/svg","path");C.setAttribute("d",`M ${S+2} ${p/2} L ${p/2-1} ${p-S-2} L ${p-S-2} ${S+2}`),C.setAttribute("stroke","white"),C.setAttribute("stroke-width",String(Math.max(1.5,b))),C.setAttribute("fill","none"),C.setAttribute("stroke-linecap","round"),C.setAttribute("stroke-linejoin","round"),g.appendChild(C)}else if(m){let C=document.createElementNS("http://www.w3.org/2000/svg","rect"),E=Math.max(6,x-4);C.setAttribute("x",String((p-E)/2)),C.setAttribute("y",String((p-b)/2)),C.setAttribute("width",String(E)),C.setAttribute("height",String(b)),C.setAttribute("fill",v),C.setAttribute("rx","1"),g.appendChild(C)}}else{let I=document.createElementNS("http://www.w3.org/2000/svg","circle");if(I.setAttribute("cx",String(p/2)),I.setAttribute("cy",String(p/2)),I.setAttribute("r",String((p-b)/2)),I.setAttribute("fill",f?v:"none"),I.setAttribute("stroke",v),I.setAttribute("stroke-width",String(b)),g.appendChild(I),f){let C=document.createElementNS("http://www.w3.org/2000/svg","circle"),E=Math.max(2,(p-b*2)*.35);C.setAttribute("cx",String(p/2)),C.setAttribute("cy",String(p/2)),C.setAttribute("r",String(E)),C.setAttribute("fill","white"),g.appendChild(C)}}y.style.setProperty("width",`${p}px`,"important"),y.style.setProperty("height",`${p}px`,"important"),y.style.setProperty("min-width",`${p}px`,"important"),y.style.setProperty("min-height",`${p}px`,"important")}return w(),{el:y,applyVisual:w}}var Mt=new he(80);async function kt(e){if(A.resource?.has(e))return A.resource.get(e);if(Mt.has(e))return Mt.get(e);let t=(async()=>{let n=await Ce(e,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return A.resource?.set(e,n.data),n.data})();Mt.set(e,t);try{let n=await t;return Mt.set(e,n),n}catch(n){throw Mt.delete(e),n}}var pf=/\bblob:[^)"'\s]+/g;async function Ja(e){if(!e||e.indexOf("blob:")===-1)return e;let t=Array.from(new Set(e.match(pf)||[]));if(t.length===0)return e;let n=e;for(let r of t)try{let o=await kt(r);n=n.split(r).join(o)}catch{}return n}function En(e){return typeof e=="string"&&e.startsWith("blob:")}function mf(e){return(e||"").split(",").map(t=>t.trim()).filter(Boolean).map(t=>{let n=t.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function hf(e){return e.map(t=>t.desc?`${t.url} ${t.desc.trim()}`:t.url).join(", ")}function kn(e,t){let n=e.querySelectorAll?Array.from(e.querySelectorAll(t)):[];return e.matches?.(t)&&n.unshift(e),n}async function gf(e,t=null){if(!e)return;let n=t,r=kn(e,"img");for(let l of r)try{let c=l.getAttribute("src")||l.currentSrc||"";if(En(c)){let d=await kt(c);l.setAttribute("src",d)}let u=l.getAttribute("srcset");if(u&&u.includes("blob:")){let d=mf(u),f=!1;for(let m of d)if(En(m.url))try{m.url=await kt(m.url),f=!0}catch(p){Q(n,"blobUrlToDataUrl for srcset item failed",p)}f&&l.setAttribute("srcset",hf(d))}}catch(c){Q(n,"resolveBlobUrls for img failed",c)}let o=kn(e,"image");for(let l of o)try{let c="http://www.w3.org/1999/xlink",u=l.getAttribute("href")||l.getAttributeNS?.(c,"href");if(En(u)){let d=await kt(u);l.setAttribute("href",d),l.removeAttributeNS?.(c,"href")}}catch(c){Q(n,"resolveBlobUrls for SVG image href failed",c)}let i=kn(e,"[style*='blob:']");for(let l of i)try{let c=l.getAttribute("style");if(c&&c.includes("blob:")){let u=await Ja(c);l.setAttribute("style",u)}}catch(c){Q(n,"replaceBlobUrls in inline style failed",c)}let a=e.querySelectorAll?e.querySelectorAll("style"):[];for(let l of a)try{let c=l.textContent||"";c.includes("blob:")&&(l.textContent=await Ja(c))}catch(c){Q(n,"replaceBlobUrls in style tag failed",c)}let s=["poster"];for(let l of s){let c=kn(e,`[${l}^='blob:']`);for(let u of c)try{let d=u.getAttribute(l);En(d)&&u.setAttribute(l,await kt(d))}catch(d){Q(n,`resolveBlobUrls for ${l} failed`,d)}}}ot();var po=new Map,Qa=new Set(["IFRAME"]);function Kn(e,t){po.set(String(e).toUpperCase(),t)}function no(e){let{width:t,height:n}=Le(e),r=t,o=n;if(!r||!o){let a=e.getBoundingClientRect();r=r||a.width||0,o=o||a.height||0}let i=document.createElement("div");return i.style.cssText=`display:inline-block;width:${r}px;height:${o}px;visibility:hidden;`,i}var Tn=200,yf=new Set(["img","canvas","video","iframe","object","embed"]);function es(e,t){return e.right>=t.left-Tn&&e.left<=t.right+Tn&&e.bottom>=t.top-Tn&&e.top<=t.bottom+Tn}function bf(e,t){if(e===t.root)return!1;let n;try{n=e.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=J(e);if(r.display==="inline"&&!yf.has((e.localName||"").toLowerCase()))return!1;let o=t.rect,i=e.scrollWidth||0,a=e.scrollHeight||0,s={left:r.direction==="rtl"?Math.min(n.left,n.right-i):n.left,top:n.top,right:Math.max(n.right,n.left+i),bottom:Math.max(n.bottom,n.top+a)},l=r.writingMode||"";if((l.startsWith("vertical")||l.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-a),s.left=Math.min(s.left,n.right-i)),es(s,o))return!1;let c=(e.ownerDocument||document).createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;c.nextNode();){let u=c.currentNode.getBoundingClientRect();if((u.width>0||u.height>0)&&es(u,o))return!1}return!0}function wf(e,t,n){let r=e.cloneNode(!1);e.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),Ne(e,r,t,n);let{width:o,height:i}=Le(e);return o>0&&(r.style.width=`${o}px`,r.style.minWidth=`${o}px`,r.style.maxWidth=`${o}px`),i>0&&(r.style.height=`${i}px`,r.style.minHeight=`${i}px`,r.style.maxHeight=`${i}px`),r.style.visibility="hidden",r.style.overflow="hidden",r.style.boxSizing="border-box",r}async function Dn(e,t,n){if(!e)throw new Error("Invalid node");let r=new Set,o=null,i=null;if(e.nodeType===Node.ELEMENT_NODE){let u=(e.localName||e.tagName||"").toLowerCase();if(e.id==="snapdom-sandbox"||e.hasAttribute("data-snapdom-sandbox")||Is.has(u))return null;if(u==="foreignobject"&&e.parentElement?.closest?.("foreignObject"))return Q(t,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null;if(u==="source"&&e.parentElement?.localName==="picture")return null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if(e.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return no(e);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let u of n.exclude)try{if(e.matches?.(u)){if(n.excludeMode==="hide")return no(e);if(n.excludeMode==="remove")return null}}catch(d){console.warn(`Invalid selector in exclude option: ${u}`,d)}if(typeof n.filter=="function")try{if(!n.filter(e)){if(n.filterMode==="hide")return no(e);if(n.filterMode==="remove")return null}}catch(u){console.warn("Error in filter function:",u)}if(t.clip&&bf(e,t.clip))return wf(e,t,n);if(n.__resolveNodeHooks)for(let u of n.__resolveNodeHooks){let d;try{d=await u(e,n)}catch(f){Q(t,"resolveNode plugin hook failed",f)}if(d===null)return null;if(d instanceof Node)return d.nodeType===Node.ELEMENT_NODE&&(t.nodeMap.set(d,e),Ne(e,d,t,n)),d}{let u=Qa.has(e.tagName)&&po.get(e.tagName);if(u){let d=await u(e,t,n);if(d!==void 0)return d}}if(e.getAttribute("data-capture")==="placeholder"){let u=e.cloneNode(!1);t.nodeMap.set(u,e),Ne(e,u,t,n);let d=document.createElement("div");return d.textContent=e.getAttribute("data-placeholder-text")||"",d.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",u.appendChild(d),u}{let u=!Qa.has(e.tagName)&&po.get(e.tagName);if(u){let d=await u(e,t,n);if(d!==void 0)return d}}let a;try{if(a=e.cloneNode(!1),a.attributes?.length)try{for(let u of a.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(u.value)&&a.setAttribute(u.name,u.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(zd(e,a),t.nodeMap.set(a,e),e.tagName==="IMG"){nf(e,a);try{let{width:u,height:d}=Le(e),f=Math.round(u||0),m=Math.round(d||0);f&&(a.dataset.snapdomWidth=String(f)),m&&(a.dataset.snapdomHeight=String(m))}catch(u){Q(t,"getUnscaledDimensions for IMG failed",u)}try{let u=e.getAttribute("style")||"",d=window.getComputedStyle(e),f=v=>{let b=u.match(new RegExp(`${v}\\s*:\\s*([^;]+)`,"i")),S=b?b[1].trim():d.getPropertyValue(v);return/%|auto/i.test(String(S||""))},m=parseInt(a.dataset.snapdomWidth||"0",10),p=parseInt(a.dataset.snapdomHeight||"0",10),h=f("width")||!m,y=f("height")||!p;h&&m&&(a.style.width=`${m}px`),y&&p&&(a.style.height=`${p}px`);let g=d.getPropertyValue("object-fit"),w=d.getPropertyValue("object-position");g&&g!=="fill"?(a.style.objectFit=g,w&&(a.style.objectPosition=w)):(m&&(a.style.minWidth=`${m}px`),p&&(a.style.minHeight=`${p}px`))}catch(u){Q(t,"IMG dimension freeze failed",u)}}}catch(u){throw console.error("[Snapdom] Failed to clone node:",e,u),u}let s=null;if(e instanceof HTMLTextAreaElement){let{width:u,height:d}=Le(e),f=u||e.getBoundingClientRect().width||0,m=d||e.getBoundingClientRect().height||0;f&&(a.style.width=`${f}px`),m&&(a.style.height=`${m}px`)}if(e instanceof HTMLInputElement){let u=(e.type||"text").toLowerCase();if((u==="checkbox"||u==="radio")&&dd()){let{el:d,applyVisual:f}=ff(e);t.nodeMap.set(d,e),s=f,a=d}else a.value=e.value,a.setAttribute("value",e.value),e.checked!==void 0&&(a.checked=e.checked,e.checked&&a.setAttribute("checked",""),e.indeterminate&&(a.indeterminate=e.indeterminate))}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let u=window.getComputedStyle(e,"::placeholder"),d=u&&u.color;if(d&&d!=="rgba(0, 0, 0, 0)"){let f="snapdom-ph-"+(Math.random()*1e6|0);a.classList.add(f);let m=document.createElement("style");m.textContent=`.${f}::placeholder{color:${d}!important;opacity:${u.opacity||"1"}!important;-webkit-text-fill-color:${d}!important;}`,a.prepend(m)}}catch{}if(e instanceof HTMLSelectElement&&(o=e.value),e instanceof HTMLTextAreaElement&&(i=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&a.setAttribute("disabled",""),e.required&&a.setAttribute("required",""),e.readOnly&&a.setAttribute("readonly","");let u=e;u.min!==void 0&&u.min!==""&&a.setAttribute("min",u.min),u.max!==void 0&&u.max!==""&&a.setAttribute("max",u.max),u.pattern!==void 0&&u.pattern!==""&&a.setAttribute("pattern",u.pattern);let d=e.getAttribute("aria-invalid");d!==null&&a.setAttribute("aria-invalid",d)}if(fo(e)||Ne(e,a,t,n),s&&s(),e instanceof SVGElement&&!fo(e)){let u=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let d=window.getComputedStyle(e);for(let f of u){let m=d.getPropertyValue(f);m&&a.style.setProperty(f,m)}}catch{}}if(e.shadowRoot){try{let v=e.shadowRoot.querySelectorAll("slot");for(let b of v){let S=b.assignedNodes?.()||[];for(let x of S)r.add(x)}}catch{}let u=Qd(t),d=`[data-sd="${u}"]`;t.shadowScopes||(t.shadowScopes=new WeakMap),t.shadowScopes.set(e.shadowRoot,u);try{a.setAttribute("data-sd",u)}catch{}let f=ef(e.shadowRoot),m=Jd(f,d,u),p=rf(f),h=af(e,p,d);tf(a,h+m,u);let y=document.createDocumentFragment(),g=(v,b)=>{if(v.nodeType===Node.ELEMENT_NODE&&v.tagName==="STYLE")return b(null);Dn(v,t,n).then(S=>{b(S||null)}).catch(()=>{b(null)})},w=await to(Array.from(e.shadowRoot.childNodes),g,n.fast);y.append(...w.filter(v=>!!v)),a.appendChild(y)}if(e.tagName==="SLOT"){let u=t.shadowScopes?.get(e.getRootNode()),d=e.assignedNodes?.()||[],f=d.length?e.assignedNodes?.({flatten:!0})||d:[],m=f.length?f:Array.from(e.childNodes),p=document.createDocumentFragment(),h=(g,w)=>{Dn(g,t,n).then(v=>{v&&d.length&&sf(v,u),w(v||null)}).catch(()=>{w(null)})},y=await to(Array.from(m),h,n.fast);return p.append(...y.filter(g=>!!g)),p}function l(u,d){if(r.has(u))return d(null);Dn(u,t,n).then(f=>{d(f||null)}).catch(()=>{d(null)})}let c=await to(Array.from(e.childNodes),l,n.fast);if(a.append(...c.filter(u=>!!u)),o!==null&&a instanceof HTMLSelectElement){a.value=o;for(let u of a.options)u.value===o?u.setAttribute("selected",""):u.removeAttribute("selected")}return i!==null&&a instanceof HTMLTextAreaElement&&(a.textContent=i),a}async function vf(e,t,n){let r=!1;try{r=!!(e.contentDocument||e.contentWindow?.document)}catch(o){Q(t,"iframe same-origin probe failed",o)}if(r)try{return await df(e,t,n)}catch(o){console.warn("[SnapDOM] iframe rasterization failed, fallback:",o)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",e),n.placeholders){let{width:o,height:i}=Le(e),a=document.createElement("div");return a.style.cssText=`width:${o}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Ne(e,a,t,n),a}else{let{width:o,height:i}=Le(e),a=document.createElement("div");return a.style.cssText=`display:inline-block;width:${o}px;height:${i}px;visibility:hidden;`,Ne(e,a,t,n),a}}function Sf(e){try{let t=Math.max(1,Math.min(32,e.width)),n=Math.max(1,Math.min(32,e.height)),r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d",{willReadFrequently:!0});if(!o)return!1;o.drawImage(e,0,0,t,n);let i=o.getImageData(0,0,t,n).data;for(let a=3;a<i.length;a+=4)if(i[a]!==0)return!1;return!0}catch{return!1}}async function Cf(e,t,n){let r="";try{let s=e.getContext("2d",{willReadFrequently:!0});try{s&&s.getImageData(0,0,1,1)}catch{}if((De()||!s)&&await tt(),r=e.toDataURL("image/png"),!r||r==="data:,"){try{s&&s.getImageData(0,0,1,1)}catch{}if(await tt(),r=e.toDataURL("image/png"),!r||r==="data:,"){let l=document.createElement("canvas");l.width=e.width,l.height=e.height;let c=l.getContext("2d");c&&(c.drawImage(e,0,0),r=l.toDataURL("image/png"))}}}catch(s){Q(t,"Canvas toDataURL failed, using empty/fallback",s)}n&&n.debug&&r&&Sf(e)&&Q(t,"canvas is empty at capture time \u2014 capture it after its first frame is drawn",e);let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch(s){Q(t,"img decoding/loading hints failed",s)}r&&(o.src=r),o.width=e.width,o.height=e.height;let{width:i,height:a}=Le(e);return i>0&&(o.style.width=`${i}px`),a>0&&(o.style.height=`${a}px`),t.nodeMap.set(o,e),Ne(e,o,t,n),o}async function xf(e,t,n){let r="";try{let s=document.createElement("canvas");s.width=e.videoWidth||e.offsetWidth||320,s.height=e.videoHeight||e.offsetHeight||240;let l=s.getContext("2d");l&&(l.drawImage(e,0,0,s.width,s.height),r=s.toDataURL("image/png"),(!r||r==="data:,")&&(r=""))}catch(s){Q(t,"Video frame capture failed, using poster fallback",s)}let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}r?o.src=r:e.poster&&(o.src=e.poster),o.width=e.videoWidth||e.offsetWidth||0,o.height=e.videoHeight||e.offsetHeight||0;let{width:i,height:a}=Le(e);return i>0&&(o.style.width=`${i}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",t.nodeMap.set(o,e),Ne(e,o,t,n),o}async function If(e,t,n){if(!e.controls)return;let{width:r,height:o}=Le(e),i=Math.round(r||e.offsetWidth||300),a=Math.round(o||e.offsetHeight||54),s=a/2,l=Math.max(4,a*.16),c=a*.34,u=i-a*.34,d=c+l+a*.55,f=Math.max(0,u-a*.7-d),m=Math.max(9,Math.round(a*.24)),p=`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${a}" viewBox="0 0 ${i} ${a}"><rect width="${i}" height="${a}" rx="${Math.min(a/2,10)}" fill="#f1f3f4"/><path d="M ${c} ${s-l} L ${c+l} ${s} L ${c} ${s+l} Z" fill="#5f6368"/><rect x="${d}" y="${s-1.5}" width="${f}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${d}" cy="${s}" r="${Math.max(3,a*.09)}" fill="#5f6368"/><text x="${u}" y="${s}" fill="#5f6368" font-family="sans-serif" font-size="${m}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,h=document.createElement("img");try{h.decoding="sync",h.loading="eager"}catch{}return h.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,h.width=i,h.height=a,h.style.width=`${i}px`,h.style.height=`${a}px`,t.nodeMap.set(h,e),Ne(e,h,t,n),h}Kn("IFRAME",vf);Kn("CANVAS",Cf);Kn("VIDEO",xf);Kn("AUDIO",If);Ee();Yn();Zn();ge();ge();var Af=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],ht=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),js=[],ts=new Set;function Mf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ef(e){let t=Array.isArray(e)?e:[e];for(let n of t){let r;if(n instanceof RegExp)r=n;else if(typeof n=="string")r=new RegExp(Mf(n),"i");else{console.warn("[snapdom] Ignored invalid iconFont value:",n);continue}let o=`${r.source}/${r.flags}`;ts.has(o)||(ts.add(o),js.push(r))}}function Oe(e){let t=typeof e=="string"?e:"",n=[...Af,...js];for(let r of n)if(r instanceof RegExp&&r.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function kf(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var ns=new Map;function Tf(e=""){let t=Object.create(null),n=String(e||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,o;for(;o=r.exec(n);)t[o[1].toUpperCase()]=Number(o[2]);return t}async function Rf(e,t,n){let r=String(e||""),o=r.toLowerCase(),i=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(o)&&!/\bsymbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),s="outlined";/\brounded\b/.test(i)||/\bround\b/.test(i)?s="rounded":/\bsharp\b/.test(i)?s="sharp":/\boutlined\b/.test(i)&&(s="outlined");let l=a===1,c=null;if(l&&(s==="outlined"&&ht.materialIconsFilled?c={url:ht.materialIconsFilled,alias:"snapdom-mi-filled"}:s==="rounded"&&ht.materialIconsRound?c={url:ht.materialIconsRound,alias:"snapdom-mi-round"}:s==="sharp"&&ht.materialIconsSharp&&(c={url:ht.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:r,familyForCanvas:r};if(!ns.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});document.fonts.add(d),await d.load(),ns.set(c.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Nf(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function Lf(e){let t=e.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(t)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(t);if(t&&!n&&t.toLowerCase()!=="currentcolor")return t;let r=e.color?.trim();return r&&r!=="inherit"?r:"#000"}async function Ff(e,{family:t="Material Icons",weight:n="normal",fontSize:r=32,color:o="#000",variation:i="",className:a=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,c=Tf(i),{familyForMeasure:u,familyForCanvas:d}=await Rf(s,a,c);await Nf(d.replace(/^["']+|["']+$/g,""),r);let f=document.createElement("span");f.setAttribute("data-snapdom-internal",""),f.textContent=e,f.style.position="absolute",f.style.visibility="hidden",f.style.left="-99999px",f.style.whiteSpace="nowrap",f.style.fontFamily=u,f.style.fontWeight=String(n||"normal"),f.style.fontSize=`${r}px`,f.style.lineHeight="1",f.style.margin="0",f.style.padding="0",f.style.fontFeatureSettings="'liga' 1",f.style.fontVariantLigatures="normal",f.style.color=o,document.body.appendChild(f);let m=f.getBoundingClientRect(),p=Math.max(1,Math.ceil(m.width)),h=Math.max(1,Math.ceil(m.height));document.body.removeChild(f);let y=document.createElement("canvas");y.width=p*l,y.height=h*l;let g=y.getContext("2d");g.scale(l,l),g.font=`${n?`${n} `:""}${r}px ${d}`,g.textAlign="left",g.textBaseline="top",g.fillStyle=o;try{g.fontKerning="normal"}catch{}return g.fillText(e,0,0),{dataUrl:y.toDataURL(),width:p,height:h}}async function $f(e,t,n=A.session.nodeMap){if(e?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',o=Array.from(e.querySelectorAll(r)).filter(s=>s&&s.textContent&&s.textContent.trim());if(e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e),o.length===0)return 0;let i=t?.nodeType===1?Array.from(t.querySelectorAll(r)).filter(s=>s&&s.textContent&&s.textContent.trim()):[];t?.nodeType===1&&t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t);let a=0;for(let s=0;s<o.length;s++){let l=o[s],c=n&&n.get(l)||i[s]||null;try{let u=getComputedStyle(c||l),d=u.fontFamily||"Material Icons";if(!kf(d))continue;let f=(c||l).textContent.trim();if(!f)continue;let m=parseInt(u.fontSize,10)||24,p=u.fontWeight&&u.fontWeight!=="normal"?u.fontWeight:"normal",h=Lf(u),y=u.fontVariationSettings&&u.fontVariationSettings!=="normal"?u.fontVariationSettings:"",g=(c||l).className||"",{dataUrl:w,width:v,height:b}=await Ff(f,{family:d,weight:p,fontSize:m,color:h,variation:y,className:g});l.textContent="";let S=l.ownerDocument.createElement("img");S.src=w,S.alt=f,S.style.height=`${m}px`,S.style.width=`${Math.max(1,Math.round(v/b*m))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(l).verticalAlign||"baseline",l.appendChild(S),a++}catch{}}return a}rt();ot();async function _f(e,t,n,r=32,o="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let i=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");a.setAttribute("data-snapdom-internal",""),a.textContent=e,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${t}"`,a.style.fontWeight=n||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let s=a.getBoundingClientRect(),l=Math.ceil(s.width),c=Math.ceil(s.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,l*i),u.height=Math.max(1,c*i);let d=u.getContext("2d");return d.scale(i,i),d.font=n?`${n} ${r}px "${t}"`:`${r}px "${t}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=o,d.fillText(e,0,0),{dataUrl:u.toDataURL(),width:l,height:c}}var Ys=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Of=["katex","mathjax","mathml"];function Lo(e){if(!e)return"";for(let t of e.split(",")){let n=t.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Ys.has(n.toLowerCase()))return n}return""}function Pf(e){if(!e)return[];let t=[];for(let n of e.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(Ys.has(r.toLowerCase())||t.push(r))}return t}function Wn(e){let t=String(e??"400").trim().toLowerCase();if(t==="normal")return 400;if(t==="bold")return 700;let n=parseInt(t,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Bn(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function Df(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function Wf(e){let t=String(e||"400").trim(),n=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let o=Wn(n[1]),i=Wn(n[2]);return{min:Math.min(o,i),max:Math.max(o,i)}}let r=Wn(t);return{min:r,max:r}}function Bf(e){let t=String(e||"normal").trim().toLowerCase();return t==="italic"?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Hf(e){let t=String(e||"100%").trim(),n=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let i=parseFloat(n[1]),a=parseFloat(n[2]);return{min:Math.min(i,a),max:Math.max(i,a)}}let r=t.match(/(\d+(?:\.\d+)?)\s*%/),o=r?parseFloat(r[1]):100;return{min:o,max:o}}function Uf(e){return!e||typeof e!="string"?"":e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Vf(e,t,n=[]){if(!e)return!1;try{let r=new URL(e,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(a=>o.endsWith(a))||n.some(a=>o===a.toLowerCase()||o.endsWith("."+a.toLowerCase())))return!0;let i=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(i)||/\.woff2?(\b|$)/.test(i)||Of.some(a=>i.includes(a)))return!0;for(let a of t){let s=a.toLowerCase().replace(/\s+/g,"+"),l=a.toLowerCase().replace(/\s+/g,"-"),c=Uf(a);if(i.includes(s)||i.includes(l)||c&&i.includes(c))return!0}return!1}catch{return!1}}function zf(e){let t=new Set;for(let n of e||[]){let r=String(n).split("__")[0]?.trim();r&&t.add(r)}return t}function rs(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,o)=>{let i=(o||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return n;let a=i;try{a=new URL(i,t||location.href).href}catch{}return`url("${a}")`})}var mo=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,Gn=4;async function qf(e,t,n){if(!e)return e;let r=new Set;function o(s,l){try{return new URL(s,l||location.href).href}catch{return s}}async function i(s,l,c=0){if(c>Gn)return console.warn(`[snapDOM] @import depth exceeded (${Gn}) at ${l}`),s;let u="",d=0,f;for(;f=mo.exec(s);){u+=s.slice(d,f.index),d=mo.lastIndex;let m=(f[2]||f[4]||"").trim(),p=o(m,l);if(r.has(p)){console.warn(`[snapDOM] Skipping circular @import: ${p}`);continue}r.add(p);let h="";try{let y=await Ce(p,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(h=y.data)}catch{}h?(h=rs(h,p),h=await i(h,p,c+1),u+=`
|
|
76
|
+
`}catch{}}catch{}return t}function hf(e,t,n){if(!t)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=t,e.insertBefore(r,e.firstChild||null)}function gf(e,t){try{let n=null,r=J(e).content;if(r&&r.includes("url(")){let a=r.match(/url\(["']?([^"')]+)["']?\)/);a&&(n=a[1])}let o=e.closest?.("picture"),i=n||(o?nl(e,o):e.currentSrc)||e.src||Gn(e.getAttribute("srcset"),e)||"";if(!i)return;t.setAttribute("src",i),t.removeAttribute("srcset"),t.removeAttribute("sizes"),t.loading="eager",t.decoding="sync"}catch{}}function yf(e){let t=new Set;if(!e)return t;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(e);)t.add(r[1]);return t}function bf(e,t){try{let n=getComputedStyle(e).getPropertyValue(t).trim();if(n)return n}catch{}try{let n=getComputedStyle(document.documentElement).getPropertyValue(t).trim();if(n)return n}catch{}return""}function wf(e,t,n){let r=[];for(let o of t){let i=bf(e,o);i&&r.push(`${o}: ${i};`)}return r.length?`${n}{${r.join("")}}
|
|
77
|
+
`:""}function vf(e,t){if(!e)return;let n=r=>{let o=r.getAttribute("data-sd-slotted")||"";t?` ${o} `.includes(` ${t} `)||r.setAttribute("data-sd-slotted",o?`${o} ${t}`:t):r.setAttribute("data-sd-slotted",o)};e.nodeType===Node.ELEMENT_NODE&&n(e),e.querySelectorAll?.("*").forEach(n)}async function Sf(e,t=3){let n=()=>{try{return e.contentDocument||e.contentWindow?.document||null}catch{return null}},r=n(),o=0;for(;o<t&&(!r||!r.body&&!r.documentElement);)await new Promise(i=>setTimeout(i,0)),r=n(),o++;return r&&(r.body||r.documentElement)?r:null}function Cf(e){let t=e.getBoundingClientRect(),n=0,r=0,o=0,i=0;try{let l=getComputedStyle(e);n=parseFloat(l.borderLeftWidth)||0,r=parseFloat(l.borderRightWidth)||0,o=parseFloat(l.borderTopWidth)||0,i=parseFloat(l.borderBottomWidth)||0}catch{}let a=Math.max(0,Math.round(t.width-(n+r))),s=Math.max(0,Math.round(t.height-(o+i)));return{contentWidth:a,contentHeight:s,rect:t}}function Fe(e){let t=0,n=0;if(e.offsetWidth>0&&(t=e.offsetWidth),e.offsetHeight>0&&(n=e.offsetHeight),t===0||n===0)try{let r=getComputedStyle(e);if(t===0){let o=parseFloat(r.width);!isNaN(o)&&o>0&&(t=o)}if(n===0){let o=parseFloat(r.height);!isNaN(o)&&o>0&&(n=o)}}catch{}if(t===0||n===0)try{if(t===0){let r=parseFloat(e.getAttribute("width"));!isNaN(r)&&r>0&&(t=r)}if(n===0){let r=parseFloat(e.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((t===0||n===0)&&(e.naturalWidth||e.naturalHeight))try{t===0&&e.naturalWidth>0&&(t=e.naturalWidth),n===0&&e.naturalHeight>0&&(n=e.naturalHeight)}catch{}return{width:t,height:n}}function xf(e,t,n){let r=e.defaultView,o=r?r.scrollX:0,i=r?r.scrollY:0,a=e.body?e.body.scrollLeft:0,s=e.body?e.body.scrollTop:0,l=e.documentElement?e.documentElement.scrollLeft:0,c=e.documentElement?e.documentElement.scrollTop:0,u=0,d=0,f=0,m=0;try{let h=r&&e.body?r.getComputedStyle(e.body):null;h&&(u=(parseFloat(h.marginTop)||0)+(parseFloat(h.paddingTop)||0),d=(parseFloat(h.marginRight)||0)+(parseFloat(h.paddingRight)||0),f=(parseFloat(h.marginBottom)||0)+(parseFloat(h.paddingBottom)||0),m=(parseFloat(h.marginLeft)||0)+(parseFloat(h.paddingLeft)||0))}catch{}try{e.documentElement.setAttribute("data-sd-pinned","")}catch{}let p=e.createElement("style");return p.setAttribute("data-sd-iframe-pin",""),p.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${u}px ${d}px ${f}px ${m}px !important;width: ${t}px !important;height: ${n}px !important;min-width: ${t}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(e.head||e.documentElement).appendChild(p),()=>{try{p.remove()}catch{}try{e.documentElement.removeAttribute("data-sd-pinned")}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(o,i),e.body&&(e.body.scrollLeft=a,e.body.scrollTop=s),e.documentElement&&(e.documentElement.scrollLeft=l,e.documentElement.scrollTop=c)}catch{}}}async function If(e,t,n){let r=await Sf(e,3);if(!r)throw new Error("iframe document not accessible/ready");let{contentWidth:o,contentHeight:i,rect:a}=Cf(e),s=n?.snap;if(!s&&typeof window<"u"&&window.snapdom&&(s=window.snapdom),!s||typeof s.toPng!="function")throw new Error("[snapdom] iframe capture requires snapdom.toPng. Use snapdom(el) or pass options.snap. With ESM, assign window.snapdom = snapdom after import if using iframes.");let l={...n,scale:1,clip:null},c=xf(r,o,i),u=A.session.nodeMap,d=A.session.styleMap,f=A.session.styleCache,m;try{m=await s.toPng(r.documentElement,l)}finally{c(),A.session.nodeMap=u,A.session.styleMap=d,A.session.styleCache=f}m.style.display="block",m.style.width=`${o}px`,m.style.height=`${i}px`;let p=document.createElement("div");return t.nodeMap.set(p,e),Le(e,p,t,n),p.style.overflow="hidden",p.style.display="block",p.style.width||(p.style.width=`${Math.round(a.width)}px`),p.style.height||(p.style.height=`${Math.round(a.height)}px`),p.appendChild(m),p}function Af(e){let{width:t,height:n}=Fe(e),r=e.getBoundingClientRect(),o;try{o=window.getComputedStyle(e)}catch{}let i=o?parseFloat(o.width):NaN,a=o?parseFloat(o.height):NaN,s=Math.round(t||r.width||0),l=Math.round(n||r.height||0),c=Number.isFinite(i)&&i>0?Math.round(i):Math.max(12,s||16),u=Number.isFinite(a)&&a>0?Math.round(a):Math.max(12,l||16),d=(e.type||"text").toLowerCase()==="checkbox",f=!!e.checked,m=!!e.indeterminate,p=Math.max(Math.min(c,u),12),h="middle";try{o&&o.verticalAlign&&(h=o.verticalAlign)}catch{}let y=document.createElement("div");y.setAttribute("data-snapdom-input-replacement",e.type||"checkbox"),y.style.cssText=`display:inline-block;width:${p}px;height:${p}px;vertical-align:${h};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(p)),g.setAttribute("height",String(p)),g.setAttribute("viewBox",`0 0 ${p} ${p}`),y.appendChild(g);function w(){let v="#0a6ed1";try{o&&(v=o.accentColor||o.color||v)}catch{}let b=2,S=b/2,x=p-b;if(g.innerHTML="",d){let I=document.createElementNS("http://www.w3.org/2000/svg","rect");if(I.setAttribute("x",String(S)),I.setAttribute("y",String(S)),I.setAttribute("width",String(x)),I.setAttribute("height",String(x)),I.setAttribute("rx","2"),I.setAttribute("ry","2"),I.setAttribute("fill",f?v:"none"),I.setAttribute("stroke",v),I.setAttribute("stroke-width",String(b)),g.appendChild(I),f){let C=document.createElementNS("http://www.w3.org/2000/svg","path");C.setAttribute("d",`M ${S+2} ${p/2} L ${p/2-1} ${p-S-2} L ${p-S-2} ${S+2}`),C.setAttribute("stroke","white"),C.setAttribute("stroke-width",String(Math.max(1.5,b))),C.setAttribute("fill","none"),C.setAttribute("stroke-linecap","round"),C.setAttribute("stroke-linejoin","round"),g.appendChild(C)}else if(m){let C=document.createElementNS("http://www.w3.org/2000/svg","rect"),M=Math.max(6,x-4);C.setAttribute("x",String((p-M)/2)),C.setAttribute("y",String((p-b)/2)),C.setAttribute("width",String(M)),C.setAttribute("height",String(b)),C.setAttribute("fill",v),C.setAttribute("rx","1"),g.appendChild(C)}}else{let I=document.createElementNS("http://www.w3.org/2000/svg","circle");if(I.setAttribute("cx",String(p/2)),I.setAttribute("cy",String(p/2)),I.setAttribute("r",String((p-b)/2)),I.setAttribute("fill",f?v:"none"),I.setAttribute("stroke",v),I.setAttribute("stroke-width",String(b)),g.appendChild(I),f){let C=document.createElementNS("http://www.w3.org/2000/svg","circle"),M=Math.max(2,(p-b*2)*.35);C.setAttribute("cx",String(p/2)),C.setAttribute("cy",String(p/2)),C.setAttribute("r",String(M)),C.setAttribute("fill","white"),g.appendChild(C)}}y.style.setProperty("width",`${p}px`,"important"),y.style.setProperty("height",`${p}px`,"important"),y.style.setProperty("min-width",`${p}px`,"important"),y.style.setProperty("min-height",`${p}px`,"important")}return w(),{el:y,applyVisual:w}}var Et=new he(80);async function kt(e){if(A.resource?.has(e))return A.resource.get(e);if(Et.has(e))return Et.get(e);let t=(async()=>{let n=await Ce(e,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`[snapDOM] Failed to read blob URL: ${e}`);return A.resource?.set(e,n.data),n.data})();Et.set(e,t);try{let n=await t;return Et.set(e,n),n}catch(n){throw Et.delete(e),n}}var Ef=/\bblob:[^)"'\s]+/g;async function ls(e){if(!e||e.indexOf("blob:")===-1)return e;let t=Array.from(new Set(e.match(Ef)||[]));if(t.length===0)return e;let n=e;for(let r of t)try{let o=await kt(r);n=n.split(r).join(o)}catch{}return n}function Mn(e){return typeof e=="string"&&e.startsWith("blob:")}function Mf(e){return(e||"").split(",").map(t=>t.trim()).filter(Boolean).map(t=>{let n=t.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function kf(e){return e.map(t=>t.desc?`${t.url} ${t.desc.trim()}`:t.url).join(", ")}function kn(e,t){let n=e.querySelectorAll?Array.from(e.querySelectorAll(t)):[];return e.matches?.(t)&&n.unshift(e),n}async function Tf(e,t=null){if(!e)return;let n=t,r=kn(e,"img");for(let l of r)try{let c=l.getAttribute("src")||l.currentSrc||"";if(Mn(c)){let d=await kt(c);l.setAttribute("src",d)}let u=l.getAttribute("srcset");if(u&&u.includes("blob:")){let d=Mf(u),f=!1;for(let m of d)if(Mn(m.url))try{m.url=await kt(m.url),f=!0}catch(p){Q(n,"blobUrlToDataUrl for srcset item failed",p)}f&&l.setAttribute("srcset",kf(d))}}catch(c){Q(n,"resolveBlobUrls for img failed",c)}let o=kn(e,"image");for(let l of o)try{let c="http://www.w3.org/1999/xlink",u=l.getAttribute("href")||l.getAttributeNS?.(c,"href");if(Mn(u)){let d=await kt(u);l.setAttribute("href",d),l.removeAttributeNS?.(c,"href")}}catch(c){Q(n,"resolveBlobUrls for SVG image href failed",c)}let i=kn(e,"[style*='blob:']");for(let l of i)try{let c=l.getAttribute("style");if(c&&c.includes("blob:")){let u=await ls(c);l.setAttribute("style",u)}}catch(c){Q(n,"replaceBlobUrls in inline style failed",c)}let a=e.querySelectorAll?e.querySelectorAll("style"):[];for(let l of a)try{let c=l.textContent||"";c.includes("blob:")&&(l.textContent=await ls(c))}catch(c){Q(n,"replaceBlobUrls in style tag failed",c)}let s=["poster"];for(let l of s){let c=kn(e,`[${l}^='blob:']`);for(let u of c)try{let d=u.getAttribute(l);Mn(d)&&u.setAttribute(l,await kt(d))}catch(d){Q(n,`resolveBlobUrls for ${l} failed`,d)}}}ot();var bo=new Map,cs=new Set(["IFRAME"]);function Kn(e,t){bo.set(String(e).toUpperCase(),t)}function so(e){let{width:t,height:n}=Fe(e),r=t,o=n;if(!r||!o){let a=e.getBoundingClientRect();r=r||a.width||0,o=o||a.height||0}let i=document.createElement("div");return i.style.cssText=`display:inline-block;width:${r}px;height:${o}px;visibility:hidden;`,i}var Tn=200,Rf=new Set(["img","canvas","video","iframe","object","embed"]);function us(e,t){return e.right>=t.left-Tn&&e.left<=t.right+Tn&&e.bottom>=t.top-Tn&&e.top<=t.bottom+Tn}function Nf(e,t){if(e===t.root)return!1;let n;try{n=e.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=J(e);if(r.display==="inline"&&!Rf.has((e.localName||"").toLowerCase()))return!1;let o=t.rect,i=e.scrollWidth||0,a=e.scrollHeight||0,s={left:r.direction==="rtl"?Math.min(n.left,n.right-i):n.left,top:n.top,right:Math.max(n.right,n.left+i),bottom:Math.max(n.bottom,n.top+a)},l=r.writingMode||"";if((l.startsWith("vertical")||l.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-a),s.left=Math.min(s.left,n.right-i)),us(s,o))return!1;let c=(e.ownerDocument||document).createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;c.nextNode();){let u=c.currentNode.getBoundingClientRect();if((u.width>0||u.height>0)&&us(u,o))return!1}return!0}function Lf(e,t,n){let r=e.cloneNode(!1);e.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),Le(e,r,t,n);let{width:o,height:i}=Fe(e);return o>0&&(r.style.width=`${o}px`,r.style.minWidth=`${o}px`,r.style.maxWidth=`${o}px`),i>0&&(r.style.height=`${i}px`,r.style.minHeight=`${i}px`,r.style.maxHeight=`${i}px`),r.style.visibility="hidden",r.style.overflow="hidden",r.style.boxSizing="border-box",r}async function Dn(e,t,n){if(!e)throw new Error("Invalid node");let r=new Set,o=null,i=null;if(e.nodeType===Node.ELEMENT_NODE){let u=(e.localName||e.tagName||"").toLowerCase();if(e.id==="snapdom-sandbox"||e.hasAttribute("data-snapdom-sandbox")||$s.has(u))return null;if(u==="foreignobject"&&e.parentElement?.closest?.("foreignObject"))return Q(t,"Nested <foreignObject> skipped (SVG spec limitation \u2014 not rendered by browsers)"),null;if(u==="source"&&e.parentElement?.localName==="picture")return null}if(e.nodeType===Node.TEXT_NODE||e.nodeType!==Node.ELEMENT_NODE)return e.cloneNode(!0);if(e.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return so(e);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let u of n.exclude)try{if(e.matches?.(u)){if(n.excludeMode==="hide")return so(e);if(n.excludeMode==="remove")return null}}catch(d){console.warn(`Invalid selector in exclude option: ${u}`,d)}if(typeof n.filter=="function")try{if(!n.filter(e)){if(n.filterMode==="hide")return so(e);if(n.filterMode==="remove")return null}}catch(u){console.warn("Error in filter function:",u)}if(t.clip&&Nf(e,t.clip))return Lf(e,t,n);if(n.__resolveNodeHooks)for(let u of n.__resolveNodeHooks){let d;try{d=await u(e,n)}catch(f){Q(t,"resolveNode plugin hook failed",f)}if(d===null)return null;if(d instanceof Node)return d.nodeType===Node.ELEMENT_NODE&&(t.nodeMap.set(d,e),Le(e,d,t,n)),d}{let u=cs.has(e.tagName)&&bo.get(e.tagName);if(u){let d=await u(e,t,n);if(d!==void 0)return d}}if(e.getAttribute("data-capture")==="placeholder"){let u=e.cloneNode(!1);t.nodeMap.set(u,e),Le(e,u,t,n);let d=document.createElement("div");return d.textContent=e.getAttribute("data-placeholder-text")||"",d.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",u.appendChild(d),u}{let u=!cs.has(e.tagName)&&bo.get(e.tagName);if(u){let d=await u(e,t,n);if(d!==void 0)return d}}let a;try{if(a=e.cloneNode(!1),a.attributes?.length)try{for(let u of a.attributes)/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/.test(u.value)&&a.setAttribute(u.name,u.value.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g,""))}catch{}if(rf(e,a),t.nodeMap.set(a,e),e.tagName==="IMG"){gf(e,a);try{let{width:u,height:d}=Fe(e),f=Math.round(u||0),m=Math.round(d||0);f&&(a.dataset.snapdomWidth=String(f)),m&&(a.dataset.snapdomHeight=String(m))}catch(u){Q(t,"getUnscaledDimensions for IMG failed",u)}try{let u=e.getAttribute("style")||"",d=window.getComputedStyle(e),f=v=>{let b=u.match(new RegExp(`${v}\\s*:\\s*([^;]+)`,"i")),S=b?b[1].trim():d.getPropertyValue(v);return/%|auto/i.test(String(S||""))},m=parseInt(a.dataset.snapdomWidth||"0",10),p=parseInt(a.dataset.snapdomHeight||"0",10),h=f("width")||!m,y=f("height")||!p;h&&m&&(a.style.width=`${m}px`),y&&p&&(a.style.height=`${p}px`);let g=d.getPropertyValue("object-fit"),w=d.getPropertyValue("object-position");g&&g!=="fill"?(a.style.objectFit=g,w&&(a.style.objectPosition=w)):(m&&(a.style.minWidth=`${m}px`),p&&(a.style.minHeight=`${p}px`))}catch(u){Q(t,"IMG dimension freeze failed",u)}}}catch(u){throw console.error("[Snapdom] Failed to clone node:",e,u),u}let s=null;if(e instanceof HTMLTextAreaElement){let{width:u,height:d}=Fe(e),f=u||e.getBoundingClientRect().width||0,m=d||e.getBoundingClientRect().height||0;f&&(a.style.width=`${f}px`),m&&(a.style.height=`${m}px`)}if(e instanceof HTMLInputElement){let u=(e.type||"text").toLowerCase();if((u==="checkbox"||u==="radio")&&Id()){let{el:d,applyVisual:f}=Af(e);t.nodeMap.set(d,e),s=f,a=d}else a.value=e.value,a.setAttribute("value",e.value),e.checked!==void 0&&(a.checked=e.checked,e.checked&&a.setAttribute("checked",""),e.indeterminate&&(a.indeterminate=e.indeterminate))}if((e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)&&!e.value&&e.placeholder)try{let u=window.getComputedStyle(e,"::placeholder"),d=u&&u.color;if(d&&d!=="rgba(0, 0, 0, 0)"){let f="snapdom-ph-"+(Math.random()*1e6|0);a.classList.add(f);let m=document.createElement("style");m.textContent=`.${f}::placeholder{color:${d}!important;opacity:${u.opacity||"1"}!important;-webkit-text-fill-color:${d}!important;}`,a.prepend(m)}}catch{}if(e instanceof HTMLSelectElement&&(o=e.value),e instanceof HTMLTextAreaElement&&(i=e.value),e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement){e.disabled&&a.setAttribute("disabled",""),e.required&&a.setAttribute("required",""),e.readOnly&&a.setAttribute("readonly","");let u=e;u.min!==void 0&&u.min!==""&&a.setAttribute("min",u.min),u.max!==void 0&&u.max!==""&&a.setAttribute("max",u.max),u.pattern!==void 0&&u.pattern!==""&&a.setAttribute("pattern",u.pattern);let d=e.getAttribute("aria-invalid");d!==null&&a.setAttribute("aria-invalid",d)}if(yo(e)||Le(e,a,t,n),s&&s(),e instanceof SVGElement&&!yo(e)){let u=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display"];try{let d=window.getComputedStyle(e);for(let f of u){let m=d.getPropertyValue(f);m&&a.style.setProperty(f,m)}}catch{}}if(e.shadowRoot){try{let v=e.shadowRoot.querySelectorAll("slot");for(let b of v){let S=b.assignedNodes?.()||[];for(let x of S)r.add(x)}}catch{}let u=pf(t),d=`[data-sd="${u}"]`;t.shadowScopes||(t.shadowScopes=new WeakMap),t.shadowScopes.set(e.shadowRoot,u);try{a.setAttribute("data-sd",u)}catch{}let f=mf(e.shadowRoot),m=ff(f,d,u),p=yf(f),h=wf(e,p,d);hf(a,h+m,u);let y=document.createDocumentFragment(),g=(v,b)=>{if(v.nodeType===Node.ELEMENT_NODE&&v.tagName==="STYLE")return b(null);Dn(v,t,n).then(S=>{b(S||null)}).catch(()=>{b(null)})},w=await ao(Array.from(e.shadowRoot.childNodes),g,n.fast);y.append(...w.filter(v=>!!v)),a.appendChild(y)}if(e.tagName==="SLOT"){let u=t.shadowScopes?.get(e.getRootNode()),d=e.assignedNodes?.()||[],f=d.length?e.assignedNodes?.({flatten:!0})||d:[],m=f.length?f:Array.from(e.childNodes),p=document.createDocumentFragment(),h=(g,w)=>{Dn(g,t,n).then(v=>{v&&d.length&&vf(v,u),w(v||null)}).catch(()=>{w(null)})},y=await ao(Array.from(m),h,n.fast);return p.append(...y.filter(g=>!!g)),p}function l(u,d){if(r.has(u))return d(null);Dn(u,t,n).then(f=>{d(f||null)}).catch(()=>{d(null)})}let c=await ao(Array.from(e.childNodes),l,n.fast);if(a.append(...c.filter(u=>!!u)),o!==null&&a instanceof HTMLSelectElement){a.value=o;for(let u of a.options)u.value===o?u.setAttribute("selected",""):u.removeAttribute("selected")}return i!==null&&a instanceof HTMLTextAreaElement&&(a.textContent=i),a}async function Ff(e,t,n){let r=!1;try{r=!!(e.contentDocument||e.contentWindow?.document)}catch(o){Q(t,"iframe same-origin probe failed",o)}if(r)try{return await If(e,t,n)}catch(o){console.warn("[SnapDOM] iframe rasterization failed, fallback:",o)}if(r||console.warn("[snapdom] cross-origin <iframe> skipped (its document cannot be read). Captured as a placeholder that keeps the frame's box; pass { placeholders: false } for an invisible spacer.",e),n.placeholders){let{width:o,height:i}=Fe(e),a=document.createElement("div");return a.style.cssText=`width:${o}px;height:${i}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,Le(e,a,t,n),a}else{let{width:o,height:i}=Fe(e),a=document.createElement("div");return a.style.cssText=`display:inline-block;width:${o}px;height:${i}px;visibility:hidden;`,Le(e,a,t,n),a}}function $f(e){try{let t=Math.max(1,Math.min(32,e.width)),n=Math.max(1,Math.min(32,e.height)),r=document.createElement("canvas");r.width=t,r.height=n;let o=r.getContext("2d",{willReadFrequently:!0});if(!o)return!1;o.drawImage(e,0,0,t,n);let i=o.getImageData(0,0,t,n).data;for(let a=3;a<i.length;a+=4)if(i[a]!==0)return!1;return!0}catch{return!1}}async function _f(e,t,n){let r="";try{let s=e.getContext("2d",{willReadFrequently:!0});try{s&&s.getImageData(0,0,1,1)}catch{}if((De()||!s)&&await tt(),r=e.toDataURL("image/png"),!r||r==="data:,"){try{s&&s.getImageData(0,0,1,1)}catch{}if(await tt(),r=e.toDataURL("image/png"),!r||r==="data:,"){let l=document.createElement("canvas");l.width=e.width,l.height=e.height;let c=l.getContext("2d");c&&(c.drawImage(e,0,0),r=l.toDataURL("image/png"))}}}catch(s){Q(t,"Canvas toDataURL failed, using empty/fallback",s)}n&&n.debug&&r&&$f(e)&&Q(t,"canvas is empty at capture time \u2014 capture it after its first frame is drawn",e);let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch(s){Q(t,"img decoding/loading hints failed",s)}r&&(o.src=r),o.width=e.width,o.height=e.height;let{width:i,height:a}=Fe(e);return i>0&&(o.style.width=`${i}px`),a>0&&(o.style.height=`${a}px`),t.nodeMap.set(o,e),Le(e,o,t,n),o}async function Of(e,t,n){let r="";try{let s=document.createElement("canvas");s.width=e.videoWidth||e.offsetWidth||320,s.height=e.videoHeight||e.offsetHeight||240;let l=s.getContext("2d");l&&(l.drawImage(e,0,0,s.width,s.height),r=s.toDataURL("image/png"),(!r||r==="data:,")&&(r=""))}catch(s){Q(t,"Video frame capture failed, using poster fallback",s)}let o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}r?o.src=r:e.poster&&(o.src=e.poster),o.width=e.videoWidth||e.offsetWidth||0,o.height=e.videoHeight||e.offsetHeight||0;let{width:i,height:a}=Fe(e);return i>0&&(o.style.width=`${i}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",t.nodeMap.set(o,e),Le(e,o,t,n),o}async function Pf(e,t,n){if(!e.controls)return;let{width:r,height:o}=Fe(e),i=Math.round(r||e.offsetWidth||300),a=Math.round(o||e.offsetHeight||54),s=a/2,l=Math.max(4,a*.16),c=a*.34,u=i-a*.34,d=c+l+a*.55,f=Math.max(0,u-a*.7-d),m=Math.max(9,Math.round(a*.24)),p=`<svg xmlns="http://www.w3.org/2000/svg" width="${i}" height="${a}" viewBox="0 0 ${i} ${a}"><rect width="${i}" height="${a}" rx="${Math.min(a/2,10)}" fill="#f1f3f4"/><path d="M ${c} ${s-l} L ${c+l} ${s} L ${c} ${s+l} Z" fill="#5f6368"/><rect x="${d}" y="${s-1.5}" width="${f}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${d}" cy="${s}" r="${Math.max(3,a*.09)}" fill="#5f6368"/><text x="${u}" y="${s}" fill="#5f6368" font-family="sans-serif" font-size="${m}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,h=document.createElement("img");try{h.decoding="sync",h.loading="eager"}catch{}return h.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,h.width=i,h.height=a,h.style.width=`${i}px`,h.style.height=`${a}px`,t.nodeMap.set(h,e),Le(e,h,t,n),h}Kn("IFRAME",Ff);Kn("CANVAS",_f);Kn("VIDEO",Of);Kn("AUDIO",Pf);Me();Yn();Zn();ge();ge();var Df=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],ht=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{}),rl=[],ds=new Set;function Wf(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Bf(e){let t=Array.isArray(e)?e:[e];for(let n of t){let r;if(n instanceof RegExp)r=n;else if(typeof n=="string")r=new RegExp(Wf(n),"i");else{console.warn("[snapdom] Ignored invalid iconFont value:",n);continue}let o=`${r.source}/${r.flags}`;ds.has(o)||(ds.add(o),rl.push(r))}}function Oe(e){let t=typeof e=="string"?e:"",n=[...Df,...rl];for(let r of n)if(r instanceof RegExp&&r.test(t))return!0;return!!(/icon/i.test(t)||/glyph/i.test(t)||/symbols/i.test(t)||/feather/i.test(t)||/fontawesome/i.test(t))}function Hf(e=""){let t=String(e).toLowerCase();return/\bmaterial\s*icons\b/.test(t)||/\bmaterial\s*symbols\b/.test(t)}var fs=new Map;function Uf(e=""){let t=Object.create(null),n=String(e||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,o;for(;o=r.exec(n);)t[o[1].toUpperCase()]=Number(o[2]);return t}async function Vf(e,t,n){let r=String(e||""),o=r.toLowerCase(),i=String(t||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(o)&&!/\bsymbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(o))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),s="outlined";/\brounded\b/.test(i)||/\bround\b/.test(i)?s="rounded":/\bsharp\b/.test(i)?s="sharp":/\boutlined\b/.test(i)&&(s="outlined");let l=a===1,c=null;if(l&&(s==="outlined"&&ht.materialIconsFilled?c={url:ht.materialIconsFilled,alias:"snapdom-mi-filled"}:s==="rounded"&&ht.materialIconsRound?c={url:ht.materialIconsRound,alias:"snapdom-mi-round"}:s==="sharp"&&ht.materialIconsSharp&&(c={url:ht.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:r,familyForCanvas:r};if(!fs.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});document.fonts.add(d),await d.load(),fs.set(c.alias,!0)}catch{return{familyForMeasure:r,familyForCanvas:r}}let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function zf(e="Material Icons",t=24){try{await Promise.all([document.fonts.load(`400 ${t}px "${String(e).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function Gf(e){let t=e.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(t)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(t);if(t&&!n&&t.toLowerCase()!=="currentcolor")return t;let r=e.color?.trim();return r&&r!=="inherit"?r:"#000"}async function qf(e,{family:t="Material Icons",weight:n="normal",fontSize:r=32,color:o="#000",variation:i="",className:a=""}={}){let s=String(t||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,c=Uf(i),{familyForMeasure:u,familyForCanvas:d}=await Vf(s,a,c);await zf(d.replace(/^["']+|["']+$/g,""),r);let f=document.createElement("span");f.setAttribute("data-snapdom-internal",""),f.textContent=e,f.style.position="absolute",f.style.visibility="hidden",f.style.left="-99999px",f.style.whiteSpace="nowrap",f.style.fontFamily=u,f.style.fontWeight=String(n||"normal"),f.style.fontSize=`${r}px`,f.style.lineHeight="1",f.style.margin="0",f.style.padding="0",f.style.fontFeatureSettings="'liga' 1",f.style.fontVariantLigatures="normal",f.style.color=o,document.body.appendChild(f);let m=f.getBoundingClientRect(),p=Math.max(1,Math.ceil(m.width)),h=Math.max(1,Math.ceil(m.height));document.body.removeChild(f);let y=document.createElement("canvas");y.width=p*l,y.height=h*l;let g=y.getContext("2d");g.scale(l,l),g.font=`${n?`${n} `:""}${r}px ${d}`,g.textAlign="left",g.textBaseline="top",g.fillStyle=o;try{g.fontKerning="normal"}catch{}return g.fillText(e,0,0),{dataUrl:y.toDataURL(),width:p,height:h}}async function jf(e,t,n=A.session.nodeMap){if(e?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',o=Array.from(e.querySelectorAll(r)).filter(s=>s&&s.textContent&&s.textContent.trim());if(e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e),o.length===0)return 0;let i=t?.nodeType===1?Array.from(t.querySelectorAll(r)).filter(s=>s&&s.textContent&&s.textContent.trim()):[];t?.nodeType===1&&t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t);let a=0;for(let s=0;s<o.length;s++){let l=o[s],c=n&&n.get(l)||i[s]||null;try{let u=getComputedStyle(c||l),d=u.fontFamily||"Material Icons";if(!Hf(d))continue;let f=(c||l).textContent.trim();if(!f)continue;let m=parseInt(u.fontSize,10)||24,p=u.fontWeight&&u.fontWeight!=="normal"?u.fontWeight:"normal",h=Gf(u),y=u.fontVariationSettings&&u.fontVariationSettings!=="normal"?u.fontVariationSettings:"",g=(c||l).className||"",{dataUrl:w,width:v,height:b}=await qf(f,{family:d,weight:p,fontSize:m,color:h,variation:y,className:g});l.textContent="";let S=l.ownerDocument.createElement("img");S.src=w,S.alt=f,S.style.height=`${m}px`,S.style.width=`${Math.max(1,Math.round(v/b*m))}px`,S.style.objectFit="contain",S.style.verticalAlign=getComputedStyle(l).verticalAlign||"baseline",l.appendChild(S),a++}catch{}}return a}rt();ot();async function Yf(e,t,n,r=32,o="#000"){t=t.replace(/^['"]+|['"]+$/g,"");let i=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");a.setAttribute("data-snapdom-internal",""),a.textContent=e,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${t}"`,a.style.fontWeight=n||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let s=a.getBoundingClientRect(),l=Math.ceil(s.width),c=Math.ceil(s.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,l*i),u.height=Math.max(1,c*i);let d=u.getContext("2d");return d.scale(i,i),d.font=n?`${n} ${r}px "${t}"`:`${r}px "${t}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=o,d.fillText(e,0,0),{dataUrl:u.toDataURL(),width:l,height:c}}var ol=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Zf=["katex","mathjax","mathml"];function Po(e){if(!e)return"";for(let t of e.split(",")){let n=t.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!ol.has(n.toLowerCase()))return n}return""}function Xf(e){if(!e)return[];let t=[];for(let n of e.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(ol.has(r.toLowerCase())||t.push(r))}return t}function Wn(e){let t=String(e??"400").trim().toLowerCase();if(t==="normal")return 400;if(t==="bold")return 700;let n=parseInt(t,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Bn(e){let t=String(e??"normal").trim().toLowerCase();return t.startsWith("italic")?"italic":t.startsWith("oblique")?"oblique":"normal"}function Kf(e){let t=String(e??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return t?Math.max(50,Math.min(200,parseFloat(t[1]))):100}function Jf(e){let t=String(e||"400").trim(),n=t.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let o=Wn(n[1]),i=Wn(n[2]);return{min:Math.min(o,i),max:Math.max(o,i)}}let r=Wn(t);return{min:r,max:r}}function Qf(e){let t=String(e||"normal").trim().toLowerCase();return t==="italic"?{kind:"italic"}:t.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function ep(e){let t=String(e||"100%").trim(),n=t.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let i=parseFloat(n[1]),a=parseFloat(n[2]);return{min:Math.min(i,a),max:Math.max(i,a)}}let r=t.match(/(\d+(?:\.\d+)?)\s*%/),o=r?parseFloat(r[1]):100;return{min:o,max:o}}function tp(e){return!e||typeof e!="string"?"":e.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function np(e,t,n=[]){if(!e)return!1;try{let r=new URL(e,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(a=>o.endsWith(a))||n.some(a=>o===a.toLowerCase()||o.endsWith("."+a.toLowerCase())))return!0;let i=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(i)||/\.woff2?(\b|$)/.test(i)||Zf.some(a=>i.includes(a)))return!0;for(let a of t){let s=a.toLowerCase().replace(/\s+/g,"+"),l=a.toLowerCase().replace(/\s+/g,"-"),c=tp(a);if(i.includes(s)||i.includes(l)||c&&i.includes(c))return!0}return!1}catch{return!1}}function rp(e){let t=new Set;for(let n of e||[]){let r=String(n).split("__")[0]?.trim();r&&t.add(r)}return t}function ps(e,t){return e&&e.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,o)=>{let i=(o||"").trim();if(!i||/^data:|^blob:|^https?:|^file:|^about:/i.test(i))return n;let a=i;try{a=new URL(i,t||location.href).href}catch{}return`url("${a}")`})}var wo=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,qn=4;async function op(e,t,n){if(!e)return e;let r=new Set;function o(s,l){try{return new URL(s,l||location.href).href}catch{return s}}async function i(s,l,c=0){if(c>qn)return console.warn(`[snapDOM] @import depth exceeded (${qn}) at ${l}`),s;let u="",d=0,f;for(;f=wo.exec(s);){u+=s.slice(d,f.index),d=wo.lastIndex;let m=(f[2]||f[4]||"").trim(),p=o(m,l);if(r.has(p)){console.warn(`[snapDOM] Skipping circular @import: ${p}`);continue}r.add(p);let h="";try{let y=await Ce(p,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(h=y.data)}catch{}h?(h=ps(h,p),h=await i(h,p,c+1),u+=`
|
|
78
78
|
/* inlined: ${p} */
|
|
79
79
|
${h}
|
|
80
|
-
`):u+=f[0]}return u+=s.slice(d),u}let a=rs(e,t||location.href);return a=await i(a,t||location.href,0),a}var Zs=/url\((["']?)([^"')]+)\1\)/g,Gf=/@font-face[^{}]*\{[^}]*\}/g;function Se(e,t,n=""){return(e.match(new RegExp(`${t}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function Xs(e){if(!e)return[];let t=[],n=e.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let o=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let i=o[1],a=o[2],s=l=>{if(!l.includes("?"))return parseInt(l,16);let c=parseInt(l.replace(/\?/g,"0"),16),u=parseInt(l.replace(/\?/g,"F"),16);return[c,u]};if(a){let l=s(i),c=s(a),u=Array.isArray(l)?l[0]:l,d=Array.isArray(c)?c[1]:c;t.push([Math.min(u,d),Math.max(u,d)])}else{let l=s(i);Array.isArray(l)?t.push([l[0],l[1]]):t.push([l,l])}}return t}function Ks(e,t){if(!t.length||!e||e.size===0)return!0;for(let n of e)for(let[r,o]of t)if(n>=r&&n<=o)return!0;return!1}function Fo(e,t){let n=[];if(!e)return n;for(let r of e.matchAll(Zs)){let o=(r[2]||"").trim();if(!(!o||o.startsWith("data:"))){if(!/^https?:/i.test(o))try{o=new URL(o,t||location.href).href}catch{}n.push(o)}}return n}async function ho(e,t,n=""){let r=e;for(let o of e.matchAll(Zs)){let i=Ao(o[0]);if(!i)continue;let a=i;if(!a.startsWith("http")&&!a.startsWith("data:"))try{a=new URL(a,t||location.href).href}catch{}if(!Oe(a)){if(A.resource?.has(a)){A.font?.add(a),r=r.replace(o[0],`url(${A.resource.get(a)})`);continue}try{let s=await Ce(a,{as:"dataURL",useProxy:n,silent:!0});if(s.ok&&typeof s.data=="string"){let l=s.data;A.resource?.set(a,l),A.font?.add(a),r=r.replace(o[0],`url(${l})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",a)}}}return r}function jf(e){if(!e.length)return null;let t=(a,s)=>e.some(([l,c])=>!(c<a||l>s)),n=t(0,255)||t(305,305),r=t(256,591)||t(7680,7935),o=t(880,1023),i=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":i?"cyrillic":o?"greek":r?"latin-ext":n?"latin":null}function os(e={}){let t=new Set((e.families||[]).map(o=>String(o).toLowerCase())),n=new Set((e.domains||[]).map(o=>String(o).toLowerCase())),r=new Set((e.subsets||[]).map(o=>String(o).toLowerCase()));return(o,i)=>{if(t.size&&t.has(o.family.toLowerCase()))return!0;if(n.size)for(let a of o.srcUrls)try{if(n.has(new URL(a).host.toLowerCase()))return!0}catch{}if(r.size){let a=jf(i);if(a&&r.has(a))return!0}return!1}}function Yf(e){if(!e)return e;let t=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let i of e.match(t)||[]){let a=Se(i,"font-family"),s=Lo(a),l=Se(i,"font-weight","400"),c=Se(i,"font-style","normal"),u=Se(i,"font-stretch","100%"),d=Se(i,"unicode-range"),f=Se(i,"src"),m=Fo(f,location.href),p=m.length?m.map(y=>String(y).toLowerCase()).sort().join("|"):f.toLowerCase(),h=[String(s||"").toLowerCase(),l,c,u,d.toLowerCase(),p].join("|");n.has(h)||(n.add(h),r.push(i))}if(r.length===0)return e;let o=0;return e.replace(t,()=>r[o++]||"")}var is=new WeakMap,Zf=0;function Xf(e){let t=is.get(e);return t===void 0&&(t=Zf++,is.set(e,t)),t}function Kf(e,t,n,r,o,i){let a=Array.from(e||[]).sort().join("|"),s=t?JSON.stringify({families:(t.families||[]).map(f=>String(f).toLowerCase()).sort(),domains:(t.domains||[]).map(f=>String(f).toLowerCase()).sort(),subsets:(t.subsets||[]).map(f=>String(f).toLowerCase()).sort()}):"",l=(n||[]).map(f=>`${(f.family||"").toLowerCase()}::${f.weight||"normal"}::${f.style||"normal"}::${f.src||""}`).sort().join("|"),c=r||"",u=(o||[]).map(f=>String(f).toLowerCase()).sort().join("|"),d=Xf(i||document);return`fonts-embed-css::req=${a}::ex=${s}::lf=${l}::px=${c}::fd=${u}::doc=${d}`}async function Js(e,t,n,r){let o;try{o=e.cssRules||[]}catch{return}let i=(a,s)=>{try{return new URL(a,s||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let s=a.href?i(a.href,t):t;if(r.depth>=Gn){console.warn(`[snapDOM] CSSOM import depth exceeded (${Gn}) at ${s}`);continue}if(s&&r.visitedSheets.has(s)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${s}`);continue}s&&r.visitedSheets.add(s);let l={...r,depth:(r.depth||0)+1};await Js(a.styleSheet,s,n,l);continue}if(a.type===CSSRule.FONT_FACE_RULE){let s=(a.style.getPropertyValue("font-family")||"").trim(),l=Lo(s);if(!l||Oe(l))continue;let c=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),d=(a.style.getPropertyValue("font-stretch")||"").trim(),f=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),p=(a.style.getPropertyValue("unicode-range")||"").trim(),h=c||"400",y=u||"normal",g=d||"100%",w=(u?`font-style:${u};`:"")+(c?`font-weight:${c};`:"")+(d?`font-stretch:${d};`:"")+(f?`font-variation-settings:${f};`:"")+(p?`unicode-range:${p};`:""),v=r.faceMatchesRequired(l,y,h,g);if(!v&&!r.requiredIndex.has(l.toLowerCase()))continue;let b=Xs(p);if(!Ks(r.usedCodepoints,b))continue;let S={family:l,weightSpec:h,styleSpec:y,stretchSpec:g,unicodeRange:p,srcRaw:m,srcUrls:Fo(m,t||location.href),href:t||location.href};if(r.simpleExcluder&&r.simpleExcluder(S,b))continue;if(!v){r.provisionalFaces.push({family:l.toLowerCase(),block:`@font-face{font-family:${l};src:${m};${w}}`,srcRaw:m,baseHref:t||location.href});continue}if(r.coveredFamilies.add(l.toLowerCase()),/url\(/i.test(m)){let x=await ho(m,t||location.href,r.useProxy);await n(`@font-face{font-family:${l};src:${x};${w}}`)}else await n(`@font-face{font-family:${l};src:${m};${w}}`)}}}async function Jf({required:e,usedCodepoints:t,exclude:n=void 0,localFonts:r=[],useProxy:o="",fontStylesheetDomains:i=[],doc:a=document}={}){e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let s=new Map;for(let b of e){let[S,x,I,C]=String(b).split("__");if(!S)continue;let E=S.toLowerCase(),k=s.get(E)||[];k.push({w:parseInt(x,10),s:I,st:parseInt(C,10)}),s.set(E,k)}function l(b,S,x,I){let C=String(b).toLowerCase();if(!s.has(C))return!1;let E=s.get(C),k=Wf(x),T=Bf(S),F=Hf(I),D=k.min!==k.max,R=k.min,_=P=>T.kind==="normal"&&P==="normal"||T.kind!=="normal"&&(P==="italic"||P==="oblique"),N=!1;for(let P of E){let K=D?P.w>=k.min&&P.w<=k.max:P.w===R,U=_(Bn(P.s)),q=P.st>=F.min&&P.st<=F.max;if(K&&U&&q){N=!0;break}}if(N)return!0;if(!D)for(let P of E){let K=_(Bn(P.s)),U=P.st>=F.min&&P.st<=F.max;if(Math.abs(R-P.w)<=300&&K&&U)return!0}if(!D&&T.kind==="normal"&&E.some(P=>Bn(P.s)!=="normal"))for(let P of E){let K=Math.abs(R-P.w)<=300,U=P.st>=F.min&&P.st<=F.max;if(K&&U)return!0}return!1}let c=os(n),u=Kf(e,n,r,o,i,a);if(A.resource?.has(u))return A.resource.get(u);let d=zf(e),f=[],m=mo;for(let b of a.querySelectorAll("style")){let S=b.textContent||"";for(let x of S.matchAll(m)){let I=(x[2]||x[4]||"").trim();!I||Oe(I)||a.querySelector(`link[rel="stylesheet"][href="${I}"]`)||f.push(I)}}let p=[];f.length&&await Promise.all(f.map(b=>new Promise(S=>{if(a.querySelector(`link[rel="stylesheet"][href="${b}"]`))return S(null);let x=a.createElement("link");x.rel="stylesheet",x.href=b,x.setAttribute("data-snapdom","injected-import"),x.onload=()=>S(x),x.onerror=()=>S(null),a.head.appendChild(x),p.push(x)})));let h="",y=new Set,g=[],w=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(b=>!!b.href);for(let b of p)try{b.remove()}catch{}for(let b of w)try{if(Oe(b.href))continue;let S="",x=!1;try{x=new URL(b.href,location.href).origin===location.origin}catch{}if(!x){let C=Array.isArray(i)?i:[];if(!Vf(b.href,d,C))continue}if(x){let C=Array.from(a.styleSheets).find(E=>E.href===b.href);if(C)try{let E=C.cssRules||[];S=Array.from(E).map(k=>k.cssText).join("")}catch{}}if(!S){let C=await Ce(b.href,{as:"text",useProxy:o});if(C?.ok&&typeof C.data=="string"&&(S=C.data),Oe(b.href))continue}S=await qf(S,b.href,o);let I="";for(let C of S.match(Gf)||[]){let E=Se(C,"font-family"),k=Lo(E);if(!k||Oe(k))continue;let T=Se(C,"font-weight","400"),F=Se(C,"font-style","normal"),D=Se(C,"font-stretch","100%"),R=Se(C,"unicode-range"),_=Se(C,"src"),N=Fo(_,b.href),P=l(k,F,T,D);if(!P&&!s.has(k.toLowerCase()))continue;let K=Xs(R);if(!Ks(t,K))continue;let U={family:k,weightSpec:T,styleSpec:F,stretchSpec:D,unicodeRange:R,srcRaw:_,srcUrls:N,href:b.href};if(n&&c(U,K))continue;if(!P){g.push({family:k.toLowerCase(),block:C,srcRaw:_,baseHref:b.href});continue}y.add(k.toLowerCase());let q=/url\(/i.test(_)?await ho(C,b.href,o):C;I+=q}I.trim()&&(h+=I)}catch{console.warn("[snapDOM] Failed to process stylesheet:",b.href)}let v={requiredIndex:s,usedCodepoints:t,faceMatchesRequired:l,coveredFamilies:y,provisionalFaces:g,simpleExcluder:n?os(n):null,useProxy:o,visitedSheets:new Set,depth:0};for(let b of a.styleSheets)if(!(b.href&&w.some(S=>S.href===b.href)))try{let S=b.href||location.origin+"/";S&&v.visitedSheets.add(S),await Js(b,S,async x=>{h+=x},v)}catch{}for(let b of g)y.has(b.family)||(h+=/url\(/i.test(b.srcRaw)?await ho(b.block,b.baseHref,o):b.block);try{for(let b of a.fonts||[]){if(!b||!b.family||b.status!=="loaded"||!b._snapdomSrc)continue;let S=String(b.family).replace(/^['"]+|['"]+$/g,"");if(Oe(S)||!s.has(S.toLowerCase())||n?.families&&n.families.some(I=>String(I).toLowerCase()===S.toLowerCase()))continue;let x=b._snapdomSrc;if(!String(x).startsWith("data:")){if(A.resource?.has(b._snapdomSrc))x=A.resource.get(b._snapdomSrc),A.font?.add(b._snapdomSrc);else if(!A.font?.has(b._snapdomSrc))try{let I=await Ce(b._snapdomSrc,{as:"dataURL",useProxy:o,silent:!0});if(I.ok&&typeof I.data=="string")x=I.data,A.resource?.set(b._snapdomSrc,x),A.font?.add(b._snapdomSrc);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",b._snapdomSrc);continue}}h+=`@font-face{font-family:'${S}';src:url(${x});font-style:${b.style||"normal"};font-weight:${b.weight||"normal"};}`}}catch{}for(let b of r){if(!b||typeof b!="object")continue;let S=String(b.family||"").replace(/^['"]+|['"]+$/g,"");if(!S||Oe(S)||!s.has(S.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===S.toLowerCase()))continue;let x=b.weight!=null?String(b.weight):"normal",I=b.style!=null?String(b.style):"normal",C=b.stretchPct!=null?`${b.stretchPct}%`:"100%",E=String(b.src||""),k=E;if(!k.startsWith("data:")){if(A.resource?.has(E))k=A.resource.get(E),A.font?.add(E);else if(!A.font?.has(E))try{let T=await Ce(E,{as:"dataURL",useProxy:o,silent:!0});if(T.ok&&typeof T.data=="string")k=T.data,A.resource?.set(E,k),A.font?.add(E);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",E);continue}}h+=`@font-face{font-family:'${S}';src:url(${k});font-style:${I};font-weight:${x};font-stretch:${C};}`}return h&&(h=Yf(h),A.resource?.set(u,h)),h}function Qs(e,t){let n=new Set,r=new Set;if(!e)return{required:n,usedCodepoints:r};let o=l=>{if(l)for(let c of l)r.add(c.codePointAt(0))},i=l=>{let c=Pf(l.fontFamily);if(c.length)for(let u of c)n.add(`${u}__${Wn(l.fontWeight)}__${Bn(l.fontStyle)}__${Df(l.fontStretch)}`)},a=l=>{i(J(l));for(let c of["::before","::after"]){let u=J(l,c),d=u&&u.content;if(!(!d||d==="none"||d==="normal"))if(i(u),/^["']/.test(d))o(d.slice(1,-1));else{let f=d.match(/\\[0-9A-Fa-f]{1,6}/g);if(f)for(let m of f)try{r.add(parseInt(m.slice(1),16))}catch{}}}};a(e);let s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;s.nextNode();){let l=s.currentNode;if(l.nodeType===Node.TEXT_NODE){if(t&&l.parentElement&&!t(l.parentElement))continue;o(l.nodeValue||"")}else{if(t&&!t(l))continue;a(l)}}return{required:n,usedCodepoints:r}}function Qf(e,t){return Qs(e,t).required}async function el(e,t=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(e||[]).filter(Boolean);if(r.length===0)return;let o=()=>{let i=n.createElement("div");i.setAttribute("data-snapdom-internal",""),i.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let a of r){let s=n.createElement("span");s.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",s.style.fontFamily=`"${a}"`,s.style.fontWeight="700",s.style.fontStyle="italic",s.style.fontSize="32px",s.style.lineHeight="1",s.style.whiteSpace="nowrap",s.style.margin="0",s.style.padding="0",i.appendChild(s)}n.body.appendChild(i),i.offsetWidth,n.body.removeChild(i)};for(let i=0;i<Math.max(1,t);i++)o(),await tt(),await tt()}function ep(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}function as(e,t=!1){let n="",r=Math.max(1,e);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return t?n.toUpperCase():n}function ss(e,t=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,e)),o="";for(let[i,a]of n)for(;r>=i;)o+=a,r-=i;return t?o:o.toLowerCase()}function ls(e,t){switch((t||"decimal").toLowerCase()){case"decimal":return String(e);case"decimal-leading-zero":{let n=Math.abs(e);return(e<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":return as(e,!1);case"upper-alpha":return as(e,!0);case"lower-roman":return ss(e,!1);case"upper-roman":return ss(e,!0);default:return String(e)}}function tp(e){let t=new WeakMap,n=e instanceof Document?e.documentElement:e,r=c=>c&&c.tagName==="LI",o=c=>{let u=0,d=c?.parentElement;if(!d)return 0;for(let f of d.children){if(f===c)break;f.tagName==="LI"&&u++}return u},i=c=>{let u=new Map;for(let[d,f]of c)u.set(d,f.slice());return u},a=(c,u,d)=>{let f=i(c),m;try{m=d.style?.counterReset||getComputedStyle(d).counterReset}catch{}if(m&&m!=="none")for(let y of m.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):0;if(!w)continue;let b=u.get(w);if(b&&b.length){let S=b.slice();S.push(v),f.set(w,S)}else f.set(w,[v])}let p;try{p=d.style?.counterSet||getComputedStyle(d).counterSet}catch{}if(p&&p!=="none")for(let y of p.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):0;if(!w)continue;let b=f.get(w)||[];b.length===0&&b.push(0),b[b.length-1]=v,f.set(w,b)}let h;try{h=d.style?.counterIncrement||getComputedStyle(d).counterIncrement}catch{}if(h&&h!=="none")for(let y of h.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):1;if(!w)continue;let b=f.get(w)||[];b.length===0&&b.push(0),b[b.length-1]+=v,f.set(w,b)}try{if(getComputedStyle(d).display==="list-item"&&r(d)){let y=d.parentElement,g=1;if(y&&y.tagName==="OL"){let v=y.getAttribute("start"),b=Number.isFinite(Number(v))?Number(v):1,S=o(d),x=d.getAttribute("value");g=Number.isFinite(Number(x))?Number(x):b+S}else g=1+o(d);let w=f.get("list-item")||[];w.length===0&&w.push(0),w[w.length-1]=g,f.set("list-item",w)}}catch{}return f},s=(c,u,d)=>{let f=a(d,u,c);t.set(c,f);let m=f;for(let h of c.children)m=s(h,f,m);let p=new Map;for(let[h,y]of d){let g=y.length,w=m.get(h);p.set(h,w&&w.length?w.slice(0,g):y.slice())}for(let[h,y]of m)!p.has(h)&&y.length&&!u.has(h)&&p.set(h,y.slice(0,1));return p},l=new Map;return s(n,l,l),{get(c,u){let d=t.get(c)?.get(u);return d&&d.length?d[d.length-1]:0},getStack(c,u){let d=t.get(c)?.get(u);return d?d.slice():[]}}}function np(e,t,n){if(!e||e==="none")return e;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return e.replace(r,(o,i,a)=>{let s=String(a).split(",").map(l=>l.trim());if(i==="counter"){let l=s[0]?.replace(/^["']|["']$/g,""),c=(s[1]||"decimal").toLowerCase(),u=n.get(t,l);return ls(u,c)}else{let l=s[0]?.replace(/^["']|["']$/g,""),c=s[1]?.replace(/^["']|["']$/g,"")??"",u=(s[2]||"decimal").toLowerCase(),d=n.getStack(t,l);return d.length?d.map(f=>ls(f,u)).join(c):""}})}catch{return"- "}}rt();var gt=new WeakMap,cs=1e3;function rp(e,t){let n=tl(e);return t?(t.__pseudoPreflightFp!==n&&(t.__pseudoPreflight=ds(e,n),t.__pseudoPreflightFp=n),!!t.__pseudoPreflight):ds(e,n)}function go(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function tl(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${t.length}|`,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a.tagName==="STYLE"){let s=a.textContent?a.textContent.length:0;n+=`S${s}|`;let l=a.sheet,c=l?go(l):null;c&&(r+=c.length)}else{let s=a.getAttribute("href")||"",l=a.getAttribute("media")||"all";n+=`L${s}|m:${l}|`;let c=a.sheet,u=c?go(c):null;u&&(r+=u.length)}}let o=e.adoptedStyleSheets;return n+=`ass:${Array.isArray(o)?o.length:0}|tr:${r}`,n}function us(e,t,n){let r=go(e);if(!r)return!1;for(let o=0;o<r.length;o++){if(n.budget<=0)return!1;let i=r[o],a=i&&i.cssText?i.cssText:"";n.budget--;for(let s of t)if(a.includes(s))return!0;if(i&&i.cssRules&&i.cssRules.length)for(let s=0;s<i.cssRules.length&&n.budget>0;s++){let l=i.cssRules[s],c=l&&l.cssText?l.cssText:"";n.budget--;for(let u of t)if(c.includes(u))return!0}if(n.budget<=0)return!1}return!1}function ds(e=document,t=tl(e)){let n=gt.get(e);if(n&&n.fingerprint===t)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],o=e.querySelectorAll("style");for(let a=0;a<o.length;a++){let s=o[a].textContent||"";for(let l of r)if(s.includes(l))return gt.set(e,{fingerprint:t,result:!0}),!0}let i=e.adoptedStyleSheets;if(Array.isArray(i)&&i.length){let a={budget:cs};try{for(let s of i)if(us(s,r,a))return gt.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let a=e.querySelectorAll('style,link[rel~="stylesheet"]'),s={budget:cs};for(let l=0;l<a.length&&s.budget>0;l++){let c=a[l],u=null;if(c.tagName,u=c.sheet||null,u&&us(u,r,s))return gt.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(gt.set(e,{fingerprint:t,result:!0}),!0):(gt.set(e,{fingerprint:t,result:!1}),!1)}function fs(e){for(let t of["Top","Right","Bottom","Left"]){let n=parseFloat(e[`border${t}Width`])||0,r=e[`border${t}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function op(e,t){let n=null,r=()=>{if(!n)try{n=tp(e)}catch(o){Q(t,"buildCounterContext failed",o),n={get:()=>0,getStack:()=>[]}}return n};return{get(o,i){return r().get(o,i)},getStack(o,i){return r().getStack(o,i)}}}function ip(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"')t=!t;else if(r==="/"&&!t)return e.slice(0,n).trim()}return e}function ap(e){if(!e)return"";let t=[],n=/"([^"]*)"/g,r=0,o;for(;o=n.exec(e);){let a=e.slice(r,o.index).trim();a&&t.push(a),t.push(o[1]),r=n.lastIndex}let i=e.slice(r).trim();return i&&t.push(i),t.join("")}function yo(e,t,n){let r=e.parentElement,o=r&&n?n.get(r):null;return o?{get(i,a){let s=t.get(i,a),l=o.get(a);return typeof l=="number"?Math.max(s,l):s},getStack(i,a){let s=t.getStack(i,a);if(!s.length)return s;let l=o.get(a);if(typeof l=="number"){let c=s.slice();return c[c.length-1]=Math.max(c[c.length-1],l),c}return s}}:t}function bo(e,t,n){let r=new Map;function o(c){let u=[];if(!c||c==="none")return u;for(let d of String(c).split(",")){let f=d.trim().split(/\s+/),m=f[0],p=Number.isFinite(Number(f[1]))?Number(f[1]):void 0;m&&u.push({name:m,num:p})}return u}let i=o(t?.counterReset),a=o(t?.counterSet),s=o(t?.counterIncrement);function l(c){if(r.has(c))return r.get(c).slice();let u=n.getStack(e,c);u=u.length?u.slice():[];let d=i.find(p=>p.name===c);if(d){let p=Number.isFinite(d.num)?d.num:0;u=u.length?[...u,p]:[p]}let f=a.find(p=>p.name===c);if(f){let p=Number.isFinite(f.num)?f.num:0;u.length===0&&(u=[0]),u[u.length-1]=p}let m=s.find(p=>p.name===c);if(m){let p=Number.isFinite(m.num)?m.num:1;u.length===0&&(u=[0]),u[u.length-1]+=p}return r.set(c,u.slice()),u}return{get(c,u){let d=l(u);return d.length?d[d.length-1]:0},getStack(c,u){return l(u)},__incs:s}}function sp(e,t,n,r){let o;try{o=J(e,t)}catch{}let i=o?.content;if(!i||i==="none"||i==="normal")return{text:"",incs:[]};i=ip(i);let a=yo(e,n,r),s=bo(e,o,a),l=ep(i)?np(i,e,s):i;return{text:ap(l),incs:s.__incs||[]}}async function wo(e,t,n,r){if(e?.nodeType!==1||t?.nodeType!==1||e.tagName==="TEXTAREA")return;let o=e.ownerDocument||document;if(!rp(o,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=op(e.ownerDocument||document,n));let i=n.__counterCtx;for(let s of["::before","::after","::first-letter"])try{let l=J(e,s);if(!l||l.content==="none"&&l.backgroundImage==="none"&&l.backgroundColor==="transparent"&&!fs(l)&&(!l.transform||l.transform==="none")&&l.display==="inline")continue;if(s==="::first-letter"){let L=J(e),W=(L?.display||"").toLowerCase();if(W.includes("flex")||W.includes("grid"))continue;let B=oe=>l[oe]!==L[oe]&&(parseFloat(l[oe])||0)!==0;if(!(l.color!==L.color||l.fontSize!==L.fontSize||l.fontWeight!==L.fontWeight||l.fontFamily!==L.fontFamily||l.fontStyle!==L.fontStyle||l.textTransform!==L.textTransform||l.float!==L.float&&l.float!=="none"||B("paddingTop")||B("paddingRight")||B("paddingBottom")||B("paddingLeft")||B("marginTop")||B("marginRight")||B("marginBottom")||B("marginLeft")))continue;let Y=Array.from(t.childNodes).find(oe=>oe.nodeType===Node.TEXT_NODE&&oe.textContent?.trim().length>0);if(!Y)continue;let O=Y.textContent,j=O.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],X=O.slice(j?.length||0);if(!j||/[\uD800-\uDFFF]/.test(j))continue;let z=document.createElement("span");z.textContent=j,z.dataset.snapdomPseudo="::first-letter";let Z=Ha(l),H=ao(Z,"span");n.styleMap.set(z,H);let re=document.createTextNode(X);t.replaceChild(re,Y),t.insertBefore(z,re);continue}let c=l.content??"",u=c===""||c==="none"||c==="normal",{text:d,incs:f}=sp(e,s,i,n.__siblingCounters),m=l.backgroundImage,p=l.backgroundColor,h=l.fontFamily,y=parseInt(l.fontSize)||32,g=parseInt(l.fontWeight)||!1,w=l.color||"#000",v=l.transform,b=Oe(h),S=!u&&d!=="",x=m&&m!=="none",I=p&&p!=="transparent"&&p!=="rgba(0, 0, 0, 0)",C=fs(l),E=v&&v!=="none",k=c!=="none"&&c!=="normal",T=k&&((parseFloat(l.width)||0)>0||(parseFloat(l.height)||0)>0),F=k&&l.boxShadow&&l.boxShadow!=="none",D=k&&l.outlineStyle&&l.outlineStyle!=="none"&&(parseFloat(l.outlineWidth)||0)>0;if(!(S||x||I||C||E||T||F||D)){if(f&&f.length&&e.parentElement){let L=n.__siblingCounters.get(e.parentElement)||new Map;for(let{name:W}of f){if(!W)continue;let B=yo(e,i,n.__siblingCounters),Y=bo(e,J(e,s),B).get(e,W);L.set(W,Y)}n.__siblingCounters.set(e.parentElement,L)}continue}let R=d.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(d),_=!1;if(S&&!b&&d.length>1&&!R){let L=J(e),W=parseFloat(L.fontSize)||16,B=parseFloat(L.lineHeight);Number.isFinite(B)||(B=W*1.5),e.getBoundingClientRect().height<B*1.6&&(t.style.whiteSpace="nowrap",_=!0)}let N=document.createElement("span");N.dataset.snapdomPseudo=s,N.style.pointerEvents="none",_&&(N.style.whiteSpace="nowrap");let P=Ha(l),K=(J(e).display||"").toLowerCase(),U=K.includes("flex")||K.includes("grid");if(U){let L=P["min-width"];(!L||L==="auto"||L==="0px")&&(P["min-width"]="0px")}let q=ao(P,"span",S,U);if(n.styleMap.set(N,q),b&&d&&d.length===1){let{dataUrl:L,width:W,height:B}=await _f(d,h,g,y,w),Y=document.createElement("img");Y.src=L,Y.style=`height:${y}px;width:${W/B*y}px;object-fit:contain;`,N.appendChild(Y),t.dataset.snapdomHasIcon="true"}else if(d&&R){let L=ws(d,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??Ao(d);if(L?.trim())try{let W=await Ce(Un(L),{as:"dataURL",useProxy:r.useProxy});if(W?.ok&&typeof W.data=="string"){let B=document.createElement("img");B.src=W.data,B.style=`width:${y}px;height:auto;object-fit:contain;`,N.appendChild(B)}}catch(W){console.error(`[snapdom] Error in pseudo ${s} for`,e,W)}}else!b&&S&&(N.textContent=d);N.style.backgroundImage="none","maskImage"in N.style&&(N.style.maskImage="none"),"webkitMaskImage"in N.style&&(N.style.webkitMaskImage="none");try{N.style.backgroundRepeat=l.backgroundRepeat,N.style.backgroundSize=l.backgroundSize,l.backgroundPositionX&&l.backgroundPositionY?(N.style.backgroundPositionX=l.backgroundPositionX,N.style.backgroundPositionY=l.backgroundPositionY):N.style.backgroundPosition=l.backgroundPosition,N.style.backgroundOrigin=l.backgroundOrigin,N.style.backgroundClip=l.backgroundClip,N.style.backgroundAttachment=l.backgroundAttachment,N.style.backgroundBlendMode=l.backgroundBlendMode}catch{}if(x)try{let L=so(m),W=await Promise.all(L.map(Ss));N.style.backgroundImage=W.join(", ")}catch(L){console.warn(`[snapdom] Failed to inline background-image for ${s}`,L)}I&&(N.style.backgroundColor=p);let ne=N.childNodes.length>0||N.textContent?.trim()!==""||x||I||C||E||T||F||D;if(f&&f.length&&e.parentElement){let L=n.__siblingCounters.get(e.parentElement)||new Map,W=yo(e,i,n.__siblingCounters),B=bo(e,J(e,s),W);for(let{name:Y}of f){if(!Y)continue;let O=B.get(e,Y);L.set(Y,O)}n.__siblingCounters.set(e.parentElement,L)}if(!ne)continue;s==="::before"?(t.dataset.snapdomHasBefore="1",t.insertBefore(N,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(N))}catch(l){console.warn(`[snapdom] Failed to capture ${s} for`,e,l)}let a=Array.from(t.children).filter(s=>!s.dataset.snapdomPseudo);if(n.nodeMap)for(let s of a){let l=n.nodeMap.get(s);l?.nodeType===1&&await wo(l,s,n,r)}else{let s=Array.from(e.children);for(let l=0;l<Math.min(s.length,a.length);l++)await wo(s[l],a[l],n,r)}}function lp(e,t){if(!e||e?.nodeType!==1)return;let n=e.ownerDocument||document,r=t||n,o=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(o.length===0)return;let i=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],s=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),l="http://www.w3.org/1999/xlink",c=b=>{if(!b||!b.getAttribute)return null;let S=b.getAttribute("href")||b.getAttribute("xlink:href")||(typeof b.getAttributeNS=="function"?b.getAttributeNS(l,"href"):null);if(S)return S;let x=b.attributes;if(!x)return null;for(let I=0;I<x.length;I++){let C=x[I];if(!C||!C.name)continue;if(C.name==="href")return C.value;let E=C.name.indexOf(":");if(E!==-1&&C.name.slice(E+1)==="href")return C.value}return null},u=new Set(Array.from(e.querySelectorAll("[id]")).map(b=>b.id)),d=new Set,f=!1,m=(b,S=null)=>{if(!b)return;i.lastIndex=0;let x;for(;x=i.exec(b);){f=!0;let I=(x[1]||"").trim();I&&(u.has(I)||(d.add(I),S&&!S.has(I)&&S.add(I)))}},p=b=>{let S=b.querySelectorAll("use");for(let C of S){let E=c(C);if(!E||!E.startsWith("#"))continue;f=!0;let k=E.slice(1).trim();k&&!u.has(k)&&d.add(k)}let x='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(b.getAttribute("style")||"");for(let C of a)m(b.getAttribute(C));let I=b.querySelectorAll(x);for(let C of I){m(C.getAttribute("style")||"");for(let E of a)m(C.getAttribute(E))}};for(let b of o)p(b);if(!f)return;let h=e.querySelector("svg.inline-defs-container");h||(h=n.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(h,e.firstChild||null));let y=h.querySelector("defs")||null,g=b=>{if(!b||u.has(b))return null;let S=s(b),x=I=>{let C=r.querySelector(I);return C&&!e.contains(C)?C:null};return x(`svg defs > *#${S}`)||x(`svg > symbol#${S}`)||x(`*#${S}`)};if(!d.size)return;let w=new Set(d),v=new Set;for(;w.size;){let b=w.values().next().value;if(w.delete(b),!b||u.has(b)||v.has(b))continue;let S=g(b);if(!S){v.add(b);continue}y||(y=n.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(y));let x=S.cloneNode(!0);x.id||x.setAttribute("id",b),y.appendChild(x),v.add(b),u.add(b);let I=[x,...x.querySelectorAll("*")];for(let C of I){let E=c(C);if(E&&E.startsWith("#")){let T=E.slice(1).trim();T&&!u.has(T)&&!v.has(T)&&w.add(T)}let k=C.getAttribute?.("style")||"";k&&m(k,w);for(let T of a){let F=C.getAttribute?.(T);F&&m(F,w)}}}}ge();function cp(e){let t=getComputedStyle(e),n=t.outlineStyle,r=t.outlineWidth,o=t.borderStyle,i=t.borderWidth,a=n!=="none"&&parseFloat(r)>0,s=o==="none"||parseFloat(i)===0;if(a&&s){let l=e.style.border;return e.style.border=`${r} solid transparent`,()=>{e.style.border=l}}return()=>{}}function up(e){let t=[];try{let n=e.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=r.style.contentVisibility||"",i=getComputedStyle(r);(i.contentVisibility||i.getPropertyValue("content-visibility")||"")==="auto"&&(t.push({el:r,original:o}),r.style.contentVisibility="visible")}if(e instanceof HTMLElement){let r=getComputedStyle(e);(r.contentVisibility||r.getPropertyValue("content-visibility")||"")==="auto"&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:n,original:r}of t)try{n.style.contentVisibility=r}catch{}}}Ee();Zn();function dp(e){return nl(e.boxShadow)}function fp(e){return nl(e.textShadow)}function nl(e){if(!e||e==="none")return{top:0,right:0,bottom:0,left:0};let t=[],n="",r=0;for(let l=0;l<e.length;l++){let c=e[l];c==="("?r++:c===")"&&(r=Math.max(0,r-1)),c===","&&r===0?(t.push(n),n=""):n+=c}n.trim()&&t.push(n);let o=0,i=0,a=0,s=0;for(let l of t){if(/\binset\b/i.test(l))continue;let c=l.match(/-?\d+(\.\d+)?px/g)?.map(y=>parseFloat(y))||[];if(c.length<2)continue;let[u,d,f=0,m=0]=c,p=Math.abs(u)+f+m,h=Math.abs(d)+f+m;i=Math.max(i,p+Math.max(u,0)),s=Math.max(s,p+Math.max(-u,0)),a=Math.max(a,h+Math.max(d,0)),o=Math.max(o,h+Math.max(-d,0))}return{top:Math.ceil(o),right:Math.ceil(i),bottom:Math.ceil(a),left:Math.ceil(s)}}function pp(e){let t=e.filter&&e.filter!=="none"?e.filter:e.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,o;for(;o=n.exec(t);)r+=parseFloat(o[1])||0;let i=Math.ceil(r);return{top:i,right:i,bottom:i,left:i}}function mp(e){if((e.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),n=parseFloat(e.outlineOffset||"0")||0,r=t+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function hp(e){let t=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!t||t==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=t.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,o=0,i=0,a=0,s=!1;for(let l of n){s=!0;let c=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(h=>parseFloat(h))||[],[u=0,d=0,f=0]=c,m=Math.abs(u)+f,p=Math.abs(d)+f;o=Math.max(o,m+Math.max(u,0)),a=Math.max(a,m+Math.max(-u,0)),i=Math.max(i,p+Math.max(d,0)),r=Math.max(r,p+Math.max(-d,0))}return{bleed:{top:$(r),right:$(o),bottom:$(i),left:$(a)},has:s}}function gp(e,t){if(!e||!t||!t.style)return null;let n=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let s=null;try{s=jn(e).scale}catch{}try{t.style.transform="none"}catch{}if(!s)return{a:1,b:0,c:0,d:1};let l=s.trim().split(/\s+/).map(parseFloat),c=Number.isFinite(l[0])?l[0]:1,u=Number.isFinite(l[1])?l[1]:c;return{a:c,b:0,c:0,d:u}}function o(s,l,c,u){let d=Math.sqrt(s*s+l*l)||0,f=0,m=0;if(d>0){let p=s/d,h=l/d;f=p*c+h*u;let y=c-p*f,g=u-h*f;m=Math.sqrt(y*y+g*g)||0,m>0?f=f/m:f=0}return{a:d,b:0,c:f*m,d:m}}let i=r.match(/^matrix\(\s*([^)]+)\)$/i);if(i){let s=i[1].split(",").map(l=>parseFloat(l.trim()));if(s.length===6&&s.every(Number.isFinite)){let[l,c,u,d]=s,f=o(l,c,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let s=a[1].split(",").map(l=>parseFloat(l.trim()));if(s.length===16&&s.every(Number.isFinite)){let l=s[0],c=s[1],u=s[4],d=s[5],f=o(l,c,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}try{let s=new DOMMatrix(r),l=o(s.a,s.b,s.c,s.d);try{t.style.transform=`matrix(${l.a}, ${l.b}, ${l.c}, ${l.d}, 0, 0)`}catch{}return l}catch{return null}}function Hn(e,t,n,r,o){let i=n.a,a=n.b,s=n.c,l=n.d,c=n.e||0,u=n.f||0;function d(g,w){let v=g-r,b=w-o,S=i*v+s*b,x=a*v+l*b;return S+=r+c,x+=o+u,[S,x]}let f=[d(0,0),d(e,0),d(0,t),d(e,t)],m=1/0,p=1/0,h=-1/0,y=-1/0;for(let[g,w]of f)g<m&&(m=g),w<p&&(p=w),g>h&&(h=g),w>y&&(y=w);return{minX:m,minY:p,maxX:h,maxY:y,width:h-m,height:y-p}}function vo(e,t,n){let r=(e.transformOrigin||"0 0").trim().split(/\s+/),[o,i]=[r[0]||"0",r[1]||"0"],a=(s,l)=>{let c=s.toLowerCase();return c==="left"||c==="top"?0:c==="center"?l/2:c==="right"||c==="bottom"?l:c.endsWith("px")?parseFloat(c)||0:c.endsWith("%")?(parseFloat(c)||0)*l/100:/^-?\d+(\.\d+)?$/.test(c)&&parseFloat(c)||0};return{ox:a(o,t),oy:a(i,n)}}function jn(e){let t={rotate:"0deg",scale:null,translate:null},n=typeof e.computedStyleMap=="function"?e.computedStyleMap():null;if(n){let o=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},i=o("rotate");if(i)if(i.angle){let l=i.angle;t.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit}else i.unit?t.rotate=i.unit==="rad"?i.value*180/Math.PI+"deg":i.value+i.unit:t.rotate=String(i);else{let l=getComputedStyle(e);t.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let a=o("scale");if(a){let l="x"in a&&a.x?.value!=null?a.x.value:Array.isArray(a)?a[0]?.value:Number(a)||1,c="y"in a&&a.y?.value!=null?a.y.value:Array.isArray(a)?a[1]?.value:l;t.scale=`${l} ${c}`}else{let l=getComputedStyle(e);t.scale=l.scale&&l.scale!=="none"?l.scale:null}let s=o("translate");if(s){let l="x"in s&&"value"in s.x?s.x.value:Array.isArray(s)?s[0]?.value:0,c="y"in s&&"value"in s.y?s.y.value:Array.isArray(s)?s[1]?.value:0,u="x"in s&&s.x?.unit?s.x.unit:"px",d="y"in s&&s.y?.unit?s.y.unit:"px";t.translate=`${l}${u} ${c}${d}`}else{let l=getComputedStyle(e);t.translate=l.translate&&l.translate!=="none"?l.translate:null}return t}let r=getComputedStyle(e);return t.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",t.scale=r.scale&&r.scale!=="none"?r.scale:null,t.translate=r.translate&&r.translate!=="none"?r.translate:null,t}var ro=null;function yp(){if(ro)return ro;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),ro=e,e}function bp(e){let t=yp(),n=document.createElement("div");n.style.transformOrigin="0 0",e.baseTransform&&(n.style.transform=e.baseTransform),e.rotate&&(n.style.rotate=e.rotate),e.scale&&(n.style.scale=e.scale),e.translate&&(n.style.translate=e.translate),t.appendChild(n);let r=vp(n);return t.removeChild(n),r}function wp(e){let t=J(e),n=t.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let r=t.rotate&&t.rotate!=="none"&&t.rotate!=="0deg",o=t.scale&&t.scale!=="none"&&t.scale!=="1",i=t.translate&&t.translate!=="none"&&t.translate!=="0px 0px";return!!(r||o||i)}function vp(e){let t=getComputedStyle(e).transform;if(!t||t==="none")return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}var So="http://www.w3.org/1999/xhtml",rl=new WeakSet;function ol(e,t){if(!t)return null;let n=e.ownerDocument||document,r=n.defaultView||window,o,i,a,s;if(t==="viewport")o=0,i=0,a=n.documentElement?.clientWidth||r.innerWidth,s=n.documentElement?.clientHeight||r.innerHeight;else if(typeof t=="object")o=(Number(t.x)||0)-(r.scrollX||0),i=(Number(t.y)||0)-(r.scrollY||0),a=Number(t.width),s=Number(t.height);else return null;return a>0&&s>0?{left:o,top:i,width:a,height:s,right:o+a,bottom:i+s}:null}function Co(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode&&e.getRootNode();return t instanceof ShadowRoot?t.host:null}function Sp(e,t){for(let n=t;n;n=Co(n))if(n===e)return!0;return!1}function Cp(e,t){for(let n=Co(e);n&&n!==t&&n?.nodeType===1;n=Co(n)){let r=J(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function il(e,t){try{let n=new DOMMatrix;if(t&&t.rotate&&t.rotate!=="0deg"&&(n=n.multiply(new DOMMatrix(`rotate(${t.rotate})`))),t&&t.scale){let r=String(t.scale).trim().split(/\s+/).filter(Boolean);r.length&&r.every(o=>Number.isFinite(Number(o)))&&(n=n.multiply(new DOMMatrix(`scale(${r.join(",")})`)))}return e&&(n=n.multiply(new DOMMatrix(e))),n}catch{return null}}function xp(e,t,n,r,o){let i=e.getBoundingClientRect();t?.nodeType===1&&t.namespaceURI===So&&J(e).position==="static"&&(t.style.position="relative");let a=[];for(let[s,l]of n){if(s?.nodeType!==1||s.namespaceURI!==So||l?.nodeType!==1||l===e||!Sp(e,l))continue;let c=r.get(l)||J(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||s.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;rl.add(s);let f=c.transform&&c.transform!=="none"?c.transform:"",m=jn(l),p=!!(f||m.rotate!=="0deg"||m.scale||m.translate),h=p?il(f,m):null,y=!h||!h.is2D||h.a===1&&h.b===0&&h.c===0&&h.d===1,g=d.width,w=d.height;y||(g=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let v=l.getRootNode&&l.getRootNode()instanceof ShadowRoot,b=i,S=e.clientLeft||0,x=e.clientTop||0;if(v){let T=Cp(l,e);T&&(b=T.getBoundingClientRect(),S=T.clientLeft||0,x=T.clientTop||0)}let I=d.left-b.left-S,C=d.top-b.top-x;if(p)if(s.style.translate="none",s.style.rotate="none",s.style.scale="none",y)s.style.transform="none";else{s.style.transform=`matrix(${h.a},${h.b},${h.c},${h.d},0,0)`;let{ox:T,oy:F}=vo(c,g,w),D=Hn(g,w,{a:h.a,b:h.b,c:h.c,d:h.d,e:0,f:0},T,F);I-=D.minX,C-=D.minY}if(u!=="fixed"){let T=s.cloneNode(!1);T.setAttribute("data-snap-ph","1"),T.style.position="static",T.style.visibility="hidden",T.style.width=`${g}px`,T.style.height=`${w}px`,T.style.boxSizing="border-box",s.parentElement?.insertBefore(T,s)}let E=g+2,k=w;o&&(Math.abs(C-o.y)<.5&&(C-=1,k+=1),Math.abs(I-o.x)<.5&&(I-=1,E+=1)),s.style.position="absolute",s.style.left=`${I}px`,s.style.top=`${C}px`,s.style.right="auto",s.style.bottom="auto",s.style.margin="0",s.style.width=`${E}px`,s.style.height=`${k}px`,s.style.boxSizing="border-box",v||a.push(s)}for(let s of a)t.appendChild(s)}function Ip(e,t,n={}){if(!e||!t||!t.style)return;let r=getComputedStyle(e);try{t.style.boxShadow="none"}catch(i){Q(n,"stripRootShadows boxShadow",i)}try{t.style.textShadow="none"}catch(i){Q(n,"stripRootShadows textShadow",i)}try{t.style.outline="none"}catch(i){Q(n,"stripRootShadows outline",i)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=o.length?o:"none"}catch(i){Q(n,"stripRootShadows filter",i)}}function Ap(e,t){if(!e||!t||!t.style)return;let n=1;try{n=parseFloat(getComputedStyle(e).zoom)}catch{return}if(!(!t.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{t.style.setProperty("zoom","1","important")}catch{}}function ps(e){let t=e.display||"";if(t.includes("flex")||t.includes("grid")||t.startsWith("table")||t==="inline-block"||t==="flow-root"||e.position==="absolute"||e.position==="fixed"||e.float&&e.float!=="none")return!0;let n=e.overflowX||e.overflow||"visible",r=e.overflowY||e.overflow||"visible";return!!(n!=="visible"||r!=="visible"||e.contain&&/\b(layout|content|paint|strict)\b/.test(e.contain))}function Mp(e,t){let n=Array.from(e.childNodes),r=t==="top"?n:n.reverse();for(let o of r){if(o.nodeType===Node.TEXT_NODE){if(/\S/.test(o.textContent||""))return null;continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;let i=getComputedStyle(o),a=String(i.display||"");if(!(a==="none"||a==="contents")&&!(i.position==="absolute"||i.position==="fixed"))return i.float&&i.float!=="none"||a.startsWith("inline")?null:o}return null}function Ep(e,t,n){if(!e||!t||!t.style)return;let r=getComputedStyle(e);if(!ps(r))for(let o of["top","bottom"]){let i=o==="top"?"Top":"Bottom";if((parseFloat(r[`border${i}Width`])||0)>0||(parseFloat(r[`padding${i}`])||0)>0)continue;let a=e,s=t;for(;a&&s;){let l=Mp(a,o);if(!l)break;let c=n?Array.from(s.children).find(f=>n.get(f)===l)||null:s.children[Array.from(a.children).indexOf(l)]||null,u=getComputedStyle(l),d=parseFloat(u[`margin${i}`])||0;if(c&&c.style&&d>0&&(c.style[`margin${i}`]="0px"),ps(u)||(parseFloat(u[`border${i}Width`])||0)>0||(parseFloat(u[`padding${i}`])||0)>0)break;a=l,s=c}}}function kp(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),n=[];for(;t.nextNode();)n.push(t.currentNode);for(let r of n)r.remove()}function Tp(e,t={}){let{stripFrameworkDirectives:n=!0}=t,r=new Set(["xml","xlink"]),o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;o.nextNode();){let i=o.currentNode;for(let a of Array.from(i.attributes)){let s=a.name;if(s.startsWith("*")){i.removeAttribute(s);continue}if(s.includes("@")){i.removeAttribute(s);continue}if(s.includes(":")){let l=s.split(":",1)[0];if(!r.has(l)){i.removeAttribute(s);continue}}if(n&&(s.startsWith("x-")||s.startsWith("v-")||s.startsWith(":")||s.startsWith("on:")||s.startsWith("bind:")||s.startsWith("let:")||s.startsWith("class:"))){i.removeAttribute(s);continue}}}}var ms=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function Rp(e){if(!e)return;let t=o=>{if(o.nodeType===Node.ELEMENT_NODE){if(o.attributes)for(let i of Array.from(o.attributes)){let a=i.value.replace(ms,"");if(a!==i.value)try{o.setAttribute(i.name,a)}catch{}}}else if(o.nodeType===Node.TEXT_NODE||o.nodeType===Node.CDATA_SECTION_NODE){let i=o.data.replace(ms,"");i!==o.data&&(o.data=i)}};t(e);let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),r;for(;r=n.nextNode();)t(r)}function Np(e,t={}){e&&(Tp(e,t),kp(e),Rp(e))}function Lp(e){try{let t=e.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(t)}catch{return!1}}function Fp(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}function $p(e,t){if(e?.nodeType!==1||Lp(e)||Fp(e))return!1;let n=t.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=t.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||t.transform&&t.transform!=="none")}function _p(e,t,n=new Map){function r(o,i){if(o?.nodeType!==1||i?.nodeType!==1)return;let a=o.childElementCount>i.childElementCount,s=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,s),a&&$p(o,s)){i.style.height||(i.style.height="auto"),i.style.width||(i.style.width="auto"),i.style.removeProperty("block-size"),i.style.removeProperty("inline-size"),i.style.minHeight||(i.style.minHeight="0"),i.style.minWidth||(i.style.minWidth="0"),i.style.maxHeight||(i.style.maxHeight="none"),i.style.maxWidth||(i.style.maxWidth="none");let u=s.overflowY||s.overflowBlock||"visible",d=s.overflowX||s.overflowInline||"visible";(u!=="visible"||d!=="visible")&&(i.style.overflow="visible")}let l=Array.from(o.children),c=Array.from(i.children);for(let u=0;u<Math.min(l.length,c.length);u++)r(l[u],c[u])}r(e,t)}function Op(e){let t=getComputedStyle(e);return!(t.display==="none"||t.position==="absolute"||t.position==="fixed")}function Pp(e,t){if(e?.nodeType!==1)return!1;if(e.getAttribute("data-capture")==="exclude"&&t?.excludeMode==="remove")return!0;if(Array.isArray(t?.exclude))for(let n of t.exclude)try{if(e.matches(n))return t.excludeMode==="remove"}catch(r){Q(t,"exclude selector match failed",r)}if(typeof t?.filter=="function"&&t.filterMode==="remove")try{if(!t.filter(e))return!0}catch(n){Q(t,"filter function failed",n)}return!1}function Dp(e,t){let n=getComputedStyle(e),r=e.getBoundingClientRect(),o=1/0,i=-1/0,a=!1,s=Array.from(e.children);for(let m of s){if(Pp(m,t)||!Op(m))continue;let p=m.getBoundingClientRect(),h=p.top-r.top,y=p.bottom-r.top;y<=h||(h<o&&(o=h),y>i&&(i=y),a=!0)}let l=a?Math.max(0,i-o):0,c=parseFloat(n.borderTopWidth)||0,u=parseFloat(n.borderBottomWidth)||0,d=parseFloat(n.paddingTop)||0,f=parseFloat(n.paddingBottom)||0;return c+u+d+f+l}var $=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,yt=.75;function Wp(e,t,n,r,o,i){let a=e.ownerDocument||document,s=e.getBoundingClientRect(),l=o>0&&s.width>0?s.width/o:1,c=i>0&&s.height>0?s.height/i:1;if(Math.abs(l-c)>.02)return 0;let u=a.createElement("div");u.setAttribute("data-snapdom-internal",""),u.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+o+"px!important;overflow:visible!important;visibility:hidden!important;";let d=u.attachShadow({mode:"open"}),f=a.createElement("style");f.textContent=n,d.appendChild(f);let m=t.cloneNode(!0);d.appendChild(m),a.body.appendChild(u);let p=0,h=(y,g,w)=>{let v=J(y),b=v.boxSizing==="border-box",S=(x,I,...C)=>{let E=parseFloat(x);if(!Number.isFinite(E))return I;let k=E+(b?0:C.reduce((T,F)=>T+(parseFloat(F)||0),0));return Math.abs(k-I)<=.51?k:I};return{width:S(v.width,g,v.paddingLeft,v.paddingRight,v.borderLeftWidth,v.borderRightWidth),height:S(v.height,w,v.paddingTop,v.paddingBottom,v.borderTopWidth,v.borderBottomWidth)}};try{let y=m.getBoundingClientRect(),g=m.offsetWidth||o,w=m.offsetHeight||i,v=g>0&&y.width>0?y.width/g:1,b=w>0&&y.height>0?y.height/w:1,S=(x,I,C=!1)=>{let E=x.children,k=I.children,T=Math.min(E.length,k.length);for(let F=0;F<T;F++){let D=E[F],R=k[F],_=r.get(D),N=C||rl.has(D);if(_?.nodeType===1&&D?.namespaceURI===So&&D.style&&_.isConnected){let P=_.getBoundingClientRect();if(P.width>0&&P.height>0){let K=R.getBoundingClientRect(),U=P.width/l,q=P.height/c,ne=K.width,L=K.height,W=_.offsetWidth||U,B=_.offsetHeight||q,Y=R.offsetWidth||ne,O=R.offsetHeight||L,j=Math.abs(U-W)>yt||Math.abs(q-B)>yt||Math.abs(ne-Y)>yt||Math.abs(L-O)>yt;if(N){let Z=h(R,Y,O);U=ne>0?U*v*Z.width/ne:U,q=L>0?q*b*Z.height/L:q,ne=Z.width,L=Z.height}else if(j){let Z=h(_,W,B),H=h(R,Y,O);U=Z.width,q=Z.height,ne=H.width,L=H.height}let X=ne-U,z=L-q;(Math.abs(X)>yt||Math.abs(z)>yt)&&(D.style.boxSizing="border-box",D.style.width=`${$(U)}px`,D.style.height=`${$(q)}px`,p++)}}S(D,R,N)}};S(t,m)}finally{u.remove()}return p}var Bp=/::-webkit-scrollbar(-[a-z]+)?\b/i;function xo(e,t=new Set){let n="";if(!e)return n;for(let r=0;r<e.length;r++){let o=e[r];try{if(o.type===CSSRule.IMPORT_RULE&&o.styleSheet){n+=xo(o.styleSheet.cssRules,t);continue}if(o.type===CSSRule.MEDIA_RULE&&o.cssRules){let i=xo(o.cssRules,t);i&&(n+=`@media ${o.conditionText}{${i}}`);continue}if(o.type===CSSRule.STYLE_RULE){let i=o.selectorText||"";if(Bp.test(i)){let a=o.cssText;a&&!t.has(a)&&(t.add(a),n+=a)}}}catch{}}return n}var hs=new WeakMap;function Hp(e){let t="";for(let n of e.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}t+=(n.href||"inline")+":"+r+"|"}return t}function Up(e){if(!e||!e.styleSheets)return"";let t=Hp(e),n=hs.get(e);if(n&&n.fp===t)return n.css;let r=new Set,o="";for(let i of Array.from(e.styleSheets))try{let a=i.cssRules;a&&(o+=xo(a,r))}catch{}return hs.set(e,{fp:t,css:o}),o}ot();var Rn=new Set;async function Vp(e,t={}){let n=t.__session||A.session,r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:t},o=null;if(t.clip){let d=ol(e,t.clip);if(d){r.clip={rect:d,root:e};let f=e.getBoundingClientRect();o={x:d.left-f.left,y:d.top-f.top,width:d.width,height:d.height}}}let i,a="",s="";if(Rn.size){let d=(f,m)=>{for(let p=m;p;p=p.assignedSlot||p.parentElement||p.getRootNode()?.host)if(p===f)return!0;return!1};for(;;){let f=[...Rn].filter(({root:m})=>d(m,e)||d(e,m)).map(({promise:m})=>m.catch(()=>{}));if(!f.length)break;await Promise.all(f)}}if(!r.clip&&e.isConnected&&e.ownerDocument?.visibilityState!=="hidden")try{let d=e.getBoundingClientRect(),f=e.ownerDocument?.defaultView||window,m=d.right<=0||d.bottom<=0||d.left>=f.innerWidth||d.top>=f.innerHeight,p=[];if(m&&(()=>{let h=[];e.shadowRoot&&h.push(e.shadowRoot);for(let y of e.querySelectorAll("*"))y.shadowRoot&&h.push(y.shadowRoot);for(;h.length;){let y=h.pop(),g=y.host?.localName==="calcite-icon";for(let w of y.querySelectorAll("*")){if(w.shadowRoot&&h.push(w.shadowRoot),!g||w.localName!=="svg")continue;let v=w.querySelectorAll("path");if(!v.length||[...v].some(S=>S.getAttribute("d")?.trim()))continue;let b=w.getBoundingClientRect();b.width&&b.height&&p.push(w)}}})(),p.length){let h=(async()=>{let g=e.style,w=e.hasAttribute("style"),v=new Map,b=(S,x)=>{v.has(S)||v.set(S,{value:g.getPropertyValue(S),priority:g.getPropertyPriority(S)}),g.setProperty(S,x,"important");let I=v.get(S);I.forcedValue=g.getPropertyValue(S),I.forcedPriority=g.getPropertyPriority(S)};try{b("left","0"),b("top","0"),b("right","auto"),b("bottom","auto"),b("margin-top","0"),b("margin-right","0"),b("margin-bottom","0"),b("margin-left","0"),b("transform","none"),b("translate","none"),b("opacity","0"),b("pointer-events","none");let S=e.getBoundingClientRect();if(S.right<=0||S.bottom<=0||S.left>=f.innerWidth||S.top>=f.innerHeight){let C=e.parentElement?.getBoundingClientRect(),E=C&&C.right>0&&C.left<f.innerWidth?Math.max(0,C.left):0,k=C&&C.bottom>0&&C.top<f.innerHeight?Math.max(0,C.top):0;b("position","fixed"),b("left",`${E}px`),b("top",`${k}px`)}await tt(100);let x=Date.now()+1500,I=()=>p.some(C=>{if([...C.querySelectorAll("path")].some(k=>k.getAttribute("d")?.trim()))return!1;let E=C.getBoundingClientRect();return E.width&&E.height&&E.right>0&&E.bottom>0&&E.left<f.innerWidth&&E.top<f.innerHeight});for(;Date.now()<x&&I();)await new Promise(C=>setTimeout(C,25));await tt(100)}finally{for(let[S,x]of v)g.getPropertyValue(S)!==x.forcedValue||g.getPropertyPriority(S)!==x.forcedPriority||(x.value?g.setProperty(S,x.value,x.priority):g.removeProperty(S));!w&&!g.length&&e.removeAttribute("style"),await tt(100)}})(),y={root:e,promise:h};Rn.add(y);try{await h}finally{Rn.delete(y)}}}catch{}let l=cp(e),c=r.clip?()=>{}:up(e);try{i=await Dn(e,r,t)}catch(d){throw console.warn("deepClone failed:",d),d}finally{c(),l()}try{lp(i)}catch(d){console.warn("inlineExternal defs or symbol failed:",d)}try{await wo(e,i,r,t)}catch(d){console.warn("inlinePseudoElements failed:",d)}await gf(i,r);try{let d=i.querySelectorAll("style[data-sd]");for(let f of d)s+=f.textContent||"",f.remove()}catch(d){Q(r,"Failed to extract shadow CSS from style[data-sd]",d)}let u=sd(r.styleMap);a=Array.from(u.entries()).map(([d,f])=>`.${f}{${d}}`).join(""),a=s+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+a;for(let[d,f]of r.styleMap.entries()){if(d.tagName==="STYLE")continue;if(d.getRootNode&&d.getRootNode()instanceof ShadowRoot){d.setAttribute("style",f.replace(/;/g,"; "));continue}let m=u.get(f);m&&d.classList.add(m);let p=d.style?.backgroundImage,h=d.dataset?.snapdomHasIcon;p&&p!=="none"&&(d.style.backgroundImage=p),h&&(d.style.verticalAlign="middle",d.style.display="inline")}if((r.clip||e.scrollTop||e.scrollLeft)&&i?.nodeType===1)try{let d=r.clip&&o?{x:o.x,y:o.y}:{x:0,y:0};xp(e,i,r.nodeMap,r.styleCache,d)}catch(d){Q(r,"freezeViewportPositioned failed",d)}for(let[d,f]of r.nodeMap.entries()){if(r.clip&&f===e)continue;let m=f.scrollLeft,p=f.scrollTop;if((m||p)&&d?.nodeType===1&&d.namespaceURI==="http://www.w3.org/1999/xhtml"){d.style.overflow="hidden",d.style.scrollbarWidth="none",d.style.msOverflowStyle="none";try{let y=d.querySelectorAll("*");for(let g of y){if(g.nodeType!==1||g.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let w=g.style.position;if(w==="fixed"||w==="absolute"){let v=parseFloat(g.style.top)||0,b=parseFloat(g.style.left)||0;g.style.top=`${v+p}px`,g.style.left=`${b+m}px`,w==="fixed"&&(g.style.position="absolute")}}}catch{}let h=document.createElement("div");for(h.style.all="unset",h.style.transform=`translate(${-m}px, ${-p}px)`,h.style.willChange="transform",h.style.display="inline-block",h.style.width="100%";d.firstChild;)h.appendChild(d.firstChild);d.appendChild(h)}}if(e===r.nodeMap.get(i)){let d=r.styleCache.get(e)||J(e);r.styleCache.set(e,d);let f=Zu(d.transform);i.style.margin="0",i.style.top="auto",i.style.left="auto",i.style.right="auto",i.style.bottom="auto",i.style.animation="none",i.style.transition="none",i.style.willChange="auto",i.style.float="none",i.style.clear="none",i.style.transform=f||""}for(let[d,f]of r.nodeMap.entries())f.tagName==="PRE"&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:i,classCSS:a,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:o}}rt();ge();var al="http://www.w3.org/1999/xlink";function zp(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||(typeof e.getAttributeNS=="function"?e.getAttributeNS(al,"href"):null)}function qp(e){let t=parseInt(e.dataset?.snapdomWidth||"",10)||0,n=parseInt(e.dataset?.snapdomHeight||"",10)||0,r=parseInt(e.getAttribute("width")||"",10)||0,o=parseInt(e.getAttribute("height")||"",10)||0,i=parseFloat(e.style?.width||"")||0,a=parseFloat(e.style?.height||"")||0,s=t||i||r||e.width||e.naturalWidth||100,l=n||a||o||e.height||e.naturalHeight||100;return{width:s,height:l}}async function Gp(e,t={}){let n=Array.from(e.querySelectorAll("img"));e.tagName==="IMG"&&n.unshift(e);let r=async s=>{if(!s.getAttribute("src")){let p=s.currentSrc||s.src||qn(s.getAttribute("srcset"),s)||"";p&&s.setAttribute("src",p)}s.removeAttribute("srcset"),s.removeAttribute("sizes");let l=s.src||"";if(!l)return;let c=A.image?.get(l);if(c){s.src=c,s.width||(s.width=s.naturalWidth||100),s.height||(s.height=s.naturalHeight||100);return}let u=await Ce(l,{as:"dataURL",useProxy:t.useProxy});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){A.image?.set(l,u.data),s.src=u.data,s.width||(s.width=s.naturalWidth||100),s.height||(s.height=s.naturalHeight||100);return}let{width:d,height:f}=qp(s),{fallbackURL:m}=t||{};if(m)try{let p=typeof m=="function"?await m({width:d,height:f,src:l,element:s}):m;if(p){let h=await Ce(p,{as:"dataURL",useProxy:t.useProxy});if(h?.ok&&typeof h.data=="string"){s.src=h.data,s.width||(s.width=d),s.height||(s.height=f);return}}}catch{}if(t.placeholders!==!1){let p=document.createElement("div");p.style.cssText=[`width:${d}px`,`height:${f}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${f}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),p.textContent="img",s.replaceWith(p)}else{let p=document.createElement("div");p.style.cssText=`display:inline-block;width:${d}px;height:${f}px;visibility:hidden;`,s.replaceWith(p)}},o=6;for(let s=0;s<n.length;s+=o){let l=n.slice(s,s+o).map(r);await Promise.allSettled(l)}let i=Array.from(e.querySelectorAll("image"));e.localName==="image"&&i.unshift(e);let a=async s=>{let l=zp(s);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let c=await Ce(l,{as:"dataURL",useProxy:t.useProxy});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(s.setAttribute("href",c.data),s.removeAttribute("xlink:href"),typeof s.removeAttributeNS=="function"&&s.removeAttributeNS(al,"href"))};for(let s=0;s<i.length;s+=o){let l=i.slice(s,s+o).map(a);await Promise.allSettled(l)}}Ee();ge();var jp=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Yp=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],Zp=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],Xp=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function Kp(e,t,n,r){let o=n.get(e)||J(e);n.has(e)||n.set(e,o);let i=o.getPropertyValue("border-image"),a=o.getPropertyValue("border-image-source"),s=i&&i!=="none"||a&&a!=="none",l=o.getPropertyValue("background-image"),c=o.getPropertyValue("background-color");if(l&&l!=="none"||c&&c!=="rgba(0, 0, 0, 0)"&&c!=="transparent"||/url\s*\(|gradient\s*\(/i.test(o.getPropertyValue("background")||""))for(let u of Zp){let d=o.getPropertyValue(u);d&&t.style.setProperty(u,d)}for(let u of jp){let d=o.getPropertyValue(u);if(u==="background-image"&&(!d||d==="none")){let p=o.getPropertyValue("background");p&&/url\s*\(/.test(p)&&(d=so(p).filter(h=>/url\s*\(/.test(h)).join(", ")||d)}if(!d||d==="none")continue;let f=so(d),m=await Promise.all(f.map(p=>Ss(p,r)));m.some(p=>p&&p!=="none"&&!/^url\(undefined/.test(p))&&t.style.setProperty(u,m.join(", "))}for(let u of Yp){let d=o.getPropertyValue(u);!d||d==="initial"||t.style.setProperty(u,d)}if(s)for(let u of Xp){let d=o.getPropertyValue(u);!d||d==="initial"||t.style.setProperty(u,d)}}async function Jp(e,t,n,r={},o=A.session.nodeMap){if(!t)return;let i=[];e&&ja(e)&&i.push([e,t]);let a=[t];for(;a.length;){let l=a.pop();if(l.children)for(let c of l.children){if(c.tagName==="STYLE")continue;let u=o.get(c);u&&ja(u)&&i.push([u,c]),a.push(c)}}let s=6;for(let l=0;l<i.length;l+=s)await Promise.allSettled(i.slice(l,l+s).map(([c,u])=>Kp(c,u,n,r)))}ge();Ee();function Qp(e,t,n=A.session.nodeMap){let r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(let s=o.currentNode;s;s=o.nextNode()){let l=n.get(s);if(l?.nodeType!==1)continue;let c=J(l),u=c.getPropertyValue("backdrop-filter")||c.getPropertyValue("-webkit-backdrop-filter");u&&u!=="none"&&s!==t&&r.push({cloneEl:s,orig:l,bf:u,path:nm(t,s)})}if(!r.length)return;let i=e.getBoundingClientRect(),a=r.map((s,l)=>{let c=t.cloneNode(!0);tm(c,t,s.orig.getBoundingClientRect(),n),rm(gs(c,s.path));for(let u=0;u<l;u++){let d=gs(c,r[u].path);d&&(d.style.setProperty("backdrop-filter","none","important"),d.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...s,copy:c}});for(let{cloneEl:s,orig:l,bf:c,copy:u}of a)em(s,l,c,u,i)}function em(e,t,n,r,o){let i=t.getBoundingClientRect();if(!i.width||!i.height)return;let a=J(t),s=t.offsetWidth?i.width/t.offsetWidth:1,l=Math.abs(s-1)>.001?1/s:1;r.style.position="absolute",r.style.left=`${(o.left-i.left)*l}px`,r.style.top=`${(o.top-i.top)*l}px`,r.style.width=`${o.width}px`,r.style.height=`${o.height}px`,r.style.margin="0",r.style.filter=n,l!==1&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",c.appendChild(r);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",u.style.backgroundColor=a.backgroundColor,u.style.backgroundImage=e.style.backgroundImage||a.backgroundImage;for(let d of["background-size","background-position","background-repeat","background-origin","background-clip"])u.style.setProperty(d,a.getPropertyValue(d));e.style.setProperty("background-color","transparent","important"),e.style.setProperty("background-image","none","important"),e.style.setProperty("backdrop-filter","none","important"),e.style.setProperty("-webkit-backdrop-filter","none","important"),a.position==="static"&&(e.style.position="relative"),e.style.isolation="isolate",e.prepend(u),e.prepend(c)}var Nn=128;function tm(e,t,n,r){let o=[[e,t]];for(;o.length;){let[i,a]=o.pop(),s=r.get(a);if(s?.nodeType===1){let u=s.getBoundingClientRect();(u.left>n.right+Nn||u.right<n.left-Nn||u.top>n.bottom+Nn||u.bottom<n.top-Nn)&&(i.tagName==="IMG"&&i.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),i.style&&(i.style.backgroundImage="none"))}let l=i.children,c=a.children;for(let u=0;u<l.length;u++)o.push([l[u],c[u]])}}function nm(e,t){let n=[];for(let r=t;r!==e;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function gs(e,t){if(!t)return null;let n=e;for(let r of t)if(n=n.children[r],!n)return null;return n}function rm(e){if(e)for(let t=e;t&&t.parentNode;){let n=t.parentNode;for(;t.nextSibling;)t.nextSibling.remove();t===e&&t.remove(),t=n}}Ee();ge();function om(e,t){if(!e)return()=>{};let n=[],r=200;function o(i){if(t){let c=i.getBoundingClientRect();if(c.width>0||c.height>0){let u=Math.max(c.right,c.left+(i.scrollWidth||0)),d=Math.max(c.bottom,c.top+(i.scrollHeight||0));if(u<t.left-r||c.left>t.right+r||d<t.top-r||c.top>t.bottom+r)return}}let a=getComputedStyle(i),s=im(i,a);s&&n.push(s);let l=am(i,a);l&&n.push(l);for(let c of i.children||[])o(c)}return o(e),()=>n.forEach(i=>i())}function im(e,t){if(!e)return()=>{};t=t||getComputedStyle(e);let n=sm(t);if(n<=0)return()=>{};if(!ll(e))return()=>{};let r=sl(e),o=r.text,i=cm(t);r.write("X");let a=e.scrollHeight-i;r.restore();let s=a>0?a:lm(t),l=Math.round(s*n+i);if(e.scrollHeight<=l+.5)return()=>{};let c=0,u=o.length,d=-1;for(;c<=u;){let f=c+u>>1;r.write(o.slice(0,f)+"\u2026"),e.scrollHeight<=l+.5?(d=f,c=f+1):u=f-1}return r.write((d>=0?o.slice(0,d):"")+"\u2026"),()=>{r.restore()}}function am(e,t){if(!e)return()=>{};if(t=t||getComputedStyle(e),t.textOverflow!=="ellipsis")return()=>{};if(t.whiteSpace!=="nowrap"&&t.whiteSpace!=="pre")return()=>{};if(t.overflowX!=="hidden"&&t.overflowX!=="clip")return()=>{};if(!ll(e))return()=>{};if(e.scrollWidth<=e.clientWidth+.5)return()=>{};let n=sl(e),r=n.text,o=0,i=r.length,a=-1;for(;o<=i;){let s=o+i>>1;n.write(r.slice(0,s)+"\u2026"),e.scrollWidth<=e.clientWidth+.5?(a=s,o=s+1):i=s-1}return n.write((a>=0?r.slice(0,a):"")+"\u2026"),()=>{n.restore()}}function sl(e){let t=[];for(let r=e.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&t.push(r);let n=t.map(r=>r.data);return{text:n.join(""),write(r){t[0].data=r;for(let o=1;o<t.length;o++)t[o].data=""},restore(){for(let r=0;r<t.length;r++)t[r].data=n[r]}}}function sm(e){let t=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");t=(t||"").trim();let n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:0}function lm(e){let t=(e.lineHeight||"").trim(),n=parseFloat(e.fontSize)||16;return!t||t==="normal"?Math.round(n*1.2):t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*n):t.endsWith("%")?Math.round(parseFloat(t)/100*n):Math.round(n*1.2)}function cm(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}function ll(e){return e.childElementCount>0?!1:Array.from(e.childNodes).some(t=>t.nodeType===Node.TEXT_NODE)}var Rt=[];function Jn(e){if(!e)return null;if(Array.isArray(e)){let[t,n]=e;return typeof t=="function"?t(n):t}if(typeof e=="object"&&"plugin"in e){let{plugin:t,options:n}=e;return typeof t=="function"?t(n):t}return typeof e=="function"?e():e}function um(...e){let t=e.flat();for(let n of t){let r=Jn(n);r&&(Rt.some(o=>o&&o.name&&r.name&&o.name===r.name)||Rt.push(r))}}function cl(e){return e&&Array.isArray(e.plugins)?e.plugins:Rt}async function ze(e,t,n){let r=n,o=cl(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,r);typeof s<"u"&&(r=s)}return r}async function dm(e,t,n){let r=[],o=cl(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,n);typeof s<"u"&&r.push(s)}return r}function fm(e){let t=[];if(Array.isArray(e))for(let n of e){let r=Jn(n);if(!r||!r.name)continue;let o=t.findIndex(i=>i&&i.name===r.name);o>=0&&t.splice(o,1),t.push(r)}for(let n of Rt)n&&n.name&&!t.some(r=>r.name===n.name)&&t.push(n);return Object.freeze(t)}function pm(e,t,n=!1){return!e||e.plugins&&!n||(e.plugins=fm(t)),e}function ul(){return Rt.slice()}ge();var mm=.92,hm=.95;async function gm(e){let t=new Image;if(t.decoding="sync",t.src=e,typeof t.decode=="function")try{return await t.decode(),t}catch{}return await new Promise((n,r)=>{t.onload=()=>n(),t.onerror=r}),t}function ym(e){let t=/^data:([^;,]+)/.exec(e);return t?t[1]:""}async function $o(e,t,n){if(typeof e!="string"||!e.startsWith("data:image")||e.startsWith("data:image/svg"))return null;let r=e.length+":"+e.slice(0,64)+e.slice(-64)+":"+Math.round(t)+"x"+Math.round(n);if(A.compress.has(r))return A.compress.get(r);let o=await(async()=>{let i;try{i=await gm(e)}catch{return null}let a=i.naturalWidth||i.width,s=i.naturalHeight||i.height;if(!a||!s)return null;let l=Math.min(1,Math.max(t/a,n/s));if(!(l>0)||l>=.95)return null;let c=l*hm,u=Math.max(1,Math.round(a*c)),d=Math.max(1,Math.round(s*c)),f=document.createElement("canvas");f.width=u,f.height=d;let m=f.getContext("2d");if(!m)return null;m.imageSmoothingEnabled=!0,m.imageSmoothingQuality="high",m.drawImage(i,0,0,u,d);let p=ym(e),h=p==="image/jpeg"?"image/jpeg":p==="image/webp"?"image/webp":"image/png";try{let y=f.toDataURL(h,mm);if(typeof y=="string"&&y.startsWith("data:image")&&y.length<e.length)return y}catch{}return null})();return A.compress.set(r,o),o}async function bm(e,t){if(!t.compress)return{count:0,before:0,after:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("img"));e.tagName==="IMG"&&r.unshift(e);let o=0,i=0,a=0,s=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,f=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!d||!f)return;let m=await $o(u,d*n,f*n);m&&(o++,i+=u.length,a+=m.length,c.setAttribute("src",m))},l=6;for(let c=0;c<r.length;c+=l)await Promise.allSettled(r.slice(c,c+l).map(s));return{count:o,before:i,after:a}}function wm(e){let t=e.offsetWidth||e.getBoundingClientRect().width||0,n=e.offsetHeight||e.getBoundingClientRect().height||0;return{w:t,h:n}}async function vm(e,t,n=A.session.nodeMap){if(!t.compress)return{count:0};let r=(t.scale||1)*(t.dpr||1),o=[],i=[e,...e.querySelectorAll("*")];for(let c of i){let u=c.style&&c.style.backgroundImage;u&&u.includes("data:image")&&o.push(c)}let a=0,s=async c=>{let u=n.get(c);if(!u||!u.isConnected)return;let d;try{d=getComputedStyle(u)}catch{return}if((d.backgroundRepeat||"repeat").toLowerCase().split(",").some(v=>v.trim()!=="no-repeat"))return;let{w:f,h:m}=wm(u);if(!f||!m)return;let p=f*r,h=m*r,y=c.style.backgroundImage,g=[...y.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],w=y;for(let v of g){let b=v[2];if(b.startsWith("data:image/svg"))continue;let S=await $o(b,p,h);S&&(w=w.split(b).join(S),a++)}w!==y&&(c.style.backgroundImage=w)},l=6;for(let c=0;c<o.length;c+=l)await Promise.allSettled(o.slice(c,c+l).map(s));return{count:a}}async function Sm(e,t){if(!t.compress)return{count:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("image"));e.localName==="image"&&r.unshift(e);let o=0,i=async s=>{let l=s.getAttribute("href")||(typeof s.getAttributeNS=="function"?s.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!l||!l.startsWith("data:image")||l.startsWith("data:image/svg"))return;let c=parseFloat(s.getAttribute("width"))||0,u=parseFloat(s.getAttribute("height"))||0;if(!c||!u)return;let d=await $o(l,c*n,u*n);d&&(s.setAttribute("href",d),s.hasAttribute("xlink:href")&&s.setAttribute("xlink:href",d),o++)},a=6;for(let s=0;s<r.length;s+=a)await Promise.allSettled(r.slice(s,s+a).map(i));return{count:o}}async function Cm(e,t,n){t.compress&&(await bm(e,t),await vm(e,t,n),await Sm(e,t))}function xm(e){if(Array.isArray(e.plugins)){for(let t of e.plugins)if(Jn(t)?.name==="picture-resolver")return!0}return ul().some(t=>t?.name==="picture-resolver")}function Im(e){let t=Array.isArray(e.plugins)?e.plugins:ul(),n=[];for(let r of t){let o=Jn(r);o&&typeof o.resolveNode=="function"&&n.push(o.resolveNode.bind(o))}return n.length?n:null}var Am=2e3,Mm=3;function Em(e){let t=Date.now(),n=A.burstAdvice.get(e);if(!n||t-n.firstTs>Am){A.burstAdvice.set(e,{count:1,firstTs:t,warned:!1});return}n.count++,n.count>=Mm&&!n.warned&&(n.warned=!0,console.warn("[snapdom] Captured this element multiple times. Pass { burst: true } to increase the speed."))}async function km(e,t){if(!e)throw new Error("Element cannot be null or undefined");Yu(t.cache),t.__session={styleMap:A.session.styleMap,styleCache:A.session.styleCache,nodeMap:A.session.nodeMap},t.burst||Em(e),t.__resolveNodeHooks=Im(t);let n=t.fast,r=t.outerTransforms!==!1,o=!!t.outerShadows,i=t.clip?ol(e,t.clip):null,a={element:e,options:t,plugins:t.plugins},s,l,c,u,d,f,m="",p="",h,y,g=null;await ze("beforeSnap",a);let w=null;t.resolvePicturePlaceholders!==!1&&!xm(t)&&(w=await Zd(a.element,a.options)),await ze("beforeClone",a);let v=om(a.element,i);try{({clone:s,classCSS:l,styleCache:c,nodeMap:u,reconcileRisk:d,clipWindow:f}=await Vp(a.element,a.options)),d>0&&!t.reconcile&&!A.warnedReconcile&&(A.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time).")),!r&&s&&(g=gp(a.element,s)),!o&&s&&Ip(a.element,s,a.options),s&&(Ep(a.element,s,u),Ap(a.element,s))}finally{v()}if(a={clone:s,classCSS:l,styleCache:c,nodeMap:u,...a},await ze("afterClone",a),w&&await w(),Np(a.clone),a.options?.excludeMode==="remove"||a.options?.filterMode==="remove")try{_p(a.element,a.clone,a.styleCache)}catch(T){console.warn("[snapdom] shrink pass failed:",T)}try{await $f(a.clone,a.element,a.nodeMap)}catch{}let b=T=>new Promise((F,D)=>{Fn(()=>{Promise.resolve().then(T).then(F,D)},{fast:n})}),S=(async()=>{await Promise.all([b(()=>Gp(a.clone,a.options)),b(()=>Jp(a.element,a.clone,a.styleCache,a.options,a.nodeMap))]);try{Qp(a.element,a.clone,a.nodeMap)}catch(T){console.warn("[snapdom] backdrop-filter emulation failed:",T)}t.compress&&await b(()=>Cm(a.clone,a.options,a.nodeMap))})(),x=Promise.resolve();t.embedFonts&&(x=b(async()=>{let T=a.element.ownerDocument||document,F=i?_=>{try{let N=_.getBoundingClientRect();return N.right>=i.left-200&&N.left<=i.right+200&&N.bottom>=i.top-200&&N.top<=i.bottom+200}catch{return!0}}:null,{required:D,usedCodepoints:R}=Qs(a.element,F);if(De()){let _=new Set(Array.from(D).map(N=>String(N).split("__")[0]).filter(Boolean));await el(_,1,T)}m=await Jf({required:D,usedCodepoints:R,preCached:!1,exclude:a.options.excludeFonts,localFonts:a.options.localFonts,useProxy:a.options.useProxy,fontStylesheetDomains:a.options.fontStylesheetDomains,doc:T})})),await Promise.all([S,x]);let I=id(a.clone).sort(),C=I.join(",");A.baseStyle.has(C)?p=A.baseStyle.get(C):await new Promise(T=>{Fn(()=>{p=ad(I),A.baseStyle.set(C,p),T()},{fast:n})});let E=Up(a.element?.ownerDocument||document);a={fontsCSS:m,baseCSS:p,scrollbarCSS:E,...a},await ze("beforeRender",a),await new Promise(T=>{Fn(()=>{let F=J(a.element),D=a.element.getBoundingClientRect(),R=Math.max(1,$(a.element.offsetWidth||parseFloat(F.width)||D.width||1)),_=Math.max(1,$(a.element.offsetHeight||parseFloat(F.height)||D.height||1)),N=a.element.ownerDocument||document;if(!f&&(a.element===N.body||a.element===N.documentElement)&&!N.documentElement.hasAttribute("data-sd-pinned")){let ie=Math.max(a.element.scrollHeight||0,N.documentElement?.scrollHeight||0,N.body?.scrollHeight||0),me=Math.max(a.element.scrollWidth||0,N.documentElement?.scrollWidth||0,N.body?.scrollWidth||0);ie>0&&(_=Math.max(_,$(ie))),me>0&&(R=Math.max(R,$(me)));try{let ue=(a.scrollbarCSS||"").length+(a.baseCSS||"").length+(a.fontsCSS||"").length+(a.classCSS||"").length,ye=A.measureHints.get(a.element);if(ye&&ye.cssLen===ue&&ye.w0===R)ye.csh>0&&(_=Math.max(_,$(ye.csh))),ye.csw>0&&(R=Math.max(R,$(ye.csw)));else{let de=N.createElement("div");de.setAttribute("data-snapdom-internal",""),de.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+R+"px!important;overflow:visible!important;visibility:hidden!important;";let ke=de.attachShadow({mode:"open"}),Bt=N.createElement("style");Bt.textContent=(a.scrollbarCSS||"")+a.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+a.classCSS,ke.appendChild(Bt),ke.appendChild(a.clone.cloneNode(!0)),N.body.appendChild(de);let He=de.scrollHeight,or=de.scrollWidth;N.body.removeChild(de),A.measureHints.set(a.element,{cssLen:ue,w0:R,csh:He,csw:or}),He>0&&(_=Math.max(_,$(He))),or>0&&(R=Math.max(R,$(or)))}}catch{}}if(a.options?.excludeMode==="remove"||a.options?.filterMode==="remove"){let ie=Dp(a.element,a.options);Number.isFinite(ie)&&ie>0&&(_=Math.max(1,Math.min(_,$(ie+1))))}if(a.options?.reconcile)try{let ie=(a.scrollbarCSS||"")+a.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+a.classCSS;Wp(a.element,a.clone,ie,a.nodeMap,R,_)}catch(ie){console.warn("[snapdom] reconcile pass failed:",ie)}let P=(ie,me=NaN)=>{let ue=typeof ie=="string"?parseFloat(ie):ie;return Number.isFinite(ue)?ue:me},K=P(a.options.width),U=P(a.options.height),q=f?$(f.width):R,ne=f?$(f.height):_,L=q,W=ne,B=Number.isFinite(K),Y=Number.isFinite(U),O=ne>0?q/ne:1;B&&Y?(L=Math.max(1,$(K)),W=Math.max(1,$(U))):B?(L=Math.max(1,$(K)),W=Math.max(1,$(L/(O||1)))):Y&&(W=Math.max(1,$(U)),L=Math.max(1,$(W*(O||1))));let j=0,X=0,z=R,Z=_;if(f){let ie=0,me=0;if(oo(a.element)){let ue=null;if(!r&&g&&Number.isFinite(g.a))ue={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0};else{let ye=jn(a.element),de=il(F.transform&&F.transform!=="none"?F.transform:"",ye);de&&de.is2D&&(ue={a:de.a,b:de.b,c:de.c,d:de.d,e:0,f:0})}if(ue&&!(ue.a===1&&ue.b===0&&ue.c===0&&ue.d===1)){let{ox:ye,oy:de}=vo(F,R,_),ke=Hn(R,_,ue,ye,de);ie=ke.minX,me=ke.minY}}j=$(f.x+ie),X=$(f.y+me),z=$(j+f.width),Z=$(X+f.height)}else if(!r&&g&&Number.isFinite(g.a)){let ie={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0},me=Hn(R,_,ie,0,0);j=$(me.minX),X=$(me.minY),z=$(me.maxX),Z=$(me.maxY)}else if(r&&oo(a.element)){let ie=F.transform&&F.transform!=="none"?F.transform:"",me=jn(a.element),ue=bp({baseTransform:ie,rotate:me.rotate||"0deg",scale:me.scale,translate:me.translate}),{ox:ye,oy:de}=vo(F,R,_),ke=ue.is2D?ue:new DOMMatrix(ue.toString()),Bt={a:ke.a,b:ke.b,c:ke.c,d:ke.d,e:0,f:0},He=Hn(R,_,Bt,ye,de);j=$(He.minX),X=$(He.minY),z=$(He.maxX),Z=$(He.maxY)}let H=dp(F),re=fp(F),oe=pp(F),le=mp(F),We=hp(F),$t=f?{top:0,right:0,bottom:0,left:0}:o?{top:$(Math.max(H.top,re.top)+oe.top+le.top+We.bleed.top),right:$(Math.max(H.right,re.right)+oe.right+le.right+We.bleed.right),bottom:$(Math.max(H.bottom,re.bottom)+oe.bottom+le.bottom+We.bleed.bottom),left:$(Math.max(H.left,re.left)+oe.left+le.left+We.bleed.left)}:{top:oe.top,right:oe.right,bottom:oe.bottom,left:oe.left};j=$(j-$t.left),X=$(X-$t.top),z=$(z+$t.right),Z=$(Z+$t.bottom);let zo=Math.max(1,$(z-j)),qo=Math.max(1,$(Z-X)),Hl=B||Y?$(L/q):1,Ul=Y||B?$(W/ne):1,Vl=Math.max(1,$(zo*Hl)),zl=Math.max(1,$(qo*Ul)),Go="http://www.w3.org/2000/svg",ql=oo(a.element)?2:0,at=$(ql+(r?0:1)),_t=Math.ceil(zo+at*2),Ot=Math.ceil(qo+at*2),Pt=$(-($(j)-at)),Dt=$(-($(X)-at)),jo=Math.max(0,Pt),Yo=Math.max(0,Dt),Zo=$(_t-Math.min(0,Pt)),Xo=$(Ot-Math.min(0,Dt)),Be=document.createElementNS(Go,"foreignObject");Be.setAttribute("x",String(Math.min(0,Pt))),Be.setAttribute("y",String(Math.min(0,Dt))),Be.setAttribute("width",String(Zo)),Be.setAttribute("height",String(Xo)),Be.style.overflow="visible";let Ko=document.createElement("style"),Gl="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Ko.textContent=(a.scrollbarCSS||"")+a.baseCSS+a.fontsCSS+Gl+a.classCSS,Be.appendChild(Ko);let Wt=document.createElement("div");Wt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Wt.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${Zo}px;height:${Xo}px`+(jo!==0||Yo!==0?`;padding:${Yo}px 0 0 ${jo}px !important`:""),Wt.appendChild(a.clone),Be.appendChild(Wt);let jl=new XMLSerializer().serializeToString(Be),Jo=B||Y,Yl=Object.freeze({w0:q,h0:ne,vbW:_t,vbH:Ot,targetW:L,targetH:W,contentX:$(Pt+(f?j:0)),contentY:$(Dt+(f?X:0)),clip:f?Object.freeze({x:$(j),y:$(X),width:q,height:ne}):null});Object.defineProperty(t,"meta",{value:Yl,enumerable:!0,writable:!1,configurable:!0});let Zl=!Jo||De()?_t:$(Vl+at*2),Xl=!Jo||De()?Ot:$(zl+at*2),Kl=parseFloat(J(N.documentElement)?.fontSize)||16;y=`<svg xmlns="${Go}" width="${Zl}" height="${Xl}" viewBox="0 0 ${_t} ${Ot}" font-size="${Kl}px">`+jl+"</svg>",h=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(y)}`,a={svgString:y,dataURL:h,...a},T()},{fast:n})}),await ze("afterRender",a);let k=document.getElementById("snapdom-sandbox");return k&&k.style.position==="absolute"&&k.remove(),a.dataURL}function oo(e){return wp(e)}ge();function Tm(e={}){let t=e.format??"png";t==="jpg"&&(t="jpeg");let n=ju(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:e.placeholders!==!1,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:n,useProxy:typeof e.useProxy=="string"?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,reconcile:e.reconcile??!1,burst:e.burst??!1,invalidate:e.invalidate??!1,clip:e.clip??null,compress:e.compress!==!1,excludeStyleProps:e.excludeStyleProps??null,resolvePicturePlaceholders:e.resolvePicturePlaceholders!==!1,pictureResolver:e.pictureResolver&&typeof e.pictureResolver=="object"?e.pictureResolver:{}}}ot();$s();var ys=new WeakMap;function dl(e,t,n){let r=new Set;if(e instanceof HTMLVideoElement&&r.add(e),e.querySelectorAll)for(let o of e.querySelectorAll("video"))r.add(o);for(let o of t.trackedVideos)r.has(o)||(o.removeEventListener("timeupdate",n),o.removeEventListener("seeked",n),t.trackedVideos.delete(o));for(let o of r)t.trackedVideos.has(o)||(o.addEventListener("timeupdate",n),o.addEventListener("seeked",n),t.trackedVideos.add(o))}function Rm(e){let t={dirty:!0,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedVideos:new Set},n=i=>{t.capturing||Vs(i)&&(t.dirty=!0)},r=()=>{t.capturing||(t.dirty=!0)},o=e.ownerDocument||document;try{let i=new MutationObserver(n);i.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),t.observers.push(i)}catch{}try{if(o.head){let i=new MutationObserver(n);i.observe(o.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),t.observers.push(i)}}catch{}return t.markDirty=n,t.onMediaDirty=r,dl(e,t,r),t}function bs(e){let{burst:t,invalidate:n,...r}=e||{};try{return JSON.stringify(r,Object.keys(r).sort())}catch{return null}}function Nm(e,t,n,r){let o=ys.get(e);o||(o=Rm(e),o.baselineSignature=bs(t),ys.set(e,o));let i=bs(t),a=i===null||i!==o.baselineSignature,s=async()=>{for(let c of o.observers)o.markDirty(c.takeRecords());if(n.invalidate&&(o.dirty=!0),!a&&!o.dirty&&o.last)return o.last;o.capturing=!0,a||(o.dirty=!1);try{let c=await r();return a||(o.last=c),c}finally{for(let c of o.observers)c.takeRecords();o.capturing=!1,dl(e,o,o.onMediaDirty)}},l=o.inflight.then(s,s);return o.inflight=l.catch(()=>{}),l}Ee();rt();ge();function Lm(...e){return um(...e),te}var te=Object.assign($m,{plugins:Lm}),Io=Symbol("snapdom.internal"),Fm=Symbol("snapdom.internal.silent");async function $m(e,t){if(!e)throw new Error("Element cannot be null or undefined");let n=Tm(t);if(pm(n,t&&t.plugins),De()){if(n.embedFonts===!0)try{let o=Qf(e),i=new Set([...o].map(a=>String(a).split("__")[0]).filter(Boolean));await el(i,1)}catch{}let r=Array.from(e.querySelectorAll("canvas"));e.tagName==="CANVAS"&&r.unshift(e);for(let o of r)try{let i=o.getContext("2d",{willReadFrequently:!0});i&&i.getImageData(0,0,1,1)}catch(i){Q(t,"safari canvas poke failed",i)}}return n.iconFonts&&n.iconFonts.length>0&&Ef(n.iconFonts),n.snap||(n.snap={toPng:(r,o)=>te.toPng(r,o),toSvg:(r,o)=>te.toSvg(r,o)}),n.burst?Nm(e,t,n,()=>te.capture(e,n,Io)):te.capture(e,n,Io)}te.capture=async(e,t,n)=>{if(n!==Io)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");t.element=e;let r=await km(e,t),o={img:async(h,y)=>{let{toImg:g}=await Promise.resolve().then(()=>(za(),co));return g(r,{...h,...y||{}})},svg:async(h,y)=>{let{toSvg:g}=await Promise.resolve().then(()=>(za(),co));return g(r,{...h,...y||{}})},canvas:async(h,y)=>{let{toCanvas:g}=await Promise.resolve().then(()=>(Lt(),_s));return g(r,{...h,...y||{}})},blob:async(h,y)=>{let{toBlob:g}=await Promise.resolve().then(()=>(Hs(),Ws));return g(r,{...h,...y||{}})},png:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(On(),_n));return g(r,{...h,...y||{},format:"png"})},jpeg:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(On(),_n));return g(r,{...h,...y||{},format:"jpeg"})},webp:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(On(),_n));return g(r,{...h,...y||{},format:"webp"})},download:async(h,y)=>{let{download:g}=await Promise.resolve().then(()=>(xd(),Us));return g(r,{...h,...y||{}})}},i={};for(let h of["img","svg","canvas","blob","png","jpeg","webp"])i[h]=async y=>o[h](t,{...y||{},[Fm]:!0});i.jpg=i.jpeg;let a={...t,export:{url:r},exports:i},s=await dm("defineExports",a),l=Object.assign({},...s.filter(h=>h&&typeof h=="object").reverse()),c={...o,...l};c.jpeg&&!c.jpg&&(c.jpg=(h,y)=>c.jpeg(h,y));function u(h,y){let g={...t,...y||{}},w=v=>v==="jpeg"||v==="jpg"||v==="webp";return[h,g.format,g.type].map(v=>typeof v=="string"?v.toLowerCase():"").find(w)&&(g.backgroundColor==null||g.backgroundColor==="transparent")&&(g.backgroundColor="#ffffff"),g}let d=!1,f=Promise.resolve();async function m(h,y){let g=Object.freeze(y&&typeof y=="object"?{...y}:{}),w=async()=>{let b=c[h];if(!b)throw new Error(`[snapdom] Unknown export type: ${h}`);let S=u(h,g),x={...t,export:{type:h,options:S,requestedOptions:g,url:r}};await ze("beforeExport",x,{format:h,options:S});let I=await b(x,S);return await ze("afterExport",x,{format:h,options:S,result:I}),d||(d=!0,await ze("afterSnap",t)),I},v=f.then(w);return f=v.catch(()=>{}),v}let p={url:r,toRaw:()=>r,to:(h,y)=>m(h,y),toImg:h=>m("img",h),toSvg:h=>m("svg",h),toCanvas:h=>m("canvas",h),toBlob:h=>m("blob",h),toPng:h=>m("png",h),toJpg:h=>m("jpg",h),toWebp:h=>m("webp",h),download:h=>m("download",h)};Object.defineProperty(p,"meta",{value:t.meta,enumerable:!0,writable:!1,configurable:!1});for(let h of Object.keys(c)){let y="to"+h.charAt(0).toUpperCase()+h.slice(1);p[y]||(p[y]=g=>m(h,g))}return p};te.toRaw=(e,t)=>te(e,t).then(n=>n.toRaw());te.toImg=(e,t)=>te(e,t).then(n=>n.toImg());te.toSvg=(e,t)=>te(e,t).then(n=>n.toSvg());te.toCanvas=(e,t)=>te(e,t).then(n=>n.toCanvas());te.toBlob=(e,t)=>te(e,t).then(n=>n.toBlob());te.toPng=(e,t)=>te(e,{...t,format:"png"}).then(n=>n.toPng());te.toJpg=(e,t)=>te(e,{...t,format:"jpeg"}).then(n=>n.toJpg());te.toWebp=(e,t)=>te(e,{...t,format:"webp"}).then(n=>n.toWebp());te.download=(e,t)=>te(e,t).then(n=>n.download());function fl(e){if(e.dataset.fontProxied||!e.rel||!e.rel.includes("stylesheet"))return!1;let t=e.href||"";try{return new URL(t).origin!==window.location.origin}catch{return!1}}function pl(e){let t=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(e.href)}`,n=document.createElement("link");n.rel="stylesheet",n.href=t,n.dataset.fontProxied="true",e.media&&(n.media=e.media),n.onload=()=>{e.remove()},n.onerror=()=>{n.remove()},e.parentNode?.insertBefore(n,e.nextSibling)}function ml(){let e=document.querySelectorAll('link[rel~="stylesheet"]');for(let t of e)fl(t)&&pl(t)}function _m(){let e=M().fonts;e.observer||(e.observer=new MutationObserver(t=>{for(let n of t)for(let r of n.addedNodes)r instanceof HTMLLinkElement&&fl(r)&&pl(r)}),e.observer.observe(document.documentElement,{childList:!0,subtree:!0}))}function Om(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin?!1:!!(/\.(css|woff2?|ttf|otf|eot)(\?|$)/i.test(t.pathname)||t.pathname.includes("/css"))}catch{return!1}}function Pm(){if(window.fetch.__ms_font_proxied)return;let e=window.fetch;window.fetch=function(t,n){let r=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(Om(r)){let o=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(r)}`;return e.apply(this,[o,n])}return e.apply(this,[t,n])},window.fetch.__ms_font_proxied=!0}function hl(){let e=M().fonts;e.initialized||(e.initialized=!0,Pm(),ml(),_m())}async function gl(){ml();try{await document.fonts.ready}catch{}}var yl=2,Dm=.92,Wm={name:"text-fit",afterClone(e){if(!e.clone)return;let t=e.clone.ownerDocument;if(!t)return;let n=t.createElement("style");n.textContent="* { letter-spacing: -0.03px !important; }",e.clone.prepend(n)}},Bm=["#__mindstudio-cursor","#__mindstudio-cursor-ripple","#__mindstudio-touch-circle"];async function Qn(){let e=M().screenshot;if(e.capturing)throw new Error("Capture already in progress");e.capturing=!0,tn();try{await gl(),console.info("[capture-page] starting snapdom viewport render");let t=performance.now(),r=await(await te(document.body,{embedFonts:!0,exclude:Bm,plugins:[Wm],clip:"viewport",scale:yl,dpr:1,backgroundColor:"#ffffff"})).toCanvas();return console.info("[capture-page] snapdom render done",{canvasWidth:r.width,canvasHeight:r.height,ms:Math.round(performance.now()-t)}),{blob:await new Promise((i,a)=>{r.toBlob(s=>s?i(s):a(new Error("Canvas export produced no image")),"image/jpeg",Dm)}),width:r.width,height:r.height,scale:yl}}finally{e.capturing=!1,nn()}}var Ft="mindstudio-browser-agent";function bl(){let e=M(),t=new URLSearchParams(window.location.search);e.zoom.pipMode=t.get("display-mode")==="pip",e.zoom.mobilePreview=t.get("preview")==="mobile"||window.innerWidth<768;try{let n=sessionStorage.getItem("__ms_pip");n==="1"?e.zoom.pipMode=!0:n==="0"&&(e.zoom.pipMode=!1);let r=sessionStorage.getItem("__ms_mobile");r==="1"?e.zoom.mobilePreview=!0:r==="0"&&(e.zoom.mobilePreview=!1)}catch{}e.messages.handler||(e.messages.handler=async n=>{if(n.source===window)return;let r=n.data;if(!(!r||typeof r.command!="string")&&r.channel===Ft)switch(r.command){case"capture-page":{console.info("[capture-page] request received");try{let o=await Qn();console.info("[capture-page] capture complete",{width:o.width,height:o.height,scale:o.scale,blobBytes:o.blob.size}),window.parent.postMessage({channel:Ft,command:"capture-page-result",...o},"*"),console.info("[capture-page] result posted to parent")}catch(o){console.error("[capture-page] capture failed",o),window.parent.postMessage({channel:Ft,command:"capture-page-result",error:o instanceof Error?o.message:"Capture failed"},"*")}break}case"cursor-show":rn("visible");break;case"cursor-hide":rn("hidden");break;case"cursor-auto":rn(null);break;case"navigate":typeof r.url=="string"&&(window.history.pushState(null,"",r.url),window.dispatchEvent(new PopStateEvent("popstate")));break;case"back":window.history.back();break;case"forward":window.history.forward();break;case"healthcheck":{let o=M().ws;window.parent.postMessage({channel:Ft,command:"healthcheck-reply",wsConnected:!!(o.ws&&o.ws.readyState===WebSocket.OPEN),url:location.href},"*");break}case"display-mode-pip":e.zoom.pipMode=!0;try{sessionStorage.setItem("__ms_pip","1")}catch{}break;case"display-mode-full":e.zoom.pipMode=!1;try{sessionStorage.setItem("__ms_pip","0")}catch{}break;case"preview-mode-mobile":e.zoom.mobilePreview=!0;try{sessionStorage.setItem("__ms_mobile","1")}catch{}wr(),Er(!0);break;case"preview-mode-desktop":e.zoom.mobilePreview=!1;try{sessionStorage.setItem("__ms_mobile","0")}catch{}Ti(),Er(!1);break}},window.addEventListener("keyup",n=>{n.code==="Backquote"&&window.parent!==window&&window.parent.postMessage({channel:Ft,command:"ptt-keyup"},"*")}),window.addEventListener("message",e.messages.handler))}var Hm="mindstudio-browser-agent";function wl(){if(window.__ms_nav_patched)return;window.__ms_nav_patched=!0;let e=()=>{let r=location.pathname+location.search+location.hash,o=M();if(r!==o.nav.lastUrl&&(o.nav.lastUrl=r,window.parent!==window)){let i=window.navigation;window.parent.postMessage({channel:Hm,command:"location",url:r,canGoBack:i?!!i.canGoBack:void 0,canGoForward:i?!!i.canGoForward:void 0},"*")}},t=history.pushState.bind(history);history.pushState=function(...r){t(...r),e()};let n=history.replaceState.bind(history);history.replaceState=function(...r){n(...r),e()},window.addEventListener("popstate",e),window.addEventListener("hashchange",e),e()}var vl=16,Um=3e4,Sl="__ms_mirror";function Vm(){let e=new URLSearchParams(window.location.search);if(e.get("mirror")==="true"){e.delete("mirror");let t=e.toString(),n=window.location.pathname+(t?"?"+t:"")+window.location.hash;window.history.replaceState(null,"",n);try{sessionStorage.setItem(Sl,"1")}catch{}return!0}try{return sessionStorage.getItem(Sl)==="1"}catch{return!1}}async function Cl(){if(window.parent!==window||!Vm())return;let e=M().mirror;if(e.recording)return;let t=[],n=null;function r(){if(n=null,t.length===0)return;let a=Mn();if(!a){n=setTimeout(r,vl);return}let s=t;t=[],a.send(JSON.stringify({type:"mirror",events:s}))}function o(a){t.push(a),n||(n=setTimeout(r,vl))}document.readyState!=="complete"&&await new Promise(a=>window.addEventListener("load",()=>a(),{once:!0})),await new Promise(a=>setTimeout(a,500));let i=_e({emit:o,collectFonts:!0,checkoutEveryNms:Um});i&&(e.recording=!0,e.stopFn=()=>{i(),n&&(clearTimeout(n),n=null),r(),e.recording=!1,e.stopFn=null})}var zm='input[type="email"], input[autocomplete="email"]',qm='input[type="tel"], input[autocomplete="tel"]',Gm='input[autocomplete="one-time-code"]',jm=/e[-_ ]?mail/i,Ym=/phone|mobile|\btel\b/i,Zm=/\b(otp|code|verification|verify|2fa|one[-_ ]?time)\b/i;function er(e){let t=e.getBoundingClientRect();if(t.width===0||t.height===0)return!1;let n=getComputedStyle(e);return!(n.display==="none"||n.visibility==="hidden")}function _o(e){let t=document.querySelectorAll(e);for(let n of t)if(er(n))return n;return null}function Xm(e){let t=e.getAttribute("aria-labelledby"),n=t?document.getElementById(t):null;return[e.name,e.id,e.placeholder,e.getAttribute("aria-label"),n?.textContent].filter(Boolean).join(" ")}function Oo(e,t){let n=document.querySelectorAll('input[type="text"], input:not([type])');for(let r of n)if(t(r)&&e.test(Xm(r))&&er(r))return r;return null}function Km(e){if(e.inputMode==="numeric"){let n=e.maxLength;if(n>=4&&n<=8)return!0}let t=e.getAttribute("pattern")??"";return!!(/0-9/.test(t)&&e.maxLength>=4&&e.maxLength<=8)}function Jm(e){if(e.maxLength!==1)return!1;let t=(e.getAttribute("type")||"text").toLowerCase();return t==="text"||t==="tel"||t==="number"}function Qm(){let e=Array.from(document.querySelectorAll("input")).filter(t=>Jm(t)&&er(t));return e.length<4||e.length>8?null:(e.sort((t,n)=>{let r=t.getBoundingClientRect(),o=n.getBoundingClientRect();return Math.abs(r.top-o.top)>8?r.top-o.top:r.left-o.left}),e)}function eh(){let e=_o(Gm),t=e&&e.maxLength!==1?e:null;if(!t){let n=document.querySelectorAll('input[inputmode="numeric"], input[type="text"]');for(let r of n)if(Km(r)&&er(r)){t=r;break}}return t||(t=Oo(Zm,n=>n.maxLength<=8&&n.maxLength!==1)),t}function xl(){let e=_o(zm),t=e?"email":null;e||(e=_o(qm),t=e?"phone":null),e||(e=Oo(jm,()=>!0),e&&(t="email")),e||(e=Oo(Ym,()=>!0),e&&(t="phone"));let n=Qm(),r=n?{cells:n,segmented:!0}:null;if(!r){let o=eh();o&&(r={cells:[o],segmented:!1})}return{identifier:e,identifierKind:t,code:r}}var Il=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;function Al(e,t){Il?Il.call(e,t):e.value=t}function tr(e,t,n){let r;try{r=new InputEvent(t,{bubbles:!0,cancelable:t==="beforeinput",inputType:"insertText",data:n})}catch{r=new Event(t,{bubbles:!0})}e.dispatchEvent(r)}function th(e,t){let n={key:t,code:/^[0-9]$/.test(t)?`Digit${t}`:t,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function Ml(e,t){e.focus(),Al(e,t),tr(e,"beforeinput",t),tr(e,"input",t),e.dispatchEvent(new Event("change",{bubbles:!0}))}function El(e){let t=e.closest("form");if(t&&typeof t.requestSubmit=="function")try{t.requestSubmit();return}catch{}let n={key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keypress",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function kl(e,t){Ml(e,t),El(e)}function nr(e,t){return e.segmented?e.cells.forEach((n,r)=>{let o=t[r]??"";n.focus(),Al(n,o),tr(n,"beforeinput",o),tr(n,"input",o),n.dispatchEvent(new Event("change",{bubbles:!0})),o&&th(n,o)}):Ml(e.cells[0],t),Do(e),Po(e)}function Po(e){return e.cells.map(t=>t.value).join("")}function Do(e){let t=e.cells[e.cells.length-1]??e.cells[0];t&&El(t)}var nh="__mindstudio-auth-creds-host",rh="remy@mindstudio.ai",oh="+15555555555",it="123456";function Wo(e){M().authCredsWidget.host||ih(),ah(e)}function Tl(){let e=M().authCredsWidget;e.host&&(e.host.remove(),e.host=null)}function ih(){let e=M().authCredsWidget,t=document.createElement("div");t.id=nh,t.style.cssText="position: fixed; right: 16px; bottom: 16px; z-index: 2147483640; pointer-events: none;";let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
|
|
80
|
+
`):u+=f[0]}return u+=s.slice(d),u}let a=ps(e,t||location.href);return a=await i(a,t||location.href,0),a}var il=/url\((["']?)([^"')]+)\1\)/g,ip=/@font-face[^{}]*\{[^}]*\}/g;function Se(e,t,n=""){return(e.match(new RegExp(`${t}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function al(e){if(!e)return[];let t=[],n=e.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let o=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!o)continue;let i=o[1],a=o[2],s=l=>{if(!l.includes("?"))return parseInt(l,16);let c=parseInt(l.replace(/\?/g,"0"),16),u=parseInt(l.replace(/\?/g,"F"),16);return[c,u]};if(a){let l=s(i),c=s(a),u=Array.isArray(l)?l[0]:l,d=Array.isArray(c)?c[1]:c;t.push([Math.min(u,d),Math.max(u,d)])}else{let l=s(i);Array.isArray(l)?t.push([l[0],l[1]]):t.push([l,l])}}return t}function sl(e,t){if(!t.length||!e||e.size===0)return!0;for(let n of e)for(let[r,o]of t)if(n>=r&&n<=o)return!0;return!1}function Do(e,t){let n=[];if(!e)return n;for(let r of e.matchAll(il)){let o=(r[2]||"").trim();if(!(!o||o.startsWith("data:"))){if(!/^https?:/i.test(o))try{o=new URL(o,t||location.href).href}catch{}n.push(o)}}return n}async function vo(e,t,n=""){let r=e;for(let o of e.matchAll(il)){let i=Ro(o[0]);if(!i)continue;let a=i;if(!a.startsWith("http")&&!a.startsWith("data:"))try{a=new URL(a,t||location.href).href}catch{}if(!Oe(a)){if(A.resource?.has(a)){A.font?.add(a),r=r.replace(o[0],`url(${A.resource.get(a)})`);continue}try{let s=await Ce(a,{as:"dataURL",useProxy:n,silent:!0});if(s.ok&&typeof s.data=="string"){let l=s.data;A.resource?.set(a,l),A.font?.add(a),r=r.replace(o[0],`url(${l})`)}}catch{console.warn("[snapDOM] Failed to fetch font resource:",a)}}}return r}function ap(e){if(!e.length)return null;let t=(a,s)=>e.some(([l,c])=>!(c<a||l>s)),n=t(0,255)||t(305,305),r=t(256,591)||t(7680,7935),o=t(880,1023),i=t(1024,1279);return t(7840,7929)||t(258,259)||t(416,417)||t(431,432)?"vietnamese":i?"cyrillic":o?"greek":r?"latin-ext":n?"latin":null}function ms(e={}){let t=new Set((e.families||[]).map(o=>String(o).toLowerCase())),n=new Set((e.domains||[]).map(o=>String(o).toLowerCase())),r=new Set((e.subsets||[]).map(o=>String(o).toLowerCase()));return(o,i)=>{if(t.size&&t.has(o.family.toLowerCase()))return!0;if(n.size)for(let a of o.srcUrls)try{if(n.has(new URL(a).host.toLowerCase()))return!0}catch{}if(r.size){let a=ap(i);if(a&&r.has(a))return!0}return!1}}function sp(e){if(!e)return e;let t=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let i of e.match(t)||[]){let a=Se(i,"font-family"),s=Po(a),l=Se(i,"font-weight","400"),c=Se(i,"font-style","normal"),u=Se(i,"font-stretch","100%"),d=Se(i,"unicode-range"),f=Se(i,"src"),m=Do(f,location.href),p=m.length?m.map(y=>String(y).toLowerCase()).sort().join("|"):f.toLowerCase(),h=[String(s||"").toLowerCase(),l,c,u,d.toLowerCase(),p].join("|");n.has(h)||(n.add(h),r.push(i))}if(r.length===0)return e;let o=0;return e.replace(t,()=>r[o++]||"")}var hs=new WeakMap,lp=0;function cp(e){let t=hs.get(e);return t===void 0&&(t=lp++,hs.set(e,t)),t}function up(e,t,n,r,o,i){let a=Array.from(e||[]).sort().join("|"),s=t?JSON.stringify({families:(t.families||[]).map(f=>String(f).toLowerCase()).sort(),domains:(t.domains||[]).map(f=>String(f).toLowerCase()).sort(),subsets:(t.subsets||[]).map(f=>String(f).toLowerCase()).sort()}):"",l=(n||[]).map(f=>`${(f.family||"").toLowerCase()}::${f.weight||"normal"}::${f.style||"normal"}::${f.src||""}`).sort().join("|"),c=r||"",u=(o||[]).map(f=>String(f).toLowerCase()).sort().join("|"),d=cp(i||document);return`fonts-embed-css::req=${a}::ex=${s}::lf=${l}::px=${c}::fd=${u}::doc=${d}`}async function ll(e,t,n,r){let o;try{o=e.cssRules||[]}catch{return}let i=(a,s)=>{try{return new URL(a,s||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let s=a.href?i(a.href,t):t;if(r.depth>=qn){console.warn(`[snapDOM] CSSOM import depth exceeded (${qn}) at ${s}`);continue}if(s&&r.visitedSheets.has(s)){console.warn(`[snapDOM] Skipping circular CSSOM import: ${s}`);continue}s&&r.visitedSheets.add(s);let l={...r,depth:(r.depth||0)+1};await ll(a.styleSheet,s,n,l);continue}if(a.type===CSSRule.FONT_FACE_RULE){let s=(a.style.getPropertyValue("font-family")||"").trim(),l=Po(s);if(!l||Oe(l))continue;let c=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),d=(a.style.getPropertyValue("font-stretch")||"").trim(),f=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),p=(a.style.getPropertyValue("unicode-range")||"").trim(),h=c||"400",y=u||"normal",g=d||"100%",w=(u?`font-style:${u};`:"")+(c?`font-weight:${c};`:"")+(d?`font-stretch:${d};`:"")+(f?`font-variation-settings:${f};`:"")+(p?`unicode-range:${p};`:""),v=r.faceMatchesRequired(l,y,h,g);if(!v&&!r.requiredIndex.has(l.toLowerCase()))continue;let b=al(p);if(!sl(r.usedCodepoints,b))continue;let S={family:l,weightSpec:h,styleSpec:y,stretchSpec:g,unicodeRange:p,srcRaw:m,srcUrls:Do(m,t||location.href),href:t||location.href};if(r.simpleExcluder&&r.simpleExcluder(S,b))continue;if(!v){r.provisionalFaces.push({family:l.toLowerCase(),block:`@font-face{font-family:${l};src:${m};${w}}`,srcRaw:m,baseHref:t||location.href});continue}if(r.coveredFamilies.add(l.toLowerCase()),/url\(/i.test(m)){let x=await vo(m,t||location.href,r.useProxy);await n(`@font-face{font-family:${l};src:${x};${w}}`)}else await n(`@font-face{font-family:${l};src:${m};${w}}`)}}}async function dp({required:e,usedCodepoints:t,exclude:n=void 0,localFonts:r=[],useProxy:o="",fontStylesheetDomains:i=[],doc:a=document}={}){e instanceof Set||(e=new Set),t instanceof Set||(t=new Set);let s=new Map;for(let b of e){let[S,x,I,C]=String(b).split("__");if(!S)continue;let M=S.toLowerCase(),k=s.get(M)||[];k.push({w:parseInt(x,10),s:I,st:parseInt(C,10)}),s.set(M,k)}function l(b,S,x,I){let C=String(b).toLowerCase();if(!s.has(C))return!1;let M=s.get(C),k=Jf(x),T=Qf(S),F=ep(I),D=k.min!==k.max,R=k.min,_=P=>T.kind==="normal"&&P==="normal"||T.kind!=="normal"&&(P==="italic"||P==="oblique"),N=!1;for(let P of M){let K=D?P.w>=k.min&&P.w<=k.max:P.w===R,U=_(Bn(P.s)),G=P.st>=F.min&&P.st<=F.max;if(K&&U&&G){N=!0;break}}if(N)return!0;if(!D)for(let P of M){let K=_(Bn(P.s)),U=P.st>=F.min&&P.st<=F.max;if(Math.abs(R-P.w)<=300&&K&&U)return!0}if(!D&&T.kind==="normal"&&M.some(P=>Bn(P.s)!=="normal"))for(let P of M){let K=Math.abs(R-P.w)<=300,U=P.st>=F.min&&P.st<=F.max;if(K&&U)return!0}return!1}let c=ms(n),u=up(e,n,r,o,i,a);if(A.resource?.has(u))return A.resource.get(u);let d=rp(e),f=[],m=wo;for(let b of a.querySelectorAll("style")){let S=b.textContent||"";for(let x of S.matchAll(m)){let I=(x[2]||x[4]||"").trim();!I||Oe(I)||a.querySelector(`link[rel="stylesheet"][href="${I}"]`)||f.push(I)}}let p=[];f.length&&await Promise.all(f.map(b=>new Promise(S=>{if(a.querySelector(`link[rel="stylesheet"][href="${b}"]`))return S(null);let x=a.createElement("link");x.rel="stylesheet",x.href=b,x.setAttribute("data-snapdom","injected-import"),x.onload=()=>S(x),x.onerror=()=>S(null),a.head.appendChild(x),p.push(x)})));let h="",y=new Set,g=[],w=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(b=>!!b.href);for(let b of p)try{b.remove()}catch{}for(let b of w)try{if(Oe(b.href))continue;let S="",x=!1;try{x=new URL(b.href,location.href).origin===location.origin}catch{}if(!x){let C=Array.isArray(i)?i:[];if(!np(b.href,d,C))continue}if(x){let C=Array.from(a.styleSheets).find(M=>M.href===b.href);if(C)try{let M=C.cssRules||[];S=Array.from(M).map(k=>k.cssText).join("")}catch{}}if(!S){let C=await Ce(b.href,{as:"text",useProxy:o});if(C?.ok&&typeof C.data=="string"&&(S=C.data),Oe(b.href))continue}S=await op(S,b.href,o);let I="";for(let C of S.match(ip)||[]){let M=Se(C,"font-family"),k=Po(M);if(!k||Oe(k))continue;let T=Se(C,"font-weight","400"),F=Se(C,"font-style","normal"),D=Se(C,"font-stretch","100%"),R=Se(C,"unicode-range"),_=Se(C,"src"),N=Do(_,b.href),P=l(k,F,T,D);if(!P&&!s.has(k.toLowerCase()))continue;let K=al(R);if(!sl(t,K))continue;let U={family:k,weightSpec:T,styleSpec:F,stretchSpec:D,unicodeRange:R,srcRaw:_,srcUrls:N,href:b.href};if(n&&c(U,K))continue;if(!P){g.push({family:k.toLowerCase(),block:C,srcRaw:_,baseHref:b.href});continue}y.add(k.toLowerCase());let G=/url\(/i.test(_)?await vo(C,b.href,o):C;I+=G}I.trim()&&(h+=I)}catch{console.warn("[snapDOM] Failed to process stylesheet:",b.href)}let v={requiredIndex:s,usedCodepoints:t,faceMatchesRequired:l,coveredFamilies:y,provisionalFaces:g,simpleExcluder:n?ms(n):null,useProxy:o,visitedSheets:new Set,depth:0};for(let b of a.styleSheets)if(!(b.href&&w.some(S=>S.href===b.href)))try{let S=b.href||location.origin+"/";S&&v.visitedSheets.add(S),await ll(b,S,async x=>{h+=x},v)}catch{}for(let b of g)y.has(b.family)||(h+=/url\(/i.test(b.srcRaw)?await vo(b.block,b.baseHref,o):b.block);try{for(let b of a.fonts||[]){if(!b||!b.family||b.status!=="loaded"||!b._snapdomSrc)continue;let S=String(b.family).replace(/^['"]+|['"]+$/g,"");if(Oe(S)||!s.has(S.toLowerCase())||n?.families&&n.families.some(I=>String(I).toLowerCase()===S.toLowerCase()))continue;let x=b._snapdomSrc;if(!String(x).startsWith("data:")){if(A.resource?.has(b._snapdomSrc))x=A.resource.get(b._snapdomSrc),A.font?.add(b._snapdomSrc);else if(!A.font?.has(b._snapdomSrc))try{let I=await Ce(b._snapdomSrc,{as:"dataURL",useProxy:o,silent:!0});if(I.ok&&typeof I.data=="string")x=I.data,A.resource?.set(b._snapdomSrc,x),A.font?.add(b._snapdomSrc);else continue}catch{console.warn("[snapDOM] Failed to fetch dynamic font src:",b._snapdomSrc);continue}}h+=`@font-face{font-family:'${S}';src:url(${x});font-style:${b.style||"normal"};font-weight:${b.weight||"normal"};}`}}catch{}for(let b of r){if(!b||typeof b!="object")continue;let S=String(b.family||"").replace(/^['"]+|['"]+$/g,"");if(!S||Oe(S)||!s.has(S.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===S.toLowerCase()))continue;let x=b.weight!=null?String(b.weight):"normal",I=b.style!=null?String(b.style):"normal",C=b.stretchPct!=null?`${b.stretchPct}%`:"100%",M=String(b.src||""),k=M;if(!k.startsWith("data:")){if(A.resource?.has(M))k=A.resource.get(M),A.font?.add(M);else if(!A.font?.has(M))try{let T=await Ce(M,{as:"dataURL",useProxy:o,silent:!0});if(T.ok&&typeof T.data=="string")k=T.data,A.resource?.set(M,k),A.font?.add(M);else continue}catch{console.warn("[snapDOM] Failed to fetch localFonts src:",M);continue}}h+=`@font-face{font-family:'${S}';src:url(${k});font-style:${I};font-weight:${x};font-stretch:${C};}`}return h&&(h=sp(h),A.resource?.set(u,h)),h}function cl(e,t){let n=new Set,r=new Set;if(!e)return{required:n,usedCodepoints:r};let o=l=>{if(l)for(let c of l)r.add(c.codePointAt(0))},i=l=>{let c=Xf(l.fontFamily);if(c.length)for(let u of c)n.add(`${u}__${Wn(l.fontWeight)}__${Bn(l.fontStyle)}__${Kf(l.fontStretch)}`)},a=l=>{i(J(l));for(let c of["::before","::after"]){let u=J(l,c),d=u&&u.content;if(!(!d||d==="none"||d==="normal"))if(i(u),/^["']/.test(d))o(d.slice(1,-1));else{let f=d.match(/\\[0-9A-Fa-f]{1,6}/g);if(f)for(let m of f)try{r.add(parseInt(m.slice(1),16))}catch{}}}};a(e);let s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;s.nextNode();){let l=s.currentNode;if(l.nodeType===Node.TEXT_NODE){if(t&&l.parentElement&&!t(l.parentElement))continue;o(l.nodeValue||"")}else{if(t&&!t(l))continue;a(l)}}return{required:n,usedCodepoints:r}}function fp(e,t){return cl(e,t).required}async function ul(e,t=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(e||[]).filter(Boolean);if(r.length===0)return;let o=()=>{let i=n.createElement("div");i.setAttribute("data-snapdom-internal",""),i.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let a of r){let s=n.createElement("span");s.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",s.style.fontFamily=`"${a}"`,s.style.fontWeight="700",s.style.fontStyle="italic",s.style.fontSize="32px",s.style.lineHeight="1",s.style.whiteSpace="nowrap",s.style.margin="0",s.style.padding="0",i.appendChild(s)}n.body.appendChild(i),i.offsetWidth,n.body.removeChild(i)};for(let i=0;i<Math.max(1,t);i++)o(),await tt(),await tt()}function pp(e){return/\bcounter\s*\(|\bcounters\s*\(/.test(e||"")}function gs(e,t=!1){let n="",r=Math.max(1,e);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return t?n.toUpperCase():n}function ys(e,t=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,e)),o="";for(let[i,a]of n)for(;r>=i;)o+=a,r-=i;return t?o:o.toLowerCase()}function bs(e,t){switch((t||"decimal").toLowerCase()){case"decimal":return String(e);case"decimal-leading-zero":{let n=Math.abs(e);return(e<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":return gs(e,!1);case"upper-alpha":return gs(e,!0);case"lower-roman":return ys(e,!1);case"upper-roman":return ys(e,!0);default:return String(e)}}function mp(e){let t=new WeakMap,n=e instanceof Document?e.documentElement:e,r=c=>c&&c.tagName==="LI",o=c=>{let u=0,d=c?.parentElement;if(!d)return 0;for(let f of d.children){if(f===c)break;f.tagName==="LI"&&u++}return u},i=c=>{let u=new Map;for(let[d,f]of c)u.set(d,f.slice());return u},a=(c,u,d)=>{let f=i(c),m;try{m=d.style?.counterReset||getComputedStyle(d).counterReset}catch{}if(m&&m!=="none")for(let y of m.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):0;if(!w)continue;let b=u.get(w);if(b&&b.length){let S=b.slice();S.push(v),f.set(w,S)}else f.set(w,[v])}let p;try{p=d.style?.counterSet||getComputedStyle(d).counterSet}catch{}if(p&&p!=="none")for(let y of p.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):0;if(!w)continue;let b=f.get(w)||[];b.length===0&&b.push(0),b[b.length-1]=v,f.set(w,b)}let h;try{h=d.style?.counterIncrement||getComputedStyle(d).counterIncrement}catch{}if(h&&h!=="none")for(let y of h.split(",")){let g=y.trim().split(/\s+/),w=g[0],v=Number.isFinite(Number(g[1]))?Number(g[1]):1;if(!w)continue;let b=f.get(w)||[];b.length===0&&b.push(0),b[b.length-1]+=v,f.set(w,b)}try{if(getComputedStyle(d).display==="list-item"&&r(d)){let y=d.parentElement,g=1;if(y&&y.tagName==="OL"){let v=y.getAttribute("start"),b=Number.isFinite(Number(v))?Number(v):1,S=o(d),x=d.getAttribute("value");g=Number.isFinite(Number(x))?Number(x):b+S}else g=1+o(d);let w=f.get("list-item")||[];w.length===0&&w.push(0),w[w.length-1]=g,f.set("list-item",w)}}catch{}return f},s=(c,u,d)=>{let f=a(d,u,c);t.set(c,f);let m=f;for(let h of c.children)m=s(h,f,m);let p=new Map;for(let[h,y]of d){let g=y.length,w=m.get(h);p.set(h,w&&w.length?w.slice(0,g):y.slice())}for(let[h,y]of m)!p.has(h)&&y.length&&!u.has(h)&&p.set(h,y.slice(0,1));return p},l=new Map;return s(n,l,l),{get(c,u){let d=t.get(c)?.get(u);return d&&d.length?d[d.length-1]:0},getStack(c,u){let d=t.get(c)?.get(u);return d?d.slice():[]}}}function hp(e,t,n){if(!e||e==="none")return e;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return e.replace(r,(o,i,a)=>{let s=String(a).split(",").map(l=>l.trim());if(i==="counter"){let l=s[0]?.replace(/^["']|["']$/g,""),c=(s[1]||"decimal").toLowerCase(),u=n.get(t,l);return bs(u,c)}else{let l=s[0]?.replace(/^["']|["']$/g,""),c=s[1]?.replace(/^["']|["']$/g,"")??"",u=(s[2]||"decimal").toLowerCase(),d=n.getStack(t,l);return d.length?d.map(f=>bs(f,u)).join(c):""}})}catch{return"- "}}rt();var gt=new WeakMap,ws=1e3;function gp(e,t){let n=dl(e);return t?(t.__pseudoPreflightFp!==n&&(t.__pseudoPreflight=Ss(e,n),t.__pseudoPreflightFp=n),!!t.__pseudoPreflight):Ss(e,n)}function So(e){try{return e&&e.cssRules?e.cssRules:null}catch{return null}}function dl(e){let t=e.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${t.length}|`,r=0;for(let i=0;i<t.length;i++){let a=t[i];if(a.tagName==="STYLE"){let s=a.textContent?a.textContent.length:0;n+=`S${s}|`;let l=a.sheet,c=l?So(l):null;c&&(r+=c.length)}else{let s=a.getAttribute("href")||"",l=a.getAttribute("media")||"all";n+=`L${s}|m:${l}|`;let c=a.sheet,u=c?So(c):null;u&&(r+=u.length)}}let o=e.adoptedStyleSheets;return n+=`ass:${Array.isArray(o)?o.length:0}|tr:${r}`,n}function vs(e,t,n){let r=So(e);if(!r)return!1;for(let o=0;o<r.length;o++){if(n.budget<=0)return!1;let i=r[o],a=i&&i.cssText?i.cssText:"";n.budget--;for(let s of t)if(a.includes(s))return!0;if(i&&i.cssRules&&i.cssRules.length)for(let s=0;s<i.cssRules.length&&n.budget>0;s++){let l=i.cssRules[s],c=l&&l.cssText?l.cssText:"";n.budget--;for(let u of t)if(c.includes(u))return!0}if(n.budget<=0)return!1}return!1}function Ss(e=document,t=dl(e)){let n=gt.get(e);if(n&&n.fingerprint===t)return n.result;let r=["::before","::after","::first-letter",":before",":after",":first-letter","counter(","counters(","counter-increment","counter-reset"],o=e.querySelectorAll("style");for(let a=0;a<o.length;a++){let s=o[a].textContent||"";for(let l of r)if(s.includes(l))return gt.set(e,{fingerprint:t,result:!0}),!0}let i=e.adoptedStyleSheets;if(Array.isArray(i)&&i.length){let a={budget:ws};try{for(let s of i)if(vs(s,r,a))return gt.set(e,{fingerprint:t,result:!0}),!0}catch{}}{let a=e.querySelectorAll('style,link[rel~="stylesheet"]'),s={budget:ws};for(let l=0;l<a.length&&s.budget>0;l++){let c=a[l],u=null;if(c.tagName,u=c.sheet||null,u&&vs(u,r,s))return gt.set(e,{fingerprint:t,result:!0}),!0}}return e.querySelector('[style*="counter("], [style*="counters("]')?(gt.set(e,{fingerprint:t,result:!0}),!0):(gt.set(e,{fingerprint:t,result:!1}),!1)}function Cs(e){for(let t of["Top","Right","Bottom","Left"]){let n=parseFloat(e[`border${t}Width`])||0,r=e[`border${t}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function yp(e,t){let n=null,r=()=>{if(!n)try{n=mp(e)}catch(o){Q(t,"buildCounterContext failed",o),n={get:()=>0,getStack:()=>[]}}return n};return{get(o,i){return r().get(o,i)},getStack(o,i){return r().getStack(o,i)}}}function bp(e){let t=!1;for(let n=0;n<e.length;n++){let r=e[n];if(r==='"')t=!t;else if(r==="/"&&!t)return e.slice(0,n).trim()}return e}function wp(e){if(!e)return"";let t=[],n=/"([^"]*)"/g,r=0,o;for(;o=n.exec(e);){let a=e.slice(r,o.index).trim();a&&t.push(a),t.push(o[1]),r=n.lastIndex}let i=e.slice(r).trim();return i&&t.push(i),t.join("")}function Co(e,t,n){let r=e.parentElement,o=r&&n?n.get(r):null;return o?{get(i,a){let s=t.get(i,a),l=o.get(a);return typeof l=="number"?Math.max(s,l):s},getStack(i,a){let s=t.getStack(i,a);if(!s.length)return s;let l=o.get(a);if(typeof l=="number"){let c=s.slice();return c[c.length-1]=Math.max(c[c.length-1],l),c}return s}}:t}function xo(e,t,n){let r=new Map;function o(c){let u=[];if(!c||c==="none")return u;for(let d of String(c).split(",")){let f=d.trim().split(/\s+/),m=f[0],p=Number.isFinite(Number(f[1]))?Number(f[1]):void 0;m&&u.push({name:m,num:p})}return u}let i=o(t?.counterReset),a=o(t?.counterSet),s=o(t?.counterIncrement);function l(c){if(r.has(c))return r.get(c).slice();let u=n.getStack(e,c);u=u.length?u.slice():[];let d=i.find(p=>p.name===c);if(d){let p=Number.isFinite(d.num)?d.num:0;u=u.length?[...u,p]:[p]}let f=a.find(p=>p.name===c);if(f){let p=Number.isFinite(f.num)?f.num:0;u.length===0&&(u=[0]),u[u.length-1]=p}let m=s.find(p=>p.name===c);if(m){let p=Number.isFinite(m.num)?m.num:1;u.length===0&&(u=[0]),u[u.length-1]+=p}return r.set(c,u.slice()),u}return{get(c,u){let d=l(u);return d.length?d[d.length-1]:0},getStack(c,u){return l(u)},__incs:s}}function vp(e,t,n,r){let o;try{o=J(e,t)}catch{}let i=o?.content;if(!i||i==="none"||i==="normal")return{text:"",incs:[]};i=bp(i);let a=Co(e,n,r),s=xo(e,o,a),l=pp(i)?hp(i,e,s):i;return{text:wp(l),incs:s.__incs||[]}}async function Io(e,t,n,r){if(e?.nodeType!==1||t?.nodeType!==1||e.tagName==="TEXTAREA")return;let o=e.ownerDocument||document;if(!gp(o,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=yp(e.ownerDocument||document,n));let i=n.__counterCtx;for(let s of["::before","::after","::first-letter"])try{let l=J(e,s);if(!l||l.content==="none"&&l.backgroundImage==="none"&&l.backgroundColor==="transparent"&&!Cs(l)&&(!l.transform||l.transform==="none")&&l.display==="inline")continue;if(s==="::first-letter"){let L=J(e),W=(L?.display||"").toLowerCase();if(W.includes("flex")||W.includes("grid"))continue;let B=oe=>l[oe]!==L[oe]&&(parseFloat(l[oe])||0)!==0;if(!(l.color!==L.color||l.fontSize!==L.fontSize||l.fontWeight!==L.fontWeight||l.fontFamily!==L.fontFamily||l.fontStyle!==L.fontStyle||l.textTransform!==L.textTransform||l.float!==L.float&&l.float!=="none"||B("paddingTop")||B("paddingRight")||B("paddingBottom")||B("paddingLeft")||B("marginTop")||B("marginRight")||B("marginBottom")||B("marginLeft")))continue;let Y=Array.from(t.childNodes).find(oe=>oe.nodeType===Node.TEXT_NODE&&oe.textContent?.trim().length>0);if(!Y)continue;let O=Y.textContent,j=O.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],X=O.slice(j?.length||0);if(!j||/[\uD800-\uDFFF]/.test(j))continue;let z=document.createElement("span");z.textContent=j,z.dataset.snapdomPseudo="::first-letter";let Z=Ka(l),H=fo(Z,"span");n.styleMap.set(z,H);let re=document.createTextNode(X);t.replaceChild(re,Y),t.insertBefore(z,re);continue}let c=l.content??"",u=c===""||c==="none"||c==="normal",{text:d,incs:f}=vp(e,s,i,n.__siblingCounters),m=l.backgroundImage,p=l.backgroundColor,h=l.fontFamily,y=parseInt(l.fontSize)||32,g=parseInt(l.fontWeight)||!1,w=l.color||"#000",v=l.transform,b=Oe(h),S=!u&&d!=="",x=m&&m!=="none",I=p&&p!=="transparent"&&p!=="rgba(0, 0, 0, 0)",C=Cs(l),M=v&&v!=="none",k=c!=="none"&&c!=="normal",T=k&&((parseFloat(l.width)||0)>0||(parseFloat(l.height)||0)>0),F=k&&l.boxShadow&&l.boxShadow!=="none",D=k&&l.outlineStyle&&l.outlineStyle!=="none"&&(parseFloat(l.outlineWidth)||0)>0;if(!(S||x||I||C||M||T||F||D)){if(f&&f.length&&e.parentElement){let L=n.__siblingCounters.get(e.parentElement)||new Map;for(let{name:W}of f){if(!W)continue;let B=Co(e,i,n.__siblingCounters),Y=xo(e,J(e,s),B).get(e,W);L.set(W,Y)}n.__siblingCounters.set(e.parentElement,L)}continue}let R=d.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(d),_=!1;if(S&&!b&&d.length>1&&!R){let L=J(e),W=parseFloat(L.fontSize)||16,B=parseFloat(L.lineHeight);Number.isFinite(B)||(B=W*1.5),e.getBoundingClientRect().height<B*1.6&&(t.style.whiteSpace="nowrap",_=!0)}let N=document.createElement("span");N.dataset.snapdomPseudo=s,N.style.pointerEvents="none",_&&(N.style.whiteSpace="nowrap");let P=Ka(l),K=(J(e).display||"").toLowerCase(),U=K.includes("flex")||K.includes("grid");if(U){let L=P["min-width"];(!L||L==="auto"||L==="0px")&&(P["min-width"]="0px")}let G=fo(P,"span",S,U);if(n.styleMap.set(N,G),b&&d&&d.length===1){let{dataUrl:L,width:W,height:B}=await Yf(d,h,g,y,w),Y=document.createElement("img");Y.src=L,Y.style=`height:${y}px;width:${W/B*y}px;object-fit:contain;`,N.appendChild(Y),t.dataset.snapdomHasIcon="true"}else if(d&&R){let L=Ts(d,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??Ro(d);if(L?.trim())try{let W=await Ce(Un(L),{as:"dataURL",useProxy:r.useProxy});if(W?.ok&&typeof W.data=="string"){let B=document.createElement("img");B.src=W.data,B.style=`width:${y}px;height:auto;object-fit:contain;`,N.appendChild(B)}}catch(W){console.error(`[snapdom] Error in pseudo ${s} for`,e,W)}}else!b&&S&&(N.textContent=d);N.style.backgroundImage="none","maskImage"in N.style&&(N.style.maskImage="none"),"webkitMaskImage"in N.style&&(N.style.webkitMaskImage="none");try{N.style.backgroundRepeat=l.backgroundRepeat,N.style.backgroundSize=l.backgroundSize,l.backgroundPositionX&&l.backgroundPositionY?(N.style.backgroundPositionX=l.backgroundPositionX,N.style.backgroundPositionY=l.backgroundPositionY):N.style.backgroundPosition=l.backgroundPosition,N.style.backgroundOrigin=l.backgroundOrigin,N.style.backgroundClip=l.backgroundClip,N.style.backgroundAttachment=l.backgroundAttachment,N.style.backgroundBlendMode=l.backgroundBlendMode}catch{}if(x)try{let L=po(m),W=await Promise.all(L.map(Ns));N.style.backgroundImage=W.join(", ")}catch(L){console.warn(`[snapdom] Failed to inline background-image for ${s}`,L)}I&&(N.style.backgroundColor=p);let ne=N.childNodes.length>0||N.textContent?.trim()!==""||x||I||C||M||T||F||D;if(f&&f.length&&e.parentElement){let L=n.__siblingCounters.get(e.parentElement)||new Map,W=Co(e,i,n.__siblingCounters),B=xo(e,J(e,s),W);for(let{name:Y}of f){if(!Y)continue;let O=B.get(e,Y);L.set(Y,O)}n.__siblingCounters.set(e.parentElement,L)}if(!ne)continue;s==="::before"?(t.dataset.snapdomHasBefore="1",t.insertBefore(N,t.firstChild)):(t.dataset.snapdomHasAfter="1",t.appendChild(N))}catch(l){console.warn(`[snapdom] Failed to capture ${s} for`,e,l)}let a=Array.from(t.children).filter(s=>!s.dataset.snapdomPseudo);if(n.nodeMap)for(let s of a){let l=n.nodeMap.get(s);l?.nodeType===1&&await Io(l,s,n,r)}else{let s=Array.from(e.children);for(let l=0;l<Math.min(s.length,a.length);l++)await Io(s[l],a[l],n,r)}}function Sp(e,t){if(!e||e?.nodeType!==1)return;let n=e.ownerDocument||document,r=t||n,o=e instanceof SVGSVGElement?[e]:Array.from(e.querySelectorAll("svg"));if(o.length===0)return;let i=/url\(\s*#([^)]+)\)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],s=b=>window.CSS&&CSS.escape?CSS.escape(b):b.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),l="http://www.w3.org/1999/xlink",c=b=>{if(!b||!b.getAttribute)return null;let S=b.getAttribute("href")||b.getAttribute("xlink:href")||(typeof b.getAttributeNS=="function"?b.getAttributeNS(l,"href"):null);if(S)return S;let x=b.attributes;if(!x)return null;for(let I=0;I<x.length;I++){let C=x[I];if(!C||!C.name)continue;if(C.name==="href")return C.value;let M=C.name.indexOf(":");if(M!==-1&&C.name.slice(M+1)==="href")return C.value}return null},u=new Set(Array.from(e.querySelectorAll("[id]")).map(b=>b.id)),d=new Set,f=!1,m=(b,S=null)=>{if(!b)return;i.lastIndex=0;let x;for(;x=i.exec(b);){f=!0;let I=(x[1]||"").trim();I&&(u.has(I)||(d.add(I),S&&!S.has(I)&&S.add(I)))}},p=b=>{let S=b.querySelectorAll("use");for(let C of S){let M=c(C);if(!M||!M.startsWith("#"))continue;f=!0;let k=M.slice(1).trim();k&&!u.has(k)&&d.add(k)}let x='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(b.getAttribute("style")||"");for(let C of a)m(b.getAttribute(C));let I=b.querySelectorAll(x);for(let C of I){m(C.getAttribute("style")||"");for(let M of a)m(C.getAttribute(M))}};for(let b of o)p(b);if(!f)return;let h=e.querySelector("svg.inline-defs-container");h||(h=n.createElementNS("http://www.w3.org/2000/svg","svg"),h.classList.add("inline-defs-container"),h.setAttribute("aria-hidden","true"),h.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),e.insertBefore(h,e.firstChild||null));let y=h.querySelector("defs")||null,g=b=>{if(!b||u.has(b))return null;let S=s(b),x=I=>{let C=r.querySelector(I);return C&&!e.contains(C)?C:null};return x(`svg defs > *#${S}`)||x(`svg > symbol#${S}`)||x(`*#${S}`)};if(!d.size)return;let w=new Set(d),v=new Set;for(;w.size;){let b=w.values().next().value;if(w.delete(b),!b||u.has(b)||v.has(b))continue;let S=g(b);if(!S){v.add(b);continue}y||(y=n.createElementNS("http://www.w3.org/2000/svg","defs"),h.appendChild(y));let x=S.cloneNode(!0);x.id||x.setAttribute("id",b),y.appendChild(x),v.add(b),u.add(b);let I=[x,...x.querySelectorAll("*")];for(let C of I){let M=c(C);if(M&&M.startsWith("#")){let T=M.slice(1).trim();T&&!u.has(T)&&!v.has(T)&&w.add(T)}let k=C.getAttribute?.("style")||"";k&&m(k,w);for(let T of a){let F=C.getAttribute?.(T);F&&m(F,w)}}}}ge();function Cp(e){let t=getComputedStyle(e),n=t.outlineStyle,r=t.outlineWidth,o=t.borderStyle,i=t.borderWidth,a=n!=="none"&&parseFloat(r)>0,s=o==="none"||parseFloat(i)===0;if(a&&s){let l=e.style.border;return e.style.border=`${r} solid transparent`,()=>{e.style.border=l}}return()=>{}}function xp(e){let t=[];try{let n=e.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=r.style.contentVisibility||"",i=getComputedStyle(r);(i.contentVisibility||i.getPropertyValue("content-visibility")||"")==="auto"&&(t.push({el:r,original:o}),r.style.contentVisibility="visible")}if(e instanceof HTMLElement){let r=getComputedStyle(e);(r.contentVisibility||r.getPropertyValue("content-visibility")||"")==="auto"&&(t.push({el:e,original:e.style.contentVisibility||""}),e.style.contentVisibility="visible")}}catch{}return()=>{for(let{el:n,original:r}of t)try{n.style.contentVisibility=r}catch{}}}Me();Zn();function Ip(e){return fl(e.boxShadow)}function Ap(e){return fl(e.textShadow)}function fl(e){if(!e||e==="none")return{top:0,right:0,bottom:0,left:0};let t=[],n="",r=0;for(let l=0;l<e.length;l++){let c=e[l];c==="("?r++:c===")"&&(r=Math.max(0,r-1)),c===","&&r===0?(t.push(n),n=""):n+=c}n.trim()&&t.push(n);let o=0,i=0,a=0,s=0;for(let l of t){if(/\binset\b/i.test(l))continue;let c=l.match(/-?\d+(\.\d+)?px/g)?.map(y=>parseFloat(y))||[];if(c.length<2)continue;let[u,d,f=0,m=0]=c,p=Math.abs(u)+f+m,h=Math.abs(d)+f+m;i=Math.max(i,p+Math.max(u,0)),s=Math.max(s,p+Math.max(-u,0)),a=Math.max(a,h+Math.max(d,0)),o=Math.max(o,h+Math.max(-d,0))}return{top:Math.ceil(o),right:Math.ceil(i),bottom:Math.ceil(a),left:Math.ceil(s)}}function Ep(e){let t=e.filter&&e.filter!=="none"?e.filter:e.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,o;for(;o=n.exec(t);)r+=parseFloat(o[1])||0;let i=Math.ceil(r);return{top:i,right:i,bottom:i,left:i}}function Mp(e){if((e.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let t=Math.ceil(parseFloat(e.outlineWidth||"0")||0),n=parseFloat(e.outlineOffset||"0")||0,r=t+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function kp(e){let t=`${e.filter||""} ${e.webkitFilter||""}`.trim();if(!t||t==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=t.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,o=0,i=0,a=0,s=!1;for(let l of n){s=!0;let c=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(h=>parseFloat(h))||[],[u=0,d=0,f=0]=c,m=Math.abs(u)+f,p=Math.abs(d)+f;o=Math.max(o,m+Math.max(u,0)),a=Math.max(a,m+Math.max(-u,0)),i=Math.max(i,p+Math.max(d,0)),r=Math.max(r,p+Math.max(-d,0))}return{bleed:{top:$(r),right:$(o),bottom:$(i),left:$(a)},has:s}}function Tp(e,t){if(!e||!t||!t.style)return null;let n=getComputedStyle(e);try{t.style.transformOrigin="0 0"}catch{}try{"translate"in t.style&&(t.style.translate="none"),"rotate"in t.style&&(t.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let s=null;try{s=jn(e).scale}catch{}try{t.style.transform="none"}catch{}if(!s)return{a:1,b:0,c:0,d:1};let l=s.trim().split(/\s+/).map(parseFloat),c=Number.isFinite(l[0])?l[0]:1,u=Number.isFinite(l[1])?l[1]:c;return{a:c,b:0,c:0,d:u}}function o(s,l,c,u){let d=Math.sqrt(s*s+l*l)||0,f=0,m=0;if(d>0){let p=s/d,h=l/d;f=p*c+h*u;let y=c-p*f,g=u-h*f;m=Math.sqrt(y*y+g*g)||0,m>0?f=f/m:f=0}return{a:d,b:0,c:f*m,d:m}}let i=r.match(/^matrix\(\s*([^)]+)\)$/i);if(i){let s=i[1].split(",").map(l=>parseFloat(l.trim()));if(s.length===6&&s.every(Number.isFinite)){let[l,c,u,d]=s,f=o(l,c,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let s=a[1].split(",").map(l=>parseFloat(l.trim()));if(s.length===16&&s.every(Number.isFinite)){let l=s[0],c=s[1],u=s[4],d=s[5],f=o(l,c,u,d);try{t.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return f}}try{let s=new DOMMatrix(r),l=o(s.a,s.b,s.c,s.d);try{t.style.transform=`matrix(${l.a}, ${l.b}, ${l.c}, ${l.d}, 0, 0)`}catch{}return l}catch{return null}}function Hn(e,t,n,r,o){let i=n.a,a=n.b,s=n.c,l=n.d,c=n.e||0,u=n.f||0;function d(g,w){let v=g-r,b=w-o,S=i*v+s*b,x=a*v+l*b;return S+=r+c,x+=o+u,[S,x]}let f=[d(0,0),d(e,0),d(0,t),d(e,t)],m=1/0,p=1/0,h=-1/0,y=-1/0;for(let[g,w]of f)g<m&&(m=g),w<p&&(p=w),g>h&&(h=g),w>y&&(y=w);return{minX:m,minY:p,maxX:h,maxY:y,width:h-m,height:y-p}}function Ao(e,t,n){let r=(e.transformOrigin||"0 0").trim().split(/\s+/),[o,i]=[r[0]||"0",r[1]||"0"],a=(s,l)=>{let c=s.toLowerCase();return c==="left"||c==="top"?0:c==="center"?l/2:c==="right"||c==="bottom"?l:c.endsWith("px")?parseFloat(c)||0:c.endsWith("%")?(parseFloat(c)||0)*l/100:/^-?\d+(\.\d+)?$/.test(c)&&parseFloat(c)||0};return{ox:a(o,t),oy:a(i,n)}}function jn(e){let t={rotate:"0deg",scale:null,translate:null},n=typeof e.computedStyleMap=="function"?e.computedStyleMap():null;if(n){let o=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},i=o("rotate");if(i)if(i.angle){let l=i.angle;t.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit}else i.unit?t.rotate=i.unit==="rad"?i.value*180/Math.PI+"deg":i.value+i.unit:t.rotate=String(i);else{let l=getComputedStyle(e);t.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let a=o("scale");if(a){let l="x"in a&&a.x?.value!=null?a.x.value:Array.isArray(a)?a[0]?.value:Number(a)||1,c="y"in a&&a.y?.value!=null?a.y.value:Array.isArray(a)?a[1]?.value:l;t.scale=`${l} ${c}`}else{let l=getComputedStyle(e);t.scale=l.scale&&l.scale!=="none"?l.scale:null}let s=o("translate");if(s){let l="x"in s&&"value"in s.x?s.x.value:Array.isArray(s)?s[0]?.value:0,c="y"in s&&"value"in s.y?s.y.value:Array.isArray(s)?s[1]?.value:0,u="x"in s&&s.x?.unit?s.x.unit:"px",d="y"in s&&s.y?.unit?s.y.unit:"px";t.translate=`${l}${u} ${c}${d}`}else{let l=getComputedStyle(e);t.translate=l.translate&&l.translate!=="none"?l.translate:null}return t}let r=getComputedStyle(e);return t.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",t.scale=r.scale&&r.scale!=="none"?r.scale:null,t.translate=r.translate&&r.translate!=="none"?r.translate:null,t}var lo=null;function Rp(){if(lo)return lo;let e=document.createElement("div");return e.id="snapdom-measure-slot",e.setAttribute("aria-hidden","true"),Object.assign(e.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(e),lo=e,e}function Np(e){let t=Rp(),n=document.createElement("div");n.style.transformOrigin="0 0",e.baseTransform&&(n.style.transform=e.baseTransform),e.rotate&&(n.style.rotate=e.rotate),e.scale&&(n.style.scale=e.scale),e.translate&&(n.style.translate=e.translate),t.appendChild(n);let r=Fp(n);return t.removeChild(n),r}function Lp(e){let t=J(e),n=t.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let r=t.rotate&&t.rotate!=="none"&&t.rotate!=="0deg",o=t.scale&&t.scale!=="none"&&t.scale!=="1",i=t.translate&&t.translate!=="none"&&t.translate!=="0px 0px";return!!(r||o||i)}function Fp(e){let t=getComputedStyle(e).transform;if(!t||t==="none")return new DOMMatrix;try{return new DOMMatrix(t)}catch{return new WebKitCSSMatrix(t)}}var Eo="http://www.w3.org/1999/xhtml",pl=new WeakSet;function ml(e,t){if(!t)return null;let n=e.ownerDocument||document,r=n.defaultView||window,o,i,a,s;if(t==="viewport")o=0,i=0,a=n.documentElement?.clientWidth||r.innerWidth,s=n.documentElement?.clientHeight||r.innerHeight;else if(typeof t=="object")o=(Number(t.x)||0)-(r.scrollX||0),i=(Number(t.y)||0)-(r.scrollY||0),a=Number(t.width),s=Number(t.height);else return null;return a>0&&s>0?{left:o,top:i,width:a,height:s,right:o+a,bottom:i+s}:null}function Mo(e){if(e.parentElement)return e.parentElement;let t=e.getRootNode&&e.getRootNode();return t instanceof ShadowRoot?t.host:null}function $p(e,t){for(let n=t;n;n=Mo(n))if(n===e)return!0;return!1}function _p(e,t){for(let n=Mo(e);n&&n!==t&&n?.nodeType===1;n=Mo(n)){let r=J(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function hl(e,t){try{let n=new DOMMatrix;if(t&&t.rotate&&t.rotate!=="0deg"&&(n=n.multiply(new DOMMatrix(`rotate(${t.rotate})`))),t&&t.scale){let r=String(t.scale).trim().split(/\s+/).filter(Boolean);r.length&&r.every(o=>Number.isFinite(Number(o)))&&(n=n.multiply(new DOMMatrix(`scale(${r.join(",")})`)))}return e&&(n=n.multiply(new DOMMatrix(e))),n}catch{return null}}function Op(e,t,n,r,o){let i=e.getBoundingClientRect();t?.nodeType===1&&t.namespaceURI===Eo&&J(e).position==="static"&&(t.style.position="relative");let a=[];for(let[s,l]of n){if(s?.nodeType!==1||s.namespaceURI!==Eo||l?.nodeType!==1||l===e||!$p(e,l))continue;let c=r.get(l)||J(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||s.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;pl.add(s);let f=c.transform&&c.transform!=="none"?c.transform:"",m=jn(l),p=!!(f||m.rotate!=="0deg"||m.scale||m.translate),h=p?hl(f,m):null,y=!h||!h.is2D||h.a===1&&h.b===0&&h.c===0&&h.d===1,g=d.width,w=d.height;y||(g=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let v=l.getRootNode&&l.getRootNode()instanceof ShadowRoot,b=i,S=e.clientLeft||0,x=e.clientTop||0;if(v){let T=_p(l,e);T&&(b=T.getBoundingClientRect(),S=T.clientLeft||0,x=T.clientTop||0)}let I=d.left-b.left-S,C=d.top-b.top-x;if(p)if(s.style.translate="none",s.style.rotate="none",s.style.scale="none",y)s.style.transform="none";else{s.style.transform=`matrix(${h.a},${h.b},${h.c},${h.d},0,0)`;let{ox:T,oy:F}=Ao(c,g,w),D=Hn(g,w,{a:h.a,b:h.b,c:h.c,d:h.d,e:0,f:0},T,F);I-=D.minX,C-=D.minY}if(u!=="fixed"){let T=s.cloneNode(!1);T.setAttribute("data-snap-ph","1"),T.style.position="static",T.style.visibility="hidden",T.style.width=`${g}px`,T.style.height=`${w}px`,T.style.boxSizing="border-box",s.parentElement?.insertBefore(T,s)}let M=g+2,k=w;o&&(Math.abs(C-o.y)<.5&&(C-=1,k+=1),Math.abs(I-o.x)<.5&&(I-=1,M+=1)),s.style.position="absolute",s.style.left=`${I}px`,s.style.top=`${C}px`,s.style.right="auto",s.style.bottom="auto",s.style.margin="0",s.style.width=`${M}px`,s.style.height=`${k}px`,s.style.boxSizing="border-box",v||a.push(s)}for(let s of a)t.appendChild(s)}function Pp(e,t,n={}){if(!e||!t||!t.style)return;let r=getComputedStyle(e);try{t.style.boxShadow="none"}catch(i){Q(n,"stripRootShadows boxShadow",i)}try{t.style.textShadow="none"}catch(i){Q(n,"stripRootShadows textShadow",i)}try{t.style.outline="none"}catch(i){Q(n,"stripRootShadows outline",i)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{t.style.filter=o.length?o:"none"}catch(i){Q(n,"stripRootShadows filter",i)}}function Dp(e,t){if(!e||!t||!t.style)return;let n=1;try{n=parseFloat(getComputedStyle(e).zoom)}catch{return}if(!(!t.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{t.style.setProperty("zoom","1","important")}catch{}}function xs(e){let t=e.display||"";if(t.includes("flex")||t.includes("grid")||t.startsWith("table")||t==="inline-block"||t==="flow-root"||e.position==="absolute"||e.position==="fixed"||e.float&&e.float!=="none")return!0;let n=e.overflowX||e.overflow||"visible",r=e.overflowY||e.overflow||"visible";return!!(n!=="visible"||r!=="visible"||e.contain&&/\b(layout|content|paint|strict)\b/.test(e.contain))}function Wp(e,t){let n=Array.from(e.childNodes),r=t==="top"?n:n.reverse();for(let o of r){if(o.nodeType===Node.TEXT_NODE){if(/\S/.test(o.textContent||""))return null;continue}if(o.nodeType!==Node.ELEMENT_NODE)continue;let i=getComputedStyle(o),a=String(i.display||"");if(!(a==="none"||a==="contents")&&!(i.position==="absolute"||i.position==="fixed"))return i.float&&i.float!=="none"||a.startsWith("inline")?null:o}return null}function Bp(e,t,n){if(!e||!t||!t.style)return;let r=getComputedStyle(e);if(!xs(r))for(let o of["top","bottom"]){let i=o==="top"?"Top":"Bottom";if((parseFloat(r[`border${i}Width`])||0)>0||(parseFloat(r[`padding${i}`])||0)>0)continue;let a=e,s=t;for(;a&&s;){let l=Wp(a,o);if(!l)break;let c=n?Array.from(s.children).find(f=>n.get(f)===l)||null:s.children[Array.from(a.children).indexOf(l)]||null,u=getComputedStyle(l),d=parseFloat(u[`margin${i}`])||0;if(c&&c.style&&d>0&&(c.style[`margin${i}`]="0px"),xs(u)||(parseFloat(u[`border${i}Width`])||0)>0||(parseFloat(u[`padding${i}`])||0)>0)break;a=l,s=c}}}function Hp(e){let t=document.createTreeWalker(e,NodeFilter.SHOW_COMMENT),n=[];for(;t.nextNode();)n.push(t.currentNode);for(let r of n)r.remove()}function Up(e,t={}){let{stripFrameworkDirectives:n=!0}=t,r=new Set(["xml","xlink"]),o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(;o.nextNode();){let i=o.currentNode;for(let a of Array.from(i.attributes)){let s=a.name;if(s.startsWith("*")){i.removeAttribute(s);continue}if(s.includes("@")){i.removeAttribute(s);continue}if(s.includes(":")){let l=s.split(":",1)[0];if(!r.has(l)){i.removeAttribute(s);continue}}if(n&&(s.startsWith("x-")||s.startsWith("v-")||s.startsWith(":")||s.startsWith("on:")||s.startsWith("bind:")||s.startsWith("let:")||s.startsWith("class:"))){i.removeAttribute(s);continue}}}}var Is=/[\x00-\x08\x0B\x0C\x0E-\x1F\uFFFE\uFFFF]/g;function Vp(e){if(!e)return;let t=o=>{if(o.nodeType===Node.ELEMENT_NODE){if(o.attributes)for(let i of Array.from(o.attributes)){let a=i.value.replace(Is,"");if(a!==i.value)try{o.setAttribute(i.name,a)}catch{}}}else if(o.nodeType===Node.TEXT_NODE||o.nodeType===Node.CDATA_SECTION_NODE){let i=o.data.replace(Is,"");i!==o.data&&(o.data=i)}};t(e);let n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),r;for(;r=n.nextNode();)t(r)}function zp(e,t={}){e&&(Up(e,t),Hp(e),Vp(e))}function Gp(e){try{let t=e.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(t)}catch{return!1}}function qp(e){return e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof HTMLIFrameElement||e instanceof SVGElement||e instanceof HTMLObjectElement||e instanceof HTMLEmbedElement}function jp(e,t){if(e?.nodeType!==1||Gp(e)||qp(e))return!1;let n=t.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=t.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||t.transform&&t.transform!=="none")}function Yp(e,t,n=new Map){function r(o,i){if(o?.nodeType!==1||i?.nodeType!==1)return;let a=o.childElementCount>i.childElementCount,s=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,s),a&&jp(o,s)){i.style.height||(i.style.height="auto"),i.style.width||(i.style.width="auto"),i.style.removeProperty("block-size"),i.style.removeProperty("inline-size"),i.style.minHeight||(i.style.minHeight="0"),i.style.minWidth||(i.style.minWidth="0"),i.style.maxHeight||(i.style.maxHeight="none"),i.style.maxWidth||(i.style.maxWidth="none");let u=s.overflowY||s.overflowBlock||"visible",d=s.overflowX||s.overflowInline||"visible";(u!=="visible"||d!=="visible")&&(i.style.overflow="visible")}let l=Array.from(o.children),c=Array.from(i.children);for(let u=0;u<Math.min(l.length,c.length);u++)r(l[u],c[u])}r(e,t)}function Zp(e){let t=getComputedStyle(e);return!(t.display==="none"||t.position==="absolute"||t.position==="fixed")}function Xp(e,t){if(e?.nodeType!==1)return!1;if(e.getAttribute("data-capture")==="exclude"&&t?.excludeMode==="remove")return!0;if(Array.isArray(t?.exclude))for(let n of t.exclude)try{if(e.matches(n))return t.excludeMode==="remove"}catch(r){Q(t,"exclude selector match failed",r)}if(typeof t?.filter=="function"&&t.filterMode==="remove")try{if(!t.filter(e))return!0}catch(n){Q(t,"filter function failed",n)}return!1}function Kp(e,t){let n=getComputedStyle(e),r=e.getBoundingClientRect(),o=1/0,i=-1/0,a=!1,s=Array.from(e.children);for(let m of s){if(Xp(m,t)||!Zp(m))continue;let p=m.getBoundingClientRect(),h=p.top-r.top,y=p.bottom-r.top;y<=h||(h<o&&(o=h),y>i&&(i=y),a=!0)}let l=a?Math.max(0,i-o):0,c=parseFloat(n.borderTopWidth)||0,u=parseFloat(n.borderBottomWidth)||0,d=parseFloat(n.paddingTop)||0,f=parseFloat(n.paddingBottom)||0;return c+u+d+f+l}var $=(e,t=3)=>Number.isFinite(e)?Math.round(e*10**t)/10**t:e,yt=.75;function Jp(e,t,n,r,o,i){let a=e.ownerDocument||document,s=e.getBoundingClientRect(),l=o>0&&s.width>0?s.width/o:1,c=i>0&&s.height>0?s.height/i:1;if(Math.abs(l-c)>.02)return 0;let u=a.createElement("div");u.setAttribute("data-snapdom-internal",""),u.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+o+"px!important;overflow:visible!important;visibility:hidden!important;";let d=u.attachShadow({mode:"open"}),f=a.createElement("style");f.textContent=n,d.appendChild(f);let m=t.cloneNode(!0);d.appendChild(m),a.body.appendChild(u);let p=0,h=(y,g,w)=>{let v=J(y),b=v.boxSizing==="border-box",S=(x,I,...C)=>{let M=parseFloat(x);if(!Number.isFinite(M))return I;let k=M+(b?0:C.reduce((T,F)=>T+(parseFloat(F)||0),0));return Math.abs(k-I)<=.51?k:I};return{width:S(v.width,g,v.paddingLeft,v.paddingRight,v.borderLeftWidth,v.borderRightWidth),height:S(v.height,w,v.paddingTop,v.paddingBottom,v.borderTopWidth,v.borderBottomWidth)}};try{let y=m.getBoundingClientRect(),g=m.offsetWidth||o,w=m.offsetHeight||i,v=g>0&&y.width>0?y.width/g:1,b=w>0&&y.height>0?y.height/w:1,S=(x,I,C=!1)=>{let M=x.children,k=I.children,T=Math.min(M.length,k.length);for(let F=0;F<T;F++){let D=M[F],R=k[F],_=r.get(D),N=C||pl.has(D);if(_?.nodeType===1&&D?.namespaceURI===Eo&&D.style&&_.isConnected){let P=_.getBoundingClientRect();if(P.width>0&&P.height>0){let K=R.getBoundingClientRect(),U=P.width/l,G=P.height/c,ne=K.width,L=K.height,W=_.offsetWidth||U,B=_.offsetHeight||G,Y=R.offsetWidth||ne,O=R.offsetHeight||L,j=Math.abs(U-W)>yt||Math.abs(G-B)>yt||Math.abs(ne-Y)>yt||Math.abs(L-O)>yt;if(N){let Z=h(R,Y,O);U=ne>0?U*v*Z.width/ne:U,G=L>0?G*b*Z.height/L:G,ne=Z.width,L=Z.height}else if(j){let Z=h(_,W,B),H=h(R,Y,O);U=Z.width,G=Z.height,ne=H.width,L=H.height}let X=ne-U,z=L-G;(Math.abs(X)>yt||Math.abs(z)>yt)&&(D.style.boxSizing="border-box",D.style.width=`${$(U)}px`,D.style.height=`${$(G)}px`,p++)}}S(D,R,N)}};S(t,m)}finally{u.remove()}return p}var Qp=/::-webkit-scrollbar(-[a-z]+)?\b/i;function ko(e,t=new Set){let n="";if(!e)return n;for(let r=0;r<e.length;r++){let o=e[r];try{if(o.type===CSSRule.IMPORT_RULE&&o.styleSheet){n+=ko(o.styleSheet.cssRules,t);continue}if(o.type===CSSRule.MEDIA_RULE&&o.cssRules){let i=ko(o.cssRules,t);i&&(n+=`@media ${o.conditionText}{${i}}`);continue}if(o.type===CSSRule.STYLE_RULE){let i=o.selectorText||"";if(Qp.test(i)){let a=o.cssText;a&&!t.has(a)&&(t.add(a),n+=a)}}}catch{}}return n}var As=new WeakMap;function em(e){let t="";for(let n of e.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}t+=(n.href||"inline")+":"+r+"|"}return t}function tm(e){if(!e||!e.styleSheets)return"";let t=em(e),n=As.get(e);if(n&&n.fp===t)return n.css;let r=new Set,o="";for(let i of Array.from(e.styleSheets))try{let a=i.cssRules;a&&(o+=ko(a,r))}catch{}return As.set(e,{fp:t,css:o}),o}ot();var Rn=new Set;async function nm(e,t={}){let n=t.__session||A.session,r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:t},o=null;if(t.clip){let d=ml(e,t.clip);if(d){r.clip={rect:d,root:e};let f=e.getBoundingClientRect();o={x:d.left-f.left,y:d.top-f.top,width:d.width,height:d.height}}}let i,a="",s="";if(Rn.size){let d=(f,m)=>{for(let p=m;p;p=p.assignedSlot||p.parentElement||p.getRootNode()?.host)if(p===f)return!0;return!1};for(;;){let f=[...Rn].filter(({root:m})=>d(m,e)||d(e,m)).map(({promise:m})=>m.catch(()=>{}));if(!f.length)break;await Promise.all(f)}}if(!r.clip&&e.isConnected&&e.ownerDocument?.visibilityState!=="hidden")try{let d=e.getBoundingClientRect(),f=e.ownerDocument?.defaultView||window,m=d.right<=0||d.bottom<=0||d.left>=f.innerWidth||d.top>=f.innerHeight,p=[];if(m&&(()=>{let h=[];e.shadowRoot&&h.push(e.shadowRoot);for(let y of e.querySelectorAll("*"))y.shadowRoot&&h.push(y.shadowRoot);for(;h.length;){let y=h.pop(),g=y.host?.localName==="calcite-icon";for(let w of y.querySelectorAll("*")){if(w.shadowRoot&&h.push(w.shadowRoot),!g||w.localName!=="svg")continue;let v=w.querySelectorAll("path");if(!v.length||[...v].some(S=>S.getAttribute("d")?.trim()))continue;let b=w.getBoundingClientRect();b.width&&b.height&&p.push(w)}}})(),p.length){let h=(async()=>{let g=e.style,w=e.hasAttribute("style"),v=new Map,b=(S,x)=>{v.has(S)||v.set(S,{value:g.getPropertyValue(S),priority:g.getPropertyPriority(S)}),g.setProperty(S,x,"important");let I=v.get(S);I.forcedValue=g.getPropertyValue(S),I.forcedPriority=g.getPropertyPriority(S)};try{b("left","0"),b("top","0"),b("right","auto"),b("bottom","auto"),b("margin-top","0"),b("margin-right","0"),b("margin-bottom","0"),b("margin-left","0"),b("transform","none"),b("translate","none"),b("opacity","0"),b("pointer-events","none");let S=e.getBoundingClientRect();if(S.right<=0||S.bottom<=0||S.left>=f.innerWidth||S.top>=f.innerHeight){let C=e.parentElement?.getBoundingClientRect(),M=C&&C.right>0&&C.left<f.innerWidth?Math.max(0,C.left):0,k=C&&C.bottom>0&&C.top<f.innerHeight?Math.max(0,C.top):0;b("position","fixed"),b("left",`${M}px`),b("top",`${k}px`)}await tt(100);let x=Date.now()+1500,I=()=>p.some(C=>{if([...C.querySelectorAll("path")].some(k=>k.getAttribute("d")?.trim()))return!1;let M=C.getBoundingClientRect();return M.width&&M.height&&M.right>0&&M.bottom>0&&M.left<f.innerWidth&&M.top<f.innerHeight});for(;Date.now()<x&&I();)await new Promise(C=>setTimeout(C,25));await tt(100)}finally{for(let[S,x]of v)g.getPropertyValue(S)!==x.forcedValue||g.getPropertyPriority(S)!==x.forcedPriority||(x.value?g.setProperty(S,x.value,x.priority):g.removeProperty(S));!w&&!g.length&&e.removeAttribute("style"),await tt(100)}})(),y={root:e,promise:h};Rn.add(y);try{await h}finally{Rn.delete(y)}}}catch{}let l=Cp(e),c=r.clip?()=>{}:xp(e);try{i=await Dn(e,r,t)}catch(d){throw console.warn("deepClone failed:",d),d}finally{c(),l()}try{Sp(i)}catch(d){console.warn("inlineExternal defs or symbol failed:",d)}try{await Io(e,i,r,t)}catch(d){console.warn("inlinePseudoElements failed:",d)}await Tf(i,r);try{let d=i.querySelectorAll("style[data-sd]");for(let f of d)s+=f.textContent||"",f.remove()}catch(d){Q(r,"Failed to extract shadow CSS from style[data-sd]",d)}let u=vd(r.styleMap);a=Array.from(u.entries()).map(([d,f])=>`.${f}{${d}}`).join(""),a=s+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+a;for(let[d,f]of r.styleMap.entries()){if(d.tagName==="STYLE")continue;if(d.getRootNode&&d.getRootNode()instanceof ShadowRoot){d.setAttribute("style",f.replace(/;/g,"; "));continue}let m=u.get(f);m&&d.classList.add(m);let p=d.style?.backgroundImage,h=d.dataset?.snapdomHasIcon;p&&p!=="none"&&(d.style.backgroundImage=p),h&&(d.style.verticalAlign="middle",d.style.display="inline")}if((r.clip||e.scrollTop||e.scrollLeft)&&i?.nodeType===1)try{let d=r.clip&&o?{x:o.x,y:o.y}:{x:0,y:0};Op(e,i,r.nodeMap,r.styleCache,d)}catch(d){Q(r,"freezeViewportPositioned failed",d)}for(let[d,f]of r.nodeMap.entries()){if(r.clip&&f===e)continue;let m=f.scrollLeft,p=f.scrollTop;if((m||p)&&d?.nodeType===1&&d.namespaceURI==="http://www.w3.org/1999/xhtml"){d.style.overflow="hidden",d.style.scrollbarWidth="none",d.style.msOverflowStyle="none";try{let y=d.querySelectorAll("*");for(let g of y){if(g.nodeType!==1||g.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let w=g.style.position;if(w==="fixed"||w==="absolute"){let v=parseFloat(g.style.top)||0,b=parseFloat(g.style.left)||0;g.style.top=`${v+p}px`,g.style.left=`${b+m}px`,w==="fixed"&&(g.style.position="absolute")}}}catch{}let h=document.createElement("div");for(h.style.all="unset",h.style.transform=`translate(${-m}px, ${-p}px)`,h.style.willChange="transform",h.style.display="inline-block",h.style.width="100%";d.firstChild;)h.appendChild(d.firstChild);d.appendChild(h)}}if(e===r.nodeMap.get(i)){let d=r.styleCache.get(e)||J(e);r.styleCache.set(e,d);let f=ld(d.transform);i.style.margin="0",i.style.top="auto",i.style.left="auto",i.style.right="auto",i.style.bottom="auto",i.style.animation="none",i.style.transition="none",i.style.willChange="auto",i.style.float="none",i.style.clear="none",i.style.transform=f||""}for(let[d,f]of r.nodeMap.entries())f.tagName==="PRE"&&(d.style.marginTop="0",d.style.marginBlockStart="0");return{clone:i,classCSS:a,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:o}}rt();ge();var gl="http://www.w3.org/1999/xlink";function rm(e){return e.getAttribute("href")||e.getAttribute("xlink:href")||(typeof e.getAttributeNS=="function"?e.getAttributeNS(gl,"href"):null)}function om(e){let t=parseInt(e.dataset?.snapdomWidth||"",10)||0,n=parseInt(e.dataset?.snapdomHeight||"",10)||0,r=parseInt(e.getAttribute("width")||"",10)||0,o=parseInt(e.getAttribute("height")||"",10)||0,i=parseFloat(e.style?.width||"")||0,a=parseFloat(e.style?.height||"")||0,s=t||i||r||e.width||e.naturalWidth||100,l=n||a||o||e.height||e.naturalHeight||100;return{width:s,height:l}}async function im(e,t={}){let n=Array.from(e.querySelectorAll("img"));e.tagName==="IMG"&&n.unshift(e);let r=async s=>{if(!s.getAttribute("src")){let p=s.currentSrc||s.src||Gn(s.getAttribute("srcset"),s)||"";p&&s.setAttribute("src",p)}s.removeAttribute("srcset"),s.removeAttribute("sizes");let l=s.src||"";if(!l)return;let c=A.image?.get(l);if(c){s.src=c,s.width||(s.width=s.naturalWidth||100),s.height||(s.height=s.naturalHeight||100);return}let u=await Ce(l,{as:"dataURL",useProxy:t.useProxy});if(u.ok&&typeof u.data=="string"&&u.data.startsWith("data:")){A.image?.set(l,u.data),s.src=u.data,s.width||(s.width=s.naturalWidth||100),s.height||(s.height=s.naturalHeight||100);return}let{width:d,height:f}=om(s),{fallbackURL:m}=t||{};if(m)try{let p=typeof m=="function"?await m({width:d,height:f,src:l,element:s}):m;if(p){let h=await Ce(p,{as:"dataURL",useProxy:t.useProxy});if(h?.ok&&typeof h.data=="string"){s.src=h.data,s.width||(s.width=d),s.height||(s.height=f);return}}}catch{}if(t.placeholders!==!1){let p=document.createElement("div");p.style.cssText=[`width:${d}px`,`height:${f}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${f}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),p.textContent="img",s.replaceWith(p)}else{let p=document.createElement("div");p.style.cssText=`display:inline-block;width:${d}px;height:${f}px;visibility:hidden;`,s.replaceWith(p)}},o=6;for(let s=0;s<n.length;s+=o){let l=n.slice(s,s+o).map(r);await Promise.allSettled(l)}let i=Array.from(e.querySelectorAll("image"));e.localName==="image"&&i.unshift(e);let a=async s=>{let l=rm(s);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let c=await Ce(l,{as:"dataURL",useProxy:t.useProxy});c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")&&(s.setAttribute("href",c.data),s.removeAttribute("xlink:href"),typeof s.removeAttributeNS=="function"&&s.removeAttributeNS(gl,"href"))};for(let s=0;s<i.length;s+=o){let l=i.slice(s,s+o).map(a);await Promise.allSettled(l)}}Me();ge();var am=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],sm=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],lm=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],cm=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function um(e,t,n,r){let o=n.get(e)||J(e);n.has(e)||n.set(e,o);let i=o.getPropertyValue("border-image"),a=o.getPropertyValue("border-image-source"),s=i&&i!=="none"||a&&a!=="none",l=o.getPropertyValue("background-image"),c=o.getPropertyValue("background-color");if(l&&l!=="none"||c&&c!=="rgba(0, 0, 0, 0)"&&c!=="transparent"||/url\s*\(|gradient\s*\(/i.test(o.getPropertyValue("background")||""))for(let u of lm){let d=o.getPropertyValue(u);d&&t.style.setProperty(u,d)}for(let u of am){let d=o.getPropertyValue(u);if(u==="background-image"&&(!d||d==="none")){let p=o.getPropertyValue("background");p&&/url\s*\(/.test(p)&&(d=po(p).filter(h=>/url\s*\(/.test(h)).join(", ")||d)}if(!d||d==="none")continue;let f=po(d),m=await Promise.all(f.map(p=>Ns(p,r)));m.some(p=>p&&p!=="none"&&!/^url\(undefined/.test(p))&&t.style.setProperty(u,m.join(", "))}for(let u of sm){let d=o.getPropertyValue(u);!d||d==="initial"||t.style.setProperty(u,d)}if(s)for(let u of cm){let d=o.getPropertyValue(u);!d||d==="initial"||t.style.setProperty(u,d)}}async function dm(e,t,n,r={},o=A.session.nodeMap){if(!t)return;let i=[];e&&rs(e)&&i.push([e,t]);let a=[t];for(;a.length;){let l=a.pop();if(l.children)for(let c of l.children){if(c.tagName==="STYLE")continue;let u=o.get(c);u&&rs(u)&&i.push([u,c]),a.push(c)}}let s=6;for(let l=0;l<i.length;l+=s)await Promise.allSettled(i.slice(l,l+s).map(([c,u])=>um(c,u,n,r)))}ge();Me();function fm(e,t,n=A.session.nodeMap){let r=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(let s=o.currentNode;s;s=o.nextNode()){let l=n.get(s);if(l?.nodeType!==1)continue;let c=J(l),u=c.getPropertyValue("backdrop-filter")||c.getPropertyValue("-webkit-backdrop-filter");u&&u!=="none"&&s!==t&&r.push({cloneEl:s,orig:l,bf:u,path:hm(t,s)})}if(!r.length)return;let i=e.getBoundingClientRect(),a=r.map((s,l)=>{let c=t.cloneNode(!0);mm(c,t,s.orig.getBoundingClientRect(),n),gm(Es(c,s.path));for(let u=0;u<l;u++){let d=Es(c,r[u].path);d&&(d.style.setProperty("backdrop-filter","none","important"),d.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...s,copy:c}});for(let{cloneEl:s,orig:l,bf:c,copy:u}of a)pm(s,l,c,u,i)}function pm(e,t,n,r,o){let i=t.getBoundingClientRect();if(!i.width||!i.height)return;let a=J(t),s=t.offsetWidth?i.width/t.offsetWidth:1,l=Math.abs(s-1)>.001?1/s:1;r.style.position="absolute",r.style.left=`${(o.left-i.left)*l}px`,r.style.top=`${(o.top-i.top)*l}px`,r.style.width=`${o.width}px`,r.style.height=`${o.height}px`,r.style.margin="0",r.style.filter=n,l!==1&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",c.appendChild(r);let u=document.createElement("div");u.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",u.style.backgroundColor=a.backgroundColor,u.style.backgroundImage=e.style.backgroundImage||a.backgroundImage;for(let d of["background-size","background-position","background-repeat","background-origin","background-clip"])u.style.setProperty(d,a.getPropertyValue(d));e.style.setProperty("background-color","transparent","important"),e.style.setProperty("background-image","none","important"),e.style.setProperty("backdrop-filter","none","important"),e.style.setProperty("-webkit-backdrop-filter","none","important"),a.position==="static"&&(e.style.position="relative"),e.style.isolation="isolate",e.prepend(u),e.prepend(c)}var Nn=128;function mm(e,t,n,r){let o=[[e,t]];for(;o.length;){let[i,a]=o.pop(),s=r.get(a);if(s?.nodeType===1){let u=s.getBoundingClientRect();(u.left>n.right+Nn||u.right<n.left-Nn||u.top>n.bottom+Nn||u.bottom<n.top-Nn)&&(i.tagName==="IMG"&&i.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),i.style&&(i.style.backgroundImage="none"))}let l=i.children,c=a.children;for(let u=0;u<l.length;u++)o.push([l[u],c[u]])}}function hm(e,t){let n=[];for(let r=t;r!==e;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function Es(e,t){if(!t)return null;let n=e;for(let r of t)if(n=n.children[r],!n)return null;return n}function gm(e){if(e)for(let t=e;t&&t.parentNode;){let n=t.parentNode;for(;t.nextSibling;)t.nextSibling.remove();t===e&&t.remove(),t=n}}Me();ge();function ym(e,t){if(!e)return()=>{};let n=[],r=200;function o(i){if(t){let c=i.getBoundingClientRect();if(c.width>0||c.height>0){let u=Math.max(c.right,c.left+(i.scrollWidth||0)),d=Math.max(c.bottom,c.top+(i.scrollHeight||0));if(u<t.left-r||c.left>t.right+r||d<t.top-r||c.top>t.bottom+r)return}}let a=getComputedStyle(i),s=bm(i,a);s&&n.push(s);let l=wm(i,a);l&&n.push(l);for(let c of i.children||[])o(c)}return o(e),()=>n.forEach(i=>i())}function bm(e,t){if(!e)return()=>{};t=t||getComputedStyle(e);let n=vm(t);if(n<=0)return()=>{};if(!bl(e))return()=>{};let r=yl(e),o=r.text,i=Cm(t);r.write("X");let a=e.scrollHeight-i;r.restore();let s=a>0?a:Sm(t),l=Math.round(s*n+i);if(e.scrollHeight<=l+.5)return()=>{};let c=0,u=o.length,d=-1;for(;c<=u;){let f=c+u>>1;r.write(o.slice(0,f)+"\u2026"),e.scrollHeight<=l+.5?(d=f,c=f+1):u=f-1}return r.write((d>=0?o.slice(0,d):"")+"\u2026"),()=>{r.restore()}}function wm(e,t){if(!e)return()=>{};if(t=t||getComputedStyle(e),t.textOverflow!=="ellipsis")return()=>{};if(t.whiteSpace!=="nowrap"&&t.whiteSpace!=="pre")return()=>{};if(t.overflowX!=="hidden"&&t.overflowX!=="clip")return()=>{};if(!bl(e))return()=>{};if(e.scrollWidth<=e.clientWidth+.5)return()=>{};let n=yl(e),r=n.text,o=0,i=r.length,a=-1;for(;o<=i;){let s=o+i>>1;n.write(r.slice(0,s)+"\u2026"),e.scrollWidth<=e.clientWidth+.5?(a=s,o=s+1):i=s-1}return n.write((a>=0?r.slice(0,a):"")+"\u2026"),()=>{n.restore()}}function yl(e){let t=[];for(let r=e.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&t.push(r);let n=t.map(r=>r.data);return{text:n.join(""),write(r){t[0].data=r;for(let o=1;o<t.length;o++)t[o].data=""},restore(){for(let r=0;r<t.length;r++)t[r].data=n[r]}}}function vm(e){let t=e.getPropertyValue("-webkit-line-clamp")||e.getPropertyValue("line-clamp");t=(t||"").trim();let n=parseInt(t,10);return Number.isFinite(n)&&n>0?n:0}function Sm(e){let t=(e.lineHeight||"").trim(),n=parseFloat(e.fontSize)||16;return!t||t==="normal"?Math.round(n*1.2):t.endsWith("px")?parseFloat(t):/^\d+(\.\d+)?$/.test(t)?Math.round(parseFloat(t)*n):t.endsWith("%")?Math.round(parseFloat(t)/100*n):Math.round(n*1.2)}function Cm(e){return(parseFloat(e.paddingTop)||0)+(parseFloat(e.paddingBottom)||0)}function bl(e){return e.childElementCount>0?!1:Array.from(e.childNodes).some(t=>t.nodeType===Node.TEXT_NODE)}var Rt=[];function Jn(e){if(!e)return null;if(Array.isArray(e)){let[t,n]=e;return typeof t=="function"?t(n):t}if(typeof e=="object"&&"plugin"in e){let{plugin:t,options:n}=e;return typeof t=="function"?t(n):t}return typeof e=="function"?e():e}function xm(...e){let t=e.flat();for(let n of t){let r=Jn(n);r&&(Rt.some(o=>o&&o.name&&r.name&&o.name===r.name)||Rt.push(r))}}function wl(e){return e&&Array.isArray(e.plugins)?e.plugins:Rt}async function ze(e,t,n){let r=n,o=wl(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,r);typeof s<"u"&&(r=s)}return r}async function Im(e,t,n){let r=[],o=wl(t);for(let i of o){let a=i&&typeof i[e]=="function"?i[e]:null;if(!a)continue;let s=await a(t,n);typeof s<"u"&&r.push(s)}return r}function Am(e){let t=[];if(Array.isArray(e))for(let n of e){let r=Jn(n);if(!r||!r.name)continue;let o=t.findIndex(i=>i&&i.name===r.name);o>=0&&t.splice(o,1),t.push(r)}for(let n of Rt)n&&n.name&&!t.some(r=>r.name===n.name)&&t.push(n);return Object.freeze(t)}function Em(e,t,n=!1){return!e||e.plugins&&!n||(e.plugins=Am(t)),e}function vl(){return Rt.slice()}ge();var Mm=.92,km=.95;async function Tm(e){let t=new Image;if(t.decoding="sync",t.src=e,typeof t.decode=="function")try{return await t.decode(),t}catch{}return await new Promise((n,r)=>{t.onload=()=>n(),t.onerror=r}),t}function Rm(e){let t=/^data:([^;,]+)/.exec(e);return t?t[1]:""}async function Wo(e,t,n){if(typeof e!="string"||!e.startsWith("data:image")||e.startsWith("data:image/svg"))return null;let r=e.length+":"+e.slice(0,64)+e.slice(-64)+":"+Math.round(t)+"x"+Math.round(n);if(A.compress.has(r))return A.compress.get(r);let o=await(async()=>{let i;try{i=await Tm(e)}catch{return null}let a=i.naturalWidth||i.width,s=i.naturalHeight||i.height;if(!a||!s)return null;let l=Math.min(1,Math.max(t/a,n/s));if(!(l>0)||l>=.95)return null;let c=l*km,u=Math.max(1,Math.round(a*c)),d=Math.max(1,Math.round(s*c)),f=document.createElement("canvas");f.width=u,f.height=d;let m=f.getContext("2d");if(!m)return null;m.imageSmoothingEnabled=!0,m.imageSmoothingQuality="high",m.drawImage(i,0,0,u,d);let p=Rm(e),h=p==="image/jpeg"?"image/jpeg":p==="image/webp"?"image/webp":"image/png";try{let y=f.toDataURL(h,Mm);if(typeof y=="string"&&y.startsWith("data:image")&&y.length<e.length)return y}catch{}return null})();return A.compress.set(r,o),o}async function Nm(e,t){if(!t.compress)return{count:0,before:0,after:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("img"));e.tagName==="IMG"&&r.unshift(e);let o=0,i=0,a=0,s=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,f=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!d||!f)return;let m=await Wo(u,d*n,f*n);m&&(o++,i+=u.length,a+=m.length,c.setAttribute("src",m))},l=6;for(let c=0;c<r.length;c+=l)await Promise.allSettled(r.slice(c,c+l).map(s));return{count:o,before:i,after:a}}function Lm(e){let t=e.offsetWidth||e.getBoundingClientRect().width||0,n=e.offsetHeight||e.getBoundingClientRect().height||0;return{w:t,h:n}}async function Fm(e,t,n=A.session.nodeMap){if(!t.compress)return{count:0};let r=(t.scale||1)*(t.dpr||1),o=[],i=[e,...e.querySelectorAll("*")];for(let c of i){let u=c.style&&c.style.backgroundImage;u&&u.includes("data:image")&&o.push(c)}let a=0,s=async c=>{let u=n.get(c);if(!u||!u.isConnected)return;let d;try{d=getComputedStyle(u)}catch{return}if((d.backgroundRepeat||"repeat").toLowerCase().split(",").some(v=>v.trim()!=="no-repeat"))return;let{w:f,h:m}=Lm(u);if(!f||!m)return;let p=f*r,h=m*r,y=c.style.backgroundImage,g=[...y.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],w=y;for(let v of g){let b=v[2];if(b.startsWith("data:image/svg"))continue;let S=await Wo(b,p,h);S&&(w=w.split(b).join(S),a++)}w!==y&&(c.style.backgroundImage=w)},l=6;for(let c=0;c<o.length;c+=l)await Promise.allSettled(o.slice(c,c+l).map(s));return{count:a}}async function $m(e,t){if(!t.compress)return{count:0};let n=(t.scale||1)*(t.dpr||1),r=Array.from(e.querySelectorAll("image"));e.localName==="image"&&r.unshift(e);let o=0,i=async s=>{let l=s.getAttribute("href")||(typeof s.getAttributeNS=="function"?s.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!l||!l.startsWith("data:image")||l.startsWith("data:image/svg"))return;let c=parseFloat(s.getAttribute("width"))||0,u=parseFloat(s.getAttribute("height"))||0;if(!c||!u)return;let d=await Wo(l,c*n,u*n);d&&(s.setAttribute("href",d),s.hasAttribute("xlink:href")&&s.setAttribute("xlink:href",d),o++)},a=6;for(let s=0;s<r.length;s+=a)await Promise.allSettled(r.slice(s,s+a).map(i));return{count:o}}async function _m(e,t,n){t.compress&&(await Nm(e,t),await Fm(e,t,n),await $m(e,t))}function Om(e){if(Array.isArray(e.plugins)){for(let t of e.plugins)if(Jn(t)?.name==="picture-resolver")return!0}return vl().some(t=>t?.name==="picture-resolver")}function Pm(e){let t=Array.isArray(e.plugins)?e.plugins:vl(),n=[];for(let r of t){let o=Jn(r);o&&typeof o.resolveNode=="function"&&n.push(o.resolveNode.bind(o))}return n.length?n:null}var Dm=2e3,Wm=3;function Bm(e){let t=Date.now(),n=A.burstAdvice.get(e);if(!n||t-n.firstTs>Dm){A.burstAdvice.set(e,{count:1,firstTs:t,warned:!1});return}n.count++,n.count>=Wm&&!n.warned&&(n.warned=!0,console.warn("[snapdom] Captured this element multiple times. Pass { burst: true } to increase the speed."))}async function Hm(e,t){if(!e)throw new Error("Element cannot be null or undefined");sd(t.cache),t.__session={styleMap:A.session.styleMap,styleCache:A.session.styleCache,nodeMap:A.session.nodeMap},t.burst||Bm(e),t.__resolveNodeHooks=Pm(t);let n=t.fast,r=t.outerTransforms!==!1,o=!!t.outerShadows,i=t.clip?ml(e,t.clip):null,a={element:e,options:t,plugins:t.plugins},s,l,c,u,d,f,m="",p="",h,y,g=null;await ze("beforeSnap",a);let w=null;t.resolvePicturePlaceholders!==!1&&!Om(t)&&(w=await cf(a.element,a.options)),await ze("beforeClone",a);let v=ym(a.element,i);try{({clone:s,classCSS:l,styleCache:c,nodeMap:u,reconcileRisk:d,clipWindow:f}=await nm(a.element,a.options)),d>0&&!t.reconcile&&!A.warnedReconcile&&(A.warnedReconcile=!0,console.warn("[snapdom] Text in inline/table-cell elements kept its natural width and may re-wrap under font-fallback rasterization. Pass { reconcile: true } for pixel-exact layout (roughly doubles capture time).")),!r&&s&&(g=Tp(a.element,s)),!o&&s&&Pp(a.element,s,a.options),s&&(Bp(a.element,s,u),Dp(a.element,s))}finally{v()}if(a={clone:s,classCSS:l,styleCache:c,nodeMap:u,...a},await ze("afterClone",a),w&&await w(),zp(a.clone),a.options?.excludeMode==="remove"||a.options?.filterMode==="remove")try{Yp(a.element,a.clone,a.styleCache)}catch(T){console.warn("[snapdom] shrink pass failed:",T)}try{await jf(a.clone,a.element,a.nodeMap)}catch{}let b=T=>new Promise((F,D)=>{Fn(()=>{Promise.resolve().then(T).then(F,D)},{fast:n})}),S=(async()=>{await Promise.all([b(()=>im(a.clone,a.options)),b(()=>dm(a.element,a.clone,a.styleCache,a.options,a.nodeMap))]);try{fm(a.element,a.clone,a.nodeMap)}catch(T){console.warn("[snapdom] backdrop-filter emulation failed:",T)}t.compress&&await b(()=>_m(a.clone,a.options,a.nodeMap))})(),x=Promise.resolve();t.embedFonts&&(x=b(async()=>{let T=a.element.ownerDocument||document,F=i?_=>{try{let N=_.getBoundingClientRect();return N.right>=i.left-200&&N.left<=i.right+200&&N.bottom>=i.top-200&&N.top<=i.bottom+200}catch{return!0}}:null,{required:D,usedCodepoints:R}=cl(a.element,F);if(De()){let _=new Set(Array.from(D).map(N=>String(N).split("__")[0]).filter(Boolean));await ul(_,1,T)}m=await dp({required:D,usedCodepoints:R,preCached:!1,exclude:a.options.excludeFonts,localFonts:a.options.localFonts,useProxy:a.options.useProxy,fontStylesheetDomains:a.options.fontStylesheetDomains,doc:T})})),await Promise.all([S,x]);let I=bd(a.clone).sort(),C=I.join(",");A.baseStyle.has(C)?p=A.baseStyle.get(C):await new Promise(T=>{Fn(()=>{p=wd(I),A.baseStyle.set(C,p),T()},{fast:n})});let M=tm(a.element?.ownerDocument||document);a={fontsCSS:m,baseCSS:p,scrollbarCSS:M,...a},await ze("beforeRender",a),await new Promise(T=>{Fn(()=>{let F=J(a.element),D=a.element.getBoundingClientRect(),R=Math.max(1,$(a.element.offsetWidth||parseFloat(F.width)||D.width||1)),_=Math.max(1,$(a.element.offsetHeight||parseFloat(F.height)||D.height||1)),N=a.element.ownerDocument||document;if(!f&&(a.element===N.body||a.element===N.documentElement)&&!N.documentElement.hasAttribute("data-sd-pinned")){let ie=Math.max(a.element.scrollHeight||0,N.documentElement?.scrollHeight||0,N.body?.scrollHeight||0),me=Math.max(a.element.scrollWidth||0,N.documentElement?.scrollWidth||0,N.body?.scrollWidth||0);ie>0&&(_=Math.max(_,$(ie))),me>0&&(R=Math.max(R,$(me)));try{let ue=(a.scrollbarCSS||"").length+(a.baseCSS||"").length+(a.fontsCSS||"").length+(a.classCSS||"").length,ye=A.measureHints.get(a.element);if(ye&&ye.cssLen===ue&&ye.w0===R)ye.csh>0&&(_=Math.max(_,$(ye.csh))),ye.csw>0&&(R=Math.max(R,$(ye.csw)));else{let de=N.createElement("div");de.setAttribute("data-snapdom-internal",""),de.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+R+"px!important;overflow:visible!important;visibility:hidden!important;";let ke=de.attachShadow({mode:"open"}),Bt=N.createElement("style");Bt.textContent=(a.scrollbarCSS||"")+a.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+a.classCSS,ke.appendChild(Bt),ke.appendChild(a.clone.cloneNode(!0)),N.body.appendChild(de);let He=de.scrollHeight,or=de.scrollWidth;N.body.removeChild(de),A.measureHints.set(a.element,{cssLen:ue,w0:R,csh:He,csw:or}),He>0&&(_=Math.max(_,$(He))),or>0&&(R=Math.max(R,$(or)))}}catch{}}if(a.options?.excludeMode==="remove"||a.options?.filterMode==="remove"){let ie=Kp(a.element,a.options);Number.isFinite(ie)&&ie>0&&(_=Math.max(1,Math.min(_,$(ie+1))))}if(a.options?.reconcile)try{let ie=(a.scrollbarCSS||"")+a.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+a.classCSS;Jp(a.element,a.clone,ie,a.nodeMap,R,_)}catch(ie){console.warn("[snapdom] reconcile pass failed:",ie)}let P=(ie,me=NaN)=>{let ue=typeof ie=="string"?parseFloat(ie):ie;return Number.isFinite(ue)?ue:me},K=P(a.options.width),U=P(a.options.height),G=f?$(f.width):R,ne=f?$(f.height):_,L=G,W=ne,B=Number.isFinite(K),Y=Number.isFinite(U),O=ne>0?G/ne:1;B&&Y?(L=Math.max(1,$(K)),W=Math.max(1,$(U))):B?(L=Math.max(1,$(K)),W=Math.max(1,$(L/(O||1)))):Y&&(W=Math.max(1,$(U)),L=Math.max(1,$(W*(O||1))));let j=0,X=0,z=R,Z=_;if(f){let ie=0,me=0;if(co(a.element)){let ue=null;if(!r&&g&&Number.isFinite(g.a))ue={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0};else{let ye=jn(a.element),de=hl(F.transform&&F.transform!=="none"?F.transform:"",ye);de&&de.is2D&&(ue={a:de.a,b:de.b,c:de.c,d:de.d,e:0,f:0})}if(ue&&!(ue.a===1&&ue.b===0&&ue.c===0&&ue.d===1)){let{ox:ye,oy:de}=Ao(F,R,_),ke=Hn(R,_,ue,ye,de);ie=ke.minX,me=ke.minY}}j=$(f.x+ie),X=$(f.y+me),z=$(j+f.width),Z=$(X+f.height)}else if(!r&&g&&Number.isFinite(g.a)){let ie={a:g.a,b:g.b||0,c:g.c||0,d:g.d||1,e:0,f:0},me=Hn(R,_,ie,0,0);j=$(me.minX),X=$(me.minY),z=$(me.maxX),Z=$(me.maxY)}else if(r&&co(a.element)){let ie=F.transform&&F.transform!=="none"?F.transform:"",me=jn(a.element),ue=Np({baseTransform:ie,rotate:me.rotate||"0deg",scale:me.scale,translate:me.translate}),{ox:ye,oy:de}=Ao(F,R,_),ke=ue.is2D?ue:new DOMMatrix(ue.toString()),Bt={a:ke.a,b:ke.b,c:ke.c,d:ke.d,e:0,f:0},He=Hn(R,_,Bt,ye,de);j=$(He.minX),X=$(He.minY),z=$(He.maxX),Z=$(He.maxY)}let H=Ip(F),re=Ap(F),oe=Ep(F),le=Mp(F),We=kp(F),$t=f?{top:0,right:0,bottom:0,left:0}:o?{top:$(Math.max(H.top,re.top)+oe.top+le.top+We.bleed.top),right:$(Math.max(H.right,re.right)+oe.right+le.right+We.bleed.right),bottom:$(Math.max(H.bottom,re.bottom)+oe.bottom+le.bottom+We.bleed.bottom),left:$(Math.max(H.left,re.left)+oe.left+le.left+We.bleed.left)}:{top:oe.top,right:oe.right,bottom:oe.bottom,left:oe.left};j=$(j-$t.left),X=$(X-$t.top),z=$(z+$t.right),Z=$(Z+$t.bottom);let Zo=Math.max(1,$(z-j)),Xo=Math.max(1,$(Z-X)),Kl=B||Y?$(L/G):1,Jl=Y||B?$(W/ne):1,Ql=Math.max(1,$(Zo*Kl)),ec=Math.max(1,$(Xo*Jl)),Ko="http://www.w3.org/2000/svg",tc=co(a.element)?2:0,at=$(tc+(r?0:1)),_t=Math.ceil(Zo+at*2),Ot=Math.ceil(Xo+at*2),Pt=$(-($(j)-at)),Dt=$(-($(X)-at)),Jo=Math.max(0,Pt),Qo=Math.max(0,Dt),ei=$(_t-Math.min(0,Pt)),ti=$(Ot-Math.min(0,Dt)),Be=document.createElementNS(Ko,"foreignObject");Be.setAttribute("x",String(Math.min(0,Pt))),Be.setAttribute("y",String(Math.min(0,Dt))),Be.setAttribute("width",String(ei)),Be.setAttribute("height",String(ti)),Be.style.overflow="visible";let ni=document.createElement("style"),nc="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";ni.textContent=(a.scrollbarCSS||"")+a.baseCSS+a.fontsCSS+nc+a.classCSS,Be.appendChild(ni);let Wt=document.createElement("div");Wt.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Wt.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${ei}px;height:${ti}px`+(Jo!==0||Qo!==0?`;padding:${Qo}px 0 0 ${Jo}px !important`:""),Wt.appendChild(a.clone),Be.appendChild(Wt);let rc=new XMLSerializer().serializeToString(Be),ri=B||Y,oc=Object.freeze({w0:G,h0:ne,vbW:_t,vbH:Ot,targetW:L,targetH:W,contentX:$(Pt+(f?j:0)),contentY:$(Dt+(f?X:0)),clip:f?Object.freeze({x:$(j),y:$(X),width:G,height:ne}):null});Object.defineProperty(t,"meta",{value:oc,enumerable:!0,writable:!1,configurable:!0});let ic=!ri||De()?_t:$(Ql+at*2),ac=!ri||De()?Ot:$(ec+at*2),sc=parseFloat(J(N.documentElement)?.fontSize)||16;y=`<svg xmlns="${Ko}" width="${ic}" height="${ac}" viewBox="0 0 ${_t} ${Ot}" font-size="${sc}px">`+rc+"</svg>",h=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(y)}`,a={svgString:y,dataURL:h,...a},T()},{fast:n})}),await ze("afterRender",a);let k=document.getElementById("snapdom-sandbox");return k&&k.style.position==="absolute"&&k.remove(),a.dataURL}function co(e){return Lp(e)}ge();function Um(e={}){let t=e.format??"png";t==="jpg"&&(t="jpeg");let n=ad(e.cache);return{debug:e.debug??!1,fast:e.fast??!0,scale:e.scale??1,exclude:e.exclude??[],excludeMode:e.excludeMode??"hide",filter:e.filter??null,filterMode:e.filterMode??"hide",placeholders:e.placeholders!==!1,embedFonts:e.embedFonts??!1,iconFonts:Array.isArray(e.iconFonts)?e.iconFonts:e.iconFonts?[e.iconFonts]:[],localFonts:Array.isArray(e.localFonts)?e.localFonts:[],excludeFonts:e.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(e.fontStylesheetDomains)?e.fontStylesheetDomains:[],fallbackURL:e.fallbackURL??void 0,cache:n,useProxy:typeof e.useProxy=="string"?e.useProxy:"",width:e.width??null,height:e.height??null,format:t,type:e.type??"svg",quality:e.quality??.92,dpr:e.dpr??(window.devicePixelRatio||1),backgroundColor:e.backgroundColor??(["jpeg","webp"].includes(t)?"#ffffff":null),filename:e.filename??"snapDOM",outerTransforms:e.outerTransforms??!0,outerShadows:e.outerShadows??!1,reconcile:e.reconcile??!1,burst:e.burst??!1,invalidate:e.invalidate??!1,clip:e.clip??null,compress:e.compress!==!1,excludeStyleProps:e.excludeStyleProps??null,resolvePicturePlaceholders:e.resolvePicturePlaceholders!==!1,pictureResolver:e.pictureResolver&&typeof e.pictureResolver=="object"?e.pictureResolver:{}}}ot();zs();var Ms=new WeakMap;function Sl(e,t,n){let r=new Set;if(e instanceof HTMLVideoElement&&r.add(e),e.querySelectorAll)for(let o of e.querySelectorAll("video"))r.add(o);for(let o of t.trackedVideos)r.has(o)||(o.removeEventListener("timeupdate",n),o.removeEventListener("seeked",n),t.trackedVideos.delete(o));for(let o of r)t.trackedVideos.has(o)||(o.addEventListener("timeupdate",n),o.addEventListener("seeked",n),t.trackedVideos.add(o))}function Vm(e){let t={dirty:!0,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedVideos:new Set},n=i=>{t.capturing||Qs(i)&&(t.dirty=!0)},r=()=>{t.capturing||(t.dirty=!0)},o=e.ownerDocument||document;try{let i=new MutationObserver(n);i.observe(e,{subtree:!0,childList:!0,attributes:!0,characterData:!0}),t.observers.push(i)}catch{}try{if(o.head){let i=new MutationObserver(n);i.observe(o.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),t.observers.push(i)}}catch{}return t.markDirty=n,t.onMediaDirty=r,Sl(e,t,r),t}function ks(e){let{burst:t,invalidate:n,...r}=e||{};try{return JSON.stringify(r,Object.keys(r).sort())}catch{return null}}function zm(e,t,n,r){let o=Ms.get(e);o||(o=Vm(e),o.baselineSignature=ks(t),Ms.set(e,o));let i=ks(t),a=i===null||i!==o.baselineSignature,s=async()=>{for(let c of o.observers)o.markDirty(c.takeRecords());if(n.invalidate&&(o.dirty=!0),!a&&!o.dirty&&o.last)return o.last;o.capturing=!0,a||(o.dirty=!1);try{let c=await r();return a||(o.last=c),c}finally{for(let c of o.observers)c.takeRecords();o.capturing=!1,Sl(e,o,o.onMediaDirty)}},l=o.inflight.then(s,s);return o.inflight=l.catch(()=>{}),l}Me();rt();ge();function Gm(...e){return xm(...e),te}var te=Object.assign(jm,{plugins:Gm}),To=Symbol("snapdom.internal"),qm=Symbol("snapdom.internal.silent");async function jm(e,t){if(!e)throw new Error("Element cannot be null or undefined");let n=Um(t);if(Em(n,t&&t.plugins),De()){if(n.embedFonts===!0)try{let o=fp(e),i=new Set([...o].map(a=>String(a).split("__")[0]).filter(Boolean));await ul(i,1)}catch{}let r=Array.from(e.querySelectorAll("canvas"));e.tagName==="CANVAS"&&r.unshift(e);for(let o of r)try{let i=o.getContext("2d",{willReadFrequently:!0});i&&i.getImageData(0,0,1,1)}catch(i){Q(t,"safari canvas poke failed",i)}}return n.iconFonts&&n.iconFonts.length>0&&Bf(n.iconFonts),n.snap||(n.snap={toPng:(r,o)=>te.toPng(r,o),toSvg:(r,o)=>te.toSvg(r,o)}),n.burst?zm(e,t,n,()=>te.capture(e,n,To)):te.capture(e,n,To)}te.capture=async(e,t,n)=>{if(n!==To)throw new Error("[snapdom.capture] is internal. Use snapdom(...) instead.");t.element=e;let r=await Hm(e,t),o={img:async(h,y)=>{let{toImg:g}=await Promise.resolve().then(()=>(es(),ho));return g(r,{...h,...y||{}})},svg:async(h,y)=>{let{toSvg:g}=await Promise.resolve().then(()=>(es(),ho));return g(r,{...h,...y||{}})},canvas:async(h,y)=>{let{toCanvas:g}=await Promise.resolve().then(()=>(Lt(),Gs));return g(r,{...h,...y||{}})},blob:async(h,y)=>{let{toBlob:g}=await Promise.resolve().then(()=>(Ks(),Zs));return g(r,{...h,...y||{}})},png:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(On(),_n));return g(r,{...h,...y||{},format:"png"})},jpeg:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(On(),_n));return g(r,{...h,...y||{},format:"jpeg"})},webp:async(h,y)=>{let{rasterize:g}=await Promise.resolve().then(()=>(On(),_n));return g(r,{...h,...y||{},format:"webp"})},download:async(h,y)=>{let{download:g}=await Promise.resolve().then(()=>(Od(),Js));return g(r,{...h,...y||{}})}},i={};for(let h of["img","svg","canvas","blob","png","jpeg","webp"])i[h]=async y=>o[h](t,{...y||{},[qm]:!0});i.jpg=i.jpeg;let a={...t,export:{url:r},exports:i},s=await Im("defineExports",a),l=Object.assign({},...s.filter(h=>h&&typeof h=="object").reverse()),c={...o,...l};c.jpeg&&!c.jpg&&(c.jpg=(h,y)=>c.jpeg(h,y));function u(h,y){let g={...t,...y||{}},w=v=>v==="jpeg"||v==="jpg"||v==="webp";return[h,g.format,g.type].map(v=>typeof v=="string"?v.toLowerCase():"").find(w)&&(g.backgroundColor==null||g.backgroundColor==="transparent")&&(g.backgroundColor="#ffffff"),g}let d=!1,f=Promise.resolve();async function m(h,y){let g=Object.freeze(y&&typeof y=="object"?{...y}:{}),w=async()=>{let b=c[h];if(!b)throw new Error(`[snapdom] Unknown export type: ${h}`);let S=u(h,g),x={...t,export:{type:h,options:S,requestedOptions:g,url:r}};await ze("beforeExport",x,{format:h,options:S});let I=await b(x,S);return await ze("afterExport",x,{format:h,options:S,result:I}),d||(d=!0,await ze("afterSnap",t)),I},v=f.then(w);return f=v.catch(()=>{}),v}let p={url:r,toRaw:()=>r,to:(h,y)=>m(h,y),toImg:h=>m("img",h),toSvg:h=>m("svg",h),toCanvas:h=>m("canvas",h),toBlob:h=>m("blob",h),toPng:h=>m("png",h),toJpg:h=>m("jpg",h),toWebp:h=>m("webp",h),download:h=>m("download",h)};Object.defineProperty(p,"meta",{value:t.meta,enumerable:!0,writable:!1,configurable:!1});for(let h of Object.keys(c)){let y="to"+h.charAt(0).toUpperCase()+h.slice(1);p[y]||(p[y]=g=>m(h,g))}return p};te.toRaw=(e,t)=>te(e,t).then(n=>n.toRaw());te.toImg=(e,t)=>te(e,t).then(n=>n.toImg());te.toSvg=(e,t)=>te(e,t).then(n=>n.toSvg());te.toCanvas=(e,t)=>te(e,t).then(n=>n.toCanvas());te.toBlob=(e,t)=>te(e,t).then(n=>n.toBlob());te.toPng=(e,t)=>te(e,{...t,format:"png"}).then(n=>n.toPng());te.toJpg=(e,t)=>te(e,{...t,format:"jpeg"}).then(n=>n.toJpg());te.toWebp=(e,t)=>te(e,{...t,format:"webp"}).then(n=>n.toWebp());te.download=(e,t)=>te(e,t).then(n=>n.download());function Cl(e){if(e.dataset.fontProxied||!e.rel||!e.rel.includes("stylesheet"))return!1;let t=e.href||"";try{return new URL(t).origin!==window.location.origin}catch{return!1}}function xl(e){let t=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(e.href)}`,n=document.createElement("link");n.rel="stylesheet",n.href=t,n.dataset.fontProxied="true",e.media&&(n.media=e.media),n.onload=()=>{e.remove()},n.onerror=()=>{n.remove()},e.parentNode?.insertBefore(n,e.nextSibling)}function Il(){let e=document.querySelectorAll('link[rel~="stylesheet"]');for(let t of e)Cl(t)&&xl(t)}function Ym(){let e=E().fonts;e.observer||(e.observer=new MutationObserver(t=>{for(let n of t)for(let r of n.addedNodes)r instanceof HTMLLinkElement&&Cl(r)&&xl(r)}),e.observer.observe(document.documentElement,{childList:!0,subtree:!0}))}function Zm(e){try{let t=new URL(e,window.location.origin);return t.origin===window.location.origin?!1:!!(/\.(css|woff2?|ttf|otf|eot)(\?|$)/i.test(t.pathname)||t.pathname.includes("/css"))}catch{return!1}}function Xm(){if(window.fetch.__ms_font_proxied)return;let e=window.fetch;window.fetch=function(t,n){let r=typeof t=="string"?t:t instanceof URL?t.href:t.url||String(t);if(Zm(r)){let o=`/__mindstudio_dev__/font-proxy?url=${encodeURIComponent(r)}`;return e.apply(this,[o,n])}return e.apply(this,[t,n])},window.fetch.__ms_font_proxied=!0}function Al(){let e=E().fonts;e.initialized||(e.initialized=!0,Xm(),Il(),Ym())}async function El(){Il();try{await document.fonts.ready}catch{}}var Ml=2,Km=.92,Jm={name:"text-fit",afterClone(e){if(!e.clone)return;let t=e.clone.ownerDocument;if(!t)return;let n=t.createElement("style");n.textContent="* { letter-spacing: -0.03px !important; }",e.clone.prepend(n)}},Qm=["#__mindstudio-cursor","#__mindstudio-cursor-ripple","#__mindstudio-touch-circle"];async function Qn(){let e=E().screenshot;if(e.capturing)throw new Error("Capture already in progress");e.capturing=!0,tn();try{await El(),console.info("[capture-page] starting snapdom viewport render");let t=performance.now(),r=await(await te(document.body,{embedFonts:!0,exclude:Qm,plugins:[Jm],clip:"viewport",scale:Ml,dpr:1,backgroundColor:"#ffffff"})).toCanvas();return console.info("[capture-page] snapdom render done",{canvasWidth:r.width,canvasHeight:r.height,ms:Math.round(performance.now()-t)}),{blob:await new Promise((i,a)=>{r.toBlob(s=>s?i(s):a(new Error("Canvas export produced no image")),"image/jpeg",Km)}),width:r.width,height:r.height,scale:Ml}}finally{e.capturing=!1,nn()}}var Ft="mindstudio-browser-agent";function kl(){let e=E(),t=new URLSearchParams(window.location.search);e.zoom.pipMode=t.get("display-mode")==="pip",e.zoom.mobilePreview=t.get("preview")==="mobile"||window.innerWidth<768;try{let n=sessionStorage.getItem("__ms_pip");n==="1"?e.zoom.pipMode=!0:n==="0"&&(e.zoom.pipMode=!1);let r=sessionStorage.getItem("__ms_mobile");r==="1"?e.zoom.mobilePreview=!0:r==="0"&&(e.zoom.mobilePreview=!1)}catch{}e.messages.handler||(e.messages.handler=async n=>{if(n.source===window)return;let r=n.data;if(!(!r||typeof r.command!="string")&&r.channel===Ft)switch(r.command){case"capture-page":{console.info("[capture-page] request received");try{let o=await Qn();console.info("[capture-page] capture complete",{width:o.width,height:o.height,scale:o.scale,blobBytes:o.blob.size}),window.parent.postMessage({channel:Ft,command:"capture-page-result",...o},"*"),console.info("[capture-page] result posted to parent")}catch(o){console.error("[capture-page] capture failed",o),window.parent.postMessage({channel:Ft,command:"capture-page-result",error:o instanceof Error?o.message:"Capture failed"},"*")}break}case"cursor-show":rn("visible");break;case"cursor-hide":rn("hidden");break;case"cursor-auto":rn(null);break;case"navigate":typeof r.url=="string"&&(window.history.pushState(null,"",r.url),window.dispatchEvent(new PopStateEvent("popstate")));break;case"back":window.history.back();break;case"forward":window.history.forward();break;case"healthcheck":{let o=E().ws;window.parent.postMessage({channel:Ft,command:"healthcheck-reply",wsConnected:!!(o.ws&&o.ws.readyState===WebSocket.OPEN),url:location.href},"*");break}case"display-mode-pip":e.zoom.pipMode=!0;try{sessionStorage.setItem("__ms_pip","1")}catch{}break;case"display-mode-full":e.zoom.pipMode=!1;try{sessionStorage.setItem("__ms_pip","0")}catch{}break;case"preview-mode-mobile":e.zoom.mobilePreview=!0;try{sessionStorage.setItem("__ms_mobile","1")}catch{}wr(),Nr(!0);break;case"preview-mode-desktop":e.zoom.mobilePreview=!1;try{sessionStorage.setItem("__ms_mobile","0")}catch{}$i(),Nr(!1);break}},window.addEventListener("keyup",n=>{n.code==="Backquote"&&window.parent!==window&&window.parent.postMessage({channel:Ft,command:"ptt-keyup"},"*")}),window.addEventListener("message",e.messages.handler))}var eh="mindstudio-browser-agent";function Tl(){if(window.__ms_nav_patched)return;window.__ms_nav_patched=!0;let e=()=>{let r=location.pathname+location.search+location.hash,o=E();if(r!==o.nav.lastUrl&&(o.nav.lastUrl=r,Da(r),window.parent!==window)){let i=window.navigation;window.parent.postMessage({channel:eh,command:"location",url:r,canGoBack:i?!!i.canGoBack:void 0,canGoForward:i?!!i.canGoForward:void 0},"*")}},t=history.pushState.bind(history);history.pushState=function(...r){t(...r),e()};let n=history.replaceState.bind(history);history.replaceState=function(...r){n(...r),e()},window.addEventListener("popstate",e),window.addEventListener("hashchange",e),e()}var Rl=16,th=3e4,Nl="__ms_mirror";function nh(){let e=new URLSearchParams(window.location.search);if(e.get("mirror")==="true"){e.delete("mirror");let t=e.toString(),n=window.location.pathname+(t?"?"+t:"")+window.location.hash;window.history.replaceState(null,"",n);try{sessionStorage.setItem(Nl,"1")}catch{}return!0}try{return sessionStorage.getItem(Nl)==="1"}catch{return!1}}async function Ll(){if(window.parent!==window||!nh())return;let e=E().mirror;if(e.recording)return;let t=[],n=null;function r(){if(n=null,t.length===0)return;let a=En();if(!a){n=setTimeout(r,Rl);return}let s=t;t=[],a.send(JSON.stringify({type:"mirror",events:s}))}function o(a){t.push(a),n||(n=setTimeout(r,Rl))}document.readyState!=="complete"&&await new Promise(a=>window.addEventListener("load",()=>a(),{once:!0})),await new Promise(a=>setTimeout(a,500));let i=Ne({emit:o,collectFonts:!0,checkoutEveryNms:th});i&&(e.recording=!0,e.stopFn=()=>{i(),n&&(clearTimeout(n),n=null),r(),e.recording=!1,e.stopFn=null})}var rh='input[type="email"], input[autocomplete="email"]',oh='input[type="tel"], input[autocomplete="tel"]',ih='input[autocomplete="one-time-code"]',ah=/e[-_ ]?mail/i,sh=/phone|mobile|\btel\b/i,lh=/\b(otp|code|verification|verify|2fa|one[-_ ]?time)\b/i;function er(e){let t=e.getBoundingClientRect();if(t.width===0||t.height===0)return!1;let n=getComputedStyle(e);return!(n.display==="none"||n.visibility==="hidden")}function Bo(e){let t=document.querySelectorAll(e);for(let n of t)if(er(n))return n;return null}function ch(e){let t=e.getAttribute("aria-labelledby"),n=t?document.getElementById(t):null;return[e.name,e.id,e.placeholder,e.getAttribute("aria-label"),n?.textContent].filter(Boolean).join(" ")}function Ho(e,t){let n=document.querySelectorAll('input[type="text"], input:not([type])');for(let r of n)if(t(r)&&e.test(ch(r))&&er(r))return r;return null}function uh(e){if(e.inputMode==="numeric"){let n=e.maxLength;if(n>=4&&n<=8)return!0}let t=e.getAttribute("pattern")??"";return!!(/0-9/.test(t)&&e.maxLength>=4&&e.maxLength<=8)}function dh(e){if(e.maxLength!==1)return!1;let t=(e.getAttribute("type")||"text").toLowerCase();return t==="text"||t==="tel"||t==="number"}function fh(){let e=Array.from(document.querySelectorAll("input")).filter(t=>dh(t)&&er(t));return e.length<4||e.length>8?null:(e.sort((t,n)=>{let r=t.getBoundingClientRect(),o=n.getBoundingClientRect();return Math.abs(r.top-o.top)>8?r.top-o.top:r.left-o.left}),e)}function ph(){let e=Bo(ih),t=e&&e.maxLength!==1?e:null;if(!t){let n=document.querySelectorAll('input[inputmode="numeric"], input[type="text"]');for(let r of n)if(uh(r)&&er(r)){t=r;break}}return t||(t=Ho(lh,n=>n.maxLength<=8&&n.maxLength!==1)),t}function Fl(){let e=Bo(rh),t=e?"email":null;e||(e=Bo(oh),t=e?"phone":null),e||(e=Ho(ah,()=>!0),e&&(t="email")),e||(e=Ho(sh,()=>!0),e&&(t="phone"));let n=fh(),r=n?{cells:n,segmented:!0}:null;if(!r){let o=ph();o&&(r={cells:[o],segmented:!1})}return{identifier:e,identifierKind:t,code:r}}var $l=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set;function _l(e,t){$l?$l.call(e,t):e.value=t}function tr(e,t,n){let r;try{r=new InputEvent(t,{bubbles:!0,cancelable:t==="beforeinput",inputType:"insertText",data:n})}catch{r=new Event(t,{bubbles:!0})}e.dispatchEvent(r)}function mh(e,t){let n={key:t,code:/^[0-9]$/.test(t)?`Digit${t}`:t,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function Ol(e,t){e.focus(),_l(e,t),tr(e,"beforeinput",t),tr(e,"input",t),e.dispatchEvent(new Event("change",{bubbles:!0}))}function Pl(e){let t=e.closest("form");if(t&&typeof t.requestSubmit=="function")try{t.requestSubmit();return}catch{}let n={key:"Enter",code:"Enter",keyCode:13,which:13,bubbles:!0,cancelable:!0};e.dispatchEvent(new KeyboardEvent("keydown",n)),e.dispatchEvent(new KeyboardEvent("keypress",n)),e.dispatchEvent(new KeyboardEvent("keyup",n))}function Dl(e,t){Ol(e,t),Pl(e)}function nr(e,t){return e.segmented?e.cells.forEach((n,r)=>{let o=t[r]??"";n.focus(),_l(n,o),tr(n,"beforeinput",o),tr(n,"input",o),n.dispatchEvent(new Event("change",{bubbles:!0})),o&&mh(n,o)}):Ol(e.cells[0],t),Vo(e),Uo(e)}function Uo(e){return e.cells.map(t=>t.value).join("")}function Vo(e){let t=e.cells[e.cells.length-1]??e.cells[0];t&&Pl(t)}var hh="__mindstudio-auth-creds-host",gh="remy@mindstudio.ai",yh="+15555555555",it="123456";function zo(e){E().authCredsWidget.host||bh(),wh(e)}function Wl(){let e=E().authCredsWidget;e.host&&(e.host.remove(),e.host=null)}function bh(){let e=E().authCredsWidget,t=document.createElement("div");t.id=hh,t.style.cssText="position: fixed; right: 16px; bottom: 16px; z-index: 2147483640; pointer-events: none;";let n=t.attachShadow({mode:"open"}),r=document.createElement("style");r.textContent=`
|
|
81
81
|
.card {
|
|
82
82
|
pointer-events: auto;
|
|
83
83
|
width: 280px;
|
|
@@ -165,9 +165,9 @@ ${h}
|
|
|
165
165
|
@keyframes __ms_auth_spin {
|
|
166
166
|
to { transform: rotate(360deg); }
|
|
167
167
|
}
|
|
168
|
-
`,n.appendChild(r);let o=document.createElement("div");o.className="card",n.appendChild(o),document.body.appendChild(t),e.host=t}function
|
|
169
|
-
`)+"(empty page)";
|
|
170
|
-
`).trimEnd()}function
|
|
168
|
+
`,n.appendChild(r);let o=document.createElement("div");o.className="card",n.appendChild(o),document.body.appendChild(t),e.host=t}function wh(e){let t=E().authCredsWidget;if(!t.host)return;let n=t.host.shadowRoot;if(!n)return;let r=n.querySelector(".card");if(!r||e.loading&&r.querySelector(".loading"))return;r.innerHTML="";let o=document.createElement("div");o.className="header";let i=document.createElement("span");i.className="title",i.textContent="Dev mode";let a=document.createElement("button");if(a.className="dismiss",a.setAttribute("aria-label","Dismiss"),a.title="Dismiss",a.textContent="\xD7",a.addEventListener("click",e.onDismiss),o.appendChild(i),o.appendChild(a),r.appendChild(o),e.loading){let c=document.createElement("div");c.className="loading";let u=document.createElement("span");u.className="spinner";let d=document.createElement("span");d.textContent="Signing in\u2026",c.appendChild(u),c.appendChild(d),r.appendChild(c);return}let s=document.createElement("p");s.className="body",s.textContent="Use your own credentials, or use these test credentials to bypass verification.",r.appendChild(s);let l=document.createElement("div");if(l.className="actions",r.appendChild(l),e.identifier&&e.identifierKind){let c=e.identifierKind==="email"?gh:yh,u=document.createElement("button");u.className="primary",u.textContent=`Continue with ${c}`,u.title=`Continue with ${c}`,u.addEventListener("click",()=>{e.identifier&&(Dl(e.identifier,c),e.onIdentifierFilled())}),l.appendChild(u)}if(e.code){let c=document.createElement("button");c.className="primary",c.textContent=`Continue with ${it}`,c.title=`Continue with ${it}`,c.addEventListener("click",()=>{e.code&&nr(e.code,it)}),l.appendChild(c)}}var Bl="__ms_dev_creds_dismissed",vh=150,Sh=8e3,Ch=250,xh=8,Ih=6,Ah=200,Eh=1e4;function Hl(){let e=E();e.authCredsWidget||(e.authCredsWidget={initialized:!1,host:null,observer:null,debounceTimer:null,awaitingCode:!1,awaitingCodeTimer:null,codePollTimer:null,codeAttempts:0,codeSubmitted:!1,codeSeenCount:0,blankPolls:0});let t=e.authCredsWidget;if(t.initialized||(t.initialized=!0,oo()))return;let n=ro();n!=="iframe"&&n!=="standalone"||Ul(Date.now()+Eh)}function Ul(e){if(typeof window.__MINDSTUDIO__?.releaseId!="string"){Date.now()<e&&setTimeout(()=>Ul(e),Ah);return}let n=E().authCredsWidget;if(n.observer)return;let r=new MutationObserver(Go);r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["type","autocomplete","inputmode","maxlength","style","hidden","class"]}),n.observer=r,Go()}function Go(){let e=E().authCredsWidget;e.debounceTimer&&clearTimeout(e.debounceTimer),e.debounceTimer=setTimeout(()=>{e.debounceTimer=null,Vl()},vh)}function Vl(){let e=E().authCredsWidget;if(kh()){rr(),jo();return}let t=Fl();if(!t.identifier&&!t.code){if(e.awaitingCode&&!e.codeSubmitted&&e.blankPolls<Ih){e.blankPolls++,qo();return}rr(),jo();return}if(e.blankPolls=0,e.awaitingCode){if(t.code&&!e.codeSubmitted)if(Uo(t.code)===it)Vo(t.code),e.codeSubmitted=!0;else{let r=t.code.cells.length,o=!t.code.segmented||r===e.codeSeenCount;e.codeSeenCount=r,o&&e.codeAttempts<xh&&(e.codeAttempts++,nr(t.code,it)===it&&(e.codeSubmitted=!0))}else t.code||(e.codeSeenCount=0);qo();return}zo({identifier:t.identifier,identifierKind:t.identifierKind,code:Mh(t.code),loading:!1,onDismiss:Gl,onIdentifierFilled:zl})}function Mh(e){return e&&e.cells.some(t=>!t.disabled)?e:null}function qo(){zo({identifier:null,identifierKind:null,code:null,loading:!0,onDismiss:Gl,onIdentifierFilled:zl})}function zl(){let e=E().authCredsWidget;e.awaitingCode=!0,e.codeAttempts=0,e.codeSubmitted=!1,e.codeSeenCount=0,e.blankPolls=0,e.awaitingCodeTimer&&clearTimeout(e.awaitingCodeTimer),e.awaitingCodeTimer=setTimeout(()=>{rr(),Go()},Sh),e.codePollTimer&&clearInterval(e.codePollTimer),e.codePollTimer=setInterval(Vl,Ch),qo()}function rr(){let e=E().authCredsWidget;e.awaitingCode=!1,e.codeAttempts=0,e.codeSubmitted=!1,e.codeSeenCount=0,e.blankPolls=0,e.awaitingCodeTimer&&(clearTimeout(e.awaitingCodeTimer),e.awaitingCodeTimer=null),e.codePollTimer&&(clearInterval(e.codePollTimer),e.codePollTimer=null)}function jo(){Wl()}function Gl(){rr();try{sessionStorage.setItem(Bl,"1")}catch{}jo()}function kh(){try{return sessionStorage.getItem(Bl)==="1"}catch{return!1}}var Th=new Set(["__mindstudio-browser-agent","__mindstudio-cursor","__mindstudio-cursor-ripple","__mindstudio-notes-overlay","__mindstudio-notes-cursor"]),Rh=["backgroundColor","backgroundImage","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","boxShadow"],ql=60,Nh=80;function jl(){let e=window.innerWidth,t=window.innerHeight,n=window.scrollY,r=document.documentElement.scrollHeight,o=[];o.push(`viewport: ${e} \xD7 ${t}`),o.push(`scroll: ${Math.round(n)} / ${r} (${n<10?"top":n+t>=r-10?"bottom":Math.round(n/(r-t)*100)+"%"})`),o.push("");let i=[],a=document.body;if(!a)return o.join(`
|
|
169
|
+
`)+"(empty page)";Yl(a,i,e,t,n);let s=Bh(i);for(let u of s)if("count"in u){let d=u;o.push(`[${d.count} ${d.role}, each ~${d.avgWidth} \xD7 ${d.avgHeight}, first: "${d.firstName}", last: "${d.lastName}"]`),o.push("")}else Oh(u,o,e,t,n);let l=Wh(i);if(l.length>0){for(let u of l)o.push(`\xD7 ${u.a} overlaps ${u.b} by ${u.overlapPx}px ${u.axis}ly`);o.push("")}let c=i.filter(u=>{let d=u.rect;return d.right<0||d.left>e||d.bottom<-n||d.top>t+n});for(let u of c){let d=u.rect,f="";d.right<0?f=`left: ${Math.round(d.left)}px`:d.left>e?f=`left: ${Math.round(d.left)}px`:d.bottom<0?f=`top: ${Math.round(d.top)}px`:f=`top: ${Math.round(d.top)}px`,o.push(`\xD7 ${u.label} \u2014 off-viewport (${f})`)}return o.join(`
|
|
170
|
+
`).trimEnd()}function Yl(e,t,n,r,o){if(Lh(e)||t.length>=Nh)return;let i=e.tagName.toLowerCase(),a=xe(e),s=Zl(e),l=a!==null,c=i==="img"||i==="svg"||i==="canvas"||i==="video",u=i==="input"||i==="textarea"||i==="select",d=l||c||u;if(!d&&Fh(e)&&(d=!0),d&&!s&&!c&&!u&&$h(a)&&(d=!1),d){let f=e.getBoundingClientRect();if(f.width>0&&f.height>0)try{let m=getComputedStyle(e),p=_h(e,a,i);t.push({label:p,rect:f,style:m,el:e,tag:i})}catch{}}for(let f of Array.from(e.children))Yl(f,t,n,r,o)}function Lh(e){if(Th.has(e.id))return!0;let t=e.tagName.toLowerCase();if(t==="script"||t==="style"||t==="noscript"||t==="template"||t==="head"||e.getAttribute("aria-hidden")==="true")return!0;try{let n=getComputedStyle(e);if(n.display==="none"||n.visibility==="hidden")return!0}catch{}return!1}function Zl(e){for(let t of Array.from(e.childNodes))if(t.nodeType===Node.TEXT_NODE&&(t.textContent||"").trim())return!0;return!1}function Fh(e){try{let t=getComputedStyle(e);for(let n of Rh){let r=t[n];if(!(!r||r==="none"||r==="0px"||r==="rgba(0, 0, 0, 0)"||r==="transparent"))return!0}}catch{}return!1}function $h(e){return e==="navigation"||e==="main"||e==="banner"||e==="contentinfo"||e==="complementary"||e==="region"||e==="form"||e==="list"||e==="table"||e==="article"||e==="group"}function _h(e,t,n){let r=Te(e),o=r.length>ql?r.slice(0,ql-1)+"\u2026":r;if(t&&o)return`${t} "${o}"`;if(t)return t;if(o)return`${n} "${o}"`;if(e.id)return`${n}#${e.id}`;let i=e.className&&typeof e.className=="string"?e.className.split(/\s+/).find(a=>!a.startsWith("sc-")&&!a.startsWith("css-")&&a.length<30):null;return i?`${n}.${i}`:n}function Oh(e,t,n,r,o){let{label:i,rect:a,style:s,el:l,tag:c}=e,u=Math.round(a.width),d=Math.round(a.height),f=Math.round(a.left),m=Math.round(a.top+o),p=[],h=Zl(l)||c==="input"||c==="textarea";if(h){p.push(s.fontSize);let v=Hh(s.fontFamily);v&&p.push(`"${v}"`);let b=s.fontWeight;b!=="400"&&b!=="normal"&&p.push(b),p.push(Yo(s.color));let S=Yo(s.backgroundColor);S&&S!=="transparent"&&p.push(`on ${S}`)}else if(!(c==="img"||c==="svg"||c==="canvas"||c==="video")){let v=Yo(s.backgroundColor);v&&v!=="transparent"&&p.push(`bg: ${v}`)}let y=p.length>0?` \u2014 ${p.join(" ")}`:"";t.push(`${i}${y}`);let g=[];if(g.push(`${u} \xD7 ${d}`),g.push(`at (${f}, ${m})`),g.push(`${(u/n*100).toFixed(1)}% vw`),(c==="img"||c==="svg"||c==="canvas"||c==="video")&&u>0&&d>0){let v=Uh(u,d);g.push(`aspect: ${v}`)}if(h){let v=Ph(l,s);v&&(g.push(`${v.lines} line${v.lines!==1?"s":""}`),v.capacity!==null&&g.push(`(line-height: ${v.lineHeight}, capacity: ${v.capacity.toFixed(1)})`))}t.push(` ${g.join(", ")}`);let w=Dh(l);w&&t.push(` ${w}`),t.push("")}function Ph(e,t){let n=Xl(e);if(!n||!n.textContent?.trim())return null;try{let r=document.createRange();r.selectNodeContents(n.parentElement||e);let o=r.getClientRects();if(o.length===0)return null;let i=o.length,a=t.lineHeight,s=parseFloat(a),l=null;return!isNaN(s)&&s>0&&(l=e.clientHeight/s),{lines:i,lineHeight:isNaN(s)?a:`${Math.round(s)}px`,capacity:l}}catch{return null}}function Xl(e){for(let t of Array.from(e.childNodes)){if(t.nodeType===Node.TEXT_NODE&&(t.textContent||"").trim())return t;if(t.nodeType===Node.ELEMENT_NODE){let n=Xl(t);if(n)return n}}return null}function Dh(e){let t=e,n=t.scrollWidth,r=t.scrollHeight,o=t.clientWidth,i=t.clientHeight;if(n<=o&&r<=i)return null;let a=getComputedStyle(e),s=a.overflowX,l=a.overflowY,c=a.textOverflow,u=[];if(n>o){let d=Math.round((n-o)/n*100),f=c==="ellipsis"?"ellipsis":s==="hidden"?"hidden":"scroll";u.push(`container: ${o}px, content: ${n}px wide, overflow: ${f} (${d}% hidden)`)}if(r>i&&l!=="visible"){let d=Math.round((r-i)/r*100),f=l==="hidden"?"hidden":"scroll";u.push(`container: ${i}px, content: ${r}px tall, overflow: ${f} (${d}% hidden)`)}return u.length>0?u.join("; "):null}function Wh(e){let t=[],n=new Map;for(let r of e){let o=r.el.parentElement,i=n.get(o)||[];i.push(r),n.set(o,i)}for(let r of n.values())if(!(r.length<2))for(let o=0;o<r.length;o++)for(let i=o+1;i<r.length;i++){let a=r[o].rect,s=r[i].rect,l=Math.min(a.bottom,s.bottom)-Math.max(a.top,s.top),c=Math.min(a.right,s.right)-Math.max(a.left,s.left);if(l>2&&c>2){let u=l<c?"vertical":"horizontal",d=Math.round(Math.min(l,c));t.push({a:r[o].label,b:r[i].label,overlapPx:d,axis:u})}}return t.slice(0,5)}function Bh(e){if(e.length===0)return[];let t=[],n=0;for(;n<e.length;){let r=e[n],o=r.el.parentElement,i=xe(r.el);if(i&&o){let a=n+1;for(;a<e.length&&e[a].el.parentElement===o&&xe(e[a].el)===i;)a++;let s=a-n;if(s>=4){let l=e.slice(n,a),c=Math.round(l.reduce((m,p)=>m+p.rect.width,0)/s),u=Math.round(l.reduce((m,p)=>m+p.rect.height,0)/s),d=Te(l[0].el),f=Te(l[s-1].el);t.push({count:s,role:i,avgWidth:c,avgHeight:u,firstName:d.length>40?d.slice(0,39)+"\u2026":d,lastName:f.length>40?f.slice(0,39)+"\u2026":f}),n=a;continue}}t.push(r),n++}return t}function Yo(e){if(!e||e==="transparent"||e==="rgba(0, 0, 0, 0)")return"transparent";let t=e.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*([\d.]+))?\)/);if(!t)return e;let n=parseInt(t[1]),r=parseInt(t[2]),o=parseInt(t[3]),i=t[4]!==void 0?parseFloat(t[4]):1;return i<1?`rgba(${n},${r},${o},${i})`:"#"+[n,r,o].map(a=>a.toString(16).padStart(2,"0")).join("")}function Hh(e){let t=e.split(",").map(o=>o.trim().replace(/^["']|["']$/g,"")),n=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","-apple-system","BlinkMacSystemFont"]);return t.find(o=>!n.has(o))||""}function Uh(e,t){let n=Vh(e,t),r=e/n,o=t/n;return r>20||o>20?`${(e/t).toFixed(2)}:1`:`${r}:${o}`}function Vh(e,t){for(;t;)[e,t]=[t,e%t];return e}window.__MINDSTUDIO_BROWSER_AGENT__||(window.__MINDSTUDIO_BROWSER_AGENT__={takeSnapshot:je,takeSnapshotSync:Ut,getRefMap:qe,executeSteps:At,resolveElement:Re,computeStyleMap:jl,capturePageImage:Qn,hideCursor:tn,restoreCursor:nn},si(),fi(),pi(),mi(),gi(),hi(),Ya(),kl(),Tl(),Xi(),Fi(),Ll(),Al(),Hl(),window.parent!==window&&window.parent.postMessage({channel:"mindstudio-browser-agent",command:"ready"},"*"));return pc(zh);})();
|
|
171
171
|
/*! Bundled license information:
|
|
172
172
|
|
|
173
173
|
rrweb/es/rrweb/ext/tslib/tslib.es6.js:
|