satori 0.34.0 → 0.34.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,6 +3,6 @@ var hd=Object.create;var Hn=Object.defineProperty;var md=Object.getOwnPropertyDe
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function Qh(e,t){if(e){if(typeof e=="string")return jl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jl(e,t)}}function jl(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Vl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jh(e,t,n){return t&&Vl(e.prototype,t),n&&Vl(e,n),e}function Zh(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jo(e,t)}function Jo(e,t){return Jo=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Jo(e,t)}var em=function(e){Zh(t,e);function t(r){var i;return i=e.call(this,r)||this,i.nodes||(i.nodes=[]),i}var n=t.prototype;return n.append=function(i){return i.parent=this,this.nodes.push(i),this},n.prepend=function(i){return i.parent=this,this.nodes.unshift(i),this},n.at=function(i){return this.nodes[i]},n.index=function(i){return typeof i=="number"?i:this.nodes.indexOf(i)},n.removeChild=function(i){i=this.index(i),this.at(i).parent=void 0,this.nodes.splice(i,1);var o;for(var s in this.indexes)o=this.indexes[s],o>=i&&(this.indexes[s]=o-1);return this},n.removeAll=function(){for(var i=Kh(this.nodes),o;!(o=i()).done;){var s=o.value;s.parent=void 0}return this.nodes=[],this},n.empty=function(){return this.removeAll()},n.insertAfter=function(i,o){o.parent=this;var s=this.index(i);this.nodes.splice(s+1,0,o),o.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],s<=a&&(this.indexes[u]=a+1);return this},n.insertBefore=function(i,o){o.parent=this;var s=this.index(i);this.nodes.splice(s,0,o),o.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],a<=s&&(this.indexes[u]=a+1);return this},n._findChildAtPosition=function(i,o){var s=void 0;return this.each(function(a){if(a.atPosition){var u=a.atPosition(i,o);if(u)return s=u,!1}else if(a.isAtPosition(i,o))return s=a,!1}),s},n.atPosition=function(i,o){if(this.isAtPosition(i,o))return this._findChildAtPosition(i,o)||this},n._inferEndPosition=function(){this.last&&this.last.source&&this.last.source.end&&(this.source=this.source||{},this.source.end=this.source.end||{},Object.assign(this.source.end,this.last.source.end))},n.each=function(i){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach++;var o=this.lastEach;if(this.indexes[o]=0,!!this.length){for(var s,a;this.indexes[o]<this.length&&(s=this.indexes[o],a=i(this.at(s),s),a!==!1);)this.indexes[o]+=1;if(delete this.indexes[o],a===!1)return!1}},n.walk=function(i){return this.each(function(o,s){var a=i(o,s);if(a!==!1&&o.length&&(a=o.walk(i)),a===!1)return!1})},n.walkAttributes=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.ATTRIBUTE)return i.call(o,s)})},n.walkClasses=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.CLASS)return i.call(o,s)})},n.walkCombinators=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.COMBINATOR)return i.call(o,s)})},n.walkComments=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.COMMENT)return i.call(o,s)})},n.walkIds=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.ID)return i.call(o,s)})},n.walkNesting=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.NESTING)return i.call(o,s)})},n.walkPseudos=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.PSEUDO)return i.call(o,s)})},n.walkTags=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.TAG)return i.call(o,s)})},n.walkUniversals=function(i){var o=this;return this.walk(function(s){if(s.type===Kt.UNIVERSAL)return i.call(o,s)})},n.split=function(i){var o=this,s=[];return this.reduce(function(a,u,l){var f=i.call(o,u);return s.push(u),f?(a.push(s),s=[]):l===o.length-1&&a.push(s),a},[])},n.map=function(i){return this.nodes.map(i)},n.reduce=function(i,o){return this.nodes.reduce(i,o)},n.every=function(i){return this.nodes.every(i)},n.some=function(i){return this.nodes.some(i)},n.filter=function(i){return this.nodes.filter(i)},n.sort=function(i){return this.nodes.sort(i)},n.toString=function(){return this.map(String).join("")},Jh(t,[{key:"first",get:function(){return this.at(0)}},{key:"last",get:function(){return this.at(this.length-1)}},{key:"length",get:function(){return this.nodes.length}}]),t}(Hh.default);dn.default=em;Yl.exports=dn.default});var es=z((pn,Kl)=>{"use strict";pn.__esModule=!0;pn.default=void 0;var tm=nm(Oi()),rm=$e();function nm(e){return e&&e.__esModule?e:{default:e}}function Xl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function im(e,t,n){return t&&Xl(e.prototype,t),n&&Xl(e,n),e}function om(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Zo(e,t)}function Zo(e,t){return Zo=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Zo(e,t)}var sm=function(e){om(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=rm.ROOT,i}var n=t.prototype;return n.toString=function(){var i=this.reduce(function(o,s){return o.push(String(s)),o},[]).join(",");return this.trailingComma?i+",":i},n.error=function(i,o){return this._error?this._error(i,o):new Error(i)},im(t,[{key:"errorGenerator",set:function(i){this._error=i}}]),t}(tm.default);pn.default=sm;Kl.exports=pn.default});var rs=z((hn,Ql)=>{"use strict";hn.__esModule=!0;hn.default=void 0;var am=lm(Oi()),um=$e();function lm(e){return e&&e.__esModule?e:{default:e}}function fm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ts(e,t)}function ts(e,t){return ts=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ts(e,t)}var cm=function(e){fm(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=um.SELECTOR,r}return t}(am.default);hn.default=cm;Ql.exports=hn.default});var Ri=z((Ow,Jl)=>{"use strict";var dm={},pm=dm.hasOwnProperty,hm=function(t,n){if(!t)return n;var r={};for(var i in n)r[i]=pm.call(t,i)?t[i]:n[i];return r},mm=/[ -,\.\/:-@\[-\^`\{-~]/,gm=/[ -,\.\/:-@\[\]\^`\{-~]/,bm=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,ns=function e(t,n){n=hm(n,e.options),n.quotes!="single"&&n.quotes!="double"&&(n.quotes="single");for(var r=n.quotes=="double"?'"':"'",i=n.isIdentifier,o=t.charAt(0),s="",a=0,u=t.length;a<u;){var l=t.charAt(a++),f=l.charCodeAt(),c=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&a<u){var h=t.charCodeAt(a++);(h&64512)==56320?f=((f&1023)<<10)+(h&1023)+65536:a--}c="\\"+f.toString(16).toUpperCase()+" "}else n.escapeEverything?mm.test(l)?c="\\"+l:c="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?c="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&gm.test(l)?c="\\"+l:c=l;s+=c}return i&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(o)&&(s="\\3"+o+" "+s.slice(1))),s=s.replace(bm,function(m,g,y){return g&&g.length%2?m:(g||"")+y}),!i&&n.wrap?r+s+r:s};ns.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};ns.version="3.0.0";Jl.exports=ns});var os=z((mn,tf)=>{"use strict";mn.__esModule=!0;mn.default=void 0;var ym=ef(Ri()),vm=fn(),xm=ef(Xt()),wm=$e();function ef(e){return e&&e.__esModule?e:{default:e}}function Zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sm(e,t,n){return t&&Zl(e.prototype,t),n&&Zl(e,n),e}function _m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,is(e,t)}function is(e,t){return is=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},is(e,t)}var Em=function(e){_m(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=wm.CLASS,i._constructed=!0,i}var n=t.prototype;return n.valueToString=function(){return"."+e.prototype.valueToString.call(this)},Sm(t,[{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var o=(0,ym.default)(i,{isIdentifier:!0});o!==i?((0,vm.ensureObject)(this,"raws"),this.raws.value=o):this.raws&&delete this.raws.value}this._value=i}}]),t}(xm.default);mn.default=Em;tf.exports=mn.default});var as=z((gn,rf)=>{"use strict";gn.__esModule=!0;gn.default=void 0;var Tm=Pm(Xt()),km=$e();function Pm(e){return e&&e.__esModule?e:{default:e}}function Om(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ss(e,t)}function ss(e,t){return ss=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ss(e,t)}var Rm=function(e){Om(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=km.COMMENT,r}return t}(Tm.default);gn.default=Rm;rf.exports=gn.default});var ls=z((bn,nf)=>{"use strict";bn.__esModule=!0;bn.default=void 0;var Am=Cm(Xt()),Im=$e();function Cm(e){return e&&e.__esModule?e:{default:e}}function Lm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,us(e,t)}function us(e,t){return us=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},us(e,t)}var Mm=function(e){Lm(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Im.ID,i}var n=t.prototype;return n.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},t}(Am.default);bn.default=Mm;nf.exports=bn.default});var Ai=z((yn,af)=>{"use strict";yn.__esModule=!0;yn.default=void 0;var Fm=sf(Ri()),Nm=fn(),Dm=sf(Xt());function sf(e){return e&&e.__esModule?e:{default:e}}function of(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wm(e,t,n){return t&&of(e.prototype,t),n&&of(e,n),e}function $m(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,fs(e,t)}function fs(e,t){return fs=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},fs(e,t)}var Bm=function(e){$m(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.qualifiedName=function(i){return this.namespace?this.namespaceString+"|"+i:i},n.valueToString=function(){return this.qualifiedName(e.prototype.valueToString.call(this))},Wm(t,[{key:"namespace",get:function(){return this._namespace},set:function(i){if(i===!0||i==="*"||i==="&"){this._namespace=i,this.raws&&delete this.raws.namespace;return}var o=(0,Fm.default)(i,{isIdentifier:!0});this._namespace=i,o!==i?((0,Nm.ensureObject)(this,"raws"),this.raws.namespace=o):this.raws&&delete this.raws.namespace}},{key:"ns",get:function(){return this._namespace},set:function(i){this.namespace=i}},{key:"namespaceString",get:function(){if(this.namespace){var i=this.stringifyProperty("namespace");return i===!0?"":i}else return""}}]),t}(Dm.default);yn.default=Bm;af.exports=yn.default});var ds=z((vn,uf)=>{"use strict";vn.__esModule=!0;vn.default=void 0;var Um=zm(Ai()),qm=$e();function zm(e){return e&&e.__esModule?e:{default:e}}function Gm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,cs(e,t)}function cs(e,t){return cs=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},cs(e,t)}var jm=function(e){Gm(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=qm.TAG,r}return t}(Um.default);vn.default=jm;uf.exports=vn.default});var hs=z((xn,lf)=>{"use strict";xn.__esModule=!0;xn.default=void 0;var Vm=Ym(Xt()),Hm=$e();function Ym(e){return e&&e.__esModule?e:{default:e}}function Xm(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ps(e,t)}function ps(e,t){return ps=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ps(e,t)}var Km=function(e){Xm(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=Hm.STRING,r}return t}(Vm.default);xn.default=Km;lf.exports=xn.default});var gs=z((wn,ff)=>{"use strict";wn.__esModule=!0;wn.default=void 0;var Qm=Zm(Oi()),Jm=$e();function Zm(e){return e&&e.__esModule?e:{default:e}}function e0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ms(e,t)}function ms(e,t){return ms=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ms(e,t)}var t0=function(e){e0(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Jm.PSEUDO,i}var n=t.prototype;return n.toString=function(){var i=this.length?"("+this.map(String).join(",")+")":"";return[this.rawSpaceBefore,this.stringifyProperty("value"),i,this.rawSpaceAfter].join("")},t}(Qm.default);wn.default=t0;ff.exports=wn.default});var df=z((Rw,cf)=>{cf.exports=function(t,n){return function(...r){return console.warn(n),t(...r)}}});var Ss=z(En=>{"use strict";En.__esModule=!0;En.unescapeValue=ws;En.default=void 0;var Sn=xs(Ri()),r0=xs(Qo()),n0=xs(Ai()),i0=$e(),bs;function xs(e){return e&&e.__esModule?e:{default:e}}function pf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o0(e,t,n){return t&&pf(e.prototype,t),n&&pf(e,n),e}function s0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vs(e,t)}function vs(e,t){return vs=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},vs(e,t)}var _n=df(),a0=/^('|")([^]*)\1$/,u0=_n(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),l0=_n(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),f0=_n(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function ws(e){var t=!1,n=null,r=e,i=r.match(a0);return i&&(n=i[1],r=i[2]),r=(0,r0.default)(r),r!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}function c0(e){if(e.quoteMark!==void 0||e.value===void 0)return e;f0();var t=ws(e.value),n=t.quoteMark,r=t.unescaped;return e.raws||(e.raws={}),e.raws.value===void 0&&(e.raws.value=e.value),e.value=r,e.quoteMark=n,e}var Ii=function(e){s0(t,e);function t(r){var i;return r===void 0&&(r={}),i=e.call(this,c0(r))||this,i.type=i0.ATTRIBUTE,i.raws=i.raws||{},Object.defineProperty(i.raws,"unquoted",{get:_n(function(){return i.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:_n(function(){return i.value},"Setting attr.raws.unquoted is deprecated and has no effect. attr.value is unescaped by default now.")}),i._constructed=!0,i}var n=t.prototype;return n.getQuotedValue=function(i){i===void 0&&(i={});var o=this._determineQuoteMark(i),s=ys[o],a=(0,Sn.default)(this._value,s);return a},n._determineQuoteMark=function(i){return i.smart?this.smartQuoteMark(i):this.preferredQuoteMark(i)},n.setValue=function(i,o){o===void 0&&(o={}),this._value=i,this._quoteMark=this._determineQuoteMark(o),this._syncRawValue()},n.smartQuoteMark=function(i){var o=this.value,s=o.replace(/[^']/g,"").length,a=o.replace(/[^"]/g,"").length;if(s+a===0){var u=(0,Sn.default)(o,{isIdentifier:!0});if(u===o)return t.NO_QUOTE;var l=this.preferredQuoteMark(i);if(l===t.NO_QUOTE){var f=this.quoteMark||i.quoteMark||t.DOUBLE_QUOTE,c=ys[f],h=(0,Sn.default)(o,c);if(h.length<u.length)return f}return l}else return a===s?this.preferredQuoteMark(i):a<s?t.DOUBLE_QUOTE:t.SINGLE_QUOTE},n.preferredQuoteMark=function(i){var o=i.preferCurrentQuoteMark?this.quoteMark:i.quoteMark;return o===void 0&&(o=i.preferCurrentQuoteMark?i.quoteMark:this.quoteMark),o===void 0&&(o=t.DOUBLE_QUOTE),o},n._syncRawValue=function(){var i=(0,Sn.default)(this._value,ys[this.quoteMark]);i===this._value?this.raws&&delete this.raws.value:this.raws.value=i},n._handleEscapes=function(i,o){if(this._constructed){var s=(0,Sn.default)(o,{isIdentifier:!0});s!==o?this.raws[i]=s:delete this.raws[i]}},n._spacesFor=function(i){var o={before:"",after:""},s=this.spaces[i]||{},a=this.raws.spaces&&this.raws.spaces[i]||{};return Object.assign(o,s,a)},n._stringFor=function(i,o,s){o===void 0&&(o=i),s===void 0&&(s=hf);var a=this._spacesFor(o);return s(this.stringifyProperty(i),a)},n.offsetOf=function(i){var o=1,s=this._spacesFor("attribute");if(o+=s.before.length,i==="namespace"||i==="ns")return this.namespace?o:-1;if(i==="attributeNS"||(o+=this.namespaceString.length,this.namespace&&(o+=1),i==="attribute"))return o;o+=this.stringifyProperty("attribute").length,o+=s.after.length;var a=this._spacesFor("operator");o+=a.before.length;var u=this.stringifyProperty("operator");if(i==="operator")return u?o:-1;o+=u.length,o+=a.after.length;var l=this._spacesFor("value");o+=l.before.length;var f=this.stringifyProperty("value");if(i==="value")return f?o:-1;o+=f.length,o+=l.after.length;var c=this._spacesFor("insensitive");return o+=c.before.length,i==="insensitive"&&this.insensitive?o:-1},n.toString=function(){var i=this,o=[this.rawSpaceBefore,"["];return o.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(o.push(this._stringFor("operator")),o.push(this._stringFor("value")),o.push(this._stringFor("insensitiveFlag","insensitive",function(s,a){return s.length>0&&!i.quoted&&a.before.length===0&&!(i.spaces.value&&i.spaces.value.after)&&(a.before=" "),hf(s,a)}))),o.push("]"),o.push(this.rawSpaceAfter),o.join("")},o0(t,[{key:"quoted",get:function(){var i=this.quoteMark;return i==="'"||i==='"'},set:function(i){l0()}},{key:"quoteMark",get:function(){return this._quoteMark},set:function(i){if(!this._constructed){this._quoteMark=i;return}this._quoteMark!==i&&(this._quoteMark=i,this._syncRawValue())}},{key:"qualifiedAttribute",get:function(){return this.qualifiedName(this.raws.attribute||this.attribute)}},{key:"insensitiveFlag",get:function(){return this.insensitive?"i":""}},{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var o=ws(i),s=o.deprecatedUsage,a=o.unescaped,u=o.quoteMark;if(s&&u0(),a===this._value&&u===this._quoteMark)return;this._value=a,this._quoteMark=u,this._syncRawValue()}else this._value=i}},{key:"attribute",get:function(){return this._attribute},set:function(i){this._handleEscapes("attribute",i),this._attribute=i}}]),t}(n0.default);En.default=Ii;Ii.NO_QUOTE=null;Ii.SINGLE_QUOTE="'";Ii.DOUBLE_QUOTE='"';var ys=(bs={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},bs[null]={isIdentifier:!0},bs);function hf(e,t){return""+t.before+e+t.after}});var Es=z((Tn,mf)=>{"use strict";Tn.__esModule=!0;Tn.default=void 0;var d0=h0(Ai()),p0=$e();function h0(e){return e&&e.__esModule?e:{default:e}}function m0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_s(e,t)}function _s(e,t){return _s=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},_s(e,t)}var g0=function(e){m0(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=p0.UNIVERSAL,r.value="*",r}return t}(d0.default);Tn.default=g0;mf.exports=Tn.default});var ks=z((kn,gf)=>{"use strict";kn.__esModule=!0;kn.default=void 0;var b0=v0(Xt()),y0=$e();function v0(e){return e&&e.__esModule?e:{default:e}}function x0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ts(e,t)}function Ts(e,t){return Ts=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Ts(e,t)}var w0=function(e){x0(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=y0.COMBINATOR,r}return t}(b0.default);kn.default=w0;gf.exports=kn.default});var Os=z((Pn,bf)=>{"use strict";Pn.__esModule=!0;Pn.default=void 0;var S0=E0(Xt()),_0=$e();function E0(e){return e&&e.__esModule?e:{default:e}}function T0(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Ps(e,t)}function Ps(e,t){return Ps=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Ps(e,t)}var k0=function(e){T0(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=_0.NESTING,r.value="&",r}return t}(S0.default);Pn.default=k0;bf.exports=Pn.default});var vf=z((Ci,yf)=>{"use strict";Ci.__esModule=!0;Ci.default=P0;function P0(e){return e.sort(function(t,n){return t-n})}yf.exports=Ci.default});var Rs=z(U=>{"use strict";U.__esModule=!0;U.combinator=U.word=U.comment=U.str=U.tab=U.newline=U.feed=U.cr=U.backslash=U.bang=U.slash=U.doubleQuote=U.singleQuote=U.space=U.greaterThan=U.pipe=U.equals=U.plus=U.caret=U.tilde=U.dollar=U.closeSquare=U.openSquare=U.closeParenthesis=U.openParenthesis=U.semicolon=U.colon=U.comma=U.at=U.asterisk=U.ampersand=void 0;var O0=38;U.ampersand=O0;var R0=42;U.asterisk=R0;var A0=64;U.at=A0;var I0=44;U.comma=I0;var C0=58;U.colon=C0;var L0=59;U.semicolon=L0;var M0=40;U.openParenthesis=M0;var F0=41;U.closeParenthesis=F0;var N0=91;U.openSquare=N0;var D0=93;U.closeSquare=D0;var W0=36;U.dollar=W0;var $0=126;U.tilde=$0;var B0=94;U.caret=B0;var U0=43;U.plus=U0;var q0=61;U.equals=q0;var z0=124;U.pipe=z0;var G0=62;U.greaterThan=G0;var j0=32;U.space=j0;var xf=39;U.singleQuote=xf;var V0=34;U.doubleQuote=V0;var H0=47;U.slash=H0;var Y0=33;U.bang=Y0;var X0=92;U.backslash=X0;var K0=13;U.cr=K0;var Q0=12;U.feed=Q0;var J0=10;U.newline=J0;var Z0=9;U.tab=Z0;var eg=xf;U.str=eg;var tg=-1;U.comment=tg;var rg=-2;U.word=rg;var ng=-3;U.combinator=ng});var _f=z(On=>{"use strict";On.__esModule=!0;On.default=fg;On.FIELDS=void 0;var W=ig(Rs()),Cr,me;function Sf(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return Sf=function(){return e},e}function ig(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=Sf();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var og=(Cr={},Cr[W.tab]=!0,Cr[W.newline]=!0,Cr[W.cr]=!0,Cr[W.feed]=!0,Cr),sg=(me={},me[W.space]=!0,me[W.tab]=!0,me[W.newline]=!0,me[W.cr]=!0,me[W.feed]=!0,me[W.ampersand]=!0,me[W.asterisk]=!0,me[W.bang]=!0,me[W.comma]=!0,me[W.colon]=!0,me[W.semicolon]=!0,me[W.openParenthesis]=!0,me[W.closeParenthesis]=!0,me[W.openSquare]=!0,me[W.closeSquare]=!0,me[W.singleQuote]=!0,me[W.doubleQuote]=!0,me[W.plus]=!0,me[W.pipe]=!0,me[W.tilde]=!0,me[W.greaterThan]=!0,me[W.equals]=!0,me[W.dollar]=!0,me[W.caret]=!0,me[W.slash]=!0,me),As={},wf="0123456789abcdefABCDEF";for(Li=0;Li<wf.length;Li++)As[wf.charCodeAt(Li)]=!0;var Li;function ag(e,t){var n=t,r;do{if(r=e.charCodeAt(n),sg[r])return n-1;r===W.backslash?n=ug(e,n)+1:n++}while(n<e.length);return n-1}function ug(e,t){var n=t,r=e.charCodeAt(n+1);if(!og[r])if(As[r]){var i=0;do n++,i++,r=e.charCodeAt(n+1);while(As[r]&&i<6);i<6&&r===W.space&&n++}else n++;return n}var lg={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};On.FIELDS=lg;function fg(e){var t=[],n=e.css.valueOf(),r=n,i=r.length,o=-1,s=1,a=0,u=0,l,f,c,h,m,g,y,x,_,E,T,R,P;function S(A,C){if(e.safe)n+=C,_=n.length-1;else throw e.error("Unclosed "+A,s,a-o,a)}for(;a<i;){switch(l=n.charCodeAt(a),l===W.newline&&(o=a,s+=1),l){case W.space:case W.tab:case W.newline:case W.cr:case W.feed:_=a;do _+=1,l=n.charCodeAt(_),l===W.newline&&(o=_,s+=1);while(l===W.space||l===W.newline||l===W.tab||l===W.cr||l===W.feed);P=W.space,h=s,c=_-o-1,u=_;break;case W.plus:case W.greaterThan:case W.tilde:case W.pipe:_=a;do _+=1,l=n.charCodeAt(_);while(l===W.plus||l===W.greaterThan||l===W.tilde||l===W.pipe);P=W.combinator,h=s,c=a-o,u=_;break;case W.asterisk:case W.ampersand:case W.bang:case W.comma:case W.equals:case W.dollar:case W.caret:case W.openSquare:case W.closeSquare:case W.colon:case W.semicolon:case W.openParenthesis:case W.closeParenthesis:_=a,P=l,h=s,c=a-o,u=_+1;break;case W.singleQuote:case W.doubleQuote:R=l===W.singleQuote?"'":'"',_=a;do for(m=!1,_=n.indexOf(R,_+1),_===-1&&S("quote",R),g=_;n.charCodeAt(g-1)===W.backslash;)g-=1,m=!m;while(m);P=W.str,h=s,c=a-o,u=_+1;break;default:l===W.slash&&n.charCodeAt(a+1)===W.asterisk?(_=n.indexOf("*/",a+2)+1,_===0&&S("comment","*/"),f=n.slice(a,_+1),x=f.split(`
4
4
  `),y=x.length-1,y>0?(E=s+y,T=_-x[y].length):(E=s,T=o),P=W.comment,s=E,h=E,c=_-T):l===W.slash?(_=a,P=l,h=s,c=a-o,u=_+1):(_=ag(n,a),P=W.word,h=s,c=_-o),u=_+1;break}t.push([P,s,a-o,h,c,a,u]),T&&(o=T,T=null),a=u}return t}});var If=z((Rn,Af)=>{"use strict";Rn.__esModule=!0;Rn.default=void 0;var cg=mt(es()),Is=mt(rs()),dg=mt(os()),Ef=mt(as()),pg=mt(ls()),hg=mt(ds()),Cs=mt(hs()),mg=mt(gs()),Tf=Mi(Ss()),gg=mt(Es()),Ls=mt(ks()),bg=mt(Os()),yg=mt(vf()),F=Mi(_f()),B=Mi(Rs()),vg=Mi($e()),_e=fn(),pr,Ms;function Rf(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return Rf=function(){return e},e}function Mi(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=Rf();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function mt(e){return e&&e.__esModule?e:{default:e}}function kf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xg(e,t,n){return t&&kf(e.prototype,t),n&&kf(e,n),e}var Ds=(pr={},pr[B.space]=!0,pr[B.cr]=!0,pr[B.feed]=!0,pr[B.newline]=!0,pr[B.tab]=!0,pr),wg=Object.assign({},Ds,(Ms={},Ms[B.comment]=!0,Ms));function Pf(e){return{line:e[F.FIELDS.START_LINE],column:e[F.FIELDS.START_COL]}}function Of(e){return{line:e[F.FIELDS.END_LINE],column:e[F.FIELDS.END_COL]}}function hr(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function Lr(e){return hr(e[F.FIELDS.START_LINE],e[F.FIELDS.START_COL],e[F.FIELDS.END_LINE],e[F.FIELDS.END_COL])}function Fs(e,t){if(e)return hr(e[F.FIELDS.START_LINE],e[F.FIELDS.START_COL],t[F.FIELDS.END_LINE],t[F.FIELDS.END_COL])}function Mr(e,t){var n=e[t];if(typeof n=="string")return n.indexOf("\\")!==-1&&((0,_e.ensureObject)(e,"raws"),e[t]=(0,_e.unesc)(n),e.raws[t]===void 0&&(e.raws[t]=n)),e}function Ns(e,t){for(var n=-1,r=[];(n=e.indexOf(t,n+1))!==-1;)r.push(n);return r}function Sg(){var e=Array.prototype.concat.apply([],arguments);return e.filter(function(t,n){return n===e.indexOf(t)})}var _g=function(){function e(n,r){r===void 0&&(r={}),this.rule=n,this.options=Object.assign({lossy:!1,safe:!1},r),this.position=0,this.css=typeof this.rule=="string"?this.rule:this.rule.selector,this.tokens=(0,F.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var i=Fs(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new cg.default({source:i}),this.root.errorGenerator=this._errorGenerator();var o=new Is.default({source:{start:{line:1,column:1}}});this.root.append(o),this.current=o,this.loop()}var t=e.prototype;return t._errorGenerator=function(){var r=this;return function(i,o){return typeof r.rule=="string"?new Error(i):r.rule.error(i,o)}},t.attribute=function(){var r=[],i=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[F.FIELDS.TYPE]!==B.closeSquare;)r.push(this.currToken),this.position++;if(this.currToken[F.FIELDS.TYPE]!==B.closeSquare)return this.expected("closing square bracket",this.currToken[F.FIELDS.START_POS]);var o=r.length,s={source:hr(i[1],i[2],this.currToken[3],this.currToken[4]),sourceIndex:i[F.FIELDS.START_POS]};if(o===1&&!~[B.word].indexOf(r[0][F.FIELDS.TYPE]))return this.expected("attribute",r[0][F.FIELDS.START_POS]);for(var a=0,u="",l="",f=null,c=!1;a<o;){var h=r[a],m=this.content(h),g=r[a+1];switch(h[F.FIELDS.TYPE]){case B.space:if(c=!0,this.options.lossy)break;if(f){(0,_e.ensureObject)(s,"spaces",f);var y=s.spaces[f].after||"";s.spaces[f].after=y+m;var x=(0,_e.getProp)(s,"raws","spaces",f,"after")||null;x&&(s.raws.spaces[f].after=x+m)}else u=u+m,l=l+m;break;case B.asterisk:if(g[F.FIELDS.TYPE]===B.equals)s.operator=m,f="operator";else if((!s.namespace||f==="namespace"&&!c)&&g){u&&((0,_e.ensureObject)(s,"spaces","attribute"),s.spaces.attribute.before=u,u=""),l&&((0,_e.ensureObject)(s,"raws","spaces","attribute"),s.raws.spaces.attribute.before=u,l=""),s.namespace=(s.namespace||"")+m;var _=(0,_e.getProp)(s,"raws","namespace")||null;_&&(s.raws.namespace+=m),f="namespace"}c=!1;break;case B.dollar:if(f==="value"){var E=(0,_e.getProp)(s,"raws","value");s.value+="$",E&&(s.raws.value=E+"$");break}case B.caret:g[F.FIELDS.TYPE]===B.equals&&(s.operator=m,f="operator"),c=!1;break;case B.combinator:if(m==="~"&&g[F.FIELDS.TYPE]===B.equals&&(s.operator=m,f="operator"),m!=="|"){c=!1;break}g[F.FIELDS.TYPE]===B.equals?(s.operator=m,f="operator"):!s.namespace&&!s.attribute&&(s.namespace=!0),c=!1;break;case B.word:if(g&&this.content(g)==="|"&&r[a+2]&&r[a+2][F.FIELDS.TYPE]!==B.equals&&!s.operator&&!s.namespace)s.namespace=m,f="namespace";else if(!s.attribute||f==="attribute"&&!c){u&&((0,_e.ensureObject)(s,"spaces","attribute"),s.spaces.attribute.before=u,u=""),l&&((0,_e.ensureObject)(s,"raws","spaces","attribute"),s.raws.spaces.attribute.before=l,l=""),s.attribute=(s.attribute||"")+m;var T=(0,_e.getProp)(s,"raws","attribute")||null;T&&(s.raws.attribute+=m),f="attribute"}else if(!s.value&&s.value!==""||f==="value"&&!c){var R=(0,_e.unesc)(m),P=(0,_e.getProp)(s,"raws","value")||"",S=s.value||"";s.value=S+R,s.quoteMark=null,(R!==m||P)&&((0,_e.ensureObject)(s,"raws"),s.raws.value=(P||S)+m),f="value"}else{var A=m==="i"||m==="I";(s.value||s.value==="")&&(s.quoteMark||c)?(s.insensitive=A,(!A||m==="I")&&((0,_e.ensureObject)(s,"raws"),s.raws.insensitiveFlag=m),f="insensitive",u&&((0,_e.ensureObject)(s,"spaces","insensitive"),s.spaces.insensitive.before=u,u=""),l&&((0,_e.ensureObject)(s,"raws","spaces","insensitive"),s.raws.spaces.insensitive.before=l,l="")):(s.value||s.value==="")&&(f="value",s.value+=m,s.raws.value&&(s.raws.value+=m))}c=!1;break;case B.str:if(!s.attribute||!s.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:h[F.FIELDS.START_POS]});var C=(0,Tf.unescapeValue)(m),G=C.unescaped,V=C.quoteMark;s.value=G,s.quoteMark=V,f="value",(0,_e.ensureObject)(s,"raws"),s.raws.value=m,c=!1;break;case B.equals:if(!s.attribute)return this.expected("attribute",h[F.FIELDS.START_POS],m);if(s.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:h[F.FIELDS.START_POS]});s.operator=s.operator?s.operator+m:m,f="operator",c=!1;break;case B.comment:if(f)if(c||g&&g[F.FIELDS.TYPE]===B.space||f==="insensitive"){var ee=(0,_e.getProp)(s,"spaces",f,"after")||"",re=(0,_e.getProp)(s,"raws","spaces",f,"after")||ee;(0,_e.ensureObject)(s,"raws","spaces",f),s.raws.spaces[f].after=re+m}else{var pe=s[f]||"",ce=(0,_e.getProp)(s,"raws",f)||pe;(0,_e.ensureObject)(s,"raws"),s.raws[f]=ce+m}else l=l+m;break;default:return this.error('Unexpected "'+m+'" found.',{index:h[F.FIELDS.START_POS]})}a++}Mr(s,"attribute"),Mr(s,"namespace"),this.newNode(new Tf.default(s)),this.position++},t.parseWhitespaceEquivalentTokens=function(r){r<0&&(r=this.tokens.length);var i=this.position,o=[],s="",a=void 0;do if(Ds[this.currToken[F.FIELDS.TYPE]])this.options.lossy||(s+=this.content());else if(this.currToken[F.FIELDS.TYPE]===B.comment){var u={};s&&(u.before=s,s=""),a=new Ef.default({value:this.content(),source:Lr(this.currToken),sourceIndex:this.currToken[F.FIELDS.START_POS],spaces:u}),o.push(a)}while(++this.position<r);if(s){if(a)a.spaces.after=s;else if(!this.options.lossy){var l=this.tokens[i],f=this.tokens[this.position-1];o.push(new Cs.default({value:"",source:hr(l[F.FIELDS.START_LINE],l[F.FIELDS.START_COL],f[F.FIELDS.END_LINE],f[F.FIELDS.END_COL]),sourceIndex:l[F.FIELDS.START_POS],spaces:{before:s,after:""}}))}}return o},t.convertWhitespaceNodesToSpace=function(r,i){var o=this;i===void 0&&(i=!1);var s="",a="";r.forEach(function(l){var f=o.lossySpace(l.spaces.before,i),c=o.lossySpace(l.rawSpaceBefore,i);s+=f+o.lossySpace(l.spaces.after,i&&f.length===0),a+=f+l.value+o.lossySpace(l.rawSpaceAfter,i&&c.length===0)}),a===s&&(a=void 0);var u={space:s,rawSpace:a};return u},t.isNamedCombinator=function(r){return r===void 0&&(r=this.position),this.tokens[r+0]&&this.tokens[r+0][F.FIELDS.TYPE]===B.slash&&this.tokens[r+1]&&this.tokens[r+1][F.FIELDS.TYPE]===B.word&&this.tokens[r+2]&&this.tokens[r+2][F.FIELDS.TYPE]===B.slash},t.namedCombinator=function(){if(this.isNamedCombinator()){var r=this.content(this.tokens[this.position+1]),i=(0,_e.unesc)(r).toLowerCase(),o={};i!==r&&(o.value="/"+r+"/");var s=new Ls.default({value:"/"+i+"/",source:hr(this.currToken[F.FIELDS.START_LINE],this.currToken[F.FIELDS.START_COL],this.tokens[this.position+2][F.FIELDS.END_LINE],this.tokens[this.position+2][F.FIELDS.END_COL]),sourceIndex:this.currToken[F.FIELDS.START_POS],raws:o});return this.position=this.position+3,s}else this.unexpected()},t.combinator=function(){var r=this;if(this.content()==="|")return this.namespace();var i=this.locateNextMeaningfulToken(this.position);if(i<0||this.tokens[i][F.FIELDS.TYPE]===B.comma){var o=this.parseWhitespaceEquivalentTokens(i);if(o.length>0){var s=this.current.last;if(s){var a=this.convertWhitespaceNodesToSpace(o),u=a.space,l=a.rawSpace;l!==void 0&&(s.rawSpaceAfter+=l),s.spaces.after+=u}else o.forEach(function(P){return r.newNode(P)})}return}var f=this.currToken,c=void 0;i>this.position&&(c=this.parseWhitespaceEquivalentTokens(i));var h;if(this.isNamedCombinator()?h=this.namedCombinator():this.currToken[F.FIELDS.TYPE]===B.combinator?(h=new Ls.default({value:this.content(),source:Lr(this.currToken),sourceIndex:this.currToken[F.FIELDS.START_POS]}),this.position++):Ds[this.currToken[F.FIELDS.TYPE]]||c||this.unexpected(),h){if(c){var m=this.convertWhitespaceNodesToSpace(c),g=m.space,y=m.rawSpace;h.spaces.before=g,h.rawSpaceBefore=y}}else{var x=this.convertWhitespaceNodesToSpace(c,!0),_=x.space,E=x.rawSpace;E||(E=_);var T={},R={spaces:{}};_.endsWith(" ")&&E.endsWith(" ")?(T.before=_.slice(0,_.length-1),R.spaces.before=E.slice(0,E.length-1)):_.startsWith(" ")&&E.startsWith(" ")?(T.after=_.slice(1),R.spaces.after=E.slice(1)):R.value=E,h=new Ls.default({value:" ",source:Fs(f,this.tokens[this.position-1]),sourceIndex:f[F.FIELDS.START_POS],spaces:T,raws:R})}return this.currToken&&this.currToken[F.FIELDS.TYPE]===B.space&&(h.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(h)},t.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var r=new Is.default({source:{start:Pf(this.tokens[this.position+1])}});this.current.parent.append(r),this.current=r,this.position++},t.comment=function(){var r=this.currToken;this.newNode(new Ef.default({value:this.content(),source:Lr(r),sourceIndex:r[F.FIELDS.START_POS]})),this.position++},t.error=function(r,i){throw this.root.error(r,i)},t.missingBackslash=function(){return this.error("Expected a backslash preceding the semicolon.",{index:this.currToken[F.FIELDS.START_POS]})},t.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[F.FIELDS.START_POS])},t.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[F.FIELDS.START_POS])},t.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[F.FIELDS.START_POS])},t.namespace=function(){var r=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[F.FIELDS.TYPE]===B.word)return this.position++,this.word(r);if(this.nextToken[F.FIELDS.TYPE]===B.asterisk)return this.position++,this.universal(r)},t.nesting=function(){if(this.nextToken){var r=this.content(this.nextToken);if(r==="|"){this.position++;return}}var i=this.currToken;this.newNode(new bg.default({value:this.content(),source:Lr(i),sourceIndex:i[F.FIELDS.START_POS]})),this.position++},t.parentheses=function(){var r=this.current.last,i=1;if(this.position++,r&&r.type===vg.PSEUDO){var o=new Is.default({source:{start:Pf(this.tokens[this.position-1])}}),s=this.current;for(r.append(o),this.current=o;this.position<this.tokens.length&&i;)this.currToken[F.FIELDS.TYPE]===B.openParenthesis&&i++,this.currToken[F.FIELDS.TYPE]===B.closeParenthesis&&i--,i?this.parse():(this.current.source.end=Of(this.currToken),this.current.parent.source.end=Of(this.currToken),this.position++);this.current=s}else{for(var a=this.currToken,u="(",l;this.position<this.tokens.length&&i;)this.currToken[F.FIELDS.TYPE]===B.openParenthesis&&i++,this.currToken[F.FIELDS.TYPE]===B.closeParenthesis&&i--,l=this.currToken,u+=this.parseParenthesisToken(this.currToken),this.position++;r?r.appendToPropertyAndEscape("value",u,u):this.newNode(new Cs.default({value:u,source:hr(a[F.FIELDS.START_LINE],a[F.FIELDS.START_COL],l[F.FIELDS.END_LINE],l[F.FIELDS.END_COL]),sourceIndex:a[F.FIELDS.START_POS]}))}if(i)return this.expected("closing parenthesis",this.currToken[F.FIELDS.START_POS])},t.pseudo=function(){for(var r=this,i="",o=this.currToken;this.currToken&&this.currToken[F.FIELDS.TYPE]===B.colon;)i+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[F.FIELDS.TYPE]===B.word)this.splitWord(!1,function(s,a){i+=s,r.newNode(new mg.default({value:i,source:Fs(o,r.currToken),sourceIndex:o[F.FIELDS.START_POS]})),a>1&&r.nextToken&&r.nextToken[F.FIELDS.TYPE]===B.openParenthesis&&r.error("Misplaced parenthesis.",{index:r.nextToken[F.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[F.FIELDS.START_POS])},t.space=function(){var r=this.content();this.position===0||this.prevToken[F.FIELDS.TYPE]===B.comma||this.prevToken[F.FIELDS.TYPE]===B.openParenthesis||this.current.nodes.every(function(i){return i.type==="comment"})?(this.spaces=this.optionalSpace(r),this.position++):this.position===this.tokens.length-1||this.nextToken[F.FIELDS.TYPE]===B.comma||this.nextToken[F.FIELDS.TYPE]===B.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(r),this.position++):this.combinator()},t.string=function(){var r=this.currToken;this.newNode(new Cs.default({value:this.content(),source:Lr(r),sourceIndex:r[F.FIELDS.START_POS]})),this.position++},t.universal=function(r){var i=this.nextToken;if(i&&this.content(i)==="|")return this.position++,this.namespace();var o=this.currToken;this.newNode(new gg.default({value:this.content(),source:Lr(o),sourceIndex:o[F.FIELDS.START_POS]}),r),this.position++},t.splitWord=function(r,i){for(var o=this,s=this.nextToken,a=this.content();s&&~[B.dollar,B.caret,B.equals,B.word].indexOf(s[F.FIELDS.TYPE]);){this.position++;var u=this.content();if(a+=u,u.lastIndexOf("\\")===u.length-1){var l=this.nextToken;l&&l[F.FIELDS.TYPE]===B.space&&(a+=this.requiredSpace(this.content(l)),this.position++)}s=this.nextToken}var f=Ns(a,".").filter(function(g){var y=a[g-1]==="\\",x=/^\d+\.\d+%$/.test(a);return!y&&!x}),c=Ns(a,"#").filter(function(g){return a[g-1]!=="\\"}),h=Ns(a,"#{");h.length&&(c=c.filter(function(g){return!~h.indexOf(g)}));var m=(0,yg.default)(Sg([0].concat(f,c)));m.forEach(function(g,y){var x=m[y+1]||a.length,_=a.slice(g,x);if(y===0&&i)return i.call(o,_,m.length);var E,T=o.currToken,R=T[F.FIELDS.START_POS]+m[y],P=hr(T[1],T[2]+g,T[3],T[2]+(x-1));if(~f.indexOf(g)){var S={value:_.slice(1),source:P,sourceIndex:R};E=new dg.default(Mr(S,"value"))}else if(~c.indexOf(g)){var A={value:_.slice(1),source:P,sourceIndex:R};E=new pg.default(Mr(A,"value"))}else{var C={value:_,source:P,sourceIndex:R};Mr(C,"value"),E=new hg.default(C)}o.newNode(E,r),r=null}),this.position++},t.word=function(r){var i=this.nextToken;return i&&this.content(i)==="|"?(this.position++,this.namespace()):this.splitWord(r)},t.loop=function(){for(;this.position<this.tokens.length;)this.parse(!0);return this.current._inferEndPosition(),this.root},t.parse=function(r){switch(this.currToken[F.FIELDS.TYPE]){case B.space:this.space();break;case B.comment:this.comment();break;case B.openParenthesis:this.parentheses();break;case B.closeParenthesis:r&&this.missingParenthesis();break;case B.openSquare:this.attribute();break;case B.dollar:case B.caret:case B.equals:case B.word:this.word();break;case B.colon:this.pseudo();break;case B.comma:this.comma();break;case B.asterisk:this.universal();break;case B.ampersand:this.nesting();break;case B.slash:case B.combinator:this.combinator();break;case B.str:this.string();break;case B.closeSquare:this.missingSquareBracket();case B.semicolon:this.missingBackslash();default:this.unexpected()}},t.expected=function(r,i,o){if(Array.isArray(r)){var s=r.pop();r=r.join(", ")+" or "+s}var a=/^[aeiou]/.test(r[0])?"an":"a";return o?this.error("Expected "+a+" "+r+', found "'+o+'" instead.',{index:i}):this.error("Expected "+a+" "+r+".",{index:i})},t.requiredSpace=function(r){return this.options.lossy?" ":r},t.optionalSpace=function(r){return this.options.lossy?"":r},t.lossySpace=function(r,i){return this.options.lossy?i?" ":"":r},t.parseParenthesisToken=function(r){var i=this.content(r);return r[F.FIELDS.TYPE]===B.space?this.requiredSpace(i):i},t.newNode=function(r,i){return i&&(/^ +$/.test(i)&&(this.options.lossy||(this.spaces=(this.spaces||"")+i),i=!0),r.namespace=i,Mr(r,"namespace")),this.spaces&&(r.spaces.before=this.spaces,this.spaces=""),this.current.append(r)},t.content=function(r){return r===void 0&&(r=this.currToken),this.css.slice(r[F.FIELDS.START_POS],r[F.FIELDS.END_POS])},t.locateNextMeaningfulToken=function(r){r===void 0&&(r=this.position+1);for(var i=r;i<this.tokens.length;)if(wg[this.tokens[i][F.FIELDS.TYPE]]){i++;continue}else return i;return-1},xg(e,[{key:"currToken",get:function(){return this.tokens[this.position]}},{key:"nextToken",get:function(){return this.tokens[this.position+1]}},{key:"prevToken",get:function(){return this.tokens[this.position-1]}}]),e}();Rn.default=_g;Af.exports=Rn.default});var Lf=z((An,Cf)=>{"use strict";An.__esModule=!0;An.default=void 0;var Eg=Tg(If());function Tg(e){return e&&e.__esModule?e:{default:e}}var kg=function(){function e(n,r){this.func=n||function(){},this.funcRes=null,this.options=r}var t=e.prototype;return t._shouldUpdateSelector=function(r,i){i===void 0&&(i={});var o=Object.assign({},this.options,i);return o.updateSelector===!1?!1:typeof r!="string"},t._isLossy=function(r){r===void 0&&(r={});var i=Object.assign({},this.options,r);return i.lossless===!1},t._root=function(r,i){i===void 0&&(i={});var o=new Eg.default(r,this._parseOptions(i));return o.root},t._parseOptions=function(r){return{lossy:this._isLossy(r)}},t._run=function(r,i){var o=this;return i===void 0&&(i={}),new Promise(function(s,a){try{var u=o._root(r,i);Promise.resolve(o.func(u)).then(function(l){var f=void 0;return o._shouldUpdateSelector(r,i)&&(f=u.toString(),r.selector=f),{transform:l,root:u,string:f}}).then(s,a)}catch(l){a(l);return}})},t._runSync=function(r,i){i===void 0&&(i={});var o=this._root(r,i),s=this.func(o);if(s&&typeof s.then=="function")throw new Error("Selector processor returned a promise to a synchronous call.");var a=void 0;return i.updateSelector&&typeof r!="string"&&(a=o.toString(),r.selector=a),{transform:s,root:o,string:a}},t.ast=function(r,i){return this._run(r,i).then(function(o){return o.root})},t.astSync=function(r,i){return this._runSync(r,i).root},t.transform=function(r,i){return this._run(r,i).then(function(o){return o.transform})},t.transformSync=function(r,i){return this._runSync(r,i).transform},t.process=function(r,i){return this._run(r,i).then(function(o){return o.string||o.root.toString()})},t.processSync=function(r,i){var o=this._runSync(r,i);return o.string||o.root.toString()},e}();An.default=kg;Cf.exports=An.default});var Mf=z(ve=>{"use strict";ve.__esModule=!0;ve.universal=ve.tag=ve.string=ve.selector=ve.root=ve.pseudo=ve.nesting=ve.id=ve.comment=ve.combinator=ve.className=ve.attribute=void 0;var Pg=gt(Ss()),Og=gt(os()),Rg=gt(ks()),Ag=gt(as()),Ig=gt(ls()),Cg=gt(Os()),Lg=gt(gs()),Mg=gt(es()),Fg=gt(rs()),Ng=gt(hs()),Dg=gt(ds()),Wg=gt(Es());function gt(e){return e&&e.__esModule?e:{default:e}}var $g=function(t){return new Pg.default(t)};ve.attribute=$g;var Bg=function(t){return new Og.default(t)};ve.className=Bg;var Ug=function(t){return new Rg.default(t)};ve.combinator=Ug;var qg=function(t){return new Ag.default(t)};ve.comment=qg;var zg=function(t){return new Ig.default(t)};ve.id=zg;var Gg=function(t){return new Cg.default(t)};ve.nesting=Gg;var jg=function(t){return new Lg.default(t)};ve.pseudo=jg;var Vg=function(t){return new Mg.default(t)};ve.root=Vg;var Hg=function(t){return new Fg.default(t)};ve.selector=Hg;var Yg=function(t){return new Ng.default(t)};ve.string=Yg;var Xg=function(t){return new Dg.default(t)};ve.tag=Xg;var Kg=function(t){return new Wg.default(t)};ve.universal=Kg});var Wf=z(se=>{"use strict";se.__esModule=!0;se.isNode=Ws;se.isPseudoElement=Df;se.isPseudoClass=ab;se.isContainer=ub;se.isNamespace=lb;se.isUniversal=se.isTag=se.isString=se.isSelector=se.isRoot=se.isPseudo=se.isNesting=se.isIdentifier=se.isComment=se.isCombinator=se.isClassName=se.isAttribute=void 0;var Ee=$e(),Ze,Qg=(Ze={},Ze[Ee.ATTRIBUTE]=!0,Ze[Ee.CLASS]=!0,Ze[Ee.COMBINATOR]=!0,Ze[Ee.COMMENT]=!0,Ze[Ee.ID]=!0,Ze[Ee.NESTING]=!0,Ze[Ee.PSEUDO]=!0,Ze[Ee.ROOT]=!0,Ze[Ee.SELECTOR]=!0,Ze[Ee.STRING]=!0,Ze[Ee.TAG]=!0,Ze[Ee.UNIVERSAL]=!0,Ze);function Ws(e){return typeof e=="object"&&Qg[e.type]}function bt(e,t){return Ws(t)&&t.type===e}var Ff=bt.bind(null,Ee.ATTRIBUTE);se.isAttribute=Ff;var Jg=bt.bind(null,Ee.CLASS);se.isClassName=Jg;var Zg=bt.bind(null,Ee.COMBINATOR);se.isCombinator=Zg;var eb=bt.bind(null,Ee.COMMENT);se.isComment=eb;var tb=bt.bind(null,Ee.ID);se.isIdentifier=tb;var rb=bt.bind(null,Ee.NESTING);se.isNesting=rb;var $s=bt.bind(null,Ee.PSEUDO);se.isPseudo=$s;var nb=bt.bind(null,Ee.ROOT);se.isRoot=nb;var ib=bt.bind(null,Ee.SELECTOR);se.isSelector=ib;var ob=bt.bind(null,Ee.STRING);se.isString=ob;var Nf=bt.bind(null,Ee.TAG);se.isTag=Nf;var sb=bt.bind(null,Ee.UNIVERSAL);se.isUniversal=sb;function Df(e){return $s(e)&&e.value&&(e.value.startsWith("::")||e.value.toLowerCase()===":before"||e.value.toLowerCase()===":after"||e.value.toLowerCase()===":first-letter"||e.value.toLowerCase()===":first-line")}function ab(e){return $s(e)&&!Df(e)}function ub(e){return!!(Ws(e)&&e.walk)}function lb(e){return Ff(e)||Nf(e)}});var $f=z(Tt=>{"use strict";Tt.__esModule=!0;var Bs=$e();Object.keys(Bs).forEach(function(e){e==="default"||e==="__esModule"||e in Tt&&Tt[e]===Bs[e]||(Tt[e]=Bs[e])});var Us=Mf();Object.keys(Us).forEach(function(e){e==="default"||e==="__esModule"||e in Tt&&Tt[e]===Us[e]||(Tt[e]=Us[e])});var qs=Wf();Object.keys(qs).forEach(function(e){e==="default"||e==="__esModule"||e in Tt&&Tt[e]===qs[e]||(Tt[e]=qs[e])})});var qf=z((In,Uf)=>{"use strict";In.__esModule=!0;In.default=void 0;var fb=pb(Lf()),cb=db($f());function Bf(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return Bf=function(){return e},e}function db(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=Bf();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=r?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(n,i,o):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function pb(e){return e&&e.__esModule?e:{default:e}}var zs=function(t){return new fb.default(t)};Object.assign(zs,cb);delete zs.__esModule;var hb=zs;In.default=hb;Uf.exports=In.default});var zf=z(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Object.defineProperty(Gs,"default",{enumerable:!0,get:()=>mb});function mb(e){return e.replace(/\\,/g,"\\2c ")}});var jf=z((Dw,Gf)=>{"use strict";Gf.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Vs=z(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});function gb(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}gb(js,{parseColor:()=>Sb,formatColor:()=>_b});var Vf=bb(jf());function bb(e){return e&&e.__esModule?e:{default:e}}var yb=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,vb=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,rr=/(?:\d+|\d*\.\d+)%?/,Fi=/(?:\s*,\s*|\s+)/,Hf=/\s*[,/]\s*/,nr=/var\(--(?:[^ )]*?)\)/,xb=new RegExp(`^(rgb)a?\\(\\s*(${rr.source}|${nr.source})(?:${Fi.source}(${rr.source}|${nr.source}))?(?:${Fi.source}(${rr.source}|${nr.source}))?(?:${Hf.source}(${rr.source}|${nr.source}))?\\s*\\)$`),wb=new RegExp(`^(hsl)a?\\(\\s*((?:${rr.source})(?:deg|rad|grad|turn)?|${nr.source})(?:${Fi.source}(${rr.source}|${nr.source}))?(?:${Fi.source}(${rr.source}|${nr.source}))?(?:${Hf.source}(${rr.source}|${nr.source}))?\\s*\\)$`);function Sb(e,{loose:t=!1}={}){var n,r;if(typeof e!="string")return null;if(e=e.trim(),e==="transparent")return{mode:"rgb",color:["0","0","0"],alpha:"0"};if(e in Vf.default)return{mode:"rgb",color:Vf.default[e].map(u=>u.toString())};let i=e.replace(vb,(u,l,f,c,h)=>["#",l,l,f,f,c,c,h?h+h:""].join("")).match(yb);if(i!==null)return{mode:"rgb",color:[parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16)].map(u=>u.toString()),alpha:i[4]?(parseInt(i[4],16)/255).toString():void 0};var o;let s=(o=e.match(xb))!==null&&o!==void 0?o:e.match(wb);if(s===null)return null;let a=[s[2],s[3],s[4]].filter(Boolean).map(u=>u.toString());return!t&&a.length!==3||a.length<3&&!a.some(u=>/^var\(.*?\)$/.test(u))?null:{mode:s[1],color:a,alpha:(n=s[5])===null||n===void 0||(r=n.toString)===null||r===void 0?void 0:r.call(n)}}function _b({mode:e,color:t,alpha:n}){let r=n!==void 0;return`${e}(${t.join(" ")}${r?` / ${n}`:""})`}});var Ys=z(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});function Eb(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Eb(Hs,{withAlphaValue:()=>Tb,default:()=>kb});var Ni=Vs();function Tb(e,t,n){if(typeof e=="function")return e({opacityValue:t});let r=(0,Ni.parseColor)(e,{loose:!0});return r===null?n:(0,Ni.formatColor)({...r,alpha:t})}function kb({color:e,property:t,variable:n}){let r=[].concat(t);if(typeof e=="function")return{[n]:"1",...Object.fromEntries(r.map(o=>[o,e({opacityVariable:n,opacityValue:`var(${n})`})]))};let i=(0,Ni.parseColor)(e);return i===null?Object.fromEntries(r.map(o=>[o,e])):i.alpha!==void 0?Object.fromEntries(r.map(o=>[o,e])):{[n]:"1",...Object.fromEntries(r.map(o=>[o,(0,Ni.formatColor)({...i,alpha:`var(${n})`})]))}}});var Jf=z(Xs=>{"use strict";Object.defineProperty(Xs,"__esModule",{value:!0});function Pb(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Pb(Xs,{pattern:()=>Rb,withoutCapturing:()=>Xf,any:()=>Kf,optional:()=>Ab,zeroOrMore:()=>Ib,nestedBrackets:()=>Qf,escape:()=>mr});var Yf=/[\\^$.*+?()[\]{}|]/g,Ob=RegExp(Yf.source);function Cn(e){return e=Array.isArray(e)?e:[e],e=e.map(t=>t instanceof RegExp?t.source:t),e.join("")}function Rb(e){return new RegExp(Cn(e),"g")}function Xf(e){return new RegExp(`(?:${Cn(e)})`,"g")}function Kf(e){return`(?:${e.map(Cn).join("|")})`}function Ab(e){return`(?:${Cn(e)})?`}function Ib(e){return`(?:${Cn(e)})*`}function Qf(e,t,n=1){return Xf([mr(e),/[^\s]*/,n===1?`[^${mr(e)}${mr(t)}s]*`:Kf([`[^${mr(e)}${mr(t)}s]*`,Qf(e,t,n-1)]),/[^\s]*/,mr(t)])}function mr(e){return e&&Ob.test(e)?e.replace(Yf,"\\$&"):e||""}});var ec=z(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});Object.defineProperty(Ks,"splitAtTopLevelOnly",{enumerable:!0,get:()=>Mb});var Cb=Lb(Jf());function Zf(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Zf=function(r){return r?n:t})(e)}function Lb(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=Zf(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function*Mb(e,t){let n=new RegExp(`[(){}\\[\\]${Cb.escape(t)}]`,"g"),r=0,i=0,o=!1,s=0,a=0,u=t.length;for(let l of e.matchAll(n)){let f=l[0]===t[s],c=s===u-1,h=f&&c;l[0]==="("&&r++,l[0]===")"&&r--,l[0]==="["&&r++,l[0]==="]"&&r--,l[0]==="{"&&r++,l[0]==="}"&&r--,f&&r===0&&(a===0&&(a=l.index),s++),h&&r===0&&(o=!0,yield e.substring(i,a),i=a+u),s===u&&(s=0,a=0)}o?yield e.substring(i):yield e}});var rc=z(Qs=>{"use strict";Object.defineProperty(Qs,"__esModule",{value:!0});function Fb(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Fb(Qs,{parseBoxShadowValue:()=>$b,formatBoxShadowValue:()=>Bb});var Nb=ec(),Db=new Set(["inset","inherit","initial","revert","unset"]),Wb=/\ +(?![^(]*\))/g,tc=/^-?(\d+|\.\d+)(.*?)$/g;function $b(e){return Array.from((0,Nb.splitAtTopLevelOnly)(e,",")).map(n=>{let r=n.trim(),i={raw:r},o=r.split(Wb),s=new Set;for(let a of o)tc.lastIndex=0,!s.has("KEYWORD")&&Db.has(a)?(i.keyword=a,s.add("KEYWORD")):tc.test(a)?s.has("X")?s.has("Y")?s.has("BLUR")?s.has("SPREAD")||(i.spread=a,s.add("SPREAD")):(i.blur=a,s.add("BLUR")):(i.y=a,s.add("Y")):(i.x=a,s.add("X")):i.color?(i.unknown||(i.unknown=[]),i.unknown.push(a)):i.color=a;return i.valid=i.x!==void 0&&i.y!==void 0,i})}function Bb(e){return e.map(t=>t.valid?[t.keyword,t.x,t.y,t.blur,t.spread,t.color].filter(Boolean).join(" "):t.raw).join(", ")}});var lc=z(Zs=>{"use strict";Object.defineProperty(Zs,"__esModule",{value:!0});function Ub(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Ub(Zs,{normalize:()=>ir,url:()=>oc,number:()=>Gb,percentage:()=>sc,length:()=>ac,lineWidth:()=>Hb,shadow:()=>Yb,color:()=>Xb,image:()=>Kb,gradient:()=>uc,position:()=>Zb,familyName:()=>ey,genericName:()=>ry,absoluteSize:()=>iy,relativeSize:()=>sy});var qb=Vs(),zb=rc(),Js=["min","max","clamp","calc"],ic=/,(?![^(]*\))/g,Di=/_(?![^(]*\))/g;function ir(e,t=!0){return e.includes("url(")?e.split(/(url\(.*?\))/g).filter(Boolean).map(n=>/^url\(.*?\)$/.test(n)?n:ir(n,!1)).join(""):(e=e.replace(/([^\\])_+/g,(n,r)=>r+" ".repeat(n.length-1)).replace(/^_/g," ").replace(/\\_/g,"_"),t&&(e=e.trim()),e=e.replace(/(calc|min|max|clamp)\(.+\)/g,n=>n.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g,"$1 $2 ")),e)}function oc(e){return e.startsWith("url(")}function Gb(e){return!isNaN(Number(e))||Js.some(t=>new RegExp(`^${t}\\(.+?`).test(e))}function sc(e){return e.split(Di).every(t=>/%$/g.test(t)||Js.some(n=>new RegExp(`^${n}\\(.+?%`).test(t)))}var jb=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","vw","vh","vmin","vmax"],nc=`(?:${jb.join("|")})`;function ac(e){return e.split(Di).every(t=>t==="0"||new RegExp(`${nc}$`).test(t)||Js.some(n=>new RegExp(`^${n}\\(.+?${nc}`).test(t)))}var Vb=new Set(["thin","medium","thick"]);function Hb(e){return Vb.has(e)}function Yb(e){let t=(0,zb.parseBoxShadowValue)(ir(e));for(let n of t)if(!n.valid)return!1;return!0}function Xb(e){let t=0;return e.split(Di).every(r=>(r=ir(r),r.startsWith("var(")?!0:(0,qb.parseColor)(r,{loose:!0})!==null?(t++,!0):!1))?t>0:!1}function Kb(e){let t=0;return e.split(ic).every(r=>(r=ir(r),r.startsWith("var(")?!0:oc(r)||uc(r)||["element(","image(","cross-fade(","image-set("].some(i=>r.startsWith(i))?(t++,!0):!1))?t>0:!1}var Qb=new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","conic-gradient"]);function uc(e){e=ir(e);for(let t of Qb)if(e.startsWith(`${t}(`))return!0;return!1}var Jb=new Set(["center","top","right","bottom","left"]);function Zb(e){let t=0;return e.split(Di).every(r=>(r=ir(r),r.startsWith("var(")?!0:Jb.has(r)||ac(r)||sc(r)?(t++,!0):!1))?t>0:!1}function ey(e){let t=0;return e.split(ic).every(r=>(r=ir(r),r.startsWith("var(")?!0:r.includes(" ")&&!/(['"])([^"']+)\1/g.test(r)||/^\d/g.test(r)?!1:(t++,!0)))?t>0:!1}var ty=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function ry(e){return ty.has(e)}var ny=new Set(["xx-small","x-small","small","medium","large","x-large","x-large","xxx-large"]);function iy(e){return ny.has(e)}var oy=new Set(["larger","smaller"]);function sy(e){return oy.has(e)}});var bc=z(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});function ay(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}ay(ra,{updateAllClasses:()=>fy,asValue:()=>Mn,parseColorFormat:()=>ea,asColor:()=>hc,asLookupValue:()=>mc,coerceValue:()=>hy});var uy=ta(qf()),ly=ta(zf()),fc=Ys(),et=lc(),cc=ta(Bo());function ta(e){return e&&e.__esModule?e:{default:e}}function fy(e,t){return(0,uy.default)(i=>{i.walkClasses(o=>{let s=t(o.value);o.value=s,o.raws&&o.raws.value&&(o.raws.value=(0,ly.default)(o.raws.value))})}).processSync(e)}function pc(e,t){if(!Ln(e))return;let n=e.slice(1,-1);if(t(n))return(0,et.normalize)(n)}function cy(e,t={},n){let r=t[e];if(r!==void 0)return(0,cc.default)(r);if(Ln(e)){let i=pc(e,n);return i===void 0?void 0:(0,cc.default)(i)}}function Mn(e,t={},{validate:n=()=>!0}={}){var r;let i=(r=t.values)===null||r===void 0?void 0:r[e];return i!==void 0?i:t.supportsNegativeValues&&e.startsWith("-")?cy(e.slice(1),t.values,n):pc(e,n)}function Ln(e){return e.startsWith("[")&&e.endsWith("]")}function dy(e){let t=e.lastIndexOf("/");return t===-1||t===e.length-1?[e]:[e.slice(0,t),e.slice(t+1)]}function ea(e){if(typeof e=="string"&&e.includes("<alpha-value>")){let t=e;return({opacityValue:n=1})=>t.replace("<alpha-value>",n)}return e}function hc(e,t={},{tailwindConfig:n={}}={}){var r;if(((r=t.values)===null||r===void 0?void 0:r[e])!==void 0){var i;return ea((i=t.values)===null||i===void 0?void 0:i[e])}let[o,s]=dy(e);if(s!==void 0){var a,u,l,f;let c=(f=(a=t.values)===null||a===void 0?void 0:a[o])!==null&&f!==void 0?f:Ln(o)?o.slice(1,-1):void 0;return c===void 0?void 0:(c=ea(c),Ln(s)?(0,fc.withAlphaValue)(c,s.slice(1,-1)):((u=n.theme)===null||u===void 0||(l=u.opacity)===null||l===void 0?void 0:l[s])===void 0?void 0:(0,fc.withAlphaValue)(c,n.theme.opacity[s]))}return Mn(e,t,{validate:et.color})}function mc(e,t={}){var n;return(n=t.values)===null||n===void 0?void 0:n[e]}function yt(e){return(t,n)=>Mn(t,n,{validate:e})}var gc={any:Mn,color:hc,url:yt(et.url),image:yt(et.image),length:yt(et.length),percentage:yt(et.percentage),position:yt(et.position),lookup:mc,"generic-name":yt(et.genericName),"family-name":yt(et.familyName),number:yt(et.number),"line-width":yt(et.lineWidth),"absolute-size":yt(et.absoluteSize),"relative-size":yt(et.relativeSize),shadow:yt(et.shadow)},dc=Object.keys(gc);function py(e,t){let n=e.indexOf(t);return n===-1?[void 0,e]:[e.slice(0,n),e.slice(n+1)]}function hy(e,t,n,r){if(Ln(t)){let i=t.slice(1,-1),[o,s]=py(i,":");if(!/^[\w-_]+$/g.test(o))s=i;else if(o!==void 0&&!dc.includes(o))return[];if(s.length>0&&dc.includes(o))return[Mn(`[${s}]`,n),o]}for(let i of[].concat(e)){let o=gc[i](t,n,{tailwindConfig:r});if(o!==void 0)return[o,i]}return[]}});var yc=z(na=>{"use strict";Object.defineProperty(na,"__esModule",{value:!0});Object.defineProperty(na,"default",{enumerable:!0,get:()=>my});function my(e){return typeof e=="function"?e({}):e}});var _c=z(oa=>{"use strict";Object.defineProperty(oa,"__esModule",{value:!0});Object.defineProperty(oa,"default",{enumerable:!0,get:()=>Fy});var gy=gr(Bo()),by=gr(Tl()),yy=gr(kl()),vy=gr(zo()),xy=gr(Ol()),wc=Rl(),vc=Al(),wy=Cl(),Sy=gr(Ll()),_y=Ml(),Ey=bc(),Ty=Ys(),ky=gr(yc());function gr(e){return e&&e.__esModule?e:{default:e}}function Fr(e){return typeof e=="function"}function Fn(e){return typeof e=="object"&&e!==null}function Nn(e,...t){let n=t.pop();for(let r of t)for(let i in r){let o=n(e[i],r[i]);o===void 0?Fn(e[i])&&Fn(r[i])?e[i]=Nn(e[i],r[i],n):e[i]=r[i]:e[i]=o}return e}var ia={colors:xy.default,negative(e){return Object.keys(e).filter(t=>e[t]!=="0").reduce((t,n)=>{let r=(0,gy.default)(e[n]);return r!==void 0&&(t[`-${n}`]=r),t},{})},breakpoints(e){return Object.keys(e).filter(t=>typeof e[t]=="string").reduce((t,n)=>({...t,[`screen-${n}`]:e[n]}),{})}};function Py(e,...t){return Fr(e)?e(...t):e}function Oy(e){return e.reduce((t,{extend:n})=>Nn(t,n,(r,i)=>r===void 0?[i]:Array.isArray(r)?[i,...r]:[i,r]),{})}function Ry(e){return{...e.reduce((t,n)=>(0,wc.defaults)(t,n),{}),extend:Oy(e)}}function xc(e,t){if(Array.isArray(e)&&Fn(e[0]))return e.concat(t);if(Array.isArray(t)&&Fn(t[0])&&Fn(e))return[e,...t];if(Array.isArray(t))return t}function Ay({extend:e,...t}){return Nn(t,e,(n,r)=>!Fr(n)&&!r.some(Fr)?Nn({},n,...r,xc):(i,o)=>Nn({},...[n,...r].map(s=>Py(s,i,o)),xc))}function*Iy(e){let t=(0,vc.toPath)(e);if(t.length===0||(yield t,Array.isArray(e)))return;let n=/^(.*?)\s*\/\s*([^/]+)$/,r=e.match(n);if(r!==null){let[,i,o]=r,s=(0,vc.toPath)(i);s.alpha=o,yield s}}function Cy(e){let t=(n,r)=>{for(let i of Iy(n)){let o=0,s=e;for(;s!=null&&o<i.length;)s=s[i[o++]],s=Fr(s)&&(i.alpha===void 0||o<=i.length-1)?s(t,ia):s;if(s!==void 0){if(i.alpha!==void 0){let a=(0,Ey.parseColorFormat)(s);return(0,Ty.withAlphaValue)(a,i.alpha,(0,ky.default)(a))}return(0,Sy.default)(s)?(0,_y.cloneDeep)(s):s}}return r};return Object.assign(t,{theme:t,...ia}),Object.keys(e).reduce((n,r)=>(n[r]=Fr(e[r])?e[r](t,ia):e[r],n),{})}function Sc(e){let t=[];return e.forEach(n=>{t=[...t,n];var r;let i=(r=n==null?void 0:n.plugins)!==null&&r!==void 0?r:[];i.length!==0&&i.forEach(o=>{o.__isOptionsFunction&&(o=o());var s;t=[...t,...Sc([(s=o==null?void 0:o.config)!==null&&s!==void 0?s:{}])]})}),t}function Ly(e){return[...e].reduceRight((n,r)=>Fr(r)?r({corePlugins:n}):(0,yy.default)(r,n),by.default)}function My(e){return[...e].reduceRight((n,r)=>[...n,...r],[])}function Fy(e){let t=[...Sc(e),{prefix:"",important:!1,separator:":",variantOrder:vy.default.variantOrder}];var n,r;return(0,wy.normalizeConfig)((0,wc.defaults)({theme:Cy(Ay(Ry(t.map(i=>(n=i==null?void 0:i.theme)!==null&&n!==void 0?n:{})))),corePlugins:Ly(t.map(i=>i.corePlugins)),plugins:My(e.map(i=>(r=i==null?void 0:i.plugins)!==null&&r!==void 0?r:[]))},...t))}});var Ec={};jr(Ec,{default:()=>Ny});var Ny,Tc=ur(()=>{Ny={yellow:e=>e}});var Rc=z(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});function Dy(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Dy(sa,{flagEnabled:()=>By,issueFlagNotices:()=>Uy,default:()=>qy});var Wy=Oc((Tc(),Vr(Ec))),$y=Oc((Si(),Vr(wi)));function Oc(e){return e&&e.__esModule?e:{default:e}}var kc={optimizeUniversalDefaults:!1},Dn={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity"],experimental:["optimizeUniversalDefaults","matchVariant"]};function By(e,t){if(Dn.future.includes(t)){var n,r,i;return e.future==="all"||((i=(r=e==null||(n=e.future)===null||n===void 0?void 0:n[t])!==null&&r!==void 0?r:kc[t])!==null&&i!==void 0?i:!1)}if(Dn.experimental.includes(t)){var o,s,a;return e.experimental==="all"||((a=(s=e==null||(o=e.experimental)===null||o===void 0?void 0:o[t])!==null&&s!==void 0?s:kc[t])!==null&&a!==void 0?a:!1)}return!1}function Pc(e){if(e.experimental==="all")return Dn.experimental;var t;return Object.keys((t=e==null?void 0:e.experimental)!==null&&t!==void 0?t:{}).filter(n=>Dn.experimental.includes(n)&&e.experimental[n])}function Uy(e){if(process.env.JEST_WORKER_ID===void 0&&Pc(e).length>0){let t=Pc(e).map(n=>Wy.default.yellow(n)).join(", ");$y.default.warn("experimental-flags-enabled",[`You have enabled experimental features: ${t}`,"Experimental features in Tailwind CSS are not covered by semver, may introduce breaking changes, and can change at any time."])}}var qy=Dn});var Ic=z(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});Object.defineProperty(aa,"default",{enumerable:!0,get:()=>Ac});var zy=jy(zo()),Gy=Rc();function jy(e){return e&&e.__esModule?e:{default:e}}function Ac(e){var t;let n=((t=e==null?void 0:e.presets)!==null&&t!==void 0?t:[zy.default]).slice().reverse().flatMap(o=>Ac(typeof o=="function"?o():o)),r={respectDefaultRingColorOpacity:{theme:{ringColor:{DEFAULT:"#3b82f67f"}}}},i=Object.keys(r).filter(o=>(0,Gy.flagEnabled)(e,o)).map(o=>r[o]);return[e,...i,...n]}});var Lc=z(ua=>{"use strict";Object.defineProperty(ua,"__esModule",{value:!0});Object.defineProperty(ua,"default",{enumerable:!0,get:()=>Yy});var Vy=Cc(_c()),Hy=Cc(Ic());function Cc(e){return e&&e.__esModule?e:{default:e}}function Yy(...e){let[,...t]=(0,Hy.default)(e[0]);return(0,Vy.default)([...e,...t])}});var Fc=z((Kw,Mc)=>{var la=Lc();Mc.exports=(la.__esModule?la:{default:la}).default});var wv={};jr(wv,{default:()=>ud,init:()=>fu});module.exports=Vr(wv);var Vi=at(require("escape-html"),1),Ba=at(require("linebreak"),1);var Hr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),vd=Hr((e,t)=>{t.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),xd=Hr((e,t)=>{t.exports=["deg","grad","rad","turn"]}),wd=Hr((e,t)=>{t.exports=["dpi","dpcm","dppx"]}),Sd=Hr((e,t)=>{t.exports=["Hz","kHz"]}),_d=Hr((e,t)=>{t.exports=["s","ms"]}),Ed=vd(),Ma=xd(),Fa=wd(),Na=Sd(),Da=_d();function zi(e){if(/\.\D?$/.test(e))throw new Error("The dot should be followed by a number");if(/^[+-]{2}/.test(e))throw new Error("Only one leading +/- is allowed");if(Td(e)>1)throw new Error("Only one dot is allowed");if(/%$/.test(e)){this.type="percentage",this.value=qi(e),this.unit="%";return}var t=Pd(e);if(!t){this.type="number",this.value=qi(e);return}this.type=Rd(t),this.value=qi(e.substr(0,e.length-t.length)),this.unit=t}zi.prototype.valueOf=function(){return this.value};zi.prototype.toString=function(){return this.value+(this.unit||"")};function St(e){return new zi(e)}function Td(e){var t=e.match(/\./g);return t?t.length:0}function qi(e){var t=parseFloat(e);if(isNaN(t))throw new Error("Invalid number: "+e);return t}var kd=[].concat(Ma,Na,Ed,Fa,Da);function Pd(e){var t=e.match(/\D+$/),n=t&&t[0];if(n&&kd.indexOf(n)===-1)throw new Error("Invalid unit: "+n);return n}var Od=Object.assign(Yn(Ma,"angle"),Yn(Na,"frequency"),Yn(Fa,"resolution"),Yn(Da,"time"));function Yn(e,t){return Object.fromEntries(e.map(n=>[n,t]))}function Rd(e){return Od[e]||"length"}function _r(e){let t=typeof e;return!(t==="number"||t==="bigint"||t==="string"||t==="boolean")}function Ua(e){return/^class\s/.test(e.toString())}function Hi(e){return e&&e.$$typeof===Symbol.for("react.forward_ref")}function qa(e){return typeof e=="function"||Hi(e)}function za(e){return"dangerouslySetInnerHTML"in e}function Ga(e){let t=typeof e>"u"?[]:[].concat(e).flat(1/0),n=[];for(let r=0;r<t.length;r++){let i=t[r];typeof i>"u"||typeof i=="boolean"||i===null||(typeof i=="number"&&(i=String(i)),typeof i=="string"&&n.length&&typeof n[n.length-1]=="string"?n[n.length-1]+=i:n.push(i))}return n}function K(e,t,n,r,i=!1){if(typeof e=="number")return e;try{if(e=e.trim(),/[ /\(,]/.test(e))return;if(e===String(+e))return+e;let o=new St(e);if(o.type==="length")switch(o.unit){case"em":return o.value*t;case"rem":return o.value*16;case"vw":return~~(o.value*r._viewportWidth/100);case"vh":return~~(o.value*r._viewportHeight/100);default:return o.value}else{if(o.type==="angle")return lr(e);if(o.type==="percentage"&&i)return o.value/100*n}}catch{}}function lr(e){let t=new St(e);switch(t.unit){case"deg":return t.value;case"rad":return t.value*180/Math.PI;case"turn":return t.value*360;case"grad":return .9*t.value}}function Yr(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}function Xe(e,t,n,r){let i=t[e];if(typeof i>"u"){if(r&&typeof e<"u")throw new Error(`Invalid value for CSS property "${r}". Allowed values: ${Object.keys(t).map(o=>`"${o}"`).join(" | ")}. Received: "${e}".`);i=n}return i}var Gi,ji,ja=[32,160,4961,65792,65793,4153,4241,10].map(e=>String.fromCodePoint(e)),Sr=new Map,Ad=500;function Fe(e,t,n){let r=`${t}:${n||""}:${e}`;if(Sr.has(r))return Sr.get(r);if(!Gi||!ji){if(!(typeof Intl<"u"&&"Segmenter"in Intl))throw new Error("Intl.Segmenter does not exist, please use import a polyfill.");Gi=new Intl.Segmenter(n,{granularity:"word"}),ji=new Intl.Segmenter(n,{granularity:"grapheme"})}let i;if(t==="grapheme")i=[...ji.segment(e)].map(o=>o.segment);else{let o=[...Gi.segment(e)].map(u=>u.segment),s=[],a=0;for(;a<o.length;){let u=o[a];if(u=="\xA0"){let l=a===0?"":s.pop(),f=a===o.length-1?"":o[a+1];s.push(l+"\xA0"+f),a+=2}else s.push(u),a++}i=s}if(Sr.size>=Ad){let o=Sr.keys().next().value;Sr.delete(o)}return Sr.set(r,i),i}function I(e,t,n){$a(e,"element");let r="";for(let[i,o]of Object.entries(t))typeof o<"u"&&($a(i,"attribute"),r+=` ${i}="${Ld(o)}"`);return n?`<${e}${r}>${n}</${e}>`:`<${e}${r}/>`}var Va=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",Id=Va+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Cd=new RegExp("^["+Va+"]["+Id+"]*$","u"),Wa=new Set;function $a(e,t){if(!Wa.has(e)){if(!Cd.test(e))throw new Error(`Invalid XML ${t} name: ${JSON.stringify(e)}`);Wa.add(e)}}function Ld(e){return typeof e=="number"||typeof e=="bigint"||typeof e=="boolean"?""+e:(0,Vi.default)(String(e))}function Ha(e){return(0,Vi.default)(String(e))}function Ya(e=20){let t=new Map;function n(o){let s=t.get(o);if(s!==void 0)return t.delete(o),t.set(o,s),s}function r(o,s){if(t.has(o))t.delete(o);else if(t.size>=e){let a=t.keys().next().value;t.delete(a)}t.set(o,s)}function i(){t.clear()}return{set:r,get:n,clear:i}}function Er(e){return e?e.split(/[, ]/).filter(Boolean).map(Number):null}function Xn(e){return typeof e=="string"}function Xa(e){return typeof e=="number"}function Ka(e){return typeof e>"u"}function Gt(e,t){if(typeof e=="number")return e;if(e.endsWith("%")){let n=parseFloat(e.slice(0,-1));if(isNaN(n)){console.warn(`Invalid value "${e}"${typeof t=="string"?` for "${t}"`:""}. Expected a percentage value (e.g., "50%").`);return}return`${n}%`}console.warn(`Invalid value "${e}"${typeof t=="string"?` for "${t}"`:""}. Expected a number or a percentage value (e.g., "50%").`)}function Jt(e,t){if(typeof e=="number")return e;if(e==="auto")return"auto";if(e.endsWith("%")){let n=parseFloat(e.slice(0,-1));if(isNaN(n)){console.warn(`Invalid value "${e}"${typeof t=="string"?` for "${t}"`:""}. Expected a percentage value (e.g., "50%").`);return}return`${n}%`}console.warn(`Invalid value "${e}"${typeof t=="string"?` for "${t}"`:""}. Expected a number, "auto", or a percentage value (e.g., "50%").`)}function Qa(e,t){if(t==="break-all")return{words:Fe(e,"grapheme"),requiredBreaks:[]};if(t==="keep-all")return{words:Fe(e,"word"),requiredBreaks:[]};let n=new Ba.default(e),r=0,i=n.nextBreak(),o=[],s=[!1];for(;i;){let a=e.slice(r,i.position);o.push(a),i.required?s.push(!0):s.push(!1),r=i.position,i=n.nextBreak()}return{words:o,requiredBreaks:s}}var Ja=e=>e.replaceAll(/([A-Z])/g,(t,n)=>`-${n.toLowerCase()}`);function jt(e,t=","){let n=[],r=0,i=0;t=new RegExp(t);for(let o=0;o<e.length;o++)e[o]==="("?i++:e[o]===")"&&i--,i===0&&t.test(e[o])&&(n.push(e.slice(r,o).trim()),r=o+1);return n.push(e.slice(r).trim()),n}function fu(e){return Promise.resolve().then(()=>(no(),ro)).then(t=>t.init(e))}function Zt(){return Promise.resolve().then(()=>(no(),ro)).then(e=>e.getYoga())}var cu=Symbol.for("react.fragment");var Zn=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;var qd=new Set([301,302,303,307,308]);function io(e){let t=e.split(".").map(o=>Number.parseInt(o,10));if(t.length!==4||t.some(o=>!Number.isInteger(o)||o<0||o>255))return!0;let[n,r,i]=t;return n===0||n===10||n===100&&r>=64&&r<=127||n===127||n===169&&r===254||n===172&&r>=16&&r<=31||n===192&&r===0&&i===0||n===192&&r===168||n===198&&(r===18||r===19)||n>=224}function zd(e){let t=e,n=t.indexOf("%");n!==-1&&(t=t.slice(0,n));let r=t.split("::");if(r.length>2)return null;let i=s=>{if(s==="")return[];let a=[],u=s.split(":");for(let l=0;l<u.length;l++){let f=u[l];if(f.includes(".")){if(l!==u.length-1||!Zn.test(f))return null;let[c,h,m,g]=f.split(".").map(y=>Number.parseInt(y,10));if([c,h,m,g].some(y=>!Number.isInteger(y)||y<0||y>255))return null;a.push(c<<8|h,m<<8|g);continue}if(!/^[0-9a-f]{1,4}$/.test(f))return null;a.push(Number.parseInt(f,16))}return a},o=i(r[0]);if(o===null)return null;if(r.length===2){let s=i(r[1]);if(s===null)return null;let a=8-o.length-s.length;return a<0?null:[...o,...new Array(a).fill(0),...s]}return o.length===8?o:null}function Gd(e){let t=a=>e.slice(0,a).every(u=>u===0);if(!(t(6)||t(5)&&e[5]===65535||t(4)&&e[4]===65535&&e[5]===0||e[0]===100&&e[1]===65435&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===0||e[0]===100&&e[1]===65435&&e[2]===1))return null;let r=e[6]>>8&255,i=e[6]&255,o=e[7]>>8&255,s=e[7]&255;return`${r}.${i}.${o}.${s}`}function pu(e){let t=zd(e);if(t===null)return!0;let n=Gd(t);return n?io(n):!!(t.every(r=>r===0)||t.slice(0,7).every(r=>r===0)&&t[7]===1||(t[0]&65024)===64512||(t[0]&65472)===65152||(t[0]&65472)===65216||(t[0]&65280)===65280||t[0]===8193&&t[1]===3512)}function jd(e){let t=e.toLowerCase().replace(/^\[|\]$/g,"");return Zn.test(t)?io(t):t.includes(":")?pu(t):!0}function hu(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!=="http:"&&t.protocol!=="https:")return null;let n=t.hostname.toLowerCase().replace(/\.+$/,"");return n.startsWith("[")&&n.endsWith("]")&&(n=n.slice(1,-1)),n?{url:t,host:n}:null}function Vd(e){let t=hu(e);if(!t)return!0;let{host:n}=t;return n==="localhost"||n.endsWith(".localhost")||n==="local"||n.endsWith(".local")||n==="internal"||n.endsWith(".internal")?!0:Zn.test(n)?io(n):n.includes(":")?pu(n):!1}function Jn(e){return new Error(`Image source resolves to a blocked address (SSRF protection): ${e}`)}function Hd(e){if(Vd(e))throw Jn(e)}var Or;async function Yd(){if(Or!==void 0)return Or;if(typeof window<"u")return Or=null,null;try{let t=await new Function("s","return import(s)")("node:dns/promises");return Or=(n,r)=>t.lookup(n,r),Or}catch{return Or=null,null}}async function Xd(e,t){Hd(e);let n=hu(e);if(!n)throw Jn(e);let{host:r}=n;if(Zn.test(r)||r.includes(":"))return;let i=t&&"lookup"in t?t.lookup:await Yd();if(!i)return;let o;try{o=await i(r,{all:!0})}catch{throw new Error(`Can't resolve image host: ${e}`)}if(o.length===0)throw new Error(`Can't resolve image host: ${e}`);for(let{address:s}of o)if(jd(s))throw Jn(e)}async function du(e){try{e.body&&typeof e.body.cancel=="function"?await e.body.cancel():typeof e.arrayBuffer=="function"&&await e.arrayBuffer()}catch{}}async function mu(e,t){let n=(t==null?void 0:t.fetch)??globalThis.fetch,r=e;for(let i=0;i<=10;i++){await Xd(r,t);let o=await n(r,{redirect:"manual"});if(o.type==="opaqueredirect")throw await du(o),Jn(r);let s=o.headers.get("location");if(qd.has(o.status)&&s){await du(o),r=new URL(s,r).href;continue}return o}throw new Error(`Image source redirected too many times (SSRF protection): ${e}`)}var Kd="image/avif",ei="image/webp",ti="image/apng",ri="image/png",ni="image/jpeg",ii="image/gif",oo="image/svg+xml";function yu(e){let t=new DataView(e),n=4,r=t.byteLength;for(;n<r;){let i=t.getUint16(n,!1);if(i>r)throw new TypeError("Invalid JPEG");let o=t.getUint8(i+1+n);if(o===192||o===193||o===194)return[t.getUint16(i+7+n,!1),t.getUint16(i+5+n,!1)];n+=i+2}throw new TypeError("Invalid JPEG")}function vu(e){let t=new DataView(e),n=new Uint8Array(e);if(t.byteLength<20||t.getUint32(0)!==1380533830||t.getUint32(8)!==1464156752)throw new TypeError("Invalid WebP");let r=t.getUint32(4,!0)+8;if(r<20||r>t.byteLength)throw new TypeError("Invalid WebP");let i=12;for(;i+8<=r;){let o=t.getUint32(i),s=t.getUint32(i+4,!0),a=i+8,u=a+s;if(u>r)throw new TypeError("Invalid WebP");if(o===1448097824){if(s<10||n[a+3]!==157||n[a+4]!==1||n[a+5]!==42)throw new TypeError("Invalid WebP");let l=t.getUint16(a+6,!0)&16383,f=t.getUint16(a+8,!0)&16383;if(!l||!f)throw new TypeError("Invalid WebP");return[l,f]}if(o===1448097868){if(s<5||n[a]!==47)throw new TypeError("Invalid WebP");let l=t.getUint32(a+1,!0);return[(l&16383)+1,(l>>>14&16383)+1]}if(o===1448097880){if(s<10)throw new TypeError("Invalid WebP");return[n[a+4]+(n[a+5]<<8)+(n[a+6]<<16)+1,n[a+7]+(n[a+8]<<8)+(n[a+9]<<16)+1]}i=u+s%2}throw new TypeError("Invalid WebP")}function xu(e){let t=new Uint8Array(e.slice(6,10));return[t[0]|t[1]<<8,t[2]|t[3]<<8]}function wu(e){let t=new DataView(e);return[t.getUint16(18,!1),t.getUint16(22,!1)]}var Ct=Ya(500),Kr=new Map,Qd=[ri,ti,ni,ii,oo,ei],Jd=/<svg[^>]*>/i,Zd=/viewBox=['"]([^'"]+)['"]/,ep=/width=['"](\d*\.?\d+)['"]/,tp=/height=['"](\d*\.?\d+)['"]/;function rp(e){let t=new Uint8Array(e),n=32768,r="";for(let i=0;i<t.length;i+=n){let o=t.subarray(i,Math.min(i+n,t.length));r+=String.fromCharCode(...o)}return btoa(r)}function np(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let i=0;i<n;i++)r[i]=t.charCodeAt(i);return r.buffer}function gu(e,t){let n=t.match(Jd);if(!n)throw new Error(`Failed to parse SVG from ${e}`);let r=n[0],i=Zd.exec(r),o=ep.exec(r),s=tp.exec(r),a=i?Er(i[1]):null;if(!a&&(!o||!s))throw new Error(`Failed to parse SVG from ${e}: missing "viewBox"`);let u=a?[a[2],a[3]]:[+o[1],+s[1]],l=u[0]/u[1];return o&&s?[+o[1],+s[1]]:o?[+o[1],+o[1]/l]:s?[+s[1]*l,+s[1]]:[u[0],u[1]]}function bu(e){let t,n=ip(new Uint8Array(e));switch(n){case ri:case ti:t=wu(e);break;case ii:t=xu(e);break;case ni:t=yu(e);break;case ei:t=vu(e);break}if(!Qd.includes(n))throw new Error(`Unsupported image type: ${n||"unknown"}`);return[`data:${n};base64,${rp(e)}`,t]}async function Rr(e){if(!e)throw new Error("Image source is not provided.");if(typeof e=="object"){let[o,s]=bu(e);return[o,...s]}if((e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),typeof window>"u"&&!e.startsWith("http")&&!e.startsWith("data:"))throw new Error(`Image source must be an absolute URL: ${e}`);if(e.startsWith("data:")){let o;try{o=/data:(?<imageType>[a-z/+]+)(;[^;=]+=[^;=]+)*?(;(?<encodingType>[^;,]+))?,(?<dataString>.*)/g.exec(e).groups}catch{return console.warn("Image data URI resolved without size:"+e),[e]}let{imageType:s,encodingType:a,dataString:u}=o;if(s===oo){let l=a==="base64"?atob(u):decodeURIComponent(u.replace(/ /g,"%20")),f=a==="base64"?e:`data:image/svg+xml;base64,${btoa(l)}`,c=gu(e,l);return Ct.set(e,[f,...c]),[f,...c]}else if(a==="base64"){let l,f=np(u);switch(s){case ri:case ti:l=wu(f);break;case ii:l=xu(f);break;case ni:l=yu(f);break;case ei:l=vu(f);break}return Ct.set(e,[e,...l]),[e,...l]}else return console.warn("Image data URI resolved without size:"+e),Ct.set(e,[e]),[e]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(Kr.has(e))return Kr.get(e);let t=Ct.get(e);if(t)return t;let n=e,i=(typeof window>"u"?()=>mu(n):()=>fetch(n))().then(o=>{let s=o.headers.get("content-type");return s==="image/svg+xml"||s==="application/svg+xml"?o.text():o.arrayBuffer()}).then(o=>{if(typeof o=="string")try{let u=`data:image/svg+xml;base64,${btoa(o)}`,l=gu(n,o);return[u,...l]}catch(u){throw new Error(`Failed to parse SVG image: ${u.message}`)}let[s,a]=bu(o);return[s,...a]}).then(o=>(Ct.set(n,o),o)).catch(o=>{if(o instanceof Error&&o.message.includes("SSRF protection"))throw o;return console.error(`Can't load image ${n}: `+o.message),Ct.set(n,[]),[]});return Kr.set(n,i),i}function ip(e){return[255,216,255].every((t,n)=>e[n]===t)?ni:[137,80,78,71,13,10,26,10].every((t,n)=>e[n]===t)?op(e)?ti:ri:[71,73,70,56].every((t,n)=>e[n]===t)?ii:[82,73,70,70,0,0,0,0,87,69,66,80].every((t,n)=>!t||e[n]===t)?ei:[60,63,120,109,108].every((t,n)=>e[n]===t)?oo:[0,0,0,0,102,116,121,112,97,118,105,102].every((t,n)=>!t||e[n]===t)?Kd:null}function op(e){let t=new DataView(e.buffer),n,r,i=8,o=!1;for(;!o&&n!=="IEND"&&i<e.length;){r=t.getUint32(i);let s=e.subarray(i+4,i+8);n=String.fromCharCode(...s),o=n==="acTL",i+=12+r}return o}var Su={accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",href:"href",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space",xmlnsXlink:"xmlns:xlink"},sp=/[\r\n%#()<>?[\\\]^`{|}"'&]/g;function oi(e,t){if(!e)return"";if(Array.isArray(e))return e.map(u=>oi(u,t)).join("");if(typeof e!="object")return Ha(e);let n=e.type;if(n==="text")throw new Error("<text> nodes are not currently supported, please convert them to <path>");let{children:r,style:i,...o}=e.props||{},s=(i==null?void 0:i.color)||t;if(n===cu)return oi(r,s);if(typeof n!="string")throw new Error("Only intrinsic elements are supported inside <svg>");let a={};for(let[u,l]of Object.entries(o)){let f=l;typeof f=="string"&&f.toLowerCase()==="currentcolor"&&(f=s),(u==="href"||u==="xlinkHref")&&n==="image"&&(f=Ct.get(f)[0]);let c=Su[u]||u;a[c]=f}return i&&(a.style=Object.entries(i).map(([u,l])=>`${Ja(u)}:${l}`).join(";")),I(n,a,oi(r,s))}async function _u(e){let t=new Set,n=r=>{if(r&&_r(r)){if(Array.isArray(r)){r.forEach(i=>n(i));return}else if(typeof r=="object")if(r.type==="image"){let i=r.props.href||r.props.xlinkHref;i&&(t.has(i)||t.add(i))}else r.type==="img"&&(t.has(r.props.src)||t.add(r.props.src));Array.isArray(r.props.children)?r.props.children.map(i=>n(i)):n(r.props.children)}};return n(e),Promise.all(Array.from(t).map(r=>Rr(r)))}async function Eu(e,t){let{viewBox:n,viewbox:r,width:i,height:o,className:s,style:a,children:u,...l}=e.props||{};n||=r,l.xmlns="http://www.w3.org/2000/svg";let f=(a==null?void 0:a.color)||t,c=Er(n),h=c?c[3]/c[2]:null;i=i||h&&o?o/h:null,o=o||h&&i?i*h:null,l.width=i,l.height=o,n&&(l.viewBox=n);let m={};for(let[y,x]of Object.entries(l)){let _=Su[y]||y;m[_]=typeof x=="string"&&x.toLowerCase()==="currentcolor"?f:x}return`data:image/svg+xml;utf8,${I("svg",m,oi(u,f)).replace(sp,encodeURIComponent)}`}var pt="flex",Tu={p:{display:pt,marginTop:"1em",marginBottom:"1em"},div:{display:pt},blockquote:{display:pt,marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:pt,textAlign:"center"},hr:{display:pt,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"solid"},h1:{display:pt,fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:pt,fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:pt,fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:pt,marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:pt,fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:pt,fontSize:"0.67em",marginTop:"2.33em",marginBottom:"2.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},u:{textDecoration:"underline"},strong:{fontWeight:"bold"},b:{fontWeight:"bold"},i:{fontStyle:"italic"},em:{fontStyle:"italic"},code:{fontFamily:"monospace"},kbd:{fontFamily:"monospace"},pre:{display:pt,fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};var ap=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","fontFeatureSettings","letterSpacing","lineHeight","textAlign","textIndent","textTransform","textShadowOffset","textShadowColor","textShadowRadius","WebkitTextStrokeWidth","WebkitTextStrokeColor","textDecorationLine","textDecorationStyle","textDecorationColor","textDecorationSkipInk","whiteSpace","transform","wordBreak","tabSize","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedMaskId","_inheritedBackgroundClipTextPath","_inheritedBackgroundClipTextHasBackground"]);function so(e){let t={};for(let n in e)(ap.has(n)||n.startsWith("--"))&&(t[n]=e[n]);return t}var Et=require("css-to-react-native"),Du=require("css-background-parser"),Wu=require("css-box-shadow"),$u=at(require("parse-css-color"),1);var ku=at(require("postcss-value-parser"),1);function up(e,t){try{let n=new St(e);switch(n.unit){case"px":return{absolute:n.value};case"em":return{absolute:n.value*t};case"rem":return{absolute:n.value*16};case"%":return{relative:n.value};default:return{}}}catch{return{}}}function ao(e,t,n){switch(e){case"top":return{yRelative:0};case"left":return{xRelative:0};case"right":return{xRelative:100};case"bottom":return{yRelative:100};case"center":return{};default:{let r=up(e,t);return r.absolute?{[n?"xAbsolute":"yAbsolute"]:r.absolute}:r.relative?{[n?"xRelative":"yRelative"]:r.relative}:{}}}}function uo(e,t){if(typeof e=="number")return{xAbsolute:e};let n;try{n=(0,ku.default)(e).nodes.filter(r=>r.type==="word").map(r=>r.value)}catch{return{}}return n.length===1?ao(n[0],t,!0):n.length===2?((n[0]==="top"||n[0]==="bottom"||n[1]==="left"||n[1]==="right")&&n.reverse(),{...ao(n[0],t,!0),...ao(n[1],t,!1)}):{}}var Pu=require("css-to-react-native");function Qr(e,t){let n=(0,Pu.getPropertyName)(`mask-${t}`);return e[n]||e[`WebkitM${n.substring(1)}`]}function Ou(e){let t=e.maskImage||e.WebkitMaskImage,n={position:Qr(e,"position")||"0% 0%",size:Qr(e,"size")||"100% 100%",repeat:Qr(e,"repeat")||"repeat",origin:Qr(e,"origin")||"border-box",clip:Qr(e,"origin")||"border-box"};return jt(t).filter(i=>i&&i!=="none").reverse().map(i=>({image:i,...n}))}var lp={round:1,squircle:2,square:1/0,bevel:0,scoop:-1,notch:-1/0};function lo(e){let t=e.trim().toLowerCase(),n=lp[t];if(typeof n<"u")return n;let r=t.match(/^superellipse\(\s*(-?infinity|[-+]?(?:\d*\.)?\d+(?:e[-+]?\d+)?)\s*\)$/);if(!r)throw new Error('Invalid corner shape value: "'+e+'".');if(r[1]==="infinity")return 1/0;if(r[1]==="-infinity")return-1/0;let i=Number(r[1]);if(!Number.isFinite(i))throw new Error('Invalid corner shape value: "'+e+'".');return i}function si(e,t=4){let n=e.match(/superellipse\([^)]*\)|[^\s]+/gi)||[];if(n.length<1||n.length>t)throw new Error('Invalid corner shape value: "'+e+'".');for(let r of n)lo(r);return n}var Au=at(require("parse-css-color"),1);var Ru={brightness:1,contrast:1,grayscale:1,invert:1,opacity:1,saturate:1,sepia:1};function Iu(e,t,n="black"){if(e==="none")return[];if(typeof e!="string")throw new Error('Invalid `backdropFilter` value: "'+e+'".');let r=jt(e,/\s/).filter(Boolean);if(!r.length)throw new Error('Invalid `backdropFilter` value: "'+e+'".');return r.map(i=>{let o=i.match(/^([a-z-]+)\((.*)\)$/i);if(!o)throw new Error("Invalid filter function in `backdropFilter`.");let s=o[1].toLowerCase(),a=o[2].trim();if(s==="blur"){let u=a?ai(a,t,"blur()"):0;if(u<0)throw new Error("Invalid `blur()` radius in `backdropFilter`.");return{type:"blur",value:u}}if(s==="hue-rotate"){let u=a==="0"||!a?0:lr(a);if(typeof u>"u")throw new Error("Invalid `hue-rotate()` angle in `backdropFilter`.");return{type:"hue-rotate",value:u}}if(s==="drop-shadow")return fp(a,t,n);if(s in Ru){let u=s,l=a?cp(a,`${u}()`):Ru[u],f=["grayscale","invert","opacity","sepia"].includes(u)?Math.min(l,1):l;return{type:u,value:f}}throw new Error(`Unsupported \`${s}()\` in \`backdropFilter\`.`)})}function fp(e,t,n){let r=jt(e,/\s/).filter(Boolean),i=n,o=[];for(let l of r)(0,Au.default)(l)?i=l:o.push(l);if(o.length<2||o.length>3)throw new Error("Invalid `drop-shadow()` value in `backdropFilter`.");let s=ai(o[0],t,"drop-shadow()"),a=ai(o[1],t,"drop-shadow()"),u=o[2]?ai(o[2],t,"drop-shadow()"):0;if(u<0)throw new Error("Invalid `drop-shadow()` blur radius in `backdropFilter`.");return{type:"drop-shadow",offsetX:s,offsetY:a,blurRadius:u,color:i}}function ai(e,t,n){let r=K(e,t.fontSize,0,t);if(typeof r>"u")throw new Error(`Invalid length \`${e}\` in \`${n}\` for \`backdropFilter\`.`);return r}function cp(e,t){let n=e.match(/^([+-]?(?:\d+\.?\d*|\.\d+))%$/),r=n?Number(n[1])/100:Number(e);if(!Number.isFinite(r)||r<0)throw new Error(`Invalid amount \`${e}\` in \`${t}\` for \`backdropFilter\`.`);return r}var fo=at(require("postcss-value-parser"),1);function Cu(e){let t={},n={};for(let r in e)r.startsWith("--")?t[r]=String(e[r]):n[r]=e[r];return{variables:t,remainingStyle:n}}function Lu(e,t){return{...e,...t}}function Zr(e,t,n=new Set){if(typeof e!="string"||!e.includes("var("))return e;try{let r=(0,fo.default)(e),i=!1;if(r.walk(o=>{if(o.type==="function"&&o.value==="var"){i=!0;let s=dp(o);if(!s)return;let{varName:a,fallback:u}=s;if(n.has(a)){console.warn(`Circular reference detected for CSS variable: ${a}`),u!==void 0?Jr(o,u):Jr(o,"initial");return}let l=t[a];if(l!==void 0){let f=new Set(n);f.add(a);let c=Zr(l,t,f);Jr(o,String(c))}else if(u!==void 0){let f=Zr(u,t,n);Jr(o,String(f))}else Jr(o,"initial")}}),i)return r.toString()}catch{console.warn(`Failed to parse CSS value for variable resolution: ${e}`)}return e}function dp(e){if(!e.nodes||e.nodes.length===0)return null;let t,n=-1;for(let i=0;i<e.nodes.length;i++){let o=e.nodes[i];if(o.type==="word"&&!t)t=o;else if(o.type==="div"&&o.value===","){n=i;break}}if(!t||t.type!=="word")return null;let r=t.value.trim();if(n!==-1&&n<e.nodes.length-1){let i=e.nodes.slice(n+1),o=fo.default.stringify(i).trim();return{varName:r,fallback:o}}return{varName:r}}function Jr(e,t){e.type="word",e.value=t,delete e.nodes}var pp=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),hp=new Set(["lineHeight"]);function mp(e,t,n,r){return e==="textDecoration"&&!n.includes(t.textDecorationColor)&&(t.textDecorationColor=r),t}function fr(e,t){let n=Number(t);return isNaN(n)?t:pp.has(e)?hp.has(e)?n:String(t):n+"px"}function gp(e,t,n,r){if(e==="zIndex")return console.warn("`z-index` is currently not supported."),{[e]:t};if(e==="lineHeight")return{lineHeight:fr(e,t)};if(e==="fontFamily")return{fontFamily:t.split(",").map(o=>o.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())};if(e==="borderRadius"){if(typeof t!="string"||!t.includes("/"))return;let[o,s]=t.split("/"),a=(0,Et.getStylesForProperty)(e,o,!0),u=(0,Et.getStylesForProperty)(e,s,!0);for(let l in a)u[l]=fr(e,a[l])+" "+fr(e,u[l]);return u}if(e==="cornerShape"){if(typeof t!="string")throw new Error('Invalid `cornerShape` value: "'+t+'".');let o=si(t),s=o[0],a=o[1]||s,u=o[2]||s,l=o[3]||a;return{cornerTopLeftShape:s,cornerTopRightShape:a,cornerBottomRightShape:u,cornerBottomLeftShape:l}}if(/^corner(TopLeft|TopRight|BottomRight|BottomLeft)Shape$/.test(e)){if(typeof t!="string"||si(t,1).length!==1)throw new Error("Invalid `"+e+'` value: "'+t+'".');return{[e]:t}}let i=e.match(/^corner(Top|Right|Bottom|Left)Shape$/);if(i){if(typeof t!="string")throw new Error("Invalid `"+e+'` value: "'+t+'".');let o=si(t,2),s=o[0],a=o[1]||s,u={Top:["cornerTopLeftShape","cornerTopRightShape"],Right:["cornerTopRightShape","cornerBottomRightShape"],Bottom:["cornerBottomLeftShape","cornerBottomRightShape"],Left:["cornerTopLeftShape","cornerBottomLeftShape"]}[i[1]];return{[u[0]]:s,[u[1]]:a}}if(/^border(Top|Right|Bottom|Left)?$/.test(e)){let o=(0,Et.getStylesForProperty)("border",t,!0);o.borderWidth===1&&!String(t).includes("1px")&&(o.borderWidth=3),o.borderColor==="black"&&!String(t).includes("black")&&(o.borderColor=n);let s={Width:fr(e+"Width",o.borderWidth),Style:Xe(o.borderStyle,{solid:"solid",dashed:"dashed"},"solid",e+"Style"),Color:o.borderColor},a={};for(let u of e==="border"?["Top","Right","Bottom","Left"]:[e.slice(6)])for(let l in s)a["border"+u+l]=s[l];return a}if(e==="boxShadow"){if(!t)throw new Error('Invalid `boxShadow` value: "'+t+'".');return{[e]:typeof t=="string"?(0,Wu.parse)(t):t}}if(e==="backdropFilter"||e==="WebkitBackdropFilter")return{_backdropFilters:Iu(t,r,n)};if(e==="transform"){if(typeof t!="string")throw new Error("Invalid `transform` value.");let o={},s=t.replace(/(-?[\d.]+%)/g,(u,l)=>{let f=~~(Math.random()*1e9);return o[f]=l,f+"px"}),a=(0,Et.getStylesForProperty)("transform",s,!0);for(let u of a.transform)for(let l in u)o[u[l]]&&(u[l]=o[u[l]]);return a}if(e==="background")return t=t.toString().trim(),/^(linear-gradient|radial-gradient|url|repeating-linear-gradient|repeating-radial-gradient)\(/.test(t)?(0,Et.getStylesForProperty)("backgroundImage",t,!0):(0,Et.getStylesForProperty)("background",t,!0);if(e==="textShadow"){t=t.toString().trim();let o={},s=jt(t);for(let a of s){let u=(0,Et.getStylesForProperty)("textShadow",a,!0);for(let l in u)o[l]?o[l].push(u[l]):o[l]=[u[l]]}return o}if(e==="WebkitTextStroke"){t=t.toString().trim();let o=t.split(" ");if(o.length!==2)throw new Error("Invalid `WebkitTextStroke` value.");return{WebkitTextStrokeWidth:fr(e,o[0]),WebkitTextStrokeColor:fr(e,o[1])}}if(e==="textDecorationSkipInk"){let o=t.toString().trim().toLowerCase();if(!["auto","none","all"].includes(o))throw new Error("Invalid `textDecorationSkipInk` value.");return{textDecorationSkipInk:o}}}function Mu(e){return e==="transform"?" Only absolute lengths such as `10px` are supported.":""}var Fu=/rgb\((\d+)\s+(\d+)\s+(\d+)\s*\/\s*([\.\d]+)\)/;function Bu(e){if(typeof e=="string"&&Fu.test(e.trim()))return e.trim().replace(Fu,(t,n,r,i,o)=>`rgba(${n}, ${r}, ${i}, ${o})`);if(typeof e=="object"&&e!==null){for(let t in e)e[t]=Bu(e[t]);return e}return e}function ui(e,t){let n={},r={};for(let u in t)u.startsWith("--")&&(r[u]=String(t[u]));let i={},o=e;if(e){let{variables:u,remainingStyle:l}=Cu(e);i=u,o=l}let s=Lu(r,i);for(let u in s)n[u]=s[u];if(o){let u=o.color?Zr(o.color,s):void 0,l=yp(u,t.color);n.color=l;for(let f in o){if(f.startsWith("_"))throw new Error(`Invalid style property: ${JSON.stringify(f)}`);if(f==="color")continue;let c=(0,Et.getPropertyName)(f),h=Zr(o[f],s),m=xp(h,l);try{let g=gp(c,m,l,t)||mp(c,(0,Et.getStylesForProperty)(c,fr(c,m),!0),m,l);Object.assign(n,g)}catch(g){throw new Error(g.message+(g.message.includes(m)?`
5
5
  `+Mu(c):`
6
- in CSS rule \`${c}: ${m}\`.${Mu(c)}`))}}}if(n.backgroundImage){let{backgrounds:u}=(0,Du.parseElementStyle)(n);n.backgroundImage=u}(n.maskImage||n.WebkitMaskImage)&&(n.maskImage=Ou(n));let a=bp(n.fontSize,t.fontSize);typeof n.fontSize<"u"&&(n.fontSize=a),n.transformOrigin&&(n.transformOrigin=uo(n.transformOrigin,a));for(let u in n){let l=n[u];if(u==="lineHeight")typeof l=="string"&&l!=="normal"&&(l=n[u]=K(l,a,a,t,!0)/a);else{if(typeof l=="string"){let f=K(l,a,a,t);typeof f<"u"&&(n[u]=f),l=n[u]}if(typeof l=="string"||typeof l=="object"){let f=Bu(l);f&&(n[u]=f),l=n[u]}}if(u==="opacity"&&typeof l=="number"&&(n.opacity=l*t.opacity),u==="transform"){let f=l;for(let c of f){let h=Object.keys(c)[0],m=c[h],g=typeof m=="string"?K(m,a,a,t)??m:m;c[h]=g}}if(u==="textShadowRadius"){let f=l;n.textShadowRadius=f.map(c=>K(c,a,0,t,!1))}if(u==="textShadowOffset"){let f=l;n.textShadowOffset=f.map(({height:c,width:h})=>({height:K(c,a,0,t,!1),width:K(h,a,0,t,!1)}))}}return n}function bp(e,t){if(typeof e=="number")return e;try{let n=new St(e);switch(n.unit){case"em":return n.value*t;case"rem":return n.value*16}}catch{return t}}function Nu(e){if(e.startsWith("hsl")){let t=(0,$u.default)(e),[n,r,i]=t.values;return`hsl(${[n,`${r}%`,`${i}%`].concat(t.alpha===1?[]:[t.alpha]).join(",")})`}return e}function yp(e,t){return e&&e.toLowerCase()!=="currentcolor"?Nu(e):Nu(t)}function vp(e,t){return e.replace(/currentcolor/gi,t)}function xp(e,t){return Xn(e)&&(e=vp(e,t)),e}function wp(e,t,n,r,i,o){let s=r/n,a=(t.borderLeftWidth||0)+(t.borderRightWidth||0)+(t.paddingLeft||0)+(t.paddingRight||0),u=(t.borderTopWidth||0)+(t.borderBottomWidth||0)+(t.paddingTop||0)+(t.paddingBottom||0),l=t.width||i,f=t.height||o,c=typeof l=="number"&&typeof f=="number";c&&(l=l-a,f=f-u),l===void 0&&f===void 0?(l="100%",e.setAspectRatio(1/s)):l===void 0?typeof f=="number"?l=f/s:e.setAspectRatio(1/s):f===void 0&&(typeof l=="number"?f=l*s:e.setAspectRatio(1/s)),t.width=c?l+a:l,t.height=c?f+u:f,t.__naturalWidth=n,t.__naturalHeight=r}async function co(e,t,n,r,i,o){var u;let s=await Zt(),a=Object.assign({},n,ui(Tu[t],n),ui(r,n));if(t==="img"){let[l,f,c]=await Rr(i.src);if(f===void 0&&c===void 0){if(i.width===void 0||i.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");f=parseInt(i.width),c=parseInt(i.height)}wp(e,a,f,c,i.width,i.height),a.__src=l}if(await((u=o==null?void 0:o[t])==null?void 0:u.call(o,e,a,i)),t==="svg"){let l=i.viewBox||i.viewbox,f=Er(l),c=f?f[3]/f[2]:null,{width:h,height:m}=i;typeof h>"u"&&m?c==null?h=0:typeof m=="string"&&m.endsWith("%")?h=parseInt(m)/c+"%":(m=K(m,n.fontSize,1,n),h=m/c):typeof m>"u"&&h?c==null?h=0:typeof h=="string"&&h.endsWith("%")?m=parseInt(h)*c+"%":(h=K(h,n.fontSize,1,n),m=h*c):(typeof h<"u"&&(h=K(h,n.fontSize,1,n)||h),typeof m<"u"&&(m=K(m,n.fontSize,1,n)||m),h||=f==null?void 0:f[2],m||=f==null?void 0:f[3]),!a.width&&h&&(a.width=h),!a.height&&m&&(a.height=m)}return e.setDisplay(Xe(a.display,{flex:s.DISPLAY_FLEX,block:s.DISPLAY_FLEX,contents:s.DISPLAY_CONTENTS,none:s.DISPLAY_NONE,"-webkit-box":s.DISPLAY_FLEX},s.DISPLAY_FLEX,"display")),e.setAlignContent(Xe(a.alignContent,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,"space-between":s.ALIGN_SPACE_BETWEEN,"space-around":s.ALIGN_SPACE_AROUND,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignContent")),e.setAlignItems(Xe(a.alignItems,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_STRETCH,"alignItems")),e.setAlignSelf(Xe(a.alignSelf,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignSelf")),e.setJustifyContent(Xe(a.justifyContent,{center:s.JUSTIFY_CENTER,"flex-start":s.JUSTIFY_FLEX_START,"flex-end":s.JUSTIFY_FLEX_END,"space-between":s.JUSTIFY_SPACE_BETWEEN,"space-around":s.JUSTIFY_SPACE_AROUND},s.JUSTIFY_FLEX_START,"justifyContent")),e.setFlexDirection(Xe(a.flexDirection,{row:s.FLEX_DIRECTION_ROW,column:s.FLEX_DIRECTION_COLUMN,"row-reverse":s.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":s.FLEX_DIRECTION_COLUMN_REVERSE},s.FLEX_DIRECTION_ROW,"flexDirection")),e.setFlexWrap(Xe(a.flexWrap,{wrap:s.WRAP_WRAP,nowrap:s.WRAP_NO_WRAP,"wrap-reverse":s.WRAP_WRAP_REVERSE},s.WRAP_NO_WRAP,"flexWrap")),typeof a.gap<"u"&&e.setGap(s.GUTTER_ALL,a.gap),typeof a.rowGap<"u"&&e.setGap(s.GUTTER_ROW,a.rowGap),typeof a.columnGap<"u"&&e.setGap(s.GUTTER_COLUMN,a.columnGap),typeof a.flexBasis<"u"&&e.setFlexBasis(Jt(a.flexBasis,"flexBasis")),e.setFlexGrow(typeof a.flexGrow>"u"?0:a.flexGrow),e.setFlexShrink(typeof a.flexShrink>"u"?0:a.flexShrink),typeof a.maxHeight<"u"&&e.setMaxHeight(Gt(a.maxHeight,"maxHeight")),typeof a.maxWidth<"u"&&e.setMaxWidth(Gt(a.maxWidth,"maxWidth")),typeof a.minHeight<"u"&&e.setMinHeight(Gt(a.minHeight,"minHeight")),typeof a.minWidth<"u"&&e.setMinWidth(Gt(a.minWidth,"minWidth")),e.setOverflow(Xe(a.overflow,{visible:s.OVERFLOW_VISIBLE,hidden:s.OVERFLOW_HIDDEN},s.OVERFLOW_VISIBLE,"overflow")),e.setMargin(s.EDGE_TOP,Jt(a.marginTop||0)),e.setMargin(s.EDGE_BOTTOM,Jt(a.marginBottom||0)),e.setMargin(s.EDGE_LEFT,Jt(a.marginLeft||0)),e.setMargin(s.EDGE_RIGHT,Jt(a.marginRight||0)),e.setBorder(s.EDGE_TOP,a.borderTopWidth||0),e.setBorder(s.EDGE_BOTTOM,a.borderBottomWidth||0),e.setBorder(s.EDGE_LEFT,a.borderLeftWidth||0),e.setBorder(s.EDGE_RIGHT,a.borderRightWidth||0),e.setPadding(s.EDGE_TOP,a.paddingTop||0),e.setPadding(s.EDGE_BOTTOM,a.paddingBottom||0),e.setPadding(s.EDGE_LEFT,a.paddingLeft||0),e.setPadding(s.EDGE_RIGHT,a.paddingRight||0),e.setBoxSizing(Xe(a.boxSizing,{"border-box":s.BOX_SIZING_BORDER_BOX,"content-box":s.BOX_SIZING_CONTENT_BOX},s.BOX_SIZING_BORDER_BOX,"boxSizing")),e.setPositionType(Xe(a.position,{absolute:s.POSITION_TYPE_ABSOLUTE,relative:s.POSITION_TYPE_RELATIVE,static:s.POSITION_TYPE_STATIC},s.POSITION_TYPE_RELATIVE,"position")),typeof a.top<"u"&&e.setPosition(s.EDGE_TOP,Gt(a.top,"top")),typeof a.bottom<"u"&&e.setPosition(s.EDGE_BOTTOM,Gt(a.bottom,"bottom")),typeof a.left<"u"&&e.setPosition(s.EDGE_LEFT,Gt(a.left,"left")),typeof a.right<"u"&&e.setPosition(s.EDGE_RIGHT,Gt(a.right,"right")),typeof a.height<"u"?e.setHeight(Jt(a.height,"height")):e.setHeightAuto(),typeof a.width<"u"?e.setWidth(Jt(a.width,"width")):e.setWidthAuto(),[a,so(a)]}var po=at(require("escape-html"),1);var Uu=[1,0,0,1,0,0];function Sp(e,t,n){let r=[...Uu];for(let i of e){let o=Object.keys(i)[0],s=i[o];if(typeof s=="string")if(o==="translateX")s=parseFloat(s)/100*t,i[o]=s;else if(o==="translateY")s=parseFloat(s)/100*n,i[o]=s;else throw new Error(`Invalid transform: "${o}: ${s}".`);let a=s,u=[...Uu];switch(o){case"translateX":u[4]=a;break;case"translateY":u[5]=a;break;case"scale":u[0]=a,u[3]=a;break;case"scaleX":u[0]=a;break;case"scaleY":u[3]=a;break;case"rotate":{let l=a*Math.PI/180,f=Math.cos(l),c=Math.sin(l);u[0]=f,u[1]=c,u[2]=-c,u[3]=f;break}case"skewX":u[2]=Math.tan(a*Math.PI/180);break;case"skewY":u[1]=Math.tan(a*Math.PI/180);break}r=Yr(u,r)}e.splice(0,e.length),e.push(...r),e.__resolved=!0}function en({left:e,top:t,width:n,height:r},i,o,s){let a;i.__resolved||Sp(i,n,r);let u=i;if(o)a=u;else{let l=(s==null?void 0:s.xAbsolute)??((s==null?void 0:s.xRelative)??50)*n/100,f=(s==null?void 0:s.yAbsolute)??((s==null?void 0:s.yRelative)??50)*r/100,c=e+l,h=t+f;a=Yr([1,0,0,1,c,h],Yr(u,[1,0,0,1,-c,-h])),u.__parent&&(a=Yr(u.__parent,a)),u.splice(0,6,...a)}return`matrix(${a.map(l=>l.toFixed(2)).join(",")})`}function qu({left:e,top:t,width:n,height:r,isInheritingTransform:i},o){let s="",a=1;return o.transform&&(s=en({left:e,top:t,width:n,height:r},o.transform,i,o.transformOrigin)),o.opacity!==void 0&&(a=+o.opacity),{matrix:s,opacity:a}}function ho({id:e,content:t,filter:n,left:r,top:i,width:o,height:s,matrix:a,opacity:u,image:l,clipPathId:f,debug:c,shape:h,decorationShape:m},g){let y="";if(c&&(y=I("rect",{x:r,y:i-s,width:o,height:s,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0})),l){let E={href:l,x:r,y:i,width:o,height:s,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:g.filter?`filter:${g.filter}`:void 0},T=I("image",{...E,opacity:u!==1?u:void 0})+(m||"");return[(n?n+I("g",{filter:`url(#satori_s-${e})`},T):T)+y,""]}let x={x:r,y:i,width:o,height:s,"font-weight":g.fontWeight,"font-style":g.fontStyle,"font-size":g.fontSize,"font-family":g.fontFamily,"letter-spacing":g.letterSpacing||void 0,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:g.filter?`filter:${g.filter}`:void 0,"stroke-width":g.WebkitTextStrokeWidth?`${g.WebkitTextStrokeWidth}px`:void 0,stroke:g.WebkitTextStrokeWidth?g.WebkitTextStrokeColor:void 0,"stroke-linejoin":g.WebkitTextStrokeWidth?"round":void 0,"paint-order":g.WebkitTextStrokeWidth?"stroke":void 0},_=I("text",{...x,fill:g.color,opacity:u!==1?u:void 0},(0,po.default)(t))+(m||"");return[(n?n+I("g",{filter:`url(#satori_s-${e})`},_):_)+y,h?I("text",x,(0,po.default)(t)):""]}function _p(e,t,n){return e.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,i,o,s){return i+(parseFloat(o)+t)+","+(parseFloat(s)+n)})}var li=1.1;function zu({id:e,width:t,height:n},r,i=!1){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let o=r.shadowColor.length,s="",a="",u=0,l=t,f=0,c=n;for(let h=0;h<o;h++){let m=r.shadowRadius[h]*r.shadowRadius[h]/4;if(u=Math.min(r.shadowOffset[h].width-m,u),l=Math.max(r.shadowOffset[h].width+m+t,l),f=Math.min(r.shadowOffset[h].height-m,f),c=Math.max(r.shadowOffset[h].height+m+n,c),i){let g=`satori_s-${e}-result-${h}`;s+=I("feGaussianBlur",{in:"SourceAlpha",stdDeviation:r.shadowRadius[h]/2,result:`${g}-blur`})+I("feOffset",{in:`${g}-blur`,dx:r.shadowOffset[h].width,dy:r.shadowOffset[h].height,result:`${g}-offset`})+I("feFlood",{"flood-color":r.shadowColor[h],"flood-opacity":1,result:`${g}-color`})+I("feComposite",{in:`${g}-color`,in2:`${g}-offset`,operator:"in",result:o>1?g:void 0})}else s+=I("feDropShadow",{dx:r.shadowOffset[h].width,dy:r.shadowOffset[h].height,stdDeviation:r.shadowRadius[h]/2,"flood-color":r.shadowColor[h],"flood-opacity":1,...o>1?{in:"SourceGraphic",result:`satori_s-${e}-result-${h}`}:{}});o>1&&(a=I("feMergeNode",{in:`satori_s-${e}-result-${h}`})+a)}return I("filter",{id:`satori_s-${e}`,x:(u/t*100*li).toFixed(2)+"%",y:(f/n*100*li).toFixed(2)+"%",width:((l-u)/t*100*li).toFixed(2)+"%",height:((c-f)/n*100*li).toFixed(2)+"%"},s+(a?I("feMerge",{},a):""))}function Gu({width:e,height:t,shape:n,opacity:r,id:i},o){if(!o.boxShadow)return null;let s="",a="";for(let u=o.boxShadow.length-1;u>=0;u--){let l="",f=o.boxShadow[u];f.spreadRadius&&f.inset&&(f.spreadRadius=-f.spreadRadius);let c=f.blurRadius*f.blurRadius/4+(f.spreadRadius||0),h=Math.min(-c-(f.inset?f.offsetX:0),0),m=Math.max(c+e-(f.inset?f.offsetX:0),e),g=Math.min(-c-(f.inset?f.offsetY:0),0),y=Math.max(c+t-(f.inset?f.offsetY:0),t),x=`satori_s-${i}-${u}`,_=`satori_ms-${i}-${u}`,E=f.spreadRadius?n.replace('stroke-width="0"',`stroke-width="${f.spreadRadius*2}"`):n;l+=I("mask",{id:_,maskUnits:"userSpaceOnUse"},I("rect",{x:0,y:0,width:o._viewportWidth||"100%",height:o._viewportHeight||"100%",fill:f.inset?"#000":"#fff"})+E.replace('fill="#fff"',f.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let T=E.replace(/d="([^"]+)"/,(R,P)=>'d="'+_p(P,f.offsetX,f.offsetY)+'"').replace(/x="([^"]+)"/,(R,P)=>'x="'+(parseFloat(P)+f.offsetX)+'"').replace(/y="([^"]+)"/,(R,P)=>'y="'+(parseFloat(P)+f.offsetY)+'"');f.spreadRadius&&f.spreadRadius<0&&(l+=I("mask",{id:_+"-neg",maskUnits:"userSpaceOnUse"},T.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-f.spreadRadius*2}"`))),f.spreadRadius&&f.spreadRadius<0&&(T=I("g",{mask:`url(#${_}-neg)`},T)),l+=I("defs",{},I("filter",{id:x,x:`${h/e*100}%`,y:`${g/t*100}%`,width:`${(m-h)/e*100}%`,height:`${(y-g)/t*100}%`},I("feGaussianBlur",{stdDeviation:f.blurRadius/2,result:"b"})+I("feFlood",{"flood-color":f.color,in:"SourceGraphic",result:"f"})+I("feComposite",{in:"f",in2:"b",operator:f.inset?"out":"in"})))+I("g",{mask:`url(#${_})`,filter:`url(#${x})`,opacity:r},T),f.inset?a+=l:s+=l}return[s,a]}function Ep(e,t,n,r,i,o){let s=i/2,a=Math.max(s,i*1.25),u=[];for(let c of n){if(c.y2<o+s||c.y1>r+s)continue;let h=Math.max(e,c.x1-a),m=Math.min(t,c.x2+a);if(h>=m)continue;if(u.length===0){u.push([h,m]);continue}let g=u[u.length-1];h<=g[1]?g[1]=Math.max(g[1],m):u.push([h,m])}if(!u.length)return[[e,t]];let l=[],f=e;for(let[c,h]of u)if(c>f&&l.push([f,c]),f=Math.max(f,h),f>=t)break;return f<t&&l.push([f,t]),l}function mo({width:e,left:t,top:n,ascender:r,clipPathId:i,matrix:o,glyphBoxes:s},a){let{textDecorationColor:u,textDecorationStyle:l,textDecorationLine:f,textDecorationSkipInk:c,fontSize:h,color:m}=a;if(!f||f==="none")return"";let g=Math.max(1,h*.1),y=f==="line-through"?n+r*.7:f==="underline"?n+r*1.1:n,x=l==="dashed"?`${g*1.2} ${g*2}`:l==="dotted"?`0 ${g*2}`:void 0,_=f==="underline"&&(c||"auto")!=="none"&&(s==null?void 0:s.length),E=n+r,T=_?Ep(t,t+e,s,y,g,E):[[t,t+e]],R=l==="double"?T.map(([S,A])=>I("line",{x1:S,y1:y+g+1,x2:A,y2:y+g+1,stroke:u||m,"stroke-width":g,"stroke-dasharray":x,"stroke-linecap":l==="dotted"?"round":"square",transform:o})).join(""):"",P=T.map(([S,A])=>I("line",{x1:S,y1:y,x2:A,y2:y,stroke:u||m,"stroke-width":g,"stroke-dasharray":x,"stroke-linecap":l==="dotted"?"round":"square",transform:o})).join("")+R;return i?I("g",{"clip-path":`url(#${i})`},P):P}function go(e){return e=e.replace("U+","0x"),String.fromCodePoint(Number(e))}var cr=go("U+0020"),bo=go("U+0009"),Ar=go("U+2026");function ju(e,t,n){let{fontSize:r,letterSpacing:i,fontFeatureSettings:o}=n,s=new Map;function a(c){let h=s.get(c);return h===void 0&&(h=e.measure(c,{fontSize:r,letterSpacing:i,fontFeatureSettings:o}),s.set(c,h)),h}function u(c){return a(c)}function l(c){let h=0,m="",g=()=>{m&&(h+=a(m),m="")};for(let y of c)t(y)?(g(),h+=r):m+=y;return g(),h}function f(c){return l(Fe(c,"grapheme"))}return{measureGrapheme:u,measureGraphemeArray:l,measureText:f}}function Vu(e,t,n){let{textTransform:r,whiteSpace:i,wordBreak:o}=t;e=Tp(e,r,n);let{content:s,shouldCollapseTabsAndSpaces:a,allowSoftWrap:u}=Op(e,i),{words:l,requiredBreaks:f,allowBreakWord:c}=Pp(s,o),[h,m]=kp(t,u);return{words:l,requiredBreaks:f,allowSoftWrap:u,allowBreakWord:c,processedContent:s,shouldCollapseTabsAndSpaces:a,lineLimit:h,blockEllipsis:m}}function Tp(e,t,n){return t==="uppercase"?e=e.toLocaleUpperCase(n):t==="lowercase"?e=e.toLocaleLowerCase(n):t==="capitalize"&&(e=Fe(e,"word",n).map(r=>Fe(r,"grapheme",n).map((i,o)=>o===0?i.toLocaleUpperCase(n):i).join("")).join("")),e}function kp(e,t){let{textOverflow:n,lineClamp:r,WebkitLineClamp:i,WebkitBoxOrient:o,overflow:s,display:a}=e;if(a==="block"&&r){let[u,l=Ar]=Rp(r);if(u)return[u,l]}return n==="ellipsis"&&a==="-webkit-box"&&o==="vertical"&&Xa(i)&&i>0?[i,Ar]:n==="ellipsis"&&s==="hidden"&&!t?[1,Ar]:[1/0]}function Pp(e,t){let n=["break-all","break-word"].includes(t),{words:r,requiredBreaks:i}=Qa(e,t);return{words:r,requiredBreaks:i,allowBreakWord:n}}function Op(e,t){let n=["pre","pre-wrap","pre-line"].includes(t),r=["normal","nowrap","pre-line"].includes(t),i=!["pre","nowrap"].includes(t);return n||(e=e.replace(/\n/g,cr)),r&&(e=e.replace(/([ ]|\t)+/g,cr).replace(/^[ ]|[ ]$/g,"")),{content:e,shouldCollapseTabsAndSpaces:r,allowSoftWrap:i}}function Rp(e){if(typeof e=="number")return[e];let t=/^(\d+)\s*"(.*)"$/,n=/^(\d+)\s*'(.*)'$/,r=t.exec(e),i=n.exec(e);if(r){let o=+r[1],s=r[2];return[o,s]}else if(i){let o=+i[1],s=i[2];return[o,s]}return[]}var vo=at(require("parse-css-color"),1),Ap=new Set([bo]);function Ip(e){return Ap.has(e)}function yo(e){if(e==="transparent")return!0;let t=(0,vo.default)(e);return t?t.alpha===0:!1}function Hu(e){if(!e)return!1;let t=(0,vo.default)(e);if(!t)return!1;let[n,r,i,o]=t.values;return n===255&&r===255&&i===255&&(o===void 0||o===1)}async function*xo(e,t){let n=await Zt(),{parentStyle:r,inheritedStyle:i,parent:o,font:s,id:a,isInheritingTransform:u,debug:l,embedFont:f,graphemeImages:c,locale:h,canLoadAdditionalAssets:m}=t,{textAlign:g,textIndent:y=0,lineHeight:x,textWrap:_,fontSize:E,filter:T,tabSize:R=8,letterSpacing:P,fontFeatureSettings:S,_inheritedBackgroundClipTextPath:A,_inheritedBackgroundClipTextHasBackground:C,flexShrink:G}=r,{words:V,requiredBreaks:ee,allowSoftWrap:re,allowBreakWord:pe,processedContent:ce,shouldCollapseTabsAndSpaces:Ke,lineLimit:Pe,blockEllipsis:we}=Vu(e,r,h),De=Cp(n,g);o.insertChild(De,o.getChildCount()),Ka(G)&&o.setFlexShrink(1);let J=s.getEngine(E,x,r,h),xe=m?Fe(ce,"grapheme").filter(Y=>!Ip(Y)&&!J.has(Y)):[];yield xe.map(Y=>({word:Y,locale:h})),xe.length&&(J=s.getEngine(E,x,r,h));function qe(Y){return!!(c&&Object.prototype.hasOwnProperty.call(c,Y)&&c[Y])}let{measureGrapheme:Be,measureGraphemeArray:Oe,measureText:ne}=ju(J,qe,{fontSize:E,letterSpacing:P,fontFeatureSettings:S}),ut=Xn(R)?K(R,E,1,r):Be(cr)*R,Re=(Y,Q)=>{if(Y.length===0)return{originWidth:0,endingSpacesWidth:0,text:Y};let{index:te,tabCount:Z}=Lp(Y),Te=0;if(Z>0){let be=Y.slice(0,te),fe=Y.slice(te+Z),ie=ne(be),lt=ie+Q;Te=(ut===0?ie:(Math.floor(lt/ut)+Z)*ut)+ne(fe)}else Te=ne(Y);let le=Y.trimEnd()===Y?Te:ne(Y.trimEnd());return{originWidth:Te,endingSpacesWidth:Te-le,text:Y}},j=[],q=[],he=[],Ae=[],Ie=[];function Le(Y){let Q=0,te=0,Z=-1,Te=0,le=0,be=0,fe=0;j=[],he=[0],Ae=[],Ie=[];let ie=0,lt=0;for(;ie<V.length&&Q<Pe;){let X=V[ie],It=ee[ie],je=0,{originWidth:Ve,endingSpacesWidth:ot,text:Bt}=Re(X,le);X=Bt,je=Ve;let He=ot;It&&be===0&&(be=J.height(X));let Ut=g==="justify",Se=ie&&le+je>Y+He&&re;if(pe&&je>Y&&(!le||Se||It)){let Je=Fe(X,"grapheme");V.splice(ie,1,...Je),le>0&&(j.push(le-lt),q.push(fe),Q++,Te+=be,le=0,be=0,fe=0,he.push(1),Z=-1),lt=He;continue}if(It||Se)Ke&&X===cr&&(je=0),j.push(le-lt),q.push(fe),Q++,Te+=be,le=je,be=je?Math.round(J.height(X)):0,fe=je?Math.round(J.baseline(X)):0,he.push(1),Z=-1,It||(te=Math.max(te,Y));else{le+=je;let Je=Math.round(J.height(X));Je>be&&(be=Je,fe=Math.round(J.baseline(X))),Ut&&he[he.length-1]++}Ut&&Z++,te=Math.max(te,le);let ft=le-je;if(je===0)Ie.push({y:Te,x:ft,width:0,line:Q,lineIndex:Z,isImage:!1});else{let Je=Fe(X,"word");for(let ct=0;ct<Je.length;ct++){let xt=Je[ct],Ye=0,dt=!1;qe(xt)?(Ye=E,dt=!0):!f&&xt.length>1?Ye=ne(xt):Ye=Be(xt),Ae.push(xt),Ie.push({y:Te,x:ft,width:Ye,line:Q,lineIndex:Z,isImage:dt}),ft+=Ye,ct<Je.length-1&&P>0&&(ft+=P)}}ie++,lt=He}return le&&(Q<Pe&&(Te+=be),Q++,j.push(le),q.push(fe)),{width:te,height:Te}}let ue={width:0,height:0};De.setMeasureFunc(Y=>{let{width:Q,height:te}=Le(Y);if(_==="balance"){let Te=Q/2,le=Q,be=Q;for(;Te+1<le;){be=(Te+le)/2;let{height:ie}=Le(be);ie>te?Te=be:le=be}Le(le);let fe=Math.ceil(le);return ue={width:fe,height:te},{width:fe,height:te}}if(_==="pretty"&&j[j.length-1]<Q/3){let be=Q*.9,fe=Le(be);if(fe.height<=te*1.3)return ue={width:Q,height:fe.height},{width:Q,height:fe.height}}let Z=Math.ceil(Q);return ue={width:Z,height:te},{width:Z,height:te}});let[Qe,rt]=yield,Me="",ge="",ze=i._inheritedClipPathId,kt=i._inheritedMaskId,{left:Wr,top:$r,width:Dt,height:Br}=De.getComputedLayout(),Ur=typeof y=="string"?K(y,E,Dt,r,!0)||0:y,sr=o.getComputedWidth()-o.getComputedPadding(n.EDGE_LEFT)-o.getComputedPadding(n.EDGE_RIGHT)-o.getComputedBorder(n.EDGE_LEFT)-o.getComputedBorder(n.EDGE_RIGHT),Pt=Qe+Wr,Ot=rt+$r,{matrix:nt,opacity:Wt}=qu({left:Wr,top:$r,width:Dt,height:Br,isInheritingTransform:u},r),Ge="";if(r.textShadowOffset){let{textShadowColor:Y,textShadowOffset:Q,textShadowRadius:te}=r;Ge=zu({width:ue.width,height:ue.height,id:a},{shadowColor:Y,shadowOffset:Q,shadowRadius:te},yo(r.color)||C&&Hu(r.color)),Ge=I("defs",{},Ge)}let it="",$t="",vr="",Rt=-1,Ue={},At={},We=null,xr=0;for(let Y=0;Y<Ae.length;Y++){let Q=Ie[Y],te=Ie[Y+1];if(!Q)continue;let Z=Ae[Y],Te=null,le=!1,be=c&&Object.prototype.hasOwnProperty.call(c,Z)?c[Z]:null,fe=Q.y,ie=Q.x,lt=Q.width,X=Q.line,It=r.textDecorationLine==="underline"&&(r.textDecorationSkipInk||"auto")!=="none";if(X===Rt)continue;let je=!1;if(X===0&&Ur!==0&&(ie+=Ur),j.length>1){let Se=Dt-j[X];if(g==="right"||g==="end")ie+=Se;else if(g==="center")ie+=Se/2;else if(g==="justify"&&X<j.length-1){let ke=he[X],ft=ke>1?Se/(ke-1):0;ie+=ft*Q.lineIndex,je=!0}f&&(ie=Math.round(ie))}let Ve=q[X],ot=J.baseline(Z),Bt=J.height(Z),He=Ve-ot,Ut=Se=>!It||r.textDecorationLine!=="underline"?void 0:{underlineY:Ot+Se+He+ot+ot*.1,strokeWidth:Math.max(1,E*.1)};if(Ue[X]||(Ue[X]={left:ie,top:Ot+fe+He,ascender:ot,width:je?Dt:j[X]}),Pe!==1/0){let xt=function(Ye,dt){let qr=Fe(dt,"grapheme",h),wr="",Gn=0;for(let zr of qr){let ar=Ye+Oe([wr+zr]);if(wr&&ar+ke>sr)break;wr+=zr,Gn=ar}return{subset:wr,resolvedWidth:Gn}},Se=we,ke=Be(we);ke>sr&&(Se=Ar,ke=Be(Se));let ft=Be(cr),Je=X<j.length-1;if(X+1===Pe&&(Je||j[X]>sr)){if(ie+lt+ke+ft>sr){let{subset:Ye,resolvedWidth:dt}=xt(ie,Z);Z=Ye+Se,Rt=X,Ue[X].width=Math.max(0,dt-Ue[X].left),le=!0}else if(te&&te.line!==X)if(g==="center"){let{subset:Ye,resolvedWidth:dt}=xt(ie,Z);Z=Ye+Se,Rt=X,Ue[X].width=Math.max(0,dt-Ue[X].left),le=!0}else{let Ye=Ae[Y+1],{subset:dt,resolvedWidth:qr}=xt(lt+ie,Ye);Z=Z+dt+Se,Rt=X,Ue[X].width=Math.max(0,qr-Ue[X].left),le=!0}}}if(be)fe+=0;else if(f){if(!Z.includes(bo)&&!ja.includes(Z)&&Ae[Y+1]&&te&&!te.isImage&&fe===te.y&&!le){We===null&&(xr=ie),We=We===null?Z:We+Z;continue}let Se=We===null?Z:We+Z,ke=We===null?ie:xr,ft=Q.width+ie-ke,Je=Ut(fe),ct=J.getSVG(Se.replace(/(\t)+/g,""),{fontSize:E,left:Pt+ke,top:Ot+fe+ot+He,letterSpacing:P,fontFeatureSettings:S},Je);Te=ct.path,It&&ct.boxes&&ct.boxes.length&&(At[X]||(At[X]=[])).push(...ct.boxes),We=null,l&&(vr+=I("rect",{x:Pt+ke,y:Ot+fe+He,width:ft,height:Bt,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:nt||void 0,"clip-path":ze?`url(#${ze})`:void 0})+I("line",{x1:Pt+ie,x2:Pt+ie+Q.width,y1:Ot+fe+He+ot,y2:Ot+fe+He+ot,stroke:"#14c000","stroke-width":1,transform:nt||void 0,"clip-path":ze?`url(#${ze})`:void 0}))}else if(fe+=ot+He,It&&!be){let Se=Ut(fe),ke=J.getSVG(Z.replace(/(\t)+/g,""),{fontSize:E,left:Pt+ie,top:Ot+fe,letterSpacing:P,fontFeatureSettings:S},Se);ke.boxes&&ke.boxes.length&&(At[X]||(At[X]=[])).push(...ke.boxes)}if(Te!==null)$t+=Te+" ";else{let[Se,ke]=ho({content:Z,filter:Ge,id:a,left:Pt+ie,top:Ot+fe,width:lt,height:Bt,matrix:nt,opacity:Wt,image:be,clipPathId:ze,debug:l,shape:!!A},r);Me+=Se,ge+=ke}if(le)break}if(r.textDecorationLine&&(it=Object.entries(Ue).map(([Y,Q])=>{if(!Q)return"";let te=At[Y]||[];return mo({left:Pt+Q.left,top:Q.top,width:Q.width,ascender:Q.ascender,clipPathId:ze,matrix:nt,glyphBoxes:te},r)}).join("")),$t){let Y=(!yo(r.color)||Ge)&&Wt!==0?I("path",{fill:Ge&&(yo(r.color)||C&&Hu(r.color))?"black":r.color,d:$t,transform:nt||void 0,[i.WebkitTextStrokeWidth||T||Ge?"opacity":"fill-opacity"]:Wt!==1?Wt:void 0,style:T?`filter:${T}`:void 0,"stroke-width":i.WebkitTextStrokeWidth?`${i.WebkitTextStrokeWidth}px`:void 0,stroke:i.WebkitTextStrokeWidth?i.WebkitTextStrokeColor:void 0,"stroke-linejoin":i.WebkitTextStrokeWidth?"round":void 0,"paint-order":i.WebkitTextStrokeWidth?"stroke":void 0}):"",Q=Y?I("g",{mask:kt?`url(#${kt})`:void 0,"clip-path":ze?`url(#${ze})`:void 0},Y):"";A&&(ge=I("path",{d:$t,transform:nt||void 0})),Me+=(Ge?Ge+I("g",{filter:`url(#satori_s-${a})`},Q+it):Q+it)+vr}else it&&(Me+=Ge?I("g",{filter:`url(#satori_s-${a})`},it):it);return ge&&(r._inheritedBackgroundClipTextPath.value+=ge),Me}function Cp(e,t){let n=e.Node.create();return n.setAlignItems(e.ALIGN_BASELINE),n.setJustifyContent(Xe(t,{left:e.JUSTIFY_FLEX_START,right:e.JUSTIFY_FLEX_END,center:e.JUSTIFY_CENTER,justify:e.JUSTIFY_SPACE_BETWEEN,start:e.JUSTIFY_FLEX_START,end:e.JUSTIFY_FLEX_END},e.JUSTIFY_FLEX_START,"textAlign")),n}function Lp(e){let t=/(\t)+/.exec(e);return t?{index:t.index,tabCount:t[0].length}:{index:null,tabCount:0}}var Xu=require("css-gradient-parser");var Yu=at(require("parse-css-color"),1);function fi(e,t,n,r,i){let o=[],s=t.at(-1),a=s&&s.offset&&s.offset.unit==="%"&&r?+s.offset.value:100;for(let c of t){let{color:h}=c;if(!o.length&&(o.push({offset:0,color:h}),!c.offset||c.offset.value==="0"))continue;let m=typeof c.offset>"u"?void 0:c.offset.unit==="%"?+c.offset.value/a:Number(K(`${c.offset.value}${c.offset.unit}`,n.fontSize,e,n,!0))/e;o.push({offset:m,color:h})}o.length||o.push({offset:0,color:"transparent"});let u=o[o.length-1];u.offset!==1&&(typeof u.offset>"u"?u.offset=1:r?o[o.length-1]={offset:1,color:u.color}:o.push({offset:1,color:u.color}));let l=0,f=1;for(let c=0;c<o.length;c++)if(typeof o[c].offset>"u"){for(f<c&&(f=c);typeof o[f].offset>"u";)f++;o[c].offset=(o[f].offset-o[l].offset)/(f-l)*(c-l)+o[l].offset}else l=c;return i==="mask"?o.map(c=>{let h=(0,Yu.default)(c.color);return h?h.alpha===0?{...c,color:"rgba(0, 0, 0, 1)"}:{...c,color:`rgba(255, 255, 255, ${h.alpha})`}:c}):o}function Ku({id:e,width:t,height:n,repeatX:r,repeatY:i},o,s,a,u,l){let f=(0,Xu.parseLinearGradient)(o),[c,h]=s,m=o.startsWith("repeating"),g,y,x;if(f.orientation.type==="directional")g=Fp(f.orientation.value),y=Math.sqrt(Math.pow((g.x2-g.x1)*c,2)+Math.pow((g.y2-g.y1)*h,2));else if(f.orientation.type==="angular"){let{length:P,...S}=Np(lr(`${f.orientation.value.value}${f.orientation.value.unit}`)/180*Math.PI,c,h);y=P,g=S}x=m?Dp(f.stops,y,g,u):g;let _=fi(m?Mp(f.stops,y):y,f.stops,u,m,l),E=`satori_bi${e}`,T=`satori_pattern_${e}`,R=I("pattern",{id:T,x:a[0]/t,y:a[1]/n,width:r?c/t:"1",height:i?h/n:"1",patternUnits:"objectBoundingBox"},I("linearGradient",{id:E,...x,spreadMethod:m?"repeat":"pad"},_.map(P=>I("stop",{offset:(P.offset??0)*100+"%","stop-color":P.color})).join(""))+I("rect",{x:0,y:0,width:c,height:h,fill:`url(#${E})`}));return[T,R]}function Mp(e,t){let n=e[e.length-1],{offset:r}=n;return r?r.unit==="%"?Number(r.value)/100*t:Number(r.value):t}function Fp(e){let t=0,n=0,r=0,i=0;return e.includes("top")?n=1:e.includes("bottom")&&(i=1),e.includes("left")?t=1:e.includes("right")&&(r=1),!t&&!r&&!n&&!i&&(n=1),{x1:t,y1:n,x2:r,y2:i}}function Np(e,t,n){let r=Math.pow(n/t,2);e=(e%(Math.PI*2)+Math.PI*2)%(Math.PI*2);let i,o,s,a,u,l,f,c,h=m=>{if(m===0){i=0,o=n,s=0,a=0,u=n;return}else if(m===Math.PI/2){i=0,o=0,s=t,a=0,u=t;return}if(m>0&&m<Math.PI/2){i=(r*t/2/Math.tan(m)-n/2)/(Math.tan(m)+r/Math.tan(m)),o=Math.tan(m)*i+n,s=Math.abs(t/2-i)+t/2,a=n/2-Math.abs(o-n/2),u=Math.sqrt(Math.pow(s-i,2)+Math.pow(a-o,2)),f=(t/2/Math.tan(m)-n/2)/(Math.tan(m)+1/Math.tan(m)),c=Math.tan(m)*f+n,u=2*Math.sqrt(Math.pow(t/2-f,2)+Math.pow(n/2-c,2));return}else if(m>Math.PI/2&&m<Math.PI){i=(n/2+r*t/2/Math.tan(m))/(Math.tan(m)+r/Math.tan(m)),o=Math.tan(m)*i,s=Math.abs(t/2-i)+t/2,a=n/2+Math.abs(o-n/2),f=(t/2/Math.tan(m)+n/2)/(Math.tan(m)+1/Math.tan(m)),c=Math.tan(m)*f,u=2*Math.sqrt(Math.pow(t/2-f,2)+Math.pow(n/2-c,2));return}else m>=Math.PI&&(h(m-Math.PI),l=i,i=s,s=l,l=o,o=a,a=l)};return h(e),{x1:i/t,y1:o/n,x2:s/t,y2:a/n,length:u}}function Dp(e,t,n,r){let{x1:i,x2:o,y1:s,y2:a}=n,u=e[0].offset?e[0].offset.unit==="%"?Number(e[0].offset.value)/100:K(`${e[0].offset.value}${e[0].offset.unit}`,r.fontSize,t,r,!0)/t:0,l=e.at(-1).offset?e.at(-1).offset.unit==="%"?Number(e.at(-1).offset.value)/100:K(`${e.at(-1).offset.value}${e.at(-1).offset.unit}`,r.fontSize,t,r,!0)/t:1,f=(o-i)*u+i,c=(a-s)*u+s,h=(o-i)*l+i,m=(a-s)*l+s;return{x1:f,y1:c,x2:h,y2:m}}var Ju=require("css-gradient-parser");function Zu({id:e,width:t,height:n,repeatX:r,repeatY:i},o,s,a,u,l){var pe;let{shape:f,stops:c,position:h,size:m,repeating:g}=(0,Ju.parseRadialGradient)(o),[y,x]=s,_=y/2,E=x/2,T=$p(h.x,h.y,y,x,u.fontSize,u);_=T.x,E=T.y;let R=Wp(t,c,g,u),P=fi(R,c,u,g,l),S=`satori_radial_${e}`,A=`satori_pattern_${e}`,C=`satori_mask_${e}`,G=Up(f,m,u.fontSize,{x:_,y:E},[y,x],u,g),V=Bp(f,u.fontSize,c,[y,x],u,g,G),ee=I("pattern",{id:A,x:a[0]/t,y:a[1]/n,width:r?y/t:"1",height:i?x/n:"1",patternUnits:"objectBoundingBox"},I("radialGradient",{id:S,...V},P.map(ce=>I("stop",{offset:ce.offset||0,"stop-color":ce.color})).join(""))+I("mask",{id:C},I("rect",{x:0,y:0,width:y,height:x,fill:"#fff"}))+I("rect",{x:0,y:0,width:y,height:x,fill:((pe=P.at(-1))==null?void 0:pe.color)||"transparent"})+I(f,{cx:_,cy:E,width:y,height:x,...G,fill:`url(#${S})`,mask:`url(#${C})`}));return[A,ee]}function Wp(e,t,n,r){if(!n)return e;let i=t.at(-1);return!i||!i.offset||i.offset.unit==="%"?e:K(`${i.offset.value}${i.offset.unit}`,+r.fontSize,e,r,!0)}function $p(e,t,n,r,i,o){let s={x:n/2,y:r/2};return e.type==="keyword"?Object.assign(s,Qu(e.value,n,r,"x")):s.x=K(`${e.value.value}${e.value.unit}`,i,n,o,!0)??n/2,t.type==="keyword"?Object.assign(s,Qu(t.value,n,r,"y")):s.y=K(`${t.value.value}${t.value.unit}`,i,r,o,!0)??r/2,s}function Qu(e,t,n,r){switch(e){case"center":return{[r]:r==="x"?t/2:n/2};case"left":return{x:0};case"top":return{y:0};case"right":return{x:t};case"bottom":return{y:n}}}function Bp(e,t,n,[r,i],o,s,a){let{r:u,rx:l,ratio:f=1}=a;if(!s)return{spreadMethod:"pad"};let c=n.at(-1),h=e==="circle"?u*2:l*2;return{spreadMethod:"repeat",cx:"50%",cy:"50%",r:c.offset.unit==="%"?`${Number(c.offset.value)*Math.min(i/r,1)/f}%`:Number(K(`${c.offset.value}${c.offset.unit}`,t,r,o,!0)/h)}}function Up(e,t,n,r,i,o,s){let[a,u]=i,{x:l,y:f}=r,c={},h=0,m=0;if(qp(t)){if(t.some(g=>g.value.value.startsWith("-")))throw new Error("disallow setting negative values to the size of the shape. Check https://w3c.github.io/csswg-drafts/css-images/#valdef-rg-size-length-0");return e==="circle"?Object.assign(c,{r:Number(K(`${t[0].value.value}${t[0].value.unit}`,n,a,o,!0))}):Object.assign(c,{rx:Number(K(`${t[0].value.value}${t[0].value.unit}`,n,a,o,!0)),ry:Number(K(`${t[1].value.value}${t[1].value.unit}`,n,u,o,!0))}),ci(c,a,u,l,f,s,e),c}switch(t[0].value){case"farthest-corner":h=Math.max(Math.abs(a-l),Math.abs(l)),m=Math.max(Math.abs(u-f),Math.abs(f));break;case"closest-corner":h=Math.min(Math.abs(a-l),Math.abs(l)),m=Math.min(Math.abs(u-f),Math.abs(f));break;case"farthest-side":return e==="circle"?c.r=Math.max(Math.abs(a-l),Math.abs(l),Math.abs(u-f),Math.abs(f)):(c.rx=Math.max(Math.abs(a-l),Math.abs(l)),c.ry=Math.max(Math.abs(u-f),Math.abs(f))),ci(c,a,u,l,f,s,e),c;case"closest-side":return e==="circle"?c.r=Math.min(Math.abs(a-l),Math.abs(l),Math.abs(u-f),Math.abs(f)):(c.rx=Math.min(Math.abs(a-l),Math.abs(l)),c.ry=Math.min(Math.abs(u-f),Math.abs(f))),ci(c,a,u,l,f,s,e),c}return e==="circle"?c.r=Math.sqrt(h*h+m*m):Object.assign(c,el(h,m)),ci(c,a,u,l,f,s,e),c}function ci(e,t,n,r,i,o,s){if(o)if(s==="ellipse"){let a=Math.max(Math.abs(t-r),Math.abs(r)),u=Math.max(Math.abs(n-i),Math.abs(i)),{rx:l,ry:f}=el(a,u);e.ratio=Math.max(l/e.rx,f/e.ry),e.ratio>1&&(e.rx*=e.ratio,e.ry*=e.ratio)}else{let a=Math.max(Math.abs(t-r),Math.abs(r)),u=Math.max(Math.abs(n-i),Math.abs(i)),l=Math.sqrt(a*a+u*u);e.ratio=l/e.r,e.ratio>1&&(e.r=l)}}function el(e,t){let n=t!==0?e/t:1;if(e===0)return{rx:0,ry:0};{let r=Math.sqrt(e*e+t*t*n*n)/n;return{ry:r,rx:r*n}}}function qp(e){return!e.some(t=>t.type==="keyword")}var So=at(require("parse-css-color"),1);function _o(e,t){return typeof e=="string"&&e.endsWith("%")?t*parseFloat(e)/100:+e}function zp(e,t,n,r,i){if(!r||!i)return[t,n];if(e==="cover"){let o=t/r,s=n/i,a=Math.max(o,s);return[r*a,i*a]}if(e==="contain"){let o=t/r,s=n/i,a=Math.min(o,s);return[r*a,i*a]}if(e==="auto"||e.includes("auto")){let o=e.split(" "),s=o[0]||"auto",a=o[1]||o[0]||"auto",u=r,l=i;if(s==="auto"&&a!=="auto"){let f=_o(a,n);l=f,u=r/i*f}else if(a==="auto"&&s!=="auto"){let f=_o(s,t);u=f,l=i/r*f}return[u,l]}return[t,n]}function wo(e,{x:t,y:n,defaultX:r,defaultY:i}){return(e?e.split(" ").map(o=>{try{let s=new St(o);return s.type==="length"||s.type==="number"?s.value:s.value+s.unit}catch{return null}}).filter(o=>o!==null):[r,i]).map((o,s)=>_o(o,[t,n][s]))}async function tn({id:e,width:t,height:n,left:r,top:i},{image:o,size:s,position:a,repeat:u},l,f){u=u||"repeat",f=f||"background";let c=u==="repeat-x"||u==="repeat",h=u==="repeat-y"||u==="repeat",m=s&&(s==="cover"||s==="contain"||s==="auto"||s.includes("auto")),g=o.startsWith("linear-gradient(")||o.startsWith("repeating-linear-gradient(")||o.startsWith("radial-gradient(")||o.startsWith("repeating-radial-gradient("),y=m&&g?[t,n]:m?[0,0]:wo(s,{x:t,y:n,defaultX:t,defaultY:n}),x=wo(a,{x:t,y:n,defaultX:0,defaultY:0});if(o.startsWith("linear-gradient(")||o.startsWith("repeating-linear-gradient("))return Ku({id:e,width:t,height:n,repeatX:c,repeatY:h},o,y,x,l,f);if(o.startsWith("radial-gradient(")||o.startsWith("repeating-radial-gradient("))return Zu({id:e,width:t,height:n,repeatX:c,repeatY:h},o,y,x,l,f);if(o.startsWith("url(")){let[_,E,T]=await Rr(o.slice(4,-1)),R,P;if(m){let[S,A]=zp(s,t,n,E,T);R=S,P=A}else{let S=wo(s,{x:t,y:n,defaultX:0,defaultY:0});R=f==="mask"?E||S[0]:S[0]||E,P=f==="mask"?T||S[1]:S[1]||T}return[`satori_bi${e}`,I("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:x[0]+r,y:x[1]+i,width:c?R:"100%",height:h?P:"100%"},I("image",{x:0,y:0,width:R,height:P,preserveAspectRatio:"none",href:_}))]}if((0,So.default)(o)){let _=(0,So.default)(o),[E,T,R,P]=_.values,A=`rgba(${E},${T},${R},${P!==void 0?P:1})`;return[`satori_bi${e}`,I("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:r,y:i,width:t,height:n},I("rect",{x:0,y:0,width:t,height:n,fill:A}))]}throw new Error(`Invalid background image: "${o}"`)}function Gp([e,t]){return Math.round(e*1e3)===0&&Math.round(t*1e3)===0?0:Math.round(e*t/Math.sqrt(e*e+t*t)*1e3)/1e3}function di(e,t,n){return n<e+t&&(n/2<e&&n/2<t?e=t=n/2:n/2<e?e=n-t:n/2<t&&(t=n-e)),[e,t]}function pi(e){e[0]=e[1]=Math.min(e[0],e[1])}function hi(e,t,n,r,i){if(typeof e=="string"){let o=e.split(" ").map(a=>a.trim()),s=!o[1]&&!o[0].endsWith("%");return o[1]=o[1]||o[0],[s,[Math.min(K(o[0],r,t,i,!0),t),Math.min(K(o[1],r,n,i,!0),n)]]}return typeof e=="number"?[!0,[Math.min(e,t),Math.min(e,n)]]:[!0,void 0]}var mi=e=>e&&e[0]!==0&&e[1]!==0;function gi(e){return typeof e!="string"?1:lo(e)}function bi(e,t,n,r,i){if(i===1/0)return[e,n,t];if(i===-1/0)return[e,r,t];if(i===0)return[e,[(e[0]+t[0])/2,(e[1]+t[1])/2],t];let o=i<0?n:r,s=Math.pow(2,1-Math.abs(i));if(s===0)return i>0?[e,n,t]:[e,r,t];let a=[],u=16;for(let l=0;l<=u;l++){let f=Math.PI*l/u/2,c=Math.pow(Math.sin(f),s),h=Math.pow(Math.cos(f),s);a.push([o[0]+(t[0]-o[0])*c+(e[0]-o[0])*h,o[1]+(t[1]-o[1])*c+(e[1]-o[1])*h])}return a}function dr(e){return`${Math.round(e[0]*1e3)/1e3},${Math.round(e[1]*1e3)/1e3}`}function tl(e,t,n,r){return Math.min(1,n/(e[0]+t[0]||n),r/(e[1]+t[1]||r))}function jp(e,t,n,r,i,o,s){s!=null&&s.every(Boolean)&&(s=void 0);let a=e+n,u=t+r,[l,f,c,h]=i,m=[bi([e,t+l[1]],[e+l[0],t],[e,t],[e+l[0],t+l[1]],o[0]),bi([a-f[0],t],[a,t+f[1]],[a,t],[a-f[0],t+f[1]],o[1]),bi([a,u-c[1]],[a-c[0],u],[a,u],[a-c[0],u-c[1]],o[2]),bi([e+h[0],u],[e,u-h[1]],[e,u],[e+h[0],u-h[1]],o[3])];if(s){let y=s.indexOf(!0);if(y===-1)throw new Error("Invalid `partialSides`.");for(;s[(y+3)%4];)y=(y+3)%4;let x=m[y],_=Math.floor(x.length/2),E=`M${dr(x[_])}`,T=y;do{let R=m[T],P=Math.floor(R.length/2);for(let C=P+1;C<R.length;C++)E+=` L${dr(R[C])}`;let S=m[(T+1)%4];E+=` L${dr(S[0])}`;let A=Math.floor(S.length/2);for(let C=1;C<=A;C++)E+=` L${dr(S[C])}`;T=(T+1)%4}while(s[T]&&T!==y);return E}let g=`M${dr(m[0][m[0].length-1])}`;for(let y=0;y<4;y++){let x=m[(y+1)%4];g+=` L${dr(x[0])}`;for(let _=1;_<x.length;_++)g+=` L${dr(x[_])}`}return g+" Z"}function rl({id:e,borderRadiusPath:t,borderType:n,left:r,top:i,width:o,height:s},a){let u=`satori_brc-${e}`;return[I("clipPath",{id:u},I(n,{x:r,y:i,width:o,height:s,d:t||void 0})),u]}function er({left:e,top:t,width:n,height:r},i,o){let{borderTopLeftRadius:s,borderTopRightRadius:a,borderBottomLeftRadius:u,borderBottomRightRadius:l,fontSize:f}=i,c=[gi(i.cornerTopLeftShape),gi(i.cornerTopRightShape),gi(i.cornerBottomRightShape),gi(i.cornerBottomLeftShape)],h,m,g,y;if([h,s]=hi(s,n,r,f,i),[m,a]=hi(a,n,r,f,i),[g,u]=hi(u,n,r,f,i),[y,l]=hi(l,n,r,f,i),!o&&!mi(s)&&!mi(a)&&!mi(u)&&!mi(l))return"";if(s||=[0,0],a||=[0,0],u||=[0,0],l||=[0,0],[s[0],a[0]]=di(s[0],a[0],n),[u[0],l[0]]=di(u[0],l[0],n),[s[1],u[1]]=di(s[1],u[1],r),[a[1],l[1]]=di(a[1],l[1],r),h&&pi(s),m&&pi(a),g&&pi(u),y&&pi(l),c.some(P=>P<0)){let P=Math.min(tl(s,l,n,r),tl(a,u,n,r));if(P<1)for(let S of[s,a,l,u])S[0]*=P,S[1]*=P}if(c.some(P=>P!==1))return jp(e,t,n,r,[s,a,l,u],c,o);let x=[];x[0]=[a,a],x[1]=[l,[-l[0],l[1]]],x[2]=[u,[-u[0],-u[1]]],x[3]=[s,[s[0],-s[1]]];let _=`h${n-s[0]-a[0]} a${x[0][0]} 0 0 1 ${x[0][1]}`,E=`v${r-a[1]-l[1]} a${x[1][0]} 0 0 1 ${x[1][1]}`,T=`h${l[0]+u[0]-n} a${x[2][0]} 0 0 1 ${x[2][1]}`,R=`v${u[1]+s[1]-r} a${x[3][0]} 0 0 1 ${x[3][1]}`;if(o){let S=function(pe){let ce=Gp([s,a,l,u][pe]);return pe===0?[[e+s[0]-ce,t+s[1]-ce],[e+s[0],t]]:pe===1?[[e+n-a[0]+ce,t+a[1]-ce],[e+n,t+a[1]]]:pe===2?[[e+n-l[0]+ce,t+r-l[1]+ce],[e+n-l[0],t+r]]:[[e+u[0]-ce,t+r-u[1]+ce],[e,t+r-u[1]]]},P=o.indexOf(!1);if(!o.includes(!0))throw new Error("Invalid `partialSides`.");if(P===-1)P=0;else for(;!o[P];)P=(P+1)%4;let A="",C=S(P),G=`M${C[0]} A${x[(P+3)%4][0]} 0 0 1 ${C[1]}`,V=0;for(;V<4&&o[(P+V)%4];V++)A+=G+" ",G=[_,E,T,R][(P+V)%4];let ee=(P+V)%4;A+=G.split(" ")[0];let re=S(ee);return A+=` A${x[(ee+3)%4][0]} 0 0 1 ${re[0]}`,A}return`M${e+s[0]},${t} ${_} ${E} ${T} ${R}`}function nl(e,t,n){return n[e+"Width"]===n[t+"Width"]&&n[e+"Style"]===n[t+"Style"]&&n[e+"Color"]===n[t+"Color"]}function il({id:e,currentClipPathId:t,borderPath:n,borderType:r,left:i,top:o,width:s,height:a},u){if(!(u.borderTopWidth||u.borderRightWidth||u.borderBottomWidth||u.borderLeftWidth))return null;let f=`satori_bc-${e}`;return[I("clipPath",{id:f,"clip-path":t?`url(#${t})`:void 0},I(r,{x:i,y:o,width:s,height:a,d:n||void 0})),f]}function rn({left:e,top:t,width:n,height:r,props:i,asContentMask:o,maskBorderOnly:s},a){let u=["borderTop","borderRight","borderBottom","borderLeft"];if(!o&&!u.some(m=>a[m+"Width"]))return"";let l="",f=0;for(;f>0&&nl(u[f],u[(f+3)%4],a);)f=(f+3)%4;let c=[!1,!1,!1,!1],h=[];for(let m=0;m<4;m++){let g=(f+m)%4,y=(f+m+1)%4,x=u[g],_=u[y];if(c[g]=!0,h=[a[x+"Width"],a[x+"Style"],a[x+"Color"],x],!nl(x,_,a)){let E=(h[0]||0)+(o&&!s&&a[x.replace("border","padding")]||0);E&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:o?"#000":h[2],"stroke-width":E*2,"stroke-dasharray":!o&&h[1]==="dashed"?E*2+" "+E:void 0,d:er({left:e,top:t,width:n,height:r},a,c)})),c=[!1,!1,!1,!1]}}if(c.some(Boolean)){let m=(h[0]||0)+(o&&!s&&a[h[3].replace("border","padding")]||0);m&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:o?"#000":h[2],"stroke-width":m*2,"stroke-dasharray":!o&&h[1]==="dashed"?m*2+" "+m:void 0,d:er({left:e,top:t,width:n,height:r},a,c)}))}return l}function Eo({id:e,left:t,top:n,width:r,height:i,matrix:o,borderOnly:s},a){let u=(a.borderLeftWidth||0)+(s?0:a.paddingLeft||0),l=(a.borderTopWidth||0)+(s?0:a.paddingTop||0),f=(a.borderRightWidth||0)+(s?0:a.paddingRight||0),c=(a.borderBottomWidth||0)+(s?0:a.paddingBottom||0),h={x:t+u,y:n+l,width:r-u-f,height:i-l-c};return I("mask",{id:e},I("rect",{...h,fill:"#fff",transform:a.overflow==="hidden"&&a.transform&&o?o:void 0,mask:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0})+rn({left:t,top:n,width:r,height:i,props:{transform:o||void 0},asContentMask:!0,maskBorderOnly:s},a))}var Ao=require("css-to-react-native");var Po={left:0,"x-start":0,center:.5,right:1,"x-end":1},Oo={top:0,"y-start":0,center:.5,bottom:1,"y-end":1};function Lt(e){return Math.round(e*1e3)/1e3}function sl(e,t,n,r){let i=e.match(/^shape\((.*)\)$/s);if(!i)return null;let o=jt(i[1]),s=o.shift();if(!s)throw new Error("Invalid `shape()` value.");let a=s.match(/^(?:(nonzero|evenodd)\s+)?from\s+(.+)$/);if(!a)throw new Error("Invalid `shape()` starting point.");let u=a[1]||"nonzero",l=Ro(ol(a[2]),t,n,r),f=l,c=`M${Lt(l[0])},${Lt(l[1])}`;for(let h of o){let m=ol(h),g=m.shift();if(g==="close"){if(m.length)throw new Error("Invalid `close` command in `shape()`.");c+=" Z",l=f;continue}if(g==="move"||g==="line"){let y=To(m,l,t,n,r);c+=` ${g==="move"?"M":"L"}${Lt(y[0])},${Lt(y[1])}`,l=y,g==="move"&&(f=y);continue}if(g==="hline"||g==="vline"){let y=g==="hline"?0:1,x=m.shift(),_=m.shift();if(x!=="to"&&x!=="by"||!_||m.length)throw new Error(`Invalid \`${g}\` command in \`shape()\`.`);let E=y===0?t:n,T=y===0?Po:Oo,R=x==="to"&&_ in T?T[_]*E:tr(_,E,r);l=[...l],l[y]=x==="by"?l[y]+R:R,c+=` ${y===0?"H":"V"}${Lt(l[y])}`;continue}if(g==="curve"||g==="smooth"){let y=m.indexOf("with"),x=y===-1?m:m.slice(0,y),_=y===-1?[]:m.slice(y+1),E=x[0],T=To(x,l,t,n,r);if(g==="curve"&&y===-1)throw new Error("A `curve` command requires a control point.");let R=Vp(_).map(P=>Hp(P,l,T,t,n,r));if(g==="curve")if(R.length===1)c+=` Q${Yt(R[0])} ${Yt(T)}`;else if(R.length===2)c+=` C${Yt(R[0])} ${Yt(R[1])} ${Yt(T)}`;else throw new Error("A `curve` command accepts one or two control points.");else if(!R.length)c+=` T${Yt(T)}`;else if(R.length===1)c+=` S${Yt(R[0])} ${Yt(T)}`;else throw new Error("A `smooth` command accepts at most one control point.");l=T;continue}if(g==="arc"){let y=m.findIndex(C=>["of","cw","ccw","large","small","rotate"].includes(C)),x=y===-1?m:m.slice(0,y),_=y===-1?[]:m.slice(y),E=To(x,l,t,n,r),T=0,R=0,P=0,S=0,A=0;for(let C=0;C<_.length;C++){let G=_[C];if(G==="of"){let V=_[++C];if(!V)throw new Error("Invalid `arc` radius in `shape()`.");let ee=_[C+1],re=ee&&!["cw","ccw","large","small","rotate"].includes(ee);if(re&&C++,re)T=tr(V,t,r),R=tr(ee,n,r);else{let pe=Math.sqrt(t*t+n*n)/Math.sqrt(2);T=R=tr(V,pe,r)}}else if(G==="cw"||G==="ccw")A=G==="cw"?1:0;else if(G==="large"||G==="small")S=G==="large"?1:0;else if(G==="rotate"){let V=_[++C];if(!V)throw new Error("Invalid `arc` rotation in `shape()`.");let ee=lr(V);if(typeof ee>"u")throw new Error("Invalid `arc` rotation in `shape()`.");P=ee}else throw new Error("Invalid `arc` option in `shape()`.")}c+=` A${Lt(Math.abs(T))},${Lt(Math.abs(R))} ${Lt(P)} ${S} ${A} ${Yt(E)}`,l=E;continue}throw new Error(`Unsupported \`${g}\` command in \`shape()\`.`)}return{type:"path",d:c,"fill-rule":u}}function ol(e){return e.trim().replace(/\//g," / ").split(/\s+/).filter(Boolean)}function Vp(e){if(!e.length)return[];let t=e.indexOf("/");return t===-1?[e]:[e.slice(0,t),e.slice(t+1)]}function To(e,t,n,r,i){let o=e[0];if(o!=="to"&&o!=="by")throw new Error("A `shape()` command must use `to` or `by`.");let s=Ro(e.slice(1),n,r,i);return o==="by"?[t[0]+s[0],t[1]+s[1]]:s}function Hp(e,t,n,r,i,o){let s=e.indexOf("from"),a=s===-1?e:e.slice(0,s),u=s===-1?void 0:e[s+1];if(s!==-1&&(s+2!==e.length||!u))throw new Error("Invalid control point reference in `shape()`.");let l=Ro(a,r,i,o,!0);return u==="start"||!u&&!Yp(e)?[t[0]+l[0],t[1]+l[1]]:u==="end"?[n[0]+l[0],n[1]+l[1]]:l}function Ro(e,t,n,r,i=!1){if(!e.length||e.length>4)throw new Error("Invalid position in `shape()`.");let o,s,a=[...e];for(let u=0;u<a.length;u++){let l=a[u];if(l==="left"||l==="right"||l==="x-start"||l==="x-end"){let f=a[u+1];if(f&&!ko(f)){let c=tr(f,t,r);o=l==="left"||l==="x-start"?c:t-c,u++}else o=Po[l]*t}else if(l==="top"||l==="bottom"||l==="y-start"||l==="y-end"){let f=a[u+1];if(f&&!ko(f)){let c=tr(f,n,r);s=l==="top"||l==="y-start"?c:n-c,u++}else s=Oo[l]*n}else if(l==="center")if(o===void 0)o=t/2;else if(s===void 0)s=n/2;else throw new Error("Invalid position in `shape()`.");else if(o===void 0)o=tr(l,t,r);else if(s===void 0)s=tr(l,n,r);else throw new Error("Invalid position in `shape()`.")}return!i&&e.length===1&&s===void 0&&(s=n/2),[o??(i?0:t/2),s??(i?0:n/2)]}function ko(e){return e in Po||e in Oo}function Yp(e){return e.some(ko)}function tr(e,t,n){let r=K(e,n.fontSize,t,n,!0);if(typeof r>"u")throw new Error(`Invalid length \`${e}\` in \`shape()\`.`);return r}function Yt(e){return`${Lt(e[0])},${Lt(e[1])}`}var Ir={circle:/circle\((.+)\)/,ellipse:/ellipse\((.+)\)/,path:/path\((.+)\)/,polygon:/polygon\((.+)\)/,inset:/inset\((.+)\)/,shape:/shape\((.+)\)/};function ll({width:e,height:t},n,r){function i(f){let c=f.match(Ir.circle);if(!c)return null;let[,h]=c,[m,g=""]=h.split("at").map(_=>_.trim()),{x:y,y:x}=ul(g,e,t);return{type:"circle",r:K(m,r.fontSize,Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/Math.sqrt(2),r,!0),cx:K(y,r.fontSize,e,r,!0),cy:K(x,r.fontSize,t,r,!0)}}function o(f){let c=f.match(Ir.ellipse);if(!c)return null;let[,h]=c,[m,g=""]=h.split("at").map(T=>T.trim()),[y,x]=m.split(" "),{x:_,y:E}=ul(g,e,t);return{type:"ellipse",rx:K(y||"50%",r.fontSize,e,r,!0),ry:K(x||"50%",r.fontSize,t,r,!0),cx:K(_,r.fontSize,e,r,!0),cy:K(E,r.fontSize,t,r,!0)}}function s(f){let c=f.match(Ir.path);if(!c)return null;let[h,m]=al(c[1]);return{type:"path",d:m,"fill-rule":h}}function a(f){let c=f.match(Ir.polygon);if(!c)return null;let[h,m]=al(c[1]);return{type:"polygon","fill-rule":h,points:m.split(",").map(g=>g.split(" ").map((y,x)=>K(y,r.fontSize,x===0?e:t,r,!0)).join(" ")).join(",")}}function u(f){let c=f.match(Ir.inset);if(!c)return null;let[h,m]=(c[1].includes("round")?c[1]:`${c[1].trim()} round 0`).split("round"),g=(0,Ao.getStylesForProperty)("borderRadius",m,!0),y=Object.values(g).map(P=>String(P)).map((P,S)=>K(P,r.fontSize,S===0||S===2?t:e,r,!0)||0),x=Object.values((0,Ao.getStylesForProperty)("margin",h,!0)).map(P=>String(P)).map((P,S)=>K(P,r.fontSize,S===0||S===2?t:e,r,!0)||0),_=x[3],E=x[0],T=e-(x[1]+x[3]),R=t-(x[0]+x[2]);return y.some(P=>P>0)?{type:"path",d:er({left:_,top:E,width:T,height:R},{...n,...g})}:{type:"rect",x:_,y:E,width:T,height:R}}function l(f){return Ir.shape.test(f)?sl(f,e,t,r):null}return{parseCircle:i,parseEllipse:o,parsePath:s,parsePolygon:a,parseInset:u,parseShape:l}}function al(e){let[,t="nonzero",n]=e.replace(/('|")/g,"").match(/^(nonzero|evenodd)?,?(.+)/)||[];return[t,n]}function ul(e,t,n){let r=e.split(" "),i={x:r[0]||"50%",y:r[1]||"50%"};return r.forEach(o=>{o==="top"?i.y=0:o==="bottom"?i.y=n:o==="left"?i.x=0:o==="right"?i.x=t:o==="center"&&(i.x=t/2,i.y=n/2)}),i}function yi(e){return`satori_cp-${e}`}function fl(e){return`url(#${yi(e)})`}function cl(e,t,n){if(t.clipPath==="none")return"";let r=ll(e,t,n),i=t.clipPath,o={type:""};for(let s of Object.keys(r))if(o=r[s](i),o)break;if(o){let{type:s,...a}=o;return I("clipPath",{id:yi(e.id),"clip-path":e.currentClipPath,transform:`translate(${e.left}, ${e.top})`},I(s,a))}return""}function Io({left:e,top:t,width:n,height:r,path:i,matrix:o,id:s,currentClipPath:a,src:u},l,f){let c="",h=l.clipPath&&l.clipPath!=="none"?cl({left:e,top:t,width:n,height:r,path:i,id:s,matrix:o,currentClipPath:a,src:u},l,f):"";if(l.overflow!=="hidden"&&!u)c="";else{let g=h?`satori_ocp-${s}`:yi(s);c=I("clipPath",{id:g,"clip-path":a},I(i?"path":"rect",{x:e,y:t,width:n,height:r,d:i||void 0,transform:l.overflow==="hidden"&&l.transform&&o?o:void 0}))}let m=Eo({id:`satori_om-${s}`,left:e,top:t,width:n,height:r,matrix:o,borderOnly:!u},l);return h+c+m}var Xp=e=>`satori_mi-${e}`;async function Co(e,t,n){if(!t.maskImage)return["",""];let{left:r,top:i,width:o,height:s,id:a}=e,u=t.maskImage,l=u.length;if(!l)return["",""];let f=Xp(a),c="";for(let h=0;h<l;h++){let m=u[h],[g,y]=await tn({id:`${f}-${h}`,left:r,top:i,width:o,height:s},m,n,"mask");c+=y+I("rect",{x:r,y:i,width:o,height:s,fill:`url(#${g})`})}return c=I("mask",{id:f},c),[f,c]}function dl({id:e,left:t,top:n,width:r,height:i,path:o,type:s,matrix:a,currentClipPath:u,mask:l,filters:f}){if(!f.length)return["",""];let c=`satori_bf-${e}`,h=`satori_bfc-${e}`,m=Qp(f),g="BackgroundImage",y="";f.forEach((E,T)=>{let R=`${c}-${T}`;y+=Kp(E,g,R),g=R});let x=I("filter",{id:c,x:t-m.left,y:n-m.top,width:r+m.left+m.right,height:i+m.top+m.bottom,filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},y)+I("clipPath",{id:h,"clip-path":u},I(s,{x:t,y:n,width:r,height:i,d:o||void 0,transform:a||void 0})),_=I(s,{x:t,y:n,width:r,height:i,d:o||void 0,fill:"#000",transform:a||void 0,filter:`url(#${c})`,"clip-path":`url(#${h})`,mask:l});return[x,_]}function Kp(e,t,n){if(e.type==="blur")return I("feGaussianBlur",{in:t,stdDeviation:e.value,result:n});if(e.type==="hue-rotate")return I("feColorMatrix",{in:t,type:"hueRotate",values:e.value,result:n});if(e.type==="saturate"||e.type==="grayscale")return I("feColorMatrix",{in:t,type:"saturate",values:e.type==="grayscale"?1-e.value:e.value,result:n});if(e.type==="sepia"){let s=e.value,a=1-s;return I("feColorMatrix",{in:t,type:"matrix",values:[a+.393*s,.769*s,.189*s,0,0,.349*s,a+.686*s,.168*s,0,0,.272*s,.534*s,a+.131*s,0,0,0,0,0,1,0].join(" "),result:n})}if(e.type==="drop-shadow"){let s=`${n}-input`;return I("feComposite",{in:t,in2:"SourceAlpha",operator:"in",result:s})+I("feDropShadow",{in:s,dx:e.offsetX,dy:e.offsetY,stdDeviation:e.blurRadius,"flood-color":e.color,result:n})}let r=e.value,i=e.type==="brightness"?{slope:r}:e.type==="contrast"?{slope:r,intercept:.5-.5*r}:e.type==="invert"?{slope:1-2*r,intercept:r}:{slope:r},o=e.type==="opacity"?["A"]:["R","G","B"];return I("feComponentTransfer",{in:t,result:n},o.map(s=>I(`feFunc${s}`,{type:"linear",...i})).join(""))}function Qp(e){let t=0,n=0,r=0,i=0;for(let o of e)if(o.type==="blur"){let s=o.value*3;t=Math.max(t,s),n=Math.max(n,s),r=Math.max(r,s),i=Math.max(i,s)}else if(o.type==="drop-shadow"){let s=o.blurRadius*3;t=Math.max(t,s-o.offsetX),n=Math.max(n,s-o.offsetY),r=Math.max(r,s+o.offsetX),i=Math.max(i,s+o.offsetY)}return{left:t,top:n,right:r,bottom:i}}function Jp(e,t,n){let r=e.toLowerCase().trim().split(/\s+/),i=(u,l)=>({left:"0%",center:"50%",right:"100%",top:"0%",bottom:"100%"})[u]||u,o,s;if(r.length===1){let u=r[0];u==="left"||u==="center"||u==="right"?(o=i(u,"x"),s="50%"):u==="top"||u==="bottom"?(o="50%",s=i(u,"y")):(o=u,s="50%")}else{let u=r[0],l=r[1];u==="top"||u==="bottom"?(s=i(u,"y"),l==="left"||l==="right"||l==="center"?o=i(l,"x"):(o="50%",s=u==="top"||u==="bottom"?i(u,"y"):l)):(o=i(u,"x"),s=i(l,"y"))}let a=(u,l)=>{try{if(u.endsWith("%"))return l*parseFloat(u)/100;let f=new St(u);return f.type==="length"||f.type==="number"?f.value:0}catch{return 0}};return[a(o,t),a(s,n)]}async function nn({id:e,left:t,top:n,width:r,height:i,isInheritingTransform:o,src:s,debug:a},u,l){if(u.display==="none")return"";let f=!!s,c="rect",h="",m="",g=[],y=1,x="";u.backgroundColor&&g.push(u.backgroundColor),u.opacity!==void 0&&(y=+u.opacity),u.transform&&(h=en({left:t,top:n,width:r,height:i},u.transform,o,u.transformOrigin));let _="";if(u.backgroundImage){let J=[];for(let xe=0;xe<u.backgroundImage.length;xe++){let qe=u.backgroundImage[xe],Be=await tn({id:e+"_"+xe,width:r,height:i,left:t,top:n},qe,l);Be&&J.unshift(Be)}for(let xe of J)g.push(`url(#${xe[0]})`),m+=xe[1],xe[2]&&(_+=xe[2])}let[E,T]=await Co({id:e,left:t,top:n,width:r,height:i},u,l);m+=T;let R=E?`url(#${E})`:u._inheritedMaskId?`url(#${u._inheritedMaskId})`:void 0,P=er({left:t,top:n,width:r,height:i},u);P&&(c="path");let S=u._inheritedClipPathId;a&&(x=I("rect",{x:t,y:n,width:r,height:i,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:h||void 0,"clip-path":S?`url(#${S})`:void 0}));let{backgroundClip:A,filter:C}=u,G=A==="text"?`url(#satori_bct-${e})`:S?`url(#${S})`:u.clipPath?fl(e):void 0,V=Io({left:t,top:n,width:r,height:i,path:P,id:e,matrix:h,currentClipPath:G,src:s},u,l),[ee,re]=dl({id:e,left:t,top:n,width:r,height:i,path:P,type:c,matrix:h||void 0,currentClipPath:G,mask:R,filters:u._backdropFilters||[]});m+=ee;let pe=y!==1&&!f&&g.length===1&&!re&&!_&&!C&&!R&&!u.boxShadow&&!(u.borderTopWidth||u.borderRightWidth||u.borderBottomWidth||u.borderLeftWidth),ce=g.map(J=>I(c,{x:t,y:n,width:r,height:i,fill:J,"fill-opacity":pe?y:void 0,d:P||void 0,transform:h||void 0,"clip-path":u.transform?void 0:G,style:C?`filter:${C}`:void 0,mask:u.transform?void 0:R})).join(""),Ke=il({id:e,left:t,top:n,width:r,height:i,currentClipPathId:S,borderPath:P,borderType:c},u),Pe;if(f){let J=(u.borderLeftWidth||0)+(u.paddingLeft||0),xe=(u.borderTopWidth||0)+(u.paddingTop||0),qe=(u.borderRightWidth||0)+(u.paddingRight||0),Be=(u.borderBottomWidth||0)+(u.paddingBottom||0),Oe=r-J-qe,ne=i-xe-Be,ut=(u.objectPosition||"center").toString(),[Re,j]=Jp(ut,Oe,ne),q=u.__naturalWidth||Oe,he=u.__naturalHeight||ne,Ae,Ie=Oe,Le=ne,ue=t+J,Qe=n+xe;if(u.objectFit==="contain"){let rt=Oe/q,Me=ne/he,ge=Math.min(rt,Me);Ie=q*ge,Le=he*ge,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}else if(u.objectFit==="cover"){let rt=Oe/q,Me=ne/he,ge=Math.max(rt,Me);Ie=q*ge,Le=he*ge,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}else if(u.objectFit==="fill")Ae="none";else if(u.objectFit==="scale-down")if(q&&he){let rt=Oe/q,Me=ne/he,ge=Math.min(rt,Me);if(ge>=1)Ie=q,Le=he,Ae="none",ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne;else{let ze=ge;Ie=q*ze,Le=he*ze,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}}else{let rt=Oe/q,Me=ne/he,ge=Math.min(rt,Me);Ie=q*ge,Le=he*ge,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}else Ae="none";u.transform&&(Pe=rl({id:e,borderRadiusPath:P,borderType:c,left:t,top:n,width:r,height:i},u)),ce+=I("image",{x:ue,y:Qe,width:Ie,height:Le,href:s,preserveAspectRatio:Ae,transform:h||void 0,style:C?`filter:${C}`:void 0,"clip-path":u.transform?Pe?`url(#${Pe[1]})`:void 0:`url(#satori_cp-${e})`,mask:u.transform?void 0:E?`url(#${E})`:`url(#satori_om-${e})`})}if(Ke){m+=Ke[0];let J=Ke[1];ce+=rn({left:t,top:n,width:r,height:i,props:{transform:h||void 0,"clip-path":`url(#${J})`}},u)}let we=Gu({width:r,height:i,id:e,opacity:y,shape:I(c,{x:t,y:n,width:r,height:i,fill:"#fff",stroke:"#fff","stroke-width":0,d:P||void 0,transform:h||void 0,"clip-path":G,mask:R})},u),De=re+(_||ce);return u.transform&&(G||R)&&(De=I("g",{"clip-path":G||void 0,mask:R||void 0},De)),y!==1&&!pe&&(De=I("g",{opacity:y},De)),(m?I("defs",{},m):"")+(we?we[0]:"")+(Pe?Pe[0]:"")+V+De+(we?we[1]:"")+x}var hl=String.raw,pl=hl`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,ml=()=>new RegExp(hl`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${pl}(?:\u200D${pl})*`,"gu");var Zp=new RegExp(ml(),"u"),Lo={emoji:Zp,symbol:/\p{Symbol}/u,math:/\p{Math}/u},Mo={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},vi=Object.keys({...Mo,...Lo});function gl(e){return vi.includes(e)}function bl(e,t){for(let r of Object.keys(Lo))if(Lo[r].test(e))return[r];let n=Object.keys(Mo).filter(r=>Mo[r].test(e));if(n.length===0)return["unknown"];if(t){let r=n.findIndex(i=>i===t);r!==-1&&(n.splice(r,1),n.unshift(t))}return n}function yl(e){if(e)return vi.find(t=>t.toLowerCase().startsWith(e.toLowerCase()))}async function*on(e,t){var ut,Re;let n=await Zt(),{id:r,inheritedStyle:i,parent:o,font:s,debug:a,locale:u,embedFont:l=!0,graphemeImages:f,canLoadAdditionalAssets:c,getTwStyles:h}=t;if(e===null||typeof e>"u")return yield,yield,"";if(!_r(e)||qa(e.type)){let j;if(!_r(e))j=xo(String(e),t),yield(await j.next()).value;else{if(Ua(e.type))throw new Error("Class component is not supported.");let he;Hi(e.type)?he=e.type.render:he=e.type,j=on(await he(e.props),t),yield(await j.next()).value}await j.next();let q=yield;return(await j.next(q)).value}let{type:m,props:g}=e,y=m;if(g&&za(g))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:x,children:_,tw:E,lang:T=u}=g||{},R=yl(T);if(E){let j=h(E,x);x=Object.assign(j,x)}let P=n.Node.create();o.insertChild(P,o.getChildCount());let[S,A]=await co(P,y,i,x,g,t.replacedElements),C=S.transform===i.transform;if(C||(S.transform.__parent=i.transform),(S.overflow==="hidden"||S.clipPath&&S.clipPath!=="none")&&(A._inheritedClipPathId=`satori_cp-${r}`,A._inheritedMaskId=`satori_om-${r}`),S.maskImage&&(A._inheritedMaskId=`satori_mi-${r}`),S.backgroundClip==="text"){let j={value:""};A._inheritedBackgroundClipTextPath=j,S._inheritedBackgroundClipTextPath=j,S.backgroundImage&&(A._inheritedBackgroundClipTextHasBackground="true",S._inheritedBackgroundClipTextHasBackground="true")}let G=!!((ut=t.replacedElements)!=null&&ut[y]),V=G?[]:Ga(_),ee=[],re=0,pe=[];for(let j of V){let q=on(j,{id:r+"-"+re++,parentStyle:S,inheritedStyle:A,isInheritingTransform:!0,parent:P,font:s,embedFont:l,debug:a,graphemeImages:f,canLoadAdditionalAssets:c,locale:R,getTwStyles:h,onNodeDetected:t.onNodeDetected,replacedElements:t.replacedElements});c?pe.push(...(await q.next()).value||[]):await q.next(),ee.push(q)}yield pe;for(let j of ee)await j.next();let[ce,Ke]=yield,{left:Pe,top:we,width:De,height:J}=P.getComputedLayout();Pe+=ce,we+=Ke;let xe="",qe="",Be="",{children:Oe,...ne}=g;if((Re=t.onNodeDetected)==null||Re.call(t,{left:Pe,top:we,width:De,height:J,type:y,props:ne,key:e.key,textContent:_r(Oe)?void 0:Oe}),y==="img"||G){let j=S.__src;qe=await nn({id:r,left:Pe,top:we,width:De,height:J,src:j,isInheritingTransform:C,debug:a},S,A)}else if(y==="svg"){let j=S.color,q=await Eu(e,j);qe=await nn({id:r,left:Pe,top:we,width:De,height:J,src:q,isInheritingTransform:C,debug:a},S,A)}else{let j=x==null?void 0:x.display;if(y==="div"&&_&&typeof _!="string"&&j!=="flex"&&j!=="none"&&j!=="contents")throw new Error('Expected <div> to have explicit "display: flex", "display: contents", or "display: none" if it has more than one child node.');qe=await nn({id:r,left:Pe,top:we,width:De,height:J,isInheritingTransform:C,debug:a},S,A)}for(let j of ee)xe+=(await j.next([Pe,we])).value;return S._inheritedBackgroundClipTextPath&&(Be+=I("clipPath",{id:`satori_bct-${r}`,"clip-path":S._inheritedClipPathId?`url(#${S._inheritedClipPathId})`:void 0},S._inheritedBackgroundClipTextPath.value)),Be+qe+xe}var sn=at(require("@shuding/opentype.js"),1),_l=require("fflate");var vl=at(require("harfbuzzjs"),1),ht=null,xi=null,Fo=new WeakMap,No=typeof FinalizationRegistry=="function"?new FinalizationRegistry(e=>e.destroy()):null;async function xl(){if(!ht){if(xi){await xi;return}xi=(async()=>{if(ht=await vl.default,!ht||typeof ht.createBlob!="function")throw new Error("HarfBuzz module loaded but API is not available")})(),await xi}}function eh(e){if(!ht)throw new Error("HarfBuzz not initialized. Call initHarfBuzz() first.");if(Fo.has(e))return Fo.get(e);let t=e._rawFontData;if(!t)throw new Error("Font does not have _rawFontData. Make sure to store the original ArrayBuffer when loading fonts.");let n=ht.createBlob(new Uint8Array(t)),r=ht.createFace(n,0),i=ht.createFont(r);r.destroy(),n.destroy();let o=e.unitsPerEm;return i.setScale(o,o),Fo.set(e,i),No==null||No.register(e,i),i}function wl(e,t,n={}){if(!ht)throw new Error("HarfBuzz not initialized");if(!t||t.length===0)return[];let{features:r,language:i,script:o,direction:s}=n,a=eh(e),u=ht.createBuffer();try{u.addText(t),u.guessSegmentProperties(),i&&u.setLanguage(i),o&&u.setScript(o),s&&u.setDirection(s);let l;if(r&&Object.keys(r).length>0){let c=[];for(let[h,m]of Object.entries(r))typeof m=="boolean"?c.push(m?`+${h}`:`-${h}`):c.push(`${h}=${m}`);l=c.join(",")}return l?ht.shape(a,u,l):ht.shape(a,u),u.json(a)}finally{u.destroy()}}function Sl(e){if(!e||e==="normal")return{};let t={},n=e.split(",").map(r=>r.trim());for(let r of n){let i=r.match(/["']([a-z0-9]{4})["']\s*(?:(on|off|[0-9]+))?/i);if(i){let o=i[1],s=i[2];if(!s||s==="on"||s==="1")t[o]=!0;else if(s==="off"||s==="0")t[o]=!1;else{let a=parseInt(s,10);isNaN(a)||(t[o]=a)}}}return t}var th=256;function rh(e){return/^\s$/.test(e)}function nh(e,t){if(!e)return[];let n=Fe(e,"grapheme"),r=[],i="",o=null;for(let s of n){let a;rh(s)&&o!==null&&o.charToGlyphIndex(s)?a=o:a=t(s),o===null?(o=a,i=s):a===o?i+=s:(r.push([i,o]),i=s,o=a)}return i&&o&&r.push([i,o]),r}function ih(e){let t=new DataView(e),n=t.getUint16(12),r=t.getUint32(16),i=new ArrayBuffer(r),o=new DataView(i),s=new Uint8Array(i);o.setUint32(0,t.getUint32(4)),o.setUint16(4,n);let a=Math.floor(Math.log2(n)),u=(1<<a)*16;o.setUint16(6,u),o.setUint16(8,a),o.setUint16(10,n*16-u);let l=12+n*16;for(let f=0;f<n;f++){let c=44+f*20,h=t.getUint32(c),m=t.getUint32(c+4),g=t.getUint32(c+8),y=t.getUint32(c+12),x=t.getUint32(c+16),_=12+f*16;if(o.setUint32(_,h),o.setUint32(_+4,x),o.setUint32(_+8,l),o.setUint32(_+12,y),g<y){let E=new Uint8Array(e,m+2,g-2),T=new Uint8Array(y);(0,_l.inflateSync)(E,T),s.set(T,l)}else s.set(new Uint8Array(e,m,y),l);l+=y+3&-4}return i}var El="unknown";function oh(e){let t=[],n=[0,0],r=[0,0],i=(o,s)=>{let a=o[0];for(let u=1;u<=s;u++){let l=u/s,f=sh(o,l);t.push({from:a,to:f}),a=f}r=o[o.length-1]};for(let o of e){if(o.type==="M"){n=r=[o.x,o.y];continue}if(o.type==="L"){let s=[o.x,o.y];t.push({from:r,to:s}),r=s;continue}if(o.type==="Q"){i([r,[o.x1,o.y1],[o.x,o.y]],12);continue}if(o.type==="C"){i([r,[o.x1,o.y1],[o.x2,o.y2],[o.x,o.y]],16);continue}o.type==="Z"&&(t.push({from:r,to:n}),r=n)}return t}function sh(e,t){let n=e;for(;n.length>1;){let r=[];for(let i=0;i<n.length-1;i++)r.push([n[i][0]+(n[i+1][0]-n[i][0])*t,n[i][1]+(n[i+1][1]-n[i][1])*t]);n=r}return n[0]}function ah(e,t){if(!t)return[];let n=t.strokeWidth,r=t.underlineY-n*.25,i=t.underlineY+n*2.5,o=oh(e);if(!o.length)return[];let s=i-r,a=Math.max(12,Math.ceil(s/.25)),u=s/a,l=r+u/2,f=new Set;for(let T=0;T<a;T++){let R=l+u*T,P=[];for(let S of o){let[A,C]=S.from,[G,V]=S.to;if(C===V)continue;let ee=Math.min(C,V),re=Math.max(C,V);if(R<ee||R>=re)continue;let pe=(R-C)/(V-C),ce=A+(G-A)*pe;P.push(ce)}if(P.length){P.sort((S,A)=>S-A);for(let S=0;S<P.length-1;S+=2){let A=Math.min(P[S],P[S+1]),C=Math.max(P[S],P[S+1]),G=Math.floor(A),V=Math.ceil(C);for(let ee=G;ee<V;ee++)f.add(ee)}}}if(!f.size)return[];let c=Array.from(f.values()).sort((T,R)=>T-R),h=[],m=c[0],g=c[0];for(let T=1;T<c.length;T++){let R=c[T];R>g+1&&(h.push([m,g+1]),m=R),g=R}h.push([m,g+1]);let y=[],x=n*.6,_=h[0][0],E=h[h.length-1][1];for(let[T,R]of h){let P=Math.min(T,_)-x,S=Math.max(R,E)+x;y.push({x1:P,x2:S,y1:r,y2:i})}return y}function uh(e,t,[n,r],[i,o]){if(n!==i)return n?!i||n===e?-1:i===e?1:e===400&&n===500||e===500&&n===400?-1:e===400&&i===500||e===500&&i===400?1:e<400?n<e&&i<e?i-n:n<e?-1:i<e?1:n-i:e<n&&e<i?n-i:e<n?-1:e<i?1:i-n:1;if(r!==o){if(r===t)return-1;if(o===t)return 1}return-1}var Do=new WeakMap,an=class{constructor(t){this.fonts=new Map;this.shapedRunCache=new Map;this.addFonts(t)}get({name:t,weight:n,style:r}){if(!this.fonts.has(t))return null;n==="normal"&&(n=400),n==="bold"&&(n=700),typeof n=="string"&&(n=Number.parseInt(n,10));let i=[...this.fonts.get(t)],o=i[0];for(let s=1;s<i.length;s++){let[,a,u]=o,[,l,f]=i[s];uh(n,r,[a,u],[l,f])>0&&(o=i[s])}return o[0]}addFonts(t){t.length&&this.fonts.size&&this.shapedRunCache.clear();for(let n of t){let{name:r,data:i,lang:o}=n;if(o&&!gl(o))throw new Error(`Invalid value for props \`lang\`: "${o}". The value must be one of the following: ${vi.join(", ")}.`);let s=o??El,a;if(Do.has(i))a=Do.get(i);else{let l="buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i;a=sn.default.parse(l,{lowMemory:!0});let f=new Uint8Array(l),c=f[0]===119&&f[1]===79&&f[2]===70&&f[3]===70;a._rawFontData=c?ih(l):l;let h=a.charToGlyphIndex;a.charToGlyphIndex=m=>{let g=h.call(a,m);return g===0&&a._trackBrokenChars&&a._trackBrokenChars.push(m),g},Do.set(i,a)}this.defaultFont||(this.defaultFont=a);let u=`${r.toLowerCase()}_${s}`;this.fonts.has(u)||this.fonts.set(u,[]),this.fonts.get(u).push([a,n.weight,n.style])}}getEngine(t=16,n="normal",{fontFamily:r="sans-serif",fontWeight:i=400,fontStyle:o="normal"},s){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");r=(Array.isArray(r)?r:[r]).map(S=>S.toLowerCase());let a=[];r.forEach(S=>{let A=this.get({name:S,weight:i,style:o});if(A){a.push(A);return}let C=this.get({name:S+"_unknown",weight:i,style:o});if(C){a.push(C);return}});let u=Array.from(this.fonts.keys()),l=[],f=[],c=[];for(let S of u)if(!r.includes(S))if(s){let A=lh(S);A?A===s?l.push(this.get({name:S,weight:i,style:o})):f.push(this.get({name:S,weight:i,style:o})):c.push(this.get({name:S,weight:i,style:o}))}else c.push(this.get({name:S,weight:i,style:o}));let h=new Map,m=(S,A=!0)=>{let C=[...a,...c,...l,...A?f:[]];if(typeof S>"u")return A?C[C.length-1]:void 0;let G=S.charCodeAt(0);if(h.has(G))return h.get(G);let V=C.find((ee,re)=>!!ee.charToGlyphIndex(S)||A&&re===C.length-1);return V&&h.set(G,V),V},g=(S,A=!1)=>{var G,V;return((A?(V=(G=S.tables)==null?void 0:G.os2)==null?void 0:V.sTypoAscender:0)||S.ascender)/S.unitsPerEm*t},y=(S,A=!1)=>{var G,V;return((A?(V=(G=S.tables)==null?void 0:G.os2)==null?void 0:V.sTypoDescender:0)||S.descender)/S.unitsPerEm*t},x=(S,A=!1)=>{var C,G;if(typeof n=="string"&&n==="normal"){let V=(A?(G=(C=S.tables)==null?void 0:C.os2)==null?void 0:G.sTypoLineGap:0)||0;return g(S,A)-y(S,A)+V/S.unitsPerEm*t}else if(typeof n=="number")return t*n},_=S=>m(S,!1),E=this.shapedRunCache,T=`${r.join(",")}|${i}|${o}|${s||""}`,R=(S,A)=>{let C=`${T}\0${A||""}\0${S}`,G=E.get(C);if(G!==void 0)return E.delete(C),E.set(C,G),G;let V=A?Sl(A):{},ee=nh(S,m).map(([re,pe])=>[re,pe,wl(pe,re,{features:V})]);if(E.size>=th){let re=E.keys().next().value;re!==void 0&&E.delete(re)}return E.set(C,ee),ee};return{has:S=>{if(S===`
6
+ in CSS rule \`${c}: ${m}\`.${Mu(c)}`))}}}if(n.backgroundImage){let{backgrounds:u}=(0,Du.parseElementStyle)(n);n.backgroundImage=u}(n.maskImage||n.WebkitMaskImage)&&(n.maskImage=Ou(n));let a=bp(n.fontSize,t.fontSize);typeof n.fontSize<"u"&&(n.fontSize=a),n.transformOrigin&&(n.transformOrigin=uo(n.transformOrigin,a));for(let u in n){let l=n[u];if(u==="lineHeight")typeof l=="string"&&l!=="normal"&&(l=n[u]=K(l,a,a,t,!0)/a);else{if(typeof l=="string"){let f=K(l,a,a,t);typeof f<"u"&&(n[u]=f),l=n[u]}if(typeof l=="string"||typeof l=="object"){let f=Bu(l);f&&(n[u]=f),l=n[u]}}if(u==="opacity"&&typeof l=="number"&&(n.opacity=l*t.opacity),u==="transform"){let f=l;for(let c of f){let h=Object.keys(c)[0],m=c[h],g=typeof m=="string"?K(m,a,a,t)??m:m;c[h]=g}}if(u==="textShadowRadius"){let f=l;n.textShadowRadius=f.map(c=>K(c,a,0,t,!1))}if(u==="textShadowOffset"){let f=l;n.textShadowOffset=f.map(({height:c,width:h})=>({height:K(c,a,0,t,!1),width:K(h,a,0,t,!1)}))}}return n}function bp(e,t){if(typeof e=="number")return e;try{let n=new St(e);switch(n.unit){case"em":return n.value*t;case"rem":return n.value*16}}catch{return t}}function Nu(e){if(e.startsWith("hsl")){let t=(0,$u.default)(e),[n,r,i]=t.values;return`hsl(${[n,`${r}%`,`${i}%`].concat(t.alpha===1?[]:[t.alpha]).join(",")})`}return e}function yp(e,t){return e&&e.toLowerCase()!=="currentcolor"?Nu(e):Nu(t)}function vp(e,t){return e.replace(/currentcolor/gi,t)}function xp(e,t){return Xn(e)&&(e=vp(e,t)),e}function wp(e,t,n,r,i,o){let s=r/n,a=(t.borderLeftWidth||0)+(t.borderRightWidth||0)+(t.paddingLeft||0)+(t.paddingRight||0),u=(t.borderTopWidth||0)+(t.borderBottomWidth||0)+(t.paddingTop||0)+(t.paddingBottom||0),l=t.width||i,f=t.height||o,c=typeof l=="number"&&typeof f=="number";c&&(l=l-a,f=f-u),l===void 0&&f===void 0?(l="100%",e.setAspectRatio(1/s)):l===void 0?typeof f=="number"?l=f/s:e.setAspectRatio(1/s):f===void 0&&(typeof l=="number"?f=l*s:e.setAspectRatio(1/s)),t.width=c?l+a:l,t.height=c?f+u:f,t.__naturalWidth=n,t.__naturalHeight=r}async function co(e,t,n,r,i,o){var u;let s=await Zt(),a=Object.assign({},n,ui(Tu[t],n),ui(r,n));if(t==="img"){let[l,f,c]=await Rr(i.src);if(f===void 0&&c===void 0){if(i.width===void 0||i.height===void 0)throw new Error("Image size cannot be determined. Please provide the width and height of the image.");f=parseInt(i.width),c=parseInt(i.height)}wp(e,a,f,c,i.width,i.height),a.__src=l}if(await((u=o==null?void 0:o[t])==null?void 0:u.call(o,e,a,i)),t==="svg"){let l=i.viewBox||i.viewbox,f=Er(l),c=f?f[3]/f[2]:null,{width:h,height:m}=i;typeof h>"u"&&m?c==null?h=0:typeof m=="string"&&m.endsWith("%")?h=parseInt(m)/c+"%":(m=K(m,n.fontSize,1,n),h=m/c):typeof m>"u"&&h?c==null?h=0:typeof h=="string"&&h.endsWith("%")?m=parseInt(h)*c+"%":(h=K(h,n.fontSize,1,n),m=h*c):(typeof h<"u"&&(h=K(h,n.fontSize,1,n)||h),typeof m<"u"&&(m=K(m,n.fontSize,1,n)||m),h||=f==null?void 0:f[2],m||=f==null?void 0:f[3]),!a.width&&h&&(a.width=h),!a.height&&m&&(a.height=m)}return e.setDisplay(Xe(a.display,{flex:s.DISPLAY_FLEX,block:s.DISPLAY_FLEX,contents:s.DISPLAY_CONTENTS,none:s.DISPLAY_NONE,"-webkit-box":s.DISPLAY_FLEX},s.DISPLAY_FLEX,"display")),e.setAlignContent(Xe(a.alignContent,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,"space-between":s.ALIGN_SPACE_BETWEEN,"space-around":s.ALIGN_SPACE_AROUND,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignContent")),e.setAlignItems(Xe(a.alignItems,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_STRETCH,"alignItems")),e.setAlignSelf(Xe(a.alignSelf,{stretch:s.ALIGN_STRETCH,center:s.ALIGN_CENTER,"flex-start":s.ALIGN_FLEX_START,"flex-end":s.ALIGN_FLEX_END,baseline:s.ALIGN_BASELINE,normal:s.ALIGN_AUTO},s.ALIGN_AUTO,"alignSelf")),e.setJustifyContent(Xe(a.justifyContent,{center:s.JUSTIFY_CENTER,"flex-start":s.JUSTIFY_FLEX_START,"flex-end":s.JUSTIFY_FLEX_END,"space-between":s.JUSTIFY_SPACE_BETWEEN,"space-around":s.JUSTIFY_SPACE_AROUND},s.JUSTIFY_FLEX_START,"justifyContent")),e.setFlexDirection(Xe(a.flexDirection,{row:s.FLEX_DIRECTION_ROW,column:s.FLEX_DIRECTION_COLUMN,"row-reverse":s.FLEX_DIRECTION_ROW_REVERSE,"column-reverse":s.FLEX_DIRECTION_COLUMN_REVERSE},s.FLEX_DIRECTION_ROW,"flexDirection")),e.setFlexWrap(Xe(a.flexWrap,{wrap:s.WRAP_WRAP,nowrap:s.WRAP_NO_WRAP,"wrap-reverse":s.WRAP_WRAP_REVERSE},s.WRAP_NO_WRAP,"flexWrap")),typeof a.gap<"u"&&e.setGap(s.GUTTER_ALL,a.gap),typeof a.rowGap<"u"&&e.setGap(s.GUTTER_ROW,a.rowGap),typeof a.columnGap<"u"&&e.setGap(s.GUTTER_COLUMN,a.columnGap),typeof a.flexBasis<"u"&&e.setFlexBasis(Jt(a.flexBasis,"flexBasis")),e.setFlexGrow(typeof a.flexGrow>"u"?0:a.flexGrow),e.setFlexShrink(typeof a.flexShrink>"u"?0:a.flexShrink),typeof a.maxHeight<"u"&&e.setMaxHeight(Gt(a.maxHeight,"maxHeight")),typeof a.maxWidth<"u"&&e.setMaxWidth(Gt(a.maxWidth,"maxWidth")),typeof a.minHeight<"u"&&e.setMinHeight(Gt(a.minHeight,"minHeight")),typeof a.minWidth<"u"&&e.setMinWidth(Gt(a.minWidth,"minWidth")),e.setOverflow(Xe(a.overflow,{visible:s.OVERFLOW_VISIBLE,hidden:s.OVERFLOW_HIDDEN},s.OVERFLOW_VISIBLE,"overflow")),e.setMargin(s.EDGE_TOP,Jt(a.marginTop||0)),e.setMargin(s.EDGE_BOTTOM,Jt(a.marginBottom||0)),e.setMargin(s.EDGE_LEFT,Jt(a.marginLeft||0)),e.setMargin(s.EDGE_RIGHT,Jt(a.marginRight||0)),e.setBorder(s.EDGE_TOP,a.borderTopWidth||0),e.setBorder(s.EDGE_BOTTOM,a.borderBottomWidth||0),e.setBorder(s.EDGE_LEFT,a.borderLeftWidth||0),e.setBorder(s.EDGE_RIGHT,a.borderRightWidth||0),e.setPadding(s.EDGE_TOP,a.paddingTop||0),e.setPadding(s.EDGE_BOTTOM,a.paddingBottom||0),e.setPadding(s.EDGE_LEFT,a.paddingLeft||0),e.setPadding(s.EDGE_RIGHT,a.paddingRight||0),e.setBoxSizing(Xe(a.boxSizing,{"border-box":s.BOX_SIZING_BORDER_BOX,"content-box":s.BOX_SIZING_CONTENT_BOX},s.BOX_SIZING_BORDER_BOX,"boxSizing")),e.setPositionType(Xe(a.position,{absolute:s.POSITION_TYPE_ABSOLUTE,relative:s.POSITION_TYPE_RELATIVE,static:s.POSITION_TYPE_STATIC},s.POSITION_TYPE_RELATIVE,"position")),typeof a.top<"u"&&e.setPosition(s.EDGE_TOP,Gt(a.top,"top")),typeof a.bottom<"u"&&e.setPosition(s.EDGE_BOTTOM,Gt(a.bottom,"bottom")),typeof a.left<"u"&&e.setPosition(s.EDGE_LEFT,Gt(a.left,"left")),typeof a.right<"u"&&e.setPosition(s.EDGE_RIGHT,Gt(a.right,"right")),typeof a.height<"u"?e.setHeight(Jt(a.height,"height")):e.setHeightAuto(),typeof a.width<"u"?e.setWidth(Jt(a.width,"width")):e.setWidthAuto(),[a,so(a)]}var po=at(require("escape-html"),1);var Uu=[1,0,0,1,0,0];function Sp(e,t,n){let r=[...Uu];for(let i of e){let o=Object.keys(i)[0],s=i[o];if(typeof s=="string")if(o==="translateX")s=parseFloat(s)/100*t,i[o]=s;else if(o==="translateY")s=parseFloat(s)/100*n,i[o]=s;else throw new Error(`Invalid transform: "${o}: ${s}".`);let a=s,u=[...Uu];switch(o){case"translateX":u[4]=a;break;case"translateY":u[5]=a;break;case"scale":u[0]=a,u[3]=a;break;case"scaleX":u[0]=a;break;case"scaleY":u[3]=a;break;case"rotate":{let l=a*Math.PI/180,f=Math.cos(l),c=Math.sin(l);u[0]=f,u[1]=c,u[2]=-c,u[3]=f;break}case"skewX":u[2]=Math.tan(a*Math.PI/180);break;case"skewY":u[1]=Math.tan(a*Math.PI/180);break}r=Yr(u,r)}e.splice(0,e.length),e.push(...r),e.__resolved=!0}function en({left:e,top:t,width:n,height:r},i,o,s){let a;i.__resolved||Sp(i,n,r);let u=i;if(o)a=u;else{let l=(s==null?void 0:s.xAbsolute)??((s==null?void 0:s.xRelative)??50)*n/100,f=(s==null?void 0:s.yAbsolute)??((s==null?void 0:s.yRelative)??50)*r/100,c=e+l,h=t+f;a=Yr([1,0,0,1,c,h],Yr(u,[1,0,0,1,-c,-h])),u.__parent&&(a=Yr(u.__parent,a)),u.splice(0,6,...a)}return`matrix(${a.map(l=>+l.toFixed(6)).join(",")})`}function qu({left:e,top:t,width:n,height:r,isInheritingTransform:i},o){let s="",a=1;return o.transform&&(s=en({left:e,top:t,width:n,height:r},o.transform,i,o.transformOrigin)),o.opacity!==void 0&&(a=+o.opacity),{matrix:s,opacity:a}}function ho({id:e,content:t,filter:n,left:r,top:i,width:o,height:s,matrix:a,opacity:u,image:l,clipPathId:f,debug:c,shape:h,decorationShape:m},g){let y="";if(c&&(y=I("rect",{x:r,y:i-s,width:o,height:s,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0})),l){let E={href:l,x:r,y:i,width:o,height:s,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:g.filter?`filter:${g.filter}`:void 0},T=I("image",{...E,opacity:u!==1?u:void 0})+(m||"");return[(n?n+I("g",{filter:`url(#satori_s-${e})`},T):T)+y,""]}let x={x:r,y:i,width:o,height:s,"font-weight":g.fontWeight,"font-style":g.fontStyle,"font-size":g.fontSize,"font-family":g.fontFamily,"letter-spacing":g.letterSpacing||void 0,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:g.filter?`filter:${g.filter}`:void 0,"stroke-width":g.WebkitTextStrokeWidth?`${g.WebkitTextStrokeWidth}px`:void 0,stroke:g.WebkitTextStrokeWidth?g.WebkitTextStrokeColor:void 0,"stroke-linejoin":g.WebkitTextStrokeWidth?"round":void 0,"paint-order":g.WebkitTextStrokeWidth?"stroke":void 0},_=I("text",{...x,fill:g.color,opacity:u!==1?u:void 0},(0,po.default)(t))+(m||"");return[(n?n+I("g",{filter:`url(#satori_s-${e})`},_):_)+y,h?I("text",x,(0,po.default)(t)):""]}function _p(e,t,n){return e.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,i,o,s){return i+(parseFloat(o)+t)+","+(parseFloat(s)+n)})}var li=1.1;function zu({id:e,width:t,height:n},r,i=!1){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let o=r.shadowColor.length,s="",a="",u=0,l=t,f=0,c=n;for(let h=0;h<o;h++){let m=r.shadowRadius[h]*r.shadowRadius[h]/4;if(u=Math.min(r.shadowOffset[h].width-m,u),l=Math.max(r.shadowOffset[h].width+m+t,l),f=Math.min(r.shadowOffset[h].height-m,f),c=Math.max(r.shadowOffset[h].height+m+n,c),i){let g=`satori_s-${e}-result-${h}`;s+=I("feGaussianBlur",{in:"SourceAlpha",stdDeviation:r.shadowRadius[h]/2,result:`${g}-blur`})+I("feOffset",{in:`${g}-blur`,dx:r.shadowOffset[h].width,dy:r.shadowOffset[h].height,result:`${g}-offset`})+I("feFlood",{"flood-color":r.shadowColor[h],"flood-opacity":1,result:`${g}-color`})+I("feComposite",{in:`${g}-color`,in2:`${g}-offset`,operator:"in",result:o>1?g:void 0})}else s+=I("feDropShadow",{dx:r.shadowOffset[h].width,dy:r.shadowOffset[h].height,stdDeviation:r.shadowRadius[h]/2,"flood-color":r.shadowColor[h],"flood-opacity":1,...o>1?{in:"SourceGraphic",result:`satori_s-${e}-result-${h}`}:{}});o>1&&(a=I("feMergeNode",{in:`satori_s-${e}-result-${h}`})+a)}return I("filter",{id:`satori_s-${e}`,x:(u/t*100*li).toFixed(2)+"%",y:(f/n*100*li).toFixed(2)+"%",width:((l-u)/t*100*li).toFixed(2)+"%",height:((c-f)/n*100*li).toFixed(2)+"%"},s+(a?I("feMerge",{},a):""))}function Gu({width:e,height:t,shape:n,opacity:r,id:i},o){if(!o.boxShadow)return null;let s="",a="";for(let u=o.boxShadow.length-1;u>=0;u--){let l="",f=o.boxShadow[u];f.spreadRadius&&f.inset&&(f.spreadRadius=-f.spreadRadius);let c=f.blurRadius*f.blurRadius/4+(f.spreadRadius||0),h=Math.min(-c-(f.inset?f.offsetX:0),0),m=Math.max(c+e-(f.inset?f.offsetX:0),e),g=Math.min(-c-(f.inset?f.offsetY:0),0),y=Math.max(c+t-(f.inset?f.offsetY:0),t),x=`satori_s-${i}-${u}`,_=`satori_ms-${i}-${u}`,E=f.spreadRadius?n.replace('stroke-width="0"',`stroke-width="${f.spreadRadius*2}"`):n;l+=I("mask",{id:_,maskUnits:"userSpaceOnUse"},I("rect",{x:0,y:0,width:o._viewportWidth||"100%",height:o._viewportHeight||"100%",fill:f.inset?"#000":"#fff"})+E.replace('fill="#fff"',f.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let T=E.replace(/d="([^"]+)"/,(R,P)=>'d="'+_p(P,f.offsetX,f.offsetY)+'"').replace(/x="([^"]+)"/,(R,P)=>'x="'+(parseFloat(P)+f.offsetX)+'"').replace(/y="([^"]+)"/,(R,P)=>'y="'+(parseFloat(P)+f.offsetY)+'"');f.spreadRadius&&f.spreadRadius<0&&(l+=I("mask",{id:_+"-neg",maskUnits:"userSpaceOnUse"},T.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-f.spreadRadius*2}"`))),f.spreadRadius&&f.spreadRadius<0&&(T=I("g",{mask:`url(#${_}-neg)`},T)),l+=I("defs",{},I("filter",{id:x,x:`${h/e*100}%`,y:`${g/t*100}%`,width:`${(m-h)/e*100}%`,height:`${(y-g)/t*100}%`},I("feGaussianBlur",{stdDeviation:f.blurRadius/2,result:"b"})+I("feFlood",{"flood-color":f.color,in:"SourceGraphic",result:"f"})+I("feComposite",{in:"f",in2:"b",operator:f.inset?"out":"in"})))+I("g",{mask:`url(#${_})`,filter:`url(#${x})`,opacity:r},T),f.inset?a+=l:s+=l}return[s,a]}function Ep(e,t,n,r,i,o){let s=i/2,a=Math.max(s,i*1.25),u=[];for(let c of n){if(c.y2<o+s||c.y1>r+s)continue;let h=Math.max(e,c.x1-a),m=Math.min(t,c.x2+a);if(h>=m)continue;if(u.length===0){u.push([h,m]);continue}let g=u[u.length-1];h<=g[1]?g[1]=Math.max(g[1],m):u.push([h,m])}if(!u.length)return[[e,t]];let l=[],f=e;for(let[c,h]of u)if(c>f&&l.push([f,c]),f=Math.max(f,h),f>=t)break;return f<t&&l.push([f,t]),l}function mo({width:e,left:t,top:n,ascender:r,clipPathId:i,matrix:o,glyphBoxes:s},a){let{textDecorationColor:u,textDecorationStyle:l,textDecorationLine:f,textDecorationSkipInk:c,fontSize:h,color:m}=a;if(!f||f==="none")return"";let g=Math.max(1,h*.1),y=f==="line-through"?n+r*.7:f==="underline"?n+r*1.1:n,x=l==="dashed"?`${g*1.2} ${g*2}`:l==="dotted"?`0 ${g*2}`:void 0,_=f==="underline"&&(c||"auto")!=="none"&&(s==null?void 0:s.length),E=n+r,T=_?Ep(t,t+e,s,y,g,E):[[t,t+e]],R=l==="double"?T.map(([S,A])=>I("line",{x1:S,y1:y+g+1,x2:A,y2:y+g+1,stroke:u||m,"stroke-width":g,"stroke-dasharray":x,"stroke-linecap":l==="dotted"?"round":"square",transform:o})).join(""):"",P=T.map(([S,A])=>I("line",{x1:S,y1:y,x2:A,y2:y,stroke:u||m,"stroke-width":g,"stroke-dasharray":x,"stroke-linecap":l==="dotted"?"round":"square",transform:o})).join("")+R;return i?I("g",{"clip-path":`url(#${i})`},P):P}function go(e){return e=e.replace("U+","0x"),String.fromCodePoint(Number(e))}var cr=go("U+0020"),bo=go("U+0009"),Ar=go("U+2026");function ju(e,t,n){let{fontSize:r,letterSpacing:i,fontFeatureSettings:o}=n,s=new Map;function a(c){let h=s.get(c);return h===void 0&&(h=e.measure(c,{fontSize:r,letterSpacing:i,fontFeatureSettings:o}),s.set(c,h)),h}function u(c){return a(c)}function l(c){let h=0,m="",g=()=>{m&&(h+=a(m),m="")};for(let y of c)t(y)?(g(),h+=r):m+=y;return g(),h}function f(c){return l(Fe(c,"grapheme"))}return{measureGrapheme:u,measureGraphemeArray:l,measureText:f}}function Vu(e,t,n){let{textTransform:r,whiteSpace:i,wordBreak:o}=t;e=Tp(e,r,n);let{content:s,shouldCollapseTabsAndSpaces:a,allowSoftWrap:u}=Op(e,i),{words:l,requiredBreaks:f,allowBreakWord:c}=Pp(s,o),[h,m]=kp(t,u);return{words:l,requiredBreaks:f,allowSoftWrap:u,allowBreakWord:c,processedContent:s,shouldCollapseTabsAndSpaces:a,lineLimit:h,blockEllipsis:m}}function Tp(e,t,n){return t==="uppercase"?e=e.toLocaleUpperCase(n):t==="lowercase"?e=e.toLocaleLowerCase(n):t==="capitalize"&&(e=Fe(e,"word",n).map(r=>Fe(r,"grapheme",n).map((i,o)=>o===0?i.toLocaleUpperCase(n):i).join("")).join("")),e}function kp(e,t){let{textOverflow:n,lineClamp:r,WebkitLineClamp:i,WebkitBoxOrient:o,overflow:s,display:a}=e;if(a==="block"&&r){let[u,l=Ar]=Rp(r);if(u)return[u,l]}return n==="ellipsis"&&a==="-webkit-box"&&o==="vertical"&&Xa(i)&&i>0?[i,Ar]:n==="ellipsis"&&s==="hidden"&&!t?[1,Ar]:[1/0]}function Pp(e,t){let n=["break-all","break-word"].includes(t),{words:r,requiredBreaks:i}=Qa(e,t);return{words:r,requiredBreaks:i,allowBreakWord:n}}function Op(e,t){let n=["pre","pre-wrap","pre-line"].includes(t),r=["normal","nowrap","pre-line"].includes(t),i=!["pre","nowrap"].includes(t);return n||(e=e.replace(/\n/g,cr)),r&&(e=e.replace(/([ ]|\t)+/g,cr).replace(/^[ ]|[ ]$/g,"")),{content:e,shouldCollapseTabsAndSpaces:r,allowSoftWrap:i}}function Rp(e){if(typeof e=="number")return[e];let t=/^(\d+)\s*"(.*)"$/,n=/^(\d+)\s*'(.*)'$/,r=t.exec(e),i=n.exec(e);if(r){let o=+r[1],s=r[2];return[o,s]}else if(i){let o=+i[1],s=i[2];return[o,s]}return[]}var vo=at(require("parse-css-color"),1),Ap=new Set([bo]);function Ip(e){return Ap.has(e)}function yo(e){if(e==="transparent")return!0;let t=(0,vo.default)(e);return t?t.alpha===0:!1}function Hu(e){if(!e)return!1;let t=(0,vo.default)(e);if(!t)return!1;let[n,r,i,o]=t.values;return n===255&&r===255&&i===255&&(o===void 0||o===1)}async function*xo(e,t){let n=await Zt(),{parentStyle:r,inheritedStyle:i,parent:o,font:s,id:a,isInheritingTransform:u,debug:l,embedFont:f,graphemeImages:c,locale:h,canLoadAdditionalAssets:m}=t,{textAlign:g,textIndent:y=0,lineHeight:x,textWrap:_,fontSize:E,filter:T,tabSize:R=8,letterSpacing:P,fontFeatureSettings:S,_inheritedBackgroundClipTextPath:A,_inheritedBackgroundClipTextHasBackground:C,flexShrink:G}=r,{words:V,requiredBreaks:ee,allowSoftWrap:re,allowBreakWord:pe,processedContent:ce,shouldCollapseTabsAndSpaces:Ke,lineLimit:Pe,blockEllipsis:we}=Vu(e,r,h),De=Cp(n,g);o.insertChild(De,o.getChildCount()),Ka(G)&&o.setFlexShrink(1);let J=s.getEngine(E,x,r,h),xe=m?Fe(ce,"grapheme").filter(Y=>!Ip(Y)&&!J.has(Y)):[];yield xe.map(Y=>({word:Y,locale:h})),xe.length&&(J=s.getEngine(E,x,r,h));function qe(Y){return!!(c&&Object.prototype.hasOwnProperty.call(c,Y)&&c[Y])}let{measureGrapheme:Be,measureGraphemeArray:Oe,measureText:ne}=ju(J,qe,{fontSize:E,letterSpacing:P,fontFeatureSettings:S}),ut=Xn(R)?K(R,E,1,r):Be(cr)*R,Re=(Y,Q)=>{if(Y.length===0)return{originWidth:0,endingSpacesWidth:0,text:Y};let{index:te,tabCount:Z}=Lp(Y),Te=0;if(Z>0){let be=Y.slice(0,te),fe=Y.slice(te+Z),ie=ne(be),lt=ie+Q;Te=(ut===0?ie:(Math.floor(lt/ut)+Z)*ut)+ne(fe)}else Te=ne(Y);let le=Y.trimEnd()===Y?Te:ne(Y.trimEnd());return{originWidth:Te,endingSpacesWidth:Te-le,text:Y}},j=[],q=[],he=[],Ae=[],Ie=[];function Le(Y){let Q=0,te=0,Z=-1,Te=0,le=0,be=0,fe=0;j=[],he=[0],Ae=[],Ie=[];let ie=0,lt=0;for(;ie<V.length&&Q<Pe;){let X=V[ie],It=ee[ie],je=0,{originWidth:Ve,endingSpacesWidth:ot,text:Bt}=Re(X,le);X=Bt,je=Ve;let He=ot;It&&be===0&&(be=J.height(X));let Ut=g==="justify",Se=ie&&le+je>Y+He&&re;if(pe&&je>Y&&(!le||Se||It)){let Je=Fe(X,"grapheme");V.splice(ie,1,...Je),le>0&&(j.push(le-lt),q.push(fe),Q++,Te+=be,le=0,be=0,fe=0,he.push(1),Z=-1),lt=He;continue}if(It||Se)Ke&&X===cr&&(je=0),j.push(le-lt),q.push(fe),Q++,Te+=be,le=je,be=je?Math.round(J.height(X)):0,fe=je?Math.round(J.baseline(X)):0,he.push(1),Z=-1,It||(te=Math.max(te,Y));else{le+=je;let Je=Math.round(J.height(X));Je>be&&(be=Je,fe=Math.round(J.baseline(X))),Ut&&he[he.length-1]++}Ut&&Z++,te=Math.max(te,le);let ft=le-je;if(je===0)Ie.push({y:Te,x:ft,width:0,line:Q,lineIndex:Z,isImage:!1});else{let Je=Fe(X,"word");for(let ct=0;ct<Je.length;ct++){let xt=Je[ct],Ye=0,dt=!1;qe(xt)?(Ye=E,dt=!0):!f&&xt.length>1?Ye=ne(xt):Ye=Be(xt),Ae.push(xt),Ie.push({y:Te,x:ft,width:Ye,line:Q,lineIndex:Z,isImage:dt}),ft+=Ye,ct<Je.length-1&&P>0&&(ft+=P)}}ie++,lt=He}return le&&(Q<Pe&&(Te+=be),Q++,j.push(le),q.push(fe)),{width:te,height:Te}}let ue={width:0,height:0};De.setMeasureFunc(Y=>{let{width:Q,height:te}=Le(Y);if(_==="balance"){let Te=Q/2,le=Q,be=Q;for(;Te+1<le;){be=(Te+le)/2;let{height:ie}=Le(be);ie>te?Te=be:le=be}Le(le);let fe=Math.ceil(le);return ue={width:fe,height:te},{width:fe,height:te}}if(_==="pretty"&&j[j.length-1]<Q/3){let be=Q*.9,fe=Le(be);if(fe.height<=te*1.3)return ue={width:Q,height:fe.height},{width:Q,height:fe.height}}let Z=Math.ceil(Q);return ue={width:Z,height:te},{width:Z,height:te}});let[Qe,rt]=yield,Me="",ge="",ze=i._inheritedClipPathId,kt=i._inheritedMaskId,{left:Wr,top:$r,width:Dt,height:Br}=De.getComputedLayout(),Ur=typeof y=="string"?K(y,E,Dt,r,!0)||0:y,sr=o.getComputedWidth()-o.getComputedPadding(n.EDGE_LEFT)-o.getComputedPadding(n.EDGE_RIGHT)-o.getComputedBorder(n.EDGE_LEFT)-o.getComputedBorder(n.EDGE_RIGHT),Pt=Qe+Wr,Ot=rt+$r,{matrix:nt,opacity:Wt}=qu({left:Wr,top:$r,width:Dt,height:Br,isInheritingTransform:u},r),Ge="";if(r.textShadowOffset){let{textShadowColor:Y,textShadowOffset:Q,textShadowRadius:te}=r;Ge=zu({width:ue.width,height:ue.height,id:a},{shadowColor:Y,shadowOffset:Q,shadowRadius:te},yo(r.color)||C&&Hu(r.color)),Ge=I("defs",{},Ge)}let it="",$t="",vr="",Rt=-1,Ue={},At={},We=null,xr=0;for(let Y=0;Y<Ae.length;Y++){let Q=Ie[Y],te=Ie[Y+1];if(!Q)continue;let Z=Ae[Y],Te=null,le=!1,be=c&&Object.prototype.hasOwnProperty.call(c,Z)?c[Z]:null,fe=Q.y,ie=Q.x,lt=Q.width,X=Q.line,It=r.textDecorationLine==="underline"&&(r.textDecorationSkipInk||"auto")!=="none";if(X===Rt)continue;let je=!1;if(X===0&&Ur!==0&&(ie+=Ur),j.length>1){let Se=Dt-j[X];if(g==="right"||g==="end")ie+=Se;else if(g==="center")ie+=Se/2;else if(g==="justify"&&X<j.length-1){let ke=he[X],ft=ke>1?Se/(ke-1):0;ie+=ft*Q.lineIndex,je=!0}f&&(ie=Math.round(ie))}let Ve=q[X],ot=J.baseline(Z),Bt=J.height(Z),He=Ve-ot,Ut=Se=>!It||r.textDecorationLine!=="underline"?void 0:{underlineY:Ot+Se+He+ot+ot*.1,strokeWidth:Math.max(1,E*.1)};if(Ue[X]||(Ue[X]={left:ie,top:Ot+fe+He,ascender:ot,width:je?Dt:j[X]}),Pe!==1/0){let xt=function(Ye,dt){let qr=Fe(dt,"grapheme",h),wr="",Gn=0;for(let zr of qr){let ar=Ye+Oe([wr+zr]);if(wr&&ar+ke>sr)break;wr+=zr,Gn=ar}return{subset:wr,resolvedWidth:Gn}},Se=we,ke=Be(we);ke>sr&&(Se=Ar,ke=Be(Se));let ft=Be(cr),Je=X<j.length-1;if(X+1===Pe&&(Je||j[X]>sr)){if(ie+lt+ke+ft>sr){let{subset:Ye,resolvedWidth:dt}=xt(ie,Z);Z=Ye+Se,Rt=X,Ue[X].width=Math.max(0,dt-Ue[X].left),le=!0}else if(te&&te.line!==X)if(g==="center"){let{subset:Ye,resolvedWidth:dt}=xt(ie,Z);Z=Ye+Se,Rt=X,Ue[X].width=Math.max(0,dt-Ue[X].left),le=!0}else{let Ye=Ae[Y+1],{subset:dt,resolvedWidth:qr}=xt(lt+ie,Ye);Z=Z+dt+Se,Rt=X,Ue[X].width=Math.max(0,qr-Ue[X].left),le=!0}}}if(be)fe+=0;else if(f){if(!Z.includes(bo)&&!ja.includes(Z)&&Ae[Y+1]&&te&&!te.isImage&&fe===te.y&&!le){We===null&&(xr=ie),We=We===null?Z:We+Z;continue}let Se=We===null?Z:We+Z,ke=We===null?ie:xr,ft=Q.width+ie-ke,Je=Ut(fe),ct=J.getSVG(Se.replace(/(\t)+/g,""),{fontSize:E,left:Pt+ke,top:Ot+fe+ot+He,letterSpacing:P,fontFeatureSettings:S},Je);Te=ct.path,It&&ct.boxes&&ct.boxes.length&&(At[X]||(At[X]=[])).push(...ct.boxes),We=null,l&&(vr+=I("rect",{x:Pt+ke,y:Ot+fe+He,width:ft,height:Bt,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:nt||void 0,"clip-path":ze?`url(#${ze})`:void 0})+I("line",{x1:Pt+ie,x2:Pt+ie+Q.width,y1:Ot+fe+He+ot,y2:Ot+fe+He+ot,stroke:"#14c000","stroke-width":1,transform:nt||void 0,"clip-path":ze?`url(#${ze})`:void 0}))}else if(fe+=ot+He,It&&!be){let Se=Ut(fe),ke=J.getSVG(Z.replace(/(\t)+/g,""),{fontSize:E,left:Pt+ie,top:Ot+fe,letterSpacing:P,fontFeatureSettings:S},Se);ke.boxes&&ke.boxes.length&&(At[X]||(At[X]=[])).push(...ke.boxes)}if(Te!==null)$t+=Te+" ";else{let[Se,ke]=ho({content:Z,filter:Ge,id:a,left:Pt+ie,top:Ot+fe,width:lt,height:Bt,matrix:nt,opacity:Wt,image:be,clipPathId:ze,debug:l,shape:!!A},r);Me+=Se,ge+=ke}if(le)break}if(r.textDecorationLine&&(it=Object.entries(Ue).map(([Y,Q])=>{if(!Q)return"";let te=At[Y]||[];return mo({left:Pt+Q.left,top:Q.top,width:Q.width,ascender:Q.ascender,clipPathId:ze,matrix:nt,glyphBoxes:te},r)}).join("")),$t){let Y=(!yo(r.color)||Ge)&&Wt!==0?I("path",{fill:Ge&&(yo(r.color)||C&&Hu(r.color))?"black":r.color,d:$t,transform:nt||void 0,[i.WebkitTextStrokeWidth||T||Ge?"opacity":"fill-opacity"]:Wt!==1?Wt:void 0,style:T?`filter:${T}`:void 0,"stroke-width":i.WebkitTextStrokeWidth?`${i.WebkitTextStrokeWidth}px`:void 0,stroke:i.WebkitTextStrokeWidth?i.WebkitTextStrokeColor:void 0,"stroke-linejoin":i.WebkitTextStrokeWidth?"round":void 0,"paint-order":i.WebkitTextStrokeWidth?"stroke":void 0}):"",Q=Y?I("g",{mask:kt?`url(#${kt})`:void 0,"clip-path":ze?`url(#${ze})`:void 0},Y):"";A&&(ge=I("path",{d:$t,transform:nt||void 0})),Me+=(Ge?Ge+I("g",{filter:`url(#satori_s-${a})`},Q+it):Q+it)+vr}else it&&(Me+=Ge?I("g",{filter:`url(#satori_s-${a})`},it):it);return ge&&(r._inheritedBackgroundClipTextPath.value+=ge),Me}function Cp(e,t){let n=e.Node.create();return n.setAlignItems(e.ALIGN_BASELINE),n.setJustifyContent(Xe(t,{left:e.JUSTIFY_FLEX_START,right:e.JUSTIFY_FLEX_END,center:e.JUSTIFY_CENTER,justify:e.JUSTIFY_SPACE_BETWEEN,start:e.JUSTIFY_FLEX_START,end:e.JUSTIFY_FLEX_END},e.JUSTIFY_FLEX_START,"textAlign")),n}function Lp(e){let t=/(\t)+/.exec(e);return t?{index:t.index,tabCount:t[0].length}:{index:null,tabCount:0}}var Xu=require("css-gradient-parser");var Yu=at(require("parse-css-color"),1);function fi(e,t,n,r,i){let o=[],s=t.at(-1),a=s&&s.offset&&s.offset.unit==="%"&&r?+s.offset.value:100;for(let c of t){let{color:h}=c;if(!o.length&&(o.push({offset:0,color:h}),!c.offset||c.offset.value==="0"))continue;let m=typeof c.offset>"u"?void 0:c.offset.unit==="%"?+c.offset.value/a:Number(K(`${c.offset.value}${c.offset.unit}`,n.fontSize,e,n,!0))/e;o.push({offset:m,color:h})}o.length||o.push({offset:0,color:"transparent"});let u=o[o.length-1];u.offset!==1&&(typeof u.offset>"u"?u.offset=1:r?o[o.length-1]={offset:1,color:u.color}:o.push({offset:1,color:u.color}));let l=0,f=1;for(let c=0;c<o.length;c++)if(typeof o[c].offset>"u"){for(f<c&&(f=c);typeof o[f].offset>"u";)f++;o[c].offset=(o[f].offset-o[l].offset)/(f-l)*(c-l)+o[l].offset}else l=c;return i==="mask"?o.map(c=>{let h=(0,Yu.default)(c.color);return h?h.alpha===0?{...c,color:"rgba(0, 0, 0, 1)"}:{...c,color:`rgba(255, 255, 255, ${h.alpha})`}:c}):o}function Ku({id:e,width:t,height:n,repeatX:r,repeatY:i},o,s,a,u,l){let f=(0,Xu.parseLinearGradient)(o),[c,h]=s,m=o.startsWith("repeating"),g,y,x;if(f.orientation.type==="directional")g=Fp(f.orientation.value),y=Math.sqrt(Math.pow((g.x2-g.x1)*c,2)+Math.pow((g.y2-g.y1)*h,2));else if(f.orientation.type==="angular"){let{length:P,...S}=Np(lr(`${f.orientation.value.value}${f.orientation.value.unit}`)/180*Math.PI,c,h);y=P,g=S}x=m?Dp(f.stops,y,g,u):g;let _=fi(m?Mp(f.stops,y):y,f.stops,u,m,l),E=`satori_bi${e}`,T=`satori_pattern_${e}`,R=I("pattern",{id:T,x:a[0]/t,y:a[1]/n,width:r?c/t:"1",height:i?h/n:"1",patternUnits:"objectBoundingBox"},I("linearGradient",{id:E,...x,spreadMethod:m?"repeat":"pad"},_.map(P=>I("stop",{offset:(P.offset??0)*100+"%","stop-color":P.color})).join(""))+I("rect",{x:0,y:0,width:c,height:h,fill:`url(#${E})`}));return[T,R]}function Mp(e,t){let n=e[e.length-1],{offset:r}=n;return r?r.unit==="%"?Number(r.value)/100*t:Number(r.value):t}function Fp(e){let t=0,n=0,r=0,i=0;return e.includes("top")?n=1:e.includes("bottom")&&(i=1),e.includes("left")?t=1:e.includes("right")&&(r=1),!t&&!r&&!n&&!i&&(n=1),{x1:t,y1:n,x2:r,y2:i}}function Np(e,t,n){let r=Math.pow(n/t,2);e=(e%(Math.PI*2)+Math.PI*2)%(Math.PI*2);let i,o,s,a,u,l,f,c,h=m=>{if(m===0){i=0,o=n,s=0,a=0,u=n;return}else if(m===Math.PI/2){i=0,o=0,s=t,a=0,u=t;return}if(m>0&&m<Math.PI/2){i=(r*t/2/Math.tan(m)-n/2)/(Math.tan(m)+r/Math.tan(m)),o=Math.tan(m)*i+n,s=Math.abs(t/2-i)+t/2,a=n/2-Math.abs(o-n/2),u=Math.sqrt(Math.pow(s-i,2)+Math.pow(a-o,2)),f=(t/2/Math.tan(m)-n/2)/(Math.tan(m)+1/Math.tan(m)),c=Math.tan(m)*f+n,u=2*Math.sqrt(Math.pow(t/2-f,2)+Math.pow(n/2-c,2));return}else if(m>Math.PI/2&&m<Math.PI){i=(n/2+r*t/2/Math.tan(m))/(Math.tan(m)+r/Math.tan(m)),o=Math.tan(m)*i,s=Math.abs(t/2-i)+t/2,a=n/2+Math.abs(o-n/2),f=(t/2/Math.tan(m)+n/2)/(Math.tan(m)+1/Math.tan(m)),c=Math.tan(m)*f,u=2*Math.sqrt(Math.pow(t/2-f,2)+Math.pow(n/2-c,2));return}else m>=Math.PI&&(h(m-Math.PI),l=i,i=s,s=l,l=o,o=a,a=l)};return h(e),{x1:i/t,y1:o/n,x2:s/t,y2:a/n,length:u}}function Dp(e,t,n,r){let{x1:i,x2:o,y1:s,y2:a}=n,u=e[0].offset?e[0].offset.unit==="%"?Number(e[0].offset.value)/100:K(`${e[0].offset.value}${e[0].offset.unit}`,r.fontSize,t,r,!0)/t:0,l=e.at(-1).offset?e.at(-1).offset.unit==="%"?Number(e.at(-1).offset.value)/100:K(`${e.at(-1).offset.value}${e.at(-1).offset.unit}`,r.fontSize,t,r,!0)/t:1,f=(o-i)*u+i,c=(a-s)*u+s,h=(o-i)*l+i,m=(a-s)*l+s;return{x1:f,y1:c,x2:h,y2:m}}var Ju=require("css-gradient-parser");function Zu({id:e,width:t,height:n,repeatX:r,repeatY:i},o,s,a,u,l){var pe;let{shape:f,stops:c,position:h,size:m,repeating:g}=(0,Ju.parseRadialGradient)(o),[y,x]=s,_=y/2,E=x/2,T=$p(h.x,h.y,y,x,u.fontSize,u);_=T.x,E=T.y;let R=Wp(t,c,g,u),P=fi(R,c,u,g,l),S=`satori_radial_${e}`,A=`satori_pattern_${e}`,C=`satori_mask_${e}`,G=Up(f,m,u.fontSize,{x:_,y:E},[y,x],u,g),V=Bp(f,u.fontSize,c,[y,x],u,g,G),ee=I("pattern",{id:A,x:a[0]/t,y:a[1]/n,width:r?y/t:"1",height:i?x/n:"1",patternUnits:"objectBoundingBox"},I("radialGradient",{id:S,...V},P.map(ce=>I("stop",{offset:ce.offset||0,"stop-color":ce.color})).join(""))+I("mask",{id:C},I("rect",{x:0,y:0,width:y,height:x,fill:"#fff"}))+I("rect",{x:0,y:0,width:y,height:x,fill:((pe=P.at(-1))==null?void 0:pe.color)||"transparent"})+I(f,{cx:_,cy:E,width:y,height:x,...G,fill:`url(#${S})`,mask:`url(#${C})`}));return[A,ee]}function Wp(e,t,n,r){if(!n)return e;let i=t.at(-1);return!i||!i.offset||i.offset.unit==="%"?e:K(`${i.offset.value}${i.offset.unit}`,+r.fontSize,e,r,!0)}function $p(e,t,n,r,i,o){let s={x:n/2,y:r/2};return e.type==="keyword"?Object.assign(s,Qu(e.value,n,r,"x")):s.x=K(`${e.value.value}${e.value.unit}`,i,n,o,!0)??n/2,t.type==="keyword"?Object.assign(s,Qu(t.value,n,r,"y")):s.y=K(`${t.value.value}${t.value.unit}`,i,r,o,!0)??r/2,s}function Qu(e,t,n,r){switch(e){case"center":return{[r]:r==="x"?t/2:n/2};case"left":return{x:0};case"top":return{y:0};case"right":return{x:t};case"bottom":return{y:n}}}function Bp(e,t,n,[r,i],o,s,a){let{r:u,rx:l,ratio:f=1}=a;if(!s)return{spreadMethod:"pad"};let c=n.at(-1),h=e==="circle"?u*2:l*2;return{spreadMethod:"repeat",cx:"50%",cy:"50%",r:c.offset.unit==="%"?`${Number(c.offset.value)*Math.min(i/r,1)/f}%`:Number(K(`${c.offset.value}${c.offset.unit}`,t,r,o,!0)/h)}}function Up(e,t,n,r,i,o,s){let[a,u]=i,{x:l,y:f}=r,c={},h=0,m=0;if(qp(t)){if(t.some(g=>g.value.value.startsWith("-")))throw new Error("disallow setting negative values to the size of the shape. Check https://w3c.github.io/csswg-drafts/css-images/#valdef-rg-size-length-0");return e==="circle"?Object.assign(c,{r:Number(K(`${t[0].value.value}${t[0].value.unit}`,n,a,o,!0))}):Object.assign(c,{rx:Number(K(`${t[0].value.value}${t[0].value.unit}`,n,a,o,!0)),ry:Number(K(`${t[1].value.value}${t[1].value.unit}`,n,u,o,!0))}),ci(c,a,u,l,f,s,e),c}switch(t[0].value){case"farthest-corner":h=Math.max(Math.abs(a-l),Math.abs(l)),m=Math.max(Math.abs(u-f),Math.abs(f));break;case"closest-corner":h=Math.min(Math.abs(a-l),Math.abs(l)),m=Math.min(Math.abs(u-f),Math.abs(f));break;case"farthest-side":return e==="circle"?c.r=Math.max(Math.abs(a-l),Math.abs(l),Math.abs(u-f),Math.abs(f)):(c.rx=Math.max(Math.abs(a-l),Math.abs(l)),c.ry=Math.max(Math.abs(u-f),Math.abs(f))),ci(c,a,u,l,f,s,e),c;case"closest-side":return e==="circle"?c.r=Math.min(Math.abs(a-l),Math.abs(l),Math.abs(u-f),Math.abs(f)):(c.rx=Math.min(Math.abs(a-l),Math.abs(l)),c.ry=Math.min(Math.abs(u-f),Math.abs(f))),ci(c,a,u,l,f,s,e),c}return e==="circle"?c.r=Math.sqrt(h*h+m*m):Object.assign(c,el(h,m)),ci(c,a,u,l,f,s,e),c}function ci(e,t,n,r,i,o,s){if(o)if(s==="ellipse"){let a=Math.max(Math.abs(t-r),Math.abs(r)),u=Math.max(Math.abs(n-i),Math.abs(i)),{rx:l,ry:f}=el(a,u);e.ratio=Math.max(l/e.rx,f/e.ry),e.ratio>1&&(e.rx*=e.ratio,e.ry*=e.ratio)}else{let a=Math.max(Math.abs(t-r),Math.abs(r)),u=Math.max(Math.abs(n-i),Math.abs(i)),l=Math.sqrt(a*a+u*u);e.ratio=l/e.r,e.ratio>1&&(e.r=l)}}function el(e,t){let n=t!==0?e/t:1;if(e===0)return{rx:0,ry:0};{let r=Math.sqrt(e*e+t*t*n*n)/n;return{ry:r,rx:r*n}}}function qp(e){return!e.some(t=>t.type==="keyword")}var So=at(require("parse-css-color"),1);function _o(e,t){return typeof e=="string"&&e.endsWith("%")?t*parseFloat(e)/100:+e}function zp(e,t,n,r,i){if(!r||!i)return[t,n];if(e==="cover"){let o=t/r,s=n/i,a=Math.max(o,s);return[r*a,i*a]}if(e==="contain"){let o=t/r,s=n/i,a=Math.min(o,s);return[r*a,i*a]}if(e==="auto"||e.includes("auto")){let o=e.split(" "),s=o[0]||"auto",a=o[1]||o[0]||"auto",u=r,l=i;if(s==="auto"&&a!=="auto"){let f=_o(a,n);l=f,u=r/i*f}else if(a==="auto"&&s!=="auto"){let f=_o(s,t);u=f,l=i/r*f}return[u,l]}return[t,n]}function wo(e,{x:t,y:n,defaultX:r,defaultY:i}){return(e?e.split(" ").map(o=>{try{let s=new St(o);return s.type==="length"||s.type==="number"?s.value:s.value+s.unit}catch{return null}}).filter(o=>o!==null):[r,i]).map((o,s)=>_o(o,[t,n][s]))}async function tn({id:e,width:t,height:n,left:r,top:i},{image:o,size:s,position:a,repeat:u},l,f){u=u||"repeat",f=f||"background";let c=u==="repeat-x"||u==="repeat",h=u==="repeat-y"||u==="repeat",m=s&&(s==="cover"||s==="contain"||s==="auto"||s.includes("auto")),g=o.startsWith("linear-gradient(")||o.startsWith("repeating-linear-gradient(")||o.startsWith("radial-gradient(")||o.startsWith("repeating-radial-gradient("),y=m&&g?[t,n]:m?[0,0]:wo(s,{x:t,y:n,defaultX:t,defaultY:n}),x=wo(a,{x:t,y:n,defaultX:0,defaultY:0});if(o.startsWith("linear-gradient(")||o.startsWith("repeating-linear-gradient("))return Ku({id:e,width:t,height:n,repeatX:c,repeatY:h},o,y,x,l,f);if(o.startsWith("radial-gradient(")||o.startsWith("repeating-radial-gradient("))return Zu({id:e,width:t,height:n,repeatX:c,repeatY:h},o,y,x,l,f);if(o.startsWith("url(")){let[_,E,T]=await Rr(o.slice(4,-1)),R,P;if(m){let[S,A]=zp(s,t,n,E,T);R=S,P=A}else{let S=wo(s,{x:t,y:n,defaultX:0,defaultY:0});R=f==="mask"?E||S[0]:S[0]||E,P=f==="mask"?T||S[1]:S[1]||T}return[`satori_bi${e}`,I("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:x[0]+r,y:x[1]+i,width:c?R:"100%",height:h?P:"100%"},I("image",{x:0,y:0,width:R,height:P,preserveAspectRatio:"none",href:_}))]}if((0,So.default)(o)){let _=(0,So.default)(o),[E,T,R,P]=_.values,A=`rgba(${E},${T},${R},${P!==void 0?P:1})`;return[`satori_bi${e}`,I("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:r,y:i,width:t,height:n},I("rect",{x:0,y:0,width:t,height:n,fill:A}))]}throw new Error(`Invalid background image: "${o}"`)}function Gp([e,t]){return Math.round(e*1e3)===0&&Math.round(t*1e3)===0?0:Math.round(e*t/Math.sqrt(e*e+t*t)*1e3)/1e3}function di(e,t,n){return n<e+t&&(n/2<e&&n/2<t?e=t=n/2:n/2<e?e=n-t:n/2<t&&(t=n-e)),[e,t]}function pi(e){e[0]=e[1]=Math.min(e[0],e[1])}function hi(e,t,n,r,i){if(typeof e=="string"){let o=e.split(" ").map(a=>a.trim()),s=!o[1]&&!o[0].endsWith("%");return o[1]=o[1]||o[0],[s,[Math.min(K(o[0],r,t,i,!0),t),Math.min(K(o[1],r,n,i,!0),n)]]}return typeof e=="number"?[!0,[Math.min(e,t),Math.min(e,n)]]:[!0,void 0]}var mi=e=>e&&e[0]!==0&&e[1]!==0;function gi(e){return typeof e!="string"?1:lo(e)}function bi(e,t,n,r,i){if(i===1/0)return[e,n,t];if(i===-1/0)return[e,r,t];if(i===0)return[e,[(e[0]+t[0])/2,(e[1]+t[1])/2],t];let o=i<0?n:r,s=Math.pow(2,1-Math.abs(i));if(s===0)return i>0?[e,n,t]:[e,r,t];let a=[],u=16;for(let l=0;l<=u;l++){let f=Math.PI*l/u/2,c=Math.pow(Math.sin(f),s),h=Math.pow(Math.cos(f),s);a.push([o[0]+(t[0]-o[0])*c+(e[0]-o[0])*h,o[1]+(t[1]-o[1])*c+(e[1]-o[1])*h])}return a}function dr(e){return`${Math.round(e[0]*1e3)/1e3},${Math.round(e[1]*1e3)/1e3}`}function tl(e,t,n,r){return Math.min(1,n/(e[0]+t[0]||n),r/(e[1]+t[1]||r))}function jp(e,t,n,r,i,o,s){s!=null&&s.every(Boolean)&&(s=void 0);let a=e+n,u=t+r,[l,f,c,h]=i,m=[bi([e,t+l[1]],[e+l[0],t],[e,t],[e+l[0],t+l[1]],o[0]),bi([a-f[0],t],[a,t+f[1]],[a,t],[a-f[0],t+f[1]],o[1]),bi([a,u-c[1]],[a-c[0],u],[a,u],[a-c[0],u-c[1]],o[2]),bi([e+h[0],u],[e,u-h[1]],[e,u],[e+h[0],u-h[1]],o[3])];if(s){let y=s.indexOf(!0);if(y===-1)throw new Error("Invalid `partialSides`.");for(;s[(y+3)%4];)y=(y+3)%4;let x=m[y],_=Math.floor(x.length/2),E=`M${dr(x[_])}`,T=y;do{let R=m[T],P=Math.floor(R.length/2);for(let C=P+1;C<R.length;C++)E+=` L${dr(R[C])}`;let S=m[(T+1)%4];E+=` L${dr(S[0])}`;let A=Math.floor(S.length/2);for(let C=1;C<=A;C++)E+=` L${dr(S[C])}`;T=(T+1)%4}while(s[T]&&T!==y);return E}let g=`M${dr(m[0][m[0].length-1])}`;for(let y=0;y<4;y++){let x=m[(y+1)%4];g+=` L${dr(x[0])}`;for(let _=1;_<x.length;_++)g+=` L${dr(x[_])}`}return g+" Z"}function rl({id:e,borderRadiusPath:t,borderType:n,left:r,top:i,width:o,height:s},a){let u=`satori_brc-${e}`;return[I("clipPath",{id:u},I(n,{x:r,y:i,width:o,height:s,d:t||void 0})),u]}function er({left:e,top:t,width:n,height:r},i,o){let{borderTopLeftRadius:s,borderTopRightRadius:a,borderBottomLeftRadius:u,borderBottomRightRadius:l,fontSize:f}=i,c=[gi(i.cornerTopLeftShape),gi(i.cornerTopRightShape),gi(i.cornerBottomRightShape),gi(i.cornerBottomLeftShape)],h,m,g,y;if([h,s]=hi(s,n,r,f,i),[m,a]=hi(a,n,r,f,i),[g,u]=hi(u,n,r,f,i),[y,l]=hi(l,n,r,f,i),!o&&!mi(s)&&!mi(a)&&!mi(u)&&!mi(l))return"";if(s||=[0,0],a||=[0,0],u||=[0,0],l||=[0,0],[s[0],a[0]]=di(s[0],a[0],n),[u[0],l[0]]=di(u[0],l[0],n),[s[1],u[1]]=di(s[1],u[1],r),[a[1],l[1]]=di(a[1],l[1],r),h&&pi(s),m&&pi(a),g&&pi(u),y&&pi(l),c.some(P=>P<0)){let P=Math.min(tl(s,l,n,r),tl(a,u,n,r));if(P<1)for(let S of[s,a,l,u])S[0]*=P,S[1]*=P}if(c.some(P=>P!==1))return jp(e,t,n,r,[s,a,l,u],c,o);let x=[];x[0]=[a,a],x[1]=[l,[-l[0],l[1]]],x[2]=[u,[-u[0],-u[1]]],x[3]=[s,[s[0],-s[1]]];let _=`h${n-s[0]-a[0]} a${x[0][0]} 0 0 1 ${x[0][1]}`,E=`v${r-a[1]-l[1]} a${x[1][0]} 0 0 1 ${x[1][1]}`,T=`h${l[0]+u[0]-n} a${x[2][0]} 0 0 1 ${x[2][1]}`,R=`v${u[1]+s[1]-r} a${x[3][0]} 0 0 1 ${x[3][1]}`;if(o){let S=function(pe){let ce=Gp([s,a,l,u][pe]);return pe===0?[[e+s[0]-ce,t+s[1]-ce],[e+s[0],t]]:pe===1?[[e+n-a[0]+ce,t+a[1]-ce],[e+n,t+a[1]]]:pe===2?[[e+n-l[0]+ce,t+r-l[1]+ce],[e+n-l[0],t+r]]:[[e+u[0]-ce,t+r-u[1]+ce],[e,t+r-u[1]]]},P=o.indexOf(!1);if(!o.includes(!0))throw new Error("Invalid `partialSides`.");if(P===-1)P=0;else for(;!o[P];)P=(P+1)%4;let A="",C=S(P),G=`M${C[0]} A${x[(P+3)%4][0]} 0 0 1 ${C[1]}`,V=0;for(;V<4&&o[(P+V)%4];V++)A+=G+" ",G=[_,E,T,R][(P+V)%4];let ee=(P+V)%4;A+=G.split(" ")[0];let re=S(ee);return A+=` A${x[(ee+3)%4][0]} 0 0 1 ${re[0]}`,A}return`M${e+s[0]},${t} ${_} ${E} ${T} ${R}`}function nl(e,t,n){return n[e+"Width"]===n[t+"Width"]&&n[e+"Style"]===n[t+"Style"]&&n[e+"Color"]===n[t+"Color"]}function il({id:e,currentClipPathId:t,borderPath:n,borderType:r,left:i,top:o,width:s,height:a},u){if(!(u.borderTopWidth||u.borderRightWidth||u.borderBottomWidth||u.borderLeftWidth))return null;let f=`satori_bc-${e}`;return[I("clipPath",{id:f,"clip-path":t?`url(#${t})`:void 0},I(r,{x:i,y:o,width:s,height:a,d:n||void 0})),f]}function rn({left:e,top:t,width:n,height:r,props:i,asContentMask:o,maskBorderOnly:s},a){let u=["borderTop","borderRight","borderBottom","borderLeft"];if(!o&&!u.some(m=>a[m+"Width"]))return"";let l="",f=0;for(;f>0&&nl(u[f],u[(f+3)%4],a);)f=(f+3)%4;let c=[!1,!1,!1,!1],h=[];for(let m=0;m<4;m++){let g=(f+m)%4,y=(f+m+1)%4,x=u[g],_=u[y];if(c[g]=!0,h=[a[x+"Width"],a[x+"Style"],a[x+"Color"],x],!nl(x,_,a)){let E=(h[0]||0)+(o&&!s&&a[x.replace("border","padding")]||0);E&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:o?"#000":h[2],"stroke-width":E*2,"stroke-dasharray":!o&&h[1]==="dashed"?E*2+" "+E:void 0,d:er({left:e,top:t,width:n,height:r},a,c)})),c=[!1,!1,!1,!1]}}if(c.some(Boolean)){let m=(h[0]||0)+(o&&!s&&a[h[3].replace("border","padding")]||0);m&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:o?"#000":h[2],"stroke-width":m*2,"stroke-dasharray":!o&&h[1]==="dashed"?m*2+" "+m:void 0,d:er({left:e,top:t,width:n,height:r},a,c)}))}return l}function Eo({id:e,left:t,top:n,width:r,height:i,matrix:o,borderOnly:s},a){let u=(a.borderLeftWidth||0)+(s?0:a.paddingLeft||0),l=(a.borderTopWidth||0)+(s?0:a.paddingTop||0),f=(a.borderRightWidth||0)+(s?0:a.paddingRight||0),c=(a.borderBottomWidth||0)+(s?0:a.paddingBottom||0),h={x:t+u,y:n+l,width:r-u-f,height:i-l-c};return I("mask",{id:e},I("rect",{...h,fill:"#fff",transform:a.overflow==="hidden"&&a.transform&&o?o:void 0,mask:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0})+rn({left:t,top:n,width:r,height:i,props:{transform:o||void 0},asContentMask:!0,maskBorderOnly:s},a))}var Ao=require("css-to-react-native");var Po={left:0,"x-start":0,center:.5,right:1,"x-end":1},Oo={top:0,"y-start":0,center:.5,bottom:1,"y-end":1};function Lt(e){return Math.round(e*1e3)/1e3}function sl(e,t,n,r){let i=e.match(/^shape\((.*)\)$/s);if(!i)return null;let o=jt(i[1]),s=o.shift();if(!s)throw new Error("Invalid `shape()` value.");let a=s.match(/^(?:(nonzero|evenodd)\s+)?from\s+(.+)$/);if(!a)throw new Error("Invalid `shape()` starting point.");let u=a[1]||"nonzero",l=Ro(ol(a[2]),t,n,r),f=l,c=`M${Lt(l[0])},${Lt(l[1])}`;for(let h of o){let m=ol(h),g=m.shift();if(g==="close"){if(m.length)throw new Error("Invalid `close` command in `shape()`.");c+=" Z",l=f;continue}if(g==="move"||g==="line"){let y=To(m,l,t,n,r);c+=` ${g==="move"?"M":"L"}${Lt(y[0])},${Lt(y[1])}`,l=y,g==="move"&&(f=y);continue}if(g==="hline"||g==="vline"){let y=g==="hline"?0:1,x=m.shift(),_=m.shift();if(x!=="to"&&x!=="by"||!_||m.length)throw new Error(`Invalid \`${g}\` command in \`shape()\`.`);let E=y===0?t:n,T=y===0?Po:Oo,R=x==="to"&&_ in T?T[_]*E:tr(_,E,r);l=[...l],l[y]=x==="by"?l[y]+R:R,c+=` ${y===0?"H":"V"}${Lt(l[y])}`;continue}if(g==="curve"||g==="smooth"){let y=m.indexOf("with"),x=y===-1?m:m.slice(0,y),_=y===-1?[]:m.slice(y+1),E=x[0],T=To(x,l,t,n,r);if(g==="curve"&&y===-1)throw new Error("A `curve` command requires a control point.");let R=Vp(_).map(P=>Hp(P,l,T,t,n,r));if(g==="curve")if(R.length===1)c+=` Q${Yt(R[0])} ${Yt(T)}`;else if(R.length===2)c+=` C${Yt(R[0])} ${Yt(R[1])} ${Yt(T)}`;else throw new Error("A `curve` command accepts one or two control points.");else if(!R.length)c+=` T${Yt(T)}`;else if(R.length===1)c+=` S${Yt(R[0])} ${Yt(T)}`;else throw new Error("A `smooth` command accepts at most one control point.");l=T;continue}if(g==="arc"){let y=m.findIndex(C=>["of","cw","ccw","large","small","rotate"].includes(C)),x=y===-1?m:m.slice(0,y),_=y===-1?[]:m.slice(y),E=To(x,l,t,n,r),T=0,R=0,P=0,S=0,A=0;for(let C=0;C<_.length;C++){let G=_[C];if(G==="of"){let V=_[++C];if(!V)throw new Error("Invalid `arc` radius in `shape()`.");let ee=_[C+1],re=ee&&!["cw","ccw","large","small","rotate"].includes(ee);if(re&&C++,re)T=tr(V,t,r),R=tr(ee,n,r);else{let pe=Math.sqrt(t*t+n*n)/Math.sqrt(2);T=R=tr(V,pe,r)}}else if(G==="cw"||G==="ccw")A=G==="cw"?1:0;else if(G==="large"||G==="small")S=G==="large"?1:0;else if(G==="rotate"){let V=_[++C];if(!V)throw new Error("Invalid `arc` rotation in `shape()`.");let ee=lr(V);if(typeof ee>"u")throw new Error("Invalid `arc` rotation in `shape()`.");P=ee}else throw new Error("Invalid `arc` option in `shape()`.")}c+=` A${Lt(Math.abs(T))},${Lt(Math.abs(R))} ${Lt(P)} ${S} ${A} ${Yt(E)}`,l=E;continue}throw new Error(`Unsupported \`${g}\` command in \`shape()\`.`)}return{type:"path",d:c,"fill-rule":u}}function ol(e){return e.trim().replace(/\//g," / ").split(/\s+/).filter(Boolean)}function Vp(e){if(!e.length)return[];let t=e.indexOf("/");return t===-1?[e]:[e.slice(0,t),e.slice(t+1)]}function To(e,t,n,r,i){let o=e[0];if(o!=="to"&&o!=="by")throw new Error("A `shape()` command must use `to` or `by`.");let s=Ro(e.slice(1),n,r,i);return o==="by"?[t[0]+s[0],t[1]+s[1]]:s}function Hp(e,t,n,r,i,o){let s=e.indexOf("from"),a=s===-1?e:e.slice(0,s),u=s===-1?void 0:e[s+1];if(s!==-1&&(s+2!==e.length||!u))throw new Error("Invalid control point reference in `shape()`.");let l=Ro(a,r,i,o,!0);return u==="start"||!u&&!Yp(e)?[t[0]+l[0],t[1]+l[1]]:u==="end"?[n[0]+l[0],n[1]+l[1]]:l}function Ro(e,t,n,r,i=!1){if(!e.length||e.length>4)throw new Error("Invalid position in `shape()`.");let o,s,a=[...e];for(let u=0;u<a.length;u++){let l=a[u];if(l==="left"||l==="right"||l==="x-start"||l==="x-end"){let f=a[u+1];if(f&&!ko(f)){let c=tr(f,t,r);o=l==="left"||l==="x-start"?c:t-c,u++}else o=Po[l]*t}else if(l==="top"||l==="bottom"||l==="y-start"||l==="y-end"){let f=a[u+1];if(f&&!ko(f)){let c=tr(f,n,r);s=l==="top"||l==="y-start"?c:n-c,u++}else s=Oo[l]*n}else if(l==="center")if(o===void 0)o=t/2;else if(s===void 0)s=n/2;else throw new Error("Invalid position in `shape()`.");else if(o===void 0)o=tr(l,t,r);else if(s===void 0)s=tr(l,n,r);else throw new Error("Invalid position in `shape()`.")}return!i&&e.length===1&&s===void 0&&(s=n/2),[o??(i?0:t/2),s??(i?0:n/2)]}function ko(e){return e in Po||e in Oo}function Yp(e){return e.some(ko)}function tr(e,t,n){let r=K(e,n.fontSize,t,n,!0);if(typeof r>"u")throw new Error(`Invalid length \`${e}\` in \`shape()\`.`);return r}function Yt(e){return`${Lt(e[0])},${Lt(e[1])}`}var Ir={circle:/circle\((.+)\)/,ellipse:/ellipse\((.+)\)/,path:/path\((.+)\)/,polygon:/polygon\((.+)\)/,inset:/inset\((.+)\)/,shape:/shape\((.+)\)/};function ll({width:e,height:t},n,r){function i(f){let c=f.match(Ir.circle);if(!c)return null;let[,h]=c,[m,g=""]=h.split("at").map(_=>_.trim()),{x:y,y:x}=ul(g,e,t);return{type:"circle",r:K(m,r.fontSize,Math.sqrt(Math.pow(e,2)+Math.pow(t,2))/Math.sqrt(2),r,!0),cx:K(y,r.fontSize,e,r,!0),cy:K(x,r.fontSize,t,r,!0)}}function o(f){let c=f.match(Ir.ellipse);if(!c)return null;let[,h]=c,[m,g=""]=h.split("at").map(T=>T.trim()),[y,x]=m.split(" "),{x:_,y:E}=ul(g,e,t);return{type:"ellipse",rx:K(y||"50%",r.fontSize,e,r,!0),ry:K(x||"50%",r.fontSize,t,r,!0),cx:K(_,r.fontSize,e,r,!0),cy:K(E,r.fontSize,t,r,!0)}}function s(f){let c=f.match(Ir.path);if(!c)return null;let[h,m]=al(c[1]);return{type:"path",d:m,"fill-rule":h}}function a(f){let c=f.match(Ir.polygon);if(!c)return null;let[h,m]=al(c[1]);return{type:"polygon","fill-rule":h,points:m.split(",").map(g=>g.split(" ").map((y,x)=>K(y,r.fontSize,x===0?e:t,r,!0)).join(" ")).join(",")}}function u(f){let c=f.match(Ir.inset);if(!c)return null;let[h,m]=(c[1].includes("round")?c[1]:`${c[1].trim()} round 0`).split("round"),g=(0,Ao.getStylesForProperty)("borderRadius",m,!0),y=Object.values(g).map(P=>String(P)).map((P,S)=>K(P,r.fontSize,S===0||S===2?t:e,r,!0)||0),x=Object.values((0,Ao.getStylesForProperty)("margin",h,!0)).map(P=>String(P)).map((P,S)=>K(P,r.fontSize,S===0||S===2?t:e,r,!0)||0),_=x[3],E=x[0],T=e-(x[1]+x[3]),R=t-(x[0]+x[2]);return y.some(P=>P>0)?{type:"path",d:er({left:_,top:E,width:T,height:R},{...n,...g})}:{type:"rect",x:_,y:E,width:T,height:R}}function l(f){return Ir.shape.test(f)?sl(f,e,t,r):null}return{parseCircle:i,parseEllipse:o,parsePath:s,parsePolygon:a,parseInset:u,parseShape:l}}function al(e){let[,t="nonzero",n]=e.replace(/('|")/g,"").match(/^(nonzero|evenodd)?,?(.+)/)||[];return[t,n]}function ul(e,t,n){let r=e.split(" "),i={x:r[0]||"50%",y:r[1]||"50%"};return r.forEach(o=>{o==="top"?i.y=0:o==="bottom"?i.y=n:o==="left"?i.x=0:o==="right"?i.x=t:o==="center"&&(i.x=t/2,i.y=n/2)}),i}function yi(e){return`satori_cp-${e}`}function fl(e){return`url(#${yi(e)})`}function cl(e,t,n){if(t.clipPath==="none")return"";let r=ll(e,t,n),i=t.clipPath,o={type:""};for(let s of Object.keys(r))if(o=r[s](i),o)break;if(o){let{type:s,...a}=o;return I("clipPath",{id:yi(e.id),"clip-path":e.currentClipPath,transform:`translate(${e.left}, ${e.top})`},I(s,a))}return""}function Io({left:e,top:t,width:n,height:r,path:i,matrix:o,id:s,currentClipPath:a,src:u},l,f){let c="",h=l.clipPath&&l.clipPath!=="none"?cl({left:e,top:t,width:n,height:r,path:i,id:s,matrix:o,currentClipPath:a,src:u},l,f):"";if(l.overflow!=="hidden"&&!u)c="";else{let g=h?`satori_ocp-${s}`:yi(s);c=I("clipPath",{id:g,"clip-path":a},I(i?"path":"rect",{x:e,y:t,width:n,height:r,d:i||void 0,transform:l.overflow==="hidden"&&l.transform&&o?o:void 0}))}let m=Eo({id:`satori_om-${s}`,left:e,top:t,width:n,height:r,matrix:o,borderOnly:!u},l);return h+c+m}var Xp=e=>`satori_mi-${e}`;async function Co(e,t,n){if(!t.maskImage)return["",""];let{left:r,top:i,width:o,height:s,id:a}=e,u=t.maskImage,l=u.length;if(!l)return["",""];let f=Xp(a),c="";for(let h=0;h<l;h++){let m=u[h],[g,y]=await tn({id:`${f}-${h}`,left:r,top:i,width:o,height:s},m,n,"mask");c+=y+I("rect",{x:r,y:i,width:o,height:s,fill:`url(#${g})`})}return c=I("mask",{id:f},c),[f,c]}function dl({id:e,left:t,top:n,width:r,height:i,path:o,type:s,matrix:a,currentClipPath:u,mask:l,filters:f}){if(!f.length)return["",""];let c=`satori_bf-${e}`,h=`satori_bfc-${e}`,m=Qp(f),g="BackgroundImage",y="";f.forEach((E,T)=>{let R=`${c}-${T}`;y+=Kp(E,g,R),g=R});let x=I("filter",{id:c,x:t-m.left,y:n-m.top,width:r+m.left+m.right,height:i+m.top+m.bottom,filterUnits:"userSpaceOnUse","color-interpolation-filters":"sRGB"},y)+I("clipPath",{id:h,"clip-path":u},I(s,{x:t,y:n,width:r,height:i,d:o||void 0,transform:a||void 0})),_=I(s,{x:t,y:n,width:r,height:i,d:o||void 0,fill:"#000",transform:a||void 0,filter:`url(#${c})`,"clip-path":`url(#${h})`,mask:l});return[x,_]}function Kp(e,t,n){if(e.type==="blur")return I("feGaussianBlur",{in:t,stdDeviation:e.value,result:n});if(e.type==="hue-rotate")return I("feColorMatrix",{in:t,type:"hueRotate",values:e.value,result:n});if(e.type==="saturate"||e.type==="grayscale")return I("feColorMatrix",{in:t,type:"saturate",values:e.type==="grayscale"?1-e.value:e.value,result:n});if(e.type==="sepia"){let s=e.value,a=1-s;return I("feColorMatrix",{in:t,type:"matrix",values:[a+.393*s,.769*s,.189*s,0,0,.349*s,a+.686*s,.168*s,0,0,.272*s,.534*s,a+.131*s,0,0,0,0,0,1,0].join(" "),result:n})}if(e.type==="drop-shadow"){let s=`${n}-input`;return I("feComposite",{in:t,in2:"SourceAlpha",operator:"in",result:s})+I("feDropShadow",{in:s,dx:e.offsetX,dy:e.offsetY,stdDeviation:e.blurRadius,"flood-color":e.color,result:n})}let r=e.value,i=e.type==="brightness"?{slope:r}:e.type==="contrast"?{slope:r,intercept:.5-.5*r}:e.type==="invert"?{slope:1-2*r,intercept:r}:{slope:r},o=e.type==="opacity"?["A"]:["R","G","B"];return I("feComponentTransfer",{in:t,result:n},o.map(s=>I(`feFunc${s}`,{type:"linear",...i})).join(""))}function Qp(e){let t=0,n=0,r=0,i=0;for(let o of e)if(o.type==="blur"){let s=o.value*3;t=Math.max(t,s),n=Math.max(n,s),r=Math.max(r,s),i=Math.max(i,s)}else if(o.type==="drop-shadow"){let s=o.blurRadius*3;t=Math.max(t,s-o.offsetX),n=Math.max(n,s-o.offsetY),r=Math.max(r,s+o.offsetX),i=Math.max(i,s+o.offsetY)}return{left:t,top:n,right:r,bottom:i}}function Jp(e,t,n){let r=e.toLowerCase().trim().split(/\s+/),i=(u,l)=>({left:"0%",center:"50%",right:"100%",top:"0%",bottom:"100%"})[u]||u,o,s;if(r.length===1){let u=r[0];u==="left"||u==="center"||u==="right"?(o=i(u,"x"),s="50%"):u==="top"||u==="bottom"?(o="50%",s=i(u,"y")):(o=u,s="50%")}else{let u=r[0],l=r[1];u==="top"||u==="bottom"?(s=i(u,"y"),l==="left"||l==="right"||l==="center"?o=i(l,"x"):(o="50%",s=u==="top"||u==="bottom"?i(u,"y"):l)):(o=i(u,"x"),s=i(l,"y"))}let a=(u,l)=>{try{if(u.endsWith("%"))return l*parseFloat(u)/100;let f=new St(u);return f.type==="length"||f.type==="number"?f.value:0}catch{return 0}};return[a(o,t),a(s,n)]}async function nn({id:e,left:t,top:n,width:r,height:i,isInheritingTransform:o,src:s,debug:a},u,l){if(u.display==="none")return"";let f=!!s,c="rect",h="",m="",g=[],y=1,x="";u.backgroundColor&&g.push(u.backgroundColor),u.opacity!==void 0&&(y=+u.opacity),u.transform&&(h=en({left:t,top:n,width:r,height:i},u.transform,o,u.transformOrigin));let _="";if(u.backgroundImage){let J=[];for(let xe=0;xe<u.backgroundImage.length;xe++){let qe=u.backgroundImage[xe],Be=await tn({id:e+"_"+xe,width:r,height:i,left:t,top:n},qe,l);Be&&J.unshift(Be)}for(let xe of J)g.push(`url(#${xe[0]})`),m+=xe[1],xe[2]&&(_+=xe[2])}let[E,T]=await Co({id:e,left:t,top:n,width:r,height:i},u,l);m+=T;let R=E?`url(#${E})`:u._inheritedMaskId?`url(#${u._inheritedMaskId})`:void 0,P=er({left:t,top:n,width:r,height:i},u);P&&(c="path");let S=u._inheritedClipPathId;a&&(x=I("rect",{x:t,y:n,width:r,height:i,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:h||void 0,"clip-path":S?`url(#${S})`:void 0}));let{backgroundClip:A,filter:C}=u,G=A==="text"?`url(#satori_bct-${e})`:S?`url(#${S})`:u.clipPath?fl(e):void 0,V=Io({left:t,top:n,width:r,height:i,path:P,id:e,matrix:h,currentClipPath:G,src:s},u,l),[ee,re]=dl({id:e,left:t,top:n,width:r,height:i,path:P,type:c,matrix:h||void 0,currentClipPath:G,mask:R,filters:u._backdropFilters||[]});m+=ee;let pe=y!==1&&!f&&g.length===1&&!re&&!_&&!C&&!R&&!u.boxShadow&&!(u.borderTopWidth||u.borderRightWidth||u.borderBottomWidth||u.borderLeftWidth),ce=g.map(J=>I(c,{x:t,y:n,width:r,height:i,fill:J,"fill-opacity":pe?y:void 0,d:P||void 0,transform:h||void 0,"clip-path":u.transform?void 0:G,style:C?`filter:${C}`:void 0,mask:u.transform?void 0:R})).join(""),Ke=il({id:e,left:t,top:n,width:r,height:i,currentClipPathId:S,borderPath:P,borderType:c},u),Pe;if(f){let J=(u.borderLeftWidth||0)+(u.paddingLeft||0),xe=(u.borderTopWidth||0)+(u.paddingTop||0),qe=(u.borderRightWidth||0)+(u.paddingRight||0),Be=(u.borderBottomWidth||0)+(u.paddingBottom||0),Oe=r-J-qe,ne=i-xe-Be,ut=(u.objectPosition||"center").toString(),[Re,j]=Jp(ut,Oe,ne),q=u.__naturalWidth||Oe,he=u.__naturalHeight||ne,Ae,Ie=Oe,Le=ne,ue=t+J,Qe=n+xe;if(u.objectFit==="contain"){let rt=Oe/q,Me=ne/he,ge=Math.min(rt,Me);Ie=q*ge,Le=he*ge,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}else if(u.objectFit==="cover"){let rt=Oe/q,Me=ne/he,ge=Math.max(rt,Me);Ie=q*ge,Le=he*ge,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}else if(u.objectFit==="fill")Ae="none";else if(u.objectFit==="scale-down")if(q&&he){let rt=Oe/q,Me=ne/he,ge=Math.min(rt,Me);if(ge>=1)Ie=q,Le=he,Ae="none",ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne;else{let ze=ge;Ie=q*ze,Le=he*ze,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}}else{let rt=Oe/q,Me=ne/he,ge=Math.min(rt,Me);Ie=q*ge,Le=he*ge,ue=t+J+Re-Ie*Re/Oe,Qe=n+xe+j-Le*j/ne,Ae="none"}else Ae="none";u.transform&&(Pe=rl({id:e,borderRadiusPath:P,borderType:c,left:t,top:n,width:r,height:i},u)),ce+=I("image",{x:ue,y:Qe,width:Ie,height:Le,href:s,preserveAspectRatio:Ae,transform:h||void 0,style:C?`filter:${C}`:void 0,"clip-path":u.transform?Pe?`url(#${Pe[1]})`:void 0:`url(#satori_cp-${e})`,mask:u.transform?void 0:E?`url(#${E})`:`url(#satori_om-${e})`})}if(Ke){m+=Ke[0];let J=Ke[1];ce+=rn({left:t,top:n,width:r,height:i,props:{transform:h||void 0,"clip-path":`url(#${J})`}},u)}let we=Gu({width:r,height:i,id:e,opacity:y,shape:I(c,{x:t,y:n,width:r,height:i,fill:"#fff",stroke:"#fff","stroke-width":0,d:P||void 0,transform:h||void 0,"clip-path":G,mask:R})},u),De=re+(_||ce);return u.transform&&(G||R)&&(De=I("g",{"clip-path":G||void 0,mask:R||void 0},De)),y!==1&&!pe&&(De=I("g",{opacity:y},De)),(m?I("defs",{},m):"")+(we?we[0]:"")+(Pe?Pe[0]:"")+V+De+(we?we[1]:"")+x}var hl=String.raw,pl=hl`\p{Emoji}(?:\p{EMod}|[\u{E0020}-\u{E007E}]+\u{E007F}|\uFE0F?\u20E3?)`,ml=()=>new RegExp(hl`\p{RI}{2}|(?![#*\d](?!\uFE0F?\u20E3))${pl}(?:\u200D${pl})*`,"gu");var Zp=new RegExp(ml(),"u"),Lo={emoji:Zp,symbol:/\p{Symbol}/u,math:/\p{Math}/u},Mo={"ja-JP":/\p{scx=Hira}|\p{scx=Kana}|\p{scx=Han}|[\u3000]|[\uFF00-\uFFEF]/u,"ko-KR":/\p{scx=Hangul}/u,"zh-CN":/\p{scx=Han}/u,"zh-TW":/\p{scx=Han}/u,"zh-HK":/\p{scx=Han}/u,"th-TH":/\p{scx=Thai}/u,"bn-IN":/\p{scx=Bengali}/u,"ar-AR":/\p{scx=Arabic}/u,"ta-IN":/\p{scx=Tamil}/u,"ml-IN":/\p{scx=Malayalam}/u,"he-IL":/\p{scx=Hebrew}/u,"te-IN":/\p{scx=Telugu}/u,devanagari:/\p{scx=Devanagari}/u,kannada:/\p{scx=Kannada}/u},vi=Object.keys({...Mo,...Lo});function gl(e){return vi.includes(e)}function bl(e,t){for(let r of Object.keys(Lo))if(Lo[r].test(e))return[r];let n=Object.keys(Mo).filter(r=>Mo[r].test(e));if(n.length===0)return["unknown"];if(t){let r=n.findIndex(i=>i===t);r!==-1&&(n.splice(r,1),n.unshift(t))}return n}function yl(e){if(e)return vi.find(t=>t.toLowerCase().startsWith(e.toLowerCase()))}async function*on(e,t){var ut,Re;let n=await Zt(),{id:r,inheritedStyle:i,parent:o,font:s,debug:a,locale:u,embedFont:l=!0,graphemeImages:f,canLoadAdditionalAssets:c,getTwStyles:h}=t;if(e===null||typeof e>"u")return yield,yield,"";if(!_r(e)||qa(e.type)){let j;if(!_r(e))j=xo(String(e),t),yield(await j.next()).value;else{if(Ua(e.type))throw new Error("Class component is not supported.");let he;Hi(e.type)?he=e.type.render:he=e.type,j=on(await he(e.props),t),yield(await j.next()).value}await j.next();let q=yield;return(await j.next(q)).value}let{type:m,props:g}=e,y=m;if(g&&za(g))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:x,children:_,tw:E,lang:T=u}=g||{},R=yl(T);if(E){let j=h(E,x);x=Object.assign(j,x)}let P=n.Node.create();o.insertChild(P,o.getChildCount());let[S,A]=await co(P,y,i,x,g,t.replacedElements),C=S.transform===i.transform;if(C||(S.transform.__parent=i.transform),(S.overflow==="hidden"||S.clipPath&&S.clipPath!=="none")&&(A._inheritedClipPathId=`satori_cp-${r}`,A._inheritedMaskId=`satori_om-${r}`),S.maskImage&&(A._inheritedMaskId=`satori_mi-${r}`),S.backgroundClip==="text"){let j={value:""};A._inheritedBackgroundClipTextPath=j,S._inheritedBackgroundClipTextPath=j,S.backgroundImage&&(A._inheritedBackgroundClipTextHasBackground="true",S._inheritedBackgroundClipTextHasBackground="true")}let G=!!((ut=t.replacedElements)!=null&&ut[y]),V=G?[]:Ga(_),ee=[],re=0,pe=[];for(let j of V){let q=on(j,{id:r+"-"+re++,parentStyle:S,inheritedStyle:A,isInheritingTransform:!0,parent:P,font:s,embedFont:l,debug:a,graphemeImages:f,canLoadAdditionalAssets:c,locale:R,getTwStyles:h,onNodeDetected:t.onNodeDetected,replacedElements:t.replacedElements});c?pe.push(...(await q.next()).value||[]):await q.next(),ee.push(q)}yield pe;for(let j of ee)await j.next();let[ce,Ke]=yield,{left:Pe,top:we,width:De,height:J}=P.getComputedLayout();Pe+=ce,we+=Ke;let xe="",qe="",Be="",{children:Oe,...ne}=g;if((Re=t.onNodeDetected)==null||Re.call(t,{left:Pe,top:we,width:De,height:J,type:y,props:ne,key:e.key,textContent:_r(Oe)?void 0:Oe}),y==="img"||G){let j=S.__src;qe=await nn({id:r,left:Pe,top:we,width:De,height:J,src:j,isInheritingTransform:C,debug:a},S,A)}else if(y==="svg"){let j=S.color,q=await Eu(e,j);qe=await nn({id:r,left:Pe,top:we,width:De,height:J,src:q,isInheritingTransform:C,debug:a},S,A)}else{let j=x==null?void 0:x.display;if(y==="div"&&_&&typeof _!="string"&&j!=="flex"&&j!=="none"&&j!=="contents")throw new Error('Expected <div> to have explicit "display: flex", "display: contents", or "display: none" if it has more than one child node.');qe=await nn({id:r,left:Pe,top:we,width:De,height:J,isInheritingTransform:C,debug:a},S,A)}for(let j of ee)xe+=(await j.next([Pe,we])).value;return S._inheritedBackgroundClipTextPath&&(Be+=I("clipPath",{id:`satori_bct-${r}`,"clip-path":S._inheritedClipPathId?`url(#${S._inheritedClipPathId})`:void 0},S._inheritedBackgroundClipTextPath.value)),Be+qe+xe}var sn=at(require("@shuding/opentype.js"),1),_l=require("fflate");var vl=at(require("harfbuzzjs"),1),ht=null,xi=null,Fo=new WeakMap,No=typeof FinalizationRegistry=="function"?new FinalizationRegistry(e=>e.destroy()):null;async function xl(){if(!ht){if(xi){await xi;return}xi=(async()=>{if(ht=await vl.default,!ht||typeof ht.createBlob!="function")throw new Error("HarfBuzz module loaded but API is not available")})(),await xi}}function eh(e){if(!ht)throw new Error("HarfBuzz not initialized. Call initHarfBuzz() first.");if(Fo.has(e))return Fo.get(e);let t=e._rawFontData;if(!t)throw new Error("Font does not have _rawFontData. Make sure to store the original ArrayBuffer when loading fonts.");let n=ht.createBlob(new Uint8Array(t)),r=ht.createFace(n,0),i=ht.createFont(r);r.destroy(),n.destroy();let o=e.unitsPerEm;return i.setScale(o,o),Fo.set(e,i),No==null||No.register(e,i),i}function wl(e,t,n={}){if(!ht)throw new Error("HarfBuzz not initialized");if(!t||t.length===0)return[];let{features:r,language:i,script:o,direction:s}=n,a=eh(e),u=ht.createBuffer();try{u.addText(t),u.guessSegmentProperties(),i&&u.setLanguage(i),o&&u.setScript(o),s&&u.setDirection(s);let l;if(r&&Object.keys(r).length>0){let c=[];for(let[h,m]of Object.entries(r))typeof m=="boolean"?c.push(m?`+${h}`:`-${h}`):c.push(`${h}=${m}`);l=c.join(",")}return l?ht.shape(a,u,l):ht.shape(a,u),u.json(a)}finally{u.destroy()}}function Sl(e){if(!e||e==="normal")return{};let t={},n=e.split(",").map(r=>r.trim());for(let r of n){let i=r.match(/["']([a-z0-9]{4})["']\s*(?:(on|off|[0-9]+))?/i);if(i){let o=i[1],s=i[2];if(!s||s==="on"||s==="1")t[o]=!0;else if(s==="off"||s==="0")t[o]=!1;else{let a=parseInt(s,10);isNaN(a)||(t[o]=a)}}}return t}var th=256;function rh(e){return/^\s$/.test(e)}function nh(e,t){if(!e)return[];let n=Fe(e,"grapheme"),r=[],i="",o=null;for(let s of n){let a;rh(s)&&o!==null&&o.charToGlyphIndex(s)?a=o:a=t(s),o===null?(o=a,i=s):a===o?i+=s:(r.push([i,o]),i=s,o=a)}return i&&o&&r.push([i,o]),r}function ih(e){let t=new DataView(e),n=t.getUint16(12),r=t.getUint32(16),i=new ArrayBuffer(r),o=new DataView(i),s=new Uint8Array(i);o.setUint32(0,t.getUint32(4)),o.setUint16(4,n);let a=Math.floor(Math.log2(n)),u=(1<<a)*16;o.setUint16(6,u),o.setUint16(8,a),o.setUint16(10,n*16-u);let l=12+n*16;for(let f=0;f<n;f++){let c=44+f*20,h=t.getUint32(c),m=t.getUint32(c+4),g=t.getUint32(c+8),y=t.getUint32(c+12),x=t.getUint32(c+16),_=12+f*16;if(o.setUint32(_,h),o.setUint32(_+4,x),o.setUint32(_+8,l),o.setUint32(_+12,y),g<y){let E=new Uint8Array(e,m+2,g-2),T=new Uint8Array(y);(0,_l.inflateSync)(E,T),s.set(T,l)}else s.set(new Uint8Array(e,m,y),l);l+=y+3&-4}return i}var El="unknown";function oh(e){let t=[],n=[0,0],r=[0,0],i=(o,s)=>{let a=o[0];for(let u=1;u<=s;u++){let l=u/s,f=sh(o,l);t.push({from:a,to:f}),a=f}r=o[o.length-1]};for(let o of e){if(o.type==="M"){n=r=[o.x,o.y];continue}if(o.type==="L"){let s=[o.x,o.y];t.push({from:r,to:s}),r=s;continue}if(o.type==="Q"){i([r,[o.x1,o.y1],[o.x,o.y]],12);continue}if(o.type==="C"){i([r,[o.x1,o.y1],[o.x2,o.y2],[o.x,o.y]],16);continue}o.type==="Z"&&(t.push({from:r,to:n}),r=n)}return t}function sh(e,t){let n=e;for(;n.length>1;){let r=[];for(let i=0;i<n.length-1;i++)r.push([n[i][0]+(n[i+1][0]-n[i][0])*t,n[i][1]+(n[i+1][1]-n[i][1])*t]);n=r}return n[0]}function ah(e,t){if(!t)return[];let n=t.strokeWidth,r=t.underlineY-n*.25,i=t.underlineY+n*2.5,o=oh(e);if(!o.length)return[];let s=i-r,a=Math.max(12,Math.ceil(s/.25)),u=s/a,l=r+u/2,f=new Set;for(let T=0;T<a;T++){let R=l+u*T,P=[];for(let S of o){let[A,C]=S.from,[G,V]=S.to;if(C===V)continue;let ee=Math.min(C,V),re=Math.max(C,V);if(R<ee||R>=re)continue;let pe=(R-C)/(V-C),ce=A+(G-A)*pe;P.push(ce)}if(P.length){P.sort((S,A)=>S-A);for(let S=0;S<P.length-1;S+=2){let A=Math.min(P[S],P[S+1]),C=Math.max(P[S],P[S+1]),G=Math.floor(A),V=Math.ceil(C);for(let ee=G;ee<V;ee++)f.add(ee)}}}if(!f.size)return[];let c=Array.from(f.values()).sort((T,R)=>T-R),h=[],m=c[0],g=c[0];for(let T=1;T<c.length;T++){let R=c[T];R>g+1&&(h.push([m,g+1]),m=R),g=R}h.push([m,g+1]);let y=[],x=n*.6,_=h[0][0],E=h[h.length-1][1];for(let[T,R]of h){let P=Math.min(T,_)-x,S=Math.max(R,E)+x;y.push({x1:P,x2:S,y1:r,y2:i})}return y}function uh(e,t,[n,r],[i,o]){if(n!==i)return n?!i||n===e?-1:i===e?1:e===400&&n===500||e===500&&n===400?-1:e===400&&i===500||e===500&&i===400?1:e<400?n<e&&i<e?i-n:n<e?-1:i<e?1:n-i:e<n&&e<i?n-i:e<n?-1:e<i?1:i-n:1;if(r!==o){if(r===t)return-1;if(o===t)return 1}return-1}var Do=new WeakMap,an=class{constructor(t){this.fonts=new Map;this.shapedRunCache=new Map;this.addFonts(t)}get({name:t,weight:n,style:r}){if(!this.fonts.has(t))return null;n==="normal"&&(n=400),n==="bold"&&(n=700),typeof n=="string"&&(n=Number.parseInt(n,10));let i=[...this.fonts.get(t)],o=i[0];for(let s=1;s<i.length;s++){let[,a,u]=o,[,l,f]=i[s];uh(n,r,[a,u],[l,f])>0&&(o=i[s])}return o[0]}addFonts(t){t.length&&this.fonts.size&&this.shapedRunCache.clear();for(let n of t){let{name:r,data:i,lang:o}=n;if(o&&!gl(o))throw new Error(`Invalid value for props \`lang\`: "${o}". The value must be one of the following: ${vi.join(", ")}.`);let s=o??El,a;if(Do.has(i))a=Do.get(i);else{let l="buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i;a=sn.default.parse(l,{lowMemory:!0});let f=new Uint8Array(l),c=f[0]===119&&f[1]===79&&f[2]===70&&f[3]===70;a._rawFontData=c?ih(l):l;let h=a.charToGlyphIndex;a.charToGlyphIndex=m=>{let g=h.call(a,m);return g===0&&a._trackBrokenChars&&a._trackBrokenChars.push(m),g},Do.set(i,a)}this.defaultFont||(this.defaultFont=a);let u=`${r.toLowerCase()}_${s}`;this.fonts.has(u)||this.fonts.set(u,[]),this.fonts.get(u).push([a,n.weight,n.style])}}getEngine(t=16,n="normal",{fontFamily:r="sans-serif",fontWeight:i=400,fontStyle:o="normal"},s){if(!this.fonts.size)throw new Error("No fonts are loaded. At least one font is required to calculate the layout.");r=(Array.isArray(r)?r:[r]).map(S=>S.toLowerCase());let a=[];r.forEach(S=>{let A=this.get({name:S,weight:i,style:o});if(A){a.push(A);return}let C=this.get({name:S+"_unknown",weight:i,style:o});if(C){a.push(C);return}});let u=Array.from(this.fonts.keys()),l=[],f=[],c=[];for(let S of u)if(!r.includes(S))if(s){let A=lh(S);A?A===s?l.push(this.get({name:S,weight:i,style:o})):f.push(this.get({name:S,weight:i,style:o})):c.push(this.get({name:S,weight:i,style:o}))}else c.push(this.get({name:S,weight:i,style:o}));let h=new Map,m=(S,A=!0)=>{let C=[...a,...c,...l,...A?f:[]];if(typeof S>"u")return A?C[C.length-1]:void 0;let G=S.charCodeAt(0);if(h.has(G))return h.get(G);let V=C.find((ee,re)=>!!ee.charToGlyphIndex(S)||A&&re===C.length-1);return V&&h.set(G,V),V},g=(S,A=!1)=>{var G,V;return((A?(V=(G=S.tables)==null?void 0:G.os2)==null?void 0:V.sTypoAscender:0)||S.ascender)/S.unitsPerEm*t},y=(S,A=!1)=>{var G,V;return((A?(V=(G=S.tables)==null?void 0:G.os2)==null?void 0:V.sTypoDescender:0)||S.descender)/S.unitsPerEm*t},x=(S,A=!1)=>{var C,G;if(typeof n=="string"&&n==="normal"){let V=(A?(G=(C=S.tables)==null?void 0:C.os2)==null?void 0:G.sTypoLineGap:0)||0;return g(S,A)-y(S,A)+V/S.unitsPerEm*t}else if(typeof n=="number")return t*n},_=S=>m(S,!1),E=this.shapedRunCache,T=`${r.join(",")}|${i}|${o}|${s||""}`,R=(S,A)=>{let C=`${T}\0${A||""}\0${S}`,G=E.get(C);if(G!==void 0)return E.delete(C),E.set(C,G),G;let V=A?Sl(A):{},ee=nh(S,m).map(([re,pe])=>[re,pe,wl(pe,re,{features:V})]);if(E.size>=th){let re=E.keys().next().value;re!==void 0&&E.delete(re)}return E.set(C,ee),ee};return{has:S=>{if(S===`
7
7
  `)return!0;let A=_(S);if(!A)return!1;for(let C of Fe(S,"grapheme"))if(!A.charToGlyphIndex(C))return!1;return!0},baseline:(S,A=typeof S>"u"?a[0]:m(S))=>{let C=g(A),G=y(A),V=C-G;return C+(x(A)-V)/2},height:(S,A=typeof S>"u"?a[0]:m(S))=>x(A),measure:(S,A)=>this.measure(S,A,R),getSVG:(S,A,C)=>this.getSVG(S,A,R,C)}}patchFontFallbackResolver(t,n){let r=[];t._trackBrokenChars=r;let i=t.stringToGlyphs;return t.stringToGlyphs=(o,...s)=>{let a=i.call(t,o,...s);for(let u=0;u<a.length;u++)if(a[u].unicode===void 0){let l=r.shift(),f=n(l);if(f!==t){let c=f.charToGlyph(l),h=t.unitsPerEm/f.unitsPerEm,m=new sn.default.Path;m.unitsPerEm=t.unitsPerEm,m.commands=c.path.commands.map(y=>{let x={...y};for(let _ in x)typeof x[_]=="number"&&(x[_]*=h);return x});let g=new sn.default.Glyph({...c,advanceWidth:c.advanceWidth*h,xMin:c.xMin*h,xMax:c.xMax*h,yMin:c.yMin*h,yMax:c.yMax*h,path:m});a[u]=g}}return a},()=>{t.stringToGlyphs=i,t._trackBrokenChars=void 0}}measure(t,{fontSize:n,letterSpacing:r=0,fontFeatureSettings:i},o){let s=o(t,i),a=0,u=0;for(let[,f,c]of s){let h=0;for(let m of c)h+=m.ax;a+=h/f.unitsPerEm*n,u+=c.length}let l=r*Math.max(0,u-1);return a+l}getSVG(t,{fontSize:n,top:r,left:i,letterSpacing:o=0,fontFeatureSettings:s},a,u){if(n===0)return{path:"",boxes:[]};let l=a(t.replace(/\n/g,""),s),f=[],c=i,h=r,m=!1,g=new sn.default.Path;for(let[,y,x]of l){let _=n/y.unitsPerEm;for(let E=0;E<x.length;E++){let T=x[E];m&&(c+=o);let R=y.glyphs.get(T.g);if(R&&R.path){let P=c+T.dx*_,S=h+T.dy*_,A=R.getPath(P,S,n,{}),C=u?ah(A.commands,u):[];C.length&&f.push(...C),g.extend(A)}c+=T.ax*_,m=!0}}return{path:g.toPathData(1),boxes:f}}};function lh(e){let t=e.split("_"),n=t[t.length-1];return n===El?void 0:n}function Wo({width:e,height:t,content:n}){return I("svg",{width:e,height:t,viewBox:`0 0 ${e} ${t}`,xmlns:"http://www.w3.org/2000/svg","enable-background":n.includes('in="BackgroundImage"')?"new":void 0},n)}var id=at(Fc());var Xy=["ios","android","windows","macos","web"];function Dc(e){return Xy.includes(e)}var Ky=["portrait","landscape"];function Wc(e){return Ky.includes(e)}var Nc;(function(e){e.fontSize="fontSize",e.lineHeight="lineHeight"})(Nc||(Nc={}));var ae;(function(e){e.rem="rem",e.em="em",e.px="px",e.percent="%",e.vw="vw",e.vh="vh",e.none="<no-css-unit>"})(ae||(ae={}));function fa(e){return typeof e=="string"}function ca(e){return typeof e=="object"}var da;function k(e){return{kind:"complete",style:e}}function Ne(e,t={}){let{fractions:n}=t;if(n&&e.includes("/")){let[o="",s=""]=e.split("/",2),a=Ne(o),u=Ne(s);return!a||!u?null:[a[0]/u[0],u[1]]}let r=parseFloat(e);if(Number.isNaN(r))return null;let i=e.match(/(([a-z]{2,}|%))$/);if(!i)return[r,ae.none];switch(i==null?void 0:i[1]){case"rem":return[r,ae.rem];case"px":return[r,ae.px];case"em":return[r,ae.em];case"%":return[r,ae.percent];case"vw":return[r,ae.vw];case"vh":return[r,ae.vh];default:return null}}function Qt(e,t,n={}){let r=Ft(t,n);return r===null?null:k({[e]:r})}function Wi(e,t,n){let r=Ft(t);return r!==null&&(n[e]=r),n}function Bc(e,t){let n=Ft(t);return n===null?null:{[e]:n}}function Ft(e,t={}){if(e===void 0)return null;let n=Ne(String(e),t);return n?or(...n,t):null}function or(e,t,n={}){let{isNegative:r,device:i}=n;switch(t){case ae.rem:return e*16*(r?-1:1);case ae.px:return e*(r?-1:1);case ae.percent:return`${r?"-":""}${e}%`;case ae.none:return e*(r?-1:1);case ae.vw:return i!=null&&i.windowDimensions?i.windowDimensions.width*(e/100):(tt("`vw` CSS unit requires configuration with `useDeviceContext()`"),null);case ae.vh:return i!=null&&i.windowDimensions?i.windowDimensions.height*(e/100):(tt("`vh` CSS unit requires configuration with `useDeviceContext()`"),null);default:return null}}function pa(e){let t=Ne(e);if(!t)return null;let[n,r]=t;switch(r){case ae.rem:return n*16;case ae.px:return n;default:return null}}var Qy={t:"Top",tr:"TopRight",tl:"TopLeft",b:"Bottom",br:"BottomRight",bl:"BottomLeft",l:"Left",r:"Right",x:"Horizontal",y:"Vertical"};function ha(e){return Qy[e??""]||"All"}function ma(e){let t="All";return[e.replace(/^-(t|b|r|l|tr|tl|br|bl)(-|$)/,(r,i)=>(t=ha(i),"")),t]}function br(e,t={}){if(e.includes("/")){let n=$c(e,{...t,fractions:!0});if(n)return n}return e[0]==="["&&(e=e.slice(1,-1)),$c(e,t)}function vt(e,t,n={}){let r=br(t,n);return r===null?null:k({[e]:r})}function $c(e,t={}){if(e==="px")return 1;let n=Ne(e,t);if(!n)return null;let[r,i]=n;return t.fractions&&(i=ae.percent,r*=100),i===ae.none&&(r=r/4,i=ae.rem),or(r,i,t)}function Jy(...e){console.warn(...e)}function Zy(...e){}var tt=typeof process>"u"||((da=process==null?void 0:process.env)===null||da===void 0?void 0:da.JEST_WORKER_ID)===void 0?Jy:Zy;var ev=[["aspect-square",k({aspectRatio:1})],["aspect-video",k({aspectRatio:16/9})],["items-center",k({alignItems:"center"})],["items-start",k({alignItems:"flex-start"})],["items-end",k({alignItems:"flex-end"})],["items-baseline",k({alignItems:"baseline"})],["items-stretch",k({alignItems:"stretch"})],["justify-start",k({justifyContent:"flex-start"})],["justify-end",k({justifyContent:"flex-end"})],["justify-center",k({justifyContent:"center"})],["justify-between",k({justifyContent:"space-between"})],["justify-around",k({justifyContent:"space-around"})],["justify-evenly",k({justifyContent:"space-evenly"})],["content-start",k({alignContent:"flex-start"})],["content-end",k({alignContent:"flex-end"})],["content-between",k({alignContent:"space-between"})],["content-around",k({alignContent:"space-around"})],["content-stretch",k({alignContent:"stretch"})],["content-center",k({alignContent:"center"})],["self-auto",k({alignSelf:"auto"})],["self-start",k({alignSelf:"flex-start"})],["self-end",k({alignSelf:"flex-end"})],["self-center",k({alignSelf:"center"})],["self-stretch",k({alignSelf:"stretch"})],["self-baseline",k({alignSelf:"baseline"})],["direction-inherit",k({direction:"inherit"})],["direction-ltr",k({direction:"ltr"})],["direction-rtl",k({direction:"rtl"})],["hidden",k({display:"none"})],["flex",k({display:"flex"})],["flex-row",k({flexDirection:"row"})],["flex-row-reverse",k({flexDirection:"row-reverse"})],["flex-col",k({flexDirection:"column"})],["flex-col-reverse",k({flexDirection:"column-reverse"})],["flex-wrap",k({flexWrap:"wrap"})],["flex-wrap-reverse",k({flexWrap:"wrap-reverse"})],["flex-nowrap",k({flexWrap:"nowrap"})],["flex-auto",k({flexGrow:1,flexShrink:1,flexBasis:"auto"})],["flex-initial",k({flexGrow:0,flexShrink:1,flexBasis:"auto"})],["flex-none",k({flexGrow:0,flexShrink:0,flexBasis:"auto"})],["overflow-hidden",k({overflow:"hidden"})],["overflow-visible",k({overflow:"visible"})],["overflow-scroll",k({overflow:"scroll"})],["absolute",k({position:"absolute"})],["relative",k({position:"relative"})],["italic",k({fontStyle:"italic"})],["not-italic",k({fontStyle:"normal"})],["oldstyle-nums",Wn("oldstyle-nums")],["small-caps",Wn("small-caps")],["lining-nums",Wn("lining-nums")],["tabular-nums",Wn("tabular-nums")],["proportional-nums",Wn("proportional-nums")],["font-thin",k({fontWeight:"100"})],["font-100",k({fontWeight:"100"})],["font-extralight",k({fontWeight:"200"})],["font-200",k({fontWeight:"200"})],["font-light",k({fontWeight:"300"})],["font-300",k({fontWeight:"300"})],["font-normal",k({fontWeight:"normal"})],["font-400",k({fontWeight:"400"})],["font-medium",k({fontWeight:"500"})],["font-500",k({fontWeight:"500"})],["font-semibold",k({fontWeight:"600"})],["font-600",k({fontWeight:"600"})],["font-bold",k({fontWeight:"bold"})],["font-700",k({fontWeight:"700"})],["font-extrabold",k({fontWeight:"800"})],["font-800",k({fontWeight:"800"})],["font-black",k({fontWeight:"900"})],["font-900",k({fontWeight:"900"})],["include-font-padding",k({includeFontPadding:!0})],["remove-font-padding",k({includeFontPadding:!1})],["max-w-none",k({maxWidth:"99999%"})],["text-left",k({textAlign:"left"})],["text-center",k({textAlign:"center"})],["text-right",k({textAlign:"right"})],["text-justify",k({textAlign:"justify"})],["text-auto",k({textAlign:"auto"})],["underline",k({textDecorationLine:"underline"})],["line-through",k({textDecorationLine:"line-through"})],["no-underline",k({textDecorationLine:"none"})],["uppercase",k({textTransform:"uppercase"})],["lowercase",k({textTransform:"lowercase"})],["capitalize",k({textTransform:"capitalize"})],["normal-case",k({textTransform:"none"})],["w-auto",k({width:"auto"})],["h-auto",k({height:"auto"})],["shadow-sm",k({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.025,elevation:1})],["shadow",k({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.075,elevation:2})],["shadow-md",k({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:3,shadowOpacity:.125,elevation:3})],["shadow-lg",k({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.15,shadowRadius:8,elevation:8})],["shadow-xl",k({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.19,shadowRadius:20,elevation:12})],["shadow-2xl",k({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.25,shadowRadius:30,elevation:16})],["shadow-none",k({shadowOffset:{width:0,height:0},shadowColor:"#000",shadowRadius:0,shadowOpacity:0,elevation:0})]],ga=ev;function Wn(e){return{kind:"dependent",complete(t){(!t.fontVariant||!Array.isArray(t.fontVariant))&&(t.fontVariant=[]),t.fontVariant.push(e)}}}var $n=class{constructor(t){this.ir=new Map(ga),this.styles=new Map,this.prefixes=new Map,this.ir=new Map([...ga,...t??[]])}getStyle(t){return this.styles.get(t)}setStyle(t,n){this.styles.set(t,n)}getIr(t){return this.ir.get(t)}setIr(t,n){this.ir.set(t,n)}getPrefixMatch(t){return this.prefixes.get(t)}setPrefixMatch(t,n){this.prefixes.set(t,n)}};function ba(e,t,n={}){let r=t==null?void 0:t[e];if(!r)return vt("fontSize",e,n);if(typeof r=="string")return Qt("fontSize",r);let i={},[o,s]=r,a=Bc("fontSize",o);if(a&&(i=a),typeof s=="string")return k(Wi("lineHeight",Uc(s,i),i));let{lineHeight:u,letterSpacing:l}=s;return u&&Wi("lineHeight",Uc(u,i),i),l&&Wi("letterSpacing",l,i),k(i)}function Uc(e,t){let n=Ne(e);if(n){let[r,i]=n;if((i===ae.none||i===ae.em)&&typeof t.fontSize=="number")return t.fontSize*r}return e}function ya(e,t){var n;let r=(n=t==null?void 0:t[e])!==null&&n!==void 0?n:e.startsWith("[")?e.slice(1,-1):e,i=Ne(r);if(!i)return null;let[o,s]=i;if(s===ae.none)return{kind:"dependent",complete(u){if(typeof u.fontSize!="number")return"relative line-height utilities require that font-size be set";u.lineHeight=u.fontSize*o}};let a=or(o,s);return a!==null?k({lineHeight:a}):null}function va(e,t,n,r,i){let o="";if(r[0]==="[")o=r.slice(1,-1);else{let l=i==null?void 0:i[r];if(l)o=l;else{let f=br(r);return f&&typeof f=="number"?qc(f,ae.px,t,e):null}}if(o==="auto")return zc(t,e,"auto");let s=Ne(o);if(!s)return null;let[a,u]=s;return n&&(a=-a),qc(a,u,t,e)}function qc(e,t,n,r){let i=or(e,t);return i===null?null:zc(n,r,i)}function zc(e,t,n){switch(e){case"All":return{kind:"complete",style:{[`${t}Top`]:n,[`${t}Right`]:n,[`${t}Bottom`]:n,[`${t}Left`]:n}};case"Bottom":case"Top":case"Left":case"Right":return{kind:"complete",style:{[`${t}${e}`]:n}};case"Vertical":return{kind:"complete",style:{[`${t}Top`]:n,[`${t}Bottom`]:n}};case"Horizontal":return{kind:"complete",style:{[`${t}Left`]:n,[`${t}Right`]:n}};default:return null}}function xa(e){if(!e)return{};let t=Object.entries(e).reduce((i,[o,s])=>{let a=[0,1/0,0],u=typeof s=="string"?{min:s}:s,l=u.min?pa(u.min):0;l===null?tt(`invalid screen config value: ${o}->min: ${u.min}`):a[0]=l;let f=u.max?pa(u.max):1/0;return f===null?tt(`invalid screen config value: ${o}->max: ${u.max}`):a[1]=f,i[o]=a,i},{}),n=Object.values(t);n.sort((i,o)=>{let[s,a]=i,[u,l]=o;return a===1/0||l===1/0?s-u:a-l});let r=0;return n.forEach(i=>i[2]=r++),t}function wa(e,t){let n=t==null?void 0:t[e];if(!n)return null;if(typeof n=="string")return k({fontFamily:n});let r=n[0];return r?k({fontFamily:r}):null}function yr(e,t,n){if(!n)return null;let r;t.includes("/")&&([t="",r]=t.split("/",2));let i="";if(t.startsWith("[#")||t.startsWith("[rgb")?i=t.slice(1,-1):i=Vc(t,n),!i)return null;if(r){let o=Number(r);if(!Number.isNaN(o))return i=Gc(i,o/100),k({[$i[e].color]:i})}return{kind:"dependent",complete(o){let s=$i[e].opacity,a=o[s];typeof a=="number"&&(i=Gc(i,a)),o[$i[e].color]=i}}}function Bn(e,t){let n=parseInt(t,10);if(Number.isNaN(n))return null;let r=n/100;return{kind:"complete",style:{[$i[e].opacity]:r}}}function Gc(e,t){return e.startsWith("#")?e=tv(e):e.startsWith("rgb(")&&(e=e.replace(/^rgb\(/,"rgba(").replace(/\)$/,", 1)")),e.replace(/, ?\d*\.?(\d+)\)$/,`, ${t})`)}function jc(e){for(let t in e)t.startsWith("__opacity_")&&delete e[t]}var $i={bg:{opacity:"__opacity_bg",color:"backgroundColor"},text:{opacity:"__opacity_text",color:"color"},border:{opacity:"__opacity_border",color:"borderColor"},borderTop:{opacity:"__opacity_border",color:"borderTopColor"},borderBottom:{opacity:"__opacity_border",color:"borderBottomColor"},borderLeft:{opacity:"__opacity_border",color:"borderLeftColor"},borderRight:{opacity:"__opacity_border",color:"borderRightColor"},shadow:{opacity:"__opacity_shadow",color:"shadowColor"},tint:{opacity:"__opacity_tint",color:"tintColor"}};function tv(e){let t=e;e=e.replace(rv,(s,a,u,l)=>a+a+u+u+l+l);let n=nv.exec(e);if(!n)return tt(`invalid config hex color value: ${t}`),"rgba(0, 0, 0, 1)";let r=parseInt(n[1],16),i=parseInt(n[2],16),o=parseInt(n[3],16);return`rgba(${r}, ${i}, ${o}, 1)`}function Vc(e,t){let n=t[e];if(fa(n))return n;if(ca(n)&&fa(n.DEFAULT))return n.DEFAULT;let[r="",...i]=e.split("-");for(;r!==e;){let o=t[r];if(ca(o))return Vc(i.join("-"),o);if(i.length===0)return"";r=`${r}-${i.shift()}`}return""}var rv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,nv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;function Yc(e,t){let[n,r]=ma(e);if(n.match(/^(-?(\d)+)?$/))return iv(n,r,t==null?void 0:t.borderWidth);if(n=n.replace(/^-/,""),["dashed","solid","dotted"].includes(n))return k({borderStyle:n});let o="border";switch(r){case"Bottom":o="borderBottom";break;case"Top":o="borderTop";break;case"Left":o="borderLeft";break;case"Right":o="borderRight";break}let s=yr(o,n,t==null?void 0:t.borderColor);if(s)return s;let a=`border${r==="All"?"":r}Width`;n=n.replace(/^-/,"");let u=n.slice(1,-1),l=vt(a,u);return typeof(l==null?void 0:l.style[a])!="number"?null:l}function iv(e,t,n){if(!n)return null;e=e.replace(/^-/,"");let i=n[e===""?"DEFAULT":e];if(i===void 0)return null;let o=`border${t==="All"?"":t}Width`;return Qt(o,i)}function Xc(e,t){if(!t)return null;let[n,r]=ma(e);n=n.replace(/^-/,""),n===""&&(n="DEFAULT");let i=`border${r==="All"?"":r}Radius`,o=t[n];if(o)return Hc(Qt(i,o));let s=vt(i,n);return typeof(s==null?void 0:s.style[i])!="number"?null:Hc(s)}function Hc(e){if((e==null?void 0:e.kind)!=="complete")return e;let t=e.style.borderTopRadius;t!==void 0&&(e.style.borderTopLeftRadius=t,e.style.borderTopRightRadius=t,delete e.style.borderTopRadius);let n=e.style.borderBottomRadius;n!==void 0&&(e.style.borderBottomLeftRadius=n,e.style.borderBottomRightRadius=n,delete e.style.borderBottomRadius);let r=e.style.borderLeftRadius;r!==void 0&&(e.style.borderBottomLeftRadius=r,e.style.borderTopLeftRadius=r,delete e.style.borderLeftRadius);let i=e.style.borderRightRadius;return i!==void 0&&(e.style.borderBottomRightRadius=i,e.style.borderTopRightRadius=i,delete e.style.borderRightRadius),e}function Nr(e,t,n,r){let i=null;e==="inset"&&(t=t.replace(/^(x|y)-/,(a,u)=>(i=u==="x"?"x":"y","")));let o=r==null?void 0:r[t];if(o){let a=Ft(o,{isNegative:n});if(a!==null)return Kc(e,i,a)}let s=br(t,{isNegative:n});return s!==null?Kc(e,i,s):null}function Kc(e,t,n){if(e!=="inset")return k({[e]:n});switch(t){case null:return k({top:n,left:n,right:n,bottom:n});case"y":return k({top:n,bottom:n});case"x":return k({left:n,right:n})}}function Un(e,t,n){var r;t=t.replace(/^-/,"");let i=t===""?"DEFAULT":t,o=Number((r=n==null?void 0:n[i])!==null&&r!==void 0?r:t);return Number.isNaN(o)?null:k({[`flex${e}`]:o})}function Qc(e,t){var n,r;if(e=(t==null?void 0:t[e])||e,["min-content","revert","unset"].includes(e))return null;if(e.match(/^\d+(\.\d+)?$/))return k({flexGrow:Number(e),flexBasis:"0%"});let i=e.match(/^(\d+)\s+(\d+)$/);if(i)return k({flexGrow:Number(i[1]),flexShrink:Number(i[2])});if(i=e.match(/^(\d+)\s+([^ ]+)$/),i){let o=Ft((n=i[2])!==null&&n!==void 0?n:"");return o?k({flexGrow:Number(i[1]),flexBasis:o}):null}if(i=e.match(/^(\d+)\s+(\d+)\s+(.+)$/),i){let o=Ft((r=i[3])!==null&&r!==void 0?r:"");return o?k({flexGrow:Number(i[1]),flexShrink:Number(i[2]),flexBasis:o}):null}return null}function Sa(e,t,n={},r){let i=r==null?void 0:r[t];return i!==void 0?Qt(e,i,n):vt(e,t,n)}function qn(e,t,n={},r){let i=Ft(r==null?void 0:r[t],n);return i?k({[e]:i}):(t==="screen"&&(t=e.includes("Width")?"100vw":"100vh"),vt(e,t,n))}function Jc(e,t,n){let r=n==null?void 0:n[e];if(r){let i=Ne(r,{isNegative:t});if(!i)return null;let[o,s]=i;if(s===ae.em)return ov(o);if(s===ae.percent)return tt("percentage-based letter-spacing configuration currently unsupported, switch to `em`s, or open an issue if you'd like to see support added."),null;let a=or(o,s,{isNegative:t});return a!==null?k({letterSpacing:a}):null}return vt("letterSpacing",e,{isNegative:t})}function ov(e){return{kind:"dependent",complete(t){let n=t.fontSize;if(typeof n!="number"||Number.isNaN(n))return"tracking-X relative letter spacing classes require font-size to be set";t.letterSpacing=Math.round((e*n+Number.EPSILON)*100)/100}}}function Zc(e,t){let n=t==null?void 0:t[e];if(n){let i=Ne(String(n));if(i)return k({opacity:i[0]})}let r=Ne(e);return r?k({opacity:r[0]/100}):null}function ed(e){let t=parseInt(e,10);return Number.isNaN(t)?null:{kind:"complete",style:{shadowOpacity:t/100}}}function td(e){if(e.includes("/")){let[n="",r=""]=e.split("/",2),i=_a(n),o=_a(r);return i===null||o===null?null:{kind:"complete",style:{shadowOffset:{width:i,height:o}}}}let t=_a(e);return t===null?null:{kind:"complete",style:{shadowOffset:{width:t,height:t}}}}function _a(e){let t=br(e);return typeof t=="number"?t:null}var Dr=class{constructor(t,n={},r,i,o){var s,a,u,l,f,c;this.config=n,this.cache=r,this.position=0,this.isNull=!1,this.isNegative=!1,this.context={},this.context.device=i;let h=t.trim().split(":"),m=[];h.length===1?this.string=t:(this.string=(s=h.pop())!==null&&s!==void 0?s:"",m=h),this.char=this.string[0];let g=xa((a=this.config.theme)===null||a===void 0?void 0:a.screens);for(let y of m)if(g[y]){let x=(u=g[y])===null||u===void 0?void 0:u[2];x!==void 0&&(this.order=((l=this.order)!==null&&l!==void 0?l:0)+x);let _=(f=i.windowDimensions)===null||f===void 0?void 0:f.width;if(_){let[E,T]=(c=g[y])!==null&&c!==void 0?c:[0,0];(_<=E||_>T)&&(this.isNull=!0)}else this.isNull=!0}else Dc(y)?this.isNull=y!==o:Wc(y)?i.windowDimensions?(i.windowDimensions.width>i.windowDimensions.height?"landscape":"portrait")!==y?this.isNull=!0:this.incrementOrder():this.isNull=!0:y==="retina"?i.pixelDensity===2?this.incrementOrder():this.isNull=!0:y==="dark"?i.colorScheme!=="dark"?this.isNull=!0:this.incrementOrder():this.handlePossibleArbitraryBreakpointPrefix(y)||(this.isNull=!0)}parse(){if(this.isNull)return{kind:"null"};let t=this.cache.getIr(this.rest);if(t)return t;this.parseIsNegative();let n=this.parseUtility();return n?this.order!==void 0?{kind:"ordered",order:this.order,styleIr:n}:n:{kind:"null"}}parseUtility(){var t,n,r,i,o;let s=this.config.theme,a=null;switch(this.char){case"m":case"p":{let u=this.peekSlice(1,3).match(/^(t|b|r|l|x|y)?-/);if(u){let l=this.char==="m"?"margin":"padding";this.advance(((n=(t=u[0])===null||t===void 0?void 0:t.length)!==null&&n!==void 0?n:0)+1);let f=ha(u[1]),c=va(l,f,this.isNegative,this.rest,(r=this.config.theme)===null||r===void 0?void 0:r[l]);if(c)return c}}}if(this.consumePeeked("h-")&&(a=Sa("height",this.rest,this.context,s==null?void 0:s.height),a)||this.consumePeeked("w-")&&(a=Sa("width",this.rest,this.context,s==null?void 0:s.width),a)||this.consumePeeked("min-w-")&&(a=qn("minWidth",this.rest,this.context,s==null?void 0:s.minWidth),a)||this.consumePeeked("min-h-")&&(a=qn("minHeight",this.rest,this.context,s==null?void 0:s.minHeight),a)||this.consumePeeked("max-w-")&&(a=qn("maxWidth",this.rest,this.context,s==null?void 0:s.maxWidth),a)||this.consumePeeked("max-h-")&&(a=qn("maxHeight",this.rest,this.context,s==null?void 0:s.maxHeight),a)||this.consumePeeked("leading-")&&(a=ya(this.rest,s==null?void 0:s.lineHeight),a)||this.consumePeeked("text-")&&(a=ba(this.rest,s==null?void 0:s.fontSize,this.context),a||(a=yr("text",this.rest,s==null?void 0:s.textColor),a)||this.consumePeeked("opacity-")&&(a=Bn("text",this.rest),a))||this.consumePeeked("font-")&&(a=wa(this.rest,s==null?void 0:s.fontFamily),a)||this.consumePeeked("aspect-")&&(this.consumePeeked("ratio-")&&tt("`aspect-ratio-{ratio}` is deprecated, use `aspect-{ratio}` instead"),a=Qt("aspectRatio",this.rest,{fractions:!0}),a)||this.consumePeeked("tint-")&&(a=yr("tint",this.rest,s==null?void 0:s.colors),a)||this.consumePeeked("bg-")&&(a=yr("bg",this.rest,s==null?void 0:s.backgroundColor),a||this.consumePeeked("opacity-")&&(a=Bn("bg",this.rest),a))||this.consumePeeked("border")&&(a=Yc(this.rest,s),a||this.consumePeeked("-opacity-")&&(a=Bn("border",this.rest),a))||this.consumePeeked("rounded")&&(a=Xc(this.rest,s==null?void 0:s.borderRadius),a)||this.consumePeeked("bottom-")&&(a=Nr("bottom",this.rest,this.isNegative,s==null?void 0:s.inset),a)||this.consumePeeked("top-")&&(a=Nr("top",this.rest,this.isNegative,s==null?void 0:s.inset),a)||this.consumePeeked("left-")&&(a=Nr("left",this.rest,this.isNegative,s==null?void 0:s.inset),a)||this.consumePeeked("right-")&&(a=Nr("right",this.rest,this.isNegative,s==null?void 0:s.inset),a)||this.consumePeeked("inset-")&&(a=Nr("inset",this.rest,this.isNegative,s==null?void 0:s.inset),a)||this.consumePeeked("flex-")&&(this.consumePeeked("grow")?a=Un("Grow",this.rest,s==null?void 0:s.flexGrow):this.consumePeeked("shrink")?a=Un("Shrink",this.rest,s==null?void 0:s.flexShrink):a=Qc(this.rest,s==null?void 0:s.flex),a)||this.consumePeeked("grow")&&(a=Un("Grow",this.rest,s==null?void 0:s.flexGrow),a)||this.consumePeeked("shrink")&&(a=Un("Shrink",this.rest,s==null?void 0:s.flexShrink),a)||this.consumePeeked("shadow-color-opacity-")&&(a=Bn("shadow",this.rest),a)||this.consumePeeked("shadow-opacity-")&&(a=ed(this.rest),a)||this.consumePeeked("shadow-offset-")&&(a=td(this.rest),a)||this.consumePeeked("shadow-radius-")&&(a=vt("shadowRadius",this.rest),a)||this.consumePeeked("shadow-")&&(a=yr("shadow",this.rest,s==null?void 0:s.colors),a))return a;if(this.consumePeeked("elevation-")){let u=parseInt(this.rest,10);if(!Number.isNaN(u))return k({elevation:u})}if(this.consumePeeked("opacity-")&&(a=Zc(this.rest,s==null?void 0:s.opacity),a)||this.consumePeeked("tracking-")&&(a=Jc(this.rest,this.isNegative,s==null?void 0:s.letterSpacing),a))return a;if(this.consumePeeked("z-")){let u=Number((o=(i=s==null?void 0:s.zIndex)===null||i===void 0?void 0:i[this.rest])!==null&&o!==void 0?o:this.rest);if(!Number.isNaN(u))return k({zIndex:u})}return tt(`\`${this.rest}\` unknown or invalid utility`),null}handlePossibleArbitraryBreakpointPrefix(t){var n;if(t[0]!=="m")return!1;let r=t.match(/^(min|max)-(w|h)-\[([^\]]+)\]$/);if(!r)return!1;if(!(!((n=this.context.device)===null||n===void 0)&&n.windowDimensions))return this.isNull=!0,!0;let i=this.context.device.windowDimensions,[,o="",s="",a=""]=r,u=s==="w"?i.width:i.height,l=Ne(a,this.context);if(l===null)return this.isNull=!0,!0;let[f,c]=l;return c!=="px"&&(this.isNull=!0),(o==="min"?u>=f:u<=f)?this.incrementOrder():this.isNull=!0,!0}advance(t=1){this.position+=t,this.char=this.string[this.position]}get rest(){return this.peekSlice(0,this.string.length)}peekSlice(t,n){return this.string.slice(this.position+t,this.position+n)}consumePeeked(t){return this.peekSlice(0,t.length)===t?(this.advance(t.length),!0):!1}parseIsNegative(){this.char==="-"&&(this.advance(),this.isNegative=!0,this.context.isNegative=!0)}incrementOrder(){var t;this.order=((t=this.order)!==null&&t!==void 0?t:0)+1}};function rd(e){let t=[],n=null;return e.forEach(r=>{if(typeof r=="string")t=[...t,...Ea(r)];else if(Array.isArray(r))t=[...t,...r.flatMap(Ea)];else if(typeof r=="object"&&r!==null)for(let[i,o]of Object.entries(r))typeof o=="boolean"?t=[...t,...o?Ea(i):[]]:n?n[i]=o:n={[i]:o}}),[t.filter(Boolean).filter(sv),n]}function Ea(e){return e.trim().split(/\s+/)}function sv(e,t,n){return n.indexOf(e)===t}function nd(e){var t;return(t=e==null?void 0:e.reduce((n,r)=>({...n,...av(r.handler)}),{}))!==null&&t!==void 0?t:{}}function av(e){let t={};return e({addUtilities:n=>{t=n},...uv}),t}function Nt(e){throw new Error(`tailwindcss plugin function argument object prop "${e}" not implemented`)}var uv={addComponents:Nt,addBase:Nt,addVariant:Nt,e:Nt,prefix:Nt,theme:Nt,variants:Nt,config:Nt,corePlugins:Nt,matchUtilities:Nt,postcss:null};function od(e,t){let n=(0,id.default)(lv(e)),r={},i=nd(n.plugins),o={},s=Object.entries(i).map(([g,y])=>typeof y=="string"?(o[g]=y,[g,{kind:"null"}]):[g,k(y)]).filter(([,g])=>g.kind!=="null");function a(){return[r.windowDimensions?`w${r.windowDimensions.width}`:!1,r.windowDimensions?`h${r.windowDimensions.height}`:!1,r.fontScale?`fs${r.fontScale}`:!1,r.colorScheme==="dark"?"dark":!1,r.pixelDensity===2?"retina":!1].filter(Boolean).join("--")||"default"}let u=a(),l={};function f(){let g=l[u];if(g)return g;let y=new $n(s);return l[u]=y,y}function c(...g){let y=f(),x={},_=[],E=[],[T,R]=rd(g),P=T.join(" "),S=y.getStyle(P);if(S)return{...S,...R||{}};for(let A of T){let C=y.getIr(A);if(!C&&A in o){let V=c(o[A]);y.setIr(A,k(V)),x={...x,...V};continue}switch(C=new Dr(A,n,y,r,t).parse(),C.kind){case"complete":x={...x,...C.style},y.setIr(A,C);break;case"dependent":_.push(C);break;case"ordered":E.push(C);break;case"null":y.setIr(A,C);break}}if(E.length>0){E.sort((A,C)=>A.order-C.order);for(let A of E)switch(A.styleIr.kind){case"complete":x={...x,...A.styleIr.style};break;case"dependent":_.push(A.styleIr);break}}if(_.length>0){for(let A of _){let C=A.complete(x);C&&tt(C)}jc(x)}return P!==""&&y.setStyle(P,x),R&&(x={...x,...R}),x}function h(g){let y=c(g.split(/\s+/g).map(x=>x.replace(/^(bg|text|border)-/,"")).map(x=>`bg-${x}`).join(" "));return typeof y.backgroundColor=="string"?y.backgroundColor:void 0}let m=(g,...y)=>{let x="";return g.forEach((_,E)=>{var T;x+=_+((T=y[E])!==null&&T!==void 0?T:"")}),c(x)};return m.style=c,m.color=h,m.prefixMatch=(...g)=>{let y=g.sort().join(":"),x=f(),_=x.getPrefixMatch(y);if(_!==void 0)return _;let R=new Dr(`${y}:flex`,n,x,r,t).parse().kind!=="null";return x.setPrefixMatch(y,R),R},m.setWindowDimensions=g=>{r.windowDimensions=g,u=a()},m.setFontScale=g=>{r.fontScale=g,u=a()},m.setPixelDensity=g=>{r.pixelDensity=g,u=a()},m.setColorScheme=g=>{r.colorScheme=g,u=a()},m}function lv(e){return{...e,content:["_no_warnings_please"]}}var cv={handler:({addUtilities:e})=>{e({"shadow-sm":{boxShadow:"0 1px 2px 0 rgb(0 0 0 / 0.05)"},shadow:{boxShadow:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"},"shadow-md":{boxShadow:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"},"shadow-lg":{boxShadow:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"},"shadow-xl":{boxShadow:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"},"shadow-2xl":{boxShadow:"0 25px 50px -12px rgb(0 0 0 / 0.25)"},"shadow-inner":{boxShadow:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},"shadow-none":{boxShadow:"0 0 #0000"}})}};function dv(e){return od({...e,plugins:[...(e==null?void 0:e.plugins)??[],cv]},"web")}var Bi;function Ta({width:e,height:t,config:n}){return Bi||(Bi=dv(n)),Bi.setWindowDimensions({width:+e,height:+t}),Bi}var ka=new WeakMap,sd=new WeakMap,pv=0,hv=8,zn=new Map;function mv(e){let t="";for(let n of e){let r=sd.get(n.data);r===void 0&&(r=++pv,sd.set(n.data,r)),t+=`${r}:${n.name}:${n.weight??""}:${n.style??""}:${n.lang??""};`}return t}function gv(e){if(ka.has(e))return ka.get(e);let t=mv(e),n=zn.get(t);if(!n){if(n=new an(e),zn.size>=hv){let r=zn.keys().next().value;r!==void 0&&zn.delete(r)}zn.set(t,n)}return ka.set(e,n),n}var bv=yv,ud=bv;async function yv(e,t,n){let[r]=await Promise.all([Zt(),xl()]);if(!r||!r.Node)throw new Error("Satori is not initialized: expect `yoga` to be loaded, got "+r);t.fonts=t.fonts||[];let i=gv(t.fonts),o="width"in t?t.width:void 0,s="height"in t?t.height:void 0,a=vv(r,t.pointScaleFactor);o&&a.setWidth(o),s&&a.setHeight(s),a.setFlexDirection(r.FLEX_DIRECTION_ROW),a.setFlexWrap(r.WRAP_WRAP),a.setAlignContent(r.ALIGN_AUTO),a.setAlignItems(r.ALIGN_FLEX_START),a.setJustifyContent(r.JUSTIFY_FLEX_START),a.setOverflow(r.OVERFLOW_HIDDEN);let u=Object.assign(Object.create(null),t.graphemeImages),l=new Set;Ct.clear(),Kr.clear(),await _u(e);let f=on(e,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:"normal",color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:o,_viewportHeight:s},parent:a,font:i,embedFont:t.embedFont,debug:t.debug,graphemeImages:u,canLoadAdditionalAssets:!!t.loadAdditionalAsset,onNodeDetected:t.onNodeDetected,replacedElements:n,getTwStyles:(y,x)=>{let E={...Ta({width:o,height:s,config:t.tailwindConfig})([y])};return typeof E.lineHeight=="number"&&(E.lineHeight=E.lineHeight/(+E.fontSize||x.fontSize||16)),E.shadowColor&&E.boxShadow&&(E.boxShadow=E.boxShadow.replace(/rgba?\([^)]+\)/,E.shadowColor)),E}}),c=(await f.next()).value;if(t.loadAdditionalAsset&&c.length){let y=xv(c),x=[],_={};await Promise.all(Object.entries(y).flatMap(([E,T])=>T.map(R=>{let P=`${E}_${R}`;return l.has(P)?null:(l.add(P),t.loadAdditionalAsset(E,R).then(S=>{typeof S=="string"?_[R]=S:S&&(Array.isArray(S)?x.push(...S):x.push(S))}))}))),i.addFonts(x),Object.assign(u,_)}await f.next(),a.calculateLayout(o,s,r.DIRECTION_LTR);let h=(await f.next([0,0])).value,m=a.getComputedWidth(),g=a.getComputedHeight();return a.freeRecursive(),Wo({width:m,height:g,content:h})}function vv(e,t){if(t){let n=e.Config.create();return n.setPointScaleFactor(t),e.Node.createWithConfig(n)}else return e.Node.create()}function xv(e){let t={},n={};for(let{word:r,locale:i}of e){let o=bl(r,i).join("|");n[o]=n[o]||"",n[o]+=r}return Object.keys(n).forEach(r=>{t[r]=t[r]||[],r==="emoji"?t[r].push(...ad(Fe(n[r],"grapheme"))):(t[r][0]=t[r][0]||"",t[r][0]+=ad(Fe(n[r],"grapheme",r==="unknown"?void 0:r)).join(""))}),t}function ad(e){return Array.from(new Set(e))}0&&(module.exports={init});
8
8
  //# sourceMappingURL=standalone.cjs.map