"),qX(this.referenceElement.ownerDocument,s,o),u.replaceChild(u.adoptNode(this.documentElement),u.documentElement),u.close(),f},r.prototype.createElementClone=function(e){if(C_(e,2))debugger;if(tI(e))return this.createCanvasClone(e);if(qM(e))return this.createVideoClone(e);if(jM(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return F_(t)&&(F_(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),t.loading==="lazy"&&(t.loading="eager")),WM(t)?this.createCustomElementClone(t):t},r.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return cy(e.style,t),t},r.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(s,o){return o&&typeof o.cssText=="string"?s+o.cssText:s},""),i=e.cloneNode(!1);return i.textContent=n,i}}catch(s){if(this.context.logger.error("Unable to access cssRules property",s),s.name!=="SecurityError")throw s}return e.cloneNode(!1)},r.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var s=e.getContext("2d"),o=i.getContext("2d");if(o)if(!this.options.allowTaint&&s)o.putImageData(s.getImageData(0,0,e.width,e.height),0,0);else{var l=(t=e.getContext("webgl2"))!==null&&t!==void 0?t:e.getContext("webgl");if(l){var u=l.getContextAttributes();u?.preserveDrawingBuffer===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return i}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},r.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},r.prototype.appendChildNode=function(e,t,n){(!Uh(t)||!DX(t)&&!t.hasAttribute(aI)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!Uh(t)||!jM(t))&&e.appendChild(this.cloneNode(t,n))},r.prototype.cloneChildNodes=function(e,t,n){for(var i=this,s=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;s;s=s.nextSibling)if(Uh(s)&&rI(s)&&typeof s.assignedNodes=="function"){var o=s.assignedNodes();o.length&&o.forEach(function(l){return i.appendChildNode(t,l,n)})}else this.appendChildNode(t,s,n)},r.prototype.cloneNode=function(e,t){if($N(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&Uh(e)&&(U_(e)||g0(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var s=n.getComputedStyle(e),o=n.getComputedStyle(e,":before"),l=n.getComputedStyle(e,":after");this.referenceElement===e&&U_(i)&&(this.clonedReferenceElement=i),BB(i)&&YX(i);var u=this.counters.parse(new FM(this.context,s)),f=this.resolvePseudoContent(e,i,o,xp.BEFORE);WM(e)&&(t=!0),qM(e)||this.cloneChildNodes(e,i,t),f&&i.insertBefore(f,i.firstChild);var h=this.resolvePseudoContent(e,i,l,xp.AFTER);return h&&i.appendChild(h),this.counters.pop(u),(s&&(this.options.copyStyles||g0(e))&&!nI(e)||t)&&cy(s,i),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(P0(e)||Q0(e))&&(P0(i)||Q0(i))&&(i.value=e.value),i}return e.cloneNode(!1)},r.prototype.resolvePseudoContent=function(e,t,n,i){var s=this;if(n){var o=n.content,l=t.ownerDocument;if(!(!l||!o||o==="none"||o==="-moz-alt-content"||n.display==="none")){this.counters.parse(new FM(this.context,n));var u=new LW(this.context,n),f=l.createElement("html2canvaspseudoelement");cy(n,f),u.content.forEach(function(g){if(g.type===0)f.appendChild(l.createTextNode(g.value));else if(g.type===22){var m=l.createElement("img");m.src=g.value,m.style.opacity="1",f.appendChild(m)}else if(g.type===18){if(g.name==="attr"){var p=g.values.filter(Hr);p.length&&f.appendChild(l.createTextNode(e.getAttribute(p[0].value)||""))}else if(g.name==="counter"){var b=g.values.filter(zh),B=b[0],_=b[1];if(B&&Hr(B)){var y=s.counters.getCounterValue(B.value),M=_&&Hr(_)?E_.parse(s.context,_.value):3;f.appendChild(l.createTextNode(Lp(y,M,!1)))}}else if(g.name==="counters"){var L=g.values.filter(zh),B=L[0],T=L[1],_=L[2];if(B&&Hr(B)){var I=s.counters.getCounterValues(B.value),D=_&&Hr(_)?E_.parse(s.context,_.value):3,Q=T&&T.type===0?T.value:"",E=I.map(function(N){return Lp(N,D,!1)}).join(Q);f.appendChild(l.createTextNode(E))}}}else if(g.type===20)switch(g.value){case"open-quote":f.appendChild(l.createTextNode(UM(u.quotes,s.quoteDepth++,!0)));break;case"close-quote":f.appendChild(l.createTextNode(UM(u.quotes,--s.quoteDepth,!1)));break;default:f.appendChild(l.createTextNode(g.value))}}),f.className=L_+" "+R_;var h=i===xp.BEFORE?" "+L_:" "+R_;return g0(t)?t.className.baseValue+=h:t.className+=h,f}}},r.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},r})(),xp;(function(r){r[r.BEFORE=0]="BEFORE",r[r.AFTER=1]="AFTER"})(xp||(xp={}));var HX=function(r,e){var t=r.createElement("iframe");return t.className="html2canvas-container",t.style.visibility="hidden",t.style.position="fixed",t.style.left="-10000px",t.style.top="0px",t.style.border="0",t.width=e.width.toString(),t.height=e.height.toString(),t.scrolling="no",t.setAttribute(aI,"true"),r.body.appendChild(t),t},kX=function(r){return new Promise(function(e){if(r.complete){e();return}if(!r.src){e();return}r.onload=e,r.onerror=e})},zX=function(r){return Promise.all([].slice.call(r.images,0).map(kX))},GX=function(r){return new Promise(function(e,t){var n=r.contentWindow;if(!n)return t("No window assigned for iframe");var i=n.document;n.onload=r.onload=function(){n.onload=r.onload=null;var s=setInterval(function(){i.body.childNodes.length>0&&i.readyState==="complete"&&(clearInterval(s),e(r))},50)}})},VX=["all","d","content"],cy=function(r,e){for(var t=r.length-1;t>=0;t--){var n=r.item(t);VX.indexOf(n)===-1&&e.style.setProperty(n,r.getPropertyValue(n))}return e},KX=function(r){var e="";return r&&(e+=""),e},qX=function(r,e,t){r&&r.defaultView&&(e!==r.defaultView.pageXOffset||t!==r.defaultView.pageYOffset)&&r.defaultView.scrollTo(e,t)},jX=function(r){var e=r[0],t=r[1],n=r[2];e.scrollLeft=t,e.scrollTop=n},WX=":before",XX=":after",L_="___html2canvas___pseudoelement_before",R_="___html2canvas___pseudoelement_after",t3=`{ content: "" !important; display: none !important; }`,YX=function(r){ZX(r,"."+L_+WX+t3+` .`+R_+XX+t3)},ZX=function(r,e){var t=r.ownerDocument;if(t){var n=t.createElement("style");n.textContent=e,r.appendChild(n)}},sI=(function(){function r(){}return r.getOrigin=function(e){var t=r._link;return t?(t.href=e,t.href=t.href,t.protocol+t.hostname+t.port):"about:blank"},r.isSameOrigin=function(e){return r.getOrigin(e)===r._origin},r.setContext=function(e){r._link=e.document.createElement("a"),r._origin=r.getOrigin(e.location.href)},r._origin="about:blank",r})(),JX=(function(){function r(e,t){this.context=e,this._options=t,this._cache={}}return r.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(hy(e)||nY(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},r.prototype.match=function(e){return this._cache[e]},r.prototype.loadImage=function(e){return ys(this,void 0,void 0,function(){var t,n,i,s,o=this;return os(this,function(l){switch(l.label){case 0:return t=sI.isSameOrigin(e),n=!fy(e)&&this._options.useCORS===!0&&Wa.SUPPORT_CORS_IMAGES&&!t,i=!fy(e)&&!t&&!hy(e)&&typeof this._options.proxy=="string"&&Wa.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!fy(e)&&!hy(e)&&!i&&!n?[2]:(s=e,i?[4,this.proxy(s)]:[3,2]);case 1:s=l.sent(),l.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(u,f){var h=new Image;h.onload=function(){return u(h)},h.onerror=f,(rY(s)||n)&&(h.crossOrigin="anonymous"),h.src=s,h.complete===!0&&setTimeout(function(){return u(h)},500),o._options.imageTimeout>0&&setTimeout(function(){return f("Timed out ("+o._options.imageTimeout+"ms) loading image")},o._options.imageTimeout)})];case 3:return[2,l.sent()]}})})},r.prototype.has=function(e){return typeof this._cache[e]<"u"},r.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},r.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise(function(s,o){var l=Wa.SUPPORT_RESPONSE_TYPE?"blob":"text",u=new XMLHttpRequest;u.onload=function(){if(u.status===200)if(l==="text")s(u.response);else{var g=new FileReader;g.addEventListener("load",function(){return s(g.result)},!1),g.addEventListener("error",function(m){return o(m)},!1),g.readAsDataURL(u.response)}else o("Failed to proxy resource "+i+" with status code "+u.status)},u.onerror=o;var f=n.indexOf("?")>-1?"&":"?";if(u.open("GET",""+n+f+"url="+encodeURIComponent(e)+"&responseType="+l),l!=="text"&&u instanceof XMLHttpRequest&&(u.responseType=l),t._options.imageTimeout){var h=t._options.imageTimeout;u.timeout=h,u.ontimeout=function(){return o("Timed out ("+h+"ms) proxying "+i)}}u.send()})},r})(),$X=/^data:image\/svg\+xml/i,eY=/^data:image\/.*;base64,/i,tY=/^data:image\/.*/i,nY=function(r){return Wa.SUPPORT_SVG_DRAWING||!iY(r)},fy=function(r){return tY.test(r)},rY=function(r){return eY.test(r)},hy=function(r){return r.substr(0,4)==="blob"},iY=function(r){return r.substr(-3).toLowerCase()==="svg"||$X.test(r)},jt=(function(){function r(e,t){this.type=0,this.x=e,this.y=t}return r.prototype.add=function(e,t){return new r(this.x+e,this.y+t)},r})(),wh=function(r,e,t){return new jt(r.x+(e.x-r.x)*t,r.y+(e.y-r.y)*t)},jm=(function(){function r(e,t,n,i){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=i}return r.prototype.subdivide=function(e,t){var n=wh(this.start,this.startControl,e),i=wh(this.startControl,this.endControl,e),s=wh(this.endControl,this.end,e),o=wh(n,i,e),l=wh(i,s,e),u=wh(o,l,e);return t?new r(this.start,n,o,u):new r(u,l,s,this.end)},r.prototype.add=function(e,t){return new r(this.start.add(e,t),this.startControl.add(e,t),this.endControl.add(e,t),this.end.add(e,t))},r.prototype.reverse=function(){return new r(this.end,this.endControl,this.startControl,this.start)},r})(),BA=function(r){return r.type===1},aY=(function(){function r(e){var t=e.styles,n=e.bounds,i=lp(t.borderTopLeftRadius,n.width,n.height),s=i[0],o=i[1],l=lp(t.borderTopRightRadius,n.width,n.height),u=l[0],f=l[1],h=lp(t.borderBottomRightRadius,n.width,n.height),g=h[0],m=h[1],p=lp(t.borderBottomLeftRadius,n.width,n.height),b=p[0],B=p[1],_=[];_.push((s+u)/n.width),_.push((b+g)/n.width),_.push((o+B)/n.height),_.push((f+m)/n.height);var y=Math.max.apply(Math,_);y>1&&(s/=y,o/=y,u/=y,f/=y,g/=y,m/=y,b/=y,B/=y);var M=n.width-u,L=n.height-m,T=n.width-g,I=n.height-B,D=t.borderTopWidth,Q=t.borderRightWidth,E=t.borderBottomWidth,F=t.borderLeftWidth,j=Jr(t.paddingTop,e.bounds.width),N=Jr(t.paddingRight,e.bounds.width),P=Jr(t.paddingBottom,e.bounds.width),K=Jr(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=s>0||o>0?di(n.left+F/3,n.top+D/3,s-F/3,o-D/3,Tr.TOP_LEFT):new jt(n.left+F/3,n.top+D/3),this.topRightBorderDoubleOuterBox=s>0||o>0?di(n.left+M,n.top+D/3,u-Q/3,f-D/3,Tr.TOP_RIGHT):new jt(n.left+n.width-Q/3,n.top+D/3),this.bottomRightBorderDoubleOuterBox=g>0||m>0?di(n.left+T,n.top+L,g-Q/3,m-E/3,Tr.BOTTOM_RIGHT):new jt(n.left+n.width-Q/3,n.top+n.height-E/3),this.bottomLeftBorderDoubleOuterBox=b>0||B>0?di(n.left+F/3,n.top+I,b-F/3,B-E/3,Tr.BOTTOM_LEFT):new jt(n.left+F/3,n.top+n.height-E/3),this.topLeftBorderDoubleInnerBox=s>0||o>0?di(n.left+F*2/3,n.top+D*2/3,s-F*2/3,o-D*2/3,Tr.TOP_LEFT):new jt(n.left+F*2/3,n.top+D*2/3),this.topRightBorderDoubleInnerBox=s>0||o>0?di(n.left+M,n.top+D*2/3,u-Q*2/3,f-D*2/3,Tr.TOP_RIGHT):new jt(n.left+n.width-Q*2/3,n.top+D*2/3),this.bottomRightBorderDoubleInnerBox=g>0||m>0?di(n.left+T,n.top+L,g-Q*2/3,m-E*2/3,Tr.BOTTOM_RIGHT):new jt(n.left+n.width-Q*2/3,n.top+n.height-E*2/3),this.bottomLeftBorderDoubleInnerBox=b>0||B>0?di(n.left+F*2/3,n.top+I,b-F*2/3,B-E*2/3,Tr.BOTTOM_LEFT):new jt(n.left+F*2/3,n.top+n.height-E*2/3),this.topLeftBorderStroke=s>0||o>0?di(n.left+F/2,n.top+D/2,s-F/2,o-D/2,Tr.TOP_LEFT):new jt(n.left+F/2,n.top+D/2),this.topRightBorderStroke=s>0||o>0?di(n.left+M,n.top+D/2,u-Q/2,f-D/2,Tr.TOP_RIGHT):new jt(n.left+n.width-Q/2,n.top+D/2),this.bottomRightBorderStroke=g>0||m>0?di(n.left+T,n.top+L,g-Q/2,m-E/2,Tr.BOTTOM_RIGHT):new jt(n.left+n.width-Q/2,n.top+n.height-E/2),this.bottomLeftBorderStroke=b>0||B>0?di(n.left+F/2,n.top+I,b-F/2,B-E/2,Tr.BOTTOM_LEFT):new jt(n.left+F/2,n.top+n.height-E/2),this.topLeftBorderBox=s>0||o>0?di(n.left,n.top,s,o,Tr.TOP_LEFT):new jt(n.left,n.top),this.topRightBorderBox=u>0||f>0?di(n.left+M,n.top,u,f,Tr.TOP_RIGHT):new jt(n.left+n.width,n.top),this.bottomRightBorderBox=g>0||m>0?di(n.left+T,n.top+L,g,m,Tr.BOTTOM_RIGHT):new jt(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=b>0||B>0?di(n.left,n.top+I,b,B,Tr.BOTTOM_LEFT):new jt(n.left,n.top+n.height),this.topLeftPaddingBox=s>0||o>0?di(n.left+F,n.top+D,Math.max(0,s-F),Math.max(0,o-D),Tr.TOP_LEFT):new jt(n.left+F,n.top+D),this.topRightPaddingBox=u>0||f>0?di(n.left+Math.min(M,n.width-Q),n.top+D,M>n.width+Q?0:Math.max(0,u-Q),Math.max(0,f-D),Tr.TOP_RIGHT):new jt(n.left+n.width-Q,n.top+D),this.bottomRightPaddingBox=g>0||m>0?di(n.left+Math.min(T,n.width-F),n.top+Math.min(L,n.height-E),Math.max(0,g-Q),Math.max(0,m-E),Tr.BOTTOM_RIGHT):new jt(n.left+n.width-Q,n.top+n.height-E),this.bottomLeftPaddingBox=b>0||B>0?di(n.left+F,n.top+Math.min(I,n.height-E),Math.max(0,b-F),Math.max(0,B-E),Tr.BOTTOM_LEFT):new jt(n.left+F,n.top+n.height-E),this.topLeftContentBox=s>0||o>0?di(n.left+F+K,n.top+D+j,Math.max(0,s-(F+K)),Math.max(0,o-(D+j)),Tr.TOP_LEFT):new jt(n.left+F+K,n.top+D+j),this.topRightContentBox=u>0||f>0?di(n.left+Math.min(M,n.width+F+K),n.top+D+j,M>n.width+F+K?0:u-F+K,f-(D+j),Tr.TOP_RIGHT):new jt(n.left+n.width-(Q+N),n.top+D+j),this.bottomRightContentBox=g>0||m>0?di(n.left+Math.min(T,n.width-(F+K)),n.top+Math.min(L,n.height+D+j),Math.max(0,g-(Q+N)),m-(E+P),Tr.BOTTOM_RIGHT):new jt(n.left+n.width-(Q+N),n.top+n.height-(E+P)),this.bottomLeftContentBox=b>0||B>0?di(n.left+F+K,n.top+I,Math.max(0,b-(F+K)),B-(E+P),Tr.BOTTOM_LEFT):new jt(n.left+F+K,n.top+n.height-(E+P))}return r})(),Tr;(function(r){r[r.TOP_LEFT=0]="TOP_LEFT",r[r.TOP_RIGHT=1]="TOP_RIGHT",r[r.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",r[r.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(Tr||(Tr={}));var di=function(r,e,t,n,i){var s=4*((Math.sqrt(2)-1)/3),o=t*s,l=n*s,u=r+t,f=e+n;switch(i){case Tr.TOP_LEFT:return new jm(new jt(r,f),new jt(r,f-l),new jt(u-o,e),new jt(u,e));case Tr.TOP_RIGHT:return new jm(new jt(r,e),new jt(r+o,e),new jt(u,f-l),new jt(u,f));case Tr.BOTTOM_RIGHT:return new jm(new jt(u,e),new jt(u,e+l),new jt(r+o,f),new jt(r,f));case Tr.BOTTOM_LEFT:default:return new jm(new jt(u,f),new jt(u-o,f),new jt(r,e+l),new jt(r,e))}},H0=function(r){return[r.topLeftBorderBox,r.topRightBorderBox,r.bottomRightBorderBox,r.bottomLeftBorderBox]},sY=function(r){return[r.topLeftContentBox,r.topRightContentBox,r.bottomRightContentBox,r.bottomLeftContentBox]},k0=function(r){return[r.topLeftPaddingBox,r.topRightPaddingBox,r.bottomRightPaddingBox,r.bottomLeftPaddingBox]},AY=(function(){function r(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return r})(),Wm=(function(){function r(e,t){this.path=e,this.target=t,this.type=1}return r})(),oY=(function(){function r(e){this.opacity=e,this.type=2,this.target=6}return r})(),lY=function(r){return r.type===0},AI=function(r){return r.type===1},uY=function(r){return r.type===2},n3=function(r,e){return r.length===e.length?r.some(function(t,n){return t===e[n]}):!1},cY=function(r,e,t,n,i){return r.map(function(s,o){switch(o){case 0:return s.add(e,t);case 1:return s.add(e+n,t);case 2:return s.add(e+n,t+i);case 3:return s.add(e,t+i)}return s})},oI=(function(){function r(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return r})(),lI=(function(){function r(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new aY(this.container),this.container.styles.opacity<1&&this.effects.push(new oY(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,s=this.container.styles.transform;this.effects.push(new AY(n,i,s))}if(this.container.styles.overflowX!==0){var o=H0(this.curves),l=k0(this.curves);n3(o,l)?this.effects.push(new Wm(o,6)):(this.effects.push(new Wm(o,2)),this.effects.push(new Wm(l,4)))}}return r.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,i=this.effects.slice(0);n;){var s=n.effects.filter(function(u){return!AI(u)});if(t||n.container.styles.position!==0||!n.parent){if(i.unshift.apply(i,s),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var o=H0(n.curves),l=k0(n.curves);n3(o,l)||i.unshift(new Wm(l,6))}}else i.unshift.apply(i,s);n=n.parent}return i.filter(function(u){return wa(u.target,e)})},r})(),N_=function(r,e,t,n){r.container.elements.forEach(function(i){var s=wa(i.flags,4),o=wa(i.flags,2),l=new lI(i,r);wa(i.styles.display,2048)&&n.push(l);var u=wa(i.flags,8)?[]:n;if(s||o){var f=s||i.styles.isPositioned()?t:e,h=new oI(l);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var g=i.styles.zIndex.order;if(g<0){var m=0;f.negativeZIndex.some(function(b,B){return g>b.element.container.styles.zIndex.order?(m=B,!1):m>0}),f.negativeZIndex.splice(m,0,h)}else if(g>0){var p=0;f.positiveZIndex.some(function(b,B){return g>=b.element.container.styles.zIndex.order?(p=B+1,!1):p>0}),f.positiveZIndex.splice(p,0,h)}else f.zeroOrAutoZIndexOrTransformedOrOpacity.push(h)}else i.styles.isFloating()?f.nonPositionedFloats.push(h):f.nonPositionedInlineLevel.push(h);N_(l,h,s?h:t,u)}else i.styles.isInlineLevel()?e.inlineLevel.push(l):e.nonInlineLevel.push(l),N_(l,e,t,u);wa(i.flags,8)&&uI(i,u)})},uI=function(r,e){for(var t=r instanceof M_?r.start:1,n=r instanceof M_?r.reversed:!1,i=0;i"u"?r[0]:t},yY=function(r,e,t,n,i){var s=e[0],o=e[1],l=t[0],u=t[1];switch(r){case 2:return[new jt(Math.round(n.left),Math.round(n.top+o)),new jt(Math.round(n.left+n.width),Math.round(n.top+o)),new jt(Math.round(n.left+n.width),Math.round(u+n.top+o)),new jt(Math.round(n.left),Math.round(u+n.top+o))];case 3:return[new jt(Math.round(n.left+s),Math.round(n.top)),new jt(Math.round(n.left+s+l),Math.round(n.top)),new jt(Math.round(n.left+s+l),Math.round(n.height+n.top)),new jt(Math.round(n.left+s),Math.round(n.height+n.top))];case 1:return[new jt(Math.round(n.left+s),Math.round(n.top+o)),new jt(Math.round(n.left+s+l),Math.round(n.top+o)),new jt(Math.round(n.left+s+l),Math.round(n.top+o+u)),new jt(Math.round(n.left+s),Math.round(n.top+o+u))];default:return[new jt(Math.round(i.left),Math.round(i.top)),new jt(Math.round(i.left+i.width),Math.round(i.top)),new jt(Math.round(i.left+i.width),Math.round(i.height+i.top)),new jt(Math.round(i.left),Math.round(i.height+i.top))]}},wY="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",i3="Hidden Text",bY=(function(){function r(e){this._data={},this._document=e}return r.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),i=this._document.createElement("img"),s=this._document.createElement("span"),o=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",o.appendChild(n),i.src=wY,i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",s.style.fontFamily=e,s.style.fontSize=t,s.style.margin="0",s.style.padding="0",s.appendChild(this._document.createTextNode(i3)),n.appendChild(s),n.appendChild(i);var l=i.offsetTop-s.offsetTop+2;n.removeChild(s),n.appendChild(this._document.createTextNode(i3)),n.style.lineHeight="normal",i.style.verticalAlign="super";var u=i.offsetTop-n.offsetTop+2;return o.removeChild(n),{baseline:l,middle:u}},r.prototype.getMetrics=function(e,t){var n=e+" "+t;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},r})(),fI=(function(){function r(e,t){this.context=e,this.options=t}return r})(),xY=1e4,_Y=(function(r){uo(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i._activeEffects=[],i.canvas=n.canvas?n.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),n.canvas||(i.canvas.width=Math.floor(n.width*n.scale),i.canvas.height=Math.floor(n.height*n.scale),i.canvas.style.width=n.width+"px",i.canvas.style.height=n.height+"px"),i.fontMetrics=new bY(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-n.x,-n.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),i}return e.prototype.applyEffects=function(t){for(var n=this;this._activeEffects.length;)this.popEffect();t.forEach(function(i){return n.applyEffect(i)})},e.prototype.applyEffect=function(t){this.ctx.save(),uY(t)&&(this.ctx.globalAlpha=t.opacity),lY(t)&&(this.ctx.translate(t.offsetX,t.offsetY),this.ctx.transform(t.matrix[0],t.matrix[1],t.matrix[2],t.matrix[3],t.matrix[4],t.matrix[5]),this.ctx.translate(-t.offsetX,-t.offsetY)),AI(t)&&(this.path(t.path),this.ctx.clip()),this._activeEffects.push(t)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(t){return ys(this,void 0,void 0,function(){var n;return os(this,function(i){switch(i.label){case 0:return n=t.element.container.styles,n.isVisible()?[4,this.renderStackContent(t)]:[3,2];case 1:i.sent(),i.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(t){return ys(this,void 0,void 0,function(){return os(this,function(n){switch(n.label){case 0:if(wa(t.container.flags,16))debugger;return t.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(t)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(t)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(t,n,i){var s=this;if(n===0)this.ctx.fillText(t.text,t.bounds.left,t.bounds.top+i);else{var o=xB(t.text);o.reduce(function(l,u){return s.ctx.fillText(u,l,t.bounds.top+i),l+s.ctx.measureText(u).width},t.bounds.left)}},e.prototype.createFontStyle=function(t){var n=t.fontVariant.filter(function(o){return o==="normal"||o==="small-caps"}).join(""),i=TY(t.fontFamily).join(", "),s=Hp(t.fontSize)?""+t.fontSize.number+t.fontSize.unit:t.fontSize.number+"px";return[[t.fontStyle,n,t.fontWeight,s,i].join(" "),i,s]},e.prototype.renderTextNode=function(t,n){return ys(this,void 0,void 0,function(){var i,s,o,l,u,f,h,g,m=this;return os(this,function(p){return i=this.createFontStyle(n),s=i[0],o=i[1],l=i[2],this.ctx.font=s,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",u=this.fontMetrics.getMetrics(o,l),f=u.baseline,h=u.middle,g=n.paintOrder,t.textBounds.forEach(function(b){g.forEach(function(B){switch(B){case 0:m.ctx.fillStyle=Na(n.color),m.renderTextWithLetterSpacing(b,n.letterSpacing,f);var _=n.textShadow;_.length&&b.text.trim().length&&(_.slice(0).reverse().forEach(function(y){m.ctx.shadowColor=Na(y.color),m.ctx.shadowOffsetX=y.offsetX.number*m.options.scale,m.ctx.shadowOffsetY=y.offsetY.number*m.options.scale,m.ctx.shadowBlur=y.blur.number,m.renderTextWithLetterSpacing(b,n.letterSpacing,f)}),m.ctx.shadowColor="",m.ctx.shadowOffsetX=0,m.ctx.shadowOffsetY=0,m.ctx.shadowBlur=0),n.textDecorationLine.length&&(m.ctx.fillStyle=Na(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(y){switch(y){case 1:m.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top+f),b.bounds.width,1);break;case 2:m.ctx.fillRect(b.bounds.left,Math.round(b.bounds.top),b.bounds.width,1);break;case 3:m.ctx.fillRect(b.bounds.left,Math.ceil(b.bounds.top+h),b.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&b.text.trim().length&&(m.ctx.strokeStyle=Na(n.webkitTextStrokeColor),m.ctx.lineWidth=n.webkitTextStrokeWidth,m.ctx.lineJoin=window.chrome?"miter":"round",m.ctx.strokeText(b.text,b.bounds.left,b.bounds.top+f)),m.ctx.strokeStyle="",m.ctx.lineWidth=0,m.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(t,n,i){if(i&&t.intrinsicWidth>0&&t.intrinsicHeight>0){var s=z0(t),o=k0(n);this.path(o),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(i,0,0,t.intrinsicWidth,t.intrinsicHeight,s.left,s.top,s.width,s.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(t){return ys(this,void 0,void 0,function(){var n,i,s,o,l,u,M,M,f,h,g,m,T,p,b,I,B,_,y,M,L,T,I;return os(this,function(D){switch(D.label){case 0:this.applyEffects(t.getEffects(4)),n=t.container,i=t.curves,s=n.styles,o=0,l=n.textNodes,D.label=1;case 1:return o0&&k>0&&(E=s.ctx.createPattern(I,"repeat"),s.renderRepeat(j,E,q,Y))):uj(h)&&(F=dy(t,n,[null,null,null]),j=F[0],N=F[1],P=F[2],K=F[3],k=F[4],te=h.position.length===0?[yB]:h.position,q=Jr(te[0],K),Y=Jr(te[te.length-1],k),W=aj(h,q,Y,K,k),ie=W[0],he=W[1],ie>0&&he>0&&(G=s.ctx.createRadialGradient(N+q,P+Y,0,N+q,P+Y,ie),EM(h.stops,ie*2).forEach(function(ee){return G.addColorStop(ee.stop,Na(ee.color))}),s.path(j),s.ctx.fillStyle=G,ie!==he?(R=t.bounds.left+.5*t.bounds.width,V=t.bounds.top+.5*t.bounds.height,J=he/ie,le=1/J,s.ctx.save(),s.ctx.translate(R,V),s.ctx.transform(1,0,0,J,0,0),s.ctx.translate(-R,-V),s.ctx.fillRect(N,le*(P-V)+V,K,k*le),s.ctx.restore()):s.ctx.fill())),fe.label=6;case 6:return n--,[2]}})},s=this,o=0,l=t.styles.backgroundImage.slice(0).reverse(),f.label=1;case 1:return o0?h.style!==2?[3,5]:[4,this.renderDashedDottedBorder(h.color,h.width,l,t.curves,2)]:[3,11]):[3,13];case 4:return m.sent(),[3,11];case 5:return h.style!==3?[3,7]:[4,this.renderDashedDottedBorder(h.color,h.width,l,t.curves,3)];case 6:return m.sent(),[3,11];case 7:return h.style!==4?[3,9]:[4,this.renderDoubleBorder(h.color,h.width,l,t.curves)];case 8:return m.sent(),[3,11];case 9:return[4,this.renderSolidBorder(h.color,l,t.curves)];case 10:m.sent(),m.label=11;case 11:l++,m.label=12;case 12:return u++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(t,n,i,s,o){return ys(this,void 0,void 0,function(){var l,u,f,h,g,m,p,b,B,_,y,M,L,T,I,D,I,D;return os(this,function(Q){return this.ctx.save(),l=pY(s,i),u=r3(s,i),o===2&&(this.path(u),this.ctx.clip()),BA(u[0])?(f=u[0].start.x,h=u[0].start.y):(f=u[0].x,h=u[0].y),BA(u[1])?(g=u[1].end.x,m=u[1].end.y):(g=u[1].x,m=u[1].y),i===0||i===2?p=Math.abs(f-g):p=Math.abs(h-m),this.ctx.beginPath(),o===3?this.formatPath(l):this.formatPath(u.slice(0,2)),b=n<3?n*3:n*2,B=n<3?n*2:n,o===3&&(b=n,B=n),_=!0,p<=b*2?_=!1:p<=b*2+B?(y=p/(2*b+B),b*=y,B*=y):(M=Math.floor((p+B)/(b+B)),L=(p-M*b)/(M-1),T=(p-(M+1)*b)/M,B=T<=0||Math.abs(B-L)r.length)&&(e=r.length);for(var t=0,n=Array(e);t2?n-2:0),s=2;s1?t-1:0),i=1;i"u"?null:ra(BigInt.prototype.toString),c3=typeof Symbol>"u"?null:ra(Symbol.prototype.toString),Hs=ra(Object.prototype.hasOwnProperty),$d=ra(Object.prototype.toString),As=ra(RegExp.prototype.test),Ku=YY(TypeError);function ra(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i2&&arguments[2]!==void 0?arguments[2]:fp;if(s3&&s3(r,null),!Qh(e))return r;let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){const s=t(i);s!==i&&(zY(e)||(e[n]=s),i=s)}r[i]=!0}return r}function ZY(r){for(let e=0;e/g),iZ=Da(/\${[\w\W]*/g),aZ=Da(/^data-[\-\w.\u00B7-\uFFFF]+$/),sZ=Da(/^aria-[\-\w]+$/),g3=Da(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),AZ=Da(/^(?:\w+script|data):/i),oZ=Da(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),lZ=Da(/^html$/i),uZ=Da(/^[a-z][.\w]*(-[.\w]+)+$/i),m3=Da(/<[/\w!]/g),v3=Da(/<[/\w]/g),cZ=Da(/<\/no(script|embed|frames)/i),fZ=Da(/\/>/i),sA={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},pI=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],hZ=ba(ur({},pI)),dZ=(function(){const r={};return Gc(pI,e=>{r[e]=Da(new RegExp("])","i"))}),ba(r)})(),pZ=function(){return typeof window>"u"?null:window},gZ=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null;const i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));const s="dompurify"+(n?"#"+n:"");try{return e.createPolicy(s,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},y3=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},qu=function(e,t,n,i){return Hs(e,t)&&Qh(e[t])?ur(i.base?oA(i.base):{},e[t],i.transform):n},wy=function(e,t,n){const i=Hs(e,t)?e[t]:void 0;return i&&typeof i=="object"?oA(i):n()};function gI(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:pZ();const e=Bt=>gI(Bt);if(e.version="3.4.16",e.removed=[],!r||!r.document||r.document.nodeType!==sA.document||!r.Element)return e.isSupported=!1,e;let t=r.document;const n=t,i=n.currentScript;r.DocumentFragment;const s=r.HTMLTemplateElement,o=r.Node,l=r.Element,u=r.NodeFilter;r.NamedNodeMap===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const f=r.DOMParser,h=r.trustedTypes,g=l.prototype,m=wA(g,"cloneNode"),p=wA(g,"remove"),b=wA(g,"removeAttributeNode"),B=wA(g,"nextSibling"),_=wA(g,"childNodes"),y=wA(g,"parentNode"),M=wA(g,"shadowRoot"),L=wA(g,"attributes"),T=o&&o.prototype?wA(o.prototype,"nodeType"):null,I=o&&o.prototype?wA(o.prototype,"nodeName"):null,D=o&&o.prototype?wA(o.prototype,"ownerDocument"):null,Q=function(ce){return T?T(ce):ce.nodeType},E=function(ce){return I?I(ce):ce.nodeName};if(typeof s=="function"){const Bt=t.createElement("template");Bt.content&&Bt.content.ownerDocument&&(t=Bt.content.ownerDocument)}let F,j="",N,P=!1,K=0;const k=function(){if(K>0)throw Ku('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},te=function(ce){k(),K++;try{return F.createHTML(ce)}finally{K--}},q=function(ce){k(),K++;try{return F.createScriptURL(ce)}finally{K--}},Y=function(){return P||(N=gZ(h,i),P=!0),N},W=t,ie=W.implementation,he=W.createNodeIterator,G=W.createDocumentFragment,R=W.getElementsByTagName,V=n.importNode;let J=y3();e.isSupported=typeof hI=="function"&&typeof y=="function"&&ie&&ie.createHTMLDocument!==void 0;const le=nZ,fe=rZ,ee=iZ,de=aZ,be=sZ,Me=AZ,Ee=oZ,Ye=uZ;let ht=g3,Je=null;const Ae=ur({},[...f3,...gy,...my,...vy,...h3]);let $e=null;const Ct=ur({},[...d3,...yy,...p3,...Zm]);let Mt=Object.seal(Ch(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),it=null,kt=null;const gt=Object.seal(Ch(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Lt=!0,ve=!0,Ze=!1,mt=!0,ae=!1,H=!0,we=!1,xe=!1,Le=null,ze=null,dt=!1,De=!1,Ie=!1,rt=!1,St=!0,nt=!1;const yt="user-content-";let pt=!0,_t=!1,Pt={},ye=null;const tt=ur({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Ke=null;const Ft=ur({},["audio","video","img","source","image","track"]);let Rt=null;const ct=ur({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kt="http://www.w3.org/1998/Math/MathML",ut="http://www.w3.org/2000/svg",wn="http://www.w3.org/1999/xhtml";let vn=wn,gr=!1,xr=null;const _r=ur({},[Kt,ut,wn],py),kr=ba(["mi","mo","mn","ms","mtext"]);let zr=ur({},kr);const Pa=ba(["annotation-xml"]);let mi=ur({},Pa);const nr=ur({},["title","style","font","a","script"]);let rr=null;const Ir=["application/xhtml+xml","text/html"],Pi="text/html";let Hn=null,ia=null;const Wi=t.createElement("form"),aa=function(ce){return ce instanceof RegExp||ce instanceof Function},sa=function(){let ce=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(ia&&ia===ce)return;(!ce||typeof ce!="object")&&(ce={}),ce=oA(ce),rr=Ir.indexOf(ce.PARSER_MEDIA_TYPE)===-1?Pi:ce.PARSER_MEDIA_TYPE,Hn=rr==="application/xhtml+xml"?py:fp,Je=qu(ce,"ALLOWED_TAGS",Ae,{transform:Hn}),$e=qu(ce,"ALLOWED_ATTR",Ct,{transform:Hn}),xr=qu(ce,"ALLOWED_NAMESPACES",_r,{transform:py}),Rt=qu(ce,"ADD_URI_SAFE_ATTR",ct,{transform:Hn,base:ct}),Ke=qu(ce,"ADD_DATA_URI_TAGS",Ft,{transform:Hn,base:Ft}),ye=qu(ce,"FORBID_CONTENTS",tt,{transform:Hn}),it=qu(ce,"FORBID_TAGS",oA({}),{transform:Hn}),kt=qu(ce,"FORBID_ATTR",oA({}),{transform:Hn}),Pt=Hs(ce,"USE_PROFILES")?ce.USE_PROFILES&&typeof ce.USE_PROFILES=="object"?oA(ce.USE_PROFILES):ce.USE_PROFILES:!1,Lt=ce.ALLOW_ARIA_ATTR!==!1,ve=ce.ALLOW_DATA_ATTR!==!1,Ze=ce.ALLOW_UNKNOWN_PROTOCOLS||!1,mt=ce.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ae=ce.SAFE_FOR_TEMPLATES||!1,H=ce.SAFE_FOR_XML!==!1,we=ce.WHOLE_DOCUMENT||!1,De=ce.RETURN_DOM||!1,Ie=ce.RETURN_DOM_FRAGMENT||!1,rt=ce.RETURN_TRUSTED_TYPE||!1,dt=ce.FORCE_BODY||!1,St=ce.SANITIZE_DOM!==!1,nt=ce.SANITIZE_NAMED_PROPS||!1,pt=ce.KEEP_CONTENT!==!1,_t=ce.IN_PLACE||!1,ht=$Y(ce.ALLOWED_URI_REGEXP)?ce.ALLOWED_URI_REGEXP:g3,vn=typeof ce.NAMESPACE=="string"?ce.NAMESPACE:wn,zr=wy(ce,"MATHML_TEXT_INTEGRATION_POINTS",()=>ur({},kr)),mi=wy(ce,"HTML_INTEGRATION_POINTS",()=>ur({},Pa));const Re=wy(ce,"CUSTOM_ELEMENT_HANDLING",()=>Ch(null));if(Mt=Ch(null),Hs(Re,"tagNameCheck")&&aa(Re.tagNameCheck)&&(Mt.tagNameCheck=Re.tagNameCheck),Hs(Re,"attributeNameCheck")&&aa(Re.attributeNameCheck)&&(Mt.attributeNameCheck=Re.attributeNameCheck),Hs(Re,"allowCustomizedBuiltInElements")&&typeof Re.allowCustomizedBuiltInElements=="boolean"&&(Mt.allowCustomizedBuiltInElements=Re.allowCustomizedBuiltInElements),Da(Mt),ae&&(ve=!1),Ie&&(De=!0),Pt&&(Je=ur({},h3),$e=Ch(null),Pt.html===!0&&(ur(Je,f3),ur($e,d3)),Pt.svg===!0&&(ur(Je,gy),ur($e,yy),ur($e,Zm)),Pt.svgFilters===!0&&(ur(Je,my),ur($e,yy),ur($e,Zm)),Pt.mathMl===!0&&(ur(Je,vy),ur($e,p3),ur($e,Zm))),gt.tagCheck=null,gt.attributeCheck=null,Hs(ce,"ADD_TAGS")&&(typeof ce.ADD_TAGS=="function"?gt.tagCheck=ce.ADD_TAGS:Qh(ce.ADD_TAGS)&&(Je===Ae&&(Je=oA(Je)),ur(Je,ce.ADD_TAGS,Hn))),Hs(ce,"ADD_ATTR")&&(typeof ce.ADD_ATTR=="function"?gt.attributeCheck=ce.ADD_ATTR:Qh(ce.ADD_ATTR)&&($e===Ct&&($e=oA($e)),ur($e,ce.ADD_ATTR,Hn))),Hs(ce,"ADD_FORBID_CONTENTS")&&Qh(ce.ADD_FORBID_CONTENTS)&&(ye===tt&&(ye=oA(ye)),ur(ye,ce.ADD_FORBID_CONTENTS,Hn)),pt&&(Je["#text"]=!0),we&&ur(Je,["html","head","body"]),Je.table&&(ur(Je,["tbody"]),delete it.tbody),ce.TRUSTED_TYPES_POLICY){if(typeof ce.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ku('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof ce.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ku('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const wt=F;F=ce.TRUSTED_TYPES_POLICY;try{j=te("")}catch(Nt){throw F=wt,Nt}}else ce.TRUSTED_TYPES_POLICY===null?(F=void 0,j=""):(F===void 0&&(F=Y()),F&&typeof j=="string"&&(j=te("")));ba&&ba(ce),ia=ce},Aa=ur({},[...gy,...my,...eZ]),oa=ur({},[...vy,...tZ]),Ws=function(ce,Re,wt){return Re.namespaceURI===wn?ce==="svg":Re.namespaceURI===Kt?ce==="svg"&&(wt==="annotation-xml"||zr[wt]):!!Aa[ce]},Ja=function(ce,Re,wt){return Re.namespaceURI===wn?ce==="math":Re.namespaceURI===ut?ce==="math"&&mi[wt]:!!oa[ce]},Gr=function(ce,Re,wt){return Re.namespaceURI===ut&&!mi[wt]||Re.namespaceURI===Kt&&!zr[wt]?!1:!oa[ce]&&(nr[ce]||!Aa[ce])},UA=function(ce){let Re=y(ce);(!Re||!Re.tagName)&&(Re={namespaceURI:vn,tagName:"template"});const wt=fp(ce.tagName),Nt=fp(Re.tagName);return xr[ce.namespaceURI]?ce.namespaceURI===ut?Ws(wt,Re,Nt):ce.namespaceURI===Kt?Ja(wt,Re,Nt):ce.namespaceURI===wn?Gr(wt,Re,Nt):!!(rr==="application/xhtml+xml"&&xr[ce.namespaceURI]):!1},Vr=function(ce){Zd(e.removed,{element:ce});try{y(ce).removeChild(ce)}catch{if(p(ce),!y(ce))throw Ku("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},$=function(ce,Re,wt){try{b(ce,Re)}catch{try{ce.removeAttribute(wt)}catch{}}},Ce=function(ce){Pe(ce);const Re=_(ce);if(Re){const Nt=[];Gc(Re,Yt=>{Zd(Nt,Yt)}),Gc(Nt,Yt=>{try{p(Yt)}catch{}})}const wt=L(ce);if(wt)for(let Nt=wt.length-1;Nt>=0;--Nt){const Yt=wt[Nt],It=Yt&&Yt.name;typeof It=="string"&&$(ce,Yt,It)}},Ge=function(ce,Re,wt){if(!wt)try{wt=Re.getAttributeNode(ce)}catch{wt=null}Zd(e.removed,{attribute:wt||null,from:Re});try{wt?b(Re,wt):Re.removeAttribute(ce)}catch{try{Re.removeAttribute(ce)}catch{}}if(ce==="is")if(De||Ie)try{Vr(Re)}catch{}else try{Re.setAttribute(ce,"")}catch{}},He=function(ce){const Re=L(ce);if(Re)for(let wt=Re.length-1;wt>=0;--wt){const Nt=Re[wt],Yt=Nt&&Nt.name;typeof Yt!="string"||$e[Hn(Yt)]||$(ce,Nt,Yt)}},Pe=function(ce){const Re=[ce];for(;Re.length>0;){const wt=Re.pop();Q(wt)===sA.element&&He(wt);const Nt=_(wt);if(Nt)for(let Yt=Nt.length-1;Yt>=0;--Yt)Re.push(Nt[Yt])}},Qt=function(ce,Re){return H?ce==="patchsrc"?!0:ce==="for"&&Re!=="label"&&Re!=="output":!1},Ot=function(ce){if(!H)return;const Re=[ce];for(;Re.length>0;){const wt=Re.pop(),Nt=Q(wt);if(Nt===sA.processingInstruction||Nt===sA.comment&&As(v3,wt.data)){try{p(wt)}catch{}continue}if(Nt===sA.element){const It=wt,Nn=Hn(E(wt));try{It.hasAttribute&&It.hasAttribute("patchsrc")&&It.removeAttribute("patchsrc"),It.hasAttribute&&It.hasAttribute("for")&&Qt("for",Nn)&&It.removeAttribute("for")}catch{}}const Yt=_(wt);if(Yt)for(let It=Yt.length-1;It>=0;--It)Re.push(Yt[It])}},Dt=function(ce){let Re=null,wt=null;if(dt)ce=""+ce;else{const It=o3(ce,/^[\r\n\t ]+/);wt=It&&It[0]}rr==="application/xhtml+xml"&&vn===wn&&(ce=''+ce+"");const Nt=F?te(ce):ce;if(vn===wn)try{Re=new f().parseFromString(Nt,rr)}catch{}if(!Re||!Re.documentElement){Re=ie.createDocument(vn,"template",null);try{Re.documentElement.innerHTML=gr?j:Nt}catch{}}const Yt=Re.body||Re.documentElement;return ce&&wt&&Yt.insertBefore(t.createTextNode(wt),Yt.childNodes[0]||null),vn===wn?R.call(Re,we?"html":"body")[0]:we?Re.documentElement:Yt},Gt=function(ce){const Re=D?D(ce):ce.ownerDocument;return he.call(Re||ce,ce,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},Ut=function(ce){return ce=Jd(ce,le," "),ce=Jd(ce,fe," "),ce=Jd(ce,ee," "),ce},pn=function(ce){var Re;ce.normalize();const wt=D?D(ce):ce.ownerDocument,Nt=he.call(wt||ce,ce,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let Yt=Nt.nextNode();for(;Yt;)Yt.data=Ut(Yt.data),Yt=Nt.nextNode();const It=(Re=ce.querySelectorAll)===null||Re===void 0?void 0:Re.call(ce,"template");It&&Gc(It,Nn=>{zt(Nn.content)&&pn(Nn.content)})},cn=function(ce){const Re=I?I(ce):null;return typeof Re!="string"||Hn(Re)!=="form"?!1:typeof ce.nodeName!="string"||typeof ce.textContent!="string"||typeof ce.removeChild!="function"||ce.attributes!==L(ce)||typeof ce.removeAttribute!="function"||typeof ce.removeAttributeNode!="function"||typeof ce.getAttributeNode!="function"||typeof ce.setAttribute!="function"||typeof ce.namespaceURI!="string"||typeof ce.insertBefore!="function"||typeof ce.hasChildNodes!="function"||ce.nodeType!==T(ce)||ce.childNodes!==_(ce)},zt=function(ce){if(!T||typeof ce!="object"||ce===null)return!1;try{return T(ce)===sA.documentFragment}catch{return!1}},En=function(ce){if(!T||typeof ce!="object"||ce===null)return!1;try{return typeof T(ce)=="number"}catch{return!1}};function yn(Bt,ce,Re){Bt.length!==0&&Gc(Bt,wt=>{wt.call(e,ce,Re,ia)})}const Wn=function(ce,Re){return!!(H&&ce.hasChildNodes()&&!En(ce.firstElementChild)&&As(m3,ce.textContent)&&As(m3,ce.innerHTML)||H&&ce.namespaceURI===wn&&hZ[Re]&&(En(ce.firstElementChild)||typeof ce.textContent=="string"&&As(dZ[Re],ce.textContent))||ce.nodeType===sA.processingInstruction||H&&ce.nodeType===sA.comment&&As(v3,ce.data))},fn=function(ce,Re){if(ce instanceof RegExp)return As(ce,Re);if(ce instanceof Function){for(var wt=arguments.length,Nt=new Array(wt>2?wt-2:0),Yt=2;Yt=0;--Nn){const Sr=ce===wt?m(Yt[Nn],!0):Yt[Nn];Nt.insertBefore(Sr,B(ce))}}}return Vr(ce),!0},Vt=function(ce,Re,wt,Nt){return ce.length===0?Re:Re===wt||Re===Nt?oA(Re):Re},Br=function(ce,Re){return ce===Re||y(ce)!==null?!1:(_t&&Pe(ce),!0)},xn=function(ce,Re){if(yn(J.beforeSanitizeElements,ce,null),Br(ce,Re))return!0;if(cn(ce))return Vr(ce),!0;const wt=Hn(E(ce));if(Je=Vt(J.uponSanitizeElement,Je,Ae,Le),yn(J.uponSanitizeElement,ce,{tagName:wt,allowedTags:Je}),Br(ce,Re))return!0;if(Wn(ce,wt))return Vr(ce),!0;if(it[wt]||!(gt.tagCheck instanceof Function&>.tagCheck(wt))&&!Je[wt]){const Nt=Dn(ce,wt,Re);return Nt===!1&&(yn(J.afterSanitizeElements,ce,null),Br(ce,Re))?!0:Nt}if(Q(ce)===sA.element&&!UA(ce)||(wt==="noscript"||wt==="noembed"||wt==="noframes")&&As(cZ,ce.innerHTML))return Vr(ce),!0;if(ae&&ce.nodeType===sA.text){const Nt=Ut(ce.textContent);ce.textContent!==Nt&&(Zd(e.removed,{element:ce.cloneNode()}),ce.textContent=Nt)}return yn(J.afterSanitizeElements,ce,null),Br(ce,Re)},xi=function(ce,Re,wt){if(kt[Re]||Qt(Re,ce)||St&&(Re==="id"||Re==="name")&&(wt in t||wt in Wi))return!1;const Nt=$e[Re]||gt.attributeCheck instanceof Function&>.attributeCheck(Re,ce);return ve&&As(de,Re)||Lt&&As(be,Re)?!0:Nt?Rt[Re]||As(ht,Jd(wt,Ee,""))||(Re==="src"||Re==="xlink:href"||Re==="href")&&ce!=="script"&&l3(wt,"data:")===0&&Ke[ce]||Ze&&!As(Me,Jd(wt,Ee,""))?!0:!wt:vi(ce)&&fn(Mt.tagNameCheck,ce)&&fn(Mt.attributeNameCheck,Re,ce)||Re==="is"&&Mt.allowCustomizedBuiltInElements&&fn(Mt.tagNameCheck,wt)},Zr=ur({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),vi=function(ce){return!Zr[fp(ce)]&&As(Ye,ce)},Qa=function(ce,Re,wt,Nt){if(F&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!wt)switch(h.getAttributeType(ce,Re)){case"TrustedHTML":return te(Nt);case"TrustedScriptURL":return q(Nt)}return Nt},On=function(ce,Re,wt,Nt){try{return wt?ce.setAttributeNS(wt,Re,Nt):ce.setAttribute(Re,Nt),cn(ce)?(Vr(ce),!1):!0}catch{return Ge(Re,ce),!1}},Ar=function(ce,Re){if(yn(J.beforeSanitizeAttributes,ce,null),Br(ce,Re))return;const wt=ce.attributes;if(!wt||cn(ce))return;$e=Vt(J.uponSanitizeAttribute,$e,Ct,ze);const Nt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$e,forceKeepAttr:void 0};let Yt=wt.length;const It=Hn(ce.nodeName);for(;Yt--;){const Nn=wt[Yt],Sr=Nn.name,la=Nn.namespaceURI,yi=Nn.value,Xi=Hn(Sr),Ha=yi;let mr=Sr==="value"?Ha:jY(Ha),hs=!1;if(Nt.attrName=Xi,Nt.attrValue=mr,Nt.keepAttr=!0,Nt.forceKeepAttr=void 0,yn(J.uponSanitizeAttribute,ce,Nt),mr=Nt.attrValue,nt&&(Xi==="id"||Xi==="name")&&l3(mr,yt)!==0&&(Ge(Sr,ce,Nn),mr=yt+mr,hs=!0),H&&As(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,mr)){Ge(Sr,ce,Nn);continue}if(Xi==="attributename"&&o3(mr,"href")){Ge(Sr,ce,Nn);continue}if(!Nt.forceKeepAttr){if(!Nt.keepAttr){Ge(Sr,ce,Nn);continue}if(!mt&&As(fZ,mr)){Ge(Sr,ce,Nn);continue}if(ae&&(mr=Ut(mr)),!xi(It,Xi,mr)){Ge(Sr,ce,Nn);continue}mr=Qa(It,Xi,la,mr),mr!==Ha&&On(ce,Sr,la,mr)&&hs&&A3(e.removed)}}yn(J.afterSanitizeAttributes,ce,null),Br(ce,Re)},Qi=function(ce){let Re=null;const wt=Gt(ce);for(yn(J.beforeSanitizeShadowDOM,ce,null);Re=wt.nextNode();)if(yn(J.uponSanitizeShadowNode,Re,null),xn(Re,ce),Ar(Re,ce),zt(Re.content)&&Qi(Re.content),Q(Re)===sA.element){const Nt=M(Re);zt(Nt)&&(Xn(Nt),Qi(Nt))}yn(J.afterSanitizeShadowDOM,ce,null)},Xn=function(ce){const Re=[{node:ce,shadow:null}];for(;Re.length>0;){const wt=Re.pop();if(wt.shadow){Qi(wt.shadow);continue}const Nt=wt.node,Yt=Q(Nt)===sA.element,It=_(Nt);if(It)for(let Nn=It.length-1;Nn>=0;--Nn)Re.push({node:It[Nn],shadow:null});if(Yt){const Nn=I?I(Nt):null;if(typeof Nn=="string"&&Hn(Nn)==="template"){const Sr=Nt.content;zt(Sr)&&Re.push({node:Sr,shadow:null})}}if(Yt){const Nn=M(Nt);zt(Nn)&&Re.push({node:null,shadow:Nn},{node:Nn,shadow:null})}}};return e.sanitize=function(Bt){let ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re=null,wt=null,Nt=null,Yt=null;if(gr=!Bt,gr&&(Bt="\x3C!-->"),typeof Bt!="string"&&!En(Bt)&&(Bt=JY(Bt),typeof Bt!="string"))throw Ku("dirty is not a string, aborting");if(!e.isSupported)return Bt;xe?(Je=Le,$e=ze):sa(ce),(J.uponSanitizeElement.length>0||J.uponSanitizeAttribute.length>0)&&(Je=oA(Je)),J.uponSanitizeAttribute.length>0&&($e=oA($e)),e.removed=[];const It=_t&&typeof Bt!="string"&&En(Bt);if(It){Ot(Bt);const la=E(Bt);if(typeof la=="string"){const yi=Hn(la);if(!Je[yi]||it[yi])throw Ce(Bt),Ku("root node is forbidden and cannot be sanitized in-place")}if(cn(Bt))throw Ce(Bt),Ku("root node is clobbered and cannot be sanitized in-place");try{Xn(Bt)}catch(yi){throw Ce(Bt),yi}}else if(En(Bt))Re=Dt("\x3C!---->"),wt=Re.ownerDocument.importNode(Bt,!0),wt.nodeType===sA.element&&wt.nodeName==="BODY"||wt.nodeName==="HTML"?Re=wt:Re.appendChild(wt),Xn(Re);else{if(!De&&!ae&&!we&&Bt.indexOf("<")===-1)return F&&rt?te(Bt):Bt;if(Re=Dt(Bt),!Re)return De?null:rt?j:""}Re&&dt&&Vr(Re.firstChild);const Nn=It?Bt:Re;try{const la=Gt(Nn);for(;Nt=la.nextNode();)xn(Nt,Nn),Ar(Nt,Nn),zt(Nt.content)&&Qi(Nt.content)}catch(la){throw It&&(Ce(Bt),Gc(e.removed,yi=>{yi.element&&Pe(yi.element)})),la}if(It){let la=!1;if(Gc(e.removed,yi=>{yi.element&&(yi.element===Bt&&(la=!0),Pe(yi.element))}),la)throw Ku("a node selected for removal could not be safely returned; refusing to sanitize in place");return ae&&pn(Bt),Bt}if(De){if(ae&&pn(Re),Ie)for(Yt=G.call(Re.ownerDocument);Re.firstChild;)Yt.appendChild(Re.firstChild);else Yt=Re;return($e.shadowroot||$e.shadowrootmode)&&(Yt=V.call(n,Yt,!0)),Yt}let Sr=we?Re.outerHTML:Re.innerHTML;return we&&Je["!doctype"]&&Re.ownerDocument&&Re.ownerDocument.doctype&&Re.ownerDocument.doctype.name&&As(lZ,Re.ownerDocument.doctype.name)&&(Sr=" `+Sr),ae&&(Sr=Ut(Sr)),F&&rt?te(Sr):Sr},e.setConfig=function(){let Bt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};sa(Bt),xe=!0,Le=Je,ze=$e},e.clearConfig=function(){ia=null,xe=!1,Le=null,ze=null,F=N,j=""},e.isValidAttribute=function(Bt,ce,Re){ia||sa({});const wt=Hn(Bt),Nt=Hn(ce);return xi(wt,Nt,Re)},e.addHook=function(Bt,ce){typeof ce=="function"&&Hs(J,Bt)&&Zd(J[Bt],ce)},e.removeHook=function(Bt,ce){if(Hs(J,Bt)){if(ce!==void 0){const Re=KY(J[Bt],ce);return Re===-1?void 0:qY(J[Bt],Re,1)[0]}return A3(J[Bt])}},e.removeHooks=function(Bt){Hs(J,Bt)&&(J[Bt]=[])},e.removeAllHooks=function(){J=y3()},e}var mZ=gI();const vZ=Object.freeze(Object.defineProperty({__proto__:null,default:mZ},Symbol.toStringTag,{value:"Module"}));var w3={},b3={},ep,x3;function gi(){if(x3)return ep;x3=1;var r=function(e){return e&&e.Math===Math&&e};return ep=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof ix=="object"&&ix)||r(typeof ep=="object"&&ep)||(function(){return this})()||Function("return this")(),ep}var by={},xy,_3;function Ii(){return _3||(_3=1,xy=function(r){try{return!!r()}catch{return!0}}),xy}var _y,B3;function co(){if(B3)return _y;B3=1;var r=Ii();return _y=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_y}var By,S3;function lv(){if(S3)return By;S3=1;var r=Ii();return By=!r(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),By}var Sy,E3;function Za(){if(E3)return Sy;E3=1;var r=lv(),e=Function.prototype.call;return Sy=r?e.bind(e):function(){return e.apply(e,arguments)},Sy}var Ey={},C3;function yZ(){if(C3)return Ey;C3=1;var r={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,t=e&&!r.call({1:2},1);return Ey.f=t?function(i){var s=e(this,i);return!!s&&s.enumerable}:r,Ey}var Cy,T3;function SB(){return T3||(T3=1,Cy=function(r,e){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:e}}),Cy}var Ty,M3;function Di(){if(M3)return Ty;M3=1;var r=lv(),e=Function.prototype,t=e.call,n=r&&e.bind.bind(t,t);return Ty=r?n:function(i){return function(){return t.apply(i,arguments)}},Ty}var My,U3;function lc(){if(U3)return My;U3=1;var r=Di(),e=r({}.toString),t=r("".slice);return My=function(n){return t(e(n),8,-1)},My}var Uy,F3;function mI(){if(F3)return Uy;F3=1;var r=Di(),e=Ii(),t=lc(),n=Object,i=r("".split);return Uy=e(function(){return!n("z").propertyIsEnumerable(0)})?function(s){return t(s)==="String"?i(s,""):n(s)}:n,Uy}var Fy,L3;function uv(){return L3||(L3=1,Fy=function(r){return r==null}),Fy}var Ly,R3;function fo(){if(R3)return Ly;R3=1;var r=uv(),e=TypeError;return Ly=function(t){if(r(t))throw new e("Can't call method on "+t);return t},Ly}var Ry,N3;function kp(){if(N3)return Ry;N3=1;var r=mI(),e=fo();return Ry=function(t){return r(e(t))},Ry}var Ny,I3;function Oi(){if(I3)return Ny;I3=1;var r=typeof document=="object"&&document.all;return Ny=typeof r>"u"&&r!==void 0?function(e){return typeof e=="function"||e===r}:function(e){return typeof e=="function"},Ny}var Iy,D3;function js(){if(D3)return Iy;D3=1;var r=Oi();return Iy=function(e){return typeof e=="object"?e!==null:r(e)},Iy}var Dy,O3;function hf(){if(O3)return Dy;O3=1;var r=gi(),e=Oi(),t=function(n){return e(n)?n:void 0};return Dy=function(n,i){return arguments.length<2?t(r[n]):r[n]&&r[n][i]},Dy}var Oy,P3;function cv(){if(P3)return Oy;P3=1;var r=Di();return Oy=r({}.isPrototypeOf),Oy}var Py,Q3;function zp(){if(Q3)return Py;Q3=1;var r=gi(),e=r.navigator,t=e&&e.userAgent;return Py=t?String(t):"",Py}var Qy,H3;function EB(){if(H3)return Qy;H3=1;var r=gi(),e=zp(),t=r.process,n=r.Deno,i=t&&t.versions||n&&n.version,s=i&&i.v8,o,l;return s&&(o=s.split("."),l=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!l&&e&&(o=e.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=e.match(/Chrome\/(\d+)/),o&&(l=+o[1]))),Qy=l,Qy}var Hy,k3;function vI(){if(k3)return Hy;k3=1;var r=EB(),e=Ii(),t=gi(),n=t.String;return Hy=!!Object.getOwnPropertySymbols&&!e(function(){var i=Symbol("symbol detection");return!n(i)||!(Object(i)instanceof Symbol)||!Symbol.sham&&r&&r<41}),Hy}var ky,z3;function yI(){if(z3)return ky;z3=1;var r=vI();return ky=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol",ky}var zy,G3;function wI(){if(G3)return zy;G3=1;var r=hf(),e=Oi(),t=cv(),n=yI(),i=Object;return zy=n?function(s){return typeof s=="symbol"}:function(s){var o=r("Symbol");return e(o)&&t(o.prototype,i(s))},zy}var Gy,V3;function fv(){if(V3)return Gy;V3=1;var r=String;return Gy=function(e){try{return r(e)}catch{return"Object"}},Gy}var Vy,K3;function uc(){if(K3)return Vy;K3=1;var r=Oi(),e=fv(),t=TypeError;return Vy=function(n){if(r(n))return n;throw new t(e(n)+" is not a function")},Vy}var Ky,q3;function Yh(){if(q3)return Ky;q3=1;var r=uc(),e=uv();return Ky=function(t,n){var i=t[n];return e(i)?void 0:r(i)},Ky}var qy,j3;function wZ(){if(j3)return qy;j3=1;var r=Za(),e=Oi(),t=js(),n=TypeError;return qy=function(i,s){var o,l;if(s==="string"&&e(o=i.toString)&&!t(l=r(o,i))||e(o=i.valueOf)&&!t(l=r(o,i))||s!=="string"&&e(o=i.toString)&&!t(l=r(o,i)))return l;throw new n("Can't convert object to primitive value")},qy}var jy={exports:{}},Wy,W3;function rl(){return W3||(W3=1,Wy=!1),Wy}var Xy,X3;function CB(){if(X3)return Xy;X3=1;var r=gi(),e=Object.defineProperty;return Xy=function(t,n){try{e(r,t,{value:n,configurable:!0,writable:!0})}catch{r[t]=n}return n},Xy}var Y3;function TB(){if(Y3)return jy.exports;Y3=1;var r=rl(),e=gi(),t=CB(),n="__core-js_shared__",i=jy.exports=e[n]||t(n,{});return(i.versions||(i.versions=[])).push({version:"3.50.0",mode:r?"pure":"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"}),jy.exports}var Yy,Z3;function MB(){if(Z3)return Yy;Z3=1;var r=TB(),e=Object.create||Object;return Yy=function(t,n){return r[t]||(r[t]=n||e(null))},Yy}var Zy,J3;function hv(){if(J3)return Zy;J3=1;var r=fo(),e=Object;return Zy=function(t){return e(r(t))},Zy}var Jy,$3;function ho(){if($3)return Jy;$3=1;var r=Di(),e=hv(),t=r({}.hasOwnProperty);return Jy=Object.hasOwn||function(i,s){return t(e(i),s)},Jy}var $y,eU;function bI(){if(eU)return $y;eU=1;var r=Di(),e=0,t=Math.random(),n=r(1.1.toString);return $y=function(i){return"Symbol("+(i===void 0?"":i)+")_"+n(++e+t,36)},$y}var ew,tU;function Oa(){if(tU)return ew;tU=1;var r=gi(),e=MB(),t=ho(),n=bI(),i=vI(),s=yI(),o=r.Symbol,l=e("wks"),u=s?o.for||o:o&&o.withoutSetter||n;return ew=function(f){return t(l,f)||(l[f]=i&&t(o,f)?o[f]:u("Symbol."+f)),l[f]},ew}var tw,nU;function bZ(){if(nU)return tw;nU=1;var r=Za(),e=js(),t=wI(),n=Yh(),i=wZ(),s=Oa(),o=TypeError,l=s("toPrimitive");return tw=function(u,f){if(!e(u)||t(u))return u;var h=n(u,l),g;if(h){if(f===void 0&&(f="default"),g=r(h,u,f),!e(g)||t(g))return g;throw new o("Can't convert object to primitive value")}return f===void 0&&(f="number"),i(u,f)},tw}var nw,rU;function xI(){if(rU)return nw;rU=1;var r=bZ(),e=wI();return nw=function(t){var n=r(t,"string");return e(n)?n:n+""},nw}var rw,iU;function dv(){if(iU)return rw;iU=1;var r=gi(),e=js(),t=r.document,n=e(t)&&e(t.createElement);return rw=function(i){return n?t.createElement(i):{}},rw}var iw,aU;function _I(){if(aU)return iw;aU=1;var r=co(),e=Ii(),t=dv();return iw=!r&&!e(function(){return Object.defineProperty(t("div"),"a",{get:function(){return 7}}).a!==7}),iw}var sU;function pv(){if(sU)return by;sU=1;var r=co(),e=Za(),t=yZ(),n=SB(),i=kp(),s=xI(),o=ho(),l=_I(),u=Object.getOwnPropertyDescriptor;return by.f=r?u:function(h,g){if(h=i(h),g=s(g),l)try{return u(h,g)}catch{}if(o(h,g))return n(!e(t.f,h,g),h[g])},by}var aw={},sw,AU;function BI(){if(AU)return sw;AU=1;var r=co(),e=Ii();return sw=r&&e(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),sw}var Aw,oU;function bs(){if(oU)return Aw;oU=1;var r=js(),e=String,t=TypeError;return Aw=function(n){if(r(n))return n;throw new t(e(n)+" is not an object")},Aw}var lU;function cc(){if(lU)return aw;lU=1;var r=co(),e=_I(),t=BI(),n=bs(),i=xI(),s=TypeError,o=Object.defineProperty,l=Object.getOwnPropertyDescriptor,u="enumerable",f="configurable",h="writable";return aw.f=r?t?function(m,p,b){if(n(m),p=i(p),n(b),typeof m=="function"&&p==="prototype"&&"value"in b&&h in b&&!b[h]){var B=l(m,p);B&&B[h]&&(m[p]=b.value,b={configurable:f in b?b[f]:B[f],enumerable:u in b?b[u]:B[u],writable:!1})}return o(m,p,b)}:o:function(m,p,b){if(n(m),p=i(p),n(b),e)try{return o(m,p,b)}catch{}if("get"in b||"set"in b)throw new s("Accessors not supported");return"value"in b&&(m[p]=b.value),m},aw}var ow,uU;function Gp(){if(uU)return ow;uU=1;var r=co(),e=cc(),t=SB();return ow=r?function(n,i,s){return e.f(n,i,t(1,s))}:function(n,i,s){return n[i]=s,n},ow}var lw={exports:{}},uw,cU;function gv(){if(cU)return uw;cU=1;var r=co(),e=ho(),t=Function.prototype,n=r&&Object.getOwnPropertyDescriptor,i=e(t,"name"),s=i&&(function(){}).name==="something",o=i&&(!r||r&&n(t,"name").configurable);return uw={EXISTS:i,PROPER:s,CONFIGURABLE:o},uw}var cw,fU;function UB(){if(fU)return cw;fU=1;var r=Di(),e=Oi(),t=TB(),n=r(Function.toString);return e(t.inspectSource)||(t.inspectSource=function(i){return n(i)}),cw=t.inspectSource,cw}var fw,hU;function xZ(){if(hU)return fw;hU=1;var r=gi(),e=Oi(),t=r.WeakMap;return fw=e(t)&&/native code/.test(String(t)),fw}var hw,dU;function FB(){if(dU)return hw;dU=1;var r=MB(),e=bI(),t=r("keys");return hw=function(n){return t[n]||(t[n]=e(n))},hw}var dw,pU;function LB(){return pU||(pU=1,dw={}),dw}var pw,gU;function mv(){if(gU)return pw;gU=1;var r=xZ(),e=gi(),t=js(),n=Gp(),i=ho(),s=TB(),o=FB(),l=LB(),u="Object already initialized",f=e.TypeError,h=e.WeakMap,g,m,p,b=function(M){return p(M)?m(M):g(M,{})},B=function(M){return function(L){var T;if(!t(L)||(T=m(L)).type!==M)throw new f("Incompatible receiver, "+M+" required");return T}};if(r||s.state){var _=s.state||(s.state=new h);_.get=_.get,_.has=_.has,_.set=_.set,g=function(M,L){if(_.has(M))throw new f(u);return L.facade=M,_.set(M,L),L},m=function(M){return _.get(M)||{}},p=function(M){return _.has(M)}}else{var y=o("state");l[y]=!0,g=function(M,L){if(i(M,y))throw new f(u);return L.facade=M,n(M,y,L),L},m=function(M){return i(M,y)?M[y]:{}},p=function(M){return i(M,y)}}return pw={set:g,get:m,has:p,enforce:b,getterFor:B},pw}var mU;function SI(){if(mU)return lw.exports;mU=1;var r=Di(),e=Ii(),t=Oi(),n=ho(),i=co(),s=gv().CONFIGURABLE,o=UB(),l=mv(),u=l.enforce,f=l.get,h=String,g=Object.defineProperty,m=r("".slice),p=r("".replace),b=r([].join),B=i&&!e(function(){return g(function(){},"length",{value:8}).length!==8}),_=String(String).split("String"),y=lw.exports=function(M,L,T){m(h(L),0,7)==="Symbol("&&(L="["+p(h(L),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),T&&T.getter&&(L="get "+L),T&&T.setter&&(L="set "+L),(!n(M,"name")||s&&M.name!==L)&&(i?g(M,"name",{value:L,configurable:!0}):M.name=L),B&&T&&n(T,"arity")&&M.length!==T.arity&&g(M,"length",{value:T.arity});try{T&&n(T,"constructor")&&T.constructor?i&&g(M,"prototype",{writable:!1}):M.prototype&&(M.prototype=void 0)}catch{}var I=u(M);return n(I,"source")||(I.source=b(_,typeof L=="string"?L:"")),M};return Function.prototype.toString=y(function(){return t(this)&&f(this).source||o(this)},"toString"),lw.exports}var gw,vU;function df(){if(vU)return gw;vU=1;var r=Oi(),e=cc(),t=SI(),n=CB();return gw=function(i,s,o,l){l||(l={});var u=l.enumerable,f=l.name!==void 0?l.name:s;if(r(o)&&t(o,f,l),l.global)u?i[s]=o:n(s,o);else{try{l.unsafe?i[s]&&(u=!0):delete i[s]}catch{}u?i[s]=o:e.f(i,s,{value:o,enumerable:!1,configurable:!l.nonConfigurable,writable:!l.nonWritable})}return i},gw}var mw={},vw,yU;function _Z(){if(yU)return vw;yU=1;var r=Math.ceil,e=Math.floor;return vw=Math.trunc||function(n){var i=+n;return(i>0?e:r)(i)},vw}var yw,wU;function vv(){if(wU)return yw;wU=1;var r=_Z();return yw=function(e){var t=+e;return t!==t||t===0?0:r(t)},yw}var ww,bU;function BZ(){if(bU)return ww;bU=1;var r=vv(),e=Math.max,t=Math.min;return ww=function(n,i){var s=r(n);return s<0?e(s+i,0):t(s,i)},ww}var bw,xU;function Zh(){if(xU)return bw;xU=1;var r=vv(),e=Math.min;return bw=function(t){var n=r(t);return n>0?e(n,9007199254740991):0},bw}var xw,_U;function RB(){if(_U)return xw;_U=1;var r=Zh();return xw=function(e){return r(e.length)},xw}var _w,BU;function EI(){if(BU)return _w;BU=1;var r=kp(),e=BZ(),t=RB(),n=function(i){return function(s,o,l){var u=r(s),f=t(u);if(f===0)return!i&&-1;var h=e(l,f),g;if(i&&o!==o){for(;f>h;)if(g=u[h++],g!==g)return!0}else for(;f>h;h++)if((i||h in u)&&u[h]===o)return i||h||0;return!i&&-1}};return _w={includes:n(!0),indexOf:n(!1)},_w}var Bw,SU;function CI(){if(SU)return Bw;SU=1;var r=Di(),e=ho(),t=kp(),n=EI().indexOf,i=LB(),s=r([].push);return Bw=function(o,l){var u=t(o),f=0,h=[],g;for(g in u)!e(i,g)&&e(u,g)&&s(h,g);for(;l.length>f;)e(u,g=l[f++])&&(~n(h,g)||s(h,g));return h},Bw}var Sw,EU;function NB(){return EU||(EU=1,Sw=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Sw}var CU;function SZ(){if(CU)return mw;CU=1;var r=CI(),e=NB(),t=e.concat("length","prototype");return mw.f=Object.getOwnPropertyNames||function(i){return r(i,t)},mw}var Ew={},TU;function EZ(){return TU||(TU=1,Ew.f=Object.getOwnPropertySymbols),Ew}var Cw,MU;function CZ(){if(MU)return Cw;MU=1;var r=hf(),e=Di(),t=SZ(),n=EZ(),i=bs(),s=e([].concat);return Cw=r("Reflect","ownKeys")||function(l){var u=t.f(i(l)),f=n.f;return f?s(u,f(l)):u},Cw}var Tw,UU;function TZ(){if(UU)return Tw;UU=1;var r=ho(),e=CZ(),t=pv(),n=cc();return Tw=function(i,s,o){for(var l=e(s),u=n.f,f=t.f,h=0;hE;E++)if(j=k(p[E]),j&&o(m,j))return j;return new g(!1)}D=l(p,Q)}for(N=M?p.next:D.next;!(P=e(N,D)).done;){var te=P.value;try{j=k(te)}catch(q){if(D)f(D,"throw",q);else throw q}if(typeof j=="object"&&j&&o(m,j))return j}return new g(!1)},gb}var mb,b4;function YZ(){if(b4)return mb;b4=1;var r=Oa(),e=r("iterator"),t=!1;try{var n=0,i={next:function(){return{done:!!n++}},return:function(){t=!0}};i[e]=function(){return this},Array.from(i,function(){throw 2})}catch{}return mb=function(s,o){try{if(!o&&!t)return!1}catch{return!1}var l=!1;try{var u={};u[e]=function(){return{next:function(){return{done:l=!0}}}},s(u)}catch{}return l},mb}var vb,x4;function HI(){if(x4)return vb;x4=1;var r=Vp(),e=YZ(),t=Kp().CONSTRUCTOR;return vb=t||!e(function(n){r.all(n).then(void 0,function(){})}),vb}var _4;function ZZ(){if(_4)return d4;_4=1;var r=xs(),e=Za(),t=uc(),n=qp(),i=DB(),s=QI(),o=HI();return r({target:"Promise",stat:!0,forced:o},{all:function(u){var f=this,h=n.f(f),g=h.resolve,m=h.reject,p=i(function(){var b=t(f.resolve),B=[],_=0,y=1;s(u,function(M){var L=_++,T=!1;y++,e(b,f,M).then(function(I){T||(T=!0,B[L]=I,--y||g(B))},m)}),--y||g(B)});return p.error&&m(p.value),h.promise}}),d4}var B4={},S4;function JZ(){if(S4)return B4;S4=1;var r=xs(),e=rl(),t=Kp().CONSTRUCTOR,n=Vp(),i=hf(),s=Oi(),o=df(),l=n&&n.prototype;if(r({target:"Promise",proto:!0,forced:t,real:!0},{catch:function(f){return this.then(void 0,f)}}),!e&&s(n)){var u=i("Promise").prototype.catch;l.catch!==u&&o(l,"catch",u,{unsafe:!0})}return B4}var E4={},C4;function $Z(){if(C4)return E4;C4=1;var r=xs(),e=Za(),t=uc(),n=qp(),i=DB(),s=QI(),o=HI();return r({target:"Promise",stat:!0,forced:o},{race:function(u){var f=this,h=n.f(f),g=h.reject,m=i(function(){var p=t(f.resolve);s(u,function(b){e(p,f,b).then(h.resolve,g)})});return m.error&&g(m.value),h.promise}}),E4}var T4={},M4;function eJ(){if(M4)return T4;M4=1;var r=xs(),e=qp(),t=Kp().CONSTRUCTOR;return r({target:"Promise",stat:!0,forced:t},{reject:function(i){var s=e.f(this),o=s.reject;return o(i),s.promise}}),T4}var U4={},yb,F4;function tJ(){if(F4)return yb;F4=1;var r=bs(),e=js(),t=qp();return yb=function(n,i){if(r(n),e(i)&&i.constructor===n)return i;var s=t.f(n),o=s.resolve;return o(i),s.promise},yb}var L4;function nJ(){if(L4)return U4;L4=1;var r=xs(),e=hf(),t=rl(),n=Vp(),i=Kp().CONSTRUCTOR,s=tJ(),o=e("Promise"),l=t&&!i;return r({target:"Promise",stat:!0,forced:t||i},{resolve:function(f){return s(l&&this===o?n:this,f)}}),U4}var R4;function rJ(){return R4||(R4=1,qZ(),ZZ(),JZ(),$Z(),eJ(),nJ()),w3}rJ();function N4(r,e,t,n,i,s,o){try{var l=r[s](o),u=l.value}catch(f){return void t(f)}l.done?e(u):Promise.resolve(u).then(n,i)}function iu(r){return function(){var e=this,t=arguments;return new Promise(function(n,i){var s=r.apply(e,t);function o(u){N4(s,n,i,o,l,"next",u)}function l(u){N4(s,n,i,o,l,"throw",u)}o(void 0)})}}var I4={},D4={},wb,O4;function il(){if(O4)return wb;O4=1;var r=FI(),e=String;return wb=function(t){if(r(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return e(t)},wb}var bb,P4;function kI(){if(P4)return bb;P4=1;var r=bs();return bb=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},bb}var xb,Q4;function zI(){if(Q4)return xb;Q4=1;var r=Ii(),e=gi(),t=e.RegExp,n=r(function(){var o=t("a","y");return o.lastIndex=2,o.exec("abcd")!==null}),i=n||r(function(){return!t("a","y").sticky}),s=n||r(function(){var o=t("^r","gy");return o.lastIndex=2,o.exec("str")!==null});return xb={BROKEN_CARET:s,MISSED_STICKY:i,UNSUPPORTED_Y:n},xb}var _b={},Bb,H4;function iJ(){if(H4)return Bb;H4=1;var r=CI(),e=NB();return Bb=Object.keys||function(n){return r(n,e)},Bb}var k4;function aJ(){if(k4)return _b;k4=1;var r=co(),e=BI(),t=cc(),n=bs(),i=kp(),s=iJ();return _b.f=r&&!e?Object.defineProperties:function(l,u){n(l);for(var f=i(u),h=s(u),g=h.length,m=0,p;g>m;)t.f(l,p=h[m++],f[p]);return l},_b}var Sb,z4;function _v(){if(z4)return Sb;z4=1;var r=bs(),e=aJ(),t=NB(),n=LB(),i=NI(),s=dv(),o=FB(),l=">",u="<",f="prototype",h="script",g=o("IE_PROTO"),m=function(){},p=function(M){return u+h+l+M+u+"/"+h+l},b=function(M){M.write(p("")),M.close();var L=M.parentWindow.Object;return M=null,L},B=function(){var M=s("iframe"),L="java"+h+":",T;return M.style.display="none",i.appendChild(M),M.src=String(L),T=M.contentWindow.document,T.open(),T.write(p("document.F=Object")),T.close(),T.F},_,y=function(){try{_=new ActiveXObject("htmlfile")}catch{}y=typeof document<"u"?document.domain&&_?b(_):B():b(_);for(var M=t.length;M--;)delete y[f][t[M]];return y()};return n[g]=!0,Sb=Object.create||function(L,T){var I;return L!==null?(m[f]=r(L),I=new m,m[f]=null,I[g]=L):I=y(),T===void 0?I:e.f(I,T)},Sb}var Eb,G4;function sJ(){if(G4)return Eb;G4=1;var r=Ii(),e=gi(),t=e.RegExp;return Eb=r(function(){var n=t(".","s");return!(n.dotAll&&n.test(` `)&&n.flags==="s")}),Eb}var Cb,V4;function AJ(){if(V4)return Cb;V4=1;var r=Ii(),e=gi(),t=e.RegExp;return Cb=r(function(){var n=t("(?b)","g");return n.exec("b").groups.a!=="b"||"b".replace(n,"$c")!=="bc"}),Cb}var Tb,K4;function OB(){if(K4)return Tb;K4=1;var r=Za(),e=Di(),t=il(),n=kI(),i=zI(),s=MB(),o=_v(),l=mv().get,u=sJ(),f=AJ(),h=s("native-string-replace",String.prototype.replace),g=RegExp.prototype.exec,m=g,p=e("".charAt),b=e("".indexOf),B=e("".replace),_=e("".slice),y=(function(){var D=/a/,Q=/b*/g;return r(g,D,"a"),r(g,Q,"a"),D.lastIndex!==0||Q.lastIndex!==0})(),M=i.BROKEN_CARET,L=/()??/.exec("")[1]!==void 0,T=y||L||M||u||f,I=function(D,Q){for(var E=D.groups=o(null),F=0;F0&&p(j,E.lastIndex-1);E.lastIndex>0&&(!E.multiline||E.multiline&&G!==` `&&G!=="\r"&&G!=="\u2028"&&G!=="\u2029")&&(W="(?: (?:"+W+"))",he=" "+he,ie++),K=new RegExp("^(?:"+W+")",Y)}L&&(K=new RegExp("^"+W+"$(?!\\s)",Y)),y&&(k=E.lastIndex);var R=r(g,q?K:E,he);return q?R?(R.input=j,R[0]=_(R[0],ie),R.index=E.lastIndex,E.lastIndex+=R[0].length):E.lastIndex=0:y&&R&&(E.lastIndex=E.global?R.index+R[0].length:k),L&&R&&R.length>1&&r(h,R[0],K,function(){for(var V=1;V=p?u?"":void 0:(b=s(g,m),b<55296||b>56319||m+1===p||(B=s(g,m+1))<56320||B>57343?u?i(g,m):b:u?o(g,m,m+2):(b-55296<<10)+(B-56320)+65536)}};return Ub={codeAt:l(!1),charAt:l(!0)},Ub}var Fb,X4;function QB(){if(X4)return Fb;X4=1;var r=lJ().charAt;return Fb=function(e,t,n){return t+(n&&r(e,t).length||1)},Fb}var Lb,Y4;function uJ(){if(Y4)return Lb;Y4=1;var r=gi(),e=Ii(),t=r.RegExp,n=!e(function(){var i=!0;try{t(".","d")}catch{i=!1}var s={},o="",l=i?"dgimsy":"gimsy",u=function(m,p){Object.defineProperty(s,m,{get:function(){return o+=p,!0}})},f={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};i&&(f.hasIndices="d");for(var h in f)u(h,f[h]);var g=Object.getOwnPropertyDescriptor(t.prototype,"flags").get.call(s);return g!==l||o!==l});return Lb={correct:n},Lb}var Rb,Z4;function Bv(){if(Z4)return Rb;Z4=1;var r=Za(),e=ho(),t=cv(),n=uJ(),i=kI(),s=RegExp.prototype;return Rb=n.correct?function(o){return o.flags}:function(o){return!n.correct&&t(s,o)&&!e(o,"flags")?r(i,o):o.flags},Rb}var Nb,J4;function HB(){if(J4)return Nb;J4=1;var r=Za(),e=bs(),t=Oi(),n=lc(),i=OB(),s=TypeError;return Nb=function(o,l){var u=o.exec;if(t(u)){var f=r(u,o,l);return f!==null&&e(f),f}if(n(o)==="RegExp")return r(i,o,l);throw new s("RegExp#exec called on incompatible receiver")},Nb}var $4;function cJ(){if($4)return I4;$4=1;var r=Za(),e=Di(),t=PB(),n=bs(),i=js(),s=Zh(),o=il(),l=fo(),u=Yh(),f=QB(),h=Bv(),g=HB(),m=e("".indexOf);return t("match",function(p,b,B){return[function(y){var M=l(this),L=i(y)?u(y,p):void 0;if(L)return r(L,y,M);var T=o(M);return new RegExp(y)[p](T)},function(_){var y=n(this),M=o(_),L=B(b,y,M);if(L.done)return L.value;var T=o(h(y));if(!~m(T,"g"))return g(y,M);var I=!!~m(T,"u")||!!~m(T,"v");y.lastIndex=0;for(var D=[],Q=0,E;(E=g(y,M))!==null;){var F=o(E[0]);D[Q]=F,F===""&&(y.lastIndex=f(M,s(y.lastIndex),I)),Q++}return Q===0?null:D}]}),I4}cJ();var eF={},Ib,tF;function fJ(){if(tF)return Ib;tF=1;var r=Di(),e=hv(),t=Math.floor,n=r("".charAt),i=r("".replace),s=r("".slice),o=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;return Ib=function(u,f,h,g,m,p){var b=h+u.length,B=g.length,_=l;return m!==void 0&&(m=e(m),_=o),i(p,_,function(y,M){var L;switch(n(M,0)){case"$":return"$";case"&":return u;case"`":return s(f,0,h);case"'":return s(f,b);case"<":L=m[s(M,1,-1)];break;default:var T=+M;if(T===0)return y;if(T>B){var I=t(T/10);return I===0?y:I<=B?g[I-1]===void 0?n(M,1):g[I-1]+n(M,1):y}L=g[T-1]}return L===void 0?"":L})},Ib}var nF;function hJ(){if(nF)return eF;nF=1;var r=RI(),e=Za(),t=Di(),n=PB(),i=Ii(),s=bs(),o=Oi(),l=js(),u=vv(),f=Zh(),h=il(),g=fo(),m=QB(),p=Yh(),b=fJ(),B=Bv(),_=HB(),y=Oa(),M=y("replace"),L=Math.max,T=Math.min,I=t([].concat),D=t([].push),Q=t("".indexOf),E=t("".slice),F=function(K){return K===void 0?K:String(K)},j=(function(){return"a".replace(/./,"$0")==="$0"})(),N=(function(){return/./[M]?/./[M]("a","$0")==="":!1})(),P=!i(function(){var K=/./;return K.exec=function(){var k=[];return k.groups={a:"7"},k},"".replace(K,"$")!=="7"});return n("replace",function(K,k,te){var q=N?"$":"$0";return[function(W,ie){var he=g(this),G=l(W)?p(W,M):void 0;return G?e(G,W,he,ie):e(k,h(he),W,ie)},function(Y,W){var ie=s(this),he=h(Y),G=o(W);G||(W=h(W));var R=h(B(ie));if(typeof W=="string"&&!~Q(W,q)&&!~Q(W,"$<")&&!~Q(R,"y")){var V=te(k,ie,he,W);if(V.done)return V.value}var J=!!~Q(R,"g"),le;J&&(le=!!~Q(R,"u")||!!~Q(R,"v"),ie.lastIndex=0);for(var fe=[],ee;ee=_(ie,he),!(ee===null||(D(fe,ee),!J));){var de=h(ee[0]);de===""&&(ie.lastIndex=m(he,f(ie.lastIndex),le))}for(var be="",Me=0,Ee=0;Ee=Me&&(be+=E(he,Me,ht)+Ae,Me=ht+Ye.length)}return be+E(he,Me)}]},!P||!j||N),eF}hJ();var rF={},Db,iF;function dJ(){if(iF)return Db;iF=1;var r=js(),e=lc(),t=Oa(),n=t("match");return Db=function(i){var s;return r(i)&&((s=i[n])!==void 0?!!s:e(i)==="RegExp")},Db}var Ob,aF;function kB(){if(aF)return Ob;aF=1;var r=dJ(),e=TypeError;return Ob=function(t){if(r(t))throw new e("The method doesn't accept regular expressions");return t},Ob}var Pb,sF;function zB(){if(sF)return Pb;sF=1;var r=Oa(),e=r("match");return Pb=function(t){var n=/./;try{"/./"[t](n)}catch{try{return n[e]=!1,"/./"[t](n)}catch{}}return!1},Pb}var AF;function pJ(){if(AF)return rF;AF=1;var r=xs(),e=bv(),t=pv().f,n=Zh(),i=il(),s=kB(),o=fo(),l=zB(),u=rl(),f=e("".slice),h=Math.min,g=l("startsWith"),m=!u&&!g&&!!(function(){var p=t(String.prototype,"startsWith");return p&&!p.writable})();return r({target:"String",proto:!0,forced:!m&&!g},{startsWith:function(b){var B=i(o(this));s(b);var _=i(b),y=n(h(arguments.length>1?arguments[1]:void 0,B.length));return f(B,y,y+_.length)===_}}),rF}pJ();var Qb,oF;function gJ(){if(oF)return Qb;oF=1;var r=Oa(),e=_v(),t=cc().f,n=r("unscopables"),i=Array.prototype;return i[n]===void 0&&t(i,n,{configurable:!0,value:e(null)}),Qb=function(s){i[n][s]=!0},Qb}var Hb,lF;function mJ(){if(lF)return Hb;lF=1;var r=Ii();return Hb=!r(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Hb}var kb,uF;function GI(){if(uF)return kb;uF=1;var r=ho(),e=Oi(),t=hv(),n=FB(),i=mJ(),s=n("IE_PROTO"),o=Object,l=o.prototype;return kb=i?o.getPrototypeOf:function(u){var f=t(u);if(r(f,s))return f[s];var h=f.constructor;return e(h)&&f instanceof h?h.prototype:f instanceof o?l:null},kb}var zb,cF;function VI(){if(cF)return zb;cF=1;var r=Ii(),e=Oi(),t=js(),n=_v(),i=GI(),s=df(),o=Oa(),l=rl(),u=o("iterator"),f=!1,h,g,m;[].keys&&(m=[].keys(),"next"in m?(g=i(i(m)),g!==Object.prototype&&(h=g)):f=!0);var p=!t(h)||r(function(){var b={};return h[u].call(b)!==b});return p?h={}:l&&(h=n(h)),e(h[u])||s(h,u,function(){return this}),zb={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:f},zb}var Gb,fF;function vJ(){if(fF)return Gb;fF=1;var r=VI().IteratorPrototype,e=_v(),t=SB(),n=wv(),i=xv(),s=function(){return this};return Gb=function(o,l,u,f){var h=l+" Iterator";return o.prototype=e(r,{next:t(+!f,u)}),n(o,h,!1,!0),i[h]=s,o},Gb}var Vb,hF;function yJ(){if(hF)return Vb;hF=1;var r=xs(),e=Za(),t=rl(),n=gv(),i=Oi(),s=vJ(),o=GI(),l=UI(),u=wv(),f=Gp(),h=df(),g=Oa(),m=xv(),p=VI(),b=n.PROPER,B=n.CONFIGURABLE,_=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,M=g("iterator"),L="keys",T="values",I="entries",D=function(){return this};return Vb=function(Q,E,F,j,N,P,K){s(F,E,j);var k=function(J){if(J===N&&ie)return ie;if(!y&&J&&J in Y)return Y[J];switch(J){case L:return function(){return new F(this,J)};case T:return function(){return new F(this,J)};case I:return function(){return new F(this,J)}}return function(){return new F(this)}},te=E+" Iterator",q=!1,Y=Q.prototype,W=Y[M]||Y["@@iterator"]||N&&Y[N],ie=!y&&W||k(N),he=E==="Array"&&Y.entries||W,G,R,V;if(he&&(G=o(he.call(new Q)),G!==Object.prototype&&G.next&&(!t&&o(G)!==_&&(l?l(G,_):i(G[M])||h(G,M,D)),u(G,te,!0,!0),t&&(m[te]=D))),b&&N===T&&W&&W.name!==T&&(!t&&B?f(Y,"name",T):(q=!0,ie=function(){return e(W,this)})),N)if(R={values:k(T),keys:P?ie:k(L),entries:k(I)},K)for(V in R)(y||q||!(V in Y))&&h(Y,V,R[V]);else r({target:E,proto:!0,forced:y||q},R);return(!t||K)&&Y[M]!==ie&&h(Y,M,ie,{name:N}),m[E]=ie,R},Vb}var Kb,dF;function wJ(){return dF||(dF=1,Kb=function(r,e){return{value:r,done:e}}),Kb}var qb,pF;function KI(){if(pF)return qb;pF=1;var r=kp(),e=gJ(),t=xv(),n=mv(),i=cc().f,s=yJ(),o=wJ(),l=rl(),u=co(),f="Array Iterator",h=n.set,g=n.getterFor(f);qb=s(Array,"Array",function(p,b){h(this,{type:f,target:r(p),index:0,kind:b})},function(){var p=g(this),b=p.target,B=p.index++;if(!b||B>=b.length)return p.target=null,o(void 0,!0);switch(p.kind){case"keys":return o(B,!1);case"values":return o(b[B],!1)}return o([B,b[B]],!1)},"values");var m=t.Arguments=t.Array;if(e("keys"),e("values"),e("entries"),!l&&u&&m.name!=="values")try{i(m,"name",{value:"values"})}catch{}return qb}KI();var gF={},jb,mF;function bJ(){return mF||(mF=1,jb={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),jb}var Wb,vF;function xJ(){if(vF)return Wb;vF=1;var r=dv(),e=r("span").classList,t=e&&e.constructor&&e.constructor.prototype;return Wb=t===Object.prototype?void 0:t,Wb}var yF;function _J(){if(yF)return gF;yF=1;var r=gi(),e=bJ(),t=xJ(),n=KI(),i=Gp(),s=wv(),o=Oa(),l=o("iterator"),u=n.values,f=function(g,m){if(g){if(g[l]!==u)try{i(g,l,u)}catch{g[l]=u}if(s(g,m,!0),e[m]){for(var p in n)if(g[p]!==n[p])try{i(g,p,n[p])}catch{g[p]=n[p]}}}};for(var h in e)f(r[h]&&r[h].prototype,h);return f(t,"DOMTokenList"),gF}_J();function BJ(r,e){if(pr(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e);if(pr(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function SJ(r){var e=BJ(r,"string");return pr(e)=="symbol"?e:e+""}function GB(r,e,t){return(e=SJ(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}var wF={},Xb,bF;function EJ(){if(bF)return Xb;bF=1;var r=uc(),e=hv(),t=mI(),n=RB(),i=TypeError,s="Reduce of empty array with no initial value",o=function(l){return function(u,f,h,g){var m=e(u),p=t(m),b=n(m);if(r(f),b===0&&h<2)throw new i(s);var B=l?b-1:0,_=l?-1:1;if(h<2)for(;;){if(B in p){g=p[B],B+=_;break}if(B+=_,l?B<0:b<=B)throw new i(s)}for(;l?B>=0:b>B;B+=_)B in p&&(g=f(g,p[B],B,m));return g}};return Xb={left:o(!1),right:o(!0)},Xb}var Yb,xF;function qI(){if(xF)return Yb;xF=1;var r=Ii();return Yb=function(e,t){var n=[][e];return!!n&&r(function(){n.call(null,t||function(){return 1},1)})},Yb}var _F;function CJ(){if(_F)return wF;_F=1;var r=xs(),e=EJ().left,t=qI(),n=EB(),i=yv(),s=!i&&n>79&&n<83,o=s||!t("reduce");return r({target:"Array",proto:!0,forced:o},{reduce:function(u){var f=arguments.length;return e(this,u,f,f>1?arguments[1]:void 0)}}),wF}CJ();var BF={},SF;function TJ(){if(SF)return BF;SF=1;var r=xs(),e=bv(),t=pv().f,n=Zh(),i=il(),s=kB(),o=fo(),l=zB(),u=rl(),f=e("".slice),h=Math.min,g=l("endsWith"),m=!u&&!g&&!!(function(){var p=t(String.prototype,"endsWith");return p&&!p.writable})();return r({target:"String",proto:!0,forced:!m&&!g},{endsWith:function(b){var B=i(o(this));s(b);var _=i(b),y=arguments.length>1?arguments[1]:void 0,M=B.length,L=y===void 0?M:h(n(y),M);return f(B,L-_.length,L)===_}}),BF}TJ();var EF={},CF;function MJ(){if(CF)return EF;CF=1;var r=Za(),e=Di(),t=PB(),n=bs(),i=js(),s=fo(),o=LI(),l=QB(),u=Zh(),f=il(),h=Yh(),g=Bv(),m=HB(),p=zI(),b=Ii(),B=p.UNSUPPORTED_Y,_=4294967295,y=Math.min,M=e([].push),L=e("".slice),T=e("".indexOf),I=!b(function(){var Q=/(?:)/,E=Q.exec;Q.exec=function(){return E.apply(this,arguments)};var F="ab".split(Q);return F.length!==2||F[0]!=="a"||F[1]!=="b"}),D="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;return t("split",function(Q,E,F){var j="0".split(void 0,0).length?function(N,P){return N===void 0&&P===0?[]:r(E,this,N,P)}:E;return[function(P,K){var k=s(this),te=i(P)?h(P,Q):void 0;return te?r(te,P,k,K):r(j,f(k),P,K)},function(N,P){var K=n(this),k=f(N);if(!D){var te=F(j,K,k,P,j!==E);if(te.done)return te.value}var q=o(K,RegExp),Y=f(g(K)),W=!!~T(Y,"u")||!!~T(Y,"v");B?~T(Y,"g")||(Y+="g"):~T(Y,"y")||(Y+="y");var ie=new q(B?"^(?:"+K.source+")":K,Y),he=P===void 0?_:P>>>0;if(he===0)return[];if(k.length===0)return m(ie,k)===null?[k]:[];for(var G=0,R=0,V=[];R"u"?ix:window,t=["moz","webkit"],n="AnimationFrame",i=e["request"+n],s=e["cancel"+n]||e["cancelRequest"+n],o=0;!i&&o3&&(this.alpha=l[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var u=this.r.toString(16),f=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),f.length==1&&(f="0"+f),h.length==1&&(h="0"+h),"#"+u+f+h},this.getHelpXML=function(){for(var u=new Array,f=0;f "+B.toRGB()+" -> "+B.toHex());b.appendChild(_),b.appendChild(y),p.appendChild(b)}catch{}return p}}),tx}var PJ=OJ();const O_=nL(PJ);var DF={},OF;function QJ(){if(OF)return DF;OF=1;var r=xs(),e=bv(),t=EI().indexOf,n=qI(),i=e([].indexOf),s=!!i&&1/i([1],1,-0)<0,o=s||!n("indexOf");return r({target:"Array",proto:!0,forced:o},{indexOf:function(u){var f=arguments.length>1?arguments[1]:void 0;return s?i(this,u,f)||0:t(this,u,f)}}),DF}QJ();var PF={},QF;function HJ(){if(QF)return PF;QF=1;var r=xs(),e=Di(),t=kB(),n=fo(),i=il(),s=zB(),o=e("".indexOf);return r({target:"String",proto:!0,forced:!s("includes")},{includes:function(u){return!!~o(i(n(this)),i(t(u)),arguments.length>1?arguments[1]:void 0)}}),PF}HJ();var HF={},nx,kF;function kJ(){if(kF)return nx;kF=1;var r=lc();return nx=Array.isArray||function(t){return r(t)==="Array"},nx}var zF;function zJ(){if(zF)return HF;zF=1;var r=xs(),e=Di(),t=kJ(),n=e([].reverse),i=[1,2];return r({target:"Array",proto:!0,forced:String(i)===String(i.reverse())},{reverse:function(){return t(this)&&(this.length=this.length),n(this)}}),HF}zJ();var WI=function(r,e){return(WI=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])})(r,e)};function XI(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function t(){this.constructor=r}WI(r,e),r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function GJ(r){var e="";Array.isArray(r)||(r=[r]);for(var t=0;tr.phi1&&(r.phi2-=2*Zu),r.sweepFlag===1&&r.phi2n)return[];if(n===0)return[[r*t/(r*r+e*e),e*t/(r*r+e*e)]];var i=Math.sqrt(n);return[[(r*t+e*i)/(r*r+e*e),(e*t-r*i)/(r*r+e*e)],[(r*t-e*i)/(r*r+e*e),(e*t+r*i)/(r*r+e*e)]]}var ta,jl=Math.PI/180;function VF(r,e,t){return(1-t)*r+t*e}function KF(r,e,t,n){return r+Math.cos(n/180*Zu)*e+Math.sin(n/180*Zu)*t}function qF(r,e,t,n){var i=1e-6,s=e-r,o=t-e,l=3*s+3*(n-t)-6*o,u=6*(o-s),f=3*s;return Math.abs(l)Q&&(p.sweepFlag=+!p.sweepFlag),p}))}function o(){return function(l){var u={};for(var f in l)u[f]=l[f];return u}}r.ROUND=function(l){function u(f){return Math.round(f*l)/l}return l===void 0&&(l=1e13),to(l),function(f){return f.x1!==void 0&&(f.x1=u(f.x1)),f.y1!==void 0&&(f.y1=u(f.y1)),f.x2!==void 0&&(f.x2=u(f.x2)),f.y2!==void 0&&(f.y2=u(f.y2)),f.x!==void 0&&(f.x=u(f.x)),f.y!==void 0&&(f.y=u(f.y)),f.rX!==void 0&&(f.rX=u(f.rX)),f.rY!==void 0&&(f.rY=u(f.rY)),f}},r.TO_ABS=e,r.TO_REL=function(){return i((function(l,u,f){return l.relative||(l.x1!==void 0&&(l.x1-=u),l.y1!==void 0&&(l.y1-=f),l.x2!==void 0&&(l.x2-=u),l.y2!==void 0&&(l.y2-=f),l.x!==void 0&&(l.x-=u),l.y!==void 0&&(l.y-=f),l.relative=!0),l}))},r.NORMALIZE_HVZ=function(l,u,f){return l===void 0&&(l=!0),u===void 0&&(u=!0),f===void 0&&(f=!0),i((function(h,g,m,p,b){if(isNaN(p)&&!(h.type&Et.MOVE_TO))throw new Error("path must start with moveto");return u&&h.type&Et.HORIZ_LINE_TO&&(h.type=Et.LINE_TO,h.y=h.relative?0:m),f&&h.type&Et.VERT_LINE_TO&&(h.type=Et.LINE_TO,h.x=h.relative?0:g),l&&h.type&Et.CLOSE_PATH&&(h.type=Et.LINE_TO,h.x=h.relative?p-g:p,h.y=h.relative?b-m:b),h.type&Et.ARC&&(h.rX===0||h.rY===0)&&(h.type=Et.LINE_TO,delete h.rX,delete h.rY,delete h.xRot,delete h.lArcFlag,delete h.sweepFlag),h}))},r.NORMALIZE_ST=t,r.QT_TO_C=n,r.INFO=i,r.SANITIZE=function(l){l===void 0&&(l=0),to(l);var u=NaN,f=NaN,h=NaN,g=NaN;return i((function(m,p,b,B,_){var y=Math.abs,M=!1,L=0,T=0;if(m.type&Et.SMOOTH_CURVE_TO&&(L=isNaN(u)?0:p-u,T=isNaN(f)?0:b-f),m.type&(Et.CURVE_TO|Et.SMOOTH_CURVE_TO)?(u=m.relative?p+m.x2:m.x2,f=m.relative?b+m.y2:m.y2):(u=NaN,f=NaN),m.type&Et.SMOOTH_QUAD_TO?(h=isNaN(h)?p:2*p-h,g=isNaN(g)?b:2*b-g):m.type&Et.QUAD_TO?(h=m.relative?p+m.x1:m.x1,g=m.relative?b+m.y1:m.y2):(h=NaN,g=NaN),m.type&Et.LINE_COMMANDS||m.type&Et.ARC&&(m.rX===0||m.rY===0||!m.lArcFlag)||m.type&Et.CURVE_TO||m.type&Et.SMOOTH_CURVE_TO||m.type&Et.QUAD_TO||m.type&Et.SMOOTH_QUAD_TO){var I=m.x===void 0?0:m.relative?m.x:m.x-p,D=m.y===void 0?0:m.relative?m.y:m.y-b;L=isNaN(h)?m.x1===void 0?L:m.relative?m.x:m.x1-p:h-p,T=isNaN(g)?m.y1===void 0?T:m.relative?m.y:m.y1-b:g-b;var Q=m.x2===void 0?0:m.relative?m.x:m.x2-p,E=m.y2===void 0?0:m.relative?m.y:m.y2-b;y(I)<=l&&y(D)<=l&&y(L)<=l&&y(T)<=l&&y(Q)<=l&&y(E)<=l&&(M=!0)}return m.type&Et.CLOSE_PATH&&y(p-B)<=l&&y(b-_)<=l&&(M=!0),M?[]:m}))},r.MATRIX=s,r.ROTATE=function(l,u,f){u===void 0&&(u=0),f===void 0&&(f=0),to(l,u,f);var h=Math.sin(l),g=Math.cos(l);return s(g,h,-h,g,u-u*g+f*h,f-u*h-f*g)},r.TRANSLATE=function(l,u){return u===void 0&&(u=0),to(l,u),s(1,0,0,1,l,u)},r.SCALE=function(l,u){return u===void 0&&(u=l),to(l,u),s(l,0,0,u,0,0)},r.SKEW_X=function(l){return to(l),s(1,0,Math.atan(l),1,0,0)},r.SKEW_Y=function(l){return to(l),s(1,Math.atan(l),0,1,0,0)},r.X_AXIS_SYMMETRY=function(l){return l===void 0&&(l=0),to(l),s(-1,0,0,1,l,0)},r.Y_AXIS_SYMMETRY=function(l){return l===void 0&&(l=0),to(l),s(1,0,0,-1,0,l)},r.A_TO_C=function(){return i((function(l,u,f){return Et.ARC===l.type?(function(h,g,m){var p,b,B,_;h.cX||rx(h,g,m);for(var y=Math.min(h.phi1,h.phi2),M=Math.max(h.phi1,h.phi2)-y,L=Math.ceil(M/90),T=new Array(L),I=g,D=m,Q=0;Qg.maxX&&(g.maxX=he),heg.maxY&&(g.maxY=he),heie&&_(jF(p,B.x1,B.x2,B.x,ie));for(var T=0,I=qF(b,B.y1,B.y2,B.y);Tie&&y(jF(b,B.y1,B.y2,B.y,ie))}if(B.type&Et.ARC){_(B.x),y(B.y),rx(B,p,b);for(var D=B.xRot/180*Math.PI,Q=Math.cos(D)*B.rX,E=Math.sin(D)*B.rX,F=-Math.sin(D)*B.rY,j=Math.cos(D)*B.rY,N=B.phi1B.phi2?[B.phi2+360,B.phi1+360]:[B.phi2,B.phi1],P=N[0],K=N[1],k=function(he){var G=he[0],R=he[1],V=180*Math.atan2(R,G)/Math.PI;return VP&&ieP&&ieh)throw new SyntaxError('Expected positive number, got "'+h+'" at index "'+o+'"')}else if((this.curArgs.length===3||this.curArgs.length===4)&&this.curNumber!=="0"&&this.curNumber!=="1")throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+o+'"')}this.curArgs.push(h),this.curArgs.length===qJ[this.curCommandType]&&(Et.HORIZ_LINE_TO===this.curCommandType?s({type:Et.HORIZ_LINE_TO,relative:this.curCommandRelative,x:h}):Et.VERT_LINE_TO===this.curCommandType?s({type:Et.VERT_LINE_TO,relative:this.curCommandRelative,y:h}):this.curCommandType===Et.MOVE_TO||this.curCommandType===Et.LINE_TO||this.curCommandType===Et.SMOOTH_QUAD_TO?(s({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),Et.MOVE_TO===this.curCommandType&&(this.curCommandType=Et.LINE_TO)):this.curCommandType===Et.CURVE_TO?s({type:Et.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===Et.SMOOTH_CURVE_TO?s({type:Et.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Et.QUAD_TO?s({type:Et.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===Et.ARC&&s({type:Et.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!VJ(l))if(l===","&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(l!=="+"&&l!=="-"&&l!==".")if(f)this.curNumber=l,this.curNumberHasDecimal=!1;else{if(this.curArgs.length!==0)throw new SyntaxError("Unterminated command at index "+o+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+l+'" at index '+o+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,l!=="z"&&l!=="Z")if(l==="h"||l==="H")this.curCommandType=Et.HORIZ_LINE_TO,this.curCommandRelative=l==="h";else if(l==="v"||l==="V")this.curCommandType=Et.VERT_LINE_TO,this.curCommandRelative=l==="v";else if(l==="m"||l==="M")this.curCommandType=Et.MOVE_TO,this.curCommandRelative=l==="m";else if(l==="l"||l==="L")this.curCommandType=Et.LINE_TO,this.curCommandRelative=l==="l";else if(l==="c"||l==="C")this.curCommandType=Et.CURVE_TO,this.curCommandRelative=l==="c";else if(l==="s"||l==="S")this.curCommandType=Et.SMOOTH_CURVE_TO,this.curCommandRelative=l==="s";else if(l==="q"||l==="Q")this.curCommandType=Et.QUAD_TO,this.curCommandRelative=l==="q";else if(l==="t"||l==="T")this.curCommandType=Et.SMOOTH_QUAD_TO,this.curCommandRelative=l==="t";else{if(l!=="a"&&l!=="A")throw new SyntaxError('Unexpected character "'+l+'" at index '+o+".");this.curCommandType=Et.ARC,this.curCommandRelative=l==="a"}else n.push({type:Et.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=l,this.curNumberHasDecimal=l==="."}else this.curNumber+=l,this.curNumberHasDecimal=!0;else this.curNumber+=l;else this.curNumber+=l,this.curNumberHasExp=!0;else this.curNumber+=l,this.curNumberHasExpDigits=this.curNumberHasExp}return n},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(n,i){i===void 0&&(i=[]);for(var s=0,o=Object.getPrototypeOf(this).parse.call(this,n);s>>I;if(o[L+3]=Ye,Ye!==0){var ht=255/Ye;o[L]=(he*T>>>I)*ht,o[L+1]=(G*T>>>I)*ht,o[L+2]=(R*T>>>I)*ht}else o[L]=o[L+1]=o[L+2]=0;he-=q,G-=Y,R-=W,V-=ie,q-=_.r,Y-=_.g,W-=_.b,ie-=_.a;var Je=Ee+s+1;Je=M+(Je>>I,Ze>0?(Ze=255/Ze,o[ye]=(xe*T>>>I)*Ze,o[ye+1]=(Le*T>>>I)*Ze,o[ye+2]=(ze*T>>>I)*Ze):o[ye]=o[ye+1]=o[ye+2]=0,xe-=mt,Le-=ae,ze-=H,dt-=we,mt-=_.r,ae-=_.g,H-=_.b,we-=_.a,ye=kt+((ye=Pt+h)0&&arguments[0]!==void 0?arguments[0]:{},e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:r,createCanvas(t,n){return new OffscreenCanvas(t,n)},createImage(t){return iu(function*(){var n=yield fetch(t),i=yield n.blob(),s=yield createImageBitmap(i);return s})()}};return(typeof DOMParser<"u"||typeof r>"u")&&Reflect.deleteProperty(e,"DOMParser"),e}function t$(r){var{DOMParser:e,canvas:t,fetch:n}=r;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:t.createCanvas,createImage:t.loadImage}}var n$=Object.freeze({__proto__:null,offscreen:e$,node:t$});function pf(r){return r.replace(/(?!\u3000)\s+/gm," ")}function ZI(r){return r.replace(/^[\n \t]+/,"")}function JI(r){return r.replace(/[\n \t]+$/,"")}function Ks(r){var e=(r||"").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm)||[];return e.map(parseFloat)}var r$=/^[A-Z-]+$/;function $I(r){return r$.test(r)?r.toLowerCase():r}function VB(r){var e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(r)||[];return e[2]||e[3]||e[4]}function eD(r){if(!r.startsWith("rgb"))return r;var e=3,t=r.replace(/\d+(\.\d+)?/g,(n,i)=>e--&&i?String(Math.round(parseFloat(n))):n);return t}var i$=/(\[[^\]]+\])/g,a$=/(#[^\s+>~.[:]+)/g,s$=/(\.[^\s+>~.[:]+)/g,A$=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,o$=/(:[\w-]+\([^)]*\))/gi,l$=/(:[^\s+>~.[:]+)/g,u$=/([^\s+>~.[:]+)/g;function Hc(r,e){var t=e.exec(r);return t?[r.replace(e," "),t.length]:[r,0]}function tD(r){var e=[0,0,0],t=r.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),n=0;return[t,n]=Hc(t,i$),e[1]+=n,[t,n]=Hc(t,a$),e[0]+=n,[t,n]=Hc(t,s$),e[1]+=n,[t,n]=Hc(t,A$),e[2]+=n,[t,n]=Hc(t,o$),e[1]+=n,[t,n]=Hc(t,l$),e[1]+=n,t=t.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[t,n]=Hc(t,u$),e[2]+=n,e.join("")}var tf=1e-8;function Q_(r){return Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2))}function G0(r,e){return(r[0]*e[0]+r[1]*e[1])/(Q_(r)*Q_(e))}function H_(r,e){return(r[0]*e[1]0&&arguments[0]!==void 0?arguments[0]:" ",{document:t,name:n}=this;return pf(this.getString()).trim().split(e).map(i=>new un(t,n,i))}hasValue(e){var{value:t}=this;return t!==null&&t!==""&&(e||t!==0)&&typeof t<"u"}isString(e){var{value:t}=this,n=typeof t=="string";return!n||!e?n:e.test(t)}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;var e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return typeof e>"u"||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return typeof e>"u"?0:parseFloat(e);var{value:t}=this,n=parseFloat(t);return this.isString(/%$/)&&(n/=100),n}getString(e){return typeof e>"u"||this.hasValue()?typeof this.value>"u"?"":String(this.value):String(e)}getColor(e){var t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=eD(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!this.hasValue())return 0;var[n,i]=typeof e=="boolean"?[void 0,e]:[e],{viewPort:s}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(s.computeSize("x"),s.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(s.computeSize("x"),s.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*s.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*s.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return this.getNumber()*15;case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case(this.isString(/%$/)&&i):return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*s.computeSize(n);default:{var o=this.getNumber();return t&&o<1?o*s.computeSize(n):o}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():this.getNumber()*1e3:0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),t=/#([^)'"]+)/.exec(e);return t&&(t=t[1]),t||(t=e),this.document.definitions[t]}getFillStyleDefinition(e,t){var n=this.getDefinition();if(!n)return null;if(typeof n.createGradient=="function")return n.createGradient(this.document.ctx,e,t);if(typeof n.createPattern=="function"){if(n.getHrefAttribute().hasValue()){var i=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),i.hasValue()&&n.getAttribute("patternTransform",!0).setValue(i.value)}return n.createPattern(this.document.ctx,e,t)}return null}getTextBaseline(){return this.hasValue()?un.textBaselineMapping[this.getString()]:null}addOpacity(e){for(var t=this.getColor(),n=t.length,i=0,s=0;s1&&arguments[1]!==void 0?arguments[1]:0,[n=t,i=t]=Ks(e);return new Li(n,i)}static parseScale(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,[n=t,i=n]=Ks(e);return new Li(n,i)}static parsePath(e){for(var t=Ks(e),n=t.length,i=[],s=0;s0}runEvents(){if(this.working){var{screen:e,events:t,eventElements:n}=this,{style:i}=e.ctx.canvas;i&&(i.cursor=""),t.forEach((s,o)=>{for(var{run:l}=s,u=n[o];u;)l(u),u=u.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(!(!this.working||!t)){var{events:n,eventElements:i}=this;n.forEach((s,o)=>{var{x:l,y:u}=s;!i[o]&&t.isPointInPath&&t.isPointInPath(l,u)&&(i[o]=e)})}}checkBoundingBox(e,t){if(!(!this.working||!t)){var{events:n,eventElements:i}=this;n.forEach((s,o)=>{var{x:l,y:u}=s;!i[o]&&t.isPointInBox(l,u)&&(i[o]=e)})}}mapXY(e,t){for(var{window:n,ctx:i}=this.screen,s=new Li(e,t),o=i.canvas;o;)s.x-=o.offsetLeft,s.y-=o.offsetTop,o=o.offsetParent;return n.scrollX&&(s.x+=n.scrollX),n.scrollY&&(s.y+=n.scrollY),s}onClick(e){var{x:t,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:t,y:n,run(i){i.onClick&&i.onClick()}})}onMouseMove(e){var{x:t,y:n}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:t,y:n,run(i){i.onMouseMove&&i.onMouseMove()}})}}var iD=typeof window<"u"?window:null,aD=typeof fetch<"u"?fetch.bind(void 0):null;class jp{constructor(e){var{fetch:t=aD,window:n=iD}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.ctx=e,this.FRAMERATE=30,this.MAX_VIRTUAL_PIXELS=3e4,this.CLIENT_WIDTH=800,this.CLIENT_HEIGHT=600,this.viewPort=new nD,this.mouse=new rD(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,this.fetch=t}wait(e){this.waits.push(e)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;var e=this.waits.every(t=>t());return e&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e,e}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){var{document:t,ctx:n,aspectRatio:i,width:s,desiredWidth:o,height:l,desiredHeight:u,minX:f=0,minY:h=0,refX:g,refY:m,clip:p=!1,clipX:b=0,clipY:B=0}=e,_=pf(i).replace(/^defer\s/,""),[y,M]=_.split(" "),L=y||"xMidYMid",T=M||"meet",I=s/o,D=l/u,Q=Math.min(I,D),E=Math.max(I,D),F=o,j=u;T==="meet"&&(F*=Q,j*=Q),T==="slice"&&(F*=E,j*=E);var N=new un(t,"refX",g),P=new un(t,"refY",m),K=N.hasValue()&&P.hasValue();if(K&&n.translate(-Q*N.getPixels("x"),-Q*P.getPixels("y")),p){var k=Q*b,te=Q*B;n.beginPath(),n.moveTo(k,te),n.lineTo(s,te),n.lineTo(s,l),n.lineTo(k,l),n.closePath(),n.clip()}if(!K){var q=T==="meet"&&Q===D,Y=T==="slice"&&E===D,W=T==="meet"&&Q===I,ie=T==="slice"&&E===I;L.startsWith("xMid")&&(q||Y)&&n.translate(s/2-F/2,0),L.endsWith("YMid")&&(W||ie)&&n.translate(0,l/2-j/2),L.startsWith("xMax")&&(q||Y)&&n.translate(s-F,0),L.endsWith("YMax")&&(W||ie)&&n.translate(0,l-j)}switch(!0){case L==="none":n.scale(I,D);break;case T==="meet":n.scale(Q,Q);break;case T==="slice":n.scale(E,E);break}n.translate(-f,-h)}start(e){var{enableRedraw:t=!1,ignoreMouse:n=!1,ignoreAnimation:i=!1,ignoreDimensions:s=!1,ignoreClear:o=!1,forceRedraw:l,scaleWidth:u,scaleHeight:f,offsetX:h,offsetY:g}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{FRAMERATE:m,mouse:p}=this,b=1e3/m;if(this.frameDuration=b,this.readyPromise=new Promise(L=>{this.resolveReady=L}),this.isReady()&&this.render(e,s,o,u,f,h,g),!!t){var B=Date.now(),_=B,y=0,M=()=>{B=Date.now(),y=B-_,y>=b&&(_=B-y%b,this.shouldUpdate(i,l)&&(this.render(e,s,o,u,f,h,g),p.runEvents())),this.intervalId=Zb(M)};n||p.start(),this.intervalId=Zb(M)}}stop(){this.intervalId&&(Zb.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){var{frameDuration:n}=this,i=this.animations.reduce((s,o)=>o.update(n)||s,!1);if(i)return!0}return!!(typeof t=="function"&&t()||!this.isReadyLock&&this.isReady()||this.mouse.hasEvents())}render(e,t,n,i,s,o,l){var{CLIENT_WIDTH:u,CLIENT_HEIGHT:f,viewPort:h,ctx:g,isFirstRender:m}=this,p=g.canvas;h.clear(),p.width&&p.height?h.setCurrent(p.width,p.height):h.setCurrent(u,f);var b=e.getStyle("width"),B=e.getStyle("height");!t&&(m||typeof i!="number"&&typeof s!="number")&&(b.hasValue()&&(p.width=b.getPixels("x"),p.style&&(p.style.width="".concat(p.width,"px"))),B.hasValue()&&(p.height=B.getPixels("y"),p.style&&(p.style.height="".concat(p.height,"px"))));var _=p.clientWidth||p.width,y=p.clientHeight||p.height;if(t&&b.hasValue()&&B.hasValue()&&(_=b.getPixels("x"),y=B.getPixels("y")),h.setCurrent(_,y),typeof o=="number"&&e.getAttribute("x",!0).setValue(o),typeof l=="number"&&e.getAttribute("y",!0).setValue(l),typeof i=="number"||typeof s=="number"){var M=Ks(e.getAttribute("viewBox").getString()),L=0,T=0;if(typeof i=="number"){var I=e.getStyle("width");I.hasValue()?L=I.getPixels("x")/i:isNaN(M[2])||(L=M[2]/i)}if(typeof s=="number"){var D=e.getStyle("height");D.hasValue()?T=D.getPixels("y")/s:isNaN(M[3])||(T=M[3]/s)}L||(L=T),T||(T=L),e.getAttribute("width",!0).setValue(i),e.getAttribute("height",!0).setValue(s);var Q=e.getStyle("transform",!0,!0);Q.setValue("".concat(Q.getString()," scale(").concat(1/L,", ").concat(1/T,")"))}n||g.clearRect(0,0,_,y),e.render(g),m&&(this.isFirstRender=!1)}}jp.defaultWindow=iD;jp.defaultFetch=aD;var{defaultFetch:c$}=jp,f$=typeof DOMParser<"u"?DOMParser:null;class v0{constructor(){var{fetch:e=c$,DOMParser:t=f$}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.fetch=e,this.DOMParser=t}parse(e){var t=this;return iu(function*(){return e.startsWith("<")?t.parseFromString(e):t.load(e)})()}parseFromString(e){var t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(e,"image/svg+xml"))}catch{return this.checkDocument(t.parseFromString(e,"text/xml"))}}checkDocument(e){var t=e.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent);return e}load(e){var t=this;return iu(function*(){var n=yield t.fetch(e),i=yield n.text();return t.parseFromString(i)})()}}class sD{constructor(e,t){this.type="translate",this.point=null,this.point=Li.parse(t)}apply(e){var{x:t,y:n}=this.point;e.translate(t||0,n||0)}unapply(e){var{x:t,y:n}=this.point;e.translate(-1*t||0,-1*n||0)}applyToPoint(e){var{x:t,y:n}=this.point;e.applyTransform([1,0,0,1,t||0,n||0])}}class AD{constructor(e,t,n){this.type="rotate",this.angle=null,this.originX=null,this.originY=null,this.cx=0,this.cy=0;var i=Ks(t);this.angle=new un(e,"angle",i[0]),this.originX=n[0],this.originY=n[1],this.cx=i[1]||0,this.cy=i[2]||0}apply(e){var{cx:t,cy:n,originX:i,originY:s,angle:o}=this,l=t+i.getPixels("x"),u=n+s.getPixels("y");e.translate(l,u),e.rotate(o.getRadians()),e.translate(-l,-u)}unapply(e){var{cx:t,cy:n,originX:i,originY:s,angle:o}=this,l=t+i.getPixels("x"),u=n+s.getPixels("y");e.translate(l,u),e.rotate(-1*o.getRadians()),e.translate(-l,-u)}applyToPoint(e){var{cx:t,cy:n,angle:i}=this,s=i.getRadians();e.applyTransform([1,0,0,1,t||0,n||0]),e.applyTransform([Math.cos(s),Math.sin(s),-Math.sin(s),Math.cos(s),0,0]),e.applyTransform([1,0,0,1,-t||0,-n||0])}}class oD{constructor(e,t,n){this.type="scale",this.scale=null,this.originX=null,this.originY=null;var i=Li.parseScale(t);(i.x===0||i.y===0)&&(i.x=tf,i.y=tf),this.scale=i,this.originX=n[0],this.originY=n[1]}apply(e){var{scale:{x:t,y:n},originX:i,originY:s}=this,o=i.getPixels("x"),l=s.getPixels("y");e.translate(o,l),e.scale(t,n||t),e.translate(-o,-l)}unapply(e){var{scale:{x:t,y:n},originX:i,originY:s}=this,o=i.getPixels("x"),l=s.getPixels("y");e.translate(o,l),e.scale(1/t,1/n||t),e.translate(-o,-l)}applyToPoint(e){var{x:t,y:n}=this.scale;e.applyTransform([t||0,0,0,n||0,0,0])}}class KB{constructor(e,t,n){this.type="matrix",this.matrix=[],this.originX=null,this.originY=null,this.matrix=Ks(t),this.originX=n[0],this.originY=n[1]}apply(e){var{originX:t,originY:n,matrix:i}=this,s=t.getPixels("x"),o=n.getPixels("y");e.translate(s,o),e.transform(i[0],i[1],i[2],i[3],i[4],i[5]),e.translate(-s,-o)}unapply(e){var{originX:t,originY:n,matrix:i}=this,s=i[0],o=i[2],l=i[4],u=i[1],f=i[3],h=i[5],g=0,m=0,p=1,b=1/(s*(f*p-h*m)-o*(u*p-h*g)+l*(u*m-f*g)),B=t.getPixels("x"),_=n.getPixels("y");e.translate(B,_),e.transform(b*(f*p-h*m),b*(h*g-u*p),b*(l*m-o*p),b*(s*p-l*g),b*(o*h-l*f),b*(l*u-s*h)),e.translate(-B,-_)}applyToPoint(e){e.applyTransform(this.matrix)}}class qB extends KB{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=null,this.angle=new un(e,"angle",t)}}class lD extends qB{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class uD extends qB{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}function h$(r){return pf(r).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/)}function d$(r){var[e,t]=r.split("(");return[e.trim(),t.trim().replace(")","")]}class oc{constructor(e,t,n){this.document=e,this.transforms=[];var i=h$(t);i.forEach(s=>{if(s!=="none"){var[o,l]=d$(s),u=oc.transformTypes[o];typeof u<"u"&&this.transforms.push(new u(this.document,l,n))}})}static fromElement(e,t){var n=t.getStyle("transform",!1,!0),[i,s=i]=t.getStyle("transform-origin",!1,!0).split(),o=[i,s];return n.hasValue()?new oc(e,n.getString(),o):null}apply(e){for(var{transforms:t}=this,n=t.length,i=0;i=0;i--)t[i].unapply(e)}applyToPoint(e){for(var{transforms:t}=this,n=t.length,i=0;i2&&arguments[2]!==void 0?arguments[2]:!1;if(this.document=e,this.node=t,this.captureTextNodes=n,this.attributes=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!(!t||t.nodeType!==1)){if(Array.from(t.attributes).forEach(l=>{var u=$I(l.nodeName);this.attributes[u]=new un(e,u,l.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){var i=this.getAttribute("style").getString().split(";").map(l=>l.trim());i.forEach(l=>{if(l){var[u,f]=l.split(":").map(h=>h.trim());this.styles[u]=new un(e,u,f)}})}var{definitions:s}=e,o=this.getAttribute("id");o.hasValue()&&(s[o.getString()]||(s[o.getString()]=this)),Array.from(t.childNodes).forEach(l=>{if(l.nodeType===1)this.addChild(l);else if(n&&(l.nodeType===3||l.nodeType===4)){var u=e.createTextNode(l);u.getText().length>0&&this.addChild(u)}})}}getAttribute(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=this.attributes[e];if(!n&&t){var i=new un(this.document,e,"");return this.attributes[e]=i,i}return n||un.empty(this.document)}getHrefAttribute(){for(var e in this.attributes)if(e==="href"||e.endsWith(":href"))return this.attributes[e];return un.empty(this.document)}getStyle(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.styles[e];if(i)return i;var s=this.getAttribute(e);if(s!=null&&s.hasValue())return this.styles[e]=s,s;if(!n){var{parent:o}=this;if(o){var l=o.getStyle(e);if(l!=null&&l.hasValue())return l}}if(t){var u=new un(this.document,e,"");return this.styles[e]=u,u}return i||un.empty(this.document)}render(e){if(!(this.getStyle("display").getString()==="none"||this.getStyle("visibility").getString()==="hidden")){if(e.save(),this.getStyle("mask").hasValue()){var t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if(this.getStyle("filter").getValue("none")!=="none"){var n=this.getStyle("filter").getDefinition();n&&(this.applyEffects(e),n.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){var t=oc.fromElement(this.document,this);t&&t.apply(e);var n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){var i=n.getDefinition();i&&i.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(t=>{t.render(e)})}addChild(e){var t=e instanceof $r?e:this.document.createElement(e);t.parent=this,$r.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(e){var t,{node:n}=this;if(typeof n.matches=="function")return n.matches(e);var i=(t=n.getAttribute)===null||t===void 0?void 0:t.call(n,"class");return!i||i===""?!1:i.split(" ").some(s=>".".concat(s)===e)}addStylesFromStyleDefinition(){var{styles:e,stylesSpecificity:t}=this.document;for(var n in e)if(!n.startsWith("@")&&this.matchesSelector(n)){var i=e[n],s=t[n];if(i)for(var o in i){var l=this.stylesSpecificity[o];typeof l>"u"&&(l="000"),s>=l&&(this.styles[o]=i[o],this.stylesSpecificity[o]=s)}}}removeStyles(e,t){var n=t.reduce((i,s)=>{var o=e.getStyle(s);if(!o.hasValue())return i;var l=o.getString();return o.setValue(""),[...i,[s,l]]},[]);return n}restoreStyles(e,t){t.forEach(n=>{var[i,s]=n;e.getStyle(i,!0).setValue(s)})}isFirstChild(){var e;return((e=this.parent)===null||e===void 0?void 0:e.children.indexOf(this))===0}}$r.ignoreChildTypes=["title"];class cD extends $r{constructor(e,t,n){super(e,t,n)}}function p$(r){var e=r.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function g$(r){return typeof process>"u"?r:r.trim().split(",").map(p$).join(",")}function m$(r){if(!r)return"";var e=r.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function v$(r){if(!r)return"";var e=r.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class us{constructor(e,t,n,i,s,o){var l=o?typeof o=="string"?us.parse(o):o:{};this.fontFamily=s||l.fontFamily,this.fontSize=i||l.fontSize,this.fontStyle=e||l.fontStyle,this.fontWeight=n||l.fontWeight,this.fontVariant=t||l.fontVariant}static parse(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n="",i="",s="",o="",l="",u=pf(e).trim().split(" "),f={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return u.forEach(h=>{switch(!0){case(!f.fontStyle&&us.styles.includes(h)):h!=="inherit"&&(n=h),f.fontStyle=!0;break;case(!f.fontVariant&&us.variants.includes(h)):h!=="inherit"&&(i=h),f.fontStyle=!0,f.fontVariant=!0;break;case(!f.fontWeight&&us.weights.includes(h)):h!=="inherit"&&(s=h),f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0;break;case!f.fontSize:h!=="inherit"&&([o]=h.split("/")),f.fontStyle=!0,f.fontVariant=!0,f.fontWeight=!0,f.fontSize=!0;break;default:h!=="inherit"&&(l+=h)}}),new us(n,i,s,o,l,t)}toString(){return[m$(this.fontStyle),this.fontVariant,v$(this.fontWeight),this.fontSize,g$(this.fontFamily)].join(" ").trim()}}us.styles="normal|italic|oblique|inherit";us.variants="normal|small-caps|inherit";us.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class MA{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.NaN,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.NaN,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Number.NaN,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Number.NaN;this.x1=e,this.y1=t,this.x2=n,this.y2=i,this.addPoint(e,t),this.addPoint(n,i)}get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,t){typeof e<"u"&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),ethis.x2&&(this.x2=e)),typeof t<"u"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),tthis.y2&&(this.y2=t))}addX(e){this.addPoint(e,null)}addY(e){this.addPoint(null,e)}addBoundingBox(e){if(e){var{x1:t,y1:n,x2:i,y2:s}=e;this.addPoint(t,n),this.addPoint(i,s)}}sumCubic(e,t,n,i,s){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*n+3*(1-e)*Math.pow(e,2)*i+Math.pow(e,3)*s}bezierCurveAdd(e,t,n,i,s){var o=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*s,u=3*n-3*t;if(l===0){if(o===0)return;var f=-u/o;0=t.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e,e}getPoint(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"x",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"y",n=new Li(this.command[e],this.command[t]);return this.makeAbsolute(n)}getAsControlPoint(e,t){var n=this.getPoint(e,t);return this.control=n,n}getAsCurrentPoint(e,t){var n=this.getPoint(e,t);return this.current=n,n}getReflectedControlPoint(){var e=this.previousCommand.type;if(e!==Et.CURVE_TO&&e!==Et.SMOOTH_CURVE_TO&&e!==Et.QUAD_TO&&e!==Et.SMOOTH_QUAD_TO)return this.current;var{current:{x:t,y:n},control:{x:i,y:s}}=this,o=new Li(2*t-i,2*n-s);return o}makeAbsolute(e){if(this.command.relative){var{x:t,y:n}=this.current;e.x+=t,e.y+=n}return e}addMarker(e,t,n){var{points:i,angles:s}=this;n&&s.length>0&&!s[s.length-1]&&(s[s.length-1]=i[i.length-1].angleTo(n)),this.addMarkerAngle(e,t?t.angleTo(e):null)}addMarkerAngle(e,t){this.points.push(e),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){for(var{angles:e}=this,t=e.length,n=0;n1&&arguments[1]!==void 0?arguments[1]:!1;if(!t){var n=this.getStyle("fill"),i=this.getStyle("fill-opacity"),s=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");if(n.isUrlDefinition()){var l=n.getFillStyleDefinition(this,i);l&&(e.fillStyle=l)}else if(n.hasValue()){n.getString()==="currentColor"&&n.setValue(this.getStyle("color").getColor());var u=n.getColor();u!=="inherit"&&(e.fillStyle=u==="none"?"rgba(0,0,0,0)":u)}if(i.hasValue()){var f=new un(this.document,"fill",e.fillStyle).addOpacity(i).getColor();e.fillStyle=f}if(s.isUrlDefinition()){var h=s.getFillStyleDefinition(this,o);h&&(e.strokeStyle=h)}else if(s.hasValue()){s.getString()==="currentColor"&&s.setValue(this.getStyle("color").getColor());var g=s.getString();g!=="inherit"&&(e.strokeStyle=g==="none"?"rgba(0,0,0,0)":g)}if(o.hasValue()){var m=new un(this.document,"stroke",e.strokeStyle).addOpacity(o).getString();e.strokeStyle=m}var p=this.getStyle("stroke-width");if(p.hasValue()){var b=p.getPixels();e.lineWidth=b||tf}var B=this.getStyle("stroke-linecap"),_=this.getStyle("stroke-linejoin"),y=this.getStyle("stroke-miterlimit"),M=this.getStyle("stroke-dasharray"),L=this.getStyle("stroke-dashoffset");if(B.hasValue()&&(e.lineCap=B.getString()),_.hasValue()&&(e.lineJoin=_.getString()),y.hasValue()&&(e.miterLimit=y.getNumber()),M.hasValue()&&M.getString()!=="none"){var T=Ks(M.getString());typeof e.setLineDash<"u"?e.setLineDash(T):typeof e.webkitLineDash<"u"?e.webkitLineDash=T:typeof e.mozDash<"u"&&!(T.length===1&&T[0]===0)&&(e.mozDash=T);var I=L.getPixels();typeof e.lineDashOffset<"u"?e.lineDashOffset=I:typeof e.webkitLineDashOffset<"u"?e.webkitLineDashOffset=I:typeof e.mozDashOffset<"u"&&(e.mozDashOffset=I)}}if(this.modifiedEmSizeStack=!1,typeof e.font<"u"){var D=this.getStyle("font"),Q=this.getStyle("font-style"),E=this.getStyle("font-variant"),F=this.getStyle("font-weight"),j=this.getStyle("font-size"),N=this.getStyle("font-family"),P=new us(Q.getString(),E.getString(),F.getString(),j.hasValue()?"".concat(j.getPixels(!0),"px"):"",N.getString(),us.parse(D.getString(),e.font));Q.setValue(P.fontStyle),E.setValue(P.fontVariant),F.setValue(P.fontWeight),j.setValue(P.fontSize),N.setValue(P.fontFamily),e.font=P.toString(),j.isPixels()&&(this.document.emSize=j.getPixels(),this.modifiedEmSizeStack=!0)}t||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}}class Mr extends fc{constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=null,this.pathParser=new Rn(this.getAttribute("d").getString())}path(e){var{pathParser:t}=this,n=new MA;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case Rn.MOVE_TO:this.pathM(e,n);break;case Rn.LINE_TO:this.pathL(e,n);break;case Rn.HORIZ_LINE_TO:this.pathH(e,n);break;case Rn.VERT_LINE_TO:this.pathV(e,n);break;case Rn.CURVE_TO:this.pathC(e,n);break;case Rn.SMOOTH_CURVE_TO:this.pathS(e,n);break;case Rn.QUAD_TO:this.pathQ(e,n);break;case Rn.SMOOTH_QUAD_TO:this.pathT(e,n);break;case Rn.ARC:this.pathA(e,n);break;case Rn.CLOSE_PATH:this.pathZ(e,n);break}return n}getBoundingBox(e){return this.path()}getMarkers(){var{pathParser:e}=this,t=e.getMarkerPoints(),n=e.getMarkerAngles(),i=t.map((s,o)=>[s,n[o]]);return i}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);var t=this.getStyle("fill-rule");e.fillStyle!==""&&(t.getString("inherit")!=="inherit"?e.fill(t.getString()):e.fill()),e.strokeStyle!==""&&(this.getAttribute("vector-effect").getString()==="non-scaling-stroke"?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var i=n.length-1,s=this.getStyle("marker-start"),o=this.getStyle("marker-mid"),l=this.getStyle("marker-end");if(s.isUrlDefinition()){var u=s.getDefinition(),[f,h]=n[0];u.render(e,f,h)}if(o.isUrlDefinition())for(var g=o.getDefinition(),m=1;m1&&(i*=Math.sqrt(m),s*=Math.sqrt(m));var p=(l===u?-1:1)*Math.sqrt((Math.pow(i,2)*Math.pow(s,2)-Math.pow(i,2)*Math.pow(g.y,2)-Math.pow(s,2)*Math.pow(g.x,2))/(Math.pow(i,2)*Math.pow(g.y,2)+Math.pow(s,2)*Math.pow(g.x,2)));isNaN(p)&&(p=0);var b=new Li(p*i*g.y/s,p*-s*g.x/i),B=new Li((t.x+h.x)/2+Math.cos(f)*b.x-Math.sin(f)*b.y,(t.y+h.y)/2+Math.sin(f)*b.x+Math.cos(f)*b.y),_=H_([1,0],[(g.x-b.x)/i,(g.y-b.y)/s]),y=[(g.x-b.x)/i,(g.y-b.y)/s],M=[(-g.x-b.x)/i,(-g.y-b.y)/s],L=H_(y,M);return G0(y,M)<=-1&&(L=Math.PI),G0(y,M)>=1&&(L=0),{currentPoint:h,rX:i,rY:s,sweepFlag:u,xAxisRotation:f,centp:B,a1:_,ad:L}}pathA(e,t){var{pathParser:n}=this,{currentPoint:i,rX:s,rY:o,sweepFlag:l,xAxisRotation:u,centp:f,a1:h,ad:g}=Mr.pathA(n),m=1-l?1:-1,p=h+m*(g/2),b=new Li(f.x+s*Math.cos(p),f.y+o*Math.sin(p));if(n.addMarkerAngle(b,p-m*Math.PI/2),n.addMarkerAngle(i,p-m*Math.PI),t.addPoint(i.x,i.y),e&&!isNaN(h)&&!isNaN(g)){var B=s>o?s:o,_=s>o?1:s/o,y=s>o?o/s:1;e.translate(f.x,f.y),e.rotate(u),e.scale(_,y),e.arc(0,0,B,h,h+g,!!(1-l)),e.scale(1/_,1/y),e.rotate(-u),e.translate(-f.x,-f.y)}}static pathZ(e){e.current=e.start}pathZ(e,t){Mr.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}}class jB extends Mr{constructor(e,t,n){super(e,t,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class au extends fc{constructor(e,t,n){super(e,t,new.target===au?!0:n),this.type="text",this.x=0,this.y=0,this.measureCache=-1}setContext(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;super.setContext(e,t);var n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(e.textBaseline=n)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if(this.type!=="text")return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);var t=null;return this.children.forEach((n,i)=>{var s=this.getChildBoundingBox(e,this,this,i);t?t.addBoundingBox(s):t=s}),t}getFontSize(){var{document:e,parent:t}=this,n=us.parse(e.ctx.font).fontSize,i=t.getStyle("font-size").getNumber(n);return i}getTElementBoundingBox(e){var t=this.getFontSize();return new MA(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,n){var i=t[n],s=null;if(e.isArabic){var o=t.length,l=t[n-1],u=t[n+1],f="isolated";if((n===0||l===" ")&&n0&&l!==" "&&n0&&l!==" "&&(n===o-1||u===" ")&&(f="initial"),typeof e.glyphs[i]<"u"){var h=e.glyphs[i];s=h instanceof jB?h:h[f]}}else s=e.glyphs[i];return s||(s=e.missingGlyph),s}getText(){return""}getTextFromNode(e){var t=e||this.node,n=Array.from(t.parentNode.childNodes),i=n.indexOf(t),s=n.length-1,o=pf(t.textContent||"");return i===0&&(o=ZI(o)),i===s&&(o=JI(o)),o}renderChildren(e){if(this.type!=="text"){this.renderTElementChildren(e);return}this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((n,i)=>{this.renderChild(e,this,this,i)});var{mouse:t}=this.document.screen;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(e))}renderTElementChildren(e){var{document:t,parent:n}=this,i=this.getText(),s=n.getStyle("font-family").getDefinition();if(s){for(var{unitsPerEm:o}=s.fontFace,l=us.parse(t.ctx.font),u=n.getStyle("font-size").getNumber(l.fontSize),f=n.getStyle("font-style").getString(l.fontStyle),h=u/o,g=s.isRTL?i.split("").reverse().join(""):i,m=Ks(n.getAttribute("dx").getString()),p=g.length,b=0;b=this.leafTexts.length)){var e=this.leafTexts[this.textChunkStart],t=e.getStyle("text-anchor").getString("start"),n=!1,i=0;t==="start"&&!n||t==="end"&&n?i=e.x-this.minX:t==="end"&&!n||t==="start"&&n?i=e.x-this.maxX:i=e.x-(this.minX+this.maxX)/2;for(var s=this.textChunkStart;s{this.adjustChildCoordinatesRecursiveCore(e,this,this,n)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,t,n,i){var s=n.children[i];s.children.length>0?s.children.forEach((o,l)=>{t.adjustChildCoordinatesRecursiveCore(e,t,s,l)}):this.adjustChildCoordinates(e,t,n,i)}adjustChildCoordinates(e,t,n,i){var s=n.children[i];if(typeof s.measureText!="function")return s;e.save(),s.setContext(e,!0);var o=s.getAttribute("x"),l=s.getAttribute("y"),u=s.getAttribute("dx"),f=s.getAttribute("dy"),h=s.getStyle("font-family").getDefinition(),g=!!h&&h.isRTL;i===0&&(o.hasValue()||o.setValue(s.getInheritedAttribute("x")),l.hasValue()||l.setValue(s.getInheritedAttribute("y")),u.hasValue()||u.setValue(s.getInheritedAttribute("dx")),f.hasValue()||f.setValue(s.getInheritedAttribute("dy")));var m=s.measureText(e);return g&&(t.x-=m),o.hasValue()?(t.applyAnchoring(),s.x=o.getPixels("x"),u.hasValue()&&(s.x+=u.getPixels("x"))):(u.hasValue()&&(t.x+=u.getPixels("x")),s.x=t.x),t.x=s.x,g||(t.x+=m),l.hasValue()?(s.y=l.getPixels("y"),f.hasValue()&&(s.y+=f.getPixels("y"))):(f.hasValue()&&(t.y+=f.getPixels("y")),s.y=t.y),t.y=s.y,t.leafTexts.push(s),t.minX=Math.min(t.minX,s.x,s.x+m),t.maxX=Math.max(t.maxX,s.x,s.x+m),s.clearContext(e),e.restore(),s}getChildBoundingBox(e,t,n,i){var s=n.children[i];if(typeof s.getBoundingBox!="function")return null;var o=s.getBoundingBox(e);return o?(s.children.forEach((l,u)=>{var f=t.getChildBoundingBox(e,t,s,u);o.addBoundingBox(f)}),o):null}renderChild(e,t,n,i){var s=n.children[i];s.render(e),s.children.forEach((o,l)=>{t.renderChild(e,t,s,l)})}measureText(e){var{measureCache:t}=this;if(~t)return t;var n=this.getText(),i=this.measureTargetText(e,n);return this.measureCache=i,i}measureTargetText(e,t){if(!t.length)return 0;var{parent:n}=this,i=n.getStyle("font-family").getDefinition();if(i){for(var s=this.getFontSize(),o=i.isRTL?t.split("").reverse().join(""):t,l=Ks(n.getAttribute("dx").getString()),u=o.length,f=0,h=0;h0?"":this.getTextFromNode()}getText(){return this.text}}class y$ extends Wp{constructor(){super(...arguments),this.type="textNode"}}class Jh extends fc{constructor(){super(...arguments),this.type="svg",this.root=!1}setContext(e){var t,{document:n}=this,{screen:i,window:s}=n,o=e.canvas;if(i.setDefaults(e),o.style&&typeof e.font<"u"&&s&&typeof s.getComputedStyle<"u"){e.font=s.getComputedStyle(o).getPropertyValue("font");var l=new un(n,"fontSize",us.parse(e.font).fontSize);l.hasValue()&&(n.rootEmSize=l.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);var{width:u,height:f}=i.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");var h=this.getAttribute("refX"),g=this.getAttribute("refY"),m=this.getAttribute("viewBox"),p=m.hasValue()?Ks(m.getString()):null,b=!this.root&&this.getStyle("overflow").getValue("hidden")!=="visible",B=0,_=0,y=0,M=0;p&&(B=p[0],_=p[1]),this.root||(u=this.getStyle("width").getPixels("x"),f=this.getStyle("height").getPixels("y"),this.type==="marker"&&(y=B,M=_,B=0,_=0)),i.viewPort.setCurrent(u,f),this.node&&(!this.parent||((t=this.node.parentNode)===null||t===void 0?void 0:t.nodeName)==="foreignObject")&&this.getStyle("transform",!1,!0).hasValue()&&!this.getStyle("transform-origin",!1,!0).hasValue()&&this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),p&&(u=p[2],f=p[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:i.viewPort.width,desiredWidth:u,height:i.viewPort.height,desiredHeight:f,minX:B,minY:_,refX:h.getValue(),refY:g.getValue(),clip:b,clipX:y,clipY:M}),p&&(i.viewPort.removeCurrent(),i.viewPort.setCurrent(u,f))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=this.getAttribute("width",!0),s=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),l=this.getAttribute("style"),u=i.getNumber(0),f=s.getNumber(0);if(n)if(typeof n=="string")this.getAttribute("preserveAspectRatio",!0).setValue(n);else{var h=this.getAttribute("preserveAspectRatio");h.hasValue()&&h.setValue(h.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(i.setValue(e),s.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(u||e," ").concat(f||t)),l.hasValue()){var g=this.getStyle("width"),m=this.getStyle("height");g.hasValue()&&g.setValue("".concat(e,"px")),m.hasValue()&&m.setValue("".concat(t,"px"))}}}class WB extends Mr{constructor(){super(...arguments),this.type="rect"}path(e){var t=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),s=this.getStyle("height",!1,!0).getPixels("y"),o=this.getAttribute("rx"),l=this.getAttribute("ry"),u=o.getPixels("x"),f=l.getPixels("y");if(o.hasValue()&&!l.hasValue()&&(f=u),l.hasValue()&&!o.hasValue()&&(u=f),u=Math.min(u,i/2),f=Math.min(f,s/2),e){var h=4*((Math.sqrt(2)-1)/3);e.beginPath(),s>0&&i>0&&(e.moveTo(t+u,n),e.lineTo(t+i-u,n),e.bezierCurveTo(t+i-u+h*u,n,t+i,n+f-h*f,t+i,n+f),e.lineTo(t+i,n+s-f),e.bezierCurveTo(t+i,n+s-f+h*f,t+i-u+h*u,n+s,t+i-u,n+s),e.lineTo(t+u,n+s),e.bezierCurveTo(t+u-h*u,n+s,t,n+s-f+h*f,t,n+s-f),e.lineTo(t,n+f),e.bezierCurveTo(t,n+f-h*f,t+u-h*u,n,t+u,n),e.closePath())}return new MA(t,n,t+i,n+s)}getMarkers(){return null}}class fD extends Mr{constructor(){super(...arguments),this.type="circle"}path(e){var t=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),i=this.getAttribute("r").getPixels();return e&&i>0&&(e.beginPath(),e.arc(t,n,i,0,Math.PI*2,!1),e.closePath()),new MA(t-i,n-i,t+i,n+i)}getMarkers(){return null}}class hD extends Mr{constructor(){super(...arguments),this.type="ellipse"}path(e){var t=4*((Math.sqrt(2)-1)/3),n=this.getAttribute("rx").getPixels("x"),i=this.getAttribute("ry").getPixels("y"),s=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&n>0&&i>0&&(e.beginPath(),e.moveTo(s+n,o),e.bezierCurveTo(s+n,o+t*i,s+t*n,o+i,s,o+i),e.bezierCurveTo(s-t*n,o+i,s-n,o+t*i,s-n,o),e.bezierCurveTo(s-n,o-t*i,s-t*n,o-i,s,o-i),e.bezierCurveTo(s+t*n,o-i,s+n,o-t*i,s+n,o),e.closePath()),new MA(s-n,o-i,s+n,o+i)}getMarkers(){return null}}class dD extends Mr{constructor(){super(...arguments),this.type="line"}getPoints(){return[new Li(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new Li(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:n},{x:i,y:s}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,n),e.lineTo(i,s)),new MA(t,n,i,s)}getMarkers(){var[e,t]=this.getPoints(),n=e.angleTo(t);return[[e,n],[t,n]]}}class XB extends Mr{constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=Li.parsePath(this.getAttribute("points").getString())}path(e){var{points:t}=this,[{x:n,y:i}]=t,s=new MA(n,i);return e&&(e.beginPath(),e.moveTo(n,i)),t.forEach(o=>{var{x:l,y:u}=o;s.addPoint(l,u),e&&e.lineTo(l,u)}),s}getMarkers(){var{points:e}=this,t=e.length-1,n=[];return e.forEach((i,s)=>{s!==t&&n.push([i,i.angleTo(e[s+1])])}),n.length>0&&n.push([e[e.length-1],n[n.length-1][1]]),n}}class pD extends XB{constructor(){super(...arguments),this.type="polygon"}path(e){var t=super.path(e),[{x:n,y:i}]=this.points;return e&&(e.lineTo(n,i),e.closePath()),t}}class gD extends $r{constructor(){super(...arguments),this.type="pattern"}createPattern(e,t,n){var i=this.getStyle("width").getPixels("x",!0),s=this.getStyle("height").getPixels("y",!0),o=new Jh(this.document,null);o.attributes.viewBox=new un(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new un(this.document,"width","".concat(i,"px")),o.attributes.height=new un(this.document,"height","".concat(s,"px")),o.attributes.transform=new un(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children;var l=this.document.createCanvas(i,s),u=l.getContext("2d"),f=this.getAttribute("x"),h=this.getAttribute("y");f.hasValue()&&h.hasValue()&&u.translate(f.getPixels("x",!0),h.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(var g=-1;g<=1;g++)for(var m=-1;m<=1;m++)u.save(),o.attributes.x=new un(this.document,"x",g*l.width),o.attributes.y=new un(this.document,"y",m*l.height),o.render(u),u.restore();var p=e.createPattern(l,"repeat");return p}}class mD extends $r{constructor(){super(...arguments),this.type="marker"}render(e,t,n){if(t){var{x:i,y:s}=t,o=this.getAttribute("orient").getString("auto"),l=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(i,s),o==="auto"&&e.rotate(n),l==="strokeWidth"&&e.scale(e.lineWidth,e.lineWidth),e.save();var u=new Jh(this.document,null);u.type=this.type,u.attributes.viewBox=new un(this.document,"viewBox",this.getAttribute("viewBox").getValue()),u.attributes.refX=new un(this.document,"refX",this.getAttribute("refX").getValue()),u.attributes.refY=new un(this.document,"refY",this.getAttribute("refY").getValue()),u.attributes.width=new un(this.document,"width",this.getAttribute("markerWidth").getValue()),u.attributes.height=new un(this.document,"height",this.getAttribute("markerHeight").getValue()),u.attributes.overflow=new un(this.document,"overflow",this.getAttribute("overflow").getValue()),u.attributes.fill=new un(this.document,"fill",this.getAttribute("fill").getColor("black")),u.attributes.stroke=new un(this.document,"stroke",this.getAttribute("stroke").getValue("none")),u.children=this.children,u.render(e),e.restore(),l==="strokeWidth"&&e.scale(1/e.lineWidth,1/e.lineWidth),o==="auto"&&e.rotate(-n),e.translate(-i,-s)}}}class vD extends $r{constructor(){super(...arguments),this.type="defs"}render(){}}class Sv extends fc{constructor(){super(...arguments),this.type="g"}getBoundingBox(e){var t=new MA;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}}class YB extends $r{constructor(e,t,n){super(e,t,n),this.attributesToInherit=["gradientUnits"],this.stops=[];var{stops:i,children:s}=this;s.forEach(o=>{o.type==="stop"&&i.push(o)})}getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,t,n){var i=this;this.getHrefAttribute().hasValue()&&(i=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(i));var{stops:s}=i,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(n,s[s.length-1].color);if(s.forEach(_=>{o.addColorStop(_.offset,this.addParentOpacity(n,_.color))}),this.getAttribute("gradientTransform").hasValue()){var{document:l}=this,{MAX_VIRTUAL_PIXELS:u,viewPort:f}=l.screen,[h]=f.viewPorts,g=new WB(l,null);g.attributes.x=new un(l,"x",-u/3),g.attributes.y=new un(l,"y",-u/3),g.attributes.width=new un(l,"width",u),g.attributes.height=new un(l,"height",u);var m=new Sv(l,null);m.attributes.transform=new un(l,"transform",this.getAttribute("gradientTransform").getValue()),m.children=[g];var p=new Jh(l,null);p.attributes.x=new un(l,"x",0),p.attributes.y=new un(l,"y",0),p.attributes.width=new un(l,"width",h.width),p.attributes.height=new un(l,"height",h.height),p.children=[m];var b=l.createCanvas(h.width,h.height),B=b.getContext("2d");return B.fillStyle=o,p.render(B),B.createPattern(b,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){var n=new un(this.document,"color",t);return n.addOpacity(e).getColor()}return t}}class yD extends YB{constructor(e,t,n){super(e,t,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}getGradient(e,t){var n=this.getGradientUnits()==="objectBoundingBox",i=n?t.getBoundingBox(e):null;if(n&&!i)return null;!this.getAttribute("x1").hasValue()&&!this.getAttribute("y1").hasValue()&&!this.getAttribute("x2").hasValue()&&!this.getAttribute("y2").hasValue()&&(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var s=n?i.x+i.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),o=n?i.y+i.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),l=n?i.x+i.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),u=n?i.y+i.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return s===l&&o===u?null:e.createLinearGradient(s,o,l,u)}}class wD extends YB{constructor(e,t,n){super(e,t,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}getGradient(e,t){var n=this.getGradientUnits()==="objectBoundingBox",i=t.getBoundingBox(e);if(n&&!i)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var s=n?i.x+i.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),o=n?i.y+i.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y"),l=s,u=o;this.getAttribute("fx").hasValue()&&(l=n?i.x+i.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(u=n?i.y+i.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));var f=n?(i.width+i.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),h=this.getAttribute("fr").getPixels();return e.createRadialGradient(l,u,h,s,o,f)}}class bD extends $r{constructor(e,t,n){super(e,t,n),this.type="stop";var i=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),s=this.getStyle("stop-opacity"),o=this.getStyle("stop-color",!0);o.getString()===""&&o.setValue("#000"),s.hasValue()&&(o=o.addOpacity(s)),this.offset=i,this.color=o.getColor()}}class Ev extends $r{constructor(e,t,n){super(e,t,n),this.type="animate",this.duration=0,this.initialValue=null,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new un(e,"values",null);var i=this.getAttribute("values");i.hasValue()&&this.values.setValue(i.getString().split(";"))}getProperty(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return e==="CSS"?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){var{initialUnits:e}=this,{progress:t,from:n,to:i}=this.getProgress(),s=n.getNumber()+(i.getNumber()-n.getNumber())*t;return e==="%"&&(s*=100),"".concat(s).concat(e)}update(e){var{parent:t}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var i=this.getAttribute("fill").getString("remove");if(this.getAttribute("repeatCount").getString()==="indefinite"||this.getAttribute("repeatDur").getString()==="indefinite")this.duration=0;else if(i==="freeze"&&!this.frozen)this.frozen=!0,t.animationFrozen=!0,t.animationFrozenValue=n.getString();else if(i==="remove"&&!this.removed)return this.removed=!0,n.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0;return!1}this.duration+=e;var s=!1;if(this.begin{var f=s[u];return l+(f-l)*e}).join(" ");return o}}class BD extends $r{constructor(e,t,n){super(e,t,n),this.type="font",this.glyphs=Object.create(null),this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();var{definitions:i}=e,{children:s}=this;for(var o of s)switch(o.type){case"font-face":{this.fontFace=o;var l=o.getStyle("font-family");l.hasValue()&&(i[l.getString()]=this);break}case"missing-glyph":this.missingGlyph=o;break;case"glyph":{var u=o;u.arabicForm?(this.isRTL=!0,this.isArabic=!0,typeof this.glyphs[u.unicode]>"u"&&(this.glyphs[u.unicode]=Object.create(null)),this.glyphs[u.unicode][u.arabicForm]=u):this.glyphs[u.unicode]=u;break}}}render(){}}class SD extends $r{constructor(e,t,n){super(e,t,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class ED extends Mr{constructor(){super(...arguments),this.type="missing-glyph",this.horizAdvX=0}}class CD extends au{constructor(){super(...arguments),this.type="tref"}getText(){var e=this.getHrefAttribute().getDefinition();if(e){var t=e.children[0];if(t)return t.getText()}return""}}class TD extends au{constructor(e,t,n){super(e,t,n),this.type="a";var{childNodes:i}=t,s=i[0],o=i.length>0&&Array.from(i).every(l=>l.nodeType===3);this.hasText=o,this.text=o?this.getTextFromNode(s):""}getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:n,y:i}=this,{mouse:s}=t.screen,o=new un(t,"fontSize",us.parse(t.ctx.font).fontSize);s.isWorking()&&s.checkBoundingBox(this,new MA(n,i-o.getPixels("y"),n+this.measureText(e),i))}else if(this.children.length>0){var l=new Sv(this.document,null);l.children=this.children,l.parent=this,l.render(e)}}onClick(){var{window:e}=this.document;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){var e=this.document.ctx;e.canvas.style.cursor="pointer"}}function JF(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function Jm(r){for(var e=1;e{var{type:i,points:s}=n;switch(i){case Rn.LINE_TO:e&&e.lineTo(s[0],s[1]);break;case Rn.MOVE_TO:e&&e.moveTo(s[0],s[1]);break;case Rn.CURVE_TO:e&&e.bezierCurveTo(s[0],s[1],s[2],s[3],s[4],s[5]);break;case Rn.QUAD_TO:e&&e.quadraticCurveTo(s[0],s[1],s[2],s[3]);break;case Rn.ARC:{var[o,l,u,f,h,g,m,p]=s,b=u>f?u:f,B=u>f?1:u/f,_=u>f?f/u:1;e&&(e.translate(o,l),e.rotate(m),e.scale(B,_),e.arc(0,0,b,h,h+g,!!(1-p)),e.scale(1/B,1/_),e.rotate(-m),e.translate(-o,-l));break}case Rn.CLOSE_PATH:e&&e.closePath();break}})}renderChildren(e){this.setTextData(e),e.save();var t=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:i}=this,s=e.fillStyle;t==="underline"&&e.beginPath(),i.forEach((o,l)=>{var{p0:u,p1:f,rotation:h,text:g}=o;e.save(),e.translate(u.x,u.y),e.rotate(h),e.fillStyle&&e.fillText(g,0,0),e.strokeStyle&&e.strokeText(g,0,0),e.restore(),t==="underline"&&(l===0&&e.moveTo(u.x,u.y+n/8),e.lineTo(f.x,f.y+n/5))}),t==="underline"&&(e.lineWidth=n/20,e.strokeStyle=s,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return this.letterSpacingCache[e]||0}findSegmentToFitChar(e,t,n,i,s,o,l,u,f){var h=o,g=this.measureText(e,u);u===" "&&t==="justify"&&n-1&&(h+=this.getLetterSpacingAt(f));var m=this.textHeight/20,p=this.getEquidistantPointOnPath(h,m,0),b=this.getEquidistantPointOnPath(h+g,m,0),B={p0:p,p1:b},_=p&&b?Math.atan2(b.y-p.y,b.x-p.x):0;if(l){var y=Math.cos(Math.PI/2+_)*l,M=Math.cos(-_)*l;B.p0=Jm(Jm({},p),{},{x:p.x+y,y:p.y+M}),B.p1=Jm(Jm({},b),{},{x:b.x+y,y:b.y+M})}return h+=g,{offset:h,segment:B,rotation:_}}measureText(e,t){var{measuresCache:n}=this,i=t||this.getText();if(n.has(i))return n.get(i);var s=this.measureTargetText(e,i);return n.set(i,s),s}setTextData(e){if(!this.glyphInfo){var t=this.getText(),n=t.split(""),i=t.split(" ").length-1,s=this.parent.getAttribute("dx").split().map(T=>T.getPixels("x")),o=this.parent.getAttribute("dy").getPixels("y"),l=this.parent.getStyle("text-anchor").getString("start"),u=this.getStyle("letter-spacing"),f=this.parent.getStyle("letter-spacing"),h=0;!u.hasValue()||u.getValue()==="inherit"?h=f.getPixels():u.hasValue()&&u.getValue()!=="initial"&&u.getValue()!=="unset"&&(h=u.getPixels());var g=[],m=t.length;this.letterSpacingCache=g;for(var p=0;pD===0?0:T+I||0,0),B=this.measureText(e),_=Math.max(B+b,0);this.textWidth=B,this.textHeight=this.getFontSize(),this.glyphInfo=[];var y=this.getPathLength(),M=this.getStyle("startOffset").getNumber(0)*y,L=0;(l==="middle"||l==="center")&&(L=-_/2),(l==="end"||l==="right")&&(L=-_),L+=M,n.forEach((T,I)=>{var{offset:D,segment:Q,rotation:E}=this.findSegmentToFitChar(e,l,_,y,i,L,o,T,I);L=D,!(!Q.p0||!Q.p1)&&this.glyphInfo.push({text:n[I],p0:Q.p0,p1:Q.p1,rotation:E})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];var t=[],{pathParser:n}=e;for(n.reset();!n.isEnd();){var{current:i}=n,s=i?i.x:0,o=i?i.y:0,l=n.next(),u=l.type,f=[];switch(l.type){case Rn.MOVE_TO:this.pathM(n,f);break;case Rn.LINE_TO:u=this.pathL(n,f);break;case Rn.HORIZ_LINE_TO:u=this.pathH(n,f);break;case Rn.VERT_LINE_TO:u=this.pathV(n,f);break;case Rn.CURVE_TO:this.pathC(n,f);break;case Rn.SMOOTH_CURVE_TO:u=this.pathS(n,f);break;case Rn.QUAD_TO:this.pathQ(n,f);break;case Rn.SMOOTH_QUAD_TO:u=this.pathT(n,f);break;case Rn.ARC:f=this.pathA(n);break;case Rn.CLOSE_PATH:Mr.pathZ(n);break}l.type!==Rn.CLOSE_PATH?t.push({type:u,points:f,start:{x:s,y:o},pathLength:this.calcLength(s,o,u,f)}):t.push({type:Rn.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:n,y:i}=Mr.pathM(e).point;t.push(n,i)}pathL(e,t){var{x:n,y:i}=Mr.pathL(e).point;return t.push(n,i),Rn.LINE_TO}pathH(e,t){var{x:n,y:i}=Mr.pathH(e).point;return t.push(n,i),Rn.LINE_TO}pathV(e,t){var{x:n,y:i}=Mr.pathV(e).point;return t.push(n,i),Rn.LINE_TO}pathC(e,t){var{point:n,controlPoint:i,currentPoint:s}=Mr.pathC(e);t.push(n.x,n.y,i.x,i.y,s.x,s.y)}pathS(e,t){var{point:n,controlPoint:i,currentPoint:s}=Mr.pathS(e);return t.push(n.x,n.y,i.x,i.y,s.x,s.y),Rn.CURVE_TO}pathQ(e,t){var{controlPoint:n,currentPoint:i}=Mr.pathQ(e);t.push(n.x,n.y,i.x,i.y)}pathT(e,t){var{controlPoint:n,currentPoint:i}=Mr.pathT(e);return t.push(n.x,n.y,i.x,i.y),Rn.QUAD_TO}pathA(e){var{rX:t,rY:n,sweepFlag:i,xAxisRotation:s,centp:o,a1:l,ad:u}=Mr.pathA(e);return i===0&&u>0&&(u-=2*Math.PI),i===1&&u<0&&(u+=2*Math.PI),[o.x,o.y,t,n,l,u,s,i]}calcLength(e,t,n,i){var s=0,o=null,l=null,u=0;switch(n){case Rn.LINE_TO:return this.getLineLength(e,t,i[0],i[1]);case Rn.CURVE_TO:for(s=0,o=this.getPointOnCubicBezier(0,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),u=.01;u<=1;u+=.01)l=this.getPointOnCubicBezier(u,e,t,i[0],i[1],i[2],i[3],i[4],i[5]),s+=this.getLineLength(o.x,o.y,l.x,l.y),o=l;return s;case Rn.QUAD_TO:for(s=0,o=this.getPointOnQuadraticBezier(0,e,t,i[0],i[1],i[2],i[3]),u=.01;u<=1;u+=.01)l=this.getPointOnQuadraticBezier(u,e,t,i[0],i[1],i[2],i[3]),s+=this.getLineLength(o.x,o.y,l.x,l.y),o=l;return s;case Rn.ARC:{s=0;var f=i[4],h=i[5],g=i[4]+h,m=Math.PI/180;if(Math.abs(f-g)g;u-=m)l=this.getPointOnEllipticalArc(i[0],i[1],i[2],i[3],u,0),s+=this.getLineLength(o.x,o.y,l.x,l.y),o=l;else for(u=f+m;u5&&arguments[5]!==void 0?arguments[5]:t,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:n,u=(s-n)/(i-t+tf),f=Math.sqrt(e*e/(1+u*u));it)return null;var{dataArray:s}=this;for(var o of s){if(o&&(o.pathLength<5e-5||n+o.pathLength+5e-5=0&&u>g)break;i=this.getPointOnEllipticalArc(o.points[0],o.points[1],o.points[2],o.points[3],u,o.points[6]);break}case Rn.CURVE_TO:u=l/o.pathLength,u>1&&(u=1),i=this.getPointOnCubicBezier(u,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3],o.points[4],o.points[5]);break;case Rn.QUAD_TO:u=l/o.pathLength,u>1&&(u=1),i=this.getPointOnQuadraticBezier(u,o.start.x,o.start.y,o.points[0],o.points[1],o.points[2],o.points[3]);break}if(i)return i;break}return null}getLineLength(e,t,n,i){return Math.sqrt((n-e)*(n-e)+(i-t)*(i-t))}getPathLength(){return this.pathLength===-1&&(this.pathLength=this.dataArray.reduce((e,t)=>t.pathLength>0?e+t.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,t,n,i,s,o,l,u,f){var h=u*k_(e)+o*z_(e)+i*G_(e)+t*V_(e),g=f*k_(e)+l*z_(e)+s*G_(e)+n*V_(e);return{x:h,y:g}}getPointOnQuadraticBezier(e,t,n,i,s,o,l){var u=o*K_(e)+i*q_(e)+t*j_(e),f=l*K_(e)+s*q_(e)+n*j_(e);return{x:u,y:f}}getPointOnEllipticalArc(e,t,n,i,s,o){var l=Math.cos(o),u=Math.sin(o),f={x:n*Math.cos(s),y:i*Math.sin(s)};return{x:e+(f.x*l-f.y*u),y:t+(f.x*u+f.y*l)}}buildEquidistantCache(e,t){var n=this.getPathLength(),i=t||.25,s=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==s||this.equidistantCache.precision!==i){this.equidistantCache={step:s,precision:i,points:[]};for(var o=0,l=0;l<=n;l+=i){var u=this.getPointOnPath(l),f=this.getPointOnPath(l+i);!u||!f||(o+=this.getLineLength(u.x,u.y,f.x,f.y),o>=s&&(this.equidistantCache.points.push({x:u.x,y:u.y,distance:l}),o-=s))}}}getEquidistantPointOnPath(e,t,n){if(this.buildEquidistantCache(t,n),e<0||e-this.getPathLength()>5e-5)return null;var i=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[i]||null}}var w$=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class UD extends fc{constructor(e,t,n){super(e,t,n),this.type="image",this.loaded=!1;var i=this.getHrefAttribute().getString();if(i){var s=i.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(i);e.images.push(this),s?this.loadSvg(i):this.loadImage(i),this.isSvg=s}}loadImage(e){var t=this;return iu(function*(){try{var n=yield t.document.createImage(e);t.image=n}catch(i){console.error('Error while loading image "'.concat(e,'":'),i)}t.loaded=!0})()}loadSvg(e){var t=this;return iu(function*(){var n=w$.exec(e);if(n){var i=n[5];n[4]==="base64"?t.image=atob(i):t.image=decodeURIComponent(i)}else try{var s=yield t.document.fetch(e),o=yield s.text();t.image=o}catch(l){console.error('Error while loading image "'.concat(e,'":'),l)}t.loaded=!0})()}renderChildren(e){var{document:t,image:n,loaded:i}=this,s=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),l=this.getStyle("width").getPixels("x"),u=this.getStyle("height").getPixels("y");if(!(!i||!n||!l||!u)){if(e.save(),e.translate(s,o),this.isSvg){var f=t.canvg.forkString(e,this.image,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:l,scaleHeight:u});f.document.documentElement.parent=this,f.render()}else{var h=this.image;t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:l,desiredWidth:h.width,height:u,desiredHeight:h.height}),this.loaded&&(typeof h.complete>"u"||h.complete)&&e.drawImage(h,0,0)}e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),i=this.getStyle("height").getPixels("y");return new MA(e,t,e+n,t+i)}}class FD extends fc{constructor(){super(...arguments),this.type="symbol"}render(e){}}class LD{constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}load(e,t){var n=this;return iu(function*(){try{var{document:i}=n,s=yield i.canvg.parser.load(t),o=s.getElementsByTagName("font");Array.from(o).forEach(l=>{var u=i.createElement(l);i.definitions[e]=u})}catch(l){console.error('Error while loading font "'.concat(t,'":'),l)}n.loaded=!0})()}}class ZB extends $r{constructor(e,t,n){super(e,t,n),this.type="style";var i=pf(Array.from(t.childNodes).map(o=>o.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")),s=i.split("}");s.forEach(o=>{var l=o.trim();if(l){var u=l.split("{"),f=u[0].split(","),h=u[1].split(";");f.forEach(g=>{var m=g.trim();if(m){var p=e.styles[m]||{};if(h.forEach(_=>{var y=_.indexOf(":"),M=_.substr(0,y).trim(),L=_.substr(y+1,_.length-y).trim();M&&L&&(p[M]=new un(e,M,L))}),e.styles[m]=p,e.stylesSpecificity[m]=tD(m),m==="@font-face"){var b=p["font-family"].getString().replace(/"|'/g,""),B=p.src.getString().split(",");B.forEach(_=>{if(_.indexOf('format("svg")')>0){var y=VB(_);y&&new LD(e).load(b,y)}})}}})}})}}ZB.parseExternalUrl=VB;class RD extends fc{constructor(){super(...arguments),this.type="use"}setContext(e){super.setContext(e);var t=this.getAttribute("x"),n=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}path(e){var{element:t}=this;t&&t.path(e)}renderChildren(e){var{document:t,element:n}=this;if(n){var i=n;if(n.type==="symbol"&&(i=new Jh(t,null),i.attributes.viewBox=new un(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new un(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new un(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new un(t,"opacity",this.calculateOpacity())),i.type==="svg"){var s=this.getStyle("width",!1,!0),o=this.getStyle("height",!1,!0);s.hasValue()&&(i.attributes.width=new un(t,"width",s.getString())),o.hasValue()&&(i.attributes.height=new un(t,"height",o.getString()))}var l=i.parent;i.parent=this,i.render(e),i.parent=l}}getBoundingBox(e){var{element:t}=this;return t?t.getBoundingBox(e):null}elementTransform(){var{document:e,element:t}=this;return oc.fromElement(e,t)}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}}function $m(r,e,t,n,i,s){return r[t*n*4+e*4+s]}function e0(r,e,t,n,i,s,o){r[t*n*4+e*4+s]=o}function ea(r,e,t){var n=r[e];return n*t}function Wl(r,e,t,n){return e+Math.cos(r)*t+Math.sin(r)*n}class JB extends $r{constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";var i=Ks(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{var s=i[0];i=[.213+.787*s,.715-.715*s,.072-.072*s,0,0,.213-.213*s,.715+.285*s,.072-.072*s,0,0,.213-.213*s,.715-.715*s,.072+.928*s,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{var o=i[0]*Math.PI/180;i=[Wl(o,.213,.787,-.213),Wl(o,.715,-.715,-.715),Wl(o,.072,-.072,.928),0,0,Wl(o,.213,-.213,.143),Wl(o,.715,.285,.14),Wl(o,.072,-.072,-.283),0,0,Wl(o,.213,-.213,-.787),Wl(o,.715,-.715,.715),Wl(o,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1];break}this.matrix=i,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}apply(e,t,n,i,s){for(var{includeOpacity:o,matrix:l}=this,u=e.getImageData(0,0,i,s),f=0;f{u.addBoundingBox(b.getBoundingBox(e))}),i=Math.floor(u.x1),s=Math.floor(u.y1),o=Math.floor(u.width),l=Math.floor(u.height)}var f=this.removeStyles(t,Xp.ignoreStyles),h=n.createCanvas(i+o,s+l),g=h.getContext("2d");n.screen.setDefaults(g),this.renderChildren(g),new JB(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(g,0,0,i+o,s+l);var m=n.createCanvas(i+o,s+l),p=m.getContext("2d");n.screen.setDefaults(p),t.render(p),p.globalCompositeOperation="destination-in",p.fillStyle=g.createPattern(h,"no-repeat"),p.fillRect(0,0,i+o,s+l),e.fillStyle=p.createPattern(m,"no-repeat"),e.fillRect(0,0,i+o,s+l),this.restoreStyles(t,f)}render(e){}}Xp.ignoreStyles=["mask","transform","clip-path"];var $F=()=>{};class ND extends $r{constructor(){super(...arguments),this.type="clipPath"}apply(e){var{document:t}=this,n=Reflect.getPrototypeOf(e),{beginPath:i,closePath:s}=e;n&&(n.beginPath=$F,n.closePath=$F),Reflect.apply(i,e,[]),this.children.forEach(o=>{if(!(typeof o.path>"u")){var l=typeof o.elementTransform<"u"?o.elementTransform():null;l||(l=oc.fromElement(t,o)),l&&l.apply(e),o.path(e),n&&(n.closePath=s),l&&l.unapply(e)}}),Reflect.apply(s,e,[]),e.clip(),n&&(n.beginPath=i,n.closePath=s)}render(e){}}class Yp extends $r{constructor(){super(...arguments),this.type="filter"}apply(e,t){var{document:n,children:i}=this,s=t.getBoundingBox(e);if(s){var o=0,l=0;i.forEach(y=>{var M=y.extraFilterDistance||0;o=Math.max(o,M),l=Math.max(l,M)});var u=Math.floor(s.width),f=Math.floor(s.height),h=u+2*o,g=f+2*l;if(!(h<1||g<1)){var m=Math.floor(s.x),p=Math.floor(s.y),b=this.removeStyles(t,Yp.ignoreStyles),B=n.createCanvas(h,g),_=B.getContext("2d");n.screen.setDefaults(_),_.translate(-m+o,-p+l),t.render(_),i.forEach(y=>{typeof y.apply=="function"&&y.apply(_,0,0,h,g)}),e.drawImage(B,0,0,h,g,m-o,p-l,h,g),this.restoreStyles(t,b)}}}render(e){}}Yp.ignoreStyles=["filter","transform","clip-path"];class ID extends $r{constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}apply(e,t,n,i,s){}}class DD extends $r{constructor(){super(...arguments),this.type="feMorphology"}apply(e,t,n,i,s){}}class OD extends $r{constructor(){super(...arguments),this.type="feComposite"}apply(e,t,n,i,s){}}class PD extends $r{constructor(e,t,n){super(e,t,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}apply(e,t,n,i,s){var{document:o,blurRadius:l}=this,u=o.window?o.window.document.body:null,f=e.canvas;f.id=o.getUniqueId(),u&&(f.style.display="none",u.appendChild(f)),JJ(f,t,n,i,s,l),u&&u.removeChild(f)}}class QD extends $r{constructor(){super(...arguments),this.type="title"}}class HD extends $r{constructor(){super(...arguments),this.type="desc"}}var b$={svg:Jh,rect:WB,circle:fD,ellipse:hD,line:dD,polyline:XB,polygon:pD,path:Mr,pattern:gD,marker:mD,defs:vD,linearGradient:yD,radialGradient:wD,stop:bD,animate:Ev,animateColor:xD,animateTransform:_D,font:BD,"font-face":SD,"missing-glyph":ED,glyph:jB,text:au,tspan:Wp,tref:CD,a:TD,textPath:MD,image:UD,g:Sv,symbol:FD,style:ZB,use:RD,mask:Xp,clipPath:ND,filter:Yp,feDropShadow:ID,feMorphology:DD,feComposite:OD,feColorMatrix:JB,feGaussianBlur:PD,title:QD,desc:HD};function eL(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function x$(r){for(var e=1;e1&&arguments[1]!==void 0?arguments[1]:!1,t=document.createElement("img");return e&&(t.crossOrigin="Anonymous"),new Promise((n,i)=>{t.onload=()=>{n(t)},t.onerror=(s,o,l,u,f)=>{i(f)},t.src=r})}),W_.apply(this,arguments)}class eu{constructor(e){var{rootEmSize:t=12,emSize:n=12,createCanvas:i=eu.createCanvas,createImage:s=eu.createImage,anonymousCrossOrigin:o}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.canvg=e,this.definitions=Object.create(null),this.styles=Object.create(null),this.stylesSpecificity=Object.create(null),this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=t,this.emSize=n,this.createCanvas=i,this.createImage=this.bindCreateImage(s,o),this.screen.wait(this.isImagesLoaded.bind(this)),this.screen.wait(this.isFontsLoaded.bind(this))}bindCreateImage(e,t){return typeof t=="boolean"?(n,i)=>e(n,typeof i=="boolean"?i:t):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var{emSizeStack:e}=this;return e[e.length-1]}set emSize(e){var{emSizeStack:t}=this;t.push(e)}popEmSize(){var{emSizeStack:e}=this;e.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){var t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t,t}createElement(e){var t=e.nodeName.replace(/^[^:]+:/,""),n=eu.elementTypes[t];return typeof n<"u"?new n(this,e):new cD(this,e)}createTextNode(e){return new y$(this,e)}setViewBox(e){this.screen.setViewBox(x$({document:this},e))}}eu.createCanvas=_$;eu.createImage=B$;eu.elementTypes=b$;function tL(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function kc(r){for(var e=1;e2&&arguments[2]!==void 0?arguments[2]:{};this.parser=new v0(n),this.screen=new jp(e,n),this.options=n;var i=new eu(this,n),s=i.createDocumentElement(t);this.document=i,this.documentElement=s}static from(e,t){var n=arguments;return iu(function*(){var i=n.length>2&&n[2]!==void 0?n[2]:{},s=new v0(i),o=yield s.parse(t);return new Zc(e,o,i)})()}static fromString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=new v0(n),s=i.parseFromString(t);return new Zc(e,s,n)}fork(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Zc.from(e,t,kc(kc({},this.options),n))}forkString(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Zc.fromString(e,t,kc(kc({},this.options),n))}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}render(){var e=arguments,t=this;return iu(function*(){var n=e.length>0&&e[0]!==void 0?e[0]:{};t.start(kc({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0},n)),yield t.ready(),t.stop()})()}start(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{documentElement:t,screen:n,options:i}=this;n.start(t,kc(kc({enableRedraw:!0},i),e))}stop(){this.screen.stop()}resize(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.documentElement.resize(e,t,n)}}const S$=Object.freeze(Object.defineProperty({__proto__:null,AElement:TD,AnimateColorElement:xD,AnimateElement:Ev,AnimateTransformElement:_D,BoundingBox:MA,CB1:k_,CB2:z_,CB3:G_,CB4:V_,Canvg:Zc,CircleElement:fD,ClipPathElement:ND,DefsElement:vD,DescElement:HD,Document:eu,Element:$r,EllipseElement:hD,FeColorMatrixElement:JB,FeCompositeElement:OD,FeDropShadowElement:ID,FeGaussianBlurElement:PD,FeMorphologyElement:DD,FilterElement:Yp,Font:us,FontElement:BD,FontFaceElement:SD,GElement:Sv,GlyphElement:jB,GradientElement:YB,ImageElement:UD,LineElement:dD,LinearGradientElement:yD,MarkerElement:mD,MaskElement:Xp,Matrix:KB,MissingGlyphElement:ED,Mouse:rD,PSEUDO_ZERO:tf,Parser:v0,PathElement:Mr,PathParser:Rn,PatternElement:gD,Point:Li,PolygonElement:pD,PolylineElement:XB,Property:un,QB1:K_,QB2:q_,QB3:j_,RadialGradientElement:wD,RectElement:WB,RenderedElement:fc,Rotate:AD,SVGElement:Jh,SVGFontLoader:LD,Scale:oD,Screen:jp,Skew:qB,SkewX:lD,SkewY:uD,StopElement:bD,StyleElement:ZB,SymbolElement:FD,TRefElement:CD,TSpanElement:Wp,TextElement:au,TextPathElement:MD,TitleElement:QD,Transform:oc,Translate:sD,UnknownElement:cD,UseElement:RD,ViewPort:nD,compressSpaces:pf,default:Zc,getSelectorSpecificity:tD,normalizeAttributeName:$I,normalizeColor:eD,parseExternalUrl:VB,presets:n$,toNumbers:Ks,trimLeft:ZI,trimRight:JI,vectorMagnitude:Q_,vectorsAngle:H_,vectorsRatio:G0},Symbol.toStringTag,{value:"Module"}));