A lightweight design agent built with libfx. Describe a page and an agent writes it as one HTML file.
TypeScript
// Generated by scripts/vendor-fast-html-to-image.mjs from fast-snap 2e119bc. Do not edit.
// fast-html-to-image (patched fork), browser IIFE exposing the global FastHtmlToImage.
//
// MIT License
//
// Copyright (c) 2025 Aiden Bai
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
export const FAST_HTML_TO_IMAGE = "var FastHtmlToImage=(()=>{var ft=Object.defineProperty;var Do=Object.getOwnPropertyDescriptor;var $o=Object.getOwnPropertyNames;var Uo=Object.prototype.hasOwnProperty;var Vo=(e,t)=>{for(var r in t)ft(e,r,{get:t[r],enumerable:!0})},Wo=(e,t,r,n)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let o of $o(t))!Uo.call(e,o)&&o!==r&&ft(e,o,{get:()=>t[o],enumerable:!(n=Do(t,o))||n.enumerable});return e};var Ko=e=>Wo(ft({},\"__esModule\",{value:!0}),e);var na={};Vo(na,{captureNode:()=>st,captureRegion:()=>Io,enableIframeBridge:()=>Lo,lastCaptureTimings:()=>Y,prewarm:()=>_o});var X=\"http://www.w3.org/2000/svg\",We=\"http://www.w3.org/1999/xhtml\",pt=\"http://www.w3.org/1999/xlink\",sr=new Set([\"matrix(0, 0, 0, 1, 0, 0)\",\"matrix(0, 0, 0, 0, 0, 0)\",\"scaleX(0)\",\"scale(0)\",\"scaleY(0)\"]),cr=new Set([\"absolute\",\"fixed\"]),ur=new Set([\"relative\",\"absolute\",\"fixed\",\"sticky\"]),mt=new Set([\"width\",\"height\",\"font-size\",\"inline-size\",\"block-size\",\"transform-origin\",\"perspective-origin\",\"box-sizing\",\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]),ht=new Set([\"border-top-width\",\"border-right-width\",\"border-bottom-width\",\"border-left-width\"]),gt=[\"width\",\"height\",\"inline-size\",\"block-size\"],dr=new Set([\"table\",\"thead\",\"tbody\",\"tfoot\",\"tr\",\"td\",\"th\",\"colgroup\",\"col\"]),bt=new Set([\"table\",\"td\",\"th\"]),Ke=new Set([\"defs\",\"symbol\",\"pattern\",\"mask\",\"clipPath\",\"marker\",\"linearGradient\",\"radialGradient\",\"filter\"]),fr=[\"fill\",\"fill-opacity\",\"fill-rule\",\"stroke\",\"stroke-opacity\",\"stroke-width\",\"stroke-linecap\",\"stroke-linejoin\",\"stroke-miterlimit\",\"stroke-dasharray\",\"stroke-dashoffset\",\"color\",\"opacity\"],ze=[\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-block-start-color\",\"border-block-end-color\",\"border-inline-start-color\",\"border-inline-end-color\",\"text-decoration-color\",\"text-emphasis-color\",\"outline-color\",\"column-rule-color\",\"-webkit-text-fill-color\",\"-webkit-text-stroke-color\"],pr=[\"fill\",\"stroke\",\"filter\",\"clip-path\",\"mask\",\"mask-image\",\"marker-start\",\"marker-mid\",\"marker-end\"],mr=new Set([\"color\",\"content\",\"direction\",\"unicode-bidi\",\"white-space\",\"text-combine-upright\"]),hr=[\"font\",\"color\",\"background\",\"margin\",\"padding\",\"border\",\"float\",\"vertical-align\",\"line-height\",\"letter-spacing\",\"word-spacing\",\"text-transform\",\"text-decoration\",\"text-shadow\",\"box-shadow\",\"opacity\",\"-webkit-text\",\"initial-letter\"],yt=[\"-webkit-text-stroke-color\",\"-webkit-text-stroke-width\",\"-webkit-text-fill-color\"],gr=new Set([\"offset\",\"computedOffset\",\"easing\",\"composite\"]),br=\"display.position.top.right.bottom.left.float.clear.box-sizing.width.height.inline-size.block-size.min-width.margin-top.margin-right.margin-bottom.margin-left.padding-top.padding-right.padding-bottom.padding-left.overflow-x.overflow-y.vertical-align.border-top-width.border-right-width.border-bottom-width.border-left-width.border-top-style.border-right-style.border-bottom-style.border-left-style.border-top-color.border-right-color.border-bottom-color.border-left-color.border-top-left-radius.border-top-right-radius.border-bottom-right-radius.border-bottom-left-radius.outline-color.outline-style.outline-width.outline-offset.color.background-color.transform.transform-origin.rotate.scale.perspective.perspective-origin.object-fit.object-position.appearance.color-scheme.content.font-family.font-size.font-weight.font-style.line-height.white-space.white-space-collapse.text-wrap-mode.text-align.text-transform.text-decoration-line.text-decoration-color.text-decoration-style.text-decoration-thickness.direction.unicode-bidi.writing-mode.text-orientation.list-style-type.border-spacing.table-layout.content-visibility\".split(\".\"),St=[\"width\",\"height\",\"inline-size\",\"block-size\",\"top\",\"right\",\"bottom\",\"left\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"transform\",\"transform-origin\",\"perspective-origin\",\"grid-template-columns\",\"grid-template-rows\"],He=[\"top\",\"right\",\"bottom\",\"left\"],pe=new Set([\"background-color\",\"background-image\",\"background-position-x\",\"background-position-y\",\"background-size\",\"background-repeat\",\"background-attachment\",\"background-origin\",\"background-clip\",\"border-top-color\",\"border-right-color\",\"border-bottom-color\",\"border-left-color\",\"border-top-style\",\"border-right-style\",\"border-bottom-style\",\"border-left-style\",\"border-top-left-radius\",\"border-top-right-radius\",\"border-bottom-right-radius\",\"border-bottom-left-radius\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"]),Ce=new Set([...He,\"transform\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\"]),yr=/%|calc\\(|var\\(|min\\(|max\\(|clamp\\(/,Sr=/[\"'\\\\]|url\\(|var\\(|\\/\\*|[\\u0000-\\u0008\\u000b\\u000e-\\u001f]/i,wt=/^(0|-?\\d*\\.?\\d+(px|em|rem|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax))( (0|-?\\d*\\.?\\d+(px|em|rem|ch|ex|pt|pc|cm|mm|in|vw|vh|vmin|vmax)))*$/,xt=new Set([\"input\",\"select\",\"textarea\",\"button\",\"option\",\"optgroup\",\"progress\",\"meter\",\"details\",\"summary\",\"dialog\",\"video\",\"audio\"]),wr=\"class.lang.dir.hidden.href.type.contenteditable.slot.part.width.height.align.valign.bgcolor.background.border.color.face.size.nowrap.cellspacing.cellpadding.hspace.vspace.char.charoff.frame.rules.start.value.reversed.colspan.rowspan.span.clear\".split(\".\"),xr=/\\[\\s*(?:[\\w-]+\\|)?([\\w-]+)/g,Er=new Set([\"cursor\",\"pointer-events\",\"touch-action\",\"user-select\",\"-webkit-user-select\",\"-webkit-user-drag\",\"-webkit-tap-highlight-color\",\"will-change\",\"caret-color\",\"-webkit-locale\",\"speak\",\"page\",\"app-region\",\"d\"]),Ar=new Set([\"script\",\"style\",\"link\",\"meta\",\"noscript\",\"template\",\"title\",\"base\",\"head\",\"slot\"]),Cr=new Set([\"img\",\"video\",\"canvas\",\"iframe\",\"textarea\"]),Rr=new Set([\"img\",\"video\",\"canvas\",\"iframe\",\"embed\",\"object\",\"input\",\"select\",\"textarea\",\"audio\",\"progress\",\"meter\",\"svg\"]),kr=new Set([\"serif\",\"sans-serif\",\"monospace\",\"cursive\",\"fantasy\",\"system-ui\",\"ui-serif\",\"ui-sans-serif\",\"ui-monospace\",\"ui-rounded\",\"emoji\",\"math\",\"fangsong\"]),Tr=new Set(\"color.-webkit-text-fill-color.-webkit-text-stroke-color.direction.visibility.line-height.letter-spacing.word-spacing.white-space.white-space-collapse.word-break.overflow-wrap.text-align.text-align-last.text-indent.text-transform.text-shadow.text-rendering.text-wrap.text-wrap-mode.text-wrap-style.tab-size.hyphens.quotes.border-collapse.border-spacing.caption-side.empty-cells.color-scheme.accent-color.writing-mode.text-orientation.paint-order.image-rendering.color-interpolation.fill.fill-opacity.fill-rule.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width\".split(\".\"));var me=(e,t)=>({a:e.a*t.a+e.c*t.b,b:e.b*t.a+e.d*t.b,c:e.a*t.c+e.c*t.d,d:e.b*t.c+e.d*t.d}),Pr={deg:Math.PI/180,grad:Math.PI/200,rad:1,turn:2*Math.PI},zo=e=>{for(let t in Pr){if(!e.endsWith(t))continue;let r=Number.parseFloat(e.slice(0,-t.length));return Number.isFinite(r)?r*Pr[t]:null}return null},Ho=e=>{if(e.length===0)return[0,0,1];if(e.length===1)return e[0]===\"x\"?[1,0,0]:e[0]===\"y\"?[0,1,0]:e[0]===\"z\"?[0,0,1]:null;if(e.length!==3)return null;let t=e.map(r=>Number.parseFloat(r));return t.some(r=>!Number.isFinite(r))?null:[t[0],t[1],t[2]]},Go=e=>{if(!e||e===\"none\")return null;let t=e.trim().split(/\\s+/),r=zo(t[t.length-1]);if(r===null)return null;let n=Ho(t.slice(0,-1));if(!n)return null;let o=Math.hypot(n[0],n[1],n[2]);if(o===0)return null;let[l,i,a]=n.map(u=>u/o),s=Math.cos(r),d=Math.sin(r),c=1-s;return{a:s+l*l*c,b:i*l*c+a*d,c:l*i*c-a*d,d:s+i*i*c}},Yo=e=>{if(!e||e===\"none\")return null;let t=e.trim().split(/\\s+/).map(r=>Number.parseFloat(r));return t.length<1||t.length>3||t.some(r=>!Number.isFinite(r))?null:{a:t[0],b:0,c:0,d:t.length>=2?t[1]:t[0]}},qo=(e,t)=>e.slice(t+1,e.lastIndexOf(\")\")).split(\",\").map(r=>Number.parseFloat(r)),Xo=e=>{if(!e||e===\"none\")return null;let t=e.indexOf(\"(\");if(t===-1||!e.endsWith(\")\"))return null;let r=e.slice(0,t).trim(),n=qo(e,t);if(n.some(o=>!Number.isFinite(o)))return null;if(r===\"matrix\"&&n.length===6){let[o,l,i,a]=n;return{a:o,b:l,c:i,d:a}}return r===\"matrix3d\"&&n.length===16?{a:n[0],b:n[1],c:n[4],d:n[5]}:null},jo={a:1,b:0,c:0,d:1},Re=e=>{let t=Xo(e.transform)??jo,r=Yo(e.scale);r&&(t=me(r,t));let n=Go(e.rotate);return n&&(t=me(n,t)),t},v=e=>{if(e===void 0)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0},At=e=>{let t=e.match(/-?\\d+(?:\\.\\d+)?px/g);return t?t.map(r=>Number.parseFloat(r)):[]},ke=e=>{if(!e||e===\"none\")return 0;let t=0,r=/([a-z-]+)\\(([^()]*(?:\\([^()]*\\)[^()]*)*)\\)/g,n=r.exec(e);for(;n;){let[,o,l]=n;if(o===\"blur\")t=Math.max(t,v(l)*3);else if(o===\"drop-shadow\"){let[i=0,a=0,s=0]=At(l);t=Math.max(t,Math.max(Math.abs(i),Math.abs(a))+s*1.5)}n=r.exec(e)}return t},Nr=e=>{let t=e.a*e.d-e.b*e.c;return t===0?null:{a:e.d/t,b:-e.b/t,c:-e.c/t,d:e.a/t}},Ge=e=>Math.abs(e.a-1)<1e-4&&Math.abs(e.b)<1e-4&&Math.abs(e.c)<1e-4&&Math.abs(e.d-1)<1e-4;var vr=(e,t,r,n)=>{let o=1/0,l=1/0,i=-1/0,a=-1/0;e.forEach((f,p)=>{let b=t[p],m=r.get(f)?.styles[\"backdrop-filter\"]??\"\",g=Math.ceil(ke(m));o=Math.min(o,b.left-n.left-g),l=Math.min(l,b.top-n.top-g),i=Math.max(i,b.right-n.left+g),a=Math.max(a,b.bottom-n.top+g)});let s=Math.max(0,Math.floor(o)),d=Math.max(0,Math.floor(l)),c=Math.min(Math.ceil(n.width),Math.ceil(i)),u=Math.min(Math.ceil(n.height),Math.ceil(a));return{x:s,y:d,width:Math.max(1,c-s),height:Math.max(1,u-d)}},Ir=(e,t)=>{let r=[];for(let[n,o]of e){if(n===t)continue;let l=o.styles[\"backdrop-filter\"];l&&l!==\"none\"&&r.push(n)}return r},Zo={a:1,b:0,c:0,d:1},Qo=(e,t,r)=>{let n=Zo,o=e;for(;o;){let l=r.get(o);if(l&&(n=me(Re({transform:l.styles.transform,rotate:l.styles.rotate,scale:l.styles.scale}),n)),o===t)break;o=o.parentElement}return n},Jo=(e,t,r,n,o,l,i)=>{let{underlayCanvas:a,ownerDocument:s,pixelRatio:d,backgroundColor:c,underlayOffsetLeftPx:u,underlayOffsetTopPx:f}=e,p=n+2*l,b=o+2*l,m=s.createElement(\"canvas\");m.width=Math.max(1,Math.round(p*d)),m.height=Math.max(1,Math.round(b*d));let g=m.getContext(\"2d\");if(!g)return null;c&&(g.fillStyle=c,g.fillRect(0,0,m.width,m.height)),g.drawImage(a,(t-u-l)*d,(r-f-l)*d,m.width,m.height,0,0,m.width,m.height);let x=s.createElement(\"canvas\");x.width=Math.max(1,Math.round(n*d)),x.height=Math.max(1,Math.round(o*d));let A=x.getContext(\"2d\");return A?(A.scale(d,d),A.filter=i,A.drawImage(m,-l,-l,p,b),x):null},el=(e,t,r,n,o,l,i)=>{let{ownerDocument:a,pixelRatio:s}=e,d=a.createElement(\"canvas\");d.width=Math.max(1,Math.round(o*s)),d.height=Math.max(1,Math.round(l*s));let c=d.getContext(\"2d\");return c?(c.scale(s,s),c.translate(o/2,l/2),c.transform(i.a,i.b,i.c,i.d,0,0),c.drawImage(t,-r/2,-n/2,r,n),d):null},tl=(e,t,r,n,o,l,i,a)=>{let s=e.underlayCanvas.getContext(\"2d\");s&&(s.save(),s.setTransform(e.pixelRatio,0,0,e.pixelRatio,0,0),s.translate(r-e.underlayOffsetLeftPx,n-e.underlayOffsetTopPx),s.transform(i.a,i.b,i.c,i.d,0,0),s.translate(-o/2,-l/2),s.drawImage(t,0,0,o,l),a&&a!==\"rgba(0, 0, 0, 0)\"&&a!==\"transparent\"&&(s.fillStyle=a,s.fillRect(0,0,o,l)),s.restore())},_r=e=>{let t=new Map,r=e.rootElement.getBoundingClientRect();for(let n of e.backdropFilterElements){let o=e.snapshotByElement.get(n),l=o?.styles[\"backdrop-filter\"];if(!l||l===\"none\")continue;let i=n.getBoundingClientRect(),a=Math.round(i.width),s=Math.round(i.height);if(a<=0||s<=0)continue;let d=Qo(n,e.rootElement,e.snapshotByElement),c=Jo(e,i.left-r.left,i.top-r.top,a,s,Math.ceil(ke(l)),l);if(!c)continue;let u=c,f=a,p=s;if(!Ge(d)){let b=Nr(d);if(!b)continue;let m=n instanceof HTMLElement?n.offsetWidth:0,g=n instanceof HTMLElement?n.offsetHeight:0;if(m<=0||g<=0)continue;let x=el(e,c,a,s,m,g,b);if(!x)continue;u=x,f=m,p=g}tl(e,u,i.left-r.left+i.width/2,i.top-r.top+i.height/2,f,p,d,o?.styles[\"background-color\"]);try{t.set(n,u.toDataURL())}catch{continue}}return t},ie=e=>{let t=[],r=0,n=0;for(let o=0;o<e.length;o+=1){let l=e[o];l===\"(\"?r+=1:l===\")\"?--r:l===\",\"&&r===0&&(t.push(e.slice(n,o)),n=o+1)}return t.push(e.slice(n)),t},Mr={\"background-size\":\"100% 100%\",\"background-position\":\"0% 0%\",\"background-repeat\":\"no-repeat\",\"background-origin\":\"border-box\",\"background-clip\":\"border-box\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\"},Br={\"background-size\":\"auto\",\"background-position\":\"0% 0%\",\"background-repeat\":\"repeat\",\"background-origin\":\"padding-box\",\"background-clip\":\"border-box\",\"background-attachment\":\"scroll\",\"background-blend-mode\":\"normal\"},Lr=(e,t,r)=>{delete e[\"backdrop-filter\"];let n=t[\"background-image\"]??\"none\",o=n===\"none\"?[]:ie(n).map(s=>s.trim()),l=t[\"background-color\"],i=!!l&&l!==\"rgba(0, 0, 0, 0)\"&&l!==\"transparent\",a=[...o];i&&a.push(`linear-gradient(${l}, ${l})`),a.push(`url(\"${r}\")`),e[\"background-image\"]=a.join(\", \"),e[\"background-color\"]=\"transparent\";for(let s in Br){let d=Br[s],c=t[s],u=c?ie(c).map(p=>p.trim()):[d],f=o.map((p,b)=>u[b%u.length]??d);i&&f.push(s===\"background-clip\"?u[u.length-1]??d:Mr[s]),f.push(Mr[s]),e[s]=f.join(\", \")}};var ee=e=>e.type===CSSRule.STYLE_RULE,Ye=e=>\"cssRules\"in e,Te=e=>e.type===CSSRule.IMPORT_RULE,te=(e,t)=>{try{return new URL(e,t??void 0).href}catch{return e}},G=(e,t,r)=>{let n=(o,l)=>{for(let i of o){if(t(i,l))return!0;if(Te(i))try{let a=i.styleSheet;if(a&&n(a.cssRules,a.href??l))return!0}catch{if(r(te(i.href,l)))return!0}else if(Ye(i)&&n(i.cssRules,l))return!0}return!1};for(let o of[...e.styleSheets,...e.adoptedStyleSheets])try{if(n(o.cssRules,o.href??e.baseURI))return}catch{if(r(o.href??null))return}};var Fr=new WeakMap,rl=\"(prefers-color-scheme: dark)\",nl=e=>{let t=new Map;return()=>{let r=new Set([rl]),n=0;for(let a of[...e.styleSheets,...e.adoptedStyleSheets])r.add(a.media.mediaText);G(e,a=>(n++,(a.type===CSSRule.MEDIA_RULE||Te(a))&&r.add(a.media.mediaText),!1),()=>!1);let o=e.defaultView;if(!o)return{mediaSignature:\"\",cssRuleCount:n};let l=new Map,i=[];for(let a of r){let s=t.get(a)??o.matchMedia(a);l.set(a,s),i.push([a,s.matches])}return t=l,{mediaSignature:JSON.stringify(i),cssRuleCount:n}}},qe=e=>{let t=e;for(;t!==null;){if(t.nodeType===Node.ELEMENT_NODE&&t.hasAttribute(\"data-fhti-epoch-ignored\"))return!0;t=t.parentNode}return!1},Ct=e=>{if(e.nodeType!==Node.ELEMENT_NODE)return!1;let t=e.localName;return t===\"style\"||t===\"link\"},ol=e=>{let t=e.target;for(;t!==null;){if(Ct(t))return!0;t=t.parentNode}if(e.type===\"childList\"){for(let r of e.addedNodes)if(Ct(r))return!0;for(let r of e.removedNodes)if(Ct(r))return!0}return!1},ll=e=>{if(e.type===\"childList\"){for(let t of e.addedNodes)if(!qe(t))return!0;for(let t of e.removedNodes)if(!qe(t))return!0;return!1}return!qe(e.target)},il=e=>{let t=nl(e),r={epoch:0,styleEpoch:0,attributeGeneration:0,...t()},n=new WeakMap,o=()=>{r.epoch++},l=c=>{c.target instanceof Node&&qe(c.target)||r.epoch++},i=c=>{c.some(ll)&&r.epoch++,c.some(ol)&&r.styleEpoch++;let u=!1;for(let f of c)f.type!==\"attributes\"||f.target.nodeType!==Node.ELEMENT_NODE||(u||=(r.attributeGeneration++,!0),n.set(f.target,r.attributeGeneration))},a=new MutationObserver(i);a.observe(e.documentElement,{subtree:!0,childList:!0,attributes:!0,characterData:!0});let s={capture:!0,passive:!0};for(let c of[\"scroll\",\"input\",\"change\",\"load\",\"error\",\"toggle\"])e.addEventListener(c,l,s);let d=e.defaultView;if(d)for(let c of[\"resize\",\"hashchange\",\"popstate\"])d.addEventListener(c,o,s);return e.fonts.addEventListener(\"loadingdone\",o),{readState:()=>{i(a.takeRecords());let c=t();return c.mediaSignature!==r.mediaSignature&&(r.mediaSignature=c.mediaSignature,r.epoch++,r.styleEpoch++),r.cssRuleCount=c.cssRuleCount,{...r}},attributeGenerationByElement:n}},Or=e=>{let t=Fr.get(e);return t===void 0&&(t=il(e),Fr.set(e,t)),t},he=e=>Or(e).readState(),Xe=e=>he(e).epoch,Dr=e=>Or(e).attributeGenerationByElement;var $r=new WeakMap,Pe=new WeakMap,Ur=e=>{let t=Pe.get(e);if(!t)return!1;let r=Xe(e.ownerDocument);return t.epoch===r&&t.captureCount>=1&&t.unpromotableEpoch!==r},Vr=e=>{let t=Xe(e.ownerDocument),r=Pe.get(e);if(r&&r.epoch===t){r.captureCount++;return}Pe.set(e,{epoch:t,captureCount:1,unpromotableEpoch:r?.unpromotableEpoch??-1})},Wr=e=>{let t=Xe(e.ownerDocument),r=Pe.get(e);if(r){r.unpromotableEpoch=t;return}Pe.set(e,{epoch:t,captureCount:0,unpromotableEpoch:t})},al=/:(?:hover|active|focus|target)/,Rt=e=>{if(e.filterNode||e.resolveIframeContent||e.prunedElements)return null;let t=e.clip;return`${e.scale}|${e.pixelRatio}|${e.backgroundColor??\"\"}|${e.embedFonts}|${e.bleed}|${e.timeoutMs}|`+(t?`${t.x},${t.y},${t.width},${t.height}`:\"\")},sl=e=>{let t=!1;return G(e,r=>ee(r)&&al.test(r.selectorText)?(t=!0,!0):!1,()=>(t=!0,!0)),t},Kr=e=>typeof e.getAnimations!=\"function\"||e.getAnimations().length>0,cl=e=>e.localName===\"input\"||e.localName===\"textarea\"||e.localName===\"select\",zr=(e,t)=>{let r=e.ownerDocument,n=r.defaultView;if(!n||r.fonts.status!==\"loaded\"||Kr(r)||e.querySelector(\"canvas,video,iframe,object,embed,animate,animateTransform,animateMotion,set\")||sl(r))return null;let o=[],l=[],i=[],a=[],s=[],d=[];for(let[u,f]of t){if(u.shadowRoot)return null;o.push(u),l.push(f.scrollLeft),i.push(f.scrollTop),cl(u)&&(a.push(u),s.push(u.value),d.push(u instanceof HTMLInputElement?u.checked||u.indeterminate:!1))}let c=he(r);return{documentEpoch:c.epoch,cssRuleCount:c.cssRuleCount,activeElement:r.activeElement,windowScrollX:n.scrollX,windowScrollY:n.scrollY,viewportWidthPx:n.innerWidth,viewportHeightPx:n.innerHeight,devicePixelRatio:n.devicePixelRatio,scrollElements:o,scrollLefts:l,scrollTops:i,formElements:a,formValues:s,formCheckedStates:d}},Hr=(e,t)=>{let r=e.ownerDocument,n=r.defaultView;if(!n)return!1;let o=he(r);if(o.epoch!==t.documentEpoch||r.activeElement!==t.activeElement||r.fonts.status!==\"loaded\"||n.scrollX!==t.windowScrollX||n.scrollY!==t.windowScrollY||n.innerWidth!==t.viewportWidthPx||n.innerHeight!==t.viewportHeightPx||n.devicePixelRatio!==t.devicePixelRatio||Kr(r)||o.cssRuleCount!==t.cssRuleCount)return!1;let{scrollElements:l,scrollLefts:i,scrollTops:a}=t;for(let u=0;u<l.length;u++){let f=l[u];if(f.scrollLeft!==i[u]||f.scrollTop!==a[u])return!1}let{formElements:s,formValues:d,formCheckedStates:c}=t;for(let u=0;u<s.length;u++){let f=s[u],p=f instanceof HTMLInputElement?f.checked||f.indeterminate:!1;if(f.value!==d[u]||p!==c[u])return!1}return!0},Gr=(e,t,r,n)=>{r===null||!Hr(e,r)||$r.set(e,{...n,optionsKey:t,stamp:r})},kt=(e,t)=>{let r=$r.get(e);return!r||r.optionsKey!==t||!Hr(e,r.stamp)?null:r};var Yr=(e,t,r)=>{let n=e*.2,o=t*(2/13),l=(t-o)/2,i=e-2*n,a=`<svg xmlns='${X}' width='${e}' height='${t}'><rect width='${e}' height='${t}' rx='2' fill='${r}'/><rect x='${n}' y='${l}' width='${i}' height='${o}' rx='${Math.min(2,o/2)}' fill='#ffffff'/></svg>`;return`appearance:none;-webkit-appearance:none;border:none;background-color:transparent;background-image:url(\"data:image/svg+xml,${encodeURIComponent(a)}\");background-repeat:no-repeat;background-position:center;background-size:100% 100%;`},V=e=>e.nodeType===Node.ELEMENT_NODE,I=(e,t)=>e.localName===t&&e.namespaceURI===\"http://www.w3.org/1999/xhtml\",re=(e,t=!0)=>{let r=e.shadowRoot;if(r===null&&!t)return e.childNodes;let n=r?r.childNodes:e.childNodes,o=!1;for(let i=0;i<n.length;i+=1){let a=n[i];if(V(a)&&a.localName===\"slot\"){o=!0;break}}if(!o)return n;let l=[];for(let i of n)if(V(i)&&I(i,\"slot\")){if(i.ownerDocument.defaultView?.getComputedStyle(i)?.display===\"none\")continue;let a=i.assignedNodes({flatten:!0});a.length>0?l.push(...a):l.push(...i.childNodes)}else l.push(i);return l};var ul=RegExp(\"[\\\\u0000-\\\\u0008\\\\u000B\\\\u000C\\\\u000E-\\\\u001F\\\\uFFFE\\\\uFFFF]|[\\\\uD800-\\\\uDBFF](?![\\\\uDC00-\\\\uDFFF])|(?<![\\\\uD800-\\\\uDBFF])[\\\\uDC00-\\\\uDFFF]\",\"g\"),dl=/[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uFFFE\\uFFFF]/,fl=/[\\uD800-\\uDFFF]/,Z=e=>!dl.test(e)&&e.isWellFormed()?e:e.replace(ul,t=>fl.test(t)?\"\\uFFFD\":\"\"),Tt=/^[A-Za-z_][A-Za-z0-9_.-]*$/,pl=e=>e.namespaceURI===null?e.name!==\"xmlns\"&&Tt.test(e.name):(e.prefix===null||Tt.test(e.prefix))&&Tt.test(e.localName),qr=e=>{for(let t of[...e.attributes]){if(!pl(t)){e.removeAttributeNode(t);continue}let r=Z(t.value);r!==t.value&&(t.value=r)}},je=e=>{for(let t of e.querySelectorAll(\"script\"))t.remove();qr(e);for(let t of e.querySelectorAll(\"*\"))qr(t)};var ml=(e,t,r)=>{let n=[];for(let o of e.split(\",\")){let[l,i]=o.trim().split(/\\s+/);if(!l)continue;let a=1;i?.endsWith(\"x\")?a=Number.parseFloat(i):i?.endsWith(\"w\")&&(a=t>0?Number.parseFloat(i)/t:1),!Number.isFinite(a)||a<=0||n.push({url:l,density:a})}return n.length===0?null:(n.sort((o,l)=>o.density-l.density),(n.find(o=>o.density>=r)??n[n.length-1]).url)},ue=e=>e!==void 0&&e!==\"none\",hl=e=>ur.has(e.position??\"\")||ue(e.transform)||ue(e.filter)||ue(e[\"backdrop-filter\"])||ue(e.perspective),Xr=e=>(e.scrollLeft!==0||e.scrollTop!==0)&&(e.styles[\"overflow-x\"]!==void 0&&e.styles[\"overflow-x\"]!==\"visible\"||e.styles[\"overflow-y\"]!==void 0&&e.styles[\"overflow-y\"]!==\"visible\"),gl=(e,t)=>{let r=t.snapshotByElement.get(e);if(r)for(let[n,o]of t.snapshotByElement){if(n===e||o.styles.position!==\"fixed\")continue;let l=t.cloneByElement.get(n);if(!l||!l.parentNode)continue;let i=n.getBoundingClientRect(),a=null,s=null,d=o.parentElement;for(;d&&d!==e;){let f=t.snapshotByElement.get(d);if(!f)break;if(Xr(f)||hl(f.styles)){a=d,s=f;break}d=f.parentElement}let c,u;if(a&&s){let f=a.getBoundingClientRect(),p=s.styles;if(c=i.left-f.left-v(p[\"border-left-width\"]),u=i.top-f.top-v(p[\"border-top-width\"]),Xr(s)){let b=a.ownerDocument.defaultView?.getComputedStyle(a);c+=s.scrollLeft-v(b?.getPropertyValue(\"padding-left\")),u+=s.scrollTop-v(b?.getPropertyValue(\"padding-top\"))}}else{let f=e.getBoundingClientRect(),p=(r.styles.position??\"static\")!==\"static\";c=i.left-f.left-(p?v(r.styles[\"border-left-width\"]):0),u=i.top-f.top-(p?v(r.styles[\"border-top-width\"]):0)}l.setAttribute(\"style\",`${l.getAttribute(\"style\")??\"\"}position:absolute;top:${u}px;left:${c}px;right:auto;bottom:auto;margin:0;`)}},bl=(e,t)=>{let r=t.snapshotByElement.get(e);if(!r)return;let n=e.getBoundingClientRect(),o=r.styles,l=e.ownerDocument.defaultView?.getComputedStyle(e),i=n.left+v(o[\"border-left-width\"])+v(l?.getPropertyValue(\"padding-left\")),a=n.top+v(o[\"border-top-width\"])+v(l?.getPropertyValue(\"padding-top\")),s=(c,u)=>{let f=t.cloneByElement.get(c);if(!f||!f.parentNode)return;let p=c.getBoundingClientRect(),b=t.ownerDocument.createElement(\"div\"),m=[\"top\",\"right\",\"bottom\",\"left\"].map(k=>`border-${k}-width:${u.styles[`border-${k}-width`]??\"0px\"};border-${k}-style:${u.styles[`border-${k}-style`]??\"none\"};border-${k}-color:${u.styles[`border-${k}-color`]??\"currentcolor\"};`).join(\"\");b.setAttribute(\"style\",`visibility:hidden;box-sizing:border-box;display:${u.styles.display??\"block\"};${m}width:${p.width}px;height:${p.height}px;margin:${u.styles[\"margin-top\"]??\"0px\"} ${u.styles[\"margin-right\"]??\"0px\"} ${u.styles[\"margin-bottom\"]??\"0px\"} ${u.styles[\"margin-left\"]??\"0px\"};`),f.parentNode.insertBefore(b,f);let g=p.left-i+r.scrollLeft,x=p.top-a+r.scrollTop,A=c.closest(\"table\"),S=!!A&&c.ownerDocument.defaultView?.getComputedStyle(A).borderCollapse===\"collapse\",w=S?v(u.styles[\"border-top-width\"])/2:0,y=S?v(u.styles[\"border-bottom-width\"])/2:0,R=u.styles[\"box-sizing\"]===\"border-box\"?0:v(u.styles[\"padding-top\"])+v(u.styles[\"padding-bottom\"]),N=S?`height:${p.height-w-y-R}px;border-top-width:0px;border-bottom-width:0px;`:\"\";f.setAttribute(\"style\",`${f.getAttribute(\"style\")??\"\"}position:absolute;top:${x+w}px;left:${g}px;right:auto;bottom:auto;margin:0;${N}`)},d=c=>{for(let u of re(c)){if(!V(u))continue;let f=t.snapshotByElement.get(u);if(f&&!(f.scrollLeft!==0||f.scrollTop!==0)){if(f.styles.position===\"sticky\"){s(u,f);continue}d(u)}}};d(e)},yl=(e,t,r,n)=>{let o=n.createElement(\"div\");for(o.setAttribute(\"style\",`all:unset;display:inherit;flex-direction:inherit;flex-wrap:inherit;row-gap:inherit;column-gap:inherit;align-items:inherit;align-content:inherit;justify-content:inherit;justify-items:inherit;grid-template-columns:inherit;grid-template-rows:inherit;grid-template-areas:inherit;grid-auto-flow:inherit;grid-auto-columns:inherit;grid-auto-rows:inherit;transform:translate(${-t}px,${-r}px);will-change:transform;contain:layout;`);e.firstChild;)o.appendChild(e.firstChild);e.appendChild(o)},jr=e=>ue(e[\"background-image\"])||e[\"background-color\"]!==void 0&&e[\"background-color\"]!==\"transparent\"&&e[\"background-color\"]!==\"rgba(0, 0, 0, 0)\",Zr=e=>e!==void 0&&e.endsWith(\"px\")&&Number.parseFloat(e)||0,Sl=(e,t)=>{let r=t.styles[\"background-image\"],n=t.styles[\"background-attachment\"];if(!ue(r)||n===void 0)return;let o=Ze(r),l=Ze(n);if(o.length!==l.length)return;let i=l.some((u,f)=>o[f]!==\"none\"&&u===\"local\"),a=l.some((u,f)=>o[f]!==\"none\"&&u!==\"local\");if(!i||a)return;let s=Ze(t.styles[\"background-position-x\"]??\"0%\"),d=Ze(t.styles[\"background-position-y\"]??\"0%\");if(s.length!==o.length||d.length!==o.length)return;let c=(u,f)=>u.map((p,b)=>o[b]===\"none\"?p:`calc(${p} - ${f}px)`).join(\", \");e.style.setProperty(\"background-position-x\",c(s,t.scrollLeft),\"important\"),e.style.setProperty(\"background-position-y\",c(d,t.scrollTop),\"important\")},wl=(e,t,r,n,o)=>{let l=t.ownerDocument,i=l.body,a=i?n.snapshotByElement.get(i):void 0;if(!a||jr(r.styles)||!jr(a.styles))return;let s=a.styles,d=s[\"background-image\"]??\"none\",c=t.getBoundingClientRect(),u=ue(d)&&d.includes(\"gradient(\")&&!d.includes(\"url(\"),f=u?`${c.width}px ${c.height}px`:s[\"background-size\"]??\"auto\",p=l.createElement(\"div\");p.setAttribute(\"style\",`position:absolute;z-index:-1;left:0px;top:0px;width:${o.width}px;height:${o.height}px;pointer-events:none;background-color:${s[\"background-color\"]??\"transparent\"};background-image:${d};background-repeat:${s[\"background-repeat\"]??\"repeat\"};background-size:${f};background-position-x:${Zr(s[\"background-position-x\"])-o.x}px;background-position-y:${Zr(s[\"background-position-y\"])-o.y}px;`),e.insertBefore(p,e.firstChild);let b=n.cloneByElement.get(i);b&&b.style.setProperty(\"background\",\"none\",\"important\")},xl=(e,t)=>{let r=t.ownerDocument.createElement(\"div\"),n=e.ownerDocument.defaultView.getComputedStyle(e),o=\"display:inline-block;overflow:hidden;white-space:pre-wrap;box-sizing:content-box;\";for(let l of[\"top\",\"right\",\"bottom\",\"left\"])o+=`border-${l}-width:${n.getPropertyValue(`border-${l}-width`)};border-${l}-style:${n.getPropertyValue(`border-${l}-style`)};border-${l}-color:${n.getPropertyValue(`border-${l}-color`)};padding-${l}:${n.getPropertyValue(`padding-${l}`)};`;return r.setAttribute(\"style\",o),r},Ze=e=>ie(e).map(t=>t.trim()),Pt=/^[A-Za-z_][A-Za-z0-9_.-]*$/,en=new Set([\"class\",\"style\",\"srcset\",\"sizes\",\"loading\",\"slot\"]),El=new Set([\"input\",\"select\",\"option\",\"textarea\"]),Qe=new Map,Al=e=>{if(!e.hasAttributes())return!0;let t=e.attributes.length;if(t>2)return!1;let r=+!!e.hasAttribute(\"class\");return e.hasAttribute(\"style\")&&(r+=1),r===t},Qr=new Map,Cl=e=>{let t=Qr.get(e);return t===void 0&&(t=Pt.test(e),Qr.set(e,t)),t},tn=e=>e.namespaceURI===null?e.name!==\"xmlns\"&&Cl(e.name):(e.prefix===null||Pt.test(e.prefix))&&Pt.test(e.localName),Rl=e=>{let t=e.attributes;for(let r=t.length-1;r>=0;r--){let n=t[r];if(en.has(n.name)||!tn(n)){e.removeAttributeNode(n);continue}let o=Z(n.value);o!==n.value&&(n.value=o)}},Jr=(e,t)=>{let r=e.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&e.prefix===null?t.createElement(e.localName):t.createElementNS(e.namespaceURI,e.prefix===null?e.localName:`${e.prefix}:${e.localName}`),n=e.attributes;for(let o=0;o<n.length;o++){let l=n[o];en.has(l.name)||!tn(l)||r.setAttributeNS(l.namespaceURI,l.name,Z(l.value))}return r},kl=e=>e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Ke.has(e.localName),Tl=e=>{for(let t of fr)e.hasAttribute(t)&&e.removeAttribute(t)},Pl=e=>{let t=e.cloneNode(!1);if(!V(t))return null;let r=e.currentSrc||e.src;if(!r&&e.srcset){let n=ml(e.srcset,e.offsetWidth,e.ownerDocument.defaultView?.devicePixelRatio??1);n&&(r=te(n,e.baseURI))}return r&&t.setAttribute(\"src\",r),t},Nl=(e,t)=>{let r=t.createElement(\"img\");r.setAttribute(\"width\",String(e.width)),r.setAttribute(\"height\",String(e.height));try{r.setAttribute(\"src\",e.toDataURL())}catch{r.setAttribute(\"src\",\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\")}return r},Ml=(e,t,r)=>{let n=t.createElement(\"img\"),o=\"\";if(e.videoWidth>0&&e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){let l=t.createElement(\"canvas\");l.width=e.videoWidth,l.height=e.videoHeight;let i=l.getContext(\"2d\");if(i)try{i.drawImage(e,0,0),o=l.toDataURL()}catch{o=\"\"}n.setAttribute(\"width\",String(e.videoWidth)),n.setAttribute(\"height\",String(e.videoHeight)),l.width=0,l.height=0}return o||=e.poster||\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\",n.setAttribute(\"src\",o),n.setAttribute(\"style\",`object-fit:${r[\"object-fit\"]??\"contain\"};object-position:${r[\"object-position\"]??\"50% 50%\"};`),n},Bl=(e,t,r)=>{if(I(e,\"input\")){if(t.setAttribute(\"value\",e.value),e.checked?t.setAttribute(\"checked\",\"\"):t.removeAttribute(\"checked\"),e.type===\"checkbox\"&&e.indeterminate){let n=r[\"accent-color\"];t.setAttribute(\"style\",Yr(v(r.width),v(r.height),n&&n!==\"auto\"?n:\"rgb(0, 117, 255)\"))}}else I(e,\"option\")&&(e.selected?t.setAttribute(\"selected\",\"\"):t.removeAttribute(\"selected\"))},vl=(e,t)=>(e===void 0||e===\"visible\")&&(t===void 0||t===\"visible\"),Il=(e,t)=>{let r=t.ownerDocument.createElement(\"div\"),n=t.iframeContentByElement.get(e);if(n){r.style.overflow=\"hidden\",n.canvasBackgroundColor&&(r.style.backgroundColor=n.canvasBackgroundColor);let o=t.ownerDocument.createElement(\"img\");o.setAttribute(\"src\",n.pngDataUrl),o.setAttribute(\"style\",`display:block;width:${n.widthPx}px;height:${n.heightPx}px;`),r.appendChild(o)}else r.setAttribute(\"style\",\"background:#d9d9d9;\");return r},Ne=(e,t,r,n)=>{if(V(t)){let o=rn(t,r,n);o&&e.appendChild(o)}else t.nodeType===Node.TEXT_NODE&&e.appendChild(r.ownerDocument.createTextNode(Z(t.textContent??\"\")))},_l=(e,t)=>e.ownerDocument.compatMode===\"BackCompat\"&&[\"block\",\"list-item\",\"table-cell\",\"table-caption\",\"flow-root\",\"inline-block\"].includes(t.snapshotByElement.get(e)?.styles.display??\"\"),Ll=(e,t,r)=>{let n=[],o=!1,l=!1,i=()=>{if(n.length>0)if(o&&!l){let a=r.ownerDocument.createElement(\"span\");a.setAttribute(\"style\",\"display:block;line-height:0\"),e.appendChild(a);for(let s of n)Ne(a,s,r,!1)}else for(let a of n)Ne(e,a,r,!1);n=[],o=!1,l=!1};for(let a=t.firstChild;a!==null;a=a.nextSibling)if(V(a)){let s=r.snapshotByElement.get(a)?.styles.display;s===void 0||s===\"none\"?n.push(a):s.startsWith(\"inline\")?(o||=I(a,\"img\"),l||=!I(a,\"img\"),n.push(a)):(i(),Ne(e,a,r,!1))}else a.nodeType===Node.TEXT_NODE&&(n.push(a),l||=!/^\\s*$/.test(a.textContent??\"\"));i()},rn=(e,t,r=!1)=>{if(kl(e)){let m=e.cloneNode(!0);return V(m)?(je(m),m):null}let n=t.snapshotByElement.get(e);if(!n)return null;let o=e.namespaceURI===\"http://www.w3.org/1999/xhtml\"&&e.prefix===null,l=o?e.localName:\"\",i,a=!0,s=!1;if(l===\"iframe\"&&I(e,\"iframe\"))i=Il(e,t),a=!1;else if(l===\"canvas\"&&I(e,\"canvas\"))i=Nl(e,t.ownerDocument),a=!1;else if(l===\"video\"&&I(e,\"video\"))i=Ml(e,t.ownerDocument,n.styles),a=!1;else if(l===\"img\"&&I(e,\"img\"))i=Pl(e),i&&Rl(i),a=!1;else if(l===\"textarea\")i=n.scrollTop!==0||n.scrollLeft!==0?xl(e,t):Jr(e,t.ownerDocument),a=!1;else if(o&&!El.has(l)&&Al(e)){let m=t.classNameByElement.get(e)??\"\",g=t.inlineCarryTextByElement.get(e)??\"\";if(m===\"\"&&g===\"\")i=t.ownerDocument.createElement(e.localName);else{let x=`${e.localName}|${m}|${g}`,A=Qe.get(x);A===void 0&&(A=t.ownerDocument.createElement(e.localName),m!==\"\"&&A.setAttribute(\"class\",m),g!==\"\"&&A.setAttribute(\"style\",g),Qe.size>=4096&&Qe.clear(),Qe.set(x,A));let S=A.cloneNode(!1);i=V(S)?S:null,s=!0}}else i=Jr(e,t.ownerDocument);if(!i)return null;t.prunedElements?.has(e)&&(a=!1),(l===\"input\"||l===\"option\")&&Bl(e,i,n.styles);let d=s?void 0:t.inlineCarryTextByElement.get(e);if(d!==void 0){let m=i.getAttribute(\"style\");i.setAttribute(\"style\",m?d+m:d)}let c=s?void 0:t.classNameByElement.get(e);if(c&&(o?i.className=c:(i.setAttribute(\"class\",c),e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Tl(i))),l===\"textarea\"&&I(e,\"textarea\")&&(i.textContent=Z(e.value)),t.cloneByElement.set(e,i),a){let m=r||!!e.shadowRoot,g=e.firstChild;if(!m&&g!==null&&g===e.lastChild&&g.nodeType===Node.TEXT_NODE)i.textContent=Z(g.textContent??\"\");else if(m)for(let x of re(e,m))Ne(i,x,t,m);else if(_l(e,t))Ll(i,e,t);else for(let x=e.firstChild;x!==null;x=x.nextSibling)Ne(i,x,t,!1)}let u=t.viewportScroll&&e===e.ownerDocument.documentElement?t.viewportScroll:null,f=u?u.x:n.scrollLeft,p=u?u.y:n.scrollTop,b=(f!==0||p!==0)&&(u!==null||!vl(n.styles[\"overflow-x\"],n.styles[\"overflow-y\"]));return b&&(yl(i,f,p,t.ownerDocument),bl(e,t)),u?wl(i,e,n,t,u):b&&Sl(i,n),i},nn=(e,t)=>{let r=rn(e,t);return r&&gl(e,t),r};var ne=e=>{let t=new Map;return{get:r=>t.get(r),set:(r,n)=>{if(!t.has(r)&&t.size>=e){let o=t.keys().next().value;o!==void 0&&t.delete(o)}t.set(r,n)},delete:r=>{t.delete(r)}}},on=new Map,ge=e=>{let t=on.get(e);if(t!==void 0)return t;let r=e.startsWith(\"--\")||e.includes(\"animation\")||e.includes(\"transition\")||e.startsWith(\"view-timeline\")||e.startsWith(\"scroll-timeline\")||Er.has(e);return on.set(e,r),r},Fl=new Set([\"width\",\"height\",\"inline-size\",\"block-size\",\"min-width\",\"min-height\",\"max-width\",\"max-height\",\"min-inline-size\",\"min-block-size\",\"max-inline-size\",\"max-block-size\",\"margin-top\",\"margin-right\",\"margin-bottom\",\"margin-left\",\"margin-block-start\",\"margin-block-end\",\"margin-inline-start\",\"margin-inline-end\",\"padding-top\",\"padding-right\",\"padding-bottom\",\"padding-left\",\"padding-block-start\",\"padding-block-end\",\"padding-inline-start\",\"padding-inline-end\",\"top\",\"right\",\"bottom\",\"left\",\"inset-block-start\",\"inset-block-end\",\"inset-inline-start\",\"inset-inline-end\"]),de=(e,t)=>{if(!Fl.has(e)||t===void 0||!t.endsWith(\"px\"))return t;let r=Number.parseFloat(t);if(!Number.isFinite(r)||r===0)return t;let n=32*10**(Math.floor(Math.log10(Math.abs(r)))-5);if(!(n<.5))return t;let o=r*64,l=Math.round(o);return l!==o&&Math.abs(o-l)<=n?`${l/64}px`:t},Nt=[],J=(e,t,r=!1)=>{let n={};if(t)for(let o of t){let l=de(o,e.getPropertyValue(o));l!==\"\"&&(n[o]=l)}else if(r){if(!Nt.length)for(let o=0;o<e.length;o++){let l=e.item(o);ge(l)||Nt.push(l)}for(let o of Nt)n[o]=de(o,e.getPropertyValue(o))}else for(let o=0;o<e.length;o++){let l=e.item(o);ge(l)||(n[l]=de(l,e.getPropertyValue(l)))}for(let o of yt){if(n[o]!==void 0)continue;let l=de(o,e.getPropertyValue(o));l&&(n[o]=l)}return n},ln=new Map,Mt=(e,t)=>{let r=ln.get(t);if(r===void 0){r=[];for(let o=0;o<e.length;o++){let l=e.item(o);ge(l)||t(l)&&r.push(l)}ln.set(t,r)}let n={};for(let o of r)n[o]=e.getPropertyValue(o);for(let o of yt){if(n[o]!==void 0||!t(o))continue;let l=e.getPropertyValue(o);l&&(n[o]=l)}return n},an=ne(256),Ol=(e,t,r)=>{let n=e.namespaceURI===\"http://www.w3.org/2000/svg\"?\"svg|\":\"\",o=I(e,\"input\")?`|${e.type}`:\"\";return`${n}${e.localName}${o}|${t??\"\"}|${r??\"\"}`},cn=e=>{let t=null,r=()=>{if(!t){let n=e.createElement(\"iframe\");n.setAttribute(\"style\",\"position:absolute;left:-9999px;top:0;visibility:hidden;width:64px;height:64px;border:0;\"),n.setAttribute(\"aria-hidden\",\"true\"),n.setAttribute(\"data-fhti-epoch-ignored\",\"\"),(e.body??e.documentElement).appendChild(n),t=n}return t.contentDocument};return{getBaseline:(n,o,l)=>{let i=l[\"font-size\"],a=l.appearance===\"auto\"?l[\"color-scheme\"]:void 0,s=a&&a!==\"normal\"?a:\"\",d=Ol(n,o,s?`${i??\"\"}|color-scheme:${s}`:i),c=an.get(d);if(c)return c;let u=r(),f=u?.body,p=u?.defaultView;if(!u||!f||!p)return{};let b,m;if(n.namespaceURI===\"http://www.w3.org/2000/svg\"){let A=u.createElementNS(X,\"svg\");b=u.createElementNS(X,n.localName),A.appendChild(b),m=A}else b=u.createElement(n.localName),I(n,\"input\")&&b.setAttribute(\"type\",n.type),b.textContent=\" \",m=b;(i||s)&&b.setAttribute(\"style\",`${i?`font-size:${i};`:\"\"}${s?`color-scheme:${s};`:\"\"}`),f.appendChild(m);let g=[];for(let A in l)g.push(A);let x=J(p.getComputedStyle(b,o??void 0),g);return s&&(x[\"color-scheme\"]=\"normal\"),m.remove(),an.set(d,x),x},dispose:()=>{t?.remove(),t=null}}},Je=e=>Tr.has(e)||e.startsWith(\"font\")||e.startsWith(\"text-emphasis\")||e.startsWith(\"list-style\")||e.startsWith(\"-webkit-text\"),sn=new Set(ze.filter(e=>e.includes(\"border\"))),Me=({styles:e,baseline:t,parentStyles:r,parentEmittedStyles:n})=>{let o={},l=e.appearance===\"auto\";for(let s in e){let d=e[s];if(d!==void 0){if(d!==t[s]){o[s]=d;continue}mt.has(s)&&!(l&&ht.has(s))&&(o[s]=d)}}let i=e.color,a=l&&e[\"color-scheme\"]!==t[\"color-scheme\"];for(let s of ze){let d=e[s];if(d===void 0)continue;let c=l&&sn.has(s)&&d===t[s];(a&&sn.has(s)?c:d===i||c)?delete o[s]:o[s]=d}if(n&&r)for(let s in n){if(s in o||!Je(s))continue;let d=e[s];d!==void 0&&d!==r[s]&&(o[s]=d)}return o},Bt=(e,t,r,n)=>{let o=t.appearance===\"auto\";for(let l of n){let i=t[l];if(i===void 0){delete e[l];continue}if(i!==r[l]){e[l]=i;continue}mt.has(l)&&!(o&&ht.has(l))?e[l]=i:delete e[l]}},un=e=>e.every(t=>!Je(t)&&!ze.includes(t)&&t!==\"appearance\"&&t!==\"color\"&&t!==\"font-size\"),be=(e,t)=>{e[\"transform-origin\"]!==void 0&&(t.transform??\"none\")===\"none\"&&(t.rotate??\"none\")===\"none\"&&(t.scale??\"none\")===\"none\"&&delete e[\"transform-origin\"],e[\"perspective-origin\"]!==void 0&&(t.perspective??\"none\")===\"none\"&&delete e[\"perspective-origin\"],t[\"writing-mode\"]===\"horizontal-tb\"&&(e[\"inline-size\"]!==void 0&&e[\"inline-size\"]===e.width&&delete e[\"inline-size\"],e[\"block-size\"]!==void 0&&e[\"block-size\"]===e.height&&delete e[\"block-size\"])},dn=e=>e.startsWith(\"font\")||mr.has(e),fn=e=>dn(e)||e===\"line-height\",pn=(e,t)=>{if(!e)return null;let r=null;for(let n in e){if(!dn(n)&&n!==\"line-height\")continue;let o=e[n];o!==void 0&&o!==(n===\"content\"?\"normal\":t[n])&&(r??={},r[n]=o)}return r},ye=(e,t,r,n,o)=>{if(!n&&t.display===\"inline\")for(let a of gt)delete e[a];if(o!==null&&dr.has(o)){let a=e.width??t.width,s=o===\"table\"&&(t.float??\"none\")!==\"none\",d=bt.has(o)&&(t[\"writing-mode\"]??\"horizontal-tb\")!==\"horizontal-tb\"&&t.height!==void 0&&t.height!==\"auto\";for(let f of gt)s&&f===\"width\"||o===\"tr\"&&f===\"height\"||delete e[f];d&&(e.height=t.height);let c=t[\"min-width\"],u=c!==void 0&&c!==\"auto\"&&c!==\"0px\";bt.has(o)&&a&&!u&&(e[\"min-width\"]=a)}if(((t[\"column-count\"]??\"auto\")!==\"auto\"||(t[\"column-width\"]??\"auto\")!==\"auto\")&&e.height!==void 0&&!(parseFloat(t[\"min-height\"])>0)){let a=e.height;e[\"min-height\"]=a,delete e.height,e[\"block-size\"]===a&&delete e[\"block-size\"]}let l=r!==null&&r.includes(\"flex\"),i=r!==null&&r.includes(\"grid\");l&&(e[\"flex-grow\"]=\"0\",e[\"flex-shrink\"]=\"0\",e[\"flex-basis\"]=\"auto\"),(l||i)&&t[\"min-width\"]===\"auto\"&&(e[\"min-width\"]=\"0px\")},mn=(e,t)=>{if(e[\"margin-top\"]=\"0px\",e[\"margin-right\"]=\"0px\",e[\"margin-bottom\"]=\"0px\",e[\"margin-left\"]=\"0px\",e.right=\"auto\",e.bottom=\"auto\",delete e[\"margin-block-start\"],delete e[\"margin-block-end\"],delete e[\"margin-inline-start\"],delete e[\"margin-inline-end\"],delete e[\"inset-block-start\"],delete e[\"inset-block-end\"],delete e[\"inset-inline-start\"],delete e[\"inset-inline-end\"],t.contentOffsetLeftPx!==0||t.contentOffsetTopPx!==0)e.position=\"relative\",e.left=`${t.contentOffsetLeftPx}px`,e.top=`${t.contentOffsetTopPx}px`;else{e.top=\"auto\",e.left=\"auto\";let n=e.position;(n===\"fixed\"||n===\"absolute\"||n===\"sticky\")&&(e.position=\"relative\")}let r=t.rootLinearTransform;if(r){let{a:n,b:o,c:l,d:i}=r;e.transform=`matrix(${n}, ${o}, ${l}, ${i}, 0, 0)`,e[\"transform-origin\"]=\"0px 0px\"}else e.transform&&=\"none\";e.rotate&&=\"none\",e.scale&&=\"none\",e.translate&&=\"none\",e.float&&=\"none\",e.clear&&=\"none\",e[\"box-sizing\"]=\"border-box\",e.width=`${t.layoutWidthPx}px`,e.height=`${t.layoutHeightPx}px`,delete e[\"inline-size\"],delete e[\"block-size\"]};var Dl=e=>{if(typeof e.toBase64==\"function\")return e.toBase64();let t=\"\";for(let r=0;r<e.length;r+=32768)t+=String.fromCharCode(...e.subarray(r,r+32768));return btoa(t)},et=async e=>{let t=new Uint8Array(await e.arrayBuffer());return`data:${e.type||\"application/octet-stream\"};base64,${Dl(t)}`},$l=async(e,t)=>{let r=new AbortController,n=setTimeout(()=>r.abort(),t),o=setTimeout(()=>r.abort(),Math.min(t,Lt));try{let l=await fetch(e,{mode:\"cors\",cache:\"force-cache\",signal:r.signal});return clearTimeout(o),l.ok?await et(await l.blob()):null}catch{return null}finally{clearTimeout(n),clearTimeout(o)}},gn=ne(150),vt=new Map,Sn=0,wn=()=>Sn,oe=(e,t)=>{let r=gn.get(e);if(r!==void 0)return Promise.resolve(r);let n=`${t}:${e}`,o=vt.get(n);if(o)return o;let l=$l(e,t).then(i=>(vt.delete(n),i!==null&&(Sn++,gn.set(e,i)),i));return vt.set(n,l),l},It=e=>e.length>0&&!e.startsWith(\"data:\")&&!e.startsWith(\"#\")&&!e.startsWith(\"about:\"),_t=(e,t)=>{let r=e.matches(t)?[e]:[];return r.push(...e.querySelectorAll(t)),r},xn=e=>{let t=new Map;for(let o of _t(e,\"img\")){let l=o.getAttribute(\"src\");l&&l.length>=1024&&l.startsWith(\"data:\")&&(t.get(l)??t.set(l,[]).get(l)).push(o)}let r=\"\",n=0;for(let[o,l]of t){if(l.length<2)continue;let i=`fhti-img-${++n}`;r+=`img.${i}{content:url(\"${o.replace(/[\\\\\"]/g,a=>`\\\\${a}`)}\")}\n`;for(let a of l)a.classList.add(i),a.setAttribute(\"src\",\"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7\")}return r},En=async(e,t,r)=>{let n=[];for(let o of _t(e,\"img\")){let l=o.getAttribute(\"src\");!l||!It(l)||n.push(oe(l,r).then(i=>{o.setAttribute(\"src\",i??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\")}))}for(let o of _t(e,\"image\")){let l=o.getAttribute(\"href\")??o.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\");!l||!It(l)||n.push(oe(l,r).then(i=>{let a=i??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\";o.setAttribute(\"href\",a),o.hasAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\")&&o.setAttributeNS(pt,\"xlink:href\",a)}))}for(let o of t)for(let l of[o.baseStyles,o.beforeStyles,o.afterStyles,o.firstLetterStyles,o.markerStyles])if(l)for(let i in l){let a=l[i];a===void 0||!a.includes(\"url(\")||(o.cachedBlocks=null,n.push(Be(a,async s=>It(s)?await oe(s,r)??\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=\":s).then(s=>{l[i]=s})))}await Promise.allSettled(n)},bn=/url\\(\\s*[\"']?#([^\"')\\s]+)[\"']?\\s*\\)/g,Ul=e=>e.getAttribute(\"href\")??e.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\"),yn=(e,t)=>{e.id&&t.add(e.id);for(let r of e.querySelectorAll(\"[id]\"))t.add(r.id)},Vl=(e,t)=>{let r=e.matches(t)?[e]:[];return r.push(...e.querySelectorAll(t)),r},An=async({clone:e,rules:t,sourceDocument:r,timeoutMs:n})=>{let o=new Set;yn(e,o);let l=new Set,i=[],a=new Map,s=(m,g)=>{o.has(m)||l.has(m)||(l.add(m),i.push({fragmentId:m,lookupDocuments:g}))},d=(m,g,x)=>{for(let S of Vl(m,\"use\")){let w=Ul(S);if(w){if(w.startsWith(\"#\"))s(w.slice(1),g);else if(x&&w.includes(\"#\")){let[y,R]=w.split(\"#\");if(!R)continue;let N=te(y,r.baseURI),k=a.get(N)??[];k.push({fragmentId:R,useElement:S}),a.set(N,k)}}}let A=S=>{if(S.namespaceURI===\"http://www.w3.org/2000/svg\"){for(let w of S.attributes)if(w.value.includes(\"url(\"))for(let y of w.value.matchAll(bn))s(y[1],g)}};A(m);for(let S of m.querySelectorAll(\"*\"))A(S)},c=null,u=()=>{if(c)return c;let m=e.ownerDocument,g=m.createElementNS(X,\"svg\");return g.setAttribute(\"aria-hidden\",\"true\"),g.setAttribute(\"style\",\"position:absolute;width:0;height:0;overflow:hidden;\"),c=m.createElementNS(X,\"defs\"),g.appendChild(c),e.appendChild(g),c},f=()=>{for(;i.length>0;){let m=i.pop();if(!m)break;if(o.has(m.fragmentId))continue;let g=null;for(let A of m.lookupDocuments){let S=A.getElementById(m.fragmentId);if(S&&S.namespaceURI===\"http://www.w3.org/2000/svg\"){g=S;break}}if(!g)continue;let x=g.cloneNode(!0);V(x)&&(je(x),u().appendChild(x),yn(x,o),d(x,m.lookupDocuments,!1))}};d(e,[r],!0);for(let m of t){let g=[m.baseStyles,m.beforeStyles,m.afterStyles,m.firstLetterStyles];for(let x of g)if(x)for(let A of pr){let S=x[A];if(!(S===void 0||!S.includes(\"url(\")))for(let w of S.matchAll(bn))s(w[1],[r])}}f();let p=[...a],b=await Promise.all(p.map(([m])=>Ft(m,n)));for(let m=0;m<p.length;m++){let g=p[m][1],x=b[m];if(x===null)continue;let A=new DOMParser().parseFromString(x,\"image/svg+xml\");if(!A.querySelector(\"parsererror\")){for(let{fragmentId:S,useElement:w}of g)s(S,[A,r]),w.setAttribute(\"href\",`#${S}`),w.hasAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\")&&w.setAttributeNS(pt,\"xlink:href\",`#${S}`);f()}}},Cn=e=>{let t=new Image;return t.src=e,t.decode().then(()=>({widthPx:t.naturalWidth,heightPx:t.naturalHeight})).catch(()=>null)};var Wl=/\\/\\*[\\s\\S]*?\\*\\//g,Kl=e=>{let t=e.replace(Wl,\"\"),r=[],n=0;for(;n<t.length;){let o=t.indexOf(\"@font-face\",n);if(o===-1)break;let l=t.indexOf(\"{\",o);if(l===-1)break;let i=t.indexOf(\"}\",l);if(i===-1)break;r.push(`@font-face{${t.slice(l+1,i)}}`),n=i+1}return r},Lt=3e3,Ft=async(e,t)=>{let r=new AbortController,n=setTimeout(()=>r.abort(),t),o=setTimeout(()=>r.abort(),Math.min(t,Lt));try{let l=await fetch(e,{mode:\"cors\",cache:\"force-cache\",signal:r.signal});return clearTimeout(o),l.ok?await l.text():null}catch{return null}finally{clearTimeout(n),clearTimeout(o)}},Dt=e=>e.type===CSSRule.FONT_FACE_RULE,$t=e=>e?e.split(\",\").map(t=>t.trim().replace(/^[\"']|[\"']$/g,\"\").toLowerCase()).filter(t=>t.length>0&&!kr.has(t)):[],Tn=e=>{let t=e.trim().toLowerCase();return t===\"\"||t===\"auto\"||t===\"normal\"?\"normal\":t===\"italic\"?\"italic\":t===\"oblique\"||t.startsWith(\"oblique \")?\"oblique\":null},zl={normal:400,bold:700},Rn=e=>{let t=zl[e];if(t!==void 0)return t;let r=Number(e);return Number.isFinite(r)&&r>=1&&r<=1e3?r:null},Pn=e=>{let t=e.trim().toLowerCase();if(t===\"\"||t===\"auto\")return{minWeight:400,maxWeight:400};let r=t.split(/\\s+/);if(r.length>2)return null;let n=Rn(r[0]);if(n===null)return null;if(r.length===1)return{minWeight:n,maxWeight:n};let o=Rn(r[1]);return o===null?null:{minWeight:Math.min(n,o),maxWeight:Math.max(n,o)}},Hl=/url\\(\\s*(?:\"((?:\\\\.|[^\"\\\\])*)\"|'((?:\\\\.|[^'\\\\])*)'|([^'\"()\\s][^()]*?))\\s*\\)/g,Gl=e=>e.replace(/\\\\(.)/g,\"$1\"),Yl=e=>e.replace(/([\"\\\\])/g,\"\\\\$1\"),ql=e=>{let t=e[3];return t===void 0?Gl(e[1]??e[2]??\"\"):t},Be=async(e,t)=>{let r=[...e.matchAll(Hl)];if(r.length===0)return e;let n=await Promise.all(r.map(i=>t(ql(i)))),o=\"\",l=0;return r.forEach((i,a)=>{let s=i.index??0;o+=`${e.slice(l,s)}url(\"${Yl(n[a]??\"\")}\")`,l=s+i[0].length}),o+=e.slice(l),o},Xl={normal:[\"normal\",\"oblique\",\"italic\"],italic:[\"italic\",\"oblique\",\"normal\"],oblique:[\"oblique\",\"italic\",\"normal\"]},Ot=(e,t)=>t>=e.minWeight&&t<=e.maxWeight?0:t<e.minWeight?e.minWeight-t:t-e.maxWeight,kn=(e,t)=>e.minWeight>t,jl=(e,t,r)=>{let n=e.filter(c=>Ot(t[c],r)===0);if(n.length>0)return n;let o=e.filter(c=>!kn(t[c],r)),l=e.filter(c=>kn(t[c],r)),i=c=>{let u=1/0;for(let f of c)u=Math.min(u,Ot(t[f],r));return c.filter(f=>Ot(t[f],r)===u)},a=r>500,s=a?l:o,d=a?o:l;if(r>=400&&r<=500){let c=l.filter(u=>t[u].minWeight<=500);return c.length>0?i(c):o.length>0?i(o):i(l)}return s.length>0?i(s):i(d)},Zl=(e,t)=>{let r=new Set,n=e.map((o,l)=>l);for(let o of t){let l=[];for(let i of Xl[o.styleKeyword])if(l=n.filter(a=>e[a].styleKeyword===i),l.length>0)break;if(l.length!==0)for(let i of jl(l,e,o.weight))r.add(i)}return r},Ql=/font-family\\s*:\\s*([^;}]+)/i,Jl=/font-weight\\s*:\\s*([^;}]+)/i,ei=/font-style\\s*:\\s*([^;}]+)/i,ti=/font-stretch\\s*:\\s*([^;}]+)/i,ri=/unicode-range\\s*:\\s*([^;}]+)/i,ni=/font-variation-settings\\s*:/i,oi=e=>{let t=e.trim().toLowerCase();return t===\"\"||t===\"normal\"||t===\"auto\"},li=e=>{let t={ruleSources:[],inaccessibleSheetUrls:[]};return G(e,(r,n)=>(Dt(r)&&t.ruleSources.push({rule:r,baseUrl:n}),!1),r=>(r&&t.inaccessibleSheetUrls.push(r),!1)),t},ii=(e,t,r)=>Be(e,async n=>n.startsWith(\"data:\")?n:await oe(te(n,t),r)??n),Nn=(e,t,r,n,o,l,i,a)=>{let s=Pn(n),d=Tn(o);return{familyName:e,fontFaceCssText:t,baseUrl:r,weightRange:s,styleKeyword:d,unicodeRangeKey:i.trim().toLowerCase().replace(/\\s+/g,\"\"),isPrunable:s!==null&&d!==null&&oi(l)&&!a}},ai=async(e,t,r)=>{let n=await Ft(e,r);if(!n)return[];let o=[];for(let l of Kl(n)){let[i]=$t(Ql.exec(l)?.[1]);!i||!t.has(i)||/url\\(|local\\(/.test(l)&&o.push(Nn(i,l,e,Jl.exec(l)?.[1]??\"\",ei.exec(l)?.[1]??\"\",ti.exec(l)?.[1]??\"\",ri.exec(l)?.[1]??\"\",ni.test(l)))}return o},Mn=e=>{let t=new Set;for(let r of e)for(let n of[r.baseStyles,r.beforeStyles,r.afterStyles,r.firstLetterStyles,r.markerStyles])if(n)for(let o of $t(n[\"font-family\"]))t.add(o);return t},Bn=e=>{let t=new Set([400,700]),r=new Set([\"normal\",\"italic\"]);for(let o of e)for(let l of[o.baseStyles,o.beforeStyles,o.afterStyles,o.firstLetterStyles,o.markerStyles]){if(!l)continue;let i=l[\"font-weight\"];if(i!==void 0){let s=Pn(i);if(s===null||s.minWeight!==s.maxWeight)return null;t.add(s.minWeight)}let a=l[\"font-style\"];if(a!==void 0){let s=Tn(a);if(s===null)return null;r.add(s)}}let n=[];for(let o of t)for(let l of r)n.push({weight:o,styleKeyword:l});return n},si=(e,t)=>{if(t===null)return e;let r=new Set;for(let l of e)l.isPrunable||r.add(l.familyName);let n=new Map;e.forEach((l,i)=>{if(r.has(l.familyName))return;let a=`${l.familyName}\\0${l.unicodeRangeKey}`,s=n.get(a);s===void 0?n.set(a,[i]):s.push(i)});let o=new Set;for(let l of n.values()){let i=l.map(a=>{let s=e[a];return{minWeight:s.weightRange?.minWeight??400,maxWeight:s.weightRange?.maxWeight??400,styleKeyword:s.styleKeyword??\"normal\"}});for(let a of Zl(i,t))o.add(l[a])}return e.filter((l,i)=>r.has(l.familyName)||o.has(i))},vn=(e,t)=>{let r=e.textContent??\"\";for(let o of e.querySelectorAll(\"input, textarea\"))r+=(o.getAttribute(\"value\")??\"\")+(o.getAttribute(\"placeholder\")??\"\")+(o.value??\"\");for(let o of t)for(let l of[o.beforeStyles,o.afterStyles,o.markerStyles])l?.content&&(r+=l.content);let n=new Set;for(let o=32;o<127;o++)n.add(o);for(let o of[r,r.toUpperCase(),r.toLowerCase()])for(let l of o)n.add(l.codePointAt(0));return n},ci=e=>{let t=[];for(let r of e.split(\",\")){let n=/^\\s*u\\+([0-9a-f?]+)(?:-([0-9a-f]+))?\\s*$/i.exec(r);if(!n)continue;let o=parseInt(n[1].replace(/\\?/g,\"0\"),16),l=n[2]?parseInt(n[2],16):parseInt(n[1].replace(/\\?/g,\"f\"),16);t.push([o,l])}return t.length?t:null},ui=(e,t)=>{let r=ci(e);if(r===null)return!0;for(let n of t)for(let[o,l]of r)if(n>=o&&n<=l)return!0;return!1},In=async(e,t,r,n=null,o=null)=>{if(e.size===0)return\"\";let{ruleSources:l,inaccessibleSheetUrls:i}=li(t),a=[];for(let{rule:u,baseUrl:f}of l){let[p]=$t(u.style.getPropertyValue(\"font-family\"));if(!p||!e.has(p))continue;let b=u.cssText;/url\\(|local\\(/.test(b)&&a.push(Nn(p,b,f,u.style.getPropertyValue(\"font-weight\"),u.style.getPropertyValue(\"font-style\"),u.style.getPropertyValue(\"font-stretch\"),u.style.getPropertyValue(\"unicode-range\"),u.style.getPropertyValue(\"font-variation-settings\")!==\"\"))}let s=await Promise.all(i.map(u=>ai(u,e,r))),d=a.concat(...s),c=si(o===null?d:d.filter(u=>ui(u.unicodeRangeKey,o)),n);return(await Promise.all(c.map(u=>ii(u.fontFaceCssText,u.baseUrl,r)))).filter(u=>u.length>0).join(`\n`)};var tt=e=>{let t=e.defaultView,r=e.documentElement;return!t||!r?null:[t.getComputedStyle(r).backgroundColor,e.body?t.getComputedStyle(e.body).backgroundColor:\"\"].find(n=>n&&n!==\"rgba(0, 0, 0, 0)\")??null},_n=e=>typeof e==\"object\"&&!!e,di=e=>{if(!_n(e))return null;let{type:t,requestId:r,pixelRatio:n}=e;return t!==\"fast-html-to-image:iframe-capture-request\"||typeof r!=\"string\"||r.length===0||typeof n!=\"number\"||!Number.isFinite(n)||n<=0?null:{type:t,requestId:r,pixelRatio:n}},fi=e=>{if(!_n(e))return null;let{type:t,requestId:r,pngDataUrl:n,widthPx:o,heightPx:l,backgroundColor:i}=e;return t!==\"fast-html-to-image:iframe-capture-response\"||typeof r!=\"string\"||r.length===0||typeof n!=\"string\"||!n.startsWith(\"data:image/\")||typeof o!=\"number\"||!Number.isFinite(o)||o<=0||typeof l!=\"number\"||!Number.isFinite(l)||l<=0||i!==null&&typeof i!=\"string\"?null:{type:t,requestId:r,pngDataUrl:n,widthPx:o,heightPx:l,backgroundColor:i}},Ln=(e,t,r)=>{let n=e.contentWindow;if(!n)return Promise.resolve(null);let o=`${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;return new Promise((l,i)=>{let a=(f,p)=>{window.clearTimeout(c),window.removeEventListener(\"message\",d),r?.removeEventListener(\"abort\",s),f(p)},s=()=>a(i,r.reason),d=f=>{if(f.source!==n)return;let p=fi(f.data);!p||p.requestId!==o||a(l,{pngDataUrl:p.pngDataUrl,widthPx:p.widthPx,heightPx:p.heightPx,canvasBackgroundColor:p.backgroundColor})},c=window.setTimeout(()=>a(l,null),2e3);if(r?.aborted)return a(i,r.reason);r?.addEventListener(\"abort\",s,{once:!0}),window.addEventListener(\"message\",d);let u={type:\"fast-html-to-image:iframe-capture-request\",requestId:o,pixelRatio:t};n.postMessage(u,\"*\")})},Fn=e=>{let t=!1,r=n=>{let o=di(n.data),l=n.source;!o||!l||t||(t=!0,e(o.pixelRatio).then(i=>{l.postMessage({type:\"fast-html-to-image:iframe-capture-response\",requestId:o.requestId,pngDataUrl:i.pngDataUrl,widthPx:i.widthPx,heightPx:i.heightPx,backgroundColor:tt(document)},{targetOrigin:\"*\"})}).catch(()=>{}).finally(()=>{t=!1}))};return window.addEventListener(\"message\",r),()=>window.removeEventListener(\"message\",r)};var le=e=>e.namespaceURI===We,pi=new Set([\"block\",\"list-item\",\"flex\",\"grid\",\"table\"]),Ut=e=>{let t=e.position;return t!==\"absolute\"&&t!==\"fixed\"&&(e.float===void 0||e.float===\"none\")},mi=(e,t)=>{if(le(e)&&e.style.paddingBottom!==\"\"){let r=e.ownerDocument.defaultView?.getComputedStyle(e);return v(r?.getPropertyValue(\"padding-bottom\"))}return v(t[\"padding-bottom\"])},hi=(e,t)=>{let r=t.display;return r!==\"block\"&&r!==\"list-item\"||!Ut(t)||t[\"overflow-x\"]!==\"visible\"||t[\"overflow-y\"]!==\"visible\"||v(t[\"border-bottom-width\"])!==0?!1:mi(e,t)===0},gi=e=>Ut(e)&&e.display!==void 0&&pi.has(e.display),Dn=(e,t,r)=>{let n=new Map,o=new Set,l=a=>{let s=re(a);for(let d=s.length-1;d>=0;d--){let c=s[d];if(c.nodeType===Node.COMMENT_NODE)continue;if(c.nodeType===Node.TEXT_NODE){if(/\\S/.test(c.textContent??\"\"))return null;continue}if(!V(c))continue;let u=t.get(c);if(u&&u.styles.display!==\"none\"&&Ut(u.styles))return c}return null},i=a=>{let s=n.get(a);if(s!==void 0)return s;n.set(a,0);let d=t.get(a);if(!d||!hi(a,d.styles)||d.scrollTop!==0||d.scrollLeft!==0)return 0;let c=l(a);if(!c)return 0;let u=t.get(c);if(!u||!gi(u.styles))return 0;let f=Math.max(v(u.styles[\"margin-bottom\"]),i(c));if(f<=0)return 0;let p=a.getBoundingClientRect().bottom,b=c.getBoundingClientRect().bottom;return Math.abs(p-b)>.6?0:(n.set(a,f),f)};for(let[a,s]of t){if(a===e)continue;let d=s.styles.display;if(d!==\"block\"&&d!==\"list-item\"||a.firstElementChild===null&&!a.shadowRoot)continue;let c=i(a);if(c<=0||c<=v(s.styles[\"margin-bottom\"]))continue;let u=r.get(a);u&&(r.set(a,{...u,\"margin-bottom\":`${c}px`}),o.add(a))}return o},ve=e=>{if(e.parentElement)return e.parentElement;let t=e.parentNode;return t instanceof ShadowRoot?t.host:null},On=(e,t,r)=>({layoutWidthPx:e,layoutHeightPx:t,outputWidthPx:e+2*r,outputHeightPx:t+2*r,contentOffsetLeftPx:r,contentOffsetTopPx:r,rootLinearTransform:null}),$n=({rootElement:e,rootStyles:t,defaultView:r,layoutWidthPx:n,layoutHeightPx:o,bleedPx:l})=>{if(!le(e))return On(n,o,l);let i=Re({transform:t.transform,rotate:t.rotate,scale:t.scale}),a=ve(e);for(;a;){let A=r.getComputedStyle(a);i=me(Re({transform:A.getPropertyValue(\"transform\"),rotate:A.getPropertyValue(\"rotate\"),scale:A.getPropertyValue(\"scale\")}),i),a=ve(a)}if(Ge(i))return On(n,o,l);let{a:s,b:d,c,d:u}=i,f=[0,s*n,c*o,s*n+c*o],p=[0,d*n,u*o,d*n+u*o],b=Math.floor(Math.min(...f)),m=Math.floor(Math.min(...p)),g=Math.ceil(Math.max(...f)),x=Math.ceil(Math.max(...p));return{layoutWidthPx:n,layoutHeightPx:o,outputWidthPx:Math.max(1,g-b)+2*l,outputHeightPx:Math.max(1,x-m)+2*l,contentOffsetLeftPx:-b+l,contentOffsetTopPx:-m+l,rootLinearTransform:i}};var bi=[137,80,78,71,13,10,26,10],Ie=null,yi=()=>{if(Ie!==null)return Ie;Ie=new Uint32Array(256);for(let e=0;e<256;e++){let t=e;for(let r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;Ie[e]=t}return Ie},Si=(e,t,r)=>{let n=yi(),o=4294967295;for(let l=t;l<r;l++)o=n[(o^e[l])&255]^o>>>8;return(o^4294967295)>>>0},Vt=(e,t)=>{let r=new Uint8Array(12+t.length),n=new DataView(r.buffer);n.setUint32(0,t.length);for(let o=0;o<4;o++)r[4+o]=e.charCodeAt(o);return r.set(t,8),n.setUint32(8+t.length,Si(r,4,8+t.length)),r},wi=(e,t,r)=>{let n=t*4,o=new Uint8Array((n+1)*r),l=0;for(let i=0;i<r;i++)l++,o.set(e.subarray(i*n,(i+1)*n),l),l+=n;return o},xi=(e,t,r)=>{let n=new Uint8Array((t*3+1)*r),o=0,l=0;for(let i=0;i<r;i++){n[l++]=0;for(let a=0;a<t;a++){if(e[o+3]!==255)return null;n[l]=e[o],n[l+1]=e[o+1],n[l+2]=e[o+2],o+=4,l+=3}}return n},Ei=async e=>{let t=new CompressionStream(\"deflate\"),r=new Response(new Blob([e]).stream().pipeThrough(t));return new Uint8Array(await r.arrayBuffer())},Ai=async e=>{let t=e.getContext(\"2d\");if(t===null)throw Error(\"Could not acquire a 2d canvas context\");let{width:r,height:n}=e,o=t.getImageData(0,0,r,n),l=xi(o.data,r,n),i=await Ei(l??wi(o.data,r,n)),a=new Uint8Array(13),s=new DataView(a.buffer);return s.setUint32(0,r),s.setUint32(4,n),a[8]=8,a[9]=l===null?6:2,new Blob([new Uint8Array(bi),Vt(\"IHDR\",a),Vt(\"IDAT\",i),Vt(\"IEND\",new Uint8Array)],{type:\"image/png\"})},Se=()=>typeof CSS<\"u\"&&CSS.supports(\"-webkit-hyphenate-limit-after\",\"1\"),Vn=(e,t,r)=>{let n=e.toDataURL(t,r);if(!n.startsWith(`data:${t};base64,`))throw Error(`canvas could not encode ${t}`);let o=atob(n.slice(n.indexOf(\",\")+1)),l=new Uint8Array(o.length);for(let i=0;i<o.length;i++)l[i]=o.charCodeAt(i);return new Blob([l],{type:t})},Un=async e=>Vn(e,\"image/png\"),Wn=e=>Se()&&typeof CompressionStream<\"u\"?Ai(e).catch(()=>Un(e)):Un(e),Kn=async(e,t)=>Vn(e,\"image/jpeg\",t),Ci={\"%\":\"%25\",\"#\":\"%23\",\"\\r\":\"%0D\",\"\\n\":\"%0A\",\"\t\":\"%09\"},zn=e=>`data:image/svg+xml;charset=utf-8,${e.replace(/[%#\\r\\n\\t]/g,t=>Ci[t])}`;var Ri=()=>typeof CSS<\"u\"&&CSS.supports(\"-webkit-app-region\",\"none\"),ae=async(e,t)=>{if(!t)return e;let r=()=>{},n=new Promise((o,l)=>{let i=()=>l(t.reason);t.aborted?i():(t.addEventListener(\"abort\",i,{once:!0}),r=()=>t.removeEventListener(\"abort\",i))});try{return await Promise.race([n,e])}finally{r()}},jn=(e,t)=>{if(typeof e!=\"number\"||!Number.isFinite(e)||e<0)throw new RangeError(`timeoutMs must be a finite number of milliseconds, 0 or more; got ${String(e)}`);let r=new AbortController,n,o=performance.now()+e,l=()=>r.abort(new DOMException(`Capture timed out after ${e}ms`,\"TimeoutError\")),i=()=>r.abort(t.reason);return t?.aborted?i():(t?.addEventListener(\"abort\",i,{once:!0}),n=setTimeout(l,e)),{signal:r.signal,check:()=>{performance.now()>=o&&l(),r.signal.throwIfAborted()},dispose:()=>{clearTimeout(n),t?.removeEventListener(\"abort\",i),r.signal.aborted||r.abort(new DOMException(\"Capture settled\",\"AbortError\"))}}},ki=async e=>{for(let t=0;t<e;t++)await new Promise(r=>{let n,o=requestAnimationFrame(()=>{clearTimeout(n),r()});n=setTimeout(()=>{cancelAnimationFrame(o),r()},100)})},Y={snapshotMs:0,iframesMs:0,backdropMs:0,buildMs:0,inlineMs:0,serializeMs:0,decodeMs:0,rasterMs:0,encodeMs:0},Gn=ne(2),Wt=ne(2),Yn=null,Kt=!1,qn=()=>Kt?null:(Yn??=document.createElement(\"canvas\"),Kt=!0,Yn),Xn=()=>{Kt=!1},rt=(e,t,r,n,o=null)=>{let l=zn(e),i=e.includes(\"data:image\")||e.includes(\"background-clip:text\"),a=()=>{let m=Wt.get(l);if(m)return m;let g=(async()=>{let x=performance.now(),A=new Image;return A.decoding=\"sync\",A.src=l,await A.decode(),!Ri()&&i&&await ki(2),Y.decodeMs=performance.now()-x,A})();return Wt.set(l,g),g.catch(()=>{Wt.delete(l)}),g},s=o?Math.max(1,Math.ceil(o.width)):t,d=o?Math.max(1,Math.ceil(o.height)):r,c=async(m,g)=>{let x=await a(),A=performance.now(),S=n.scale*n.pixelRatio,w=Math.ceil(s*S),y=Math.ceil(d*S),R=Math.min(1,16384/Math.max(1,w),16384/Math.max(1,y)),N=Math.max(1,Math.floor(w*R)),k=Math.max(1,Math.floor(y*R)),M=m.getContext(\"2d\",Se()?{willReadFrequently:!0}:void 0);if(!M)throw Error(\"Could not acquire a 2d canvas context\");m.width!==N||m.height!==k?(m.width=N,m.height=k):(M.setTransform(1,0,0,1,0,0),M.clearRect(0,0,N,k));let h=n.backgroundColor??g;return h&&(M.fillStyle=h,M.fillRect(0,0,N,k)),M.scale(S*R,S*R),o&&M.translate(-o.x,-o.y),M.drawImage(x,0,0,t,r),Y.rasterMs=performance.now()-A,m},u=()=>c(document.createElement(\"canvas\")),f=()=>{let m=o?`${o.x},${o.y},${o.width},${o.height}`:\"\",g=`${n.scale}|${n.pixelRatio}|${n.backgroundColor??\"\"}|${t}|${r}|${m}`,x=Gn.get(e),A=x?.get(g);if(A)return A;let S=qn(),w=c(S??document.createElement(\"canvas\")).then(async R=>{let N=performance.now(),k=await Wn(R);return Y.encodeMs=performance.now()-N,k}).finally(()=>{S!==null&&Xn()});x===void 0&&(x=new Map,Gn.set(e,x));let y=x;return y.set(g,w),w.catch(()=>{y.delete(g)}),w},p=async(m=.92)=>{let g=qn();try{let x=await c(g??document.createElement(\"canvas\"),\"#ffffff\"),A=performance.now(),S=await Kn(x,m);return Y.encodeMs=performance.now()-A,S}finally{g!==null&&Xn()}},b=m=>async(...g)=>(n.abortSignal?.throwIfAborted(),ae(m(...g),n.abortSignal));return{width:s,height:d,toSvgDataUrl:b(()=>Promise.resolve(l)),toCanvas:b(u),toBlob:b(f),toJpegBlob:b(p),toPngDataUrl:b(async()=>et(await f())),toJpegDataUrl:b(async m=>et(await p(m)))}},Zn=({clone:e,cssText:t,width:r,height:n,clip:o,ownerDocument:l})=>{let i=l.createElementNS(X,\"svg\");i.setAttribute(\"width\",String(o?o.width:r)),i.setAttribute(\"height\",String(o?o.height:n)),i.setAttribute(\"viewBox\",o?`${o.x} ${o.y} ${o.width} ${o.height}`:`0 0 ${r} ${n}`);let a=l.createElementNS(X,\"style\");a.textContent=`*{scrollbar-width:none}\n*::-webkit-scrollbar{display:none}\nforeignObject>div{-webkit-text-size-adjust:100%!important}\n${t}`;let s=l.createElementNS(X,\"foreignObject\");s.setAttribute(\"width\",String(r)),s.setAttribute(\"height\",String(n));let d=l.createElementNS(We,\"div\");return d.setAttribute(\"style\",`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${r}px;height:${n}px;`),d.appendChild(e),s.appendChild(d),i.appendChild(a),i.appendChild(s),Z(new XMLSerializer().serializeToString(i))};var zt=e=>e.length>0&&!e.startsWith(\"data:\")&&!e.startsWith(\"#\")&&!e.startsWith(\"about:\"),Qn=(e,t,r)=>{e.includes(\"url(\")&&Be(e,n=>{if(!n.startsWith(\"data:\")){let o=te(n,t);zt(o)&&oe(o,r)}return Promise.resolve(n)})},Jn=(e,t)=>`${e.replace(/[\"']/g,\"\").trim().toLowerCase()}|${(t||\"u+0-10ffff\").replace(/\\s+/g,\"\").toLowerCase()}`,Ti=e=>{if(!e.fonts||typeof e.fonts.forEach!=\"function\")return null;let t=new Set;return e.fonts.forEach(r=>{(r.status===\"loaded\"||r.status===\"loading\")&&t.add(Jn(r.family,r.unicodeRange))}),t},eo=(e,t)=>{for(let n of e.querySelectorAll(\"img\")){let o=n.getAttribute(\"src\");o&&zt(o)&&oe(o,t)}for(let n of e.querySelectorAll(\"image\")){let o=n.getAttribute(\"href\")??n.getAttributeNS(\"http://www.w3.org/1999/xlink\",\"href\");o&&zt(o)&&oe(o,t)}for(let n of e.querySelectorAll('[style*=\"url(\"]'))Qn(n.getAttribute(\"style\")??\"\",null,t);let r=Ti(e.ownerDocument);G(e.ownerDocument,(n,o)=>((ee(n)||Dt(n)&&(r===null||r.has(Jn(n.style.getPropertyValue(\"font-family\"),n.style.getPropertyValue(\"unicode-range\")))))&&Qn(n.cssText,o,t),!1),()=>!1)};var Pi=(e,t,r)=>pe.has(e)&&t!==\"\"&&r===\"\"&&!t.includes(\"url(\")&&!t.includes(\"var(\"),no=(e,t,r)=>{let n=e.getPropertyValue(\"backdrop-filter\")!==\"\"||e.getPropertyValue(\"-webkit-backdrop-filter\")!==\"\",o=\"\",l=\"\",i=\"\";for(let a=0;a<e.length;a++){let s=e.item(a);if(t.has(s))continue;let d=e.getPropertyValue(s),c=e.getPropertyPriority(s),u=`|${s}:${d}!${c}`;i+=u,!n&&Pi(s,d,c)?(o+=`${s}:${d};`,l+=`|~${s}`):l+=u}return r?.includes(\"var(\")&&(l+=`|style=${r}`,i+=`|style=${r}`),{carryText:Z(o),descriptorWithCarry:l,descriptorPlain:i,registryFeed:null}},oo=[\"margin-top\",\"margin-left\"],to=new WeakMap;function Ni(e){let t=[],r=n=>{for(let o of n)if(o.selectorText!==void 0){let l=o.style;[\"margin\",\"margin-top\",\"margin-left\",\"margin-block-start\",\"margin-inline-start\"].some(i=>/\\bauto\\b/.test(l.getPropertyValue(i)))&&t.push(o.selectorText)}else o.cssRules&&r(o.cssRules)};for(let n of e.styleSheets)try{r(n.cssRules)}catch{}return t}function Mi(e,t,r){let n=to.get(r);if(n===void 0&&(n=Ni(e.ownerDocument),to.set(r,n)),!n.some(l=>{try{return e.matches(l)}catch{return!1}}))return[];let o=[];for(let l of oo){if(t.getPropertyValue(l)!==\"0px\")continue;let i=e.getBoundingClientRect(),a=e.getAttribute(\"style\");e.style.setProperty(l,\"0px\",\"important\");let s=e.getBoundingClientRect();a===null?e.removeAttribute(\"style\"):e.setAttribute(\"style\",a),(Math.abs(s.top-i.top)>.5||Math.abs(s.left-i.left)>.5)&&o.push(l)}return o}function Bi(e,t,r){if(typeof e.computedStyleMap!=\"function\")return Mi(e,t,r);let n=e.computedStyleMap();return oo.filter(o=>t.getPropertyValue(o)===\"0px\"&&String(n.get(o))===\"auto\")}function lo(e,t,r,n){let o=n.getComputedStyle(e);if(o.display===\"none\")return null;let l=null;if(t!==null&&(r.get(t)?.styles.display??\"\").includes(\"grid\")&&(o.getPropertyValue(\"margin-top\")===\"0px\"||o.getPropertyValue(\"margin-left\")===\"0px\")&&e.getClientRects().length>0)for(let i of Bi(e,o,r))(l??={})[i]=\"auto\";if(/flex/.test(o.display)&&o.flexWrap.startsWith(\"wrap\")&&o.flexDirection.startsWith(\"row\")){let i=[...e.children].filter(a=>{let s=n.getComputedStyle(a),d=a.getBoundingClientRect();return s.display!==\"none\"&&s.position!==\"absolute\"&&s.position!==\"fixed\"&&d.width>0&&d.height>0});if(i.length>1){let a=i[0].getBoundingClientRect().top;i.every(s=>Math.abs(s.getBoundingClientRect().top-a)<.5)&&((l??={})[\"flex-wrap\"]=\"nowrap\")}}return l}var vi=null,ro=new Map,Ht=e=>{let t=ro.get(e);if(t!==void 0)return t;let r=vi??=document.createElement(\"span\").style;r.setProperty(e,\"initial\");let n=r.length>1?Array.from({length:r.length},(o,l)=>r.item(l)):[e];return r.cssText=\"\",ro.set(e,n),n},Ii=null,nt=new Map,_i=e=>{let t=`${e.propertyName}:${e.propertyValue}`,r=nt.get(t);if(r!==void 0)return r.length===0||r[0].isImportant===e.isImportant?r:r.map(l=>({...l,isImportant:e.isImportant}));let n=Ii??=document.createElement(\"span\").style;n.cssText=t;let o=[];for(let l=0;l<n.length;l++){let i=n.item(l);o.push({propertyName:i,propertyValue:n.getPropertyValue(i),isImportant:e.isImportant})}return n.cssText=\"\",nt.size>=4096&&nt.clear(),nt.set(t,o),o},io=(e,t)=>{let r=!1,n=[];for(let s of e){let d=s.propertyName;(d===\"backdrop-filter\"||d===\"-webkit-backdrop-filter\")&&(r=!0);for(let c of Ht(d))n.push([c,s.propertyValue])}let o=\"\",l=\"\",i=\"\",a=(s,d)=>{let c=s.isImportant?\"important\":\"\",u=`|${s.propertyName}:${s.propertyValue}!${c}`;i+=u,d?(o+=`${s.propertyName}:${s.propertyValue};`,l+=`|~${s.propertyName}`):l+=u};for(let s of e){let d=Ht(s.propertyName),c=!0,u=!0;for(let p of d)t.has(p)||(c=!1),pe.has(p)||(u=!1);if(c)continue;let f=!s.isImportant&&!r;if(d.length>1&&!u){for(let p of _i(s))t.has(p.propertyName)||a(p,f&&pe.has(p.propertyName));continue}a(s,f&&u)}return{carryText:o,descriptorWithCarry:l,descriptorPlain:i,registryFeed:n}},Gt=e=>{if(Sr.test(e))return null;let t=[],r=e.length,n=0;for(;n<=r;){let o=e.indexOf(\";\",n);o===-1&&(o=r);let l=e.slice(n,o);n=o+1;let i=l.indexOf(\":\");if(i===-1){if(l.trim()!==\"\")return null;continue}let a=l.slice(0,i).trim().toLowerCase();if(a===\"\"||a.startsWith(\"--\"))return null;let s=l.slice(i+1).trim(),d=!1;s.includes(\"!\")&&/!\\s*important$/i.test(s)&&(d=!0,s=s.slice(0,s.lastIndexOf(\"!\")).trim()),s!==\"\"&&t.push({propertyName:a,propertyValue:s,isImportant:d})}return t},ao=(e,t,r)=>{let n=e.localName,o=e.attributes,l=t===null||e.shadowRoot!==null;for(let i=0;i<o.length;i++){let a=o[i],s=a.name;s!==\"style\"&&(!l&&!t.has(s)||(n+=`|${s}=${a.value}`))}return n+r},Li=e=>\"style\"in e&&e.style instanceof CSSStyleDeclaration,so=e=>{let t=new Set,r=[],n=(i,a)=>{let s=`${i}|${a}`;t.has(s)||(t.add(s),r.push([i,a]))},o=new Set,l=i=>{let a=i.getAttribute(\"style\");if(a===null||o.has(a))return;o.add(a);let s=Gt(a);if(s!==null){for(let c of s)for(let u of Ht(c.propertyName))n(u,c.propertyValue);return}if(!Li(i))return;let d=i.style;for(let c=0;c<d.length;c++){let u=d.item(c);n(u,d.getPropertyValue(u))}};l(e);for(let i of e.querySelectorAll(\"[style]\"))l(i);return r},ot=e=>Rr.has(e.localName),co=e=>sr.has(e.transform??\"\")&&cr.has(e.position??\"\"),Fi=new Set([\"top\",\"right\",\"bottom\",\"left\"]),Oi=new Set([\"width\",\"height\"]),uo=e=>{let t=e.includes(\"display\"),r=e.includes(\"position\");return e.map(n=>n===\"inline-size\"?1:n===\"block-size\"?2:n===\"transform-origin\"?3:n===\"perspective-origin\"?4:!t&&(n===\"grid-template-columns\"||n===\"grid-template-rows\")?5:!r&&Fi.has(n)?6:!t&&Oi.has(n)?7:0)},_e=(e,t,r,n,o=null,l=!1)=>{for(let i=0;i<r.length;i++){if(o!==null&&o[i])continue;let a=n[i];if(a!==0){if(a===1){if(e[\"writing-mode\"]===\"horizontal-tb\"){e[\"inline-size\"]=e.width;continue}}else if(a===2){if(e[\"writing-mode\"]===\"horizontal-tb\"){e[\"block-size\"]=e.height;continue}}else if(a===3){if(e.transform===\"none\")continue}else if(a===4){if((e.perspective??\"none\")===\"none\")continue}else if(a===6){if((e.position??\"static\")===\"static\")continue}else if(a===7){if(l&&e.display===\"inline\")continue;let u=r[i],f=u===\"width\"?t.width:t.height,p=f===\"\"?void 0:de(u,f);e[u]!==p&&(e[u]=p);continue}else if(!(e.display??\"\").includes(\"grid\"))continue}let s=r[i],d=de(s,t.getPropertyValue(s)),c=d===\"\"?void 0:d;e[s]!==c&&(e[s]=c)}};var fo=ne(8),Q=e=>{let t=\"\";for(let r in e)t+=`${r}:${e[r]};`;return t},go=()=>{let e=new Map,t=[];return{rules:t,register:(r,n,o,l,i,a)=>{let s={base:Q(r),before:n?Q(n):\"\",after:o?Q(o):\"\",firstLetter:l?Q(l):\"\",marker:i?Q(i):\"\"},d=a?qt(\"\",a):\"\",c=`${s.base}|before:${s.before}|after:${s.after}|first-letter:${s.firstLetter}|marker:${s.marker}|extra:${d}`,u=e.get(c);if(u)return u;let f=`rgs-${t.length+1}`;return e.set(c,f),t.push({className:f,signature:c,baseStyles:r,beforeStyles:n,afterStyles:o,firstLetterStyles:l,markerStyles:i,extraStyles:a??null,cachedBlocks:s}),f},toCssText:()=>{let r=`${wn()}`;for(let c of t)r+=`\\0${c.signature}`;let n=fo.get(r);if(n!==void 0)return n;let o=new Map;for(let c of t){let u=c.baseStyles;for(let f in u){let p=`${f}:${u[f]};`,b=o.get(p);b===void 0?o.set(p,[c.className]):b.push(c.className)}}let l=new Map;for(let[c,u]of o){if(u.length<2)continue;let f=u.join(\",.\");l.set(f,(l.get(f)??\"\")+c)}let i=new Map,a=new Map,s=\"\";for(let[c,u]of l)s+=`.${c}{${u}}\n`;for(let c of t){let u=c.baseStyles,f=\"\";for(let S in u){let w=`${S}:${u[S]};`,y=o.get(w);y!==void 0&&y.length>=2||(f+=w)}let p=`.${c.className}{${f}}`,b=c.cachedBlocks,m=b?.before??(c.beforeStyles?Q(c.beforeStyles):\"\"),g=b?.after??(c.afterStyles?Q(c.afterStyles):\"\"),x=b?.firstLetter??(c.firstLetterStyles?Q(c.firstLetterStyles):\"\"),A=b?.marker??(c.markerStyles?Q(c.markerStyles):\"\");if(m){let S=i.get(m);S===void 0?i.set(m,[c.className]):S.push(c.className)}if(g){let S=a.get(g);S===void 0?a.set(g,[c.className]):S.push(c.className)}x&&(p+=`\n.${c.className}::first-letter{${x}}`),A&&(p+=`\n.${c.className}::marker{${A}}`),c.extraStyles&&(p+=qt(c.className,c.extraStyles)),s+=`${p}\n`}for(let[c,u]of i)s+=`.${u.join(\"::before,.\")}::before{${c}}\n`;for(let[c,u]of a)s+=`.${u.join(\"::after,.\")}::after{${c}}\n`;let d=s.slice(0,-1);return fo.set(r,d),d}}},Xt=e=>hr.some(t=>e.startsWith(t)),Di=e=>{if(!e.firstLetterStyles)return null;let t=null;for(let r in e.firstLetterStyles){if(!Xt(r))continue;let n=e.firstLetterStyles[r];n===void 0||n===e.styles[r]||(t??={},t[r]=n)}return t},Yt=(e,t,r,n)=>{if(!r)return null;let o=Me({styles:r,baseline:e.getBaseline(t,n,r),parentStyles:null,parentEmittedStyles:null});return ye(o,r,null,!1,null),be(o,r),o.content=r.content??\"none\",o},jt=ne(2),bo=(e,t,r)=>{let n=Object.getPrototypeOf(t);for(let o=0;o<r.length;o++){let l=r[o];if(!Object.hasOwn(t,l))continue;let i=t[l];n!==null&&n[l]===i||(e+=`\u001f${o}:${i??\"\"}`)}return e},po=(e,t,r)=>t===null?`${e}\u001f\\0`:(e+=`\u001f${t.content??\"\"}`,bo(e,t,r)),mo=(e,t,r)=>{let n=t??\"\";return n=bo(n,e.styles,r),n=po(n,e.beforeStyles,r),po(n,e.afterStyles,r)},ho=(e,t,r,n,o,l)=>{if(!n)return null;if(!e||e.content!==(n.content??\"none\"))return Yt(t,r,n,o);let i={...e};return Bt(i,n,t.getBaseline(r,o,n),l),ye(i,n,null,!1,null),be(i,n),i.content=n.content??\"none\",i},yo=(e,t,r,n,o,l,i,a,s)=>{let d=new Map,c=new Map,u=un(t),f=new Map,p=new Map,b=(w,y)=>{if(y.memoKey===-1)return r.getBaseline(w,null,y.styles);let R=p.get(y.memoKey);return R===void 0&&(R=r.getBaseline(w,null,y.styles),p.set(y.memoKey,R)),R},m=new Map,g=s??new Map;for(let[w,y]of e){let R=y.parentElement?e.get(y.parentElement):void 0,N=u&&y.memoKey!==-1&&w!==o&&!i?.has(w)&&!a.has(w)&&!y.pseudoStyles,k;if(N){let T=mo(y,R?.styles.display??null,t);if(m.set(w,T),k=g.get(y.memoKey),k===void 0)k=new Map,g.set(y.memoKey,k);else{let P=k.get(T);if(P!==void 0){c.set(w,P);continue}}}let M=u&&y.memoKey!==-1?f.get(y.memoKey):void 0,h;if(M?(h={...M},Bt(h,y.styles,b(w,y),t)):(h=Me({styles:y.styles,baseline:b(w,y),parentStyles:R?.styles??null,parentEmittedStyles:y.parentElement?c.get(y.parentElement)??null:null}),u&&y.memoKey!==-1&&f.set(y.memoKey,{...h})),ye(h,y.styles,R?.styles.display??null,ot(w),w.localName),be(h,y.styles),I(w,\"iframe\")){let T=y.styles.display??\"inline\";h.display=T===\"inline\"?\"inline-block\":T}h[\"content-visibility\"]===\"auto\"&&(h[\"content-visibility\"]=\"visible\"),w===o&&mn(h,l),i?.has(w)&&(h.visibility=\"hidden\",delete h[\"backdrop-filter\"]);let C=a.get(w);C&&Lr(h,y.styles,C),c.set(w,h),k&&k.set(m.get(w)??\"\",h)}let x=Dn(o,e,c),A=new Map,S=new Map;for(let[w,y]of e){let R=c.get(w);if(!R)continue;let N=u&&y.memoKey!==-1&&w!==o&&y.firstLetterStyles===null&&y.markerStyles===null&&!y.pseudoStyles&&!x.has(w)&&!i?.has(w)&&!a.has(w),k=(y.parentElement?e.get(y.parentElement):void 0)?.styles.display??null,M,h=\"\";if(N)if(h=m.get(w)??mo(y,k,t),M=S.get(y.memoKey),M===void 0)M=new Map,S.set(y.memoKey,M);else{let z=M.get(h);if(z!==void 0){d.set(w,z);continue}}let C=u&&y.memoKey!==-1?A.get(y.memoKey):void 0,T,P;C?(T=ho(C.beforeDiff,r,w,y.beforeStyles,\"::before\",t),P=ho(C.afterDiff,r,w,y.afterStyles,\"::after\",t)):(T=Yt(r,w,y.beforeStyles,\"::before\"),P=Yt(r,w,y.afterStyles,\"::after\"),u&&y.memoKey!==-1&&A.set(y.memoKey,{beforeDiff:T?{...T}:null,afterDiff:P?{...P}:null}));let _=n.register(R,T,P,Di(y),pn(y.markerStyles,y.styles),So(r,w,y.pseudoStyles,y.styles));d.set(w,_),M&&M.set(h,_)}return d};var wo=e=>{let t=0,r={definesBeforeAfter:!1,definesFirstLetter:!1,definesMarker:!1},n=()=>(r.definesBeforeAfter=!0,r.definesFirstLetter=!0,r.definesMarker=!0,!0);return G(e,o=>{if(t++,t>1e3)return n();if(ee(o)){let l=o.selectorText;(l.includes(\":before\")||l.includes(\":after\"))&&(r.definesBeforeAfter=!0),l.includes(\":first-letter\")&&(r.definesFirstLetter=!0),l.includes(\":marker\")&&(r.definesMarker=!0)}return r.definesBeforeAfter&&r.definesFirstLetter&&r.definesMarker},n),r},Zt=(e,t,r,n)=>{let o=r.getComputedStyle(e,t),l=o.getPropertyValue(\"content\");if(l===\"\"||l===\"none\"||l===\"normal\")return null;let i=J(o,n);return i.content=l,i},Qt=(e,t,r,n,o,l,i)=>{if(!l)return null;let a=r.getComputedStyle(e,t),s=Object.create(l);return _e(s,a,n,o,i,!0),s},Jt=(e,t,r,n,o,l,i,a)=>{let s=r.getComputedStyle(e,t),d=s.getPropertyValue(\"content\");if(d===\"\"||d===\"none\"||d===\"normal\")return null;if(!i){let u=J(s,n);return u.content=d,u}let c=Object.create(i);return _e(c,s,o,l,a,!0),c.content=d,c},xo=(e,t)=>e.firstChild?Mt(t.getComputedStyle(e,\"::first-letter\"),Xt):null,Eo=(e,t)=>{let r=t.getComputedStyle(e,\"::marker\"),n=Mt(r,fn),o=r.getPropertyValue(\"content\");return o&&(n.content=o),n},Ao=e=>e instanceof CSSKeyframesRule,Co=e=>\"containerName\"in e||\"start\"in e,$i=/::?(?:before|after|first-letter|first-line|marker|selection|placeholder|backdrop|root|-webkit-[a-z-]+)\\b/g,Ui=/[[+~:]/,Ro=e=>!Ui.test(e.replace($i,\"\")),lt=e=>{let t=[],r={counterCss:\"\",placeholder:!1,fileButton:!1,firstLine:!1,sliderThumb:!1,thumbRules:[]};return G(e,n=>{if(n.type===CSSRule.COUNTER_STYLE_RULE||n.type===CSSRule.FONT_FEATURE_VALUES_RULE)return t.push(n.cssText),!1;if(ee(n)){let o=n.selectorText;if(o.includes(\"::placeholder\")&&(r.placeholder=!0),o.includes(\"::file-selector-button\")&&(r.fileButton=!0),o.includes(\"::first-line\")&&(r.firstLine=!0),o.includes(\"::-webkit-slider-thumb\")){r.sliderThumb=!0;let l=[];for(let i of ie(o)){let a=i.indexOf(\"::-webkit-slider-thumb\");a!==-1&&l.push(i.slice(0,a).trim())}l.length>0&&r.thumbRules.push({bases:l,style:n.style})}}return!1},()=>!1),r.counterCss=t.join(`\n`),r},Vi=[\"font-family\",\"font-size\",\"font-style\",\"font-variant\",\"font-variant-caps\",\"font-weight\",\"font-stretch\",\"font-feature-settings\",\"font-variation-settings\",\"font-kerning\",\"font-optical-sizing\",\"font-synthesis\",\"line-height\",\"color\",\"background-color\",\"background-image\",\"letter-spacing\",\"word-spacing\",\"text-decoration-line\",\"text-decoration-color\",\"text-decoration-style\",\"text-decoration-thickness\",\"text-transform\",\"text-shadow\",\"text-emphasis-color\",\"-webkit-text-fill-color\",\"-webkit-text-stroke-color\",\"-webkit-text-stroke-width\"],ko=(e,t,r)=>{let n=null,o=(l,i)=>(n??={})[l]=i;if(r.placeholder&&(I(e,\"input\")||I(e,\"textarea\"))&&o(\"::placeholder\",J(t.getComputedStyle(e,\"::placeholder\"),null)),r.fileButton&&I(e,\"input\")&&e.type===\"file\"&&o(\"::file-selector-button\",J(t.getComputedStyle(e,\"::file-selector-button\"),null)),r.firstLine&&o(\"::first-line\",J(t.getComputedStyle(e,\"::first-line\"),Vi)),r.sliderThumb&&I(e,\"input\")&&e.type===\"range\"){let l=null;for(let i of r.thumbRules)i.bases.some(a=>{try{return e.matches(a===\"\"?\"*\":a)}catch{return!1}})&&(l=Object.assign(l??{},J(i.style,null)));l!==null&&o(\"::-webkit-slider-thumb\",l)}return n},Wi=(e,t,r,n)=>{let o=Me({styles:r,baseline:e.getBaseline(t,n,r),parentStyles:null,parentEmittedStyles:null});return ye(o,r,null,!1,null),be(o,r),o},So=(e,t,r,n)=>{if(!r)return null;let o=null;for(let l in r){let i=r[l],a;if(l===\"::-webkit-slider-thumb\")a=i;else if(l===\"::first-line\"){a={};for(let s in i)i[s]!==n[s]&&(a[s]=i[s])}else a=Wi(e,t,i,l);Object.keys(a).length>0&&((o??={})[l]=a)}return o},qt=(e,t)=>{let r=\"\";for(let n in t){let o=Q(t[n]);o&&(r+=`\n.${e}${n}{${o}}`)}return r};var it=null,To=new Map,Ki=e=>{let t=To.get(e);if(t!==void 0)return t;it??=document.createElement(\"span\").style,it.setProperty(e,\"initial\");let r=it.length>1;return it.cssText=\"\",To.set(e,r),r},zi=e=>e===\"cssFloat\"?\"float\":e===\"cssOffset\"?\"offset\":e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Po=(e,t)=>{let r=new Set,n=new Set(wr),o=h=>{if(h.includes(\"#\")&&n.add(\"id\"),h.includes(\"[\"))for(let C of h.matchAll(xr))n.add(C[1].toLowerCase())},l=[],i=!0,a=!0,s=!0,d=!1,c=new Set,u=new Set,f=new Map,p=(h,C)=>{let T=C!==void 0&&!C.includes(\":\")?C:null;if(!u.has(h)){u.add(h),d&&(i=!1),f.set(h,T===null?null:[T]);return}let P=f.get(h);if(P==null){f.set(h,null);return}T===null?f.set(h,null):P.push(T)},b=h=>u.has(h)&&f.get(h)===null,m=(h,C,T)=>{if(h===\"position\"){if(C!==\"static\")for(let _ of He)p(_,T);return}if(h===\"transition-property\"){for(let _ of Ce)(C.includes(\"all\")||C.includes(_))&&p(_,T);return}if(h===\"transform\"){if(b(\"transform\"))return;yr.test(C)&&p(\"transform\",T);return}if(Ce.has(h)){if(b(h))return;wt.test(C)||p(h,T);return}let P=[\"margin-\",\"padding-\",\"inset\"].find(_=>h.startsWith(_));if(P!==void 0&&!wt.test(C)){let _=P===\"inset\"?\"\":P;for(let z of Ce)(_===\"\"?He.includes(z):z.startsWith(_))&&p(z,T)}},g=h=>{r.has(h)||(r.add(h),ge(h)||l.push(h))},x=h=>{if(ge(h)){h.startsWith(\"--\")&&(i=!1);return}Je(h)||Ki(h)?i=!1:c.has(h)||(d&&(i=!1),c.add(h),u.add(h),f.set(h,null)),g(h)},A=(h,C)=>{a&&h===\"content\"&&(C.includes(\"attr(\")||C.includes(\"counter\"))&&(a=!1),m(h,C),s&&(h===\"backdrop-filter\"||h===\"-webkit-backdrop-filter\")&&(s=!1),g(h)},S=(h,C)=>{for(let T=0;T<h.length;T++){let P=h.item(T);if(a&&P===\"content\"){let _=h.getPropertyValue(\"content\");(_.includes(\"attr(\")||_.includes(\"counter\"))&&(a=!1)}m(P,h.getPropertyValue(P),C),s&&(P===\"backdrop-filter\"||P===\"-webkit-backdrop-filter\"||C!==void 0&&pe.has(P)&&h.getPropertyPriority(P)===\"important\")&&(s=!1),g(P)}},w=h=>{if(ee(h))i&&!Ro(h.selectorText)&&(i=!1),o(h.selectorText),S(h.style,h.selectorText);else if(Ao(h))for(let C of h.cssRules){if(!(C instanceof CSSKeyframeRule))continue;let T=C.style;for(let P=0;P<T.length;P++)x(T.item(P))}else Ye(h)&&Co(h)&&(i=!1)},y=()=>{if(typeof e.getAnimations==\"function\")for(let h of e.getAnimations()){let C=h.effect;if(!(C instanceof KeyframeEffect)){i=!1;continue}for(let T of C.getKeyframes())for(let P in T)gr.has(P)||x(zi(P))}};for(let h of br)g(h);let R=!1;if(G(e,h=>(w(h),!1),()=>(R=!0,!0)),R)return null;if(y(),t!==null)for(let[h,C]of t)A(h,C);d=!0;let N=[...St.filter(h=>r.has(h)&&(!Ce.has(h)||u.has(h))),...[...c].filter(h=>!St.includes(h))],k=h=>{S(h)},M=h=>{for(let C of h)if(w(C),Te(C)){let T=C.styleSheet;T&&M(T.cssRules)}else Ye(C)&&M(C.cssRules)};return{propertyNames:l,styleRelevantAttributeNames:n,perElementPropertyNames:N,getUnstableSelectorList:h=>f.get(h)??null,isStyleMemoSafe:()=>i,isPseudoContentMemoSafe:()=>a,addInlineStyleProps:k,addParsedInlineDeclaration:A,addShadowRootStyleProps:h=>{for(let C of[...h.styleSheets,...h.adoptedStyleSheets])try{M(C.cssRules)}catch{return!1}return!0},isInlineCarrySafe:()=>s}};var Hi=e=>e.namespaceURI===\"http://www.w3.org/2000/svg\"&&Ke.has(e.localName),er=new WeakMap,tr=new WeakMap,Gi=e=>typeof e.getAnimations!=\"function\"||e.getAnimations().length>0,No=(e,t,r,n)=>{let o=new Map,l=new Map,i=wo(e.ownerDocument),a=lt(e.ownerDocument),s=he(e.ownerDocument),d=`${s.cssRuleCount}|${s.styleEpoch}`,c=tr.get(e.ownerDocument),u=c!==void 0&&c.sheetSignature===d,f=u?c.dedupedFeed:so(e),p=Po(e.ownerDocument,f);if(p)for(let E=e.parentElement;E!==null;E=E.parentElement)le(E)&&E.style.length>0&&p.addInlineStyleProps(E.style);let b=p?.perElementPropertyNames??[],m=new Set(b),g=b.join(\",\"),x=u&&c.laneSignature===g?c.scanByText:new Map,A=new Map,S=uo(b),w=b.map(E=>{let L=p?.getUnstableSelectorList(E)??null;return L!==null&&L.length>0?L.join(\",\"):null}),y=w.some(E=>E!==null),R=E=>{if(!y)return null;let L=null;for(let $=0;$<w.length;$++){let O=w[$];if(O===null)continue;let W=!0;try{W=E.matches(O)}catch{W=!0}W||(L??=Array(w.length).fill(!1),L[$]=!0)}return L},N=e.ownerDocument.activeElement,k=p?.propertyNames.length??0,M=p!==null&&p.isStyleMemoSafe()&&!Gi(e.ownerDocument)?`${s.cssRuleCount}|${s.styleEpoch}|${t.innerWidth}x${t.innerHeight}x${t.devicePixelRatio}|${k}|${b.join(\",\")}`:null,h=M===null?void 0:er.get(e.ownerDocument),C=h!==void 0&&h.signature===M,T=C?h.memoKeysByParentKey:new Map,P=C?h.memoizedStylesByKey:new Map,_=C?h.variantEmittedStyles:new Map,z=C?h.memoKeyByElement:new WeakMap,Oe=C?h.attributeGeneration:-1,xe=C?Dr(e.ownerDocument):null,De=M===null?-1:s.attributeGeneration,B=C?h.nextMemoKey:0,F=(E,L,$,O)=>{if(Ar.has(E.localName)||Hi(E)||r&&!r(E))return;p&&E.shadowRoot&&(p.addShadowRootStyleProps(E.shadowRoot)||(p=null));let W=le(E)&&!$&&!xt.has(E.localName),D=null,se=E.getAttribute(\"style\");if(se!==null&&le(E)&&(D=x.get(se)??A.get(se)??null,D===null)){let U=Gt(se);if(U!==null){if(D=io(U,m),p&&D.registryFeed!==null)for(let[Ve,ce]of D.registryFeed)p.addParsedInlineDeclaration(Ve,ce);x.set(se,D)}else p&&p.addInlineStyleProps(E.style),D=no(E.style,m,se),A.set(se,D)}let $e=lo(E,L,o,t),fe=p&&E.namespaceURI!==\"http://www.w3.org/2000/svg\"&&!xt.has(E.localName)?p.propertyNames:null,q=-1,Ue=\"\";if(fe&&p?.isStyleMemoSafe()&&W&&O!==-1&&$e===null){D!==null&&p.isInlineCarrySafe()&&(Ue=D.carryText,Ue!==\"\"&&l.set(E,Ue));let U=xe!==null&&(xe.get(E)??0)<=Oe?z.get(E):void 0;if(U!==void 0&&U.parentMemoKey===O)q=U.memoKey;else{let Ve=ao(E,p?.styleRelevantAttributeNames??null,D===null?\"\":Ue===\"\"?D.descriptorPlain:D.descriptorWithCarry),ce=T.get(O);ce===void 0&&(ce=new Map,T.set(O,ce));let ar=ce.get(Ve);ar===void 0?(q=B++,ce.set(Ve,q)):q=ar,z.set(E,{memoKey:q,parentMemoKey:O})}}let ct=E===N,H=q!==-1&&!ct?P.get(q):void 0,ut=t.getComputedStyle(E),j;if(H)j=Object.create(H.styles),_e(j,ut,b,S,H.laneSkipMask,!ot(E));else{if(L!==null&&ut.getPropertyValue(\"display\")===\"none\")return;j=J(ut,fe,!0)}if((j.display===\"none\"||co(j))&&L!==null)return;if($e!==null)for(let U in $e)j[U]=$e[U];let Fo=i.definesBeforeAfter||$,Oo=(i.definesMarker||$)&&(j.display??\"\").includes(\"list-item\"),Ee=null,Ae=null;Fo&&(H&&p?.isPseudoContentMemoSafe()?(Ee=Qt(E,\"::before\",t,b,S,H.beforeStyles,H.laneSkipMask),Ae=Qt(E,\"::after\",t,b,S,H.afterStyles,H.laneSkipMask)):H?(Ee=Jt(E,\"::before\",t,fe,b,S,H.beforeStyles,H.laneSkipMask),Ae=Jt(E,\"::after\",t,fe,b,S,H.afterStyles,H.laneSkipMask)):(Ee=Zt(E,\"::before\",t,fe),Ae=Zt(E,\"::after\",t,fe))),q!==-1&&!H&&!ct&&P.set(q,{styles:j,beforeStyles:Ee,afterStyles:Ae,laneSkipMask:R(E)});let or=j[\"overflow-x\"],lr=j[\"overflow-y\"],ir=E.localName===\"html\"||E.localName===\"body\"||or!==void 0&&or!==\"visible\"||lr!==void 0&&lr!==\"visible\";if(o.set(E,{styles:j,beforeStyles:Ee,afterStyles:Ae,firstLetterStyles:i.definesFirstLetter?xo(E,t):null,markerStyles:Oo?Eo(E,t):null,pseudoStyles:ko(E,t,a),parentElement:L,scrollLeft:ir?E.scrollLeft:0,scrollTop:ir?E.scrollTop:0,memoKey:ct?-1:q}),Cr.has(E.localName)||n?.has(E))return;let dt=$||!!E.shadowRoot;if(!dt){for(let U=E.firstElementChild;U!==null;U=U.nextElementSibling)F(U,E,!1,q);return}for(let U of re(E,dt))V(U)&&F(U,E,dt,q)};F(e,null,!1,0);let K=M!==null&&p!==null&&p.isStyleMemoSafe()&&p.propertyNames.length===k&&P.size<=8192;if(K?er.set(e.ownerDocument,{signature:M,memoKeysByParentKey:T,memoizedStylesByKey:P,variantEmittedStyles:_,memoKeyByElement:z,attributeGeneration:De,nextMemoKey:B}):er.delete(e.ownerDocument),p!==null&&x.size<=8192){let E=u&&c.scanByText===x&&c.feedScanCount===x.size?c.dedupedFeed:null;if(E===null){let L=new Set,$=[];for(let O of x.values())if(O.registryFeed!==null)for(let W of O.registryFeed){let D=`${W[0]}|${W[1]}`;L.has(D)||(L.add(D),$.push(W))}E=$}tr.set(e.ownerDocument,{sheetSignature:d,laneSignature:g,scanByText:x,dedupedFeed:E,feedScanCount:x.size})}else tr.delete(e.ownerDocument);return{snapshotByElement:o,perElementPropertyNames:b,persistedVariantEmittedStyles:K?_:null,inlineCarryTextByElement:l}};var Yi=e=>{if(e.includes(\"inset\"))return 0;let[t=0,r=0,n=0,o=0]=At(e),l=n*1.5;return Math.max(0,l+o-t,l+o+t,l+o-r,l+o+r)},qi=e=>{if(!e||e===\"none\")return 0;let t=0;for(let r of ie(e))t=Math.max(t,Yi(r));return t},Xi=e=>{let t=e[\"outline-style\"];if(!t||t===\"none\")return 0;let r=v(e[\"outline-width\"]);return r<=0?0:Math.max(0,r+v(e[\"outline-offset\"]))},at=e=>Math.ceil(Math.max(qi(e[\"box-shadow\"]),Xi(e),ke(e.filter))),ji=e=>e!==\"inline\"&&e!==\"contents\"&&!e.startsWith(\"table\")&&!e.startsWith(\"ruby\")&&!e.startsWith(\"inline-table\"),Zi=(e,t)=>{let r=t.getComputedStyle(e),n=at({\"box-shadow\":r.getPropertyValue(\"box-shadow\"),filter:r.getPropertyValue(\"filter\"),\"outline-style\":r.getPropertyValue(\"outline-style\"),\"outline-width\":r.getPropertyValue(\"outline-width\"),\"outline-offset\":r.getPropertyValue(\"outline-offset\")}),o=at({\"box-shadow\":r.getPropertyValue(\"text-shadow\")});return Math.max(n,o)},Mo=(e,t,r)=>{let n=new Set,o=e.ownerDocument.defaultView;if(!o)return n;let l=t.x-32,i=t.y-32,a=t.x+t.width+32,s=t.y+t.height+32,d=t.x-r,c=t.y-r,u=t.x+t.width+r,f=t.y+t.height+r,p=b=>{let m=b.getBoundingClientRect(),g=m.left<a&&m.right>l&&m.top<s&&m.bottom>i,x=m.left<u&&m.right>d&&m.top<f&&m.bottom>c,A=!g&&x?Zi(b,o):0,S={left:m.left-A,top:m.top-A,right:m.right+A,bottom:m.bottom+A},w=!1;for(let y of re(b))if(V(y)){w=!0;let R=p(y);R.left<S.left&&(S.left=R.left),R.top<S.top&&(S.top=R.top),R.right>S.right&&(S.right=R.right),R.bottom>S.bottom&&(S.bottom=R.bottom)}else y.nodeType===Node.TEXT_NODE&&y.textContent!==\"\"&&(w=!0);return w&&!(S.left<a&&S.right>l&&S.top<s&&S.bottom>i)&&b!==e&&ji(o.getComputedStyle(b).getPropertyValue(\"display\"))&&n.add(b),S};return p(e),n},Bo=e=>{let t=e.ownerDocument.defaultView;if(!t)return\"\";let r=ve(e);for(;r;){let n=t.getComputedStyle(r).backgroundColor;if(n&&n!==\"rgba(0, 0, 0, 0)\"&&n!==\"transparent\")return n;r=ve(r)}return\"\"};var Le=8e3,we=new Map,Qi=e=>we.set(e,(we.get(e)??0)+1),Ji=e=>{let t=we.get(e)-1;t>0?we.set(e,t):we.delete(e)},rr=e=>({...e,abortSignal:e.resultAbortSignal}),nr=async(e,t)=>{let r=jn(e.timeoutMs??Le,e.abortSignal);try{r.check();let n=await ae(t(r),r.signal);return r.check(),n}finally{r.dispose()}},vo=(e,t)=>{let r=e.ownerDocument.defaultView,n={x:r.scrollX,y:r.scrollY,width:e.clientWidth,height:e.clientHeight};return Fe(e,{scale:1,pixelRatio:t.pixelRatio,backgroundColor:void 0,embedFonts:t.embedFonts,bleed:0,clip:n.width>0&&n.height>0?{x:0,y:0,width:n.width,height:n.height}:void 0,prunedElements:void 0,filterNode:void 0,resolveIframeContent:void 0,timeoutMs:t.timeoutMs,abortSignal:t.abortSignal,budget:t.budget,resultAbortSignal:t.abortSignal},{suppressedBackdropElements:null,skipBackdropFilterBaking:!1,viewport:n})},ea=async(e,t)=>{if(t.resolveIframeContent)try{let r=await ae(t.resolveIframeContent(e),t.abortSignal);if(r){let n=await ae(Cn(r),t.abortSignal);if(n)return{pngDataUrl:r,widthPx:n.widthPx,heightPx:n.heightPx,canvasBackgroundColor:null}}}catch(r){if(t.abortSignal?.aborted)throw r}return Ln(e,t.pixelRatio,t.abortSignal)},ta=async(e,t)=>{let r=new Map,n=[];for(let l of e.keys()){if(!I(l,\"iframe\"))continue;let i=l.contentDocument,a=i?.documentElement;if(!i||!a||!i.defaultView){n.push(l);continue}if(!we.has(i))try{let s=await vo(a,t);r.set(l,{pngDataUrl:await s.toPngDataUrl(),widthPx:s.width,heightPx:s.height,canvasBackgroundColor:tt(i)})}catch(s){if(t.abortSignal?.aborted)throw s}}let o=await Promise.all(n.map(l=>ea(l,t)));for(let l=0;l<n.length;l+=1){let i=o[l];i&&r.set(n[l],i)}return r},Fe=async(e,t,r)=>{let n=e.ownerDocument,o=n.defaultView;if(!o)throw Error(\"captureNode requires an element attached to a window\");if(!e.isConnected)throw Error(\"captureNode requires an element attached to a document\");t.abortSignal?.throwIfAborted(),Qi(n);try{n.fonts.status!==\"loaded\"&&await ae(n.fonts.ready,t.abortSignal);let l=r.viewport??null,i=!r.skipBackdropFilterBaking&&r.suppressedBackdropElements===null?Rt(t):null;if(i!==null&&l&&(i+=`|viewport:${l.x},${l.y},${l.width},${l.height}`),i!==null){let B=kt(e,i);if(B)return t.backgroundColor=B.resolvedBackgroundColor,rt(B.svgMarkup,B.widthPx,B.heightPx,rr(t),B.clipRect)}let a=e.getBoundingClientRect(),s=e===n.documentElement?Math.max(a.height,e.scrollHeight):a.height,d=Math.ceil(a.right)-Math.floor(a.left),c=Math.ceil(a.top+s)-Math.floor(a.top),u=le(e)?e.offsetWidth:0,f=le(e)?Math.max(e.offsetHeight,Math.round(s)):0,p=Math.max(1,u>0?u:d),b=Math.max(1,f>0?f:c);eo(e,t.timeoutMs);let m=performance.now(),{snapshotByElement:g,perElementPropertyNames:x,persistedVariantEmittedStyles:A,inlineCarryTextByElement:S}=r.presnapshottedTree??No(e,o,t.filterNode,t.prunedElements);Y.snapshotMs=performance.now()-m;let w=i!==null?zr(e,g):null,y=g.get(e);if(!y)throw Error(\"captureNode target was excluded by filterNode or is not capturable\");let R=t.bleed===\"auto\"?at(y.styles):Math.max(0,Math.ceil(t.bleed)),N=$n({rootElement:e,rootStyles:y.styles,defaultView:o,layoutWidthPx:p,layoutHeightPx:b,bleedPx:R});if(!N.rootLinearTransform){let B=a.left-Math.floor(a.left),F=a.top-Math.floor(a.top);N={...N,layoutWidthPx:a.width>0?a.width:N.layoutWidthPx,layoutHeightPx:s>0?s:N.layoutHeightPx,outputWidthPx:Math.max(1,d)+2*R,outputHeightPx:Math.max(1,c)+2*R,contentOffsetLeftPx:R+B,contentOffsetTopPx:R+F}}let k=t.clip?{x:t.clip.x+N.contentOffsetLeftPx,y:t.clip.y+N.contentOffsetTopPx,width:t.clip.width,height:t.clip.height}:null;if(t.backgroundColor===void 0){let B=y.styles[\"background-color\"];(!B||B===\"rgba(0, 0, 0, 0)\"||B===\"transparent\"||N.rootLinearTransform||R>0)&&(t.backgroundColor=Bo(e)||void 0)}let M=performance.now(),h=await ae(ta(g,t),t.abortSignal);Y.iframesMs=performance.now()-M,t.abortSignal?.throwIfAborted();let C=new Map,T=performance.now();if(!r.skipBackdropFilterBaking){let B=Ir(g,e);if(B.length>0){let F=B.map(O=>O.getBoundingClientRect()),K=N.rootLinearTransform?void 0:vr(B,F,g,a),E=await Fe(e,{...t,scale:1,bleed:0,clip:K,resultAbortSignal:t.abortSignal},{suppressedBackdropElements:new Set(B),skipBackdropFilterBaking:!0,viewport:l,presnapshottedTree:{snapshotByElement:g,perElementPropertyNames:x,persistedVariantEmittedStyles:A,inlineCarryTextByElement:S}}),L=`${t.pixelRatio}|${t.backgroundColor??\"\"}|${K?.x??0},${K?.y??0}|`+B.map((O,W)=>`${F[W].x},${F[W].y},${F[W].width},${F[W].height},${g.get(O)?.styles[\"backdrop-filter\"]??\"\"}`).join(\";\")+`|${await E.toSvgDataUrl()}`,$=jt.get(L);$&&$.length===B.length?B.forEach((O,W)=>{let D=$[W];D&&C.set(O,D)}):(C=_r({underlayCanvas:await E.toCanvas(),ownerDocument:n,rootElement:e,backdropFilterElements:B,snapshotByElement:g,pixelRatio:t.pixelRatio,backgroundColor:t.backgroundColor,underlayOffsetLeftPx:K?.x??0,underlayOffsetTopPx:K?.y??0}),t.budget.check(),jt.set(L,B.map(O=>C.get(O)??\"\")))}}Y.backdropMs=performance.now()-T,t.abortSignal?.throwIfAborted();let P=cn(n),_;try{let B=performance.now(),F=go(),K=nn(e,{ownerDocument:n,classNameByElement:yo(g,x,P,F,e,N,r.suppressedBackdropElements,C,A),snapshotByElement:g,cloneByElement:new Map,iframeContentByElement:h,viewportScroll:l,prunedElements:t.prunedElements,inlineCarryTextByElement:S});if(!K)throw Error(\"captureNode could not clone the target element\");Y.buildMs=performance.now()-B;let E=performance.now(),[,L]=await ae(Promise.all([(async()=>{await An({clone:K,rules:F.rules,sourceDocument:n,timeoutMs:t.timeoutMs}),await En(K,F.rules,t.timeoutMs)})(),t.embedFonts?In(Mn(F.rules),n,t.timeoutMs,Bn(F.rules),vn(K,F.rules)):Promise.resolve(\"\")]),t.abortSignal);Y.inlineMs=performance.now()-E;let $=performance.now();_=Zn({clone:K,cssText:`${L}\n${lt(n).counterCss}\n${F.toCssText()}\n${xn(K)}`,width:Math.max(N.outputWidthPx,l?.width??0),height:Math.max(N.outputHeightPx,l?.height??0),clip:Se()?null:k,ownerDocument:n}),Y.serializeMs=performance.now()-$}finally{P.dispose()}let z=!!k&&Se(),Oe=k&&!z?k.width:N.outputWidthPx,xe=k&&!z?k.height:N.outputHeightPx,De=k&&!z?null:k;return t.budget.check(),i!==null&&Gr(e,i,w,{svgMarkup:_,widthPx:Oe,heightPx:xe,clipRect:De,resolvedBackgroundColor:t.backgroundColor,contentOffsetLeftPx:N.contentOffsetLeftPx,contentOffsetTopPx:N.contentOffsetTopPx}),rt(_,Oe,xe,rr(t),De)}finally{Ji(n)}},st=async(e,t={})=>{let r=e.ownerDocument.defaultView;if(!r)throw Error(\"captureNode requires an element attached to a window\");return nr(t,n=>Fe(e,{scale:t.scale??1,pixelRatio:t.pixelRatio??r.devicePixelRatio,backgroundColor:t.backgroundColor,embedFonts:t.embedFonts??!0,bleed:t.bleed??0,clip:t.clip,prunedElements:void 0,filterNode:t.filterNode,resolveIframeContent:t.resolveIframeContent,timeoutMs:t.timeoutMs??Le,abortSignal:n.signal,budget:n,resultAbortSignal:t.abortSignal},{suppressedBackdropElements:null,skipBackdropFilterBaking:!1}))},Io=async(e,t={})=>nr(t,r=>ra(e,{...t,abortSignal:r.signal,budget:r,resultAbortSignal:t.abortSignal})),ra=async(e,t)=>{let r=t.root??document.documentElement,n=r.ownerDocument.defaultView;if(!n)throw Error(\"captureRegion requires an element attached to a window\");let o=r.getBoundingClientRect(),l=t.cullMarginPx??256,i=l>=0?Mo(r,e,l):void 0,a={scale:t.scale??1,pixelRatio:t.pixelRatio??n.devicePixelRatio,backgroundColor:t.backgroundColor??tt(r.ownerDocument)??void 0,embedFonts:t.embedFonts??!0,bleed:0,clip:{x:e.x-o.left,y:e.y-o.top,width:e.width,height:e.height},prunedElements:i,filterNode:t.filterNode,resolveIframeContent:t.resolveIframeContent,timeoutMs:t.timeoutMs??Le,abortSignal:t.abortSignal,budget:t.budget,resultAbortSignal:t.resultAbortSignal},s={...a,clip:void 0,prunedElements:void 0},d=Rt(s);if(d!==null&&a.clip){let c=a.clip,u=()=>{let p=kt(r,d);return!p||p.clipRect!==null?null:rt(p.svgMarkup,p.widthPx,p.heightPx,rr({...s,backgroundColor:p.resolvedBackgroundColor}),{x:c.x+p.contentOffsetLeftPx,y:c.y+p.contentOffsetTopPx,width:c.width,height:c.height})},f=u();if(f)return f;if(Ur(r)){await Fe(r,s,{suppressedBackdropElements:null,skipBackdropFilterBaking:!1});let p=u();if(p)return p;Wr(r)}}return Vr(r),Fe(r,a,{suppressedBackdropElements:null,skipBackdropFilterBaking:!1})},_o=async(e=document)=>{if(e instanceof Element){try{await(await st(e)).toBlob()}catch{}return}let t=e.body??e.documentElement;if(!t)return;let r=e.createElement(\"div\");r.style.cssText=\"position:absolute;left:-99999px;top:0;width:16px;height:16px;background:#fff;\",r.textContent=\"prewarm\",t.appendChild(r);try{await(await st(r)).toBlob()}catch{return}finally{r.remove()}},Lo=()=>Fn(e=>nr({timeoutMs:Le},async t=>{let r=await vo(document.documentElement,{pixelRatio:e,embedFonts:!0,timeoutMs:Le,abortSignal:t.signal,budget:t});return{pngDataUrl:await r.toPngDataUrl(),widthPx:r.width,heightPx:r.height}}));return Ko(na);})();"