@zumer/snapdom 3.3.6-dev.0 → 3.3.6-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/snapdom.js +9 -9
- package/dist/snapdom.mjs +9 -9
- package/package.json +1 -1
package/dist/snapdom.mjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* SnapDOM
|
|
3
|
-
* v3.3.6-dev.
|
|
3
|
+
* v3.3.6-dev.1
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
|
-
var vl=Object.defineProperty;var lt=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var xe=(t,e)=>{for(var n in e)vl(t,n,{get:e[n],enumerable:!0})};function li(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function ci(t="soft"){t==="disabled"&&(D.computedStyle=new WeakMap,D.measureHints=new WeakMap,D.baseStyle=new ft(50),D.defaultStyle=new ft(64),D.image=new ft(100),D.background=new ft(100),D.resource=new ft(150),D.compress=new ft(50))}var ft,D,wt=lt(()=>{"use strict";ft=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let r=this.keys().next().value;r!==void 0&&this.delete(r)}return super.set(e,n)}},D={image:new ft(100),background:new ft(100),resource:new ft(150),defaultStyle:new ft(64),baseStyle:new ft(50),compress:new ft(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function ae(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function kl(t){let e=[],n=0,r=0,i="";for(let o=0;o<t.length;o++){let s=t[o];if(s==="\\"){o++;continue}i?s===i&&(i=""):s==='"'||s==="'"?i=s:s==="("?r++:s===")"?r--:s===","&&r===0&&(e.push(t.slice(n,o)),n=o+1)}return e.push(t.slice(n)),e}function Ze(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of kl(n[1])){let s=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!s)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!Cl.test(a[1].trim()))continue;let l=o.replace(/url\((['"]?)[\s\S]*?\1\)/," ").match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)\b/i),f=1;if(l){let c=parseFloat(l[1]);f=/dpi/i.test(l[2])?c/96:c}r.push({url:s[2].trim(),dppx:f})}return r.length?(r.sort((o,s)=>o.dppx-s.dppx),(r.find(o=>o.dppx>=e)||r[r.length-1]).url):null}function Fr(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==6?`matrix(${r})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==16?`matrix3d(${r})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Gt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function Tr(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function Je(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function Pr(t){return"\u2022".repeat(String(t??"").length)}function it(t,e){return t?.nodeType===1&&t.localName===e}function Mt(t){return t?.nodeType===1&&t.namespaceURI===Ml}function Tt(t){return t?.nodeType===1&&t.namespaceURI===Al}function Wt(t){return t?.nodeType===11&&!!t.host}function Pt(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function $r(t){return t?.nodeType===9}var Rr,Cl,Ml,Al,At=lt(()=>{"use strict";Rr=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,Cl=Rr;Ml="http://www.w3.org/1999/xhtml",Al="http://www.w3.org/2000/svg"});function _l(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,i=0;function o(s,a,l){if(i>=n)return;let f=Date.now();(r.get(a)||0)>f||(r.set(a,f+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){o("warn",s,a)},errorOnce(s,a){o("error",s,a)},reset(){r.clear(),i=0}}}function di(t,e,n){if(Bt.size>=ui){let r=Date.now();for(let[i,o]of Bt)o.until<=r&&Bt.delete(i);for(;Bt.size>=ui;)Bt.delete(Bt.keys().next().value)}Bt.set(t,{until:Date.now()+n,result:e})}function El(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Rl(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(r||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function Fl(t,e){if(!e||El(t)||Rl(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(t,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!e}}function Tl(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>Gt(t)).replace("{url}",()=>encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${Gt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function pi(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(t)})}function Pl(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function hi(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function Lr(t,e){try{t.onError?.(e)}catch{}}async function at(t,e={}){let n=e.as??"blob",r=e.timeout??3e3,i=e.useProxy||"",o=e.errorTTL??8e3,s=e.headers||{},a=!!e.silent;if(/^data:/i.test(t))try{if(n==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,g="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(g)?atob(y):decodeURIComponent(y),x=new Uint8Array([...w].map(S=>S.charCodeAt(0))),C=new Blob([x],{type:(g||"").split(";")[0]||""});return{ok:!0,data:C,status:200,url:t,fromCache:!1,mime:C.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let g=await fetch(t);if(!g.ok)return{ok:!1,data:null,status:g.status,url:t,fromCache:!1,reason:"http_error"};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await pi(y),blob:y,status:g.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:g.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l;try{l=Pl(t,{as:n,timeout:r,useProxy:i,errorTTL:o,credentials:e.credentials,headers:s})}catch{let g={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return Lr(e,g),g}let f=Bt.get(l);if(f&&f.until>Date.now())return{...f.result,fromCache:!0};f&&Bt.delete(l);let c=Nr.get(l);if(c)return c;let u=Fl(t,i)?Tl(t,i):t,d=e.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,g);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),r),p=(async()=>{try{let g=await fetch(u,{signal:h.signal,credentials:d,headers:s});if(!g.ok){let w={ok:!1,data:null,status:g.status,url:u,fromCache:!1,reason:"http_error"};if(l!==null&&o>0&&di(l,w,o),!a){let x=`${g.status} ${g.statusText||""}`.trim();fi.warnOnce(`http:${g.status}:${n}:${hi(t)}`,`Couldn't load ${t} (HTTP ${x}).`)}return Lr(e,w),w}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:u,fromCache:!1};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await pi(y),blob:y,status:g.status,url:u,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:u,fromCache:!1,mime:b}}catch(g){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":g&&typeof g=="object"&&g.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:u,fromCache:!1,reason:y};if(l!==null&&!/^blob:/i.test(t)&&o>0&&di(l,b,o),!a){let w=`${y}:${n}:${hi(t)}`,x=y==="timeout"?`Timed out loading ${t} after ${r}ms. Raise the timeout option or set useProxy.`:y==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;fi.errorOnce(w,x)}return Lr(e,b),b}finally{clearTimeout(m),Nr.delete(l)}})();return l!==null&&Nr.set(l,p),p}var fi,Nr,ui,Bt,le=lt(()=>{"use strict";At();fi=_l("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),Nr=new Map,ui=50,Bt=new Map});async function ve(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let r=Ze(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ae(t);if(!r)return t;let i=Tr(r),o=Gt(i),s=(e.useProxy||"")+"|"+o;if(D.background.has(s)){let a=D.background.get(s);return a?`url("${a}")`:"none"}try{let a=await at(o,{as:"dataURL",useProxy:e.useProxy});return a.ok?(D.background.set(s,a.data),`url("${a.data}")`):(D.background.set(s,null),"none")}catch{return D.background.set(s,null),"none"}}var mi=lt(()=>{"use strict";wt();At();le()});function Dl(t){let e=t.replace(Ol,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function bi(t,e,n,r){for(let i=0;i<t.length;i++){if(--r.budget<0)return!1;let o=t[i],s=o.style;if(s){let l=!!o.selectorText&&Ll.test(o.selectorText);for(let f=0;f<s.length;f++){let c=s[f];if(e.add(c),l&&r.pseudoProps.add(c),s.getPropertyPriority(c)&&r.importantProps.add(c),c.length>5&&(c[0]==="m"||c[0]==="p")){let u=c.startsWith("margin")?"marginUnstable":c.startsWith("padding")?"paddingUnstable":null;u&&!r[u]&&Il.test(s.getPropertyValue(c))&&(r[u]=!0)}}}let a=o.selectorText;if(a&&a.includes(":has(")&&(r.usesHas=!0),a&&a.includes("&"))for(let l=o.parentRule;l&&a.includes("&");l=l.parentRule)l.selectorText&&(a=a.replace(/&/g,`:is(${l.selectorText})`));if(a&&(r.inContainer||yi.test(a)||a.includes("+")||a.includes("~")))for(let l of Dr(a,",")){let f=l.trim();f&&(r.inContainer||yi.test(f)||f.includes("+")||f.includes("~"))&&r.shareUnsafeSels.add(f)}if(a&&a.includes(":"))for(let l in gi)gi[l].test(a)&&n[l].push(Dl(a));if(o.styleSheet){if(!Cn(o.styleSheet,e,n,r))return!1}else if(o.cssRules&&o.cssRules.length){let l=o.constructor?.name==="CSSContainerRule";l&&r.inContainer++;let f=bi(o.cssRules,e,n,r);if(l&&r.inContainer--,!f)return!1}}return!0}function Cn(t,e,n,r){let i;try{i=t.cssRules}catch{i=r.crossOriginRules?.(t)}return i?bi(i,e,n,r):!1}function Or(t,e){for(let n of t){let r=n.effect?.getKeyframes?.()||[];for(let i of r)for(let o of Object.keys(i))o==="offset"||o==="easing"||o==="composite"||o==="computedOffset"||e.add(o.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function wi(t){let e=new Set;return Cn(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Dr(t,e){if(!t.includes(e))return[t];let n=[],r=0,i=null,o=0;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){s++;continue}if(i){a===i&&(i=null);continue}a==='"'||a==="'"?i=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:r===0&&a===e&&(n.push(t.slice(o,s)),o=s+1)}return n.push(t.slice(o)),n}function Wl(t){let e=0,n=null,r=0;for(let c=0;c<t.length;c++){let u=t[c];if(n){u===n&&t[c-1]!=="\\"&&(n=null);continue}u==='"'||u==="'"?n=u:u==="("||u==="["?e++:u===")"||u==="]"?e--:e===0&&(u===" "||u===">"||u==="+"||u==="~")&&(r=c+1)}let i="",o=0;for(let c of t.slice(r))c==="("||c==="["?o++:c===")"||c==="]"?o--:o===0&&(i+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let f=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return f?"t"+f.toLowerCase():null}function Si(t,e){if(!e.length)return"";if(e.some(r=>r.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function Bl(t,e){let n=t.createElement("div"),r={};for(let i in e){let o=e[i];(i==="before"||i==="after")&&o.push("q"),r[i]=Si(n,o)}return r}function xi(t,e){let n={universe:null,pseudoUniverse:null,usesHas:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let r=new Set(Ir),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},o={budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set,crossOriginRules:e};for(let c of t.styleSheets)if(!Cn(c,r,i,o))return n;let s=t.adoptedStyleSheets;if(Array.isArray(s)){for(let c of s)if(!Cn(c,r,i,o))return n}typeof t.getAnimations=="function"&&Or(t.getAnimations(),r);let a=Array.from(o.shareUnsafeSels),l=Si(t.createElement("div"),a)===null?null:a.map(c=>({sel:c,key:Wl(c)})),f=new Set(Nl);for(let c of $l)r.has(c)&&f.add(c);for(let c of o.pseudoProps)f.add(c);return(o.pseudoProps.has("transform")||o.pseudoProps.has("rotate")||o.pseudoProps.has("scale"))&&f.add("transform-origin"),o.pseudoProps.has("perspective")&&f.add("perspective-origin"),{universe:r,pseudoUniverse:f,pseudoGates:Bl(t,i),usesHas:o.usesHas,shareGate:l,marginUnstable:o.marginUnstable,paddingUnstable:o.paddingUnstable,importantProps:o.importantProps}}catch{return n}}var Ir,$l,Nl,Ll,Il,gi,Ol,yi,kn=lt(()=>{"use strict";Ir=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","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","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],$l=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],Nl=["display","width","height","min-width","min-height"],Ll=/::?(?:before|after|first-letter|first-line|marker)/,Il=/%|\bauto\b|calc\(|var\(/i,gi={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},Ol=/::?(?:before|after|first-letter|first-line|marker)\b/g;yi=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function J(t){return vi.add(t),t.setAttribute("data-snapdom-internal",""),t}function Xt(t){return vi.has(t)}var vi,_t=lt(()=>{"use strict";vi=new WeakSet});function Br(t){if(t=String(t).toLowerCase(),tn.has(t)){let o={};return D.defaultStyle.set(t,o),o}if(D.defaultStyle.has(t))return D.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(Xt);e||(e=document.createElement("div"),J(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),i={};for(let o of r){if(Ce(o))continue;let s=r.getPropertyValue(o);i[o]=s}for(let o of Ir)!(o in i)&&!Ce(o)&&(i[o]=r.getPropertyValue(o));return e.removeChild(n),D.defaultStyle.set(t,i),i}function Ce(t){let e=Ci.get(t);if(e===void 0){let n=String(t).toLowerCase();e=Hl.has(n)||zl.test(n)||Ul.test(n),Ci.set(t,e)}return e}function Mi(t,e){let n=Xl.get(t);if(n===void 0||e[n]!==e[t])return!1;let r=e["writing-mode"];if(r&&r!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function Mn(t,e){return!Vl.has(t)&&(e==="inline"||jl.has(t)||ki.has(t))}function Ur(t,e,n){let r=(e.display||"").toLowerCase();if(r==="inline"||ki.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let o=(e.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!Kl.has(r)}function ke(t,e,n=!0,r=!1){if(e=String(e||"").toLowerCase(),tn.has(e))return"";let i=[],o=Br(e),s=(t.display||"").toLowerCase(),a=s==="inline",l=Mn(e,s),f=t["text-wrap-mode"]||t["white-space"]||"",c=f==="nowrap"||f==="pre",d=l&&n&&!(l&&n&&!a&&c),h=!1;for(let m in t){if(Ce(m)||Mi(m,t))continue;let p=t[m];if(d){if(ql.has(m))continue;if(Gl.has(m)){p&&p!==o[m]&&(i.push(`${m}:${p}`),p!=="auto"&&(h=!0));continue}}if(p&&p!==o[m]){if((m==="height"||m==="block-size"||!c&&(m==="width"||m==="inline-size"))&&p.endsWith("px")&&p.includes(".")){let y=parseFloat(p);if(Number.isFinite(y)){i.push(`${m}:${(y+Yl).toFixed(3)}px`);continue}}i.push(`${m}:${p}`)}}if(d&&!a&&!r&&!h){let m=t.width;m&&m!=="auto"&&m!==o.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function zr(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function Hr(t,e=null){let n=new Map;for(let s of t){let a=Br(s);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!Mi(d,a)).map(([d,h])=>`${d}:${h};`).sort(),u=c.join("");u&&(n.has(u)||n.set(u,{tagList:[],declarations:c}),n.get(u).tagList.push(s))}let r=[...n.values()],i=null;for(let{declarations:s}of r){let a=new Set(s);if(!i){i=a;continue}for(let l of i)a.has(l)||i.delete(l)}i??=new Set;let o="";if(i.size&&r.length>1){let s=r.flatMap(a=>a.tagList);o+=`${s.join(",")} { ${[...i].join("")} }
|
|
6
|
+
var Cl=Object.defineProperty;var lt=(t,e,n)=>()=>{if(n)throw n[0];try{return t&&(e=t(t=0)),e}catch(r){throw n=[r],r}};var xe=(t,e)=>{for(var n in e)Cl(t,n,{get:e[n],enumerable:!0})};function li(t){return t===!1||typeof t=="string"&&t.toLowerCase().trim()==="disabled"?"disabled":"soft"}function ci(t="soft"){t==="disabled"&&(D.computedStyle=new WeakMap,D.measureHints=new WeakMap,D.baseStyle=new ft(50),D.defaultStyle=new ft(64),D.image=new ft(100),D.background=new ft(100),D.resource=new ft(150),D.compress=new ft(50))}var ft,D,wt=lt(()=>{"use strict";ft=class extends Map{constructor(e=100,...n){super(...n),this._maxSize=e}set(e,n){if(this.size>=this._maxSize&&!this.has(e)){let r=this.keys().next().value;r!==void 0&&this.delete(r)}return super.set(e,n)}},D={image:new ft(100),background:new ft(100),resource:new ft(150),defaultStyle:new ft(64),baseStyle:new ft(50),compress:new ft(50),computedStyle:new WeakMap,measureHints:new WeakMap,warnedReconcile:!1}});function ae(t){let e=t.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;let n=e[2].trim();return n.startsWith("#")?null:n}function Ml(t){let e=[],n=0,r=0,i="";for(let o=0;o<t.length;o++){let s=t[o];if(s==="\\"){o++;continue}i?s===i&&(i=""):s==='"'||s==="'"?i=s:s==="("?r++:s===")"?r--:s===","&&r===0&&(e.push(t.slice(n,o)),n=o+1)}return e.push(t.slice(n)),e}function Qe(t,e=1){let n=t.match(/^\s*-?(?:webkit-)?image-set\(([\s\S]*)\)\s*$/i);if(!n)return null;let r=[];for(let o of Ml(n[1])){let s=o.match(/url\((['"]?)(.*?)(\1)\)/);if(!s)continue;let a=o.match(/type\(\s*["']([^"']+)["']\s*\)/i);if(a&&!kl.test(a[1].trim()))continue;let l=o.replace(/url\((['"]?)[\s\S]*?\1\)/," ").match(/(\d+(?:\.\d+)?)\s*(x|dpi|dppx)\b/i),f=1;if(l){let c=parseFloat(l[1]);f=/dpi/i.test(l[2])?c/96:c}r.push({url:s[2].trim(),dppx:f})}return r.length?(r.sort((o,s)=>o.dppx-s.dppx),(r.find(o=>o.dppx>=e)||r[r.length-1]).url):null}function Fr(t){if(!t||t==="none")return"";let e=t.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==6?`matrix(${r})`:(i[4]="0",i[5]="0",`matrix(${i.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(n,r)=>{let i=r.split(",").map(o=>o.trim());return i.length!==16?`matrix3d(${r})`:(i[12]="0",i[13]="0",`matrix3d(${i.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Gt(t){if(/%[0-9A-Fa-f]{2}/.test(t))return t;try{return encodeURI(t)}catch{return t}}function Tr(t,e){if(!t||/^(data|blob|about|#)/i.test(t.trim()))return t;try{let n=e||typeof document<"u"&&(document.baseURI||document.location?.href)||"http://localhost/";return new URL(t,n).href}catch{return t}}function Ze(t){return!!t&&t.tagName==="INPUT"&&(t.getAttribute("type")||"").toLowerCase()==="password"}function Pr(t){return"\u2022".repeat(String(t??"").length)}function it(t,e){return t?.nodeType===1&&t.localName===e}function Mt(t){return t?.nodeType===1&&t.namespaceURI===Al}function Tt(t){return t?.nodeType===1&&t.namespaceURI===_l}function Wt(t){return t?.nodeType===11&&!!t.host}function Pt(t){let e=t?.parentNode;return e?.nodeType===11?e.host:null}function $r(t){return t?.nodeType===9}var Rr,kl,Al,_l,At=lt(()=>{"use strict";Rr=/^image\/(jpeg|jpg|png|gif|webp|avif|apng|svg\+xml|bmp|x-icon|vnd\.microsoft\.icon)\s*(;|$)/i,kl=Rr;Al="http://www.w3.org/1999/xhtml",_l="http://www.w3.org/2000/svg"});function El(t="[SnapDOM]",{ttlMs:e=5*6e4,maxEntries:n=12}={}){let r=new Map,i=0;function o(s,a,l){if(i>=n)return;let f=Date.now();(r.get(a)||0)>f||(r.set(a,f+e),i++,s==="warn"&&console&&console.warn?console.warn(`${t} ${l}`):console&&console.error&&console.error(`${t} ${l}`))}return{warnOnce(s,a){o("warn",s,a)},errorOnce(s,a){o("error",s,a)},reset(){r.clear(),i=0}}}function di(t,e,n){if(Bt.size>=ui){let r=Date.now();for(let[i,o]of Bt)o.until<=r&&Bt.delete(i);for(;Bt.size>=ui;)Bt.delete(Bt.keys().next().value)}Bt.set(t,{until:Date.now()+n,result:e})}function Rl(t){return/^data:|^blob:|^about:blank$/i.test(t)}function Fl(t,e){try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=e.split(/\{url(?:Raw)?\}/)[0],i=new URL(r||".",n);if(new URL(t,n).origin===i.origin)return!0}catch{}return!1}function Tl(t,e){if(!e||Rl(t)||Fl(t,e))return!1;try{let n=typeof location<"u"&&location.href?location.href:"http://localhost/",r=new URL(t,n);return typeof location<"u"?r.origin!==location.origin:!0}catch{return!!e}}function Pl(t,e){if(!e)return t;if(/\{url(?:Raw)?\}/.test(e))return e.replace("{urlRaw}",()=>Gt(t)).replace("{url}",()=>encodeURIComponent(t));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(t)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(t)}`;if(e.endsWith("/"))return`${e}${Gt(t)}`;let n=e.includes("?")?"&":"?";return`${e}${n}url=${encodeURIComponent(t)}`}function pi(t){return new Promise((e,n)=>{let r=new FileReader;r.onload=()=>e(String(r.result||"")),r.onerror=()=>n(new Error("read_failed")),r.readAsDataURL(t)})}function $l(t,e){return new Headers(e.headers||{}).keys().next().done?JSON.stringify([e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,e.credentials||"",t]):null}function hi(t){try{return new URL(t,globalThis.location?.href||"http://localhost/").origin}catch{return"invalid-url"}}function Lr(t,e){try{t.onError?.(e)}catch{}}async function at(t,e={}){let n=e.as??"blob",r=e.timeout??3e3,i=e.useProxy||"",o=e.errorTTL??8e3,s=e.headers||{},a=!!e.silent;if(/^data:/i.test(t))try{if(n==="text")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1};if(n==="dataURL")return{ok:!0,data:String(t),status:200,url:t,fromCache:!1,mime:String(t).slice(5).split(";")[0]||""};let[,g="",y=""]=String(t).match(/^data:([^,]*),(.*)$/)||[],w=/;base64/i.test(g)?atob(y):decodeURIComponent(y),x=new Uint8Array([...w].map(S=>S.charCodeAt(0))),C=new Blob([x],{type:(g||"").split(";")[0]||""});return{ok:!0,data:C,status:200,url:t,fromCache:!1,mime:C.type||""}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(t))try{let g=await fetch(t);if(!g.ok)return{ok:!1,data:null,status:g.status,url:t,fromCache:!1,reason:"http_error"};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await pi(y),blob:y,status:g.status,url:t,fromCache:!1,mime:b}:n==="text"?{ok:!0,data:await y.text(),status:g.status,url:t,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:t,fromCache:!1,mime:b}}catch{return{ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(t))return n==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:t,fromCache:!1,mime:"image/png"}:{ok:!0,data:n==="text"?"":new Blob([]),status:200,url:t,fromCache:!1};let l;try{l=$l(t,{as:n,timeout:r,useProxy:i,errorTTL:o,credentials:e.credentials,headers:s})}catch{let g={ok:!1,data:null,status:0,url:t,fromCache:!1,reason:"network"};return Lr(e,g),g}let f=Bt.get(l);if(f&&f.until>Date.now())return{...f.result,fromCache:!0};f&&Bt.delete(l);let c=Nr.get(l);if(c)return c;let u=Tl(t,i)?Pl(t,i):t,d=e.credentials;if(!d)try{let g=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(t,g);d=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{d="omit"}let h=new AbortController,m=setTimeout(()=>h.abort("timeout"),r),p=(async()=>{try{let g=await fetch(u,{signal:h.signal,credentials:d,headers:s});if(!g.ok){let w={ok:!1,data:null,status:g.status,url:u,fromCache:!1,reason:"http_error"};if(l!==null&&o>0&&di(l,w,o),!a){let x=`${g.status} ${g.statusText||""}`.trim();fi.warnOnce(`http:${g.status}:${n}:${hi(t)}`,`Couldn't load ${t} (HTTP ${x}).`)}return Lr(e,w),w}if(n==="text")return{ok:!0,data:await g.text(),status:g.status,url:u,fromCache:!1};let y=await g.blob(),b=y.type||g.headers.get("content-type")||"";return n==="dataURL"?{ok:!0,data:await pi(y),blob:y,status:g.status,url:u,fromCache:!1,mime:b}:{ok:!0,data:y,status:g.status,url:u,fromCache:!1,mime:b}}catch(g){let y=h.signal.aborted?h.signal.reason==="timeout"?"timeout":"abort":g&&typeof g=="object"&&g.name==="AbortError"?"abort":"network",b={ok:!1,data:null,status:0,url:u,fromCache:!1,reason:y};if(l!==null&&!/^blob:/i.test(t)&&o>0&&di(l,b,o),!a){let w=`${y}:${n}:${hi(t)}`,x=y==="timeout"?`Timed out loading ${t} after ${r}ms. Raise the timeout option or set useProxy.`:y==="abort"?`Loading ${t} was cancelled.`:`Couldn't load ${t} (network or CORS). Try the useProxy option.`;fi.errorOnce(w,x)}return Lr(e,b),b}finally{clearTimeout(m),Nr.delete(l)}})();return l!==null&&Nr.set(l,p),p}var fi,Nr,ui,Bt,le=lt(()=>{"use strict";At();fi=El("[SnapDOM]",{ttlMs:3*6e4,maxEntries:10}),Nr=new Map,ui=50,Bt=new Map});async function ve(t,e={}){if(/^\s*url\(\s*['"]?data:/i.test(t)||/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(t)||t.trim()==="none")return t;let r=Qe(t,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ae(t);if(!r)return t;let i=Tr(r),o=Gt(i),s=(e.useProxy||"")+"|"+o;if(D.background.has(s)){let a=D.background.get(s);return a?`url("${a}")`:"none"}try{let a=await at(o,{as:"dataURL",useProxy:e.useProxy});return a.ok?(D.background.set(s,a.data),`url("${a.data}")`):(D.background.set(s,null),"none")}catch{return D.background.set(s,null),"none"}}var mi=lt(()=>{"use strict";wt();At();le()});function Wl(t){let e=t.replace(Dl,"").trim();return e?e.replace(/(^|,)(\s*)(?=,|$)/g,"$1$2*"):"*"}function bi(t,e,n,r){for(let i=0;i<t.length;i++){if(--r.budget<0)return!1;let o=t[i],s=o.style;if(s){let l=!!o.selectorText&&Il.test(o.selectorText);for(let f=0;f<s.length;f++){let c=s[f];if(e.add(c),l&&r.pseudoProps.add(c),s.getPropertyPriority(c)&&r.importantProps.add(c),c.length>5&&(c[0]==="m"||c[0]==="p")){let u=c.startsWith("margin")?"marginUnstable":c.startsWith("padding")?"paddingUnstable":null;u&&!r[u]&&Ol.test(s.getPropertyValue(c))&&(r[u]=!0)}}}let a=o.selectorText;if(a&&a.includes(":has(")&&(r.usesHas=!0),a&&a.includes("&"))for(let l=o.parentRule;l&&a.includes("&");l=l.parentRule)l.selectorText&&(a=a.replace(/&/g,`:is(${l.selectorText})`));if(a&&(r.inContainer||yi.test(a)||a.includes("+")||a.includes("~")))for(let l of Dr(a,",")){let f=l.trim();f&&(r.inContainer||yi.test(f)||f.includes("+")||f.includes("~"))&&r.shareUnsafeSels.add(f)}if(a&&a.includes(":"))for(let l in gi)gi[l].test(a)&&n[l].push(Wl(a));if(o.styleSheet){if(!vn(o.styleSheet,e,n,r))return!1}else if(o.cssRules&&o.cssRules.length){let l=o.constructor?.name==="CSSContainerRule";l&&r.inContainer++;let f=bi(o.cssRules,e,n,r);if(l&&r.inContainer--,!f)return!1}}return!0}function vn(t,e,n,r){let i;try{i=t.cssRules}catch{i=r.crossOriginRules?.(t)}return i?bi(i,e,n,r):!1}function Or(t,e){for(let n of t){let r=n.effect?.getKeyframes?.()||[];for(let i of r)for(let o of Object.keys(i))o==="offset"||o==="easing"||o==="composite"||o==="computedOffset"||e.add(o.replace(/[A-Z]/g,s=>"-"+s.toLowerCase()))}}function wi(t){let e=new Set;return vn(t,e,{before:[],after:[],firstLetter:[],marker:[],firstLine:[]},{budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set})?e:null}function Dr(t,e){if(!t.includes(e))return[t];let n=[],r=0,i=null,o=0;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){s++;continue}if(i){a===i&&(i=null);continue}a==='"'||a==="'"?i=a:a==="("||a==="["?r++:a===")"||a==="]"?r--:r===0&&a===e&&(n.push(t.slice(o,s)),o=s+1)}return n.push(t.slice(o)),n}function Bl(t){let e=0,n=null,r=0;for(let c=0;c<t.length;c++){let u=t[c];if(n){u===n&&t[c-1]!=="\\"&&(n=null);continue}u==='"'||u==="'"?n=u:u==="("||u==="["?e++:u===")"||u==="]"?e--:e===0&&(u===" "||u===">"||u==="+"||u==="~")&&(r=c+1)}let i="",o=0;for(let c of t.slice(r))c==="("||c==="["?o++:c===")"||c==="]"?o--:o===0&&(i+=c);let s=c=>!c||/\\[0-9a-fA-F]/.test(c)?null:c.replace(/\\(.)/g,"$1"),a=s((i.match(/\.((?:\\.|[\w-])+)/)||[])[1]);if(a)return"c"+a;let l=s((i.match(/#((?:\\.|[\w-])+)/)||[])[1]);if(l)return"i"+l;let f=(i.match(/^([a-zA-Z][\w-]*)/)||[])[1];return f?"t"+f.toLowerCase():null}function Si(t,e){if(!e.length)return"";if(e.some(r=>r.includes("&")))return null;let n=e.join(",");try{return t.matches(n),n}catch{return null}}function Ul(t,e){let n=t.createElement("div"),r={};for(let i in e){let o=e[i];(i==="before"||i==="after")&&o.push("q"),r[i]=Si(n,o)}return r}function xi(t,e){let n={universe:null,pseudoUniverse:null,usesHas:!0,shareGate:null,marginUnstable:!0,paddingUnstable:!0,importantProps:null,pseudoGates:{before:null,after:null,firstLetter:null,marker:null,firstLine:null}};try{let r=new Set(Ir),i={before:[],after:[],firstLetter:[],marker:[],firstLine:[]},o={budget:2e4,usesHas:!1,shareUnsafeSels:new Set,inContainer:0,marginUnstable:!1,paddingUnstable:!1,importantProps:new Set,pseudoProps:new Set,crossOriginRules:e};for(let c of t.styleSheets)if(!vn(c,r,i,o))return n;let s=t.adoptedStyleSheets;if(Array.isArray(s)){for(let c of s)if(!vn(c,r,i,o))return n}typeof t.getAnimations=="function"&&Or(t.getAnimations(),r);let a=Array.from(o.shareUnsafeSels),l=Si(t.createElement("div"),a)===null?null:a.map(c=>({sel:c,key:Bl(c)})),f=new Set(Ll);for(let c of Nl)r.has(c)&&f.add(c);for(let c of o.pseudoProps)f.add(c);return(o.pseudoProps.has("transform")||o.pseudoProps.has("rotate")||o.pseudoProps.has("scale"))&&f.add("transform-origin"),o.pseudoProps.has("perspective")&&f.add("perspective-origin"),{universe:r,pseudoUniverse:f,pseudoGates:Ul(t,i),usesHas:o.usesHas,shareGate:l,marginUnstable:o.marginUnstable,paddingUnstable:o.paddingUnstable,importantProps:o.importantProps}}catch{return n}}var Ir,Nl,Ll,Il,Ol,gi,Dl,yi,Cn=lt(()=>{"use strict";Ir=["display","position","top","right","bottom","left","float","clear","z-index","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","visibility","opacity","content-visibility","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","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","order","align-items","align-self","align-content","justify-content","justify-items","justify-self","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-auto-flow","grid-auto-columns","grid-auto-rows","grid-column-start","grid-column-end","grid-row-start","grid-row-end","color","font-family","font-size","font-weight","font-style","font-stretch","line-height","letter-spacing","word-spacing","white-space","text-align","text-transform","text-indent","text-overflow","text-shadow","direction","unicode-bidi","writing-mode","text-orientation","word-break","overflow-wrap","tab-size","list-style-type","list-style-position","list-style-image","counter-reset","counter-increment","counter-set","background-color","background-image","background-size","background-position","background-repeat","background-clip","background-origin","background-attachment","box-shadow","outline-width","outline-style","outline-color","outline-offset","transform","transform-origin","rotate","scale","translate","filter","mix-blend-mode","clip-path","object-fit","object-position","border-collapse","border-spacing","table-layout","caption-side","empty-cells"],Nl=["color","font-family","font-size","font-weight","font-style","font-stretch","font-variant","font-kerning","font-feature-settings","font-variation-settings","line-height","letter-spacing","word-spacing","white-space","text-align","text-align-last","text-indent","text-transform","text-shadow","text-rendering","direction","unicode-bidi","word-break","overflow-wrap","writing-mode","text-orientation","hyphens","tab-size","visibility","list-style-type","list-style-position","list-style-image","border-collapse","border-spacing","caption-side","empty-cells","quotes","color-scheme","-webkit-text-fill-color","-webkit-font-smoothing","image-rendering"],Ll=["display","width","height","min-width","min-height"],Il=/::?(?:before|after|first-letter|first-line|marker)/,Ol=/%|\bauto\b|calc\(|var\(/i,gi={before:/::?before\b/,after:/::?after\b/,firstLetter:/::?first-letter\b/,marker:/::marker\b/,firstLine:/::?first-line\b/},Dl=/::?(?:before|after|first-letter|first-line|marker)\b/g;yi=/:(nth-|first-child|last-child|only-|first-of-type|last-of-type|empty|hover|focus|active|target|checked|indeterminate|disabled|enabled|read-only|read-write|placeholder-shown|autofill|valid|invalid|user-valid|user-invalid|in-range|out-of-range|required|optional|default|link|any-link|scope|defined|modal|fullscreen|picture-in-picture|playing|paused|dir\(|lang\(|has\()/});function J(t){return vi.add(t),t.setAttribute("data-snapdom-internal",""),t}function Xt(t){return vi.has(t)}var vi,_t=lt(()=>{"use strict";vi=new WeakSet});function Br(t){if(t=String(t).toLowerCase(),Je.has(t)){let o={};return D.defaultStyle.set(t,o),o}if(D.defaultStyle.has(t))return D.defaultStyle.get(t);let e=[...document.querySelectorAll("#snapdom-sandbox")].find(Xt);e||(e=document.createElement("div"),J(e),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));let n=document.createElement(t.includes("-")?"span":t);n.style.all="initial",e.appendChild(n);let r=getComputedStyle(n),i={};for(let o of r){if(Ce(o))continue;let s=r.getPropertyValue(o);i[o]=s}for(let o of Ir)!(o in i)&&!Ce(o)&&(i[o]=r.getPropertyValue(o));return e.removeChild(n),D.defaultStyle.set(t,i),i}function Ce(t){let e=Ci.get(t);if(e===void 0){let n=String(t).toLowerCase();e=jl.has(n)||Hl.test(n)||zl.test(n),Ci.set(t,e)}return e}function Mi(t,e){let n=Yl.get(t);if(n===void 0||e[n]!==e[t])return!1;let r=e["writing-mode"];if(r&&r!=="horizontal-tb")return!1;let i=e.direction;return!(i&&i!=="ltr")}function kn(t,e){return!ql.has(t)&&(e==="inline"||Vl.has(t)||ki.has(t))}function Ur(t,e,n){let r=(e.display||"").toLowerCase();if(r==="inline"||ki.has(t))return!1;if(n)return!0;if((e.float||"none").toLowerCase()!=="none")return!1;let o=(e.position||"static").toLowerCase();return o==="absolute"||o==="fixed"?!1:!Ql.has(r)}function ke(t,e,n=!0,r=!1){if(e=String(e||"").toLowerCase(),Je.has(e))return"";let i=[],o=Br(e),s=(t.display||"").toLowerCase(),a=s==="inline",l=kn(e,s),f=t["text-wrap-mode"]||t["white-space"]||"",c=f==="nowrap"||f==="pre",d=l&&n&&!(l&&n&&!a&&c),h=!1;for(let m in t){if(Ce(m)||Mi(m,t))continue;let p=t[m];if(d){if(Gl.has(m))continue;if(Xl.has(m)){p&&p!==o[m]&&(i.push(`${m}:${p}`),p!=="auto"&&(h=!0));continue}}if(p&&p!==o[m]){if((m==="height"||m==="block-size"||!c&&(m==="width"||m==="inline-size"))&&p.endsWith("px")&&p.includes(".")){let y=parseFloat(p);if(Number.isFinite(y)){i.push(`${m}:${(y+Kl).toFixed(3)}px`);continue}}i.push(`${m}:${p}`)}}if(d&&!a&&!r&&!h){let m=t.width;m&&m!=="auto"&&m!==o.width&&i.push(`min-width:${m}`)}return i.sort(),i.join(";")}function zr(t){let e=new Set;return t.nodeType!==Node.ELEMENT_NODE&&t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(t.tagName&&e.add(t.tagName.toLowerCase()),typeof t.querySelectorAll=="function"&&t.querySelectorAll("*").forEach(n=>e.add(n.tagName.toLowerCase())),Array.from(e))}function Hr(t,e=null){let n=new Map;for(let s of t){let a=Br(s);if(!a)continue;let c=(e?Object.entries(a).filter(([d])=>e.has(d)):Object.entries(a)).filter(([d])=>!Mi(d,a)).map(([d,h])=>`${d}:${h};`).sort(),u=c.join("");u&&(n.has(u)||n.set(u,{tagList:[],declarations:c}),n.get(u).tagList.push(s))}let r=[...n.values()],i=null;for(let{declarations:s}of r){let a=new Set(s);if(!i){i=a;continue}for(let l of i)a.has(l)||i.delete(l)}i??=new Set;let o="";if(i.size&&r.length>1){let s=r.flatMap(a=>a.tagList);o+=`${s.join(",")} { ${[...i].join("")} }
|
|
7
7
|
`}for(let{tagList:s,declarations:a}of r){let l=r.length>1?a.filter(c=>!i.has(c)):a;if(!l.length)continue;let f=l.join("");o+=`${s.join(",")} { ${f} }
|
|
8
|
-
`}return o}function en(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let i of e)n.set(i,`c${r++}`);return n}function Ql(t){try{let e=t?.ownerDocument;if(!e)return typeof window<"u"?window:null;let n=e.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===e)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function I(t,e=null){let n=()=>{let o={length:0,getPropertyValue:()=>"",item:()=>""};return o[Symbol.iterator]=function*(){},o};if(t?.nodeType!==1){let o=typeof window<"u"?window:null;if(o&&typeof o.getComputedStyle=="function")try{return o.getComputedStyle(t,e)||n()}catch{return n()}return n()}let r=D.computedStyle.get(t);r||(r=new Map,D.computedStyle.set(t,r));let i=r.get(e);if(!i){let o=Ql(t),s=null;try{s=o&&typeof o.getComputedStyle=="function"?o.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),r.set(e,i)}return i}function Me(t,e=null){let n={};for(let r of e||t){let i=t.getPropertyValue(r);i&&(n[r]=i)}for(let r of Zl){let i=n[`border-${r}-style`],o=n[`border-${r}-width`];(i==="none"||i==="hidden"||o==="0px")&&(delete n[`border-${r}-style`],delete n[`border-${r}-width`],delete n[`border-${r}-color`])}return n}function Yt(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&n++,o===")"&&n--,o===","&&n===0&&(e.push(t.slice(r,i).trim()),r=i+1)}return e.push(t.slice(r).trim()),e}var Wr,tn,Ul,zl,Hl,Ci,jl,ki,Vl,ql,Gl,Xl,Yl,Kl,Zl,Ae=lt(()=>{"use strict";wt();kn();_t();Wr=new Set(["meta","script","noscript","title","link","template"]),tn=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);Ul=/(?:^|-)(animation|transition)(?:-|$)/i,zl=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,Hl=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Ci=new Map;jl=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),ki=new Set(["table","thead","tbody","tfoot","tr","td","th"]),Vl=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),ql=new Set(["width","max-width","inline-size","max-inline-size"]),Gl=new Set(["min-width","min-inline-size"]),Xl=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));Yl=.001;Kl=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Zl=["top","right","bottom","left"]});function St(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,r=()=>{n||(n=!0,e())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,t)})}function _i(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?Jl:Ai),n=null,r={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let o=()=>{n=null,r.yielded=!0,e=performance.now()+Ai,i()},s=new MessageChannel;s.port1.onmessage=o,s.port2.postMessage(0)}))};return r}function nn(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let t=navigator.userAgent||"",e=/iPhone|iPad|iPod/.test(t),n=navigator.maxTouchPoints>2&&/Macintosh/.test(t);return e||n}function X(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),r=/applewebkit/i.test(t),i=/mobile/i.test(t),o=!/safari/i.test(t),s=r&&i&&o,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),f=/ipad|iphone|ipod/.test(e)&&r;return n||s||a||l||f}function xt(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var Ai,Jl,mt=lt(()=>{"use strict";Ai=16,Jl=40});function j(t,e,n){let r=t&&typeof t=="object"&&(t.options||t);r&&r.debug&&(n!==void 0?console.warn("[SnapDOM]",e,n):console.warn("[SnapDOM]",e))}function Et(t,e,n,r){let i=t&&t.warnings;i&&i.length<tc&&i.push(r===void 0?{code:e,message:n}:{code:e,message:n,detail:r})}var tc,ce=lt(()=>{"use strict";tc=50});var vt=lt(()=>{"use strict";mi();Ae();mt();At();ce()});var fl={};xe(fl,{MAX_RASTER_AREA:()=>oe,MAX_RASTER_SIDE:()=>Lt,__setDecodeFrameIdleMs:()=>Gd,cropSvgText:()=>Sr,decodeSvgFromDataURL:()=>ye,encodeSvgToDataURL:()=>be,fixSafariShadows:()=>vr,peekSvgHeader:()=>xr,toCanvas:()=>Ht});function Od(t,e){try{let n=t.match(/<svg\b[^>]*>/i);if(!n)return t;let r=n[0],i=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(o)||i<=0||o<=0)return t;let s=Math.min(1,Lt/i,Lt/o,Math.sqrt(oe/(i*o)));if(s>=1)return t;let a=Math.max(1,Math.floor(i*s)),l=Math.max(1,Math.floor(o*s));return Et(e,"raster-clamp",`capture ${Math.round(i)}x${Math.round(o)}px exceeds decode limits; downscaled to ${a}x${l}px`),console.warn(`[SnapDOM] ${Math.round(i)}\xD7${Math.round(o)}px is too large for the browser to draw; scaled down to ${a}\xD7${l}px. For full size, export ${typeof CompressionStream=="function"?"a PNG blob, ":""}an SVG, or crop.`),t.replace(r,r.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${l}`))}catch{return t}}function Sr(t,e){let n=["x","y","width","height"].map(S=>Number(e?.[S]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[SnapDOM] crop needs finite x/y and a positive width/height.");let r=t.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let i=r[0],o=(i.match(/\bviewBox="([^"]+)"/i)||[])[1],s=String(o||"").trim().split(/[\s,]+/).map(Number);if(s.length!==4||!s.every(Number.isFinite)||s[2]<=0||s[3]<=0)throw new Error("[SnapDOM] Can't crop: the SVG has no valid viewBox.");let[a,l,f,c]=s,u=Math.max(a,n[0]),d=Math.max(l,n[1]),h=Math.min(a+f,n[0]+n[2]),m=Math.min(l+c,n[1]+n[3]);if(!(h>u)||!(m>d))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let p=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(p)&&p>0?p/f:1,b=Number.isFinite(g)&&g>0?g/c:1,w=Math.max(1,(h-u)*y),x=Math.max(1,(m-d)*b),C=i.replace(/(\bwidth=")[^"]*/i,`$1${w}`).replace(/(\bheight=")[^"]*/i,`$1${x}`).replace(/(\bviewBox=")[^"]*/i,`$1${u} ${d} ${h-u} ${m-d}`);return t.replace(i,C)}function Xo(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function ye(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function xr(t){let e=t.indexOf(",");if(e<0)return"";let n=t.slice(e+1,e+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function be(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function sl(t){let e=[],n="",r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&r++,o===")"&&(r=Math.max(0,r-1)),o===";"&&r===0?(e.push(n),n=""):n+=o}return n.trim()&&e.push(n),e.map(i=>i.trim()).filter(Boolean)}function Dd(t){let e=[],n="",r=0;for(let o=0;o<t.length;o++){let s=t[o];s==="("&&r++,s===")"&&(r=Math.max(0,r-1)),s===","&&r===0?(e.push(n.trim()),n=""):n+=s}n.trim()&&e.push(n.trim());let i=[];for(let o of e){if(/\binset\b/i.test(o))continue;let s=o.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",l="0px",f="0px"]=s;f=`${parseFloat(f)/2}px`;let c=o.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),u=!!c&&c!==",";i.push(`drop-shadow(${a} ${l} ${f}${u?` ${c}`:""})`)}return i.join(" ")}function al(t){let e=sl(t),n=null,r=null,i=null,o=[];for(let a of e){let l=a.indexOf(":");if(l<0)continue;let f=a.slice(0,l).trim().toLowerCase(),c=a.slice(l+1).trim();f==="box-shadow"?i=c:f==="filter"?n=c:f==="-webkit-filter"?r=c:o.push([f,c])}if(i){let a=Dd(i);a&&(n=n?`${n} ${a}`:a,r=r?`${r} ${a}`:a)}let s=[...o];return n&&s.push(["filter",n]),r&&s.push(["-webkit-filter",r]),s.map(([a,l])=>`${a}:${l}`).join(";")}function Wd(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${al(r)}}`)}function Bd(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,Wd(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${al(r)}${n}`),t}function Ud(){return gr||(gr=(async()=>{try{let t='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',e=new Image;e.decoding="sync",e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await e.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(e,0,0);let i=r.getImageData(2,18,1,1).data[3]>128,o=r.getImageData(2,2,1,1).data[3]>128;return{native:i||o,flippedY:o&&!i}}catch{return{native:!1,flippedY:!1}}})(),gr)}function zd(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("?n++:o===")"?n=Math.max(0,n-1):o===","&&n===0&&(e.push(t.slice(r,i)),r=i+1)}return e.push(t.slice(r)),e.map(i=>{let o=0,s=0,a="",l=0;for(;l<i.length;){let f=i[l];if(f==="("?o++:f===")"&&(o=Math.max(0,o-1)),o===0&&(l===0||i[l-1]===" ")){let c=/^-?\d*\.?\d+px/.exec(i.slice(l));if(c){s++,a+=s===2?`${-parseFloat(c[0])}px`:c[0],l+=c[0].length;continue}}a+=f,l++}return a}).join(",")}function Hd(t,e){let n=r=>sl(r).map(i=>{let o=i.indexOf(":");if(o<0)return i;let s=i.slice(0,o).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${zd(i.slice(o+1))}`:i}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,i)=>r.replace(i,i.replace(/([^{}]+)\{([^}]*)\}/g,(o,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(r,i,o)=>`style=${i}${n(o)}${i}`),t}async function vr(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:r}=await Ud();try{let i=t;return n||(i=Bd(i)),r&&(i=Hd(i,n)),{svg:i,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}function jd(){let t=document.createElement("canvas");t.width=16,t.height=16;let e=t.getContext("2d",{willReadFrequently:!0});return e?n=>{e.clearRect(0,0,16,16),e.drawImage(n,0,0,16,16);let r=e.getImageData(0,0,16,16).data;for(let i=3;i<r.length;i+=4)if(r[i]>0)return!0;return!1}:null}async function Vd(t,e,n){J(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await yr(),await yr(),!1;let r=performance.now()+(e?600:150);for(;;){let i;try{i=n(t)}catch{return!1}if(i)return!0;if(performance.now()>r)return!1;await yr()}}finally{try{t.remove()}catch{}}}function wr(){clearTimeout(Zo),re?.remove(),re=null,br=0}function Gd(t){cl=t??ll}function ol(t){if(typeof document>"u"||!document.body)return new Image;if(clearTimeout(Zo),re&&!re.contentDocument&&wr(),re&&br>qd&&wn===0&&wr(),!re){let n=document.createElement("iframe");J(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)re=n,br=0;else{try{n.remove()}catch{}return new Image}}br+=t.length,wn+=1;let e=re.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function Ko(t,e=!1){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,wn=Math.max(0,wn-1),e&&(Yo=!0),!(wn>0)&&(Yo?(Yo=!1,wr()):Zo=setTimeout(wr,cl)))}function il(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function Zd(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),r=0,i=0;for(let o=e;o+48<=t.length;o+=n){let s=t.slice(o,o+48);r++,Qd.some(a=>s.includes(a))||i++}return i*2>r}function Qo(t,e,n,r,i){if(!e.naturalWidth){t.drawImage(e,0,0,n,r);return}let o=n*r,s=o>Xd&&!Zd(i)?Math.min(Kd,Math.ceil(o/Yd)):1;if(s===1){t.drawImage(e,0,0,n,r);return}let a=e.naturalWidth,l=e.naturalHeight/r;for(let f=0;f<s;f++){let c=Math.round(f*r/s),u=f===s-1?r:Math.round((f+1)*r/s);t.drawImage(e,0,c*l,a,(u-c)*l,0,c,n,u-c)}}async function Ht(t,e){let{width:n,height:r,scale:i=1,dpr:o=1,meta:s={},backgroundColor:a,crop:l=null}=e,f=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,c=t,u=!1,d=!1;if(l&&!Xo(t))throw new RangeError("[SnapDOM] Only SVG captures can be cropped.");if(Xo(t)){let m=(xr(t).match(/<svg\b[^>]*>/i)||[])[0]||"",p=parseFloat((m.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((m.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(p)&&Number.isFinite(g)&&p>0&&g>0&&Math.min(1,Lt/p,Lt/g,Math.sqrt(oe/(p*g)))<1;if(l||y||X())try{let b=ye(t);if(l&&(b=Sr(b,l)),X()){let w=await vr(b);b=w.svg,u=w.naturalOnly,d=/@font-face|data:image\//i.test(b)}(y||l)&&(b=Od(b,e.__session)),c=be(b)}catch(b){if(l)throw b;c=t}}let h=f||ol(c);try{f||await il(h,c)}catch(m){if(!h.__snapdomDecodeFrame)throw m;let p=h;h=ol(c),Ko(p);try{await il(h,c)}catch(g){throw Ko(h,e.__releaseDecodeFrame),g}}try{!f&&!X()&&!xt()&&Xo(c)&&/(?:%40|@)font-face/i.test(c)&&await new Promise(F=>{let A=new MessageChannel;A.port1.onmessage=()=>{A.port1.close(),A.port2.close(),F()},A.port2.postMessage(0)});let m=X()&&!f?jd():null,p=!1;m&&(p=await Vd(h,d,m));let g=f?f.width:h.naturalWidth,y=f?f.height:h.naturalHeight,b=l?g:Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:g,w=l?y:Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:y,x,C,S=Number.isFinite(n),k=Number.isFinite(r);if(S&&k)x=Math.max(1,n),C=Math.max(1,r);else if(S){let F=n/Math.max(1,b);x=n,C=w*F}else if(k){let F=r/Math.max(1,w);C=r,x=b*F}else{let F=f&&Number.isFinite(s.vbW)&&Number.isFinite(s.vbH);x=F?s.vbW:g,C=F?s.vbH:y}!S&&!k&&(x=x*i,C=C*i);let E=x*o,R=C*o,v=Math.max(E/Lt,R/Lt,Math.sqrt(E*R/oe));v>1&&(Et(e.__session,"canvas-clamp",`output ${Math.round(E)}x${Math.round(R)}px exceeds canvas limits; downscaled`),console.warn(`[SnapDOM] ${Math.round(E)}\xD7${Math.round(R)}px is larger than a canvas allows; scaled down. For full size, export ${typeof CompressionStream=="function"?"a PNG blob, ":""}an SVG, or crop.`),x/=v,C/=v);let M=Mt(e.canvas)&&it(e.canvas,"canvas")?e.canvas:document.createElement("canvas");M.width=Math.max(1,x*o),M.height=Math.max(1,C*o),M.style.width=`${x}px`,M.style.height=`${C}px`;let _=M.getContext("2d");if(!_)throw new Error("[SnapDOM] The canvas you passed has no 2D context (is it already used for WebGL?).");let T=null,$=e.__layoutZoom||1;if(!f&&$>1&&xt()){let F=$*b/(x*o),A=Math.round(x*o*F),L=Math.round(C*o*F);F>1.01&&A<=Lt&&L<=Lt&&A*L<=oe&&(T={w:A,h:L})}let N=()=>{if(o!==1&&_.scale(o,o),a&&(_.save(),_.fillStyle=a,_.fillRect(0,0,x,C),_.restore()),u&&(Math.round(x*o)!==g||Math.round(C*o)!==y)){let F=document.createElement("canvas");F.width=g,F.height=y,Qo(F.getContext("2d"),h,g,y,c),_.drawImage(F,0,0,x,C)}else{if(_.save(),_.setTransform(1,0,0,1,0,0),T){let F=document.createElement("canvas");for(F.width=T.w,F.height=T.h,Qo(F.getContext("2d"),h,T.w,T.h,c);F.width>x*o*2;){let A=document.createElement("canvas");A.width=Math.ceil(F.width/2),A.height=Math.ceil(F.height/2),A.getContext("2d").drawImage(F,0,0,A.width,A.height),F=A}_.imageSmoothingQuality="high",_.drawImage(F,0,0,x*o,C*o)}else Qo(_,h,x*o,C*o,c);_.restore()}};if(N(),m&&p&&d){let F=!0;try{F=m(h)}catch{}if(!F){let A=performance.now()+600;do{await yr();try{F=m(h)}catch{break}}while(!F&&performance.now()<A);M.width=M.width,N()}}return M}finally{Ko(h,e.__releaseDecodeFrame)}}var Lt,oe,gr,yr,qd,ll,re,br,wn,Yo,cl,Zo,Xd,Yd,Kd,Qd,we=lt(()=>{"use strict";mt();ce();At();_t();Lt=X()?16384:32767,oe=16384*16384;gr=null;yr=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});qd=24*1024*1024,ll=5e3,re=null,br=0,wn=0,Yo=!1,cl=ll,Zo=0;Xd=4e6,Yd=2e6,Kd=8,Qd=["%3C","%3E","%20","%7B","%7D","%3B"]});var Sn={};xe(Sn,{rasterize:()=>Jo});async function Jo(t,e){let n=await Ht(t,e),o=n.width*n.height<=2e6?n.toDataURL(`image/${e.format}`,e.quality):await new Promise(a=>{let l=()=>a(n.toDataURL(`image/${e.format}`,e.quality));try{n.toBlob(f=>{if(!f)return l();let c=new FileReader;c.onload=()=>a(String(c.result||"")),c.onerror=l,c.readAsDataURL(f)},`image/${e.format}`,e.quality)}catch{l()}}),s=new Image;return s.src=o,X()?await s.decode():await new Promise((a,l)=>{if(s.complete&&s.naturalWidth)return a();s.onload=a,s.onerror=l}),s.style.width=`${n.width/e.dpr}px`,s.style.height=`${n.height/e.dpr}px`,s}var Xe=lt(()=>{"use strict";we();mt()});var ti={};xe(ti,{toImg:()=>Jd,toSvg:()=>Jd});async function Jd(t,e){let{scale:n=1,width:r,height:i,meta:o={}}=e,s=Number.isFinite(r),a=Number.isFinite(i),l=Number.isFinite(n)&&n!==1||s||a;if(X()&&l)try{let{svg:d}=await vr(ye(t)),h=(d.match(/<svg\b[^>]*>/i)||[])[0]||"",m=parseFloat((h.match(/\bwidth="([\d.]+)/i)||[])[1]),p=parseFloat((h.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(m)||!Number.isFinite(p))throw new Error("The SVG has no size.");let g=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:m,y=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:p,b,w;s&&a?(b=r,w=i):s?(b=r,w=Math.max(1,Math.round(y*(r/Math.max(1,g))))):a?(w=i,b=Math.max(1,Math.round(g*(i/Math.max(1,y))))):(b=Math.max(1,Math.round(m*n)),w=Math.max(1,Math.round(p*n)));let x=d.replace(/width="[^"]*"/,`width="${b}"`).replace(/height="[^"]*"/,`height="${w}"`),C=new Image;return C.decoding="sync",C.loading="eager",C.src=be(x),await C.decode(),C.style.width=`${b}px`,C.style.height=`${w}px`,C}catch(d){return Et(e.__session,"safari-png-fallback","Safari vector toImg failed; using PNG",d),j(e,"Safari couldn't show the SVG; used a PNG.",d),Jo(t,{...e,format:"png",quality:1,meta:o})}let f=t,c=!1;if(!s&&!a&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let d=ye(t),h=(d.match(/<svg\b[^>]*>/i)||[])[0]||"",m=Number((h.match(/\bwidth="([\d.]+)"/i)||[])[1]),p=Number((h.match(/\bheight="([\d.]+)"/i)||[])[1]);if(m>0&&p>0){let g=h.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(m*n))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(p*n))}"`);f=be(d.replace(h,g)),c=!0}}catch{}let u=new Image;u.decoding="sync",u.loading="eager",u.src=f;try{await u.decode()}catch(d){if(!c)throw d;u.src=t,c=!1,await u.decode()}if(s&&a)u.style.width=`${r}px`,u.style.height=`${i}px`;else if(s){let d=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=r/Math.max(1,d);u.style.width=`${r}px`,u.style.height=`${Math.max(1,Math.round(h*m))}px`}else if(a){let d=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=i/Math.max(1,h);u.style.height=`${i}px`,u.style.width=`${Math.max(1,Math.round(d*m))}px`}else{let d=Math.max(1,Math.round(u.naturalWidth*(c?1:n))),h=Math.max(1,Math.round(u.naturalHeight*(c?1:n)));if(u.style.width=`${d}px`,u.style.height=`${h}px`,!c&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${d}"`).replace(/height="[^"]*"/,`height="${h}"`);u.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,await u.decode()}catch(m){j(e,"Couldn't size the SVG image.",m),u.src!==t&&(u.src=t,await u.decode().catch(()=>{}))}}return u}var ei=lt(()=>{"use strict";vt();ce();Xe();we()});var dl={};xe(dl,{encodePng:()=>tp});function Cr(t,e=new Uint8Array(0)){let n=new Uint8Array(e.length+12),r=new DataView(n.buffer);r.setUint32(0,e.length);for(let o=0;o<4;o++)n[o+4]=t.charCodeAt(o);n.set(e,8);let i=4294967295;for(let o=4;o<n.length-4;o++)i=ul[(i^n[o])&255]^i>>>8;return r.setUint32(n.length-4,(i^4294967295)>>>0),n}async function tp(t,e,n){if(![t,e].every(p=>Number.isInteger(p)&&p>0&&p<=2147483647))throw new RangeError("[SnapDOM] PNG dimensions must be integers from 1 to 2147483647");let r=new Uint8Array(13),i=new DataView(r.buffer);i.setUint32(0,t),i.setUint32(4,e),r[8]=8,r[9]=6;let o=[new Uint8Array([137,80,78,71,13,10,26,10]),Cr("IHDR",r),Cr("sRGB",new Uint8Array([0]))],s=t*4,a=Math.max(1,Math.floor(65536/(s+1))),l=new Uint8Array(s),f=0,c=new CompressionStream("deflate"),u=c.writable.getWriter(),d=c.readable.getReader(),h,m=(async()=>{try{for(;;){let{done:p,value:g}=await d.read();if(p)return;o.push(Cr("IDAT",g))}}catch(p){h=p,await u.abort(p).catch(()=>{})}})();try{for await(let p of n){if(!(p instanceof Uint8Array||p instanceof Uint8ClampedArray)||!p.length||p.length%s)throw new RangeError("[SnapDOM] PNG input must contain complete RGBA rows");let g=p.length/s;if(f+g>e)throw new RangeError("[SnapDOM] PNG input exceeds the declared height");for(let y=0;y<g;y+=a){let b=Math.min(g,y+a),w=new Uint8Array((b-y)*(s+1));for(let x=y;x<b;x++){let C=p.subarray(x*s,(x+1)*s),S=(x-y)*(s+1),k=0,E=0;for(let R=0;R<s;R++){let v=C[R]-(R<4?0:C[R-4])&255,M=C[R]-l[R]&255;k+=Math.min(v,256-v),E+=Math.min(M,256-M),w[S+R+1]=M}if(w[S]=E<=k?2:1,k<E)for(let R=0;R<s;R++)w[S+R+1]=C[R]-(R<4?0:C[R-4]);l=C}await u.write(w)}l=l.slice(),f+=g}if(f!==e)throw new RangeError("[SnapDOM] PNG input does not match the declared height");if(await u.close(),await m,h)throw h;return o.push(Cr("IEND")),new Blob(o,{type:"image/png"})}catch(p){throw await Promise.allSettled([u.abort(p),d.cancel(p)]),await m,p}finally{u.releaseLock(),d.releaseLock()}}var ul,pl=lt(()=>{"use strict";ul=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;ul[t]=e}});function kr(t,e){if(typeof t!="string"||!t.startsWith("data:image/svg+xml"))return null;let n=xr(t).match(/<svg\b[^>]*>/i)?.[0];if(!n)return null;let r=e.crop?Sr(n,e.crop):n,i=parseFloat(r.match(/\bwidth="([^"]+)/i)?.[1]),o=parseFloat(r.match(/\bheight="([^"]+)/i)?.[1]),s=(r.match(/\bviewBox="([^"]+)/i)?.[1]||"").trim().split(/[\s,]+/).map(Number);if(!(i>0&&o>0)||s.length!==4||!s.every(Number.isFinite)||!(s[2]>0&&s[3]>0))return null;let a=Number.isFinite(e.width),l=Number.isFinite(e.height),f=e.meta||{},c=Math.max(1,Math.floor(i)),u=Math.max(1,Math.floor(o)),d=e.crop?c:Number.isFinite(f.vbW)?f.vbW:Number.isFinite(f.w0)?f.w0:c,h=e.crop?u:Number.isFinite(f.vbH)?f.vbH:Number.isFinite(f.h0)?f.h0:u,m=e.dpr??1,p=e.scale??1,g=(a&&l?Math.max(1,e.width):a?e.width:l?e.height*d/Math.max(1,h):c*p)*m,y=(a&&l?Math.max(1,e.height):l?e.height:a?e.width*h/Math.max(1,d):u*p)*m;if(Math.max(i,o,g,y)<=Lt&&i*o<=oe&&g*y<=oe||typeof CompressionStream!="function")return null;return b();async function b(){let{encodePng:w}=await Promise.resolve().then(()=>(pl(),dl)),x=Math.max(1,Math.floor(g)),C=Math.max(1,Math.floor(y)),S=ye(t),k=S.slice(S.indexOf(n)+n.length,S.lastIndexOf("</svg>")),E=r.match(/\bpreserveAspectRatio="([^"]*)"/i)?.[1]||"xMidYMid meet",R=i/s[2],v=o/s[3],M=0,_=0;/\bnone\b/.test(E)||(R=v=/\bslice\b/.test(E)?Math.max(R,v):Math.min(R,v),M=(i-s[2]*R)*(/xMin/.test(E)?0:/xMax/.test(E)?1:.5),_=(o-s[3]*v)*(/YMin/.test(E)?0:/YMax/.test(E)?1:.5)),M-=s[0]*R,_-=s[1]*v;let T=r.replace(/\s(?:width|height|preserveAspectRatio)="[^"]*"/gi,"").slice(0,-1),$=X()&&/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(S),N=i/g,F=o/y,A=Math.max(1,Math.min(8192,Math.floor(4*1024*1024/x),$?Math.floor(2046/F):8192)),L=Math.max(1,Math.min(8192,x,$?Math.floor(2046/N):8192));async function*O(){for(let P=0;P<C;P+=A){let z=Math.min(A,C-P),q=new Uint8Array(x*z*4);for(let U=0;U<x;U+=L){let Y=Math.min(L,x-U),B=$?Math.max(0,Math.floor(U*N)-1):U*N,dt=$?Math.max(0,Math.floor(P*F)-1):P*F,pt=$?Math.min(c,Math.ceil((U+Y)*N)+1)-B:Y,nt=$?Math.min(u,Math.ceil((P+z)*F)+1)-dt:z,st=pt/s[2],yt=nt/s[3],bt=$?1:1/N,ct=$?1:1/F,Dt=`matrix(${R*bt/st},0,0,${v*ct/yt},${(M-B)*bt/st+s[0]},${(_-dt)*ct/yt+s[1]})`,V=`${T} width="${pt}" height="${nt}" preserveAspectRatio="none"><g style="all:unset!important;transform:${Dt}!important;transform-origin:0 0!important">${k}</g></svg>`,G=await Ht(be(V),{width:pt,height:nt,dpr:1,backgroundColor:$?null:e.backgroundColor,__session:e.__session,__releaseDecodeFrame:!0}),H=G;try{if($){H=document.createElement("canvas"),H.width=Y,H.height=z;let K=H.getContext("2d");e.backgroundColor&&(K.fillStyle=e.backgroundColor,K.fillRect(0,0,Y,z)),K.drawImage(G,U*N-B,P*F-dt,Y*N,z*F,0,0,Y,z)}let ht=H.getContext("2d").getImageData(0,0,Y,z).data;for(let K=0;K<z;K++)q.set(ht.subarray(K*Y*4,(K+1)*Y*4),(K*x+U)*4)}finally{G.width=G.height=0,H!==G&&(H.width=H.height=0)}}yield q}}return w(x,C,O())}}var ni=lt(()=>{"use strict";we();mt()});var hl={};xe(hl,{toBlob:()=>ri});async function ri(t,e){let n=e.format||e.type||"svg";if(n==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[SnapDOM] html-in-canvas makes a raster capture, not an SVG; ask for png, jpeg or webp.");let o=decodeURIComponent(t.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=n==="png"&&kr(t,e);if(r)return r;let i=await Ht(t,e);return new Promise(o=>i.toBlob(s=>o(s),`image/${n==="jpg"?"jpeg":n}`,e.quality))}var oi=lt(()=>{"use strict";we();ni()});var gl={};xe(gl,{download:()=>ep});async function ml(t,e){let n=new File([t],e,{type:t.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:e})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function ep(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),i=n.has(r)?r:"",o=(e?.format||i||"").toLowerCase(),s=o==="jpg"?"jpeg":o||"png",a=e?.filename||"snapdom",l=/\.(png|jpe?g|webp|svg)$/i.test(a)?a:`${a}.${s}`,f={...e||{},format:s,type:s};f.dpr=1;let c=nn(),u=s==="png"&&kr(t,f);if(s==="svg"||u){let m=u?await u:await ri(t,{...f,type:"svg"});if(c&&await ml(m,l))return;let p=URL.createObjectURL(m),g=document.createElement("a");g.href=p,g.download=l,document.body.appendChild(g),g.click(),setTimeout(()=>URL.revokeObjectURL(p),1e3),g.remove();return}let d=await Ht(t,f);if(c){let m=`image/${s}`,p=await new Promise(g=>d.toBlob(g,m,e?.quality));if(p&&await ml(p,l))return}let h=document.createElement("a");h.href=d.toDataURL(`image/${s}`,e?.quality),h.download=l,document.body.appendChild(h),h.click(),h.remove()}var yl=lt(()=>{"use strict";oi();we();ni();mt()});vt();vt();mt();wt();kn();_t();le();var Zt=new WeakMap,Ei=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"],jr=new Map,ec=2e3,Ee=0;function $t(){Ee++}function _n(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(Xt(e))return!0;e.parentElement?e=e.parentElement:e=Pt(e)}return!1}function Rn(t){for(let e of t)if(ue(e))return!0;return!1}function ue(t){if(_n(t.target))return!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!_n(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!_n(n)){e=!1;break}}if(e)return!1}return!0}var _e=new WeakMap;function Ii(t){for(let e of t){if(!ue(e))continue;let n=e.target.ownerDocument||document;_e.set(n,(_e.get(n)||0)+1);let r=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;r;r=r.parentElement||Pt(r))_e.set(r,(_e.get(r)||0)+1)}}function an(t){let e=t.ownerDocument||document;return Te(e),(_e.get(e)||0)-(_e.get(t)||0)}var Rt=0;function Re(t=document){return Te(t),Rt}function Ut(){return Te(),Ee}function ln(t){return t?(Te(t.ownerDocument||document),Fn(t,Qr(t))):0}function Fe(){$t(),Rt++}var fe=new WeakMap,Kt=0,Qt=0;function nc(t){fe.set(t,++Kt)}function Yr(t){if(!t||t.nodeType!==1)return;Kt++,fe.set(t,Kt);let e=t.querySelectorAll("*");for(let n=0;n<e.length;n++)fe.set(e[n],Kt)}function Kr(t){Yr(t.parentElement||t);for(let e=t.parentElement;e;e=e.parentElement)nc(e)}function Fn(t,e=null){let n=fe.get(t)||0;if(e)for(let r of e)n=Math.max(n,fe.get(r)||0);return Qt*1e9+n}function Qr(t){let e=t.getRootNode?.();if(!e?.host)return null;let n=[];for(;e?.host;)e.mode==="open"&&Jr(e),n.push(e.host),e=e.host.getRootNode?.();return n}var Vr=new WeakMap;function Zr(t){t=t||document;let e=Vr.get(t);if(!e||e.env!==Rt){let n=!0;try{n=Jt(t).usesHas}catch{}e={env:Rt,usesHas:n},Vr.set(t,e)}return!e.usesHas}function rc(t){let e=n=>n?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let r=n.target,i=r&&(r.nodeType===1?r:r.parentElement);if(i&&(i.tagName==="STYLE"||i.tagName==="LINK"))return i.ownerDocument||document;for(let o of n.addedNodes)if(e(o))return o.ownerDocument||document;for(let o of n.removedNodes)if(e(o))return o.ownerDocument||r&&r.ownerDocument||document}return null}var qr=new WeakSet,rn=[];function Oi(t){if(!Rn(t))return;Ii(t),$t();let e=new Set;for(let n of t){if(!ue(n))continue;let r=n.target.getRootNode&&n.target.getRootNode();if(!r||r.nodeType!==11||e.has(r))continue;e.add(r),r.host?Yr(r.host):Kt++;let i=r.querySelectorAll("*");for(let o=0;o<i.length;o++)fe.set(i[o],Kt)}}function Jr(t){if(!(!t||qr.has(t))){qr.add(t);try{let e=new MutationObserver(Oi);e.observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),rn.push({o:e,root:t})}catch{}}}function Di(t){if(!Rn(t))return;Ii(t),$t();let e=rc(t);if(e){Vr.delete(e),Rt++,Qt++;return}let n=new Set;for(let r of t){if(!ue(r))continue;let i=r.target.nodeType===1?r.target:r.target.parentElement;if(!i)continue;let o=i.ownerDocument||document;if(!Zr(o)){Qt++;return}if(i===o.documentElement||i===o.body){Qt++;return}let s=i.parentElement||i;n.has(s)||(n.add(s),Kr(i))}}var Gr=new WeakSet,on=null,sn=[];function Te(t=document){if(t===on||!t||t.nodeType!==9)return;if(Gr.has(t)){on=t;return}Gr.add(t),on=t;let e=t.defaultView,n=i=>{Rn(i)&&($t(),Rt++)},r=()=>{$t(),Rt++};try{let i=new MutationObserver(Di);i.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),sn.push({o:i,env:!1,doc:t})}catch{}try{let i=new MutationObserver(n);i.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),sn.push({o:i,env:!0,doc:t})}catch{}try{e?.addEventListener("resize",r,{passive:!0})}catch{}try{let i=o=>{$t();let s=o.composedPath?.()[0]||o.target;s&&s.nodeType===1&&!_n(s)&&Zr(s.ownerDocument||t)?Kr(s):Qt++};t.addEventListener("focusin",i,{capture:!0,passive:!0}),t.addEventListener("focusout",i,{capture:!0,passive:!0}),t.addEventListener("change",i,{capture:!0,passive:!0}),t.addEventListener("pointerdown",i,{capture:!0,passive:!0}),t.addEventListener("pointerup",i,{capture:!0,passive:!0}),t.addEventListener("pointercancel",i,{capture:!0,passive:!0}),t.addEventListener("keydown",i,{capture:!0,passive:!0}),t.addEventListener("keyup",i,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",i,{capture:!0,passive:!0}),t.addEventListener("toggle",i,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{$t(),Qt++},{passive:!0})}catch{}try{let i=t.fonts;i&&(i.addEventListener?.("loadingdone",r),i.status==="loading"&&i.ready?.then(r).catch(()=>{}))}catch{}}var Ri=new WeakMap;function Fi(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let r=Ri.get(t)||[];if(r.length===n.length&&r.every((o,s)=>o===n[s]))return;if(Ri.set(t,n),$t(),t.nodeType===11){t.host?Yr(t.host):Kt++;for(let o of t.querySelectorAll("*"))fe.set(o,Kt);return}let i=r.filter(o=>!n.includes(o)).concat(n.filter(o=>!r.includes(o)));for(let o of i)if(o.isConnected)if(Zr(e))Kr(o);else{Qt++;return}}function Tn(t,e=null){if(!t)return;Fi(t,t);let n=e||rn.filter(({root:r})=>r.host?.isConnected).map(({root:r})=>r);for(let r of n)Fi(r,t)}function Nt(){Te();try{for(let t=sn.length-1;t>=0;t--){let{o:e,env:n,doc:r}=sn[t];if(r!==document&&!r.defaultView){try{e.disconnect()}catch{}Gr.delete(r),on===r&&(on=null),sn.splice(t,1);continue}let i=e.takeRecords();i.length&&(n?Rn(i)&&($t(),Rt++):Di(i))}for(let t=rn.length-1;t>=0;t--){let{o:e,root:n}=rn[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}qr.delete(n),rn.splice(t,1);continue}let r=e.takeRecords();r.length&&Oi(r)}}catch{}}function de(t){if(!(!t||t.nodeType!==1)){Zt.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)Zt.delete(e.currentNode)}catch{}}}var oc=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function to(t){let e=Zt.get(t);if(e&&Pn(e,t)){let n=e.snapshot&&e.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function Wi(t){let e=Zt.get(t);if(!e||!Pn(e,t))return null;let n=e.snapshot;return!n||n.__bgClipTextFix?null:n}var Ti=new WeakMap,An=new Map;function ic(t){let e=t.href;return!e||typeof CSSStyleSheet!="function"?null:An.has(e)?An.get(e):(An.set(e,null),at(e,{as:"text",silent:!0}).then(n=>{if(!n.ok||typeof n.data!="string"||/@import/i.test(n.data))return;let r=new CSSStyleSheet;r.replaceSync(n.data),An.set(e,r.cssRules),$t(),Rt++}).catch(()=>{}),null)}function Jt(t){let e=Ti.get(t);if(!e||e.epoch!==Ee){let n=e&&e.universe;e={epoch:Ee,...xi(t,ic)};let r=e.universe;if(n&&r&&n.size===r.size){let i=!0;for(let o of r)if(!n.has(o)){i=!1;break}i&&(e.universe=n)}Ti.set(t,e)}return e}function Bi(t){try{let e=Jt(t.ownerDocument||document).shareGate;if(e===null)return!1;if(!e.length)return!0;let n=new Set,r=s=>{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let l=0;l<a.length;l++)n.add("c"+a[l])};r(t);for(let s of t.querySelectorAll("*"))r(s);let i=[];for(let{sel:s,key:a}of e)(a===null||n.has(a))&&i.push(s);if(!i.length)return!0;let o=i.join(",");return!t.matches(o)&&t.querySelector(o)===null}catch{return!1}}function sc(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Jt(e).importantProps}function cn(t,e){let n=t.ownerDocument||document,r=t.getRootNode?t.getRootNode():n;return r===n?Jt(n).universe:e&&Wt(r)?ac(t,r,n,e):null}var Pi=new WeakMap;function ac(t,e,n,r){let i=r.__shadowUniverse;if(i===null)return null;if(!i){let a=Jt(n).universe;if(!a)return r.__shadowUniverse=null;i=r.__shadowUniverse={universe:new Set(a),roots:new Set}}let o=a=>{for(;Wt(a)&&!i.roots.has(a);a=a.host.getRootNode()){i.roots.add(a);for(let l of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let f=Pi.get(l);if((!f||f.epoch!==Ee)&&Pi.set(l,f={epoch:Ee,props:wi(l)}),!f.props)return!1;for(let c of f.props)i.universe.add(c)}Or(a.getAnimations(),i.universe)}return!0},s=o(e)&&(!t.shadowRoot||o(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=o(a.getRootNode());return s?i.universe:r.__shadowUniverse=null}function En(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Jt(e).pseudoUniverse}var lc={before:null,after:null,firstLetter:null,marker:null,firstLine:null};function te(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?lc:Jt(e).pseudoGates}function cc(t,e={},n=null,r=null){let i={},o=e.excludeStyleProps,s=h=>{if(i[h]!==void 0||Ce(h)||o&&(o instanceof RegExp&&o.test(h)||typeof o=="function"&&o(h)))return;let m=t.getPropertyValue(h);m&&((h==="background-image"||h==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),i[h]=m)};if(r){for(let m of r)s(m);let h=n&&n.style;if(h&&h.length)for(let m=0;m<h.length;m++)s(h[m])}else for(let h=0;h<t.length;h++)s(t[h]);let a=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let h of a)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}let l=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let h of l)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}if(e.embedFonts){let h=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let m of h)if(!i[m])try{let p=t.getPropertyValue(m);p&&(i[m]=p)}catch{}}try{(i["content-visibility"]||t.getPropertyValue("content-visibility"))==="hidden"&&(i["content-visibility"]="hidden")}catch{}Object.defineProperty(i,"__needsBgInline",{value:Ui(t),enumerable:!1});let f=parseFloat(t.getPropertyValue("border-top-width")||0)||0,c=parseFloat(t.getPropertyValue("border-right-width")||0)||0,u=parseFloat(t.getPropertyValue("border-bottom-width")||0)||0,d=parseFloat(t.getPropertyValue("border-left-width")||0)||0;if(f===0&&c===0&&u===0&&d===0){let h=(t.getPropertyValue("border-image-source")||"").trim(),m=h&&h!=="none",p=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color","border-block-start","border-block-start-width","border-block-start-style","border-block-start-color","border-block-end","border-block-end-width","border-block-end-style","border-block-end-color","border-inline-start","border-inline-start-width","border-inline-start-style","border-inline-start-color","border-inline-end","border-inline-end-width","border-inline-end-style","border-inline-end-color"];for(let g of p)delete i[g];m||(i.border="none")}return fc(i),i}function fc(t){if(!xt())return;let e=t["background-clip"]||t["-webkit-background-clip"];if(!e||!e.includes("text"))return;let n=o=>o==="transparent"||o==="rgba(0, 0, 0, 0)",r=t["-webkit-text-fill-color"];if(!n(r!==void 0?r:t.color))return;let i=uc(t["background-image"],t["background-color"]);i&&(n(t.color)&&(t.color=i),r!==void 0&&(t["-webkit-text-fill-color"]=i),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:i,enumerable:!1}))}function uc(t,e){let n=o=>{let s=[],a=/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)(?:[,\s/]+([\d.]+%?))?\s*\)/g,l;for(;l=a.exec(o||"");){let f=l[4];(f===void 0?1:parseFloat(f)/(f.endsWith("%")?100:1))>.05&&s.push([+l[1],+l[2],+l[3]])}return s},r=n(t);if(r.length||(r=n(e)),!r.length)return null;let i=[0,0,0];for(let[o,s,a]of r)i[0]+=o,i[1]+=s,i[2]+=a;return`rgb(${i.map(o=>Math.round(o/r.length)).join(", ")})`}function Ui(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let i of oc){let o=t.getPropertyValue(i);if(o&&o!=="none")return!0}let r=t.getPropertyValue("background");return!!(r&&/url\s*\(/i.test(r))}function dc(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=I(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function pc(t,e,n){try{if(typeof t.computedStyleMap=="function"){let i=t.computedStyleMap().get("width");if(i!=null)return!$i(String(i).trim().toLowerCase())}}catch{}let r=t.style&&(t.style.width||t.style.inlineSize);return r&&!$i(String(r).trim().toLowerCase())?!0:mc(t,e)?n||gc(t,e):!1}var hc=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function $i(t){return hc.has(t)||t.startsWith("fit-content")}function mc(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,i=-1/0,o=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(o=o||document.createRange(),o.selectNode(s),a=o.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let l=I(s);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.left<r&&(r=a.left),a.right>i&&(i=a.right)}return i===-1/0?!1:i-r<n-.5}function gc(t,e){let n=t.parentElement;if(!n)return!1;let r=I(n),i=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(e.marginLeft)||0)-(parseFloat(e.marginRight)||0);return i>0?Math.abs(t.getBoundingClientRect().width-i)>.5:!1}var Xr=new WeakMap;function yc(t,e){let n=Xr.get(t);if(n)return n;let r=[e];for(let i in t)r.push(i,t[i]);return n=r.join(""),Xr.set(t,n),n}function Pn(t,e){return t.env===Rt&&t.stamp===Fn(e,t.hosts)}var bc=/^(width|height|inline-size|block-size|top|right|bottom|left|transform-origin|perspective-origin)$|^inset-/,wc=/(margin|padding)[a-z-]*\s*:[^;]*(%|\bauto\b|calc\(|var\()/i,Sc=new Set(["INPUT","TEXTAREA","SELECT","OPTION","OPTGROUP","PROGRESS","METER","BUTTON","DATALIST"]);function xc(t){let e=t.__styleShare;return e||(e=t.__styleShare={ids:new WeakMap,intern:new Map,snaps:new Map,rootSeen:!1}),e}function vc(t,e){let n=e.ids.get(t);if(n!==void 0)return n;let r=t.parentElement,i;if(!r)i="R";else if(i=e.ids.get(r),i===void 0){if(e.rootSeen)return e.ids.set(t,-1),-1;i="R"}if(e.rootSeen=!0,i===-1)return e.ids.set(t,-1),-1;let o="",s=t.attributes;if(s&&s.length)if(s.length===1)o=s[0].name+"="+s[0].value;else{let l=[];for(let f=0;f<s.length;f++)l.push(s[f].name+"="+s[f].value);l.sort(),o=l.join("")}let a=i+"|"+t.tagName+"|"+o;return n=e.intern.get(a),n===void 0&&(n=e.intern.size,e.intern.set(a,n)),e.ids.set(t,n),n}function zi(t,e){let n=t.snap,r=t.snap={...n};Object.defineProperty(r,"__needsBgInline",{value:n.__needsBgInline,enumerable:!1}),n.__bgClipTextFix!==void 0&&Object.defineProperty(r,"__bgClipTextFix",{value:n.__bgClipTextFix,enumerable:!1});let i=Jt(e.ownerDocument||document),o=e.getAttribute&&e.getAttribute("style")||"",s=o&&wc.test(o),a=!!i.marginUnstable||s&&/margin/i.test(o),l=!!i.paddingUnstable||s&&/padding/i.test(o),f=r.display!==void 0&&r.display.includes("grid"),c=r.transform!==void 0&&r.transform!=="none",u=[];for(let m in r)(bc.test(m)||f&&(m==="grid-template-columns"||m==="grid-template-rows")||c&&m==="transform"||a&&m.charCodeAt(0)===109&&m.startsWith("margin-")||l&&m.charCodeAt(0)===112&&m.startsWith("padding-"))&&u.push(m);t.h&&!("height"in r)&&u.push("height"),t.b&&!("block-size"in r)&&u.push("block-size");let d=new Set(u),h=[e.tagName.toLowerCase()];for(let m in r)d.has(m)||h.push(m,r[m]);return t.rr=u,t.sig=h.join("")+""+u.join(""),u}function Hi(t,e,n,r,i){let o=i&&i.__styleShare?r&&r.__styleShare:null,s=o?o.ids.get(t):void 0;if(s===void 0||s===-1||t.shadowRoot||t.assignedSlot)return Me(n,En(t));let a=s+e,l=o.pseudo||(o.pseudo=new Map),f=l.get(a);if(f){let u={...f.snap},d=f.rr||zi(f,t);for(let h=0;h<d.length;h++){let m=n.getPropertyValue(d[h]);m?u[d[h]]=m:delete u[d[h]]}return u}let c=Me(n,En(t));return l.set(a,{snap:c,rr:null,sig:null,h:"height"in c,b:"block-size"in c}),c}function Cc(t,e=null,n={},r=null,i=null){let o=Zt.get(t),s=!!(n&&n.embedFonts),a=n&&n.excludeStyleProps||null;if(typeof a!="function"&&o&&Pn(o,t)&&o.embedFonts===s&&o.excludeStyleProps===a)return o.snapshot;let l=e||getComputedStyle(t),f,c=null,u=r&&r.st.snaps.get(r.id);if(u){f={...u.snap};let p=u.rr||zi(u,t);c=[];for(let g=0;g<p.length;g++){let y=p[g],b=l.getPropertyValue(y);b?f[y]=b:delete f[y],c.push(b)}Object.defineProperty(f,"__needsBgInline",{value:u.snap.__needsBgInline,enumerable:!1}),u.snap.__bgClipTextFix!==void 0&&Object.defineProperty(f,"__bgClipTextFix",{value:u.snap.__bgClipTextFix,enumerable:!1})}else f=cc(l,n,t,cn(t,i)),r&&r.st.snaps.set(r.id,{snap:f,rr:null,sig:null,h:"height"in f,b:"block-size"in f});let d=!1;if(typeof t.computedStyleMap=="function"){let p;for(let g of Ei)if(f[g]==="0px")try{p||=t.computedStyleMap(),p.get(g)?.toString()==="auto"&&(f[g]="auto",d=!0)}catch{}}Wc(t,l,f);let h=Rc(t,l,f);c!==null&&(d&&c.push("",...Ei.map(p=>f[p])),h&&c.push(""+h),Xr.set(f,u.sig+""+c.join("")+("height"in f?"":"")+("block-size"in f?"":"")));let m=Qr(t);return Zt.set(t,{env:Rt,stamp:Fn(t,m),hosts:m,snapshot:f,embedFonts:s,excludeStyleProps:a}),f}function kc(t,e){if(t&&t.session&&t.persist)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.__ctx;return(!n||t.__ctxOpts!==e)&&(n={session:t,persist:{snapshotKeyCache:jr,defaultStyle:D.defaultStyle,baseStyle:D.baseStyle,image:D.image,resource:D.resource,background:D.background},options:e||{}},t.__ctx=n,t.__ctxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},persist:{snapshotKeyCache:jr,defaultStyle:D.defaultStyle,baseStyle:D.baseStyle,image:D.image,resource:D.resource,background:D.background},options:t||e||{}}}var Mc=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,Ac=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA";function _c(t,e,n){if(!t.style||t.style.length===0)return;let r=sc(t),i=r!=null&&!Mc.test(t.getAttribute("style")||""),o;for(let s=0;s<t.style.length;s++){let a=t.style[s],l=a.startsWith("border-")&&a.endsWith("-width");if(i&&l&&o===void 0){let c=t.style.borderWidth,u=Zt.get(t);o=u&&Pn(u,t)&&ji.every(d=>u.snapshot[d]===c)||n.borderWidth===c}if(i&&!r.has(a)&&(!l||o)&&!(a.startsWith("background")&&Ac(t)))continue;let f=n.getPropertyValue(a);f&&(!l||f!==t.style.getPropertyValue(a))&&e.style.setProperty(a,f,t.style.getPropertyPriority(a))}}function ut(t,e,n,r){if(t.tagName==="STYLE")return;let i=kc(n,r),o=i.options&&i.options.cache||"soft";o!=="disabled"&&Te(t.ownerDocument),o==="disabled"&&!i.session.__bumpedForDisabled&&($t(),jr.clear(),i.session.__bumpedForDisabled=!0);let{session:s,persist:a}=i;if(!s.styleCache.has(t)){let y=null;try{y=getComputedStyle(t)}catch{}s.styleCache.set(t,y||getComputedStyle((t.ownerDocument||document).documentElement))}let l=s.styleCache.get(t);t.getAttribute?.("style")&&_c(t,e,l);let f=l.getPropertyValue("animation-name");e&&e.style&&f&&f!=="none"&&e.style.setProperty("animation","none","important");let c=t.tagName?.toLowerCase()||"div";if(tn.has(c)){let y={};Object.defineProperty(y,"__needsBgInline",{value:Ui(l),enumerable:!1});let b=Qr(t);Zt.set(t,{env:Rt,stamp:Fn(t,b),hosts:b,snapshot:y,embedFonts:!!(i.options&&i.options.embedFonts),excludeStyleProps:i.options&&i.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let u=null;if(i.options&&i.options.__styleShare&&s.styleMap){let y=xc(s),b=vc(t,y),w=t.ownerDocument||document,x=w.activeElement;b!==-1&&!Sc.has(t.tagName)&&!(x&&x!==w.body&&x!==w.documentElement&&x===t)&&(!t.getRootNode||t.getRootNode()===w)&&!t.shadowRoot&&!t.assignedSlot&&(u={st:y,id:b})}let d=Cc(t,l,i.options,u,s);if(t.getAttribute?.("style"))for(let y of["top","right","bottom","left"]){let b=`margin-${y}`;d[b]==="auto"&&e.style.setProperty(b,"auto","important")}d.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",d.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",d.__bgClipTextFix,"important")),Ec(t,l,d),e.style?.length&&d["box-sizing"]==="border-box"&&l.getPropertyValue("box-sizing")!=="border-box"&&Pc(t,e,d);let h=Xi(t);if(Nc(t,e,d,h,s),h){let y=l.getPropertyValue("min-width");if(!y||y==="auto"||y==="0px"){d["min-width"]="0px";let b=l.getPropertyValue("overflow-x"),w=t.parentElement;if(y==="auto"&&(b==="visible"||b==="clip")&&w&&I(w).display.includes("flex")){let x=s.flexOverflow||(s.flexOverflow=new WeakMap),C=x.get(w);if(C===void 0){if(C=w.scrollWidth>w.clientWidth,!C){let S=I(w),k=T=>parseFloat(S.getPropertyValue(T))||0,E=k("width")-(S.boxSizing==="border-box"?k("padding-left")+k("padding-right")+k("border-left-width")+k("border-right-width"):0),v=S.flexDirection.startsWith("row")===(S.writingMode==="horizontal-tb")&&S.flexWrap==="nowrap",M=0,_=0;for(let T of w.children){s.styleCache.has(T)||s.styleCache.set(T,getComputedStyle(T));let $=s.styleCache.get(T);if($.display==="none"||$.position==="absolute"||$.position==="fixed")continue;let N=A=>parseFloat($.getPropertyValue(A))||0,F=N("width")+N("margin-left")+N("margin-right")+($.boxSizing==="border-box"?0:N("padding-left")+N("padding-right")+N("border-left-width")+N("border-right-width"));M=v?M+F:Math.max(M,F),_++}C=M+(v?Math.max(0,_-1)*k("column-gap"):0)>E+_/60}x.set(w,C)}C&&(d["min-width"]=d.width)}}}let m=yc(d,c),p=!0;if(Mn(c,(d.display||"").toLowerCase())){p=dc(t),p&&Ur(c,d,h)&&pc(t,l,h)&&(p=!1),m=`${m}${p?"|c":""}${h?"|f":""}`;let y=d["text-wrap-mode"]||d["white-space"]||"";p&&y!=="nowrap"&&y!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let g=a.snapshotKeyCache.get(m);g===void 0&&(g=ke(d,c,p,h),a.snapshotKeyCache.size>=ec&&a.snapshotKeyCache.delete(a.snapshotKeyCache.keys().next().value),a.snapshotKeyCache.set(m,g)),s.styleMap.set(e,g)}function Ec(t,e,n){let r=e.getPropertyValue("overflow-x"),i=e.getPropertyValue("overflow-y");if((r==="visible"||!r)&&(i==="visible"||!i)||e.getPropertyValue("box-sizing")==="border-box"||typeof t.clientWidth!="number"||!t.offsetWidth)return;let o=f=>parseFloat(f)||0,s=t.offsetWidth-t.clientWidth-o(e.getPropertyValue("border-left-width"))-o(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-o(e.getPropertyValue("border-top-width"))-o(e.getPropertyValue("border-bottom-width")),l=(f,c)=>{let u=n[f];if(!u||!u.endsWith("px"))return;let d=parseFloat(u);Number.isFinite(d)&&(n[f]=`${Math.round((d+c)*1e3)/1e3}px`)};s>=2&&(l("width",s),l("inline-size",s)),a>=2&&(l("height",a),l("block-size",a))}var ji=["border-top-width","border-right-width","border-bottom-width","border-left-width"],Vi=["width","inline-size","height","block-size"];function Rc(t,e,n){if(!ji.some(l=>n[l]?.includes("."))||e.getPropertyValue("box-sizing")==="border-box"||n.display==="inline")return"";for(let l of["width","height"]){let f=n[`min-${l}`],c=n[`max-${l}`];if(f&&f!=="0px"&&f!=="auto"||c&&c!=="none")return""}let r=l=>parseFloat(n[l])||0,i=r("padding-left")+r("padding-right")+r("border-left-width")+r("border-right-width"),o=r("padding-top")+r("padding-bottom")+r("border-top-width")+r("border-bottom-width"),s=(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb";for(let l of Vi){let f=n[l];if(!f||!f.endsWith("px"))continue;let u=l==="width"||l==="inline-size"&&!s||l==="block-size"&&s?i:o;n[l]=`${Math.round((parseFloat(f)+u)*1e3)/1e3}px`}n["box-sizing"]="border-box";let a="";if(e.getPropertyValue("overflow-x")==="auto"){let l=t.scrollWidth<=t.clientWidth;n["overflow-x"]=l?"hidden":"auto",l&&(a+="x")}if(e.getPropertyValue("overflow-y")==="auto"){let l=t.scrollHeight<=t.clientHeight;n["overflow-y"]=l?"hidden":"auto",l&&(a+="y")}return a}var Fc=["box-sizing",...Vi,"overflow-x","overflow-y"],Tc=/(?:box-sizing|width|height|inline-size|block-size|overflow(?:-[xy])?)\s*:/i;function Pc(t,e,n){if(Tc.test(t.getAttribute("style")))for(let r of Fc)e.style.getPropertyValue(r)&&n[r]&&e.style.setProperty(r,n[r],e.style.getPropertyPriority(r))}function $c(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}var Ni=typeof CSS<"u"&&CSS.supports?.("text-wrap-mode","nowrap")?"text-wrap-mode":"white-space";function Nc(t,e,n,r,i){let o=n.display||"";if(!r&&!o.startsWith("inline-")&&(n.float||"none")==="none"&&n.position!=="absolute"&&n.position!=="fixed")return;let s=n["text-wrap-mode"]||n["white-space"]||"";if(s==="nowrap"||s==="pre"||Ni==="white-space"&&s!=="normal"||(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb"||!e.style)return;let a=i.__oneLine||=new WeakSet;for(let l=t.parentElement;l;l=l.parentElement)if(a.has(l))return;Lc(t,n,i)&&(a.add(t),e.style.setProperty(Ni,"nowrap"))}function Lc(t,e,n){let r=t.clientHeight-(parseFloat(e["padding-top"])||0)-(parseFloat(e["padding-bottom"])||0);if(r>3*(parseFloat(e["font-size"])||16)||e["word-break"]==="normal"&&e["overflow-wrap"]==="normal"&&/^[\w\u00C0-\u024F.,:;!?'"()%]*$/.test(t.textContent.trim()))return!1;let i=t.ownerDocument||document,o=i.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),s=i.createRange(),a=null,l=0,f=0;for(let d=o.nextNode();d;d=o.nextNode()){if(d.nodeType===1){if(d.shadowRoot||d.localName==="br"||d.localName==="textarea")return!1;continue}if(/\S/.test(d.data)){if(++f>64)return!1;s.selectNodeContents(d);for(let h of s.getClientRects())if(h.height){if(a||=h,Math.min(a.bottom,h.bottom)-Math.max(a.top,h.top)<Math.min(a.height,h.height)/2)return!1;l=Math.max(l,h.height)}}}if(!a)return!1;let c=Gi(t,n.__axes||=new WeakMap);if(!c)return!1;let u=c===qi&&t.offsetHeight?t.getBoundingClientRect().height/t.offsetHeight:1;return r*u<=2*l}var Ic=0,Li=1,qi=2;function Gi(t,e){let n=e.get(t);if(n!==void 0)return n;let r=I(t),i=r.transform,o=i&&i!=="none"?i.slice(i.indexOf("(")+1,-1).split(",").map(parseFloat):null;if(r.rotate&&r.rotate!=="none"||o&&(i.startsWith("matrix3d")?o[1]||o[4]:o[1]||o[2]))n=Ic;else{let s=t.parentElement||Pt(t);n=s?Gi(s,e):Li,n===Li&&(r.scale&&r.scale!=="none"||r.zoom&&r.zoom!=="1"||o&&(i.startsWith("matrix3d")?o[0]!==1||o[5]!==1:o[0]!==1||o[3]!==1))&&(n=qi)}return e.set(t,n),n}function Xi(t){let e=t.parentElement;if(!e)return!1;let n=I(e).display||"";return n.includes("flex")||n.includes("grid")}function Oc(t){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let e=t.firstElementChild,n=t.lastElementChild;if(e&&e.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=t.firstElementChild;r;r=r.nextElementSibling){let i=I(r);if(i.display==="none")continue;let o=i.position;if(o!=="absolute"&&o!=="fixed")return!0}return!1}function Dc(t){let e=t.getBoundingClientRect().top,n=-1/0,r=null;for(let i=t.firstChild;i;i=i.nextSibling){if(i.nodeType===3){if(!/\S/.test(i.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(i);let a=r.getBoundingClientRect();(a.width||a.height)&&(n=Math.max(n,a.bottom));continue}if(i.nodeType!==1)continue;let o=I(i);if(o.display==="none")continue;let s=o.position;s==="absolute"||s==="fixed"||o.float&&o.float!=="none"||(n=Math.max(n,i.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-e}function Wc(t,e,n){if(Mt(t)&&t.style&&t.style.height)return;let r=t.tagName&&t.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let o=e.display||"";if(o.includes("flex")||o.includes("grid"))return;let s=e.position;if(s==="absolute"||s==="fixed"||s==="sticky"||e.transform!=="none"||$c(e)||Xi(t))return;let a=e.overflowX||e.overflow||"visible",l=e.overflowY||e.overflow||"visible";if(a!=="visible"||l!=="visible")return;let f=e.clip;if(f&&f!=="auto"&&f!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||!Oc(t))return;let c=parseFloat(e.height),u=Dc(t);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}Ae();var Bc=new Set(["symbol","defs"]),Uc=new Set(["mask","clipPath","linearGradient","radialGradient","pattern","marker","filter"]),eo=new WeakMap,Yi=-1;function $n(t){let e=Ut();return e!==Yi&&(eo=new WeakMap,Yi=e),Ki(t)}function Ki(t){let e=eo.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(Uc.has(t.localName)?n=!1:Bc.has(t.localName)&&(n=!0)),n===void 0){let r=t.parentNode;n=!!(r&&r.nodeType===1)&&Ki(r)}return eo.set(t,n),n}function Qi(t,e){if(t?.nodeType!==1||e?.nodeType!==1||$n(t))return;let n=t.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(a&&typeof a.value=="string"&&!a.value.startsWith("data:")&&a.value.includes("var(")){r=!0;break}}}let i=null;if(r)try{i=getComputedStyle(t)}catch{}if(r){let o=t.style;if(o&&o.length){let s=new Set;for(let a=0;a<o.length;a++){let l=o[a];if(s.has(l))continue;s.add(l);let f=o.getPropertyValue(l);if(!f||!f.includes("var("))continue;let c=i&&i.getPropertyValue(l);if(c)try{e.style.setProperty(l,c.trim(),o.getPropertyPriority(l))}catch{}}}}if(r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(!a||typeof a.value!="string"||a.value.startsWith("data:")||!a.value.includes("var("))continue;let l=a.name,f=i&&i.getPropertyValue(l);if(f)try{e.style.setProperty(l,f.trim())}catch{}}}}vt();vt();wt();le();kn();At();function Pe(t){return!!(!t||t.startsWith("data:")||t.startsWith("blob:"))}function $e(t,e){if(!t)return null;let n=0;try{n=e?e.getBoundingClientRect().width||e.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let o of t.split(",")){let s=o.trim().split(/\s+/);if(!s[0])continue;let a=s[1]||"",l=1;/^\d*\.?\d+x$/i.test(a)?l=parseFloat(a):/^\d+w$/i.test(a)&&(l=parseInt(a,10)/n),r.push({url:s[0],d:l})}if(!r.length)return null;r.sort((o,s)=>o.d-s.d);let i=window.devicePixelRatio||1;return(r.find(o=>o.d>=i)||r[r.length-1]).url}function Zi(t,e){let n=t.currentSrc||"";if(n&&!Pe(n))return n;let r=e.querySelectorAll("source[srcset]"),i=null;for(let o of r){let s=o.getAttribute("srcset");if(!s||Pe(s))continue;let a=o.getAttribute("type");if(a&&!Rr.test(a.trim()))continue;let l=o.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return $e(s,t)}catch{}i||(i=$e(s,t))}return i}function Ji(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let r of e)if(r&&!Pe(r))return r;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!Pe(r))return r}return null}_t();mt();function zc(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var Hc=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,jc=/^::?(?:before|after|first-letter)$/;function Vc(t,e,n=!0,r){return Dr(t,",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")&&i.includes("data-sd")||i.startsWith("@"))return i;let o=i.match(Hc);if(o&&jc.test(o[0]))return":not(*)";let s=o?i.slice(0,o.index).trim():i,a=n?zc(s,r):s;return`:where(${e} ${a})${o?o[0]:""}`}).join(", ")}function ns(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(r,i)=>`:where(:where(${i.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(r,i)=>`:where(${e}:is(${i.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(r,i)=>`:where(${e} ${i.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(r,i,o,s)=>{let a=Vc(s,e,!0,n);return`${i}${o}${a}{`}),t):""}function rs(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function pe(t){let e="";for(let n of t)if(n.media&&n.cssRules){let r=!1;try{r=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}r&&(e+=pe(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${pe(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let r=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=r+(n.style?n.style.cssText:"")+pe(n.cssRules)+"}"}else e+=n.cssText+`
|
|
8
|
+
`}return o}function tn(t){let e=Array.from(new Set(t.values())).filter(Boolean).sort(),n=new Map,r=1;for(let i of e)n.set(i,`c${r++}`);return n}function Zl(t){try{let e=t?.ownerDocument;if(!e)return typeof window<"u"?window:null;let n=e.defaultView;if(n&&typeof n.getComputedStyle=="function")return n;if(typeof window<"u"&&window.frames)for(let r=0;r<window.frames.length;r++)try{if(window.frames[r]?.document===e)return window.frames[r]}catch{}}catch{}return typeof window<"u"?window:null}function I(t,e=null){let n=()=>{let o={length:0,getPropertyValue:()=>"",item:()=>""};return o[Symbol.iterator]=function*(){},o};if(t?.nodeType!==1){let o=typeof window<"u"?window:null;if(o&&typeof o.getComputedStyle=="function")try{return o.getComputedStyle(t,e)||n()}catch{return n()}return n()}let r=D.computedStyle.get(t);r||(r=new Map,D.computedStyle.set(t,r));let i=r.get(e);if(!i){let o=Zl(t),s=null;try{s=o&&typeof o.getComputedStyle=="function"?o.getComputedStyle(t,e):null}catch{}if(!s&&typeof window<"u"&&typeof window.getComputedStyle=="function")try{t.ownerDocument===document&&(s=window.getComputedStyle(t,e))}catch{}i=s||n(),r.set(e,i)}return i}function Me(t,e=null){let n={};for(let r of e||t){let i=t.getPropertyValue(r);i&&(n[r]=i)}for(let r of Jl){let i=n[`border-${r}-style`],o=n[`border-${r}-width`];(i==="none"||i==="hidden"||o==="0px")&&(delete n[`border-${r}-style`],delete n[`border-${r}-width`],delete n[`border-${r}-color`])}return n}function Yt(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&n++,o===")"&&n--,o===","&&n===0&&(e.push(t.slice(r,i).trim()),r=i+1)}return e.push(t.slice(r).trim()),e}var Wr,Je,zl,Hl,jl,Ci,Vl,ki,ql,Gl,Xl,Yl,Kl,Ql,Jl,Ae=lt(()=>{"use strict";wt();Cn();_t();Wr=new Set(["meta","script","noscript","title","link","template"]),Je=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","symbol","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]);zl=/(?:^|-)(animation|transition)(?:-|$)/i,Hl=/^(--.+|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,jl=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope","zoom","stroke-color"]),Ci=new Map;Vl=new Set(["span","small","em","strong","b","i","u","s","code","cite","mark","sub","sup"]),ki=new Set(["table","thead","tbody","tfoot","tr","td","th"]),ql=new Set(["img","video","canvas","svg","iframe","embed","object","input","textarea","select"]),Gl=new Set(["width","max-width","inline-size","max-inline-size"]),Xl=new Set(["min-width","min-inline-size"]),Yl=new Map(Object.entries({"block-size":"height","inline-size":"width","min-block-size":"min-height","min-inline-size":"min-width","max-block-size":"max-height","max-inline-size":"max-width","margin-block-start":"margin-top","margin-block-end":"margin-bottom","margin-inline-start":"margin-left","margin-inline-end":"margin-right","padding-block-start":"padding-top","padding-block-end":"padding-bottom","padding-inline-start":"padding-left","padding-inline-end":"padding-right","inset-block-start":"top","inset-block-end":"bottom","inset-inline-start":"left","inset-inline-end":"right","border-block-start-width":"border-top-width","border-block-start-style":"border-top-style","border-block-start-color":"border-top-color","border-block-end-width":"border-bottom-width","border-block-end-style":"border-bottom-style","border-block-end-color":"border-bottom-color","border-inline-start-width":"border-left-width","border-inline-start-style":"border-left-style","border-inline-start-color":"border-left-color","border-inline-end-width":"border-right-width","border-inline-end-style":"border-right-style","border-inline-end-color":"border-right-color","border-start-start-radius":"border-top-left-radius","border-start-end-radius":"border-top-right-radius","border-end-start-radius":"border-bottom-left-radius","border-end-end-radius":"border-bottom-right-radius","overflow-block":"overflow-y","overflow-inline":"overflow-x","overscroll-behavior-block":"overscroll-behavior-y","overscroll-behavior-inline":"overscroll-behavior-x","contain-intrinsic-block-size":"contain-intrinsic-height","contain-intrinsic-inline-size":"contain-intrinsic-width"}));Kl=.001;Ql=new Set(["inline-block","inline-flex","inline-grid","inline-table","inline-flow-root","table"]);Jl=["top","right","bottom","left"]});function St(t=1e3){return typeof requestAnimationFrame!="function"||typeof document<"u"&&document.visibilityState==="hidden"?Promise.resolve():new Promise(e=>{let n=!1,r=()=>{n||(n=!0,e())};try{requestAnimationFrame(r)}catch{r();return}setTimeout(r,t)})}function _i(t){if(t!==!1&&t!=="auto")return null;let e=performance.now()+(t==="auto"?tc:Ai),n=null,r={yielded:!1,due:()=>performance.now()>=e,pause:()=>n||(n=new Promise(i=>{let o=()=>{n=null,r.yielded=!0,e=performance.now()+Ai,i()},s=new MessageChannel;s.port1.onmessage=o,s.port2.postMessage(0)}))};return r}function en(){if(typeof navigator>"u")return!1;if(navigator.userAgentData)return navigator.userAgentData.platform==="iOS";let t=navigator.userAgent||"",e=/iPhone|iPad|iPod/.test(t),n=navigator.maxTouchPoints>2&&/Macintosh/.test(t);return e||n}function X(){if(typeof navigator>"u")return!1;let t=navigator.userAgent||"",e=t.toLowerCase(),n=e.includes("safari")&&!e.includes("chrome")&&!e.includes("crios")&&!e.includes("fxios")&&!e.includes("android"),r=/applewebkit/i.test(t),i=/mobile/i.test(t),o=!/safari/i.test(t),s=r&&i&&o,a=/(micromessenger|wxwork|wecom|windowswechat|macwechat)/i.test(t),l=/(baiduboxapp|baidubrowser|baidusearch|baiduboxlite)/i.test(e),f=/ipad|iphone|ipod/.test(e)&&r;return n||s||a||l||f}function xt(){return typeof navigator>"u"?!1:(navigator.userAgent||"").toLowerCase().includes("firefox")}var Ai,tc,mt=lt(()=>{"use strict";Ai=16,tc=40});function j(t,e,n){let r=t&&typeof t=="object"&&(t.options||t);r&&r.debug&&(n!==void 0?console.warn("[SnapDOM]",e,n):console.warn("[SnapDOM]",e))}function Et(t,e,n,r){let i=t&&t.warnings;i&&i.length<ec&&i.push(r===void 0?{code:e,message:n}:{code:e,message:n,detail:r})}var ec,ce=lt(()=>{"use strict";ec=50});var vt=lt(()=>{"use strict";mi();Ae();mt();At();ce()});var ul={};xe(ul,{MAX_RASTER_AREA:()=>oe,MAX_RASTER_SIDE:()=>Lt,__setDecodeFrameIdleMs:()=>Xd,cropSvgText:()=>Sr,decodeSvgFromDataURL:()=>ye,encodeSvgToDataURL:()=>be,fixSafariShadows:()=>vr,peekSvgHeader:()=>xr,toCanvas:()=>Ht});function Dd(t,e){try{let n=t.match(/<svg\b[^>]*>/i);if(!n)return t;let r=n[0],i=parseFloat((r.match(/\bwidth="([\d.]+)/i)||[])[1]),o=parseFloat((r.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(i)||!Number.isFinite(o)||i<=0||o<=0)return t;let s=Math.min(1,Lt/i,Lt/o,Math.sqrt(oe/(i*o)));if(s>=1)return t;let a=Math.max(1,Math.floor(i*s)),l=Math.max(1,Math.floor(o*s));return Et(e,"raster-clamp",`capture ${Math.round(i)}x${Math.round(o)}px exceeds decode limits; downscaled to ${a}x${l}px`),console.warn(`[SnapDOM] ${Math.round(i)}\xD7${Math.round(o)}px is too large for the browser to draw; scaled down to ${a}\xD7${l}px. For full size, export ${typeof CompressionStream=="function"?"a PNG blob, ":""}an SVG, or crop.`),t.replace(r,r.replace(/(\bwidth=")[\d.]+/i,`$1${a}`).replace(/(\bheight=")[\d.]+/i,`$1${l}`))}catch{return t}}function Sr(t,e){let n=["x","y","width","height"].map(S=>Number(e?.[S]));if(!n.every(Number.isFinite)||n[2]<=0||n[3]<=0)throw new RangeError("[SnapDOM] crop needs finite x/y and a positive width/height.");let r=t.match(/<svg\b[^>]*>/i);if(!r)throw new Error("[SnapDOM] Only SVG captures can be cropped.");let i=r[0],o=(i.match(/\bviewBox="([^"]+)"/i)||[])[1],s=String(o||"").trim().split(/[\s,]+/).map(Number);if(s.length!==4||!s.every(Number.isFinite)||s[2]<=0||s[3]<=0)throw new Error("[SnapDOM] Can't crop: the SVG has no valid viewBox.");let[a,l,f,c]=s,u=Math.max(a,n[0]),d=Math.max(l,n[1]),h=Math.min(a+f,n[0]+n[2]),m=Math.min(l+c,n[1]+n[3]);if(!(h>u)||!(m>d))throw new RangeError("[SnapDOM] The crop area does not intersect the capture.");let p=parseFloat((i.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((i.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(p)&&p>0?p/f:1,b=Number.isFinite(g)&&g>0?g/c:1,w=Math.max(1,(h-u)*y),x=Math.max(1,(m-d)*b),C=i.replace(/(\bwidth=")[^"]*/i,`$1${w}`).replace(/(\bheight=")[^"]*/i,`$1${x}`).replace(/(\bviewBox=")[^"]*/i,`$1${u} ${d} ${h-u} ${m-d}`);return t.replace(i,C)}function Xo(t){return typeof t=="string"&&/^data:image\/svg\+xml/i.test(t)}function ye(t){let e=t.indexOf(",");return e>=0?decodeURIComponent(t.slice(e+1)):""}function xr(t){let e=t.indexOf(",");if(e<0)return"";let n=t.slice(e+1,e+1201).replace(/%[0-9A-Fa-f]?$/,"");try{return decodeURIComponent(n)}catch{return""}}function be(t){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}function al(t){let e=[],n="",r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("&&r++,o===")"&&(r=Math.max(0,r-1)),o===";"&&r===0?(e.push(n),n=""):n+=o}return n.trim()&&e.push(n),e.map(i=>i.trim()).filter(Boolean)}function Wd(t){let e=[],n="",r=0;for(let o=0;o<t.length;o++){let s=t[o];s==="("&&r++,s===")"&&(r=Math.max(0,r-1)),s===","&&r===0?(e.push(n.trim()),n=""):n+=s}n.trim()&&e.push(n.trim());let i=[];for(let o of e){if(/\binset\b/i.test(o))continue;let s=o.match(/-?\d+(?:\.\d+)?px/gi)||[],[a="0px",l="0px",f="0px"]=s;f=`${parseFloat(f)/2}px`;let c=o.replace(/-?\d+(?:\.\d+)?px/gi,"").replace(/\binset\b/ig,"").trim().replace(/\s{2,}/g," "),u=!!c&&c!==",";i.push(`drop-shadow(${a} ${l} ${f}${u?` ${c}`:""})`)}return i.join(" ")}function ll(t){let e=al(t),n=null,r=null,i=null,o=[];for(let a of e){let l=a.indexOf(":");if(l<0)continue;let f=a.slice(0,l).trim().toLowerCase(),c=a.slice(l+1).trim();f==="box-shadow"?i=c:f==="filter"?n=c:f==="-webkit-filter"?r=c:o.push([f,c])}if(i){let a=Wd(i);a&&(n=n?`${n} ${a}`:a,r=r?`${r} ${a}`:a)}let s=[...o];return n&&s.push(["filter",n]),r&&s.push(["-webkit-filter",r]),s.map(([a,l])=>`${a}:${l}`).join(";")}function Bd(t){return t.replace(/([^{}]+)\{([^}]*)\}/g,(e,n,r)=>`${n}{${ll(r)}}`)}function Ud(t){return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(e,n)=>e.replace(n,Bd(n))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(e,n,r)=>`style=${n}${ll(r)}${n}`),t}function zd(){return gr||(gr=(async()=>{try{let t='<svg xmlns="http://www.w3.org/2000/svg" width="8" height="20"><foreignObject width="8" height="20"><div xmlns="http://www.w3.org/1999/xhtml" style="width:4px;height:4px;margin-top:8px;background:#000;box-shadow:0 8px 0 0 #000"></div></foreignObject></svg>',e=new Image;e.decoding="sync",e.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`,await e.decode();let n=document.createElement("canvas");n.width=8,n.height=20;let r=n.getContext("2d",{willReadFrequently:!0});r.drawImage(e,0,0);let i=r.getImageData(2,18,1,1).data[3]>128,o=r.getImageData(2,2,1,1).data[3]>128;return{native:i||o,flippedY:o&&!i}}catch{return{native:!1,flippedY:!1}}})(),gr)}function Hd(t){let e=[],n=0,r=0;for(let i=0;i<t.length;i++){let o=t[i];o==="("?n++:o===")"?n=Math.max(0,n-1):o===","&&n===0&&(e.push(t.slice(r,i)),r=i+1)}return e.push(t.slice(r)),e.map(i=>{let o=0,s=0,a="",l=0;for(;l<i.length;){let f=i[l];if(f==="("?o++:f===")"&&(o=Math.max(0,o-1)),o===0&&(l===0||i[l-1]===" ")){let c=/^-?\d*\.?\d+px/.exec(i.slice(l));if(c){s++,a+=s===2?`${-parseFloat(c[0])}px`:c[0],l+=c[0].length;continue}}a+=f,l++}return a}).join(",")}function jd(t,e){let n=r=>al(r).map(i=>{let o=i.indexOf(":");if(o<0)return i;let s=i.slice(0,o).trim().toLowerCase();return s==="text-shadow"||e&&s==="box-shadow"?`${s}:${Hd(i.slice(o+1))}`:i}).join(";");return t=t.replace(/<style[^>]*>([\s\S]*?)<\/style>/gi,(r,i)=>r.replace(i,i.replace(/([^{}]+)\{([^}]*)\}/g,(o,s,a)=>`${s}{${n(a)}}`))),t=t.replace(/style=(['"])([\s\S]*?)\1/gi,(r,i,o)=>`style=${i}${n(o)}${i}`),t}async function vr(t){if(!/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(t))return{svg:t,naturalOnly:!1};let{native:n,flippedY:r}=await zd();try{let i=t;return n||(i=Ud(i)),r&&(i=jd(i,n)),{svg:i,naturalOnly:!0}}catch{return{svg:t,naturalOnly:!0}}}function Vd(){let t=document.createElement("canvas");t.width=16,t.height=16;let e=t.getContext("2d",{willReadFrequently:!0});return e?n=>{e.clearRect(0,0,16,16),e.drawImage(n,0,0,16,16);let r=e.getImageData(0,0,16,16).data;for(let i=3;i<r.length;i+=4)if(r[i]>0)return!0;return!1}:null}async function qd(t,e,n){J(t),t.style.cssText="position:fixed;left:-99999px;top:-99999px;pointer-events:none",document.body.appendChild(t);try{if(!n)return await yr(),await yr(),!1;let r=performance.now()+(e?600:150);for(;;){let i;try{i=n(t)}catch{return!1}if(i)return!0;if(performance.now()>r)return!1;await yr()}}finally{try{t.remove()}catch{}}}function wr(){clearTimeout(Zo),re?.remove(),re=null,br=0}function Xd(t){fl=t??cl}function il(t){if(typeof document>"u"||!document.body)return new Image;if(clearTimeout(Zo),re&&!re.contentDocument&&wr(),re&&br>Gd&&bn===0&&wr(),!re){let n=document.createElement("iframe");J(n),n.setAttribute("aria-hidden","true"),n.style.cssText="position:absolute;left:-9999px;top:0;width:0;height:0;border:0;visibility:hidden;pointer-events:none";try{document.body.appendChild(n)}catch{}if(n.contentDocument)re=n,br=0;else{try{n.remove()}catch{}return new Image}}br+=t.length,bn+=1;let e=re.contentDocument.createElement("img");return e.__snapdomDecodeFrame=!0,e}function Ko(t,e=!1){!t||!t.__snapdomDecodeFrame||(t.__snapdomDecodeFrame=!1,bn=Math.max(0,bn-1),e&&(Yo=!0),!(bn>0)&&(Yo?(Yo=!1,wr()):Zo=setTimeout(wr,fl)))}function sl(t,e){return t.loading="eager",t.decoding="sync",t.crossOrigin="anonymous",t.src=e,t.decode()}function Jd(t){if(typeof t!="string")return!1;let e=t.indexOf(",")+1,n=Math.max(48,Math.floor((t.length-e)/200)),r=0,i=0;for(let o=e;o+48<=t.length;o+=n){let s=t.slice(o,o+48);r++,Zd.some(a=>s.includes(a))||i++}return i*2>r}function Qo(t,e,n,r,i){if(!e.naturalWidth){t.drawImage(e,0,0,n,r);return}let o=n*r,s=o>Yd&&!Jd(i)?Math.min(Qd,Math.ceil(o/Kd)):1;if(s===1){t.drawImage(e,0,0,n,r);return}let a=e.naturalWidth,l=e.naturalHeight/r;for(let f=0;f<s;f++){let c=Math.round(f*r/s),u=f===s-1?r:Math.round((f+1)*r/s);t.drawImage(e,0,c*l,a,(u-c)*l,0,c,n,u-c)}}async function Ht(t,e){let{width:n,height:r,scale:i=1,dpr:o=1,meta:s={},backgroundColor:a,crop:l=null}=e,f=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,c=t,u=!1,d=!1;if(l&&!Xo(t))throw new RangeError("[SnapDOM] Only SVG captures can be cropped.");if(Xo(t)){let m=(xr(t).match(/<svg\b[^>]*>/i)||[])[0]||"",p=parseFloat((m.match(/\bwidth="([\d.]+)/i)||[])[1]),g=parseFloat((m.match(/\bheight="([\d.]+)/i)||[])[1]),y=Number.isFinite(p)&&Number.isFinite(g)&&p>0&&g>0&&Math.min(1,Lt/p,Lt/g,Math.sqrt(oe/(p*g)))<1;if(l||y||X())try{let b=ye(t);if(l&&(b=Sr(b,l)),X()){let w=await vr(b);b=w.svg,u=w.naturalOnly,d=/@font-face|data:image\//i.test(b)}(y||l)&&(b=Dd(b,e.__session)),c=be(b)}catch(b){if(l)throw b;c=t}}let h=f||il(c);try{f||await sl(h,c)}catch(m){if(!h.__snapdomDecodeFrame)throw m;let p=h;h=il(c),Ko(p);try{await sl(h,c)}catch(g){throw Ko(h,e.__releaseDecodeFrame),g}}try{!f&&!X()&&!xt()&&Xo(c)&&/(?:%40|@)font-face/i.test(c)&&await new Promise(F=>{let A=new MessageChannel;A.port1.onmessage=()=>{A.port1.close(),A.port2.close(),F()},A.port2.postMessage(0)});let m=X()&&!f?Vd():null,p=!1;m&&(p=await qd(h,d,m));let g=f?f.width:h.naturalWidth,y=f?f.height:h.naturalHeight,b=l?g:Number.isFinite(s.vbW)?s.vbW:Number.isFinite(s.w0)?s.w0:g,w=l?y:Number.isFinite(s.vbH)?s.vbH:Number.isFinite(s.h0)?s.h0:y,x,C,S=Number.isFinite(n),k=Number.isFinite(r);if(S&&k)x=Math.max(1,n),C=Math.max(1,r);else if(S){let F=n/Math.max(1,b);x=n,C=w*F}else if(k){let F=r/Math.max(1,w);C=r,x=b*F}else{let F=f&&Number.isFinite(s.vbW)&&Number.isFinite(s.vbH);x=F?s.vbW:g,C=F?s.vbH:y}!S&&!k&&(x=x*i,C=C*i);let E=x*o,R=C*o,v=Math.max(E/Lt,R/Lt,Math.sqrt(E*R/oe));v>1&&(Et(e.__session,"canvas-clamp",`output ${Math.round(E)}x${Math.round(R)}px exceeds canvas limits; downscaled`),console.warn(`[SnapDOM] ${Math.round(E)}\xD7${Math.round(R)}px is larger than a canvas allows; scaled down. For full size, export ${typeof CompressionStream=="function"?"a PNG blob, ":""}an SVG, or crop.`),x/=v,C/=v);let M=Mt(e.canvas)&&it(e.canvas,"canvas")?e.canvas:document.createElement("canvas");M.width=Math.max(1,x*o),M.height=Math.max(1,C*o),M.style.width=`${x}px`,M.style.height=`${C}px`;let _=M.getContext("2d");if(!_)throw new Error("[SnapDOM] The canvas you passed has no 2D context (is it already used for WebGL?).");let T=null,$=e.__layoutZoom||1;if(!f&&$>1&&xt()){let F=$*b/(x*o),A=Math.round(x*o*F),L=Math.round(C*o*F);F>1.01&&A<=Lt&&L<=Lt&&A*L<=oe&&(T={w:A,h:L})}let N=()=>{if(o!==1&&_.scale(o,o),a&&(_.save(),_.fillStyle=a,_.fillRect(0,0,x,C),_.restore()),u&&(Math.round(x*o)!==g||Math.round(C*o)!==y)){let F=document.createElement("canvas");F.width=g,F.height=y,Qo(F.getContext("2d"),h,g,y,c),_.drawImage(F,0,0,x,C)}else{if(_.save(),_.setTransform(1,0,0,1,0,0),T){let F=document.createElement("canvas");for(F.width=T.w,F.height=T.h,Qo(F.getContext("2d"),h,T.w,T.h,c);F.width>x*o*2;){let A=document.createElement("canvas");A.width=Math.ceil(F.width/2),A.height=Math.ceil(F.height/2),A.getContext("2d").drawImage(F,0,0,A.width,A.height),F=A}_.imageSmoothingQuality="high",_.drawImage(F,0,0,x*o,C*o)}else Qo(_,h,x*o,C*o,c);_.restore()}};if(N(),m&&p&&d){let F=!0;try{F=m(h)}catch{}if(!F){let A=performance.now()+600;do{await yr();try{F=m(h)}catch{break}}while(!F&&performance.now()<A);M.width=M.width,N()}}return M}finally{Ko(h,e.__releaseDecodeFrame)}}var Lt,oe,gr,yr,Gd,cl,re,br,bn,Yo,fl,Zo,Yd,Kd,Qd,Zd,we=lt(()=>{"use strict";mt();ce();At();_t();Lt=X()?16384:32767,oe=16384*16384;gr=null;yr=()=>new Promise(t=>{requestAnimationFrame(t),setTimeout(t,50)});Gd=24*1024*1024,cl=5e3,re=null,br=0,bn=0,Yo=!1,fl=cl,Zo=0;Yd=4e6,Kd=2e6,Qd=8,Zd=["%3C","%3E","%20","%7B","%7D","%3B"]});var wn={};xe(wn,{rasterize:()=>Jo});async function Jo(t,e){let n=await Ht(t,e),o=n.width*n.height<=2e6?n.toDataURL(`image/${e.format}`,e.quality):await new Promise(a=>{let l=()=>a(n.toDataURL(`image/${e.format}`,e.quality));try{n.toBlob(f=>{if(!f)return l();let c=new FileReader;c.onload=()=>a(String(c.result||"")),c.onerror=l,c.readAsDataURL(f)},`image/${e.format}`,e.quality)}catch{l()}}),s=new Image;return s.src=o,X()?await s.decode():await new Promise((a,l)=>{if(s.complete&&s.naturalWidth)return a();s.onload=a,s.onerror=l}),s.style.width=`${n.width/e.dpr}px`,s.style.height=`${n.height/e.dpr}px`,s}var Ge=lt(()=>{"use strict";we();mt()});var ti={};xe(ti,{toImg:()=>tp,toSvg:()=>tp});async function tp(t,e){let{scale:n=1,width:r,height:i,meta:o={}}=e,s=Number.isFinite(r),a=Number.isFinite(i),l=Number.isFinite(n)&&n!==1||s||a;if(X()&&l)try{let{svg:d}=await vr(ye(t)),h=(d.match(/<svg\b[^>]*>/i)||[])[0]||"",m=parseFloat((h.match(/\bwidth="([\d.]+)/i)||[])[1]),p=parseFloat((h.match(/\bheight="([\d.]+)/i)||[])[1]);if(!Number.isFinite(m)||!Number.isFinite(p))throw new Error("The SVG has no size.");let g=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:m,y=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:p,b,w;s&&a?(b=r,w=i):s?(b=r,w=Math.max(1,Math.round(y*(r/Math.max(1,g))))):a?(w=i,b=Math.max(1,Math.round(g*(i/Math.max(1,y))))):(b=Math.max(1,Math.round(m*n)),w=Math.max(1,Math.round(p*n)));let x=d.replace(/width="[^"]*"/,`width="${b}"`).replace(/height="[^"]*"/,`height="${w}"`),C=new Image;return C.decoding="sync",C.loading="eager",C.src=be(x),await C.decode(),C.style.width=`${b}px`,C.style.height=`${w}px`,C}catch(d){return Et(e.__session,"safari-png-fallback","Safari vector toImg failed; using PNG",d),j(e,"Safari couldn't show the SVG; used a PNG.",d),Jo(t,{...e,format:"png",quality:1,meta:o})}let f=t,c=!1;if(!s&&!a&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let d=ye(t),h=(d.match(/<svg\b[^>]*>/i)||[])[0]||"",m=Number((h.match(/\bwidth="([\d.]+)"/i)||[])[1]),p=Number((h.match(/\bheight="([\d.]+)"/i)||[])[1]);if(m>0&&p>0){let g=h.replace(/\bwidth="[^"]*"/i,`width="${Math.max(1,Math.round(m*n))}"`).replace(/\bheight="[^"]*"/i,`height="${Math.max(1,Math.round(p*n))}"`);f=be(d.replace(h,g)),c=!0}}catch{}let u=new Image;u.decoding="sync",u.loading="eager",u.src=f;try{await u.decode()}catch(d){if(!c)throw d;u.src=t,c=!1,await u.decode()}if(s&&a)u.style.width=`${r}px`,u.style.height=`${i}px`;else if(s){let d=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=r/Math.max(1,d);u.style.width=`${r}px`,u.style.height=`${Math.max(1,Math.round(h*m))}px`}else if(a){let d=Number.isFinite(o.vbW)?o.vbW:Number.isFinite(o.w0)?o.w0:u.naturalWidth,h=Number.isFinite(o.vbH)?o.vbH:Number.isFinite(o.h0)?o.h0:u.naturalHeight,m=i/Math.max(1,h);u.style.height=`${i}px`,u.style.width=`${Math.max(1,Math.round(d*m))}px`}else{let d=Math.max(1,Math.round(u.naturalWidth*(c?1:n))),h=Math.max(1,Math.round(u.naturalHeight*(c?1:n)));if(u.style.width=`${d}px`,u.style.height=`${h}px`,!c&&n!==1&&typeof t=="string"&&t.startsWith("data:image/svg+xml"))try{let p=decodeURIComponent(t.split(",")[1]).replace(/width="[^"]*"/,`width="${d}"`).replace(/height="[^"]*"/,`height="${h}"`);u.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(p)}`,await u.decode()}catch(m){j(e,"Couldn't size the SVG image.",m),u.src!==t&&(u.src=t,await u.decode().catch(()=>{}))}}return u}var ei=lt(()=>{"use strict";vt();ce();Ge();we()});var pl={};xe(pl,{encodePng:()=>ep});function Cr(t,e=new Uint8Array(0)){let n=new Uint8Array(e.length+12),r=new DataView(n.buffer);r.setUint32(0,e.length);for(let o=0;o<4;o++)n[o+4]=t.charCodeAt(o);n.set(e,8);let i=4294967295;for(let o=4;o<n.length-4;o++)i=dl[(i^n[o])&255]^i>>>8;return r.setUint32(n.length-4,(i^4294967295)>>>0),n}async function ep(t,e,n){if(![t,e].every(p=>Number.isInteger(p)&&p>0&&p<=2147483647))throw new RangeError("[SnapDOM] PNG dimensions must be integers from 1 to 2147483647");let r=new Uint8Array(13),i=new DataView(r.buffer);i.setUint32(0,t),i.setUint32(4,e),r[8]=8,r[9]=6;let o=[new Uint8Array([137,80,78,71,13,10,26,10]),Cr("IHDR",r),Cr("sRGB",new Uint8Array([0]))],s=t*4,a=Math.max(1,Math.floor(65536/(s+1))),l=new Uint8Array(s),f=0,c=new CompressionStream("deflate"),u=c.writable.getWriter(),d=c.readable.getReader(),h,m=(async()=>{try{for(;;){let{done:p,value:g}=await d.read();if(p)return;o.push(Cr("IDAT",g))}}catch(p){h=p,await u.abort(p).catch(()=>{})}})();try{for await(let p of n){if(!(p instanceof Uint8Array||p instanceof Uint8ClampedArray)||!p.length||p.length%s)throw new RangeError("[SnapDOM] PNG input must contain complete RGBA rows");let g=p.length/s;if(f+g>e)throw new RangeError("[SnapDOM] PNG input exceeds the declared height");for(let y=0;y<g;y+=a){let b=Math.min(g,y+a),w=new Uint8Array((b-y)*(s+1));for(let x=y;x<b;x++){let C=p.subarray(x*s,(x+1)*s),S=(x-y)*(s+1),k=0,E=0;for(let R=0;R<s;R++){let v=C[R]-(R<4?0:C[R-4])&255,M=C[R]-l[R]&255;k+=Math.min(v,256-v),E+=Math.min(M,256-M),w[S+R+1]=M}if(w[S]=E<=k?2:1,k<E)for(let R=0;R<s;R++)w[S+R+1]=C[R]-(R<4?0:C[R-4]);l=C}await u.write(w)}l=l.slice(),f+=g}if(f!==e)throw new RangeError("[SnapDOM] PNG input does not match the declared height");if(await u.close(),await m,h)throw h;return o.push(Cr("IEND")),new Blob(o,{type:"image/png"})}catch(p){throw await Promise.allSettled([u.abort(p),d.cancel(p)]),await m,p}finally{u.releaseLock(),d.releaseLock()}}var dl,hl=lt(()=>{"use strict";dl=new Uint32Array(256);for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;dl[t]=e}});function kr(t,e){if(typeof t!="string"||!t.startsWith("data:image/svg+xml"))return null;let n=xr(t).match(/<svg\b[^>]*>/i)?.[0];if(!n)return null;let r=e.crop?Sr(n,e.crop):n,i=parseFloat(r.match(/\bwidth="([^"]+)/i)?.[1]),o=parseFloat(r.match(/\bheight="([^"]+)/i)?.[1]),s=(r.match(/\bviewBox="([^"]+)/i)?.[1]||"").trim().split(/[\s,]+/).map(Number);if(!(i>0&&o>0)||s.length!==4||!s.every(Number.isFinite)||!(s[2]>0&&s[3]>0))return null;let a=Number.isFinite(e.width),l=Number.isFinite(e.height),f=e.meta||{},c=Math.max(1,Math.floor(i)),u=Math.max(1,Math.floor(o)),d=e.crop?c:Number.isFinite(f.vbW)?f.vbW:Number.isFinite(f.w0)?f.w0:c,h=e.crop?u:Number.isFinite(f.vbH)?f.vbH:Number.isFinite(f.h0)?f.h0:u,m=e.dpr??1,p=e.scale??1,g=(a&&l?Math.max(1,e.width):a?e.width:l?e.height*d/Math.max(1,h):c*p)*m,y=(a&&l?Math.max(1,e.height):l?e.height:a?e.width*h/Math.max(1,d):u*p)*m;if(Math.max(i,o,g,y)<=Lt&&i*o<=oe&&g*y<=oe||typeof CompressionStream!="function")return null;return b();async function b(){let{encodePng:w}=await Promise.resolve().then(()=>(hl(),pl)),x=Math.max(1,Math.floor(g)),C=Math.max(1,Math.floor(y)),S=ye(t),k=S.slice(S.indexOf(n)+n.length,S.lastIndexOf("</svg>")),E=r.match(/\bpreserveAspectRatio="([^"]*)"/i)?.[1]||"xMidYMid meet",R=i/s[2],v=o/s[3],M=0,_=0;/\bnone\b/.test(E)||(R=v=/\bslice\b/.test(E)?Math.max(R,v):Math.min(R,v),M=(i-s[2]*R)*(/xMin/.test(E)?0:/xMax/.test(E)?1:.5),_=(o-s[3]*v)*(/YMin/.test(E)?0:/YMax/.test(E)?1:.5)),M-=s[0]*R,_-=s[1]*v;let T=r.replace(/\s(?:width|height|preserveAspectRatio)="[^"]*"/gi,"").slice(0,-1),$=X()&&/(?:box-shadow|text-shadow)\s*:[^;"}]*px/i.test(S),N=i/g,F=o/y,A=Math.max(1,Math.min(8192,Math.floor(4*1024*1024/x),$?Math.floor(2046/F):8192)),L=Math.max(1,Math.min(8192,x,$?Math.floor(2046/N):8192));async function*O(){for(let P=0;P<C;P+=A){let z=Math.min(A,C-P),q=new Uint8Array(x*z*4);for(let U=0;U<x;U+=L){let Y=Math.min(L,x-U),B=$?Math.max(0,Math.floor(U*N)-1):U*N,dt=$?Math.max(0,Math.floor(P*F)-1):P*F,pt=$?Math.min(c,Math.ceil((U+Y)*N)+1)-B:Y,nt=$?Math.min(u,Math.ceil((P+z)*F)+1)-dt:z,st=pt/s[2],yt=nt/s[3],bt=$?1:1/N,ct=$?1:1/F,Dt=`matrix(${R*bt/st},0,0,${v*ct/yt},${(M-B)*bt/st+s[0]},${(_-dt)*ct/yt+s[1]})`,V=`${T} width="${pt}" height="${nt}" preserveAspectRatio="none"><g style="all:unset!important;transform:${Dt}!important;transform-origin:0 0!important">${k}</g></svg>`,G=await Ht(be(V),{width:pt,height:nt,dpr:1,backgroundColor:$?null:e.backgroundColor,__session:e.__session,__releaseDecodeFrame:!0}),H=G;try{if($){H=document.createElement("canvas"),H.width=Y,H.height=z;let K=H.getContext("2d");e.backgroundColor&&(K.fillStyle=e.backgroundColor,K.fillRect(0,0,Y,z)),K.drawImage(G,U*N-B,P*F-dt,Y*N,z*F,0,0,Y,z)}let ht=H.getContext("2d").getImageData(0,0,Y,z).data;for(let K=0;K<z;K++)q.set(ht.subarray(K*Y*4,(K+1)*Y*4),(K*x+U)*4)}finally{G.width=G.height=0,H!==G&&(H.width=H.height=0)}}yield q}}return w(x,C,O())}}var ni=lt(()=>{"use strict";we();mt()});var ml={};xe(ml,{toBlob:()=>ri});async function ri(t,e){let n=e.format||e.type||"svg";if(n==="svg"){if(typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement)throw new Error("[SnapDOM] html-in-canvas makes a raster capture, not an SVG; ask for png, jpeg or webp.");let o=decodeURIComponent(t.split(",")[1]);return new Blob([o],{type:"image/svg+xml"})}let r=n==="png"&&kr(t,e);if(r)return r;let i=await Ht(t,e);return new Promise(o=>i.toBlob(s=>o(s),`image/${n==="jpg"?"jpeg":n}`,e.quality))}var oi=lt(()=>{"use strict";we();ni()});var yl={};xe(yl,{download:()=>np});async function gl(t,e){let n=new File([t],e,{type:t.type});if(!navigator.canShare?.({files:[n]}))return!1;try{await navigator.share({files:[n],title:e})}catch(r){if(r.name!=="AbortError")return!1}return!0}async function np(t,e){let n=new Set(["png","jpeg","jpg","webp","svg"]),r=(e?.type||"").toLowerCase(),i=n.has(r)?r:"",o=(e?.format||i||"").toLowerCase(),s=o==="jpg"?"jpeg":o||"png",a=e?.filename||"snapdom",l=/\.(png|jpe?g|webp|svg)$/i.test(a)?a:`${a}.${s}`,f={...e||{},format:s,type:s};f.dpr=1;let c=en(),u=s==="png"&&kr(t,f);if(s==="svg"||u){let m=u?await u:await ri(t,{...f,type:"svg"});if(c&&await gl(m,l))return;let p=URL.createObjectURL(m),g=document.createElement("a");g.href=p,g.download=l,document.body.appendChild(g),g.click(),setTimeout(()=>URL.revokeObjectURL(p),1e3),g.remove();return}let d=await Ht(t,f);if(c){let m=`image/${s}`,p=await new Promise(g=>d.toBlob(g,m,e?.quality));if(p&&await gl(p,l))return}let h=document.createElement("a");h.href=d.toDataURL(`image/${s}`,e?.quality),h.download=l,document.body.appendChild(h),h.click(),h.remove()}var bl=lt(()=>{"use strict";oi();we();ni();mt()});vt();vt();mt();wt();Cn();_t();le();var Zt=new WeakMap,Ei=["margin-top","margin-right","margin-bottom","margin-left","margin-block-start","margin-block-end","margin-inline-start","margin-inline-end"],jr=new Map,nc=2e3,Ee=0;function $t(){Ee++}function An(t){let e=t&&(t.nodeType===1?t:t.parentElement);for(;e;){if(Xt(e))return!0;e.parentElement?e=e.parentElement:e=Pt(e)}return!1}function En(t){for(let e of t)if(ue(e))return!0;return!1}function ue(t){if(An(t.target))return!1;if(t.type==="childList"){let e=!0;for(let n of t.addedNodes)if(!An(n)){e=!1;break}if(e){for(let n of t.removedNodes)if(!An(n)){e=!1;break}}if(e)return!1}return!0}var _e=new WeakMap;function Ii(t){for(let e of t){if(!ue(e))continue;let n=e.target.ownerDocument||document;_e.set(n,(_e.get(n)||0)+1);let r=e.target.nodeType===1?e.target:e.target.parentElement||e.target.host;for(;r;r=r.parentElement||Pt(r))_e.set(r,(_e.get(r)||0)+1)}}function sn(t){let e=t.ownerDocument||document;return Te(e),(_e.get(e)||0)-(_e.get(t)||0)}var Rt=0;function Re(t=document){return Te(t),Rt}function Ut(){return Te(),Ee}function an(t){return t?(Te(t.ownerDocument||document),Rn(t,Qr(t))):0}function Fe(){$t(),Rt++}var fe=new WeakMap,Kt=0,Qt=0;function rc(t){fe.set(t,++Kt)}function Yr(t){if(!t||t.nodeType!==1)return;Kt++,fe.set(t,Kt);let e=t.querySelectorAll("*");for(let n=0;n<e.length;n++)fe.set(e[n],Kt)}function Kr(t){Yr(t.parentElement||t);for(let e=t.parentElement;e;e=e.parentElement)rc(e)}function Rn(t,e=null){let n=fe.get(t)||0;if(e)for(let r of e)n=Math.max(n,fe.get(r)||0);return Qt*1e9+n}function Qr(t){let e=t.getRootNode?.();if(!e?.host)return null;let n=[];for(;e?.host;)e.mode==="open"&&Jr(e),n.push(e.host),e=e.host.getRootNode?.();return n}var Vr=new WeakMap;function Zr(t){t=t||document;let e=Vr.get(t);if(!e||e.env!==Rt){let n=!0;try{n=Jt(t).usesHas}catch{}e={env:Rt,usesHas:n},Vr.set(t,e)}return!e.usesHas}function oc(t){let e=n=>n?.nodeType===1&&(n.matches?.("style,link")||n.querySelector?.("style,link"));for(let n of t){let r=n.target,i=r&&(r.nodeType===1?r:r.parentElement);if(i&&(i.tagName==="STYLE"||i.tagName==="LINK"))return i.ownerDocument||document;for(let o of n.addedNodes)if(e(o))return o.ownerDocument||document;for(let o of n.removedNodes)if(e(o))return o.ownerDocument||r&&r.ownerDocument||document}return null}var qr=new WeakSet,nn=[];function Oi(t){if(!En(t))return;Ii(t),$t();let e=new Set;for(let n of t){if(!ue(n))continue;let r=n.target.getRootNode&&n.target.getRootNode();if(!r||r.nodeType!==11||e.has(r))continue;e.add(r),r.host?Yr(r.host):Kt++;let i=r.querySelectorAll("*");for(let o=0;o<i.length;o++)fe.set(i[o],Kt)}}function Jr(t){if(!(!t||qr.has(t))){qr.add(t);try{let e=new MutationObserver(Oi);e.observe(t,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),nn.push({o:e,root:t})}catch{}}}function Di(t){if(!En(t))return;Ii(t),$t();let e=oc(t);if(e){Vr.delete(e),Rt++,Qt++;return}let n=new Set;for(let r of t){if(!ue(r))continue;let i=r.target.nodeType===1?r.target:r.target.parentElement;if(!i)continue;let o=i.ownerDocument||document;if(!Zr(o)){Qt++;return}if(i===o.documentElement||i===o.body){Qt++;return}let s=i.parentElement||i;n.has(s)||(n.add(s),Kr(i))}}var Gr=new WeakSet,rn=null,on=[];function Te(t=document){if(t===rn||!t||t.nodeType!==9)return;if(Gr.has(t)){rn=t;return}Gr.add(t),rn=t;let e=t.defaultView,n=i=>{En(i)&&($t(),Rt++)},r=()=>{$t(),Rt++};try{let i=new MutationObserver(Di);i.observe(t.documentElement,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),on.push({o:i,env:!1,doc:t})}catch{}try{let i=new MutationObserver(n);i.observe(t.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0}),on.push({o:i,env:!0,doc:t})}catch{}try{e?.addEventListener("resize",r,{passive:!0})}catch{}try{let i=o=>{$t();let s=o.composedPath?.()[0]||o.target;s&&s.nodeType===1&&!An(s)&&Zr(s.ownerDocument||t)?Kr(s):Qt++};t.addEventListener("focusin",i,{capture:!0,passive:!0}),t.addEventListener("focusout",i,{capture:!0,passive:!0}),t.addEventListener("change",i,{capture:!0,passive:!0}),t.addEventListener("pointerdown",i,{capture:!0,passive:!0}),t.addEventListener("pointerup",i,{capture:!0,passive:!0}),t.addEventListener("pointercancel",i,{capture:!0,passive:!0}),t.addEventListener("keydown",i,{capture:!0,passive:!0}),t.addEventListener("keyup",i,{capture:!0,passive:!0}),t.addEventListener("beforetoggle",i,{capture:!0,passive:!0}),t.addEventListener("toggle",i,{capture:!0,passive:!0}),e?.addEventListener("hashchange",()=>{$t(),Qt++},{passive:!0})}catch{}try{let i=t.fonts;i&&(i.addEventListener?.("loadingdone",r),i.status==="loading"&&i.ready?.then(r).catch(()=>{}))}catch{}}var Ri=new WeakMap;function Fi(t,e){if(!t?.querySelectorAll)return;let n;try{n=Array.from(t.querySelectorAll(":hover"))}catch{return}let r=Ri.get(t)||[];if(r.length===n.length&&r.every((o,s)=>o===n[s]))return;if(Ri.set(t,n),$t(),t.nodeType===11){t.host?Yr(t.host):Kt++;for(let o of t.querySelectorAll("*"))fe.set(o,Kt);return}let i=r.filter(o=>!n.includes(o)).concat(n.filter(o=>!r.includes(o)));for(let o of i)if(o.isConnected)if(Zr(e))Kr(o);else{Qt++;return}}function Fn(t,e=null){if(!t)return;Fi(t,t);let n=e||nn.filter(({root:r})=>r.host?.isConnected).map(({root:r})=>r);for(let r of n)Fi(r,t)}function Nt(){Te();try{for(let t=on.length-1;t>=0;t--){let{o:e,env:n,doc:r}=on[t];if(r!==document&&!r.defaultView){try{e.disconnect()}catch{}Gr.delete(r),rn===r&&(rn=null),on.splice(t,1);continue}let i=e.takeRecords();i.length&&(n?En(i)&&($t(),Rt++):Di(i))}for(let t=nn.length-1;t>=0;t--){let{o:e,root:n}=nn[t];if(!n.host||!n.host.isConnected){try{e.disconnect()}catch{}qr.delete(n),nn.splice(t,1);continue}let r=e.takeRecords();r.length&&Oi(r)}}catch{}}function de(t){if(!(!t||t.nodeType!==1)){Zt.delete(t);try{let e=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;e.nextNode();)Zt.delete(e.currentNode)}catch{}}}var ic=["mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"];function to(t){let e=Zt.get(t);if(e&&Tn(e,t)){let n=e.snapshot&&e.snapshot.__needsBgInline;if(n!==void 0)return n}return!0}function Wi(t){let e=Zt.get(t);if(!e||!Tn(e,t))return null;let n=e.snapshot;return!n||n.__bgClipTextFix?null:n}var Ti=new WeakMap,Mn=new Map;function sc(t){let e=t.href;return!e||typeof CSSStyleSheet!="function"?null:Mn.has(e)?Mn.get(e):(Mn.set(e,null),at(e,{as:"text",silent:!0}).then(n=>{if(!n.ok||typeof n.data!="string"||/@import/i.test(n.data))return;let r=new CSSStyleSheet;r.replaceSync(n.data),Mn.set(e,r.cssRules),$t(),Rt++}).catch(()=>{}),null)}function Jt(t){let e=Ti.get(t);if(!e||e.epoch!==Ee){let n=e&&e.universe;e={epoch:Ee,...xi(t,sc)};let r=e.universe;if(n&&r&&n.size===r.size){let i=!0;for(let o of r)if(!n.has(o)){i=!1;break}i&&(e.universe=n)}Ti.set(t,e)}return e}function Bi(t){try{let e=Jt(t.ownerDocument||document).shareGate;if(e===null)return!1;if(!e.length)return!0;let n=new Set,r=s=>{n.add("t"+s.localName),s.id&&n.add("i"+s.id);let a=s.classList;for(let l=0;l<a.length;l++)n.add("c"+a[l])};r(t);for(let s of t.querySelectorAll("*"))r(s);let i=[];for(let{sel:s,key:a}of e)(a===null||n.has(a))&&i.push(s);if(!i.length)return!0;let o=i.join(",");return!t.matches(o)&&t.querySelector(o)===null}catch{return!1}}function ac(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Jt(e).importantProps}function ln(t,e){let n=t.ownerDocument||document,r=t.getRootNode?t.getRootNode():n;return r===n?Jt(n).universe:e&&Wt(r)?lc(t,r,n,e):null}var Pi=new WeakMap;function lc(t,e,n,r){let i=r.__shadowUniverse;if(i===null)return null;if(!i){let a=Jt(n).universe;if(!a)return r.__shadowUniverse=null;i=r.__shadowUniverse={universe:new Set(a),roots:new Set}}let o=a=>{for(;Wt(a)&&!i.roots.has(a);a=a.host.getRootNode()){i.roots.add(a);for(let l of[...a.styleSheets,...a.adoptedStyleSheets||[]]){let f=Pi.get(l);if((!f||f.epoch!==Ee)&&Pi.set(l,f={epoch:Ee,props:wi(l)}),!f.props)return!1;for(let c of f.props)i.universe.add(c)}Or(a.getAnimations(),i.universe)}return!0},s=o(e)&&(!t.shadowRoot||o(t.shadowRoot));for(let a=t.assignedSlot;s&&a;a=a.assignedSlot)s=o(a.getRootNode());return s?i.universe:r.__shadowUniverse=null}function _n(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?null:Jt(e).pseudoUniverse}var cc={before:null,after:null,firstLetter:null,marker:null,firstLine:null};function te(t){let e=t.ownerDocument||document;return t.getRootNode&&t.getRootNode()!==e?cc:Jt(e).pseudoGates}function fc(t,e={},n=null,r=null){let i={},o=e.excludeStyleProps,s=h=>{if(i[h]!==void 0||Ce(h)||o&&(o instanceof RegExp&&o.test(h)||typeof o=="function"&&o(h)))return;let m=t.getPropertyValue(h);m&&((h==="background-image"||h==="content")&&m.includes("url(")&&!m.includes("data:")&&(m="none"),i[h]=m)};if(r){for(let m of r)s(m);let h=n&&n.style;if(h&&h.length)for(let m=0;m<h.length;m++)s(h[m])}else for(let h=0;h<t.length;h++)s(t[h]);let a=["text-decoration-line","text-decoration-color","text-decoration-style","text-decoration-thickness","text-underline-offset","text-decoration-skip-ink"];for(let h of a)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}let l=["-webkit-text-stroke","-webkit-text-stroke-width","-webkit-text-stroke-color","paint-order"];for(let h of l)if(!i[h])try{let m=t.getPropertyValue(h);m&&(i[h]=m)}catch{}if(e.embedFonts){let h=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(let m of h)if(!i[m])try{let p=t.getPropertyValue(m);p&&(i[m]=p)}catch{}}try{(i["content-visibility"]||t.getPropertyValue("content-visibility"))==="hidden"&&(i["content-visibility"]="hidden")}catch{}Object.defineProperty(i,"__needsBgInline",{value:Ui(t),enumerable:!1});let f=parseFloat(t.getPropertyValue("border-top-width")||0)||0,c=parseFloat(t.getPropertyValue("border-right-width")||0)||0,u=parseFloat(t.getPropertyValue("border-bottom-width")||0)||0,d=parseFloat(t.getPropertyValue("border-left-width")||0)||0;if(f===0&&c===0&&u===0&&d===0){let h=(t.getPropertyValue("border-image-source")||"").trim(),m=h&&h!=="none",p=["border","border-top","border-right","border-bottom","border-left","border-width","border-style","border-color","border-top-width","border-top-style","border-top-color","border-right-width","border-right-style","border-right-color","border-bottom-width","border-bottom-style","border-bottom-color","border-left-width","border-left-style","border-left-color","border-block","border-block-width","border-block-style","border-block-color","border-inline","border-inline-width","border-inline-style","border-inline-color","border-block-start","border-block-start-width","border-block-start-style","border-block-start-color","border-block-end","border-block-end-width","border-block-end-style","border-block-end-color","border-inline-start","border-inline-start-width","border-inline-start-style","border-inline-start-color","border-inline-end","border-inline-end-width","border-inline-end-style","border-inline-end-color"];for(let g of p)delete i[g];m||(i.border="none")}return uc(i),i}function uc(t){if(!xt())return;let e=t["background-clip"]||t["-webkit-background-clip"];if(!e||!e.includes("text"))return;let n=o=>o==="transparent"||o==="rgba(0, 0, 0, 0)",r=t["-webkit-text-fill-color"];if(!n(r!==void 0?r:t.color))return;let i=dc(t["background-image"],t["background-color"]);i&&(n(t.color)&&(t.color=i),r!==void 0&&(t["-webkit-text-fill-color"]=i),t["background-image"]="none",t["background-color"]="transparent",delete t["background-clip"],delete t["-webkit-background-clip"],Object.defineProperty(t,"__bgClipTextFix",{value:i,enumerable:!1}))}function dc(t,e){let n=o=>{let s=[],a=/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)(?:[,\s/]+([\d.]+%?))?\s*\)/g,l;for(;l=a.exec(o||"");){let f=l[4];(f===void 0?1:parseFloat(f)/(f.endsWith("%")?100:1))>.05&&s.push([+l[1],+l[2],+l[3]])}return s},r=n(t);if(r.length||(r=n(e)),!r.length)return null;let i=[0,0,0];for(let[o,s,a]of r)i[0]+=o,i[1]+=s,i[2]+=a;return`rgb(${i.map(o=>Math.round(o/r.length)).join(", ")})`}function Ui(t){let e=t.getPropertyValue("background-image");if(e&&e!=="none")return!0;let n=t.getPropertyValue("background-color");if(n&&n!=="rgba(0, 0, 0, 0)"&&n!=="transparent")return!0;for(let i of ic){let o=t.getPropertyValue(i);if(o&&o!=="none")return!0}let r=t.getPropertyValue("background");return!!(r&&/url\s*\(/i.test(r))}function pc(t){for(let e=t.firstChild;e;e=e.nextSibling){if(e.nodeType===3&&/\S/.test(e.nodeValue||""))return!0;if(e.nodeType===1){let n=I(e).position;if(n!=="absolute"&&n!=="fixed")return!0}}return!1}function hc(t,e,n){try{if(typeof t.computedStyleMap=="function"){let i=t.computedStyleMap().get("width");if(i!=null)return!$i(String(i).trim().toLowerCase())}}catch{}let r=t.style&&(t.style.width||t.style.inlineSize);return r&&!$i(String(r).trim().toLowerCase())?!0:gc(t,e)?n||yc(t,e):!1}var mc=new Set(["auto","min-content","max-content","stretch","fill-available","-webkit-fill-available"]);function $i(t){return mc.has(t)||t.startsWith("fit-content")}function gc(t,e){let n=t.getBoundingClientRect().width-(parseFloat(e.paddingLeft)||0)-(parseFloat(e.paddingRight)||0)-(parseFloat(e.borderLeftWidth)||0)-(parseFloat(e.borderRightWidth)||0);if(!(n>0))return!1;let r=1/0,i=-1/0,o=null;for(let s=t.firstChild;s;s=s.nextSibling){let a;if(s.nodeType===3){if(!/\S/.test(s.nodeValue||"")||(o=o||document.createRange(),o.selectNode(s),a=o.getBoundingClientRect(),!a.width&&!a.height))continue}else if(s.nodeType===1){let l=I(s);if(l.display==="none"||l.position==="absolute"||l.position==="fixed")continue;a=s.getBoundingClientRect()}else continue;a.left<r&&(r=a.left),a.right>i&&(i=a.right)}return i===-1/0?!1:i-r<n-.5}function yc(t,e){let n=t.parentElement;if(!n)return!1;let r=I(n),i=n.getBoundingClientRect().width-(parseFloat(r.paddingLeft)||0)-(parseFloat(r.paddingRight)||0)-(parseFloat(r.borderLeftWidth)||0)-(parseFloat(r.borderRightWidth)||0)-(parseFloat(e.marginLeft)||0)-(parseFloat(e.marginRight)||0);return i>0?Math.abs(t.getBoundingClientRect().width-i)>.5:!1}var Xr=new WeakMap;function bc(t,e){let n=Xr.get(t);if(n)return n;let r=[e];for(let i in t)r.push(i,t[i]);return n=r.join(""),Xr.set(t,n),n}function Tn(t,e){return t.env===Rt&&t.stamp===Rn(e,t.hosts)}var wc=/^(width|height|inline-size|block-size|top|right|bottom|left|transform-origin|perspective-origin)$|^inset-/,Sc=/(margin|padding)[a-z-]*\s*:[^;]*(%|\bauto\b|calc\(|var\()/i,xc=new Set(["INPUT","TEXTAREA","SELECT","OPTION","OPTGROUP","PROGRESS","METER","BUTTON","DATALIST"]);function vc(t){let e=t.__styleShare;return e||(e=t.__styleShare={ids:new WeakMap,intern:new Map,snaps:new Map,rootSeen:!1}),e}function Cc(t,e){let n=e.ids.get(t);if(n!==void 0)return n;let r=t.parentElement,i;if(!r)i="R";else if(i=e.ids.get(r),i===void 0){if(e.rootSeen)return e.ids.set(t,-1),-1;i="R"}if(e.rootSeen=!0,i===-1)return e.ids.set(t,-1),-1;let o="",s=t.attributes;if(s&&s.length)if(s.length===1)o=s[0].name+"="+s[0].value;else{let l=[];for(let f=0;f<s.length;f++)l.push(s[f].name+"="+s[f].value);l.sort(),o=l.join("")}let a=i+"|"+t.tagName+"|"+o;return n=e.intern.get(a),n===void 0&&(n=e.intern.size,e.intern.set(a,n)),e.ids.set(t,n),n}function zi(t,e){let n=t.snap,r=t.snap={...n};Object.defineProperty(r,"__needsBgInline",{value:n.__needsBgInline,enumerable:!1}),n.__bgClipTextFix!==void 0&&Object.defineProperty(r,"__bgClipTextFix",{value:n.__bgClipTextFix,enumerable:!1});let i=Jt(e.ownerDocument||document),o=e.getAttribute&&e.getAttribute("style")||"",s=o&&Sc.test(o),a=!!i.marginUnstable||s&&/margin/i.test(o),l=!!i.paddingUnstable||s&&/padding/i.test(o),f=r.display!==void 0&&r.display.includes("grid"),c=r.transform!==void 0&&r.transform!=="none",u=[];for(let m in r)(wc.test(m)||f&&(m==="grid-template-columns"||m==="grid-template-rows")||c&&m==="transform"||a&&m.charCodeAt(0)===109&&m.startsWith("margin-")||l&&m.charCodeAt(0)===112&&m.startsWith("padding-"))&&u.push(m);t.h&&!("height"in r)&&u.push("height"),t.b&&!("block-size"in r)&&u.push("block-size");let d=new Set(u),h=[e.tagName.toLowerCase()];for(let m in r)d.has(m)||h.push(m,r[m]);return t.rr=u,t.sig=h.join("")+""+u.join(""),u}function Hi(t,e,n,r,i){let o=i&&i.__styleShare?r&&r.__styleShare:null,s=o?o.ids.get(t):void 0;if(s===void 0||s===-1||t.shadowRoot||t.assignedSlot)return Me(n,_n(t));let a=s+e,l=o.pseudo||(o.pseudo=new Map),f=l.get(a);if(f){let u={...f.snap},d=f.rr||zi(f,t);for(let h=0;h<d.length;h++){let m=n.getPropertyValue(d[h]);m?u[d[h]]=m:delete u[d[h]]}return u}let c=Me(n,_n(t));return l.set(a,{snap:c,rr:null,sig:null,h:"height"in c,b:"block-size"in c}),c}function kc(t,e=null,n={},r=null,i=null){let o=Zt.get(t),s=!!(n&&n.embedFonts),a=n&&n.excludeStyleProps||null;if(typeof a!="function"&&o&&Tn(o,t)&&o.embedFonts===s&&o.excludeStyleProps===a)return o.snapshot;let l=e||getComputedStyle(t),f,c=null,u=r&&r.st.snaps.get(r.id);if(u){f={...u.snap};let p=u.rr||zi(u,t);c=[];for(let g=0;g<p.length;g++){let y=p[g],b=l.getPropertyValue(y);b?f[y]=b:delete f[y],c.push(b)}Object.defineProperty(f,"__needsBgInline",{value:u.snap.__needsBgInline,enumerable:!1}),u.snap.__bgClipTextFix!==void 0&&Object.defineProperty(f,"__bgClipTextFix",{value:u.snap.__bgClipTextFix,enumerable:!1})}else f=fc(l,n,t,ln(t,i)),r&&r.st.snaps.set(r.id,{snap:f,rr:null,sig:null,h:"height"in f,b:"block-size"in f});let d=!1;if(typeof t.computedStyleMap=="function"){let p;for(let g of Ei)if(f[g]==="0px")try{p||=t.computedStyleMap(),p.get(g)?.toString()==="auto"&&(f[g]="auto",d=!0)}catch{}}Bc(t,l,f);let h=Fc(t,l,f);c!==null&&(d&&c.push("",...Ei.map(p=>f[p])),h&&c.push(""+h),Xr.set(f,u.sig+""+c.join("")+("height"in f?"":"")+("block-size"in f?"":"")));let m=Qr(t);return Zt.set(t,{env:Rt,stamp:Rn(t,m),hosts:m,snapshot:f,embedFonts:s,excludeStyleProps:a}),f}function Mc(t,e){if(t&&t.session&&t.persist)return t;if(t&&(t.styleMap||t.styleCache||t.nodeMap)){let n=t.__ctx;return(!n||t.__ctxOpts!==e)&&(n={session:t,persist:{snapshotKeyCache:jr,defaultStyle:D.defaultStyle,baseStyle:D.baseStyle,image:D.image,resource:D.resource,background:D.background},options:e||{}},t.__ctx=n,t.__ctxOpts=e),n}return{session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},persist:{snapshotKeyCache:jr,defaultStyle:D.defaultStyle,baseStyle:D.baseStyle,image:D.image,resource:D.resource,background:D.background},options:t||e||{}}}var Ac=/%|[\d.](?:em|rem|ex|ch|cap|ic|lh|rlh|v[whib]|vmin|vmax|cq[whbi]|cqmin|cqmax)\b|\b(?:calc|var|min|max|clamp|env|attr)\(|\b(?:auto|inherit|initial|unset|revert|currentcolor|-webkit-fill-available|fit-content|min-content|max-content)\b/i,_c=t=>t.tagName==="INPUT"||t.tagName==="TEXTAREA";function Ec(t,e,n){if(!t.style||t.style.length===0)return;let r=ac(t),i=r!=null&&!Ac.test(t.getAttribute("style")||""),o;for(let s=0;s<t.style.length;s++){let a=t.style[s],l=a.startsWith("border-")&&a.endsWith("-width");if(i&&l&&o===void 0){let c=t.style.borderWidth,u=Zt.get(t);o=u&&Tn(u,t)&&ji.every(d=>u.snapshot[d]===c)||n.borderWidth===c}if(i&&!r.has(a)&&(!l||o)&&!(a.startsWith("background")&&_c(t)))continue;let f=n.getPropertyValue(a);f&&(!l||f!==t.style.getPropertyValue(a))&&e.style.setProperty(a,f,t.style.getPropertyPriority(a))}}function ut(t,e,n,r){if(t.tagName==="STYLE")return;let i=Mc(n,r),o=i.options&&i.options.cache||"soft";o!=="disabled"&&Te(t.ownerDocument),o==="disabled"&&!i.session.__bumpedForDisabled&&($t(),jr.clear(),i.session.__bumpedForDisabled=!0);let{session:s,persist:a}=i;if(!s.styleCache.has(t)){let y=null;try{y=getComputedStyle(t)}catch{}s.styleCache.set(t,y||getComputedStyle((t.ownerDocument||document).documentElement))}let l=s.styleCache.get(t);t.getAttribute?.("style")&&Ec(t,e,l);let f=l.getPropertyValue("animation-name");e&&e.style&&f&&f!=="none"&&e.style.setProperty("animation","none","important");let c=t.tagName?.toLowerCase()||"div";if(Je.has(c)){let y={};Object.defineProperty(y,"__needsBgInline",{value:Ui(l),enumerable:!1});let b=Qr(t);Zt.set(t,{env:Rt,stamp:Rn(t,b),hosts:b,snapshot:y,embedFonts:!!(i.options&&i.options.embedFonts),excludeStyleProps:i.options&&i.options.excludeStyleProps||null}),s.styleMap.set(e,"");return}let u=null;if(i.options&&i.options.__styleShare&&s.styleMap){let y=vc(s),b=Cc(t,y),w=t.ownerDocument||document,x=w.activeElement;b!==-1&&!xc.has(t.tagName)&&!(x&&x!==w.body&&x!==w.documentElement&&x===t)&&(!t.getRootNode||t.getRootNode()===w)&&!t.shadowRoot&&!t.assignedSlot&&(u={st:y,id:b})}let d=kc(t,l,i.options,u,s);if(t.getAttribute?.("style"))for(let y of["top","right","bottom","left"]){let b=`margin-${y}`;d[b]==="auto"&&e.style.setProperty(b,"auto","important")}d.__bgClipTextFix&&e&&e.style&&(e.style.setProperty("background-image","none","important"),e.style.setProperty("background-color","transparent","important"),e.style.setProperty("color",d.__bgClipTextFix,"important"),e.style.setProperty("-webkit-text-fill-color",d.__bgClipTextFix,"important")),Rc(t,l,d),e.style?.length&&d["box-sizing"]==="border-box"&&l.getPropertyValue("box-sizing")!=="border-box"&&$c(t,e,d);let h=Xi(t);if(Lc(t,e,d,h,s),h){let y=l.getPropertyValue("min-width");if(!y||y==="auto"||y==="0px"){d["min-width"]="0px";let b=l.getPropertyValue("overflow-x"),w=t.parentElement;if(y==="auto"&&(b==="visible"||b==="clip")&&w&&I(w).display.includes("flex")){let x=s.flexOverflow||(s.flexOverflow=new WeakMap),C=x.get(w);if(C===void 0){if(C=w.scrollWidth>w.clientWidth,!C){let S=I(w),k=T=>parseFloat(S.getPropertyValue(T))||0,E=k("width")-(S.boxSizing==="border-box"?k("padding-left")+k("padding-right")+k("border-left-width")+k("border-right-width"):0),v=S.flexDirection.startsWith("row")===(S.writingMode==="horizontal-tb")&&S.flexWrap==="nowrap",M=0,_=0;for(let T of w.children){s.styleCache.has(T)||s.styleCache.set(T,getComputedStyle(T));let $=s.styleCache.get(T);if($.display==="none"||$.position==="absolute"||$.position==="fixed")continue;let N=A=>parseFloat($.getPropertyValue(A))||0,F=N("width")+N("margin-left")+N("margin-right")+($.boxSizing==="border-box"?0:N("padding-left")+N("padding-right")+N("border-left-width")+N("border-right-width"));M=v?M+F:Math.max(M,F),_++}C=M+(v?Math.max(0,_-1)*k("column-gap"):0)>E+_/60}x.set(w,C)}C&&(d["min-width"]=d.width)}}}let m=bc(d,c),p=!0;if(kn(c,(d.display||"").toLowerCase())){p=pc(t),p&&Ur(c,d,h)&&hc(t,l,h)&&(p=!1),m=`${m}${p?"|c":""}${h?"|f":""}`;let y=d["text-wrap-mode"]||d["white-space"]||"";p&&y!=="nowrap"&&y!=="pre"&&(s.reconcileRisk=(s.reconcileRisk||0)+1)}let g=a.snapshotKeyCache.get(m);g===void 0&&(g=ke(d,c,p,h),a.snapshotKeyCache.size>=nc&&a.snapshotKeyCache.delete(a.snapshotKeyCache.keys().next().value),a.snapshotKeyCache.set(m,g)),s.styleMap.set(e,g)}function Rc(t,e,n){let r=e.getPropertyValue("overflow-x"),i=e.getPropertyValue("overflow-y");if((r==="visible"||!r)&&(i==="visible"||!i)||e.getPropertyValue("box-sizing")==="border-box"||typeof t.clientWidth!="number"||!t.offsetWidth)return;let o=f=>parseFloat(f)||0,s=t.offsetWidth-t.clientWidth-o(e.getPropertyValue("border-left-width"))-o(e.getPropertyValue("border-right-width")),a=t.offsetHeight-t.clientHeight-o(e.getPropertyValue("border-top-width"))-o(e.getPropertyValue("border-bottom-width")),l=(f,c)=>{let u=n[f];if(!u||!u.endsWith("px"))return;let d=parseFloat(u);Number.isFinite(d)&&(n[f]=`${Math.round((d+c)*1e3)/1e3}px`)};s>=2&&(l("width",s),l("inline-size",s)),a>=2&&(l("height",a),l("block-size",a))}var ji=["border-top-width","border-right-width","border-bottom-width","border-left-width"],Vi=["width","inline-size","height","block-size"];function Fc(t,e,n){if(!ji.some(l=>n[l]?.includes("."))||e.getPropertyValue("box-sizing")==="border-box"||n.display==="inline")return"";for(let l of["width","height"]){let f=n[`min-${l}`],c=n[`max-${l}`];if(f&&f!=="0px"&&f!=="auto"||c&&c!=="none")return""}let r=l=>parseFloat(n[l])||0,i=r("padding-left")+r("padding-right")+r("border-left-width")+r("border-right-width"),o=r("padding-top")+r("padding-bottom")+r("border-top-width")+r("border-bottom-width"),s=(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb";for(let l of Vi){let f=n[l];if(!f||!f.endsWith("px"))continue;let u=l==="width"||l==="inline-size"&&!s||l==="block-size"&&s?i:o;n[l]=`${Math.round((parseFloat(f)+u)*1e3)/1e3}px`}n["box-sizing"]="border-box";let a="";if(e.getPropertyValue("overflow-x")==="auto"){let l=t.scrollWidth<=t.clientWidth;n["overflow-x"]=l?"hidden":"auto",l&&(a+="x")}if(e.getPropertyValue("overflow-y")==="auto"){let l=t.scrollHeight<=t.clientHeight;n["overflow-y"]=l?"hidden":"auto",l&&(a+="y")}return a}var Tc=["box-sizing",...Vi,"overflow-x","overflow-y"],Pc=/(?:box-sizing|width|height|inline-size|block-size|overflow(?:-[xy])?)\s*:/i;function $c(t,e,n){if(Pc.test(t.getAttribute("style")))for(let r of Tc)e.style.getPropertyValue(r)&&n[r]&&e.style.setProperty(r,n[r],e.style.getPropertyPriority(r))}function Nc(t){return t.backgroundImage&&t.backgroundImage!=="none"||t.backgroundColor&&t.backgroundColor!=="rgba(0, 0, 0, 0)"&&t.backgroundColor!=="transparent"||(parseFloat(t.borderTopWidth)||0)>0||(parseFloat(t.borderBottomWidth)||0)>0||(parseFloat(t.paddingTop)||0)>0||(parseFloat(t.paddingBottom)||0)>0?!0:(t.overflowBlock||t.overflowY||"visible")!=="visible"}var Ni=typeof CSS<"u"&&CSS.supports?.("text-wrap-mode","nowrap")?"text-wrap-mode":"white-space";function Lc(t,e,n,r,i){let o=n.display||"";if(!r&&!o.startsWith("inline-")&&(n.float||"none")==="none"&&n.position!=="absolute"&&n.position!=="fixed")return;let s=n["text-wrap-mode"]||n["white-space"]||"";if(s==="nowrap"||s==="pre"||Ni==="white-space"&&s!=="normal"||(n["writing-mode"]||"horizontal-tb")!=="horizontal-tb"||!e.style)return;let a=i.__oneLine||=new WeakSet;for(let l=t.parentElement;l;l=l.parentElement)if(a.has(l))return;Ic(t,n,i)&&(a.add(t),e.style.setProperty(Ni,"nowrap"))}function Ic(t,e,n){let r=t.clientHeight-(parseFloat(e["padding-top"])||0)-(parseFloat(e["padding-bottom"])||0);if(r>3*(parseFloat(e["font-size"])||16)||e["word-break"]==="normal"&&e["overflow-wrap"]==="normal"&&/^[\w\u00C0-\u024F.,:;!?'"()%]*$/.test(t.textContent.trim()))return!1;let i=t.ownerDocument||document,o=i.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT),s=i.createRange(),a=null,l=0,f=0;for(let d=o.nextNode();d;d=o.nextNode()){if(d.nodeType===1){if(d.shadowRoot||d.localName==="br"||d.localName==="textarea")return!1;continue}if(/\S/.test(d.data)){if(++f>64)return!1;s.selectNodeContents(d);for(let h of s.getClientRects())if(h.height){if(a||=h,Math.min(a.bottom,h.bottom)-Math.max(a.top,h.top)<Math.min(a.height,h.height)/2)return!1;l=Math.max(l,h.height)}}}if(!a)return!1;let c=Gi(t,n.__axes||=new WeakMap);if(!c)return!1;let u=c===qi&&t.offsetHeight?t.getBoundingClientRect().height/t.offsetHeight:1;return r*u<=2*l}var Oc=0,Li=1,qi=2;function Gi(t,e){let n=e.get(t);if(n!==void 0)return n;let r=I(t),i=r.transform,o=i&&i!=="none"?i.slice(i.indexOf("(")+1,-1).split(",").map(parseFloat):null;if(r.rotate&&r.rotate!=="none"||o&&(i.startsWith("matrix3d")?o[1]||o[4]:o[1]||o[2]))n=Oc;else{let s=t.parentElement||Pt(t);n=s?Gi(s,e):Li,n===Li&&(r.scale&&r.scale!=="none"||r.zoom&&r.zoom!=="1"||o&&(i.startsWith("matrix3d")?o[0]!==1||o[5]!==1:o[0]!==1||o[3]!==1))&&(n=qi)}return e.set(t,n),n}function Xi(t){let e=t.parentElement;if(!e)return!1;let n=I(e).display||"";return n.includes("flex")||n.includes("grid")}function Dc(t){for(let r=t.firstChild;r;r=r.nextSibling)if(r.nodeType===3&&/\S/.test(r.nodeValue))return!0;let e=t.firstElementChild,n=t.lastElementChild;if(e&&e.tagName==="BR"||n&&n.tagName==="BR")return!0;for(let r=t.firstElementChild;r;r=r.nextElementSibling){let i=I(r);if(i.display==="none")continue;let o=i.position;if(o!=="absolute"&&o!=="fixed")return!0}return!1}function Wc(t){let e=t.getBoundingClientRect().top,n=-1/0,r=null;for(let i=t.firstChild;i;i=i.nextSibling){if(i.nodeType===3){if(!/\S/.test(i.nodeValue||""))continue;r=r||document.createRange(),r.selectNode(i);let a=r.getBoundingClientRect();(a.width||a.height)&&(n=Math.max(n,a.bottom));continue}if(i.nodeType!==1)continue;let o=I(i);if(o.display==="none")continue;let s=o.position;s==="absolute"||s==="fixed"||o.float&&o.float!=="none"||(n=Math.max(n,i.getBoundingClientRect().bottom))}return n===-1/0?NaN:n-e}function Bc(t,e,n){if(Mt(t)&&t.style&&t.style.height)return;let r=t.tagName&&t.tagName.toLowerCase();if(!r||!["div","section","article","main","aside","header","footer","nav"].includes(r)||e.aspectRatio&&e.aspectRatio!=="none"&&e.aspectRatio!=="auto")return;let o=e.display||"";if(o.includes("flex")||o.includes("grid"))return;let s=e.position;if(s==="absolute"||s==="fixed"||s==="sticky"||e.transform!=="none"||Nc(e)||Xi(t))return;let a=e.overflowX||e.overflow||"visible",l=e.overflowY||e.overflow||"visible";if(a!=="visible"||l!=="visible")return;let f=e.clip;if(f&&f!=="auto"&&f!=="rect(auto, auto, auto, auto)"||e.visibility==="hidden"||e.opacity==="0"||!Dc(t))return;let c=parseFloat(e.height),u=Wc(t);Number.isFinite(c)&&Number.isFinite(u)&&Math.abs(c-u)>2||(delete n.height,delete n["block-size"])}Ae();var Uc=new Set(["symbol","defs"]),zc=new Set(["mask","clipPath","linearGradient","radialGradient","pattern","marker","filter"]),eo=new WeakMap,Yi=-1;function Pn(t){let e=Ut();return e!==Yi&&(eo=new WeakMap,Yi=e),Ki(t)}function Ki(t){let e=eo.get(t);if(e!==void 0)return e;let n;if(t.namespaceURI==="http://www.w3.org/2000/svg"&&(zc.has(t.localName)?n=!1:Uc.has(t.localName)&&(n=!0)),n===void 0){let r=t.parentNode;n=!!(r&&r.nodeType===1)&&Ki(r)}return eo.set(t,n),n}function Qi(t,e){if(t?.nodeType!==1||e?.nodeType!==1||Pn(t))return;let n=t.getAttribute?.("style"),r=!!(n&&n.includes("var("));if(!r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(a&&typeof a.value=="string"&&!a.value.startsWith("data:")&&a.value.includes("var(")){r=!0;break}}}let i=null;if(r)try{i=getComputedStyle(t)}catch{}if(r){let o=t.style;if(o&&o.length){let s=new Set;for(let a=0;a<o.length;a++){let l=o[a];if(s.has(l))continue;s.add(l);let f=o.getPropertyValue(l);if(!f||!f.includes("var("))continue;let c=i&&i.getPropertyValue(l);if(c)try{e.style.setProperty(l,c.trim(),o.getPropertyPriority(l))}catch{}}}}if(r&&t.attributes?.length){let o=t.attributes;for(let s=0;s<o.length;s++){let a=o[s];if(!a||typeof a.value!="string"||a.value.startsWith("data:")||!a.value.includes("var("))continue;let l=a.name,f=i&&i.getPropertyValue(l);if(f)try{e.style.setProperty(l,f.trim())}catch{}}}}vt();vt();wt();le();Cn();At();function Pe(t){return!!(!t||t.startsWith("data:")||t.startsWith("blob:"))}function $e(t,e){if(!t)return null;let n=0;try{n=e?e.getBoundingClientRect().width||e.width:0}catch{}n||(n=window.innerWidth||1e3);let r=[];for(let o of t.split(",")){let s=o.trim().split(/\s+/);if(!s[0])continue;let a=s[1]||"",l=1;/^\d*\.?\d+x$/i.test(a)?l=parseFloat(a):/^\d+w$/i.test(a)&&(l=parseInt(a,10)/n),r.push({url:s[0],d:l})}if(!r.length)return null;r.sort((o,s)=>o.d-s.d);let i=window.devicePixelRatio||1;return(r.find(o=>o.d>=i)||r[r.length-1]).url}function Zi(t,e){let n=t.currentSrc||"";if(n&&!Pe(n))return n;let r=e.querySelectorAll("source[srcset]"),i=null;for(let o of r){let s=o.getAttribute("srcset");if(!s||Pe(s))continue;let a=o.getAttribute("type");if(a&&!Rr.test(a.trim()))continue;let l=o.getAttribute("media");if(l)try{if(window.matchMedia(l).matches)return $e(s,t)}catch{}i||(i=$e(s,t))}return i}function Ji(t){let e=[t.getAttribute("data-src"),t.getAttribute("data-lazy-src"),t.getAttribute("data-original"),t.getAttribute("data-hi-res-src")];for(let r of e)if(r&&!Pe(r))return r;let n=t.getAttribute("data-srcset")||t.getAttribute("data-lazy-srcset");if(n){let r=n.split(",")[0].trim().split(/\s+/)[0];if(r&&!Pe(r))return r}return null}_t();mt();function Hc(t,e){if(t=t.trim(),!t)return t;let n=e?`[data-sd-slotted~="${e}"]`:"[data-sd-slotted]";return t.endsWith(":not([data-sd-slotted])")||t.endsWith(`:not(${n})`)?t:`${t}:not(${n})`}var jc=/::[a-zA-Z-]+(?:\([^)]*\))?$|:(?:before|after|first-letter|first-line)$/,Vc=/^::?(?:before|after|first-letter)$/;function qc(t,e,n=!0,r){return Dr(t,",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")&&i.includes("data-sd")||i.startsWith("@"))return i;let o=i.match(jc);if(o&&Vc.test(o[0]))return":not(*)";let s=o?i.slice(0,o.index).trim():i,a=n?Hc(s,r):s;return`:where(${e} ${a})${o?o[0]:""}`}).join(", ")}function ns(t,e,n){return t?(t=t.replace(/:host-context\(([^)]+)\)/g,(r,i)=>`:where(:where(${i.trim()}) ${e})`),t=t.replace(/:host\(([^)]+)\)/g,(r,i)=>`:where(${e}:is(${i.trim()}))`),t=t.replace(/:host\b/g,`:where(${e})`),t=t.replace(/::slotted\(([^)]+)\)/g,(r,i)=>`:where(${e} ${i.trim()})`),t=t.replace(/(^|})(\s*)([^@}{]+){/g,(r,i,o,s)=>{let a=qc(s,e,!0,n);return`${i}${o}${a}{`}),t):""}function rs(t){return t.shadowScopeSeq=(t.shadowScopeSeq||0)+1,`s${t.shadowScopeSeq}`}function pe(t){let e="";for(let n of t)if(n.media&&n.cssRules){let r=!1;try{r=window.matchMedia(n.conditionText||n.media.mediaText).matches}catch{}r&&(e+=pe(n.cssRules))}else if(n.constructor?.name==="CSSSupportsRule")e+=`@supports ${n.conditionText}{${pe(n.cssRules)}}`;else if(n.cssRules&&n.cssRules.length&&/@media/i.test(n.cssText)){let r=n.cssText.slice(0,n.cssText.indexOf("{")+1);e+=r+(n.style?n.style.cssText:"")+pe(n.cssRules)+"}"}else e+=n.cssText+`
|
|
9
9
|
`;return e}function os(t){let e="";try{t.querySelectorAll("style").forEach(r=>{let i=null;try{i=r.sheet&&r.sheet.cssRules}catch{}e+=(i?pe(i):r.textContent||"")+`
|
|
10
|
-
`});let n=t.adoptedStyleSheets||[];for(let r of n)try{r&&r.cssRules&&(e+=pe(r.cssRules))}catch{}}catch{}return e}function is(t,e,n){if(!e)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=e,t.insertBefore(r,t.firstChild||null)}function ss(t,e,n={}){try{let r=null,i=I(t).content;if(i&&i.includes("url(")){let f=i.match(/url\(["']?([^"')]+)["']?\)/);f&&(r=f[1])}let o=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",l=r||(o?Zi(t,o):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||$e(a,t)||t.src||"";if((!l||Pe(l))&&n.resolvePicturePlaceholders!==!1){let f=Ji(t);f&&(l=f)}if(!l)return;e.getAttribute("src")!==l&&e.setAttribute("src",l),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function as(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(t);)e.add(r[1]);return e}function
|
|
11
|
-
`:""}function cs(t,e){if(!t)return;let n=r=>{let i=r.getAttribute("data-sd-slotted")||"";e?` ${i} `.includes(` ${e} `)||r.setAttribute("data-sd-slotted",i?`${i} ${e}`:e):r.setAttribute("data-sd-slotted",i)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}async function Gc(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},r=n(),i=0;for(;i<e&&(!r||!r.body&&!r.documentElement);)await new Promise(o=>setTimeout(o,0)),r=n(),i++;return r&&(r.body||r.documentElement)?r:null}function Xc(t){let e=t.getBoundingClientRect(),n=0,r=0,i=0,o=0;try{let l=getComputedStyle(t);n=parseFloat(l.borderLeftWidth)||0,r=parseFloat(l.borderRightWidth)||0,i=parseFloat(l.borderTopWidth)||0,o=parseFloat(l.borderBottomWidth)||0}catch{}let s=Math.max(0,Math.round(e.width-(n+r))),a=Math.max(0,Math.round(e.height-(i+o)));return{contentWidth:s,contentHeight:a,rect:e}}function Ct(t){let e=0,n=0;if(t.offsetWidth>0&&(e=t.offsetWidth),t.offsetHeight>0&&(n=t.offsetHeight),e===0||n===0)try{let r=getComputedStyle(t);if(e===0){let i=parseFloat(r.width);!isNaN(i)&&i>0&&(e=i)}if(n===0){let i=parseFloat(r.height);!isNaN(i)&&i>0&&(n=i)}}catch{}if(e===0||n===0)try{if(e===0){let r=parseFloat(t.getAttribute("width"));!isNaN(r)&&r>0&&(e=r)}if(n===0){let r=parseFloat(t.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((e===0||n===0)&&(t.naturalWidth||t.naturalHeight))try{e===0&&t.naturalWidth>0&&(e=t.naturalWidth),n===0&&t.naturalHeight>0&&(n=t.naturalHeight)}catch{}return{width:e,height:n}}function Yc(t,e,n){let r=t.defaultView,i=r?r.scrollX:0,o=r?r.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,l=t.documentElement?t.documentElement.scrollLeft:0,f=t.documentElement?t.documentElement.scrollTop:0,c=0,u=0,d=0,h=0;try{let p=r&&t.body?r.getComputedStyle(t.body):null;p&&(c=(parseFloat(p.marginTop)||0)+(parseFloat(p.paddingTop)||0),u=(parseFloat(p.marginRight)||0)+(parseFloat(p.paddingRight)||0),d=(parseFloat(p.marginBottom)||0)+(parseFloat(p.paddingBottom)||0),h=(parseFloat(p.marginLeft)||0)+(parseFloat(p.paddingLeft)||0))}catch{}let m=t.createElement("style");if(m.setAttribute("data-sd-iframe-pin",""),J(m),m.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${c}px ${u}px ${d}px ${h}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(t.head||t.documentElement).appendChild(m),de(t.documentElement),i||o)try{t.body&&(t.body.scrollLeft=i,t.body.scrollTop=o),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=i),t.documentElement.scrollTop||(t.documentElement.scrollTop=o))}catch{}return()=>{try{m.remove()}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(i,o),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=l,t.documentElement.scrollTop=f)}catch{}de(t.documentElement)}}async function no(t,e,n){let r=await Gc(t,3);if(!r)throw new Error("The iframe document isn't ready.");let{contentWidth:i,contentHeight:o,rect:s}=Xc(t),a=n?.snap;if(!a||typeof a.toPng!="function")throw new Error("Iframes are only captured through snapdom(el).");let l={...n,scale:1,clip:null,__pinned:!0},f=Yc(r,i,o),c;try{c=await a.toPng(r.documentElement,l)}finally{f()}c.style.display="block",c.style.width=`${i}px`,c.style.height=`${o}px`;let u=document.createElement("div");return e.nodeMap.set(u,t),ut(t,u,e,n),u.style.overflow="hidden",u.style.display="block",u.style.width||(u.style.width=`${Math.round(s.width)}px`),u.style.height||(u.style.height=`${Math.round(s.height)}px`),u.appendChild(c),u}function fs(t){try{let e=t&&t.accentColor;if(e&&e!=="auto"&&e!=="none")return e;let n=t&&t.color;if(n)return n}catch{}return"#0a6ed1"}function us(t){let{width:e,height:n}=Ct(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Number.isFinite(o)&&o>0?o:e||r.width||128,l=Number.isFinite(s)&&s>0?s:n||r.height||16,f=Number.parseFloat(t.min)||0,c=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,u=Number.parseFloat(t.value),d=c-f,h=d>0&&Number.isFinite(u)?Math.min(1,Math.max(0,(u-f)/d)):.5,m="middle";try{i&&i.verticalAlign&&(m=i.verticalAlign)}catch{}let p=document.createElement("div");p.setAttribute("data-snapdom-input-replacement","range"),p.style.cssText=`display:inline-block;width:${a}px;height:${l}px;vertical-align:${m};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(a)),g.setAttribute("height",String(l)),g.setAttribute("viewBox",`0 0 ${a} ${l}`),g.style.cssText=`width:${a}px;height:${l}px;overflow:visible`,p.appendChild(g);function y(){let b=fs(i),w=!!t.disabled,x=Math.max(2,Math.min(4,l)),C=(l-x)/2,S=Math.max(10,Math.min(14,Math.max(l,10))),k=S/2,E=k+h*Math.max(0,a-S);g.innerHTML="";let R=(M,_,T,$)=>{let N=document.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("x",String(M)),N.setAttribute("y",String(C)),N.setAttribute("width",String(Math.max(0,_))),N.setAttribute("height",String(x)),N.setAttribute("rx",String(x/2)),N.setAttribute("fill",T),$&&N.setAttribute("fill-opacity",$),g.appendChild(N)};R(0,a,"#808080","0.4"),R(0,E,b);let v=document.createElementNS("http://www.w3.org/2000/svg","circle");v.setAttribute("cx",String(E)),v.setAttribute("cy",String(l/2)),v.setAttribute("r",String(k)),v.setAttribute("fill",b),g.appendChild(v),w&&g.setAttribute("opacity","0.5"),p.style.setProperty("width",`${a}px`,"important"),p.style.setProperty("height",`${l}px`,"important"),p.style.setProperty("min-width",`${a}px`,"important"),p.style.setProperty("min-height",`${l}px`,"important")}return y(),{el:p,applyVisual:y}}function ds(t){let{width:e,height:n}=Ct(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Math.round(e||r.width||0),l=Math.round(n||r.height||0),f=Number.isFinite(o)&&o>0?Math.round(o):Math.max(12,a||16),c=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,l||16),u=(t.type||"text").toLowerCase()==="checkbox",d=!!t.checked,h=!!t.indeterminate,p=Math.max(Math.min(f,c),12),g=Math.max(f,p),y=Math.max(c,p),b="middle";try{i&&i.verticalAlign&&(b=i.verticalAlign)}catch{}let w=document.createElement("div");w.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),w.style.cssText=`display:inline-block;width:${g}px;height:${y}px;vertical-align:${b};flex-shrink:0;line-height:0;`;let x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("width",String(g)),x.setAttribute("height",String(y)),x.setAttribute("viewBox",`0 0 ${p} ${p}`),x.style.cssText=`width:${g}px;height:${y}px`,w.appendChild(x);function C(){let S=fs(i),k=2,E=k/2,R=p-k;if(x.innerHTML="",u){let v=document.createElementNS("http://www.w3.org/2000/svg","rect");if(v.setAttribute("x",String(E)),v.setAttribute("y",String(E)),v.setAttribute("width",String(R)),v.setAttribute("height",String(R)),v.setAttribute("rx","2"),v.setAttribute("ry","2"),v.setAttribute("fill",d?S:"none"),v.setAttribute("stroke",S),v.setAttribute("stroke-width",String(k)),x.appendChild(v),d){let M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M ${E+2} ${p/2} L ${p/2-1} ${p-E-2} L ${p-E-2} ${E+2}`),M.setAttribute("stroke","white"),M.setAttribute("stroke-width",String(Math.max(1.5,k))),M.setAttribute("fill","none"),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),x.appendChild(M)}else if(h){let M=document.createElementNS("http://www.w3.org/2000/svg","rect"),_=Math.max(6,R-4);M.setAttribute("x",String((p-_)/2)),M.setAttribute("y",String((p-k)/2)),M.setAttribute("width",String(_)),M.setAttribute("height",String(k)),M.setAttribute("fill",S),M.setAttribute("rx","1"),x.appendChild(M)}}else{let v=document.createElementNS("http://www.w3.org/2000/svg","circle");if(v.setAttribute("cx",String(p/2)),v.setAttribute("cy",String(p/2)),v.setAttribute("r",String((p-k)/2)),v.setAttribute("fill",d?S:"none"),v.setAttribute("stroke",S),v.setAttribute("stroke-width",String(k)),x.appendChild(v),d){let M=document.createElementNS("http://www.w3.org/2000/svg","circle"),_=Math.max(2,(p-k*2)*.35);M.setAttribute("cx",String(p/2)),M.setAttribute("cy",String(p/2)),M.setAttribute("r",String(_)),M.setAttribute("fill","white"),x.appendChild(M)}}w.style.setProperty("width",`${g}px`,"important"),w.style.setProperty("height",`${y}px`,"important"),w.style.setProperty("min-width",`${g}px`,"important"),w.style.setProperty("min-height",`${y}px`,"important")}return C(),{el:w,applyVisual:C}}var fn=new ft(80);async function Kc(t){if(D.resource?.has(t))return D.resource.get(t);if(fn.has(t))return fn.get(t);let e=(async()=>{let n=await at(t,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`Couldn't read ${t}`);return D.resource?.set(t,n.data),n.data})();fn.set(t,e);try{let n=await e;return fn.set(t,n),n}catch(n){throw fn.delete(t),n}}var ts=/\bblob:[^)"'\s]+/g;function Nn(t){return typeof t=="string"&&t.startsWith("blob:")}function Qc(t){return(t||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function Zc(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function un(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function Ln(t,e=null){if(!t)return;let n=e,r=new Set,i=[],o=new Map,s=(p,g,y,b)=>{r.add(y),i.push(()=>{o.has(y)&&(p.setAttribute(g,o.get(y)),b?.())})},a=(p,g)=>{if(!p||!p.includes("blob:"))return;let y=p.match(ts)||[];if(y.length){for(let b of y)r.add(b);i.push(()=>{let b=p.replace(ts,w=>o.get(w)||w);b!==p&&g(b)})}},l=un(t,"img");for(let p of l)try{let y=p.getAttribute("src")||p.currentSrc||"";Nn(y)&&s(p,"src",y);let b=p.getAttribute("srcset");if(b&&b.includes("blob:")){let w=Qc(b);for(let x of w)Nn(x.url)&&r.add(x.url);i.push(()=>{let x=!1;for(let C of w)o.has(C.url)&&(C.url=o.get(C.url),x=!0);x&&p.setAttribute("srcset",Zc(w))})}}catch(g){j(n,"Couldn't inline a blob: image.",g)}let f=un(t,"image");for(let p of f)try{let g="http://www.w3.org/1999/xlink",y=p.getAttribute("href")||p.getAttributeNS?.(g,"href");Nn(y)&&s(p,"href",y,()=>p.removeAttributeNS?.(g,"href"))}catch(g){j(n,"Couldn't inline a blob: SVG image.",g)}let c=un(t,"[style*='blob:']");for(let p of c)try{let g=p.getAttribute("style");a(g,y=>p.setAttribute("style",y))}catch(g){j(n,"Couldn't inline blob: URLs in a style attribute.",g)}let u=un(t,"style");for(let p of u)try{let g=p.textContent||"";a(g,y=>{p.textContent=y})}catch(g){j(n,"Couldn't inline blob: URLs in a <style>.",g)}let d=["poster"];for(let p of d){let g=un(t,`[${p}^='blob:']`);for(let y of g)try{let b=y.getAttribute(p);Nn(b)&&s(y,p,b)}catch(b){j(n,`Couldn't inline the blob: URL in ${p}.`,b)}}if(!r.size)return;let h=[...r],m=0;await Promise.all(Array.from({length:Math.min(4,h.length)},async()=>{for(;m<h.length;){let p=h[m++];try{o.set(p,await Kc(p))}catch(g){j(n,"Couldn't read a blob: URL; kept it as is.",g)}}}));for(let p of i)try{p()}catch(g){j(n,"Couldn't write an inlined blob: URL.",g)}}var Jc=["font-family","font-size","font-style","font-weight","font-stretch","font-variant","font-feature-settings","font-variation-settings","font-kerning","letter-spacing","text-transform"],tf=new Set(["text","search","email","url","tel","number","submit","reset","button"]),ef=/[^\s\uD800-\uDFFF]{2,}/;function ps(t,e=document){let n=e.defaultView||window;if(!xt()||!e.body||!(n.visualViewport?.scale<1||n.screen.width<e.documentElement.clientWidth))return;let r=J(e.createElement("div"));r.style.cssText="position:absolute;left:0;top:0;width:0;height:0;overflow:hidden;visibility:hidden";let i=[];for(let[o,s]of t){if(o.nodeType!==1||s.nodeType!==1)continue;let a=n.getComputedStyle(s),l=s.localName==="textarea"||s.localName==="input"&&tf.has(s.type)?rf(s,a,e):nf(s,a.textAlign==="justify"||a.textAlignLast==="justify");if(!l)continue;let f=s.getBoundingClientRect(),c=s.offsetWidth&&f.width?f.width/s.offsetWidth:1,u=e.createElement("span");u.style.whiteSpace="pre";for(let d of Jc)u.style.setProperty(d,a.getPropertyValue(d));u.textContent=l.word,r.appendChild(u),i.push({clone:o,cs:a,span:u,live:l.distance/c,centers:l.centers,height:l.height})}if(i.length){e.body.appendChild(r);try{for(let{clone:o,cs:s,span:a,live:l,centers:f,height:c}of i){let u=a.firstChild,d=(parseFloat(s.letterSpacing)||0)*(f?u.length-1:u.length),h=c?e.createRange():null;h&&h.selectNodeContents(a);let m=c?h.getBoundingClientRect().height:f?Math.abs(es(u,u.length-1)-es(u,0)):a.getBoundingClientRect().width,p=(l-(c?0:d))/(m-(c?0:d));if(p>1.005&&Number.isFinite(p)){if(c){let g=[];for(let y of[!1,!0]){let b=parseFloat(s.fontSize),w=b*(p+1);for(let x=0;x<10;x++){let C=(b+w)/2;a.style.fontSize=`${C}px`;let S=h.getBoundingClientRect().height;(y?S>l:S>=l)?w=C:b=C}g.push((b+w)/2)}p=(g[0]+g[1])/2/parseFloat(s.fontSize)}o.style.setProperty("font-size",`${parseFloat(s.fontSize)*p}px`),s.lineHeight!=="normal"&&o.style.setProperty("line-height",`${parseFloat(s.lineHeight)*p}px`)}}}finally{r.remove()}}}function es(t,e){let n=t.ownerDocument.createRange();n.setStart(t,e),n.setEnd(t,e+1);let r=n.getBoundingClientRect();return r.left+r.width/2}function nf(t,e=!1){for(let n=t.firstChild;n;n=n.nextSibling){if(n.nodeType!==3)continue;let r=/\S+/.exec(n.data);if(!r)continue;let i=t.ownerDocument.createRange();i.setStart(n,r.index),i.setEnd(n,r.index+r[0].length);let o=i.getClientRects();return o.length===1?{word:r[0],distance:e?o[0].height:o[0].width,centers:!1,height:e}:null}return null}function rf(t,e,n){let r=ef.exec(t.value.split(`
|
|
12
|
-
`)[0]);if(!r||t.scrollLeft||t.scrollTop||!n.caretPositionFromPoint)return null;let i=t.getBoundingClientRect(),o=t.localName==="textarea"?i.top+(parseFloat(e.borderTopWidth)||0)+(parseFloat(e.paddingTop)||0)+3:i.top+i.height/2,s=c=>{let u=n.caretPositionFromPoint(c,o);return u&&u.offsetNode===t?u.offset:-1},a=i.width/16,l=c=>{let u=i.left;for(;u<=i.right&&s(u)<c;)u+=a;if(u>i.right)return NaN;let d=u-a;for(let h=0;h<16;h++){let m=(d+u)/2;s(m)>=c?u=m:d=m}return u},f=Math.abs(l(r.index+r[0].length)-l(r.index+1));return Number.isFinite(f)?{word:r[0],distance:f,centers:!0}:null}mt();var hs=new Set(["rgba(0, 0, 0, 0)","transparent"]),ro="Highlight";function ms(t){let n=(t.ownerDocument||document).getSelection?.();if(!n||n.isCollapsed||n.rangeCount===0)return null;let r=[];for(let i=0;i<n.rangeCount;i+=1){let o=n.getRangeAt(i);if(!o.collapsed)try{o.intersectsNode(t)&&r.push(o)}catch{}}return r.length?{ranges:r,styles:new Map}:null}function of(t,e){if(e.styles.has(t))return e.styles.get(t);let n;try{let r=getComputedStyle(t);if(r.userSelect==="none"||r.webkitUserSelect==="none"||r.getPropertyValue("-webkit-user-select")==="none")return e.styles.set(t,null),null;let i=getComputedStyle(t,"::selection"),o=[],s=i.backgroundColor,a=s&&!hs.has(s)&&s!==r.backgroundColor;o.push(`background-color:${a?s:ro}`),i.color&&i.color!==r.color&&o.push(`color:${i.color}`,`-webkit-text-fill-color:${i.color}`),i.textShadow&&i.textShadow!==r.textShadow&&o.push(`text-shadow:${i.textShadow}`),i.textDecorationLine&&i.textDecorationLine!=="none"&&i.textDecorationLine!==r.textDecorationLine&&o.push(`text-decoration:${i.textDecorationLine} ${i.textDecorationStyle||"solid"} ${i.textDecorationColor||"currentcolor"}`),n=o.join(";")}catch{n=`background-color:${ro}`}return e.styles.set(t,n),n}function gs(t,e){let n=t.data;if(!n)return null;let r=t.parentElement;if(!r)return null;let i=[];for(let f of e.ranges){let c=!1;try{c=f.intersectsNode(t)}catch{}if(!c)continue;let u=f.startContainer===t?f.startOffset:0,d=f.endContainer===t?f.endOffset:n.length;d>u&&i.push([u,d])}if(i.length===0)return null;let o=of(r,e);if(!o)return null;i.sort((f,c)=>f[0]-c[0]);let s=t.ownerDocument||document,a=s.createDocumentFragment(),l=0;for(let[f,c]of i){f>l&&a.append(s.createTextNode(n.slice(l,f)));let u=s.createElement("span");u.setAttribute("data-snapdom-selection",""),u.setAttribute("style",`all:unset;${o}`),u.textContent=n.slice(f,c),a.append(u),l=c}return l<n.length&&a.append(s.createTextNode(n.slice(l))),a}var In=t=>Number.parseFloat(t)||0,sf=["font-family","font-size","font-weight","font-style","font-variant","font-stretch","letter-spacing","word-spacing","text-transform","text-indent","text-align","line-height","tab-size","direction"];function af(t,e){try{let r=getComputedStyle(t,"::selection").backgroundColor;if(r&&!hs.has(r)&&r!==e.backgroundColor)return r}catch{}return ro}function ys(t,e){let n=t.ownerDocument||document;if(n.activeElement!==t)return;let r=null,i=null;try{r=t.selectionStart,i=t.selectionEnd}catch{return}if(r==null||i==null||r===i)return;let o=t.value||"";if(t.localName==="input"&&t.type==="password"&&(o="\u2022".repeat(o.length)),!o)return;let s=getComputedStyle(t),a=t.localName==="textarea",l=In(s.paddingLeft),f=In(s.paddingTop),c=t.clientWidth-l-In(s.paddingRight),u=t.clientHeight-f-In(s.paddingBottom),d=n.createElement("div");d.style.cssText="position:absolute;top:0;left:-99999px;visibility:hidden;margin:0;border:0;padding:0;box-sizing:content-box;";for(let g of sf)d.style.setProperty(g,s.getPropertyValue(g));a?(d.style.whiteSpace="pre-wrap",d.style.overflowWrap="break-word",d.style.width=`${Math.max(0,c)}px`):d.style.whiteSpace="pre";let h=n.createElement("span");h.textContent=o.slice(r,i),d.append(n.createTextNode(o.slice(0,r)),h,n.createTextNode(o.slice(i))),n.body.appendChild(d);let m=[];try{let g=d.getBoundingClientRect(),y=-t.scrollLeft,b=-t.scrollTop;if(!a){b+=Math.max(0,(u-g.height)/2);let w=s.direction==="rtl",x=s.textAlign;x==="start"?x=w?"right":"left":x==="end"&&(x=w?"left":"right");let C=c-g.width;C>0&&(x==="right"?y+=C:x==="center"&&(y+=C/2))}for(let w of h.getClientRects())w.width<=0||w.height<=0||m.push({x:l+(w.left-g.left)+y,y:f+(w.top-g.top)+b,width:w.width,height:w.height})}finally{d.remove()}if(m.length===0)return;let p=af(t,s);e.__snapdomFieldSelection={images:m.map(()=>`linear-gradient(${p},${p})`),positions:m.map(g=>`${g.x}px ${g.y}px`),sizes:m.map(g=>`${g.width}px ${g.height}px`),repeats:m.map(()=>"no-repeat"),origins:m.map(()=>"padding-box"),clips:m.map(()=>"padding-box"),base:{image:s.backgroundImage,position:s.backgroundPosition,size:s.backgroundSize,repeat:s.backgroundRepeat,origin:s.backgroundOrigin,clip:s.backgroundClip}}}function bs(t){for(let e of t.keys()){let n=e.__snapdomFieldSelection;if(!n)continue;delete e.__snapdomFieldSelection;let{images:r,positions:i,sizes:o,repeats:s,origins:a,clips:l,base:f}=n,c=e.style.backgroundImage||f.image;c&&c!=="none"?(r.push(c),i.push(e.style.backgroundPosition||f.position),o.push(e.style.backgroundSize||f.size),s.push(e.style.backgroundRepeat||f.repeat),a.push(e.style.backgroundOrigin||f.origin),l.push(e.style.backgroundClip||f.clip)):(r.push("linear-gradient(transparent,transparent)"),i.push("0% 0%"),o.push("auto"),s.push("repeat"),a.push(f.origin||"padding-box"),l.push(f.clip||"border-box")),e.style.backgroundImage=r.join(","),e.style.backgroundPosition=i.join(","),e.style.backgroundSize=o.join(","),e.style.backgroundRepeat=s.join(","),e.style.backgroundOrigin=a.join(","),e.style.backgroundClip=l.join(",")}}_t();var oo=new Map,ws=new Set(["IFRAME"]);function Le(t,e){oo.set(String(t).toUpperCase(),e)}function On(t){let e=I(t),n=e.display;if(n==="none")return null;let r=/^(block|inline-block|flow-root|flex|inline-flex|grid|inline-grid|list-item)$/.test(n),i=h=>parseFloat(h)||0,o=(h,m,p,g,y)=>{if(!r||!h?.endsWith("px"))return null;let b=parseFloat(h);if(!Number.isFinite(b)||b<0)return null;if(e.boxSizing==="border-box")return b;let w=g-y-p;return b+m+p+(w>0&&b+m<y+w/2?w:0)},[s,a,l,f]=/scroll|auto/.test(e.overflow)?[t.offsetWidth,t.clientWidth,t.offsetHeight,t.clientHeight]:[0,0,0,0],c=o(e.width,i(e.paddingLeft)+i(e.paddingRight),i(e.borderLeftWidth)+i(e.borderRightWidth),s,a),u=o(e.height,i(e.paddingTop)+i(e.paddingBottom),i(e.borderTopWidth)+i(e.borderBottomWidth),l,f);if(c===null||u===null){let{width:h,height:m}=Ct(t),p=h,g=m;if(c===null&&!p||u===null&&!g){let y=t.getBoundingClientRect();p||=y.width||0,g||=y.height||0}c??=p,u??=g}let d=document.createElement("div");return d.style.cssText=`display:${n==="inline"?"inline-block":n};box-sizing:border-box;width:${c}px;height:${u}px;visibility:hidden;`,d}var lf=new Set(["style","option","optgroup"]),Ne=200,cf=new Set(["img","canvas","video","iframe","object","embed"]);function dn(t){let e=0;for(let n of t.matchAll(/-?[\d.]+px/g))e+=Math.abs(parseFloat(n[0]));return e}function xs(t){let e=t.filter;return!e||e==="none"?0:e.includes("url(")?Ne:3*dn(e)}function vs(t,e){if(!t)return 0;let n=e.filterReach||=new WeakMap,r=n.get(t);return r===void 0&&(r=xs(I(t))+(t===e.root?0:vs(t.parentElement,e)),n.set(t,r)),r}function ff(t,e,n){let{before:r,after:i}=te(t);if(r===null||i===null)return Ne;let o=[r,i].filter(Boolean).join(",");try{if(o&&t.matches(o))return Ne}catch{return Ne}if(e.borderImageSource&&e.borderImageSource!=="none"||e.webkitBoxReflect&&e.webkitBoxReflect!=="none")return Ne;let s=parseFloat(e.fontSize)||16,a=e.outlineStyle==="none"?0:dn(e.outlineWidth)+dn(e.outlineOffset);return Math.max(s*(e.display==="list-item"?3:1),a,dn(e.boxShadow),dn(e.textShadow),xs(e))+vs(t.parentElement,n)}function Ss(t,e,n,r){let i=r.rect,o=Math.max(i.left-n.right,n.left-i.right,i.top-n.bottom,n.top-i.bottom);if(o<=0)return!0;if(o>Ne)return!1;let s=r.inkReach||=new WeakMap,a=s.get(t);return a===void 0&&s.set(t,a=ff(t,e||I(t),r)),o<=a}function uf(t,e){if(t===e.root)return!1;let n;try{n=t.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=I(t);if(r.display==="inline"&&!cf.has((t.localName||"").toLowerCase()))return!1;let i=t.scrollWidth||0,o=t.scrollHeight||0,s={left:r.direction==="rtl"?Math.min(n.left,n.right-i):n.left,top:n.top,right:Math.max(n.right,n.left+i),bottom:Math.max(n.bottom,n.top+o)},a=r.writingMode||"";if((a.startsWith("vertical")||a.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-o),s.left=Math.min(s.left,n.right-i)),Ss(t,r,s,e))return!1;let l=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;l.nextNode();){let f=l.currentNode,c=f.getBoundingClientRect();if((c.width>0||c.height>0)&&Ss(f,null,c,e))return!1}return!0}function df(t,e,n){let r=t.cloneNode(!1);t.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),ut(t,r,e,n);let{width:i,height:o}=Ct(t);i>0&&(r.style.width=`${i}px`,r.style.minWidth=`${i}px`,r.style.maxWidth=`${i}px`),o>0&&(r.style.height=`${o}px`,r.style.minHeight=`${o}px`,r.style.maxHeight=`${o}px`),r.style.visibility="hidden";let s=t.parentElement?I(t.parentElement).display:"",a=I(t).position;if(!/flex|grid|table/.test(s)&&(a==="static"||a==="relative")){let l=d=>{let h=I(d);return h.display!=="none"&&h.position!=="absolute"&&h.position!=="fixed"},f=t.getBoundingClientRect(),c=t.previousElementSibling;for(;c&&!l(c);)c=c.previousElementSibling;if(c){let d=f.top-c.getBoundingClientRect().bottom;d>=0&&(r.style.marginTop=`${d}px`)}let u=t.nextElementSibling;for(;u&&!l(u);)u=u.nextElementSibling;if(u){let d=u.getBoundingClientRect().top-f.bottom;d>=0&&(r.style.marginBottom=`${d}px`)}}return r.style.boxSizing="border-box",r}async function ee(t,e,n){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");e.slicer?.due()&&await e.slicer.pause();let r=new Set,i=null,o=null;if(t.nodeType===Node.ELEMENT_NODE){let c=(t.localName||t.tagName||"").toLowerCase(),u=Xt(t);if(u&&(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox"))||t!==n.element&&u||Wr.has(c))return null;if(c==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return j(e,"Skipped a nested <foreignObject>; it can't be captured."),null;if(c==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE){if(e.selection){let c=gs(t,e.selection);if(c)return c}return t.cloneNode(!0)}if(t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return On(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let c of n.exclude)try{if(t.matches?.(c)){if(n.excludeMode==="hide")return On(t);if(n.excludeMode==="remove")return null}}catch{console.warn(`[SnapDOM] Invalid exclude selector "${c}"; ignored.`)}if(n.excludePredicates)for(let c of n.excludePredicates)try{if(c(t))return n.excludeMode==="remove"?null:On(t)}catch(u){console.warn("[SnapDOM] Your exclude function threw; the element was kept.",u)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return On(t);if(n.filterMode==="remove")return null}}catch(c){console.warn("[SnapDOM] Your filter function threw; the element was kept.",c)}if(t!==n.element&&!lf.has(t.localName)&&!Tt(t)&&I(t).display==="none"){let c=t.cloneNode(!1);t.tagName==="IMG"&&(c.removeAttribute("src"),c.removeAttribute("srcset")),c.style.setProperty("display","none","important");for(let u of t.querySelectorAll("style")){let d=await ee(u,e,n);d&&c.appendChild(d)}return c}if(e.clip&&uf(t,e.clip))return df(t,e,n);if(n.__resolveNodeHooks)for(let c of n.__resolveNodeHooks){let u;try{u=await c(t,n)}catch(d){j(e,"A plugin's resolveNode hook threw; ignored it.",d)}if(u===null)return null;if(u?.nodeType)return u.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(u,t),ut(t,u,e,n)),u}{let c=ws.has(t.tagName)&&oo.get(t.tagName);if(c){let u=await c(t,e,n);if(u!==void 0)return u}}if(t.getAttribute("data-capture")==="placeholder"){let c=t.cloneNode(!1);e.nodeMap.set(c,t),ut(t,c,e,n);let u=document.createElement("div");return u.textContent=t.getAttribute("data-placeholder-text")||"",u.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",c.appendChild(u),c}{let c=!ws.has(t.tagName)&&oo.get(t.tagName);if(c){let u=await c(t,e,n);if(u!==void 0)return u}}let s;try{if(s=t.cloneNode(!1),Qi(t,s),e.nodeMap.set(s,t),t.tagName==="IMG"){ss(t,s,n);try{let c=window.getComputedStyle(t),u=parseFloat(c.width),d=parseFloat(c.height);if(!(u>0)||!(d>0)){let p=Ct(t),g=b=>parseFloat(c.getPropertyValue(b))||0,y=c.getPropertyValue("box-sizing")==="border-box";u>0||(u=p.width-(y?0:g("padding-left")+g("padding-right")+g("border-left-width")+g("border-right-width"))),d>0||(d=p.height-(y?0:g("padding-top")+g("padding-bottom")+g("border-top-width")+g("border-bottom-width")))}let h=Math.round((u||0)*1e3)/1e3,m=Math.round((d||0)*1e3)/1e3;h&&(s.dataset.snapdomWidth=String(h)),m&&(s.dataset.snapdomHeight=String(m))}catch(c){j(e,"Couldn't measure an image; kept its own size.",c)}try{let c=t.getAttribute("style")||"",u=window.getComputedStyle(t),d=w=>{let x=c.match(new RegExp(`${w}\\s*:\\s*([^;]+)`,"i")),C=x?x[1].trim():u.getPropertyValue(w);return/%|auto/i.test(String(C||""))},h=parseFloat(s.dataset.snapdomWidth||"0")||0,m=parseFloat(s.dataset.snapdomHeight||"0")||0,p=d("width")||!(h>0),g=d("height")||!(m>0);p&&h>0&&(s.style.width=`${h}px`),g&&m>0&&(s.style.height=`${m}px`);let y=u.getPropertyValue("object-fit"),b=u.getPropertyValue("object-position");y&&y!=="fill"?(s.style.objectFit=y,b&&(s.style.objectPosition=b)):(h>0&&(s.style.minWidth=`${h}px`),m>0&&(s.style.minHeight=`${m}px`))}catch(c){j(e,"Couldn't fix the size of an image.",c)}}}catch(c){throw console.error("[SnapDOM] Couldn't copy this element:",t,c),c}let a=null;if(it(t,"textarea")){let{width:c,height:u}=Ct(t),d=c||t.getBoundingClientRect().width||0,h=u||t.getBoundingClientRect().height||0;d&&(s.style.width=`${d}px`),h&&(s.style.height=`${h}px`)}if(it(t,"input")){let c=(t.type||"text").toLowerCase();if((c==="checkbox"||c==="radio")&&(xt()||t.indeterminate)){let{el:d,applyVisual:h}=ds(t);e.nodeMap.set(d,t),a=h,s=d}else if(c==="range"&&(xt()||X())){let{el:d,applyVisual:h}=us(t);e.nodeMap.set(d,t),a=h,s=d}else if(c==="color"&&X()){let d=s,h=t.value||"#000000";a=()=>{d.style.setProperty("background-color",h,"important"),d.style.setProperty("color","transparent","important"),d.style.setProperty("-webkit-text-fill-color","transparent","important"),d.style.setProperty("appearance","none","important"),d.style.setProperty("-webkit-appearance","none","important")},d.removeAttribute("value")}else if((c==="date"||c==="time"||c==="datetime-local")&&(xt()||X())){s.setAttribute("type","text");let d=t.value;c==="date"&&t.valueAsDate&&(d=t.valueAsDate.toLocaleDateString(void 0,{timeZone:"UTC"})),s.value=d,s.setAttribute("value",d)}else{let d=Je(t)?Pr(t.value):t.value;s.value=d,s.setAttribute("value",d),t.checked!==void 0&&(s.checked=t.checked,t.checked?s.setAttribute("checked",""):s.removeAttribute("checked"),t.indeterminate&&(s.indeterminate=t.indeterminate))}}if((it(t,"input")||it(t,"textarea"))&&!t.value&&t.placeholder)try{let c=window.getComputedStyle(t,"::placeholder"),u=c&&c.color;u&&u!=="rgba(0, 0, 0, 0)"&&(e.__usesPlaceholder=!0,s.setAttribute("data-sd-ph",""),s.style.setProperty("--sd-ph",u),s.style.setProperty("--sd-ph-o",c.opacity||"1"))}catch{}if(it(t,"select")&&(i=new Set(Array.from(t.options).filter(c=>c.selected))),it(t,"textarea")&&(o=t.value),it(t,"input")||it(t,"textarea")||it(t,"select")){t.disabled&&s.setAttribute("disabled",""),t.required&&s.setAttribute("required",""),t.readOnly&&s.setAttribute("readonly","");let c=t;c.min!==void 0&&c.min!==""&&s.setAttribute("min",c.min),c.max!==void 0&&c.max!==""&&s.setAttribute("max",c.max),c.pattern!==void 0&&c.pattern!==""&&s.setAttribute("pattern",c.pattern);let u=t.getAttribute("aria-invalid");u!==null&&s.setAttribute("aria-invalid",u)}if($n(t)||ut(t,s,e,n),a&&a(),n.captureSelection&&(it(t,"input")||it(t,"textarea")))try{ys(t,s)}catch(c){j(e,"Couldn't copy the selection of a text field.",c)}if(Tt(t)&&!$n(t)){let c=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display","color"];try{let u=window.getComputedStyle(t);for(let d of c){let h=u.getPropertyValue(d);h&&s.style.setProperty(d,h)}t.localName==="stop"&&(s.style.setProperty("stop-color",u.getPropertyValue("stop-color")),s.style.setProperty("stop-opacity",u.getPropertyValue("stop-opacity")))}catch{}}if(t.shadowRoot){Jr(t.shadowRoot);try{let b=t.shadowRoot.querySelectorAll("slot");for(let w of b){let x=w.assignedNodes?.()||[];for(let C of x)r.add(C)}}catch{}let c=rs(e),u=`[data-sd="${c}"]`;e.shadowScopes||=new WeakMap,e.shadowScopes.set(t.shadowRoot,c);try{s.setAttribute("data-sd",c)}catch{}let d=os(t.shadowRoot);!e.__shadowPseudo&&/::?(?:before|after|first-l|marker)|counter/.test(d)&&(e.__shadowPseudo=!0);let h=ns(d,u,c),m=as(d),p=ls(t,m,u);is(s,p+h,c);let g=document.createDocumentFragment(),y=await Promise.all(Array.from(t.shadowRoot.childNodes).map(b=>b.nodeType===Node.ELEMENT_NODE&&b.tagName==="STYLE"?null:ee(b,e,n).catch(()=>null)));g.append(...y.filter(b=>!!b)),s.appendChild(g)}if(t.tagName==="SLOT"){let c=e.shadowScopes?.get(t.getRootNode()),u=t.assignedNodes?.()||[],d=u.length?t.assignedNodes?.({flatten:!0})||u:[],h=d.length?d:Array.from(t.childNodes),m=document.createDocumentFragment(),p=await Promise.all(h.map(g=>ee(g,e,n).then(y=>(y&&u.length&&cs(y,c),y||null)).catch(()=>null)));return m.append(...p.filter(g=>!!g)),m}let l=c=>r.has(c)||t.shadowRoot&&!c.assignedSlot,f=await Promise.all(Array.from(t.childNodes).map(c=>l(c)?null:ee(c,e,n).catch(()=>null)));if(s.append(...f.filter(c=>!!c)),i&&it(s,"select")){let c=!1;for(let u of s.options){let d=i.has(e.nodeMap.get(u));u.selected=d,d?u.setAttribute("selected",""):u.removeAttribute("selected"),c||=d}if(!c&&!s.multiple){let u=s.ownerDocument.createElement("option");u.hidden=!0,u.style.setProperty("display","none","important"),u.setAttribute("selected",""),u.value="",s.appendChild(u)}}return o!==null&&it(s,"textarea")&&(s.textContent=o),s}async function pf(t,e,n){let r=!1;try{r=!!(t.contentDocument||t.contentWindow?.document)}catch(i){j(e,"Couldn't tell if an iframe is same-origin; treated it as cross-origin.",i)}if(r)try{return await no(t,e,n)}catch(i){console.warn("[SnapDOM] Couldn't capture an iframe, so it was left out.",i)}if(r||console.warn(n.placeholders?"[SnapDOM] Can't capture a cross-origin iframe; showing a placeholder. Set placeholders: false to hide it.":"[SnapDOM] Can't capture a cross-origin iframe; left it out.",t),n.placeholders){let{width:i,height:o}=Ct(t),s=document.createElement("div");return s.style.cssText=`width:${i}px;height:${o}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,ut(t,s,e,n),s}else{let{width:i,height:o}=Ct(t),s=document.createElement("div");return s.style.cssText=`display:inline-block;width:${i}px;height:${o}px;visibility:hidden;`,ut(t,s,e,n),s}}function pn(t){try{let e=Math.max(1,Math.min(32,t.width)),n=Math.max(1,Math.min(32,t.height)),r=document.createElement("canvas");r.width=e,r.height=n;let i=r.getContext("2d",{willReadFrequently:!0});if(!i)return!1;i.drawImage(t,0,0,e,n);let o=i.getImageData(0,0,e,n).data;for(let s=3;s<o.length;s+=4)if(o[s]!==0)return!1;return!0}catch{return!1}}var hf=.95;function mf(t,e,n){try{let r=t.getImageData(0,0,e,n).data;for(let i=3;i<r.length;i+=4)if(r[i]!==255)return!1;return!0}catch{return!1}}async function gf(t,e,n){let r="";try{let a=pn(t);a&&(await St(),a=pn(t));let l=null;if(!a){l=t.getContext("2d",{willReadFrequently:!0});try{l&&l.getImageData(0,0,1,1)}catch{}X()&&await St()}if(r=t.toDataURL("image/png"),!r||r==="data:,"){try{l&&l.getImageData(0,0,1,1)}catch{}if(await St(),r=t.toDataURL("image/png"),!r||r==="data:,"){let f=document.createElement("canvas");f.width=t.width,f.height=t.height;let c=f.getContext("2d");c&&(c.drawImage(t,0,0),r=f.toDataURL("image/png"))}}}catch(a){j(e,"Couldn't read the pixels of a canvas; used its fallback content.",a)}n&&n.debug&&r&&pn(t)&&j(e,"Empty canvas; capture after its first frame",t);let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(a){j(e,"Couldn't set image loading hints.",a)}r&&(i.src=r),i.width=t.width,i.height=t.height;let{width:o,height:s}=Ct(t);return o>0&&(i.style.width=`${o}px`),s>0&&(i.style.height=`${s}px`),e.nodeMap.set(i,t),ut(t,i,e,n),i}async function yf(t,e,n){let r="",i=t.poster&&t.paused&&!t.currentTime&&!t.played.length,o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}if(!i)try{let l=document.createElement("canvas");l.width=t.videoWidth||t.offsetWidth||320,l.height=t.videoHeight||t.offsetHeight||240;let f=l.getContext("2d");f&&(f.drawImage(t,0,0,l.width,l.height),r=l.toDataURL(mf(f,l.width,l.height)?"image/jpeg":"image/png",hf),(!r||r==="data:,")&&(r=""))}catch(l){j(e,"Couldn't capture a video frame; used its poster.",l)}r?o.src=r:t.poster&&(o.src=t.poster),o.width=t.videoWidth||t.offsetWidth||0,o.height=t.videoHeight||t.offsetHeight||0;let{width:s,height:a}=Ct(t);return s>0&&(o.style.width=`${s}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",e.nodeMap.set(o,t),ut(t,o,e,n),o}async function bf(t,e,n){if(!t.controls)return;let{width:r,height:i}=Ct(t),o=Math.round(r||t.offsetWidth||300),s=Math.round(i||t.offsetHeight||54),a=s/2,l=Math.max(4,s*.16),f=s*.34,c=o-s*.34,u=f+l+s*.55,d=Math.max(0,c-s*.7-u),h=Math.max(9,Math.round(s*.24)),m=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${s}" viewBox="0 0 ${o} ${s}"><rect width="${o}" height="${s}" rx="${Math.min(s/2,10)}" fill="#f1f3f4"/><path d="M ${f} ${a-l} L ${f+l} ${a} L ${f} ${a+l} Z" fill="#5f6368"/><rect x="${u}" y="${a-1.5}" width="${d}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${u}" cy="${a}" r="${Math.max(3,s*.09)}" fill="#5f6368"/><text x="${c}" y="${a}" fill="#5f6368" font-family="sans-serif" font-size="${h}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,p=document.createElement("img");try{p.decoding="sync",p.loading="eager"}catch{}return p.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`,p.width=o,p.height=s,p.style.width=`${o}px`,p.style.height=`${s}px`,e.nodeMap.set(p,t),ut(t,p,e,n),p}async function Cs(t,e,n){let r=t.getAttribute("data")||t.getAttribute("src")||"",i=(t.getAttribute("type")||"").toLowerCase(),o=/^image\//.test(i)||/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)(\?|#|$)/i.test(r);if(r&&o){let a=document.createElement("img");try{a.decoding="sync",a.loading="eager"}catch{}a.src=r;let{width:l,height:f}=Ct(t);return l>0&&(a.style.width=`${l}px`),f>0&&(a.style.height=`${f}px`),e.nodeMap.set(a,t),ut(t,a,e,n),a}let s=null;try{s=t.contentDocument}catch{}if(s)try{let a=await no(t,e,n);if(a)return a}catch{}r&&console.warn(`[SnapDOM] Couldn't capture <${t.localName}>${i?` (${i})`:""}; showing its fallback content.`)}Le("IFRAME",pf);Le("CANVAS",gf);Le("VIDEO",yf);Le("AUDIO",bf);Le("OBJECT",Cs);Le("EMBED",Cs);vt();At();Ae();wt();_t();var wf=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Ie=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{});function Sf(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ks(t){let e=Array.isArray(t)?t:t?[t]:[],n=[];for(let r of e)r instanceof RegExp?n.push(r):typeof r=="string"?n.push(new RegExp(Sf(r),"i")):console.warn("[SnapDOM] Ignored an iconFonts entry: use a string or a RegExp.",r);return n}function It(t,e){let n=typeof t=="string"?t:"";for(let r of wf)if(r.test(n))return!0;if(e){for(let r of e)if(r instanceof RegExp&&r.test(n))return!0}return!!(/icon/i.test(n)||/glyph/i.test(n)||/symbols/i.test(n)||/feather/i.test(n)||/fontawesome/i.test(n))}function io(t,e){if(typeof t!="string"||!t)return!1;let n;try{n=new URL(t,typeof location<"u"?location.href:void 0)}catch{return It(t,e)}let r=n.searchParams.getAll("family").flatMap(i=>i.split("|")).map(i=>i.split(":")[0].trim()).filter(Boolean);return r.length?r.every(i=>It(i,e)):It(t,e)}function xf(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Dn=new Map;function vf(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,i;for(;i=r.exec(n);)e[i[1].toUpperCase()]=Number(i[2]);return e}async function Cf(t,e,n){let r=String(t||""),i=r.toLowerCase(),o=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),l="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?l="rounded":/\bsharp\b/.test(o)?l="sharp":/\boutlined\b/.test(o)&&(l="outlined");let f=a===1,c=null;if(f&&(l==="outlined"&&Ie.materialIconsFilled?c={url:Ie.materialIconsFilled,alias:"snapdom-mi-filled"}:l==="rounded"&&Ie.materialIconsRound?c={url:Ie.materialIconsRound,alias:"snapdom-mi-round"}:l==="sharp"&&Ie.materialIconsSharp&&(c={url:Ie.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:r,familyForCanvas:r};if(!Dn.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});await d.load(),document.fonts.add(d),Dn.set(c.alias,!0)}catch{return Dn.set(c.alias,!1),{familyForMeasure:r,familyForCanvas:r}}if(Dn.get(c.alias)===!1)return{familyForMeasure:r,familyForCanvas:r};let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function kf(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function Mf(t){let e=t.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let r=t.color?.trim();return r&&r!=="inherit"?r:"#000"}async function Af(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:i="#000",variation:o="",className:s=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,f=vf(o),{familyForMeasure:c,familyForCanvas:u}=await Cf(a,s,f);await kf(u.replace(/^["']+|["']+$/g,""),r);let d=document.createElement("span");J(d),d.textContent=t,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=c,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${r}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=i,document.body.appendChild(d);let h=d.getBoundingClientRect(),m=Math.max(1,Math.ceil(h.width)),p=Math.max(1,Math.ceil(h.height));document.body.removeChild(d);let g=document.createElement("canvas");g.width=m*l,g.height=p*l;let y=g.getContext("2d");y.scale(l,l),y.font=`${n?`${n} `:""}${r}px ${u}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=i;try{y.fontKerning="normal"}catch{}return y.fillText(t,0,0),{dataUrl:g.toDataURL(),width:m,height:p}}async function Wn(t,e,n=new Map){if(t?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',i=Array.from(t.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t),i.length===0)return 0;let o=e?.nodeType===1?Array.from(e.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e?.nodeType===1&&e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e);let s=0;for(let a=0;a<i.length;a++){let l=i[a],f=n&&n.get(l)||o[a]||null;try{let c=getComputedStyle(f||l),u=c.fontFamily||"Material Icons";if(!xf(u))continue;let d=(f||l).textContent.trim();if(!d)continue;let h=parseInt(c.fontSize,10)||24,m=c.fontWeight&&c.fontWeight!=="normal"?c.fontWeight:"normal",p=Mf(c),g=c.fontVariationSettings&&c.fontVariationSettings!=="normal"?c.fontVariationSettings:"",y=(f||l).className||"",{dataUrl:b,width:w,height:x}=await Af(d,{family:u,weight:m,fontSize:h,color:p,variation:g,className:y});l.textContent="";let C=l.ownerDocument.createElement("img");C.src=b,C.alt=d,C.style.height=`${h}px`,C.style.width=`${Math.max(1,Math.round(w/x*h))}px`,C.style.objectFit="contain",C.style.verticalAlign=getComputedStyle(l).verticalAlign||"baseline",l.appendChild(C),s++}catch{}}return s}le();mt();_t();async function Es(t,e,n,r=32,i="#000",o="normal"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");J(a),a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"normal",a.style.fontStyle=o||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let l=a.getBoundingClientRect(),f=Math.ceil(l.width),c=Math.ceil(l.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,f*s),u.height=Math.max(1,c*s);let d=u.getContext("2d");return d.scale(s,s),d.font=`${o||"normal"} ${n||"normal"} ${r}px "${e}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=i,d.fillText(t,0,0),{dataUrl:u.toDataURL(),width:f,height:c}}var Rs=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),_f=["katex","mathjax","mathml"];function lo(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Rs.has(n.toLowerCase()))return n}return""}function Ef(t){if(!t)return[];let e=[];for(let n of t.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(Rs.has(r.toLowerCase())||e.push(r))}return e}function Bn(t){let e=String(t??"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Un(t){let e=String(t??"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function Rf(t){let e=String(t??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function Ff(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let i=Bn(n[1]),o=Bn(n[2]);return{min:Math.min(i,o),max:Math.max(i,o)}}let r=Bn(e);return{min:r,max:r}}function Tf(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function Pf(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let o=parseFloat(n[1]),s=parseFloat(n[2]);return{min:Math.min(o,s),max:Math.max(o,s)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),i=r?parseFloat(r[1]):100;return{min:i,max:i}}function $f(t){return!t||typeof t!="string"?"":t.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Nf(t,e,n=[]){if(!t)return!1;try{let r=new URL(t,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(l=>o.endsWith(l))||n.some(l=>o===l.toLowerCase()||o.endsWith("."+l.toLowerCase())))return!0;let a=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a)||_f.some(l=>a.includes(l)))return!0;for(let l of e){let f=l.toLowerCase().replace(/\s+/g,"+"),c=l.toLowerCase().replace(/\s+/g,"-"),u=$f(l);if(a.includes(f)||a.includes(c)||u&&a.includes(u))return!0}return!1}catch{return!1}}function Lf(t){let e=new Set;for(let n of t||[]){let r=String(n).split("__")[0]?.trim();r&&e.add(r)}return e}function Ms(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,i)=>{let o=(i||"").trim();if(!o||/^data:|^blob:|^https?:|^file:|^about:/i.test(o))return n;let s=o;try{s=new URL(o,e||location.href).href}catch{}return`url("${s}")`})}var Fs=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,zn=4;async function If(t,e,n){if(!t)return t;let r=new Set;function i(a,l){try{return new URL(a,l||location.href).href}catch{return a}}async function o(a,l,f=0){if(f>zn)return console.warn(`[SnapDOM] Too many nested @import rules in ${l}; stopped at ${zn} levels.`),a;let c="",u=0,d,h=new RegExp(Fs.source,"g");for(;d=h.exec(a);){c+=a.slice(u,d.index),u=h.lastIndex;let m=(d[2]||d[4]||"").trim(),p=i(m,l);if(r.has(p)){console.warn(`[SnapDOM] Skipped an @import that loops back: ${p}`);continue}r.add(p);let g="";try{let y=await at(p,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(g=y.data)}catch{}g?(g=Ms(g,p),g=await o(g,p,f+1),c+=`
|
|
10
|
+
`});let n=t.adoptedStyleSheets||[];for(let r of n)try{r&&r.cssRules&&(e+=pe(r.cssRules))}catch{}}catch{}return e}function is(t,e,n){if(!e)return;let r=document.createElement("style");r.setAttribute("data-sd",n),r.textContent=e,t.insertBefore(r,t.firstChild||null)}function ss(t,e,n={}){try{let r=null,i=I(t).content;if(i&&i.includes("url(")){let f=i.match(/url\(["']?([^"')]+)["']?\)/);f&&(r=f[1])}let o=t.closest?.("picture"),s=t.getAttribute("src")||"",a=t.getAttribute("srcset")||"",l=r||(o?Zi(t,o):!a.trim()&&s.startsWith("data:")?s:t.currentSrc)||$e(a,t)||t.src||"";if((!l||Pe(l))&&n.resolvePicturePlaceholders!==!1){let f=Ji(t);f&&(l=f)}if(!l)return;e.getAttribute("src")!==l&&e.setAttribute("src",l),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function as(t){let e=new Set;if(!t)return e;let n=/var\(\s*(--[A-Za-z0-9_-]+)\b/g,r;for(;r=n.exec(t);)e.add(r[1]);return e}function Gc(t,e){try{let r=getComputedStyle(t).getPropertyValue(e).trim();if(r)return r}catch{}try{let r=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(r)return r}catch{}return""}function ls(t,e,n){let r=[];for(let i of e){let o=Gc(t,i);o&&r.push(`${i}: ${o};`)}return r.length?`${n}{${r.join("")}}
|
|
11
|
+
`:""}function cs(t,e){if(!t)return;let n=r=>{let i=r.getAttribute("data-sd-slotted")||"";e?` ${i} `.includes(` ${e} `)||r.setAttribute("data-sd-slotted",i?`${i} ${e}`:e):r.setAttribute("data-sd-slotted",i)};t.nodeType===Node.ELEMENT_NODE&&n(t),t.querySelectorAll?.("*").forEach(n)}async function Xc(t,e=3){let n=()=>{try{return t.contentDocument||t.contentWindow?.document||null}catch{return null}},r=n(),i=0;for(;i<e&&(!r||!r.body&&!r.documentElement);)await new Promise(o=>setTimeout(o,0)),r=n(),i++;return r&&(r.body||r.documentElement)?r:null}function Yc(t){let e=t.getBoundingClientRect(),n=0,r=0,i=0,o=0;try{let l=getComputedStyle(t);n=parseFloat(l.borderLeftWidth)||0,r=parseFloat(l.borderRightWidth)||0,i=parseFloat(l.borderTopWidth)||0,o=parseFloat(l.borderBottomWidth)||0}catch{}let s=Math.max(0,Math.round(e.width-(n+r))),a=Math.max(0,Math.round(e.height-(i+o)));return{contentWidth:s,contentHeight:a,rect:e}}function Ct(t){let e=0,n=0;if(t.offsetWidth>0&&(e=t.offsetWidth),t.offsetHeight>0&&(n=t.offsetHeight),e===0||n===0)try{let r=getComputedStyle(t);if(e===0){let i=parseFloat(r.width);!isNaN(i)&&i>0&&(e=i)}if(n===0){let i=parseFloat(r.height);!isNaN(i)&&i>0&&(n=i)}}catch{}if(e===0||n===0)try{if(e===0){let r=parseFloat(t.getAttribute("width"));!isNaN(r)&&r>0&&(e=r)}if(n===0){let r=parseFloat(t.getAttribute("height"));!isNaN(r)&&r>0&&(n=r)}}catch{}if((e===0||n===0)&&(t.naturalWidth||t.naturalHeight))try{e===0&&t.naturalWidth>0&&(e=t.naturalWidth),n===0&&t.naturalHeight>0&&(n=t.naturalHeight)}catch{}return{width:e,height:n}}function Kc(t,e,n){let r=t.defaultView,i=r?r.scrollX:0,o=r?r.scrollY:0,s=t.body?t.body.scrollLeft:0,a=t.body?t.body.scrollTop:0,l=t.documentElement?t.documentElement.scrollLeft:0,f=t.documentElement?t.documentElement.scrollTop:0,c=0,u=0,d=0,h=0;try{let p=r&&t.body?r.getComputedStyle(t.body):null;p&&(c=(parseFloat(p.marginTop)||0)+(parseFloat(p.paddingTop)||0),u=(parseFloat(p.marginRight)||0)+(parseFloat(p.paddingRight)||0),d=(parseFloat(p.marginBottom)||0)+(parseFloat(p.paddingBottom)||0),h=(parseFloat(p.marginLeft)||0)+(parseFloat(p.paddingLeft)||0))}catch{}let m=t.createElement("style");if(m.setAttribute("data-sd-iframe-pin",""),J(m),m.textContent=`html {margin: 0 !important;padding: 0 !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}body {margin: 0 !important;padding: ${c}px ${u}px ${d}px ${h}px !important;width: ${e}px !important;height: ${n}px !important;min-width: ${e}px !important;min-height: ${n}px !important;box-sizing: border-box !important;overflow: hidden !important;background-clip: border-box !important;}`,(t.head||t.documentElement).appendChild(m),de(t.documentElement),i||o)try{t.body&&(t.body.scrollLeft=i,t.body.scrollTop=o),t.documentElement&&(t.documentElement.scrollLeft||(t.documentElement.scrollLeft=i),t.documentElement.scrollTop||(t.documentElement.scrollTop=o))}catch{}return()=>{try{m.remove()}catch{}try{r&&typeof r.scrollTo=="function"&&r.scrollTo(i,o),t.body&&(t.body.scrollLeft=s,t.body.scrollTop=a),t.documentElement&&(t.documentElement.scrollLeft=l,t.documentElement.scrollTop=f)}catch{}de(t.documentElement)}}async function no(t,e,n){let r=await Xc(t,3);if(!r)throw new Error("The iframe document isn't ready.");let{contentWidth:i,contentHeight:o,rect:s}=Yc(t),a=n?.snap;if(!a||typeof a.toPng!="function")throw new Error("Iframes are only captured through snapdom(el).");let l={...n,scale:1,clip:null,__pinned:!0},f=Kc(r,i,o),c;try{c=await a.toPng(r.documentElement,l)}finally{f()}c.style.display="block",c.style.width=`${i}px`,c.style.height=`${o}px`;let u=document.createElement("div");return e.nodeMap.set(u,t),ut(t,u,e,n),u.style.overflow="hidden",u.style.display="block",u.style.width||(u.style.width=`${Math.round(s.width)}px`),u.style.height||(u.style.height=`${Math.round(s.height)}px`),u.appendChild(c),u}function fs(t){try{let e=t&&t.accentColor;if(e&&e!=="auto"&&e!=="none")return e;let n=t&&t.color;if(n)return n}catch{}return"#0a6ed1"}function us(t){let{width:e,height:n}=Ct(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Number.isFinite(o)&&o>0?o:e||r.width||128,l=Number.isFinite(s)&&s>0?s:n||r.height||16,f=Number.parseFloat(t.min)||0,c=Number.isFinite(Number.parseFloat(t.max))?Number.parseFloat(t.max):100,u=Number.parseFloat(t.value),d=c-f,h=d>0&&Number.isFinite(u)?Math.min(1,Math.max(0,(u-f)/d)):.5,m="middle";try{i&&i.verticalAlign&&(m=i.verticalAlign)}catch{}let p=document.createElement("div");p.setAttribute("data-snapdom-input-replacement","range"),p.style.cssText=`display:inline-block;width:${a}px;height:${l}px;vertical-align:${m};flex-shrink:0;line-height:0;`;let g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width",String(a)),g.setAttribute("height",String(l)),g.setAttribute("viewBox",`0 0 ${a} ${l}`),g.style.cssText=`width:${a}px;height:${l}px;overflow:visible`,p.appendChild(g);function y(){let b=fs(i),w=!!t.disabled,x=Math.max(2,Math.min(4,l)),C=(l-x)/2,S=Math.max(10,Math.min(14,Math.max(l,10))),k=S/2,E=k+h*Math.max(0,a-S);g.innerHTML="";let R=(M,_,T,$)=>{let N=document.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("x",String(M)),N.setAttribute("y",String(C)),N.setAttribute("width",String(Math.max(0,_))),N.setAttribute("height",String(x)),N.setAttribute("rx",String(x/2)),N.setAttribute("fill",T),$&&N.setAttribute("fill-opacity",$),g.appendChild(N)};R(0,a,"#808080","0.4"),R(0,E,b);let v=document.createElementNS("http://www.w3.org/2000/svg","circle");v.setAttribute("cx",String(E)),v.setAttribute("cy",String(l/2)),v.setAttribute("r",String(k)),v.setAttribute("fill",b),g.appendChild(v),w&&g.setAttribute("opacity","0.5"),p.style.setProperty("width",`${a}px`,"important"),p.style.setProperty("height",`${l}px`,"important"),p.style.setProperty("min-width",`${a}px`,"important"),p.style.setProperty("min-height",`${l}px`,"important")}return y(),{el:p,applyVisual:y}}function ds(t){let{width:e,height:n}=Ct(t),r=t.getBoundingClientRect(),i;try{i=window.getComputedStyle(t)}catch{}let o=i?parseFloat(i.width):NaN,s=i?parseFloat(i.height):NaN,a=Math.round(e||r.width||0),l=Math.round(n||r.height||0),f=Number.isFinite(o)&&o>0?Math.round(o):Math.max(12,a||16),c=Number.isFinite(s)&&s>0?Math.round(s):Math.max(12,l||16),u=(t.type||"text").toLowerCase()==="checkbox",d=!!t.checked,h=!!t.indeterminate,p=Math.max(Math.min(f,c),12),g=Math.max(f,p),y=Math.max(c,p),b="middle";try{i&&i.verticalAlign&&(b=i.verticalAlign)}catch{}let w=document.createElement("div");w.setAttribute("data-snapdom-input-replacement",t.type||"checkbox"),w.style.cssText=`display:inline-block;width:${g}px;height:${y}px;vertical-align:${b};flex-shrink:0;line-height:0;`;let x=document.createElementNS("http://www.w3.org/2000/svg","svg");x.setAttribute("width",String(g)),x.setAttribute("height",String(y)),x.setAttribute("viewBox",`0 0 ${p} ${p}`),x.style.cssText=`width:${g}px;height:${y}px`,w.appendChild(x);function C(){let S=fs(i),k=2,E=k/2,R=p-k;if(x.innerHTML="",u){let v=document.createElementNS("http://www.w3.org/2000/svg","rect");if(v.setAttribute("x",String(E)),v.setAttribute("y",String(E)),v.setAttribute("width",String(R)),v.setAttribute("height",String(R)),v.setAttribute("rx","2"),v.setAttribute("ry","2"),v.setAttribute("fill",d?S:"none"),v.setAttribute("stroke",S),v.setAttribute("stroke-width",String(k)),x.appendChild(v),d){let M=document.createElementNS("http://www.w3.org/2000/svg","path");M.setAttribute("d",`M ${E+2} ${p/2} L ${p/2-1} ${p-E-2} L ${p-E-2} ${E+2}`),M.setAttribute("stroke","white"),M.setAttribute("stroke-width",String(Math.max(1.5,k))),M.setAttribute("fill","none"),M.setAttribute("stroke-linecap","round"),M.setAttribute("stroke-linejoin","round"),x.appendChild(M)}else if(h){let M=document.createElementNS("http://www.w3.org/2000/svg","rect"),_=Math.max(6,R-4);M.setAttribute("x",String((p-_)/2)),M.setAttribute("y",String((p-k)/2)),M.setAttribute("width",String(_)),M.setAttribute("height",String(k)),M.setAttribute("fill",S),M.setAttribute("rx","1"),x.appendChild(M)}}else{let v=document.createElementNS("http://www.w3.org/2000/svg","circle");if(v.setAttribute("cx",String(p/2)),v.setAttribute("cy",String(p/2)),v.setAttribute("r",String((p-k)/2)),v.setAttribute("fill",d?S:"none"),v.setAttribute("stroke",S),v.setAttribute("stroke-width",String(k)),x.appendChild(v),d){let M=document.createElementNS("http://www.w3.org/2000/svg","circle"),_=Math.max(2,(p-k*2)*.35);M.setAttribute("cx",String(p/2)),M.setAttribute("cy",String(p/2)),M.setAttribute("r",String(_)),M.setAttribute("fill","white"),x.appendChild(M)}}w.style.setProperty("width",`${g}px`,"important"),w.style.setProperty("height",`${y}px`,"important"),w.style.setProperty("min-width",`${g}px`,"important"),w.style.setProperty("min-height",`${y}px`,"important")}return C(),{el:w,applyVisual:C}}var cn=new ft(80);async function Qc(t){if(D.resource?.has(t))return D.resource.get(t);if(cn.has(t))return cn.get(t);let e=(async()=>{let n=await at(t,{as:"dataURL",silent:!0});if(!n.ok||typeof n.data!="string")throw new Error(`Couldn't read ${t}`);return D.resource?.set(t,n.data),n.data})();cn.set(t,e);try{let n=await e;return cn.set(t,n),n}catch(n){throw cn.delete(t),n}}var ts=/\bblob:[^)"'\s]+/g;function $n(t){return typeof t=="string"&&t.startsWith("blob:")}function Zc(t){return(t||"").split(",").map(e=>e.trim()).filter(Boolean).map(e=>{let n=e.match(/^(\S+)(\s+.+)?$/);return n?{url:n[1],desc:n[2]||""}:null}).filter(Boolean)}function Jc(t){return t.map(e=>e.desc?`${e.url} ${e.desc.trim()}`:e.url).join(", ")}function fn(t,e){let n=t.querySelectorAll?Array.from(t.querySelectorAll(e)):[];return t.matches?.(e)&&n.unshift(t),n}async function Nn(t,e=null){if(!t)return;let n=e,r=new Set,i=[],o=new Map,s=(p,g,y,b)=>{r.add(y),i.push(()=>{o.has(y)&&(p.setAttribute(g,o.get(y)),b?.())})},a=(p,g)=>{if(!p||!p.includes("blob:"))return;let y=p.match(ts)||[];if(y.length){for(let b of y)r.add(b);i.push(()=>{let b=p.replace(ts,w=>o.get(w)||w);b!==p&&g(b)})}},l=fn(t,"img");for(let p of l)try{let y=p.getAttribute("src")||p.currentSrc||"";$n(y)&&s(p,"src",y);let b=p.getAttribute("srcset");if(b&&b.includes("blob:")){let w=Zc(b);for(let x of w)$n(x.url)&&r.add(x.url);i.push(()=>{let x=!1;for(let C of w)o.has(C.url)&&(C.url=o.get(C.url),x=!0);x&&p.setAttribute("srcset",Jc(w))})}}catch(g){j(n,"Couldn't inline a blob: image.",g)}let f=fn(t,"image");for(let p of f)try{let g="http://www.w3.org/1999/xlink",y=p.getAttribute("href")||p.getAttributeNS?.(g,"href");$n(y)&&s(p,"href",y,()=>p.removeAttributeNS?.(g,"href"))}catch(g){j(n,"Couldn't inline a blob: SVG image.",g)}let c=fn(t,"[style*='blob:']");for(let p of c)try{let g=p.getAttribute("style");a(g,y=>p.setAttribute("style",y))}catch(g){j(n,"Couldn't inline blob: URLs in a style attribute.",g)}let u=fn(t,"style");for(let p of u)try{let g=p.textContent||"";a(g,y=>{p.textContent=y})}catch(g){j(n,"Couldn't inline blob: URLs in a <style>.",g)}let d=["poster"];for(let p of d){let g=fn(t,`[${p}^='blob:']`);for(let y of g)try{let b=y.getAttribute(p);$n(b)&&s(y,p,b)}catch(b){j(n,`Couldn't inline the blob: URL in ${p}.`,b)}}if(!r.size)return;let h=[...r],m=0;await Promise.all(Array.from({length:Math.min(4,h.length)},async()=>{for(;m<h.length;){let p=h[m++];try{o.set(p,await Qc(p))}catch(g){j(n,"Couldn't read a blob: URL; kept it as is.",g)}}}));for(let p of i)try{p()}catch(g){j(n,"Couldn't write an inlined blob: URL.",g)}}var tf=["font-family","font-size","font-style","font-weight","font-stretch","font-variant","font-feature-settings","font-variation-settings","font-kerning","letter-spacing","text-transform"],ef=new Set(["text","search","email","url","tel","number","submit","reset","button"]),nf=/[^\s\uD800-\uDFFF]{2,}/;function ps(t,e=document){let n=e.defaultView||window;if(!xt()||!e.body||!(n.visualViewport?.scale<1||n.screen.width<e.documentElement.clientWidth))return;let r=J(e.createElement("div"));r.style.cssText="position:absolute;left:0;top:0;width:0;height:0;overflow:hidden;visibility:hidden";let i=[];for(let[o,s]of t){if(o.nodeType!==1||s.nodeType!==1)continue;let a=n.getComputedStyle(s),l=s.localName==="textarea"||s.localName==="input"&&ef.has(s.type)?of(s,a,e):rf(s,a.textAlign==="justify"||a.textAlignLast==="justify");if(!l)continue;let f=s.getBoundingClientRect(),c=s.offsetWidth&&f.width?f.width/s.offsetWidth:1,u=e.createElement("span");u.style.whiteSpace="pre";for(let d of tf)u.style.setProperty(d,a.getPropertyValue(d));u.textContent=l.word,r.appendChild(u),i.push({clone:o,cs:a,span:u,live:l.distance/c,centers:l.centers,height:l.height})}if(i.length){e.body.appendChild(r);try{for(let{clone:o,cs:s,span:a,live:l,centers:f,height:c}of i){let u=a.firstChild,d=(parseFloat(s.letterSpacing)||0)*(f?u.length-1:u.length),h=c?e.createRange():null;h&&h.selectNodeContents(a);let m=c?h.getBoundingClientRect().height:f?Math.abs(es(u,u.length-1)-es(u,0)):a.getBoundingClientRect().width,p=(l-(c?0:d))/(m-(c?0:d));if(p>1.005&&Number.isFinite(p)){if(c){let g=[];for(let y of[!1,!0]){let b=parseFloat(s.fontSize),w=b*(p+1);for(let x=0;x<10;x++){let C=(b+w)/2;a.style.fontSize=`${C}px`;let S=h.getBoundingClientRect().height;(y?S>l:S>=l)?w=C:b=C}g.push((b+w)/2)}p=(g[0]+g[1])/2/parseFloat(s.fontSize)}o.style.setProperty("font-size",`${parseFloat(s.fontSize)*p}px`),s.lineHeight!=="normal"&&o.style.setProperty("line-height",`${parseFloat(s.lineHeight)*p}px`)}}}finally{r.remove()}}}function es(t,e){let n=t.ownerDocument.createRange();n.setStart(t,e),n.setEnd(t,e+1);let r=n.getBoundingClientRect();return r.left+r.width/2}function rf(t,e=!1){for(let n=t.firstChild;n;n=n.nextSibling){if(n.nodeType!==3)continue;let r=/\S+/.exec(n.data);if(!r)continue;let i=t.ownerDocument.createRange();i.setStart(n,r.index),i.setEnd(n,r.index+r[0].length);let o=i.getClientRects();return o.length===1?{word:r[0],distance:e?o[0].height:o[0].width,centers:!1,height:e}:null}return null}function of(t,e,n){let r=nf.exec(t.value.split(`
|
|
12
|
+
`)[0]);if(!r||t.scrollLeft||t.scrollTop||!n.caretPositionFromPoint)return null;let i=t.getBoundingClientRect(),o=t.localName==="textarea"?i.top+(parseFloat(e.borderTopWidth)||0)+(parseFloat(e.paddingTop)||0)+3:i.top+i.height/2,s=c=>{let u=n.caretPositionFromPoint(c,o);return u&&u.offsetNode===t?u.offset:-1},a=i.width/16,l=c=>{let u=i.left;for(;u<=i.right&&s(u)<c;)u+=a;if(u>i.right)return NaN;let d=u-a;for(let h=0;h<16;h++){let m=(d+u)/2;s(m)>=c?u=m:d=m}return u},f=Math.abs(l(r.index+r[0].length)-l(r.index+1));return Number.isFinite(f)?{word:r[0],distance:f,centers:!0}:null}mt();var hs=new Set(["rgba(0, 0, 0, 0)","transparent"]),ro="Highlight";function ms(t){let n=(t.ownerDocument||document).getSelection?.();if(!n||n.isCollapsed||n.rangeCount===0)return null;let r=[];for(let i=0;i<n.rangeCount;i+=1){let o=n.getRangeAt(i);if(!o.collapsed)try{o.intersectsNode(t)&&r.push(o)}catch{}}return r.length?{ranges:r,styles:new Map}:null}function sf(t,e){if(e.styles.has(t))return e.styles.get(t);let n;try{let r=getComputedStyle(t);if(r.userSelect==="none"||r.webkitUserSelect==="none"||r.getPropertyValue("-webkit-user-select")==="none")return e.styles.set(t,null),null;let i=getComputedStyle(t,"::selection"),o=[],s=i.backgroundColor,a=s&&!hs.has(s)&&s!==r.backgroundColor;o.push(`background-color:${a?s:ro}`),i.color&&i.color!==r.color&&o.push(`color:${i.color}`,`-webkit-text-fill-color:${i.color}`),i.textShadow&&i.textShadow!==r.textShadow&&o.push(`text-shadow:${i.textShadow}`),i.textDecorationLine&&i.textDecorationLine!=="none"&&i.textDecorationLine!==r.textDecorationLine&&o.push(`text-decoration:${i.textDecorationLine} ${i.textDecorationStyle||"solid"} ${i.textDecorationColor||"currentcolor"}`),n=o.join(";")}catch{n=`background-color:${ro}`}return e.styles.set(t,n),n}function gs(t,e){let n=t.data;if(!n)return null;let r=t.parentElement;if(!r)return null;let i=[];for(let f of e.ranges){let c=!1;try{c=f.intersectsNode(t)}catch{}if(!c)continue;let u=f.startContainer===t?f.startOffset:0,d=f.endContainer===t?f.endOffset:n.length;d>u&&i.push([u,d])}if(i.length===0)return null;let o=sf(r,e);if(!o)return null;i.sort((f,c)=>f[0]-c[0]);let s=t.ownerDocument||document,a=s.createDocumentFragment(),l=0;for(let[f,c]of i){f>l&&a.append(s.createTextNode(n.slice(l,f)));let u=s.createElement("span");u.setAttribute("data-snapdom-selection",""),u.setAttribute("style",`all:unset;${o}`),u.textContent=n.slice(f,c),a.append(u),l=c}return l<n.length&&a.append(s.createTextNode(n.slice(l))),a}var Ln=t=>Number.parseFloat(t)||0,af=["font-family","font-size","font-weight","font-style","font-variant","font-stretch","letter-spacing","word-spacing","text-transform","text-indent","text-align","line-height","tab-size","direction"];function lf(t,e){try{let r=getComputedStyle(t,"::selection").backgroundColor;if(r&&!hs.has(r)&&r!==e.backgroundColor)return r}catch{}return ro}function ys(t,e){let n=t.ownerDocument||document;if(n.activeElement!==t)return;let r=null,i=null;try{r=t.selectionStart,i=t.selectionEnd}catch{return}if(r==null||i==null||r===i)return;let o=t.value||"";if(t.localName==="input"&&t.type==="password"&&(o="\u2022".repeat(o.length)),!o)return;let s=getComputedStyle(t),a=t.localName==="textarea",l=Ln(s.paddingLeft),f=Ln(s.paddingTop),c=t.clientWidth-l-Ln(s.paddingRight),u=t.clientHeight-f-Ln(s.paddingBottom),d=n.createElement("div");d.style.cssText="position:absolute;top:0;left:-99999px;visibility:hidden;margin:0;border:0;padding:0;box-sizing:content-box;";for(let g of af)d.style.setProperty(g,s.getPropertyValue(g));a?(d.style.whiteSpace="pre-wrap",d.style.overflowWrap="break-word",d.style.width=`${Math.max(0,c)}px`):d.style.whiteSpace="pre";let h=n.createElement("span");h.textContent=o.slice(r,i),d.append(n.createTextNode(o.slice(0,r)),h,n.createTextNode(o.slice(i))),n.body.appendChild(d);let m=[];try{let g=d.getBoundingClientRect(),y=-t.scrollLeft,b=-t.scrollTop;if(!a){b+=Math.max(0,(u-g.height)/2);let w=s.direction==="rtl",x=s.textAlign;x==="start"?x=w?"right":"left":x==="end"&&(x=w?"left":"right");let C=c-g.width;C>0&&(x==="right"?y+=C:x==="center"&&(y+=C/2))}for(let w of h.getClientRects())w.width<=0||w.height<=0||m.push({x:l+(w.left-g.left)+y,y:f+(w.top-g.top)+b,width:w.width,height:w.height})}finally{d.remove()}if(m.length===0)return;let p=lf(t,s);e.__snapdomFieldSelection={images:m.map(()=>`linear-gradient(${p},${p})`),positions:m.map(g=>`${g.x}px ${g.y}px`),sizes:m.map(g=>`${g.width}px ${g.height}px`),repeats:m.map(()=>"no-repeat"),origins:m.map(()=>"padding-box"),clips:m.map(()=>"padding-box"),base:{image:s.backgroundImage,position:s.backgroundPosition,size:s.backgroundSize,repeat:s.backgroundRepeat,origin:s.backgroundOrigin,clip:s.backgroundClip}}}function bs(t){for(let e of t.keys()){let n=e.__snapdomFieldSelection;if(!n)continue;delete e.__snapdomFieldSelection;let{images:r,positions:i,sizes:o,repeats:s,origins:a,clips:l,base:f}=n,c=e.style.backgroundImage||f.image;c&&c!=="none"?(r.push(c),i.push(e.style.backgroundPosition||f.position),o.push(e.style.backgroundSize||f.size),s.push(e.style.backgroundRepeat||f.repeat),a.push(e.style.backgroundOrigin||f.origin),l.push(e.style.backgroundClip||f.clip)):(r.push("linear-gradient(transparent,transparent)"),i.push("0% 0%"),o.push("auto"),s.push("repeat"),a.push(f.origin||"padding-box"),l.push(f.clip||"border-box")),e.style.backgroundImage=r.join(","),e.style.backgroundPosition=i.join(","),e.style.backgroundSize=o.join(","),e.style.backgroundRepeat=s.join(","),e.style.backgroundOrigin=a.join(","),e.style.backgroundClip=l.join(",")}}_t();var oo=new Map,ws=new Set(["IFRAME"]);function Ne(t,e){oo.set(String(t).toUpperCase(),e)}function In(t){let e=I(t),n=e.display;if(n==="none")return null;let r=/^(block|inline-block|flow-root|flex|inline-flex|grid|inline-grid|list-item)$/.test(n),i=h=>parseFloat(h)||0,o=(h,m,p,g,y)=>{if(!r||!h?.endsWith("px"))return null;let b=parseFloat(h);if(!Number.isFinite(b)||b<0)return null;if(e.boxSizing==="border-box")return b;let w=g-y-p;return b+m+p+(w>0&&b+m<y+w/2?w:0)},[s,a,l,f]=/scroll|auto/.test(e.overflow)?[t.offsetWidth,t.clientWidth,t.offsetHeight,t.clientHeight]:[0,0,0,0],c=o(e.width,i(e.paddingLeft)+i(e.paddingRight),i(e.borderLeftWidth)+i(e.borderRightWidth),s,a),u=o(e.height,i(e.paddingTop)+i(e.paddingBottom),i(e.borderTopWidth)+i(e.borderBottomWidth),l,f);if(c===null||u===null){let{width:h,height:m}=Ct(t),p=h,g=m;if(c===null&&!p||u===null&&!g){let y=t.getBoundingClientRect();p||=y.width||0,g||=y.height||0}c??=p,u??=g}let d=document.createElement("div");return d.style.cssText=`display:${n==="inline"?"inline-block":n};box-sizing:border-box;width:${c}px;height:${u}px;visibility:hidden;`,d}var cf=new Set(["style","option","optgroup"]),On=200,ff=new Set(["img","canvas","video","iframe","object","embed"]);function un(t){let e=0;for(let n of t.matchAll(/-?[\d.]+px/g))e+=Math.abs(parseFloat(n[0]));return e}function vs(t){let e=t.filter;return!e||e==="none"?0:e.includes("url(")?On:3*un(e)}function Cs(t,e){if(!t)return 0;let n=e.filterReach||=new WeakMap,r=n.get(t);return r===void 0&&(r=vs(I(t))+(t===e.root?0:Cs(t.parentElement,e)),n.set(t,r)),r}function Ss(t,e,n){try{if(!e||!t.matches(e))return!1}catch{return!0}let r=I(t,n).content;return!!r&&r!=="none"&&r!=="normal"}function uf(t,e,n){let{before:r,after:i}=te(t);if(r===null||i===null||Ss(t,r,"::before")||Ss(t,i,"::after")||e.borderImageSource&&e.borderImageSource!=="none"||e.webkitBoxReflect&&e.webkitBoxReflect!=="none")return On;let o=parseFloat(e.fontSize)||16,s=e.outlineStyle==="none"?0:un(e.outlineWidth)+un(e.outlineOffset);return Math.max(o*(e.display==="list-item"?3:1),s,un(e.boxShadow),un(e.textShadow),vs(e))+Cs(t.parentElement,n)}function xs(t,e,n,r){let i=r.rect,o=Math.max(i.left-n.right,n.left-i.right,i.top-n.bottom,n.top-i.bottom);if(o<=0)return!0;if(o>On)return!1;let s=r.inkReach||=new WeakMap,a=s.get(t);return a===void 0&&s.set(t,a=uf(t,e||I(t),r)),o<=a}function df(t,e){if(t===e.root)return!1;let n;try{n=t.getBoundingClientRect()}catch{return!1}if(n.width===0&&n.height===0)return!1;let r=I(t);if(r.display==="inline"&&!ff.has((t.localName||"").toLowerCase()))return!1;let i=t.scrollWidth||0,o=t.scrollHeight||0,s={left:r.direction==="rtl"?Math.min(n.left,n.right-i):n.left,top:n.top,right:Math.max(n.right,n.left+i),bottom:Math.max(n.bottom,n.top+o)},a=r.writingMode||"";if((a.startsWith("vertical")||a.startsWith("sideways"))&&(s.top=Math.min(n.top,n.bottom-o),s.left=Math.min(s.left,n.right-i)),xs(t,r,s,e))return!1;let l=(t.ownerDocument||document).createTreeWalker(t,NodeFilter.SHOW_ELEMENT);for(;l.nextNode();){let f=l.currentNode,c=f.getBoundingClientRect();if((c.width>0||c.height>0)&&xs(f,null,c,e))return!1}return!0}function pf(t,e,n){let r=t.cloneNode(!1);t.tagName==="IMG"&&(r.removeAttribute("src"),r.removeAttribute("srcset"),r.removeAttribute("sizes")),ut(t,r,e,n);let{width:i,height:o}=Ct(t);i>0&&(r.style.width=`${i}px`,r.style.minWidth=`${i}px`,r.style.maxWidth=`${i}px`),o>0&&(r.style.height=`${o}px`,r.style.minHeight=`${o}px`,r.style.maxHeight=`${o}px`),r.style.visibility="hidden";let s=t.parentElement?I(t.parentElement).display:"",a=I(t).position;if(!/flex|grid|table/.test(s)&&(a==="static"||a==="relative")){let l=d=>{let h=I(d);return h.display!=="none"&&h.position!=="absolute"&&h.position!=="fixed"},f=t.getBoundingClientRect(),c=t.previousElementSibling;for(;c&&!l(c);)c=c.previousElementSibling;if(c){let d=f.top-c.getBoundingClientRect().bottom;d>=0&&(r.style.marginTop=`${d}px`)}let u=t.nextElementSibling;for(;u&&!l(u);)u=u.nextElementSibling;if(u){let d=u.getBoundingClientRect().top-f.bottom;d>=0&&(r.style.marginBottom=`${d}px`)}}return r.style.boxSizing="border-box",r}async function ee(t,e,n){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");e.slicer?.due()&&await e.slicer.pause();let r=new Set,i=null,o=null;if(t.nodeType===Node.ELEMENT_NODE){let c=(t.localName||t.tagName||"").toLowerCase(),u=Xt(t);if(u&&(t.id==="snapdom-sandbox"||t.hasAttribute("data-snapdom-sandbox"))||t!==n.element&&u||Wr.has(c))return null;if(c==="foreignobject"&&t.parentElement?.closest?.("foreignObject"))return j(e,"Skipped a nested <foreignObject>; it can't be captured."),null;if(c==="source"&&t.parentElement?.localName==="picture")return null}if(t.nodeType===Node.TEXT_NODE){if(e.selection){let c=gs(t,e.selection);if(c)return c}return t.cloneNode(!0)}if(t.nodeType!==Node.ELEMENT_NODE)return t.cloneNode(!0);if(t.getAttribute("data-capture")==="exclude"){if(n.excludeMode==="hide")return In(t);if(n.excludeMode==="remove")return null}if(n.exclude&&Array.isArray(n.exclude))for(let c of n.exclude)try{if(t.matches?.(c)){if(n.excludeMode==="hide")return In(t);if(n.excludeMode==="remove")return null}}catch{console.warn(`[SnapDOM] Invalid exclude selector "${c}"; ignored.`)}if(n.excludePredicates)for(let c of n.excludePredicates)try{if(c(t))return n.excludeMode==="remove"?null:In(t)}catch(u){console.warn("[SnapDOM] Your exclude function threw; the element was kept.",u)}if(typeof n.filter=="function")try{if(!n.filter(t)){if(n.filterMode==="hide")return In(t);if(n.filterMode==="remove")return null}}catch(c){console.warn("[SnapDOM] Your filter function threw; the element was kept.",c)}if(t!==n.element&&!cf.has(t.localName)&&!Tt(t)&&I(t).display==="none"){let c=t.cloneNode(!1);t.tagName==="IMG"&&(c.removeAttribute("src"),c.removeAttribute("srcset")),c.style.setProperty("display","none","important");for(let u of t.querySelectorAll("style")){let d=await ee(u,e,n);d&&c.appendChild(d)}return c}if(e.clip&&df(t,e.clip))return pf(t,e,n);if(n.__resolveNodeHooks)for(let c of n.__resolveNodeHooks){let u;try{u=await c(t,n)}catch(d){j(e,"A plugin's resolveNode hook threw; ignored it.",d)}if(u===null)return null;if(u?.nodeType)return u.nodeType===Node.ELEMENT_NODE&&(e.nodeMap.set(u,t),ut(t,u,e,n)),u}{let c=ws.has(t.tagName)&&oo.get(t.tagName);if(c){let u=await c(t,e,n);if(u!==void 0)return u}}if(t.getAttribute("data-capture")==="placeholder"){let c=t.cloneNode(!1);e.nodeMap.set(c,t),ut(t,c,e,n);let u=document.createElement("div");return u.textContent=t.getAttribute("data-placeholder-text")||"",u.style.cssText="color:#666;font-size:12px;text-align:center;line-height:1.4;padding:0.5em;box-sizing:border-box;",c.appendChild(u),c}{let c=!ws.has(t.tagName)&&oo.get(t.tagName);if(c){let u=await c(t,e,n);if(u!==void 0)return u}}let s;try{if(s=t.cloneNode(!1),Qi(t,s),e.nodeMap.set(s,t),t.tagName==="IMG"){ss(t,s,n);try{let c=window.getComputedStyle(t),u=parseFloat(c.width),d=parseFloat(c.height);if(!(u>0)||!(d>0)){let p=Ct(t),g=b=>parseFloat(c.getPropertyValue(b))||0,y=c.getPropertyValue("box-sizing")==="border-box";u>0||(u=p.width-(y?0:g("padding-left")+g("padding-right")+g("border-left-width")+g("border-right-width"))),d>0||(d=p.height-(y?0:g("padding-top")+g("padding-bottom")+g("border-top-width")+g("border-bottom-width")))}let h=Math.round((u||0)*1e3)/1e3,m=Math.round((d||0)*1e3)/1e3;h&&(s.dataset.snapdomWidth=String(h)),m&&(s.dataset.snapdomHeight=String(m))}catch(c){j(e,"Couldn't measure an image; kept its own size.",c)}try{let c=t.getAttribute("style")||"",u=window.getComputedStyle(t),d=w=>{let x=c.match(new RegExp(`${w}\\s*:\\s*([^;]+)`,"i")),C=x?x[1].trim():u.getPropertyValue(w);return/%|auto/i.test(String(C||""))},h=parseFloat(s.dataset.snapdomWidth||"0")||0,m=parseFloat(s.dataset.snapdomHeight||"0")||0,p=d("width")||!(h>0),g=d("height")||!(m>0);p&&h>0&&(s.style.width=`${h}px`),g&&m>0&&(s.style.height=`${m}px`);let y=u.getPropertyValue("object-fit"),b=u.getPropertyValue("object-position");y&&y!=="fill"?(s.style.objectFit=y,b&&(s.style.objectPosition=b)):(h>0&&(s.style.minWidth=`${h}px`),m>0&&(s.style.minHeight=`${m}px`))}catch(c){j(e,"Couldn't fix the size of an image.",c)}}}catch(c){throw console.error("[SnapDOM] Couldn't copy this element:",t,c),c}let a=null;if(it(t,"textarea")){let{width:c,height:u}=Ct(t),d=c||t.getBoundingClientRect().width||0,h=u||t.getBoundingClientRect().height||0;d&&(s.style.width=`${d}px`),h&&(s.style.height=`${h}px`)}if(it(t,"input")){let c=(t.type||"text").toLowerCase();if((c==="checkbox"||c==="radio")&&(xt()||t.indeterminate)){let{el:d,applyVisual:h}=ds(t);e.nodeMap.set(d,t),a=h,s=d}else if(c==="range"&&(xt()||X())){let{el:d,applyVisual:h}=us(t);e.nodeMap.set(d,t),a=h,s=d}else if(c==="color"&&X()){let d=s,h=t.value||"#000000";a=()=>{d.style.setProperty("background-color",h,"important"),d.style.setProperty("color","transparent","important"),d.style.setProperty("-webkit-text-fill-color","transparent","important"),d.style.setProperty("appearance","none","important"),d.style.setProperty("-webkit-appearance","none","important")},d.removeAttribute("value")}else if((c==="date"||c==="time"||c==="datetime-local")&&(xt()||X())){s.setAttribute("type","text");let d=t.value;c==="date"&&t.valueAsDate&&(d=t.valueAsDate.toLocaleDateString(void 0,{timeZone:"UTC"})),s.value=d,s.setAttribute("value",d)}else{let d=Ze(t)?Pr(t.value):t.value;s.value=d,s.setAttribute("value",d),t.checked!==void 0&&(s.checked=t.checked,t.checked?s.setAttribute("checked",""):s.removeAttribute("checked"),t.indeterminate&&(s.indeterminate=t.indeterminate))}}if((it(t,"input")||it(t,"textarea"))&&!t.value&&t.placeholder)try{let c=window.getComputedStyle(t,"::placeholder"),u=c&&c.color;u&&u!=="rgba(0, 0, 0, 0)"&&(e.__usesPlaceholder=!0,s.setAttribute("data-sd-ph",""),s.style.setProperty("--sd-ph",u),s.style.setProperty("--sd-ph-o",c.opacity||"1"))}catch{}if(it(t,"select")&&(i=new Set(Array.from(t.options).filter(c=>c.selected))),it(t,"textarea")&&(o=t.value),it(t,"input")||it(t,"textarea")||it(t,"select")){t.disabled&&s.setAttribute("disabled",""),t.required&&s.setAttribute("required",""),t.readOnly&&s.setAttribute("readonly","");let c=t;c.min!==void 0&&c.min!==""&&s.setAttribute("min",c.min),c.max!==void 0&&c.max!==""&&s.setAttribute("max",c.max),c.pattern!==void 0&&c.pattern!==""&&s.setAttribute("pattern",c.pattern);let u=t.getAttribute("aria-invalid");u!==null&&s.setAttribute("aria-invalid",u)}if(Pn(t)||ut(t,s,e,n),a&&a(),n.captureSelection&&(it(t,"input")||it(t,"textarea")))try{ys(t,s)}catch(c){j(e,"Couldn't copy the selection of a text field.",c)}if(Tt(t)&&!Pn(t)){let c=["fill","stroke","stroke-width","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","opacity","fill-opacity","stroke-opacity","fill-rule","clip-rule","marker","marker-start","marker-mid","marker-end","visibility","display","color"];try{let u=window.getComputedStyle(t);for(let d of c){let h=u.getPropertyValue(d);h&&s.style.setProperty(d,h)}t.localName==="stop"&&(s.style.setProperty("stop-color",u.getPropertyValue("stop-color")),s.style.setProperty("stop-opacity",u.getPropertyValue("stop-opacity")))}catch{}}if(t.shadowRoot){Jr(t.shadowRoot);try{let b=t.shadowRoot.querySelectorAll("slot");for(let w of b){let x=w.assignedNodes?.()||[];for(let C of x)r.add(C)}}catch{}let c=rs(e),u=`[data-sd="${c}"]`;e.shadowScopes||=new WeakMap,e.shadowScopes.set(t.shadowRoot,c);try{s.setAttribute("data-sd",c)}catch{}let d=os(t.shadowRoot);!e.__shadowPseudo&&/::?(?:before|after|first-l|marker)|counter/.test(d)&&(e.__shadowPseudo=!0);let h=ns(d,u,c),m=as(d),p=ls(t,m,u);is(s,p+h,c);let g=document.createDocumentFragment(),y=await Promise.all(Array.from(t.shadowRoot.childNodes).map(b=>b.nodeType===Node.ELEMENT_NODE&&b.tagName==="STYLE"?null:ee(b,e,n).catch(()=>null)));g.append(...y.filter(b=>!!b)),s.appendChild(g)}if(t.tagName==="SLOT"){let c=e.shadowScopes?.get(t.getRootNode()),u=t.assignedNodes?.()||[],d=u.length?t.assignedNodes?.({flatten:!0})||u:[],h=d.length?d:Array.from(t.childNodes),m=document.createDocumentFragment(),p=await Promise.all(h.map(g=>ee(g,e,n).then(y=>(y&&u.length&&cs(y,c),y||null)).catch(()=>null)));return m.append(...p.filter(g=>!!g)),m}let l=c=>r.has(c)||t.shadowRoot&&!c.assignedSlot,f=await Promise.all(Array.from(t.childNodes).map(c=>l(c)?null:ee(c,e,n).catch(()=>null)));if(s.append(...f.filter(c=>!!c)),i&&it(s,"select")){let c=!1;for(let u of s.options){let d=i.has(e.nodeMap.get(u));u.selected=d,d?u.setAttribute("selected",""):u.removeAttribute("selected"),c||=d}if(!c&&!s.multiple){let u=s.ownerDocument.createElement("option");u.hidden=!0,u.style.setProperty("display","none","important"),u.setAttribute("selected",""),u.value="",s.appendChild(u)}}return o!==null&&it(s,"textarea")&&(s.textContent=o),s}async function hf(t,e,n){let r=!1;try{r=!!(t.contentDocument||t.contentWindow?.document)}catch(i){j(e,"Couldn't tell if an iframe is same-origin; treated it as cross-origin.",i)}if(r)try{return await no(t,e,n)}catch(i){console.warn("[SnapDOM] Couldn't capture an iframe, so it was left out.",i)}if(r||console.warn(n.placeholders?"[SnapDOM] Can't capture a cross-origin iframe; showing a placeholder. Set placeholders: false to hide it.":"[SnapDOM] Can't capture a cross-origin iframe; left it out.",t),n.placeholders){let{width:i,height:o}=Ct(t),s=document.createElement("div");return s.style.cssText=`width:${i}px;height:${o}px;background-image:repeating-linear-gradient(45deg,#ddd,#ddd 5px,#f9f9f9 5px,#f9f9f9 10px);display:flex;align-items:center;justify-content:center;font-size:12px;color:#555;border:1px solid #aaa;`,ut(t,s,e,n),s}else{let{width:i,height:o}=Ct(t),s=document.createElement("div");return s.style.cssText=`display:inline-block;width:${i}px;height:${o}px;visibility:hidden;`,ut(t,s,e,n),s}}function dn(t){try{let e=Math.max(1,Math.min(32,t.width)),n=Math.max(1,Math.min(32,t.height)),r=document.createElement("canvas");r.width=e,r.height=n;let i=r.getContext("2d",{willReadFrequently:!0});if(!i)return!1;i.drawImage(t,0,0,e,n);let o=i.getImageData(0,0,e,n).data;for(let s=3;s<o.length;s+=4)if(o[s]!==0)return!1;return!0}catch{return!1}}var mf=.95;function gf(t,e,n){try{let r=t.getImageData(0,0,e,n).data;for(let i=3;i<r.length;i+=4)if(r[i]!==255)return!1;return!0}catch{return!1}}async function yf(t,e,n){let r="";try{let a=dn(t);a&&(await St(),a=dn(t));let l=null;if(!a){l=t.getContext("2d",{willReadFrequently:!0});try{l&&l.getImageData(0,0,1,1)}catch{}X()&&await St()}if(r=t.toDataURL("image/png"),!r||r==="data:,"){try{l&&l.getImageData(0,0,1,1)}catch{}if(await St(),r=t.toDataURL("image/png"),!r||r==="data:,"){let f=document.createElement("canvas");f.width=t.width,f.height=t.height;let c=f.getContext("2d");c&&(c.drawImage(t,0,0),r=f.toDataURL("image/png"))}}}catch(a){j(e,"Couldn't read the pixels of a canvas; used its fallback content.",a)}n&&n.debug&&r&&dn(t)&&j(e,"Empty canvas; capture after its first frame",t);let i=document.createElement("img");try{i.decoding="sync",i.loading="eager"}catch(a){j(e,"Couldn't set image loading hints.",a)}r&&(i.src=r),i.width=t.width,i.height=t.height;let{width:o,height:s}=Ct(t);return o>0&&(i.style.width=`${o}px`),s>0&&(i.style.height=`${s}px`),e.nodeMap.set(i,t),ut(t,i,e,n),i}async function bf(t,e,n){let r="",i=t.poster&&t.paused&&!t.currentTime&&!t.played.length,o=document.createElement("img");try{o.decoding="sync",o.loading="eager"}catch{}if(!i)try{let l=document.createElement("canvas");l.width=t.videoWidth||t.offsetWidth||320,l.height=t.videoHeight||t.offsetHeight||240;let f=l.getContext("2d");f&&(f.drawImage(t,0,0,l.width,l.height),r=l.toDataURL(gf(f,l.width,l.height)?"image/jpeg":"image/png",mf),(!r||r==="data:,")&&(r=""))}catch(l){j(e,"Couldn't capture a video frame; used its poster.",l)}r?o.src=r:t.poster&&(o.src=t.poster),o.width=t.videoWidth||t.offsetWidth||0,o.height=t.videoHeight||t.offsetHeight||0;let{width:s,height:a}=Ct(t);return s>0&&(o.style.width=`${s}px`),a>0&&(o.style.height=`${a}px`),o.style.objectFit="contain",e.nodeMap.set(o,t),ut(t,o,e,n),o}async function wf(t,e,n){if(!t.controls)return;let{width:r,height:i}=Ct(t),o=Math.round(r||t.offsetWidth||300),s=Math.round(i||t.offsetHeight||54),a=s/2,l=Math.max(4,s*.16),f=s*.34,c=o-s*.34,u=f+l+s*.55,d=Math.max(0,c-s*.7-u),h=Math.max(9,Math.round(s*.24)),m=`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${s}" viewBox="0 0 ${o} ${s}"><rect width="${o}" height="${s}" rx="${Math.min(s/2,10)}" fill="#f1f3f4"/><path d="M ${f} ${a-l} L ${f+l} ${a} L ${f} ${a+l} Z" fill="#5f6368"/><rect x="${u}" y="${a-1.5}" width="${d}" height="3" rx="1.5" fill="#bdc1c6"/><circle cx="${u}" cy="${a}" r="${Math.max(3,s*.09)}" fill="#5f6368"/><text x="${c}" y="${a}" fill="#5f6368" font-family="sans-serif" font-size="${h}" text-anchor="end" dominant-baseline="central">0:00</text></svg>`,p=document.createElement("img");try{p.decoding="sync",p.loading="eager"}catch{}return p.src=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(m)}`,p.width=o,p.height=s,p.style.width=`${o}px`,p.style.height=`${s}px`,e.nodeMap.set(p,t),ut(t,p,e,n),p}async function ks(t,e,n){let r=t.getAttribute("data")||t.getAttribute("src")||"",i=(t.getAttribute("type")||"").toLowerCase(),o=/^image\//.test(i)||/\.(png|jpe?g|gif|webp|avif|bmp|ico|svg)(\?|#|$)/i.test(r);if(r&&o){let a=document.createElement("img");try{a.decoding="sync",a.loading="eager"}catch{}a.src=r;let{width:l,height:f}=Ct(t);return l>0&&(a.style.width=`${l}px`),f>0&&(a.style.height=`${f}px`),e.nodeMap.set(a,t),ut(t,a,e,n),a}let s=null;try{s=t.contentDocument}catch{}if(s)try{let a=await no(t,e,n);if(a)return a}catch{}r&&console.warn(`[SnapDOM] Couldn't capture <${t.localName}>${i?` (${i})`:""}; showing its fallback content.`)}Ne("IFRAME",hf);Ne("CANVAS",yf);Ne("VIDEO",bf);Ne("AUDIO",wf);Ne("OBJECT",ks);Ne("EMBED",ks);vt();At();Ae();wt();_t();var Sf=[/font\s*awesome/i,/material\s*icons/i,/ionicons/i,/glyphicons/i,/feather/i,/bootstrap\s*icons/i,/remix\s*icons/i,/heroicons/i,/layui/i,/lucide/i],Le=Object.assign({materialIconsFilled:"https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNcIhQ8tQ.woff2",materialIconsOutlined:"https://fonts.gstatic.com/s/materialiconsoutlined/v110/gok-H7zzDkdnRel8-DQ6KAXJ69wP1tGnf4ZGhUcel5euIg.woff2",materialIconsRound:"https://fonts.gstatic.com/s/materialiconsround/v109/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmPq_HTTw.woff2",materialIconsSharp:"https://fonts.gstatic.com/s/materialiconssharp/v110/oPWQ_lt5nv4pWNJpghLP75WiFR4kLh3kvmvRImcycg.woff2"},typeof window<"u"&&window.__SNAPDOM_ICON_FONTS__||{});function xf(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ms(t){let e=Array.isArray(t)?t:t?[t]:[],n=[];for(let r of e)r instanceof RegExp?n.push(r):typeof r=="string"?n.push(new RegExp(xf(r),"i")):console.warn("[SnapDOM] Ignored an iconFonts entry: use a string or a RegExp.",r);return n}function It(t,e){let n=typeof t=="string"?t:"";for(let r of Sf)if(r.test(n))return!0;if(e){for(let r of e)if(r instanceof RegExp&&r.test(n))return!0}return!!(/icon/i.test(n)||/glyph/i.test(n)||/symbols/i.test(n)||/feather/i.test(n)||/fontawesome/i.test(n))}function io(t,e){if(typeof t!="string"||!t)return!1;let n;try{n=new URL(t,typeof location<"u"?location.href:void 0)}catch{return It(t,e)}let r=n.searchParams.getAll("family").flatMap(i=>i.split("|")).map(i=>i.split(":")[0].trim()).filter(Boolean);return r.length?r.every(i=>It(i,e)):It(t,e)}function vf(t=""){let e=String(t).toLowerCase();return/\bmaterial\s*icons\b/.test(e)||/\bmaterial\s*symbols\b/.test(e)}var Dn=new Map;function Cf(t=""){let e=Object.create(null),n=String(t||""),r=/['"]?\s*([A-Za-z]{3,4})\s*['"]?\s*([+-]?\d+(?:\.\d+)?)\s*/g,i;for(;i=r.exec(n);)e[i[1].toUpperCase()]=Number(i[2]);return e}async function kf(t,e,n){let r=String(t||""),i=r.toLowerCase(),o=String(e||"").toLowerCase();if(/\bmaterial\s*icons\b/.test(i)&&!/\bsymbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};if(!/\bmaterial\s*symbols\b/.test(i))return{familyForMeasure:r,familyForCanvas:r};let a=n&&(n.FILL??n.fill),l="outlined";/\brounded\b/.test(o)||/\bround\b/.test(o)?l="rounded":/\bsharp\b/.test(o)?l="sharp":/\boutlined\b/.test(o)&&(l="outlined");let f=a===1,c=null;if(f&&(l==="outlined"&&Le.materialIconsFilled?c={url:Le.materialIconsFilled,alias:"snapdom-mi-filled"}:l==="rounded"&&Le.materialIconsRound?c={url:Le.materialIconsRound,alias:"snapdom-mi-round"}:l==="sharp"&&Le.materialIconsSharp&&(c={url:Le.materialIconsSharp,alias:"snapdom-mi-sharp"})),!c)return{familyForMeasure:r,familyForCanvas:r};if(!Dn.has(c.alias))try{let d=new FontFace(c.alias,`url(${c.url})`,{style:"normal",weight:"400"});await d.load(),document.fonts.add(d),Dn.set(c.alias,!0)}catch{return Dn.set(c.alias,!1),{familyForMeasure:r,familyForCanvas:r}}if(Dn.get(c.alias)===!1)return{familyForMeasure:r,familyForCanvas:r};let u=`"${c.alias}"`;return{familyForMeasure:u,familyForCanvas:u}}async function Mf(t="Material Icons",e=24){try{await Promise.all([document.fonts.load(`400 ${e}px "${String(t).replace(/["']/g,"")}"`),document.fonts.ready])}catch{}}function Af(t){let e=t.getPropertyValue("-webkit-text-fill-color")?.trim()||"",n=/^transparent$/i.test(e)||/rgba?\(\s*0\s*,\s*0\s*,\s*0\s*,\s*0\s*\)/i.test(e);if(e&&!n&&e.toLowerCase()!=="currentcolor")return e;let r=t.color?.trim();return r&&r!=="inherit"?r:"#000"}async function _f(t,{family:e="Material Icons",weight:n="normal",fontSize:r=32,color:i="#000",variation:o="",className:s=""}={}){let a=String(e||"").replace(/^['"]+|['"]+$/g,""),l=window.devicePixelRatio||1,f=Cf(o),{familyForMeasure:c,familyForCanvas:u}=await kf(a,s,f);await Mf(u.replace(/^["']+|["']+$/g,""),r);let d=document.createElement("span");J(d),d.textContent=t,d.style.position="absolute",d.style.visibility="hidden",d.style.left="-99999px",d.style.whiteSpace="nowrap",d.style.fontFamily=c,d.style.fontWeight=String(n||"normal"),d.style.fontSize=`${r}px`,d.style.lineHeight="1",d.style.margin="0",d.style.padding="0",d.style.fontFeatureSettings="'liga' 1",d.style.fontVariantLigatures="normal",d.style.color=i,document.body.appendChild(d);let h=d.getBoundingClientRect(),m=Math.max(1,Math.ceil(h.width)),p=Math.max(1,Math.ceil(h.height));document.body.removeChild(d);let g=document.createElement("canvas");g.width=m*l,g.height=p*l;let y=g.getContext("2d");y.scale(l,l),y.font=`${n?`${n} `:""}${r}px ${u}`,y.textAlign="left",y.textBaseline="top",y.fillStyle=i;try{y.fontKerning="normal"}catch{}return y.fillText(t,0,0),{dataUrl:g.toDataURL(),width:m,height:p}}async function Wn(t,e,n=new Map){if(t?.nodeType!==1)return 0;let r='.material-icons, [class*="material-symbols"]',i=Array.from(t.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim());if(t.matches?.(r)&&t.textContent&&t.textContent.trim()&&i.unshift(t),i.length===0)return 0;let o=e?.nodeType===1?Array.from(e.querySelectorAll(r)).filter(a=>a&&a.textContent&&a.textContent.trim()):[];e?.nodeType===1&&e.matches?.(r)&&e.textContent&&e.textContent.trim()&&o.unshift(e);let s=0;for(let a=0;a<i.length;a++){let l=i[a],f=n&&n.get(l)||o[a]||null;try{let c=getComputedStyle(f||l),u=c.fontFamily||"Material Icons";if(!vf(u))continue;let d=(f||l).textContent.trim();if(!d)continue;let h=parseInt(c.fontSize,10)||24,m=c.fontWeight&&c.fontWeight!=="normal"?c.fontWeight:"normal",p=Af(c),g=c.fontVariationSettings&&c.fontVariationSettings!=="normal"?c.fontVariationSettings:"",y=(f||l).className||"",{dataUrl:b,width:w,height:x}=await _f(d,{family:u,weight:m,fontSize:h,color:p,variation:g,className:y});l.textContent="";let C=l.ownerDocument.createElement("img");C.src=b,C.alt=d,C.style.height=`${h}px`,C.style.width=`${Math.max(1,Math.round(w/x*h))}px`,C.style.objectFit="contain",C.style.verticalAlign=getComputedStyle(l).verticalAlign||"baseline",l.appendChild(C),s++}catch{}}return s}le();mt();_t();async function Rs(t,e,n,r=32,i="#000",o="normal"){e=e.replace(/^['"]+|['"]+$/g,"");let s=window.devicePixelRatio||1;try{await document.fonts.ready}catch{}let a=document.createElement("span");J(a),a.textContent=t,a.style.position="absolute",a.style.visibility="hidden",a.style.fontFamily=`"${e}"`,a.style.fontWeight=n||"normal",a.style.fontStyle=o||"normal",a.style.fontSize=`${r}px`,a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.padding="0",a.style.margin="0",document.body.appendChild(a);let l=a.getBoundingClientRect(),f=Math.ceil(l.width),c=Math.ceil(l.height);document.body.removeChild(a);let u=document.createElement("canvas");u.width=Math.max(1,f*s),u.height=Math.max(1,c*s);let d=u.getContext("2d");return d.scale(s,s),d.font=`${o||"normal"} ${n||"normal"} ${r}px "${e}"`,d.textAlign="left",d.textBaseline="top",d.fillStyle=i,d.fillText(t,0,0),{dataUrl:u.toDataURL(),width:f,height:c}}var Fs=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","emoji","math","fangsong","ui-serif","ui-sans-serif","ui-monospace","ui-rounded"]),Ef=["katex","mathjax","mathml"];function lo(t){if(!t)return"";for(let e of t.split(",")){let n=e.trim().replace(/^['"]+|['"]+$/g,"");if(n&&!Fs.has(n.toLowerCase()))return n}return""}function Rf(t){if(!t)return[];let e=[];for(let n of t.split(",")){let r=n.trim().replace(/^['"]+|['"]+$/g,"");r&&(Fs.has(r.toLowerCase())||e.push(r))}return e}function Bn(t){let e=String(t??"400").trim().toLowerCase();if(e==="normal")return 400;if(e==="bold")return 700;let n=parseInt(e,10);return Number.isFinite(n)?Math.min(900,Math.max(100,n)):400}function Un(t){let e=String(t??"normal").trim().toLowerCase();return e.startsWith("italic")?"italic":e.startsWith("oblique")?"oblique":"normal"}function Ff(t){let e=String(t??"100%").match(/(\d+(?:\.\d+)?)\s*%/);return e?Math.max(50,Math.min(200,parseFloat(e[1]))):100}function Tf(t){let e=String(t||"400").trim(),n=e.match(/^(\d{2,3})\s+(\d{2,3})$/);if(n){let i=Bn(n[1]),o=Bn(n[2]);return{min:Math.min(i,o),max:Math.max(i,o)}}let r=Bn(e);return{min:r,max:r}}function Pf(t){let e=String(t||"normal").trim().toLowerCase();return e==="italic"?{kind:"italic"}:e.startsWith("oblique")?{kind:"oblique"}:{kind:"normal"}}function $f(t){let e=String(t||"100%").trim(),n=e.match(/(\d+(?:\.\d+)?)\s*%\s+(\d+(?:\.\d+)?)\s*%/);if(n){let o=parseFloat(n[1]),s=parseFloat(n[2]);return{min:Math.min(o,s),max:Math.max(o,s)}}let r=e.match(/(\d+(?:\.\d+)?)\s*%/),i=r?parseFloat(r[1]):100;return{min:i,max:i}}function Nf(t){return!t||typeof t!="string"?"":t.replace(/\s+(variable|vf|v[0-9]+)$/i,"").trim().toLowerCase().replace(/\s+/g,"-")}function Lf(t,e,n=[]){if(!t)return!1;try{let r=new URL(t,location.href);if(r.origin===location.origin)return!0;let o=r.host.toLowerCase();if(["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","p.typekit.net","kit.fontawesome.com","use.fontawesome.com","cdn.jsdelivr.net","unpkg.com","cdnjs.cloudflare.com","esm.sh"].some(l=>o.endsWith(l))||n.some(l=>o===l.toLowerCase()||o.endsWith("."+l.toLowerCase())))return!0;let a=(r.pathname+r.search).toLowerCase();if(/\bfont(s)?\b/.test(a)||/\.woff2?(\b|$)/.test(a)||Ef.some(l=>a.includes(l)))return!0;for(let l of e){let f=l.toLowerCase().replace(/\s+/g,"+"),c=l.toLowerCase().replace(/\s+/g,"-"),u=Nf(l);if(a.includes(f)||a.includes(c)||u&&a.includes(u))return!0}return!1}catch{return!1}}function If(t){let e=new Set;for(let n of t||[]){let r=String(n).split("__")[0]?.trim();r&&e.add(r)}return e}function As(t,e){return t&&t.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/g,(n,r,i)=>{let o=(i||"").trim();if(!o||/^data:|^blob:|^https?:|^file:|^about:/i.test(o))return n;let s=o;try{s=new URL(o,e||location.href).href}catch{}return`url("${s}")`})}var Ts=/@import\s+(?:url\(\s*(['"]?)([^)"']+)\1\s*\)|(['"])([^"']+)\3)([^;]*);/g,zn=4;async function Of(t,e,n){if(!t)return t;let r=new Set;function i(a,l){try{return new URL(a,l||location.href).href}catch{return a}}async function o(a,l,f=0){if(f>zn)return console.warn(`[SnapDOM] Too many nested @import rules in ${l}; stopped at ${zn} levels.`),a;let c="",u=0,d,h=new RegExp(Ts.source,"g");for(;d=h.exec(a);){c+=a.slice(u,d.index),u=h.lastIndex;let m=(d[2]||d[4]||"").trim(),p=i(m,l);if(r.has(p)){console.warn(`[SnapDOM] Skipped an @import that loops back: ${p}`);continue}r.add(p);let g="";try{let y=await at(p,{as:"text",useProxy:n,silent:!0});y.ok&&typeof y.data=="string"&&(g=y.data)}catch{}g?(g=As(g,p),g=await o(g,p,f+1),c+=`
|
|
13
13
|
/* inlined: ${p} */
|
|
14
14
|
${g}
|
|
15
|
-
`):c+=d[0]}return c+=a.slice(u),c}let s=Ms(t,e||location.href);return s=await o(s,e||location.href,0),s}var Ts=/url\((["']?)([^"')]+)\1\)/g,Of=/@font-face[^{}]*\{[^}]*\}/g;function Ft(t,e,n=""){return(t.match(new RegExp(`${e}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function Ps(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let i=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!i)continue;let o=i[1],s=i[2],a=l=>{if(!l.includes("?"))return parseInt(l,16);let f=parseInt(l.replace(/\?/g,"0"),16),c=parseInt(l.replace(/\?/g,"F"),16);return[f,c]};if(s){let l=a(o),f=a(s),c=Array.isArray(l)?l[0]:l,u=Array.isArray(f)?f[1]:f;e.push([Math.min(c,u),Math.max(c,u)])}else{let l=a(o);Array.isArray(l)?e.push([l[0],l[1]]):e.push([l,l])}}return e}function $s(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,i]of e)if(n>=r&&n<=i)return!0;return!1}function co(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(Ts)){let i=(r[2]||"").trim();if(!(!i||i.startsWith("data:"))){if(!/^https?:/i.test(i))try{i=new URL(i,e||location.href).href}catch{}n.push(i)}}return n}async function so(t,e,n=""){let r=t;for(let i of t.matchAll(Ts)){let o=ae(i[0]);if(!o)continue;let s=o;if(!s.startsWith("http")&&!s.startsWith("data:"))try{s=new URL(s,e||location.href).href}catch{}if(D.resource?.has(s)){r=r.replace(i[0],`url(${D.resource.get(s)})`);continue}try{let a=await at(s,{as:"dataURL",useProxy:n,silent:!0});if(a.ok&&typeof a.data=="string"){let l=a.data;D.resource?.set(s,l),r=r.replace(i[0],`url(${l})`)}}catch{console.warn("[SnapDOM] Couldn't load font file:",s)}}return r}function Df(t){if(!t.length)return null;let e=(a,l)=>t.some(([f,c])=>!(c<a||f>l)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),i=e(880,1023),o=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":o?"cyrillic":i?"greek":r?"latin-ext":n?"latin":null}function As(t={}){let e=new Set((t.families||[]).map(i=>String(i).toLowerCase())),n=new Set((t.domains||[]).map(i=>String(i).toLowerCase())),r=new Set((t.subsets||[]).map(i=>String(i).toLowerCase()));return(i,o)=>{if(e.size&&e.has(i.family.toLowerCase()))return!0;if(n.size)for(let s of i.srcUrls)try{if(n.has(new URL(s).host.toLowerCase()))return!0}catch{}if(r.size){let s=Df(o);if(s&&r.has(s))return!0}return!1}}function Wf(t){if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let o of t.match(e)||[]){let s=Ft(o,"font-family"),a=lo(s),l=Ft(o,"font-weight","400"),f=Ft(o,"font-style","normal"),c=Ft(o,"font-stretch","100%"),u=Ft(o,"unicode-range"),d=Ft(o,"src"),h=co(d,location.href),m=h.length?h.map(g=>String(g).toLowerCase()).sort().join("|"):d.toLowerCase(),p=[String(a||"").toLowerCase(),l,f,c,u.toLowerCase(),m].join("|");n.has(p)||(n.add(p),r.push(o))}if(r.length===0)return t;let i=0;return t.replace(e,()=>r[i++]||"")}var _s=new WeakMap,Bf=0;function Uf(t){let e=_s.get(t);return e===void 0&&(e=Bf++,_s.set(t,e)),e}function zf(t,e,n,r,i,o,s,a,l){let f=Array.from(t||[]).sort().join("|"),c=0,u=0;for(let b of s||[]){let w=Math.imul(b,2654435761);w^=w>>>15,w=Math.imul(w,2246822507),w^=w>>>13,c=c+w|0,u++}let d=e?JSON.stringify({families:(e.families||[]).map(b=>String(b).toLowerCase()).sort(),domains:(e.domains||[]).map(b=>String(b).toLowerCase()).sort(),subsets:(e.subsets||[]).map(b=>String(b).toLowerCase()).sort()}):"",h=(n||[]).map(b=>`${(b.family||"").toLowerCase()}::${b.weight||"normal"}::${b.style||"normal"}::${b.stretchPct??100}::${b.src||""}`).sort().join("|"),m=r||"",p=(i||[]).map(b=>String(b).toLowerCase()).sort().join("|"),g=Uf(o||document),y=(a||[]).map(b=>String(b)).sort().join("|");return`fonts-embed-css::req=${f}::ex=${d}::lf=${h}::px=${m}::fd=${p}::doc=${g}::cp=${c}::n=${u}::ic=${y}::env=${l}`}async function ao(t,e,n,r){let i=r.doc?.defaultView||window;if(t.disabled||t.media?.mediaText&&!i.matchMedia(t.media.mediaText).matches)return;let o;try{o=t.cssRules||[]}catch{return}let s=(a,l)=>{try{return new URL(a,l||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let l=a.href?s(a.href,e):e;if(r.depth>=zn){console.warn(`[SnapDOM] Too many nested @import rules in ${l}; stopped at ${zn} levels.`);continue}if(l&&r.visitedSheets.has(l)){console.warn(`[SnapDOM] Skipped an @import that loops back: ${l}`);continue}l&&r.visitedSheets.add(l);let f={...r,depth:(r.depth||0)+1};await ao(a.styleSheet,l,n,f);continue}if(a.cssRules?.length){if(a.type===CSSRule.MEDIA_RULE&&!i.matchMedia(a.conditionText).matches||a.type===CSSRule.SUPPORTS_RULE&&!i.CSS.supports(a.conditionText))continue;await ao(a,e,n,r);continue}if(a.type===CSSRule.FONT_FACE_RULE){let l=(a.style.getPropertyValue("font-family")||"").trim(),f=lo(l);if(!f||It(f,r.iconMatchers))continue;let c=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),d=(a.style.getPropertyValue("font-stretch")||"").trim(),h=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),p=(a.style.getPropertyValue("unicode-range")||"").trim(),g=c||"400",y=u||"normal",b=d||"100%",w=(u?`font-style:${u};`:"")+(c?`font-weight:${c};`:"")+(d?`font-stretch:${d};`:"")+(h?`font-variation-settings:${h};`:"")+(p?`unicode-range:${p};`:""),x=r.faceMatchesRequired(f,y,g,b);if(!x&&!r.requiredIndex.has(f.toLowerCase()))continue;let C=Ps(p);if(!$s(r.usedCodepoints,C))continue;let S={family:f,weightSpec:g,styleSpec:y,stretchSpec:b,unicodeRange:p,srcRaw:m,srcUrls:co(m,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(S,C))continue;if(!x){r.provisionalFaces.push({family:f.toLowerCase(),block:`@font-face{font-family:${f};src:${m};${w}}`,srcRaw:m,baseHref:e||location.href});continue}r.coveredFamilies.add(f.toLowerCase());let k=`"${String(f).replace(/^\s*["']|["']\s*$/g,"").replace(/(["\\])/g,"\\$1")}"`;if(/url\(/i.test(m)){let E=await so(m,e||location.href,r.useProxy);await n(`@font-face{font-family:${k};src:${E};${w}}`)}else await n(`@font-face{font-family:${k};src:${m};${w}}`)}}}async function Ns({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:i="",fontStylesheetDomains:o=[],iconMatchers:s=[],doc:a=document}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let l=new Map;for(let S of t){let[k,E,R,v]=String(S).split("__");if(!k)continue;let M=k.toLowerCase(),_=l.get(M)||[];_.push({w:parseInt(E,10),s:R,st:parseInt(v,10)}),l.set(M,_)}function f(S,k,E,R){let v=String(S).toLowerCase();if(!l.has(v))return!1;let M=l.get(v),_=Ff(E),T=Tf(k),$=Pf(R),N=_.min!==_.max,F=_.min,A=O=>T.kind==="normal"&&O==="normal"||T.kind!=="normal"&&(O==="italic"||O==="oblique"),L=!1;for(let O of M){let P=N?O.w>=_.min&&O.w<=_.max:O.w===F,z=A(Un(O.s)),q=O.st>=$.min&&O.st<=$.max;if(P&&z&&q){L=!0;break}}if(L)return!0;if(!N)for(let O of M){let P=A(Un(O.s)),z=O.st>=$.min&&O.st<=$.max;if(Math.abs(F-O.w)<=300&&P&&z)return!0}if(!N&&T.kind==="normal"&&M.some(P=>Un(P.s)!=="normal"))for(let P of M){let z=Math.abs(F-P.w)<=300,q=P.st>=$.min&&P.st<=$.max;if(z&&q)return!0}return!1}let c=As(n);Re(a),Nt();let u=zf(t,n,r,i,o,a,e,s,Re(a));if(D.resource?.has(u))return D.resource.get(u);let d=Lf(t),h=[],m=Fs;for(let S of a.querySelectorAll("style")){let k=S.textContent||"";for(let E of k.matchAll(m)){let R=(E[2]||E[4]||"").trim();if(!R||io(R,s))continue;a.querySelector(`link[rel="stylesheet"][href="${R}"]`)||h.push(R)}}let p=[];h.length&&await Promise.all(h.map(S=>new Promise(k=>{if(a.querySelector(`link[rel="stylesheet"][href="${S}"]`))return k(null);let E=a.createElement("link");E.rel="stylesheet",E.href=S,J(E),E.setAttribute("data-snapdom","injected-import");let R=setTimeout(()=>k(null),3e3),v=M=>{clearTimeout(R),k(M)};E.onload=()=>v(E),E.onerror=()=>v(null),a.head.appendChild(E),p.push(E)})));let g="",y=new Set,b=[],w=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(S=>!!S.href);for(let S of p)try{S.remove()}catch{}for(let S of w)try{if(io(S.href,s))continue;let k="",E=!1;try{E=new URL(S.href,location.href).origin===location.origin}catch{}if(!E){let v=Array.isArray(o)?o:[];if(!Nf(S.href,d,v))continue}if(E){let v=Array.from(a.styleSheets).find(M=>M.href===S.href);if(v)try{let M=v.cssRules||[];k=Array.from(M).map(_=>_.cssText).join("")}catch{}}if(!k){let v=await at(S.href,{as:"text",useProxy:i});v?.ok&&typeof v.data=="string"&&(k=v.data)}k=await If(k,S.href,i);let R="";for(let v of k.match(Of)||[]){let M=Ft(v,"font-family"),_=lo(M);if(!_||It(_,s))continue;let T=Ft(v,"font-weight","400"),$=Ft(v,"font-style","normal"),N=Ft(v,"font-stretch","100%"),F=Ft(v,"unicode-range"),A=Ft(v,"src"),L=co(A,S.href),O=f(_,$,T,N);if(!O&&!l.has(_.toLowerCase()))continue;let P=Ps(F);if(!$s(e,P))continue;let z={family:_,weightSpec:T,styleSpec:$,stretchSpec:N,unicodeRange:F,srcRaw:A,srcUrls:L,href:S.href};if(n&&c(z,P))continue;if(!O){b.push({family:_.toLowerCase(),block:v,srcRaw:A,baseHref:S.href});continue}y.add(_.toLowerCase());let q=/url\(/i.test(A)?await so(v,S.href,i):v;R+=q}R.trim()&&(g+=R)}catch{console.warn("[SnapDOM] Couldn't read stylesheet:",S.href)}let x={doc:a,requiredIndex:l,usedCodepoints:e,faceMatchesRequired:f,coveredFamilies:y,provisionalFaces:b,simpleExcluder:n?As(n):null,useProxy:i,iconMatchers:s,visitedSheets:new Set,depth:0},C=new Set([...a.styleSheets,...a.adoptedStyleSheets||[]]);for(let S of C)if(!(S.href&&w.some(k=>k.href===S.href)))try{let k=S.href||a.baseURI||location.origin+"/";k&&x.visitedSheets.add(k),await ao(S,k,async E=>{g+=E},x)}catch{}for(let S of b)y.has(S.family)||(g+=/url\(/i.test(S.srcRaw)?await so(S.block,S.baseHref,i):S.block);try{for(let S of a.fonts||[]){if(!S||!S.family||S.status!=="loaded"||!S._snapdomSrc)continue;let k=String(S.family).replace(/^['"]+|['"]+$/g,"");if(It(k,s)||!l.has(k.toLowerCase())||n?.families&&n.families.some(R=>String(R).toLowerCase()===k.toLowerCase()))continue;let E=S._snapdomSrc;if(!String(E).startsWith("data:"))if(D.resource?.has(S._snapdomSrc))E=D.resource.get(S._snapdomSrc);else try{let R=await at(S._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(R.ok&&typeof R.data=="string")E=R.data,D.resource?.set(S._snapdomSrc,E);else continue}catch{console.warn("[SnapDOM] Couldn't load font file:",S._snapdomSrc);continue}g+=`@font-face{font-family:'${k}';src:url(${E});font-style:${S.style||"normal"};font-weight:${S.weight||"normal"};}`}}catch{}for(let S of r){if(!S||typeof S!="object")continue;let k=String(S.family||"").replace(/^['"]+|['"]+$/g,"");if(!k||It(k,s)||!l.has(k.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===k.toLowerCase()))continue;let E=S.weight!=null?String(S.weight):"normal",R=S.style!=null?String(S.style):"normal",v=S.stretchPct!=null?`${S.stretchPct}%`:"100%",M=String(S.src||""),_=M;if(!_.startsWith("data:"))if(D.resource?.has(M))_=D.resource.get(M);else try{let T=await at(M,{as:"dataURL",useProxy:i,silent:!0});if(T.ok&&typeof T.data=="string")_=T.data,D.resource?.set(M,_);else continue}catch{console.warn("[SnapDOM] Couldn't load font file from localFonts:",M);continue}g+=`@font-face{font-family:'${k}';src:url(${_});font-style:${R};font-weight:${E};font-stretch:${v};}`}return g&&(g=Wf(g),D.resource?.set(u,g)),g}function Hn(t,e){let n=new Set,r=new Set;if(!t)return{required:n,usedCodepoints:r};let i=c=>{if(c)for(let u of c)r.add(u.codePointAt(0))},o=c=>{let u=Ef(c.fontFamily);if(u.length)for(let d of u)n.add(`${d}__${Bn(c.fontWeight)}__${Un(c.fontStyle)}__${Rf(c.fontStretch)}`)},s=te(t),a=t.getRootNode(),l=c=>{o(I(c));let u=c.getRootNode()===a?s:te(c);for(let d of["::before","::after"]){let h=d==="::before"?u.before:u.after;if(h!==null){if(h==="")continue;try{if(!c.matches(h))continue}catch{}}let m=I(c,d),p=m&&m.content;if(!(!p||p==="none"||p==="normal"))if(o(m),/^["']/.test(p))i(p.slice(1,-1));else{let g=p.match(/\\[0-9A-Fa-f]{1,6}/g);if(g)for(let y of g)try{r.add(parseInt(y.slice(1),16))}catch{}}}},f=[t];for(let c=0;c<f.length;c++){let u=f[c];u.nodeType===Node.ELEMENT_NODE&&l(u),u.shadowRoot&&f.push(u.shadowRoot);let d=(t.ownerDocument||document).createTreeWalker(u,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;d.nextNode();){let h=d.currentNode;if(h.nodeType===Node.TEXT_NODE){if(e&&h.parentElement&&!e(h.parentElement))continue;i(h.nodeValue||"")}else{if(e&&!e(h))continue;l(h),h.shadowRoot&&f.push(h.shadowRoot)}}}return{required:n,usedCodepoints:r}}async function jn(t,e=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(t||[]).filter(Boolean);if(r.length===0)return;let i=()=>{let o=n.createElement("div");J(o),o.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let s of r){let a=n.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${s}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",o.appendChild(a)}n.body.appendChild(o),o.offsetWidth,n.body.removeChild(o)};for(let o=0;o<Math.max(1,e);o++)i(),await St(),await St()}At();function Ds(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Ls(t,e=!1){let n="",r=Math.max(1,t);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return e?n.toUpperCase():n}function Is(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,t)),i="";for(let[o,s]of n)for(;r>=o;)i+=s,r-=o;return e?i:i.toLowerCase()}function Os(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(t);case"decimal-leading-zero":{let n=Math.abs(t);return(t<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":case"lower-latin":return Ls(t,!1);case"upper-alpha":case"upper-latin":return Ls(t,!0);case"lower-roman":return Is(t,!1);case"upper-roman":return Is(t,!0);default:return String(t)}}function hn(t,e){let n=(t||"").trim().split(/[\s,]+/).filter(Boolean),r=[];for(let i=0;i<n.length;i++){let o=n[i];if(o==="none")continue;let s=n[i+1],a=s!==void 0&&Number.isFinite(Number(s));r.push([o,a?Number(s):e]),a&&i++}return r}function Ws(t){let e=new WeakMap,n=$r(t)?t.documentElement:t,r=f=>f&&f.tagName==="LI",i=new WeakMap,o=f=>{let c=new Map;for(let[u,d]of f)c.set(u,d.slice());return c},s=(f,c,u)=>{let d=o(f),h;try{h=getComputedStyle(u)}catch{h=u.style}let m;try{m=h?.counterReset}catch{}if(m&&m!=="none")for(let[y,b]of hn(m,0)){let w=c.get(y);if(w&&w.length){let x=w.slice();x.push(b),d.set(y,x)}else d.set(y,[b])}let p;try{p=h?.counterSet}catch{}if(p&&p!=="none")for(let[y,b]of hn(p,0)){let w=d.get(y)||[];w.length===0&&w.push(0),w[w.length-1]=b,d.set(y,w)}let g;try{g=h?.counterIncrement}catch{}if(g&&g!=="none")for(let[y,b]of hn(g,1)){let w=d.get(y)||[];w.length===0&&w.push(0),w[w.length-1]+=b,d.set(y,w)}try{if(h?.display==="list-item"&&r(u)){let y=u.parentElement,b=y&&i.get(y),w=y?.tagName==="OL"?parseInt(y.getAttribute("start"),10):NaN,x=b===void 0?Number.isFinite(w)?w:1:b+1,C=y?.tagName==="OL"?parseInt(u.getAttribute("value"),10):NaN;Number.isFinite(C)&&(x=C),y&&i.set(y,x);let S=d.get("list-item")||[];S.length===0&&S.push(0),S[S.length-1]=x,d.set("list-item",S)}}catch{}return d},a=(f,c,u)=>{let d=s(u,c,f);e.set(f,d);let h=d;for(let p of f.children)h=a(p,d,h);let m=new Map;for(let[p,g]of u){let y=g.length,b=h.get(p);m.set(p,b&&b.length?b.slice(0,y):g.slice())}for(let[p,g]of h)!m.has(p)&&g.length&&!c.has(p)&&m.set(p,g.slice(0,1));return m},l=new Map;return a(n,l,l),{get(f,c){let u=e.get(f)?.get(c);return u&&u.length?u[u.length-1]:0},getStack(f,c){let u=e.get(f)?.get(c);return u?u.slice():[]}}}function Bs(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return t.replace(r,(i,o,s)=>{let a=String(s).split(",").map(l=>l.trim());if(o==="counter"){let l=a[0]?.replace(/^["']|["']$/g,""),f=(a[1]||"decimal").toLowerCase(),c=n.get(e,l);return Os(c,f)}else{let l=a[0]?.replace(/^["']|["']$/g,""),f=a[1]?.replace(/^["']|["']$/g,"")??"",c=(a[2]||"decimal").toLowerCase(),u=n.getStack(e,l);return u.length?u.map(h=>Os(h,c)).join(f):""}})}catch{return"- "}}le();var Oe=new WeakMap,Us=1e3;function Hf(t,e){let n=Vs(t);return e?(e.__pseudoPreflightFp!==n&&(Nt(),e.__pseudoPreflight=zs(t,n),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):(Nt(),zs(t,n))}function Vn(t){try{return t&&t.cssRules?t.cssRules:null}catch{return null}}function Vs(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let s=0;s<e.length;s++){let a=e[s];if(a.tagName==="STYLE"){let l=a.textContent?a.textContent.length:0;n+=`S${l}|`;let f=a.sheet,c=f?Vn(f):null;c&&(r+=c.length)}else{let l=a.getAttribute("href")||"",f=a.getAttribute("media")||"all";n+=`L${l}|m:${f}|`;let c=a.sheet,u=c?Vn(c):null;u&&(r+=u.length)}}let i=t.adoptedStyleSheets,o=0;if(Array.isArray(i))for(let s of i){let a=Vn(s);a&&(o+=a.length)}return n+=`ass:${Array.isArray(i)?i.length:0}/${o}|tr:${r}`,n}function fo(t,e,n){let r=Vn(t);if(!r)return!1;for(let i=0;i<r.length;i++){if(n.budget<=0)return!1;let o=r[i],s=o&&o.cssText?o.cssText:"";n.budget--;for(let a of e)if(s.includes(a))return!0;if(o&&o.styleSheet&&fo(o.styleSheet,e,n))return!0;if(o&&o.cssRules&&o.cssRules.length)for(let a=0;a<o.cssRules.length&&n.budget>0;a++){let l=o.cssRules[a],f=l&&l.cssText?l.cssText:"";n.budget--;for(let c of e)if(f.includes(c))return!0}if(n.budget<=0)return!1}return!1}function zs(t=document,e=Vs(t)){let n=Oe.get(t);if(n&&n.fingerprint===e)return n.result;let r=a=>(a.match(/\|ass:[^|]*/)||[""])[0];n&&r(e)!==r(n.fingerprint)&&Fe();let i=["::before","::after","::first-letter","::marker","::first-line",":before",":after",":first-letter",":first-line","counter(","counters(","counter-increment","counter-reset"],o=t.querySelectorAll("style");for(let a=0;a<o.length;a++){let l=o[a].textContent||"";for(let f of i)if(l.includes(f))return Oe.set(t,{fingerprint:e,result:!0}),!0}let s=t.adoptedStyleSheets;if(Array.isArray(s)&&s.length){let a={budget:Us};try{for(let l of s)if(fo(l,i,a))return Oe.set(t,{fingerprint:e,result:!0}),!0}catch{}}{let a=t.querySelectorAll('style,link[rel~="stylesheet"]'),l={budget:Us};for(let f=0;f<a.length&&l.budget>0;f++){let c=a[f],u=null;if(c.tagName,u=c.sheet||null,u&&fo(u,i,l))return Oe.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(Oe.set(t,{fingerprint:e,result:!0}),!0):(Oe.set(t,{fingerprint:e,result:!1}),!1)}function Hs(t){for(let e of["Top","Right","Bottom","Left"]){let n=parseFloat(t[`border${e}Width`])||0,r=t[`border${e}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function jf(t,e){let n=null,r=()=>{if(!n)try{n=Ws(t)}catch(i){j(e,"Couldn't compute CSS counters; list numbers may be off.",i),n={get:()=>0,getStack:()=>[]}}return n};return{get(i,o){return r().get(i,o)},getStack(i,o){return r().getStack(i,o)}}}function Vf(t){let e=!1;for(let n=0;n<t.length;n++){let r=t[n];if(r==='"')e=!e;else if(r==="/"&&!e)return t.slice(0,n).trim()}return t}function qf(t){return t.replace(/\\(?:([0-9a-fA-F]{1,6})[ \t\n]?|([\s\S]))/g,(e,n,r)=>{if(n){let i=parseInt(n,16);return i===0||i>1114111?"\uFFFD":String.fromCodePoint(i)}return r===`
|
|
16
|
-
`?"":r})}function Gf(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,r=0,i;for(;i=n.exec(t);){let s=t.slice(r,i.index).trim();s&&e.push(s),e.push(qf(i[1]!==void 0?i[1]:i[2])),r=n.lastIndex}let o=t.slice(r).trim();return o&&e.push(o),e.join("")}function uo(t,e,n){let r=t.parentElement,i=r&&n?n.get(r):null;return i?{get(o,s){let a=e.get(o,s),l=i.get(s);return typeof l=="number"?Math.max(a,l):a},getStack(o,s){let a=e.getStack(o,s);if(!a.length)return a;let l=i.get(s);if(typeof l=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],l),f}return a}}:e}function po(t,e,n){let r=new Map,i=(f,c)=>hn(f,c).map(([u,d])=>({name:u,num:d})),o=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function l(f){if(r.has(f))return r.get(f).slice();let c=n.getStack(t,f);c=c.length?c.slice():[];let u=o.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;c=c.length?[...c,m]:[m]}let d=s.find(m=>m.name===f);if(d){let m=Number.isFinite(d.num)?d.num:0;c.length===0&&(c=[0]),c[c.length-1]=m}let h=a.find(m=>m.name===f);if(h){let m=Number.isFinite(h.num)?h.num:1;c.length===0&&(c=[0]),c[c.length-1]+=m}return r.set(f,c.slice()),c}return{get(f,c){let u=l(c);return u.length?u[u.length-1]:0},getStack(f,c){return l(c)},__incs:a}}var Xf=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],Yf=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function js(t,e,n,r,i,o){try{if(r===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=I(t).display||"";if(i==="::marker"?!u.includes("list-item"):!(u==="block"||u==="flow-root"||u==="list-item"||u==="inline-block"||u==="table-cell"||u==="table-caption"))return}else if(!t.matches(r))return;if(i==="::marker"&&!(I(t).display||"").includes("list-item"))return;let s=I(t,i),a=I(t);if(!s)return;let l="";for(let u of o){let d=s.getPropertyValue(u);d&&d!==a.getPropertyValue(u)&&!(u==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&d==="baseline")&&(l+=`${u}:${d};`)}if(i==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(l+=`content:${u};`)}if(!l)return;let c=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(c,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${c}]${i}{${l}}`}catch{}}function Kf(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",r="\u201D";try{let i=I(e).quotes;if(i==="none")n="",r="";else if(i&&i!=="auto"){let o=i.match(/"[^"]*"|'[^']*'/g);o&&o.length>=2&&(n=o[0].slice(1,-1),r=o[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),r=r.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,o)=>o?o==="open-quote"?`"${n}"`:o==="close-quote"?`"${r}"`:'""':i)}function Qf(t,e,n,r){let i;try{i=I(t,e)}catch{}let o=i?.content;if(!o||o==="none"||o==="normal")return{text:"",incs:[]};o=Vf(o),o=Kf(o,t);let s=uo(t,n,r),a=po(t,i,s),l=Ds(o)?Bs(o,t,a):o;return{text:Gf(l),incs:a.__incs||[]}}function Zf(t,e){if(e.__shadowPseudo)return!1;let n=te(t),r=[];for(let o of["before","after","firstLetter","marker","firstLine"]){let s=n[o];if(s===null)return!1;s&&r.push(s)}if(!r.length)return!0;let i=r.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function De(t,e,n,r,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let o=t.ownerDocument||document;if(!i&&!Hf(o,n)&&!n.__shadowPseudo||!i&&Zf(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=jf(t.ownerDocument||document,n));let s=n.__counterCtx,a=te(t);a.marker!==""&&js(t,e,n,a.marker,"::marker",Xf),a.firstLine!==""&&js(t,e,n,a.firstLine,"::first-line",Yf);for(let f of["::before","::after","::first-letter"]){let c=a[f==="::before"?"before":f==="::after"?"after":"firstLetter"];if(c!==null){if(c==="")continue;try{if(!t.matches(c))continue}catch{}}try{let u=I(t,f);if(!u||u.content==="none"&&u.backgroundImage==="none"&&(u.backgroundColor==="transparent"||u.backgroundColor==="rgba(0, 0, 0, 0)")&&!Hs(u)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(u.display==="none"||f!=="::first-letter"&&(u.content==="none"||u.content==="normal")){f==="::before"&&(e.dataset.snapdomHasBefore="1"),f==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(f==="::first-letter"){let V=I(t),G=(V?.display||"").toLowerCase();if(G.includes("flex")||G.includes("grid"))continue;let H=Vt=>u[Vt]!==V[Vt]&&(parseFloat(u[Vt])||0)!==0;if(!(u.color!==V.color||u.fontSize!==V.fontSize||u.fontWeight!==V.fontWeight||u.fontFamily!==V.fontFamily||u.fontStyle!==V.fontStyle||u.textTransform!==V.textTransform||u.float!==V.float&&u.float!=="none"||H("paddingTop")||H("paddingRight")||H("paddingBottom")||H("paddingLeft")||H("marginTop")||H("marginRight")||H("marginBottom")||H("marginLeft")))continue;let K=Array.from(e.childNodes).find(Vt=>Vt.nodeType===Node.TEXT_NODE&&Vt.textContent?.trim().length>0);if(!K)continue;let kt=K.textContent,Se=/^\s*/.exec(kt)[0],xn=kt.slice(Se.length),Ke=xn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],Mr=xn.slice(Ke?.length||0);if(!Ke||/[\uD800-\uDFFF]/.test(Ke))continue;let jt=document.createElement("span");jt.textContent=Ke,jt.dataset.snapdomPseudo="::first-letter";let Ar=Me(u,En(t)),_r=ke(Ar,"span");n.styleMap.set(jt,_r);let vn=document.createTextNode(Mr);e.replaceChild(vn,K),e.insertBefore(jt,vn),Se&&e.insertBefore(document.createTextNode(Se),jt);continue}let m=u.content??"",p=m===""||m==="none"||m==="normal",{text:g,incs:y}=Qf(t,f,s,n.__siblingCounters),b=u.backgroundImage,w=u.backgroundColor,x=u.fontFamily,C=parseInt(u.fontSize)||32,S=parseInt(u.fontWeight)||!1,k=u.fontStyle||"normal",E=u.color||"#000",R=u.transform,v=It(x,r?.__iconMatchers),M=!p&&g!=="",_=b&&b!=="none",T=w&&w!=="transparent"&&w!=="rgba(0, 0, 0, 0)",$=Hs(u),N=R&&R!=="none",F=m!=="none"&&m!=="normal",A=/^inline-/.test(u.display||""),L=F&&((parseFloat(u.width)||0)>0||(parseFloat(u.height)||0)>0||A),O=F&&u.boxShadow&&u.boxShadow!=="none",P=F&&u.outlineStyle&&u.outlineStyle!=="none"&&(parseFloat(u.outlineWidth)||0)>0;if(!(M||_||T||$||N||L||O||P)){if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:G}of y){if(!G)continue;let H=uo(t,s,n.__siblingCounters),K=po(t,I(t,f),H).get(t,G);V.set(G,K)}n.__siblingCounters.set(t.parentElement,V)}continue}let q=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),U=u.display==="inline"&&u.cssFloat==="none"&&u.position!=="absolute"&&u.position!=="fixed",Y=!1;if(M&&!v&&g.length>1&&!q&&U){let V=I(t),G=parseFloat(V.fontSize)||16,H=parseFloat(V.lineHeight);Number.isFinite(H)||(H=G*1.5),t.getBoundingClientRect().height<H*1.6&&(e.style.whiteSpace="nowrap",Y=!0)}let B=document.createElement("span");B.dataset.snapdomPseudo=f,B.style.pointerEvents="none",Y&&(B.style.whiteSpace="nowrap");let dt=Hi(t,f,u,n,r),pt=(I(t).display||"").toLowerCase(),nt=pt.includes("flex")||pt.includes("grid");if(nt){let V=dt["min-width"];(!V||V==="auto"||V==="0px")&&(dt["min-width"]="0px")}let st=M;st&&!U&&parseFloat(u.height)>=1.5*(parseFloat(u.lineHeight)||(parseFloat(u.fontSize)||16)*1.2)&&(st=!1,B.style.whiteSpace=u.whiteSpace);let yt=ke(dt,"span",st,nt);if(n.styleMap.set(B,yt),v&&g&&g.length===1){let{dataUrl:V,width:G,height:H}=await Es(g,x,S,C,E,k),ht=document.createElement("img");ht.src=V,ht.style=`height:${C}px;width:${G/H*C}px;object-fit:contain;`,B.appendChild(ht),e.dataset.snapdomHasIcon="true"}else if(g&&q){let V=Ze(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ae(g);if(V?.trim())try{let G=await at(Gt(V),{as:"dataURL",useProxy:r.useProxy});if(G?.ok&&typeof G.data=="string"){let H=document.createElement("img");H.src=G.data,H.style=`width:${C}px;height:auto;object-fit:contain;`,B.appendChild(H)}}catch(G){console.warn(`[SnapDOM] Couldn't draw the ${f} icon of`,t,G)}}else!v&&M&&(B.textContent=g);B.style.backgroundImage="none","maskImage"in B.style&&(B.style.maskImage="none"),"webkitMaskImage"in B.style&&(B.style.webkitMaskImage="none");try{B.style.backgroundRepeat=u.backgroundRepeat,B.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(B.style.backgroundPositionX=u.backgroundPositionX,B.style.backgroundPositionY=u.backgroundPositionY):B.style.backgroundPosition=u.backgroundPosition,B.style.backgroundOrigin=u.backgroundOrigin,B.style.backgroundClip=u.backgroundClip,B.style.backgroundAttachment=u.backgroundAttachment,B.style.backgroundBlendMode=u.backgroundBlendMode}catch{}if(_)try{let V=Yt(b),G=await Promise.all(V.map(H=>ve(H,r)));B.style.backgroundImage=G.join(", ")}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} background image.`,V)}T&&(B.style.backgroundColor=w);let bt=u.maskImage||u.webkitMaskImage;if(bt&&bt!=="none")try{let G=(await Promise.all(Yt(bt).map(H=>ve(H,r)))).join(", ");B.style.maskImage=G,B.style.webkitMaskImage=G;for(let H of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])u[H]&&(B.style[H]=u[H])}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} mask image.`,V)}let Dt=B.childNodes.length>0||B.textContent?.trim()!==""||_||T||$||N||L||O||P;if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map,G=uo(t,s,n.__siblingCounters),H=po(t,I(t,f),G);for(let{name:ht}of y){if(!ht)continue;let K=H.get(t,ht);V.set(ht,K)}n.__siblingCounters.set(t.parentElement,V)}if(!Dt)continue;f==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(B,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(B))}catch(u){console.warn(`[SnapDOM] Couldn't copy the ${f} of`,t,u)}}let l=Array.from(e.children).filter(f=>!f.dataset.snapdomPseudo);if(n.nodeMap)for(let f of l){let c=n.nodeMap.get(f);c?.nodeType===1&&await De(c,f,n,r,!0)}else{let f=Array.from(t.children);for(let c=0;c<Math.min(f.length,l.length);c++)await De(f[c],l[c],n,r,!0)}}At();function qs(t,e,n){if(!t||t?.nodeType!==1)return;let r=t.ownerDocument||document,i=e||r,o=Tt(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],l=S=>window.CSS&&CSS.escape?CSS.escape(S):S.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",c=S=>{if(!S||!S.getAttribute)return null;let k=S.getAttribute("href")||S.getAttribute("xlink:href")||(typeof S.getAttributeNS=="function"?S.getAttributeNS(f,"href"):null);if(k)return k;let E=S.attributes;if(!E)return null;for(let R=0;R<E.length;R++){let v=E[R];if(!v||!v.name)continue;if(v.name==="href")return v.value;let M=v.name.indexOf(":");if(M!==-1&&v.name.slice(M+1)==="href")return v.value}return null},u=new Set(Array.from(t.querySelectorAll("[id]")).map(S=>S.id)),d=new Set,h=!1,m=(S,k=null)=>{if(!S)return;s.lastIndex=0;let E;for(;E=s.exec(S);){h=!0;let R=(E[1]||"").trim();R&&(u.has(R)||(d.add(R),k&&!k.has(R)&&k.add(R)))}},p=S=>{let k=S.querySelectorAll("use");for(let v of k){let M=c(v);if(!M||!M.startsWith("#"))continue;h=!0;let _=M.slice(1).trim();_&&!u.has(_)&&d.add(_)}let E='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(S.getAttribute("style")||"");for(let v of a)m(S.getAttribute(v));let R=S.querySelectorAll(E);for(let v of R){m(v.getAttribute("style")||"");for(let M of a)m(v.getAttribute(M))}},g=S=>{if(!S||S.nodeType!==1||!S.querySelectorAll)return;let k="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",E=!1;try{E=!!(i.querySelector&&i.querySelector(k))}catch{return}if(!E)return;let R=["filter","clipPath","mask","maskImage","webkitMaskImage"],v=M=>{if(Tt(M))return;let _;try{_=getComputedStyle(M)}catch{return}for(let T of R){let $=_[T];$&&$.includes("url(")&&m($)}};v(S);for(let M of S.querySelectorAll("*"))v(M)};for(let S of o)p(S);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=r.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,w=S=>{if(!S||u.has(S))return null;let k=l(S),E=R=>{let v=i.querySelector(R);return v&&!t.contains(v)?v:null};return E(`svg defs > *#${k}`)||E(`svg > symbol#${k}`)||E(`*#${k}`)};if(!d.size)return;let x=new Set(d),C=new Set;for(;x.size;){let S=x.values().next().value;if(x.delete(S),!S||u.has(S)||C.has(S))continue;let k=w(S);if(!k){C.add(S);continue}b||(b=r.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let E=k.cloneNode(!0);E.id||E.setAttribute("id",S),b.appendChild(E),C.add(S),u.add(S);let R=[E,...E.querySelectorAll("*")];for(let v of R){let M=c(v);if(M&&M.startsWith("#")){let T=M.slice(1).trim();T&&!u.has(T)&&!C.has(T)&&x.add(T)}let _=v.getAttribute?.("style")||"";_&&m(_,x);for(let T of a){let $=v.getAttribute?.(T);$&&m($,x)}}}}At();var ho=new WeakMap,mo=new WeakMap;function qn(t,e,n){let r=n.get(t),i=t.style;if(!r){let s=i.cssText,a=t.hasAttribute("style");r={users:0,saved:e.map(([f,c])=>{let u={property:f,value:i.getPropertyValue(f),priority:i.getPropertyPriority(f)};return i.setProperty(f,c,"important"),u.forcedValue=i.getPropertyValue(f),u}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,r)}r.users++;let o=!1;return()=>{if(!o&&(o=!0,!--r.users)){if(n.delete(t),i.cssText===r.forcedCSS)i.cssText=r.originalCSS;else for(let s of r.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!r.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function Gs(t){if(ho.has(t))return qn(t,[],ho);let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,i=n!=="none"&&parseFloat(r)>0,o=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&o){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,r],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return qn(t,s,ho)}return()=>{}}function Gn(t,e=null){let n=[],r=i=>{if(!Mt(i))return;if(mo.has(i)){n.push(qn(i,[],mo));return}let o=getComputedStyle(i);(o.contentVisibility||o.getPropertyValue("content-visibility")||"")==="auto"&&n.push(qn(i,[["content-visibility","visible"]],mo))};try{if(e){let o=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){r(s);for(let l=s.firstElementChild;l;l=l.nextElementSibling)o(l)}};o(t)}else{for(let i of t.querySelectorAll("*"))r(i);r(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}vt();wt();_t();Ae();_t();function yo(t){return Ys(t.boxShadow)}function bo(t){return Ys(t.textShadow)}function Ys(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",r=0;for(let l=0;l<t.length;l++){let f=t[l];f==="("?r++:f===")"&&(r=Math.max(0,r-1)),f===","&&r===0?(e.push(n),n=""):n+=f}n.trim()&&e.push(n);let i=0,o=0,s=0,a=0;for(let l of e){if(/\binset\b/i.test(l))continue;let f=l.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(f.length<2)continue;let[c,u,d=0,h=0]=f,m=Math.abs(c)+d+h,p=Math.abs(u)+d+h;o=Math.max(o,m+Math.max(c,0)),a=Math.max(a,m+Math.max(-c,0)),s=Math.max(s,p+Math.max(u,0)),i=Math.max(i,p+Math.max(-u,0))}return{top:Math.ceil(i),right:Math.ceil(o),bottom:Math.ceil(s),left:Math.ceil(a)}}function wo(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,i;for(;i=n.exec(e);)r+=parseFloat(i[1])||0;let o=Math.ceil(r*2);return{top:o,right:o,bottom:o,left:o}}function So(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,r=e+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function xo(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,i=0,o=0,s=0,a=!1;for(let l of n){a=!0;let f=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(p=>parseFloat(p))||[],[c=0,u=0,d=0]=f,h=Math.abs(c)+d,m=Math.abs(u)+d;i=Math.max(i,h+Math.max(c,0)),s=Math.max(s,h+Math.max(-c,0)),o=Math.max(o,m+Math.max(u,0)),r=Math.max(r,m+Math.max(-u,0))}return{bleed:{top:W(r),right:W(i),bottom:W(o),left:W(s)},has:a}}function Jf(t){let e=yo(t),n=bo(t),r=wo(t),i=So(t),o=xo(t);return{top:Math.max(e.top,n.top)+r.top+i.top+o.bleed.top,right:Math.max(e.right,n.right)+r.right+i.right+o.bleed.right,bottom:Math.max(e.bottom,n.bottom)+r.bottom+i.bottom+o.bleed.bottom,left:Math.max(e.left,n.left)+r.left+i.left+o.bleed.left}}function tu(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function Xs(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",r=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:r||e!=="visible",y:r||n!=="visible"}}function Ks(t,e,n,r=1,i=1){let o=0,s=0,a=0,l=0,f=Xs(n.get(t)||I(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let c=t.getBoundingClientRect();for(let u of e.values()){if(u===t||u.nodeType!==1||u.ownerDocument!==t.ownerDocument)continue;let d=n.get(u);if(!d||!tu(d))continue;let h=Jf(d);if(!(h.top||h.right||h.bottom||h.left))continue;let m=u.getBoundingClientRect(),p={left:m.left-h.left/r,top:m.top-h.top/i,right:m.right+h.right/r,bottom:m.bottom+h.bottom/i};for(let g=u.parentElement;g;g=g.parentElement){let y=Xs(n.get(g)||I(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(p.left=Math.max(p.left,b.left),p.right=Math.min(p.right,b.right)),y.y&&(p.top=Math.max(p.top,b.top),p.bottom=Math.min(p.bottom,b.bottom))}if(g===t)break}f.x||(l=Math.max(l,(c.left-p.left)*r),s=Math.max(s,(p.right-c.right)*r)),f.y||(o=Math.max(o,(c.top-p.top)*i),a=Math.max(a,(p.bottom-c.bottom)*i))}return{top:Math.max(0,Math.ceil(o)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(l))}}function Qs(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let l=null;try{l=he(t).scale}catch{}try{e.style.transform="none"}catch{}if(!l)return{a:1,b:0,c:0,d:1};let f=ne({scale:l});return{a:f.a,b:f.b,c:f.c,d:f.d}}function i(l,f,c,u){let d=Math.sqrt(l*l+f*f)||0,h=0,m=0;if(d>0){let p=l/d,g=f/d;h=p*c+g*u;let y=c-p*h,b=u-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:d,b:0,c:h*m,d:m}}let o=l=>{let f=he(t).scale;if(!f)return l;let c=ne({scale:f,baseTransform:`matrix(${l.a},${l.b},${l.c},${l.d},0,0)`});return{a:c.a,b:c.b,c:c.c,d:c.d}},s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let l=s[1].split(",").map(f=>parseFloat(f.trim()));if(l.length===6&&l.every(Number.isFinite)){let[f,c,u,d]=l,h=i(f,c,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let l=a[1].split(",").map(f=>parseFloat(f.trim()));if(l.length===16&&l.every(Number.isFinite)){let f=l[0],c=l[1],u=l[4],d=l[5],h=i(f,c,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}try{let l=new DOMMatrix(r),f=i(l.a,l.b,l.c,l.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return o(f)}catch{return null}}function We(t,e,n,r,i){let o=n.a,s=n.b,a=n.c,l=n.d,f=n.e||0,c=n.f||0;function u(y,b){let w=y-r,x=b-i,C=o*w+a*x,S=s*w+l*x;return C+=r+f,S+=i+c,[C,S]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],h=1/0,m=1/0,p=-1/0,g=-1/0;for(let[y,b]of d)y<h&&(h=y),b<m&&(m=b),y>p&&(p=y),b>g&&(g=b);return{minX:h,minY:m,maxX:p,maxY:g,width:p-h,height:g-m}}function mn(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,o]=[r[0]||"0",r[1]||"0"],s=(a,l)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?l/2:f==="right"||f==="bottom"?l:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*l/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(i,e),oy:s(o,n)}}function he(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},o=i("rotate");if(o)if(o.angle){let l=o.angle;e.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit,o.is2D===!1&&o.x&&o.y&&o.z&&(e.rotate=`${o.x.value} ${o.y.value} ${o.z.value} ${e.rotate}`)}else o.unit?e.rotate=o.unit==="rad"?o.value*180/Math.PI+"deg":o.value+o.unit:e.rotate=String(o);else{let l=getComputedStyle(t);e.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let s=i("scale");if(s){let l=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[l(s.x),l(s.y)??l(s.x),...s.is2D===!1?[l(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(l).join(" "):e.scale=String(s)}else{let l=getComputedStyle(t);e.scale=l.scale&&l.scale!=="none"?l.scale:null}let a=i("translate");if(a){let l=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[l(a.x),l(a.y)??"0px",...a.is2D===!1?[l(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(l).join(" "):e.translate=String(a)}else{let l=getComputedStyle(t);e.translate=l.translate&&l.translate!=="none"?l.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let r=getComputedStyle(t);return e.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",e.scale=r.scale&&r.scale!=="none"?r.scale:null,e.translate=r.translate&&r.translate!=="none"?r.translate:null,e}var go=null;function eu(){if(go?.isConnected)return go;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),J(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),go=t,t}function ne(t){let e=o=>{let s=[],a=0,l=0,f=String(o).trim();for(let c=0;c<f.length;c++)f[c]==="("?a++:f[c]===")"?a--:/\s/.test(f[c])&&!a&&(c>l&&s.push(f.slice(l,c)),l=c+1);return l<f.length&&s.push(f.slice(l)),s},n=o=>o&&o!=="none",r=[];if(n(t.translate)){let o=e(t.translate);for(let s=0;s<2&&s<o.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(o[s])&&Number.isFinite(a)&&(o[s]=`${parseFloat(o[s])*a/100}px`)}r.push(o.length>2?`translate3d(${o.join(",")})`:`translate(${o.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let o=e(t.rotate);o.length===4?r.push(`rotate3d(${o.join(",")})`):o.length===2&&/^[xyz]$/i.test(o[0])?r.push(`rotate${o[0].toUpperCase()}(${o[1]})`):r.push(`rotate(${o.join(" ")})`)}if(n(t.scale)){let o=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);r.push(o.length>2?`scale3d(${o.join(",")})`:`scale(${o.join(",")})`)}if(n(t.baseTransform)&&r.push(t.baseTransform),!r.length)return new DOMMatrix;let i=r.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let o=eu(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");o.appendChild(s);try{return nu(s)}finally{s.remove()}}}function Zs(t){let e=I(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",o=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||o||s)}function nu(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var na=new WeakSet;function Xn(t,e){if(!e)return null;let n=t.ownerDocument||document,r=n.defaultView||window,i,o,s,a;if(e==="viewport")i=0,o=0,s=n.documentElement?.clientWidth||r.innerWidth,a=n.documentElement?.clientHeight||r.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(r.scrollX||0),o=(Number(e.y)||0)-(r.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:o,width:s,height:a,right:i+s,bottom:o+a}:null}function vo(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Wt(e)?e.host:null}function ru(t,e){for(let n=e;n;n=vo(n))if(n===t)return!0;return!1}function ou(t,e){for(let n=vo(t);n&&n!==e&&n?.nodeType===1;n=vo(n)){let r=I(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function ko(t,e){try{return ne({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function ra(t,e,n,r,i){let o=t.getBoundingClientRect();Mt(e)&&I(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,l]of n){if(l?.nodeType!==1)continue;let f=a.localName==="svg"&&Tt(a)&&!Tt(l.parentNode);if(!Mt(a)&&!f||l===t||!ru(t,l))continue;let c=r.get(l)||I(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;na.add(a);let h=c.transform&&c.transform!=="none"?c.transform:"",m=he(l),p=!!(h||m.rotate!=="0deg"||m.scale||m.translate),g=p?ko(h,m):null,y=!g||!g.is2D||g.a===1&&g.b===0&&g.c===0&&g.d===1,b=d.width,w=d.height;y||(b=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let x=l.getRootNode&&Wt(l.getRootNode()),C=o,S=t.clientLeft||0,k=t.clientTop||0;if(x){let _=ou(l,t);_&&(C=_.getBoundingClientRect(),S=_.clientLeft||0,k=_.clientTop||0)}let E=d.left-C.left-S,R=d.top-C.top-k;if(p)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",y)a.style.transform="none";else{a.style.transform=`matrix(${g.a},${g.b},${g.c},${g.d},0,0)`;let{ox:_,oy:T}=mn(c,b,w),$=We(b,w,{a:g.a,b:g.b,c:g.c,d:g.d,e:0,f:0},_,T);E-=$.minX,R-=$.minY}if(u!=="fixed"){let _=a.cloneNode(!1);_.setAttribute("data-snap-ph","1"),_.style.position="static",_.style.visibility="hidden",_.style.width=`${b}px`,_.style.height=`${w}px`,_.style.boxSizing="border-box",a.parentElement?.insertBefore(_,a)}let v=f?b:b+2,M=w;i&&(Math.abs(R-i.y)<.5&&(R-=1,M+=1),Math.abs(E-i.x)<.5&&(E-=1,v+=1)),a.style.position="absolute",a.style.left=`${E}px`,a.style.top=`${R}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${v}px`,a.style.height=`${M}px`,a.style.boxSizing="border-box",x||s.push(a)}for(let a of s)e.appendChild(a)}function oa(t,e,n={}){if(!t||!e||!e.style)return;let r=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){j(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){j(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){j(n,"Couldn't remove the root outline.",s)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=o.length?o:"none"}catch(s){j(n,"Couldn't remove the root drop-shadow filter.",s)}}function ia(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function Js(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",r=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||r!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function iu(t,e){let n=Array.from(t.childNodes),r=e==="top"?n:n.reverse();for(let i of r){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let o=getComputedStyle(i),s=String(o.display||"");if(!(s==="none"||s==="contents")&&!(o.position==="absolute"||o.position==="fixed"))return o.float&&o.float!=="none"||s.startsWith("inline")?null:i}return null}function sa(t,e,n){if(!t||!e||!e.style)return;let r=getComputedStyle(t);if(!Js(r))for(let i of["top","bottom"]){let o=i==="top"?"Top":"Bottom";if((parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let l=iu(s,i);if(!l)break;let f=n?Array.from(a.children).find(d=>n.get(d)===l)||null:a.children[Array.from(s.children).indexOf(l)]||null,c=getComputedStyle(l),u=parseFloat(c[`margin${o}`])||0;if(f&&f.style&&u>0&&(f.style[`margin${o}`]="0px"),Js(c)||(parseFloat(c[`border${o}Width`])||0)>0||(parseFloat(c[`padding${o}`])||0)>0)break;s=l,a=f}}}var su=new Set(["xml","xlink"]);function au(t,e){if(t.startsWith("*")||t==="xmlns"||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!su.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var lu=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,ta=t=>t.replace(lu,e=>e.length===2?e:""),cu=/^data:[^,]{0,120};base64,/;function Yn(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,r=a=>{for(let l of Array.from(a.attributes)){if(au(l.name,n)){a.removeAttribute(l.name);continue}if(cu.test(l.value))continue;let f=ta(l.value);if(f!==l.value)try{a.setAttribute(l.name,f)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&r(t);let i=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=o.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)r(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=ta(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function fu(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var uu=new Set(["img","canvas","video","iframe","object","embed"]);function du(t){return Tt(t)||uu.has(t?.localName)}function pu(t,e){if(t?.nodeType!==1||fu(t)||du(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=e.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||e.transform&&e.transform!=="none")}function aa(t,e,n=new Map,r=null){function i(o,s){if(o?.nodeType!==1||s?.nodeType!==1)return;let a=o.childElementCount>s.childElementCount,l=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,l),a&&pu(o,l)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let c=l.overflowY||l.overflowBlock||"visible",u=l.overflowX||l.overflowInline||"visible";(c!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let f=Array.from(s.children);if(r)for(let c of f){let u=r.get(c);u&&u.nodeType===1&&i(u,c)}else{let c=Array.from(o.children);for(let u=0;u<Math.min(c.length,f.length);u++)i(c[u],f[u])}}i(t,e)}function hu(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function mu(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){j(e,"Invalid exclude selector; ignored.",r)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(r){j(e,"Your exclude function threw; ignored.",r)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){j(e,"Your filter function threw; ignored.",n)}return!1}function Mo(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),i=1/0,o=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(mu(h,e)||!hu(h))continue;let m=h.getBoundingClientRect(),p=m.top-r.top,g=m.bottom-r.top;g<=p||(p<i&&(i=p),g>o&&(o=g),s=!0)}let l=s?Math.max(0,o-i):0,f=parseFloat(n.borderTopWidth)||0,c=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return f+c+u+d+l}var W=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;function Ao(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let r of[n,...n.querySelectorAll("*")]){let i=r.localName.includes("-");if(!Mt(r)||!(i||r.hasAttribute("is")))continue;let o=e.createElement(i?"span":r.localName);for(let s of r.attributes)s.name!=="is"&&o.setAttribute(s.name,s.value);o.append(...r.childNodes),r===n?n=o:r.replaceWith(o)}return n}var Be=.75;function la(t,e,n,r,i,o){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),l=i>0&&a.width>0?a.width/i:1,f=o>0&&a.height>0?a.height/o:1;if(Math.abs(l-f)>.02)return 0;let c=s.createElement("div");J(c),c.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let u=c.attachShadow({mode:"open"}),d=s.createElement("style");d.textContent=n,u.appendChild(d);let h=Ao(e);u.appendChild(h),s.body.appendChild(c);let m=0,p=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],g=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],y=(b,w,x)=>{let C=I(b),S=C.boxSizing==="border-box",k=(E,R,v)=>{let M=parseFloat(E);if(!Number.isFinite(M))return R;let _=0;if(!S)for(let $ of v)_+=parseFloat(C[$])||0;let T=M+_;return Math.abs(T-R)<=.51?T:R};return{width:k(C.width,w,p),height:k(C.height,x,g)}};try{let b=h.getBoundingClientRect(),w=h.offsetWidth||i,x=h.offsetHeight||o,C=w>0&&b.width>0?b.width/w:1,S=x>0&&b.height>0?b.height/x:1,k=(E,R,v=!1)=>{let M=E.children,_=R.children,T=Math.min(M.length,_.length);for(let $=0;$<T;$++){let N=M[$],F=_[$],A=r.get(N),L=v||na.has(N);if(A?.nodeType===1&&Mt(N)&&N.style&&A.isConnected){let O=A.getBoundingClientRect();if(O.width>0&&O.height>0){let P=F.getBoundingClientRect(),z=O.width/l,q=O.height/f,U=P.width,Y=P.height,B=A.offsetWidth||z,dt=A.offsetHeight||q,pt=F.offsetWidth||U,nt=F.offsetHeight||Y,st=Math.abs(z-B)>Be||Math.abs(q-dt)>Be||Math.abs(U-pt)>Be||Math.abs(Y-nt)>Be;if(L){let ct=y(F,pt,nt);z=U>0?z*C*ct.width/U:z,q=Y>0?q*S*ct.height/Y:q,U=ct.width,Y=ct.height}else if(st){let ct=y(A,B,dt),Dt=y(F,pt,nt);z=ct.width,q=ct.height,U=Dt.width,Y=Dt.height}let yt=U-z,bt=Y-q;(Math.abs(yt)>Be||Math.abs(bt)>Be)&&(N.style.boxSizing="border-box",N.style.width=`${W(z)}px`,N.style.height=`${W(q)}px`,m++)}}k(N,F,L)}};k(e,h)}finally{c.remove()}return m}var gu=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function Co(t,e=new Set){let n="";if(!t)return n;for(let r=0;r<t.length;r++){let i=t[r];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Co(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let o=Co(i.cssRules,e);o&&(n+=`@media ${i.conditionText}{${o}}`);continue}if(i.type===CSSRule.STYLE_RULE){let o=i.selectorText||"";if(gu.test(o)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var ea=new WeakMap;function yu(t){let e="";for(let n of t.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+r+"|"}return e}function bu(t){if(!t||!t.styleSheets)return"";let e=yu(t),n=ea.get(t);if(n&&n.fp===e)return n.css;let r=new Set,i="";for(let o of Array.from(t.styleSheets))try{let s=o.cssRules;s&&(i+=Co(s,r))}catch{}return ea.set(t,{fp:e,css:i}),i}function ca(t,e){let n=zr(t.clone).sort(),r=n.join(","),i=cn(t.element),o=D.baseStyle.get(r),s;o&&o.universe===i?s=o.css:(s=Hr(n,i),D.baseStyle.set(r,{universe:i,css:s}));let a=bu(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}mt();var Kn=new Set,wu="[data-sd-ph]::placeholder{color:var(--sd-ph)!important;opacity:var(--sd-ph-o)!important;-webkit-text-fill-color:var(--sd-ph)!important}";async function fa(t,e={}){Nt(),Tn(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,o=null;if(e.clip&&(o=Xn(t,e.clip),o&&(r.clip={rect:o,root:t})),e.captureSelection)try{r.selection=ms(t)}catch(p){j(r,"Couldn't read the text selection.",p)}let s,a="",l="";if(Kn.size){let p=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||Pt(b))if(b===g)return!0;return!1};for(;;){let g=[...Kn].filter(({root:y})=>p(y,t)||p(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!r.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let p=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=p.right<=0||p.bottom<=0||p.left>=g.innerWidth||p.top>=g.innerHeight,b=[];if(y&&(()=>{let x=[];t.shadowRoot&&x.push(t.shadowRoot);for(let C of t.querySelectorAll("*"))C.shadowRoot&&x.push(C.shadowRoot);for(;x.length;){let C=x.pop(),S=C.host?.localName==="calcite-icon";for(let k of C.querySelectorAll("*")){if(k.shadowRoot&&x.push(k.shadowRoot),!S||k.localName!=="svg")continue;let E=k.querySelectorAll("path");if(!E.length||[...E].some(v=>v.getAttribute("d")?.trim()))continue;let R=k.getBoundingClientRect();R.width&&R.height&&b.push(k)}}})(),b.length){let x=(async()=>{let S=t.style,k=t.hasAttribute("style"),E=new Map,R=(v,M)=>{E.has(v)||E.set(v,{value:S.getPropertyValue(v),priority:S.getPropertyPriority(v)}),S.setProperty(v,M,"important");let _=E.get(v);_.forcedValue=S.getPropertyValue(v),_.forcedPriority=S.getPropertyPriority(v)};try{R("left","0"),R("top","0"),R("right","auto"),R("bottom","auto"),R("margin-top","0"),R("margin-right","0"),R("margin-bottom","0"),R("margin-left","0"),R("transform","none"),R("translate","none"),R("opacity","0"),R("pointer-events","none");let v=t.getBoundingClientRect();if(v.right<=0||v.bottom<=0||v.left>=g.innerWidth||v.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),$=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,N=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;R("position","fixed"),R("left",`${$}px`),R("top",`${N}px`)}await St(100);let M=Date.now()+1500,_=()=>b.some(T=>{if([...T.querySelectorAll("path")].some(N=>N.getAttribute("d")?.trim()))return!1;let $=T.getBoundingClientRect();return $.width&&$.height&&$.right>0&&$.bottom>0&&$.left<g.innerWidth&&$.top<g.innerHeight});for(;Date.now()<M&&_();)await new Promise(T=>setTimeout(T,25));await St(100)}finally{for(let[v,M]of E)S.getPropertyValue(v)!==M.forcedValue||S.getPropertyPriority(v)!==M.forcedPriority||(M.value?S.setProperty(v,M.value,M.priority):S.removeProperty(v));!k&&!S.length&&t.removeAttribute("style"),await St(100)}})(),C={root:t,promise:x};Kn.add(C);try{await x}finally{Kn.delete(C)}}}catch{}let f=Gs(t),c=Gn(t,o);if(o){let p=t.getBoundingClientRect(),g=t.offsetWidth||p.width,y=t.offsetHeight||p.height,b=p.width&&Math.abs(g-p.width)>=1?g/p.width:1,w=p.height&&Math.abs(y-p.height)>=1?y/p.height:1;i={x:(o.left-p.left)*b,y:(o.top-p.top)*w,width:o.width*b,height:o.height*w}}try{s=await ee(t,r,e)}catch(p){throw console.warn("[SnapDOM] Capture failed while copying the element.",p),p}finally{c(),f()}ps(r.nodeMap,t.ownerDocument||document),r.slicer?.due()&&await r.slicer.pause();try{qs(s,void 0,t)}catch(p){console.warn("[SnapDOM] Couldn't copy external SVG icons; some may be missing.",p)}try{await De(t,s,r,e)}catch(p){console.warn("[SnapDOM] Couldn't copy ::before/::after content; some decorations may be missing.",p)}await Ln(s,r);for(let[p,g]of r.nodeMap.entries())if(g?.tagName==="STYLE"&&p?.tagName==="STYLE"&&!p.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(p.textContent||"")&&(p.textContent=pe(y))}catch{}try{let p=s.querySelectorAll("style[data-sd]");for(let g of p)l+=g.textContent||"",g.remove()}catch(p){j(r,"Couldn't copy shadow DOM styles.",p)}r.slicer?.due()&&await r.slicer.pause();let u=en(r.styleMap);a=Array.from(u.entries()).map(([p,g])=>`.${g}{${p}}`).join("");let h=l+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(r.__usesPlaceholder?wu:"")+(r.__pseudoCSS||"");a=h+a;for(let[p,g]of r.styleMap.entries())_o(p,g,u);try{Su(t,s,r.nodeMap)}catch(p){j(r,"Couldn't bring an open dialog or popover into the capture.",p)}if((r.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let p=r.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};ra(t,s,r.nodeMap,r.styleCache,p)}catch(p){j(r,"Couldn't keep fixed-position elements in place.",p)}for(let[p,g]of r.nodeMap.entries())r.clip&&g===t&&t===t.ownerDocument.scrollingElement||Eo(p,g,r.nodeMap,r.styleCache);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let p=r.styleCache.get(m.documentElement)||I(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&p.overflowX==="visible"&&p.overflowY==="visible"&&p.contain==="none"&&!p.containerType?.includes("size")&&p.contentVisibility!=="auto"&&p.contentVisibility!=="hidden"){let y=r.styleCache.get(m.body)||I(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===r.nodeMap.get(s)){let p=r.styleCache.get(t)||I(t);r.styleCache.set(t,p);let g=Fr(p.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none"}for(let[p,g]of r.nodeMap.entries())g.tagName==="PRE"&&(p.style.marginTop="0",p.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:i}}function Su(t,e,n){let r=[];for(let s of[":modal",":popover-open"])try{r.push(...t.querySelectorAll(s))}catch{}if(!r.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let o=214748e4;for(let s of r){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let l=getComputedStyle(s,"::backdrop"),f=l.backgroundColor,c=l.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||c&&c!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${o};background-color:${f};`+(c&&c!=="none"&&c.includes("data:")?`background-image:${c};`:""),e.appendChild(d)}}catch{}o+=1,a.style.zIndex=String(o),e.appendChild(a),o+=1}}}function _o(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&Wt(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let r=n.get(e);r&&t.classList.add(r);let i=t.style?.backgroundImage,o=t.dataset?.snapdomHasIcon;i&&i!=="none"&&(t.style.backgroundImage=i),o&&(t.style.verticalAlign="middle",t.style.display="inline")}function Eo(t,e,n,r){let i=e.scrollLeft,o=e.scrollTop;if(!(i||o)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let l=t.querySelectorAll("*");for(let f of l){if(f.nodeType!==1||f.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let c=n?.get(f),u=c&&(r?.get(c)||I(c)),d=f.style.position||u?.position;if(d!=="fixed"&&d!=="absolute")continue;let h=u&&u.position!=="absolute"&&d==="absolute",m=null;if(c&&!h)for(let y=c.parentElement||Pt(c);y;y=y.parentElement||Pt(y)){let b=r?.get(y)||I(y);if(d==="absolute"&&b.position!=="static"||b.transform&&b.transform!=="none"||b.translate&&b.translate!=="none"||b.rotate&&b.rotate!=="none"||b.scale&&b.scale!=="none"||b.filter&&b.filter!=="none"||b.backdropFilter&&b.backdropFilter!=="none"||b.perspective&&b.perspective!=="none"||/transform|perspective|filter/.test(b.willChange||"")||/layout|paint|strict|content/.test(b.contain||"")){m=y;break}if(y===e)break}if(m){m===e&&(f.style.top=u.top,f.style.left=u.left,f.style.right=u.right,f.style.bottom=u.bottom);continue}let p=parseFloat(f.style.top||u?.top)||0,g=parseFloat(f.style.left||u?.left)||0;f.style.top=`${p+o}px`,f.style.left=`${g+i}px`,d==="fixed"&&(f.style.position="absolute")}}catch{}let a=document.createElement("div");for(a.style.all="unset",a.style.transform=`translate(${-i}px, ${-o}px)`,a.style.willChange="transform",a.style.display="inline-block",a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}le();ce();wt();var ua="http://www.w3.org/1999/xlink";function xu(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(ua,"href"):null)}function vu(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,r=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,o=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||o||r||t.width||t.naturalWidth||100,l=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:l}}async function Qn(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let r=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||$e(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=a.src||"";if(!l)return;let f=D.image?.get(l);if(f){a.src=f,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=await at(l,{as:"dataURL",useProxy:e.useProxy});if(c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")){D.image?.set(l,c.data),a.src=c.data,c.blob&&(a.__snapdomBlob=c.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:d}=vu(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:u,height:d,src:l,element:a}):h;if(m){let p=await at(m,{as:"dataURL",useProxy:e.useProxy});if(p?.ok&&typeof p.data=="string"){a.src=p.data,a.width||(a.width=u),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){Et(e.__session,"image-fallback",`image failed to inline, using placeholder: ${l}`);let m=document.createElement("div");m.style.cssText=[`width:${u}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let l=n.slice(a,a+i).map(r);await Promise.allSettled(l)}let o=Array.from(t.querySelectorAll("image"));t.localName==="image"&&o.unshift(t);let s=async a=>{let l=xu(a);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let f=await at(l,{as:"dataURL",useProxy:e.useProxy});f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")&&(a.setAttribute("href",f.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(ua,"href"))};for(let a=0;a<o.length;a+=i){let l=o.slice(a,a+i).map(s);await Promise.allSettled(l)}}mt();vt();var Cu=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],ku=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],Mu=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],Au=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function _u(t,e,n,r){let i=n.get(t)||I(t);n.has(t)||n.set(t,i);let o=Wi(t),s=o?m=>m in o?o[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),l=s("border-image-source"),f=a&&a!=="none"||l&&l!=="none",c=i.getPropertyValue("background-image"),u=s("background-color"),d=c&&c!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=xt()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!h)for(let m of Mu){let p=s(m);p&&e.style.setProperty(m,p)}for(let m of Cu){if(h&&m==="background-image")continue;let p=i.getPropertyValue(m);if(m==="background-image"&&(!p||p==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(p=Yt(b).filter(w=>/url\s*\(/.test(w)).join(", ")||p)}if(!p||p==="none")continue;let g=Yt(p),y=await Promise.all(g.map(b=>ve(b,r)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of ku){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(f)for(let m of Au){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(d&&/fixed/.test(s("background-attachment")||""))try{await Ru(t,e,i)}catch{}}function Eu(t,e,n,r,i){let o=(t||"auto").trim();if(o==="cover"||o==="contain"){if(!e||!n)return{w:r,h:i};let d=o==="cover"?Math.max(r/e,i/n):Math.min(r/e,i/n);return{w:e*d,h:n*d}}let s=o.split(/\s+/),a=(d,h)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return h*parseFloat(d)/100},l=a(s[0],r),f=a(s[1],i);if(l===void 0||f===void 0)return null;let c=l,u=f;return c==null&&u==null?(c=e||r,u=n||i):c==null?c=e&&n?u*(e/n):r:u==null&&(u=e&&n?c*(n/e):i),!c||!u?null:{w:c,h:u}}async function Ru(t,e,n){let r=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=nn();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let p=I(m);(p.transform&&p.transform!=="none"||p.filter&&p.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "));return}let o=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,l=s.innerHeight,f=Yt(e.style.backgroundImage||n.getPropertyValue("background-image")||""),c=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),d=[],h=[];for(let m=0;m<f.length;m++){let p=r[m%r.length]||"scroll",g=c[m%c.length],y=u[m%u.length];if(p!=="fixed"){d.push(g),h.push(y);continue}let b=0,w=0,x=f[m]&&f[m].match(/url\(["']?([^"')]+)["']?\)/);if(x)try{let v=new Image;v.src=x[1],await v.decode(),b=v.naturalWidth,w=v.naturalHeight}catch{d.push(g),h.push(y);continue}let C=Eu(g,b,w,a,l);if(!C){d.push(g),h.push(y);continue}let S=y.split(/\s+/),k=(v,M,_)=>{if(!v)return 0;if(v.endsWith("px"))return parseFloat(v);if(v.endsWith("%"))return(M-_)*parseFloat(v)/100},E=k(S[0]||"0%",a,C.w),R=k(S[1]||S[0]||"0%",l,C.h);if(E===void 0||R===void 0){d.push(g),h.push(y);continue}d.push(`${Zn(C.w)}px ${Zn(C.h)}px`),h.push(`${Zn(E-o.left)}px ${Zn(R-o.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "))}var Zn=t=>Math.round(t*100)/100;async function Jn(t,e,n,r={},i=new Map){if(!e)return;let o=[];t&&to(t)&&o.push([t,e]);let s=[e];for(;s.length;){let l=s.pop();if(l.children)for(let f of l.children){if(f.tagName==="STYLE")continue;let c=i.get(f);c&&to(c)&&o.push([c,f]),s.push(f)}}let a=6;for(let l=0;l<o.length;l+=a)await Promise.allSettled(o.slice(l,l+a).map(([f,c])=>_u(f,c,n,r)))}vt();function pa(t,e,n=new Map){let r=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let l=n.get(a);if(l?.nodeType!==1)continue;let f=I(l),c=f.getPropertyValue("backdrop-filter")||f.getPropertyValue("-webkit-backdrop-filter");c&&c!=="none"&&a!==e&&r.push({cloneEl:a,orig:l,bf:c,path:$u(e,a)})}if(!r.length)return;let o=t.getBoundingClientRect(),s=r.map((a,l)=>{let f=e.cloneNode(!0);Pu(f,e,a.orig.getBoundingClientRect(),n),Nu(da(f,a.path));for(let c=0;c<l;c++){let u=da(f,r[c].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:f}});for(let{cloneEl:a,orig:l,bf:f,copy:c}of s)Fu.has(a.tagName)||Tu(a,l,f,c,o)}var Fu=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function Tu(t,e,n,r,i){let o=e.getBoundingClientRect();if(!o.width||!o.height)return;let s=I(e),a=e.offsetWidth?o.width/e.offsetWidth:1,l=Math.abs(a-1)>.001?1/a:1;r.style.position="absolute",r.style.left=`${(i.left-o.left)*l}px`,r.style.top=`${(i.top-o.top)*l}px`,r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.margin="0",r.style.filter=n,l!==1&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",f.appendChild(r);let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",c.style.backgroundColor=s.backgroundColor,c.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])c.style.setProperty(u,s.getPropertyValue(u));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(c),t.prepend(f)}var tr=128;function Pu(t,e,n,r){let i=[[t,e]];for(;i.length;){let[o,s]=i.pop(),a=r.get(s);if(a?.nodeType===1){let c=a.getBoundingClientRect();(c.left>n.right+tr||c.right<n.left-tr||c.top>n.bottom+tr||c.bottom<n.top-tr)&&(o.tagName==="IMG"&&o.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),o.style&&(o.style.backgroundImage="none"))}let l=o.children,f=s.children;for(let c=0;c<l.length;c++)i.push([l[c],f[c]])}}function $u(t,e){let n=[];for(let r=e;r!==t;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function da(t,e){if(!e)return null;let n=t;for(let r of e)if(n=n.children[r],!n)return null;return n}function Nu(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}vt();mt();wt();wt();function Ro(t){return ci(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}ce();function nr(t,e){if(!t)return()=>{};let n=[],r=200;function i(o){if(e){let f=o.getBoundingClientRect();if(f.width>0||f.height>0){let c=Math.max(f.right,f.left+(o.scrollWidth||0)),u=Math.max(f.bottom,f.top+(o.scrollHeight||0));if(c<e.left-r||f.left>e.right+r||u<e.top-r||f.top>e.bottom+r)return}}let s=getComputedStyle(o),a=Lu(o,s);a&&n.push(a);let l=Iu(o,s);l&&n.push(l);for(let f of o.children||[])i(f)}return i(t),()=>n.forEach(o=>o())}function Lu(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=Ou(e);if(n<=0)return()=>{};if(!ga(t))return()=>{};let r=ma(t),i=r.text,o=Wu(e);r.write("X");let s=t.scrollHeight-o;r.restore();let a=s>0?s:Du(e),l=Math.round(a*n+o);if(t.scrollHeight<=l+.5)return()=>{};let f=0,c=i.length,u=-1;for(;f<=c;){let h=f+c>>1;r.write(i.slice(0,er(i,h))+"\u2026"),t.scrollHeight<=l+.5?(u=h,f=h+1):c=h-1}let d=(u>=0?i.slice(0,er(i,u)):"")+"\u2026";return r.write(d),ha(t,d,r)}function Iu(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!ga(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=ma(t),r=n.text,i=0,o=r.length,s=-1;for(;i<=o;){let l=i+o>>1;n.write(r.slice(0,er(r,l))+"\u2026"),t.scrollWidth<=t.clientWidth+.5?(s=l,i=l+1):o=l-1}let a=(s>=0?r.slice(0,er(r,s)):"")+"\u2026";return n.write(a),ha(t,a,n)}function ha(t,e,n){return()=>{t.textContent===e&&n.restore()}}function ma(t){let e=[];for(let r=t.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&e.push(r);let n=e.map(r=>r.data);return{text:n.join(""),write(r){e[0].data=r;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let r=0;r<e.length;r++)e[r].data=n[r]}}}function er(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function Ou(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,10);return Number.isFinite(n)&&n>0?n:0}function Du(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function Wu(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function ga(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Ue=["clone","render"],gn={clone:0,render:1},gt="render";function ya(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:gt,loweredBy:[]};let n=-1,r=[];for(let o of e){if(!o||typeof o!="object")continue;let s=o.needs===void 0?gt:o.needs;if(!Object.prototype.hasOwnProperty.call(gn,s))throw new Error(`[SnapDOM] Plugin '${o.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${Ue.join(", ")}.`);r.push({name:o.name||"(unnamed)",needs:s}),n=Math.max(n,gn[s])}if(n<0)return{stage:gt,loweredBy:[]};let i=Ue[n];return{loweredBy:i===gt?[]:r.filter(o=>o.needs===i).map(o=>o.name),stage:i}}function ze(t,e){return gn[t]>=gn[e]}function ba(t,e,n=Ue){let r=n[n.length-1];if(e==null)return r;if(!Object.prototype.hasOwnProperty.call(gn,e))throw new Error(`[SnapDOM] ${t}: needs must be one of ${Ue.join(", ")}, got ${JSON.stringify(e)}.`);if(!n.includes(e))throw new Error(`[SnapDOM] ${t} cannot run at stage '${e}'; it supports ${n.join(", ")}.`);return e}function wa(t,e,n){let r=e.length?e.map(i=>`'${i}'`).join(", "):"the attached plugins";return new Error(`[SnapDOM] No ${n}: this capture stopped at '${t}' because ${r} asked for needs: '${t}'. It is not re-captured, since that would be a different instant. Ask the plugin for needs: 'render', or capture without it.`)}var He=[];function je(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function Fo(...t){let e=t.flat();for(let n of e){let r=je(n);if(r){if(r.needs!==void 0&&r.needs!==gt)throw new Error(`[SnapDOM] '${r.name||"(unnamed)"}' declares needs: ${JSON.stringify(r.needs)}, so it can't be a global plugin (it would stop every capture before '${gt}'). Pass it per capture: snapdom(el, { plugins: [...] }).`);He.some(i=>i&&i.name&&r.name&&i.name===r.name)||He.push(r)}}}function Sa(t){return t&&Array.isArray(t.plugins)?t.plugins:He}async function zt(t,e,n){let r=n,i=Sa(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,r);typeof a<"u"&&(r=a)}return r}async function rr(t,e,n){let r=[],i=Sa(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&r.push(a)}return r}function Bu(){He.length=0}var Uu=0;function zu(t){let e=[];if(Array.isArray(t))for(let n of t){let r=je(n);if(!r)continue;r.name||(r.name=`anonymous-${++Uu}`);let i=e.findIndex(o=>o&&o.name===r.name);i>=0&&e.splice(i,1),e.push(r)}for(let n of He)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function xa(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=zu(e)),t}function To(){return He.slice()}var Hu=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function or(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let r=je(n);if(!(!r||r.pure===!0)){for(let i of Hu)if(typeof r[i]=="function")return!0}}return!1}wt();Ae();var ge="data-snapdom-asset",Ma="http://www.w3.org/1999/xlink",ju=0;function sr(t,e,n,r,i,o){let s=o.__compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++ju),properties:[]},s.set(t,a),t.setAttribute(ge,a.token));let l=a.properties.find(f=>f.kind===e&&f.name===n);l?(l.compressed!==r&&(l.original=r),l.compressed=i):a.properties.push({kind:e,name:n,original:r,compressed:i})}var Aa=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function ar(t,e){let n=new Map;if(!t||!e)return n;let r=[t,...t.querySelectorAll(`[${ge}]`)];for(let i of r){let o=e.get(i);if(!o||i.getAttribute(ge)!==o.token)continue;let s=o.properties.filter(a=>Aa(i,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(o.token,Object.freeze(s))}return n}function lr(t,e){if(!t||!e)return;let n=0;for(let r of[t,...t.querySelectorAll(`[${ge}]`)]){let i=e.get(r);i&&(i.token=String(++n),r.setAttribute(ge,i.token))}}function _a(t,e){if(!e?.size||typeof t!="string"||!t.startsWith("data:image/svg+xml"))return t;let n=t.indexOf(","),r=new DOMParser().parseFromString(decodeURIComponent(t.slice(n+1)),"image/svg+xml");if(r.querySelector("parsererror"))return t;let i=!1;for(let o of r.querySelectorAll(`[${ge}]`))for(let s of e.get(o.getAttribute(ge))||[])Aa(o,s)===s.compressed&&(s.kind==="style"?o.style.setProperty(s.name,s.original,o.style.getPropertyPriority(s.name)):s.name==="xlink:href"?o.setAttributeNS(Ma,s.name,s.original):o.setAttribute(s.name,s.original),i=!0);return i?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(r))}`:t}function va(t){if(t.is2D===!1)return 1/0;let e=t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d,n=t.a*t.d-t.b*t.c;return Math.sqrt((e+Math.sqrt(Math.max(0,e*e-4*n*n)))/2)}function Po(t,e){let n=e.element||t,r=n.isConnected?I(n):n.style,i=e.__compressionClip,o=(h,m)=>{try{return h[m]?.baseVal?.value||0}catch{return 0}},s=i?.width||n.offsetWidth||parseFloat(r?.width)||o(n,"width"),a=i?.height||n.offsetHeight||parseFloat(r?.height)||o(n,"height"),l=Number.isFinite(e.width),f=Number.isFinite(e.height);if(!i&&(l||f)&&s&&a)try{let h=e.outerTransforms===!1&&e.__compressionRootTransform?e.__compressionRootTransform:ne({baseTransform:r?.transform,rotate:r?.rotate,scale:r?.scale,width:s,height:a});if(h.is2D===!1)s=0,a=0;else{let m=Math.abs(h.a)*s+Math.abs(h.c)*a,p=Math.abs(h.b)*s+Math.abs(h.d)*a;s=Math.min(s,m),a=Math.min(a,p)}}catch{s=0,a=0}let c=(l||f?Math.max(l?s?e.width/s:1/0:0,f?a?e.height/a:1/0:0):e.scale||1)*(e.dpr||1);e.__compressionDensity=c;let u=new WeakMap,d=h=>{if(!h||h.nodeType!==1)return 1;if(u.has(h))return u.get(h);let m=h.isConnected?I(h):h.style,p=1;try{m?.perspective&&m.perspective!=="none"&&(p=1/0);let g=m?.transform;if(g&&g!=="none")p*=va(new DOMMatrix(g));else if(h.transform?.baseVal?.numberOfItems){let y=new DOMMatrix;for(let b=0;b<h.transform.baseVal.numberOfItems;b++){let w=h.transform.baseVal.getItem(b).matrix;y=y.multiply(new DOMMatrix([w.a,w.b,w.c,w.d,w.e,w.f]))}p*=va(y)}if(m?.scale&&m.scale!=="none"){let y=m.scale.trim().split(/\s+/).map(b=>parseFloat(b)/(b.endsWith("%")?100:1));p*=Math.max(...y.map(Math.abs))}if(h!==n&&m?.zoom&&m.zoom!=="normal"&&(p*=parseFloat(m.zoom)||1),h.localName==="svg"&&h.viewBox?.baseVal?.width>0&&h.viewBox.baseVal.height>0){let y=h.viewBox.baseVal,b=C=>/^\d+(?:\.\d+)?px$/.test(m?.[C]||"")?parseFloat(m[C]):o(h,C),w=b("width"),x=b("height");p*=w>0&&x>0?Math.max(w/y.width,x/y.height):1/0}}catch{p=1/0}return Number.isFinite(p)||(p=1/0),h!==n&&(p*=d(h.parentElement||h.getRootNode?.().host)),u.set(h,p),p};return{density:c,stretch:d}}var Ea=.92,Ra=1;async function Vu(t){let e=new Image;return e.decoding="sync",e.src=t,typeof e.decode=="function"?(await e.decode(),e):(await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=r}),e)}function qu(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var Gu=64*1024,Ca=32*1024*1024,ir=new Map;function Xu(t,e,n,r){if(n.length+(r?.length||0)>Ca)return;t.set(e,{source:n,result:r});let i=0;for(let o of t.values())i+=o.source.length+(o.result?.length||0);for(;i>Ca;){let o=t.keys().next().value,s=t.get(o);i-=s.source.length+(s.result?.length||0),t.delete(o)}}function Yu(t,e){let n=t.indexOf(",");if(n<0||!/;base64/i.test(t.slice(0,n)))return null;let r=Math.ceil(e/3)*4,i=t.length-n-1,o=Math.min(i,r);try{let s=atob(t.slice(n+1,n+1+o-o%4)),a=new Uint8Array(s.length);for(let l=0;l<s.length;l++)a[l]=s.charCodeAt(l);return a}catch{return null}}function Ku(t){let e=Yu(t,4096);if(!e||e.length<16)return null;let n=r=>e[r]<<8|e[r+1];if(e[0]===137&&e[1]===80&&e.length>=24)return{w:(e[16]<<24|e[17]<<16|e[18]<<8|e[19])>>>0,h:(e[20]<<24|e[21]<<16|e[22]<<8|e[23])>>>0};if(e[0]===71&&e[1]===73&&e[2]===70)return{w:e[6]|e[7]<<8,h:e[8]|e[9]<<8};if(e[0]===82&&e[1]===73&&e[8]===87&&e.length>=30){let r=e[15];if(r===32&&e[23]===157)return{w:(e[26]|e[27]<<8)&16383,h:(e[28]|e[29]<<8)&16383};if(r===76)return{w:(e[21]|(e[22]&63)<<8)+1,h:((e[22]>>6|e[23]<<2|(e[24]&15)<<10)&16383)+1};if(r===88)return{w:(e[24]|e[25]<<8|e[26]<<16)+1,h:(e[27]|e[28]<<8|e[29]<<16)+1}}if(e[0]===255&&e[1]===216){let r=2;for(;r+9<e.length;){if(e[r]!==255){r++;continue}let i=e[r+1];if(i===216||i===1||i>=208&&i<=215){r+=2;continue}if(i>=192&&i<=207&&i!==196&&i!==200&&i!==204)return{h:n(r+5),w:n(r+7)};let o=n(r+2);if(o<2)break;r+=2+o}}return null}function ka(t,e,n,r){let i=Math.min(1,Math.max(n/t,r/e));return!(i>0)||i>=.95?0:i}var Qu=`self.onmessage = async (e) => {
|
|
15
|
+
`):c+=d[0]}return c+=a.slice(u),c}let s=As(t,e||location.href);return s=await o(s,e||location.href,0),s}var Ps=/url\((["']?)([^"')]+)\1\)/g,Df=/@font-face[^{}]*\{[^}]*\}/g;function Ft(t,e,n=""){return(t.match(new RegExp(`${e}\\s*:\\s*([^;}]+)[;}]`,"i"))?.[1]||n).trim()}function $s(t){if(!t)return[];let e=[],n=t.split(",").map(r=>r.trim()).filter(Boolean);for(let r of n){let i=r.match(/^U\+([0-9A-Fa-f?]+)(?:-([0-9A-Fa-f?]+))?$/);if(!i)continue;let o=i[1],s=i[2],a=l=>{if(!l.includes("?"))return parseInt(l,16);let f=parseInt(l.replace(/\?/g,"0"),16),c=parseInt(l.replace(/\?/g,"F"),16);return[f,c]};if(s){let l=a(o),f=a(s),c=Array.isArray(l)?l[0]:l,u=Array.isArray(f)?f[1]:f;e.push([Math.min(c,u),Math.max(c,u)])}else{let l=a(o);Array.isArray(l)?e.push([l[0],l[1]]):e.push([l,l])}}return e}function Ns(t,e){if(!e.length||!t||t.size===0)return!0;for(let n of t)for(let[r,i]of e)if(n>=r&&n<=i)return!0;return!1}function co(t,e){let n=[];if(!t)return n;for(let r of t.matchAll(Ps)){let i=(r[2]||"").trim();if(!(!i||i.startsWith("data:"))){if(!/^https?:/i.test(i))try{i=new URL(i,e||location.href).href}catch{}n.push(i)}}return n}async function so(t,e,n=""){let r=t;for(let i of t.matchAll(Ps)){let o=ae(i[0]);if(!o)continue;let s=o;if(!s.startsWith("http")&&!s.startsWith("data:"))try{s=new URL(s,e||location.href).href}catch{}if(D.resource?.has(s)){r=r.replace(i[0],`url(${D.resource.get(s)})`);continue}try{let a=await at(s,{as:"dataURL",useProxy:n,silent:!0});if(a.ok&&typeof a.data=="string"){let l=a.data;D.resource?.set(s,l),r=r.replace(i[0],`url(${l})`)}}catch{console.warn("[SnapDOM] Couldn't load font file:",s)}}return r}function Wf(t){if(!t.length)return null;let e=(a,l)=>t.some(([f,c])=>!(c<a||f>l)),n=e(0,255)||e(305,305),r=e(256,591)||e(7680,7935),i=e(880,1023),o=e(1024,1279);return e(7840,7929)||e(258,259)||e(416,417)||e(431,432)?"vietnamese":o?"cyrillic":i?"greek":r?"latin-ext":n?"latin":null}function _s(t={}){let e=new Set((t.families||[]).map(i=>String(i).toLowerCase())),n=new Set((t.domains||[]).map(i=>String(i).toLowerCase())),r=new Set((t.subsets||[]).map(i=>String(i).toLowerCase()));return(i,o)=>{if(e.size&&e.has(i.family.toLowerCase()))return!0;if(n.size)for(let s of i.srcUrls)try{if(n.has(new URL(s).host.toLowerCase()))return!0}catch{}if(r.size){let s=Wf(o);if(s&&r.has(s))return!0}return!1}}function Bf(t){if(!t)return t;let e=/@font-face[^{}]*\{[^}]*\}/gi,n=new Set,r=[];for(let o of t.match(e)||[]){let s=Ft(o,"font-family"),a=lo(s),l=Ft(o,"font-weight","400"),f=Ft(o,"font-style","normal"),c=Ft(o,"font-stretch","100%"),u=Ft(o,"unicode-range"),d=Ft(o,"src"),h=co(d,location.href),m=h.length?h.map(g=>String(g).toLowerCase()).sort().join("|"):d.toLowerCase(),p=[String(a||"").toLowerCase(),l,f,c,u.toLowerCase(),m].join("|");n.has(p)||(n.add(p),r.push(o))}if(r.length===0)return t;let i=0;return t.replace(e,()=>r[i++]||"")}var Es=new WeakMap,Uf=0;function zf(t){let e=Es.get(t);return e===void 0&&(e=Uf++,Es.set(t,e)),e}function Hf(t,e,n,r,i,o,s,a,l){let f=Array.from(t||[]).sort().join("|"),c=0,u=0;for(let b of s||[]){let w=Math.imul(b,2654435761);w^=w>>>15,w=Math.imul(w,2246822507),w^=w>>>13,c=c+w|0,u++}let d=e?JSON.stringify({families:(e.families||[]).map(b=>String(b).toLowerCase()).sort(),domains:(e.domains||[]).map(b=>String(b).toLowerCase()).sort(),subsets:(e.subsets||[]).map(b=>String(b).toLowerCase()).sort()}):"",h=(n||[]).map(b=>`${(b.family||"").toLowerCase()}::${b.weight||"normal"}::${b.style||"normal"}::${b.stretchPct??100}::${b.src||""}`).sort().join("|"),m=r||"",p=(i||[]).map(b=>String(b).toLowerCase()).sort().join("|"),g=zf(o||document),y=(a||[]).map(b=>String(b)).sort().join("|");return`fonts-embed-css::req=${f}::ex=${d}::lf=${h}::px=${m}::fd=${p}::doc=${g}::cp=${c}::n=${u}::ic=${y}::env=${l}`}async function ao(t,e,n,r){let i=r.doc?.defaultView||window;if(t.disabled||t.media?.mediaText&&!i.matchMedia(t.media.mediaText).matches)return;let o;try{o=t.cssRules||[]}catch{return}let s=(a,l)=>{try{return new URL(a,l||location.href).href}catch{return a}};for(let a of o){if(a.type===CSSRule.IMPORT_RULE&&a.styleSheet){let l=a.href?s(a.href,e):e;if(r.depth>=zn){console.warn(`[SnapDOM] Too many nested @import rules in ${l}; stopped at ${zn} levels.`);continue}if(l&&r.visitedSheets.has(l)){console.warn(`[SnapDOM] Skipped an @import that loops back: ${l}`);continue}l&&r.visitedSheets.add(l);let f={...r,depth:(r.depth||0)+1};await ao(a.styleSheet,l,n,f);continue}if(a.cssRules?.length){if(a.type===CSSRule.MEDIA_RULE&&!i.matchMedia(a.conditionText).matches||a.type===CSSRule.SUPPORTS_RULE&&!i.CSS.supports(a.conditionText))continue;await ao(a,e,n,r);continue}if(a.type===CSSRule.FONT_FACE_RULE){let l=(a.style.getPropertyValue("font-family")||"").trim(),f=lo(l);if(!f||It(f,r.iconMatchers))continue;let c=(a.style.getPropertyValue("font-weight")||"").trim(),u=(a.style.getPropertyValue("font-style")||"").trim(),d=(a.style.getPropertyValue("font-stretch")||"").trim(),h=(a.style.getPropertyValue("font-variation-settings")||"").trim(),m=(a.style.getPropertyValue("src")||"").trim(),p=(a.style.getPropertyValue("unicode-range")||"").trim(),g=c||"400",y=u||"normal",b=d||"100%",w=(u?`font-style:${u};`:"")+(c?`font-weight:${c};`:"")+(d?`font-stretch:${d};`:"")+(h?`font-variation-settings:${h};`:"")+(p?`unicode-range:${p};`:""),x=r.faceMatchesRequired(f,y,g,b);if(!x&&!r.requiredIndex.has(f.toLowerCase()))continue;let C=$s(p);if(!Ns(r.usedCodepoints,C))continue;let S={family:f,weightSpec:g,styleSpec:y,stretchSpec:b,unicodeRange:p,srcRaw:m,srcUrls:co(m,e||location.href),href:e||location.href};if(r.simpleExcluder&&r.simpleExcluder(S,C))continue;if(!x){r.provisionalFaces.push({family:f.toLowerCase(),block:`@font-face{font-family:${f};src:${m};${w}}`,srcRaw:m,baseHref:e||location.href});continue}r.coveredFamilies.add(f.toLowerCase());let k=`"${String(f).replace(/^\s*["']|["']\s*$/g,"").replace(/(["\\])/g,"\\$1")}"`;if(/url\(/i.test(m)){let E=await so(m,e||location.href,r.useProxy);await n(`@font-face{font-family:${k};src:${E};${w}}`)}else await n(`@font-face{font-family:${k};src:${m};${w}}`)}}}async function Ls({required:t,usedCodepoints:e,exclude:n=void 0,localFonts:r=[],useProxy:i="",fontStylesheetDomains:o=[],iconMatchers:s=[],doc:a=document}={}){t instanceof Set||(t=new Set),e instanceof Set||(e=new Set);let l=new Map;for(let S of t){let[k,E,R,v]=String(S).split("__");if(!k)continue;let M=k.toLowerCase(),_=l.get(M)||[];_.push({w:parseInt(E,10),s:R,st:parseInt(v,10)}),l.set(M,_)}function f(S,k,E,R){let v=String(S).toLowerCase();if(!l.has(v))return!1;let M=l.get(v),_=Tf(E),T=Pf(k),$=$f(R),N=_.min!==_.max,F=_.min,A=O=>T.kind==="normal"&&O==="normal"||T.kind!=="normal"&&(O==="italic"||O==="oblique"),L=!1;for(let O of M){let P=N?O.w>=_.min&&O.w<=_.max:O.w===F,z=A(Un(O.s)),q=O.st>=$.min&&O.st<=$.max;if(P&&z&&q){L=!0;break}}if(L)return!0;if(!N)for(let O of M){let P=A(Un(O.s)),z=O.st>=$.min&&O.st<=$.max;if(Math.abs(F-O.w)<=300&&P&&z)return!0}if(!N&&T.kind==="normal"&&M.some(P=>Un(P.s)!=="normal"))for(let P of M){let z=Math.abs(F-P.w)<=300,q=P.st>=$.min&&P.st<=$.max;if(z&&q)return!0}return!1}let c=_s(n);Re(a),Nt();let u=Hf(t,n,r,i,o,a,e,s,Re(a));if(D.resource?.has(u))return D.resource.get(u);let d=If(t),h=[],m=Ts;for(let S of a.querySelectorAll("style")){let k=S.textContent||"";for(let E of k.matchAll(m)){let R=(E[2]||E[4]||"").trim();if(!R||io(R,s))continue;a.querySelector(`link[rel="stylesheet"][href="${R}"]`)||h.push(R)}}let p=[];h.length&&await Promise.all(h.map(S=>new Promise(k=>{if(a.querySelector(`link[rel="stylesheet"][href="${S}"]`))return k(null);let E=a.createElement("link");E.rel="stylesheet",E.href=S,J(E),E.setAttribute("data-snapdom","injected-import");let R=setTimeout(()=>k(null),3e3),v=M=>{clearTimeout(R),k(M)};E.onload=()=>v(E),E.onerror=()=>v(null),a.head.appendChild(E),p.push(E)})));let g="",y=new Set,b=[],w=Array.from(a.querySelectorAll('link[rel="stylesheet"]')).filter(S=>!!S.href);for(let S of p)try{S.remove()}catch{}for(let S of w)try{if(io(S.href,s))continue;let k="",E=!1;try{E=new URL(S.href,location.href).origin===location.origin}catch{}if(!E){let v=Array.isArray(o)?o:[];if(!Lf(S.href,d,v))continue}if(E){let v=Array.from(a.styleSheets).find(M=>M.href===S.href);if(v)try{let M=v.cssRules||[];k=Array.from(M).map(_=>_.cssText).join("")}catch{}}if(!k){let v=await at(S.href,{as:"text",useProxy:i});v?.ok&&typeof v.data=="string"&&(k=v.data)}k=await Of(k,S.href,i);let R="";for(let v of k.match(Df)||[]){let M=Ft(v,"font-family"),_=lo(M);if(!_||It(_,s))continue;let T=Ft(v,"font-weight","400"),$=Ft(v,"font-style","normal"),N=Ft(v,"font-stretch","100%"),F=Ft(v,"unicode-range"),A=Ft(v,"src"),L=co(A,S.href),O=f(_,$,T,N);if(!O&&!l.has(_.toLowerCase()))continue;let P=$s(F);if(!Ns(e,P))continue;let z={family:_,weightSpec:T,styleSpec:$,stretchSpec:N,unicodeRange:F,srcRaw:A,srcUrls:L,href:S.href};if(n&&c(z,P))continue;if(!O){b.push({family:_.toLowerCase(),block:v,srcRaw:A,baseHref:S.href});continue}y.add(_.toLowerCase());let q=/url\(/i.test(A)?await so(v,S.href,i):v;R+=q}R.trim()&&(g+=R)}catch{console.warn("[SnapDOM] Couldn't read stylesheet:",S.href)}let x={doc:a,requiredIndex:l,usedCodepoints:e,faceMatchesRequired:f,coveredFamilies:y,provisionalFaces:b,simpleExcluder:n?_s(n):null,useProxy:i,iconMatchers:s,visitedSheets:new Set,depth:0},C=new Set([...a.styleSheets,...a.adoptedStyleSheets||[]]);for(let S of C)if(!(S.href&&w.some(k=>k.href===S.href)))try{let k=S.href||a.baseURI||location.origin+"/";k&&x.visitedSheets.add(k),await ao(S,k,async E=>{g+=E},x)}catch{}for(let S of b)y.has(S.family)||(g+=/url\(/i.test(S.srcRaw)?await so(S.block,S.baseHref,i):S.block);try{for(let S of a.fonts||[]){if(!S||!S.family||S.status!=="loaded"||!S._snapdomSrc)continue;let k=String(S.family).replace(/^['"]+|['"]+$/g,"");if(It(k,s)||!l.has(k.toLowerCase())||n?.families&&n.families.some(R=>String(R).toLowerCase()===k.toLowerCase()))continue;let E=S._snapdomSrc;if(!String(E).startsWith("data:"))if(D.resource?.has(S._snapdomSrc))E=D.resource.get(S._snapdomSrc);else try{let R=await at(S._snapdomSrc,{as:"dataURL",useProxy:i,silent:!0});if(R.ok&&typeof R.data=="string")E=R.data,D.resource?.set(S._snapdomSrc,E);else continue}catch{console.warn("[SnapDOM] Couldn't load font file:",S._snapdomSrc);continue}g+=`@font-face{font-family:'${k}';src:url(${E});font-style:${S.style||"normal"};font-weight:${S.weight||"normal"};}`}}catch{}for(let S of r){if(!S||typeof S!="object")continue;let k=String(S.family||"").replace(/^['"]+|['"]+$/g,"");if(!k||It(k,s)||!l.has(k.toLowerCase())||n?.families&&n.families.some(T=>String(T).toLowerCase()===k.toLowerCase()))continue;let E=S.weight!=null?String(S.weight):"normal",R=S.style!=null?String(S.style):"normal",v=S.stretchPct!=null?`${S.stretchPct}%`:"100%",M=String(S.src||""),_=M;if(!_.startsWith("data:"))if(D.resource?.has(M))_=D.resource.get(M);else try{let T=await at(M,{as:"dataURL",useProxy:i,silent:!0});if(T.ok&&typeof T.data=="string")_=T.data,D.resource?.set(M,_);else continue}catch{console.warn("[SnapDOM] Couldn't load font file from localFonts:",M);continue}g+=`@font-face{font-family:'${k}';src:url(${_});font-style:${R};font-weight:${E};font-stretch:${v};}`}return g&&(g=Bf(g),D.resource?.set(u,g)),g}function Hn(t,e){let n=new Set,r=new Set;if(!t)return{required:n,usedCodepoints:r};let i=c=>{if(c)for(let u of c)r.add(u.codePointAt(0))},o=c=>{let u=Rf(c.fontFamily);if(u.length)for(let d of u)n.add(`${d}__${Bn(c.fontWeight)}__${Un(c.fontStyle)}__${Ff(c.fontStretch)}`)},s=te(t),a=t.getRootNode(),l=c=>{o(I(c));let u=c.getRootNode()===a?s:te(c);for(let d of["::before","::after"]){let h=d==="::before"?u.before:u.after;if(h!==null){if(h==="")continue;try{if(!c.matches(h))continue}catch{}}let m=I(c,d),p=m&&m.content;if(!(!p||p==="none"||p==="normal"))if(o(m),/^["']/.test(p))i(p.slice(1,-1));else{let g=p.match(/\\[0-9A-Fa-f]{1,6}/g);if(g)for(let y of g)try{r.add(parseInt(y.slice(1),16))}catch{}}}},f=[t];for(let c=0;c<f.length;c++){let u=f[c];u.nodeType===Node.ELEMENT_NODE&&l(u),u.shadowRoot&&f.push(u.shadowRoot);let d=(t.ownerDocument||document).createTreeWalker(u,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,null);for(;d.nextNode();){let h=d.currentNode;if(h.nodeType===Node.TEXT_NODE){if(e&&h.parentElement&&!e(h.parentElement))continue;i(h.nodeValue||"")}else{if(e&&!e(h))continue;l(h),h.shadowRoot&&f.push(h.shadowRoot)}}}return{required:n,usedCodepoints:r}}async function jn(t,e=2,n=document){try{await n.fonts.ready}catch{}let r=Array.from(t||[]).filter(Boolean);if(r.length===0)return;let i=()=>{let o=n.createElement("div");J(o),o.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;opacity:0!important;pointer-events:none!important;contain:layout size style;";for(let s of r){let a=n.createElement("span");a.textContent="AaBbGg1234\xC1\xC9\xCD\xD3\xDA\xE7\xF1\u2014\u221E",a.style.fontFamily=`"${s}"`,a.style.fontWeight="700",a.style.fontStyle="italic",a.style.fontSize="32px",a.style.lineHeight="1",a.style.whiteSpace="nowrap",a.style.margin="0",a.style.padding="0",o.appendChild(a)}n.body.appendChild(o),o.offsetWidth,n.body.removeChild(o)};for(let o=0;o<Math.max(1,e);o++)i(),await St(),await St()}At();function Ws(t){return/\bcounter\s*\(|\bcounters\s*\(/.test(t||"")}function Is(t,e=!1){let n="",r=Math.max(1,t);for(;r>0;)r--,n=String.fromCharCode(97+r%26)+n,r=Math.floor(r/26);return e?n.toUpperCase():n}function Os(t,e=!0){let n=[[1e3,"M"],[900,"CM"],[500,"D"],[400,"CD"],[100,"C"],[90,"XC"],[50,"L"],[40,"XL"],[10,"X"],[9,"IX"],[5,"V"],[4,"IV"],[1,"I"]],r=Math.max(1,Math.min(3999,t)),i="";for(let[o,s]of n)for(;r>=o;)i+=s,r-=o;return e?i:i.toLowerCase()}function Ds(t,e){switch((e||"decimal").toLowerCase()){case"decimal":return String(t);case"decimal-leading-zero":{let n=Math.abs(t);return(t<0?"-":"")+(n<10?"0":"")+String(n)}case"lower-alpha":case"lower-latin":return Is(t,!1);case"upper-alpha":case"upper-latin":return Is(t,!0);case"lower-roman":return Os(t,!1);case"upper-roman":return Os(t,!0);default:return String(t)}}function pn(t,e){let n=(t||"").trim().split(/[\s,]+/).filter(Boolean),r=[];for(let i=0;i<n.length;i++){let o=n[i];if(o==="none")continue;let s=n[i+1],a=s!==void 0&&Number.isFinite(Number(s));r.push([o,a?Number(s):e]),a&&i++}return r}function Bs(t){let e=new WeakMap,n=$r(t)?t.documentElement:t,r=f=>f&&f.tagName==="LI",i=new WeakMap,o=f=>{let c=new Map;for(let[u,d]of f)c.set(u,d.slice());return c},s=(f,c,u)=>{let d=o(f),h;try{h=getComputedStyle(u)}catch{h=u.style}let m;try{m=h?.counterReset}catch{}if(m&&m!=="none")for(let[y,b]of pn(m,0)){let w=c.get(y);if(w&&w.length){let x=w.slice();x.push(b),d.set(y,x)}else d.set(y,[b])}let p;try{p=h?.counterSet}catch{}if(p&&p!=="none")for(let[y,b]of pn(p,0)){let w=d.get(y)||[];w.length===0&&w.push(0),w[w.length-1]=b,d.set(y,w)}let g;try{g=h?.counterIncrement}catch{}if(g&&g!=="none")for(let[y,b]of pn(g,1)){let w=d.get(y)||[];w.length===0&&w.push(0),w[w.length-1]+=b,d.set(y,w)}try{if(h?.display==="list-item"&&r(u)){let y=u.parentElement,b=y&&i.get(y),w=y?.tagName==="OL"?parseInt(y.getAttribute("start"),10):NaN,x=b===void 0?Number.isFinite(w)?w:1:b+1,C=y?.tagName==="OL"?parseInt(u.getAttribute("value"),10):NaN;Number.isFinite(C)&&(x=C),y&&i.set(y,x);let S=d.get("list-item")||[];S.length===0&&S.push(0),S[S.length-1]=x,d.set("list-item",S)}}catch{}return d},a=(f,c,u)=>{let d=s(u,c,f);e.set(f,d);let h=d;for(let p of f.children)h=a(p,d,h);let m=new Map;for(let[p,g]of u){let y=g.length,b=h.get(p);m.set(p,b&&b.length?b.slice(0,y):g.slice())}for(let[p,g]of h)!m.has(p)&&g.length&&!c.has(p)&&m.set(p,g.slice(0,1));return m},l=new Map;return a(n,l,l),{get(f,c){let u=e.get(f)?.get(c);return u&&u.length?u[u.length-1]:0},getStack(f,c){let u=e.get(f)?.get(c);return u?u.slice():[]}}}function Us(t,e,n){if(!t||t==="none")return t;try{let r=/\b(counter|counters)\s*\(([^)]+)\)/g;return t.replace(r,(i,o,s)=>{let a=String(s).split(",").map(l=>l.trim());if(o==="counter"){let l=a[0]?.replace(/^["']|["']$/g,""),f=(a[1]||"decimal").toLowerCase(),c=n.get(e,l);return Ds(c,f)}else{let l=a[0]?.replace(/^["']|["']$/g,""),f=a[1]?.replace(/^["']|["']$/g,"")??"",c=(a[2]||"decimal").toLowerCase(),u=n.getStack(e,l);return u.length?u.map(h=>Ds(h,c)).join(f):""}})}catch{return"- "}}le();var Ie=new WeakMap,zs=1e3;function jf(t,e){let n=qs(t);return e?(e.__pseudoPreflightFp!==n&&(Nt(),e.__pseudoPreflight=Hs(t,n),e.__pseudoPreflightFp=n),!!e.__pseudoPreflight):(Nt(),Hs(t,n))}function Vn(t){try{return t&&t.cssRules?t.cssRules:null}catch{return null}}function qs(t){let e=t.querySelectorAll('style,link[rel~="stylesheet"]'),n=`n:${e.length}|`,r=0;for(let s=0;s<e.length;s++){let a=e[s];if(a.tagName==="STYLE"){let l=a.textContent?a.textContent.length:0;n+=`S${l}|`;let f=a.sheet,c=f?Vn(f):null;c&&(r+=c.length)}else{let l=a.getAttribute("href")||"",f=a.getAttribute("media")||"all";n+=`L${l}|m:${f}|`;let c=a.sheet,u=c?Vn(c):null;u&&(r+=u.length)}}let i=t.adoptedStyleSheets,o=0;if(Array.isArray(i))for(let s of i){let a=Vn(s);a&&(o+=a.length)}return n+=`ass:${Array.isArray(i)?i.length:0}/${o}|tr:${r}`,n}function fo(t,e,n){let r=Vn(t);if(!r)return!1;for(let i=0;i<r.length;i++){if(n.budget<=0)return!1;let o=r[i],s=o&&o.cssText?o.cssText:"";n.budget--;for(let a of e)if(s.includes(a))return!0;if(o&&o.styleSheet&&fo(o.styleSheet,e,n))return!0;if(o&&o.cssRules&&o.cssRules.length)for(let a=0;a<o.cssRules.length&&n.budget>0;a++){let l=o.cssRules[a],f=l&&l.cssText?l.cssText:"";n.budget--;for(let c of e)if(f.includes(c))return!0}if(n.budget<=0)return!1}return!1}function Hs(t=document,e=qs(t)){let n=Ie.get(t);if(n&&n.fingerprint===e)return n.result;let r=a=>(a.match(/\|ass:[^|]*/)||[""])[0];n&&r(e)!==r(n.fingerprint)&&Fe();let i=["::before","::after","::first-letter","::marker","::first-line",":before",":after",":first-letter",":first-line","counter(","counters(","counter-increment","counter-reset"],o=t.querySelectorAll("style");for(let a=0;a<o.length;a++){let l=o[a].textContent||"";for(let f of i)if(l.includes(f))return Ie.set(t,{fingerprint:e,result:!0}),!0}let s=t.adoptedStyleSheets;if(Array.isArray(s)&&s.length){let a={budget:zs};try{for(let l of s)if(fo(l,i,a))return Ie.set(t,{fingerprint:e,result:!0}),!0}catch{}}{let a=t.querySelectorAll('style,link[rel~="stylesheet"]'),l={budget:zs};for(let f=0;f<a.length&&l.budget>0;f++){let c=a[f],u=null;if(c.tagName,u=c.sheet||null,u&&fo(u,i,l))return Ie.set(t,{fingerprint:e,result:!0}),!0}}return t.querySelector('[style*="counter("], [style*="counters("]')?(Ie.set(t,{fingerprint:e,result:!0}),!0):(Ie.set(t,{fingerprint:e,result:!1}),!1)}function js(t){for(let e of["Top","Right","Bottom","Left"]){let n=parseFloat(t[`border${e}Width`])||0,r=t[`border${e}Style`];if(n>0&&r&&r!=="none"&&r!=="hidden")return!0}return!1}function Vf(t,e){let n=null,r=()=>{if(!n)try{n=Bs(t)}catch(i){j(e,"Couldn't compute CSS counters; list numbers may be off.",i),n={get:()=>0,getStack:()=>[]}}return n};return{get(i,o){return r().get(i,o)},getStack(i,o){return r().getStack(i,o)}}}function qf(t){let e=!1;for(let n=0;n<t.length;n++){let r=t[n];if(r==='"')e=!e;else if(r==="/"&&!e)return t.slice(0,n).trim()}return t}function Gf(t){return t.replace(/\\(?:([0-9a-fA-F]{1,6})[ \t\n]?|([\s\S]))/g,(e,n,r)=>{if(n){let i=parseInt(n,16);return i===0||i>1114111?"\uFFFD":String.fromCodePoint(i)}return r===`
|
|
16
|
+
`?"":r})}function Xf(t){if(!t)return"";let e=[],n=/"((?:\\[\s\S]|[^"\\])*)"|'((?:\\[\s\S]|[^'\\])*)'/g,r=0,i;for(;i=n.exec(t);){let s=t.slice(r,i.index).trim();s&&e.push(s),e.push(Gf(i[1]!==void 0?i[1]:i[2])),r=n.lastIndex}let o=t.slice(r).trim();return o&&e.push(o),e.join("")}function uo(t,e,n){let r=t.parentElement,i=r&&n?n.get(r):null;return i?{get(o,s){let a=e.get(o,s),l=i.get(s);return typeof l=="number"?Math.max(a,l):a},getStack(o,s){let a=e.getStack(o,s);if(!a.length)return a;let l=i.get(s);if(typeof l=="number"){let f=a.slice();return f[f.length-1]=Math.max(f[f.length-1],l),f}return a}}:e}function po(t,e,n){let r=new Map,i=(f,c)=>pn(f,c).map(([u,d])=>({name:u,num:d})),o=i(e?.counterReset,0),s=i(e?.counterSet,0),a=i(e?.counterIncrement,1);function l(f){if(r.has(f))return r.get(f).slice();let c=n.getStack(t,f);c=c.length?c.slice():[];let u=o.find(m=>m.name===f);if(u){let m=Number.isFinite(u.num)?u.num:0;c=c.length?[...c,m]:[m]}let d=s.find(m=>m.name===f);if(d){let m=Number.isFinite(d.num)?d.num:0;c.length===0&&(c=[0]),c[c.length-1]=m}let h=a.find(m=>m.name===f);if(h){let m=Number.isFinite(h.num)?h.num:1;c.length===0&&(c=[0]),c[c.length-1]+=m}return r.set(f,c.slice()),c}return{get(f,c){let u=l(c);return u.length?u[u.length-1]:0},getStack(f,c){return l(c)},__incs:a}}var Yf=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","letter-spacing","line-height"],Kf=["color","-webkit-text-fill-color","font-family","font-size","font-weight","font-style","font-variant","letter-spacing","word-spacing","text-transform","text-decoration-line","text-decoration-color","text-decoration-style","line-height","background-color","vertical-align"];function Vs(t,e,n,r,i,o){try{if(r===null){if(t.getRootNode()!==(t.ownerDocument||document))return;let u=I(t).display||"";if(i==="::marker"?!u.includes("list-item"):!(u==="block"||u==="flow-root"||u==="list-item"||u==="inline-block"||u==="table-cell"||u==="table-caption"))return}else if(!t.matches(r))return;if(i==="::marker"&&!(I(t).display||"").includes("list-item"))return;let s=I(t,i),a=I(t);if(!s)return;let l="";for(let u of o){let d=s.getPropertyValue(u);d&&d!==a.getPropertyValue(u)&&!(u==="background-color"&&d==="rgba(0, 0, 0, 0)")&&!(u==="vertical-align"&&d==="baseline")&&(l+=`${u}:${d};`)}if(i==="::marker"){let u=s.getPropertyValue("content");u&&u!=="normal"&&u!=="none"&&(l+=`content:${u};`)}if(!l)return;let c=`data-sd-p${n.__pseudoRuleSeq=(n.__pseudoRuleSeq||0)+1}`;e.setAttribute(c,""),n.__pseudoCSS=(n.__pseudoCSS||"")+`[${c}]${i}{${l}}`}catch{}}function Qf(t,e){if(!/\b(?:no-)?(?:open|close)-quote\b/.test(t))return t;let n="\u201C",r="\u201D";try{let i=I(e).quotes;if(i==="none")n="",r="";else if(i&&i!=="auto"){let o=i.match(/"[^"]*"|'[^']*'/g);o&&o.length>=2&&(n=o[0].slice(1,-1),r=o[1].slice(1,-1))}}catch{}return n=n.replace(/"/g,""),r=r.replace(/"/g,""),t.replace(/"[^"]*"|\b(no-open-quote|no-close-quote|open-quote|close-quote)\b/g,(i,o)=>o?o==="open-quote"?`"${n}"`:o==="close-quote"?`"${r}"`:'""':i)}function Zf(t,e,n,r){let i;try{i=I(t,e)}catch{}let o=i?.content;if(!o||o==="none"||o==="normal")return{text:"",incs:[]};o=qf(o),o=Qf(o,t);let s=uo(t,n,r),a=po(t,i,s),l=Ws(o)?Us(o,t,a):o;return{text:Xf(l),incs:a.__incs||[]}}function Jf(t,e){if(e.__shadowPseudo)return!1;let n=te(t),r=[];for(let o of["before","after","firstLetter","marker","firstLine"]){let s=n[o];if(s===null)return!1;s&&r.push(s)}if(!r.length)return!0;let i=r.join(",");try{return!t.matches(i)&&t.querySelector(i)===null}catch{return!1}}async function Oe(t,e,n,r,i=!1){if(t?.nodeType!==1||e?.nodeType!==1||(n.slicer?.due()&&await n.slicer.pause(),t.tagName==="TEXTAREA"))return;let o=t.ownerDocument||document;if(!i&&!jf(o,n)&&!n.__shadowPseudo||!i&&Jf(t,n))return;n.__siblingCounters||(n.__siblingCounters=new WeakMap),n.__counterCtx||(n.__counterCtx=Vf(t.ownerDocument||document,n));let s=n.__counterCtx,a=te(t);a.marker!==""&&Vs(t,e,n,a.marker,"::marker",Yf),a.firstLine!==""&&Vs(t,e,n,a.firstLine,"::first-line",Kf);for(let f of["::before","::after","::first-letter"]){let c=a[f==="::before"?"before":f==="::after"?"after":"firstLetter"];if(c!==null){if(c==="")continue;try{if(!t.matches(c))continue}catch{}}try{let u=I(t,f);if(!u||u.content==="none"&&u.backgroundImage==="none"&&(u.backgroundColor==="transparent"||u.backgroundColor==="rgba(0, 0, 0, 0)")&&!js(u)&&(!u.transform||u.transform==="none")&&u.display==="inline")continue;if(u.display==="none"||f!=="::first-letter"&&(u.content==="none"||u.content==="normal")){f==="::before"&&(e.dataset.snapdomHasBefore="1"),f==="::after"&&(e.dataset.snapdomHasAfter="1");continue}if(f==="::first-letter"){let V=I(t),G=(V?.display||"").toLowerCase();if(G.includes("flex")||G.includes("grid"))continue;let H=Vt=>u[Vt]!==V[Vt]&&(parseFloat(u[Vt])||0)!==0;if(!(u.color!==V.color||u.fontSize!==V.fontSize||u.fontWeight!==V.fontWeight||u.fontFamily!==V.fontFamily||u.fontStyle!==V.fontStyle||u.textTransform!==V.textTransform||u.float!==V.float&&u.float!=="none"||H("paddingTop")||H("paddingRight")||H("paddingBottom")||H("paddingLeft")||H("marginTop")||H("marginRight")||H("marginBottom")||H("marginLeft")))continue;let K=Array.from(e.childNodes).find(Vt=>Vt.nodeType===Node.TEXT_NODE&&Vt.textContent?.trim().length>0);if(!K)continue;let kt=K.textContent,Se=/^\s*/.exec(kt)[0],Sn=kt.slice(Se.length),Ye=Sn.match(/^([^\p{L}\p{N}\s]*[\p{L}\p{N}](?:['’])?)/u)?.[0],Mr=Sn.slice(Ye?.length||0);if(!Ye||/[\uD800-\uDFFF]/.test(Ye))continue;let jt=document.createElement("span");jt.textContent=Ye,jt.dataset.snapdomPseudo="::first-letter";let Ar=Me(u,_n(t)),_r=ke(Ar,"span");n.styleMap.set(jt,_r);let xn=document.createTextNode(Mr);e.replaceChild(xn,K),e.insertBefore(jt,xn),Se&&e.insertBefore(document.createTextNode(Se),jt);continue}let m=u.content??"",p=m===""||m==="none"||m==="normal",{text:g,incs:y}=Zf(t,f,s,n.__siblingCounters),b=u.backgroundImage,w=u.backgroundColor,x=u.fontFamily,C=parseInt(u.fontSize)||32,S=parseInt(u.fontWeight)||!1,k=u.fontStyle||"normal",E=u.color||"#000",R=u.transform,v=It(x,r?.__iconMatchers),M=!p&&g!=="",_=b&&b!=="none",T=w&&w!=="transparent"&&w!=="rgba(0, 0, 0, 0)",$=js(u),N=R&&R!=="none",F=m!=="none"&&m!=="normal",A=/^inline-/.test(u.display||""),L=F&&((parseFloat(u.width)||0)>0||(parseFloat(u.height)||0)>0||A),O=F&&u.boxShadow&&u.boxShadow!=="none",P=F&&u.outlineStyle&&u.outlineStyle!=="none"&&(parseFloat(u.outlineWidth)||0)>0;if(!(M||_||T||$||N||L||O||P)){if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map;for(let{name:G}of y){if(!G)continue;let H=uo(t,s,n.__siblingCounters),K=po(t,I(t,f),H).get(t,G);V.set(G,K)}n.__siblingCounters.set(t.parentElement,V)}continue}let q=g.startsWith("url(")||/^-?(?:webkit-)?image-set\(/i.test(g),U=u.display==="inline"&&u.cssFloat==="none"&&u.position!=="absolute"&&u.position!=="fixed",Y=!1;if(M&&!v&&g.length>1&&!q&&U){let V=I(t),G=parseFloat(V.fontSize)||16,H=parseFloat(V.lineHeight);Number.isFinite(H)||(H=G*1.5),t.getBoundingClientRect().height<H*1.6&&(e.style.whiteSpace="nowrap",Y=!0)}let B=document.createElement("span");B.dataset.snapdomPseudo=f,B.style.pointerEvents="none",Y&&(B.style.whiteSpace="nowrap");let dt=Hi(t,f,u,n,r),pt=(I(t).display||"").toLowerCase(),nt=pt.includes("flex")||pt.includes("grid");if(nt){let V=dt["min-width"];(!V||V==="auto"||V==="0px")&&(dt["min-width"]="0px")}let st=M;st&&!U&&parseFloat(u.height)>=1.5*(parseFloat(u.lineHeight)||(parseFloat(u.fontSize)||16)*1.2)&&(st=!1,B.style.whiteSpace=u.whiteSpace);let yt=ke(dt,"span",st,nt);if(n.styleMap.set(B,yt),v&&g&&g.length===1){let{dataUrl:V,width:G,height:H}=await Rs(g,x,S,C,E,k),ht=document.createElement("img");ht.src=V,ht.style=`height:${C}px;width:${G/H*C}px;object-fit:contain;`,B.appendChild(ht),e.dataset.snapdomHasIcon="true"}else if(g&&q){let V=Qe(g,typeof devicePixelRatio<"u"&&devicePixelRatio||1)??ae(g);if(V?.trim())try{let G=await at(Gt(V),{as:"dataURL",useProxy:r.useProxy});if(G?.ok&&typeof G.data=="string"){let H=document.createElement("img");H.src=G.data,H.style=`width:${C}px;height:auto;object-fit:contain;`,B.appendChild(H)}}catch(G){console.warn(`[SnapDOM] Couldn't draw the ${f} icon of`,t,G)}}else!v&&M&&(B.textContent=g);B.style.backgroundImage="none","maskImage"in B.style&&(B.style.maskImage="none"),"webkitMaskImage"in B.style&&(B.style.webkitMaskImage="none");try{B.style.backgroundRepeat=u.backgroundRepeat,B.style.backgroundSize=u.backgroundSize,u.backgroundPositionX&&u.backgroundPositionY?(B.style.backgroundPositionX=u.backgroundPositionX,B.style.backgroundPositionY=u.backgroundPositionY):B.style.backgroundPosition=u.backgroundPosition,B.style.backgroundOrigin=u.backgroundOrigin,B.style.backgroundClip=u.backgroundClip,B.style.backgroundAttachment=u.backgroundAttachment,B.style.backgroundBlendMode=u.backgroundBlendMode}catch{}if(_)try{let V=Yt(b),G=await Promise.all(V.map(H=>ve(H,r)));B.style.backgroundImage=G.join(", ")}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} background image.`,V)}T&&(B.style.backgroundColor=w);let bt=u.maskImage||u.webkitMaskImage;if(bt&&bt!=="none")try{let G=(await Promise.all(Yt(bt).map(H=>ve(H,r)))).join(", ");B.style.maskImage=G,B.style.webkitMaskImage=G;for(let H of["maskSize","maskRepeat","maskPosition","maskMode","maskComposite","maskOrigin","maskClip"])u[H]&&(B.style[H]=u[H])}catch(V){console.warn(`[SnapDOM] Couldn't load the ${f} mask image.`,V)}let Dt=B.childNodes.length>0||B.textContent?.trim()!==""||_||T||$||N||L||O||P;if(y&&y.length&&t.parentElement){let V=n.__siblingCounters.get(t.parentElement)||new Map,G=uo(t,s,n.__siblingCounters),H=po(t,I(t,f),G);for(let{name:ht}of y){if(!ht)continue;let K=H.get(t,ht);V.set(ht,K)}n.__siblingCounters.set(t.parentElement,V)}if(!Dt)continue;f==="::before"?(e.dataset.snapdomHasBefore="1",e.insertBefore(B,e.firstChild)):(e.dataset.snapdomHasAfter="1",e.appendChild(B))}catch(u){console.warn(`[SnapDOM] Couldn't copy the ${f} of`,t,u)}}let l=Array.from(e.children).filter(f=>!f.dataset.snapdomPseudo);if(n.nodeMap)for(let f of l){let c=n.nodeMap.get(f);c?.nodeType===1&&await Oe(c,f,n,r,!0)}else{let f=Array.from(t.children);for(let c=0;c<Math.min(f.length,l.length);c++)await Oe(f[c],l[c],n,r,!0)}}At();function Gs(t,e,n){if(!t||t?.nodeType!==1)return;let r=t.ownerDocument||document,i=e||r,o=Tt(t)&&t.localName==="svg"?[t]:Array.from(t.querySelectorAll("svg")),s=/url\(\s*["']?\s*#([^)"']+)/g,a=["fill","stroke","filter","clip-path","mask","marker","marker-start","marker-mid","marker-end"],l=S=>window.CSS&&CSS.escape?CSS.escape(S):S.replace(/[^a-zA-Z0-9_-]/g,"\\$&"),f="http://www.w3.org/1999/xlink",c=S=>{if(!S||!S.getAttribute)return null;let k=S.getAttribute("href")||S.getAttribute("xlink:href")||(typeof S.getAttributeNS=="function"?S.getAttributeNS(f,"href"):null);if(k)return k;let E=S.attributes;if(!E)return null;for(let R=0;R<E.length;R++){let v=E[R];if(!v||!v.name)continue;if(v.name==="href")return v.value;let M=v.name.indexOf(":");if(M!==-1&&v.name.slice(M+1)==="href")return v.value}return null},u=new Set(Array.from(t.querySelectorAll("[id]")).map(S=>S.id)),d=new Set,h=!1,m=(S,k=null)=>{if(!S)return;s.lastIndex=0;let E;for(;E=s.exec(S);){h=!0;let R=(E[1]||"").trim();R&&(u.has(R)||(d.add(R),k&&!k.has(R)&&k.add(R)))}},p=S=>{let k=S.querySelectorAll("use");for(let v of k){let M=c(v);if(!M||!M.startsWith("#"))continue;h=!0;let _=M.slice(1).trim();_&&!u.has(_)&&d.add(_)}let E='*[style*="url("],*[fill^="url("], *[stroke^="url("],*[filter^="url("],*[clip-path^="url("],*[mask^="url("],*[marker^="url("],*[marker-start^="url("],*[marker-mid^="url("],*[marker-end^="url("]';m(S.getAttribute("style")||"");for(let v of a)m(S.getAttribute(v));let R=S.querySelectorAll(E);for(let v of R){m(v.getAttribute("style")||"");for(let M of a)m(v.getAttribute(M))}},g=S=>{if(!S||S.nodeType!==1||!S.querySelectorAll)return;let k="filter[id],clipPath[id],mask[id],linearGradient[id],radialGradient[id],pattern[id]",E=!1;try{E=!!(i.querySelector&&i.querySelector(k))}catch{return}if(!E)return;let R=["filter","clipPath","mask","maskImage","webkitMaskImage"],v=M=>{if(Tt(M))return;let _;try{_=getComputedStyle(M)}catch{return}for(let T of R){let $=_[T];$&&$.includes("url(")&&m($)}};v(S);for(let M of S.querySelectorAll("*"))v(M)};for(let S of o)p(S);if(g(n),!h)return;let y=t.querySelector("svg.inline-defs-container");y||(y=r.createElementNS("http://www.w3.org/2000/svg","svg"),y.classList.add("inline-defs-container"),y.setAttribute("aria-hidden","true"),y.setAttribute("style","position:absolute;width:0;height:0;overflow:hidden"),t.insertBefore(y,t.firstChild||null));let b=y.querySelector("defs")||null,w=S=>{if(!S||u.has(S))return null;let k=l(S),E=R=>{let v=i.querySelector(R);return v&&!t.contains(v)?v:null};return E(`svg defs > *#${k}`)||E(`svg > symbol#${k}`)||E(`*#${k}`)};if(!d.size)return;let x=new Set(d),C=new Set;for(;x.size;){let S=x.values().next().value;if(x.delete(S),!S||u.has(S)||C.has(S))continue;let k=w(S);if(!k){C.add(S);continue}b||(b=r.createElementNS("http://www.w3.org/2000/svg","defs"),y.appendChild(b));let E=k.cloneNode(!0);E.id||E.setAttribute("id",S),b.appendChild(E),C.add(S),u.add(S);let R=[E,...E.querySelectorAll("*")];for(let v of R){let M=c(v);if(M&&M.startsWith("#")){let T=M.slice(1).trim();T&&!u.has(T)&&!C.has(T)&&x.add(T)}let _=v.getAttribute?.("style")||"";_&&m(_,x);for(let T of a){let $=v.getAttribute?.(T);$&&m($,x)}}}}At();var ho=new WeakMap,mo=new WeakMap;function qn(t,e,n){let r=n.get(t),i=t.style;if(!r){let s=i.cssText,a=t.hasAttribute("style");r={users:0,saved:e.map(([f,c])=>{let u={property:f,value:i.getPropertyValue(f),priority:i.getPropertyPriority(f)};return i.setProperty(f,c,"important"),u.forcedValue=i.getPropertyValue(f),u}),originalCSS:s,forcedCSS:i.cssText,hadStyle:a},n.set(t,r)}r.users++;let o=!1;return()=>{if(!o&&(o=!0,!--r.users)){if(n.delete(t),i.cssText===r.forcedCSS)i.cssText=r.originalCSS;else for(let s of r.saved)i.getPropertyValue(s.property)!==s.forcedValue||i.getPropertyPriority(s.property)!=="important"||(s.value?i.setProperty(s.property,s.value,s.priority):i.removeProperty(s.property));!r.hadStyle&&!i.length&&(t.getAttribute("style"),t.removeAttribute("style"))}}}function Xs(t){if(ho.has(t))return qn(t,[],ho);let e=getComputedStyle(t),n=e.outlineStyle,r=e.outlineWidth,i=n!=="none"&&parseFloat(r)>0,o=parseFloat(e.borderTopWidth)===0&&parseFloat(e.borderRightWidth)===0&&parseFloat(e.borderBottomWidth)===0&&parseFloat(e.borderLeftWidth)===0;if(i&&o){let s=[];for(let a of["top","right","bottom","left"])s.push([`border-${a}-width`,r],[`border-${a}-style`,"solid"],[`border-${a}-color`,"transparent"]);return qn(t,s,ho)}return()=>{}}function Gn(t,e=null){let n=[],r=i=>{if(!Mt(i))return;if(mo.has(i)){n.push(qn(i,[],mo));return}let o=getComputedStyle(i);(o.contentVisibility||o.getPropertyValue("content-visibility")||"")==="auto"&&n.push(qn(i,[["content-visibility","visible"]],mo))};try{if(e){let o=s=>{let a;try{a=s.getBoundingClientRect()}catch{return}if(!((a.width>0||a.height>0)&&(a.right<e.left-200||a.left>e.right+200||a.bottom<e.top-200||a.top>e.bottom+200))){r(s);for(let l=s.firstElementChild;l;l=l.nextElementSibling)o(l)}};o(t)}else{for(let i of t.querySelectorAll("*"))r(i);r(t)}}catch{}return()=>{for(let i of n)try{i()}catch{}}}vt();wt();_t();Ae();_t();function yo(t){return Ks(t.boxShadow)}function bo(t){return Ks(t.textShadow)}function Ks(t){if(!t||t==="none")return{top:0,right:0,bottom:0,left:0};let e=[],n="",r=0;for(let l=0;l<t.length;l++){let f=t[l];f==="("?r++:f===")"&&(r=Math.max(0,r-1)),f===","&&r===0?(e.push(n),n=""):n+=f}n.trim()&&e.push(n);let i=0,o=0,s=0,a=0;for(let l of e){if(/\binset\b/i.test(l))continue;let f=l.match(/-?\d+(\.\d+)?px/g)?.map(g=>parseFloat(g))||[];if(f.length<2)continue;let[c,u,d=0,h=0]=f,m=Math.abs(c)+d+h,p=Math.abs(u)+d+h;o=Math.max(o,m+Math.max(c,0)),a=Math.max(a,m+Math.max(-c,0)),s=Math.max(s,p+Math.max(u,0)),i=Math.max(i,p+Math.max(-u,0))}return{top:Math.ceil(i),right:Math.ceil(o),bottom:Math.ceil(s),left:Math.ceil(a)}}function wo(t){let e=t.filter&&t.filter!=="none"?t.filter:t.webkitFilter||"",n=/blur\(\s*([0-9.]+)px\s*\)/gi,r=0,i;for(;i=n.exec(e);)r+=parseFloat(i[1])||0;let o=Math.ceil(r*2);return{top:o,right:o,bottom:o,left:o}}function So(t){if((t.outlineStyle||"none")==="none")return{top:0,right:0,bottom:0,left:0};let e=Math.ceil(parseFloat(t.outlineWidth||"0")||0),n=parseFloat(t.outlineOffset||"0")||0,r=e+Math.max(0,Math.ceil(n));return{top:r,right:r,bottom:r,left:r}}function xo(t){let e=`${t.filter||""} ${t.webkitFilter||""}`.trim();if(!e||e==="none")return{bleed:{top:0,right:0,bottom:0,left:0},has:!1};let n=e.match(/drop-shadow\((?:[^()]|\([^()]*\))*\)/gi)||[],r=0,i=0,o=0,s=0,a=!1;for(let l of n){a=!0;let f=l.match(/-?\d+(?:\.\d+)?px/gi)?.map(p=>parseFloat(p))||[],[c=0,u=0,d=0]=f,h=Math.abs(c)+d,m=Math.abs(u)+d;i=Math.max(i,h+Math.max(c,0)),s=Math.max(s,h+Math.max(-c,0)),o=Math.max(o,m+Math.max(u,0)),r=Math.max(r,m+Math.max(-u,0))}return{bleed:{top:W(r),right:W(i),bottom:W(o),left:W(s)},has:a}}function tu(t){let e=yo(t),n=bo(t),r=wo(t),i=So(t),o=xo(t);return{top:Math.max(e.top,n.top)+r.top+i.top+o.bleed.top,right:Math.max(e.right,n.right)+r.right+i.right+o.bleed.right,bottom:Math.max(e.bottom,n.bottom)+r.bottom+i.bottom+o.bleed.bottom,left:Math.max(e.left,n.left)+r.left+i.left+o.bleed.left}}function eu(t){return t.boxShadow&&t.boxShadow!=="none"||t.textShadow&&t.textShadow!=="none"||(t.outlineStyle||"none")!=="none"||t.filter&&t.filter!=="none"?!0:!!t.webkitFilter&&t.webkitFilter!=="none"}function Ys(t){let e=t.overflowX||t.overflow||"visible",n=t.overflowY||t.overflow||"visible",r=!!t.contain&&/\b(paint|content|strict)\b/.test(t.contain)||!!t.clipPath&&t.clipPath!=="none";return{x:r||e!=="visible",y:r||n!=="visible"}}function Qs(t,e,n,r=1,i=1){let o=0,s=0,a=0,l=0,f=Ys(n.get(t)||I(t));if(f.x&&f.y)return{top:0,right:0,bottom:0,left:0};let c=t.getBoundingClientRect();for(let u of e.values()){if(u===t||u.nodeType!==1||u.ownerDocument!==t.ownerDocument)continue;let d=n.get(u);if(!d||!eu(d))continue;let h=tu(d);if(!(h.top||h.right||h.bottom||h.left))continue;let m=u.getBoundingClientRect(),p={left:m.left-h.left/r,top:m.top-h.top/i,right:m.right+h.right/r,bottom:m.bottom+h.bottom/i};for(let g=u.parentElement;g;g=g.parentElement){let y=Ys(n.get(g)||I(g));if(y.x||y.y){let b=g.getBoundingClientRect();y.x&&(p.left=Math.max(p.left,b.left),p.right=Math.min(p.right,b.right)),y.y&&(p.top=Math.max(p.top,b.top),p.bottom=Math.min(p.bottom,b.bottom))}if(g===t)break}f.x||(l=Math.max(l,(c.left-p.left)*r),s=Math.max(s,(p.right-c.right)*r)),f.y||(o=Math.max(o,(c.top-p.top)*i),a=Math.max(a,(p.bottom-c.bottom)*i))}return{top:Math.max(0,Math.ceil(o)),right:Math.max(0,Math.ceil(s)),bottom:Math.max(0,Math.ceil(a)),left:Math.max(0,Math.ceil(l))}}function Zs(t,e){if(!t||!e||!e.style)return null;let n=getComputedStyle(t);try{e.style.transformOrigin="0 0"}catch{}try{"translate"in e.style&&(e.style.translate="none"),"rotate"in e.style&&(e.style.rotate="none")}catch{}let r=n.transform||"none";if(!r||r==="none"){let l=null;try{l=he(t).scale}catch{}try{e.style.transform="none"}catch{}if(!l)return{a:1,b:0,c:0,d:1};let f=ne({scale:l});return{a:f.a,b:f.b,c:f.c,d:f.d}}function i(l,f,c,u){let d=Math.sqrt(l*l+f*f)||0,h=0,m=0;if(d>0){let p=l/d,g=f/d;h=p*c+g*u;let y=c-p*h,b=u-g*h;m=Math.sqrt(y*y+b*b)||0,m>0?h=h/m:h=0}return{a:d,b:0,c:h*m,d:m}}let o=l=>{let f=he(t).scale;if(!f)return l;let c=ne({scale:f,baseTransform:`matrix(${l.a},${l.b},${l.c},${l.d},0,0)`});return{a:c.a,b:c.b,c:c.c,d:c.d}},s=r.match(/^matrix\(\s*([^)]+)\)$/i);if(s){let l=s[1].split(",").map(f=>parseFloat(f.trim()));if(l.length===6&&l.every(Number.isFinite)){let[f,c,u,d]=l,h=i(f,c,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}let a=r.match(/^matrix3d\(\s*([^)]+)\)$/i);if(a){let l=a[1].split(",").map(f=>parseFloat(f.trim()));if(l.length===16&&l.every(Number.isFinite)){let f=l[0],c=l[1],u=l[4],d=l[5],h=i(f,c,u,d);try{e.style.transform=`matrix(${h.a}, ${h.b}, ${h.c}, ${h.d}, 0, 0)`}catch{}return o(h)}}try{let l=new DOMMatrix(r),f=i(l.a,l.b,l.c,l.d);try{e.style.transform=`matrix(${f.a}, ${f.b}, ${f.c}, ${f.d}, 0, 0)`}catch{}return o(f)}catch{return null}}function De(t,e,n,r,i){let o=n.a,s=n.b,a=n.c,l=n.d,f=n.e||0,c=n.f||0;function u(y,b){let w=y-r,x=b-i,C=o*w+a*x,S=s*w+l*x;return C+=r+f,S+=i+c,[C,S]}let d=[u(0,0),u(t,0),u(0,e),u(t,e)],h=1/0,m=1/0,p=-1/0,g=-1/0;for(let[y,b]of d)y<h&&(h=y),b<m&&(m=b),y>p&&(p=y),b>g&&(g=b);return{minX:h,minY:m,maxX:p,maxY:g,width:p-h,height:g-m}}function hn(t,e,n){let r=(t.transformOrigin||"0 0").trim().split(/\s+/),[i,o]=[r[0]||"0",r[1]||"0"],s=(a,l)=>{let f=a.toLowerCase();return f==="left"||f==="top"?0:f==="center"?l/2:f==="right"||f==="bottom"?l:f.endsWith("px")?parseFloat(f)||0:f.endsWith("%")?(parseFloat(f)||0)*l/100:/^-?\d+(\.\d+)?$/.test(f)&&parseFloat(f)||0};return{ox:s(i,e),oy:s(o,n)}}function he(t){let e={rotate:"0deg",scale:null,translate:null},n=null;try{n=typeof t.computedStyleMap=="function"?t.computedStyleMap():null}catch{}if(n){let i=l=>{try{return typeof n.has=="function"&&!n.has(l)||typeof n.get!="function"?null:n.get(l)}catch{return null}},o=i("rotate");if(o)if(o.angle){let l=o.angle;e.rotate=l.unit==="rad"?l.value*180/Math.PI+"deg":l.value+l.unit,o.is2D===!1&&o.x&&o.y&&o.z&&(e.rotate=`${o.x.value} ${o.y.value} ${o.z.value} ${e.rotate}`)}else o.unit?e.rotate=o.unit==="rad"?o.value*180/Math.PI+"deg":o.value+o.unit:e.rotate=String(o);else{let l=getComputedStyle(t);e.rotate=l.rotate&&l.rotate!=="none"?l.rotate:"0deg"}let s=i("scale");if(s){let l=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":""}`:null;"x"in s&&s.x?.value!=null?e.scale=[l(s.x),l(s.y)??l(s.x),...s.is2D===!1?[l(s.z)??"1"]:[]].join(" "):Array.isArray(s)?e.scale=s.map(l).join(" "):e.scale=String(s)}else{let l=getComputedStyle(t);e.scale=l.scale&&l.scale!=="none"?l.scale:null}let a=i("translate");if(a){let l=f=>f&&f.value!=null?`${f.value}${f.unit==="percent"?"%":f.unit||"px"}`:null;"x"in a&&a.x?.value!=null?e.translate=[l(a.x),l(a.y)??"0px",...a.is2D===!1?[l(a.z)??"0px"]:[]].join(" "):Array.isArray(a)?e.translate=a.map(l).join(" "):e.translate=String(a)}else{let l=getComputedStyle(t);e.translate=l.translate&&l.translate!=="none"?l.translate:null}return(!e.rotate||e.rotate==="none")&&(e.rotate="0deg"),(!e.scale||e.scale==="none")&&(e.scale=null),(!e.translate||e.translate==="none")&&(e.translate=null),e}let r=getComputedStyle(t);return e.rotate=r.rotate&&r.rotate!=="none"?r.rotate:"0deg",e.scale=r.scale&&r.scale!=="none"?r.scale:null,e.translate=r.translate&&r.translate!=="none"?r.translate:null,e}var go=null;function nu(){if(go?.isConnected)return go;let t=document.createElement("div");return t.id="snapdom-measure-slot",t.setAttribute("aria-hidden","true"),J(t),Object.assign(t.style,{position:"absolute",left:"-99999px",top:"0px",width:"0px",height:"0px",overflow:"hidden",opacity:"0",pointerEvents:"none",contain:"size layout style"}),document.documentElement.appendChild(t),go=t,t}function ne(t){let e=o=>{let s=[],a=0,l=0,f=String(o).trim();for(let c=0;c<f.length;c++)f[c]==="("?a++:f[c]===")"?a--:/\s/.test(f[c])&&!a&&(c>l&&s.push(f.slice(l,c)),l=c+1);return l<f.length&&s.push(f.slice(l)),s},n=o=>o&&o!=="none",r=[];if(n(t.translate)){let o=e(t.translate);for(let s=0;s<2&&s<o.length;s++){let a=s===0?t.width:t.height;/^[+-]?(?:\d*\.)?\d+%$/.test(o[s])&&Number.isFinite(a)&&(o[s]=`${parseFloat(o[s])*a/100}px`)}r.push(o.length>2?`translate3d(${o.join(",")})`:`translate(${o.join(",")})`)}if(n(t.rotate)&&t.rotate!=="0deg"){let o=e(t.rotate);o.length===4?r.push(`rotate3d(${o.join(",")})`):o.length===2&&/^[xyz]$/i.test(o[0])?r.push(`rotate${o[0].toUpperCase()}(${o[1]})`):r.push(`rotate(${o.join(" ")})`)}if(n(t.scale)){let o=e(t.scale).map(s=>/%$/.test(s)?String(parseFloat(s)/100):s);r.push(o.length>2?`scale3d(${o.join(",")})`:`scale(${o.join(",")})`)}if(n(t.baseTransform)&&r.push(t.baseTransform),!r.length)return new DOMMatrix;let i=r.join(" ");try{if(i.includes("%"))throw new Error("Transform needs a reference box");return new DOMMatrix(i)}catch{let o=nu(),s=document.createElement("div");if(s.style.cssText="all:initial!important;display:block!important;transform-origin:0 0!important",s.style.setProperty("width",`${Number.isFinite(t.width)?t.width:0}px`,"important"),s.style.setProperty("height",`${Number.isFinite(t.height)?t.height:0}px`,"important"),s.style.setProperty("transform",i,"important"),!s.style.transform)throw new Error("[SnapDOM] Couldn't read the transform of an element.");o.appendChild(s);try{return ru(s)}finally{s.remove()}}}function Js(t){let e=I(t),n=e.transform||"none";if(n!=="none"&&!/^matrix\(\s*1\s*,\s*0\s*,\s*0\s*,\s*1\s*,\s*0\s*,\s*0\s*\)$/i.test(n))return!0;let i=e.rotate&&e.rotate!=="none"&&e.rotate!=="0deg",o=e.scale&&e.scale!=="none"&&e.scale!=="1",s=e.translate&&e.translate!=="none"&&e.translate!=="0px 0px";return!!(i||o||s)}function ru(t){let e=getComputedStyle(t).transform;if(!e||e==="none")return new DOMMatrix;try{return new DOMMatrix(e)}catch{return new WebKitCSSMatrix(e)}}var ra=new WeakSet;function Xn(t,e){if(!e)return null;let n=t.ownerDocument||document,r=n.defaultView||window,i,o,s,a;if(e==="viewport")i=0,o=0,s=n.documentElement?.clientWidth||r.innerWidth,a=n.documentElement?.clientHeight||r.innerHeight;else if(typeof e=="object")i=(Number(e.x)||0)-(r.scrollX||0),o=(Number(e.y)||0)-(r.scrollY||0),s=Number(e.width),a=Number(e.height);else return null;return s>0&&a>0?{left:i,top:o,width:s,height:a,right:i+s,bottom:o+a}:null}function vo(t){if(t.parentElement)return t.parentElement;let e=t.getRootNode&&t.getRootNode();return Wt(e)?e.host:null}function ou(t,e){for(let n=e;n;n=vo(n))if(n===t)return!0;return!1}function iu(t,e){for(let n=vo(t);n&&n!==e&&n?.nodeType===1;n=vo(n)){let r=I(n);if(r.position!=="static"||r.transform&&r.transform!=="none"||r.filter&&r.filter!=="none"||r.backdropFilter&&r.backdropFilter!=="none"||r.perspective&&r.perspective!=="none"||/transform|perspective|filter/.test(r.willChange||"")||/layout|paint|strict|content/.test(r.contain||""))return n}return null}function ko(t,e){try{return ne({baseTransform:t,rotate:e?.rotate,scale:e?.scale})}catch{return null}}function oa(t,e,n,r,i){let o=t.getBoundingClientRect();Mt(e)&&I(t).position==="static"&&(e.style.position="relative");let s=[];for(let[a,l]of n){if(l?.nodeType!==1)continue;let f=a.localName==="svg"&&Tt(a)&&!Tt(l.parentNode);if(!Mt(a)&&!f||l===t||!ou(t,l))continue;let c=r.get(l)||I(l),u=c.position;if(u!=="fixed"&&u!=="sticky"&&u!=="-webkit-sticky"||a.style.position==="absolute")continue;let d=l.getBoundingClientRect();if(!(d.width>0&&d.height>0))continue;ra.add(a);let h=c.transform&&c.transform!=="none"?c.transform:"",m=he(l),p=!!(h||m.rotate!=="0deg"||m.scale||m.translate),g=p?ko(h,m):null,y=!g||!g.is2D||g.a===1&&g.b===0&&g.c===0&&g.d===1,b=d.width,w=d.height;y||(b=l.offsetWidth||d.width,w=l.offsetHeight||d.height);let x=l.getRootNode&&Wt(l.getRootNode()),C=o,S=t.clientLeft||0,k=t.clientTop||0;if(x){let _=iu(l,t);_&&(C=_.getBoundingClientRect(),S=_.clientLeft||0,k=_.clientTop||0)}let E=d.left-C.left-S,R=d.top-C.top-k;if(p)if(a.style.translate="none",a.style.rotate="none",a.style.scale="none",y)a.style.transform="none";else{a.style.transform=`matrix(${g.a},${g.b},${g.c},${g.d},0,0)`;let{ox:_,oy:T}=hn(c,b,w),$=De(b,w,{a:g.a,b:g.b,c:g.c,d:g.d,e:0,f:0},_,T);E-=$.minX,R-=$.minY}if(u!=="fixed"){let _=a.cloneNode(!1);_.setAttribute("data-snap-ph","1"),_.style.position="static",_.style.visibility="hidden",_.style.width=`${b}px`,_.style.height=`${w}px`,_.style.boxSizing="border-box",a.parentElement?.insertBefore(_,a)}let v=f?b:b+2,M=w;i&&(Math.abs(R-i.y)<.5&&(R-=1,M+=1),Math.abs(E-i.x)<.5&&(E-=1,v+=1)),a.style.position="absolute",a.style.left=`${E}px`,a.style.top=`${R}px`,a.style.right="auto",a.style.bottom="auto",a.style.margin="0",a.style.width=`${v}px`,a.style.height=`${M}px`,a.style.boxSizing="border-box",x||s.push(a)}for(let a of s)e.appendChild(a)}function ia(t,e,n={}){if(!t||!e||!e.style)return;let r=getComputedStyle(t);try{e.style.boxShadow="none"}catch(s){j(n,"Couldn't remove the root box-shadow.",s)}try{e.style.textShadow="none"}catch(s){j(n,"Couldn't remove the root text-shadow.",s)}try{e.style.outline="none"}catch(s){j(n,"Couldn't remove the root outline.",s)}let o=(r.filter||"").replace(/\bdrop-shadow\((?:[^()]|\([^()]*\))*\)\s*/gi,"").trim().replace(/\s+/g," ");try{e.style.filter=o.length?o:"none"}catch(s){j(n,"Couldn't remove the root drop-shadow filter.",s)}}function sa(t,e){if(!t||!e||!e.style)return;let n=1;try{n=parseFloat(getComputedStyle(t).zoom)}catch{return}if(!(!e.style.getPropertyValue("zoom")&&(!Number.isFinite(n)||n===1)))try{e.style.setProperty("zoom","1","important")}catch{}}function ta(t){let e=t.display||"";if(e.includes("flex")||e.includes("grid")||e.startsWith("table")||e==="inline-block"||e==="flow-root"||t.position==="absolute"||t.position==="fixed"||t.float&&t.float!=="none")return!0;let n=t.overflowX||t.overflow||"visible",r=t.overflowY||t.overflow||"visible";return!!(n!=="visible"||r!=="visible"||t.contain&&/\b(layout|content|paint|strict)\b/.test(t.contain))}function su(t,e){let n=Array.from(t.childNodes),r=e==="top"?n:n.reverse();for(let i of r){if(i.nodeType===Node.TEXT_NODE){if(/\S/.test(i.textContent||""))return null;continue}if(i.nodeType!==Node.ELEMENT_NODE)continue;let o=getComputedStyle(i),s=String(o.display||"");if(!(s==="none"||s==="contents")&&!(o.position==="absolute"||o.position==="fixed"))return o.float&&o.float!=="none"||s.startsWith("inline")?null:i}return null}function aa(t,e,n){if(!t||!e||!e.style)return;let r=getComputedStyle(t);if(!ta(r))for(let i of["top","bottom"]){let o=i==="top"?"Top":"Bottom";if((parseFloat(r[`border${o}Width`])||0)>0||(parseFloat(r[`padding${o}`])||0)>0)continue;let s=t,a=e;for(;s&&a;){let l=su(s,i);if(!l)break;let f=n?Array.from(a.children).find(d=>n.get(d)===l)||null:a.children[Array.from(s.children).indexOf(l)]||null,c=getComputedStyle(l),u=parseFloat(c[`margin${o}`])||0;if(f&&f.style&&u>0&&(f.style[`margin${o}`]="0px"),ta(c)||(parseFloat(c[`border${o}Width`])||0)>0||(parseFloat(c[`padding${o}`])||0)>0)break;s=l,a=f}}}var au=new Set(["xml","xlink"]);function lu(t,e){if(t.startsWith("*")||t==="xmlns"||t.includes("@"))return!0;if(t.includes(":")){let n=t.split(":",1)[0];if(!au.has(n))return!0}return e?t.startsWith("x-")||t.startsWith("v-")||t.startsWith(":")||t.startsWith("on:")||t.startsWith("bind:")||t.startsWith("let:")||t.startsWith("class:"):!1}var cu=/[\uD800-\uDBFF][\uDC00-\uDFFF]|[\x00-\x08\x0B\x0C\x0E-\x1F\uD800-\uDFFF\uFFFE\uFFFF]/g,ea=t=>t.replace(cu,e=>e.length===2?e:""),fu=/^data:[^,]{0,120};base64,/;function Yn(t,e={}){if(!t)return;let{stripFrameworkDirectives:n=!0}=e,r=a=>{for(let l of Array.from(a.attributes)){if(lu(l.name,n)){a.removeAttribute(l.name);continue}if(fu.test(l.value))continue;let f=ea(l.value);if(f!==l.value)try{a.setAttribute(l.name,f)}catch{}}};t.nodeType===Node.ELEMENT_NODE&&r(t);let i=[],o=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT|NodeFilter.SHOW_COMMENT),s;for(;s=o.nextNode();)if(s.nodeType===Node.ELEMENT_NODE)r(s);else if(s.nodeType===Node.COMMENT_NODE)i.push(s);else{let a=ea(s.data);a!==s.data&&(s.data=a)}for(let a of i)a.remove()}function uu(t){try{let e=t.getAttribute?.("style")||"";return/\b(height|width|block-size|inline-size)\s*:/.test(e)}catch{return!1}}var du=new Set(["img","canvas","video","iframe","object","embed"]);function pu(t){return Tt(t)||du.has(t?.localName)}function hu(t,e){if(t?.nodeType!==1||uu(t)||pu(t))return!1;let n=e.position;if(n==="absolute"||n==="fixed"||n==="sticky")return!1;let r=e.display||"";return!(r.includes("flex")||r.includes("grid")||r.startsWith("table")||e.transform&&e.transform!=="none")}function la(t,e,n=new Map,r=null){function i(o,s){if(o?.nodeType!==1||s?.nodeType!==1)return;let a=o.childElementCount>s.childElementCount,l=n.get(o)||getComputedStyle(o);if(n.has(o)||n.set(o,l),a&&hu(o,l)){s.style.height||(s.style.height="auto"),s.style.width||(s.style.width="auto"),s.style.removeProperty("block-size"),s.style.removeProperty("inline-size"),s.style.minHeight||(s.style.minHeight="0"),s.style.minWidth||(s.style.minWidth="0"),s.style.maxHeight||(s.style.maxHeight="none"),s.style.maxWidth||(s.style.maxWidth="none");let c=l.overflowY||l.overflowBlock||"visible",u=l.overflowX||l.overflowInline||"visible";(c!=="visible"||u!=="visible")&&(s.style.overflow="visible")}let f=Array.from(s.children);if(r)for(let c of f){let u=r.get(c);u&&u.nodeType===1&&i(u,c)}else{let c=Array.from(o.children);for(let u=0;u<Math.min(c.length,f.length);u++)i(c[u],f[u])}}i(t,e)}function mu(t){let e=getComputedStyle(t);return!(e.display==="none"||e.position==="absolute"||e.position==="fixed")}function gu(t,e){if(t?.nodeType!==1)return!1;if(t.getAttribute("data-capture")==="exclude")return e?.excludeMode==="remove";if(Array.isArray(e?.exclude))for(let n of e.exclude)try{if(t.matches(n))return e.excludeMode==="remove"}catch(r){j(e,"Invalid exclude selector; ignored.",r)}if(Array.isArray(e?.excludePredicates))for(let n of e.excludePredicates)try{if(n(t))return e.excludeMode==="remove"}catch(r){j(e,"Your exclude function threw; ignored.",r)}if(typeof e?.filter=="function"&&e.filterMode==="remove")try{if(!e.filter(t))return!0}catch(n){j(e,"Your filter function threw; ignored.",n)}return!1}function Mo(t,e){let n=getComputedStyle(t),r=t.getBoundingClientRect(),i=1/0,o=-1/0,s=!1,a=Array.from(t.children);for(let h of a){if(gu(h,e)||!mu(h))continue;let m=h.getBoundingClientRect(),p=m.top-r.top,g=m.bottom-r.top;g<=p||(p<i&&(i=p),g>o&&(o=g),s=!0)}let l=s?Math.max(0,o-i):0,f=parseFloat(n.borderTopWidth)||0,c=parseFloat(n.borderBottomWidth)||0,u=parseFloat(n.paddingTop)||0,d=parseFloat(n.paddingBottom)||0;return f+c+u+d+l}var W=(t,e=3)=>Number.isFinite(t)?Math.round(t*10**e)/10**e:t;function Ao(t){let e=document.implementation.createHTMLDocument(""),n=e.importNode(t,!0);for(let r of[n,...n.querySelectorAll("*")]){let i=r.localName.includes("-");if(!Mt(r)||!(i||r.hasAttribute("is")))continue;let o=e.createElement(i?"span":r.localName);for(let s of r.attributes)s.name!=="is"&&o.setAttribute(s.name,s.value);o.append(...r.childNodes),r===n?n=o:r.replaceWith(o)}return n}var We=.75;function ca(t,e,n,r,i,o){let s=t.ownerDocument||document,a=t.getBoundingClientRect(),l=i>0&&a.width>0?a.width/i:1,f=o>0&&a.height>0?a.height/o:1;if(Math.abs(l-f)>.02)return 0;let c=s.createElement("div");J(c),c.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+i+"px!important;overflow:visible!important;visibility:hidden!important;";let u=c.attachShadow({mode:"open"}),d=s.createElement("style");d.textContent=n,u.appendChild(d);let h=Ao(e);u.appendChild(h),s.body.appendChild(c);let m=0,p=["paddingLeft","paddingRight","borderLeftWidth","borderRightWidth"],g=["paddingTop","paddingBottom","borderTopWidth","borderBottomWidth"],y=(b,w,x)=>{let C=I(b),S=C.boxSizing==="border-box",k=(E,R,v)=>{let M=parseFloat(E);if(!Number.isFinite(M))return R;let _=0;if(!S)for(let $ of v)_+=parseFloat(C[$])||0;let T=M+_;return Math.abs(T-R)<=.51?T:R};return{width:k(C.width,w,p),height:k(C.height,x,g)}};try{let b=h.getBoundingClientRect(),w=h.offsetWidth||i,x=h.offsetHeight||o,C=w>0&&b.width>0?b.width/w:1,S=x>0&&b.height>0?b.height/x:1,k=(E,R,v=!1)=>{let M=E.children,_=R.children,T=Math.min(M.length,_.length);for(let $=0;$<T;$++){let N=M[$],F=_[$],A=r.get(N),L=v||ra.has(N);if(A?.nodeType===1&&Mt(N)&&N.style&&A.isConnected){let O=A.getBoundingClientRect();if(O.width>0&&O.height>0){let P=F.getBoundingClientRect(),z=O.width/l,q=O.height/f,U=P.width,Y=P.height,B=A.offsetWidth||z,dt=A.offsetHeight||q,pt=F.offsetWidth||U,nt=F.offsetHeight||Y,st=Math.abs(z-B)>We||Math.abs(q-dt)>We||Math.abs(U-pt)>We||Math.abs(Y-nt)>We;if(L){let ct=y(F,pt,nt);z=U>0?z*C*ct.width/U:z,q=Y>0?q*S*ct.height/Y:q,U=ct.width,Y=ct.height}else if(st){let ct=y(A,B,dt),Dt=y(F,pt,nt);z=ct.width,q=ct.height,U=Dt.width,Y=Dt.height}let yt=U-z,bt=Y-q;(Math.abs(yt)>We||Math.abs(bt)>We)&&(N.style.boxSizing="border-box",N.style.width=`${W(z)}px`,N.style.height=`${W(q)}px`,m++)}}k(N,F,L)}};k(e,h)}finally{c.remove()}return m}var yu=/::-(?:webkit-(?:scrollbar|meter|progress|slider)|moz-(?:meter|progress))/i;function Co(t,e=new Set){let n="";if(!t)return n;for(let r=0;r<t.length;r++){let i=t[r];try{if(i.type===CSSRule.IMPORT_RULE&&i.styleSheet){n+=Co(i.styleSheet.cssRules,e);continue}if(i.type===CSSRule.MEDIA_RULE&&i.cssRules){let o=Co(i.cssRules,e);o&&(n+=`@media ${i.conditionText}{${o}}`);continue}if(i.type===CSSRule.STYLE_RULE){let o=i.selectorText||"";if(yu.test(o)){let s=i.cssText;s&&!e.has(s)&&(e.add(s),n+=s)}}}catch{}}return n}var na=new WeakMap;function bu(t){let e="";for(let n of t.styleSheets){let r=-1;try{r=n.cssRules?n.cssRules.length:-1}catch{}e+=(n.href||"inline")+":"+r+"|"}return e}function wu(t){if(!t||!t.styleSheets)return"";let e=bu(t),n=na.get(t);if(n&&n.fp===e)return n.css;let r=new Set,i="";for(let o of Array.from(t.styleSheets))try{let s=o.cssRules;s&&(i+=Co(s,r))}catch{}return na.set(t,{fp:e,css:i}),i}function fa(t,e){let n=zr(t.clone).sort(),r=n.join(","),i=ln(t.element),o=D.baseStyle.get(r),s;o&&o.universe===i?s=o.css:(s=Hr(n,i),D.baseStyle.set(r,{universe:i,css:s}));let a=wu(t.element?.ownerDocument||document);return t.fontsCSS=e,t.baseCSS=s,t.scrollbarCSS=a,{baseCSS:s,scrollbarCSS:a,fontsCSS:e}}mt();var Kn=new Set,Su="[data-sd-ph]::placeholder{color:var(--sd-ph)!important;opacity:var(--sd-ph-o)!important;-webkit-text-fill-color:var(--sd-ph)!important}";async function ua(t,e={}){Nt(),Fn(t.ownerDocument||document);let n=e.__session||{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map},r={styleMap:n.styleMap,styleCache:n.styleCache,nodeMap:n.nodeMap,options:e,slicer:e.__slicer||null},i=null,o=null;if(e.clip&&(o=Xn(t,e.clip),o&&(r.clip={rect:o,root:t})),e.captureSelection)try{r.selection=ms(t)}catch(p){j(r,"Couldn't read the text selection.",p)}let s,a="",l="";if(Kn.size){let p=(g,y)=>{for(let b=y;b;b=b.assignedSlot||b.parentElement||Pt(b))if(b===g)return!0;return!1};for(;;){let g=[...Kn].filter(({root:y})=>p(y,t)||p(t,y)).map(({promise:y})=>y.catch(()=>{}));if(!g.length)break;await Promise.all(g)}}if(!r.clip&&t.isConnected&&t.ownerDocument?.visibilityState!=="hidden")try{let p=t.getBoundingClientRect(),g=t.ownerDocument?.defaultView||window,y=p.right<=0||p.bottom<=0||p.left>=g.innerWidth||p.top>=g.innerHeight,b=[];if(y&&(()=>{let x=[];t.shadowRoot&&x.push(t.shadowRoot);for(let C of t.querySelectorAll("*"))C.shadowRoot&&x.push(C.shadowRoot);for(;x.length;){let C=x.pop(),S=C.host?.localName==="calcite-icon";for(let k of C.querySelectorAll("*")){if(k.shadowRoot&&x.push(k.shadowRoot),!S||k.localName!=="svg")continue;let E=k.querySelectorAll("path");if(!E.length||[...E].some(v=>v.getAttribute("d")?.trim()))continue;let R=k.getBoundingClientRect();R.width&&R.height&&b.push(k)}}})(),b.length){let x=(async()=>{let S=t.style,k=t.hasAttribute("style"),E=new Map,R=(v,M)=>{E.has(v)||E.set(v,{value:S.getPropertyValue(v),priority:S.getPropertyPriority(v)}),S.setProperty(v,M,"important");let _=E.get(v);_.forcedValue=S.getPropertyValue(v),_.forcedPriority=S.getPropertyPriority(v)};try{R("left","0"),R("top","0"),R("right","auto"),R("bottom","auto"),R("margin-top","0"),R("margin-right","0"),R("margin-bottom","0"),R("margin-left","0"),R("transform","none"),R("translate","none"),R("opacity","0"),R("pointer-events","none");let v=t.getBoundingClientRect();if(v.right<=0||v.bottom<=0||v.left>=g.innerWidth||v.top>=g.innerHeight){let T=t.parentElement?.getBoundingClientRect(),$=T&&T.right>0&&T.left<g.innerWidth?Math.max(0,T.left):0,N=T&&T.bottom>0&&T.top<g.innerHeight?Math.max(0,T.top):0;R("position","fixed"),R("left",`${$}px`),R("top",`${N}px`)}await St(100);let M=Date.now()+1500,_=()=>b.some(T=>{if([...T.querySelectorAll("path")].some(N=>N.getAttribute("d")?.trim()))return!1;let $=T.getBoundingClientRect();return $.width&&$.height&&$.right>0&&$.bottom>0&&$.left<g.innerWidth&&$.top<g.innerHeight});for(;Date.now()<M&&_();)await new Promise(T=>setTimeout(T,25));await St(100)}finally{for(let[v,M]of E)S.getPropertyValue(v)!==M.forcedValue||S.getPropertyPriority(v)!==M.forcedPriority||(M.value?S.setProperty(v,M.value,M.priority):S.removeProperty(v));!k&&!S.length&&t.removeAttribute("style"),await St(100)}})(),C={root:t,promise:x};Kn.add(C);try{await x}finally{Kn.delete(C)}}}catch{}let f=Xs(t),c=Gn(t,o);if(o){let p=t.getBoundingClientRect(),g=t.offsetWidth||p.width,y=t.offsetHeight||p.height,b=p.width&&Math.abs(g-p.width)>=1?g/p.width:1,w=p.height&&Math.abs(y-p.height)>=1?y/p.height:1;i={x:(o.left-p.left)*b,y:(o.top-p.top)*w,width:o.width*b,height:o.height*w}}try{s=await ee(t,r,e)}catch(p){throw console.warn("[SnapDOM] Capture failed while copying the element.",p),p}finally{c(),f()}ps(r.nodeMap,t.ownerDocument||document),r.slicer?.due()&&await r.slicer.pause();try{Gs(s,void 0,t)}catch(p){console.warn("[SnapDOM] Couldn't copy external SVG icons; some may be missing.",p)}try{await Oe(t,s,r,e)}catch(p){console.warn("[SnapDOM] Couldn't copy ::before/::after content; some decorations may be missing.",p)}await Nn(s,r);for(let[p,g]of r.nodeMap.entries())if(g?.tagName==="STYLE"&&p?.tagName==="STYLE"&&!p.hasAttribute("data-sd"))try{let y=g.sheet&&g.sheet.cssRules;y&&/@media/i.test(p.textContent||"")&&(p.textContent=pe(y))}catch{}try{let p=s.querySelectorAll("style[data-sd]");for(let g of p)l+=g.textContent||"",g.remove()}catch(p){j(r,"Couldn't copy shadow DOM styles.",p)}r.slicer?.due()&&await r.slicer.pause();let u=tn(r.styleMap);a=Array.from(u.entries()).map(([p,g])=>`.${g}{${p}}`).join("");let h=l+"[data-snapdom-has-after]::after,[data-snapdom-has-before]::before{content:none!important;display:none!important}"+(r.__usesPlaceholder?Su:"")+(r.__pseudoCSS||"");a=h+a;for(let[p,g]of r.styleMap.entries())_o(p,g,u);try{xu(t,s,r.nodeMap)}catch(p){j(r,"Couldn't bring an open dialog or popover into the capture.",p)}if((r.clip||t.scrollTop||t.scrollLeft)&&s?.nodeType===1)try{let p=r.clip&&i?{x:i.x,y:i.y}:{x:0,y:0};oa(t,s,r.nodeMap,r.styleCache,p)}catch(p){j(r,"Couldn't keep fixed-position elements in place.",p)}for(let[p,g]of r.nodeMap.entries())r.clip&&g===t&&t===t.ownerDocument.scrollingElement||Eo(p,g,r.nodeMap,r.styleCache);let m=t.ownerDocument;if((t===m.body||t===m.documentElement)&&m.documentElement.localName==="html"){let p=r.styleCache.get(m.documentElement)||I(m.documentElement);t===m.documentElement&&(s.style.overflow="visible");let g=t===m.body?s:s.querySelector("body");if(g&&p.overflowX==="visible"&&p.overflowY==="visible"&&p.contain==="none"&&!p.containerType?.includes("size")&&p.contentVisibility!=="auto"&&p.contentVisibility!=="hidden"){let y=r.styleCache.get(m.body)||I(m.body);y.contain==="none"&&!y.containerType?.includes("size")&&y.contentVisibility!=="auto"&&y.contentVisibility!=="hidden"&&y.display!=="none"&&(g.style.overflow="visible")}}if(t===r.nodeMap.get(s)){let p=r.styleCache.get(t)||I(t);r.styleCache.set(t,p);let g=Fr(p.transform);s.style.margin="0",s.style.top="auto",s.style.left="auto",s.style.right="auto",s.style.bottom="auto",s.style.animation="none",s.style.transition="none",s.style.willChange="auto",s.style.float="none",s.style.clear="none",s.style.transform=g||"",s.style.translate="none"}for(let[p,g]of r.nodeMap.entries())g.tagName==="PRE"&&(p.style.marginTop="0",p.style.marginBlockStart="0");return{clone:s,classCSS:a,classPrefixCSS:h,styleCache:r.styleCache,nodeMap:r.nodeMap,reconcileRisk:r.reconcileRisk||0,clipWindow:i}}function xu(t,e,n){let r=[];for(let s of[":modal",":popover-open"])try{r.push(...t.querySelectorAll(s))}catch{}if(!r.length)return;let i=new Map;for(let[s,a]of n.entries())i.set(a,s);let o=214748e4;for(let s of r){let a=i.get(s);if(!(!a||a===e||a.parentNode==null)){try{let l=getComputedStyle(s,"::backdrop"),f=l.backgroundColor,c=l.backgroundImage;if(f&&f!=="rgba(0, 0, 0, 0)"&&f!=="transparent"||c&&c!=="none"){let d=document.createElement("div");d.setAttribute("data-sd-backdrop",""),d.style.cssText=`position:fixed;inset:0;z-index:${o};background-color:${f};`+(c&&c!=="none"&&c.includes("data:")?`background-image:${c};`:""),e.appendChild(d)}}catch{}o+=1,a.style.zIndex=String(o),e.appendChild(a),o+=1}}}function _o(t,e,n){if(t.tagName==="STYLE")return;if(t.getRootNode&&Wt(t.getRootNode())){t.setAttribute("style",e.replace(/;/g,"; "));return}let r=n.get(e);r&&t.classList.add(r);let i=t.style?.backgroundImage,o=t.dataset?.snapdomHasIcon;i&&i!=="none"&&(t.style.backgroundImage=i),o&&(t.style.verticalAlign="middle",t.style.display="inline")}function Eo(t,e,n,r){let i=e.scrollLeft,o=e.scrollTop;if(!(i||o)||t?.nodeType!==1||t.namespaceURI!=="http://www.w3.org/1999/xhtml")return;t.style.overflow="hidden",t.style.scrollbarWidth="none",t.style.msOverflowStyle="none";try{let l=t.querySelectorAll("*");for(let f of l){if(f.nodeType!==1||f.namespaceURI!=="http://www.w3.org/1999/xhtml")continue;let c=n?.get(f),u=c&&(r?.get(c)||I(c)),d=f.style.position||u?.position;if(d!=="fixed"&&d!=="absolute")continue;let h=u&&u.position!=="absolute"&&d==="absolute",m=null;if(c&&!h)for(let y=c.parentElement||Pt(c);y;y=y.parentElement||Pt(y)){let b=r?.get(y)||I(y);if(d==="absolute"&&b.position!=="static"||b.transform&&b.transform!=="none"||b.translate&&b.translate!=="none"||b.rotate&&b.rotate!=="none"||b.scale&&b.scale!=="none"||b.filter&&b.filter!=="none"||b.backdropFilter&&b.backdropFilter!=="none"||b.perspective&&b.perspective!=="none"||/transform|perspective|filter/.test(b.willChange||"")||/layout|paint|strict|content/.test(b.contain||"")){m=y;break}if(y===e)break}if(m){m===e&&(f.style.top=u.top,f.style.left=u.left,f.style.right=u.right,f.style.bottom=u.bottom);continue}let p=parseFloat(f.style.top||u?.top)||0,g=parseFloat(f.style.left||u?.left)||0;f.style.top=`${p+o}px`,f.style.left=`${g+i}px`,d==="fixed"&&(f.style.position="absolute")}}catch{}let a=document.createElement("div");for(a.style.all="unset",a.style.transform=`translate(${-i}px, ${-o}px)`,a.style.willChange="transform",a.style.display="inline-block",a.style.width="100%";t.firstChild;)a.appendChild(t.firstChild);t.appendChild(a)}le();ce();wt();var da="http://www.w3.org/1999/xlink";function vu(t){return t.getAttribute("href")||t.getAttribute("xlink:href")||(typeof t.getAttributeNS=="function"?t.getAttributeNS(da,"href"):null)}function Cu(t){let e=parseFloat(t.dataset?.snapdomWidth||"")||0,n=parseFloat(t.dataset?.snapdomHeight||"")||0,r=parseInt(t.getAttribute("width")||"",10)||0,i=parseInt(t.getAttribute("height")||"",10)||0,o=parseFloat(t.style?.width||"")||0,s=parseFloat(t.style?.height||"")||0,a=e||o||r||t.width||t.naturalWidth||100,l=n||s||i||t.height||t.naturalHeight||100;return{width:a,height:l}}async function Qn(t,e={}){let n=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&n.unshift(t);let r=async a=>{if(!a.getAttribute("src")){let m=a.currentSrc||a.src||$e(a.getAttribute("srcset"),a)||"";m&&a.setAttribute("src",m)}if(a.removeAttribute("srcset"),a.removeAttribute("sizes"),(a.getAttribute("src")||"").startsWith("data:")){a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let l=a.src||"";if(!l)return;let f=D.image?.get(l);if(f){a.src=f,a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let c=await at(l,{as:"dataURL",useProxy:e.useProxy});if(c.ok&&typeof c.data=="string"&&c.data.startsWith("data:")){D.image?.set(l,c.data),a.src=c.data,c.blob&&(a.__snapdomBlob=c.blob),a.width||(a.width=a.naturalWidth||100),a.height||(a.height=a.naturalHeight||100);return}let{width:u,height:d}=Cu(a),{fallbackURL:h}=e||{};if(h)try{let m=typeof h=="function"?await h({width:u,height:d,src:l,element:a}):h;if(m){let p=await at(m,{as:"dataURL",useProxy:e.useProxy});if(p?.ok&&typeof p.data=="string"){a.src=p.data,a.width||(a.width=u),a.height||(a.height=d);return}}}catch{}if(e.placeholders!==!1){Et(e.__session,"image-fallback",`image failed to inline, using placeholder: ${l}`);let m=document.createElement("div");m.style.cssText=[`width:${u}px`,`height:${d}px`,"background:#ccc","display:inline-block","text-align:center",`line-height:${d}px`,"color:#666","font-size:12px","overflow:hidden"].join(";"),m.textContent="img",a.replaceWith(m)}else{let m=document.createElement("div");m.style.cssText=`display:inline-block;width:${u}px;height:${d}px;visibility:hidden;`,a.replaceWith(m)}},i=6;for(let a=0;a<n.length;a+=i){let l=n.slice(a,a+i).map(r);await Promise.allSettled(l)}let o=Array.from(t.querySelectorAll("image"));t.localName==="image"&&o.unshift(t);let s=async a=>{let l=vu(a);if(!l||l.startsWith("data:")||l.startsWith("blob:"))return;let f=await at(l,{as:"dataURL",useProxy:e.useProxy});f.ok&&typeof f.data=="string"&&f.data.startsWith("data:")&&(a.setAttribute("href",f.data),a.removeAttribute("xlink:href"),typeof a.removeAttributeNS=="function"&&a.removeAttributeNS(da,"href"))};for(let a=0;a<o.length;a+=i){let l=o.slice(a,a+i).map(s);await Promise.allSettled(l)}}mt();vt();var ku=["background-image","mask","mask-image","-webkit-mask","-webkit-mask-image","mask-source","mask-box-image-source","mask-border-source","-webkit-mask-box-image-source","border-image","border-image-source"],Mu=["mask-position","mask-size","mask-repeat","mask-mode","mask-composite","-webkit-mask-position","-webkit-mask-size","-webkit-mask-repeat","-webkit-mask-composite","mask-origin","mask-clip","-webkit-mask-origin","-webkit-mask-clip","-webkit-mask-position-x","-webkit-mask-position-y"],Au=["background-position","background-position-x","background-position-y","background-size","background-repeat","background-origin","background-clip","background-attachment","background-blend-mode"],_u=["border-image-slice","border-image-width","border-image-outset","border-image-repeat"];async function Eu(t,e,n,r){let i=n.get(t)||I(t);n.has(t)||n.set(t,i);let o=Wi(t),s=o?m=>m in o?o[m]:"":m=>i.getPropertyValue(m),a=s("border-image"),l=s("border-image-source"),f=a&&a!=="none"||l&&l!=="none",c=i.getPropertyValue("background-image"),u=s("background-color"),d=c&&c!=="none"||u&&u!=="rgba(0, 0, 0, 0)"&&u!=="transparent"||/url\s*\(|gradient\s*\(/i.test(i.getPropertyValue("background")||""),h=xt()&&(s("background-clip")||s("-webkit-background-clip")||"").includes("text");if(d&&!h)for(let m of Au){let p=s(m);p&&e.style.setProperty(m,p)}for(let m of ku){if(h&&m==="background-image")continue;let p=i.getPropertyValue(m);if(m==="background-image"&&(!p||p==="none")){let b=i.getPropertyValue("background");b&&/url\s*\(/.test(b)&&(p=Yt(b).filter(w=>/url\s*\(/.test(w)).join(", ")||p)}if(!p||p==="none")continue;let g=Yt(p),y=await Promise.all(g.map(b=>ve(b,r)));y.some(b=>b&&b!=="none"&&!/^url\(undefined/.test(b))&&e.style.setProperty(m,y.join(", "))}for(let m of Mu){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(f)for(let m of _u){let p=s(m);!p||p==="initial"||e.style.setProperty(m,p)}if(d&&/fixed/.test(s("background-attachment")||""))try{await Fu(t,e,i)}catch{}}function Ru(t,e,n,r,i){let o=(t||"auto").trim();if(o==="cover"||o==="contain"){if(!e||!n)return{w:r,h:i};let d=o==="cover"?Math.max(r/e,i/n):Math.min(r/e,i/n);return{w:e*d,h:n*d}}let s=o.split(/\s+/),a=(d,h)=>{if(d==="auto"||d===void 0)return null;if(d.endsWith("px"))return parseFloat(d);if(d.endsWith("%"))return h*parseFloat(d)/100},l=a(s[0],r),f=a(s[1],i);if(l===void 0||f===void 0)return null;let c=l,u=f;return c==null&&u==null?(c=e||r,u=n||i):c==null?c=e&&n?u*(e/n):r:u==null&&(u=e&&n?c*(n/e):i),!c||!u?null:{w:c,h:u}}async function Fu(t,e,n){let r=(n.getPropertyValue("background-attachment")||"").split(",").map(m=>m.trim()),i=en();if(!i)for(let m=t.parentElement;m&&!i;m=m.parentElement){let p=I(m);(p.transform&&p.transform!=="none"||p.filter&&p.filter!=="none")&&(i=!0)}if(i){e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "));return}let o=t.getBoundingClientRect(),s=t.ownerDocument?.defaultView||window,a=s.innerWidth,l=s.innerHeight,f=Yt(e.style.backgroundImage||n.getPropertyValue("background-image")||""),c=(e.style.backgroundSize||n.getPropertyValue("background-size")||"auto").split(",").map(m=>m.trim()),u=(e.style.backgroundPosition||n.getPropertyValue("background-position")||"0% 0%").split(",").map(m=>m.trim()),d=[],h=[];for(let m=0;m<f.length;m++){let p=r[m%r.length]||"scroll",g=c[m%c.length],y=u[m%u.length];if(p!=="fixed"){d.push(g),h.push(y);continue}let b=0,w=0,x=f[m]&&f[m].match(/url\(["']?([^"')]+)["']?\)/);if(x)try{let v=new Image;v.src=x[1],await v.decode(),b=v.naturalWidth,w=v.naturalHeight}catch{d.push(g),h.push(y);continue}let C=Ru(g,b,w,a,l);if(!C){d.push(g),h.push(y);continue}let S=y.split(/\s+/),k=(v,M,_)=>{if(!v)return 0;if(v.endsWith("px"))return parseFloat(v);if(v.endsWith("%"))return(M-_)*parseFloat(v)/100},E=k(S[0]||"0%",a,C.w),R=k(S[1]||S[0]||"0%",l,C.h);if(E===void 0||R===void 0){d.push(g),h.push(y);continue}d.push(`${Zn(C.w)}px ${Zn(C.h)}px`),h.push(`${Zn(E-o.left)}px ${Zn(R-o.top)}px`)}e.style.setProperty("background-size",d.join(", ")),e.style.setProperty("background-position",h.join(", ")),e.style.setProperty("background-attachment",r.map(()=>"scroll").join(", "))}var Zn=t=>Math.round(t*100)/100;async function Jn(t,e,n,r={},i=new Map){if(!e)return;let o=[];t&&to(t)&&o.push([t,e]);let s=[e];for(;s.length;){let l=s.pop();if(l.children)for(let f of l.children){if(f.tagName==="STYLE")continue;let c=i.get(f);c&&to(c)&&o.push([c,f]),s.push(f)}}let a=6;for(let l=0;l<o.length;l+=a)await Promise.allSettled(o.slice(l,l+a).map(([f,c])=>Eu(f,c,n,r)))}vt();function ha(t,e,n=new Map){let r=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT);for(let a=i.currentNode;a;a=i.nextNode()){let l=n.get(a);if(l?.nodeType!==1)continue;let f=I(l),c=f.getPropertyValue("backdrop-filter")||f.getPropertyValue("-webkit-backdrop-filter");c&&c!=="none"&&a!==e&&r.push({cloneEl:a,orig:l,bf:c,path:Nu(e,a)})}if(!r.length)return;let o=t.getBoundingClientRect(),s=r.map((a,l)=>{let f=e.cloneNode(!0);$u(f,e,a.orig.getBoundingClientRect(),n),Lu(pa(f,a.path));for(let c=0;c<l;c++){let u=pa(f,r[c].path);u&&(u.style.setProperty("backdrop-filter","none","important"),u.style.setProperty("-webkit-backdrop-filter","none","important"))}return{...a,copy:f}});for(let{cloneEl:a,orig:l,bf:f,copy:c}of s)Tu.has(a.tagName)||Pu(a,l,f,c,o)}var Tu=new Set(["IMG","INPUT","TEXTAREA","SELECT","CANVAS","VIDEO","AUDIO","IFRAME","EMBED","OBJECT","PROGRESS","METER","HR","BR"]);function Pu(t,e,n,r,i){let o=e.getBoundingClientRect();if(!o.width||!o.height)return;let s=I(e),a=e.offsetWidth?o.width/e.offsetWidth:1,l=Math.abs(a-1)>.001?1/a:1;r.style.position="absolute",r.style.left=`${(i.left-o.left)*l}px`,r.style.top=`${(i.top-o.top)*l}px`,r.style.width=`${i.width}px`,r.style.height=`${i.height}px`,r.style.margin="0",r.style.filter=n,l!==1&&(r.style.transform=`scale(${l})`,r.style.transformOrigin="top left");let f=document.createElement("div");f.style.cssText="position:absolute;inset:0;overflow:hidden;border-radius:inherit;z-index:-2",f.appendChild(r);let c=document.createElement("div");c.style.cssText="position:absolute;inset:0;border-radius:inherit;z-index:-1",c.style.backgroundColor=s.backgroundColor,c.style.backgroundImage=t.style.backgroundImage||s.backgroundImage;for(let u of["background-size","background-position","background-repeat","background-origin","background-clip"])c.style.setProperty(u,s.getPropertyValue(u));t.style.setProperty("background-color","transparent","important"),t.style.setProperty("background-image","none","important"),t.style.setProperty("backdrop-filter","none","important"),t.style.setProperty("-webkit-backdrop-filter","none","important"),s.position==="static"&&(t.style.position="relative"),t.style.isolation="isolate",t.prepend(c),t.prepend(f)}var tr=128;function $u(t,e,n,r){let i=[[t,e]];for(;i.length;){let[o,s]=i.pop(),a=r.get(s);if(a?.nodeType===1){let c=a.getBoundingClientRect();(c.left>n.right+tr||c.right<n.left-tr||c.top>n.bottom+tr||c.bottom<n.top-tr)&&(o.tagName==="IMG"&&o.setAttribute("src","data:image/gif;base64,R0lGODlhAQABAAAAACwAAAAAAQABAAA="),o.style&&(o.style.backgroundImage="none"))}let l=o.children,f=s.children;for(let c=0;c<l.length;c++)i.push([l[c],f[c]])}}function Nu(t,e){let n=[];for(let r=e;r!==t;r=r.parentElement){if(!r?.parentElement)return null;n.push([...r.parentElement.children].indexOf(r))}return n.reverse()}function pa(t,e){if(!e)return null;let n=t;for(let r of e)if(n=n.children[r],!n)return null;return n}function Lu(t){if(t)for(let e=t;e&&e.parentNode;){let n=e.parentNode;for(;e.nextSibling;)e.nextSibling.remove();e===t&&e.remove(),e=n}}vt();mt();wt();wt();function Ro(t){return ci(t),{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map,warnings:[]}}ce();function nr(t,e){if(!t)return()=>{};let n=[],r=200;function i(o){if(e){let f=o.getBoundingClientRect();if(f.width>0||f.height>0){let c=Math.max(f.right,f.left+(o.scrollWidth||0)),u=Math.max(f.bottom,f.top+(o.scrollHeight||0));if(c<e.left-r||f.left>e.right+r||u<e.top-r||f.top>e.bottom+r)return}}let s=getComputedStyle(o),a=Iu(o,s);a&&n.push(a);let l=Ou(o,s);l&&n.push(l);for(let f of o.children||[])i(f)}return i(t),()=>n.forEach(o=>o())}function Iu(t,e){if(!t)return()=>{};e=e||getComputedStyle(t);let n=Du(e);if(n<=0)return()=>{};if(!ya(t))return()=>{};let r=ga(t),i=r.text,o=Bu(e);r.write("X");let s=t.scrollHeight-o;r.restore();let a=s>0?s:Wu(e),l=Math.round(a*n+o);if(t.scrollHeight<=l+.5)return()=>{};let f=0,c=i.length,u=-1;for(;f<=c;){let h=f+c>>1;r.write(i.slice(0,er(i,h))+"\u2026"),t.scrollHeight<=l+.5?(u=h,f=h+1):c=h-1}let d=(u>=0?i.slice(0,er(i,u)):"")+"\u2026";return r.write(d),ma(t,d,r)}function Ou(t,e){if(!t)return()=>{};if(e=e||getComputedStyle(t),e.textOverflow!=="ellipsis")return()=>{};if(e.whiteSpace!=="nowrap"&&e.whiteSpace!=="pre")return()=>{};if(e.overflowX!=="hidden"&&e.overflowX!=="clip")return()=>{};if(!ya(t))return()=>{};if(t.scrollWidth<=t.clientWidth+.5)return()=>{};let n=ga(t),r=n.text,i=0,o=r.length,s=-1;for(;i<=o;){let l=i+o>>1;n.write(r.slice(0,er(r,l))+"\u2026"),t.scrollWidth<=t.clientWidth+.5?(s=l,i=l+1):o=l-1}let a=(s>=0?r.slice(0,er(r,s)):"")+"\u2026";return n.write(a),ma(t,a,n)}function ma(t,e,n){return()=>{t.textContent===e&&n.restore()}}function ga(t){let e=[];for(let r=t.firstChild;r;r=r.nextSibling)r.nodeType===Node.TEXT_NODE&&e.push(r);let n=e.map(r=>r.data);return{text:n.join(""),write(r){e[0].data=r;for(let i=1;i<e.length;i++)e[i].data=""},restore(){for(let r=0;r<e.length;r++)e[r].data=n[r]}}}function er(t,e){if(e<=0||e>=t.length)return e;let n=t.charCodeAt(e-1);return n>=55296&&n<=56319?e-1:e}function Du(t){let e=t.getPropertyValue("-webkit-line-clamp")||t.getPropertyValue("line-clamp");e=(e||"").trim();let n=parseInt(e,10);return Number.isFinite(n)&&n>0?n:0}function Wu(t){let e=(t.lineHeight||"").trim(),n=parseFloat(t.fontSize)||16;return!e||e==="normal"?Math.round(n*1.2):e.endsWith("px")?parseFloat(e):/^\d+(\.\d+)?$/.test(e)?Math.round(parseFloat(e)*n):e.endsWith("%")?Math.round(parseFloat(e)/100*n):Math.round(n*1.2)}function Bu(t){return(parseFloat(t.paddingTop)||0)+(parseFloat(t.paddingBottom)||0)}function ya(t){return t.childElementCount>0?!1:Array.from(t.childNodes).some(e=>e.nodeType===Node.TEXT_NODE)}var Be=["clone","render"],mn={clone:0,render:1},gt="render";function ba(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];if(!e.length)return{stage:gt,loweredBy:[]};let n=-1,r=[];for(let o of e){if(!o||typeof o!="object")continue;let s=o.needs===void 0?gt:o.needs;if(!Object.prototype.hasOwnProperty.call(mn,s))throw new Error(`[SnapDOM] Plugin '${o.name||"(unnamed)"}' declares needs: ${JSON.stringify(s)}, expected one of ${Be.join(", ")}.`);r.push({name:o.name||"(unnamed)",needs:s}),n=Math.max(n,mn[s])}if(n<0)return{stage:gt,loweredBy:[]};let i=Be[n];return{loweredBy:i===gt?[]:r.filter(o=>o.needs===i).map(o=>o.name),stage:i}}function Ue(t,e){return mn[t]>=mn[e]}function wa(t,e,n=Be){let r=n[n.length-1];if(e==null)return r;if(!Object.prototype.hasOwnProperty.call(mn,e))throw new Error(`[SnapDOM] ${t}: needs must be one of ${Be.join(", ")}, got ${JSON.stringify(e)}.`);if(!n.includes(e))throw new Error(`[SnapDOM] ${t} cannot run at stage '${e}'; it supports ${n.join(", ")}.`);return e}function Sa(t,e,n){let r=e.length?e.map(i=>`'${i}'`).join(", "):"the attached plugins";return new Error(`[SnapDOM] No ${n}: this capture stopped at '${t}' because ${r} asked for needs: '${t}'. It is not re-captured, since that would be a different instant. Ask the plugin for needs: 'render', or capture without it.`)}var ze=[];function He(t){if(!t)return null;if(Array.isArray(t)){let[e,n]=t;return typeof e=="function"?e(n):e}if(typeof t=="object"&&"plugin"in t){let{plugin:e,options:n}=t;return typeof e=="function"?e(n):e}return typeof t=="function"?t():t}function Fo(...t){let e=t.flat();for(let n of e){let r=He(n);if(r){if(r.needs!==void 0&&r.needs!==gt)throw new Error(`[SnapDOM] '${r.name||"(unnamed)"}' declares needs: ${JSON.stringify(r.needs)}, so it can't be a global plugin (it would stop every capture before '${gt}'). Pass it per capture: snapdom(el, { plugins: [...] }).`);ze.some(i=>i&&i.name&&r.name&&i.name===r.name)||ze.push(r)}}}function xa(t){return t&&Array.isArray(t.plugins)?t.plugins:ze}async function zt(t,e,n){let r=n,i=xa(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,r);typeof a<"u"&&(r=a)}return r}async function rr(t,e,n){let r=[],i=xa(e);for(let o of i){let s=o&&typeof o[t]=="function"?o[t]:null;if(!s)continue;let a=await s(e,n);typeof a<"u"&&r.push(a)}return r}function Uu(){ze.length=0}var zu=0;function Hu(t){let e=[];if(Array.isArray(t))for(let n of t){let r=He(n);if(!r)continue;r.name||(r.name=`anonymous-${++zu}`);let i=e.findIndex(o=>o&&o.name===r.name);i>=0&&e.splice(i,1),e.push(r)}for(let n of ze)n&&n.name&&!e.some(r=>r.name===n.name)&&e.push(n);return Object.freeze(e)}function va(t,e,n=!1){return!t||t.plugins&&!n||(t.plugins=Hu(e)),t}function To(){return ze.slice()}var ju=["resolveNode","beforeSnap","beforeClone","afterClone","beforeRender","afterRender"];function or(t){let e=Array.isArray(t&&t.plugins)?t.plugins:[];for(let n of e){let r=He(n);if(!(!r||r.pure===!0)){for(let i of ju)if(typeof r[i]=="function")return!0}}return!1}wt();Ae();var ge="data-snapdom-asset",Aa="http://www.w3.org/1999/xlink",Vu=0;function sr(t,e,n,r,i,o){let s=o.__compressedAssets||=new WeakMap,a=s.get(t);a||(a={token:String(++Vu),properties:[]},s.set(t,a),t.setAttribute(ge,a.token));let l=a.properties.find(f=>f.kind===e&&f.name===n);l?(l.compressed!==r&&(l.original=r),l.compressed=i):a.properties.push({kind:e,name:n,original:r,compressed:i})}var _a=(t,e)=>e.kind==="style"?t.style?.getPropertyValue(e.name):t.getAttribute(e.name);function ar(t,e){let n=new Map;if(!t||!e)return n;let r=[t,...t.querySelectorAll(`[${ge}]`)];for(let i of r){let o=e.get(i);if(!o||i.getAttribute(ge)!==o.token)continue;let s=o.properties.filter(a=>_a(i,a)===a.compressed).map(a=>Object.freeze({...a}));s.length&&n.set(o.token,Object.freeze(s))}return n}function lr(t,e){if(!t||!e)return;let n=0;for(let r of[t,...t.querySelectorAll(`[${ge}]`)]){let i=e.get(r);i&&(i.token=String(++n),r.setAttribute(ge,i.token))}}function Ea(t,e){if(!e?.size||typeof t!="string"||!t.startsWith("data:image/svg+xml"))return t;let n=t.indexOf(","),r=new DOMParser().parseFromString(decodeURIComponent(t.slice(n+1)),"image/svg+xml");if(r.querySelector("parsererror"))return t;let i=!1;for(let o of r.querySelectorAll(`[${ge}]`))for(let s of e.get(o.getAttribute(ge))||[])_a(o,s)===s.compressed&&(s.kind==="style"?o.style.setProperty(s.name,s.original,o.style.getPropertyPriority(s.name)):s.name==="xlink:href"?o.setAttributeNS(Aa,s.name,s.original):o.setAttribute(s.name,s.original),i=!0);return i?`data:image/svg+xml;charset=utf-8,${encodeURIComponent(new XMLSerializer().serializeToString(r))}`:t}function Ca(t){if(t.is2D===!1)return 1/0;let e=t.a*t.a+t.b*t.b+t.c*t.c+t.d*t.d,n=t.a*t.d-t.b*t.c;return Math.sqrt((e+Math.sqrt(Math.max(0,e*e-4*n*n)))/2)}function Po(t,e){let n=e.element||t,r=n.isConnected?I(n):n.style,i=e.__compressionClip,o=(h,m)=>{try{return h[m]?.baseVal?.value||0}catch{return 0}},s=i?.width||n.offsetWidth||parseFloat(r?.width)||o(n,"width"),a=i?.height||n.offsetHeight||parseFloat(r?.height)||o(n,"height"),l=Number.isFinite(e.width),f=Number.isFinite(e.height);if(!i&&(l||f)&&s&&a)try{let h=e.outerTransforms===!1&&e.__compressionRootTransform?e.__compressionRootTransform:ne({baseTransform:r?.transform,rotate:r?.rotate,scale:r?.scale,width:s,height:a});if(h.is2D===!1)s=0,a=0;else{let m=Math.abs(h.a)*s+Math.abs(h.c)*a,p=Math.abs(h.b)*s+Math.abs(h.d)*a;s=Math.min(s,m),a=Math.min(a,p)}}catch{s=0,a=0}let c=(l||f?Math.max(l?s?e.width/s:1/0:0,f?a?e.height/a:1/0:0):e.scale||1)*(e.dpr||1);e.__compressionDensity=c;let u=new WeakMap,d=h=>{if(!h||h.nodeType!==1)return 1;if(u.has(h))return u.get(h);let m=h.isConnected?I(h):h.style,p=1;try{m?.perspective&&m.perspective!=="none"&&(p=1/0);let g=m?.transform;if(g&&g!=="none")p*=Ca(new DOMMatrix(g));else if(h.transform?.baseVal?.numberOfItems){let y=new DOMMatrix;for(let b=0;b<h.transform.baseVal.numberOfItems;b++){let w=h.transform.baseVal.getItem(b).matrix;y=y.multiply(new DOMMatrix([w.a,w.b,w.c,w.d,w.e,w.f]))}p*=Ca(y)}if(m?.scale&&m.scale!=="none"){let y=m.scale.trim().split(/\s+/).map(b=>parseFloat(b)/(b.endsWith("%")?100:1));p*=Math.max(...y.map(Math.abs))}if(h!==n&&m?.zoom&&m.zoom!=="normal"&&(p*=parseFloat(m.zoom)||1),h.localName==="svg"&&h.viewBox?.baseVal?.width>0&&h.viewBox.baseVal.height>0){let y=h.viewBox.baseVal,b=C=>/^\d+(?:\.\d+)?px$/.test(m?.[C]||"")?parseFloat(m[C]):o(h,C),w=b("width"),x=b("height");p*=w>0&&x>0?Math.max(w/y.width,x/y.height):1/0}}catch{p=1/0}return Number.isFinite(p)||(p=1/0),h!==n&&(p*=d(h.parentElement||h.getRootNode?.().host)),u.set(h,p),p};return{density:c,stretch:d}}var Ra=.92,Fa=1;async function qu(t){let e=new Image;return e.decoding="sync",e.src=t,typeof e.decode=="function"?(await e.decode(),e):(await new Promise((n,r)=>{e.onload=()=>n(),e.onerror=r}),e)}function Gu(t){let e=/^data:([^;,]+)/.exec(t);return e?e[1]:""}var Xu=64*1024,ka=32*1024*1024,ir=new Map;function Yu(t,e,n,r){if(n.length+(r?.length||0)>ka)return;t.set(e,{source:n,result:r});let i=0;for(let o of t.values())i+=o.source.length+(o.result?.length||0);for(;i>ka;){let o=t.keys().next().value,s=t.get(o);i-=s.source.length+(s.result?.length||0),t.delete(o)}}function Ku(t,e){let n=t.indexOf(",");if(n<0||!/;base64/i.test(t.slice(0,n)))return null;let r=Math.ceil(e/3)*4,i=t.length-n-1,o=Math.min(i,r);try{let s=atob(t.slice(n+1,n+1+o-o%4)),a=new Uint8Array(s.length);for(let l=0;l<s.length;l++)a[l]=s.charCodeAt(l);return a}catch{return null}}function Qu(t){let e=Ku(t,4096);if(!e||e.length<16)return null;let n=r=>e[r]<<8|e[r+1];if(e[0]===137&&e[1]===80&&e.length>=24)return{w:(e[16]<<24|e[17]<<16|e[18]<<8|e[19])>>>0,h:(e[20]<<24|e[21]<<16|e[22]<<8|e[23])>>>0};if(e[0]===71&&e[1]===73&&e[2]===70)return{w:e[6]|e[7]<<8,h:e[8]|e[9]<<8};if(e[0]===82&&e[1]===73&&e[8]===87&&e.length>=30){let r=e[15];if(r===32&&e[23]===157)return{w:(e[26]|e[27]<<8)&16383,h:(e[28]|e[29]<<8)&16383};if(r===76)return{w:(e[21]|(e[22]&63)<<8)+1,h:((e[22]>>6|e[23]<<2|(e[24]&15)<<10)&16383)+1};if(r===88)return{w:(e[24]|e[25]<<8|e[26]<<16)+1,h:(e[27]|e[28]<<8|e[29]<<16)+1}}if(e[0]===255&&e[1]===216){let r=2;for(;r+9<e.length;){if(e[r]!==255){r++;continue}let i=e[r+1];if(i===216||i===1||i>=208&&i<=215){r+=2;continue}if(i>=192&&i<=207&&i!==196&&i!==200&&i!==204)return{h:n(r+5),w:n(r+7)};let o=n(r+2);if(o<2)break;r+=2+o}}return null}function Ma(t,e,n,r){let i=Math.min(1,Math.max(n/t,r/e));return!(i>0)||i>=.95?0:i}var Zu=`self.onmessage = async (e) => {
|
|
17
17
|
const { id, dataURL, blob: given, srcLength, targetW, targetH, resFactor, quality, mime } = e.data
|
|
18
18
|
try {
|
|
19
19
|
const blob = given || await (await fetch(dataURL)).blob()
|
|
@@ -37,4 +37,4 @@ ${g}
|
|
|
37
37
|
} catch (err) {
|
|
38
38
|
self.postMessage({ id, error: String(err) })
|
|
39
39
|
}
|
|
40
|
-
}`,Zu=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),Ot=null,Ju=0,td=0,me=new Map;function Fa(){for(let t of me.values())t(void 0);if(me.clear(),Array.isArray(Ot))for(let t of Ot)try{t?.terminate()}catch{}Ot=!1}function ed(){let t,e=null;try{t=URL.createObjectURL(new Blob([Qu],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let r=me.get(n.data.id);r&&(me.delete(n.data.id),r(n.data.error?void 0:n.data.url??null))},e.onerror=Fa}catch{e=null}return t&&URL.revokeObjectURL(t),e}function nd(){if(Ot===!1)return!1;if(Ot===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return Ot=!1;Ot=[]}let t=Ju++%Zu;if(!Ot[t]){let e=ed();if(!e)return Fa(),!1;Ot[t]=e}return Ot[t]}var rd=5e3;function od(t,e,n,r,i){let o=nd();return o?new Promise(s=>{let a=++td,l=setTimeout(()=>{me.delete(a),s(void 0)},rd);me.set(a,f=>{clearTimeout(l),s(f)});try{o.postMessage({id:a,dataURL:i?"":t,blob:i,srcLength:t.length,targetW:e,targetH:n,resFactor:Ra,quality:Ea,mime:r})}catch{clearTimeout(l),me.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function $o(t,e,n,r){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let i=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,o=D.compress,s=o.get(i);if(s?.source===t)return s.result;let a=ir.get(i);if(a?.source===t&&a.cache===o)return a.promise;let l=(async()=>{let c=qu(t),u=c==="image/jpeg"?"image/jpeg":c==="image/webp"?"image/webp":"image/png",d=Ku(t);if(d&&d.w>0&&d.h>0&&!ka(d.w,d.h,e,n))return null;if(t.length>=Gu){let S=await od(t,e,n,u,r);if(S!==void 0)return S}let h;try{h=await Vu(t)}catch{return null}let m=h.naturalWidth||h.width,p=h.naturalHeight||h.height;if(!m||!p)return null;let g=ka(m,p,e,n);if(!g)return null;let y=g*Ra,b=Math.max(1,Math.round(m*y)),w=Math.max(1,Math.round(p*y)),x=document.createElement("canvas");x.width=b,x.height=w;let C=x.getContext("2d");if(!C)return null;C.imageSmoothingEnabled=!0,C.imageSmoothingQuality="high",C.drawImage(h,0,0,b,w);try{let S=x.toDataURL(u,Ea);if(typeof S=="string"&&S.startsWith("data:image")&&S.length<t.length)return S}catch{}return null})(),f={source:t,promise:l,cache:o};ir.set(i,f);try{let c=await l;return Xu(o,i,t,c),c}finally{ir.get(i)===f&&ir.delete(i)}}async function id(t,e,n=new Map,r={}){if(!e.compress)return{count:0,before:0,after:0};let i=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&i.unshift(t);let o=0,s=0,a=0,l=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,h=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!d||!h)return;let m=r.value||=Po(t,e),p=m.density*m.stretch(n.get(c)||c),g=await $o(u,d*p,h*p,c.__snapdomBlob);g&&(o++,s+=u.length,a+=g.length,c.setAttribute("src",g),sr(c,"attribute","src",u,g,e))},f=6;for(let c=0;c<i.length;c+=f)await Promise.allSettled(i.slice(c,c+f).map(l));return{count:o,before:s,after:a}}var sd=/^(cover|contain|(\d+(\.\d+)?%(\s+\d+(\.\d+)?%)?))$/;function ad(t){let e=t.offsetWidth||t.getBoundingClientRect().width||0,n=t.offsetHeight||t.getBoundingClientRect().height||0;return{w:e,h:n}}async function ld(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=[],o=[t,...t.querySelectorAll("*")];for(let f of o){let c=f.style&&f.style.backgroundImage;c&&c.includes("data:image")&&i.push(f)}let s=0,a=async f=>{let c=n.get(f);if(!c||!c.isConnected)return;let u;try{u=getComputedStyle(c)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(E=>E.trim()!=="no-repeat"))return;let h=(f.style.backgroundSize||u.backgroundSize||"auto").toLowerCase();if(h.split(",").some(E=>!sd.test(E.trim())))return;let{w:m,h:p}=ad(c);if(!m||!p)return;let g=Math.max(1,...(h.match(/\d+(?:\.\d+)?%/g)||[]).map(E=>parseFloat(E)/100)),y=r.value||=Po(t,e),b=y.density*y.stretch(c)*g,w=m*b,x=p*b,C=f.style.backgroundImage,S=[...C.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],k=C;for(let E of S){let R=E[2];if(R.startsWith("data:image/svg"))continue;let v=await $o(R,w,x);v&&(k=k.split(R).join(v),s++)}k!==C&&(f.style.setProperty("background-image",k,f.style.getPropertyPriority("background-image")),sr(f,"style","background-image",C,f.style.backgroundImage,e))},l=6;for(let f=0;f<i.length;f+=l)await Promise.allSettled(i.slice(f,f+l).map(a));return{count:s}}async function cd(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=Array.from(t.querySelectorAll("image"));t.localName==="image"&&i.unshift(t);let o=0,s=async l=>{let f=l.getAttribute("href")||(typeof l.getAttributeNS=="function"?l.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!f||!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let c=l.getAttribute("width")||"",u=l.getAttribute("height")||"";if(c.includes("%")||u.includes("%"))return;let d=n.get(l),h=d?I(d):l.style,m=(x,C)=>{if(/^\d+(?:\.\d+)?px$/.test(h?.[x]||""))return parseFloat(h[x]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(C.trim()))return parseFloat(C);try{return d?.[x]?.baseVal?.value||0}catch{return 0}},p=m("width",c),g=m("height",u);if(!p||!g)return;let y=r.value||=Po(t,e),b=y.density*y.stretch(d||l),w=await $o(f,p*b,g*b);w&&(l.setAttribute("href",w),sr(l,"attribute","href",f,w,e),l.hasAttribute("xlink:href")&&(l.setAttributeNS(Ma,"xlink:href",w),sr(l,"attribute","xlink:href",f,w,e)),o++)},a=6;for(let l=0;l<i.length;l+=a)await Promise.allSettled(i.slice(l,l+a).map(s));return{count:o}}async function cr(t,e,n){if(!e.compress)return;let r={};await id(t,e,n,r),await ld(t,e,n,r),await cd(t,e,n,r)}vt();wt();_t();function fd(t,e){if(X())return t;let n=t.indexOf("</style>");if(n===-1)return t;let r=/<style\b[^>]*>[\s\S]*?<\/style>/g,i=[],o=n,s;for(r.lastIndex=n;s=r.exec(t);)i.push({text:t.slice(o,s.index),intern:!0}),i.push({text:s[0],intern:!1}),o=r.lastIndex;i.push({text:t.slice(o),intern:!0});let a=new Map,l=/ style="([^"]*)"/g,f;for(let y of i)if(y.intern)for(l.lastIndex=0;f=l.exec(y.text);)a.set(f[1],(a.get(f[1])||0)+1);let c=0;for(let[y,b]of a)b>1&&(c+=(b-1)*y.length);if(c<2048||t.includes(" data-sdi="))return t;let u=ud(e,i.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(u===null)return t;let d=new Map,h=0,m=[],p=(y,b)=>{if((a.get(b)||0)<2||u.has(b))return y;let w=d.get(b);return w===void 0&&(w="i"+(h++).toString(36),d.set(b,w),m.push(`[data-sdi="${w}"]{${b}}`)),` data-sdi="${w}"`},g="";for(let y of i)g+=y.intern?y.text.replace(l,p):y.text;return t.slice(0,n)+m.join("")+g}function ud(t,e,n){let r=new Set;if(!e&&!n)return r;if(!t||t.querySelector("[data-sdi]"))return null;let i=l=>{let f=l.getAttribute("style");f&&r.add(f)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(i),e)try{let l=f=>{for(let c of f){if(c.type===CSSRule.IMPORT_RULE||c.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(c.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(c.selectorText))throw new Error("Attribute-dependent or nested CSS");t.querySelectorAll(c.selectorText).forEach(i)}c.cssRules&&l(c.cssRules)}};for(let f of[...t.querySelectorAll("style")].slice(1)){let c=f.textContent||"";if(/@import\b/i.test(c))return null;let u=new CSSStyleSheet;u.replaceSync(c),l(u.cssRules)}}catch{return null}let o=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let l of r){s.setAttribute("style",l);let f=a.serializeToString(s).match(/ style="([^"]*)"/);f&&o.add(f[1])}return o}async function fr(t,e){let{clipWindow:n,outerTransforms:r,outerShadows:i,rootTransform2D:o,fontsCSS:s}=e,a=t.options;if(t!==a){let{options:Z,...et}=t;t=Object.assign(a,et),Object.defineProperty(t,"options",{value:t,configurable:!0})}let l,f;ca(t,s),await zt("beforeRender",t);let c=I(t.element),u=t.element.getBoundingClientRect(),d=Math.max(1,W(t.element.offsetWidth||parseFloat(c.width)||u.width||1)),h=Math.max(1,W(t.element.offsetHeight||parseFloat(c.height)||u.height||1)),m=t.element.ownerDocument||document;if(!n&&(t.element===m.body||t.element===m.documentElement)&&!t.__pinned){let Z=Math.max(t.element.scrollHeight||0,m.documentElement?.scrollHeight||0,m.body?.scrollHeight||0),et=Math.max(t.element.scrollWidth||0,m.documentElement?.scrollWidth||0,m.body?.scrollWidth||0);Z>0&&(h=Math.max(h,W(Z))),et>0&&(d=Math.max(d,W(et)));try{let tt=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,rt=D.measureHints.get(t.element);if(rt&&rt.cssLen===tt&&rt.w0===d&&rt.docH===Z&&rt.docW===et)rt.csh>0&&(h=Math.max(h,W(rt.csh))),rt.csw>0&&(d=Math.max(d,W(rt.csw)));else{let ot=m.createElement("div");J(ot),ot.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+d+"px!important;overflow:visible!important;visibility:hidden!important;";let ie=ot.attachShadow({mode:"open"}),se=m.createElement("style");se.textContent=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS,ie.appendChild(se),ie.appendChild(Ao(t.clone)),m.body.appendChild(ot);let Qe=ot.scrollHeight,qt=ot.scrollWidth;m.body.removeChild(ot),D.measureHints.set(t.element,{cssLen:tt,w0:d,docH:Z,docW:et,csh:Qe,csw:qt}),Qe>0&&(h=Math.max(h,W(Qe))),qt>0&&(d=Math.max(d,W(qt)))}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let Z=Mo(t.element,t.options),et=1,tt=Mo(t.element,{}),rt=Math.max(2,h*.15);Number.isFinite(tt)&&tt>=h-rt&&Number.isFinite(Z)&&Z>0&&(h=Math.max(1,Math.min(h,W(Z+et))))}if(t.options?.reconcile)try{let Z=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;la(t.element,t.clone,Z,t.nodeMap,d,h)}catch(Z){console.warn("[SnapDOM] reconcile couldn't run; captured without it.",Z)}let g=(Z,et=NaN)=>{let tt=typeof Z=="string"?parseFloat(Z):Z;return Number.isFinite(tt)?tt:et},y=g(t.options.width),b=g(t.options.height),w=n?W(n.width):d,x=n?W(n.height):h,C=w,S=x,k=Number.isFinite(y),E=Number.isFinite(b),R=x>0?w/x:1;k&&E?(C=Math.max(1,W(y)),S=Math.max(1,W(b))):k?(C=Math.max(1,W(y)),S=Math.max(1,W(C/(R||1)))):E&&(S=Math.max(1,W(b)),C=Math.max(1,W(S*(R||1))));let v=0,M=0,_=d,T=h;if(n){let Z=0,et=0;if(No(t.element)){let tt=null;if(!r&&o&&Number.isFinite(o.a))tt={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0};else{let rt=he(t.element),ot=ko(c.transform&&c.transform!=="none"?c.transform:"",rt);ot&&ot.is2D&&(tt={a:ot.a,b:ot.b,c:ot.c,d:ot.d,e:0,f:0})}if(tt&&!(tt.a===1&&tt.b===0&&tt.c===0&&tt.d===1)){let{ox:rt,oy:ot}=mn(c,d,h),ie=We(d,h,tt,rt,ot);Z=ie.minX,et=ie.minY}}v=W(n.x+Z),M=W(n.y+et),_=W(v+n.width),T=W(M+n.height)}else if(!r&&o&&Number.isFinite(o.a)){let Z={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0},et=We(d,h,Z,0,0);v=W(et.minX),M=W(et.minY),_=W(et.maxX),T=W(et.maxY)}else if(r&&No(t.element)){let et=c.transform&&c.transform!=="none"?c.transform:"",tt=he(t.element),rt=ne({baseTransform:et,rotate:tt.rotate||"0deg",scale:tt.scale,translate:tt.translate,width:d,height:h}),{ox:ot,oy:ie}=mn(c,d,h),se=rt.is2D?rt:new DOMMatrix(rt.toString()),Qe={a:se.a,b:se.b,c:se.c,d:se.d,e:0,f:0},qt=We(d,h,Qe,ot,ie);v=W(qt.minX),M=W(qt.minY),_=W(qt.maxX),T=W(qt.maxY)}let $=yo(c),N=bo(c),F=wo(c),A=So(c),L=xo(c),O=u.width>0?(_-v)/u.width:1,P=u.height>0?(T-M)/u.height:1,z=i==="subtree"&&!n?Ks(t.element,t.nodeMap,t.styleCache,O,P):{top:0,right:0,bottom:0,left:0},q=n?{top:0,right:0,bottom:0,left:0}:i?{top:W(Math.max($.top,N.top,z.top)+F.top+A.top+L.bleed.top),right:W(Math.max($.right,N.right,z.right)+F.right+A.right+L.bleed.right),bottom:W(Math.max($.bottom,N.bottom,z.bottom)+F.bottom+A.bottom+L.bleed.bottom),left:W(Math.max($.left,N.left,z.left)+F.left+A.left+L.bleed.left)}:{top:F.top,right:F.right,bottom:F.bottom,left:F.left};v=W(v-q.left),M=W(M-q.top),_=W(_+q.right),T=W(T+q.bottom);let U=Math.max(1,W(_-v)),Y=Math.max(1,W(T-M)),B="http://www.w3.org/2000/svg",dt=No(t.element)?2:0,nt=W(dt+(r?0:1)),st=Math.ceil(U+nt*2),yt=Math.ceil(Y+nt*2),bt=W(-(W(v)-nt)),ct=W(-(W(M)-nt)),Dt=Math.max(0,bt),V=Math.max(0,ct),G=W(st-Math.min(0,bt)),H=W(yt-Math.min(0,ct)),ht=m.defaultView||window,K=!X()&&CSS.supports("zoom","2")&&ht.devicePixelRatio||1;a.__layoutZoom=K;let kt=document.createElementNS(B,"foreignObject");kt.setAttribute("x",String(Math.min(0,bt)*K)),kt.setAttribute("y",String(Math.min(0,ct)*K)),kt.setAttribute("width",String(G*K)),kt.setAttribute("height",String(H*K)),kt.style.overflow="visible";let Se=document.createElement("style"),xn="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Se.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+xn+t.classCSS,kt.appendChild(Se);let Ye=document.createElement("div");Ye.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Ye.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${G}px;height:${H}px`+(Dt!==0||V!==0?`;padding:${V}px 0 0 ${Dt}px !important`:"")+(K!==1?`;zoom:${K} !important`:""),Ye.appendChild(t.clone),kt.appendChild(Ye);let Mr=new XMLSerializer().serializeToString(kt),jt=k||E,Ar=Object.freeze({w0:w,h0:x,vbW:st,vbH:yt,targetW:C,targetH:S,contentX:W(bt+(n?v:0)),contentY:W(ct+(n?M:0)),clip:n?Object.freeze({x:W(v),y:W(M),width:w,height:x}):null});Object.defineProperty(a,"meta",{value:Ar,enumerable:!0,writable:!1,configurable:!0});let _r=!jt||X()?st:k?C:W(st*(S/yt)),vn=!jt||X()?yt:E?S:W(yt*(C/st)),Vt=parseFloat(I(m.documentElement)?.fontSize)||16,ai=K!==1,Sl=`<svg xmlns="${B}" width="${_r}" height="${vn}" viewBox="0 0 ${st} ${yt}" font-size="${Vt}px">${ai?`<g transform="scale(${1/K})">`:""}`,xl=ai?"</g></svg>":"</svg>";f=Sl+fd(Mr,kt)+xl,l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,t.svgString=f,t.dataURL=l,a.__artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await zt("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let Er=[...document.querySelectorAll("#snapdom-sandbox")].find(Xt);return Er&&Er.style.position==="absolute"&&Er.remove(),t.dataURL}function No(t){return Zs(t)}function dd(t){let e=Array.isArray(t.plugins)?t.plugins:To(),n=[];for(let r of e){let i=je(r);i&&typeof i.resolveNode=="function"&&n.push(i.resolveNode.bind(i))}return n.length?n:null}async function Ta(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");e.__session=Ro(e.cache),delete e.__compressedAssets,delete e.__compressedSnapshot,delete e.__compressionDensity,e.__resolveNodeHooks=dd(e);let n=e;n.element=t,Object.defineProperty(n,"options",{value:n,configurable:!0});let r,i,o,s,a,l,f,c="",u=null,d=e.needs||gt,h=n.format,m=n.type;await zt("beforeSnap",n);let p=n.format!==h&&/^(?:png|jpe?g|webp|svg)$/i.test(n.format),g=n.type!==m&&/^(?:png|jpe?g|webp|svg)$/i.test(n.type);if(p||g){let _=String(p?n.format:n.type).toLowerCase();n.format=_==="jpg"?"jpeg":_,n.type=n.format,n.__explicitFormat=n.format,/^(?:jpeg|webp)$/.test(n.format)&&(n.backgroundColor==null||n.backgroundColor==="transparent")&&(n.backgroundColor="#ffffff")}await zt("beforeClone",n);let y=n.outerTransforms!==!1,b=n.outerShadows==="subtree"?"subtree":!!n.outerShadows,w=n.clip?Xn(n.element,n.clip):null;if(e.__styleShare===void 0)try{e.__styleShare=Bi(n.element)&&(typeof n.element.getAnimations!="function"||n.element.getAnimations({subtree:!0}).length===0)}catch{e.__styleShare=!1}let x=_i(e.fast);for(;;){e.__slicer=x;let _=nr(n.element,w);try{({clone:r,classCSS:i,classPrefixCSS:o,styleCache:s,nodeMap:a,reconcileRisk:l,clipWindow:f}=await fa(n.element,n.options)),l>0&&!e.reconcile&&(Et(e.__session,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),D.warnedReconcile||(D.warnedReconcile=!0,console.warn("[SnapDOM] Some text may wrap differently in the capture. Pass { reconcile: true } to fix it (about 2x slower)."))),!y&&r&&(u=Qs(n.element,r)),!b&&r&&oa(n.element,r,n.options),r&&(sa(n.element,r,a),ia(n.element,r))}finally{_()}if(!x?.yielded||!e.__tornSinceStart?.())break;x=null,e.__session=Ro(e.cache)}if(e.__slicer=null,n.clone=r,n.classCSS=i,n.styleCache=s,n.nodeMap=a,await zt("afterClone",n),!ze(d,"render"))return null;if(x?.due()&&await x.pause(),Yn(n.clone),n.options?.excludeMode==="remove"||typeof n.options?.filter=="function"&&n.options.filterMode==="remove")try{aa(n.element,n.clone,n.styleCache,n.nodeMap)}catch(_){Et(e.__session,"shrink-failed","shrink pass failed",_),console.warn("[SnapDOM] Couldn't close the gaps left by removed elements.",_)}try{await Wn(n.clone,n.element,n.nodeMap)}catch{}let C=_=>Promise.resolve().then(_),S=(async()=>{await Promise.all([C(()=>Qn(n.clone,n.options)),C(()=>Jn(n.element,n.clone,n.styleCache,n.options,n.nodeMap))]);try{pa(n.element,n.clone,n.nodeMap)}catch(_){Et(e.__session,"backdrop-filter-failed","backdrop-filter emulation failed",_),console.warn("[SnapDOM] Couldn't reproduce a backdrop-filter; captured without it.",_)}if(e.compress&&(e.__compressionClip=f,e.__compressionRootTransform=u,await C(()=>cr(n.clone,n.options,n.nodeMap))),e.captureSelection)try{bs(n.nodeMap)}catch(_){Et(e.__session,"selection-compose-failed","field selection compose failed",_)}})(),k=Promise.resolve();(e.embedFonts==="auto"?((n.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(k=C(async()=>{let _=n.element.ownerDocument||document,T=w?F=>{try{let A=F.getBoundingClientRect();return A.right>=w.left-200&&A.left<=w.right+200&&A.bottom>=w.top-200&&A.top<=w.bottom+200}catch{return!0}}:null,{required:$,usedCodepoints:N}=!w&&e.__fontUsage||Hn(n.element,T);if(e.embedFonts==="auto"){let F=new Set;try{for(let L of _.fonts)F.add(String(L.family).replace(/["']/g,"").toLowerCase())}catch{}if(!(F.size>0&&Array.from($).some(L=>F.has(String(L).split("__")[0].toLowerCase()))))return}if(X()){let F=new Set(Array.from($).map(A=>String(A).split("__")[0]).filter(Boolean));await jn(F,1,_)}c=await Ns({required:$,usedCodepoints:N,exclude:n.options.excludeFonts,localFonts:n.options.localFonts,useProxy:n.options.useProxy,fontStylesheetDomains:n.options.fontStylesheetDomains,iconMatchers:n.options.__iconMatchers,doc:_})})),await Promise.all([S,k]);let R=(n.options.plugins||[]).some(_=>_&&(typeof _.beforeRender=="function"||typeof _.afterRender=="function"));n.options.engine,x?.due()&&await x.pause();let v=n.clone;lr(v,e.__compressedAssets);let M=await fr(n,{clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,fontsCSS:c});if(e.__compressedSnapshot=ar(v,e.__compressedAssets),typeof e.__retain=="function")try{e.__retain({clone:r,nodeMap:a,styleCache:s,styleMap:e.__session.styleMap,classPrefixCSS:o,fontsCSS:c,clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,__compressedAssets:e.__compressedAssets,__compressionDensity:e.__compressionDensity})}catch{}return M}wt();At();var pd=new Set(["png","jpeg","jpg","webp","svg"]);function Pa(t={}){let e=typeof t.type=="string"&&pd.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let r=t.format!=null?n:e==="jpg"?"jpeg":e,i=li(t.cache),o=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let u of o)if(typeof u=="string")try{document.createDocumentFragment().querySelector(u),s.push(u)}catch{console.warn(`[SnapDOM] Invalid exclude selector "${u}"; ignored.`)}else typeof u=="function"?a.push(u):u!=null&&console.warn("[SnapDOM] Ignored an exclude entry: use a CSS selector or a function.",u);let l=t.excludeMode??"hide",f=u=>{if(!u||u.nodeType!==1)return!1;if(u.getAttribute("data-capture")==="exclude")return!0;for(let d of Array.isArray(c.exclude)?c.exclude:[])try{if(u.matches(d))return!0}catch{}for(let d of Array.isArray(c.excludePredicates)?c.excludePredicates:[])try{if(d(u))return!0}catch{}if(typeof c.filter=="function")try{if(!c.filter(u))return!0}catch{}return!1},c={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:l,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:f,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:it(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:ks(t.iconFonts),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:i,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:r,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return c}mt();ce();vt();var $a="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style,pre";function hd(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var md=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function gd(t){if(t.__usesBackdropFilter!==void 0)return t.__usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(md.test(n)){e=!0;break}return t.__usesBackdropFilter=e,e}function yd(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(o=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(o.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let r=[t];t.querySelectorAll&&r.push(...t.querySelectorAll("*"));for(let i of r){let o=getComputedStyle(i),s=o.getPropertyValue("backdrop-filter")||o.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var Na=new WeakMap;function bd(t){let e=Ut(),n=Na.get(t);if(n&&n.epoch===e)return n.leaky;let r=!1,i={budget:2e4},o=s=>{for(let a=0;a<s.length&&!r;a++){if(--i.budget<0){r=!0;return}let l=s[a],f=l.selectorText;if(f&&/[+~]|:has\(/.test(f)){r=!0;return}let c=l.style;if(c&&(c.counterReset||c.counterIncrement||c.counterSet||c.content&&c.content.includes("counter"))){r=!0;return}l.cssRules&&l.cssRules.length&&o(l.cssRules)}};try{for(let s of t.styleSheets){let a=null;try{a=s.cssRules}catch{r=!0}if(r)break;a&&o(a)}if(!r){let s=t.adoptedStyleSheets;if(Array.isArray(s))for(let a of s){if(r)break;try{o(a.cssRules)}catch{r=!0}}}}catch{r=!0}return Na.set(t,{epoch:e,leaky:r}),r}var wd=1/16;function Sd(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px"))return!1;let n=parseFloat(t),r=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(r)&&Math.abs(n-r)<=wd}var ur=new Map,xd=["width","height","min-width","min-height"];function vd(t){let e=ur.get(t);if(e===void 0){e=null;for(let n of xd){let r=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));r&&r[1].endsWith("px")&&((e||={})[n]=r[1])}ur.size>5e3&&ur.clear(),ur.set(t,e)}return e}function Cd(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function kd(t,e){let n=[t];for(;n.length;){let r=n.pop();if(r.nodeType===1){let i=e.nodeMap.get(r);i!==void 0&&(e.nodeMap.delete(r),e.srcToClone.get(i)===r&&e.srcToClone.delete(i)),e.styleMap.delete(r)}for(let i=r.firstChild;i;i=i.nextSibling)n.push(i)}}var Lo={attempts:0,served:0,reconciled:0};async function La(t,e,n){Lo.attempts++;try{let r=await Md(t,e,n);return r&&Lo.served++,r}catch{return null}}async function Md(t,e,n){let r=e.retained;if(!r||!r.clone||!r.styleMap||!r.srcToClone||n.reconcile||n.clip||n.captureSelection||r.clipWindow||t.scrollTop||t.scrollLeft||hd(t)||gd(r)||r.fontsCSS||or(n))return null;for(let d of n.plugins||[])if(d&&(typeof d.beforeSnap=="function"||typeof d.beforeClone=="function"||typeof d.resolveNode=="function"||typeof d.afterClone=="function"))return null;if(r.classPrefixCSS&&(r.classPrefixCSS.includes("::marker")||r.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,o=cn(t);if(!o||bd(i))return null;let s=[];t:for(let d of e.dirtyRoots){if(!d.isConnected||d===t||!t.contains(d))return null;for(let h of e.dirtyRoots)if(h!==d&&h!==t&&h.contains(d))continue t;s.push(d)}if(!s.length)return null;n.__compressedAssets=r.__compressedAssets,n.__compressionDensity=r.__compressionDensity,n.__compressionRootTransform=r.rootTransform2D;for(let d of s){if(d.parentElement===t||d.matches?.($a)||d.querySelector?.($a)||yd(d,o))return null;let h=r.srcToClone.get(d);if(!h||!h.parentNode)return null;let m=new Map,p={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:m,options:n},g=nr(d,null),y=Gn(d),b;try{b=await ee(d,p,n)}finally{y(),g()}if(!b||b.nodeType!==1||b.querySelector?.("style[data-sd]")||(await De(d,b,p,n),p.__pseudoCSS)||p.__usesPlaceholder&&!r.classPrefixCSS?.includes("[data-sd-ph]"))return null;await Ln(b,p),Yn(b);try{await Wn(b,d,m)}catch{}if(await Promise.all([Qn(b,n),Jn(d,b,r.styleCache,n,m)]),n.compress)try{await cr(b,n,m)}catch{}for(let[w,x]of m.entries())Eo(w,x,m,r.styleCache);h.replaceWith(b),kd(h,r);for(let[w,x]of m.entries())r.nodeMap.set(w,x),r.srcToClone.set(x,w)}let a={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:r.nodeMap,options:n},l=new WeakSet;for(let[d,h]of r.nodeMap.entries()){if(!h||h.nodeType!==1||!h.isConnected)continue;let m=r.styleMap.get(d);if(!m)continue;let p=vd(m);if(!p)continue;let g=null,y=!1;for(let b in p){g||=getComputedStyle(h);let w=g.getPropertyValue(b);if(b==="min-width"&&w==="auto"&&!l.has(h.parentElement)){let x=parseFloat(g.width);g.boxSizing!=="border-box"&&m.includes("box-sizing:border-box")&&(x+=["padding-left","padding-right","border-left-width","border-right-width"].reduce((C,S)=>C+(parseFloat(g.getPropertyValue(S))||0),0)),w=`${x}px`}if(!Sd(w,p[b])){y=!0;break}}if(y){if(n.__compressedAssets?.has(d))return null;l.add(h),Lo.reconciled++,await ut(h,d,a,n)}}let f=en(r.styleMap);for(let[d,h]of r.styleMap.entries())Cd(d),_o(d,h,f);let c=(r.classPrefixCSS||"")+Array.from(f.entries()).map(([d,h])=>`.${h}{${d}}`).join("");lr(r.clone,n.__compressedAssets);let u=await fr({element:t,options:n,plugins:n.plugins,clone:r.clone,classCSS:c,styleCache:r.styleCache,nodeMap:r.nodeMap},{clipWindow:null,outerTransforms:r.outerTransforms,outerShadows:r.outerShadows,rootTransform2D:r.rootTransform2D,fontsCSS:r.fontsCSS||""});return n.__compressedSnapshot=ar(r.clone,n.__compressedAssets),r.__compressedAssets=n.__compressedAssets,r.__compressionDensity=n.__compressionDensity,u}At();var Oo=new WeakMap,pr=new WeakMap,qa=new WeakSet,Io=new WeakMap,Ad=64,yn=new Map,Ga=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],_d=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function Ed(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":_d.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function Ia(t){let e=[];for(let n=t;n;){try{let r=n.getBoundingClientRect();e.push(r.x,r.y,r.width,r.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=Pt(n)||null}return e.join("|")}function Oa(t,e){if(e.disposed||(yn.delete(t),yn.set(t,e),yn.size<=Ad))return;let[n,r]=yn.entries().next().value;Xa(n,r)}function Xa(t,e){e.disposed=!0,yn.delete(t),Oo.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of Ga)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let r of Wo)n.removeEventListener(r,e.onMediaDirty,!0);for(let[n,r]of e.trackedImages)n.removeEventListener("load",r),n.removeEventListener("error",r);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function Ya(t){if(qa.has(t))return!1;pr.delete(t);let e=[t],n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i],s=[];o?.nodeType===1&&s.push(o);try{s.push(...o.querySelectorAll("*"))}catch{return!1}for(let a of s){a.shadowRoot&&e.push(a.shadowRoot);let l=String(a.localName||a.tagName||"").toLowerCase();if(/^(?:iframe|canvas|video|audio|object|embed|marquee|blink)$/.test(l)||l==="progress"&&!a.hasAttribute("value")||/^(?:animate|animatetransform|animatemotion|set)$/.test(l))return!1;let f="";if(l==="img"){r.push(a);try{f=a.currentSrc||a.src||""}catch{}}/^(?:input|textarea|select|option)$/.test(l)&&n.push(a);let c=a.getAttribute?.("style")||"",u=Io.get(a);if(f||c){if((!u||u.src!==f||u.style!==c)&&(u={src:f,style:c,animated:Ge(f)||Ge(c)},Io.set(a,u)),u.animated)return!1}else u&&Io.delete(a)}}return pr.set(t,{roots:e.slice(1),controls:n,images:r}),!0}function Do(t,e){if(!t.querySelectorAll)return!1;let n=pr.get(t);pr.delete(t);let r=new Set(n?.roots||[]);if(n&&(e.controls=n.controls,e.scannedImages=n.images),!n){let i=[t];for(let o=0;o<i.length;o++){let s=i[o];s.shadowRoot&&!r.has(s.shadowRoot)&&(r.add(s.shadowRoot),i.push(s.shadowRoot));for(let a of s.querySelectorAll("*"))a.shadowRoot&&!r.has(a.shadowRoot)&&(r.add(a.shadowRoot),i.push(a.shadowRoot))}}for(let[i,o]of e.trackedShadowRoots)if(!r.has(i)){try{o.disconnect()}catch{}for(let a of Wo)i.removeEventListener(a,e.onMediaDirty,!0);e.trackedShadowRoots.delete(i);let s=e.observers.indexOf(o);s>=0&&e.observers.splice(s,1)}for(let i of r)if(!e.trackedShadowRoots.has(i))try{let o=new MutationObserver(e.markDirty);o.observe(i,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),o.__flush=e.markDirty,e.observers.push(o),e.trackedShadowRoots.set(i,o);for(let s of Wo)i.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var Wo=["scroll","change","beforetoggle","toggle"];function hr(t,e){return[t,...e.trackedShadowRoots.keys()]}function Bo(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let r of hr(t,e))r.querySelectorAll&&n.push(...r.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let r=new Set(n);for(let[i,o]of e.trackedImages)r.has(i)||(i.removeEventListener("load",o),i.removeEventListener("error",o),e.trackedImages.delete(i))}for(let r of n){if(r.complete||e.trackedImages.has(r))continue;let i=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,r.removeEventListener("load",i),r.removeEventListener("error",i),e.trackedImages.delete(r)};e.trackedImages.set(r,i),r.addEventListener("load",i),r.addEventListener("error",i)}}function Da(t){let e=new Map,n=new Map,r=new Map;for(let i of t)if(ue(i))if(i.type==="attributes"){let o=e.get(i.target);o||e.set(i.target,o=new Map),o.has(i.attributeName)||o.set(i.attributeName,i.oldValue)}else if(i.type==="characterData")n.has(i.target)||n.set(i.target,i.oldValue);else if(i.type==="childList"){let o=r.get(i.target);o||r.set(i.target,o=new Map);for(let s of i.addedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)+1)}for(let s of i.removedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)-1)}}else return!0;for(let[i,o]of e)for(let[s,a]of o)if(i.getAttribute(s)!==a)return!0;for(let[i,o]of n)if(i.data!==o)return!0;for(let i of r.values())for(let o of i.values())if(o!==0)return!0;return!1}var Rd=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,qe=t=>t&&(typeof t=="object"||typeof t=="function")?dr(t):"-";function Fd(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let r=t.slice(0,n),i=t.slice(n+1);try{if(/;base64/i.test(r)){let o=Math.ceil(e/3)*4;return atob(i.slice(0,o-o%4))}return i.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(o,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function Td(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Fd(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function Wa(t){let e=String(t||"").trim();return e?Rd.test(e)?!0:/^data:/i.test(e)?Td(e):!1:!1}function Ge(t){let e=String(t||"");if(Wa(e))return!0;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(Wa(n[1]??n[2]??n[3]))return!0;return!1}function Ba(t,e=null){let n=t&&t.clone;if(!n)return!1;let r=e?e.map(i=>t.srcToClone?.get(i)).filter(Boolean):[n];for(let i of r)for(let o of Ka(i))if(Ge(o.getAttribute?.("src"))||Ge(o.getAttribute?.("href"))||Ge(o.getAttribute?.("style"))||Ge(t.styleMap?.get(o)))return!0;return!1}function Ka(t){let e=[];t&&t.nodeType===1&&e.push(t);try{e.push(...t.querySelectorAll("*"))}catch{}return e}function Uo(t,e){let n=[],r=new Set,i=o=>{o&&!r.has(o)&&(r.add(o),n.push(o))};t.matches?.("input,textarea,select,option")&&i(t);for(let o of hr(t,e))try{for(let s of o.querySelectorAll("input,textarea,select,option"))i(s)}catch{}e.controls=n}function zo(t,e){let n=[],r=new Set,i=(o,s=!1)=>{if(!(!o||r.has(o))){r.add(o);try{(s||o.scrollLeft||o.scrollTop||o.scrollWidth>o.clientWidth||o.scrollHeight>o.clientHeight)&&n.push(o)}catch{}}};for(let o=t;o;o=o.parentElement)i(o,!0);for(let o of hr(t,e))for(let s of Ka(o))i(s);e.scrollNodes=n}function Ua(t,e){let n=t.ownerDocument||document,r=n.defaultView,i=[r?.location?.hash||"",Ed(n),r?.innerWidth||0,r?.innerHeight||0,r?.devicePixelRatio||1,r?.screen?.orientation?.type||""];try{i.push(...[...n.adoptedStyleSheets||[]].map(qe))}catch{}for(let c of e.trackedShadowRoots.keys())try{i.push("#shadow",...[...c.adoptedStyleSheets||[]].map(qe))}catch{}let o=n.activeElement,s=n.fullscreenElement;(o?.contains(t)||t.contains(o))&&i.push(qe(o)),(s?.contains(t)||t.contains(s))&&i.push(qe(s));let a=[r?.scrollX||0,r?.scrollY||0];for(let c of e.scrollNodes)a.push(c.scrollLeft||0,c.scrollTop||0);let l=[];for(let c of e.controls){let u=String(c.localName||"").toLowerCase();u==="input"?l.push(c.type,Je(c)?c.value.length:c.value,c.checked?1:0,c.indeterminate?1:0):u==="textarea"?l.push(c.value):u==="select"?l.push(c.selectedIndex,c.value):l.push(c.selected?1:0)}let f=[];for(let c of e.images){let u="";try{u=c.currentSrc||c.src||""}catch{}f.push(u,c.complete?1:0,c.naturalWidth||0,c.naturalHeight||0)}return{style:i.join("|"),scroll:a.join("|"),controls:l,images:f,frameDriven:e.retainedFrameDriven}}function Ve(t,e,n){if(!t)return!1;let r=t[n],i=e[n];if(r===i)return!0;if(!Array.isArray(r)||r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(r[o]!==i[o])return!1;return!0}function za(t,e){let n=new Set;for(let r of hr(t,e))try{let i=r.getAnimations?.(r.nodeType===1?{subtree:!0}:void 0)||[];for(let o of i)n.add(o)}catch{}return[...n]}function Ha(t){return t.map(e=>[qe(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function Pd(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let r of e.trackedShadowRoots.keys())if(r.contains(n))return r;return null}function $d(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:Re(),styleEpoch:Ut(),styleStamp:ln(t),outsideMutations:an(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},r=a=>{if(!e.dirtyRoots)return;let l=a&&(a.nodeType===1?a:a.parentElement);if(!l||l===t||!t.contains(l)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(l)},i=a=>{if(e.capturing){for(let l of a)e.pending.push(l);return}for(let l of a)ue(l)&&(e.dirty=!0,r(l.target))},o=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(i);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=i,e.observers.push(a)}catch{}e.markDirty=i,e.onMediaDirty=o;try{for(let a of Ga)t.addEventListener(a,o,{capture:!0,passive:!0})}catch{}return Do(t,e)||Uo(t,e),zo(t,e),Bo(t,e),e}var Nd=0,ja=new WeakMap;function dr(t){let e=ja.get(t);return e||(e="@"+ ++Nd,ja.set(t,e)),e}function Ho(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(dr(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(dr(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let o=[];for(let s of t){let a=Ho(s,e);if(a===null)return null;o.push(a)}return"["+o.join(",")+"]"}let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)return JSON.stringify(dr(t));let i=[];for(let o of Object.keys(t).sort()){let s=t[o];if(s===void 0)continue;let a=Ho(s,e);if(a===null)return null;i.push(JSON.stringify(o)+":"+a)}return"{"+i.join(",")+"}"}finally{e.delete(t)}}function Va(t,e){let{burst:n,invalidate:r,...i}=t||{};try{let o=Ho(i,new Set);return o===null?null:`${(e||[]).map(qe).join(",")}:${o}`}catch{return null}}function Qa(t,e,n,r,i=null){let o=Oo.get(t);o||(o=$d(t),o.baselineSignature=Va(e,n.plugins),Oo.set(t,o));let s=Va(e,n.plugins),a=async()=>{if(o.disposed)return r();let f=s===null||s!==o.baselineSignature;f&&s!==null?o.pendingSig===s?(o.baselineSignature=s,o.last=null,o.dirty=!0,o.dirtyRoots=null,o.pendingSig=null,f=!1):o.pendingSig=s:o.pendingSig=null,Do(t,o),Bo(t,o);for(let k of o.observers)k.__flush(k.takeRecords());Nt();let c=an(t);o.dirty&&o.outsideMutations!==c&&o.dirtyAll(),o.outsideMutations=c;let u=t.getRootNode?.(),d=[...o.trackedShadowRoots.keys()];u?.nodeType===11&&!d.includes(u)&&d.push(u),Tn(t.ownerDocument||document,d);let h=ln(t);o.styleStamp!==h&&(o.styleStamp=h,o.dirty||o.dirtyAll());let m=Ua(t,o),p=za(t,o);m.animation=Ha(p),o.renderState&&(!Ve(o.renderState,m,"style")&&(Fe(),o.dirtyAll()),Ve(o.renderState,m,"scroll")||o.dirtyAll(),Ve(o.renderState,m,"controls")||(de(t),o.dirtyAll()),!Ve(o.renderState,m,"images")&&!o.dirty&&o.dirtyAll());let g=Re();o.envEpoch!==g&&(o.dirtyAll(),o.envEpoch=g);let y=Ut();if(o.styleEpoch!==y&&(o.styleEpoch=y,!o.dirty)){let k=Ia(t);o.geometry!==null&&k!==o.geometry&&(de(t),o.dirtyAll()),o.geometry=k}n.invalidate&&o.dirtyAll();let b=!1,w=!!o.renderState&&!Ve(o.renderState,m,"animation");try{let k=new Set;w&&p.length===0&&(k=null);for(let E of p){let R=E.playState==="running";if(!R&&!w)continue;R&&(b=!0),w=!0;let v=E.effect?.target;if(Pd(t,o,v)===t)k.add(v);else{k=null;break}}if(w&&k&&k.size&&o.retained){o.dirty=!0;for(let E of k)o.dirtyRoots&&o.dirtyRoots.add(E),de(E)}else w&&!k&&o.dirtyAll()}catch{}let x=m.frameDriven,C=b||x;if(C&&(o.last=null),x&&o.dirtyAll(),!f&&!C&&!o.dirty&&o.last)return Oa(t,o),o.last;o.capturing=!0;let S=null;try{let k=null,E=!1,R=null;if(!f&&o.dirty&&o.retained&&o.dirtyRoots&&o.dirtyRoots.size&&i){R=[...o.dirtyRoots];let v=await La(t,o,n);v&&(k=await i(v),E=!0)}if(k||(f||(n.__retain=v=>{let M=new Map;for(let[_,T]of v.nodeMap.entries())M.set(T,_);S={...v,srcToClone:M}}),n.__tornSinceStart=()=>{for(let v of o.observers)for(let M of v.takeRecords())o.pending.push(M);return Nt(),o.torn||Da(o.pending)||an(t)!==c},k=await r()),!f&&!o.disposed){o.dirty=!1,o.dirtyRoots=new Set,S?(o.retained=S,o.retainedFrameDriven=Ba(S),Uo(t,o),zo(t,o)):E&&(o.retainedFrameDriven||=Ba(o.retained,R),Uo(t,o),zo(t,o));let v=Ua(t,o);v.animation=Ha(za(t,o));let M=["style","scroll","controls","images"];b||M.push("animation");let _=M.every(T=>Ve(m,v,T));o.renderState=v,o.styleEpoch=Ut(),o.styleStamp=ln(t),o.geometry=Ia(t),o.renderState.frameDriven?(qa.add(t),Xa(t,o)):_?!C&&!o.renderState.frameDriven&&(o.last=k,Oa(t,o)):(o.dirtyAll(),o.last=null)}return k}finally{n.__retain=void 0,n.__tornSinceStart=void 0;for(let E of o.observers)for(let R of E.takeRecords())o.pending.push(R);Nt();let k=an(t);(o.torn||Da(o.pending)||k!==c)&&(o.dirtyAll(),o.last=null),o.outsideMutations=k,o.styleEpoch=Ut(),o.styleStamp=ln(t),o.pending.length=0,o.torn=!1,o.capturing=!1,o.disposed||(Do(t,o),Bo(t,o))}},l=o.inflight.then(a,a);return o.inflight=l.catch(()=>{}),l}var mr=null;function tl(t){mr=t}var Ld='button, a[href], [role="button"], input, select, summary, label, [tabindex]',jo=!1,bn=null,Vo=new WeakMap,Za=!1;function el(t,e){!jo||!bn||e&&e.burst===!1||Vo.set(bn.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function nl(t){let e={control:t};bn=e,setTimeout(()=>{bn===e&&(bn=null)},0)}function Go(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(Ld):null}function Ja(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=Go(t);e&&(nl(e),qo(t,!1))}function Id(t){let e=Go(t);e&&nl(e)}function qo(t,e=!0){if(!mr||document.visibilityState==="hidden")return;let n=Go(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let r=Vo.get(n);if(r){if(!r.element.isConnected){Vo.delete(n);return}mr(r.element,r.options).catch(()=>{});return}e&&!Za&&(Za=!0,mr(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function rl(){if(jo||typeof document>"u"||typeof document.addEventListener!="function")return;jo=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",Ja,t),document.addEventListener("keydown",Ja,t),document.addEventListener("click",Id,t),document.addEventListener("pointerenter",qo,t),document.addEventListener("focusin",qo,t)}_t();function np(...t){return Fo(...t),Q}async function rp(t,e){if(typeof t!="string"||!t.trim())throw new Error("[SnapDOM] fromString() needs an HTML string.");let n=document.createElement("div");J(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await St();let r=Array.from(n.childNodes).some(o=>o.nodeType===3&&o.textContent.trim()),i=n.children.length===1&&!r?n.firstElementChild:n;return await si(i,{...e||{},burst:!1})}finally{n.remove()}}var op="3.3.6-dev.0",Q=Object.assign(si,{plugins:np,fromString:rp,version:op,preCapture:rl});tl(si);var ii=Symbol("snapdom.internal"),ip=Symbol("snapdom.internal.silent"),bl=new Set(["png","jpeg","jpg","webp","svg"]);async function si(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");let n=Pa(e);n.element=t,n.invalidate&&Fe(),xa(n,e&&e.plugins);let{stage:r,loweredBy:i}=ya(n);n.needs=r,n.__needsLoweredBy=i;let o=ze(r,"render"),s=n.burst===!0||!or(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",f=o&&!n.captureSelection&&n.burst!==!1&&s&&!a&&Ya(t);return f&&el(t,e),n.snap||(n.snap={toPng:(c,u)=>Q.toPng(c,u),toSvg:(c,u)=>Q.toSvg(c,u)}),f?Qa(t,e,n,()=>Q.capture(t,n,ii),c=>wl(c,n)):Q.capture(t,n,ii)}Q.capture=async(t,e,n)=>{if(n!==ii)throw new Error("[SnapDOM] snapdom.capture() is internal; use snapdom(el).");if(ze(e.needs||gt,"render")&&X()){if(e.embedFonts)try{let o=t.ownerDocument||document,s=new Set;if(e.embedFonts==="auto"){try{for(let c of o.fonts)s.add(String(c.family).replace(/["']/g,"").toLowerCase())}catch{}if(s.size===0)throw null}let a=Hn(t);e.clip||(e.__fontUsage=a);let l=a.required,f=new Set([...l].map(c=>String(c).split("__")[0]).filter(Boolean));if(e.embedFonts==="auto"&&(f=new Set([...f].filter(c=>s.has(c.toLowerCase()))),f.size===0))throw null;await jn(f,1,o)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let o of i)try{if(pn(o))continue;let s=o.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){j(e,"Couldn't prepare canvases for Safari.",s)}}let r=await Ta(t,e);return wl(r,e)};async function wl(t,e){let n=e.needs||gt,r=ze(n,"render"),i=A=>wa(n,e.__needsLoweredBy||[],A),o=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,s=o?null:t,a=()=>s??=o.toDataURL(),l=o||t;o&&(t="");let f=e.__compressedSnapshot,c=e.__compressionDensity;delete e.__compressedSnapshot,delete e.__compressedAssets;let u,d=e.meta||{},m=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!X(),p=m?Number.isFinite(e.width)?d.targetW/d.vbW:d.targetH/d.vbH:1,g=m?Number.isFinite(e.height)?d.targetH/d.vbH:d.targetW/d.vbW:1,y=A=>{if(o||!f?.size)return l;let L=d.vbW,O=d.vbH,P=A.crop;P&&(L=Math.max(1,Math.min(L,P.x+P.width)-Math.max(0,P.x)),O=Math.max(1,Math.min(O,P.y+P.height)-Math.max(0,P.y)));let z=Number.isFinite(A.width),q=Number.isFinite(A.height);return(z&&q?Math.max(A.width/L,A.height/O):z?A.width/L*(P?Math.max(1,g/p):1):q?A.height/O*(P?Math.max(1,p/g):1):(A.scale||1)*Math.max(p,g))*(A.dpr||1)<=c?l:u??=_a(a(),f)},b=async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Xe(),Sn));return O(l,{...A,...L||{},format:"png"})},w=()=>{if(!r)throw i("svgString");if(o)throw new Error("[SnapDOM] html-in-canvas makes a raster capture; there is no SVG string.");let A=t.indexOf(",");return A>=0?decodeURIComponent(t.slice(A+1)):""},x=A=>Object.defineProperty({...A||{},svgString:w},"url",r?{get:a,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),C={img:async(A,L)=>{if(o)return b(A,L);let{toImg:O}=await Promise.resolve().then(()=>(ei(),ti)),P={...A,...L||{}};return O(y(P),P)},svg:async(A,L)=>{if(o)return b(A,L);let{toSvg:O}=await Promise.resolve().then(()=>(ei(),ti)),P={...A,...L||{}};return O(y(P),P)},canvas:async(A,L)=>{let{toCanvas:O}=await Promise.resolve().then(()=>(we(),fl)),P={...A,...L||{}};return O(y(P),P)},blob:async(A,L)=>{let{toBlob:O}=await Promise.resolve().then(()=>(oi(),hl)),P={...A,...L||{}};return O(y(P),P)},png:async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Xe(),Sn)),P={...A,...L||{},format:"png"};return O(y(P),P)},jpeg:async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Xe(),Sn)),P={...A,...L||{},format:"jpeg"};return O(y(P),P)},webp:async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Xe(),Sn)),P={...A,...L||{},format:"webp"};return O(y(P),P)},download:async(A,L)=>{let{download:O}=await Promise.resolve().then(()=>(yl(),gl)),P={...A,...L||{}};return O(y(P),P)}};if(!r)for(let A of Object.keys(C)){let L=A==="download"?"download()":`to${A.charAt(0).toUpperCase()}${A.slice(1)}()`;C[A]=async()=>{throw i(L)}}let S={};for(let A of["img","svg","canvas","blob","png","jpeg","webp"])S[A]=async L=>C[A](e,{..._(A,L||{}),[ip]:!0});S.jpg=S.jpeg;let k=A=>Object.defineProperty({...e,...A},"options",{value:e,configurable:!0}),E=k({artifacts:e.__artifacts||null,export:x(),exports:S}),R=await rr("defineExports",E),v=Object.assign({},...R.filter(A=>A&&typeof A=="object").reverse()),M={...C,...v};M.jpeg&&!M.jpg&&(M.jpg=(A,L)=>M.jpeg(A,L));function _(A,L){let O=L||{},P={...e,...O},z=typeof O.type=="string"?O.type.toLowerCase():"",q=typeof O.format=="string"?O.format.toLowerCase():bl.has(z)?z:"";q&&(P.format=q==="jpg"?"jpeg":q),P.__explicitFormat=q?P.format:e.__explicitFormat??null,A==="blob"&&!P.__explicitFormat&&(P.format=o?"png":"svg"),P.type=P.format;let U=B=>B==="jpeg"||B==="jpg"||B==="webp";return[A,P.format,z].map(B=>typeof B=="string"?B.toLowerCase():"").find(U)&&(P.backgroundColor==null||P.backgroundColor==="transparent")&&(P.backgroundColor="#ffffff"),P.scale!==1&&(Number.isFinite(P.width)||Number.isFinite(P.height))&&j(P,"scale ignored: width/height already set the size."),P}let T=!1,$=Promise.resolve();async function N(A,L){let O=Object.freeze(L&&typeof L=="object"?{...L}:{}),P=async()=>{let q=M[A];if(!q)throw new Error(`[SnapDOM] Unknown export type: ${A}`);let U=_(A,O),Y=k({artifacts:e.__artifacts||null,export:x({type:A,options:U,requestedOptions:O})}),B=U.format,dt=U.type;await rr("beforeExport",Y,{format:A,options:U});let pt=U.format!==B?U.format:U.type!==dt?U.type:"",nt=typeof pt=="string"?pt.toLowerCase():"";bl.has(nt)&&(U.format=nt==="jpg"?"jpeg":nt,U.type=U.format,U.__explicitFormat=U.format,/^(?:jpeg|webp)$/.test(U.format)&&(U.backgroundColor==null||U.backgroundColor==="transparent")&&(U.backgroundColor="#ffffff"));let st=await q(Y,U);return await rr("afterExport",Y,{format:A,options:U,result:st}),T||(T=!0,await zt("afterSnap",e)),st},z=$.then(P);return $=z.catch(()=>{}),z}let F={url:t,needs:n,warnings:e.__session&&e.__session.warnings||[],toRaw:()=>{if(!r)throw i("toRaw()");return a()},to:(A,L)=>N(A,L),toImg:A=>N("img",A),toSvg:A=>N("svg",A),toCanvas:A=>N("canvas",A),toBlob:A=>N("blob",A),toPng:A=>N("png",A),toJpg:A=>N("jpg",A),toWebp:A=>N("webp",A),download:A=>N("download",A)};r?o&&Object.defineProperty(F,"url",{get:a,enumerable:!0,configurable:!0}):Object.defineProperty(F,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(F,"meta",r?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let A of Object.keys(M)){let L="to"+A.charAt(0).toUpperCase()+A.slice(1);F[L]||(F[L]=O=>N(A,O))}return F}Q.toRaw=(t,e)=>Q(t,e).then(n=>n.toRaw());Q.toImg=(t,e)=>Q(t,e).then(n=>n.toImg());Q.toSvg=(t,e)=>Q(t,e).then(n=>n.toSvg());Q.toCanvas=(t,e)=>Q(t,e).then(n=>n.toCanvas());Q.toBlob=(t,e)=>Q(t,e).then(n=>n.toBlob());Q.toPng=(t,e)=>Q(t,{...e,format:"png"}).then(n=>n.toPng());Q.toJpg=(t,e)=>Q(t,{...e,format:"jpeg"}).then(n=>n.toJpg());Q.toWebp=(t,e)=>Q(t,{...e,format:"webp"}).then(n=>n.toWebp());Q.download=(t,e)=>Q(t,e).then(n=>n.download());export{gt as DEFAULT_STAGE,Ue as STAGES,ba as assertNeeds,Bu as clearPlugins,To as getGlobalPlugins,je as normalizePlugin,Fo as registerPlugins,Q as snapdom};
|
|
40
|
+
}`,Ju=Math.max(1,Math.min(4,(typeof navigator<"u"&&navigator.hardwareConcurrency||2)-1)),Ot=null,td=0,ed=0,me=new Map;function Ta(){for(let t of me.values())t(void 0);if(me.clear(),Array.isArray(Ot))for(let t of Ot)try{t?.terminate()}catch{}Ot=!1}function nd(){let t,e=null;try{t=URL.createObjectURL(new Blob([Zu],{type:"text/javascript"})),e=new Worker(t),e.onmessage=n=>{let r=me.get(n.data.id);r&&(me.delete(n.data.id),r(n.data.error?void 0:n.data.url??null))},e.onerror=Ta}catch{e=null}return t&&URL.revokeObjectURL(t),e}function rd(){if(Ot===!1)return!1;if(Ot===null){if(typeof Worker>"u"||typeof OffscreenCanvas>"u")return Ot=!1;Ot=[]}let t=td++%Ju;if(!Ot[t]){let e=nd();if(!e)return Ta(),!1;Ot[t]=e}return Ot[t]}var od=5e3;function id(t,e,n,r,i){let o=rd();return o?new Promise(s=>{let a=++ed,l=setTimeout(()=>{me.delete(a),s(void 0)},od);me.set(a,f=>{clearTimeout(l),s(f)});try{o.postMessage({id:a,dataURL:i?"":t,blob:i,srcLength:t.length,targetW:e,targetH:n,resFactor:Fa,quality:Ra,mime:r})}catch{clearTimeout(l),me.delete(a),s(void 0)}}):Promise.resolve(void 0)}async function $o(t,e,n,r){if(typeof t!="string"||!t.startsWith("data:image")||t.startsWith("data:image/svg"))return null;e=Math.ceil(e),n=Math.ceil(n);let i=t.length+":"+t.slice(0,64)+t.slice(-64)+":"+e+"x"+n,o=D.compress,s=o.get(i);if(s?.source===t)return s.result;let a=ir.get(i);if(a?.source===t&&a.cache===o)return a.promise;let l=(async()=>{let c=Gu(t),u=c==="image/jpeg"?"image/jpeg":c==="image/webp"?"image/webp":"image/png",d=Qu(t);if(d&&d.w>0&&d.h>0&&!Ma(d.w,d.h,e,n))return null;if(t.length>=Xu){let S=await id(t,e,n,u,r);if(S!==void 0)return S}let h;try{h=await qu(t)}catch{return null}let m=h.naturalWidth||h.width,p=h.naturalHeight||h.height;if(!m||!p)return null;let g=Ma(m,p,e,n);if(!g)return null;let y=g*Fa,b=Math.max(1,Math.round(m*y)),w=Math.max(1,Math.round(p*y)),x=document.createElement("canvas");x.width=b,x.height=w;let C=x.getContext("2d");if(!C)return null;C.imageSmoothingEnabled=!0,C.imageSmoothingQuality="high",C.drawImage(h,0,0,b,w);try{let S=x.toDataURL(u,Ra);if(typeof S=="string"&&S.startsWith("data:image")&&S.length<t.length)return S}catch{}return null})(),f={source:t,promise:l,cache:o};ir.set(i,f);try{let c=await l;return Yu(o,i,t,c),c}finally{ir.get(i)===f&&ir.delete(i)}}async function sd(t,e,n=new Map,r={}){if(!e.compress)return{count:0,before:0,after:0};let i=Array.from(t.querySelectorAll("img"));t.tagName==="IMG"&&i.unshift(t);let o=0,s=0,a=0,l=async c=>{let u=c.getAttribute("src")||"";if(!u.startsWith("data:image")||u.startsWith("data:image/svg"))return;let d=parseFloat(c.dataset.snapdomWidth)||parseFloat(c.style.width)||c.width||0,h=parseFloat(c.dataset.snapdomHeight)||parseFloat(c.style.height)||c.height||0;if(!d||!h)return;let m=r.value||=Po(t,e),p=m.density*m.stretch(n.get(c)||c),g=await $o(u,d*p,h*p,c.__snapdomBlob);g&&(o++,s+=u.length,a+=g.length,c.setAttribute("src",g),sr(c,"attribute","src",u,g,e))},f=6;for(let c=0;c<i.length;c+=f)await Promise.allSettled(i.slice(c,c+f).map(l));return{count:o,before:s,after:a}}var ad=/^(cover|contain|(\d+(\.\d+)?%(\s+\d+(\.\d+)?%)?))$/;function ld(t){let e=t.offsetWidth||t.getBoundingClientRect().width||0,n=t.offsetHeight||t.getBoundingClientRect().height||0;return{w:e,h:n}}async function cd(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=[],o=[t,...t.querySelectorAll("*")];for(let f of o){let c=f.style&&f.style.backgroundImage;c&&c.includes("data:image")&&i.push(f)}let s=0,a=async f=>{let c=n.get(f);if(!c||!c.isConnected)return;let u;try{u=getComputedStyle(c)}catch{return}if((u.backgroundRepeat||"repeat").toLowerCase().split(",").some(E=>E.trim()!=="no-repeat"))return;let h=(f.style.backgroundSize||u.backgroundSize||"auto").toLowerCase();if(h.split(",").some(E=>!ad.test(E.trim())))return;let{w:m,h:p}=ld(c);if(!m||!p)return;let g=Math.max(1,...(h.match(/\d+(?:\.\d+)?%/g)||[]).map(E=>parseFloat(E)/100)),y=r.value||=Po(t,e),b=y.density*y.stretch(c)*g,w=m*b,x=p*b,C=f.style.backgroundImage,S=[...C.matchAll(/url\((['"]?)(data:image\/[^)'"]+)\1\)/gi)],k=C;for(let E of S){let R=E[2];if(R.startsWith("data:image/svg"))continue;let v=await $o(R,w,x);v&&(k=k.split(R).join(v),s++)}k!==C&&(f.style.setProperty("background-image",k,f.style.getPropertyPriority("background-image")),sr(f,"style","background-image",C,f.style.backgroundImage,e))},l=6;for(let f=0;f<i.length;f+=l)await Promise.allSettled(i.slice(f,f+l).map(a));return{count:s}}async function fd(t,e,n=new Map,r={}){if(!e.compress)return{count:0};let i=Array.from(t.querySelectorAll("image"));t.localName==="image"&&i.unshift(t);let o=0,s=async l=>{let f=l.getAttribute("href")||(typeof l.getAttributeNS=="function"?l.getAttributeNS("http://www.w3.org/1999/xlink","href"):null);if(!f||!f.startsWith("data:image")||f.startsWith("data:image/svg"))return;let c=l.getAttribute("width")||"",u=l.getAttribute("height")||"";if(c.includes("%")||u.includes("%"))return;let d=n.get(l),h=d?I(d):l.style,m=(x,C)=>{if(/^\d+(?:\.\d+)?px$/.test(h?.[x]||""))return parseFloat(h[x]);if(/^\d+(?:\.\d+)?(?:px)?$/.test(C.trim()))return parseFloat(C);try{return d?.[x]?.baseVal?.value||0}catch{return 0}},p=m("width",c),g=m("height",u);if(!p||!g)return;let y=r.value||=Po(t,e),b=y.density*y.stretch(d||l),w=await $o(f,p*b,g*b);w&&(l.setAttribute("href",w),sr(l,"attribute","href",f,w,e),l.hasAttribute("xlink:href")&&(l.setAttributeNS(Aa,"xlink:href",w),sr(l,"attribute","xlink:href",f,w,e)),o++)},a=6;for(let l=0;l<i.length;l+=a)await Promise.allSettled(i.slice(l,l+a).map(s));return{count:o}}async function cr(t,e,n){if(!e.compress)return;let r={};await sd(t,e,n,r),await cd(t,e,n,r),await fd(t,e,n,r)}vt();wt();_t();function ud(t,e){if(X())return t;let n=t.indexOf("</style>");if(n===-1)return t;let r=/<style\b[^>]*>[\s\S]*?<\/style>/g,i=[],o=n,s;for(r.lastIndex=n;s=r.exec(t);)i.push({text:t.slice(o,s.index),intern:!0}),i.push({text:s[0],intern:!1}),o=r.lastIndex;i.push({text:t.slice(o),intern:!0});let a=new Map,l=/ style="([^"]*)"/g,f;for(let y of i)if(y.intern)for(l.lastIndex=0;f=l.exec(y.text);)a.set(f[1],(a.get(f[1])||0)+1);let c=0;for(let[y,b]of a)b>1&&(c+=(b-1)*y.length);if(c<2048||t.includes(" data-sdi="))return t;let u=dd(e,i.some(y=>!y.intern),t.includes("data-snapdom-asset"));if(u===null)return t;let d=new Map,h=0,m=[],p=(y,b)=>{if((a.get(b)||0)<2||u.has(b))return y;let w=d.get(b);return w===void 0&&(w="i"+(h++).toString(36),d.set(b,w),m.push(`[data-sdi="${w}"]{${b}}`)),` data-sdi="${w}"`},g="";for(let y of i)g+=y.intern?y.text.replace(l,p):y.text;return t.slice(0,n)+m.join("")+g}function dd(t,e,n){let r=new Set;if(!e&&!n)return r;if(!t||t.querySelector("[data-sdi]"))return null;let i=l=>{let f=l.getAttribute("style");f&&r.add(f)};if(n&&t.querySelectorAll("[data-snapdom-asset][style]").forEach(i),e)try{let l=f=>{for(let c of f){if(c.type===CSSRule.IMPORT_RULE||c.type===CSSRule.NAMESPACE_RULE)throw new Error("External or namespaced CSS");if(c.selectorText){if(/\[\s*style\b|data-sdi|\[[^\]]*\\|&/i.test(c.selectorText))throw new Error("Attribute-dependent or nested CSS");t.querySelectorAll(c.selectorText).forEach(i)}c.cssRules&&l(c.cssRules)}};for(let f of[...t.querySelectorAll("style")].slice(1)){let c=f.textContent||"";if(/@import\b/i.test(c))return null;let u=new CSSStyleSheet;u.replaceSync(c),l(u.cssRules)}}catch{return null}let o=new Set,s=document.createElement("div"),a=new XMLSerializer;for(let l of r){s.setAttribute("style",l);let f=a.serializeToString(s).match(/ style="([^"]*)"/);f&&o.add(f[1])}return o}async function fr(t,e){let{clipWindow:n,outerTransforms:r,outerShadows:i,rootTransform2D:o,fontsCSS:s}=e,a=t.options;if(t!==a){let{options:Z,...et}=t;t=Object.assign(a,et),Object.defineProperty(t,"options",{value:t,configurable:!0})}let l,f;fa(t,s),await zt("beforeRender",t);let c=I(t.element),u=t.element.getBoundingClientRect(),d=Math.max(1,W(t.element.offsetWidth||parseFloat(c.width)||u.width||1)),h=Math.max(1,W(t.element.offsetHeight||parseFloat(c.height)||u.height||1)),m=t.element.ownerDocument||document;if(!n&&(t.element===m.body||t.element===m.documentElement)&&!t.__pinned){let Z=Math.max(t.element.scrollHeight||0,m.documentElement?.scrollHeight||0,m.body?.scrollHeight||0),et=Math.max(t.element.scrollWidth||0,m.documentElement?.scrollWidth||0,m.body?.scrollWidth||0);Z>0&&(h=Math.max(h,W(Z))),et>0&&(d=Math.max(d,W(et)));try{let tt=(t.scrollbarCSS||"").length+(t.baseCSS||"").length+(t.fontsCSS||"").length+(t.classCSS||"").length,rt=D.measureHints.get(t.element);if(rt&&rt.cssLen===tt&&rt.w0===d&&rt.docH===Z&&rt.docW===et)rt.csh>0&&(h=Math.max(h,W(rt.csh))),rt.csw>0&&(d=Math.max(d,W(rt.csw)));else{let ot=m.createElement("div");J(ot),ot.style.cssText="position:absolute!important;left:-9999px!important;top:0!important;width:"+d+"px!important;overflow:visible!important;visibility:hidden!important;";let ie=ot.attachShadow({mode:"open"}),se=m.createElement("style");se.textContent=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS,ie.appendChild(se),ie.appendChild(Ao(t.clone)),m.body.appendChild(ot);let Ke=ot.scrollHeight,qt=ot.scrollWidth;m.body.removeChild(ot),D.measureHints.set(t.element,{cssLen:tt,w0:d,docH:Z,docW:et,csh:Ke,csw:qt}),Ke>0&&(h=Math.max(h,W(Ke))),qt>0&&(d=Math.max(d,W(qt)))}}catch{}}if(t.options?.excludeMode==="remove"||typeof t.options?.filter=="function"&&t.options.filterMode==="remove"){let Z=Mo(t.element,t.options),et=1,tt=Mo(t.element,{}),rt=Math.max(2,h*.15);Number.isFinite(tt)&&tt>=h-rt&&Number.isFinite(Z)&&Z>0&&(h=Math.max(1,Math.min(h,W(Z+et))))}if(t.options?.reconcile)try{let Z=(t.scrollbarCSS||"")+t.baseCSS+"svg{overflow:visible;} foreignObject{overflow:visible;}"+t.classCSS;ca(t.element,t.clone,Z,t.nodeMap,d,h)}catch(Z){console.warn("[SnapDOM] reconcile couldn't run; captured without it.",Z)}let g=(Z,et=NaN)=>{let tt=typeof Z=="string"?parseFloat(Z):Z;return Number.isFinite(tt)?tt:et},y=g(t.options.width),b=g(t.options.height),w=n?W(n.width):d,x=n?W(n.height):h,C=w,S=x,k=Number.isFinite(y),E=Number.isFinite(b),R=x>0?w/x:1;k&&E?(C=Math.max(1,W(y)),S=Math.max(1,W(b))):k?(C=Math.max(1,W(y)),S=Math.max(1,W(C/(R||1)))):E&&(S=Math.max(1,W(b)),C=Math.max(1,W(S*(R||1))));let v=0,M=0,_=d,T=h;if(n){let Z=0,et=0;if(No(t.element)){let tt=null;if(!r&&o&&Number.isFinite(o.a))tt={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0};else{let rt=he(t.element),ot=ko(c.transform&&c.transform!=="none"?c.transform:"",rt);ot&&ot.is2D&&(tt={a:ot.a,b:ot.b,c:ot.c,d:ot.d,e:0,f:0})}if(tt&&!(tt.a===1&&tt.b===0&&tt.c===0&&tt.d===1)){let{ox:rt,oy:ot}=hn(c,d,h),ie=De(d,h,tt,rt,ot);Z=ie.minX,et=ie.minY}}v=W(n.x+Z),M=W(n.y+et),_=W(v+n.width),T=W(M+n.height)}else if(!r&&o&&Number.isFinite(o.a)){let Z={a:o.a,b:o.b||0,c:o.c||0,d:o.d||1,e:0,f:0},et=De(d,h,Z,0,0);v=W(et.minX),M=W(et.minY),_=W(et.maxX),T=W(et.maxY)}else if(r&&No(t.element)){let et=c.transform&&c.transform!=="none"?c.transform:"",tt=he(t.element),rt=ne({baseTransform:et,rotate:tt.rotate||"0deg",scale:tt.scale,translate:tt.translate,width:d,height:h}),{ox:ot,oy:ie}=hn(c,d,h),se=rt.is2D?rt:new DOMMatrix(rt.toString()),Ke={a:se.a,b:se.b,c:se.c,d:se.d,e:0,f:0},qt=De(d,h,Ke,ot,ie);v=W(qt.minX),M=W(qt.minY),_=W(qt.maxX),T=W(qt.maxY)}let $=yo(c),N=bo(c),F=wo(c),A=So(c),L=xo(c),O=u.width>0?(_-v)/u.width:1,P=u.height>0?(T-M)/u.height:1,z=i==="subtree"&&!n?Qs(t.element,t.nodeMap,t.styleCache,O,P):{top:0,right:0,bottom:0,left:0},q=n?{top:0,right:0,bottom:0,left:0}:i?{top:W(Math.max($.top,N.top,z.top)+F.top+A.top+L.bleed.top),right:W(Math.max($.right,N.right,z.right)+F.right+A.right+L.bleed.right),bottom:W(Math.max($.bottom,N.bottom,z.bottom)+F.bottom+A.bottom+L.bleed.bottom),left:W(Math.max($.left,N.left,z.left)+F.left+A.left+L.bleed.left)}:{top:F.top,right:F.right,bottom:F.bottom,left:F.left};v=W(v-q.left),M=W(M-q.top),_=W(_+q.right),T=W(T+q.bottom);let U=Math.max(1,W(_-v)),Y=Math.max(1,W(T-M)),B="http://www.w3.org/2000/svg",dt=No(t.element)?2:0,nt=W(dt+(r?0:1)),st=Math.ceil(U+nt*2),yt=Math.ceil(Y+nt*2),bt=W(-(W(v)-nt)),ct=W(-(W(M)-nt)),Dt=Math.max(0,bt),V=Math.max(0,ct),G=W(st-Math.min(0,bt)),H=W(yt-Math.min(0,ct)),ht=m.defaultView||window,K=!X()&&CSS.supports("zoom","2")&&ht.devicePixelRatio||1;a.__layoutZoom=K;let kt=document.createElementNS(B,"foreignObject");kt.setAttribute("x",String(Math.min(0,bt)*K)),kt.setAttribute("y",String(Math.min(0,ct)*K)),kt.setAttribute("width",String(G*K)),kt.setAttribute("height",String(H*K)),kt.style.overflow="visible";let Se=document.createElement("style"),Sn="svg{overflow:visible;} foreignObject{overflow:visible;} foreignObject>div{-webkit-text-size-adjust:100%!important;text-size-adjust:100%!important;}";Se.textContent=(t.scrollbarCSS||"")+t.baseCSS+t.fontsCSS+Sn+t.classCSS,kt.appendChild(Se);let Xe=document.createElement("div");Xe.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),Xe.style.cssText=`all:initial;box-sizing:border-box;display:block;overflow:visible;width:${G}px;height:${H}px`+(Dt!==0||V!==0?`;padding:${V}px 0 0 ${Dt}px !important`:"")+(K!==1?`;zoom:${K} !important`:""),Xe.appendChild(t.clone),kt.appendChild(Xe);let Mr=new XMLSerializer().serializeToString(kt),jt=k||E,Ar=Object.freeze({w0:w,h0:x,vbW:st,vbH:yt,targetW:C,targetH:S,contentX:W(bt+(n?v:0)),contentY:W(ct+(n?M:0)),clip:n?Object.freeze({x:W(v),y:W(M),width:w,height:x}):null});Object.defineProperty(a,"meta",{value:Ar,enumerable:!0,writable:!1,configurable:!0});let _r=!jt||X()?st:k?C:W(st*(S/yt)),xn=!jt||X()?yt:E?S:W(yt*(C/st)),Vt=parseFloat(I(m.documentElement)?.fontSize)||16,ai=K!==1,xl=`<svg xmlns="${B}" width="${_r}" height="${xn}" viewBox="0 0 ${st} ${yt}" font-size="${Vt}px">${ai?`<g transform="scale(${1/K})">`:""}`,vl=ai?"</g></svg>":"</svg>";f=xl+ud(Mr,kt)+vl,l=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(f)}`,t.svgString=f,t.dataURL=l,a.__artifacts={classCSS:t.classCSS||"",fontsCSS:t.fontsCSS||"",baseCSS:t.baseCSS||"",scrollbarCSS:t.scrollbarCSS||""},await zt("afterRender",t),t.clone=t.nodeMap=t.styleCache=t.svgString=null;let Er=[...document.querySelectorAll("#snapdom-sandbox")].find(Xt);return Er&&Er.style.position==="absolute"&&Er.remove(),t.dataURL}function No(t){return Js(t)}function pd(t){let e=Array.isArray(t.plugins)?t.plugins:To(),n=[];for(let r of e){let i=He(r);i&&typeof i.resolveNode=="function"&&n.push(i.resolveNode.bind(i))}return n.length?n:null}async function Pa(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");e.__session=Ro(e.cache),delete e.__compressedAssets,delete e.__compressedSnapshot,delete e.__compressionDensity,e.__resolveNodeHooks=pd(e);let n=e;n.element=t,Object.defineProperty(n,"options",{value:n,configurable:!0});let r,i,o,s,a,l,f,c="",u=null,d=e.needs||gt,h=n.format,m=n.type;await zt("beforeSnap",n);let p=n.format!==h&&/^(?:png|jpe?g|webp|svg)$/i.test(n.format),g=n.type!==m&&/^(?:png|jpe?g|webp|svg)$/i.test(n.type);if(p||g){let _=String(p?n.format:n.type).toLowerCase();n.format=_==="jpg"?"jpeg":_,n.type=n.format,n.__explicitFormat=n.format,/^(?:jpeg|webp)$/.test(n.format)&&(n.backgroundColor==null||n.backgroundColor==="transparent")&&(n.backgroundColor="#ffffff")}await zt("beforeClone",n);let y=n.outerTransforms!==!1,b=n.outerShadows==="subtree"?"subtree":!!n.outerShadows,w=n.clip?Xn(n.element,n.clip):null;if(e.__styleShare===void 0)try{e.__styleShare=Bi(n.element)&&(typeof n.element.getAnimations!="function"||n.element.getAnimations({subtree:!0}).length===0)}catch{e.__styleShare=!1}let x=_i(e.fast);for(;;){e.__slicer=x;let _=nr(n.element,w);try{({clone:r,classCSS:i,classPrefixCSS:o,styleCache:s,nodeMap:a,reconcileRisk:l,clipWindow:f}=await ua(n.element,n.options)),l>0&&!e.reconcile&&(Et(e.__session,"reconcile-risk","text in inline/table-cell elements kept natural width and may re-wrap; pass { reconcile: true } for pixel-exact layout"),D.warnedReconcile||(D.warnedReconcile=!0,console.warn("[SnapDOM] Some text may wrap differently in the capture. Pass { reconcile: true } to fix it (about 2x slower)."))),!y&&r&&(u=Zs(n.element,r)),!b&&r&&ia(n.element,r,n.options),r&&(aa(n.element,r,a),sa(n.element,r))}finally{_()}if(!x?.yielded||!e.__tornSinceStart?.())break;x=null,e.__session=Ro(e.cache)}if(e.__slicer=null,n.clone=r,n.classCSS=i,n.styleCache=s,n.nodeMap=a,await zt("afterClone",n),!Ue(d,"render"))return null;if(x?.due()&&await x.pause(),Yn(n.clone),n.options?.excludeMode==="remove"||typeof n.options?.filter=="function"&&n.options.filterMode==="remove")try{la(n.element,n.clone,n.styleCache,n.nodeMap)}catch(_){Et(e.__session,"shrink-failed","shrink pass failed",_),console.warn("[SnapDOM] Couldn't close the gaps left by removed elements.",_)}try{await Wn(n.clone,n.element,n.nodeMap)}catch{}let C=_=>Promise.resolve().then(_),S=(async()=>{await Promise.all([C(()=>Qn(n.clone,n.options)),C(()=>Jn(n.element,n.clone,n.styleCache,n.options,n.nodeMap))]);try{ha(n.element,n.clone,n.nodeMap)}catch(_){Et(e.__session,"backdrop-filter-failed","backdrop-filter emulation failed",_),console.warn("[SnapDOM] Couldn't reproduce a backdrop-filter; captured without it.",_)}if(e.compress&&(e.__compressionClip=f,e.__compressionRootTransform=u,await C(()=>cr(n.clone,n.options,n.nodeMap))),e.captureSelection)try{bs(n.nodeMap)}catch(_){Et(e.__session,"selection-compose-failed","field selection compose failed",_)}})(),k=Promise.resolve();(e.embedFonts==="auto"?((n.element.ownerDocument||document).fonts?.size||0)>0:e.embedFonts)&&(k=C(async()=>{let _=n.element.ownerDocument||document,T=w?F=>{try{let A=F.getBoundingClientRect();return A.right>=w.left-200&&A.left<=w.right+200&&A.bottom>=w.top-200&&A.top<=w.bottom+200}catch{return!0}}:null,{required:$,usedCodepoints:N}=!w&&e.__fontUsage||Hn(n.element,T);if(e.embedFonts==="auto"){let F=new Set;try{for(let L of _.fonts)F.add(String(L.family).replace(/["']/g,"").toLowerCase())}catch{}if(!(F.size>0&&Array.from($).some(L=>F.has(String(L).split("__")[0].toLowerCase()))))return}if(X()){let F=new Set(Array.from($).map(A=>String(A).split("__")[0]).filter(Boolean));await jn(F,1,_)}c=await Ls({required:$,usedCodepoints:N,exclude:n.options.excludeFonts,localFonts:n.options.localFonts,useProxy:n.options.useProxy,fontStylesheetDomains:n.options.fontStylesheetDomains,iconMatchers:n.options.__iconMatchers,doc:_})})),await Promise.all([S,k]);let R=(n.options.plugins||[]).some(_=>_&&(typeof _.beforeRender=="function"||typeof _.afterRender=="function"));n.options.engine,x?.due()&&await x.pause();let v=n.clone;lr(v,e.__compressedAssets);let M=await fr(n,{clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,fontsCSS:c});if(e.__compressedSnapshot=ar(v,e.__compressedAssets),typeof e.__retain=="function")try{e.__retain({clone:r,nodeMap:a,styleCache:s,styleMap:e.__session.styleMap,classPrefixCSS:o,fontsCSS:c,clipWindow:f,outerTransforms:y,outerShadows:b,rootTransform2D:u,__compressedAssets:e.__compressedAssets,__compressionDensity:e.__compressionDensity})}catch{}return M}wt();At();var hd=new Set(["png","jpeg","jpg","webp","svg"]);function $a(t={}){let e=typeof t.type=="string"&&hd.has(t.type.toLowerCase())?t.type.toLowerCase():null,n=t.format??e??"png";n==="jpg"&&(n="jpeg");let r=t.format!=null?n:e==="jpg"?"jpeg":e,i=li(t.cache),o=t.exclude==null?[]:Array.isArray(t.exclude)?t.exclude:[t.exclude],s=[],a=[];for(let u of o)if(typeof u=="string")try{document.createDocumentFragment().querySelector(u),s.push(u)}catch{console.warn(`[SnapDOM] Invalid exclude selector "${u}"; ignored.`)}else typeof u=="function"?a.push(u):u!=null&&console.warn("[SnapDOM] Ignored an exclude entry: use a CSS selector or a function.",u);let l=t.excludeMode??"hide",f=u=>{if(!u||u.nodeType!==1)return!1;if(u.getAttribute("data-capture")==="exclude")return!0;for(let d of Array.isArray(c.exclude)?c.exclude:[])try{if(u.matches(d))return!0}catch{}for(let d of Array.isArray(c.excludePredicates)?c.excludePredicates:[])try{if(d(u))return!0}catch{}if(typeof c.filter=="function")try{if(!c.filter(u))return!0}catch{}return!1},c={debug:t.debug??!1,scale:t.scale??1,exclude:s,excludePredicates:a.length?a:null,excludeMode:l,filter:t.filter??null,filterMode:t.filterMode??"hide",shouldExclude:f,placeholders:t.placeholders!==!1,captureSelection:t.captureSelection??!1,canvas:it(t.canvas,"canvas")?t.canvas:null,embedFonts:t.embedFonts??"auto",iconFonts:Array.isArray(t.iconFonts)?t.iconFonts:t.iconFonts?[t.iconFonts]:[],__iconMatchers:Ms(t.iconFonts),localFonts:Array.isArray(t.localFonts)?t.localFonts:[],excludeFonts:t.excludeFonts??void 0,fontStylesheetDomains:Array.isArray(t.fontStylesheetDomains)?t.fontStylesheetDomains:[],fallbackURL:t.fallbackURL??void 0,cache:i,__styleShare:t.__styleShare,useProxy:typeof t.useProxy=="string"?t.useProxy:"",width:t.width??null,height:t.height??null,format:n,__explicitFormat:r,type:n,quality:t.quality??.92,dpr:t.dpr??(window.devicePixelRatio||1),backgroundColor:t.backgroundColor??(["jpeg","webp"].includes(n)?"#ffffff":null),filename:t.filename??"snapDOM",outerTransforms:t.outerTransforms??!0,outerShadows:t.outerShadows??!1,reconcile:t.reconcile??!1,burst:t.burst,fast:t.fast===!1||t.fast==="auto"?t.fast:!0,engine:t.engine,invalidate:t.invalidate??!1,__pinned:t.__pinned===!0,clip:t.clip??null,compress:t.compress!==!1,excludeStyleProps:t.excludeStyleProps??null,resolvePicturePlaceholders:t.resolvePicturePlaceholders!==!1};return c}mt();ce();vt();var Na="svg,iframe,canvas,video,audio,object,embed,slot,template,picture,style,pre";function md(t){try{return t.matches?.("dialog,[popover]")||!!t.querySelector?.("dialog,[popover]")}catch{return!0}}var gd=/(?:^|;)\s*(?:-webkit-)?backdrop-filter:\s*(?!none(?:\s*!important)?(?:;|$))[^;]+/i;function yd(t){if(t.__usesBackdropFilter!==void 0)return t.__usesBackdropFilter;let e=!1;for(let n of t.styleMap.values())if(gd.test(n)){e=!0;break}return t.__usesBackdropFilter=e,e}function bd(t,e){let n=e.has("backdrop-filter")||e.has("-webkit-backdrop-filter");if(!n&&(n=(o=>/(?:^|;)\s*(?:-webkit-)?backdrop-filter\s*:/i.test(o.getAttribute?.("style")||""))(t),!n))try{n=!!t.querySelector?.('[style*="backdrop-filter" i]')}catch{n=!0}if(!n)return!1;let r=[t];t.querySelectorAll&&r.push(...t.querySelectorAll("*"));for(let i of r){let o=getComputedStyle(i),s=o.getPropertyValue("backdrop-filter")||o.getPropertyValue("-webkit-backdrop-filter");if(s&&s!=="none")return!0}return!1}var La=new WeakMap;function wd(t){let e=Ut(),n=La.get(t);if(n&&n.epoch===e)return n.leaky;let r=!1,i={budget:2e4},o=s=>{for(let a=0;a<s.length&&!r;a++){if(--i.budget<0){r=!0;return}let l=s[a],f=l.selectorText;if(f&&/[+~]|:has\(/.test(f)){r=!0;return}let c=l.style;if(c&&(c.counterReset||c.counterIncrement||c.counterSet||c.content&&c.content.includes("counter"))){r=!0;return}l.cssRules&&l.cssRules.length&&o(l.cssRules)}};try{for(let s of t.styleSheets){let a=null;try{a=s.cssRules}catch{r=!0}if(r)break;a&&o(a)}if(!r){let s=t.adoptedStyleSheets;if(Array.isArray(s))for(let a of s){if(r)break;try{o(a.cssRules)}catch{r=!0}}}}catch{r=!0}return La.set(t,{epoch:e,leaky:r}),r}var Sd=1/16;function xd(t,e){if(t===e)return!0;if(!t.endsWith("px")||!e.endsWith("px"))return!1;let n=parseFloat(t),r=parseFloat(e);return Number.isFinite(n)&&Number.isFinite(r)&&Math.abs(n-r)<=Sd}var ur=new Map,vd=["width","height","min-width","min-height"];function Cd(t){let e=ur.get(t);if(e===void 0){e=null;for(let n of vd){let r=t.match(new RegExp("(?:^|;)"+n+":([^;]+)"));r&&r[1].endsWith("px")&&((e||={})[n]=r[1])}ur.size>5e3&&ur.clear(),ur.set(t,e)}return e}function kd(t){if(!(!t.classList||!t.classList.length))for(let e of Array.from(t.classList))/^c\d+$/.test(e)&&t.classList.remove(e)}function Md(t,e){let n=[t];for(;n.length;){let r=n.pop();if(r.nodeType===1){let i=e.nodeMap.get(r);i!==void 0&&(e.nodeMap.delete(r),e.srcToClone.get(i)===r&&e.srcToClone.delete(i)),e.styleMap.delete(r)}for(let i=r.firstChild;i;i=i.nextSibling)n.push(i)}}var Lo={attempts:0,served:0,reconciled:0};async function Ia(t,e,n){Lo.attempts++;try{let r=await Ad(t,e,n);return r&&Lo.served++,r}catch{return null}}async function Ad(t,e,n){let r=e.retained;if(!r||!r.clone||!r.styleMap||!r.srcToClone||n.reconcile||n.clip||n.captureSelection||r.clipWindow||t.scrollTop||t.scrollLeft||md(t)||yd(r)||r.fontsCSS||or(n))return null;for(let d of n.plugins||[])if(d&&(typeof d.beforeSnap=="function"||typeof d.beforeClone=="function"||typeof d.resolveNode=="function"||typeof d.afterClone=="function"))return null;if(r.classPrefixCSS&&(r.classPrefixCSS.includes("::marker")||r.classPrefixCSS.includes("::first-line"))||n.excludeMode==="remove")return null;let i=t.ownerDocument||document,o=ln(t);if(!o||wd(i))return null;let s=[];t:for(let d of e.dirtyRoots){if(!d.isConnected||d===t||!t.contains(d))return null;for(let h of e.dirtyRoots)if(h!==d&&h!==t&&h.contains(d))continue t;s.push(d)}if(!s.length)return null;n.__compressedAssets=r.__compressedAssets,n.__compressionDensity=r.__compressionDensity,n.__compressionRootTransform=r.rootTransform2D;for(let d of s){if(d.parentElement===t||d.matches?.(Na)||d.querySelector?.(Na)||bd(d,o))return null;let h=r.srcToClone.get(d);if(!h||!h.parentNode)return null;let m=new Map,p={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:m,options:n},g=nr(d,null),y=Gn(d),b;try{b=await ee(d,p,n)}finally{y(),g()}if(!b||b.nodeType!==1||b.querySelector?.("style[data-sd]")||(await Oe(d,b,p,n),p.__pseudoCSS)||p.__usesPlaceholder&&!r.classPrefixCSS?.includes("[data-sd-ph]"))return null;await Nn(b,p),Yn(b);try{await Wn(b,d,m)}catch{}if(await Promise.all([Qn(b,n),Jn(d,b,r.styleCache,n,m)]),n.compress)try{await cr(b,n,m)}catch{}for(let[w,x]of m.entries())Eo(w,x,m,r.styleCache);h.replaceWith(b),Md(h,r);for(let[w,x]of m.entries())r.nodeMap.set(w,x),r.srcToClone.set(x,w)}let a={styleMap:r.styleMap,styleCache:r.styleCache,nodeMap:r.nodeMap,options:n},l=new WeakSet;for(let[d,h]of r.nodeMap.entries()){if(!h||h.nodeType!==1||!h.isConnected)continue;let m=r.styleMap.get(d);if(!m)continue;let p=Cd(m);if(!p)continue;let g=null,y=!1;for(let b in p){g||=getComputedStyle(h);let w=g.getPropertyValue(b);if(b==="min-width"&&w==="auto"&&!l.has(h.parentElement)){let x=parseFloat(g.width);g.boxSizing!=="border-box"&&m.includes("box-sizing:border-box")&&(x+=["padding-left","padding-right","border-left-width","border-right-width"].reduce((C,S)=>C+(parseFloat(g.getPropertyValue(S))||0),0)),w=`${x}px`}if(!xd(w,p[b])){y=!0;break}}if(y){if(n.__compressedAssets?.has(d))return null;l.add(h),Lo.reconciled++,await ut(h,d,a,n)}}let f=tn(r.styleMap);for(let[d,h]of r.styleMap.entries())kd(d),_o(d,h,f);let c=(r.classPrefixCSS||"")+Array.from(f.entries()).map(([d,h])=>`.${h}{${d}}`).join("");lr(r.clone,n.__compressedAssets);let u=await fr({element:t,options:n,plugins:n.plugins,clone:r.clone,classCSS:c,styleCache:r.styleCache,nodeMap:r.nodeMap},{clipWindow:null,outerTransforms:r.outerTransforms,outerShadows:r.outerShadows,rootTransform2D:r.rootTransform2D,fontsCSS:r.fontsCSS||""});return n.__compressedSnapshot=ar(r.clone,n.__compressedAssets),r.__compressedAssets=n.__compressedAssets,r.__compressionDensity=n.__compressionDensity,u}At();var Oo=new WeakMap,pr=new WeakMap,Ga=new WeakSet,Io=new WeakMap,_d=64,gn=new Map,Xa=["scroll","input","change","focusin","focusout","pointerdown","pointerup","pointercancel","keydown","keyup","beforetoggle","toggle"],Ed=["(prefers-color-scheme: dark)","(prefers-reduced-motion: reduce)","(prefers-contrast: more)","(forced-colors: active)","(inverted-colors: inverted)","(prefers-reduced-transparency: reduce)","(hover: hover)","(any-hover: hover)","(pointer: coarse)","(any-pointer: coarse)","(color-gamut: p3)","(dynamic-range: high)"];function Rd(t){let e=t?.defaultView;return typeof e?.matchMedia!="function"?"":Ed.map(n=>{try{return e.matchMedia(n).matches?"1":"0"}catch{return"?"}}).join("")}function Oa(t){let e=[];for(let n=t;n;){try{let r=n.getBoundingClientRect();e.push(r.x,r.y,r.width,r.height)}catch{e.push("?")}n.parentElement?n=n.parentElement:n=Pt(n)||null}return e.join("|")}function Da(t,e){if(e.disposed||(gn.delete(t),gn.set(t,e),gn.size<=_d))return;let[n,r]=gn.entries().next().value;Ya(n,r)}function Ya(t,e){e.disposed=!0,gn.delete(t),Oo.delete(t);for(let n of e.observers)try{n.disconnect()}catch{}for(let n of Xa)t.removeEventListener(n,e.onMediaDirty,!0);for(let n of e.trackedShadowRoots.keys())for(let r of Wo)n.removeEventListener(r,e.onMediaDirty,!0);for(let[n,r]of e.trackedImages)n.removeEventListener("load",r),n.removeEventListener("error",r);e.trackedImages.clear(),e.trackedShadowRoots.clear(),e.images.length=0,e.controls.length=0,e.scrollNodes.length=0,e.observers.length=0,e.last=null,e.retained=null,e.retainedFrameDriven=!1}function Ka(t){if(Ga.has(t))return!1;pr.delete(t);let e=[t],n=[],r=[];for(let i=0;i<e.length;i++){let o=e[i],s=[];o?.nodeType===1&&s.push(o);try{s.push(...o.querySelectorAll("*"))}catch{return!1}for(let a of s){a.shadowRoot&&e.push(a.shadowRoot);let l=String(a.localName||a.tagName||"").toLowerCase();if(/^(?:iframe|canvas|video|audio|object|embed|marquee|blink)$/.test(l)||l==="progress"&&!a.hasAttribute("value")||/^(?:animate|animatetransform|animatemotion|set)$/.test(l))return!1;let f="";if(l==="img"){r.push(a);try{f=a.currentSrc||a.src||""}catch{}}/^(?:input|textarea|select|option)$/.test(l)&&n.push(a);let c=a.getAttribute?.("style")||"",u=Io.get(a);if(f||c){if((!u||u.src!==f||u.style!==c)&&(u={src:f,style:c,animated:qe(f)||qe(c)},Io.set(a,u)),u.animated)return!1}else u&&Io.delete(a)}}return pr.set(t,{roots:e.slice(1),controls:n,images:r}),!0}function Do(t,e){if(!t.querySelectorAll)return!1;let n=pr.get(t);pr.delete(t);let r=new Set(n?.roots||[]);if(n&&(e.controls=n.controls,e.scannedImages=n.images),!n){let i=[t];for(let o=0;o<i.length;o++){let s=i[o];s.shadowRoot&&!r.has(s.shadowRoot)&&(r.add(s.shadowRoot),i.push(s.shadowRoot));for(let a of s.querySelectorAll("*"))a.shadowRoot&&!r.has(a.shadowRoot)&&(r.add(a.shadowRoot),i.push(a.shadowRoot))}}for(let[i,o]of e.trackedShadowRoots)if(!r.has(i)){try{o.disconnect()}catch{}for(let a of Wo)i.removeEventListener(a,e.onMediaDirty,!0);e.trackedShadowRoots.delete(i);let s=e.observers.indexOf(o);s>=0&&e.observers.splice(s,1)}for(let i of r)if(!e.trackedShadowRoots.has(i))try{let o=new MutationObserver(e.markDirty);o.observe(i,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),o.__flush=e.markDirty,e.observers.push(o),e.trackedShadowRoots.set(i,o);for(let s of Wo)i.addEventListener(s,e.onMediaDirty,{capture:!0,passive:!0});e.retained&&e.dirtyAll()}catch{}return!!n}var Wo=["scroll","change","beforetoggle","toggle"];function hr(t,e){return[t,...e.trackedShadowRoots.keys()]}function Bo(t,e){let n=e.scannedImages;if(e.scannedImages=null,!n){n=[],t.tagName==="IMG"&&n.push(t);for(let r of hr(t,e))r.querySelectorAll&&n.push(...r.querySelectorAll("img"))}if(e.images=n,e.trackedImages.size){let r=new Set(n);for(let[i,o]of e.trackedImages)r.has(i)||(i.removeEventListener("load",o),i.removeEventListener("error",o),e.trackedImages.delete(i))}for(let r of n){if(r.complete||e.trackedImages.has(r))continue;let i=()=>{e.capturing&&(e.torn=!0),e.dirty=!0,e.dirtyRoots=null,r.removeEventListener("load",i),r.removeEventListener("error",i),e.trackedImages.delete(r)};e.trackedImages.set(r,i),r.addEventListener("load",i),r.addEventListener("error",i)}}function Wa(t){let e=new Map,n=new Map,r=new Map;for(let i of t)if(ue(i))if(i.type==="attributes"){let o=e.get(i.target);o||e.set(i.target,o=new Map),o.has(i.attributeName)||o.set(i.attributeName,i.oldValue)}else if(i.type==="characterData")n.has(i.target)||n.set(i.target,i.oldValue);else if(i.type==="childList"){let o=r.get(i.target);o||r.set(i.target,o=new Map);for(let s of i.addedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)+1)}for(let s of i.removedNodes){if(s.nodeType!==3)return!0;o.set(s.data,(o.get(s.data)||0)-1)}}else return!0;for(let[i,o]of e)for(let[s,a]of o)if(i.getAttribute(s)!==a)return!0;for(let[i,o]of n)if(i.data!==o)return!0;for(let i of r.values())for(let o of i.values())if(o!==0)return!0;return!1}var Fd=/(?:^data:image\/(?:gif|apng)|\.(?:gif|apng)(?=[?#)'"\s;]|$))/i,Ve=t=>t&&(typeof t=="object"||typeof t=="function")?dr(t):"-";function Td(t,e=131072){if(t=String(t||"").trim(),!/^data:/i.test(t))return"";let n=t.indexOf(",");if(n<0)return"";let r=t.slice(0,n),i=t.slice(n+1);try{if(/;base64/i.test(r)){let o=Math.ceil(e/3)*4;return atob(i.slice(0,o-o%4))}return i.slice(0,e*3).replace(/%([0-9a-f]{2})/gi,(o,s)=>String.fromCharCode(parseInt(s,16))).slice(0,e)}catch{return""}}function Pd(t){let e=(t.match(/^data:([^;,]+)/i)?.[1]||"").toLowerCase();if(e==="image/gif"||e==="image/apng")return!0;if(!/image\/(?:png|webp|avif|svg\+xml)/.test(e))return!1;let n=Td(t);return e==="image/png"?n.includes("acTL"):e==="image/webp"?n.includes("ANIM")||n.includes("ANMF")||n.includes("VP8X")&&!!(n.charCodeAt(n.indexOf("VP8X")+8)&2):e==="image/avif"?n.includes("avis"):/<(?:animate|animateTransform|animateMotion|set)\b|@keyframes\b|animation(?:-name)?\s*:/i.test(n)}function Ba(t){let e=String(t||"").trim();return e?Fd.test(e)?!0:/^data:/i.test(e)?Pd(e):!1:!1}function qe(t){let e=String(t||"");if(Ba(e))return!0;for(let n of e.matchAll(/url\(\s*(?:"((?:\\.|[^"\\])*)"|'((?:\\.|[^'\\])*)'|([^)]*))\s*\)/gi))if(Ba(n[1]??n[2]??n[3]))return!0;return!1}function Ua(t,e=null){let n=t&&t.clone;if(!n)return!1;let r=e?e.map(i=>t.srcToClone?.get(i)).filter(Boolean):[n];for(let i of r)for(let o of Qa(i))if(qe(o.getAttribute?.("src"))||qe(o.getAttribute?.("href"))||qe(o.getAttribute?.("style"))||qe(t.styleMap?.get(o)))return!0;return!1}function Qa(t){let e=[];t&&t.nodeType===1&&e.push(t);try{e.push(...t.querySelectorAll("*"))}catch{}return e}function Uo(t,e){let n=[],r=new Set,i=o=>{o&&!r.has(o)&&(r.add(o),n.push(o))};t.matches?.("input,textarea,select,option")&&i(t);for(let o of hr(t,e))try{for(let s of o.querySelectorAll("input,textarea,select,option"))i(s)}catch{}e.controls=n}function zo(t,e){let n=[],r=new Set,i=(o,s=!1)=>{if(!(!o||r.has(o))){r.add(o);try{(s||o.scrollLeft||o.scrollTop||o.scrollWidth>o.clientWidth||o.scrollHeight>o.clientHeight)&&n.push(o)}catch{}}};for(let o=t;o;o=o.parentElement)i(o,!0);for(let o of hr(t,e))for(let s of Qa(o))i(s);e.scrollNodes=n}function za(t,e){let n=t.ownerDocument||document,r=n.defaultView,i=[r?.location?.hash||"",Rd(n),r?.innerWidth||0,r?.innerHeight||0,r?.devicePixelRatio||1,r?.screen?.orientation?.type||""];try{i.push(...[...n.adoptedStyleSheets||[]].map(Ve))}catch{}for(let c of e.trackedShadowRoots.keys())try{i.push("#shadow",...[...c.adoptedStyleSheets||[]].map(Ve))}catch{}let o=n.activeElement,s=n.fullscreenElement;(o?.contains(t)||t.contains(o))&&i.push(Ve(o)),(s?.contains(t)||t.contains(s))&&i.push(Ve(s));let a=[r?.scrollX||0,r?.scrollY||0];for(let c of e.scrollNodes)a.push(c.scrollLeft||0,c.scrollTop||0);let l=[];for(let c of e.controls){let u=String(c.localName||"").toLowerCase();u==="input"?l.push(c.type,Ze(c)?c.value.length:c.value,c.checked?1:0,c.indeterminate?1:0):u==="textarea"?l.push(c.value):u==="select"?l.push(c.selectedIndex,c.value):l.push(c.selected?1:0)}let f=[];for(let c of e.images){let u="";try{u=c.currentSrc||c.src||""}catch{}f.push(u,c.complete?1:0,c.naturalWidth||0,c.naturalHeight||0)}return{style:i.join("|"),scroll:a.join("|"),controls:l,images:f,frameDriven:e.retainedFrameDriven}}function je(t,e,n){if(!t)return!1;let r=t[n],i=e[n];if(r===i)return!0;if(!Array.isArray(r)||r.length!==i.length)return!1;for(let o=0;o<r.length;o++)if(r[o]!==i[o])return!1;return!0}function Ha(t,e){let n=new Set;for(let r of hr(t,e))try{let i=r.getAnimations?.(r.nodeType===1?{subtree:!0}:void 0)||[];for(let o of i)n.add(o)}catch{}return[...n]}function ja(t){return t.map(e=>[Ve(e),e.playState,Math.round((Number(e.currentTime)||0)*10),e.playbackRate].join(":")).join("|")}function $d(t,e,n){if(!n||n.nodeType!==1)return null;if(n===t||t.contains(n))return t;for(let r of e.trackedShadowRoots.keys())if(r.contains(n))return r;return null}function Nd(t){let e={dirty:!0,pending:[],torn:!1,dirtyRoots:new Set,retained:null,retainedFrameDriven:!1,disposed:!1,capturing:!1,last:null,inflight:Promise.resolve(),observers:[],trackedShadowRoots:new Map,trackedImages:new Map,images:[],scannedImages:null,scrollNodes:[],controls:[],envEpoch:Re(),styleEpoch:Ut(),styleStamp:an(t),outsideMutations:sn(t),geometry:null,renderState:null},n=()=>{e.dirty=!0,e.dirtyRoots=null},r=a=>{if(!e.dirtyRoots)return;let l=a&&(a.nodeType===1?a:a.parentElement);if(!l||l===t||!t.contains(l)||e.dirtyRoots.size>=12){e.dirtyRoots=null;return}e.dirtyRoots.add(l)},i=a=>{if(e.capturing){for(let l of a)e.pending.push(l);return}for(let l of a)ue(l)&&(e.dirty=!0,r(l.target))},o=()=>{if(e.capturing){e.torn=!0;return}n()};e.dirtyAll=n;try{let a=new MutationObserver(i);a.observe(t,{subtree:!0,childList:!0,attributes:!0,characterData:!0,attributeOldValue:!0,characterDataOldValue:!0}),a.__flush=i,e.observers.push(a)}catch{}e.markDirty=i,e.onMediaDirty=o;try{for(let a of Xa)t.addEventListener(a,o,{capture:!0,passive:!0})}catch{}return Do(t,e)||Uo(t,e),zo(t,e),Bo(t,e),e}var Ld=0,Va=new WeakMap;function dr(t){let e=Va.get(t);return e||(e="@"+ ++Ld,Va.set(t,e)),e}function Ho(t,e){let n=typeof t;if(n==="undefined")return null;if(t===null||n==="boolean"||n==="number"||n==="string")return JSON.stringify(t);if(n==="function"||n==="symbol")return n==="symbol"?null:JSON.stringify(dr(t));if(n!=="object")return null;if(typeof t.nodeType=="number")return JSON.stringify(dr(t));if(e.has(t))return null;e.add(t);try{if(Array.isArray(t)){let o=[];for(let s of t){let a=Ho(s,e);if(a===null)return null;o.push(a)}return"["+o.join(",")+"]"}let r=Object.getPrototypeOf(t);if(r!==Object.prototype&&r!==null)return JSON.stringify(dr(t));let i=[];for(let o of Object.keys(t).sort()){let s=t[o];if(s===void 0)continue;let a=Ho(s,e);if(a===null)return null;i.push(JSON.stringify(o)+":"+a)}return"{"+i.join(",")+"}"}finally{e.delete(t)}}function qa(t,e){let{burst:n,invalidate:r,...i}=t||{};try{let o=Ho(i,new Set);return o===null?null:`${(e||[]).map(Ve).join(",")}:${o}`}catch{return null}}function Za(t,e,n,r,i=null){let o=Oo.get(t);o||(o=Nd(t),o.baselineSignature=qa(e,n.plugins),Oo.set(t,o));let s=qa(e,n.plugins),a=async()=>{if(o.disposed)return r();let f=s===null||s!==o.baselineSignature;f&&s!==null?o.pendingSig===s?(o.baselineSignature=s,o.last=null,o.dirty=!0,o.dirtyRoots=null,o.pendingSig=null,f=!1):o.pendingSig=s:o.pendingSig=null,Do(t,o),Bo(t,o);for(let k of o.observers)k.__flush(k.takeRecords());Nt();let c=sn(t);o.dirty&&o.outsideMutations!==c&&o.dirtyAll(),o.outsideMutations=c;let u=t.getRootNode?.(),d=[...o.trackedShadowRoots.keys()];u?.nodeType===11&&!d.includes(u)&&d.push(u),Fn(t.ownerDocument||document,d);let h=an(t);o.styleStamp!==h&&(o.styleStamp=h,o.dirty||o.dirtyAll());let m=za(t,o),p=Ha(t,o);m.animation=ja(p),o.renderState&&(!je(o.renderState,m,"style")&&(Fe(),o.dirtyAll()),je(o.renderState,m,"scroll")||o.dirtyAll(),je(o.renderState,m,"controls")||(de(t),o.dirtyAll()),!je(o.renderState,m,"images")&&!o.dirty&&o.dirtyAll());let g=Re();o.envEpoch!==g&&(o.dirtyAll(),o.envEpoch=g);let y=Ut();if(o.styleEpoch!==y&&(o.styleEpoch=y,!o.dirty)){let k=Oa(t);o.geometry!==null&&k!==o.geometry&&(de(t),o.dirtyAll()),o.geometry=k}n.invalidate&&o.dirtyAll();let b=!1,w=!!o.renderState&&!je(o.renderState,m,"animation");try{let k=new Set;w&&p.length===0&&(k=null);for(let E of p){let R=E.playState==="running";if(!R&&!w)continue;R&&(b=!0),w=!0;let v=E.effect?.target;if($d(t,o,v)===t)k.add(v);else{k=null;break}}if(w&&k&&k.size&&o.retained){o.dirty=!0;for(let E of k)o.dirtyRoots&&o.dirtyRoots.add(E),de(E)}else w&&!k&&o.dirtyAll()}catch{}let x=m.frameDriven,C=b||x;if(C&&(o.last=null),x&&o.dirtyAll(),!f&&!C&&!o.dirty&&o.last)return Da(t,o),o.last;o.capturing=!0;let S=null;try{let k=null,E=!1,R=null;if(!f&&o.dirty&&o.retained&&o.dirtyRoots&&o.dirtyRoots.size&&i){R=[...o.dirtyRoots];let v=await Ia(t,o,n);v&&(k=await i(v),E=!0)}if(k||(f||(n.__retain=v=>{let M=new Map;for(let[_,T]of v.nodeMap.entries())M.set(T,_);S={...v,srcToClone:M}}),n.__tornSinceStart=()=>{for(let v of o.observers)for(let M of v.takeRecords())o.pending.push(M);return Nt(),o.torn||Wa(o.pending)||sn(t)!==c},k=await r()),!f&&!o.disposed){o.dirty=!1,o.dirtyRoots=new Set,S?(o.retained=S,o.retainedFrameDriven=Ua(S),Uo(t,o),zo(t,o)):E&&(o.retainedFrameDriven||=Ua(o.retained,R),Uo(t,o),zo(t,o));let v=za(t,o);v.animation=ja(Ha(t,o));let M=["style","scroll","controls","images"];b||M.push("animation");let _=M.every(T=>je(m,v,T));o.renderState=v,o.styleEpoch=Ut(),o.styleStamp=an(t),o.geometry=Oa(t),o.renderState.frameDriven?(Ga.add(t),Ya(t,o)):_?!C&&!o.renderState.frameDriven&&(o.last=k,Da(t,o)):(o.dirtyAll(),o.last=null)}return k}finally{n.__retain=void 0,n.__tornSinceStart=void 0;for(let E of o.observers)for(let R of E.takeRecords())o.pending.push(R);Nt();let k=sn(t);(o.torn||Wa(o.pending)||k!==c)&&(o.dirtyAll(),o.last=null),o.outsideMutations=k,o.styleEpoch=Ut(),o.styleStamp=an(t),o.pending.length=0,o.torn=!1,o.capturing=!1,o.disposed||(Do(t,o),Bo(t,o))}},l=o.inflight.then(a,a);return o.inflight=l.catch(()=>{}),l}var mr=null;function el(t){mr=t}var Id='button, a[href], [role="button"], input, select, summary, label, [tabindex]',jo=!1,yn=null,Vo=new WeakMap,Ja=!1;function nl(t,e){!jo||!yn||e&&e.burst===!1||Vo.set(yn.control,{element:t,options:e&&typeof e=="object"?{...e}:e})}function rl(t){let e={control:t};yn=e,setTimeout(()=>{yn===e&&(yn=null)},0)}function Go(t){let e=t.target,n=e&&(e.nodeType===1?e:e.parentElement);return n&&n.closest?n.closest(Id):null}function tl(t){if(t.type==="keydown"&&t.key!=="Enter"&&t.key!==" ")return;let e=Go(t);e&&(rl(e),qo(t,!1))}function Od(t){let e=Go(t);e&&rl(e)}function qo(t,e=!0){if(!mr||document.visibilityState==="hidden")return;let n=Go(t);if(!n||t.type==="pointerenter"&&t.target!==n)return;let r=Vo.get(n);if(r){if(!r.element.isConnected){Vo.delete(n);return}mr(r.element,r.options).catch(()=>{});return}e&&!Ja&&(Ja=!0,mr(document.body,{clip:"viewport",burst:!1}).catch(()=>{}))}function ol(){if(jo||typeof document>"u"||typeof document.addEventListener!="function")return;jo=!0;let t={capture:!0,passive:!0};document.addEventListener("pointerdown",tl,t),document.addEventListener("keydown",tl,t),document.addEventListener("click",Od,t),document.addEventListener("pointerenter",qo,t),document.addEventListener("focusin",qo,t)}_t();function rp(...t){return Fo(...t),Q}async function op(t,e){if(typeof t!="string"||!t.trim())throw new Error("[SnapDOM] fromString() needs an HTML string.");let n=document.createElement("div");J(n),n.style.cssText="position:fixed;left:-99999px;top:0;pointer-events:none;",n.innerHTML=t,document.body.appendChild(n);try{await St();let r=Array.from(n.childNodes).some(o=>o.nodeType===3&&o.textContent.trim()),i=n.children.length===1&&!r?n.firstElementChild:n;return await si(i,{...e||{},burst:!1})}finally{n.remove()}}var ip="3.3.6-dev.1",Q=Object.assign(si,{plugins:rp,fromString:op,version:ip,preCapture:ol});el(si);var ii=Symbol("snapdom.internal"),sp=Symbol("snapdom.internal.silent"),wl=new Set(["png","jpeg","jpg","webp","svg"]);async function si(t,e){if(!t)throw new Error("[SnapDOM] The element cannot be null or undefined.");let n=$a(e);n.element=t,n.invalidate&&Fe(),va(n,e&&e.plugins);let{stage:r,loweredBy:i}=ba(n);n.needs=r,n.__needsLoweredBy=i;let o=Ue(r,"render"),s=n.burst===!0||!or(n),a=typeof n.filter=="function"||!!n.excludePredicates||typeof n.excludeStyleProps=="function"||typeof n.fallbackURL=="function",f=o&&!n.captureSelection&&n.burst!==!1&&s&&!a&&Ka(t);return f&&nl(t,e),n.snap||(n.snap={toPng:(c,u)=>Q.toPng(c,u),toSvg:(c,u)=>Q.toSvg(c,u)}),f?Za(t,e,n,()=>Q.capture(t,n,ii),c=>Sl(c,n)):Q.capture(t,n,ii)}Q.capture=async(t,e,n)=>{if(n!==ii)throw new Error("[SnapDOM] snapdom.capture() is internal; use snapdom(el).");if(Ue(e.needs||gt,"render")&&X()){if(e.embedFonts)try{let o=t.ownerDocument||document,s=new Set;if(e.embedFonts==="auto"){try{for(let c of o.fonts)s.add(String(c.family).replace(/["']/g,"").toLowerCase())}catch{}if(s.size===0)throw null}let a=Hn(t);e.clip||(e.__fontUsage=a);let l=a.required,f=new Set([...l].map(c=>String(c).split("__")[0]).filter(Boolean));if(e.embedFonts==="auto"&&(f=new Set([...f].filter(c=>s.has(c.toLowerCase()))),f.size===0))throw null;await jn(f,1,o)}catch{}let i=Array.from(t.querySelectorAll("canvas"));t.tagName==="CANVAS"&&i.unshift(t);for(let o of i)try{if(dn(o))continue;let s=o.getContext("2d",{willReadFrequently:!0});s&&s.getImageData(0,0,1,1)}catch(s){j(e,"Couldn't prepare canvases for Safari.",s)}}let r=await Pa(t,e);return Sl(r,e)};async function Sl(t,e){let n=e.needs||gt,r=Ue(n,"render"),i=A=>Sa(n,e.__needsLoweredBy||[],A),o=typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement?t:null,s=o?null:t,a=()=>s??=o.toDataURL(),l=o||t;o&&(t="");let f=e.__compressedSnapshot,c=e.__compressionDensity;delete e.__compressedSnapshot,delete e.__compressedAssets;let u,d=e.meta||{},m=(Number.isFinite(e.width)||Number.isFinite(e.height))&&!X(),p=m?Number.isFinite(e.width)?d.targetW/d.vbW:d.targetH/d.vbH:1,g=m?Number.isFinite(e.height)?d.targetH/d.vbH:d.targetW/d.vbW:1,y=A=>{if(o||!f?.size)return l;let L=d.vbW,O=d.vbH,P=A.crop;P&&(L=Math.max(1,Math.min(L,P.x+P.width)-Math.max(0,P.x)),O=Math.max(1,Math.min(O,P.y+P.height)-Math.max(0,P.y)));let z=Number.isFinite(A.width),q=Number.isFinite(A.height);return(z&&q?Math.max(A.width/L,A.height/O):z?A.width/L*(P?Math.max(1,g/p):1):q?A.height/O*(P?Math.max(1,p/g):1):(A.scale||1)*Math.max(p,g))*(A.dpr||1)<=c?l:u??=Ea(a(),f)},b=async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Ge(),wn));return O(l,{...A,...L||{},format:"png"})},w=()=>{if(!r)throw i("svgString");if(o)throw new Error("[SnapDOM] html-in-canvas makes a raster capture; there is no SVG string.");let A=t.indexOf(",");return A>=0?decodeURIComponent(t.slice(A+1)):""},x=A=>Object.defineProperty({...A||{},svgString:w},"url",r?{get:a,enumerable:!0}:{get(){throw i("export.url")},enumerable:!1,configurable:!0}),C={img:async(A,L)=>{if(o)return b(A,L);let{toImg:O}=await Promise.resolve().then(()=>(ei(),ti)),P={...A,...L||{}};return O(y(P),P)},svg:async(A,L)=>{if(o)return b(A,L);let{toSvg:O}=await Promise.resolve().then(()=>(ei(),ti)),P={...A,...L||{}};return O(y(P),P)},canvas:async(A,L)=>{let{toCanvas:O}=await Promise.resolve().then(()=>(we(),ul)),P={...A,...L||{}};return O(y(P),P)},blob:async(A,L)=>{let{toBlob:O}=await Promise.resolve().then(()=>(oi(),ml)),P={...A,...L||{}};return O(y(P),P)},png:async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Ge(),wn)),P={...A,...L||{},format:"png"};return O(y(P),P)},jpeg:async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Ge(),wn)),P={...A,...L||{},format:"jpeg"};return O(y(P),P)},webp:async(A,L)=>{let{rasterize:O}=await Promise.resolve().then(()=>(Ge(),wn)),P={...A,...L||{},format:"webp"};return O(y(P),P)},download:async(A,L)=>{let{download:O}=await Promise.resolve().then(()=>(bl(),yl)),P={...A,...L||{}};return O(y(P),P)}};if(!r)for(let A of Object.keys(C)){let L=A==="download"?"download()":`to${A.charAt(0).toUpperCase()}${A.slice(1)}()`;C[A]=async()=>{throw i(L)}}let S={};for(let A of["img","svg","canvas","blob","png","jpeg","webp"])S[A]=async L=>C[A](e,{..._(A,L||{}),[sp]:!0});S.jpg=S.jpeg;let k=A=>Object.defineProperty({...e,...A},"options",{value:e,configurable:!0}),E=k({artifacts:e.__artifacts||null,export:x(),exports:S}),R=await rr("defineExports",E),v=Object.assign({},...R.filter(A=>A&&typeof A=="object").reverse()),M={...C,...v};M.jpeg&&!M.jpg&&(M.jpg=(A,L)=>M.jpeg(A,L));function _(A,L){let O=L||{},P={...e,...O},z=typeof O.type=="string"?O.type.toLowerCase():"",q=typeof O.format=="string"?O.format.toLowerCase():wl.has(z)?z:"";q&&(P.format=q==="jpg"?"jpeg":q),P.__explicitFormat=q?P.format:e.__explicitFormat??null,A==="blob"&&!P.__explicitFormat&&(P.format=o?"png":"svg"),P.type=P.format;let U=B=>B==="jpeg"||B==="jpg"||B==="webp";return[A,P.format,z].map(B=>typeof B=="string"?B.toLowerCase():"").find(U)&&(P.backgroundColor==null||P.backgroundColor==="transparent")&&(P.backgroundColor="#ffffff"),P.scale!==1&&(Number.isFinite(P.width)||Number.isFinite(P.height))&&j(P,"scale ignored: width/height already set the size."),P}let T=!1,$=Promise.resolve();async function N(A,L){let O=Object.freeze(L&&typeof L=="object"?{...L}:{}),P=async()=>{let q=M[A];if(!q)throw new Error(`[SnapDOM] Unknown export type: ${A}`);let U=_(A,O),Y=k({artifacts:e.__artifacts||null,export:x({type:A,options:U,requestedOptions:O})}),B=U.format,dt=U.type;await rr("beforeExport",Y,{format:A,options:U});let pt=U.format!==B?U.format:U.type!==dt?U.type:"",nt=typeof pt=="string"?pt.toLowerCase():"";wl.has(nt)&&(U.format=nt==="jpg"?"jpeg":nt,U.type=U.format,U.__explicitFormat=U.format,/^(?:jpeg|webp)$/.test(U.format)&&(U.backgroundColor==null||U.backgroundColor==="transparent")&&(U.backgroundColor="#ffffff"));let st=await q(Y,U);return await rr("afterExport",Y,{format:A,options:U,result:st}),T||(T=!0,await zt("afterSnap",e)),st},z=$.then(P);return $=z.catch(()=>{}),z}let F={url:t,needs:n,warnings:e.__session&&e.__session.warnings||[],toRaw:()=>{if(!r)throw i("toRaw()");return a()},to:(A,L)=>N(A,L),toImg:A=>N("img",A),toSvg:A=>N("svg",A),toCanvas:A=>N("canvas",A),toBlob:A=>N("blob",A),toPng:A=>N("png",A),toJpg:A=>N("jpg",A),toWebp:A=>N("webp",A),download:A=>N("download",A)};r?o&&Object.defineProperty(F,"url",{get:a,enumerable:!0,configurable:!0}):Object.defineProperty(F,"url",{get(){throw i("url")},enumerable:!1,configurable:!0}),Object.defineProperty(F,"meta",r?{value:e.meta,enumerable:!0}:{get(){throw i("meta")},enumerable:!1,configurable:!0});for(let A of Object.keys(M)){let L="to"+A.charAt(0).toUpperCase()+A.slice(1);F[L]||(F[L]=O=>N(A,O))}return F}Q.toRaw=(t,e)=>Q(t,e).then(n=>n.toRaw());Q.toImg=(t,e)=>Q(t,e).then(n=>n.toImg());Q.toSvg=(t,e)=>Q(t,e).then(n=>n.toSvg());Q.toCanvas=(t,e)=>Q(t,e).then(n=>n.toCanvas());Q.toBlob=(t,e)=>Q(t,e).then(n=>n.toBlob());Q.toPng=(t,e)=>Q(t,{...e,format:"png"}).then(n=>n.toPng());Q.toJpg=(t,e)=>Q(t,{...e,format:"jpeg"}).then(n=>n.toJpg());Q.toWebp=(t,e)=>Q(t,{...e,format:"webp"}).then(n=>n.toWebp());Q.download=(t,e)=>Q(t,e).then(n=>n.download());export{gt as DEFAULT_STAGE,Be as STAGES,wa as assertNeeds,Uu as clearPlugins,To as getGlobalPlugins,He as normalizePlugin,Fo as registerPlugins,Q as snapdom};
|