ablok-components 0.2.18 → 0.2.19

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.
@@ -38819,6 +38819,10 @@ const jue = /* @__PURE__ */ Ye({
38819
38819
  type: Boolean,
38820
38820
  default: !1
38821
38821
  },
38822
+ emitPending: {
38823
+ type: Boolean,
38824
+ default: !1
38825
+ },
38822
38826
  debug: {
38823
38827
  type: Boolean,
38824
38828
  default: !1
@@ -38829,7 +38833,7 @@ const jue = /* @__PURE__ */ Ye({
38829
38833
  const A = t, n = e, r = de(), i = de(""), s = de();
38830
38834
  async function o() {
38831
38835
  if (r.value) {
38832
- n("update:pending", !0);
38836
+ A.emitPending && n("update:pending", !0);
38833
38837
  const u = r.value, d = u.firstElementChild, f = d.offsetWidth, h = d.offsetHeight, m = (await $te(u.firstElementChild, {
38834
38838
  backgroundColor: "rgba(0, 0, 0, 0)",
38835
38839
  scale: 1,
@@ -38837,7 +38841,7 @@ const jue = /* @__PURE__ */ Ye({
38837
38841
  height: h,
38838
38842
  ...A.options
38839
38843
  })).toDataURL();
38840
- if (n("update:modelValue", m), n("update:pending", !1), A.debug) {
38844
+ if (n("update:modelValue", m), A.emitPending && n("update:pending", !1), A.debug) {
38841
38845
  const B = new Image();
38842
38846
  B.src = m, document.body.appendChild(B);
38843
38847
  }
@@ -38851,14 +38855,14 @@ const jue = /* @__PURE__ */ Ye({
38851
38855
  return Xt(() => {
38852
38856
  const u = r.value;
38853
38857
  A.renderUpdates && (s.value = new MutationObserver(async (d) => {
38854
- a();
38858
+ A.emitPending && n("update:pending", !0), a();
38855
38859
  }), s.value.observe(u, {
38856
38860
  attributes: !0,
38857
38861
  childList: !0,
38858
38862
  characterData: !0,
38859
38863
  subtree: !0
38860
38864
  })), setTimeout(() => {
38861
- a();
38865
+ A.emitPending && n("update:pending", !0), a();
38862
38866
  }, 500);
38863
38867
  }), (u, d) => (O(), G("div", {
38864
38868
  class: _e(["dom-renderer", {
@@ -161,7 +161,7 @@ function print() { __p += __j.call(arguments, '') }
161
161
  content: "" !important;
162
162
  display: none !important;
163
163
  }`,nJ=function(t){rJ(t,"."+kB+tJ+$S+`
164
- .`+SB+AJ+$S)},rJ=function(t,e){var A=t.ownerDocument;if(A){var n=A.createElement("style");n.textContent=e,t.appendChild(n)}},KS=(function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t})(),oJ=(function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(FB(e)||lJ(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return dn(this,void 0,void 0,function(){var A,n,r,o,i=this;return ZA(this,function(a){switch(a.label){case 0:return A=KS.isSameOrigin(e),n=!QB(e)&&this._options.useCORS===!0&&KA.SUPPORT_CORS_IMAGES&&!A,r=!QB(e)&&!A&&!FB(e)&&typeof this._options.proxy=="string"&&KA.SUPPORT_CORS_XHR&&!n,!A&&this._options.allowTaint===!1&&!QB(e)&&!FB(e)&&!r&&!n?[2]:(o=e,r?[4,this.proxy(o)]:[3,2]);case 1:o=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(l,u){var f=new Image;f.onload=function(){return l(f)},f.onerror=u,(cJ(o)||n)&&(f.crossOrigin="anonymous"),f.src=o,f.complete===!0&&setTimeout(function(){return l(f)},500),i._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise(function(o,i){var a=KA.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(a==="text")o(l.response);else{var h=new FileReader;h.addEventListener("load",function(){return o(h.result)},!1),h.addEventListener("error",function(p){return i(p)},!1),h.readAsDataURL(l.response)}else i("Failed to proxy resource "+r+" with status code "+l.status)},l.onerror=i;var u=n.indexOf("?")>-1?"&":"?";if(l.open("GET",""+n+u+"url="+encodeURIComponent(e)+"&responseType="+a),a!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=a),A._options.imageTimeout){var f=A._options.imageTimeout;l.timeout=f,l.ontimeout=function(){return i("Timed out ("+f+"ms) proxying "+r)}}l.send()})},t})(),iJ=/^data:image\/svg\+xml/i,sJ=/^data:image\/.*;base64,/i,aJ=/^data:image\/.*/i,lJ=function(t){return KA.SUPPORT_SVG_DRAWING||!uJ(t)},QB=function(t){return aJ.test(t)},cJ=function(t){return sJ.test(t)},FB=function(t){return t.substr(0,4)==="blob"},uJ=function(t){return t.substr(-3).toLowerCase()==="svg"||iJ.test(t)},Te=(function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t})(),xa=function(t,e,A){return new Te(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Qf=(function(){function t(e,A,n,r){this.type=1,this.start=e,this.startControl=A,this.endControl=n,this.end=r}return t.prototype.subdivide=function(e,A){var n=xa(this.start,this.startControl,e),r=xa(this.startControl,this.endControl,e),o=xa(this.endControl,this.end,e),i=xa(n,r,e),a=xa(r,o,e),l=xa(i,a,e);return A?new t(this.start,n,i,l):new t(l,a,o,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t})(),or=function(t){return t.type===1},dJ=(function(){function t(e){var A=e.styles,n=e.bounds,r=mc(A.borderTopLeftRadius,n.width,n.height),o=r[0],i=r[1],a=mc(A.borderTopRightRadius,n.width,n.height),l=a[0],u=a[1],f=mc(A.borderBottomRightRadius,n.width,n.height),h=f[0],p=f[1],g=mc(A.borderBottomLeftRadius,n.width,n.height),B=g[0],y=g[1],b=[];b.push((o+l)/n.width),b.push((B+h)/n.width),b.push((i+y)/n.height),b.push((u+p)/n.height);var w=Math.max.apply(Math,b);w>1&&(o/=w,i/=w,l/=w,u/=w,h/=w,p/=w,B/=w,y/=w);var v=n.width-l,k=n.height-p,F=n.width-h,x=n.height-y,Q=A.borderTopWidth,I=A.borderRightWidth,M=A.borderBottomWidth,O=A.borderLeftWidth,P=Mt(A.paddingTop,e.bounds.width),ie=Mt(A.paddingRight,e.bounds.width),ae=Mt(A.paddingBottom,e.bounds.width),ue=Mt(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=o>0||i>0?Yt(n.left+O/3,n.top+Q/3,o-O/3,i-Q/3,Et.TOP_LEFT):new Te(n.left+O/3,n.top+Q/3),this.topRightBorderDoubleOuterBox=o>0||i>0?Yt(n.left+v,n.top+Q/3,l-I/3,u-Q/3,Et.TOP_RIGHT):new Te(n.left+n.width-I/3,n.top+Q/3),this.bottomRightBorderDoubleOuterBox=h>0||p>0?Yt(n.left+F,n.top+k,h-I/3,p-M/3,Et.BOTTOM_RIGHT):new Te(n.left+n.width-I/3,n.top+n.height-M/3),this.bottomLeftBorderDoubleOuterBox=B>0||y>0?Yt(n.left+O/3,n.top+x,B-O/3,y-M/3,Et.BOTTOM_LEFT):new Te(n.left+O/3,n.top+n.height-M/3),this.topLeftBorderDoubleInnerBox=o>0||i>0?Yt(n.left+O*2/3,n.top+Q*2/3,o-O*2/3,i-Q*2/3,Et.TOP_LEFT):new Te(n.left+O*2/3,n.top+Q*2/3),this.topRightBorderDoubleInnerBox=o>0||i>0?Yt(n.left+v,n.top+Q*2/3,l-I*2/3,u-Q*2/3,Et.TOP_RIGHT):new Te(n.left+n.width-I*2/3,n.top+Q*2/3),this.bottomRightBorderDoubleInnerBox=h>0||p>0?Yt(n.left+F,n.top+k,h-I*2/3,p-M*2/3,Et.BOTTOM_RIGHT):new Te(n.left+n.width-I*2/3,n.top+n.height-M*2/3),this.bottomLeftBorderDoubleInnerBox=B>0||y>0?Yt(n.left+O*2/3,n.top+x,B-O*2/3,y-M*2/3,Et.BOTTOM_LEFT):new Te(n.left+O*2/3,n.top+n.height-M*2/3),this.topLeftBorderStroke=o>0||i>0?Yt(n.left+O/2,n.top+Q/2,o-O/2,i-Q/2,Et.TOP_LEFT):new Te(n.left+O/2,n.top+Q/2),this.topRightBorderStroke=o>0||i>0?Yt(n.left+v,n.top+Q/2,l-I/2,u-Q/2,Et.TOP_RIGHT):new Te(n.left+n.width-I/2,n.top+Q/2),this.bottomRightBorderStroke=h>0||p>0?Yt(n.left+F,n.top+k,h-I/2,p-M/2,Et.BOTTOM_RIGHT):new Te(n.left+n.width-I/2,n.top+n.height-M/2),this.bottomLeftBorderStroke=B>0||y>0?Yt(n.left+O/2,n.top+x,B-O/2,y-M/2,Et.BOTTOM_LEFT):new Te(n.left+O/2,n.top+n.height-M/2),this.topLeftBorderBox=o>0||i>0?Yt(n.left,n.top,o,i,Et.TOP_LEFT):new Te(n.left,n.top),this.topRightBorderBox=l>0||u>0?Yt(n.left+v,n.top,l,u,Et.TOP_RIGHT):new Te(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||p>0?Yt(n.left+F,n.top+k,h,p,Et.BOTTOM_RIGHT):new Te(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=B>0||y>0?Yt(n.left,n.top+x,B,y,Et.BOTTOM_LEFT):new Te(n.left,n.top+n.height),this.topLeftPaddingBox=o>0||i>0?Yt(n.left+O,n.top+Q,Math.max(0,o-O),Math.max(0,i-Q),Et.TOP_LEFT):new Te(n.left+O,n.top+Q),this.topRightPaddingBox=l>0||u>0?Yt(n.left+Math.min(v,n.width-I),n.top+Q,v>n.width+I?0:Math.max(0,l-I),Math.max(0,u-Q),Et.TOP_RIGHT):new Te(n.left+n.width-I,n.top+Q),this.bottomRightPaddingBox=h>0||p>0?Yt(n.left+Math.min(F,n.width-O),n.top+Math.min(k,n.height-M),Math.max(0,h-I),Math.max(0,p-M),Et.BOTTOM_RIGHT):new Te(n.left+n.width-I,n.top+n.height-M),this.bottomLeftPaddingBox=B>0||y>0?Yt(n.left+O,n.top+Math.min(x,n.height-M),Math.max(0,B-O),Math.max(0,y-M),Et.BOTTOM_LEFT):new Te(n.left+O,n.top+n.height-M),this.topLeftContentBox=o>0||i>0?Yt(n.left+O+ue,n.top+Q+P,Math.max(0,o-(O+ue)),Math.max(0,i-(Q+P)),Et.TOP_LEFT):new Te(n.left+O+ue,n.top+Q+P),this.topRightContentBox=l>0||u>0?Yt(n.left+Math.min(v,n.width+O+ue),n.top+Q+P,v>n.width+O+ue?0:l-O+ue,u-(Q+P),Et.TOP_RIGHT):new Te(n.left+n.width-(I+ie),n.top+Q+P),this.bottomRightContentBox=h>0||p>0?Yt(n.left+Math.min(F,n.width-(O+ue)),n.top+Math.min(k,n.height+Q+P),Math.max(0,h-(I+ie)),p-(M+ae),Et.BOTTOM_RIGHT):new Te(n.left+n.width-(I+ie),n.top+n.height-(M+ae)),this.bottomLeftContentBox=B>0||y>0?Yt(n.left+O+ue,n.top+x,Math.max(0,B-(O+ue)),y-(M+ae),Et.BOTTOM_LEFT):new Te(n.left+O+ue,n.top+n.height-(M+ae))}return t})(),Et;(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"})(Et||(Et={}));var Yt=function(t,e,A,n,r){var o=4*((Math.sqrt(2)-1)/3),i=A*o,a=n*o,l=t+A,u=e+n;switch(r){case Et.TOP_LEFT:return new Qf(new Te(t,u),new Te(t,u-a),new Te(l-i,e),new Te(l,e));case Et.TOP_RIGHT:return new Qf(new Te(t,e),new Te(t+i,e),new Te(l,u-a),new Te(l,u));case Et.BOTTOM_RIGHT:return new Qf(new Te(l,e),new Te(l,e+a),new Te(t+i,u),new Te(t,u));case Et.BOTTOM_LEFT:default:return new Qf(new Te(l,u),new Te(l-i,u),new Te(t,e+a),new Te(t,e))}},Ff=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},fJ=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Uf=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},hJ=(function(){function t(e,A,n){this.offsetX=e,this.offsetY=A,this.matrix=n,this.type=0,this.target=6}return t})(),If=(function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t})(),pJ=(function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t})(),mJ=function(t){return t.type===0},GS=function(t){return t.type===1},gJ=function(t){return t.type===2},WS=function(t,e){return t.length===e.length?t.some(function(A,n){return A===e[n]}):!1},BJ=function(t,e,A,n,r){return t.map(function(o,i){switch(i){case 0:return o.add(e,A);case 1:return o.add(e+n,A);case 2:return o.add(e+n,A+r);case 3:return o.add(e,A+r)}return o})},zS=(function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t})(),YS=(function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new dJ(this.container),this.container.styles.opacity<1&&this.effects.push(new pJ(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,o=this.container.styles.transform;this.effects.push(new hJ(n,r,o))}if(this.container.styles.overflowX!==0){var i=Ff(this.curves),a=Uf(this.curves);WS(i,a)?this.effects.push(new If(i,6)):(this.effects.push(new If(i,2)),this.effects.push(new If(a,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var o=n.effects.filter(function(l){return!GS(l)});if(A||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,o),A=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var i=Ff(n.curves),a=Uf(n.curves);WS(i,a)||r.unshift(new If(a,6))}}else r.unshift.apply(r,o);n=n.parent}return r.filter(function(l){return vA(l.target,e)})},t})(),UB=function(t,e,A,n){t.container.elements.forEach(function(r){var o=vA(r.flags,4),i=vA(r.flags,2),a=new YS(r,t);vA(r.styles.display,2048)&&n.push(a);var l=vA(r.flags,8)?[]:n;if(o||i){var u=o||r.styles.isPositioned()?A:e,f=new zS(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var h=r.styles.zIndex.order;if(h<0){var p=0;u.negativeZIndex.some(function(B,y){return h>B.element.container.styles.zIndex.order?(p=y,!1):p>0}),u.negativeZIndex.splice(p,0,f)}else if(h>0){var g=0;u.positiveZIndex.some(function(B,y){return h>=B.element.container.styles.zIndex.order?(g=y+1,!1):g>0}),u.positiveZIndex.splice(g,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else r.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);UB(a,f,o?f:A,l)}else r.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a),UB(a,e,A,l);vA(r.flags,8)&&JS(r,l)})},JS=function(t,e){for(var A=t instanceof BB?t.start:1,n=t instanceof BB?t.reversed:!1,r=0;r<e.length;r++){var o=e[r];o.container instanceof wS&&typeof o.container.value=="number"&&o.container.value!==0&&(A=o.container.value),o.listValue=bc(A,o.container.styles.listStyleType,!0),A+=n?-1:1}},yJ=function(t){var e=new YS(t,null),A=new zS(e),n=[];return UB(e,A,A,n),JS(e.container,n),A},XS=function(t,e){switch(e){case 0:return ir(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return ir(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return ir(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return ir(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},wJ=function(t,e){switch(e){case 0:return ir(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return ir(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return ir(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return ir(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},CJ=function(t,e){switch(e){case 0:return ir(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return ir(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return ir(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return ir(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},bJ=function(t,e){switch(e){case 0:return xf(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return xf(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return xf(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return xf(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},xf=function(t,e){var A=[];return or(t)?A.push(t.subdivide(.5,!1)):A.push(t),or(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},ir=function(t,e,A,n){var r=[];return or(t)?r.push(t.subdivide(.5,!1)):r.push(t),or(A)?r.push(A.subdivide(.5,!0)):r.push(A),or(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),or(e)?r.push(e.subdivide(.5,!1).reverse()):r.push(e),r},jS=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Tf=function(t){var e=t.styles,A=t.bounds,n=Mt(e.paddingLeft,A.width),r=Mt(e.paddingRight,A.width),o=Mt(e.paddingTop,A.width),i=Mt(e.paddingBottom,A.width);return A.add(n+e.borderLeftWidth,o+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+r),-(e.borderTopWidth+e.borderBottomWidth+o+i))},vJ=function(t,e){return t===0?e.bounds:t===2?Tf(e):jS(e)},EJ=function(t,e){return t===0?e.bounds:t===2?Tf(e):jS(e)},IB=function(t,e,A){var n=vJ(_a(t.styles.backgroundOrigin,e),t),r=EJ(_a(t.styles.backgroundClip,e),t),o=kJ(_a(t.styles.backgroundSize,e),A,n),i=o[0],a=o[1],l=mc(_a(t.styles.backgroundPosition,e),n.width-i,n.height-a),u=SJ(_a(t.styles.backgroundRepeat,e),l,o,n,r),f=Math.round(n.left+l[0]),h=Math.round(n.top+l[1]);return[u,f,h,i,a]},Ta=function(t){return Dt(t)&&t.value===Qa.AUTO},_f=function(t){return typeof t=="number"},kJ=function(t,e,A){var n=e[0],r=e[1],o=e[2],i=t[0],a=t[1];if(!i)return[0,0];if(CA(i)&&a&&CA(a))return[Mt(i,A.width),Mt(a,A.height)];var l=_f(o);if(Dt(i)&&(i.value===Qa.CONTAIN||i.value===Qa.COVER)){if(_f(o)){var u=A.width/A.height;return u<o!=(i.value===Qa.COVER)?[A.width,A.width/o]:[A.height*o,A.height]}return[A.width,A.height]}var f=_f(n),h=_f(r),p=f||h;if(Ta(i)&&(!a||Ta(a))){if(f&&h)return[n,r];if(!l&&!p)return[A.width,A.height];if(p&&l){var g=f?n:r*o,B=h?r:n/o;return[g,B]}var y=f?n:A.width,b=h?r:A.height;return[y,b]}if(l){var w=0,v=0;return CA(i)?w=Mt(i,A.width):CA(a)&&(v=Mt(a,A.height)),Ta(i)?w=v*o:(!a||Ta(a))&&(v=w/o),[w,v]}var k=null,F=null;if(CA(i)?k=Mt(i,A.width):a&&CA(a)&&(F=Mt(a,A.height)),k!==null&&(!a||Ta(a))&&(F=f&&h?k/n*r:A.height),F!==null&&Ta(i)&&(k=f&&h?F/r*n:A.width),k!==null&&F!==null)return[k,F];throw new Error("Unable to calculate background-size for element")},_a=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},SJ=function(t,e,A,n,r){var o=e[0],i=e[1],a=A[0],l=A[1];switch(t){case 2:return[new Te(Math.round(n.left),Math.round(n.top+i)),new Te(Math.round(n.left+n.width),Math.round(n.top+i)),new Te(Math.round(n.left+n.width),Math.round(l+n.top+i)),new Te(Math.round(n.left),Math.round(l+n.top+i))];case 3:return[new Te(Math.round(n.left+o),Math.round(n.top)),new Te(Math.round(n.left+o+a),Math.round(n.top)),new Te(Math.round(n.left+o+a),Math.round(n.height+n.top)),new Te(Math.round(n.left+o),Math.round(n.height+n.top))];case 1:return[new Te(Math.round(n.left+o),Math.round(n.top+i)),new Te(Math.round(n.left+o+a),Math.round(n.top+i)),new Te(Math.round(n.left+o+a),Math.round(n.top+i+l)),new Te(Math.round(n.left+o),Math.round(n.top+i+l))];default:return[new Te(Math.round(r.left),Math.round(r.top)),new Te(Math.round(r.left+r.width),Math.round(r.top)),new Te(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Te(Math.round(r.left),Math.round(r.height+r.top))]}},QJ="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",qS="Hidden Text",FJ=(function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var n=this._document.createElement("div"),r=this._document.createElement("img"),o=this._document.createElement("span"),i=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=A,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",i.appendChild(n),r.src=QJ,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",o.style.fontFamily=e,o.style.fontSize=A,o.style.margin="0",o.style.padding="0",o.appendChild(this._document.createTextNode(qS)),n.appendChild(o),n.appendChild(r);var a=r.offsetTop-o.offsetTop+2;n.removeChild(o),n.appendChild(this._document.createTextNode(qS)),n.style.lineHeight="normal",r.style.verticalAlign="super";var l=r.offsetTop-n.offsetTop+2;return i.removeChild(n),{baseline:a,middle:l}},t.prototype.getMetrics=function(e,A){var n=e+" "+A;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,A)),this._data[n]},t})(),ZS=(function(){function t(e,A){this.context=e,this.options=A}return t})(),UJ=1e4,IJ=(function(t){Fr(e,t);function e(A,n){var r=t.call(this,A,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 FJ(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 e.prototype.applyEffects=function(A){for(var n=this;this._activeEffects.length;)this.popEffect();A.forEach(function(r){return n.applyEffect(r)})},e.prototype.applyEffect=function(A){this.ctx.save(),gJ(A)&&(this.ctx.globalAlpha=A.opacity),mJ(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),GS(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return dn(this,void 0,void 0,function(){var n;return ZA(this,function(r){switch(r.label){case 0:return n=A.element.container.styles,n.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return dn(this,void 0,void 0,function(){return ZA(this,function(n){switch(n.label){case 0:if(vA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(A)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,n,r){var o=this;if(n===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+r);else{var i=gB(A.text);i.reduce(function(a,l){return o.ctx.fillText(l,a,A.bounds.top+r),a+o.ctx.measureText(l).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var n=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),r=LJ(A.fontFamily).join(", "),o=pc(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,n,A.fontWeight,o,r].join(" "),r,o]},e.prototype.renderTextNode=function(A,n){return dn(this,void 0,void 0,function(){var r,o,i,a,l,u,f,h,p=this;return ZA(this,function(g){return r=this.createFontStyle(n),o=r[0],i=r[1],a=r[2],this.ctx.font=o,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(i,a),u=l.baseline,f=l.middle,h=n.paintOrder,A.textBounds.forEach(function(B){h.forEach(function(y){switch(y){case 0:p.ctx.fillStyle=OA(n.color),p.renderTextWithLetterSpacing(B,n.letterSpacing,u);var b=n.textShadow;b.length&&B.text.trim().length&&(b.slice(0).reverse().forEach(function(w){p.ctx.shadowColor=OA(w.color),p.ctx.shadowOffsetX=w.offsetX.number*p.options.scale,p.ctx.shadowOffsetY=w.offsetY.number*p.options.scale,p.ctx.shadowBlur=w.blur.number,p.renderTextWithLetterSpacing(B,n.letterSpacing,u)}),p.ctx.shadowColor="",p.ctx.shadowOffsetX=0,p.ctx.shadowOffsetY=0,p.ctx.shadowBlur=0),n.textDecorationLine.length&&(p.ctx.fillStyle=OA(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(w){switch(w){case 1:p.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top+u),B.bounds.width,1);break;case 2:p.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top),B.bounds.width,1);break;case 3:p.ctx.fillRect(B.bounds.left,Math.ceil(B.bounds.top+f),B.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&B.text.trim().length&&(p.ctx.strokeStyle=OA(n.webkitTextStrokeColor),p.ctx.lineWidth=n.webkitTextStrokeWidth,p.ctx.lineJoin=window.chrome?"miter":"round",p.ctx.strokeText(B.text,B.bounds.left,B.bounds.top+u)),p.ctx.strokeStyle="",p.ctx.lineWidth=0,p.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,n,r){if(r&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var o=Tf(A),i=Uf(n);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,A.intrinsicWidth,A.intrinsicHeight,o.left,o.top,o.width,o.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return dn(this,void 0,void 0,function(){var n,r,o,i,a,l,v,v,u,f,h,p,F,g,B,x,y,b,w,v,k,F,x;return ZA(this,function(Q){switch(Q.label){case 0:this.applyEffects(A.getEffects(4)),n=A.container,r=A.curves,o=n.styles,i=0,a=n.textNodes,Q.label=1;case 1:return i<a.length?(l=a[i],[4,this.renderTextNode(l,o)]):[3,4];case 2:Q.sent(),Q.label=3;case 3:return i++,[3,1];case 4:if(!(n instanceof gS))return[3,8];Q.label=5;case 5:return Q.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return v=Q.sent(),this.renderReplacedElement(n,r,v),[3,8];case 7:return Q.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof BS&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof yS))return[3,12];Q.label=9;case 9:return Q.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return v=Q.sent(),this.renderReplacedElement(n,r,v),[3,12];case 11:return Q.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof ES&&n.tree?(u=new e(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=Q.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),Q.label=14;case 14:if(n instanceof yB&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===Cf?n.checked&&(this.ctx.save(),this.path([new Te(n.bounds.left+h*.39363,n.bounds.top+h*.79),new Te(n.bounds.left+h*.16,n.bounds.top+h*.5549),new Te(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new Te(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new Te(n.bounds.left+h*.72983,n.bounds.top+h*.23),new Te(n.bounds.left+h*.84,n.bounds.top+h*.34085),new Te(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=OA(CS),this.ctx.fill(),this.ctx.restore()):n.type===bf&&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=OA(CS),this.ctx.fill(),this.ctx.restore())),xJ(n)&&n.value.length){switch(p=this.createFontStyle(o),F=p[0],g=p[1],B=this.fontMetrics.getMetrics(F,g).baseline,this.ctx.font=F,this.ctx.fillStyle=OA(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=_J(n.styles.textAlign),x=Tf(n),y=0,n.styles.textAlign){case 1:y+=x.width/2;break;case 2:y+=x.width;break}b=x.add(y,0,0,-x.height/2+1),this.ctx.save(),this.path([new Te(x.left,x.top),new Te(x.left+x.width,x.top),new Te(x.left+x.width,x.top+x.height),new Te(x.left,x.top+x.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new wc(n.value,b),o.letterSpacing,B),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vA(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(w=n.styles.listStyleImage,w.type!==0)return[3,18];v=void 0,k=w.url,Q.label=15;case 15:return Q.trys.push([15,17,,18]),[4,this.context.cache.match(k)];case 16:return v=Q.sent(),this.ctx.drawImage(v,n.bounds.left-(v.width+10),n.bounds.top),[3,18];case 17:return Q.sent(),this.context.logger.error("Error loading list-style-image "+k),[3,18];case 18:return[3,20];case 19:A.listValue&&n.styles.listStyleType!==-1&&(F=this.createFontStyle(o)[0],this.ctx.font=F,this.ctx.fillStyle=OA(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",x=new To(n.bounds.left,n.bounds.top+Mt(n.styles.paddingTop,n.bounds.width),n.bounds.width,qk(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new wc(A.listValue,x),o.letterSpacing,qk(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Q.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return dn(this,void 0,void 0,function(){var n,r,w,o,i,w,a,l,w,u,f,w,h,p,w,g,B,w,y,b,w;return ZA(this,function(v){switch(v.label){case 0:if(vA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:v.sent(),n=0,r=A.negativeZIndex,v.label=2;case 2:return n<r.length?(w=r[n],[4,this.renderStack(w)]):[3,5];case 3:v.sent(),v.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:v.sent(),o=0,i=A.nonInlineLevel,v.label=7;case 7:return o<i.length?(w=i[o],[4,this.renderNode(w)]):[3,10];case 8:v.sent(),v.label=9;case 9:return o++,[3,7];case 10:a=0,l=A.nonPositionedFloats,v.label=11;case 11:return a<l.length?(w=l[a],[4,this.renderStack(w)]):[3,14];case 12:v.sent(),v.label=13;case 13:return a++,[3,11];case 14:u=0,f=A.nonPositionedInlineLevel,v.label=15;case 15:return u<f.length?(w=f[u],[4,this.renderStack(w)]):[3,18];case 16:v.sent(),v.label=17;case 17:return u++,[3,15];case 18:h=0,p=A.inlineLevel,v.label=19;case 19:return h<p.length?(w=p[h],[4,this.renderNode(w)]):[3,22];case 20:v.sent(),v.label=21;case 21:return h++,[3,19];case 22:g=0,B=A.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return g<B.length?(w=B[g],[4,this.renderStack(w)]):[3,26];case 24:v.sent(),v.label=25;case 25:return g++,[3,23];case 26:y=0,b=A.positiveZIndex,v.label=27;case 27:return y<b.length?(w=b[y],[4,this.renderStack(w)]):[3,30];case 28:v.sent(),v.label=29;case 29:return y++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){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(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var n=this;A.forEach(function(r,o){var i=or(r)?r.start:r;o===0?n.ctx.moveTo(i.x,i.y):n.ctx.lineTo(i.x,i.y),or(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},e.prototype.renderRepeat=function(A,n,r,o){this.path(A),this.ctx.fillStyle=n,this.ctx.translate(r,o),this.ctx.fill(),this.ctx.translate(-r,-o)},e.prototype.resizeImage=function(A,n,r){var o;if(A.width===n&&A.height===r)return A;var i=(o=this.canvas.ownerDocument)!==null&&o!==void 0?o:document,a=i.createElement("canvas");a.width=Math.max(1,n),a.height=Math.max(1,r);var l=a.getContext("2d");return l.drawImage(A,0,0,A.width,A.height,0,0,n,r),a},e.prototype.renderBackgroundImage=function(A){return dn(this,void 0,void 0,function(){var n,r,o,i,a,l;return ZA(this,function(u){switch(u.label){case 0:n=A.styles.backgroundImage.length-1,r=function(f){var h,p,g,P,$,te,ue,H,M,B,P,$,te,ue,H,y,b,w,v,k,F,x,Q,I,M,O,P,ie,ae,ue,H,G,$,te,ee,K,ce,j,Qe,R,J,Ae;return ZA(this,function(oe){switch(oe.label){case 0:if(f.type!==0)return[3,5];h=void 0,p=f.url,oe.label=1;case 1:return oe.trys.push([1,3,,4]),[4,o.context.cache.match(p)];case 2:return h=oe.sent(),[3,4];case 3:return oe.sent(),o.context.logger.error("Error loading background-image "+p),[3,4];case 4:return h&&(g=IB(A,n,[h.width,h.height,h.width/h.height]),P=g[0],$=g[1],te=g[2],ue=g[3],H=g[4],M=o.ctx.createPattern(o.resizeImage(h,ue,H),"repeat"),o.renderRepeat(P,M,$,te)),[3,6];case 5:mY(f)?(B=IB(A,n,[null,null,null]),P=B[0],$=B[1],te=B[2],ue=B[3],H=B[4],y=uY(f.angle,ue,H),b=y[0],w=y[1],v=y[2],k=y[3],F=y[4],x=document.createElement("canvas"),x.width=ue,x.height=H,Q=x.getContext("2d"),I=Q.createLinearGradient(w,k,v,F),Pk(f.stops,b).forEach(function(S){return I.addColorStop(S.stop,OA(S.color))}),Q.fillStyle=I,Q.fillRect(0,0,ue,H),ue>0&&H>0&&(M=o.ctx.createPattern(x,"repeat"),o.renderRepeat(P,M,$,te))):gY(f)&&(O=IB(A,n,[null,null,null]),P=O[0],ie=O[1],ae=O[2],ue=O[3],H=O[4],G=f.position.length===0?[AB]:f.position,$=Mt(G[0],ue),te=Mt(G[G.length-1],H),ee=dY(f,$,te,ue,H),K=ee[0],ce=ee[1],K>0&&ce>0&&(j=o.ctx.createRadialGradient(ie+$,ae+te,0,ie+$,ae+te,K),Pk(f.stops,K*2).forEach(function(S){return j.addColorStop(S.stop,OA(S.color))}),o.path(P),o.ctx.fillStyle=j,K!==ce?(Qe=A.bounds.left+.5*A.bounds.width,R=A.bounds.top+.5*A.bounds.height,J=ce/K,Ae=1/J,o.ctx.save(),o.ctx.translate(Qe,R),o.ctx.transform(1,0,0,J,0,0),o.ctx.translate(-Qe,-R),o.ctx.fillRect(ie,Ae*(ae-R)+R,ue,H*Ae),o.ctx.restore()):o.ctx.fill())),oe.label=6;case 6:return n--,[2]}})},o=this,i=0,a=A.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return i<a.length?(l=a[i],[5,r(l)]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,n,r){return dn(this,void 0,void 0,function(){return ZA(this,function(o){return this.path(XS(r,n)),this.ctx.fillStyle=OA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,n,r,o){return dn(this,void 0,void 0,function(){var i,a;return ZA(this,function(l){switch(l.label){case 0:return n<3?[4,this.renderSolidBorder(A,r,o)]:[3,2];case 1:return l.sent(),[2];case 2:return i=wJ(o,r),this.path(i),this.ctx.fillStyle=OA(A),this.ctx.fill(),a=CJ(o,r),this.path(a),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return dn(this,void 0,void 0,function(){var n,r,o,i,a,l,u,f,h=this;return ZA(this,function(p){switch(p.label){case 0:return this.applyEffects(A.getEffects(2)),n=A.container.styles,r=!Ii(n.backgroundColor)||n.backgroundImage.length,o=[{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}],i=TJ(_a(n.backgroundClip,0),A.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Ii(n.backgroundColor)||(this.ctx.fillStyle=OA(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:p.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(g){h.ctx.save();var B=Ff(A.curves),y=g.inset?0:UJ,b=BJ(B,-y+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(h.path(B),h.ctx.clip(),h.mask(b)):(h.mask(B),h.ctx.clip(),h.path(b)),h.ctx.shadowOffsetX=g.offsetX.number+y,h.ctx.shadowOffsetY=g.offsetY.number,h.ctx.shadowColor=OA(g.color),h.ctx.shadowBlur=g.blur.number,h.ctx.fillStyle=g.inset?OA(g.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),p.label=2;case 2:a=0,l=0,u=o,p.label=3;case 3:return l<u.length?(f=u[l],f.style!==0&&!Ii(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,a,A.curves,2)]:[3,11]):[3,13];case 4:return p.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,a,A.curves,3)];case 6:return p.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,a,A.curves)];case 8:return p.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,a,A.curves)];case 10:p.sent(),p.label=11;case 11:a++,p.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,n,r,o,i){return dn(this,void 0,void 0,function(){var a,l,u,f,h,p,g,B,y,b,w,v,k,F,x,Q,x,Q;return ZA(this,function(I){return this.ctx.save(),a=bJ(o,r),l=XS(o,r),i===2&&(this.path(l),this.ctx.clip()),or(l[0])?(u=l[0].start.x,f=l[0].start.y):(u=l[0].x,f=l[0].y),or(l[1])?(h=l[1].end.x,p=l[1].end.y):(h=l[1].x,p=l[1].y),r===0||r===2?g=Math.abs(u-h):g=Math.abs(f-p),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(l.slice(0,2)),B=n<3?n*3:n*2,y=n<3?n*2:n,i===3&&(B=n,y=n),b=!0,g<=B*2?b=!1:g<=B*2+y?(w=g/(2*B+y),B*=w,y*=w):(v=Math.floor((g+y)/(B+y)),k=(g-v*B)/(v-1),F=(g-(v+1)*B)/v,y=F<=0||Math.abs(y-k)<Math.abs(y-F)?k:F),b&&(i===3?this.ctx.setLineDash([0,B+y]):this.ctx.setLineDash([B,y])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=OA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(or(l[0])&&(x=l[3],Q=l[0],this.ctx.beginPath(),this.formatPath([new Te(x.end.x,x.end.y),new Te(Q.start.x,Q.start.y)]),this.ctx.stroke()),or(l[1])&&(x=l[1],Q=l[2],this.ctx.beginPath(),this.formatPath([new Te(x.end.x,x.end.y),new Te(Q.start.x,Q.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return dn(this,void 0,void 0,function(){var n;return ZA(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=OA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=yJ(A),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(ZS),xJ=function(t){return t instanceof vS||t instanceof bS?!0:t instanceof yB&&t.type!==bf&&t.type!==Cf},TJ=function(t,e){switch(t){case 0:return Ff(e);case 2:return fJ(e);case 1:default:return Uf(e)}},_J=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},DJ=["-apple-system","system-ui"],LJ=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return DJ.indexOf(e)===-1}):t},OJ=(function(t){Fr(e,t);function e(A,n){var r=t.call(this,A,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 e.prototype.render=function(A){return dn(this,void 0,void 0,function(){var n,r;return ZA(this,function(o){switch(o.label){case 0:return n=mB(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,MJ(n)];case 1:return r=o.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=OA(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]}})})},e})(ZS),MJ=function(t){return new Promise(function(e,A){var n=new Image;n.onload=function(){e(n)},n.onerror=A,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},NJ=(function(){function t(e){var A=e.id,n=e.enabled;this.id=A,this.enabled=n,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Rd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Rd([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Rd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Rd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t})(),HJ=(function(){function t(e,A){var n;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new NJ({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new oJ(this,e)}return t.instanceCount=1,t})(),RJ=function(t,e){return e===void 0&&(e={}),PJ(t,e)};typeof window<"u"&&KS.setContext(window);var PJ=function(t,e){return dn(void 0,void 0,void 0,function(){var A,n,r,o,i,a,l,u,f,h,p,g,B,y,b,w,v,k,F,x,I,Q,I,M,O,P,ie,ae,ue,H,G,$,te,ee,K,ce,j,Qe,R,J;return ZA(this,function(Ae){switch(Ae.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(n=A.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,imageTimeout:(O=e.imageTimeout)!==null&&O!==void 0?O:15e3,proxy:e.proxy,useCORS:(P=e.useCORS)!==null&&P!==void 0?P:!1},o=Lg({logging:(ie=e.logging)!==null&&ie!==void 0?ie:!0,cache:e.cache},r),i={windowWidth:(ae=e.windowWidth)!==null&&ae!==void 0?ae:n.innerWidth,windowHeight:(ue=e.windowHeight)!==null&&ue!==void 0?ue:n.innerHeight,scrollX:(H=e.scrollX)!==null&&H!==void 0?H:n.pageXOffset,scrollY:(G=e.scrollY)!==null&&G!==void 0?G:n.pageYOffset},a=new To(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),l=new HJ(o,a),u=($=e.foreignObjectRendering)!==null&&$!==void 0?$:!1,f={allowTaint:(te=e.allowTaint)!==null&&te!==void 0?te:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new VS(l,t,f),p=h.clonedReferenceElement,p?[4,h.toIFrame(A,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=Ae.sent(),B=CB(p)||V6(p)?B5(p.ownerDocument):Pd(l,p),y=B.width,b=B.height,w=B.left,v=B.top,k=VJ(l,p,e.backgroundColor),F={canvas:e.canvas,backgroundColor:k,scale:(K=(ee=e.scale)!==null&&ee!==void 0?ee:n.devicePixelRatio)!==null&&K!==void 0?K:1,x:((ce=e.x)!==null&&ce!==void 0?ce:0)+w,y:((j=e.y)!==null&&j!==void 0?j:0)+v,width:(Qe=e.width)!==null&&Qe!==void 0?Qe:Math.ceil(y),height:(R=e.height)!==null&&R!==void 0?R:Math.ceil(b)},u?(l.logger.debug("Document cloned, using foreign object rendering"),I=new OJ(l,F),[4,I.render(p)]):[3,3];case 2:return x=Ae.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+w+","+v+" with size "+y+"x"+b+" using computed rendering"),l.logger.debug("Starting DOM parsing"),Q=SS(l,p),k===Q.styles.backgroundColor&&(Q.styles.backgroundColor=Do.TRANSPARENT),l.logger.debug("Starting renderer for element at "+F.x+","+F.y+" with size "+F.width+"x"+F.height),I=new IJ(l,F),[4,I.render(Q)];case 4:x=Ae.sent(),Ae.label=5;case 5:return(!((J=e.removeContainer)!==null&&J!==void 0)||J)&&(VS.destroy(g)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,x]}})})},VJ=function(t,e,A){var n=e.ownerDocument,r=n.documentElement?gc(t,getComputedStyle(n.documentElement).backgroundColor):Do.TRANSPARENT,o=n.body?gc(t,getComputedStyle(n.body).backgroundColor):Do.TRANSPARENT,i=typeof A=="string"?gc(t,A):A===null?Do.TRANSPARENT:4294967295;return e===n.documentElement?Ii(r)?Ii(o)?i:o:r:i};const $J=s.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},pending:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue","update:pending"],setup(t,{emit:e}){const A=t,n=e,r=s.ref(),o=s.ref(""),i=s.ref();async function a(){if(r.value){n("update:pending",!0);const u=r.value,f=u.firstElementChild,h=f.offsetWidth,p=f.offsetHeight,B=(await RJ(u.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:h,height:p,...A.options})).toDataURL();if(n("update:modelValue",B),n("update:pending",!1),A.debug){const y=new Image;y.src=B,document.body.appendChild(y)}return B}return""}const l=$1.debounce(async()=>{o.value=await a()},300,{trailing:!0,leading:!1});return s.onMounted(()=>{const u=r.value;A.renderUpdates&&(i.value=new MutationObserver(async f=>{l()}),i.value.observe(u,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{l()},500)}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:r,style:s.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[s.renderSlot(u.$slots,"default")],6))}}),KJ=["id","popover"],xB=s.defineComponent({__name:"popover-dialog",props:{modelValue:{type:Boolean,default:!1},type:{type:String,default:"auto"},id:{type:String,default:()=>`popover-dialog-${Math.random().toString(36).substr(2,9)}`},title:{type:String,default:""},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},classes:{type:String,default:""},hover:{type:Boolean,default:!1},hoverDelay:{type:Number,default:400},closeTimeout:{type:Number,default:0}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,n=e,r=s.ref(),o=s.ref(),i=s.ref(!1),a=s.computed(()=>"ontouchstart"in window||navigator.maxTouchPoints>0);function l(){clearTimeout(o.value),A.hover&&r.value?.showPopover()}function u(){i.value=!0,clearTimeout(o.value),l()}function f(){i.value=!1,(A.hover||A.closeTimeout)&&(o.value=setTimeout(()=>{r.value?.hidePopover()},A.closeTimeout||A.hoverDelay))}s.watch(()=>A.modelValue,(p,g)=>{p&&!g?r.value?.matches(":popover-open")||r.value?.showPopover():!p&&g&&r.value?.matches(":popover-open")&&r.value?.hidePopover()});function h(p){p.newState==="open"?(A.closeTimeout&&!i.value&&(clearTimeout(o.value),o.value=setTimeout(()=>{i.value||r.value?.hidePopover()},A.closeTimeout)),A.modelValue||n("update:modelValue",!0)):p.newState==="closed"&&(i.value=!1,A.modelValue&&n("update:modelValue",!1))}return s.onMounted(()=>{if(r.value?.addEventListener("toggle",h),A.modelValue&&r.value?.showPopover(),!a.value){r.value?.addEventListener("mouseenter",u),r.value?.addEventListener("mouseleave",f);const p=document.querySelector(`[popovertarget="${A.id}"]`);p&&(p.addEventListener("mouseenter",u),p.addEventListener("mouseleave",f))}}),s.onBeforeUnmount(()=>{if(clearTimeout(o.value),r.value?.removeEventListener("toggle",h),!a.value){r.value?.removeEventListener("mouseenter",u),r.value?.removeEventListener("mouseleave",f);const p=document.querySelector(`[popovertarget="${A.id}"]`);p&&(p.removeEventListener("mouseenter",u),p.removeEventListener("mouseleave",f))}}),(p,g)=>(s.openBlock(),s.createElementBlock("span",{class:"popover-dialog",id:t.id,popover:t.type,ref_key:"popover",ref:r},[s.renderSlot(p.$slots,"default",{},()=>[g[0]||(g[0]=s.createTextVNode(" Popover content goes here. ",-1))])],8,KJ))}});var GJ=Object.defineProperty,WJ=Object.defineProperties,zJ=Object.getOwnPropertyDescriptors,eQ=Object.getOwnPropertySymbols,YJ=Object.prototype.hasOwnProperty,JJ=Object.prototype.propertyIsEnumerable,tQ=(t,e,A)=>e in t?GJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:A}):t[e]=A,MA=(t,e)=>{for(var A in e||(e={}))YJ.call(e,A)&&tQ(t,A,e[A]);if(eQ)for(var A of eQ(e))JJ.call(e,A)&&tQ(t,A,e[A]);return t},kn=(t,e)=>WJ(t,zJ(e)),Vt=(t,e,A)=>new Promise((n,r)=>{var o=l=>{try{a(A.next(l))}catch(u){r(u)}},i=l=>{try{a(A.throw(l))}catch(u){r(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,i);a((A=A.apply(t,e)).next())});const TB=Math.min,Da=Math.max,Df=Math.round,Lf=Math.floor,Ao=t=>({x:t,y:t});function XJ(t,e){return typeof t=="function"?t(e):t}function jJ(t){return MA({top:0,right:0,bottom:0,left:0},t)}function qJ(t){return typeof t!="number"?jJ(t):{top:t,right:t,bottom:t,left:t}}function Of(t){const{x:e,y:A,width:n,height:r}=t;return{width:n,height:r,top:A,left:e,right:e+n,bottom:A+r,x:e,y:A}}function ZJ(t,e){return Vt(this,null,function*(){var A;e===void 0&&(e={});const{x:n,y:r,platform:o,rects:i,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=XJ(e,t),B=qJ(g),y=a[p?h==="floating"?"reference":"floating":h],b=Of(yield o.getClippingRect({element:(A=yield o.isElement==null?void 0:o.isElement(y))==null||A?y:y.contextElement||(yield o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=h==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,v=yield o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating),k=(yield o.isElement==null?void 0:o.isElement(v))?(yield o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},F=Of(o.convertOffsetParentRelativeRectToViewportRelativeRect?yield o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-F.top+B.top)/k.y,bottom:(F.bottom-b.bottom+B.bottom)/k.y,left:(b.left-F.left+B.left)/k.x,right:(F.right-b.right+B.right)/k.x}})}function Mf(){return typeof window<"u"}function La(t){return AQ(t)?(t.nodeName||"").toLowerCase():"#document"}function Hn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function no(t){var e;return(e=(AQ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function AQ(t){return Mf()?t instanceof Node||t instanceof Hn(t).Node:!1}function Ir(t){return Mf()?t instanceof Element||t instanceof Hn(t).Element:!1}function ro(t){return Mf()?t instanceof HTMLElement||t instanceof Hn(t).HTMLElement:!1}function nQ(t){return!Mf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Hn(t).ShadowRoot}function Ec(t){const{overflow:e,overflowX:A,overflowY:n,display:r}=xr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+A)&&!["inline","contents"].includes(r)}function eX(t){return["table","td","th"].includes(La(t))}function Nf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function _B(t){const e=DB(),A=Ir(t)?xr(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>A[n]?A[n]!=="none":!1)||(A.containerType?A.containerType!=="normal":!1)||!e&&(A.backdropFilter?A.backdropFilter!=="none":!1)||!e&&(A.filter?A.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(A.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(A.contain||"").includes(n))}function tX(t){let e=Di(t);for(;ro(e)&&!Oa(e);){if(_B(e))return e;if(Nf(e))return null;e=Di(e)}return null}function DB(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oa(t){return["html","body","#document"].includes(La(t))}function xr(t){return Hn(t).getComputedStyle(t)}function Hf(t){return Ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Di(t){if(La(t)==="html")return t;const e=t.assignedSlot||t.parentNode||nQ(t)&&t.host||no(t);return nQ(e)?e.host:e}function rQ(t){const e=Di(t);return Oa(e)?t.ownerDocument?t.ownerDocument.body:t.body:ro(e)&&Ec(e)?e:rQ(e)}function kc(t,e,A){var n;e===void 0&&(e=[]),A===void 0&&(A=!0);const r=rQ(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Hn(r);if(o){const a=LB(i);return e.concat(i,i.visualViewport||[],Ec(r)?r:[],a&&A?kc(a):[])}return e.concat(r,kc(r,[],A))}function LB(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function oQ(t){const e=xr(t);let A=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=ro(t),o=r?t.offsetWidth:A,i=r?t.offsetHeight:n,a=Df(A)!==o||Df(n)!==i;return a&&(A=o,n=i),{width:A,height:n,$:a}}function OB(t){return Ir(t)?t:t.contextElement}function Ma(t){const e=OB(t);if(!ro(e))return Ao(1);const A=e.getBoundingClientRect(),{width:n,height:r,$:o}=oQ(e);let i=(o?Df(A.width):A.width)/n,a=(o?Df(A.height):A.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const AX=Ao(0);function iQ(t){const e=Hn(t);return!DB()||!e.visualViewport?AX:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nX(t,e,A){return e===void 0&&(e=!1),!A||e&&A!==Hn(t)?!1:e}function Ss(t,e,A,n){e===void 0&&(e=!1),A===void 0&&(A=!1);const r=t.getBoundingClientRect(),o=OB(t);let i=Ao(1);e&&(n?Ir(n)&&(i=Ma(n)):i=Ma(t));const a=nX(o,A,n)?iQ(o):Ao(0);let l=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,f=r.width/i.x,h=r.height/i.y;if(o){const p=Hn(o),g=n&&Ir(n)?Hn(n):n;let B=p,y=LB(B);for(;y&&n&&g!==B;){const b=Ma(y),w=y.getBoundingClientRect(),v=xr(y),k=w.left+(y.clientLeft+parseFloat(v.paddingLeft))*b.x,F=w.top+(y.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,u*=b.y,f*=b.x,h*=b.y,l+=k,u+=F,B=Hn(y),y=LB(B)}}return Of({width:f,height:h,x:l,y:u})}function MB(t,e){const A=Hf(t).scrollLeft;return e?e.left+A:Ss(no(t)).left+A}function sQ(t,e,A){A===void 0&&(A=!1);const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-(A?0:MB(t,n)),o=n.top+e.scrollTop;return{x:r,y:o}}function rX(t){let{elements:e,rect:A,offsetParent:n,strategy:r}=t;const o=r==="fixed",i=no(n),a=e?Nf(e.floating):!1;if(n===i||a&&o)return A;let l={scrollLeft:0,scrollTop:0},u=Ao(1);const f=Ao(0),h=ro(n);if((h||!h&&!o)&&((La(n)!=="body"||Ec(i))&&(l=Hf(n)),ro(n))){const g=Ss(n);u=Ma(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const p=i&&!h&&!o?sQ(i,l,!0):Ao(0);return{width:A.width*u.x,height:A.height*u.y,x:A.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:A.y*u.y-l.scrollTop*u.y+f.y+p.y}}function oX(t){return Array.from(t.getClientRects())}function iX(t){const e=no(t),A=Hf(t),n=t.ownerDocument.body,r=Da(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Da(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-A.scrollLeft+MB(t);const a=-A.scrollTop;return xr(n).direction==="rtl"&&(i+=Da(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:a}}function sX(t,e){const A=Hn(t),n=no(t),r=A.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(r){o=r.width,i=r.height;const u=DB();(!u||u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:i,x:a,y:l}}function aX(t,e){const A=Ss(t,!0,e==="fixed"),n=A.top+t.clientTop,r=A.left+t.clientLeft,o=ro(t)?Ma(t):Ao(1),i=t.clientWidth*o.x,a=t.clientHeight*o.y,l=r*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function aQ(t,e,A){let n;if(e==="viewport")n=sX(t,A);else if(e==="document")n=iX(no(t));else if(Ir(e))n=aX(e,A);else{const r=iQ(t);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Of(n)}function lQ(t,e){const A=Di(t);return A===e||!Ir(A)||Oa(A)?!1:xr(A).position==="fixed"||lQ(A,e)}function lX(t,e){const A=e.get(t);if(A)return A;let n=kc(t,[],!1).filter(a=>Ir(a)&&La(a)!=="body"),r=null;const o=xr(t).position==="fixed";let i=o?Di(t):t;for(;Ir(i)&&!Oa(i);){const a=xr(i),l=_B(i);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&r&&["absolute","fixed"].includes(r.position)||Ec(i)&&!l&&lQ(t,i))?n=n.filter(u=>u!==i):r=a,i=Di(i)}return e.set(t,n),n}function cX(t){let{element:e,boundary:A,rootBoundary:n,strategy:r}=t;const o=[...A==="clippingAncestors"?Nf(e)?[]:lX(e,this._c):[].concat(A),n],i=o[0],a=o.reduce((l,u)=>{const f=aQ(e,u,r);return l.top=Da(f.top,l.top),l.right=TB(f.right,l.right),l.bottom=TB(f.bottom,l.bottom),l.left=Da(f.left,l.left),l},aQ(e,i,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function uX(t){const{width:e,height:A}=oQ(t);return{width:e,height:A}}function dX(t,e,A){const n=ro(e),r=no(e),o=A==="fixed",i=Ss(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Ao(0);function u(){l.x=MB(r)}if(n||!n&&!o)if((La(e)!=="body"||Ec(r))&&(a=Hf(e)),n){const g=Ss(e,!0,o,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else r&&u();o&&!n&&r&&u();const f=r&&!n&&!o?sQ(r,a):Ao(0),h=i.left+a.scrollLeft-l.x-f.x,p=i.top+a.scrollTop-l.y-f.y;return{x:h,y:p,width:i.width,height:i.height}}function NB(t){return xr(t).position==="static"}function cQ(t,e){if(!ro(t)||xr(t).position==="fixed")return null;if(e)return e(t);let A=t.offsetParent;return no(t)===A&&(A=A.ownerDocument.body),A}function uQ(t,e){const A=Hn(t);if(Nf(t))return A;if(!ro(t)){let r=Di(t);for(;r&&!Oa(r);){if(Ir(r)&&!NB(r))return r;r=Di(r)}return A}let n=cQ(t,e);for(;n&&eX(n)&&NB(n);)n=cQ(n,e);return n&&Oa(n)&&NB(n)&&!_B(n)?A:n||tX(t)||A}const fX=function(t){return Vt(this,null,function*(){const e=this.getOffsetParent||uQ,A=this.getDimensions,n=yield A(t.floating);return{reference:dX(t.reference,yield e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}})};function hX(t){return xr(t).direction==="rtl"}const Rn={convertOffsetParentRelativeRectToViewportRelativeRect:rX,getDocumentElement:no,getClippingRect:cX,getOffsetParent:uQ,getElementRects:fX,getClientRects:oX,getDimensions:uX,getScale:Ma,isElement:Ir,isRTL:hX};function dQ(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function pX(t,e){let A=null,n;const r=no(t);function o(){var a;clearTimeout(n),(a=A)==null||a.disconnect(),A=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:f,top:h,width:p,height:g}=u;if(a||e(),!p||!g)return;const B=Lf(h),y=Lf(r.clientWidth-(f+p)),b=Lf(r.clientHeight-(h+g)),w=Lf(f),v={rootMargin:-B+"px "+-y+"px "+-b+"px "+-w+"px",threshold:Da(0,TB(1,l))||1};let k=!0;function F(x){const Q=x[0].intersectionRatio;if(Q!==l){if(!k)return i();Q?i(!1,Q):n=setTimeout(()=>{i(!1,1e-7)},1e3)}Q===1&&!dQ(u,t.getBoundingClientRect())&&i(),k=!1}try{A=new IntersectionObserver(F,kn(MA({},v),{root:r.ownerDocument}))}catch{A=new IntersectionObserver(F,v)}A.observe(t)}return i(!0),o}function HB(t,e,A,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=OB(t),f=r||o?[...u?kc(u):[],...kc(e)]:[];f.forEach(w=>{r&&w.addEventListener("scroll",A,{passive:!0}),o&&w.addEventListener("resize",A)});const h=u&&a?pX(u,A):null;let p=-1,g=null;i&&(g=new ResizeObserver(w=>{let[v]=w;v&&v.target===u&&g&&(g.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),A()}),u&&!l&&g.observe(u),g.observe(e));let B,y=l?Ss(t):null;l&&b();function b(){const w=Ss(t);y&&!dQ(y,w)&&A(),y=w,B=requestAnimationFrame(b)}return A(),()=>{var w;f.forEach(v=>{r&&v.removeEventListener("scroll",A),o&&v.removeEventListener("resize",A)}),h?.(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(B)}}const mX=ZJ,{hasOwnProperty:RB}=Object.prototype,Sc=function(){};function fQ(t){return typeof t=="function"?t:Sc}function hQ(t,e){return function(A,n,r){A.type===e&&t.call(this,A,n,r)}}function gX(t,e){const A=e.structure,n=[];for(const r in A){if(RB.call(A,r)===!1)continue;let o=A[r];const i={name:r,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(const a of o)a===null?i.nullable=!0:typeof a=="string"?i.type="node":Array.isArray(a)&&(i.type="list");i.type&&n.push(i)}return n.length?{context:e.walkContext,fields:n}:null}function BX(t){const e={};for(const A in t.node)if(RB.call(t.node,A)){const n=t.node[A];if(!n.structure)throw new Error("Missed `structure` field in `"+A+"` node type definition");e[A]=gX(A,n)}return e}function pQ(t,e){const A=t.fields.slice(),n=t.context,r=typeof n=="string";return e&&A.reverse(),function(o,i,a,l){let u;r&&(u=i[n],i[n]=o);for(const f of A){const h=o[f.name];if(!f.nullable||h){if(f.type==="list"){if(e?h.reduceRight(l,!1):h.reduce(l,!1))return!0}else if(a(h))return!0}}r&&(i[n]=u)}}function mQ({StyleSheet:t,Atrule:e,Rule:A,Block:n,DeclarationList:r}){return{Atrule:{StyleSheet:t,Atrule:e,Rule:A,Block:n},Rule:{StyleSheet:t,Atrule:e,Rule:A,Block:n},Declaration:{StyleSheet:t,Atrule:e,Rule:A,Block:n,DeclarationList:r}}}function yX(t){const e=BX(t),A={},n={},r=Symbol("break-walk"),o=Symbol("skip-node");for(const u in e)RB.call(e,u)&&e[u]!==null&&(A[u]=pQ(e[u],!1),n[u]=pQ(e[u],!0));const i=mQ(A),a=mQ(n),l=function(u,f){function h(w,v,k){const F=p.call(b,w,v,k);return F===r?!0:F===o?!1:!!(B.hasOwnProperty(w.type)&&B[w.type](w,b,h,y)||g.call(b,w,v,k)===r)}let p=Sc,g=Sc,B=A,y=(w,v,k,F)=>w||h(v,k,F);const b={break:r,skip:o,root:u,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof f=="function")p=f;else if(f&&(p=fQ(f.enter),g=fQ(f.leave),f.reverse&&(B=n),f.visit)){if(i.hasOwnProperty(f.visit))B=f.reverse?a[f.visit]:i[f.visit];else if(!e.hasOwnProperty(f.visit))throw new Error("Bad value `"+f.visit+"` for `visit` option (should be: "+Object.keys(e).sort().join(", ")+")");p=hQ(p,f.visit),g=hQ(g,f.visit)}if(p===Sc&&g===Sc)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");h(u)};return l.break=r,l.skip=o,l.find=function(u,f){let h=null;return l(u,function(p,g,B){if(f.call(this,p,g,B))return h=p,r}),h},l.findLast=function(u,f){let h=null;return l(u,{reverse:!0,enter(p,g,B){if(f.call(this,p,g,B))return h=p,r}}),h},l.findAll=function(u,f){const h=[];return l(u,function(p,g,B){f.call(this,p,g,B)&&h.push(p)}),h},l}const Li=0,_e=1,mt=2,EA=3,qt=4,Oo=5,wX=6,fn=7,Tr=8,It=9,at=10,pA=11,bt=12,bA=13,Rf=14,Pn=15,hn=16,Sn=17,_r=18,Na=19,Qc=20,$t=21,rt=22,Dr=23,Ha=24,pn=25,CX=0;function Vn(t){return t>=48&&t<=57}function Ra(t){return Vn(t)||t>=65&&t<=70||t>=97&&t<=102}function PB(t){return t>=65&&t<=90}function bX(t){return t>=97&&t<=122}function vX(t){return PB(t)||bX(t)}function EX(t){return t>=128}function Pf(t){return vX(t)||EX(t)||t===95}function gQ(t){return Pf(t)||Vn(t)||t===45}function kX(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function Vf(t){return t===10||t===13||t===12}function Qs(t){return Vf(t)||t===32||t===9}function oo(t,e){return!(t!==92||Vf(e)||e===CX)}function VB(t,e,A){return t===45?Pf(e)||e===45||oo(e,A):Pf(t)?!0:t===92?oo(t,e):!1}function $B(t,e,A){return t===43||t===45?Vn(e)?2:e===46&&Vn(A)?3:0:t===46?Vn(e)?2:0:Vn(t)?1:0}function BQ(t){return t===65279||t===65534?1:0}const KB=new Array(128),SX=128,$f=130,yQ=131,GB=132,wQ=133;for(let t=0;t<KB.length;t++)KB[t]=Qs(t)&&$f||Vn(t)&&yQ||Pf(t)&&GB||kX(t)&&wQ||t||SX;function WB(t){return t<128?KB[t]:GB}function Pa(t,e){return e<t.length?t.charCodeAt(e):0}function zB(t,e,A){return A===13&&Pa(t,e+1)===10?2:1}function CQ(t,e,A){let n=t.charCodeAt(e);return PB(n)&&(n=n|32),n===A}function Kf(t,e,A,n){if(A-e!==n.length||e<0||A>t.length)return!1;for(let r=e;r<A;r++){const o=n.charCodeAt(r-e);let i=t.charCodeAt(r);if(PB(i)&&(i=i|32),i!==o)return!1}return!0}function QX(t,e){for(;e>=0&&Qs(t.charCodeAt(e));e--);return e+1}function Gf(t,e){for(;e<t.length&&Qs(t.charCodeAt(e));e++);return e}function YB(t,e){for(;e<t.length&&Vn(t.charCodeAt(e));e++);return e}function Va(t,e){if(e+=2,Ra(Pa(t,e-1))){for(const n=Math.min(t.length,e+5);e<n&&Ra(Pa(t,e));e++);const A=Pa(t,e);Qs(A)&&(e+=zB(t,e,A))}return e}function Wf(t,e){for(;e<t.length;e++){const A=t.charCodeAt(e);if(!gQ(A)){if(oo(A,Pa(t,e+1))){e=Va(t,e)-1;continue}break}}return e}function bQ(t,e){let A=t.charCodeAt(e);if((A===43||A===45)&&(A=t.charCodeAt(e+=1)),Vn(A)&&(e=YB(t,e+1),A=t.charCodeAt(e)),A===46&&Vn(t.charCodeAt(e+1))&&(e+=2,e=YB(t,e)),CQ(t,e,101)){let n=0;A=t.charCodeAt(e+1),(A===45||A===43)&&(n=1,A=t.charCodeAt(e+2)),Vn(A)&&(e=YB(t,e+1+n+1))}return e}function JB(t,e){for(;e<t.length;e++){const A=t.charCodeAt(e);if(A===41){e++;break}oo(A,Pa(t,e+1))&&(e=Va(t,e))}return e}function vQ(t){if(t.length===1&&!Ra(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}const EQ=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"],FX=16*1024;function zf(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,FX)):t}const kQ=10,UX=12,SQ=13;function QQ(t){const e=t.source,A=e.length,n=e.length>0?BQ(e.charCodeAt(0)):0,r=zf(t.lines,A),o=zf(t.columns,A);let i=t.startLine,a=t.startColumn;for(let l=n;l<A;l++){const u=e.charCodeAt(l);r[l]=i,o[l]=a++,(u===kQ||u===SQ||u===UX)&&(u===SQ&&l+1<A&&e.charCodeAt(l+1)===kQ&&(l++,r[l]=i,o[l]=a),i++,a=1)}r[A]=i,o[A]=a,t.lines=r,t.columns=o,t.computed=!0}class IX{constructor(e,A,n,r){this.setSource(e,A,n,r),this.lines=null,this.columns=null}setSource(e="",A=0,n=1,r=1){this.source=e,this.startOffset=A,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,A){return this.computed||QQ(this),{source:A,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,A,n){return this.computed||QQ(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+A,line:this.lines[A],column:this.columns[A]}}}}const io=16777215,so=24,Fs=new Uint8Array(32);Fs[mt]=rt,Fs[$t]=rt,Fs[Na]=Qc,Fs[Dr]=Ha;function FQ(t){return Fs[t]!==0}class xX{constructor(e,A){this.setSource(e,A)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",A=()=>{}){e=String(e||"");const n=e.length,r=zf(this.offsetAndType,e.length+1),o=zf(this.balance,e.length+1);let i=0,a=-1,l=0,u=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),A(e,(f,h,p)=>{const g=i++;if(r[g]=f<<so|p,a===-1&&(a=h),o[g]=u,f===l){const B=o[u];o[u]=g,u=B,l=Fs[r[B]>>so]}else FQ(f)&&(u=g,l=Fs[f])}),r[i]=Li<<so|n,o[i]=i;for(let f=0;f<i;f++){const h=o[f];if(h<=f){const p=o[h];p!==f&&(o[f]=p)}else h>i&&(o[f]=i)}this.source=e,this.firstCharOffset=a===-1?0:a,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>so:Li}lookupTypeNonSC(e){for(let A=this.tokenIndex;A<this.tokenCount;A++){const n=this.offsetAndType[A]>>so;if(n!==bA&&n!==pn&&e--===0)return n}return Li}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&io:this.source.length}lookupOffsetNonSC(e){for(let A=this.tokenIndex;A<this.tokenCount;A++){const n=this.offsetAndType[A]>>so;if(n!==bA&&n!==pn&&e--===0)return A-this.tokenIndex}return Li}lookupValue(e,A){return e+=this.tokenIndex,e<this.tokenCount?Kf(this.source,this.offsetAndType[e-1]&io,this.offsetAndType[e]&io,A):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&io:this.offsetAndType[this.tokenCount]&io:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,A){return A?this.lookupType(A)===It&&this.source.charCodeAt(this.lookupOffset(A))===e:this.tokenType===It&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let A=this.tokenIndex+e;A<this.tokenCount?(this.tokenIndex=A,this.tokenStart=this.offsetAndType[A-1]&io,A=this.offsetAndType[A],this.tokenType=A>>so,this.tokenEnd=A&io):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>so,this.tokenEnd=e&io):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Li,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===bA||this.tokenType===pn;)this.next()}skipUntilBalanced(e,A){let n=e,r=0,o=0;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&io:this.firstCharOffset,A(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:FQ(this.offsetAndType[n]>>so)&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let A=0,n=this.firstCharOffset;A<this.tokenCount;A++){const r=n,o=this.offsetAndType[A],i=o&io,a=o>>so;n=i,e(a,r,i,A)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((A,n,r,o)=>{e[o]={idx:o,type:EQ[A],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}}function UQ(t,e){function A(h){return h<a?t.charCodeAt(h):0}function n(){if(u=bQ(t,u),VB(A(u),A(u+1),A(u+2))){f=bt,u=Wf(t,u);return}if(A(u)===37){f=pA,u++;return}f=at}function r(){const h=u;if(u=Wf(t,u),Kf(t,h,u,"url")&&A(u)===40){if(u=Gf(t,u+1),A(u)===34||A(u)===39){f=mt,u=h+4;return}i();return}if(A(u)===40){f=mt,u++;return}f=_e}function o(h){for(h||(h=A(u++)),f=Oo;u<t.length;u++){const p=t.charCodeAt(u);switch(WB(p)){case h:u++;return;case $f:if(Vf(p)){u+=zB(t,u,p),f=wX;return}break;case 92:if(u===t.length-1)break;const g=A(u+1);Vf(g)?u+=zB(t,u+1,g):oo(p,g)&&(u=Va(t,u)-1);break}}}function i(){for(f=fn,u=Gf(t,u);u<t.length;u++){const h=t.charCodeAt(u);switch(WB(h)){case 41:u++;return;case $f:if(u=Gf(t,u),A(u)===41||u>=t.length){u<t.length&&u++;return}u=JB(t,u),f=Tr;return;case 34:case 39:case 40:case wQ:u=JB(t,u),f=Tr;return;case 92:if(oo(h,A(u+1))){u=Va(t,u)-1;break}u=JB(t,u),f=Tr;return}}}t=String(t||"");const a=t.length;let l=BQ(A(0)),u=l,f;for(;u<a;){const h=t.charCodeAt(u);switch(WB(h)){case $f:f=bA,u=Gf(t,u+1);break;case 34:o();break;case 35:gQ(A(u+1))||oo(A(u+1),A(u+2))?(f=qt,u=Wf(t,u+1)):(f=It,u++);break;case 39:o();break;case 40:f=$t,u++;break;case 41:f=rt,u++;break;case 43:$B(h,A(u+1),A(u+2))?n():(f=It,u++);break;case 44:f=_r,u++;break;case 45:$B(h,A(u+1),A(u+2))?n():A(u+1)===45&&A(u+2)===62?(f=Pn,u=u+3):VB(h,A(u+1),A(u+2))?r():(f=It,u++);break;case 46:$B(h,A(u+1),A(u+2))?n():(f=It,u++);break;case 47:A(u+1)===42?(f=pn,u=t.indexOf("*/",u+2),u=u===-1?t.length:u+2):(f=It,u++);break;case 58:f=hn,u++;break;case 59:f=Sn,u++;break;case 60:A(u+1)===33&&A(u+2)===45&&A(u+3)===45?(f=Rf,u=u+4):(f=It,u++);break;case 64:VB(A(u+1),A(u+2),A(u+3))?(f=EA,u=Wf(t,u+1)):(f=It,u++);break;case 91:f=Na,u++;break;case 92:oo(h,A(u+1))?r():(f=It,u++);break;case 93:f=Qc,u++;break;case 123:f=Dr,u++;break;case 125:f=Ha,u++;break;case yQ:n();break;case GB:r();break;default:f=It,u++}e(f,l,l=u)}}const ao=43,$n=45,Yf=110,Us=!0,TX=!1;function Jf(t,e){let A=this.tokenStart+t;const n=this.charCodeAt(A);for((n===ao||n===$n)&&(e&&this.error("Number sign is not allowed"),A++);A<this.tokenEnd;A++)Vn(this.charCodeAt(A))||this.error("Integer is expected",A)}function $a(t){return Jf.call(this,0,t)}function Oi(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let A="";switch(e){case Yf:A="N is expected";break;case $n:A="HyphenMinus is expected";break}this.error(A,this.tokenStart+t)}}function XB(){let t=0,e=0,A=this.tokenType;for(;A===bA||A===pn;)A=this.lookupType(++t);if(A!==at)if(this.isDelim(ao,t)||this.isDelim($n,t)){e=this.isDelim(ao,t)?ao:$n;do A=this.lookupType(++t);while(A===bA||A===pn);A!==at&&(this.skip(t),$a.call(this,Us))}else return null;return t>0&&this.skip(t),e===0&&(A=this.charCodeAt(this.tokenStart),A!==ao&&A!==$n&&this.error("Number sign is expected")),$a.call(this,e!==0),e===$n?"-"+this.consume(at):this.consume(at)}const _X="AnPlusB",DX={a:[String,null],b:[String,null]};function IQ(){const t=this.tokenStart;let e=null,A=null;if(this.tokenType===at)$a.call(this,TX),A=this.consume(at);else if(this.tokenType===_e&&this.cmpChar(this.tokenStart,$n))switch(e="-1",Oi.call(this,1,Yf),this.tokenEnd-this.tokenStart){case 2:this.next(),A=XB.call(this);break;case 3:Oi.call(this,2,$n),this.next(),this.skipSC(),$a.call(this,Us),A="-"+this.consume(at);break;default:Oi.call(this,2,$n),Jf.call(this,3,Us),this.next(),A=this.substrToCursor(t+2)}else if(this.tokenType===_e||this.isDelim(ao)&&this.lookupType(1)===_e){let n=0;switch(e="1",this.isDelim(ao)&&(n=1,this.next()),Oi.call(this,0,Yf),this.tokenEnd-this.tokenStart){case 1:this.next(),A=XB.call(this);break;case 2:Oi.call(this,1,$n),this.next(),this.skipSC(),$a.call(this,Us),A="-"+this.consume(at);break;default:Oi.call(this,1,$n),Jf.call(this,2,Us),this.next(),A=this.substrToCursor(t+n+1)}}else if(this.tokenType===bt){const n=this.charCodeAt(this.tokenStart),r=n===ao||n===$n;let o=this.tokenStart+r;for(;o<this.tokenEnd&&Vn(this.charCodeAt(o));o++);o===this.tokenStart+r&&this.error("Integer is expected",this.tokenStart+r),Oi.call(this,o-this.tokenStart,Yf),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),A=XB.call(this)):(Oi.call(this,o-this.tokenStart+1,$n),o+2===this.tokenEnd?(this.next(),this.skipSC(),$a.call(this,Us),A="-"+this.consume(at)):(Jf.call(this,o-this.tokenStart+2,Us),this.next(),A=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===ao&&(e=e.substr(1)),A!==null&&A.charCodeAt(0)===ao&&(A=A.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:A}}function xQ(t){if(t.a){const e=t.a==="+1"&&"n"||t.a==="1"&&"n"||t.a==="-1"&&"-n"||t.a+"n";if(t.b){const A=t.b[0]==="-"||t.b[0]==="+"?t.b:"+"+t.b;this.tokenize(e+A)}else this.tokenize(e)}else this.tokenize(t.b)}const LX=Object.freeze(Object.defineProperty({__proto__:null,generate:xQ,name:_X,parse:IQ,structure:DX},Symbol.toStringTag,{value:"Module"}));function TQ(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function OX(){for(let t=1,e;e=this.lookupType(t);t++){if(e===Ha)return!0;if(e===Dr||e===EA)return!1}return!1}const MX="Atrule",NX="atrule",HX={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function _Q(t=!1){const e=this.tokenStart;let A,n,r=null,o=null;switch(this.eat(EA),A=this.substrToCursor(e+1),n=A.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==Dr&&this.tokenType!==Sn&&(this.parseAtrulePrelude?r=this.parseWithFallback(this.AtrulePrelude.bind(this,A,t),TQ):r=TQ.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case Sn:this.next();break;case Dr:hasOwnProperty.call(this.atrule,n)&&typeof this.atrule[n].block=="function"?o=this.atrule[n].block.call(this,t):o=this.Block(OX.call(this));break}return{type:"Atrule",loc:this.getLocation(e,this.tokenStart),name:A,prelude:r,block:o}}function DQ(t){this.token(EA,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(Sn,";")}const RX=Object.freeze(Object.defineProperty({__proto__:null,generate:DQ,name:MX,parse:_Q,structure:HX,walkContext:NX},Symbol.toStringTag,{value:"Module"})),PX="AtrulePrelude",VX="atrulePrelude",$X={children:[[]]};function LQ(t){let e=null;return t!==null&&(t=t.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,t)&&typeof this.atrule[t].prelude=="function"?e=this.atrule[t].prelude.call(this):e=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==Dr&&this.tokenType!==Sn&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}}function OQ(t){this.children(t)}const KX=Object.freeze(Object.defineProperty({__proto__:null,generate:OQ,name:PX,parse:LQ,structure:$X,walkContext:VX},Symbol.toStringTag,{value:"Module"})),GX=36,MQ=42,Xf=61,WX=94,jB=124,zX=126;function YX(){this.eof&&this.error("Unexpected end of input");const t=this.tokenStart;let e=!1;return this.isDelim(MQ)?(e=!0,this.next()):this.isDelim(jB)||this.eat(_e),this.isDelim(jB)?this.charCodeAt(this.tokenStart+1)!==Xf?(this.next(),this.eat(_e)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function JX(){const t=this.tokenStart,e=this.charCodeAt(t);return e!==Xf&&e!==zX&&e!==WX&&e!==GX&&e!==MQ&&e!==jB&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==Xf&&(this.isDelim(Xf)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}const XX="AttributeSelector",jX={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function NQ(){const t=this.tokenStart;let e,A=null,n=null,r=null;return this.eat(Na),this.skipSC(),e=YX.call(this),this.skipSC(),this.tokenType!==Qc&&(this.tokenType!==_e&&(A=JX.call(this),this.skipSC(),n=this.tokenType===Oo?this.String():this.Identifier(),this.skipSC()),this.tokenType===_e&&(r=this.consume(_e),this.skipSC())),this.eat(Qc),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:A,value:n,flags:r}}function HQ(t){this.token(It,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(_e,t.flags),this.token(It,"]")}const qX=Object.freeze(Object.defineProperty({__proto__:null,generate:HQ,name:XX,parse:NQ,structure:jX},Symbol.toStringTag,{value:"Module"})),ZX=38;function RQ(){return this.Raw(null,!0)}function PQ(){return this.parseWithFallback(this.Rule,RQ)}function VQ(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function ej(){if(this.tokenType===Sn)return VQ.call(this,this.tokenIndex);const t=this.parseWithFallback(this.Declaration,VQ);return this.tokenType===Sn&&this.next(),t}const tj="Block",Aj="block",nj={children:[["Atrule","Rule","Declaration"]]};function $Q(t){const e=t?ej:PQ,A=this.tokenStart;let n=this.createList();this.eat(Dr);e:for(;!this.eof;)switch(this.tokenType){case Ha:break e;case bA:case pn:this.next();break;case EA:n.push(this.parseWithFallback(this.Atrule.bind(this,t),RQ));break;default:t&&this.isDelim(ZX)?n.push(PQ.call(this)):n.push(e.call(this))}return this.eof||this.eat(Ha),{type:"Block",loc:this.getLocation(A,this.tokenStart),children:n}}function KQ(t){this.token(Dr,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(Sn,";")}),this.token(Ha,"}")}const rj=Object.freeze(Object.defineProperty({__proto__:null,generate:KQ,name:tj,parse:$Q,structure:nj,walkContext:Aj},Symbol.toStringTag,{value:"Module"})),oj="Brackets",ij={children:[[]]};function GQ(t,e){const A=this.tokenStart;let n=null;return this.eat(Na),n=t.call(this,e),this.eof||this.eat(Qc),{type:"Brackets",loc:this.getLocation(A,this.tokenStart),children:n}}function WQ(t){this.token(It,"["),this.children(t),this.token(It,"]")}const sj=Object.freeze(Object.defineProperty({__proto__:null,generate:WQ,name:oj,parse:GQ,structure:ij},Symbol.toStringTag,{value:"Module"})),aj="CDC",lj=[];function zQ(){const t=this.tokenStart;return this.eat(Pn),{type:"CDC",loc:this.getLocation(t,this.tokenStart)}}function YQ(){this.token(Pn,"-->")}const cj=Object.freeze(Object.defineProperty({__proto__:null,generate:YQ,name:aj,parse:zQ,structure:lj},Symbol.toStringTag,{value:"Module"})),uj="CDO",dj=[];function JQ(){const t=this.tokenStart;return this.eat(Rf),{type:"CDO",loc:this.getLocation(t,this.tokenStart)}}function XQ(){this.token(Rf,"<!--")}const fj=Object.freeze(Object.defineProperty({__proto__:null,generate:XQ,name:uj,parse:JQ,structure:dj},Symbol.toStringTag,{value:"Module"})),hj=46,pj="ClassSelector",mj={name:String};function jQ(){return this.eatDelim(hj),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(_e)}}function qQ(t){this.token(It,"."),this.token(_e,t.name)}const gj=Object.freeze(Object.defineProperty({__proto__:null,generate:qQ,name:pj,parse:jQ,structure:mj},Symbol.toStringTag,{value:"Module"})),Bj=43,ZQ=47,yj=62,wj=126,Cj="Combinator",bj={name:String};function eF(){const t=this.tokenStart;let e;switch(this.tokenType){case bA:e=" ";break;case It:switch(this.charCodeAt(this.tokenStart)){case yj:case Bj:case wj:this.next();break;case ZQ:this.next(),this.eatIdent("deep"),this.eatDelim(ZQ);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function tF(t){this.tokenize(t.name)}const vj=Object.freeze(Object.defineProperty({__proto__:null,generate:tF,name:Cj,parse:eF,structure:bj},Symbol.toStringTag,{value:"Module"})),Ej=42,kj=47,Sj="Comment",Qj={value:String};function AF(){const t=this.tokenStart;let e=this.tokenEnd;return this.eat(pn),e-t+2>=2&&this.charCodeAt(e-2)===Ej&&this.charCodeAt(e-1)===kj&&(e-=2),{type:"Comment",loc:this.getLocation(t,this.tokenStart),value:this.substring(t+2,e)}}function nF(t){this.token(pn,"/*"+t.value+"*/")}const Fj=Object.freeze(Object.defineProperty({__proto__:null,generate:nF,name:Sj,parse:AF,structure:Qj},Symbol.toStringTag,{value:"Module"})),Uj=new Set([hn,rt,Li]),Ij="Condition",xj={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function rF(t){return this.lookupTypeNonSC(1)===_e&&Uj.has(this.lookupTypeNonSC(2))?this.Feature(t):this.FeatureRange(t)}const Tj={media:rF,container:rF,supports(){return this.SupportsDeclaration()}};function oF(t="media"){const e=this.createList();e:for(;!this.eof;)switch(this.tokenType){case pn:case bA:this.next();continue;case _e:e.push(this.Identifier());break;case $t:{let A=this.parseWithFallback(()=>Tj[t].call(this,t),()=>null);A||(A=this.parseWithFallback(()=>{this.eat($t);const n=this.Condition(t);return this.eat(rt),n},()=>this.GeneralEnclosed(t))),e.push(A);break}case mt:{let A=this.parseWithFallback(()=>this.FeatureFunction(t),()=>null);A||(A=this.GeneralEnclosed(t)),e.push(A);break}default:break e}return e.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(e),kind:t,children:e}}function iF(t){t.children.forEach(e=>{e.type==="Condition"?(this.token($t,"("),this.node(e),this.token(rt,")")):this.node(e)})}const _j=Object.freeze(Object.defineProperty({__proto__:null,generate:iF,name:Ij,parse:oF,structure:xj},Symbol.toStringTag,{value:"Module"})),sF=45;function Dj(t,e){return e=e||0,t.length-e>=2&&t.charCodeAt(e)===sF&&t.charCodeAt(e+1)===sF}const aF=33,Lj=35,Oj=36,Mj=38,Nj=42,Hj=43,lF=47;function Rj(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function Pj(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Vj(){const t=this.tokenIndex,e=this.Value();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==Sn&&this.isDelim(aF)===!1&&this.isBalanceEdge(t)===!1&&this.error(),e}const $j="Declaration",Kj="declaration",Gj={important:[Boolean,String],property:String,value:["Value","Raw"]};function cF(){const t=this.tokenStart,e=this.tokenIndex,A=Wj.call(this),n=Dj(A),r=n?this.parseCustomProperty:this.parseValue,o=n?Pj:Rj;let i=!1,a;this.skipSC(),this.eat(hn);const l=this.tokenIndex;if(n||this.skipSC(),r?a=this.parseWithFallback(Vj,o):a=o.call(this,this.tokenIndex),n&&a.type==="Value"&&a.children.isEmpty){for(let u=l-this.tokenIndex;u<=0;u++)if(this.lookupType(u)===bA){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(aF)&&(i=zj.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==Sn&&this.isBalanceEdge(e)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:i,property:A,value:a}}function uF(t){this.token(_e,t.property),this.token(hn,":"),this.node(t.value),t.important&&(this.token(It,"!"),this.token(_e,t.important===!0?"important":t.important))}function Wj(){const t=this.tokenStart;if(this.tokenType===It)switch(this.charCodeAt(this.tokenStart)){case Nj:case Oj:case Hj:case Lj:case Mj:this.next();break;case lF:this.next(),this.isDelim(lF)&&this.next();break}return this.tokenType===qt?this.eat(qt):this.eat(_e),this.substrToCursor(t)}function zj(){this.eat(It),this.skipSC();const t=this.consume(_e);return t==="important"?!0:t}const Yj=Object.freeze(Object.defineProperty({__proto__:null,generate:uF,name:$j,parse:cF,structure:Gj,walkContext:Kj},Symbol.toStringTag,{value:"Module"})),Jj=38;function qB(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}const Xj="DeclarationList",jj={children:[["Declaration","Atrule","Rule"]]};function dF(){const t=this.createList();for(;!this.eof;)switch(this.tokenType){case bA:case pn:case Sn:this.next();break;case EA:t.push(this.parseWithFallback(this.Atrule.bind(this,!0),qB));break;default:this.isDelim(Jj)?t.push(this.parseWithFallback(this.Rule,qB)):t.push(this.parseWithFallback(this.Declaration,qB))}return{type:"DeclarationList",loc:this.getLocationFromList(t),children:t}}function fF(t){this.children(t,e=>{e.type==="Declaration"&&this.token(Sn,";")})}const qj=Object.freeze(Object.defineProperty({__proto__:null,generate:fF,name:Xj,parse:dF,structure:jj},Symbol.toStringTag,{value:"Module"})),Zj="Dimension",e7={value:String,unit:String};function hF(){const t=this.tokenStart,e=this.consumeNumber(bt);return{type:"Dimension",loc:this.getLocation(t,this.tokenStart),value:e,unit:this.substring(t+e.length,this.tokenStart)}}function pF(t){this.token(bt,t.value+t.unit)}const t7=Object.freeze(Object.defineProperty({__proto__:null,generate:pF,name:Zj,parse:hF,structure:e7},Symbol.toStringTag,{value:"Module"})),A7=47,n7="Feature",r7={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function mF(t){const e=this.tokenStart;let A,n=null;if(this.eat($t),this.skipSC(),A=this.consume(_e),this.skipSC(),this.tokenType!==rt){switch(this.eat(hn),this.skipSC(),this.tokenType){case at:this.lookupNonWSType(1)===It?n=this.Ratio():n=this.Number();break;case bt:n=this.Dimension();break;case _e:n=this.Identifier();break;case mt:n=this.parseWithFallback(()=>{const r=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(A7)&&this.error(),r},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(rt),{type:"Feature",loc:this.getLocation(e,this.tokenStart),kind:t,name:A,value:n}}function gF(t){this.token($t,"("),this.token(_e,t.name),t.value!==null&&(this.token(hn,":"),this.node(t.value)),this.token(rt,")")}const o7=Object.freeze(Object.defineProperty({__proto__:null,generate:gF,name:n7,parse:mF,structure:r7},Symbol.toStringTag,{value:"Module"})),i7="FeatureFunction",s7={kind:String,feature:String,value:["Declaration","Selector"]};function a7(t,e){const A=(this.features[t]||{})[e];return typeof A!="function"&&this.error(`Unknown feature ${e}()`),A}function BF(t="unknown"){const e=this.tokenStart,A=this.consumeFunctionName(),n=a7.call(this,t,A.toLowerCase());this.skipSC();const r=this.parseWithFallback(()=>{const o=this.tokenIndex,i=n.call(this);return this.eof===!1&&this.isBalanceEdge(o)===!1&&this.error(),i},()=>this.Raw(null,!1));return this.eof||this.eat(rt),{type:"FeatureFunction",loc:this.getLocation(e,this.tokenStart),kind:t,feature:A,value:r}}function yF(t){this.token(mt,t.feature+"("),this.node(t.value),this.token(rt,")")}const l7=Object.freeze(Object.defineProperty({__proto__:null,generate:yF,name:i7,parse:BF,structure:s7},Symbol.toStringTag,{value:"Module"})),wF=47,c7=60,CF=61,u7=62,d7="FeatureRange",f7={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};function ZB(){switch(this.skipSC(),this.tokenType){case at:return this.isDelim(wF,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case bt:return this.Dimension();case _e:return this.Identifier();case mt:return this.parseWithFallback(()=>{const t=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(wF)&&this.error(),t},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function bF(t){if(this.skipSC(),this.isDelim(c7)||this.isDelim(u7)){const e=this.source[this.tokenStart];return this.next(),this.isDelim(CF)?(this.next(),e+"="):e}if(this.isDelim(CF))return"=";this.error(`Expected ${t?'":", ':""}"<", ">", "=" or ")"`)}function vF(t="unknown"){const e=this.tokenStart;this.skipSC(),this.eat($t);const A=ZB.call(this),n=bF.call(this,A.type==="Identifier"),r=ZB.call(this);let o=null,i=null;return this.lookupNonWSType(0)!==rt&&(o=bF.call(this),i=ZB.call(this)),this.skipSC(),this.eat(rt),{type:"FeatureRange",loc:this.getLocation(e,this.tokenStart),kind:t,left:A,leftComparison:n,middle:r,rightComparison:o,right:i}}function EF(t){this.token($t,"("),this.node(t.left),this.tokenize(t.leftComparison),this.node(t.middle),t.right&&(this.tokenize(t.rightComparison),this.node(t.right)),this.token(rt,")")}const h7=Object.freeze(Object.defineProperty({__proto__:null,generate:EF,name:d7,parse:vF,structure:f7},Symbol.toStringTag,{value:"Module"})),p7="Function",m7="function",g7={name:String,children:[[]]};function kF(t,e){const A=this.tokenStart,n=this.consumeFunctionName(),r=n.toLowerCase();let o;return o=e.hasOwnProperty(r)?e[r].call(this,e):t.call(this,e),this.eof||this.eat(rt),{type:"Function",loc:this.getLocation(A,this.tokenStart),name:n,children:o}}function SF(t){this.token(mt,t.name+"("),this.children(t),this.token(rt,")")}const B7=Object.freeze(Object.defineProperty({__proto__:null,generate:SF,name:p7,parse:kF,structure:g7,walkContext:m7},Symbol.toStringTag,{value:"Module"})),y7="GeneralEnclosed",w7={kind:String,function:[String,null],children:[[]]};function QF(t){const e=this.tokenStart;let A=null;this.tokenType===mt?A=this.consumeFunctionName():this.eat($t);const n=this.parseWithFallback(()=>{const r=this.tokenIndex,o=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(r)===!1&&this.error(),o},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(rt),{type:"GeneralEnclosed",loc:this.getLocation(e,this.tokenStart),kind:t,function:A,children:n}}function FF(t){t.function?this.token(mt,t.function+"("):this.token($t,"("),this.children(t),this.token(rt,")")}const C7=Object.freeze(Object.defineProperty({__proto__:null,generate:FF,name:y7,parse:QF,structure:w7},Symbol.toStringTag,{value:"Module"})),b7="XXX",v7="Hash",E7={value:String};function UF(){const t=this.tokenStart;return this.eat(qt),{type:"Hash",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t+1)}}function IF(t){this.token(qt,"#"+t.value)}const k7=Object.freeze(Object.defineProperty({__proto__:null,generate:IF,name:v7,parse:UF,structure:E7,xxx:b7},Symbol.toStringTag,{value:"Module"})),S7="Identifier",Q7={name:String};function xF(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(_e)}}function TF(t){this.token(_e,t.name)}const F7=Object.freeze(Object.defineProperty({__proto__:null,generate:TF,name:S7,parse:xF,structure:Q7},Symbol.toStringTag,{value:"Module"})),U7="IdSelector",I7={name:String};function _F(){const t=this.tokenStart;return this.eat(qt),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function DF(t){this.token(It,"#"+t.name)}const x7=Object.freeze(Object.defineProperty({__proto__:null,generate:DF,name:U7,parse:_F,structure:I7},Symbol.toStringTag,{value:"Module"})),T7=46,_7="Layer",D7={name:String};function LF(){let t=this.tokenStart,e=this.consume(_e);for(;this.isDelim(T7);)this.eat(It),e+="."+this.consume(_e);return{type:"Layer",loc:this.getLocation(t,this.tokenStart),name:e}}function OF(t){this.tokenize(t.name)}const L7=Object.freeze(Object.defineProperty({__proto__:null,generate:OF,name:_7,parse:LF,structure:D7},Symbol.toStringTag,{value:"Module"})),O7="LayerList",M7={children:[["Layer"]]};function MF(){const t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.Layer()),this.lookupTypeNonSC(0)===_r);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(t),children:t}}function NF(t){this.children(t,()=>this.token(_r,","))}const N7=Object.freeze(Object.defineProperty({__proto__:null,generate:NF,name:O7,parse:MF,structure:M7},Symbol.toStringTag,{value:"Module"})),H7="MediaQuery",R7={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function HF(){const t=this.tokenStart;let e=null,A=null,n=null;if(this.skipSC(),this.tokenType===_e&&this.lookupTypeNonSC(1)!==$t){const r=this.consume(_e),o=r.toLowerCase();switch(o==="not"||o==="only"?(this.skipSC(),e=o,A=this.consume(_e)):A=r,this.lookupTypeNonSC(0)){case _e:{this.skipSC(),this.eatIdent("and"),n=this.Condition("media");break}case Dr:case Sn:case _r:case Li:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case _e:case $t:case mt:{n=this.Condition("media");break}case Dr:case Sn:case Li:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(t,this.tokenStart),modifier:e,mediaType:A,condition:n}}function RF(t){t.mediaType?(t.modifier&&this.token(_e,t.modifier),this.token(_e,t.mediaType),t.condition&&(this.token(_e,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}const P7=Object.freeze(Object.defineProperty({__proto__:null,generate:RF,name:H7,parse:HF,structure:R7},Symbol.toStringTag,{value:"Module"})),V7="MediaQueryList",$7={children:[["MediaQuery"]]};function PF(){const t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.MediaQuery()),this.tokenType===_r);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}}function VF(t){this.children(t,()=>this.token(_r,","))}const K7=Object.freeze(Object.defineProperty({__proto__:null,generate:VF,name:V7,parse:PF,structure:$7},Symbol.toStringTag,{value:"Module"})),G7=38,W7="NestingSelector",z7={};function $F(){const t=this.tokenStart;return this.eatDelim(G7),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function KF(){this.token(It,"&")}const Y7=Object.freeze(Object.defineProperty({__proto__:null,generate:KF,name:W7,parse:$F,structure:z7},Symbol.toStringTag,{value:"Module"})),J7="Nth",X7={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function GF(){this.skipSC();const t=this.tokenStart;let e=t,A=null,n;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?n=this.Identifier():n=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),A=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(t,e),nth:n,selector:A}}function WF(t){this.node(t.nth),t.selector!==null&&(this.token(_e,"of"),this.node(t.selector))}const j7=Object.freeze(Object.defineProperty({__proto__:null,generate:WF,name:J7,parse:GF,structure:X7},Symbol.toStringTag,{value:"Module"})),q7="Number",Z7={value:String};function zF(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(at)}}function YF(t){this.token(at,t.value)}const eq=Object.freeze(Object.defineProperty({__proto__:null,generate:YF,name:q7,parse:zF,structure:Z7},Symbol.toStringTag,{value:"Module"})),tq="Operator",Aq={value:String};function JF(){const t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function XF(t){this.tokenize(t.value)}const nq=Object.freeze(Object.defineProperty({__proto__:null,generate:XF,name:tq,parse:JF,structure:Aq},Symbol.toStringTag,{value:"Module"})),rq="Parentheses",oq={children:[[]]};function jF(t,e){const A=this.tokenStart;let n=null;return this.eat($t),n=t.call(this,e),this.eof||this.eat(rt),{type:"Parentheses",loc:this.getLocation(A,this.tokenStart),children:n}}function qF(t){this.token($t,"("),this.children(t),this.token(rt,")")}const iq=Object.freeze(Object.defineProperty({__proto__:null,generate:qF,name:rq,parse:jF,structure:oq},Symbol.toStringTag,{value:"Module"})),sq="Percentage",aq={value:String};function ZF(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(pA)}}function eU(t){this.token(pA,t.value+"%")}const lq=Object.freeze(Object.defineProperty({__proto__:null,generate:eU,name:sq,parse:ZF,structure:aq},Symbol.toStringTag,{value:"Module"})),cq="PseudoClassSelector",uq="function",dq={name:String,children:[["Raw"],null]};function tU(){const t=this.tokenStart;let e=null,A,n;return this.eat(hn),this.tokenType===mt?(A=this.consumeFunctionName(),n=A.toLowerCase(),this.lookupNonWSType(0)==rt?e=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),e=this.pseudo[n].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(rt)):A=this.consume(_e),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:A,children:e}}function AU(t){this.token(hn,":"),t.children===null?this.token(_e,t.name):(this.token(mt,t.name+"("),this.children(t),this.token(rt,")"))}const fq=Object.freeze(Object.defineProperty({__proto__:null,generate:AU,name:cq,parse:tU,structure:dq,walkContext:uq},Symbol.toStringTag,{value:"Module"})),hq="PseudoElementSelector",pq="function",mq={name:String,children:[["Raw"],null]};function nU(){const t=this.tokenStart;let e=null,A,n;return this.eat(hn),this.eat(hn),this.tokenType===mt?(A=this.consumeFunctionName(),n=A.toLowerCase(),this.lookupNonWSType(0)==rt?e=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),e=this.pseudo[n].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(rt)):A=this.consume(_e),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:A,children:e}}function rU(t){this.token(hn,":"),this.token(hn,":"),t.children===null?this.token(_e,t.name):(this.token(mt,t.name+"("),this.children(t),this.token(rt,")"))}const gq=Object.freeze(Object.defineProperty({__proto__:null,generate:rU,name:hq,parse:nU,structure:mq,walkContext:pq},Symbol.toStringTag,{value:"Module"})),oU=47;function iU(){switch(this.skipSC(),this.tokenType){case at:return this.Number();case mt:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}const Bq="Ratio",yq={left:["Number","Function"],right:["Number","Function",null]};function sU(){const t=this.tokenStart,e=iU.call(this);let A=null;return this.skipSC(),this.isDelim(oU)&&(this.eatDelim(oU),A=iU.call(this)),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:e,right:A}}function aU(t){this.node(t.left),this.token(It,"/"),t.right?this.node(t.right):this.node(at,1)}const wq=Object.freeze(Object.defineProperty({__proto__:null,generate:aU,name:Bq,parse:sU,structure:yq},Symbol.toStringTag,{value:"Module"}));function Cq(){return this.tokenIndex>0&&this.lookupType(-1)===bA?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const bq="Raw",vq={value:String};function lU(t,e){const A=this.getTokenStart(this.tokenIndex);let n;return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),e&&this.tokenStart>A?n=Cq.call(this):n=this.tokenStart,{type:"Raw",loc:this.getLocation(A,n),value:this.substring(A,n)}}function cU(t){this.tokenize(t.value)}const Eq=Object.freeze(Object.defineProperty({__proto__:null,generate:cU,name:bq,parse:lU,structure:vq},Symbol.toStringTag,{value:"Module"}));function uU(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function kq(){const t=this.SelectorList();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==Dr&&this.error(),t}const Sq="Rule",Qq="rule",Fq={prelude:["SelectorList","Raw"],block:["Block"]};function dU(){const t=this.tokenIndex,e=this.tokenStart;let A,n;return this.parseRulePrelude?A=this.parseWithFallback(kq,uU):A=uU.call(this,t),n=this.Block(!0),{type:"Rule",loc:this.getLocation(e,this.tokenStart),prelude:A,block:n}}function fU(t){this.node(t.prelude),this.node(t.block)}const Uq=Object.freeze(Object.defineProperty({__proto__:null,generate:fU,name:Sq,parse:dU,structure:Fq,walkContext:Qq},Symbol.toStringTag,{value:"Module"})),Iq="Scope",xq={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function hU(){let t=null,e=null;this.skipSC();const A=this.tokenStart;return this.tokenType===$t&&(this.next(),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(rt)),this.lookupNonWSType(0)===_e&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat($t),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(rt)),{type:"Scope",loc:this.getLocation(A,this.tokenStart),root:t,limit:e}}function pU(t){t.root&&(this.token($t,"("),this.node(t.root),this.token(rt,")")),t.limit&&(this.token(_e,"to"),this.token($t,"("),this.node(t.limit),this.token(rt,")"))}const Tq=Object.freeze(Object.defineProperty({__proto__:null,generate:pU,name:Iq,parse:hU,structure:xq},Symbol.toStringTag,{value:"Module"})),_q="Selector",Dq={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function mU(){const t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}function gU(t){this.children(t)}const Lq=Object.freeze(Object.defineProperty({__proto__:null,generate:gU,name:_q,parse:mU,structure:Dq},Symbol.toStringTag,{value:"Module"})),Oq="SelectorList",Mq="selector",Nq={children:[["Selector","Raw"]]};function BU(){const t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===_r){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function yU(t){this.children(t,()=>this.token(_r,","))}const Hq=Object.freeze(Object.defineProperty({__proto__:null,generate:yU,name:Oq,parse:BU,structure:Nq,walkContext:Mq},Symbol.toStringTag,{value:"Module"})),ey=92,wU=34,Rq=39;function CU(t){const e=t.length,A=t.charCodeAt(0),n=A===wU||A===Rq?1:0,r=n===1&&e>1&&t.charCodeAt(e-1)===A?e-2:e-1;let o="";for(let i=n;i<=r;i++){let a=t.charCodeAt(i);if(a===ey){if(i===r){i!==e-1&&(o=t.substr(i+1));break}if(a=t.charCodeAt(++i),oo(ey,a)){const l=i-1,u=Va(t,l);i=u-1,o+=vQ(t.substring(l+1,u))}else a===13&&t.charCodeAt(i+1)===10&&i++}else o+=t[i]}return o}function Pq(t,e){const n=wU;let r="",o=!1;for(let i=0;i<t.length;i++){const a=t.charCodeAt(i);if(a===0){r+="�";continue}if(a<=31||a===127){r+="\\"+a.toString(16),o=!0;continue}a===n||a===ey?(r+="\\"+t.charAt(i),o=!1):(o&&(Ra(a)||Qs(a))&&(r+=" "),r+=t.charAt(i),o=!1)}return'"'+r+'"'}const Vq="String",$q={value:String};function bU(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:CU(this.consume(Oo))}}function vU(t){this.token(Oo,Pq(t.value))}const Kq=Object.freeze(Object.defineProperty({__proto__:null,generate:vU,name:Vq,parse:bU,structure:$q},Symbol.toStringTag,{value:"Module"})),Gq=33;function EU(){return this.Raw(null,!1)}const Wq="StyleSheet",zq="stylesheet",Yq={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function kU(){const t=this.tokenStart,e=this.createList();let A;for(;!this.eof;){switch(this.tokenType){case bA:this.next();continue;case pn:if(this.charCodeAt(this.tokenStart+2)!==Gq){this.next();continue}A=this.Comment();break;case Rf:A=this.CDO();break;case Pn:A=this.CDC();break;case EA:A=this.parseWithFallback(this.Atrule,EU);break;default:A=this.parseWithFallback(this.Rule,EU)}e.push(A)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:e}}function SU(t){this.children(t)}const Jq=Object.freeze(Object.defineProperty({__proto__:null,generate:SU,name:Wq,parse:kU,structure:Yq,walkContext:zq},Symbol.toStringTag,{value:"Module"})),Xq="SupportsDeclaration",jq={declaration:"Declaration"};function QU(){const t=this.tokenStart;this.eat($t),this.skipSC();const e=this.Declaration();return this.eof||this.eat(rt),{type:"SupportsDeclaration",loc:this.getLocation(t,this.tokenStart),declaration:e}}function FU(t){this.token($t,"("),this.node(t.declaration),this.token(rt,")")}const qq=Object.freeze(Object.defineProperty({__proto__:null,generate:FU,name:Xq,parse:QU,structure:jq},Symbol.toStringTag,{value:"Module"})),Zq=42,UU=124;function ty(){this.tokenType!==_e&&this.isDelim(Zq)===!1&&this.error("Identifier or asterisk is expected"),this.next()}const e9="TypeSelector",t9={name:String};function IU(){const t=this.tokenStart;return this.isDelim(UU)?(this.next(),ty.call(this)):(ty.call(this),this.isDelim(UU)&&(this.next(),ty.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function xU(t){this.tokenize(t.name)}const A9=Object.freeze(Object.defineProperty({__proto__:null,generate:xU,name:e9,parse:IU,structure:t9},Symbol.toStringTag,{value:"Module"})),TU=43,_U=45,Ay=63;function Fc(t,e){let A=0;for(let n=this.tokenStart+t;n<this.tokenEnd;n++){const r=this.charCodeAt(n);if(r===_U&&e&&A!==0)return Fc.call(this,t+A+1,!1),-1;Ra(r)||this.error(e&&A!==0?"Hyphen minus"+(A<6?" or hex digit":"")+" is expected":A<6?"Hex digit is expected":"Unexpected input",n),++A>6&&this.error("Too many hex digits",n)}return this.next(),A}function jf(t){let e=0;for(;this.isDelim(Ay);)++e>t&&this.error("Too many question marks"),this.next()}function n9(t){this.charCodeAt(this.tokenStart)!==t&&this.error((t===TU?"Plus sign":"Hyphen minus")+" is expected")}function r9(){let t=0;switch(this.tokenType){case at:if(t=Fc.call(this,1,!0),this.isDelim(Ay)){jf.call(this,6-t);break}if(this.tokenType===bt||this.tokenType===at){n9.call(this,_U),Fc.call(this,1,!1);break}break;case bt:t=Fc.call(this,1,!0),t>0&&jf.call(this,6-t);break;default:if(this.eatDelim(TU),this.tokenType===_e){t=Fc.call(this,0,!0),t>0&&jf.call(this,6-t);break}if(this.isDelim(Ay)){this.next(),jf.call(this,5);break}this.error("Hex digit or question mark is expected")}}const o9="UnicodeRange",i9={value:String};function DU(){const t=this.tokenStart;return this.eatIdent("u"),r9.call(this),{type:"UnicodeRange",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function LU(t){this.tokenize(t.value)}const s9=Object.freeze(Object.defineProperty({__proto__:null,generate:LU,name:o9,parse:DU,structure:i9},Symbol.toStringTag,{value:"Module"})),a9=32,ny=92,l9=34,c9=39,u9=40,OU=41;function d9(t){const e=t.length;let A=4,n=t.charCodeAt(e-1)===OU?e-2:e-1,r="";for(;A<n&&Qs(t.charCodeAt(A));)A++;for(;A<n&&Qs(t.charCodeAt(n));)n--;for(let o=A;o<=n;o++){let i=t.charCodeAt(o);if(i===ny){if(o===n){o!==e-1&&(r=t.substr(o+1));break}if(i=t.charCodeAt(++o),oo(ny,i)){const a=o-1,l=Va(t,a);o=l-1,r+=vQ(t.substring(a+1,l))}else i===13&&t.charCodeAt(o+1)===10&&o++}else r+=t[o]}return r}function f9(t){let e="",A=!1;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0){e+="�";continue}if(r<=31||r===127){e+="\\"+r.toString(16),A=!0;continue}r===a9||r===ny||r===l9||r===c9||r===u9||r===OU?(e+="\\"+t.charAt(n),A=!1):(A&&Ra(r)&&(e+=" "),e+=t.charAt(n),A=!1)}return"url("+e+")"}const h9="Url",p9={value:String};function MU(){const t=this.tokenStart;let e;switch(this.tokenType){case fn:e=d9(this.consume(fn));break;case mt:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(mt),this.skipSC(),e=CU(this.consume(Oo)),this.skipSC(),this.eof||this.eat(rt);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.tokenStart),value:e}}function NU(t){this.token(fn,f9(t.value))}const m9=Object.freeze(Object.defineProperty({__proto__:null,generate:NU,name:h9,parse:MU,structure:p9},Symbol.toStringTag,{value:"Module"})),g9="Value",B9={children:[[]]};function HU(){const t=this.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(t,this.tokenStart),children:e}}function RU(t){this.children(t)}const y9=Object.freeze(Object.defineProperty({__proto__:null,generate:RU,name:g9,parse:HU,structure:B9},Symbol.toStringTag,{value:"Module"})),w9=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),C9="WhiteSpace",b9={value:String};function PU(){return this.eat(bA),w9}function VU(t){this.token(bA,t.value)}const v9=Object.freeze(Object.defineProperty({__proto__:null,generate:VU,name:C9,parse:PU,structure:b9},Symbol.toStringTag,{value:"Module"})),E9=Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:LX,Atrule:RX,AtrulePrelude:KX,AttributeSelector:qX,Block:rj,Brackets:sj,CDC:cj,CDO:fj,ClassSelector:gj,Combinator:vj,Comment:Fj,Condition:_j,Declaration:Yj,DeclarationList:qj,Dimension:t7,Feature:o7,FeatureFunction:l7,FeatureRange:h7,Function:B7,GeneralEnclosed:C7,Hash:k7,IdSelector:x7,Identifier:F7,Layer:L7,LayerList:N7,MediaQuery:P7,MediaQueryList:K7,NestingSelector:Y7,Nth:j7,Number:eq,Operator:nq,Parentheses:iq,Percentage:lq,PseudoClassSelector:fq,PseudoElementSelector:gq,Ratio:wq,Raw:Eq,Rule:Uq,Scope:Tq,Selector:Lq,SelectorList:Hq,String:Kq,StyleSheet:Jq,SupportsDeclaration:qq,TypeSelector:A9,UnicodeRange:s9,Url:m9,Value:y9,WhiteSpace:v9},Symbol.toStringTag,{value:"Module"})),k9={node:E9},Mi=yX(k9),ry=["left","right","top","bottom","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","inset-block","inset-inline","inset"];function Uc(t){return ry.includes(t)}const oy=["margin-block-start","margin-block-end","margin-block","margin-inline-start","margin-inline-end","margin-inline","margin-bottom","margin-left","margin-right","margin-top","margin"];function S9(t){return oy.includes(t)}const iy=["width","height","min-width","min-height","max-width","max-height","block-size","inline-size","min-block-size","min-inline-size","max-block-size","max-inline-size"];function $U(t){return iy.includes(t)}const KU=["justify-self","align-self","place-self"];function Q9(t){return KU.includes(t)}const GU=[...ry,...oy,...iy,...KU,"position-anchor","position-area"],F9=[...iy,...ry,...oy];function WU(t){return F9.includes(t)}const U9=["top","left","right","bottom","start","end","self-start","self-end","center","inside","outside"];function zU(t){return U9.includes(t)}const I9=["width","height","block","inline","self-block","self-inline"];function x9(t){return I9.includes(t)}const YU=new Set(["Atrule","Selector","Declaration"]);function T9(t){const e=new SourceMapGenerator,A={line:1,column:0},n={line:0,column:0},r={line:1,column:0},o={generated:r};let i=1,a=0,l=!1;const u=t.node;t.node=function(p){if(p.loc&&p.loc.start&&YU.has(p.type)){const g=p.loc.start.line,B=p.loc.start.column-1;(n.line!==g||n.column!==B)&&(n.line=g,n.column=B,A.line=i,A.column=a,l&&(l=!1,(A.line!==r.line||A.column!==r.column)&&e.addMapping(o)),l=!0,e.addMapping({source:p.loc.source,original:n,generated:A}))}u.call(this,p),l&&YU.has(p.type)&&(r.line=i,r.column=a)};const f=t.emit;t.emit=function(p,g,B){for(let y=0;y<p.length;y++)p.charCodeAt(y)===10?(i++,a=0):a++;f(p,g,B)};const h=t.result;return t.result=function(){return l&&e.addMapping(o),{css:h(),map:e}},t}const _9=43,D9=45,sy=(t,e)=>{if(t===It&&(t=e),typeof t=="string"){const A=t.charCodeAt(0);return A>127?32768:A<<8}return t},JU=[[_e,_e],[_e,mt],[_e,fn],[_e,Tr],[_e,"-"],[_e,at],[_e,pA],[_e,bt],[_e,Pn],[_e,$t],[EA,_e],[EA,mt],[EA,fn],[EA,Tr],[EA,"-"],[EA,at],[EA,pA],[EA,bt],[EA,Pn],[qt,_e],[qt,mt],[qt,fn],[qt,Tr],[qt,"-"],[qt,at],[qt,pA],[qt,bt],[qt,Pn],[bt,_e],[bt,mt],[bt,fn],[bt,Tr],[bt,"-"],[bt,at],[bt,pA],[bt,bt],[bt,Pn],["#",_e],["#",mt],["#",fn],["#",Tr],["#","-"],["#",at],["#",pA],["#",bt],["#",Pn],["-",_e],["-",mt],["-",fn],["-",Tr],["-","-"],["-",at],["-",pA],["-",bt],["-",Pn],[at,_e],[at,mt],[at,fn],[at,Tr],[at,at],[at,pA],[at,bt],[at,"%"],[at,Pn],["@",_e],["@",mt],["@",fn],["@",Tr],["@","-"],["@",Pn],[".",at],[".",pA],[".",bt],["+",at],["+",pA],["+",bt],["/","*"]],L9=JU.concat([[_e,qt],[bt,qt],[qt,qt],[EA,$t],[EA,Oo],[EA,hn],[pA,pA],[pA,bt],[pA,mt],[pA,"-"],[rt,_e],[rt,mt],[rt,pA],[rt,bt],[rt,qt],[rt,"-"]]);function XU(t){const e=new Set(t.map(([A,n])=>sy(A)<<16|sy(n)));return function(A,n,r){const o=sy(n,r),i=r.charCodeAt(0);return(i===D9&&n!==_e&&n!==mt&&n!==Pn||i===_9?e.has(A<<16|i<<8):e.has(A<<16|o))&&this.emit(" ",bA,!0),o}}const O9=XU(JU),jU=XU(L9),qU=Object.freeze(Object.defineProperty({__proto__:null,safe:jU,spec:O9},Symbol.toStringTag,{value:"Module"})),M9=92;function N9(t,e){if(typeof e=="function"){let A=null;t.children.forEach(n=>{A!==null&&e.call(this,A),this.node(n),A=n});return}t.children.forEach(this.node,this)}function H9(t){UQ(t,(e,A,n)=>{this.token(e,t.slice(A,n))})}function R9(t){const e=new Map;for(let[A,n]of Object.entries(t.node))typeof(n.generate||n)=="function"&&e.set(A,n.generate||n);return function(A,n){let r="",o=0,i={node(l){if(e.has(l.type))e.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:jU,token(l,u){o=this.tokenBefore(o,l,u),this.emit(u,l,!1),l===It&&u.charCodeAt(0)===M9&&this.emit(`
164
+ .`+SB+AJ+$S)},rJ=function(t,e){var A=t.ownerDocument;if(A){var n=A.createElement("style");n.textContent=e,t.appendChild(n)}},KS=(function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t})(),oJ=(function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(FB(e)||lJ(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return dn(this,void 0,void 0,function(){var A,n,r,o,i=this;return ZA(this,function(a){switch(a.label){case 0:return A=KS.isSameOrigin(e),n=!QB(e)&&this._options.useCORS===!0&&KA.SUPPORT_CORS_IMAGES&&!A,r=!QB(e)&&!A&&!FB(e)&&typeof this._options.proxy=="string"&&KA.SUPPORT_CORS_XHR&&!n,!A&&this._options.allowTaint===!1&&!QB(e)&&!FB(e)&&!r&&!n?[2]:(o=e,r?[4,this.proxy(o)]:[3,2]);case 1:o=a.sent(),a.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(l,u){var f=new Image;f.onload=function(){return l(f)},f.onerror=u,(cJ(o)||n)&&(f.crossOrigin="anonymous"),f.src=o,f.complete===!0&&setTimeout(function(){return l(f)},500),i._options.imageTimeout>0&&setTimeout(function(){return u("Timed out ("+i._options.imageTimeout+"ms) loading image")},i._options.imageTimeout)})];case 3:return[2,a.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise(function(o,i){var a=KA.SUPPORT_RESPONSE_TYPE?"blob":"text",l=new XMLHttpRequest;l.onload=function(){if(l.status===200)if(a==="text")o(l.response);else{var h=new FileReader;h.addEventListener("load",function(){return o(h.result)},!1),h.addEventListener("error",function(p){return i(p)},!1),h.readAsDataURL(l.response)}else i("Failed to proxy resource "+r+" with status code "+l.status)},l.onerror=i;var u=n.indexOf("?")>-1?"&":"?";if(l.open("GET",""+n+u+"url="+encodeURIComponent(e)+"&responseType="+a),a!=="text"&&l instanceof XMLHttpRequest&&(l.responseType=a),A._options.imageTimeout){var f=A._options.imageTimeout;l.timeout=f,l.ontimeout=function(){return i("Timed out ("+f+"ms) proxying "+r)}}l.send()})},t})(),iJ=/^data:image\/svg\+xml/i,sJ=/^data:image\/.*;base64,/i,aJ=/^data:image\/.*/i,lJ=function(t){return KA.SUPPORT_SVG_DRAWING||!uJ(t)},QB=function(t){return aJ.test(t)},cJ=function(t){return sJ.test(t)},FB=function(t){return t.substr(0,4)==="blob"},uJ=function(t){return t.substr(-3).toLowerCase()==="svg"||iJ.test(t)},Te=(function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t})(),xa=function(t,e,A){return new Te(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},Qf=(function(){function t(e,A,n,r){this.type=1,this.start=e,this.startControl=A,this.endControl=n,this.end=r}return t.prototype.subdivide=function(e,A){var n=xa(this.start,this.startControl,e),r=xa(this.startControl,this.endControl,e),o=xa(this.endControl,this.end,e),i=xa(n,r,e),a=xa(r,o,e),l=xa(i,a,e);return A?new t(this.start,n,i,l):new t(l,a,o,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t})(),or=function(t){return t.type===1},dJ=(function(){function t(e){var A=e.styles,n=e.bounds,r=mc(A.borderTopLeftRadius,n.width,n.height),o=r[0],i=r[1],a=mc(A.borderTopRightRadius,n.width,n.height),l=a[0],u=a[1],f=mc(A.borderBottomRightRadius,n.width,n.height),h=f[0],p=f[1],g=mc(A.borderBottomLeftRadius,n.width,n.height),B=g[0],y=g[1],b=[];b.push((o+l)/n.width),b.push((B+h)/n.width),b.push((i+y)/n.height),b.push((u+p)/n.height);var w=Math.max.apply(Math,b);w>1&&(o/=w,i/=w,l/=w,u/=w,h/=w,p/=w,B/=w,y/=w);var v=n.width-l,k=n.height-p,F=n.width-h,x=n.height-y,Q=A.borderTopWidth,I=A.borderRightWidth,M=A.borderBottomWidth,O=A.borderLeftWidth,P=Mt(A.paddingTop,e.bounds.width),ie=Mt(A.paddingRight,e.bounds.width),ae=Mt(A.paddingBottom,e.bounds.width),ue=Mt(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=o>0||i>0?Yt(n.left+O/3,n.top+Q/3,o-O/3,i-Q/3,Et.TOP_LEFT):new Te(n.left+O/3,n.top+Q/3),this.topRightBorderDoubleOuterBox=o>0||i>0?Yt(n.left+v,n.top+Q/3,l-I/3,u-Q/3,Et.TOP_RIGHT):new Te(n.left+n.width-I/3,n.top+Q/3),this.bottomRightBorderDoubleOuterBox=h>0||p>0?Yt(n.left+F,n.top+k,h-I/3,p-M/3,Et.BOTTOM_RIGHT):new Te(n.left+n.width-I/3,n.top+n.height-M/3),this.bottomLeftBorderDoubleOuterBox=B>0||y>0?Yt(n.left+O/3,n.top+x,B-O/3,y-M/3,Et.BOTTOM_LEFT):new Te(n.left+O/3,n.top+n.height-M/3),this.topLeftBorderDoubleInnerBox=o>0||i>0?Yt(n.left+O*2/3,n.top+Q*2/3,o-O*2/3,i-Q*2/3,Et.TOP_LEFT):new Te(n.left+O*2/3,n.top+Q*2/3),this.topRightBorderDoubleInnerBox=o>0||i>0?Yt(n.left+v,n.top+Q*2/3,l-I*2/3,u-Q*2/3,Et.TOP_RIGHT):new Te(n.left+n.width-I*2/3,n.top+Q*2/3),this.bottomRightBorderDoubleInnerBox=h>0||p>0?Yt(n.left+F,n.top+k,h-I*2/3,p-M*2/3,Et.BOTTOM_RIGHT):new Te(n.left+n.width-I*2/3,n.top+n.height-M*2/3),this.bottomLeftBorderDoubleInnerBox=B>0||y>0?Yt(n.left+O*2/3,n.top+x,B-O*2/3,y-M*2/3,Et.BOTTOM_LEFT):new Te(n.left+O*2/3,n.top+n.height-M*2/3),this.topLeftBorderStroke=o>0||i>0?Yt(n.left+O/2,n.top+Q/2,o-O/2,i-Q/2,Et.TOP_LEFT):new Te(n.left+O/2,n.top+Q/2),this.topRightBorderStroke=o>0||i>0?Yt(n.left+v,n.top+Q/2,l-I/2,u-Q/2,Et.TOP_RIGHT):new Te(n.left+n.width-I/2,n.top+Q/2),this.bottomRightBorderStroke=h>0||p>0?Yt(n.left+F,n.top+k,h-I/2,p-M/2,Et.BOTTOM_RIGHT):new Te(n.left+n.width-I/2,n.top+n.height-M/2),this.bottomLeftBorderStroke=B>0||y>0?Yt(n.left+O/2,n.top+x,B-O/2,y-M/2,Et.BOTTOM_LEFT):new Te(n.left+O/2,n.top+n.height-M/2),this.topLeftBorderBox=o>0||i>0?Yt(n.left,n.top,o,i,Et.TOP_LEFT):new Te(n.left,n.top),this.topRightBorderBox=l>0||u>0?Yt(n.left+v,n.top,l,u,Et.TOP_RIGHT):new Te(n.left+n.width,n.top),this.bottomRightBorderBox=h>0||p>0?Yt(n.left+F,n.top+k,h,p,Et.BOTTOM_RIGHT):new Te(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=B>0||y>0?Yt(n.left,n.top+x,B,y,Et.BOTTOM_LEFT):new Te(n.left,n.top+n.height),this.topLeftPaddingBox=o>0||i>0?Yt(n.left+O,n.top+Q,Math.max(0,o-O),Math.max(0,i-Q),Et.TOP_LEFT):new Te(n.left+O,n.top+Q),this.topRightPaddingBox=l>0||u>0?Yt(n.left+Math.min(v,n.width-I),n.top+Q,v>n.width+I?0:Math.max(0,l-I),Math.max(0,u-Q),Et.TOP_RIGHT):new Te(n.left+n.width-I,n.top+Q),this.bottomRightPaddingBox=h>0||p>0?Yt(n.left+Math.min(F,n.width-O),n.top+Math.min(k,n.height-M),Math.max(0,h-I),Math.max(0,p-M),Et.BOTTOM_RIGHT):new Te(n.left+n.width-I,n.top+n.height-M),this.bottomLeftPaddingBox=B>0||y>0?Yt(n.left+O,n.top+Math.min(x,n.height-M),Math.max(0,B-O),Math.max(0,y-M),Et.BOTTOM_LEFT):new Te(n.left+O,n.top+n.height-M),this.topLeftContentBox=o>0||i>0?Yt(n.left+O+ue,n.top+Q+P,Math.max(0,o-(O+ue)),Math.max(0,i-(Q+P)),Et.TOP_LEFT):new Te(n.left+O+ue,n.top+Q+P),this.topRightContentBox=l>0||u>0?Yt(n.left+Math.min(v,n.width+O+ue),n.top+Q+P,v>n.width+O+ue?0:l-O+ue,u-(Q+P),Et.TOP_RIGHT):new Te(n.left+n.width-(I+ie),n.top+Q+P),this.bottomRightContentBox=h>0||p>0?Yt(n.left+Math.min(F,n.width-(O+ue)),n.top+Math.min(k,n.height+Q+P),Math.max(0,h-(I+ie)),p-(M+ae),Et.BOTTOM_RIGHT):new Te(n.left+n.width-(I+ie),n.top+n.height-(M+ae)),this.bottomLeftContentBox=B>0||y>0?Yt(n.left+O+ue,n.top+x,Math.max(0,B-(O+ue)),y-(M+ae),Et.BOTTOM_LEFT):new Te(n.left+O+ue,n.top+n.height-(M+ae))}return t})(),Et;(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"})(Et||(Et={}));var Yt=function(t,e,A,n,r){var o=4*((Math.sqrt(2)-1)/3),i=A*o,a=n*o,l=t+A,u=e+n;switch(r){case Et.TOP_LEFT:return new Qf(new Te(t,u),new Te(t,u-a),new Te(l-i,e),new Te(l,e));case Et.TOP_RIGHT:return new Qf(new Te(t,e),new Te(t+i,e),new Te(l,u-a),new Te(l,u));case Et.BOTTOM_RIGHT:return new Qf(new Te(l,e),new Te(l,e+a),new Te(t+i,u),new Te(t,u));case Et.BOTTOM_LEFT:default:return new Qf(new Te(l,u),new Te(l-i,u),new Te(t,e+a),new Te(t,e))}},Ff=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},fJ=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Uf=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},hJ=(function(){function t(e,A,n){this.offsetX=e,this.offsetY=A,this.matrix=n,this.type=0,this.target=6}return t})(),If=(function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t})(),pJ=(function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t})(),mJ=function(t){return t.type===0},GS=function(t){return t.type===1},gJ=function(t){return t.type===2},WS=function(t,e){return t.length===e.length?t.some(function(A,n){return A===e[n]}):!1},BJ=function(t,e,A,n,r){return t.map(function(o,i){switch(i){case 0:return o.add(e,A);case 1:return o.add(e+n,A);case 2:return o.add(e+n,A+r);case 3:return o.add(e,A+r)}return o})},zS=(function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t})(),YS=(function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new dJ(this.container),this.container.styles.opacity<1&&this.effects.push(new pJ(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,o=this.container.styles.transform;this.effects.push(new hJ(n,r,o))}if(this.container.styles.overflowX!==0){var i=Ff(this.curves),a=Uf(this.curves);WS(i,a)?this.effects.push(new If(i,6)):(this.effects.push(new If(i,2)),this.effects.push(new If(a,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var o=n.effects.filter(function(l){return!GS(l)});if(A||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,o),A=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var i=Ff(n.curves),a=Uf(n.curves);WS(i,a)||r.unshift(new If(a,6))}}else r.unshift.apply(r,o);n=n.parent}return r.filter(function(l){return vA(l.target,e)})},t})(),UB=function(t,e,A,n){t.container.elements.forEach(function(r){var o=vA(r.flags,4),i=vA(r.flags,2),a=new YS(r,t);vA(r.styles.display,2048)&&n.push(a);var l=vA(r.flags,8)?[]:n;if(o||i){var u=o||r.styles.isPositioned()?A:e,f=new zS(a);if(r.styles.isPositioned()||r.styles.opacity<1||r.styles.isTransformed()){var h=r.styles.zIndex.order;if(h<0){var p=0;u.negativeZIndex.some(function(B,y){return h>B.element.container.styles.zIndex.order?(p=y,!1):p>0}),u.negativeZIndex.splice(p,0,f)}else if(h>0){var g=0;u.positiveZIndex.some(function(B,y){return h>=B.element.container.styles.zIndex.order?(g=y+1,!1):g>0}),u.positiveZIndex.splice(g,0,f)}else u.zeroOrAutoZIndexOrTransformedOrOpacity.push(f)}else r.styles.isFloating()?u.nonPositionedFloats.push(f):u.nonPositionedInlineLevel.push(f);UB(a,f,o?f:A,l)}else r.styles.isInlineLevel()?e.inlineLevel.push(a):e.nonInlineLevel.push(a),UB(a,e,A,l);vA(r.flags,8)&&JS(r,l)})},JS=function(t,e){for(var A=t instanceof BB?t.start:1,n=t instanceof BB?t.reversed:!1,r=0;r<e.length;r++){var o=e[r];o.container instanceof wS&&typeof o.container.value=="number"&&o.container.value!==0&&(A=o.container.value),o.listValue=bc(A,o.container.styles.listStyleType,!0),A+=n?-1:1}},yJ=function(t){var e=new YS(t,null),A=new zS(e),n=[];return UB(e,A,A,n),JS(e.container,n),A},XS=function(t,e){switch(e){case 0:return ir(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return ir(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return ir(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return ir(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},wJ=function(t,e){switch(e){case 0:return ir(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return ir(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return ir(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return ir(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},CJ=function(t,e){switch(e){case 0:return ir(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return ir(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return ir(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return ir(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},bJ=function(t,e){switch(e){case 0:return xf(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return xf(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return xf(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return xf(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},xf=function(t,e){var A=[];return or(t)?A.push(t.subdivide(.5,!1)):A.push(t),or(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},ir=function(t,e,A,n){var r=[];return or(t)?r.push(t.subdivide(.5,!1)):r.push(t),or(A)?r.push(A.subdivide(.5,!0)):r.push(A),or(n)?r.push(n.subdivide(.5,!0).reverse()):r.push(n),or(e)?r.push(e.subdivide(.5,!1).reverse()):r.push(e),r},jS=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},Tf=function(t){var e=t.styles,A=t.bounds,n=Mt(e.paddingLeft,A.width),r=Mt(e.paddingRight,A.width),o=Mt(e.paddingTop,A.width),i=Mt(e.paddingBottom,A.width);return A.add(n+e.borderLeftWidth,o+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+n+r),-(e.borderTopWidth+e.borderBottomWidth+o+i))},vJ=function(t,e){return t===0?e.bounds:t===2?Tf(e):jS(e)},EJ=function(t,e){return t===0?e.bounds:t===2?Tf(e):jS(e)},IB=function(t,e,A){var n=vJ(_a(t.styles.backgroundOrigin,e),t),r=EJ(_a(t.styles.backgroundClip,e),t),o=kJ(_a(t.styles.backgroundSize,e),A,n),i=o[0],a=o[1],l=mc(_a(t.styles.backgroundPosition,e),n.width-i,n.height-a),u=SJ(_a(t.styles.backgroundRepeat,e),l,o,n,r),f=Math.round(n.left+l[0]),h=Math.round(n.top+l[1]);return[u,f,h,i,a]},Ta=function(t){return Dt(t)&&t.value===Qa.AUTO},_f=function(t){return typeof t=="number"},kJ=function(t,e,A){var n=e[0],r=e[1],o=e[2],i=t[0],a=t[1];if(!i)return[0,0];if(CA(i)&&a&&CA(a))return[Mt(i,A.width),Mt(a,A.height)];var l=_f(o);if(Dt(i)&&(i.value===Qa.CONTAIN||i.value===Qa.COVER)){if(_f(o)){var u=A.width/A.height;return u<o!=(i.value===Qa.COVER)?[A.width,A.width/o]:[A.height*o,A.height]}return[A.width,A.height]}var f=_f(n),h=_f(r),p=f||h;if(Ta(i)&&(!a||Ta(a))){if(f&&h)return[n,r];if(!l&&!p)return[A.width,A.height];if(p&&l){var g=f?n:r*o,B=h?r:n/o;return[g,B]}var y=f?n:A.width,b=h?r:A.height;return[y,b]}if(l){var w=0,v=0;return CA(i)?w=Mt(i,A.width):CA(a)&&(v=Mt(a,A.height)),Ta(i)?w=v*o:(!a||Ta(a))&&(v=w/o),[w,v]}var k=null,F=null;if(CA(i)?k=Mt(i,A.width):a&&CA(a)&&(F=Mt(a,A.height)),k!==null&&(!a||Ta(a))&&(F=f&&h?k/n*r:A.height),F!==null&&Ta(i)&&(k=f&&h?F/r*n:A.width),k!==null&&F!==null)return[k,F];throw new Error("Unable to calculate background-size for element")},_a=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},SJ=function(t,e,A,n,r){var o=e[0],i=e[1],a=A[0],l=A[1];switch(t){case 2:return[new Te(Math.round(n.left),Math.round(n.top+i)),new Te(Math.round(n.left+n.width),Math.round(n.top+i)),new Te(Math.round(n.left+n.width),Math.round(l+n.top+i)),new Te(Math.round(n.left),Math.round(l+n.top+i))];case 3:return[new Te(Math.round(n.left+o),Math.round(n.top)),new Te(Math.round(n.left+o+a),Math.round(n.top)),new Te(Math.round(n.left+o+a),Math.round(n.height+n.top)),new Te(Math.round(n.left+o),Math.round(n.height+n.top))];case 1:return[new Te(Math.round(n.left+o),Math.round(n.top+i)),new Te(Math.round(n.left+o+a),Math.round(n.top+i)),new Te(Math.round(n.left+o+a),Math.round(n.top+i+l)),new Te(Math.round(n.left+o),Math.round(n.top+i+l))];default:return[new Te(Math.round(r.left),Math.round(r.top)),new Te(Math.round(r.left+r.width),Math.round(r.top)),new Te(Math.round(r.left+r.width),Math.round(r.height+r.top)),new Te(Math.round(r.left),Math.round(r.height+r.top))]}},QJ="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",qS="Hidden Text",FJ=(function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var n=this._document.createElement("div"),r=this._document.createElement("img"),o=this._document.createElement("span"),i=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=A,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",i.appendChild(n),r.src=QJ,r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",o.style.fontFamily=e,o.style.fontSize=A,o.style.margin="0",o.style.padding="0",o.appendChild(this._document.createTextNode(qS)),n.appendChild(o),n.appendChild(r);var a=r.offsetTop-o.offsetTop+2;n.removeChild(o),n.appendChild(this._document.createTextNode(qS)),n.style.lineHeight="normal",r.style.verticalAlign="super";var l=r.offsetTop-n.offsetTop+2;return i.removeChild(n),{baseline:a,middle:l}},t.prototype.getMetrics=function(e,A){var n=e+" "+A;return typeof this._data[n]>"u"&&(this._data[n]=this.parseMetrics(e,A)),this._data[n]},t})(),ZS=(function(){function t(e,A){this.context=e,this.options=A}return t})(),UJ=1e4,IJ=(function(t){Fr(e,t);function e(A,n){var r=t.call(this,A,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 FJ(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 e.prototype.applyEffects=function(A){for(var n=this;this._activeEffects.length;)this.popEffect();A.forEach(function(r){return n.applyEffect(r)})},e.prototype.applyEffect=function(A){this.ctx.save(),gJ(A)&&(this.ctx.globalAlpha=A.opacity),mJ(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),GS(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return dn(this,void 0,void 0,function(){var n;return ZA(this,function(r){switch(r.label){case 0:return n=A.element.container.styles,n.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:r.sent(),r.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return dn(this,void 0,void 0,function(){return ZA(this,function(n){switch(n.label){case 0:if(vA(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return n.sent(),[4,this.renderNodeContent(A)];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,n,r){var o=this;if(n===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+r);else{var i=gB(A.text);i.reduce(function(a,l){return o.ctx.fillText(l,a,A.bounds.top+r),a+o.ctx.measureText(l).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var n=A.fontVariant.filter(function(i){return i==="normal"||i==="small-caps"}).join(""),r=LJ(A.fontFamily).join(", "),o=pc(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,n,A.fontWeight,o,r].join(" "),r,o]},e.prototype.renderTextNode=function(A,n){return dn(this,void 0,void 0,function(){var r,o,i,a,l,u,f,h,p=this;return ZA(this,function(g){return r=this.createFontStyle(n),o=r[0],i=r[1],a=r[2],this.ctx.font=o,this.ctx.direction=n.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",l=this.fontMetrics.getMetrics(i,a),u=l.baseline,f=l.middle,h=n.paintOrder,A.textBounds.forEach(function(B){h.forEach(function(y){switch(y){case 0:p.ctx.fillStyle=OA(n.color),p.renderTextWithLetterSpacing(B,n.letterSpacing,u);var b=n.textShadow;b.length&&B.text.trim().length&&(b.slice(0).reverse().forEach(function(w){p.ctx.shadowColor=OA(w.color),p.ctx.shadowOffsetX=w.offsetX.number*p.options.scale,p.ctx.shadowOffsetY=w.offsetY.number*p.options.scale,p.ctx.shadowBlur=w.blur.number,p.renderTextWithLetterSpacing(B,n.letterSpacing,u)}),p.ctx.shadowColor="",p.ctx.shadowOffsetX=0,p.ctx.shadowOffsetY=0,p.ctx.shadowBlur=0),n.textDecorationLine.length&&(p.ctx.fillStyle=OA(n.textDecorationColor||n.color),n.textDecorationLine.forEach(function(w){switch(w){case 1:p.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top+u),B.bounds.width,1);break;case 2:p.ctx.fillRect(B.bounds.left,Math.round(B.bounds.top),B.bounds.width,1);break;case 3:p.ctx.fillRect(B.bounds.left,Math.ceil(B.bounds.top+f),B.bounds.width,1);break}}));break;case 1:n.webkitTextStrokeWidth&&B.text.trim().length&&(p.ctx.strokeStyle=OA(n.webkitTextStrokeColor),p.ctx.lineWidth=n.webkitTextStrokeWidth,p.ctx.lineJoin=window.chrome?"miter":"round",p.ctx.strokeText(B.text,B.bounds.left,B.bounds.top+u)),p.ctx.strokeStyle="",p.ctx.lineWidth=0,p.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,n,r){if(r&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var o=Tf(A),i=Uf(n);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(r,0,0,A.intrinsicWidth,A.intrinsicHeight,o.left,o.top,o.width,o.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return dn(this,void 0,void 0,function(){var n,r,o,i,a,l,v,v,u,f,h,p,F,g,B,x,y,b,w,v,k,F,x;return ZA(this,function(Q){switch(Q.label){case 0:this.applyEffects(A.getEffects(4)),n=A.container,r=A.curves,o=n.styles,i=0,a=n.textNodes,Q.label=1;case 1:return i<a.length?(l=a[i],[4,this.renderTextNode(l,o)]):[3,4];case 2:Q.sent(),Q.label=3;case 3:return i++,[3,1];case 4:if(!(n instanceof gS))return[3,8];Q.label=5;case 5:return Q.trys.push([5,7,,8]),[4,this.context.cache.match(n.src)];case 6:return v=Q.sent(),this.renderReplacedElement(n,r,v),[3,8];case 7:return Q.sent(),this.context.logger.error("Error loading image "+n.src),[3,8];case 8:if(n instanceof BS&&this.renderReplacedElement(n,r,n.canvas),!(n instanceof yS))return[3,12];Q.label=9;case 9:return Q.trys.push([9,11,,12]),[4,this.context.cache.match(n.svg)];case 10:return v=Q.sent(),this.renderReplacedElement(n,r,v),[3,12];case 11:return Q.sent(),this.context.logger.error("Error loading svg "+n.svg.substring(0,255)),[3,12];case 12:return n instanceof ES&&n.tree?(u=new e(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=Q.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),Q.label=14;case 14:if(n instanceof yB&&(h=Math.min(n.bounds.width,n.bounds.height),n.type===Cf?n.checked&&(this.ctx.save(),this.path([new Te(n.bounds.left+h*.39363,n.bounds.top+h*.79),new Te(n.bounds.left+h*.16,n.bounds.top+h*.5549),new Te(n.bounds.left+h*.27347,n.bounds.top+h*.44071),new Te(n.bounds.left+h*.39694,n.bounds.top+h*.5649),new Te(n.bounds.left+h*.72983,n.bounds.top+h*.23),new Te(n.bounds.left+h*.84,n.bounds.top+h*.34085),new Te(n.bounds.left+h*.39363,n.bounds.top+h*.79)]),this.ctx.fillStyle=OA(CS),this.ctx.fill(),this.ctx.restore()):n.type===bf&&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=OA(CS),this.ctx.fill(),this.ctx.restore())),xJ(n)&&n.value.length){switch(p=this.createFontStyle(o),F=p[0],g=p[1],B=this.fontMetrics.getMetrics(F,g).baseline,this.ctx.font=F,this.ctx.fillStyle=OA(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=_J(n.styles.textAlign),x=Tf(n),y=0,n.styles.textAlign){case 1:y+=x.width/2;break;case 2:y+=x.width;break}b=x.add(y,0,0,-x.height/2+1),this.ctx.save(),this.path([new Te(x.left,x.top),new Te(x.left+x.width,x.top),new Te(x.left+x.width,x.top+x.height),new Te(x.left,x.top+x.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new wc(n.value,b),o.letterSpacing,B),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!vA(n.styles.display,2048))return[3,20];if(n.styles.listStyleImage===null)return[3,19];if(w=n.styles.listStyleImage,w.type!==0)return[3,18];v=void 0,k=w.url,Q.label=15;case 15:return Q.trys.push([15,17,,18]),[4,this.context.cache.match(k)];case 16:return v=Q.sent(),this.ctx.drawImage(v,n.bounds.left-(v.width+10),n.bounds.top),[3,18];case 17:return Q.sent(),this.context.logger.error("Error loading list-style-image "+k),[3,18];case 18:return[3,20];case 19:A.listValue&&n.styles.listStyleType!==-1&&(F=this.createFontStyle(o)[0],this.ctx.font=F,this.ctx.fillStyle=OA(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",x=new To(n.bounds.left,n.bounds.top+Mt(n.styles.paddingTop,n.bounds.width),n.bounds.width,qk(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new wc(A.listValue,x),o.letterSpacing,qk(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Q.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return dn(this,void 0,void 0,function(){var n,r,w,o,i,w,a,l,w,u,f,w,h,p,w,g,B,w,y,b,w;return ZA(this,function(v){switch(v.label){case 0:if(vA(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:v.sent(),n=0,r=A.negativeZIndex,v.label=2;case 2:return n<r.length?(w=r[n],[4,this.renderStack(w)]):[3,5];case 3:v.sent(),v.label=4;case 4:return n++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:v.sent(),o=0,i=A.nonInlineLevel,v.label=7;case 7:return o<i.length?(w=i[o],[4,this.renderNode(w)]):[3,10];case 8:v.sent(),v.label=9;case 9:return o++,[3,7];case 10:a=0,l=A.nonPositionedFloats,v.label=11;case 11:return a<l.length?(w=l[a],[4,this.renderStack(w)]):[3,14];case 12:v.sent(),v.label=13;case 13:return a++,[3,11];case 14:u=0,f=A.nonPositionedInlineLevel,v.label=15;case 15:return u<f.length?(w=f[u],[4,this.renderStack(w)]):[3,18];case 16:v.sent(),v.label=17;case 17:return u++,[3,15];case 18:h=0,p=A.inlineLevel,v.label=19;case 19:return h<p.length?(w=p[h],[4,this.renderNode(w)]):[3,22];case 20:v.sent(),v.label=21;case 21:return h++,[3,19];case 22:g=0,B=A.zeroOrAutoZIndexOrTransformedOrOpacity,v.label=23;case 23:return g<B.length?(w=B[g],[4,this.renderStack(w)]):[3,26];case 24:v.sent(),v.label=25;case 25:return g++,[3,23];case 26:y=0,b=A.positiveZIndex,v.label=27;case 27:return y<b.length?(w=b[y],[4,this.renderStack(w)]):[3,30];case 28:v.sent(),v.label=29;case 29:return y++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){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(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var n=this;A.forEach(function(r,o){var i=or(r)?r.start:r;o===0?n.ctx.moveTo(i.x,i.y):n.ctx.lineTo(i.x,i.y),or(r)&&n.ctx.bezierCurveTo(r.startControl.x,r.startControl.y,r.endControl.x,r.endControl.y,r.end.x,r.end.y)})},e.prototype.renderRepeat=function(A,n,r,o){this.path(A),this.ctx.fillStyle=n,this.ctx.translate(r,o),this.ctx.fill(),this.ctx.translate(-r,-o)},e.prototype.resizeImage=function(A,n,r){var o;if(A.width===n&&A.height===r)return A;var i=(o=this.canvas.ownerDocument)!==null&&o!==void 0?o:document,a=i.createElement("canvas");a.width=Math.max(1,n),a.height=Math.max(1,r);var l=a.getContext("2d");return l.drawImage(A,0,0,A.width,A.height,0,0,n,r),a},e.prototype.renderBackgroundImage=function(A){return dn(this,void 0,void 0,function(){var n,r,o,i,a,l;return ZA(this,function(u){switch(u.label){case 0:n=A.styles.backgroundImage.length-1,r=function(f){var h,p,g,P,$,te,ue,H,M,B,P,$,te,ue,H,y,b,w,v,k,F,x,Q,I,M,O,P,ie,ae,ue,H,G,$,te,ee,K,ce,j,Qe,R,J,Ae;return ZA(this,function(oe){switch(oe.label){case 0:if(f.type!==0)return[3,5];h=void 0,p=f.url,oe.label=1;case 1:return oe.trys.push([1,3,,4]),[4,o.context.cache.match(p)];case 2:return h=oe.sent(),[3,4];case 3:return oe.sent(),o.context.logger.error("Error loading background-image "+p),[3,4];case 4:return h&&(g=IB(A,n,[h.width,h.height,h.width/h.height]),P=g[0],$=g[1],te=g[2],ue=g[3],H=g[4],M=o.ctx.createPattern(o.resizeImage(h,ue,H),"repeat"),o.renderRepeat(P,M,$,te)),[3,6];case 5:mY(f)?(B=IB(A,n,[null,null,null]),P=B[0],$=B[1],te=B[2],ue=B[3],H=B[4],y=uY(f.angle,ue,H),b=y[0],w=y[1],v=y[2],k=y[3],F=y[4],x=document.createElement("canvas"),x.width=ue,x.height=H,Q=x.getContext("2d"),I=Q.createLinearGradient(w,k,v,F),Pk(f.stops,b).forEach(function(S){return I.addColorStop(S.stop,OA(S.color))}),Q.fillStyle=I,Q.fillRect(0,0,ue,H),ue>0&&H>0&&(M=o.ctx.createPattern(x,"repeat"),o.renderRepeat(P,M,$,te))):gY(f)&&(O=IB(A,n,[null,null,null]),P=O[0],ie=O[1],ae=O[2],ue=O[3],H=O[4],G=f.position.length===0?[AB]:f.position,$=Mt(G[0],ue),te=Mt(G[G.length-1],H),ee=dY(f,$,te,ue,H),K=ee[0],ce=ee[1],K>0&&ce>0&&(j=o.ctx.createRadialGradient(ie+$,ae+te,0,ie+$,ae+te,K),Pk(f.stops,K*2).forEach(function(S){return j.addColorStop(S.stop,OA(S.color))}),o.path(P),o.ctx.fillStyle=j,K!==ce?(Qe=A.bounds.left+.5*A.bounds.width,R=A.bounds.top+.5*A.bounds.height,J=ce/K,Ae=1/J,o.ctx.save(),o.ctx.translate(Qe,R),o.ctx.transform(1,0,0,J,0,0),o.ctx.translate(-Qe,-R),o.ctx.fillRect(ie,Ae*(ae-R)+R,ue,H*Ae),o.ctx.restore()):o.ctx.fill())),oe.label=6;case 6:return n--,[2]}})},o=this,i=0,a=A.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return i<a.length?(l=a[i],[5,r(l)]):[3,4];case 2:u.sent(),u.label=3;case 3:return i++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,n,r){return dn(this,void 0,void 0,function(){return ZA(this,function(o){return this.path(XS(r,n)),this.ctx.fillStyle=OA(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,n,r,o){return dn(this,void 0,void 0,function(){var i,a;return ZA(this,function(l){switch(l.label){case 0:return n<3?[4,this.renderSolidBorder(A,r,o)]:[3,2];case 1:return l.sent(),[2];case 2:return i=wJ(o,r),this.path(i),this.ctx.fillStyle=OA(A),this.ctx.fill(),a=CJ(o,r),this.path(a),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return dn(this,void 0,void 0,function(){var n,r,o,i,a,l,u,f,h=this;return ZA(this,function(p){switch(p.label){case 0:return this.applyEffects(A.getEffects(2)),n=A.container.styles,r=!Ii(n.backgroundColor)||n.backgroundImage.length,o=[{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}],i=TJ(_a(n.backgroundClip,0),A.curves),r||n.boxShadow.length?(this.ctx.save(),this.path(i),this.ctx.clip(),Ii(n.backgroundColor)||(this.ctx.fillStyle=OA(n.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:p.sent(),this.ctx.restore(),n.boxShadow.slice(0).reverse().forEach(function(g){h.ctx.save();var B=Ff(A.curves),y=g.inset?0:UJ,b=BJ(B,-y+(g.inset?1:-1)*g.spread.number,(g.inset?1:-1)*g.spread.number,g.spread.number*(g.inset?-2:2),g.spread.number*(g.inset?-2:2));g.inset?(h.path(B),h.ctx.clip(),h.mask(b)):(h.mask(B),h.ctx.clip(),h.path(b)),h.ctx.shadowOffsetX=g.offsetX.number+y,h.ctx.shadowOffsetY=g.offsetY.number,h.ctx.shadowColor=OA(g.color),h.ctx.shadowBlur=g.blur.number,h.ctx.fillStyle=g.inset?OA(g.color):"rgba(0,0,0,1)",h.ctx.fill(),h.ctx.restore()}),p.label=2;case 2:a=0,l=0,u=o,p.label=3;case 3:return l<u.length?(f=u[l],f.style!==0&&!Ii(f.color)&&f.width>0?f.style!==2?[3,5]:[4,this.renderDashedDottedBorder(f.color,f.width,a,A.curves,2)]:[3,11]):[3,13];case 4:return p.sent(),[3,11];case 5:return f.style!==3?[3,7]:[4,this.renderDashedDottedBorder(f.color,f.width,a,A.curves,3)];case 6:return p.sent(),[3,11];case 7:return f.style!==4?[3,9]:[4,this.renderDoubleBorder(f.color,f.width,a,A.curves)];case 8:return p.sent(),[3,11];case 9:return[4,this.renderSolidBorder(f.color,a,A.curves)];case 10:p.sent(),p.label=11;case 11:a++,p.label=12;case 12:return l++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,n,r,o,i){return dn(this,void 0,void 0,function(){var a,l,u,f,h,p,g,B,y,b,w,v,k,F,x,Q,x,Q;return ZA(this,function(I){return this.ctx.save(),a=bJ(o,r),l=XS(o,r),i===2&&(this.path(l),this.ctx.clip()),or(l[0])?(u=l[0].start.x,f=l[0].start.y):(u=l[0].x,f=l[0].y),or(l[1])?(h=l[1].end.x,p=l[1].end.y):(h=l[1].x,p=l[1].y),r===0||r===2?g=Math.abs(u-h):g=Math.abs(f-p),this.ctx.beginPath(),i===3?this.formatPath(a):this.formatPath(l.slice(0,2)),B=n<3?n*3:n*2,y=n<3?n*2:n,i===3&&(B=n,y=n),b=!0,g<=B*2?b=!1:g<=B*2+y?(w=g/(2*B+y),B*=w,y*=w):(v=Math.floor((g+y)/(B+y)),k=(g-v*B)/(v-1),F=(g-(v+1)*B)/v,y=F<=0||Math.abs(y-k)<Math.abs(y-F)?k:F),b&&(i===3?this.ctx.setLineDash([0,B+y]):this.ctx.setLineDash([B,y])),i===3?(this.ctx.lineCap="round",this.ctx.lineWidth=n):this.ctx.lineWidth=n*2+1.1,this.ctx.strokeStyle=OA(A),this.ctx.stroke(),this.ctx.setLineDash([]),i===2&&(or(l[0])&&(x=l[3],Q=l[0],this.ctx.beginPath(),this.formatPath([new Te(x.end.x,x.end.y),new Te(Q.start.x,Q.start.y)]),this.ctx.stroke()),or(l[1])&&(x=l[1],Q=l[2],this.ctx.beginPath(),this.formatPath([new Te(x.end.x,x.end.y),new Te(Q.start.x,Q.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return dn(this,void 0,void 0,function(){var n;return ZA(this,function(r){switch(r.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=OA(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),n=yJ(A),[4,this.renderStack(n)];case 1:return r.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(ZS),xJ=function(t){return t instanceof vS||t instanceof bS?!0:t instanceof yB&&t.type!==bf&&t.type!==Cf},TJ=function(t,e){switch(t){case 0:return Ff(e);case 2:return fJ(e);case 1:default:return Uf(e)}},_J=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},DJ=["-apple-system","system-ui"],LJ=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return DJ.indexOf(e)===-1}):t},OJ=(function(t){Fr(e,t);function e(A,n){var r=t.call(this,A,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 e.prototype.render=function(A){return dn(this,void 0,void 0,function(){var n,r;return ZA(this,function(o){switch(o.label){case 0:return n=mB(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,MJ(n)];case 1:return r=o.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=OA(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]}})})},e})(ZS),MJ=function(t){return new Promise(function(e,A){var n=new Image;n.onload=function(){e(n)},n.onerror=A,n.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},NJ=(function(){function t(e){var A=e.id,n=e.enabled;this.id=A,this.enabled=n,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,Rd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,Rd([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,Rd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,Rd([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t})(),HJ=(function(){function t(e,A){var n;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new NJ({id:this.instanceName,enabled:e.logging}),this.cache=(n=e.cache)!==null&&n!==void 0?n:new oJ(this,e)}return t.instanceCount=1,t})(),RJ=function(t,e){return e===void 0&&(e={}),PJ(t,e)};typeof window<"u"&&KS.setContext(window);var PJ=function(t,e){return dn(void 0,void 0,void 0,function(){var A,n,r,o,i,a,l,u,f,h,p,g,B,y,b,w,v,k,F,x,I,Q,I,M,O,P,ie,ae,ue,H,G,$,te,ee,K,ce,j,Qe,R,J;return ZA(this,function(Ae){switch(Ae.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(n=A.defaultView,!n)throw new Error("Document is not attached to a Window");return r={allowTaint:(M=e.allowTaint)!==null&&M!==void 0?M:!1,imageTimeout:(O=e.imageTimeout)!==null&&O!==void 0?O:15e3,proxy:e.proxy,useCORS:(P=e.useCORS)!==null&&P!==void 0?P:!1},o=Lg({logging:(ie=e.logging)!==null&&ie!==void 0?ie:!0,cache:e.cache},r),i={windowWidth:(ae=e.windowWidth)!==null&&ae!==void 0?ae:n.innerWidth,windowHeight:(ue=e.windowHeight)!==null&&ue!==void 0?ue:n.innerHeight,scrollX:(H=e.scrollX)!==null&&H!==void 0?H:n.pageXOffset,scrollY:(G=e.scrollY)!==null&&G!==void 0?G:n.pageYOffset},a=new To(i.scrollX,i.scrollY,i.windowWidth,i.windowHeight),l=new HJ(o,a),u=($=e.foreignObjectRendering)!==null&&$!==void 0?$:!1,f={allowTaint:(te=e.allowTaint)!==null&&te!==void 0?te:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:u,copyStyles:u},l.logger.debug("Starting document clone with size "+a.width+"x"+a.height+" scrolled to "+-a.left+","+-a.top),h=new VS(l,t,f),p=h.clonedReferenceElement,p?[4,h.toIFrame(A,a)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return g=Ae.sent(),B=CB(p)||V6(p)?B5(p.ownerDocument):Pd(l,p),y=B.width,b=B.height,w=B.left,v=B.top,k=VJ(l,p,e.backgroundColor),F={canvas:e.canvas,backgroundColor:k,scale:(K=(ee=e.scale)!==null&&ee!==void 0?ee:n.devicePixelRatio)!==null&&K!==void 0?K:1,x:((ce=e.x)!==null&&ce!==void 0?ce:0)+w,y:((j=e.y)!==null&&j!==void 0?j:0)+v,width:(Qe=e.width)!==null&&Qe!==void 0?Qe:Math.ceil(y),height:(R=e.height)!==null&&R!==void 0?R:Math.ceil(b)},u?(l.logger.debug("Document cloned, using foreign object rendering"),I=new OJ(l,F),[4,I.render(p)]):[3,3];case 2:return x=Ae.sent(),[3,5];case 3:return l.logger.debug("Document cloned, element located at "+w+","+v+" with size "+y+"x"+b+" using computed rendering"),l.logger.debug("Starting DOM parsing"),Q=SS(l,p),k===Q.styles.backgroundColor&&(Q.styles.backgroundColor=Do.TRANSPARENT),l.logger.debug("Starting renderer for element at "+F.x+","+F.y+" with size "+F.width+"x"+F.height),I=new IJ(l,F),[4,I.render(Q)];case 4:x=Ae.sent(),Ae.label=5;case 5:return(!((J=e.removeContainer)!==null&&J!==void 0)||J)&&(VS.destroy(g)||l.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),l.logger.debug("Finished rendering"),[2,x]}})})},VJ=function(t,e,A){var n=e.ownerDocument,r=n.documentElement?gc(t,getComputedStyle(n.documentElement).backgroundColor):Do.TRANSPARENT,o=n.body?gc(t,getComputedStyle(n.body).backgroundColor):Do.TRANSPARENT,i=typeof A=="string"?gc(t,A):A===null?Do.TRANSPARENT:4294967295;return e===n.documentElement?Ii(r)?Ii(o)?i:o:r:i};const $J=s.defineComponent({__name:"dom-renderer",props:{modelValue:{type:String,default:""},fixedWidth:{type:Number,default:0},renderUpdates:{type:Boolean,default:!1},exportToSvg:{type:Boolean,default:!1},options:{type:Object,default:()=>({})},pending:{type:Boolean,default:!1},emitPending:{type:Boolean,default:!1},debug:{type:Boolean,default:!1}},emits:["update:modelValue","update:pending"],setup(t,{emit:e}){const A=t,n=e,r=s.ref(),o=s.ref(""),i=s.ref();async function a(){if(r.value){A.emitPending&&n("update:pending",!0);const u=r.value,f=u.firstElementChild,h=f.offsetWidth,p=f.offsetHeight,B=(await RJ(u.firstElementChild,{backgroundColor:"rgba(0, 0, 0, 0)",scale:1,width:h,height:p,...A.options})).toDataURL();if(n("update:modelValue",B),A.emitPending&&n("update:pending",!1),A.debug){const y=new Image;y.src=B,document.body.appendChild(y)}return B}return""}const l=$1.debounce(async()=>{o.value=await a()},300,{trailing:!0,leading:!1});return s.onMounted(()=>{const u=r.value;A.renderUpdates&&(i.value=new MutationObserver(async f=>{A.emitPending&&n("update:pending",!0),l()}),i.value.observe(u,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),setTimeout(()=>{A.emitPending&&n("update:pending",!0),l()},500)}),(u,f)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass(["dom-renderer",{"off-screen":!t.debug}]),ref_key:"renderer",ref:r,style:s.normalizeStyle(t.fixedWidth>0?{width:`${t.fixedWidth}px`}:{})},[s.renderSlot(u.$slots,"default")],6))}}),KJ=["id","popover"],xB=s.defineComponent({__name:"popover-dialog",props:{modelValue:{type:Boolean,default:!1},type:{type:String,default:"auto"},id:{type:String,default:()=>`popover-dialog-${Math.random().toString(36).substr(2,9)}`},title:{type:String,default:""},header:{type:Boolean,default:!1},footer:{type:Boolean,default:!1},classes:{type:String,default:""},hover:{type:Boolean,default:!1},hoverDelay:{type:Number,default:400},closeTimeout:{type:Number,default:0}},emits:["update:modelValue"],setup(t,{emit:e}){const A=t,n=e,r=s.ref(),o=s.ref(),i=s.ref(!1),a=s.computed(()=>"ontouchstart"in window||navigator.maxTouchPoints>0);function l(){clearTimeout(o.value),A.hover&&r.value?.showPopover()}function u(){i.value=!0,clearTimeout(o.value),l()}function f(){i.value=!1,(A.hover||A.closeTimeout)&&(o.value=setTimeout(()=>{r.value?.hidePopover()},A.closeTimeout||A.hoverDelay))}s.watch(()=>A.modelValue,(p,g)=>{p&&!g?r.value?.matches(":popover-open")||r.value?.showPopover():!p&&g&&r.value?.matches(":popover-open")&&r.value?.hidePopover()});function h(p){p.newState==="open"?(A.closeTimeout&&!i.value&&(clearTimeout(o.value),o.value=setTimeout(()=>{i.value||r.value?.hidePopover()},A.closeTimeout)),A.modelValue||n("update:modelValue",!0)):p.newState==="closed"&&(i.value=!1,A.modelValue&&n("update:modelValue",!1))}return s.onMounted(()=>{if(r.value?.addEventListener("toggle",h),A.modelValue&&r.value?.showPopover(),!a.value){r.value?.addEventListener("mouseenter",u),r.value?.addEventListener("mouseleave",f);const p=document.querySelector(`[popovertarget="${A.id}"]`);p&&(p.addEventListener("mouseenter",u),p.addEventListener("mouseleave",f))}}),s.onBeforeUnmount(()=>{if(clearTimeout(o.value),r.value?.removeEventListener("toggle",h),!a.value){r.value?.removeEventListener("mouseenter",u),r.value?.removeEventListener("mouseleave",f);const p=document.querySelector(`[popovertarget="${A.id}"]`);p&&(p.removeEventListener("mouseenter",u),p.removeEventListener("mouseleave",f))}}),(p,g)=>(s.openBlock(),s.createElementBlock("span",{class:"popover-dialog",id:t.id,popover:t.type,ref_key:"popover",ref:r},[s.renderSlot(p.$slots,"default",{},()=>[g[0]||(g[0]=s.createTextVNode(" Popover content goes here. ",-1))])],8,KJ))}});var GJ=Object.defineProperty,WJ=Object.defineProperties,zJ=Object.getOwnPropertyDescriptors,eQ=Object.getOwnPropertySymbols,YJ=Object.prototype.hasOwnProperty,JJ=Object.prototype.propertyIsEnumerable,tQ=(t,e,A)=>e in t?GJ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:A}):t[e]=A,MA=(t,e)=>{for(var A in e||(e={}))YJ.call(e,A)&&tQ(t,A,e[A]);if(eQ)for(var A of eQ(e))JJ.call(e,A)&&tQ(t,A,e[A]);return t},kn=(t,e)=>WJ(t,zJ(e)),Vt=(t,e,A)=>new Promise((n,r)=>{var o=l=>{try{a(A.next(l))}catch(u){r(u)}},i=l=>{try{a(A.throw(l))}catch(u){r(u)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,i);a((A=A.apply(t,e)).next())});const TB=Math.min,Da=Math.max,Df=Math.round,Lf=Math.floor,Ao=t=>({x:t,y:t});function XJ(t,e){return typeof t=="function"?t(e):t}function jJ(t){return MA({top:0,right:0,bottom:0,left:0},t)}function qJ(t){return typeof t!="number"?jJ(t):{top:t,right:t,bottom:t,left:t}}function Of(t){const{x:e,y:A,width:n,height:r}=t;return{width:n,height:r,top:A,left:e,right:e+n,bottom:A+r,x:e,y:A}}function ZJ(t,e){return Vt(this,null,function*(){var A;e===void 0&&(e={});const{x:n,y:r,platform:o,rects:i,elements:a,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:h="floating",altBoundary:p=!1,padding:g=0}=XJ(e,t),B=qJ(g),y=a[p?h==="floating"?"reference":"floating":h],b=Of(yield o.getClippingRect({element:(A=yield o.isElement==null?void 0:o.isElement(y))==null||A?y:y.contextElement||(yield o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:u,rootBoundary:f,strategy:l})),w=h==="floating"?{x:n,y:r,width:i.floating.width,height:i.floating.height}:i.reference,v=yield o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating),k=(yield o.isElement==null?void 0:o.isElement(v))?(yield o.getScale==null?void 0:o.getScale(v))||{x:1,y:1}:{x:1,y:1},F=Of(o.convertOffsetParentRelativeRectToViewportRelativeRect?yield o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:v,strategy:l}):w);return{top:(b.top-F.top+B.top)/k.y,bottom:(F.bottom-b.bottom+B.bottom)/k.y,left:(b.left-F.left+B.left)/k.x,right:(F.right-b.right+B.right)/k.x}})}function Mf(){return typeof window<"u"}function La(t){return AQ(t)?(t.nodeName||"").toLowerCase():"#document"}function Hn(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function no(t){var e;return(e=(AQ(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function AQ(t){return Mf()?t instanceof Node||t instanceof Hn(t).Node:!1}function Ir(t){return Mf()?t instanceof Element||t instanceof Hn(t).Element:!1}function ro(t){return Mf()?t instanceof HTMLElement||t instanceof Hn(t).HTMLElement:!1}function nQ(t){return!Mf()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Hn(t).ShadowRoot}function Ec(t){const{overflow:e,overflowX:A,overflowY:n,display:r}=xr(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+A)&&!["inline","contents"].includes(r)}function eX(t){return["table","td","th"].includes(La(t))}function Nf(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function _B(t){const e=DB(),A=Ir(t)?xr(t):t;return["transform","translate","scale","rotate","perspective"].some(n=>A[n]?A[n]!=="none":!1)||(A.containerType?A.containerType!=="normal":!1)||!e&&(A.backdropFilter?A.backdropFilter!=="none":!1)||!e&&(A.filter?A.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(n=>(A.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(A.contain||"").includes(n))}function tX(t){let e=Di(t);for(;ro(e)&&!Oa(e);){if(_B(e))return e;if(Nf(e))return null;e=Di(e)}return null}function DB(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Oa(t){return["html","body","#document"].includes(La(t))}function xr(t){return Hn(t).getComputedStyle(t)}function Hf(t){return Ir(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Di(t){if(La(t)==="html")return t;const e=t.assignedSlot||t.parentNode||nQ(t)&&t.host||no(t);return nQ(e)?e.host:e}function rQ(t){const e=Di(t);return Oa(e)?t.ownerDocument?t.ownerDocument.body:t.body:ro(e)&&Ec(e)?e:rQ(e)}function kc(t,e,A){var n;e===void 0&&(e=[]),A===void 0&&(A=!0);const r=rQ(t),o=r===((n=t.ownerDocument)==null?void 0:n.body),i=Hn(r);if(o){const a=LB(i);return e.concat(i,i.visualViewport||[],Ec(r)?r:[],a&&A?kc(a):[])}return e.concat(r,kc(r,[],A))}function LB(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function oQ(t){const e=xr(t);let A=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const r=ro(t),o=r?t.offsetWidth:A,i=r?t.offsetHeight:n,a=Df(A)!==o||Df(n)!==i;return a&&(A=o,n=i),{width:A,height:n,$:a}}function OB(t){return Ir(t)?t:t.contextElement}function Ma(t){const e=OB(t);if(!ro(e))return Ao(1);const A=e.getBoundingClientRect(),{width:n,height:r,$:o}=oQ(e);let i=(o?Df(A.width):A.width)/n,a=(o?Df(A.height):A.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const AX=Ao(0);function iQ(t){const e=Hn(t);return!DB()||!e.visualViewport?AX:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function nX(t,e,A){return e===void 0&&(e=!1),!A||e&&A!==Hn(t)?!1:e}function Ss(t,e,A,n){e===void 0&&(e=!1),A===void 0&&(A=!1);const r=t.getBoundingClientRect(),o=OB(t);let i=Ao(1);e&&(n?Ir(n)&&(i=Ma(n)):i=Ma(t));const a=nX(o,A,n)?iQ(o):Ao(0);let l=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,f=r.width/i.x,h=r.height/i.y;if(o){const p=Hn(o),g=n&&Ir(n)?Hn(n):n;let B=p,y=LB(B);for(;y&&n&&g!==B;){const b=Ma(y),w=y.getBoundingClientRect(),v=xr(y),k=w.left+(y.clientLeft+parseFloat(v.paddingLeft))*b.x,F=w.top+(y.clientTop+parseFloat(v.paddingTop))*b.y;l*=b.x,u*=b.y,f*=b.x,h*=b.y,l+=k,u+=F,B=Hn(y),y=LB(B)}}return Of({width:f,height:h,x:l,y:u})}function MB(t,e){const A=Hf(t).scrollLeft;return e?e.left+A:Ss(no(t)).left+A}function sQ(t,e,A){A===void 0&&(A=!1);const n=t.getBoundingClientRect(),r=n.left+e.scrollLeft-(A?0:MB(t,n)),o=n.top+e.scrollTop;return{x:r,y:o}}function rX(t){let{elements:e,rect:A,offsetParent:n,strategy:r}=t;const o=r==="fixed",i=no(n),a=e?Nf(e.floating):!1;if(n===i||a&&o)return A;let l={scrollLeft:0,scrollTop:0},u=Ao(1);const f=Ao(0),h=ro(n);if((h||!h&&!o)&&((La(n)!=="body"||Ec(i))&&(l=Hf(n)),ro(n))){const g=Ss(n);u=Ma(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const p=i&&!h&&!o?sQ(i,l,!0):Ao(0);return{width:A.width*u.x,height:A.height*u.y,x:A.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:A.y*u.y-l.scrollTop*u.y+f.y+p.y}}function oX(t){return Array.from(t.getClientRects())}function iX(t){const e=no(t),A=Hf(t),n=t.ownerDocument.body,r=Da(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),o=Da(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-A.scrollLeft+MB(t);const a=-A.scrollTop;return xr(n).direction==="rtl"&&(i+=Da(e.clientWidth,n.clientWidth)-r),{width:r,height:o,x:i,y:a}}function sX(t,e){const A=Hn(t),n=no(t),r=A.visualViewport;let o=n.clientWidth,i=n.clientHeight,a=0,l=0;if(r){o=r.width,i=r.height;const u=DB();(!u||u&&e==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:o,height:i,x:a,y:l}}function aX(t,e){const A=Ss(t,!0,e==="fixed"),n=A.top+t.clientTop,r=A.left+t.clientLeft,o=ro(t)?Ma(t):Ao(1),i=t.clientWidth*o.x,a=t.clientHeight*o.y,l=r*o.x,u=n*o.y;return{width:i,height:a,x:l,y:u}}function aQ(t,e,A){let n;if(e==="viewport")n=sX(t,A);else if(e==="document")n=iX(no(t));else if(Ir(e))n=aX(e,A);else{const r=iQ(t);n={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Of(n)}function lQ(t,e){const A=Di(t);return A===e||!Ir(A)||Oa(A)?!1:xr(A).position==="fixed"||lQ(A,e)}function lX(t,e){const A=e.get(t);if(A)return A;let n=kc(t,[],!1).filter(a=>Ir(a)&&La(a)!=="body"),r=null;const o=xr(t).position==="fixed";let i=o?Di(t):t;for(;Ir(i)&&!Oa(i);){const a=xr(i),l=_B(i);!l&&a.position==="fixed"&&(r=null),(o?!l&&!r:!l&&a.position==="static"&&r&&["absolute","fixed"].includes(r.position)||Ec(i)&&!l&&lQ(t,i))?n=n.filter(u=>u!==i):r=a,i=Di(i)}return e.set(t,n),n}function cX(t){let{element:e,boundary:A,rootBoundary:n,strategy:r}=t;const o=[...A==="clippingAncestors"?Nf(e)?[]:lX(e,this._c):[].concat(A),n],i=o[0],a=o.reduce((l,u)=>{const f=aQ(e,u,r);return l.top=Da(f.top,l.top),l.right=TB(f.right,l.right),l.bottom=TB(f.bottom,l.bottom),l.left=Da(f.left,l.left),l},aQ(e,i,r));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function uX(t){const{width:e,height:A}=oQ(t);return{width:e,height:A}}function dX(t,e,A){const n=ro(e),r=no(e),o=A==="fixed",i=Ss(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Ao(0);function u(){l.x=MB(r)}if(n||!n&&!o)if((La(e)!=="body"||Ec(r))&&(a=Hf(e)),n){const g=Ss(e,!0,o,e);l.x=g.x+e.clientLeft,l.y=g.y+e.clientTop}else r&&u();o&&!n&&r&&u();const f=r&&!n&&!o?sQ(r,a):Ao(0),h=i.left+a.scrollLeft-l.x-f.x,p=i.top+a.scrollTop-l.y-f.y;return{x:h,y:p,width:i.width,height:i.height}}function NB(t){return xr(t).position==="static"}function cQ(t,e){if(!ro(t)||xr(t).position==="fixed")return null;if(e)return e(t);let A=t.offsetParent;return no(t)===A&&(A=A.ownerDocument.body),A}function uQ(t,e){const A=Hn(t);if(Nf(t))return A;if(!ro(t)){let r=Di(t);for(;r&&!Oa(r);){if(Ir(r)&&!NB(r))return r;r=Di(r)}return A}let n=cQ(t,e);for(;n&&eX(n)&&NB(n);)n=cQ(n,e);return n&&Oa(n)&&NB(n)&&!_B(n)?A:n||tX(t)||A}const fX=function(t){return Vt(this,null,function*(){const e=this.getOffsetParent||uQ,A=this.getDimensions,n=yield A(t.floating);return{reference:dX(t.reference,yield e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}})};function hX(t){return xr(t).direction==="rtl"}const Rn={convertOffsetParentRelativeRectToViewportRelativeRect:rX,getDocumentElement:no,getClippingRect:cX,getOffsetParent:uQ,getElementRects:fX,getClientRects:oX,getDimensions:uX,getScale:Ma,isElement:Ir,isRTL:hX};function dQ(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function pX(t,e){let A=null,n;const r=no(t);function o(){var a;clearTimeout(n),(a=A)==null||a.disconnect(),A=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),o();const u=t.getBoundingClientRect(),{left:f,top:h,width:p,height:g}=u;if(a||e(),!p||!g)return;const B=Lf(h),y=Lf(r.clientWidth-(f+p)),b=Lf(r.clientHeight-(h+g)),w=Lf(f),v={rootMargin:-B+"px "+-y+"px "+-b+"px "+-w+"px",threshold:Da(0,TB(1,l))||1};let k=!0;function F(x){const Q=x[0].intersectionRatio;if(Q!==l){if(!k)return i();Q?i(!1,Q):n=setTimeout(()=>{i(!1,1e-7)},1e3)}Q===1&&!dQ(u,t.getBoundingClientRect())&&i(),k=!1}try{A=new IntersectionObserver(F,kn(MA({},v),{root:r.ownerDocument}))}catch{A=new IntersectionObserver(F,v)}A.observe(t)}return i(!0),o}function HB(t,e,A,n){n===void 0&&(n={});const{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=n,u=OB(t),f=r||o?[...u?kc(u):[],...kc(e)]:[];f.forEach(w=>{r&&w.addEventListener("scroll",A,{passive:!0}),o&&w.addEventListener("resize",A)});const h=u&&a?pX(u,A):null;let p=-1,g=null;i&&(g=new ResizeObserver(w=>{let[v]=w;v&&v.target===u&&g&&(g.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var k;(k=g)==null||k.observe(e)})),A()}),u&&!l&&g.observe(u),g.observe(e));let B,y=l?Ss(t):null;l&&b();function b(){const w=Ss(t);y&&!dQ(y,w)&&A(),y=w,B=requestAnimationFrame(b)}return A(),()=>{var w;f.forEach(v=>{r&&v.removeEventListener("scroll",A),o&&v.removeEventListener("resize",A)}),h?.(),(w=g)==null||w.disconnect(),g=null,l&&cancelAnimationFrame(B)}}const mX=ZJ,{hasOwnProperty:RB}=Object.prototype,Sc=function(){};function fQ(t){return typeof t=="function"?t:Sc}function hQ(t,e){return function(A,n,r){A.type===e&&t.call(this,A,n,r)}}function gX(t,e){const A=e.structure,n=[];for(const r in A){if(RB.call(A,r)===!1)continue;let o=A[r];const i={name:r,type:!1,nullable:!1};Array.isArray(o)||(o=[o]);for(const a of o)a===null?i.nullable=!0:typeof a=="string"?i.type="node":Array.isArray(a)&&(i.type="list");i.type&&n.push(i)}return n.length?{context:e.walkContext,fields:n}:null}function BX(t){const e={};for(const A in t.node)if(RB.call(t.node,A)){const n=t.node[A];if(!n.structure)throw new Error("Missed `structure` field in `"+A+"` node type definition");e[A]=gX(A,n)}return e}function pQ(t,e){const A=t.fields.slice(),n=t.context,r=typeof n=="string";return e&&A.reverse(),function(o,i,a,l){let u;r&&(u=i[n],i[n]=o);for(const f of A){const h=o[f.name];if(!f.nullable||h){if(f.type==="list"){if(e?h.reduceRight(l,!1):h.reduce(l,!1))return!0}else if(a(h))return!0}}r&&(i[n]=u)}}function mQ({StyleSheet:t,Atrule:e,Rule:A,Block:n,DeclarationList:r}){return{Atrule:{StyleSheet:t,Atrule:e,Rule:A,Block:n},Rule:{StyleSheet:t,Atrule:e,Rule:A,Block:n},Declaration:{StyleSheet:t,Atrule:e,Rule:A,Block:n,DeclarationList:r}}}function yX(t){const e=BX(t),A={},n={},r=Symbol("break-walk"),o=Symbol("skip-node");for(const u in e)RB.call(e,u)&&e[u]!==null&&(A[u]=pQ(e[u],!1),n[u]=pQ(e[u],!0));const i=mQ(A),a=mQ(n),l=function(u,f){function h(w,v,k){const F=p.call(b,w,v,k);return F===r?!0:F===o?!1:!!(B.hasOwnProperty(w.type)&&B[w.type](w,b,h,y)||g.call(b,w,v,k)===r)}let p=Sc,g=Sc,B=A,y=(w,v,k,F)=>w||h(v,k,F);const b={break:r,skip:o,root:u,stylesheet:null,atrule:null,atrulePrelude:null,rule:null,selector:null,block:null,declaration:null,function:null};if(typeof f=="function")p=f;else if(f&&(p=fQ(f.enter),g=fQ(f.leave),f.reverse&&(B=n),f.visit)){if(i.hasOwnProperty(f.visit))B=f.reverse?a[f.visit]:i[f.visit];else if(!e.hasOwnProperty(f.visit))throw new Error("Bad value `"+f.visit+"` for `visit` option (should be: "+Object.keys(e).sort().join(", ")+")");p=hQ(p,f.visit),g=hQ(g,f.visit)}if(p===Sc&&g===Sc)throw new Error("Neither `enter` nor `leave` walker handler is set or both aren't a function");h(u)};return l.break=r,l.skip=o,l.find=function(u,f){let h=null;return l(u,function(p,g,B){if(f.call(this,p,g,B))return h=p,r}),h},l.findLast=function(u,f){let h=null;return l(u,{reverse:!0,enter(p,g,B){if(f.call(this,p,g,B))return h=p,r}}),h},l.findAll=function(u,f){const h=[];return l(u,function(p,g,B){f.call(this,p,g,B)&&h.push(p)}),h},l}const Li=0,_e=1,mt=2,EA=3,qt=4,Oo=5,wX=6,fn=7,Tr=8,It=9,at=10,pA=11,bt=12,bA=13,Rf=14,Pn=15,hn=16,Sn=17,_r=18,Na=19,Qc=20,$t=21,rt=22,Dr=23,Ha=24,pn=25,CX=0;function Vn(t){return t>=48&&t<=57}function Ra(t){return Vn(t)||t>=65&&t<=70||t>=97&&t<=102}function PB(t){return t>=65&&t<=90}function bX(t){return t>=97&&t<=122}function vX(t){return PB(t)||bX(t)}function EX(t){return t>=128}function Pf(t){return vX(t)||EX(t)||t===95}function gQ(t){return Pf(t)||Vn(t)||t===45}function kX(t){return t>=0&&t<=8||t===11||t>=14&&t<=31||t===127}function Vf(t){return t===10||t===13||t===12}function Qs(t){return Vf(t)||t===32||t===9}function oo(t,e){return!(t!==92||Vf(e)||e===CX)}function VB(t,e,A){return t===45?Pf(e)||e===45||oo(e,A):Pf(t)?!0:t===92?oo(t,e):!1}function $B(t,e,A){return t===43||t===45?Vn(e)?2:e===46&&Vn(A)?3:0:t===46?Vn(e)?2:0:Vn(t)?1:0}function BQ(t){return t===65279||t===65534?1:0}const KB=new Array(128),SX=128,$f=130,yQ=131,GB=132,wQ=133;for(let t=0;t<KB.length;t++)KB[t]=Qs(t)&&$f||Vn(t)&&yQ||Pf(t)&&GB||kX(t)&&wQ||t||SX;function WB(t){return t<128?KB[t]:GB}function Pa(t,e){return e<t.length?t.charCodeAt(e):0}function zB(t,e,A){return A===13&&Pa(t,e+1)===10?2:1}function CQ(t,e,A){let n=t.charCodeAt(e);return PB(n)&&(n=n|32),n===A}function Kf(t,e,A,n){if(A-e!==n.length||e<0||A>t.length)return!1;for(let r=e;r<A;r++){const o=n.charCodeAt(r-e);let i=t.charCodeAt(r);if(PB(i)&&(i=i|32),i!==o)return!1}return!0}function QX(t,e){for(;e>=0&&Qs(t.charCodeAt(e));e--);return e+1}function Gf(t,e){for(;e<t.length&&Qs(t.charCodeAt(e));e++);return e}function YB(t,e){for(;e<t.length&&Vn(t.charCodeAt(e));e++);return e}function Va(t,e){if(e+=2,Ra(Pa(t,e-1))){for(const n=Math.min(t.length,e+5);e<n&&Ra(Pa(t,e));e++);const A=Pa(t,e);Qs(A)&&(e+=zB(t,e,A))}return e}function Wf(t,e){for(;e<t.length;e++){const A=t.charCodeAt(e);if(!gQ(A)){if(oo(A,Pa(t,e+1))){e=Va(t,e)-1;continue}break}}return e}function bQ(t,e){let A=t.charCodeAt(e);if((A===43||A===45)&&(A=t.charCodeAt(e+=1)),Vn(A)&&(e=YB(t,e+1),A=t.charCodeAt(e)),A===46&&Vn(t.charCodeAt(e+1))&&(e+=2,e=YB(t,e)),CQ(t,e,101)){let n=0;A=t.charCodeAt(e+1),(A===45||A===43)&&(n=1,A=t.charCodeAt(e+2)),Vn(A)&&(e=YB(t,e+1+n+1))}return e}function JB(t,e){for(;e<t.length;e++){const A=t.charCodeAt(e);if(A===41){e++;break}oo(A,Pa(t,e+1))&&(e=Va(t,e))}return e}function vQ(t){if(t.length===1&&!Ra(t.charCodeAt(0)))return t[0];let e=parseInt(t,16);return(e===0||e>=55296&&e<=57343||e>1114111)&&(e=65533),String.fromCodePoint(e)}const EQ=["EOF-token","ident-token","function-token","at-keyword-token","hash-token","string-token","bad-string-token","url-token","bad-url-token","delim-token","number-token","percentage-token","dimension-token","whitespace-token","CDO-token","CDC-token","colon-token","semicolon-token","comma-token","[-token","]-token","(-token",")-token","{-token","}-token","comment-token"],FX=16*1024;function zf(t=null,e){return t===null||t.length<e?new Uint32Array(Math.max(e+1024,FX)):t}const kQ=10,UX=12,SQ=13;function QQ(t){const e=t.source,A=e.length,n=e.length>0?BQ(e.charCodeAt(0)):0,r=zf(t.lines,A),o=zf(t.columns,A);let i=t.startLine,a=t.startColumn;for(let l=n;l<A;l++){const u=e.charCodeAt(l);r[l]=i,o[l]=a++,(u===kQ||u===SQ||u===UX)&&(u===SQ&&l+1<A&&e.charCodeAt(l+1)===kQ&&(l++,r[l]=i,o[l]=a),i++,a=1)}r[A]=i,o[A]=a,t.lines=r,t.columns=o,t.computed=!0}class IX{constructor(e,A,n,r){this.setSource(e,A,n,r),this.lines=null,this.columns=null}setSource(e="",A=0,n=1,r=1){this.source=e,this.startOffset=A,this.startLine=n,this.startColumn=r,this.computed=!1}getLocation(e,A){return this.computed||QQ(this),{source:A,offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]}}getLocationRange(e,A,n){return this.computed||QQ(this),{source:n,start:{offset:this.startOffset+e,line:this.lines[e],column:this.columns[e]},end:{offset:this.startOffset+A,line:this.lines[A],column:this.columns[A]}}}}const io=16777215,so=24,Fs=new Uint8Array(32);Fs[mt]=rt,Fs[$t]=rt,Fs[Na]=Qc,Fs[Dr]=Ha;function FQ(t){return Fs[t]!==0}class xX{constructor(e,A){this.setSource(e,A)}reset(){this.eof=!1,this.tokenIndex=-1,this.tokenType=0,this.tokenStart=this.firstCharOffset,this.tokenEnd=this.firstCharOffset}setSource(e="",A=()=>{}){e=String(e||"");const n=e.length,r=zf(this.offsetAndType,e.length+1),o=zf(this.balance,e.length+1);let i=0,a=-1,l=0,u=e.length;this.offsetAndType=null,this.balance=null,o.fill(0),A(e,(f,h,p)=>{const g=i++;if(r[g]=f<<so|p,a===-1&&(a=h),o[g]=u,f===l){const B=o[u];o[u]=g,u=B,l=Fs[r[B]>>so]}else FQ(f)&&(u=g,l=Fs[f])}),r[i]=Li<<so|n,o[i]=i;for(let f=0;f<i;f++){const h=o[f];if(h<=f){const p=o[h];p!==f&&(o[f]=p)}else h>i&&(o[f]=i)}this.source=e,this.firstCharOffset=a===-1?0:a,this.tokenCount=i,this.offsetAndType=r,this.balance=o,this.reset(),this.next()}lookupType(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e]>>so:Li}lookupTypeNonSC(e){for(let A=this.tokenIndex;A<this.tokenCount;A++){const n=this.offsetAndType[A]>>so;if(n!==bA&&n!==pn&&e--===0)return n}return Li}lookupOffset(e){return e+=this.tokenIndex,e<this.tokenCount?this.offsetAndType[e-1]&io:this.source.length}lookupOffsetNonSC(e){for(let A=this.tokenIndex;A<this.tokenCount;A++){const n=this.offsetAndType[A]>>so;if(n!==bA&&n!==pn&&e--===0)return A-this.tokenIndex}return Li}lookupValue(e,A){return e+=this.tokenIndex,e<this.tokenCount?Kf(this.source,this.offsetAndType[e-1]&io,this.offsetAndType[e]&io,A):!1}getTokenStart(e){return e===this.tokenIndex?this.tokenStart:e>0?e<this.tokenCount?this.offsetAndType[e-1]&io:this.offsetAndType[this.tokenCount]&io:this.firstCharOffset}substrToCursor(e){return this.source.substring(e,this.tokenStart)}isBalanceEdge(e){return this.balance[this.tokenIndex]<e}isDelim(e,A){return A?this.lookupType(A)===It&&this.source.charCodeAt(this.lookupOffset(A))===e:this.tokenType===It&&this.source.charCodeAt(this.tokenStart)===e}skip(e){let A=this.tokenIndex+e;A<this.tokenCount?(this.tokenIndex=A,this.tokenStart=this.offsetAndType[A-1]&io,A=this.offsetAndType[A],this.tokenType=A>>so,this.tokenEnd=A&io):(this.tokenIndex=this.tokenCount,this.next())}next(){let e=this.tokenIndex+1;e<this.tokenCount?(this.tokenIndex=e,this.tokenStart=this.tokenEnd,e=this.offsetAndType[e],this.tokenType=e>>so,this.tokenEnd=e&io):(this.eof=!0,this.tokenIndex=this.tokenCount,this.tokenType=Li,this.tokenStart=this.tokenEnd=this.source.length)}skipSC(){for(;this.tokenType===bA||this.tokenType===pn;)this.next()}skipUntilBalanced(e,A){let n=e,r=0,o=0;e:for(;n<this.tokenCount;n++){if(r=this.balance[n],r<e)break e;switch(o=n>0?this.offsetAndType[n-1]&io:this.firstCharOffset,A(this.source.charCodeAt(o))){case 1:break e;case 2:n++;break e;default:FQ(this.offsetAndType[n]>>so)&&(n=r)}}this.skip(n-this.tokenIndex)}forEachToken(e){for(let A=0,n=this.firstCharOffset;A<this.tokenCount;A++){const r=n,o=this.offsetAndType[A],i=o&io,a=o>>so;n=i,e(a,r,i,A)}}dump(){const e=new Array(this.tokenCount);return this.forEachToken((A,n,r,o)=>{e[o]={idx:o,type:EQ[A],chunk:this.source.substring(n,r),balance:this.balance[o]}}),e}}function UQ(t,e){function A(h){return h<a?t.charCodeAt(h):0}function n(){if(u=bQ(t,u),VB(A(u),A(u+1),A(u+2))){f=bt,u=Wf(t,u);return}if(A(u)===37){f=pA,u++;return}f=at}function r(){const h=u;if(u=Wf(t,u),Kf(t,h,u,"url")&&A(u)===40){if(u=Gf(t,u+1),A(u)===34||A(u)===39){f=mt,u=h+4;return}i();return}if(A(u)===40){f=mt,u++;return}f=_e}function o(h){for(h||(h=A(u++)),f=Oo;u<t.length;u++){const p=t.charCodeAt(u);switch(WB(p)){case h:u++;return;case $f:if(Vf(p)){u+=zB(t,u,p),f=wX;return}break;case 92:if(u===t.length-1)break;const g=A(u+1);Vf(g)?u+=zB(t,u+1,g):oo(p,g)&&(u=Va(t,u)-1);break}}}function i(){for(f=fn,u=Gf(t,u);u<t.length;u++){const h=t.charCodeAt(u);switch(WB(h)){case 41:u++;return;case $f:if(u=Gf(t,u),A(u)===41||u>=t.length){u<t.length&&u++;return}u=JB(t,u),f=Tr;return;case 34:case 39:case 40:case wQ:u=JB(t,u),f=Tr;return;case 92:if(oo(h,A(u+1))){u=Va(t,u)-1;break}u=JB(t,u),f=Tr;return}}}t=String(t||"");const a=t.length;let l=BQ(A(0)),u=l,f;for(;u<a;){const h=t.charCodeAt(u);switch(WB(h)){case $f:f=bA,u=Gf(t,u+1);break;case 34:o();break;case 35:gQ(A(u+1))||oo(A(u+1),A(u+2))?(f=qt,u=Wf(t,u+1)):(f=It,u++);break;case 39:o();break;case 40:f=$t,u++;break;case 41:f=rt,u++;break;case 43:$B(h,A(u+1),A(u+2))?n():(f=It,u++);break;case 44:f=_r,u++;break;case 45:$B(h,A(u+1),A(u+2))?n():A(u+1)===45&&A(u+2)===62?(f=Pn,u=u+3):VB(h,A(u+1),A(u+2))?r():(f=It,u++);break;case 46:$B(h,A(u+1),A(u+2))?n():(f=It,u++);break;case 47:A(u+1)===42?(f=pn,u=t.indexOf("*/",u+2),u=u===-1?t.length:u+2):(f=It,u++);break;case 58:f=hn,u++;break;case 59:f=Sn,u++;break;case 60:A(u+1)===33&&A(u+2)===45&&A(u+3)===45?(f=Rf,u=u+4):(f=It,u++);break;case 64:VB(A(u+1),A(u+2),A(u+3))?(f=EA,u=Wf(t,u+1)):(f=It,u++);break;case 91:f=Na,u++;break;case 92:oo(h,A(u+1))?r():(f=It,u++);break;case 93:f=Qc,u++;break;case 123:f=Dr,u++;break;case 125:f=Ha,u++;break;case yQ:n();break;case GB:r();break;default:f=It,u++}e(f,l,l=u)}}const ao=43,$n=45,Yf=110,Us=!0,TX=!1;function Jf(t,e){let A=this.tokenStart+t;const n=this.charCodeAt(A);for((n===ao||n===$n)&&(e&&this.error("Number sign is not allowed"),A++);A<this.tokenEnd;A++)Vn(this.charCodeAt(A))||this.error("Integer is expected",A)}function $a(t){return Jf.call(this,0,t)}function Oi(t,e){if(!this.cmpChar(this.tokenStart+t,e)){let A="";switch(e){case Yf:A="N is expected";break;case $n:A="HyphenMinus is expected";break}this.error(A,this.tokenStart+t)}}function XB(){let t=0,e=0,A=this.tokenType;for(;A===bA||A===pn;)A=this.lookupType(++t);if(A!==at)if(this.isDelim(ao,t)||this.isDelim($n,t)){e=this.isDelim(ao,t)?ao:$n;do A=this.lookupType(++t);while(A===bA||A===pn);A!==at&&(this.skip(t),$a.call(this,Us))}else return null;return t>0&&this.skip(t),e===0&&(A=this.charCodeAt(this.tokenStart),A!==ao&&A!==$n&&this.error("Number sign is expected")),$a.call(this,e!==0),e===$n?"-"+this.consume(at):this.consume(at)}const _X="AnPlusB",DX={a:[String,null],b:[String,null]};function IQ(){const t=this.tokenStart;let e=null,A=null;if(this.tokenType===at)$a.call(this,TX),A=this.consume(at);else if(this.tokenType===_e&&this.cmpChar(this.tokenStart,$n))switch(e="-1",Oi.call(this,1,Yf),this.tokenEnd-this.tokenStart){case 2:this.next(),A=XB.call(this);break;case 3:Oi.call(this,2,$n),this.next(),this.skipSC(),$a.call(this,Us),A="-"+this.consume(at);break;default:Oi.call(this,2,$n),Jf.call(this,3,Us),this.next(),A=this.substrToCursor(t+2)}else if(this.tokenType===_e||this.isDelim(ao)&&this.lookupType(1)===_e){let n=0;switch(e="1",this.isDelim(ao)&&(n=1,this.next()),Oi.call(this,0,Yf),this.tokenEnd-this.tokenStart){case 1:this.next(),A=XB.call(this);break;case 2:Oi.call(this,1,$n),this.next(),this.skipSC(),$a.call(this,Us),A="-"+this.consume(at);break;default:Oi.call(this,1,$n),Jf.call(this,2,Us),this.next(),A=this.substrToCursor(t+n+1)}}else if(this.tokenType===bt){const n=this.charCodeAt(this.tokenStart),r=n===ao||n===$n;let o=this.tokenStart+r;for(;o<this.tokenEnd&&Vn(this.charCodeAt(o));o++);o===this.tokenStart+r&&this.error("Integer is expected",this.tokenStart+r),Oi.call(this,o-this.tokenStart,Yf),e=this.substring(t,o),o+1===this.tokenEnd?(this.next(),A=XB.call(this)):(Oi.call(this,o-this.tokenStart+1,$n),o+2===this.tokenEnd?(this.next(),this.skipSC(),$a.call(this,Us),A="-"+this.consume(at)):(Jf.call(this,o-this.tokenStart+2,Us),this.next(),A=this.substrToCursor(o+1)))}else this.error();return e!==null&&e.charCodeAt(0)===ao&&(e=e.substr(1)),A!==null&&A.charCodeAt(0)===ao&&(A=A.substr(1)),{type:"AnPlusB",loc:this.getLocation(t,this.tokenStart),a:e,b:A}}function xQ(t){if(t.a){const e=t.a==="+1"&&"n"||t.a==="1"&&"n"||t.a==="-1"&&"-n"||t.a+"n";if(t.b){const A=t.b[0]==="-"||t.b[0]==="+"?t.b:"+"+t.b;this.tokenize(e+A)}else this.tokenize(e)}else this.tokenize(t.b)}const LX=Object.freeze(Object.defineProperty({__proto__:null,generate:xQ,name:_X,parse:IQ,structure:DX},Symbol.toStringTag,{value:"Module"}));function TQ(){return this.Raw(this.consumeUntilLeftCurlyBracketOrSemicolon,!0)}function OX(){for(let t=1,e;e=this.lookupType(t);t++){if(e===Ha)return!0;if(e===Dr||e===EA)return!1}return!1}const MX="Atrule",NX="atrule",HX={name:String,prelude:["AtrulePrelude","Raw",null],block:["Block",null]};function _Q(t=!1){const e=this.tokenStart;let A,n,r=null,o=null;switch(this.eat(EA),A=this.substrToCursor(e+1),n=A.toLowerCase(),this.skipSC(),this.eof===!1&&this.tokenType!==Dr&&this.tokenType!==Sn&&(this.parseAtrulePrelude?r=this.parseWithFallback(this.AtrulePrelude.bind(this,A,t),TQ):r=TQ.call(this,this.tokenIndex),this.skipSC()),this.tokenType){case Sn:this.next();break;case Dr:hasOwnProperty.call(this.atrule,n)&&typeof this.atrule[n].block=="function"?o=this.atrule[n].block.call(this,t):o=this.Block(OX.call(this));break}return{type:"Atrule",loc:this.getLocation(e,this.tokenStart),name:A,prelude:r,block:o}}function DQ(t){this.token(EA,"@"+t.name),t.prelude!==null&&this.node(t.prelude),t.block?this.node(t.block):this.token(Sn,";")}const RX=Object.freeze(Object.defineProperty({__proto__:null,generate:DQ,name:MX,parse:_Q,structure:HX,walkContext:NX},Symbol.toStringTag,{value:"Module"})),PX="AtrulePrelude",VX="atrulePrelude",$X={children:[[]]};function LQ(t){let e=null;return t!==null&&(t=t.toLowerCase()),this.skipSC(),hasOwnProperty.call(this.atrule,t)&&typeof this.atrule[t].prelude=="function"?e=this.atrule[t].prelude.call(this):e=this.readSequence(this.scope.AtrulePrelude),this.skipSC(),this.eof!==!0&&this.tokenType!==Dr&&this.tokenType!==Sn&&this.error("Semicolon or block is expected"),{type:"AtrulePrelude",loc:this.getLocationFromList(e),children:e}}function OQ(t){this.children(t)}const KX=Object.freeze(Object.defineProperty({__proto__:null,generate:OQ,name:PX,parse:LQ,structure:$X,walkContext:VX},Symbol.toStringTag,{value:"Module"})),GX=36,MQ=42,Xf=61,WX=94,jB=124,zX=126;function YX(){this.eof&&this.error("Unexpected end of input");const t=this.tokenStart;let e=!1;return this.isDelim(MQ)?(e=!0,this.next()):this.isDelim(jB)||this.eat(_e),this.isDelim(jB)?this.charCodeAt(this.tokenStart+1)!==Xf?(this.next(),this.eat(_e)):e&&this.error("Identifier is expected",this.tokenEnd):e&&this.error("Vertical line is expected"),{type:"Identifier",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function JX(){const t=this.tokenStart,e=this.charCodeAt(t);return e!==Xf&&e!==zX&&e!==WX&&e!==GX&&e!==MQ&&e!==jB&&this.error("Attribute selector (=, ~=, ^=, $=, *=, |=) is expected"),this.next(),e!==Xf&&(this.isDelim(Xf)||this.error("Equal sign is expected"),this.next()),this.substrToCursor(t)}const XX="AttributeSelector",jX={name:"Identifier",matcher:[String,null],value:["String","Identifier",null],flags:[String,null]};function NQ(){const t=this.tokenStart;let e,A=null,n=null,r=null;return this.eat(Na),this.skipSC(),e=YX.call(this),this.skipSC(),this.tokenType!==Qc&&(this.tokenType!==_e&&(A=JX.call(this),this.skipSC(),n=this.tokenType===Oo?this.String():this.Identifier(),this.skipSC()),this.tokenType===_e&&(r=this.consume(_e),this.skipSC())),this.eat(Qc),{type:"AttributeSelector",loc:this.getLocation(t,this.tokenStart),name:e,matcher:A,value:n,flags:r}}function HQ(t){this.token(It,"["),this.node(t.name),t.matcher!==null&&(this.tokenize(t.matcher),this.node(t.value)),t.flags!==null&&this.token(_e,t.flags),this.token(It,"]")}const qX=Object.freeze(Object.defineProperty({__proto__:null,generate:HQ,name:XX,parse:NQ,structure:jX},Symbol.toStringTag,{value:"Module"})),ZX=38;function RQ(){return this.Raw(null,!0)}function PQ(){return this.parseWithFallback(this.Rule,RQ)}function VQ(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}function ej(){if(this.tokenType===Sn)return VQ.call(this,this.tokenIndex);const t=this.parseWithFallback(this.Declaration,VQ);return this.tokenType===Sn&&this.next(),t}const tj="Block",Aj="block",nj={children:[["Atrule","Rule","Declaration"]]};function $Q(t){const e=t?ej:PQ,A=this.tokenStart;let n=this.createList();this.eat(Dr);e:for(;!this.eof;)switch(this.tokenType){case Ha:break e;case bA:case pn:this.next();break;case EA:n.push(this.parseWithFallback(this.Atrule.bind(this,t),RQ));break;default:t&&this.isDelim(ZX)?n.push(PQ.call(this)):n.push(e.call(this))}return this.eof||this.eat(Ha),{type:"Block",loc:this.getLocation(A,this.tokenStart),children:n}}function KQ(t){this.token(Dr,"{"),this.children(t,e=>{e.type==="Declaration"&&this.token(Sn,";")}),this.token(Ha,"}")}const rj=Object.freeze(Object.defineProperty({__proto__:null,generate:KQ,name:tj,parse:$Q,structure:nj,walkContext:Aj},Symbol.toStringTag,{value:"Module"})),oj="Brackets",ij={children:[[]]};function GQ(t,e){const A=this.tokenStart;let n=null;return this.eat(Na),n=t.call(this,e),this.eof||this.eat(Qc),{type:"Brackets",loc:this.getLocation(A,this.tokenStart),children:n}}function WQ(t){this.token(It,"["),this.children(t),this.token(It,"]")}const sj=Object.freeze(Object.defineProperty({__proto__:null,generate:WQ,name:oj,parse:GQ,structure:ij},Symbol.toStringTag,{value:"Module"})),aj="CDC",lj=[];function zQ(){const t=this.tokenStart;return this.eat(Pn),{type:"CDC",loc:this.getLocation(t,this.tokenStart)}}function YQ(){this.token(Pn,"-->")}const cj=Object.freeze(Object.defineProperty({__proto__:null,generate:YQ,name:aj,parse:zQ,structure:lj},Symbol.toStringTag,{value:"Module"})),uj="CDO",dj=[];function JQ(){const t=this.tokenStart;return this.eat(Rf),{type:"CDO",loc:this.getLocation(t,this.tokenStart)}}function XQ(){this.token(Rf,"<!--")}const fj=Object.freeze(Object.defineProperty({__proto__:null,generate:XQ,name:uj,parse:JQ,structure:dj},Symbol.toStringTag,{value:"Module"})),hj=46,pj="ClassSelector",mj={name:String};function jQ(){return this.eatDelim(hj),{type:"ClassSelector",loc:this.getLocation(this.tokenStart-1,this.tokenEnd),name:this.consume(_e)}}function qQ(t){this.token(It,"."),this.token(_e,t.name)}const gj=Object.freeze(Object.defineProperty({__proto__:null,generate:qQ,name:pj,parse:jQ,structure:mj},Symbol.toStringTag,{value:"Module"})),Bj=43,ZQ=47,yj=62,wj=126,Cj="Combinator",bj={name:String};function eF(){const t=this.tokenStart;let e;switch(this.tokenType){case bA:e=" ";break;case It:switch(this.charCodeAt(this.tokenStart)){case yj:case Bj:case wj:this.next();break;case ZQ:this.next(),this.eatIdent("deep"),this.eatDelim(ZQ);break;default:this.error("Combinator is expected")}e=this.substrToCursor(t);break}return{type:"Combinator",loc:this.getLocation(t,this.tokenStart),name:e}}function tF(t){this.tokenize(t.name)}const vj=Object.freeze(Object.defineProperty({__proto__:null,generate:tF,name:Cj,parse:eF,structure:bj},Symbol.toStringTag,{value:"Module"})),Ej=42,kj=47,Sj="Comment",Qj={value:String};function AF(){const t=this.tokenStart;let e=this.tokenEnd;return this.eat(pn),e-t+2>=2&&this.charCodeAt(e-2)===Ej&&this.charCodeAt(e-1)===kj&&(e-=2),{type:"Comment",loc:this.getLocation(t,this.tokenStart),value:this.substring(t+2,e)}}function nF(t){this.token(pn,"/*"+t.value+"*/")}const Fj=Object.freeze(Object.defineProperty({__proto__:null,generate:nF,name:Sj,parse:AF,structure:Qj},Symbol.toStringTag,{value:"Module"})),Uj=new Set([hn,rt,Li]),Ij="Condition",xj={kind:String,children:[["Identifier","Feature","FeatureFunction","FeatureRange","SupportsDeclaration"]]};function rF(t){return this.lookupTypeNonSC(1)===_e&&Uj.has(this.lookupTypeNonSC(2))?this.Feature(t):this.FeatureRange(t)}const Tj={media:rF,container:rF,supports(){return this.SupportsDeclaration()}};function oF(t="media"){const e=this.createList();e:for(;!this.eof;)switch(this.tokenType){case pn:case bA:this.next();continue;case _e:e.push(this.Identifier());break;case $t:{let A=this.parseWithFallback(()=>Tj[t].call(this,t),()=>null);A||(A=this.parseWithFallback(()=>{this.eat($t);const n=this.Condition(t);return this.eat(rt),n},()=>this.GeneralEnclosed(t))),e.push(A);break}case mt:{let A=this.parseWithFallback(()=>this.FeatureFunction(t),()=>null);A||(A=this.GeneralEnclosed(t)),e.push(A);break}default:break e}return e.isEmpty&&this.error("Condition is expected"),{type:"Condition",loc:this.getLocationFromList(e),kind:t,children:e}}function iF(t){t.children.forEach(e=>{e.type==="Condition"?(this.token($t,"("),this.node(e),this.token(rt,")")):this.node(e)})}const _j=Object.freeze(Object.defineProperty({__proto__:null,generate:iF,name:Ij,parse:oF,structure:xj},Symbol.toStringTag,{value:"Module"})),sF=45;function Dj(t,e){return e=e||0,t.length-e>=2&&t.charCodeAt(e)===sF&&t.charCodeAt(e+1)===sF}const aF=33,Lj=35,Oj=36,Mj=38,Nj=42,Hj=43,lF=47;function Rj(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!0)}function Pj(){return this.Raw(this.consumeUntilExclamationMarkOrSemicolon,!1)}function Vj(){const t=this.tokenIndex,e=this.Value();return e.type!=="Raw"&&this.eof===!1&&this.tokenType!==Sn&&this.isDelim(aF)===!1&&this.isBalanceEdge(t)===!1&&this.error(),e}const $j="Declaration",Kj="declaration",Gj={important:[Boolean,String],property:String,value:["Value","Raw"]};function cF(){const t=this.tokenStart,e=this.tokenIndex,A=Wj.call(this),n=Dj(A),r=n?this.parseCustomProperty:this.parseValue,o=n?Pj:Rj;let i=!1,a;this.skipSC(),this.eat(hn);const l=this.tokenIndex;if(n||this.skipSC(),r?a=this.parseWithFallback(Vj,o):a=o.call(this,this.tokenIndex),n&&a.type==="Value"&&a.children.isEmpty){for(let u=l-this.tokenIndex;u<=0;u++)if(this.lookupType(u)===bA){a.children.appendData({type:"WhiteSpace",loc:null,value:" "});break}}return this.isDelim(aF)&&(i=zj.call(this),this.skipSC()),this.eof===!1&&this.tokenType!==Sn&&this.isBalanceEdge(e)===!1&&this.error(),{type:"Declaration",loc:this.getLocation(t,this.tokenStart),important:i,property:A,value:a}}function uF(t){this.token(_e,t.property),this.token(hn,":"),this.node(t.value),t.important&&(this.token(It,"!"),this.token(_e,t.important===!0?"important":t.important))}function Wj(){const t=this.tokenStart;if(this.tokenType===It)switch(this.charCodeAt(this.tokenStart)){case Nj:case Oj:case Hj:case Lj:case Mj:this.next();break;case lF:this.next(),this.isDelim(lF)&&this.next();break}return this.tokenType===qt?this.eat(qt):this.eat(_e),this.substrToCursor(t)}function zj(){this.eat(It),this.skipSC();const t=this.consume(_e);return t==="important"?!0:t}const Yj=Object.freeze(Object.defineProperty({__proto__:null,generate:uF,name:$j,parse:cF,structure:Gj,walkContext:Kj},Symbol.toStringTag,{value:"Module"})),Jj=38;function qB(){return this.Raw(this.consumeUntilSemicolonIncluded,!0)}const Xj="DeclarationList",jj={children:[["Declaration","Atrule","Rule"]]};function dF(){const t=this.createList();for(;!this.eof;)switch(this.tokenType){case bA:case pn:case Sn:this.next();break;case EA:t.push(this.parseWithFallback(this.Atrule.bind(this,!0),qB));break;default:this.isDelim(Jj)?t.push(this.parseWithFallback(this.Rule,qB)):t.push(this.parseWithFallback(this.Declaration,qB))}return{type:"DeclarationList",loc:this.getLocationFromList(t),children:t}}function fF(t){this.children(t,e=>{e.type==="Declaration"&&this.token(Sn,";")})}const qj=Object.freeze(Object.defineProperty({__proto__:null,generate:fF,name:Xj,parse:dF,structure:jj},Symbol.toStringTag,{value:"Module"})),Zj="Dimension",e7={value:String,unit:String};function hF(){const t=this.tokenStart,e=this.consumeNumber(bt);return{type:"Dimension",loc:this.getLocation(t,this.tokenStart),value:e,unit:this.substring(t+e.length,this.tokenStart)}}function pF(t){this.token(bt,t.value+t.unit)}const t7=Object.freeze(Object.defineProperty({__proto__:null,generate:pF,name:Zj,parse:hF,structure:e7},Symbol.toStringTag,{value:"Module"})),A7=47,n7="Feature",r7={kind:String,name:String,value:["Identifier","Number","Dimension","Ratio","Function",null]};function mF(t){const e=this.tokenStart;let A,n=null;if(this.eat($t),this.skipSC(),A=this.consume(_e),this.skipSC(),this.tokenType!==rt){switch(this.eat(hn),this.skipSC(),this.tokenType){case at:this.lookupNonWSType(1)===It?n=this.Ratio():n=this.Number();break;case bt:n=this.Dimension();break;case _e:n=this.Identifier();break;case mt:n=this.parseWithFallback(()=>{const r=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(A7)&&this.error(),r},()=>this.Ratio());break;default:this.error("Number, dimension, ratio or identifier is expected")}this.skipSC()}return this.eof||this.eat(rt),{type:"Feature",loc:this.getLocation(e,this.tokenStart),kind:t,name:A,value:n}}function gF(t){this.token($t,"("),this.token(_e,t.name),t.value!==null&&(this.token(hn,":"),this.node(t.value)),this.token(rt,")")}const o7=Object.freeze(Object.defineProperty({__proto__:null,generate:gF,name:n7,parse:mF,structure:r7},Symbol.toStringTag,{value:"Module"})),i7="FeatureFunction",s7={kind:String,feature:String,value:["Declaration","Selector"]};function a7(t,e){const A=(this.features[t]||{})[e];return typeof A!="function"&&this.error(`Unknown feature ${e}()`),A}function BF(t="unknown"){const e=this.tokenStart,A=this.consumeFunctionName(),n=a7.call(this,t,A.toLowerCase());this.skipSC();const r=this.parseWithFallback(()=>{const o=this.tokenIndex,i=n.call(this);return this.eof===!1&&this.isBalanceEdge(o)===!1&&this.error(),i},()=>this.Raw(null,!1));return this.eof||this.eat(rt),{type:"FeatureFunction",loc:this.getLocation(e,this.tokenStart),kind:t,feature:A,value:r}}function yF(t){this.token(mt,t.feature+"("),this.node(t.value),this.token(rt,")")}const l7=Object.freeze(Object.defineProperty({__proto__:null,generate:yF,name:i7,parse:BF,structure:s7},Symbol.toStringTag,{value:"Module"})),wF=47,c7=60,CF=61,u7=62,d7="FeatureRange",f7={kind:String,left:["Identifier","Number","Dimension","Ratio","Function"],leftComparison:String,middle:["Identifier","Number","Dimension","Ratio","Function"],rightComparison:[String,null],right:["Identifier","Number","Dimension","Ratio","Function",null]};function ZB(){switch(this.skipSC(),this.tokenType){case at:return this.isDelim(wF,this.lookupOffsetNonSC(1))?this.Ratio():this.Number();case bt:return this.Dimension();case _e:return this.Identifier();case mt:return this.parseWithFallback(()=>{const t=this.Function(this.readSequence,this.scope.Value);return this.skipSC(),this.isDelim(wF)&&this.error(),t},()=>this.Ratio());default:this.error("Number, dimension, ratio or identifier is expected")}}function bF(t){if(this.skipSC(),this.isDelim(c7)||this.isDelim(u7)){const e=this.source[this.tokenStart];return this.next(),this.isDelim(CF)?(this.next(),e+"="):e}if(this.isDelim(CF))return"=";this.error(`Expected ${t?'":", ':""}"<", ">", "=" or ")"`)}function vF(t="unknown"){const e=this.tokenStart;this.skipSC(),this.eat($t);const A=ZB.call(this),n=bF.call(this,A.type==="Identifier"),r=ZB.call(this);let o=null,i=null;return this.lookupNonWSType(0)!==rt&&(o=bF.call(this),i=ZB.call(this)),this.skipSC(),this.eat(rt),{type:"FeatureRange",loc:this.getLocation(e,this.tokenStart),kind:t,left:A,leftComparison:n,middle:r,rightComparison:o,right:i}}function EF(t){this.token($t,"("),this.node(t.left),this.tokenize(t.leftComparison),this.node(t.middle),t.right&&(this.tokenize(t.rightComparison),this.node(t.right)),this.token(rt,")")}const h7=Object.freeze(Object.defineProperty({__proto__:null,generate:EF,name:d7,parse:vF,structure:f7},Symbol.toStringTag,{value:"Module"})),p7="Function",m7="function",g7={name:String,children:[[]]};function kF(t,e){const A=this.tokenStart,n=this.consumeFunctionName(),r=n.toLowerCase();let o;return o=e.hasOwnProperty(r)?e[r].call(this,e):t.call(this,e),this.eof||this.eat(rt),{type:"Function",loc:this.getLocation(A,this.tokenStart),name:n,children:o}}function SF(t){this.token(mt,t.name+"("),this.children(t),this.token(rt,")")}const B7=Object.freeze(Object.defineProperty({__proto__:null,generate:SF,name:p7,parse:kF,structure:g7,walkContext:m7},Symbol.toStringTag,{value:"Module"})),y7="GeneralEnclosed",w7={kind:String,function:[String,null],children:[[]]};function QF(t){const e=this.tokenStart;let A=null;this.tokenType===mt?A=this.consumeFunctionName():this.eat($t);const n=this.parseWithFallback(()=>{const r=this.tokenIndex,o=this.readSequence(this.scope.Value);return this.eof===!1&&this.isBalanceEdge(r)===!1&&this.error(),o},()=>this.createSingleNodeList(this.Raw(null,!1)));return this.eof||this.eat(rt),{type:"GeneralEnclosed",loc:this.getLocation(e,this.tokenStart),kind:t,function:A,children:n}}function FF(t){t.function?this.token(mt,t.function+"("):this.token($t,"("),this.children(t),this.token(rt,")")}const C7=Object.freeze(Object.defineProperty({__proto__:null,generate:FF,name:y7,parse:QF,structure:w7},Symbol.toStringTag,{value:"Module"})),b7="XXX",v7="Hash",E7={value:String};function UF(){const t=this.tokenStart;return this.eat(qt),{type:"Hash",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t+1)}}function IF(t){this.token(qt,"#"+t.value)}const k7=Object.freeze(Object.defineProperty({__proto__:null,generate:IF,name:v7,parse:UF,structure:E7,xxx:b7},Symbol.toStringTag,{value:"Module"})),S7="Identifier",Q7={name:String};function xF(){return{type:"Identifier",loc:this.getLocation(this.tokenStart,this.tokenEnd),name:this.consume(_e)}}function TF(t){this.token(_e,t.name)}const F7=Object.freeze(Object.defineProperty({__proto__:null,generate:TF,name:S7,parse:xF,structure:Q7},Symbol.toStringTag,{value:"Module"})),U7="IdSelector",I7={name:String};function _F(){const t=this.tokenStart;return this.eat(qt),{type:"IdSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t+1)}}function DF(t){this.token(It,"#"+t.name)}const x7=Object.freeze(Object.defineProperty({__proto__:null,generate:DF,name:U7,parse:_F,structure:I7},Symbol.toStringTag,{value:"Module"})),T7=46,_7="Layer",D7={name:String};function LF(){let t=this.tokenStart,e=this.consume(_e);for(;this.isDelim(T7);)this.eat(It),e+="."+this.consume(_e);return{type:"Layer",loc:this.getLocation(t,this.tokenStart),name:e}}function OF(t){this.tokenize(t.name)}const L7=Object.freeze(Object.defineProperty({__proto__:null,generate:OF,name:_7,parse:LF,structure:D7},Symbol.toStringTag,{value:"Module"})),O7="LayerList",M7={children:[["Layer"]]};function MF(){const t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.Layer()),this.lookupTypeNonSC(0)===_r);)this.skipSC(),this.next(),this.skipSC();return{type:"LayerList",loc:this.getLocationFromList(t),children:t}}function NF(t){this.children(t,()=>this.token(_r,","))}const N7=Object.freeze(Object.defineProperty({__proto__:null,generate:NF,name:O7,parse:MF,structure:M7},Symbol.toStringTag,{value:"Module"})),H7="MediaQuery",R7={modifier:[String,null],mediaType:[String,null],condition:["Condition",null]};function HF(){const t=this.tokenStart;let e=null,A=null,n=null;if(this.skipSC(),this.tokenType===_e&&this.lookupTypeNonSC(1)!==$t){const r=this.consume(_e),o=r.toLowerCase();switch(o==="not"||o==="only"?(this.skipSC(),e=o,A=this.consume(_e)):A=r,this.lookupTypeNonSC(0)){case _e:{this.skipSC(),this.eatIdent("and"),n=this.Condition("media");break}case Dr:case Sn:case _r:case Li:break;default:this.error("Identifier or parenthesis is expected")}}else switch(this.tokenType){case _e:case $t:case mt:{n=this.Condition("media");break}case Dr:case Sn:case Li:break;default:this.error("Identifier or parenthesis is expected")}return{type:"MediaQuery",loc:this.getLocation(t,this.tokenStart),modifier:e,mediaType:A,condition:n}}function RF(t){t.mediaType?(t.modifier&&this.token(_e,t.modifier),this.token(_e,t.mediaType),t.condition&&(this.token(_e,"and"),this.node(t.condition))):t.condition&&this.node(t.condition)}const P7=Object.freeze(Object.defineProperty({__proto__:null,generate:RF,name:H7,parse:HF,structure:R7},Symbol.toStringTag,{value:"Module"})),V7="MediaQueryList",$7={children:[["MediaQuery"]]};function PF(){const t=this.createList();for(this.skipSC();!this.eof&&(t.push(this.MediaQuery()),this.tokenType===_r);)this.next();return{type:"MediaQueryList",loc:this.getLocationFromList(t),children:t}}function VF(t){this.children(t,()=>this.token(_r,","))}const K7=Object.freeze(Object.defineProperty({__proto__:null,generate:VF,name:V7,parse:PF,structure:$7},Symbol.toStringTag,{value:"Module"})),G7=38,W7="NestingSelector",z7={};function $F(){const t=this.tokenStart;return this.eatDelim(G7),{type:"NestingSelector",loc:this.getLocation(t,this.tokenStart)}}function KF(){this.token(It,"&")}const Y7=Object.freeze(Object.defineProperty({__proto__:null,generate:KF,name:W7,parse:$F,structure:z7},Symbol.toStringTag,{value:"Module"})),J7="Nth",X7={nth:["AnPlusB","Identifier"],selector:["SelectorList",null]};function GF(){this.skipSC();const t=this.tokenStart;let e=t,A=null,n;return this.lookupValue(0,"odd")||this.lookupValue(0,"even")?n=this.Identifier():n=this.AnPlusB(),e=this.tokenStart,this.skipSC(),this.lookupValue(0,"of")&&(this.next(),A=this.SelectorList(),e=this.tokenStart),{type:"Nth",loc:this.getLocation(t,e),nth:n,selector:A}}function WF(t){this.node(t.nth),t.selector!==null&&(this.token(_e,"of"),this.node(t.selector))}const j7=Object.freeze(Object.defineProperty({__proto__:null,generate:WF,name:J7,parse:GF,structure:X7},Symbol.toStringTag,{value:"Module"})),q7="Number",Z7={value:String};function zF(){return{type:"Number",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consume(at)}}function YF(t){this.token(at,t.value)}const eq=Object.freeze(Object.defineProperty({__proto__:null,generate:YF,name:q7,parse:zF,structure:Z7},Symbol.toStringTag,{value:"Module"})),tq="Operator",Aq={value:String};function JF(){const t=this.tokenStart;return this.next(),{type:"Operator",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function XF(t){this.tokenize(t.value)}const nq=Object.freeze(Object.defineProperty({__proto__:null,generate:XF,name:tq,parse:JF,structure:Aq},Symbol.toStringTag,{value:"Module"})),rq="Parentheses",oq={children:[[]]};function jF(t,e){const A=this.tokenStart;let n=null;return this.eat($t),n=t.call(this,e),this.eof||this.eat(rt),{type:"Parentheses",loc:this.getLocation(A,this.tokenStart),children:n}}function qF(t){this.token($t,"("),this.children(t),this.token(rt,")")}const iq=Object.freeze(Object.defineProperty({__proto__:null,generate:qF,name:rq,parse:jF,structure:oq},Symbol.toStringTag,{value:"Module"})),sq="Percentage",aq={value:String};function ZF(){return{type:"Percentage",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:this.consumeNumber(pA)}}function eU(t){this.token(pA,t.value+"%")}const lq=Object.freeze(Object.defineProperty({__proto__:null,generate:eU,name:sq,parse:ZF,structure:aq},Symbol.toStringTag,{value:"Module"})),cq="PseudoClassSelector",uq="function",dq={name:String,children:[["Raw"],null]};function tU(){const t=this.tokenStart;let e=null,A,n;return this.eat(hn),this.tokenType===mt?(A=this.consumeFunctionName(),n=A.toLowerCase(),this.lookupNonWSType(0)==rt?e=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),e=this.pseudo[n].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(rt)):A=this.consume(_e),{type:"PseudoClassSelector",loc:this.getLocation(t,this.tokenStart),name:A,children:e}}function AU(t){this.token(hn,":"),t.children===null?this.token(_e,t.name):(this.token(mt,t.name+"("),this.children(t),this.token(rt,")"))}const fq=Object.freeze(Object.defineProperty({__proto__:null,generate:AU,name:cq,parse:tU,structure:dq,walkContext:uq},Symbol.toStringTag,{value:"Module"})),hq="PseudoElementSelector",pq="function",mq={name:String,children:[["Raw"],null]};function nU(){const t=this.tokenStart;let e=null,A,n;return this.eat(hn),this.eat(hn),this.tokenType===mt?(A=this.consumeFunctionName(),n=A.toLowerCase(),this.lookupNonWSType(0)==rt?e=this.createList():hasOwnProperty.call(this.pseudo,n)?(this.skipSC(),e=this.pseudo[n].call(this),this.skipSC()):(e=this.createList(),e.push(this.Raw(null,!1))),this.eat(rt)):A=this.consume(_e),{type:"PseudoElementSelector",loc:this.getLocation(t,this.tokenStart),name:A,children:e}}function rU(t){this.token(hn,":"),this.token(hn,":"),t.children===null?this.token(_e,t.name):(this.token(mt,t.name+"("),this.children(t),this.token(rt,")"))}const gq=Object.freeze(Object.defineProperty({__proto__:null,generate:rU,name:hq,parse:nU,structure:mq,walkContext:pq},Symbol.toStringTag,{value:"Module"})),oU=47;function iU(){switch(this.skipSC(),this.tokenType){case at:return this.Number();case mt:return this.Function(this.readSequence,this.scope.Value);default:this.error("Number of function is expected")}}const Bq="Ratio",yq={left:["Number","Function"],right:["Number","Function",null]};function sU(){const t=this.tokenStart,e=iU.call(this);let A=null;return this.skipSC(),this.isDelim(oU)&&(this.eatDelim(oU),A=iU.call(this)),{type:"Ratio",loc:this.getLocation(t,this.tokenStart),left:e,right:A}}function aU(t){this.node(t.left),this.token(It,"/"),t.right?this.node(t.right):this.node(at,1)}const wq=Object.freeze(Object.defineProperty({__proto__:null,generate:aU,name:Bq,parse:sU,structure:yq},Symbol.toStringTag,{value:"Module"}));function Cq(){return this.tokenIndex>0&&this.lookupType(-1)===bA?this.tokenIndex>1?this.getTokenStart(this.tokenIndex-1):this.firstCharOffset:this.tokenStart}const bq="Raw",vq={value:String};function lU(t,e){const A=this.getTokenStart(this.tokenIndex);let n;return this.skipUntilBalanced(this.tokenIndex,t||this.consumeUntilBalanceEnd),e&&this.tokenStart>A?n=Cq.call(this):n=this.tokenStart,{type:"Raw",loc:this.getLocation(A,n),value:this.substring(A,n)}}function cU(t){this.tokenize(t.value)}const Eq=Object.freeze(Object.defineProperty({__proto__:null,generate:cU,name:bq,parse:lU,structure:vq},Symbol.toStringTag,{value:"Module"}));function uU(){return this.Raw(this.consumeUntilLeftCurlyBracket,!0)}function kq(){const t=this.SelectorList();return t.type!=="Raw"&&this.eof===!1&&this.tokenType!==Dr&&this.error(),t}const Sq="Rule",Qq="rule",Fq={prelude:["SelectorList","Raw"],block:["Block"]};function dU(){const t=this.tokenIndex,e=this.tokenStart;let A,n;return this.parseRulePrelude?A=this.parseWithFallback(kq,uU):A=uU.call(this,t),n=this.Block(!0),{type:"Rule",loc:this.getLocation(e,this.tokenStart),prelude:A,block:n}}function fU(t){this.node(t.prelude),this.node(t.block)}const Uq=Object.freeze(Object.defineProperty({__proto__:null,generate:fU,name:Sq,parse:dU,structure:Fq,walkContext:Qq},Symbol.toStringTag,{value:"Module"})),Iq="Scope",xq={root:["SelectorList","Raw",null],limit:["SelectorList","Raw",null]};function hU(){let t=null,e=null;this.skipSC();const A=this.tokenStart;return this.tokenType===$t&&(this.next(),this.skipSC(),t=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(rt)),this.lookupNonWSType(0)===_e&&(this.skipSC(),this.eatIdent("to"),this.skipSC(),this.eat($t),this.skipSC(),e=this.parseWithFallback(this.SelectorList,()=>this.Raw(!1,!0)),this.skipSC(),this.eat(rt)),{type:"Scope",loc:this.getLocation(A,this.tokenStart),root:t,limit:e}}function pU(t){t.root&&(this.token($t,"("),this.node(t.root),this.token(rt,")")),t.limit&&(this.token(_e,"to"),this.token($t,"("),this.node(t.limit),this.token(rt,")"))}const Tq=Object.freeze(Object.defineProperty({__proto__:null,generate:pU,name:Iq,parse:hU,structure:xq},Symbol.toStringTag,{value:"Module"})),_q="Selector",Dq={children:[["TypeSelector","IdSelector","ClassSelector","AttributeSelector","PseudoClassSelector","PseudoElementSelector","Combinator"]]};function mU(){const t=this.readSequence(this.scope.Selector);return this.getFirstListNode(t)===null&&this.error("Selector is expected"),{type:"Selector",loc:this.getLocationFromList(t),children:t}}function gU(t){this.children(t)}const Lq=Object.freeze(Object.defineProperty({__proto__:null,generate:gU,name:_q,parse:mU,structure:Dq},Symbol.toStringTag,{value:"Module"})),Oq="SelectorList",Mq="selector",Nq={children:[["Selector","Raw"]]};function BU(){const t=this.createList();for(;!this.eof;){if(t.push(this.Selector()),this.tokenType===_r){this.next();continue}break}return{type:"SelectorList",loc:this.getLocationFromList(t),children:t}}function yU(t){this.children(t,()=>this.token(_r,","))}const Hq=Object.freeze(Object.defineProperty({__proto__:null,generate:yU,name:Oq,parse:BU,structure:Nq,walkContext:Mq},Symbol.toStringTag,{value:"Module"})),ey=92,wU=34,Rq=39;function CU(t){const e=t.length,A=t.charCodeAt(0),n=A===wU||A===Rq?1:0,r=n===1&&e>1&&t.charCodeAt(e-1)===A?e-2:e-1;let o="";for(let i=n;i<=r;i++){let a=t.charCodeAt(i);if(a===ey){if(i===r){i!==e-1&&(o=t.substr(i+1));break}if(a=t.charCodeAt(++i),oo(ey,a)){const l=i-1,u=Va(t,l);i=u-1,o+=vQ(t.substring(l+1,u))}else a===13&&t.charCodeAt(i+1)===10&&i++}else o+=t[i]}return o}function Pq(t,e){const n=wU;let r="",o=!1;for(let i=0;i<t.length;i++){const a=t.charCodeAt(i);if(a===0){r+="�";continue}if(a<=31||a===127){r+="\\"+a.toString(16),o=!0;continue}a===n||a===ey?(r+="\\"+t.charAt(i),o=!1):(o&&(Ra(a)||Qs(a))&&(r+=" "),r+=t.charAt(i),o=!1)}return'"'+r+'"'}const Vq="String",$q={value:String};function bU(){return{type:"String",loc:this.getLocation(this.tokenStart,this.tokenEnd),value:CU(this.consume(Oo))}}function vU(t){this.token(Oo,Pq(t.value))}const Kq=Object.freeze(Object.defineProperty({__proto__:null,generate:vU,name:Vq,parse:bU,structure:$q},Symbol.toStringTag,{value:"Module"})),Gq=33;function EU(){return this.Raw(null,!1)}const Wq="StyleSheet",zq="stylesheet",Yq={children:[["Comment","CDO","CDC","Atrule","Rule","Raw"]]};function kU(){const t=this.tokenStart,e=this.createList();let A;for(;!this.eof;){switch(this.tokenType){case bA:this.next();continue;case pn:if(this.charCodeAt(this.tokenStart+2)!==Gq){this.next();continue}A=this.Comment();break;case Rf:A=this.CDO();break;case Pn:A=this.CDC();break;case EA:A=this.parseWithFallback(this.Atrule,EU);break;default:A=this.parseWithFallback(this.Rule,EU)}e.push(A)}return{type:"StyleSheet",loc:this.getLocation(t,this.tokenStart),children:e}}function SU(t){this.children(t)}const Jq=Object.freeze(Object.defineProperty({__proto__:null,generate:SU,name:Wq,parse:kU,structure:Yq,walkContext:zq},Symbol.toStringTag,{value:"Module"})),Xq="SupportsDeclaration",jq={declaration:"Declaration"};function QU(){const t=this.tokenStart;this.eat($t),this.skipSC();const e=this.Declaration();return this.eof||this.eat(rt),{type:"SupportsDeclaration",loc:this.getLocation(t,this.tokenStart),declaration:e}}function FU(t){this.token($t,"("),this.node(t.declaration),this.token(rt,")")}const qq=Object.freeze(Object.defineProperty({__proto__:null,generate:FU,name:Xq,parse:QU,structure:jq},Symbol.toStringTag,{value:"Module"})),Zq=42,UU=124;function ty(){this.tokenType!==_e&&this.isDelim(Zq)===!1&&this.error("Identifier or asterisk is expected"),this.next()}const e9="TypeSelector",t9={name:String};function IU(){const t=this.tokenStart;return this.isDelim(UU)?(this.next(),ty.call(this)):(ty.call(this),this.isDelim(UU)&&(this.next(),ty.call(this))),{type:"TypeSelector",loc:this.getLocation(t,this.tokenStart),name:this.substrToCursor(t)}}function xU(t){this.tokenize(t.name)}const A9=Object.freeze(Object.defineProperty({__proto__:null,generate:xU,name:e9,parse:IU,structure:t9},Symbol.toStringTag,{value:"Module"})),TU=43,_U=45,Ay=63;function Fc(t,e){let A=0;for(let n=this.tokenStart+t;n<this.tokenEnd;n++){const r=this.charCodeAt(n);if(r===_U&&e&&A!==0)return Fc.call(this,t+A+1,!1),-1;Ra(r)||this.error(e&&A!==0?"Hyphen minus"+(A<6?" or hex digit":"")+" is expected":A<6?"Hex digit is expected":"Unexpected input",n),++A>6&&this.error("Too many hex digits",n)}return this.next(),A}function jf(t){let e=0;for(;this.isDelim(Ay);)++e>t&&this.error("Too many question marks"),this.next()}function n9(t){this.charCodeAt(this.tokenStart)!==t&&this.error((t===TU?"Plus sign":"Hyphen minus")+" is expected")}function r9(){let t=0;switch(this.tokenType){case at:if(t=Fc.call(this,1,!0),this.isDelim(Ay)){jf.call(this,6-t);break}if(this.tokenType===bt||this.tokenType===at){n9.call(this,_U),Fc.call(this,1,!1);break}break;case bt:t=Fc.call(this,1,!0),t>0&&jf.call(this,6-t);break;default:if(this.eatDelim(TU),this.tokenType===_e){t=Fc.call(this,0,!0),t>0&&jf.call(this,6-t);break}if(this.isDelim(Ay)){this.next(),jf.call(this,5);break}this.error("Hex digit or question mark is expected")}}const o9="UnicodeRange",i9={value:String};function DU(){const t=this.tokenStart;return this.eatIdent("u"),r9.call(this),{type:"UnicodeRange",loc:this.getLocation(t,this.tokenStart),value:this.substrToCursor(t)}}function LU(t){this.tokenize(t.value)}const s9=Object.freeze(Object.defineProperty({__proto__:null,generate:LU,name:o9,parse:DU,structure:i9},Symbol.toStringTag,{value:"Module"})),a9=32,ny=92,l9=34,c9=39,u9=40,OU=41;function d9(t){const e=t.length;let A=4,n=t.charCodeAt(e-1)===OU?e-2:e-1,r="";for(;A<n&&Qs(t.charCodeAt(A));)A++;for(;A<n&&Qs(t.charCodeAt(n));)n--;for(let o=A;o<=n;o++){let i=t.charCodeAt(o);if(i===ny){if(o===n){o!==e-1&&(r=t.substr(o+1));break}if(i=t.charCodeAt(++o),oo(ny,i)){const a=o-1,l=Va(t,a);o=l-1,r+=vQ(t.substring(a+1,l))}else i===13&&t.charCodeAt(o+1)===10&&o++}else r+=t[o]}return r}function f9(t){let e="",A=!1;for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(r===0){e+="�";continue}if(r<=31||r===127){e+="\\"+r.toString(16),A=!0;continue}r===a9||r===ny||r===l9||r===c9||r===u9||r===OU?(e+="\\"+t.charAt(n),A=!1):(A&&Ra(r)&&(e+=" "),e+=t.charAt(n),A=!1)}return"url("+e+")"}const h9="Url",p9={value:String};function MU(){const t=this.tokenStart;let e;switch(this.tokenType){case fn:e=d9(this.consume(fn));break;case mt:this.cmpStr(this.tokenStart,this.tokenEnd,"url(")||this.error("Function name must be `url`"),this.eat(mt),this.skipSC(),e=CU(this.consume(Oo)),this.skipSC(),this.eof||this.eat(rt);break;default:this.error("Url or Function is expected")}return{type:"Url",loc:this.getLocation(t,this.tokenStart),value:e}}function NU(t){this.token(fn,f9(t.value))}const m9=Object.freeze(Object.defineProperty({__proto__:null,generate:NU,name:h9,parse:MU,structure:p9},Symbol.toStringTag,{value:"Module"})),g9="Value",B9={children:[[]]};function HU(){const t=this.tokenStart,e=this.readSequence(this.scope.Value);return{type:"Value",loc:this.getLocation(t,this.tokenStart),children:e}}function RU(t){this.children(t)}const y9=Object.freeze(Object.defineProperty({__proto__:null,generate:RU,name:g9,parse:HU,structure:B9},Symbol.toStringTag,{value:"Module"})),w9=Object.freeze({type:"WhiteSpace",loc:null,value:" "}),C9="WhiteSpace",b9={value:String};function PU(){return this.eat(bA),w9}function VU(t){this.token(bA,t.value)}const v9=Object.freeze(Object.defineProperty({__proto__:null,generate:VU,name:C9,parse:PU,structure:b9},Symbol.toStringTag,{value:"Module"})),E9=Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:LX,Atrule:RX,AtrulePrelude:KX,AttributeSelector:qX,Block:rj,Brackets:sj,CDC:cj,CDO:fj,ClassSelector:gj,Combinator:vj,Comment:Fj,Condition:_j,Declaration:Yj,DeclarationList:qj,Dimension:t7,Feature:o7,FeatureFunction:l7,FeatureRange:h7,Function:B7,GeneralEnclosed:C7,Hash:k7,IdSelector:x7,Identifier:F7,Layer:L7,LayerList:N7,MediaQuery:P7,MediaQueryList:K7,NestingSelector:Y7,Nth:j7,Number:eq,Operator:nq,Parentheses:iq,Percentage:lq,PseudoClassSelector:fq,PseudoElementSelector:gq,Ratio:wq,Raw:Eq,Rule:Uq,Scope:Tq,Selector:Lq,SelectorList:Hq,String:Kq,StyleSheet:Jq,SupportsDeclaration:qq,TypeSelector:A9,UnicodeRange:s9,Url:m9,Value:y9,WhiteSpace:v9},Symbol.toStringTag,{value:"Module"})),k9={node:E9},Mi=yX(k9),ry=["left","right","top","bottom","inset-block-start","inset-block-end","inset-inline-start","inset-inline-end","inset-block","inset-inline","inset"];function Uc(t){return ry.includes(t)}const oy=["margin-block-start","margin-block-end","margin-block","margin-inline-start","margin-inline-end","margin-inline","margin-bottom","margin-left","margin-right","margin-top","margin"];function S9(t){return oy.includes(t)}const iy=["width","height","min-width","min-height","max-width","max-height","block-size","inline-size","min-block-size","min-inline-size","max-block-size","max-inline-size"];function $U(t){return iy.includes(t)}const KU=["justify-self","align-self","place-self"];function Q9(t){return KU.includes(t)}const GU=[...ry,...oy,...iy,...KU,"position-anchor","position-area"],F9=[...iy,...ry,...oy];function WU(t){return F9.includes(t)}const U9=["top","left","right","bottom","start","end","self-start","self-end","center","inside","outside"];function zU(t){return U9.includes(t)}const I9=["width","height","block","inline","self-block","self-inline"];function x9(t){return I9.includes(t)}const YU=new Set(["Atrule","Selector","Declaration"]);function T9(t){const e=new SourceMapGenerator,A={line:1,column:0},n={line:0,column:0},r={line:1,column:0},o={generated:r};let i=1,a=0,l=!1;const u=t.node;t.node=function(p){if(p.loc&&p.loc.start&&YU.has(p.type)){const g=p.loc.start.line,B=p.loc.start.column-1;(n.line!==g||n.column!==B)&&(n.line=g,n.column=B,A.line=i,A.column=a,l&&(l=!1,(A.line!==r.line||A.column!==r.column)&&e.addMapping(o)),l=!0,e.addMapping({source:p.loc.source,original:n,generated:A}))}u.call(this,p),l&&YU.has(p.type)&&(r.line=i,r.column=a)};const f=t.emit;t.emit=function(p,g,B){for(let y=0;y<p.length;y++)p.charCodeAt(y)===10?(i++,a=0):a++;f(p,g,B)};const h=t.result;return t.result=function(){return l&&e.addMapping(o),{css:h(),map:e}},t}const _9=43,D9=45,sy=(t,e)=>{if(t===It&&(t=e),typeof t=="string"){const A=t.charCodeAt(0);return A>127?32768:A<<8}return t},JU=[[_e,_e],[_e,mt],[_e,fn],[_e,Tr],[_e,"-"],[_e,at],[_e,pA],[_e,bt],[_e,Pn],[_e,$t],[EA,_e],[EA,mt],[EA,fn],[EA,Tr],[EA,"-"],[EA,at],[EA,pA],[EA,bt],[EA,Pn],[qt,_e],[qt,mt],[qt,fn],[qt,Tr],[qt,"-"],[qt,at],[qt,pA],[qt,bt],[qt,Pn],[bt,_e],[bt,mt],[bt,fn],[bt,Tr],[bt,"-"],[bt,at],[bt,pA],[bt,bt],[bt,Pn],["#",_e],["#",mt],["#",fn],["#",Tr],["#","-"],["#",at],["#",pA],["#",bt],["#",Pn],["-",_e],["-",mt],["-",fn],["-",Tr],["-","-"],["-",at],["-",pA],["-",bt],["-",Pn],[at,_e],[at,mt],[at,fn],[at,Tr],[at,at],[at,pA],[at,bt],[at,"%"],[at,Pn],["@",_e],["@",mt],["@",fn],["@",Tr],["@","-"],["@",Pn],[".",at],[".",pA],[".",bt],["+",at],["+",pA],["+",bt],["/","*"]],L9=JU.concat([[_e,qt],[bt,qt],[qt,qt],[EA,$t],[EA,Oo],[EA,hn],[pA,pA],[pA,bt],[pA,mt],[pA,"-"],[rt,_e],[rt,mt],[rt,pA],[rt,bt],[rt,qt],[rt,"-"]]);function XU(t){const e=new Set(t.map(([A,n])=>sy(A)<<16|sy(n)));return function(A,n,r){const o=sy(n,r),i=r.charCodeAt(0);return(i===D9&&n!==_e&&n!==mt&&n!==Pn||i===_9?e.has(A<<16|i<<8):e.has(A<<16|o))&&this.emit(" ",bA,!0),o}}const O9=XU(JU),jU=XU(L9),qU=Object.freeze(Object.defineProperty({__proto__:null,safe:jU,spec:O9},Symbol.toStringTag,{value:"Module"})),M9=92;function N9(t,e){if(typeof e=="function"){let A=null;t.children.forEach(n=>{A!==null&&e.call(this,A),this.node(n),A=n});return}t.children.forEach(this.node,this)}function H9(t){UQ(t,(e,A,n)=>{this.token(e,t.slice(A,n))})}function R9(t){const e=new Map;for(let[A,n]of Object.entries(t.node))typeof(n.generate||n)=="function"&&e.set(A,n.generate||n);return function(A,n){let r="",o=0,i={node(l){if(e.has(l.type))e.get(l.type).call(a,l);else throw new Error("Unknown node type: "+l.type)},tokenBefore:jU,token(l,u){o=this.tokenBefore(o,l,u),this.emit(u,l,!1),l===It&&u.charCodeAt(0)===M9&&this.emit(`
165
165
  `,bA,!0)},emit(l){r+=l},result(){return r}};n&&(typeof n.decorator=="function"&&(i=n.decorator(i)),n.sourceMap&&(i=T9(i)),n.mode in qU&&(i.tokenBefore=qU[n.mode]));const a={node:l=>i.node(l),children:N9,token:(l,u)=>i.token(l,u),tokenize:H9};return i.node(A),i.result()}}const P9=Object.freeze(Object.defineProperty({__proto__:null,AnPlusB:xQ,Atrule:DQ,AtrulePrelude:OQ,AttributeSelector:HQ,Block:KQ,Brackets:WQ,CDC:YQ,CDO:XQ,ClassSelector:qQ,Combinator:tF,Comment:nF,Condition:iF,Declaration:uF,DeclarationList:fF,Dimension:pF,Feature:gF,FeatureFunction:yF,FeatureRange:EF,Function:SF,GeneralEnclosed:FF,Hash:IF,IdSelector:DF,Identifier:TF,Layer:OF,LayerList:NF,MediaQuery:RF,MediaQueryList:VF,NestingSelector:KF,Nth:WF,Number:YF,Operator:XF,Parentheses:qF,Percentage:eU,PseudoClassSelector:AU,PseudoElementSelector:rU,Ratio:aU,Raw:cU,Rule:fU,Scope:pU,Selector:gU,SelectorList:yU,String:vU,StyleSheet:SU,SupportsDeclaration:FU,TypeSelector:xU,UnicodeRange:LU,Url:NU,Value:RU,WhiteSpace:VU},Symbol.toStringTag,{value:"Module"})),V9={node:P9},$9=R9(V9);let Ka=null;class mn{static createItem(e){return{prev:null,next:null,data:e}}constructor(){this.head=null,this.tail=null,this.cursor=null}createItem(e){return mn.createItem(e)}allocateCursor(e,A){let n;return Ka!==null?(n=Ka,Ka=Ka.cursor,n.prev=e,n.next=A,n.cursor=this.cursor):n={prev:e,next:A,cursor:this.cursor},this.cursor=n,n}releaseCursor(){const{cursor:e}=this;this.cursor=e.cursor,e.prev=null,e.next=null,e.cursor=Ka,Ka=e}updateCursors(e,A,n,r){let{cursor:o}=this;for(;o!==null;)o.prev===e&&(o.prev=A),o.next===n&&(o.next=r),o=o.cursor}*[Symbol.iterator](){for(let e=this.head;e!==null;e=e.next)yield e.data}get size(){let e=0;for(let A=this.head;A!==null;A=A.next)e++;return e}get isEmpty(){return this.head===null}get first(){return this.head&&this.head.data}get last(){return this.tail&&this.tail.data}fromArray(e){let A=null;this.head=null;for(let n of e){const r=mn.createItem(n);A!==null?A.next=r:this.head=r,r.prev=A,A=r}return this.tail=A,this}toArray(){return[...this]}toJSON(){return[...this]}forEach(e,A=this){const n=this.allocateCursor(null,this.head);for(;n.next!==null;){const r=n.next;n.next=r.next,e.call(A,r.data,r,this)}this.releaseCursor()}forEachRight(e,A=this){const n=this.allocateCursor(this.tail,null);for(;n.prev!==null;){const r=n.prev;n.prev=r.prev,e.call(A,r.data,r,this)}this.releaseCursor()}reduce(e,A,n=this){let r=this.allocateCursor(null,this.head),o=A,i;for(;r.next!==null;)i=r.next,r.next=i.next,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}reduceRight(e,A,n=this){let r=this.allocateCursor(this.tail,null),o=A,i;for(;r.prev!==null;)i=r.prev,r.prev=i.prev,o=e.call(n,o,i.data,i,this);return this.releaseCursor(),o}some(e,A=this){for(let n=this.head;n!==null;n=n.next)if(e.call(A,n.data,n,this))return!0;return!1}map(e,A=this){const n=new mn;for(let r=this.head;r!==null;r=r.next)n.appendData(e.call(A,r.data,r,this));return n}filter(e,A=this){const n=new mn;for(let r=this.head;r!==null;r=r.next)e.call(A,r.data,r,this)&&n.appendData(r.data);return n}nextUntil(e,A,n=this){if(e===null)return;const r=this.allocateCursor(null,e);for(;r.next!==null;){const o=r.next;if(r.next=o.next,A.call(n,o.data,o,this))break}this.releaseCursor()}prevUntil(e,A,n=this){if(e===null)return;const r=this.allocateCursor(e,null);for(;r.prev!==null;){const o=r.prev;if(r.prev=o.prev,A.call(n,o.data,o,this))break}this.releaseCursor()}clear(){this.head=null,this.tail=null}copy(){const e=new mn;for(let A of this)e.appendData(A);return e}prepend(e){return this.updateCursors(null,e,this.head,e),this.head!==null?(this.head.prev=e,e.next=this.head):this.tail=e,this.head=e,this}prependData(e){return this.prepend(mn.createItem(e))}append(e){return this.insert(e)}appendData(e){return this.insert(mn.createItem(e))}insert(e,A=null){if(A!==null)if(this.updateCursors(A.prev,e,A,e),A.prev===null){if(this.head!==A)throw new Error("before doesn't belong to list");this.head=e,A.prev=e,e.next=A,this.updateCursors(null,e)}else A.prev.next=e,e.prev=A.prev,A.prev=e,e.next=A;else this.updateCursors(this.tail,e,null,e),this.tail!==null?(this.tail.next=e,e.prev=this.tail):this.head=e,this.tail=e;return this}insertData(e,A){return this.insert(mn.createItem(e),A)}remove(e){if(this.updateCursors(e,e.prev,e,e.next),e.prev!==null)e.prev.next=e.next;else{if(this.head!==e)throw new Error("item doesn't belong to list");this.head=e.next}if(e.next!==null)e.next.prev=e.prev;else{if(this.tail!==e)throw new Error("item doesn't belong to list");this.tail=e.prev}return e.prev=null,e.next=null,e}push(e){this.insert(mn.createItem(e))}pop(){return this.tail!==null?this.remove(this.tail):null}unshift(e){this.prepend(mn.createItem(e))}shift(){return this.head!==null?this.remove(this.head):null}prependList(e){return this.insertList(e,this.head)}appendList(e){return this.insertList(e)}insertList(e,A){return e.head===null?this:(A!=null?(this.updateCursors(A.prev,e.tail,A,e.head),A.prev!==null?(A.prev.next=e.head,e.head.prev=A.prev):this.head=e.head,A.prev=e.tail,e.tail.next=A):(this.updateCursors(this.tail,e.tail,null,e.head),this.tail!==null?(this.tail.next=e.head,e.head.prev=this.tail):this.head=e.head,this.tail=e.tail),e.head=null,e.tail=null,this)}replace(e,A){"head"in A?this.insertList(A,e):this.insert(A,e),this.remove(e)}}function K9(t,e){const A=Object.create(SyntaxError.prototype),n=new Error;return Object.assign(A,{name:t,message:e,get stack(){return(n.stack||"").replace(/^(.+\n){1,3}/,`${t}: ${e}
166
166
  `)}})}const ay=100,ZU=60,eI=" ";function tI({source:t,line:e,column:A,baseLine:n,baseColumn:r},o){function i(B,y){return u.slice(B,y).map((b,w)=>String(B+w+1).padStart(p)+" |"+b).join(`
167
167
  `)}const a=`
@@ -34,6 +34,10 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
34
34
  type: BooleanConstructor;
35
35
  default: boolean;
36
36
  };
37
+ emitPending: {
38
+ type: BooleanConstructor;
39
+ default: boolean;
40
+ };
37
41
  debug: {
38
42
  type: BooleanConstructor;
39
43
  default: boolean;
@@ -66,6 +70,10 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
66
70
  type: BooleanConstructor;
67
71
  default: boolean;
68
72
  };
73
+ emitPending: {
74
+ type: BooleanConstructor;
75
+ default: boolean;
76
+ };
69
77
  debug: {
70
78
  type: BooleanConstructor;
71
79
  default: boolean;
@@ -80,6 +88,7 @@ declare const __VLS_component: import('../../../../vue/dist/vue.esm-bundler.js')
80
88
  fixedWidth: number;
81
89
  renderUpdates: boolean;
82
90
  exportToSvg: boolean;
91
+ emitPending: boolean;
83
92
  debug: boolean;
84
93
  }, {}, {}, {}, string, import('../../../../vue/dist/vue.esm-bundler.js').ComponentProvideOptions, true, {
85
94
  renderer: HTMLDivElement;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ablok-components",
3
3
  "private": false,
4
- "version": "0.2.18",
4
+ "version": "0.2.19",
5
5
  "scripts": {
6
6
  "dev": "vite --host",
7
7
  "build": "vue-tsc --noEmit && vite build",