ablok-components 0.1.108 → 0.1.110
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -28362,9 +28362,9 @@ const a3 = /* @__PURE__ */ GA({
|
|
|
28362
28362
|
const A = t, e = xA(!1), n = VA(() => encodeURIComponent(A.url));
|
|
28363
28363
|
VA(() => encodeURIComponent(A.media));
|
|
28364
28364
|
const r = VA(() => TG(A.text)), i = VA(() => !!(navigator && navigator.userAgent && /Mobi|Android/i.test(navigator.userAgent)));
|
|
28365
|
-
function s() {
|
|
28365
|
+
async function s() {
|
|
28366
28366
|
const a = document.createElement("textarea");
|
|
28367
|
-
document.body.appendChild(a), a.value = A.url, a.select(),
|
|
28367
|
+
document.body.appendChild(a), a.value = A.url, a.select(), a.setSelectionRange(0, 99999), navigator.clipboard.writeText(a.value), document.body.removeChild(a);
|
|
28368
28368
|
}
|
|
28369
28369
|
return (a, u) => {
|
|
28370
28370
|
const c = Qt("svg-icon");
|
|
@@ -28406,10 +28406,9 @@ const a3 = /* @__PURE__ */ GA({
|
|
|
28406
28406
|
])) : oe("", !0),
|
|
28407
28407
|
t.services.instagram ? (q(), AA("div", dG, [
|
|
28408
28408
|
N("button", {
|
|
28409
|
+
type: "button",
|
|
28409
28410
|
class: "link-sharing__link btn btn-primary",
|
|
28410
|
-
onClick: u[0] || (u[0] = pr((f) => e.value = !e.value, ["prevent"]))
|
|
28411
|
-
target: "_blank",
|
|
28412
|
-
rel: "noopener"
|
|
28411
|
+
onClick: u[0] || (u[0] = pr((f) => e.value = !e.value, ["prevent"]))
|
|
28413
28412
|
}, [
|
|
28414
28413
|
zA(c, { symbol: "instagram" }),
|
|
28415
28414
|
N("span", hG, Qe(a.$t("sharing.instagram")), 1)
|
|
@@ -28439,10 +28438,9 @@ const a3 = /* @__PURE__ */ GA({
|
|
|
28439
28438
|
])) : oe("", !0),
|
|
28440
28439
|
t.services.clipboard ? (q(), AA("div", yG, [
|
|
28441
28440
|
N("button", {
|
|
28441
|
+
type: "button",
|
|
28442
28442
|
class: "link-sharing__link btn btn-primary",
|
|
28443
|
-
onClick: pr(s, ["prevent", "stop"])
|
|
28444
|
-
target: "_blank",
|
|
28445
|
-
rel: "noopener"
|
|
28443
|
+
onClick: pr(s, ["prevent", "stop"])
|
|
28446
28444
|
}, [
|
|
28447
28445
|
zA(c, { symbol: "copy" }),
|
|
28448
28446
|
N("span", vG, Qe(a.$t("sharing.clipboard")), 1)
|
|
@@ -28572,7 +28570,7 @@ const xG = { class: "modal-dialog__content" }, OG = { class: "modal-dialog__head
|
|
|
28572
28570
|
B && B.nodeName === "DIALOG" && a();
|
|
28573
28571
|
}
|
|
28574
28572
|
return En(() => n.modelValue, (p, B) => {
|
|
28575
|
-
p ? s() : a();
|
|
28573
|
+
p && p !== B ? s() : B && a();
|
|
28576
28574
|
}, { immediate: !0 }), Ri(() => {
|
|
28577
28575
|
var p;
|
|
28578
28576
|
(p = i.value) == null || p.addEventListener("cancel", (B) => {
|
|
@@ -177,4 +177,4 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
177
177
|
content: "" !important;
|
|
178
178
|
display: none !important;
|
|
179
179
|
}`,gN=function(t){BN(t,"."+kf+hN+dC+`
|
|
180
|
-
.`+Rf+pN+dC)},BN=function(t,A){var e=t.ownerDocument;if(e){var n=e.createElement("style");n.textContent=A,t.appendChild(n)}},hC=function(){function t(){}return t.getOrigin=function(A){var e=t._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t._origin="about:blank",t}(),mN=function(){function t(A,e){this.context=A,this._options=e,this._cache={}}return t.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Pf(A)||EN(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},t.prototype.match=function(A){return this._cache[A]},t.prototype.loadImage=function(A){return lt(this,void 0,void 0,function(){var e,n,r,i,s=this;return Ze(this,function(a){switch(a.label){case 0:return e=hC.isSameOrigin(A),n=!Kf(A)&&this._options.useCORS===!0&&ke.SUPPORT_CORS_IMAGES&&!e,r=!Kf(A)&&!e&&!Pf(A)&&typeof this._options.proxy=="string"&&ke.SUPPORT_CORS_XHR&&!n,!e&&this._options.allowTaint===!1&&!Kf(A)&&!Pf(A)&&!r&&!n?[2]:(i=A,r?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(c,u){var f=new Image;f.onload=function(){return c(f)},f.onerror=u,(QN(i)||n)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return c(f)},500),s._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(A){return typeof this._cache[A]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(A){var e=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(i,s){var a=ke.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(a==="text")i(c.response);else{var h=new FileReader;h.addEventListener("load",function(){return i(h.result)},!1),h.addEventListener("error",function(g){return s(g)},!1),h.readAsDataURL(c.response)}else s("Failed to proxy resource "+r+" with status code "+c.status)},c.onerror=s;var u=n.indexOf("?")>-1?"&":"?";if(c.open("GET",""+n+u+"url="+encodeURIComponent(A)+"&responseType="+a),a!=="text"&&c instanceof XMLHttpRequest&&(c.responseType=a),e._options.imageTimeout){var f=e._options.imageTimeout;c.timeout=f,c.ontimeout=function(){return s("Timed out ("+f+"ms) proxying "+r)}}c.send()})},t}(),wN=/^data:image\/svg\+xml/i,CN=/^data:image\/.*;base64,/i,yN=/^data:image\/.*/i,EN=function(t){return ke.SUPPORT_SVG_DRAWING||!FN(t)},Kf=function(t){return yN.test(t)},QN=function(t){return CN.test(t)},Pf=function(t){return t.substr(0,4)==="blob"},FN=function(t){return t.substr(-3).toLowerCase()==="svg"||wN.test(t)},Z=function(){function t(A,e){this.type=0,this.x=A,this.y=e}return t.prototype.add=function(A,e){return new t(this.x+A,this.y+e)},t}(),es=function(t,A,e){return new Z(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},ul=function(){function t(A,e,n,r){this.type=1,this.start=A,this.startControl=e,this.endControl=n,this.end=r}return t.prototype.subdivide=function(A,e){var n=es(this.start,this.startControl,A),r=es(this.startControl,this.endControl,A),i=es(this.endControl,this.end,A),s=es(n,r,A),a=es(r,i,A),c=es(s,a,A);return e?new t(this.start,n,s,c):new t(c,a,i,this.end)},t.prototype.add=function(A,e){return new t(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),$t=function(t){return t.type===1},UN=function(){function t(A){var e=A.styles,n=A.bounds,r=ao(e.borderTopLeftRadius,n.width,n.height),i=r[0],s=r[1],a=ao(e.borderTopRightRadius,n.width,n.height),c=a[0],u=a[1],f=ao(e.borderBottomRightRadius,n.width,n.height),h=f[0],g=f[1],m=ao(e.borderBottomLeftRadius,n.width,n.height),w=m[0],U=m[1],b=[];b.push((i+c)/n.width),b.push((w+h)/n.width),b.push((s+U)/n.height),b.push((u+g)/n.height);var E=Math.max.apply(Math,b);E>1&&(i/=E,s/=E,c/=E,u/=E,h/=E,g/=E,w/=E,U/=E);var I=n.width-c,M=n.height-g,Q=n.width-h,N=n.height-U,T=e.borderTopWidth,H=e.borderRightWidth,Y=e.borderBottomWidth,V=e.borderLeftWidth,sA=ee(e.paddingTop,A.bounds.width),yA=ee(e.paddingRight,A.bounds.width),dA=ee(e.paddingBottom,A.bounds.width),lA=ee(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?oe(n.left+V/3,n.top+T/3,i-V/3,s-T/3,$A.TOP_LEFT):new Z(n.left+V/3,n.top+T/3),this.topRightBorderDoubleOuterBox=i>0||s>0?oe(n.left+I,n.top+T/3,c-H/3,u-T/3,$A.TOP_RIGHT):new Z(n.left+n.width-H/3,n.top+T/3),this.bottomRightBorderDoubleOuterBox=h>0||g>0?oe(n.left+Q,n.top+M,h-H/3,g-Y/3,$A.BOTTOM_RIGHT):new Z(n.left+n.width-H/3,n.top+n.height-Y/3),this.bottomLeftBorderDoubleOuterBox=w>0||U>0?oe(n.left+V/3,n.top+N,w-V/3,U-Y/3,$A.BOTTOM_LEFT):new Z(n.left+V/3,n.top+n.height-Y/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?oe(n.left+V*2/3,n.top+T*2/3,i-V*2/3,s-T*2/3,$A.TOP_LEFT):new Z(n.left+V*2/3,n.top+T*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?oe(n.left+I,n.top+T*2/3,c-H*2/3,u-T*2/3,$A.TOP_RIGHT):new Z(n.left+n.width-H*2/3,n.top+T*2/3),this.bottomRightBorderDoubleInnerBox=h>0||g>0?oe(n.left+Q,n.top+M,h-H*2/3,g-Y*2/3,$A.BOTTOM_RIGHT):new Z(n.left+n.width-H*2/3,n.top+n.height-Y*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||U>0?oe(n.left+V*2/3,n.top+N,w-V*2/3,U-Y*2/3,$A.BOTTOM_LEFT):new Z(n.left+V*2/3,n.top+n.height-Y*2/3),this.topLeftBorderStroke=i>0||s>0?oe(n.left+V/2,n.top+T/2,i-V/2,s-T/2,$A.TOP_LEFT):new Z(n.left+V/2,n.top+T/2),this.topRightBorderStroke=i>0||s>0?oe(n.left+I,n.top+T/2,c-H/2,u-T/2,$A.TOP_RIGHT):new Z(n.left+n.width-H/2,n.top+T/2),this.bottomRightBorderStroke=h>0||g>0?oe(n.left+Q,n.top+M,h-H/2,g-Y/2,$A.BOTTOM_RIGHT):new Z(n.left+n.width-H/2,n.top+n.height-Y/2),this.bottomLeftBorderStroke=w>0||U>0?oe(n.left+V/2,n.top+N,w-V/2,U-Y/2,$A.BOTTOM_LEFT):new Z(n.left+V/2,n.top+n.height-Y/2),this.topLeftBorderBox=i>0||s>0?oe(n.left,n.top,i,s,$A.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=c>0||u>0?oe(n.left+I,n.top,c,u,$A.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||g>0?oe(n.left+Q,n.top+M,h,g,$A.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=w>0||U>0?oe(n.left,n.top+N,w,U,$A.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||s>0?oe(n.left+V,n.top+T,Math.max(0,i-V),Math.max(0,s-T),$A.TOP_LEFT):new Z(n.left+V,n.top+T),this.topRightPaddingBox=c>0||u>0?oe(n.left+Math.min(I,n.width-H),n.top+T,I>n.width+H?0:Math.max(0,c-H),Math.max(0,u-T),$A.TOP_RIGHT):new Z(n.left+n.width-H,n.top+T),this.bottomRightPaddingBox=h>0||g>0?oe(n.left+Math.min(Q,n.width-V),n.top+Math.min(M,n.height-Y),Math.max(0,h-H),Math.max(0,g-Y),$A.BOTTOM_RIGHT):new Z(n.left+n.width-H,n.top+n.height-Y),this.bottomLeftPaddingBox=w>0||U>0?oe(n.left+V,n.top+Math.min(N,n.height-Y),Math.max(0,w-V),Math.max(0,U-Y),$A.BOTTOM_LEFT):new Z(n.left+V,n.top+n.height-Y),this.topLeftContentBox=i>0||s>0?oe(n.left+V+lA,n.top+T+sA,Math.max(0,i-(V+lA)),Math.max(0,s-(T+sA)),$A.TOP_LEFT):new Z(n.left+V+lA,n.top+T+sA),this.topRightContentBox=c>0||u>0?oe(n.left+Math.min(I,n.width+V+lA),n.top+T+sA,I>n.width+V+lA?0:c-V+lA,u-(T+sA),$A.TOP_RIGHT):new Z(n.left+n.width-(H+yA),n.top+T+sA),this.bottomRightContentBox=h>0||g>0?oe(n.left+Math.min(Q,n.width-(V+lA)),n.top+Math.min(M,n.height+T+sA),Math.max(0,h-(H+yA)),g-(Y+dA),$A.BOTTOM_RIGHT):new Z(n.left+n.width-(H+yA),n.top+n.height-(Y+dA)),this.bottomLeftContentBox=w>0||U>0?oe(n.left+V+lA,n.top+N,Math.max(0,w-(V+lA)),U-(Y+dA),$A.BOTTOM_LEFT):new Z(n.left+V+lA,n.top+n.height-(Y+dA))}return t}(),$A;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})($A||($A={}));var oe=function(t,A,e,n,r){var i=4*((Math.sqrt(2)-1)/3),s=e*i,a=n*i,c=t+e,u=A+n;switch(r){case $A.TOP_LEFT:return new ul(new Z(t,u),new Z(t,u-a),new Z(c-s,A),new Z(c,A));case $A.TOP_RIGHT:return new ul(new Z(t,A),new Z(t+s,A),new Z(c,u-a),new Z(c,u));case $A.BOTTOM_RIGHT:return new ul(new Z(c,A),new Z(c,A+a),new Z(t+s,u),new Z(t,u));case $A.BOTTOM_LEFT:default:return new ul(new Z(c,u),new Z(c-s,u),new Z(t,A+a),new Z(t,A))}},fl=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},bN=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},dl=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},vN=function(){function t(A,e,n){this.offsetX=A,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),hl=function(){function t(A,e){this.path=A,this.target=e,this.type=1}return t}(),IN=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),SN=function(t){return t.type===0},pC=function(t){return t.type===1},TN=function(t){return t.type===2},gC=function(t,A){return t.length===A.length?t.some(function(e,n){return e===A[n]}):!1},_N=function(t,A,e,n,r){return t.map(function(i,s){switch(s){case 0:return i.add(A,e);case 1:return i.add(A+n,e);case 2:return i.add(A+n,e+r);case 3:return i.add(A,e+r)}return i})},BC=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),mC=function(){function t(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new UN(this.container),this.container.styles.opacity<1&&this.effects.push(new IN(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new vN(n,r,i))}if(this.container.styles.overflowX!==0){var s=fl(this.curves),a=dl(this.curves);gC(s,a)?this.effects.push(new hl(s,6)):(this.effects.push(new hl(s,2)),this.effects.push(new hl(a,4)))}}return t.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(c){return!pC(c)});if(e||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),e=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var s=fl(n.curves),a=dl(n.curves);gC(s,a)||r.unshift(new hl(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(c){return Ue(c.target,A)})},t}(),Vf=function(t,A,e,n){t.container.elements.forEach(function(r){var i=Ue(r.flags,4),s=Ue(r.flags,2),a=new mC(r,t);Ue(r.styles.display,2048)&&n.push(a);var c=Ue(r.flags,8)?[]:n;if(i||s){var u=i||r.styles.isPositioned()?e:A,f=new BC(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var h=r.styles.zIndex.order;if(h<0){var g=0;u.negativeZIndex.some(function(w,U){return h>w.element.container.styles.zIndex.order?(g=U,!1):g>0}),u.negativeZIndex.splice(g,0,f)}else if(h>0){var m=0;u.positiveZIndex.some(function(w,U){return h>=w.element.container.styles.zIndex.order?(m=U+1,!1):m>0}),u.positiveZIndex.splice(m,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else r.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);Vf(a,f,i?f:e,c)}else r.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),Vf(a,A,e,c);Ue(r.flags,8)&&wC(r,c)})},wC=function(t,A){for(var e=t instanceof xf?t.start:1,n=t instanceof xf?t.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof Gw&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=po(e,i.container.styles.listStyleType,!0),e+=n?-1:1}},xN=function(t){var A=new mC(t,null),e=new BC(A),n=[];return Vf(A,e,e,n),wC(A.container,n),e},CC=function(t,A){switch(A){case 0:return Jt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Jt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Jt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Jt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},ON=function(t,A){switch(A){case 0:return Jt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Jt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Jt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Jt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},LN=function(t,A){switch(A){case 0:return Jt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Jt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Jt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Jt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},HN=function(t,A){switch(A){case 0:return pl(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return pl(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return pl(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return pl(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},pl=function(t,A){var e=[];return $t(t)?e.push(t.subdivide(.5,!1)):e.push(t),$t(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Jt=function(t,A,e,n){var r=[];return $t(t)?r.push(t.subdivide(.5,!1)):r.push(t),$t(e)?r.push(e.subdivide(.5,!0)):r.push(e),$t(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),$t(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},yC=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},gl=function(t){var A=t.styles,e=t.bounds,n=ee(A.paddingLeft,e.width),r=ee(A.paddingRight,e.width),i=ee(A.paddingTop,e.width),s=ee(A.paddingBottom,e.width);return e.add(n+A.borderLeftWidth,i+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+n+r),-(A.borderTopWidth+A.borderBottomWidth+i+s))},MN=function(t,A){return t===0?A.bounds:t===2?gl(A):yC(A)},NN=function(t,A){return t===0?A.bounds:t===2?gl(A):yC(A)},Gf=function(t,A,e){var n=MN(ns(t.styles.backgroundOrigin,A),t),r=NN(ns(t.styles.backgroundClip,A),t),i=DN(ns(t.styles.backgroundSize,A),e,n),s=i[0],a=i[1],c=ao(ns(t.styles.backgroundPosition,A),n.width-s,n.height-a),u=kN(ns(t.styles.backgroundRepeat,A),c,i,n,r),f=Math.round(n.left+c[0]),h=Math.round(n.top+c[1]);return[u,f,h,s,a]},ts=function(t){return ZA(t)&&t.value===qi.AUTO},Bl=function(t){return typeof t=="number"},DN=function(t,A,e){var n=A[0],r=A[1],i=A[2],s=t[0],a=t[1];if(!s)return[0,0];if(Ee(s)&&a&&Ee(a))return[ee(s,e.width),ee(a,e.height)];var c=Bl(i);if(ZA(s)&&(s.value===qi.CONTAIN||s.value===qi.COVER)){if(Bl(i)){var u=e.width/e.height;return u<i!=(s.value===qi.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var f=Bl(n),h=Bl(r),g=f||h;if(ts(s)&&(!a||ts(a))){if(f&&h)return[n,r];if(!c&&!g)return[e.width,e.height];if(g&&c){var m=f?n:r*i,w=h?r:n/i;return[m,w]}var U=f?n:e.width,b=h?r:e.height;return[U,b]}if(c){var E=0,I=0;return Ee(s)?E=ee(s,e.width):Ee(a)&&(I=ee(a,e.height)),ts(s)?E=I*i:(!a||ts(a))&&(I=E/i),[E,I]}var M=null,Q=null;if(Ee(s)?M=ee(s,e.width):a&&Ee(a)&&(Q=ee(a,e.height)),M!==null&&(!a||ts(a))&&(Q=f&&h?M/n*r:e.height),Q!==null&&ts(s)&&(M=f&&h?Q/r*n:e.width),M!==null&&Q!==null)return[M,Q];throw new Error("Unable to calculate background-size for element")},ns=function(t,A){var e=t[A];return typeof e>"u"?t[0]:e},kN=function(t,A,e,n,r){var i=A[0],s=A[1],a=e[0],c=e[1];switch(t){case 2:return[new Z(Math.round(n.left),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(c+n.top+s)),new Z(Math.round(n.left),Math.round(c+n.top+s))];case 3:return[new Z(Math.round(n.left+i),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.height+n.top)),new Z(Math.round(n.left+i),Math.round(n.height+n.top))];case 1:return[new Z(Math.round(n.left+i),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s+c)),new Z(Math.round(n.left+i),Math.round(n.top+s+c))];default:return[new Z(Math.round(r.left),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Z(Math.round(r.left),Math.round(r.height+r.top))]}},RN="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",EC="Hidden Text",KN=function(){function t(A){this._data={},this._document=A}return t.prototype.parseMetrics=function(A,e){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;n.style.visibility="hidden",n.style.fontFamily=A,n.style.fontSize=e,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",s.appendChild(n),r.src=RN,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=A,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(EC)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(EC)),n.style.lineHeight="normal",r.style.verticalAlign="super";var c=r.offsetTop-n.offsetTop+2;return s.removeChild(n),{baseline:a,middle:c}},t.prototype.getMetrics=function(A,e){var n=A+" "+e;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(A,e)),this._data[n]},t}(),QC=function(){function t(A,e){this.context=A,this.options=e}return t}(),PN=1e4,VN=function(t){ln(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new KN(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return A.prototype.applyEffects=function(e){for(var n=this;this._activeEffects.length;)this.popEffect();e.forEach(function(r){return n.applyEffect(r)})},A.prototype.applyEffect=function(e){this.ctx.save(),TN(e)&&(this.ctx.globalAlpha=e.opacity),SN(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),pC(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return lt(this,void 0,void 0,function(){var n;return Ze(this,function(r){switch(r.label){case 0:return n=e.element.container.styles,n.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return lt(this,void 0,void 0,function(){return Ze(this,function(n){switch(n.label){case 0:if(Ue(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(e)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,n,r){var i=this;if(n===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r);else{var s=_f(e.text);s.reduce(function(a,c){return i.ctx.fillText(c,a,e.bounds.top+r),a+i.ctx.measureText(c).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var n=e.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),r=XN(e.fontFamily).join(", "),i=oo(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,n,e.fontWeight,i,r].join(" "),r,i]},A.prototype.renderTextNode=function(e,n){return lt(this,void 0,void 0,function(){var r,i,s,a,c,u,f,h,g=this;return Ze(this,function(m){return r=this.createFontStyle(n),i=r[0],s=r[1],a=r[2],this.ctx.font=i,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",c=this.fontMetrics.getMetrics(s,a),u=c.baseline,f=c.middle,h=n.paintOrder,e.textBounds.forEach(function(w){h.forEach(function(U){switch(U){case 0:g.ctx.fillStyle=xe(n.color),g.renderTextWithLetterSpacing(w,n.letterSpacing,u);var b=n.textShadow;b.length&&w.text.trim().length&&(b.slice(0).reverse().forEach(function(E){g.ctx.shadowColor=xe(E.color),g.ctx.shadowOffsetX=E.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=E.offsetY.number*g.options.scale,g.ctx.shadowBlur=E.blur.number,g.renderTextWithLetterSpacing(w,n.letterSpacing,u)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),n.textDecorationLine.length&&(g.ctx.fillStyle=xe(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(E){switch(E){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+u),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+f),w.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=xe(n.webkitTextStrokeColor),g.ctx.lineWidth=n.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+u)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,n,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=gl(e),s=dl(n);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return lt(this,void 0,void 0,function(){var n,r,i,s,a,c,I,I,u,f,h,g,Q,m,w,N,U,b,E,I,M,Q,N;return Ze(this,function(T){switch(T.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,s=0,a=n.textNodes,T.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,i)]):[3,4];case 2:T.sent(),T.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof Kw))return[3,8];T.label=5;case 5:return T.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return I=T.sent(),this.renderReplacedElement(n,r,I),[3,8];case 7:return T.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof Pw&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof Vw))return[3,12];T.label=9;case 9:return T.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return I=T.sent(),this.renderReplacedElement(n,r,I),[3,12];case 11:return T.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof Xw&&n.tree?(u=new A(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,u.render(n.tree)]):[3,14];case 13:f=T.sent(),n.width&&n.height&&this.ctx.drawImage(f,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),T.label=14;case 14:if(n instanceof Of&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===il?n.checked&&(this.ctx.save(),this.path([new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79),new Z(n.bounds.left+h*.16,n.bounds.top+h*.5549),new Z(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new Z(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new Z(n.bounds.left+h*.72983,n.bounds.top+h*.23),new Z(n.bounds.left+h*.84,n.bounds.top+h*.34085),new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=xe(Ww),this.ctx.fill(),this.ctx.restore()):n.type===sl&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+h/2,n.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=xe(Ww),this.ctx.fill(),this.ctx.restore())),GN(n)&&n.value.length){switch(g=this.createFontStyle(i),Q=g[0],m=g[1],w=this.fontMetrics.getMetrics(Q,m).baseline,this.ctx.font=Q,this.ctx.fillStyle=xe(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=$N(n.styles.textAlign),N=gl(n),U=0,n.styles.textAlign){case 1:U+=N.width/2;break;case 2:U+=N.width;break}b=N.add(U,0,0,-N.height/2+1),this.ctx.save(),this.path([new Z(N.left,N.top),new Z(N.left+N.width,N.top),new Z(N.left+N.width,N.top+N.height),new Z(N.left,N.top+N.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fo(n.value,b),i.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ue(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(E=n.styles.listStyleImage,E.type!==0)return[3,18];I=void 0,M=E.url,T.label=15;case 15:return T.trys.push([15,17,,18]),[4,this.context.cache.match(M)];case 16:return I=T.sent(),this.ctx.drawImage(I,n.bounds.left-(I.width+10),n.bounds.top),[3,18];case 17:return T.sent(),this.context.logger.error("Error loading list-style-image "+M),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(Q=this.createFontStyle(i)[0],this.ctx.font=Q,this.ctx.fillStyle=xe(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",N=new Pn(n.bounds.left,n.bounds.top+ee(n.styles.paddingTop,n.bounds.width),n.bounds.width,Ew(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fo(e.listValue,N),i.letterSpacing,Ew(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),T.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return lt(this,void 0,void 0,function(){var n,r,E,i,s,E,a,c,E,u,f,E,h,g,E,m,w,E,U,b,E;return Ze(this,function(I){switch(I.label){case 0:if(Ue(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:I.sent(),n=0,r=e.negativeZIndex,I.label=2;case 2:return n<r.length?(E=r[n],[4,this.renderStack(E)]):[3,5];case 3:I.sent(),I.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:I.sent(),i=0,s=e.nonInlineLevel,I.label=7;case 7:return i<s.length?(E=s[i],[4,this.renderNode(E)]):[3,10];case 8:I.sent(),I.label=9;case 9:return i++,[3,7];case 10:a=0,c=e.nonPositionedFloats,I.label=11;case 11:return a<c.length?(E=c[a],[4,this.renderStack(E)]):[3,14];case 12:I.sent(),I.label=13;case 13:return a++,[3,11];case 14:u=0,f=e.nonPositionedInlineLevel,I.label=15;case 15:return u<f.length?(E=f[u],[4,this.renderStack(E)]):[3,18];case 16:I.sent(),I.label=17;case 17:return u++,[3,15];case 18:h=0,g=e.inlineLevel,I.label=19;case 19:return h<g.length?(E=g[h],[4,this.renderNode(E)]):[3,22];case 20:I.sent(),I.label=21;case 21:return h++,[3,19];case 22:m=0,w=e.zeroOrAutoZIndexOrTransformedOrOpacity,I.label=23;case 23:return m<w.length?(E=w[m],[4,this.renderStack(E)]):[3,26];case 24:I.sent(),I.label=25;case 25:return m++,[3,23];case 26:U=0,b=e.positiveZIndex,I.label=27;case 27:return U<b.length?(E=b[U],[4,this.renderStack(E)]):[3,30];case 28:I.sent(),I.label=29;case 29:return U++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var n=this;e.forEach(function(r,i){var s=$t(r)?r.start:r;i===0?n.ctx.moveTo(s.x,s.y):n.ctx.lineTo(s.x,s.y),$t(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},A.prototype.renderRepeat=function(e,n,r,i){this.path(e),this.ctx.fillStyle=n,this.ctx.translate(r,i),this.ctx.fill(),this.ctx.translate(-r,-i)},A.prototype.resizeImage=function(e,n,r){var i;if(e.width===n&&e.height===r)return e;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=s.createElement("canvas");a.width=Math.max(1,n),a.height=Math.max(1,r);var c=a.getContext("2d");return c.drawImage(e,0,0,e.width,e.height,0,0,n,r),a},A.prototype.renderBackgroundImage=function(e){return lt(this,void 0,void 0,function(){var n,r,i,s,a,c;return Ze(this,function(u){switch(u.label){case 0:n=e.styles.backgroundImage.length-1,r=function(f){var h,g,m,sA,kA,OA,lA,xA,Y,w,sA,kA,OA,lA,xA,U,b,E,I,M,Q,N,T,H,Y,V,sA,yA,dA,lA,xA,te,kA,OA,nA,hA,LA,RA,ie,KA,YA,VA;return Ze(this,function(ue){switch(ue.label){case 0:if(f.type!==0)return[3,5];h=void 0,g=f.url,ue.label=1;case 1:return ue.trys.push([1,3,,4]),[4,i.context.cache.match(g)];case 2:return h=ue.sent(),[3,4];case 3:return ue.sent(),i.context.logger.error("Error loading background-image "+g),[3,4];case 4:return h&&(m=Gf(e,n,[h.width,h.height,h.width/h.height]),sA=m[0],kA=m[1],OA=m[2],lA=m[3],xA=m[4],Y=i.ctx.createPattern(i.resizeImage(h,lA,xA),"repeat"),i.renderRepeat(sA,Y,kA,OA)),[3,6];case 5:SL(f)?(w=Gf(e,n,[null,null,null]),sA=w[0],kA=w[1],OA=w[2],lA=w[3],xA=w[4],U=FL(f.angle,lA,xA),b=U[0],E=U[1],I=U[2],M=U[3],Q=U[4],N=document.createElement("canvas"),N.width=lA,N.height=xA,T=N.getContext("2d"),H=T.createLinearGradient(E,M,I,Q),uw(f.stops,b).forEach(function(Oe){return H.addColorStop(Oe.stop,xe(Oe.color))}),T.fillStyle=H,T.fillRect(0,0,lA,xA),lA>0&&xA>0&&(Y=i.ctx.createPattern(N,"repeat"),i.renderRepeat(sA,Y,kA,OA))):TL(f)&&(V=Gf(e,n,[null,null,null]),sA=V[0],yA=V[1],dA=V[2],lA=V[3],xA=V[4],te=f.position.length===0?[gf]:f.position,kA=ee(te[0],lA),OA=ee(te[te.length-1],xA),nA=UL(f,kA,OA,lA,xA),hA=nA[0],LA=nA[1],hA>0&&LA>0&&(RA=i.ctx.createRadialGradient(yA+kA,dA+OA,0,yA+kA,dA+OA,hA),uw(f.stops,hA*2).forEach(function(Oe){return RA.addColorStop(Oe.stop,xe(Oe.color))}),i.path(sA),i.ctx.fillStyle=RA,hA!==LA?(ie=e.bounds.left+.5*e.bounds.width,KA=e.bounds.top+.5*e.bounds.height,YA=LA/hA,VA=1/YA,i.ctx.save(),i.ctx.translate(ie,KA),i.ctx.transform(1,0,0,YA,0,0),i.ctx.translate(-ie,-KA),i.ctx.fillRect(yA,VA*(dA-KA)+KA,lA,xA*VA),i.ctx.restore()):i.ctx.fill())),ue.label=6;case 6:return n--,[2]}})},i=this,s=0,a=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return s<a.length?(c=a[s],[5,r(c)]):[3,4];case 2:u.sent(),u.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,n,r){return lt(this,void 0,void 0,function(){return Ze(this,function(i){return this.path(CC(r,n)),this.ctx.fillStyle=xe(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,n,r,i){return lt(this,void 0,void 0,function(){var s,a;return Ze(this,function(c){switch(c.label){case 0:return n<3?[4,this.renderSolidBorder(e,r,i)]:[3,2];case 1:return c.sent(),[2];case 2:return s=ON(i,r),this.path(s),this.ctx.fillStyle=xe(e),this.ctx.fill(),a=LN(i,r),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return lt(this,void 0,void 0,function(){var n,r,i,s,a,c,u,f,h=this;return Ze(this,function(g){switch(g.label){case 0:return this.applyEffects(e.getEffects(2)),n=e.container.styles,r=!Sr(n.backgroundColor)||n.backgroundImage.length,i=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],s=WN(ns(n.backgroundClip,0),e.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Sr(n.backgroundColor)||(this.ctx.fillStyle=xe(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(m){h.ctx.save();var w=fl(e.curves),U=m.inset?0:PN,b=_N(w,-U+(m.inset?1:-1)*m.spread.number,(m.inset?1:-1)*m.spread.number,m.spread.number*(m.inset?-2:2),m.spread.number*(m.inset?-2:2));m.inset?(h.path(w),h.ctx.clip(),h.mask(b)):(h.mask(w),h.ctx.clip(),h.path(b)),h.ctx.shadowOffsetX=m.offsetX.number+U,h.ctx.shadowOffsetY=m.offsetY.number,h.ctx.shadowColor=xe(m.color),h.ctx.shadowBlur=m.blur.number,h.ctx.fillStyle=m.inset?xe(m.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),g.label=2;case 2:a=0,c=0,u=i,g.label=3;case 3:return c<u.length?(f=u[c],f.style!==0&&!Sr(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,3)];case 6:return g.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,a,e.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,a,e.curves)];case 10:g.sent(),g.label=11;case 11:a++,g.label=12;case 12:return c++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,n,r,i,s){return lt(this,void 0,void 0,function(){var a,c,u,f,h,g,m,w,U,b,E,I,M,Q,N,T,N,T;return Ze(this,function(H){return this.ctx.save(),a=HN(i,r),c=CC(i,r),s===2&&(this.path(c),this.ctx.clip()),$t(c[0])?(u=c[0].start.x,f=c[0].start.y):(u=c[0].x,f=c[0].y),$t(c[1])?(h=c[1].end.x,g=c[1].end.y):(h=c[1].x,g=c[1].y),r===0||r===2?m=Math.abs(u-h):m=Math.abs(f-g),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(c.slice(0,2)),w=n<3?n*3:n*2,U=n<3?n*2:n,s===3&&(w=n,U=n),b=!0,m<=w*2?b=!1:m<=w*2+U?(E=m/(2*w+U),w*=E,U*=E):(I=Math.floor((m+U)/(w+U)),M=(m-I*w)/(I-1),Q=(m-(I+1)*w)/I,U=Q<=0||Math.abs(U-M)<Math.abs(U-Q)?M:Q),b&&(s===3?this.ctx.setLineDash([0,w+U]):this.ctx.setLineDash([w,U])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=xe(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&($t(c[0])&&(N=c[3],T=c[0],this.ctx.beginPath(),this.formatPath([new Z(N.end.x,N.end.y),new Z(T.start.x,T.start.y)]),this.ctx.stroke()),$t(c[1])&&(N=c[1],T=c[2],this.ctx.beginPath(),this.formatPath([new Z(N.end.x,N.end.y),new Z(T.start.x,T.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return lt(this,void 0,void 0,function(){var n;return Ze(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=xe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=xN(e),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(QC),GN=function(t){return t instanceof Jw||t instanceof $w?!0:t instanceof Of&&t.type!==sl&&t.type!==il},WN=function(t,A){switch(t){case 0:return fl(A);case 2:return bN(A);case 1:default:return dl(A)}},$N=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},JN=["-apple-system","system-ui"],XN=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return JN.indexOf(A)===-1}):t},YN=function(t){ln(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return A.prototype.render=function(e){return lt(this,void 0,void 0,function(){var n,r;return Ze(this,function(i){switch(i.label){case 0:return n=Tf(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,zN(n)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=xe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(QC),zN=function(t){return new Promise(function(A,e){var n=new Image;n.onload=function(){A(n)},n.onerror=e,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},qN=function(){function t(A){var e=A.id,n=A.enabled;this.id=e,this.enabled=n,this.start=Date.now()}return t.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ua([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ua([this.id,this.getTime()+"ms"],A))},t.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ua([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ua([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),ZN=function(){function t(A,e){var n;this.windowBounds=e,this.instanceName="#"+t.instanceCount++,this.logger=new qN({id:this.instanceName,enabled:A.logging}),this.cache=(n=A.cache)!==null&&n!==void 0?n:new mN(this,A)}return t.instanceCount=1,t}(),jN=function(t,A){return A===void 0&&(A={}),AD(t,A)};typeof window<"u"&&hC.setContext(window);var AD=function(t,A){return lt(void 0,void 0,void 0,function(){var e,n,r,i,s,a,c,u,f,h,g,m,w,U,b,E,I,M,Q,N,H,T,H,Y,V,sA,yA,dA,lA,xA,te,kA,OA,nA,hA,LA,RA,ie,KA,YA;return Ze(this,function(VA){switch(VA.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=t.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(n=e.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(Y=A.allowTaint)!==null&&Y!==void 0?Y:!1,imageTimeout:(V=A.imageTimeout)!==null&&V!==void 0?V:15e3,proxy:A.proxy,useCORS:(sA=A.useCORS)!==null&&sA!==void 0?sA:!1},i=Xu({logging:(yA=A.logging)!==null&&yA!==void 0?yA:!0,cache:A.cache},r),s={windowWidth:(dA=A.windowWidth)!==null&&dA!==void 0?dA:n.innerWidth,windowHeight:(lA=A.windowHeight)!==null&&lA!==void 0?lA:n.innerHeight,scrollX:(xA=A.scrollX)!==null&&xA!==void 0?xA:n.pageXOffset,scrollY:(te=A.scrollY)!==null&&te!==void 0?te:n.pageYOffset},a=new Pn(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),c=new ZN(i,a),u=(kA=A.foreignObjectRendering)!==null&&kA!==void 0?kA:!1,f={allowTaint:(OA=A.allowTaint)!==null&&OA!==void 0?OA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:u,copyStyles:u},c.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new fC(c,t,f),g=h.clonedReferenceElement,g?[4,h.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=VA.sent(),w=Hf(g)||eN(g)?_x(g.ownerDocument):ba(c,g),U=w.width,b=w.height,E=w.left,I=w.top,M=eD(c,g,A.backgroundColor),Q={canvas:A.canvas,backgroundColor:M,scale:(hA=(nA=A.scale)!==null&&nA!==void 0?nA:n.devicePixelRatio)!==null&&hA!==void 0?hA:1,x:((LA=A.x)!==null&&LA!==void 0?LA:0)+E,y:((RA=A.y)!==null&&RA!==void 0?RA:0)+I,width:(ie=A.width)!==null&&ie!==void 0?ie:Math.ceil(U),height:(KA=A.height)!==null&&KA!==void 0?KA:Math.ceil(b)},u?(c.logger.debug("Document cloned, using foreign object rendering"),H=new YN(c,Q),[4,H.render(g)]):[3,3];case 2:return N=VA.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+E+","+I+" with size "+U+"x"+b+" using computed rendering"),c.logger.debug("Starting DOM parsing"),T=zw(c,g),M===T.styles.backgroundColor&&(T.styles.backgroundColor=Gn.TRANSPARENT),c.logger.debug("Starting renderer for element at "+Q.x+","+Q.y+" with size "+Q.width+"x"+Q.height),H=new VN(c,Q),[4,H.render(T)];case 4:N=VA.sent(),VA.label=5;case 5:return(!((YA=A.removeContainer)!==null&&YA!==void 0)||YA)&&(fC.destroy(m)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,N]}})})},eD=function(t,A,e){var n=A.ownerDocument,r=n.documentElement?lo(t,getComputedStyle(n.documentElement).backgroundColor):Gn.TRANSPARENT,i=n.body?lo(t,getComputedStyle(n.body).backgroundColor):Gn.TRANSPARENT,s=typeof e=="string"?lo(t,e):e===null?Gn.TRANSPARENT:4294967295;return A===n.documentElement?Sr(r)?Sr(i)?s:i:r:s};const tD=p.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=A,r=p.ref(),i=p.ref(""),s=p.ref();async function a(){if(r.value){const u=r.value,h=(await jN(u.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:u.offsetWidth,height:u.offsetHeight})).toDataURL();if(n("update:modelValue",h),e.debug){const g=new Image;g.src=h,document.body.appendChild(g)}return h}return""}const c=dm.debounce(async()=>{i.value=await a()},300,{trailing:!0,leading:!1});return p.onMounted(()=>{const u=r.value;e.renderUpdates&&(s.value=new MutationObserver(async f=>{c()}),s.value.observe(u,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{c()},500)}),(u,f)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:r,style:p.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[p.renderSlot(u.$slots,"default")],6))}}),nD={class:"link-sharing"},rD={key:0,class:"link-sharing__links container"},iD={class:"row"},sD={key:0,class:"col-12 col-md-6"},oD=["href"],aD={class:"caption"},lD={key:1,class:"col-12 col-md-6"},cD=["href"],uD={class:"caption"},fD={key:2,class:"col-12 col-md-6"},dD={class:"caption"},hD={key:3,class:"col-12 col-md-6"},pD=["href"],gD={class:"caption"},BD={key:4,class:"col-12 col-md-6"},mD=["href"],wD={class:"caption"},CD={key:5,class:"col-12 col-md-6"},yD={class:"caption"},ED={key:6,class:"col-12 col-md-6"},QD=["href"],FD={class:"caption"},UD={key:1,class:"link-sharing__instructions pt-5"},bD={class:"row"},vD={class:"col-12 text-center py-0"},ID={class:"mb-5"},SD=t=>t.replace(/<(?:.|\n)*?>/gm,""),TD=p.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:{type:String,default:""},hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0,x:!0}}},setup(t){const A=t,e=p.ref(!1),n=p.computed(()=>encodeURIComponent(A.url));p.computed(()=>encodeURIComponent(A.media));const r=p.computed(()=>SD(A.text)),i=p.computed(()=>!!(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));function s(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=A.url,a.select(),document.execCommand("copy"),document.body.removeChild(a)}return(a,c)=>{const u=p.resolveComponent("svg-icon");return p.openBlock(),p.createElementBlock("div",nD,[e.value?(p.openBlock(),p.createElementBlock("div",UD,[p.createElementVNode("div",bD,[p.createElementVNode("div",vD,[p.createElementVNode("div",ID,[p.createElementVNode("p",null,p.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),p.createElementVNode("p",null,[p.createElementVNode("strong",null,p.toDisplayString(t.hashtags),1)])])])])])):(p.openBlock(),p.createElementBlock("div",rD,[p.createElementVNode("div",iD,[t.services.facebook?(p.openBlock(),p.createElementBlock("div",sD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"facebook"}),p.createElementVNode("span",aD,p.toDisplayString(a.$t("sharing.facebook")),1)],8,oD)])):p.createCommentVNode("",!0),t.services.x?(p.openBlock(),p.createElementBlock("div",lD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://x.com/share?text=${t.subject}&url=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"x-logo"}),p.createElementVNode("span",uD,p.toDisplayString(a.$t("sharing.x")),1)],8,cD)])):p.createCommentVNode("",!0),t.services.instagram?(p.openBlock(),p.createElementBlock("div",fD,[p.createElementVNode("button",{class:"link-sharing__link btn btn-primary",onClick:c[0]||(c[0]=p.withModifiers(f=>e.value=!e.value,["prevent"])),target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"instagram"}),p.createElementVNode("span",dD,p.toDisplayString(a.$t("sharing.instagram")),1)])])):p.createCommentVNode("",!0),t.services.linkedin?(p.openBlock(),p.createElementBlock("div",hD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${n.value}&title=${t.subject}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"linkedin"}),p.createElementVNode("span",gD,p.toDisplayString(a.$t("sharing.linkedin")),1)],8,pD)])):p.createCommentVNode("",!0),t.services.whatsapp&&i.value?(p.openBlock(),p.createElementBlock("div",BD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"whatsapp"}),p.createElementVNode("span",wD,p.toDisplayString(a.$t("sharing.whatsapp")),1)],8,mD)])):p.createCommentVNode("",!0),t.services.clipboard?(p.openBlock(),p.createElementBlock("div",CD,[p.createElementVNode("button",{class:"link-sharing__link btn btn-primary",onClick:p.withModifiers(s,["prevent","stop"]),target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"copy"}),p.createElementVNode("span",yD,p.toDisplayString(a.$t("sharing.clipboard")),1)])])):p.createCommentVNode("",!0),t.services.mailto?(p.openBlock(),p.createElementBlock("div",ED,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${r.value}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"mail"}),p.createElementVNode("span",FD,p.toDisplayString(a.$t("sharing.mailto")),1)],8,QD)])):p.createCommentVNode("",!0)])]))])}}}),kG="",_D={class:"base-form"},xD=p.defineComponent({__name:"base-form",props:{id:{},name:{},variant:{},disabled:{type:Boolean},pending:{type:Boolean}},setup(t){function A(r){console.log("input",r)}function e(r){console.log("reset",r)}function n(r){console.log("submit",r)}return(r,i)=>(p.openBlock(),p.createElementBlock("div",_D,[p.createElementVNode("form",{ref:"form",onInput:A,onReset:e,onSubmit:p.withModifiers(n,["prevent"])},[p.renderSlot(r.$slots,"default")],544)]))}}),RG="",OD={class:"modal-dialog__content"},LD={class:"modal-dialog__header d-flex p-2"},HD={key:0,class:"modal-dialog__title",id:"exampleModalLabel"},MD={class:"modal-dialog__body"},ND={key:0,class:"modal-dialog__footer d-flex p-2"},DD=p.defineComponent({__name:"modal-dialog",props:{modelValue:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},size:{type:String,default:"md"},dismiss:{type:Boolean,default:!0},title:{type:String,default:""},footer:{type:Boolean,default:!0},classes:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{expose:A,emit:e}){const n=t,r=e,i=p.ref();function s(){var g,m;document.documentElement.style.setProperty("--scroll-position",`${Math.round(document.documentElement.scrollTop)}px`),n.modal?(g=i.value)==null||g.showModal():(m=i.value)==null||m.show(),r("update:modelValue",!0)}function a(){const g=i.value&&new KeyframeEffect(i.value,[{translate:"0 -100%",opacity:"0"}],{duration:320,easing:"ease",direction:"normal"}),m=new Animation(g,document.timeline);m.play(),m.addEventListener("finish",()=>{var w;(w=i.value)==null||w.close(),c()}),r("update:modelValue",!1)}function c(){const g=getComputedStyle(document.documentElement).getPropertyValue("--scroll-position");document.documentElement.scrollTo({top:parseInt(g,10),behavior:"instant"}),r("update:modelValue",!1)}function u(g){s(),r("confirm",g)}function f(){a(),r("cancel")}function h(g){const m=g.target;m&&m.nodeName==="DIALOG"&&a()}return p.watch(()=>n.modelValue,(g,m)=>{g?s():a()},{immediate:!0}),p.onMounted(()=>{var g;(g=i.value)==null||g.addEventListener("cancel",m=>{m.preventDefault(),a()}),n.dismiss&&document.addEventListener("click",h),n.modelValue&&s()}),p.onBeforeUnmount(()=>{n.dismiss&&document.removeEventListener("click",h)}),A({show:s,close:a,confirm:u,cancel:f}),(g,m)=>(p.openBlock(),p.createElementBlock("dialog",{ref_key:"dialog",ref:i,class:p.normalizeClass(["modal-dialog",{[`modal-dialog--${t.size}`]:t.size}]),onClose:c},[p.createElementVNode("div",OD,[p.createElementVNode("div",LD,[t.title?(p.openBlock(),p.createElementBlock("h5",HD,p.toDisplayString(t.title),1)):p.createCommentVNode("",!0),p.createElementVNode("button",{type:"button",class:"btn-close ms-auto","aria-label":"Close",onClick:a})]),p.createElementVNode("div",MD,[p.renderSlot(g.$slots,"default")]),t.footer?(p.openBlock(),p.createElementBlock("div",ND,[p.renderSlot(g.$slots,"footer"),p.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:a},p.toDisplayString(g.$t("common.close")),1)])):p.createCommentVNode("",!0)])],34))}}),KG="";MA.Accordion=CE,MA.AccordionItem=pE,MA.AssetUploader=dx,MA.BaseButton=EE,MA.BaseCamera=e_,MA.BaseCarousel=ym,MA.BaseForm=xD,MA.BaseHeadline=iE,MA.BaseImage=rE,MA.BaseInput=bE,MA.BaseParagraph=oE,MA.CheckGroup=DE,MA.DomRenderer=tD,MA.FileUpload=tx,MA.InputCheckbox=LE,MA.InputColor=b1,MA.InputDropdown=LT,MA.InputFile=qE,MA.InputTextarea=TE,MA.LinkSharing=TD,MA.LoadingSpinner=tE,MA.MediaThumbnails=yx,MA.ModalDialog=DD,MA.ProgressSteps=Tx,MA.RadioGroup=VE,MA.RteEditor=E1,MA.SvgIcon=jy,MA.UploadGroup=Cm,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
|
|
180
|
+
.`+Rf+pN+dC)},BN=function(t,A){var e=t.ownerDocument;if(e){var n=e.createElement("style");n.textContent=A,t.appendChild(n)}},hC=function(){function t(){}return t.getOrigin=function(A){var e=t._link;return e?(e.href=A,e.href=e.href,e.protocol+e.hostname+e.port):"about:blank"},t.isSameOrigin=function(A){return t.getOrigin(A)===t._origin},t.setContext=function(A){t._link=A.document.createElement("a"),t._origin=t.getOrigin(A.location.href)},t._origin="about:blank",t}(),mN=function(){function t(A,e){this.context=A,this._options=e,this._cache={}}return t.prototype.addImage=function(A){var e=Promise.resolve();return this.has(A)||(Pf(A)||EN(A))&&(this._cache[A]=this.loadImage(A)).catch(function(){}),e},t.prototype.match=function(A){return this._cache[A]},t.prototype.loadImage=function(A){return lt(this,void 0,void 0,function(){var e,n,r,i,s=this;return Ze(this,function(a){switch(a.label){case 0:return e=hC.isSameOrigin(A),n=!Kf(A)&&this._options.useCORS===!0&&ke.SUPPORT_CORS_IMAGES&&!e,r=!Kf(A)&&!e&&!Pf(A)&&typeof this._options.proxy=="string"&&ke.SUPPORT_CORS_XHR&&!n,!e&&this._options.allowTaint===!1&&!Kf(A)&&!Pf(A)&&!r&&!n?[2]:(i=A,r?[4,this.proxy(i)]:[3,2]);case 1:i=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+A.substring(0,256)),[4,new Promise(function(c,u){var f=new Image;f.onload=function(){return c(f)},f.onerror=u,(QN(i)||n)&&(f.crossOrigin="anonymous"),f.src=i,f.complete===!0&&setTimeout(function(){return c(f)},500),s._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(A){return typeof this._cache[A]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(A){var e=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=A.substring(0,256);return new Promise(function(i,s){var a=ke.SUPPORT_RESPONSE_TYPE?"blob":"text",c=new XMLHttpRequest;c.onload=function(){if(c.status===200)if(a==="text")i(c.response);else{var h=new FileReader;h.addEventListener("load",function(){return i(h.result)},!1),h.addEventListener("error",function(g){return s(g)},!1),h.readAsDataURL(c.response)}else s("Failed to proxy resource "+r+" with status code "+c.status)},c.onerror=s;var u=n.indexOf("?")>-1?"&":"?";if(c.open("GET",""+n+u+"url="+encodeURIComponent(A)+"&responseType="+a),a!=="text"&&c instanceof XMLHttpRequest&&(c.responseType=a),e._options.imageTimeout){var f=e._options.imageTimeout;c.timeout=f,c.ontimeout=function(){return s("Timed out ("+f+"ms) proxying "+r)}}c.send()})},t}(),wN=/^data:image\/svg\+xml/i,CN=/^data:image\/.*;base64,/i,yN=/^data:image\/.*/i,EN=function(t){return ke.SUPPORT_SVG_DRAWING||!FN(t)},Kf=function(t){return yN.test(t)},QN=function(t){return CN.test(t)},Pf=function(t){return t.substr(0,4)==="blob"},FN=function(t){return t.substr(-3).toLowerCase()==="svg"||wN.test(t)},Z=function(){function t(A,e){this.type=0,this.x=A,this.y=e}return t.prototype.add=function(A,e){return new t(this.x+A,this.y+e)},t}(),es=function(t,A,e){return new Z(t.x+(A.x-t.x)*e,t.y+(A.y-t.y)*e)},ul=function(){function t(A,e,n,r){this.type=1,this.start=A,this.startControl=e,this.endControl=n,this.end=r}return t.prototype.subdivide=function(A,e){var n=es(this.start,this.startControl,A),r=es(this.startControl,this.endControl,A),i=es(this.endControl,this.end,A),s=es(n,r,A),a=es(r,i,A),c=es(s,a,A);return e?new t(this.start,n,s,c):new t(c,a,i,this.end)},t.prototype.add=function(A,e){return new t(this.start.add(A,e),this.startControl.add(A,e),this.endControl.add(A,e),this.end.add(A,e))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t}(),$t=function(t){return t.type===1},UN=function(){function t(A){var e=A.styles,n=A.bounds,r=ao(e.borderTopLeftRadius,n.width,n.height),i=r[0],s=r[1],a=ao(e.borderTopRightRadius,n.width,n.height),c=a[0],u=a[1],f=ao(e.borderBottomRightRadius,n.width,n.height),h=f[0],g=f[1],m=ao(e.borderBottomLeftRadius,n.width,n.height),w=m[0],U=m[1],b=[];b.push((i+c)/n.width),b.push((w+h)/n.width),b.push((s+U)/n.height),b.push((u+g)/n.height);var E=Math.max.apply(Math,b);E>1&&(i/=E,s/=E,c/=E,u/=E,h/=E,g/=E,w/=E,U/=E);var I=n.width-c,M=n.height-g,Q=n.width-h,N=n.height-U,T=e.borderTopWidth,H=e.borderRightWidth,Y=e.borderBottomWidth,V=e.borderLeftWidth,sA=ee(e.paddingTop,A.bounds.width),yA=ee(e.paddingRight,A.bounds.width),dA=ee(e.paddingBottom,A.bounds.width),lA=ee(e.paddingLeft,A.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||s>0?oe(n.left+V/3,n.top+T/3,i-V/3,s-T/3,$A.TOP_LEFT):new Z(n.left+V/3,n.top+T/3),this.topRightBorderDoubleOuterBox=i>0||s>0?oe(n.left+I,n.top+T/3,c-H/3,u-T/3,$A.TOP_RIGHT):new Z(n.left+n.width-H/3,n.top+T/3),this.bottomRightBorderDoubleOuterBox=h>0||g>0?oe(n.left+Q,n.top+M,h-H/3,g-Y/3,$A.BOTTOM_RIGHT):new Z(n.left+n.width-H/3,n.top+n.height-Y/3),this.bottomLeftBorderDoubleOuterBox=w>0||U>0?oe(n.left+V/3,n.top+N,w-V/3,U-Y/3,$A.BOTTOM_LEFT):new Z(n.left+V/3,n.top+n.height-Y/3),this.topLeftBorderDoubleInnerBox=i>0||s>0?oe(n.left+V*2/3,n.top+T*2/3,i-V*2/3,s-T*2/3,$A.TOP_LEFT):new Z(n.left+V*2/3,n.top+T*2/3),this.topRightBorderDoubleInnerBox=i>0||s>0?oe(n.left+I,n.top+T*2/3,c-H*2/3,u-T*2/3,$A.TOP_RIGHT):new Z(n.left+n.width-H*2/3,n.top+T*2/3),this.bottomRightBorderDoubleInnerBox=h>0||g>0?oe(n.left+Q,n.top+M,h-H*2/3,g-Y*2/3,$A.BOTTOM_RIGHT):new Z(n.left+n.width-H*2/3,n.top+n.height-Y*2/3),this.bottomLeftBorderDoubleInnerBox=w>0||U>0?oe(n.left+V*2/3,n.top+N,w-V*2/3,U-Y*2/3,$A.BOTTOM_LEFT):new Z(n.left+V*2/3,n.top+n.height-Y*2/3),this.topLeftBorderStroke=i>0||s>0?oe(n.left+V/2,n.top+T/2,i-V/2,s-T/2,$A.TOP_LEFT):new Z(n.left+V/2,n.top+T/2),this.topRightBorderStroke=i>0||s>0?oe(n.left+I,n.top+T/2,c-H/2,u-T/2,$A.TOP_RIGHT):new Z(n.left+n.width-H/2,n.top+T/2),this.bottomRightBorderStroke=h>0||g>0?oe(n.left+Q,n.top+M,h-H/2,g-Y/2,$A.BOTTOM_RIGHT):new Z(n.left+n.width-H/2,n.top+n.height-Y/2),this.bottomLeftBorderStroke=w>0||U>0?oe(n.left+V/2,n.top+N,w-V/2,U-Y/2,$A.BOTTOM_LEFT):new Z(n.left+V/2,n.top+n.height-Y/2),this.topLeftBorderBox=i>0||s>0?oe(n.left,n.top,i,s,$A.TOP_LEFT):new Z(n.left,n.top),this.topRightBorderBox=c>0||u>0?oe(n.left+I,n.top,c,u,$A.TOP_RIGHT):new Z(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||g>0?oe(n.left+Q,n.top+M,h,g,$A.BOTTOM_RIGHT):new Z(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=w>0||U>0?oe(n.left,n.top+N,w,U,$A.BOTTOM_LEFT):new Z(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||s>0?oe(n.left+V,n.top+T,Math.max(0,i-V),Math.max(0,s-T),$A.TOP_LEFT):new Z(n.left+V,n.top+T),this.topRightPaddingBox=c>0||u>0?oe(n.left+Math.min(I,n.width-H),n.top+T,I>n.width+H?0:Math.max(0,c-H),Math.max(0,u-T),$A.TOP_RIGHT):new Z(n.left+n.width-H,n.top+T),this.bottomRightPaddingBox=h>0||g>0?oe(n.left+Math.min(Q,n.width-V),n.top+Math.min(M,n.height-Y),Math.max(0,h-H),Math.max(0,g-Y),$A.BOTTOM_RIGHT):new Z(n.left+n.width-H,n.top+n.height-Y),this.bottomLeftPaddingBox=w>0||U>0?oe(n.left+V,n.top+Math.min(N,n.height-Y),Math.max(0,w-V),Math.max(0,U-Y),$A.BOTTOM_LEFT):new Z(n.left+V,n.top+n.height-Y),this.topLeftContentBox=i>0||s>0?oe(n.left+V+lA,n.top+T+sA,Math.max(0,i-(V+lA)),Math.max(0,s-(T+sA)),$A.TOP_LEFT):new Z(n.left+V+lA,n.top+T+sA),this.topRightContentBox=c>0||u>0?oe(n.left+Math.min(I,n.width+V+lA),n.top+T+sA,I>n.width+V+lA?0:c-V+lA,u-(T+sA),$A.TOP_RIGHT):new Z(n.left+n.width-(H+yA),n.top+T+sA),this.bottomRightContentBox=h>0||g>0?oe(n.left+Math.min(Q,n.width-(V+lA)),n.top+Math.min(M,n.height+T+sA),Math.max(0,h-(H+yA)),g-(Y+dA),$A.BOTTOM_RIGHT):new Z(n.left+n.width-(H+yA),n.top+n.height-(Y+dA)),this.bottomLeftContentBox=w>0||U>0?oe(n.left+V+lA,n.top+N,Math.max(0,w-(V+lA)),U-(Y+dA),$A.BOTTOM_LEFT):new Z(n.left+V+lA,n.top+n.height-(Y+dA))}return t}(),$A;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})($A||($A={}));var oe=function(t,A,e,n,r){var i=4*((Math.sqrt(2)-1)/3),s=e*i,a=n*i,c=t+e,u=A+n;switch(r){case $A.TOP_LEFT:return new ul(new Z(t,u),new Z(t,u-a),new Z(c-s,A),new Z(c,A));case $A.TOP_RIGHT:return new ul(new Z(t,A),new Z(t+s,A),new Z(c,u-a),new Z(c,u));case $A.BOTTOM_RIGHT:return new ul(new Z(c,A),new Z(c,A+a),new Z(t+s,u),new Z(t,u));case $A.BOTTOM_LEFT:default:return new ul(new Z(c,u),new Z(c-s,u),new Z(t,A+a),new Z(t,A))}},fl=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},bN=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},dl=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},vN=function(){function t(A,e,n){this.offsetX=A,this.offsetY=e,this.matrix=n,this.type=0,this.target=6}return t}(),hl=function(){function t(A,e){this.path=A,this.target=e,this.type=1}return t}(),IN=function(){function t(A){this.opacity=A,this.type=2,this.target=6}return t}(),SN=function(t){return t.type===0},pC=function(t){return t.type===1},TN=function(t){return t.type===2},gC=function(t,A){return t.length===A.length?t.some(function(e,n){return e===A[n]}):!1},_N=function(t,A,e,n,r){return t.map(function(i,s){switch(s){case 0:return i.add(A,e);case 1:return i.add(A+n,e);case 2:return i.add(A+n,e+r);case 3:return i.add(A,e+r)}return i})},BC=function(){function t(A){this.element=A,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t}(),mC=function(){function t(A,e){if(this.container=A,this.parent=e,this.effects=[],this.curves=new UN(this.container),this.container.styles.opacity<1&&this.effects.push(new IN(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new vN(n,r,i))}if(this.container.styles.overflowX!==0){var s=fl(this.curves),a=dl(this.curves);gC(s,a)?this.effects.push(new hl(s,6)):(this.effects.push(new hl(s,2)),this.effects.push(new hl(a,4)))}}return t.prototype.getEffects=function(A){for(var e=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(c){return!pC(c)});if(e||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),e=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var s=fl(n.curves),a=dl(n.curves);gC(s,a)||r.unshift(new hl(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(c){return Ue(c.target,A)})},t}(),Vf=function(t,A,e,n){t.container.elements.forEach(function(r){var i=Ue(r.flags,4),s=Ue(r.flags,2),a=new mC(r,t);Ue(r.styles.display,2048)&&n.push(a);var c=Ue(r.flags,8)?[]:n;if(i||s){var u=i||r.styles.isPositioned()?e:A,f=new BC(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var h=r.styles.zIndex.order;if(h<0){var g=0;u.negativeZIndex.some(function(w,U){return h>w.element.container.styles.zIndex.order?(g=U,!1):g>0}),u.negativeZIndex.splice(g,0,f)}else if(h>0){var m=0;u.positiveZIndex.some(function(w,U){return h>=w.element.container.styles.zIndex.order?(m=U+1,!1):m>0}),u.positiveZIndex.splice(m,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else r.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);Vf(a,f,i?f:e,c)}else r.styles.isInlineLevel()?A.inlineLevel.push(a):A.nonInlineLevel.push(a),Vf(a,A,e,c);Ue(r.flags,8)&&wC(r,c)})},wC=function(t,A){for(var e=t instanceof xf?t.start:1,n=t instanceof xf?t.reversed:!1,r=0;r<A.length;r++){var i=A[r];i.container instanceof Gw&&typeof i.container.value=="number"&&i.container.value!==0&&(e=i.container.value),i.listValue=po(e,i.container.styles.listStyleType,!0),e+=n?-1:1}},xN=function(t){var A=new mC(t,null),e=new BC(A),n=[];return Vf(A,e,e,n),wC(A.container,n),e},CC=function(t,A){switch(A){case 0:return Jt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Jt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Jt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Jt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},ON=function(t,A){switch(A){case 0:return Jt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Jt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Jt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Jt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},LN=function(t,A){switch(A){case 0:return Jt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Jt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Jt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Jt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},HN=function(t,A){switch(A){case 0:return pl(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return pl(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return pl(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return pl(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},pl=function(t,A){var e=[];return $t(t)?e.push(t.subdivide(.5,!1)):e.push(t),$t(A)?e.push(A.subdivide(.5,!0)):e.push(A),e},Jt=function(t,A,e,n){var r=[];return $t(t)?r.push(t.subdivide(.5,!1)):r.push(t),$t(e)?r.push(e.subdivide(.5,!0)):r.push(e),$t(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),$t(A)?r.push(A.subdivide(.5,!1).reverse()):r.push(A),r},yC=function(t){var A=t.bounds,e=t.styles;return A.add(e.borderLeftWidth,e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth),-(e.borderTopWidth+e.borderBottomWidth))},gl=function(t){var A=t.styles,e=t.bounds,n=ee(A.paddingLeft,e.width),r=ee(A.paddingRight,e.width),i=ee(A.paddingTop,e.width),s=ee(A.paddingBottom,e.width);return e.add(n+A.borderLeftWidth,i+A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth+n+r),-(A.borderTopWidth+A.borderBottomWidth+i+s))},MN=function(t,A){return t===0?A.bounds:t===2?gl(A):yC(A)},NN=function(t,A){return t===0?A.bounds:t===2?gl(A):yC(A)},Gf=function(t,A,e){var n=MN(ns(t.styles.backgroundOrigin,A),t),r=NN(ns(t.styles.backgroundClip,A),t),i=DN(ns(t.styles.backgroundSize,A),e,n),s=i[0],a=i[1],c=ao(ns(t.styles.backgroundPosition,A),n.width-s,n.height-a),u=kN(ns(t.styles.backgroundRepeat,A),c,i,n,r),f=Math.round(n.left+c[0]),h=Math.round(n.top+c[1]);return[u,f,h,s,a]},ts=function(t){return ZA(t)&&t.value===qi.AUTO},Bl=function(t){return typeof t=="number"},DN=function(t,A,e){var n=A[0],r=A[1],i=A[2],s=t[0],a=t[1];if(!s)return[0,0];if(Ee(s)&&a&&Ee(a))return[ee(s,e.width),ee(a,e.height)];var c=Bl(i);if(ZA(s)&&(s.value===qi.CONTAIN||s.value===qi.COVER)){if(Bl(i)){var u=e.width/e.height;return u<i!=(s.value===qi.COVER)?[e.width,e.width/i]:[e.height*i,e.height]}return[e.width,e.height]}var f=Bl(n),h=Bl(r),g=f||h;if(ts(s)&&(!a||ts(a))){if(f&&h)return[n,r];if(!c&&!g)return[e.width,e.height];if(g&&c){var m=f?n:r*i,w=h?r:n/i;return[m,w]}var U=f?n:e.width,b=h?r:e.height;return[U,b]}if(c){var E=0,I=0;return Ee(s)?E=ee(s,e.width):Ee(a)&&(I=ee(a,e.height)),ts(s)?E=I*i:(!a||ts(a))&&(I=E/i),[E,I]}var M=null,Q=null;if(Ee(s)?M=ee(s,e.width):a&&Ee(a)&&(Q=ee(a,e.height)),M!==null&&(!a||ts(a))&&(Q=f&&h?M/n*r:e.height),Q!==null&&ts(s)&&(M=f&&h?Q/r*n:e.width),M!==null&&Q!==null)return[M,Q];throw new Error("Unable to calculate background-size for element")},ns=function(t,A){var e=t[A];return typeof e>"u"?t[0]:e},kN=function(t,A,e,n,r){var i=A[0],s=A[1],a=e[0],c=e[1];switch(t){case 2:return[new Z(Math.round(n.left),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(n.top+s)),new Z(Math.round(n.left+n.width),Math.round(c+n.top+s)),new Z(Math.round(n.left),Math.round(c+n.top+s))];case 3:return[new Z(Math.round(n.left+i),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.top)),new Z(Math.round(n.left+i+a),Math.round(n.height+n.top)),new Z(Math.round(n.left+i),Math.round(n.height+n.top))];case 1:return[new Z(Math.round(n.left+i),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s)),new Z(Math.round(n.left+i+a),Math.round(n.top+s+c)),new Z(Math.round(n.left+i),Math.round(n.top+s+c))];default:return[new Z(Math.round(r.left),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.top)),new Z(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Z(Math.round(r.left),Math.round(r.height+r.top))]}},RN="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",EC="Hidden Text",KN=function(){function t(A){this._data={},this._document=A}return t.prototype.parseMetrics=function(A,e){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),s=this._document.body;n.style.visibility="hidden",n.style.fontFamily=A,n.style.fontSize=e,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",s.appendChild(n),r.src=RN,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=A,i.style.fontSize=e,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(EC)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(EC)),n.style.lineHeight="normal",r.style.verticalAlign="super";var c=r.offsetTop-n.offsetTop+2;return s.removeChild(n),{baseline:a,middle:c}},t.prototype.getMetrics=function(A,e){var n=A+" "+e;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(A,e)),this._data[n]},t}(),QC=function(){function t(A,e){this.context=A,this.options=e}return t}(),PN=1e4,VN=function(t){ln(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new KN(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return A.prototype.applyEffects=function(e){for(var n=this;this._activeEffects.length;)this.popEffect();e.forEach(function(r){return n.applyEffect(r)})},A.prototype.applyEffect=function(e){this.ctx.save(),TN(e)&&(this.ctx.globalAlpha=e.opacity),SN(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),pC(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return lt(this,void 0,void 0,function(){var n;return Ze(this,function(r){switch(r.label){case 0:return n=e.element.container.styles,n.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},A.prototype.renderNode=function(e){return lt(this,void 0,void 0,function(){return Ze(this,function(n){switch(n.label){case 0:if(Ue(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(e)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},A.prototype.renderTextWithLetterSpacing=function(e,n,r){var i=this;if(n===0)this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+r);else{var s=_f(e.text);s.reduce(function(a,c){return i.ctx.fillText(c,a,e.bounds.top+r),a+i.ctx.measureText(c).width},e.bounds.left)}},A.prototype.createFontStyle=function(e){var n=e.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),r=XN(e.fontFamily).join(", "),i=oo(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,n,e.fontWeight,i,r].join(" "),r,i]},A.prototype.renderTextNode=function(e,n){return lt(this,void 0,void 0,function(){var r,i,s,a,c,u,f,h,g=this;return Ze(this,function(m){return r=this.createFontStyle(n),i=r[0],s=r[1],a=r[2],this.ctx.font=i,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",c=this.fontMetrics.getMetrics(s,a),u=c.baseline,f=c.middle,h=n.paintOrder,e.textBounds.forEach(function(w){h.forEach(function(U){switch(U){case 0:g.ctx.fillStyle=xe(n.color),g.renderTextWithLetterSpacing(w,n.letterSpacing,u);var b=n.textShadow;b.length&&w.text.trim().length&&(b.slice(0).reverse().forEach(function(E){g.ctx.shadowColor=xe(E.color),g.ctx.shadowOffsetX=E.offsetX.number*g.options.scale,g.ctx.shadowOffsetY=E.offsetY.number*g.options.scale,g.ctx.shadowBlur=E.blur.number,g.renderTextWithLetterSpacing(w,n.letterSpacing,u)}),g.ctx.shadowColor="",g.ctx.shadowOffsetX=0,g.ctx.shadowOffsetY=0,g.ctx.shadowBlur=0),n.textDecorationLine.length&&(g.ctx.fillStyle=xe(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(E){switch(E){case 1:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top+u),w.bounds.width,1);break;case 2:g.ctx.fillRect(w.bounds.left,Math.round(w.bounds.top),w.bounds.width,1);break;case 3:g.ctx.fillRect(w.bounds.left,Math.ceil(w.bounds.top+f),w.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&w.text.trim().length&&(g.ctx.strokeStyle=xe(n.webkitTextStrokeColor),g.ctx.lineWidth=n.webkitTextStrokeWidth,g.ctx.lineJoin=window.chrome?"miter":"round",g.ctx.strokeText(w.text,w.bounds.left,w.bounds.top+u)),g.ctx.strokeStyle="",g.ctx.lineWidth=0,g.ctx.lineJoin="miter";break}})}),[2]})})},A.prototype.renderReplacedElement=function(e,n,r){if(r&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=gl(e),s=dl(n);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return lt(this,void 0,void 0,function(){var n,r,i,s,a,c,I,I,u,f,h,g,Q,m,w,N,U,b,E,I,M,Q,N;return Ze(this,function(T){switch(T.label){case 0:this.applyEffects(e.getEffects(4)),n=e.container,r=e.curves,i=n.styles,s=0,a=n.textNodes,T.label=1;case 1:return s<a.length?(c=a[s],[4,this.renderTextNode(c,i)]):[3,4];case 2:T.sent(),T.label=3;case 3:return s++,[3,1];case 4:if(!(n instanceof Kw))return[3,8];T.label=5;case 5:return T.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return I=T.sent(),this.renderReplacedElement(n,r,I),[3,8];case 7:return T.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof Pw&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof Vw))return[3,12];T.label=9;case 9:return T.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return I=T.sent(),this.renderReplacedElement(n,r,I),[3,12];case 11:return T.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof Xw&&n.tree?(u=new A(this.context,{scale:this.options.scale,backgroundColor:n.backgroundColor,x:0,y:0,width:n.width,height:n.height}),[4,u.render(n.tree)]):[3,14];case 13:f=T.sent(),n.width&&n.height&&this.ctx.drawImage(f,0,0,n.width,n.height,n.bounds.left,n.bounds.top,n.bounds.width,n.bounds.height),T.label=14;case 14:if(n instanceof Of&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===il?n.checked&&(this.ctx.save(),this.path([new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79),new Z(n.bounds.left+h*.16,n.bounds.top+h*.5549),new Z(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new Z(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new Z(n.bounds.left+h*.72983,n.bounds.top+h*.23),new Z(n.bounds.left+h*.84,n.bounds.top+h*.34085),new Z(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=xe(Ww),this.ctx.fill(),this.ctx.restore()):n.type===sl&&n.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(n.bounds.left+h/2,n.bounds.top+h/2,h/4,0,Math.PI*2,!0),this.ctx.fillStyle=xe(Ww),this.ctx.fill(),this.ctx.restore())),GN(n)&&n.value.length){switch(g=this.createFontStyle(i),Q=g[0],m=g[1],w=this.fontMetrics.getMetrics(Q,m).baseline,this.ctx.font=Q,this.ctx.fillStyle=xe(i.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=$N(n.styles.textAlign),N=gl(n),U=0,n.styles.textAlign){case 1:U+=N.width/2;break;case 2:U+=N.width;break}b=N.add(U,0,0,-N.height/2+1),this.ctx.save(),this.path([new Z(N.left,N.top),new Z(N.left+N.width,N.top),new Z(N.left+N.width,N.top+N.height),new Z(N.left,N.top+N.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new fo(n.value,b),i.letterSpacing,w),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ue(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(E=n.styles.listStyleImage,E.type!==0)return[3,18];I=void 0,M=E.url,T.label=15;case 15:return T.trys.push([15,17,,18]),[4,this.context.cache.match(M)];case 16:return I=T.sent(),this.ctx.drawImage(I,n.bounds.left-(I.width+10),n.bounds.top),[3,18];case 17:return T.sent(),this.context.logger.error("Error loading list-style-image "+M),[3,18];case 18:return[3,20];case 19:e.listValue&&n.styles.listStyleType!==-1&&(Q=this.createFontStyle(i)[0],this.ctx.font=Q,this.ctx.fillStyle=xe(i.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",N=new Pn(n.bounds.left,n.bounds.top+ee(n.styles.paddingTop,n.bounds.width),n.bounds.width,Ew(i.lineHeight,i.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new fo(e.listValue,N),i.letterSpacing,Ew(i.lineHeight,i.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),T.label=20;case 20:return[2]}})})},A.prototype.renderStackContent=function(e){return lt(this,void 0,void 0,function(){var n,r,E,i,s,E,a,c,E,u,f,E,h,g,E,m,w,E,U,b,E;return Ze(this,function(I){switch(I.label){case 0:if(Ue(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:I.sent(),n=0,r=e.negativeZIndex,I.label=2;case 2:return n<r.length?(E=r[n],[4,this.renderStack(E)]):[3,5];case 3:I.sent(),I.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:I.sent(),i=0,s=e.nonInlineLevel,I.label=7;case 7:return i<s.length?(E=s[i],[4,this.renderNode(E)]):[3,10];case 8:I.sent(),I.label=9;case 9:return i++,[3,7];case 10:a=0,c=e.nonPositionedFloats,I.label=11;case 11:return a<c.length?(E=c[a],[4,this.renderStack(E)]):[3,14];case 12:I.sent(),I.label=13;case 13:return a++,[3,11];case 14:u=0,f=e.nonPositionedInlineLevel,I.label=15;case 15:return u<f.length?(E=f[u],[4,this.renderStack(E)]):[3,18];case 16:I.sent(),I.label=17;case 17:return u++,[3,15];case 18:h=0,g=e.inlineLevel,I.label=19;case 19:return h<g.length?(E=g[h],[4,this.renderNode(E)]):[3,22];case 20:I.sent(),I.label=21;case 21:return h++,[3,19];case 22:m=0,w=e.zeroOrAutoZIndexOrTransformedOrOpacity,I.label=23;case 23:return m<w.length?(E=w[m],[4,this.renderStack(E)]):[3,26];case 24:I.sent(),I.label=25;case 25:return m++,[3,23];case 26:U=0,b=e.positiveZIndex,I.label=27;case 27:return U<b.length?(E=b[U],[4,this.renderStack(E)]):[3,30];case 28:I.sent(),I.label=29;case 29:return U++,[3,27];case 30:return[2]}})})},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var n=this;e.forEach(function(r,i){var s=$t(r)?r.start:r;i===0?n.ctx.moveTo(s.x,s.y):n.ctx.lineTo(s.x,s.y),$t(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},A.prototype.renderRepeat=function(e,n,r,i){this.path(e),this.ctx.fillStyle=n,this.ctx.translate(r,i),this.ctx.fill(),this.ctx.translate(-r,-i)},A.prototype.resizeImage=function(e,n,r){var i;if(e.width===n&&e.height===r)return e;var s=(i=this.canvas.ownerDocument)!==null&&i!==void 0?i:document,a=s.createElement("canvas");a.width=Math.max(1,n),a.height=Math.max(1,r);var c=a.getContext("2d");return c.drawImage(e,0,0,e.width,e.height,0,0,n,r),a},A.prototype.renderBackgroundImage=function(e){return lt(this,void 0,void 0,function(){var n,r,i,s,a,c;return Ze(this,function(u){switch(u.label){case 0:n=e.styles.backgroundImage.length-1,r=function(f){var h,g,m,sA,kA,OA,lA,xA,Y,w,sA,kA,OA,lA,xA,U,b,E,I,M,Q,N,T,H,Y,V,sA,yA,dA,lA,xA,te,kA,OA,nA,hA,LA,RA,ie,KA,YA,VA;return Ze(this,function(ue){switch(ue.label){case 0:if(f.type!==0)return[3,5];h=void 0,g=f.url,ue.label=1;case 1:return ue.trys.push([1,3,,4]),[4,i.context.cache.match(g)];case 2:return h=ue.sent(),[3,4];case 3:return ue.sent(),i.context.logger.error("Error loading background-image "+g),[3,4];case 4:return h&&(m=Gf(e,n,[h.width,h.height,h.width/h.height]),sA=m[0],kA=m[1],OA=m[2],lA=m[3],xA=m[4],Y=i.ctx.createPattern(i.resizeImage(h,lA,xA),"repeat"),i.renderRepeat(sA,Y,kA,OA)),[3,6];case 5:SL(f)?(w=Gf(e,n,[null,null,null]),sA=w[0],kA=w[1],OA=w[2],lA=w[3],xA=w[4],U=FL(f.angle,lA,xA),b=U[0],E=U[1],I=U[2],M=U[3],Q=U[4],N=document.createElement("canvas"),N.width=lA,N.height=xA,T=N.getContext("2d"),H=T.createLinearGradient(E,M,I,Q),uw(f.stops,b).forEach(function(Oe){return H.addColorStop(Oe.stop,xe(Oe.color))}),T.fillStyle=H,T.fillRect(0,0,lA,xA),lA>0&&xA>0&&(Y=i.ctx.createPattern(N,"repeat"),i.renderRepeat(sA,Y,kA,OA))):TL(f)&&(V=Gf(e,n,[null,null,null]),sA=V[0],yA=V[1],dA=V[2],lA=V[3],xA=V[4],te=f.position.length===0?[gf]:f.position,kA=ee(te[0],lA),OA=ee(te[te.length-1],xA),nA=UL(f,kA,OA,lA,xA),hA=nA[0],LA=nA[1],hA>0&&LA>0&&(RA=i.ctx.createRadialGradient(yA+kA,dA+OA,0,yA+kA,dA+OA,hA),uw(f.stops,hA*2).forEach(function(Oe){return RA.addColorStop(Oe.stop,xe(Oe.color))}),i.path(sA),i.ctx.fillStyle=RA,hA!==LA?(ie=e.bounds.left+.5*e.bounds.width,KA=e.bounds.top+.5*e.bounds.height,YA=LA/hA,VA=1/YA,i.ctx.save(),i.ctx.translate(ie,KA),i.ctx.transform(1,0,0,YA,0,0),i.ctx.translate(-ie,-KA),i.ctx.fillRect(yA,VA*(dA-KA)+KA,lA,xA*VA),i.ctx.restore()):i.ctx.fill())),ue.label=6;case 6:return n--,[2]}})},i=this,s=0,a=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return s<a.length?(c=a[s],[5,r(c)]):[3,4];case 2:u.sent(),u.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},A.prototype.renderSolidBorder=function(e,n,r){return lt(this,void 0,void 0,function(){return Ze(this,function(i){return this.path(CC(r,n)),this.ctx.fillStyle=xe(e),this.ctx.fill(),[2]})})},A.prototype.renderDoubleBorder=function(e,n,r,i){return lt(this,void 0,void 0,function(){var s,a;return Ze(this,function(c){switch(c.label){case 0:return n<3?[4,this.renderSolidBorder(e,r,i)]:[3,2];case 1:return c.sent(),[2];case 2:return s=ON(i,r),this.path(s),this.ctx.fillStyle=xe(e),this.ctx.fill(),a=LN(i,r),this.path(a),this.ctx.fill(),[2]}})})},A.prototype.renderNodeBackgroundAndBorders=function(e){return lt(this,void 0,void 0,function(){var n,r,i,s,a,c,u,f,h=this;return Ze(this,function(g){switch(g.label){case 0:return this.applyEffects(e.getEffects(2)),n=e.container.styles,r=!Sr(n.backgroundColor)||n.backgroundImage.length,i=[{style:n.borderTopStyle,color:n.borderTopColor,width:n.borderTopWidth},{style:n.borderRightStyle,color:n.borderRightColor,width:n.borderRightWidth},{style:n.borderBottomStyle,color:n.borderBottomColor,width:n.borderBottomWidth},{style:n.borderLeftStyle,color:n.borderLeftColor,width:n.borderLeftWidth}],s=WN(ns(n.backgroundClip,0),e.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),Sr(n.backgroundColor)||(this.ctx.fillStyle=xe(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:g.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(m){h.ctx.save();var w=fl(e.curves),U=m.inset?0:PN,b=_N(w,-U+(m.inset?1:-1)*m.spread.number,(m.inset?1:-1)*m.spread.number,m.spread.number*(m.inset?-2:2),m.spread.number*(m.inset?-2:2));m.inset?(h.path(w),h.ctx.clip(),h.mask(b)):(h.mask(w),h.ctx.clip(),h.path(b)),h.ctx.shadowOffsetX=m.offsetX.number+U,h.ctx.shadowOffsetY=m.offsetY.number,h.ctx.shadowColor=xe(m.color),h.ctx.shadowBlur=m.blur.number,h.ctx.fillStyle=m.inset?xe(m.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),g.label=2;case 2:a=0,c=0,u=i,g.label=3;case 3:return c<u.length?(f=u[c],f.style!==0&&!Sr(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,2)]:[3,11]):[3,13];case 4:return g.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,a,e.curves,3)];case 6:return g.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,a,e.curves)];case 8:return g.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,a,e.curves)];case 10:g.sent(),g.label=11;case 11:a++,g.label=12;case 12:return c++,[3,3];case 13:return[2]}})})},A.prototype.renderDashedDottedBorder=function(e,n,r,i,s){return lt(this,void 0,void 0,function(){var a,c,u,f,h,g,m,w,U,b,E,I,M,Q,N,T,N,T;return Ze(this,function(H){return this.ctx.save(),a=HN(i,r),c=CC(i,r),s===2&&(this.path(c),this.ctx.clip()),$t(c[0])?(u=c[0].start.x,f=c[0].start.y):(u=c[0].x,f=c[0].y),$t(c[1])?(h=c[1].end.x,g=c[1].end.y):(h=c[1].x,g=c[1].y),r===0||r===2?m=Math.abs(u-h):m=Math.abs(f-g),this.ctx.beginPath(),s===3?this.formatPath(a):this.formatPath(c.slice(0,2)),w=n<3?n*3:n*2,U=n<3?n*2:n,s===3&&(w=n,U=n),b=!0,m<=w*2?b=!1:m<=w*2+U?(E=m/(2*w+U),w*=E,U*=E):(I=Math.floor((m+U)/(w+U)),M=(m-I*w)/(I-1),Q=(m-(I+1)*w)/I,U=Q<=0||Math.abs(U-M)<Math.abs(U-Q)?M:Q),b&&(s===3?this.ctx.setLineDash([0,w+U]):this.ctx.setLineDash([w,U])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=xe(e),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&($t(c[0])&&(N=c[3],T=c[0],this.ctx.beginPath(),this.formatPath([new Z(N.end.x,N.end.y),new Z(T.start.x,T.start.y)]),this.ctx.stroke()),$t(c[1])&&(N=c[1],T=c[2],this.ctx.beginPath(),this.formatPath([new Z(N.end.x,N.end.y),new Z(T.start.x,T.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},A.prototype.render=function(e){return lt(this,void 0,void 0,function(){var n;return Ze(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=xe(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=xN(e),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},A}(QC),GN=function(t){return t instanceof Jw||t instanceof $w?!0:t instanceof Of&&t.type!==sl&&t.type!==il},WN=function(t,A){switch(t){case 0:return fl(A);case 2:return bN(A);case 1:default:return dl(A)}},$N=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},JN=["-apple-system","system-ui"],XN=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(A){return JN.indexOf(A)===-1}):t},YN=function(t){ln(A,t);function A(e,n){var r=t.call(this,e,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return A.prototype.render=function(e){return lt(this,void 0,void 0,function(){var n,r;return Ze(this,function(i){switch(i.label){case 0:return n=Tf(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,zN(n)];case 1:return r=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=xe(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(r,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},A}(QC),zN=function(t){return new Promise(function(A,e){var n=new Image;n.onload=function(){A(n)},n.onerror=e,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},qN=function(){function t(A){var e=A.id,n=A.enabled;this.id=e,this.enabled=n,this.start=Date.now()}return t.prototype.debug=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Ua([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Ua([this.id,this.getTime()+"ms"],A))},t.prototype.warn=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Ua([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.prototype.error=function(){for(var A=[],e=0;e<arguments.length;e++)A[e]=arguments[e];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Ua([this.id,this.getTime()+"ms"],A)):this.info.apply(this,A))},t.instances={},t}(),ZN=function(){function t(A,e){var n;this.windowBounds=e,this.instanceName="#"+t.instanceCount++,this.logger=new qN({id:this.instanceName,enabled:A.logging}),this.cache=(n=A.cache)!==null&&n!==void 0?n:new mN(this,A)}return t.instanceCount=1,t}(),jN=function(t,A){return A===void 0&&(A={}),AD(t,A)};typeof window<"u"&&hC.setContext(window);var AD=function(t,A){return lt(void 0,void 0,void 0,function(){var e,n,r,i,s,a,c,u,f,h,g,m,w,U,b,E,I,M,Q,N,H,T,H,Y,V,sA,yA,dA,lA,xA,te,kA,OA,nA,hA,LA,RA,ie,KA,YA;return Ze(this,function(VA){switch(VA.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(e=t.ownerDocument,!e)throw new Error("Element is not attached to a Document");if(n=e.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(Y=A.allowTaint)!==null&&Y!==void 0?Y:!1,imageTimeout:(V=A.imageTimeout)!==null&&V!==void 0?V:15e3,proxy:A.proxy,useCORS:(sA=A.useCORS)!==null&&sA!==void 0?sA:!1},i=Xu({logging:(yA=A.logging)!==null&&yA!==void 0?yA:!0,cache:A.cache},r),s={windowWidth:(dA=A.windowWidth)!==null&&dA!==void 0?dA:n.innerWidth,windowHeight:(lA=A.windowHeight)!==null&&lA!==void 0?lA:n.innerHeight,scrollX:(xA=A.scrollX)!==null&&xA!==void 0?xA:n.pageXOffset,scrollY:(te=A.scrollY)!==null&&te!==void 0?te:n.pageYOffset},a=new Pn(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),c=new ZN(i,a),u=(kA=A.foreignObjectRendering)!==null&&kA!==void 0?kA:!1,f={allowTaint:(OA=A.allowTaint)!==null&&OA!==void 0?OA:!1,onclone:A.onclone,ignoreElements:A.ignoreElements,inlineImages:u,copyStyles:u},c.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new fC(c,t,f),g=h.clonedReferenceElement,g?[4,h.toIFrame(e,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return m=VA.sent(),w=Hf(g)||eN(g)?_x(g.ownerDocument):ba(c,g),U=w.width,b=w.height,E=w.left,I=w.top,M=eD(c,g,A.backgroundColor),Q={canvas:A.canvas,backgroundColor:M,scale:(hA=(nA=A.scale)!==null&&nA!==void 0?nA:n.devicePixelRatio)!==null&&hA!==void 0?hA:1,x:((LA=A.x)!==null&&LA!==void 0?LA:0)+E,y:((RA=A.y)!==null&&RA!==void 0?RA:0)+I,width:(ie=A.width)!==null&&ie!==void 0?ie:Math.ceil(U),height:(KA=A.height)!==null&&KA!==void 0?KA:Math.ceil(b)},u?(c.logger.debug("Document cloned, using foreign object rendering"),H=new YN(c,Q),[4,H.render(g)]):[3,3];case 2:return N=VA.sent(),[3,5];case 3:return c.logger.debug("Document cloned, element located at "+E+","+I+" with size "+U+"x"+b+" using computed rendering"),c.logger.debug("Starting DOM parsing"),T=zw(c,g),M===T.styles.backgroundColor&&(T.styles.backgroundColor=Gn.TRANSPARENT),c.logger.debug("Starting renderer for element at "+Q.x+","+Q.y+" with size "+Q.width+"x"+Q.height),H=new VN(c,Q),[4,H.render(T)];case 4:N=VA.sent(),VA.label=5;case 5:return(!((YA=A.removeContainer)!==null&&YA!==void 0)||YA)&&(fC.destroy(m)||c.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),c.logger.debug("Finished rendering"),[2,N]}})})},eD=function(t,A,e){var n=A.ownerDocument,r=n.documentElement?lo(t,getComputedStyle(n.documentElement).backgroundColor):Gn.TRANSPARENT,i=n.body?lo(t,getComputedStyle(n.body).backgroundColor):Gn.TRANSPARENT,s=typeof e=="string"?lo(t,e):e===null?Gn.TRANSPARENT:4294967295;return A===n.documentElement?Sr(r)?Sr(i)?s:i:r:s};const tD=p.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:A}){const e=t,n=A,r=p.ref(),i=p.ref(""),s=p.ref();async function a(){if(r.value){const u=r.value,h=(await jN(u.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:u.offsetWidth,height:u.offsetHeight})).toDataURL();if(n("update:modelValue",h),e.debug){const g=new Image;g.src=h,document.body.appendChild(g)}return h}return""}const c=dm.debounce(async()=>{i.value=await a()},300,{trailing:!0,leading:!1});return p.onMounted(()=>{const u=r.value;e.renderUpdates&&(s.value=new MutationObserver(async f=>{c()}),s.value.observe(u,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{c()},500)}),(u,f)=>(p.openBlock(),p.createElementBlock("div",{class:p.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:r,style:p.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[p.renderSlot(u.$slots,"default")],6))}}),nD={class:"link-sharing"},rD={key:0,class:"link-sharing__links container"},iD={class:"row"},sD={key:0,class:"col-12 col-md-6"},oD=["href"],aD={class:"caption"},lD={key:1,class:"col-12 col-md-6"},cD=["href"],uD={class:"caption"},fD={key:2,class:"col-12 col-md-6"},dD={class:"caption"},hD={key:3,class:"col-12 col-md-6"},pD=["href"],gD={class:"caption"},BD={key:4,class:"col-12 col-md-6"},mD=["href"],wD={class:"caption"},CD={key:5,class:"col-12 col-md-6"},yD={class:"caption"},ED={key:6,class:"col-12 col-md-6"},QD=["href"],FD={class:"caption"},UD={key:1,class:"link-sharing__instructions pt-5"},bD={class:"row"},vD={class:"col-12 text-center py-0"},ID={class:"mb-5"},SD=t=>t.replace(/<(?:.|\n)*?>/gm,""),TD=p.defineComponent({__name:"link-sharing",props:{url:{type:String,default:""},subject:{type:String,default:""},hashtags:Array,text:{type:String,default:""},media:{type:String,default:""},services:{type:Object,default:{facebook:!0,instagram:!0,linkedin:!0,whatsapp:!0,mailto:!0,clipboard:!0,x:!0}}},setup(t){const A=t,e=p.ref(!1),n=p.computed(()=>encodeURIComponent(A.url));p.computed(()=>encodeURIComponent(A.media));const r=p.computed(()=>SD(A.text)),i=p.computed(()=>!!(navigator&&navigator.userAgent&&/Mobi|Android/i.test(navigator.userAgent)));async function s(){const a=document.createElement("textarea");document.body.appendChild(a),a.value=A.url,a.select(),a.setSelectionRange(0,99999),navigator.clipboard.writeText(a.value),document.body.removeChild(a)}return(a,c)=>{const u=p.resolveComponent("svg-icon");return p.openBlock(),p.createElementBlock("div",nD,[e.value?(p.openBlock(),p.createElementBlock("div",UD,[p.createElementVNode("div",bD,[p.createElementVNode("div",vD,[p.createElementVNode("div",ID,[p.createElementVNode("p",null,p.toDisplayString(a.$t("sharing.instructions",{service:"Instagram"})),1),p.createElementVNode("p",null,[p.createElementVNode("strong",null,p.toDisplayString(t.hashtags),1)])])])])])):(p.openBlock(),p.createElementBlock("div",rD,[p.createElementVNode("div",iD,[t.services.facebook?(p.openBlock(),p.createElementBlock("div",sD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.facebook.com/sharer.php?u=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"facebook"}),p.createElementVNode("span",aD,p.toDisplayString(a.$t("sharing.facebook")),1)],8,oD)])):p.createCommentVNode("",!0),t.services.x?(p.openBlock(),p.createElementBlock("div",lD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://x.com/share?text=${t.subject}&url=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"x-logo"}),p.createElementVNode("span",uD,p.toDisplayString(a.$t("sharing.x")),1)],8,cD)])):p.createCommentVNode("",!0),t.services.instagram?(p.openBlock(),p.createElementBlock("div",fD,[p.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:c[0]||(c[0]=p.withModifiers(f=>e.value=!e.value,["prevent"]))},[p.createVNode(u,{symbol:"instagram"}),p.createElementVNode("span",dD,p.toDisplayString(a.$t("sharing.instagram")),1)])])):p.createCommentVNode("",!0),t.services.linkedin?(p.openBlock(),p.createElementBlock("div",hD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`https://www.linkedin.com/shareArticle?mini=true&url=${n.value}&title=${t.subject}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"linkedin"}),p.createElementVNode("span",gD,p.toDisplayString(a.$t("sharing.linkedin")),1)],8,pD)])):p.createCommentVNode("",!0),t.services.whatsapp&&i.value?(p.openBlock(),p.createElementBlock("div",BD,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`whatsapp://send?text=${n.value}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"whatsapp"}),p.createElementVNode("span",wD,p.toDisplayString(a.$t("sharing.whatsapp")),1)],8,mD)])):p.createCommentVNode("",!0),t.services.clipboard?(p.openBlock(),p.createElementBlock("div",CD,[p.createElementVNode("button",{type:"button",class:"link-sharing__link btn btn-primary",onClick:p.withModifiers(s,["prevent","stop"])},[p.createVNode(u,{symbol:"copy"}),p.createElementVNode("span",yD,p.toDisplayString(a.$t("sharing.clipboard")),1)])])):p.createCommentVNode("",!0),t.services.mailto?(p.openBlock(),p.createElementBlock("div",ED,[p.createElementVNode("a",{class:"link-sharing__link btn btn-primary",href:`mailto:?subject=${t.subject}&body=${r.value}%0D%0A${t.url}`,target:"_blank",rel:"noopener"},[p.createVNode(u,{symbol:"mail"}),p.createElementVNode("span",FD,p.toDisplayString(a.$t("sharing.mailto")),1)],8,QD)])):p.createCommentVNode("",!0)])]))])}}}),kG="",_D={class:"base-form"},xD=p.defineComponent({__name:"base-form",props:{id:{},name:{},variant:{},disabled:{type:Boolean},pending:{type:Boolean}},setup(t){function A(r){console.log("input",r)}function e(r){console.log("reset",r)}function n(r){console.log("submit",r)}return(r,i)=>(p.openBlock(),p.createElementBlock("div",_D,[p.createElementVNode("form",{ref:"form",onInput:A,onReset:e,onSubmit:p.withModifiers(n,["prevent"])},[p.renderSlot(r.$slots,"default")],544)]))}}),RG="",OD={class:"modal-dialog__content"},LD={class:"modal-dialog__header d-flex p-2"},HD={key:0,class:"modal-dialog__title",id:"exampleModalLabel"},MD={class:"modal-dialog__body"},ND={key:0,class:"modal-dialog__footer d-flex p-2"},DD=p.defineComponent({__name:"modal-dialog",props:{modelValue:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},size:{type:String,default:"md"},dismiss:{type:Boolean,default:!0},title:{type:String,default:""},footer:{type:Boolean,default:!0},classes:{type:String,default:""}},emits:["update:modelValue","confirm","cancel"],setup(t,{expose:A,emit:e}){const n=t,r=e,i=p.ref();function s(){var g,m;document.documentElement.style.setProperty("--scroll-position",`${Math.round(document.documentElement.scrollTop)}px`),n.modal?(g=i.value)==null||g.showModal():(m=i.value)==null||m.show(),r("update:modelValue",!0)}function a(){const g=i.value&&new KeyframeEffect(i.value,[{translate:"0 -100%",opacity:"0"}],{duration:320,easing:"ease",direction:"normal"}),m=new Animation(g,document.timeline);m.play(),m.addEventListener("finish",()=>{var w;(w=i.value)==null||w.close(),c()}),r("update:modelValue",!1)}function c(){const g=getComputedStyle(document.documentElement).getPropertyValue("--scroll-position");document.documentElement.scrollTo({top:parseInt(g,10),behavior:"instant"}),r("update:modelValue",!1)}function u(g){s(),r("confirm",g)}function f(){a(),r("cancel")}function h(g){const m=g.target;m&&m.nodeName==="DIALOG"&&a()}return p.watch(()=>n.modelValue,(g,m)=>{g&&g!==m?s():m&&a()},{immediate:!0}),p.onMounted(()=>{var g;(g=i.value)==null||g.addEventListener("cancel",m=>{m.preventDefault(),a()}),n.dismiss&&document.addEventListener("click",h),n.modelValue&&s()}),p.onBeforeUnmount(()=>{n.dismiss&&document.removeEventListener("click",h)}),A({show:s,close:a,confirm:u,cancel:f}),(g,m)=>(p.openBlock(),p.createElementBlock("dialog",{ref_key:"dialog",ref:i,class:p.normalizeClass(["modal-dialog",{[`modal-dialog--${t.size}`]:t.size}]),onClose:c},[p.createElementVNode("div",OD,[p.createElementVNode("div",LD,[t.title?(p.openBlock(),p.createElementBlock("h5",HD,p.toDisplayString(t.title),1)):p.createCommentVNode("",!0),p.createElementVNode("button",{type:"button",class:"btn-close ms-auto","aria-label":"Close",onClick:a})]),p.createElementVNode("div",MD,[p.renderSlot(g.$slots,"default")]),t.footer?(p.openBlock(),p.createElementBlock("div",ND,[p.renderSlot(g.$slots,"footer"),p.createElementVNode("button",{type:"button",class:"btn ms-auto",onClick:a},p.toDisplayString(g.$t("common.close")),1)])):p.createCommentVNode("",!0)])],34))}}),KG="";MA.Accordion=CE,MA.AccordionItem=pE,MA.AssetUploader=dx,MA.BaseButton=EE,MA.BaseCamera=e_,MA.BaseCarousel=ym,MA.BaseForm=xD,MA.BaseHeadline=iE,MA.BaseImage=rE,MA.BaseInput=bE,MA.BaseParagraph=oE,MA.CheckGroup=DE,MA.DomRenderer=tD,MA.FileUpload=tx,MA.InputCheckbox=LE,MA.InputColor=b1,MA.InputDropdown=LT,MA.InputFile=qE,MA.InputTextarea=TE,MA.LinkSharing=TD,MA.LoadingSpinner=tE,MA.MediaThumbnails=yx,MA.ModalDialog=DD,MA.ProgressSteps=Tx,MA.RadioGroup=VE,MA.RteEditor=E1,MA.SvgIcon=jy,MA.UploadGroup=Cm,Object.defineProperty(MA,Symbol.toStringTag,{value:"Module"})});
|