satori 0.4.3 → 0.4.4

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.
@@ -2,6 +2,6 @@ var Qu=Object.create;var gr=Object.defineProperty;var Ku=Object.getOwnPropertyDe
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}return n=e[Symbol.iterator](),n.next.bind(n)}function Df(e,t){if(!!e){if(typeof e=="string")return Rs(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 Rs(e,t)}}function Rs(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 Ls(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 Ff(e,t,n){return t&&Ls(e.prototype,t),n&&Ls(e,n),e}function Nf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Un(e,t)}function Un(e,t){return Un=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Un(e,t)}var Mf=function(e){Nf(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 s;for(var o in this.indexes)s=this.indexes[o],s>=i&&(this.indexes[o]=s-1);return this},n.removeAll=function(){for(var i=Cf(this.nodes),s;!(s=i()).done;){var o=s.value;o.parent=void 0}return this.nodes=[],this},n.empty=function(){return this.removeAll()},n.insertAfter=function(i,s){s.parent=this;var o=this.index(i);this.nodes.splice(o+1,0,s),s.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],o<=a&&(this.indexes[u]=a+1);return this},n.insertBefore=function(i,s){s.parent=this;var o=this.index(i);this.nodes.splice(o,0,s),s.parent=this;var a;for(var u in this.indexes)a=this.indexes[u],a<=o&&(this.indexes[u]=a+1);return this},n._findChildAtPosition=function(i,s){var o=void 0;return this.each(function(a){if(a.atPosition){var u=a.atPosition(i,s);if(u)return o=u,!1}else if(a.isAtPosition(i,s))return o=a,!1}),o},n.atPosition=function(i,s){if(this.isAtPosition(i,s))return this._findChildAtPosition(i,s)||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 s=this.lastEach;if(this.indexes[s]=0,!!this.length){for(var o,a;this.indexes[s]<this.length&&(o=this.indexes[s],a=i(this.at(o),o),a!==!1);)this.indexes[s]+=1;if(delete this.indexes[s],a===!1)return!1}},n.walk=function(i){return this.each(function(s,o){var a=i(s,o);if(a!==!1&&s.length&&(a=s.walk(i)),a===!1)return!1})},n.walkAttributes=function(i){var s=this;return this.walk(function(o){if(o.type===Me.ATTRIBUTE)return i.call(s,o)})},n.walkClasses=function(i){var s=this;return this.walk(function(o){if(o.type===Me.CLASS)return i.call(s,o)})},n.walkCombinators=function(i){var s=this;return this.walk(function(o){if(o.type===Me.COMBINATOR)return i.call(s,o)})},n.walkComments=function(i){var s=this;return this.walk(function(o){if(o.type===Me.COMMENT)return i.call(s,o)})},n.walkIds=function(i){var s=this;return this.walk(function(o){if(o.type===Me.ID)return i.call(s,o)})},n.walkNesting=function(i){var s=this;return this.walk(function(o){if(o.type===Me.NESTING)return i.call(s,o)})},n.walkPseudos=function(i){var s=this;return this.walk(function(o){if(o.type===Me.PSEUDO)return i.call(s,o)})},n.walkTags=function(i){var s=this;return this.walk(function(o){if(o.type===Me.TAG)return i.call(s,o)})},n.walkUniversals=function(i){var s=this;return this.walk(function(o){if(o.type===Me.UNIVERSAL)return i.call(s,o)})},n.split=function(i){var s=this,o=[];return this.reduce(function(a,u,l){var f=i.call(s,u);return o.push(u),f?(a.push(o),o=[]):l===s.length-1&&a.push(o),a},[])},n.map=function(i){return this.nodes.map(i)},n.reduce=function(i,s){return this.nodes.reduce(i,s)},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("")},Ff(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}(If.default);Lt.default=Mf;Ds.exports=Lt.default});var Gn=R((Ct,Ns)=>{"use strict";c();Ct.__esModule=!0;Ct.default=void 0;var $f=qf(Mr()),Wf=ae();function qf(e){return e&&e.__esModule?e:{default:e}}function Fs(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 Bf(e,t,n){return t&&Fs(e.prototype,t),n&&Fs(e,n),e}function Uf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,zn(e,t)}function zn(e,t){return zn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},zn(e,t)}var zf=function(e){Uf(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Wf.ROOT,i}var n=t.prototype;return n.toString=function(){var i=this.reduce(function(s,o){return s.push(String(o)),s},[]).join(",");return this.trailingComma?i+",":i},n.error=function(i,s){return this._error?this._error(i,s):new Error(i)},Bf(t,[{key:"errorGenerator",set:function(i){this._error=i}}]),t}($f.default);Ct.default=zf;Ns.exports=Ct.default});var Hn=R((Dt,Ms)=>{"use strict";c();Dt.__esModule=!0;Dt.default=void 0;var Gf=Hf(Mr()),jf=ae();function Hf(e){return e&&e.__esModule?e:{default:e}}function Vf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,jn(e,t)}function jn(e,t){return jn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},jn(e,t)}var Yf=function(e){Vf(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=jf.SELECTOR,r}return t}(Gf.default);Dt.default=Yf;Ms.exports=Dt.default});var $r=R((Wg,$s)=>{"use strict";c();var Xf={},Qf=Xf.hasOwnProperty,Kf=function(t,n){if(!t)return n;var r={};for(var i in n)r[i]=Qf.call(t,i)?t[i]:n[i];return r},Jf=/[ -,\.\/:-@\[-\^`\{-~]/,Zf=/[ -,\.\/:-@\[\]\^`\{-~]/,ec=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Vn=function e(t,n){n=Kf(n,e.options),n.quotes!="single"&&n.quotes!="double"&&(n.quotes="single");for(var r=n.quotes=="double"?'"':"'",i=n.isIdentifier,s=t.charAt(0),o="",a=0,u=t.length;a<u;){var l=t.charAt(a++),f=l.charCodeAt(),d=void 0;if(f<32||f>126){if(f>=55296&&f<=56319&&a<u){var g=t.charCodeAt(a++);(g&64512)==56320?f=((f&1023)<<10)+(g&1023)+65536:a--}d="\\"+f.toString(16).toUpperCase()+" "}else n.escapeEverything?Jf.test(l)?d="\\"+l:d="\\"+f.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?d="\\"+f.toString(16).toUpperCase()+" ":l=="\\"||!i&&(l=='"'&&r==l||l=="'"&&r==l)||i&&Zf.test(l)?d="\\"+l:d=l;o+=d}return i&&(/^-[-\d]/.test(o)?o="\\-"+o.slice(1):/\d/.test(s)&&(o="\\3"+s+" "+o.slice(1))),o=o.replace(ec,function(h,p,v){return p&&p.length%2?h:(p||"")+v}),!i&&n.wrap?r+o+r:o};Vn.options={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};Vn.version="3.0.0";$s.exports=Vn});var Xn=R((Ft,Bs)=>{"use strict";c();Ft.__esModule=!0;Ft.default=void 0;var tc=qs($r()),rc=It(),nc=qs(Ne()),ic=ae();function qs(e){return e&&e.__esModule?e:{default:e}}function Ws(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 oc(e,t,n){return t&&Ws(e.prototype,t),n&&Ws(e,n),e}function sc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Yn(e,t)}function Yn(e,t){return Yn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Yn(e,t)}var ac=function(e){sc(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=ic.CLASS,i._constructed=!0,i}var n=t.prototype;return n.valueToString=function(){return"."+e.prototype.valueToString.call(this)},oc(t,[{key:"value",get:function(){return this._value},set:function(i){if(this._constructed){var s=(0,tc.default)(i,{isIdentifier:!0});s!==i?((0,rc.ensureObject)(this,"raws"),this.raws.value=s):this.raws&&delete this.raws.value}this._value=i}}]),t}(nc.default);Ft.default=ac;Bs.exports=Ft.default});var Kn=R((Nt,Us)=>{"use strict";c();Nt.__esModule=!0;Nt.default=void 0;var uc=fc(Ne()),lc=ae();function fc(e){return e&&e.__esModule?e:{default:e}}function cc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Qn(e,t)}function Qn(e,t){return Qn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Qn(e,t)}var dc=function(e){cc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=lc.COMMENT,r}return t}(uc.default);Nt.default=dc;Us.exports=Nt.default});var Zn=R((Mt,zs)=>{"use strict";c();Mt.__esModule=!0;Mt.default=void 0;var pc=mc(Ne()),hc=ae();function mc(e){return e&&e.__esModule?e:{default:e}}function gc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Jn(e,t)}function Jn(e,t){return Jn=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},Jn(e,t)}var vc=function(e){gc(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=hc.ID,i}var n=t.prototype;return n.valueToString=function(){return"#"+e.prototype.valueToString.call(this)},t}(pc.default);Mt.default=vc;zs.exports=Mt.default});var Wr=R(($t,Hs)=>{"use strict";c();$t.__esModule=!0;$t.default=void 0;var bc=js($r()),yc=It(),xc=js(Ne());function js(e){return e&&e.__esModule?e:{default:e}}function Gs(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 wc(e,t,n){return t&&Gs(e.prototype,t),n&&Gs(e,n),e}function _c(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ei(e,t)}function ei(e,t){return ei=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ei(e,t)}var Sc=function(e){_c(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))},wc(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 s=(0,bc.default)(i,{isIdentifier:!0});this._namespace=i,s!==i?((0,yc.ensureObject)(this,"raws"),this.raws.namespace=s):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}(xc.default);$t.default=Sc;Hs.exports=$t.default});var ri=R((Wt,Vs)=>{"use strict";c();Wt.__esModule=!0;Wt.default=void 0;var kc=Oc(Wr()),Tc=ae();function Oc(e){return e&&e.__esModule?e:{default:e}}function Ec(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ti(e,t)}function ti(e,t){return ti=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ti(e,t)}var Pc=function(e){Ec(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=Tc.TAG,r}return t}(kc.default);Wt.default=Pc;Vs.exports=Wt.default});var ii=R((qt,Ys)=>{"use strict";c();qt.__esModule=!0;qt.default=void 0;var Ac=Rc(Ne()),Ic=ae();function Rc(e){return e&&e.__esModule?e:{default:e}}function Lc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,ni(e,t)}function ni(e,t){return ni=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},ni(e,t)}var Cc=function(e){Lc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=Ic.STRING,r}return t}(Ac.default);qt.default=Cc;Ys.exports=qt.default});var si=R((Bt,Xs)=>{"use strict";c();Bt.__esModule=!0;Bt.default=void 0;var Dc=Nc(Mr()),Fc=ae();function Nc(e){return e&&e.__esModule?e:{default:e}}function Mc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,oi(e,t)}function oi(e,t){return oi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},oi(e,t)}var $c=function(e){Mc(t,e);function t(r){var i;return i=e.call(this,r)||this,i.type=Fc.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}(Dc.default);Bt.default=$c;Xs.exports=Bt.default});var Ks=R((qg,Qs)=>{c();Qs.exports=function(t,n){return function(...r){return console.warn(n),t(...r)}}});var di=R(Gt=>{"use strict";c();Gt.__esModule=!0;Gt.unescapeValue=ci;Gt.default=void 0;var Ut=fi($r()),Wc=fi(Bn()),qc=fi(Wr()),Bc=ae(),ai;function fi(e){return e&&e.__esModule?e:{default:e}}function Js(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 Uc(e,t,n){return t&&Js(e.prototype,t),n&&Js(e,n),e}function zc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,li(e,t)}function li(e,t){return li=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},li(e,t)}var zt=Ks(),Gc=/^('|")([^]*)\1$/,jc=zt(function(){},"Assigning an attribute a value containing characters that might need to be escaped is deprecated. Call attribute.setValue() instead."),Hc=zt(function(){},"Assigning attr.quoted is deprecated and has no effect. Assign to attr.quoteMark instead."),Vc=zt(function(){},"Constructing an Attribute selector with a value without specifying quoteMark is deprecated. Note: The value should be unescaped now.");function ci(e){var t=!1,n=null,r=e,i=r.match(Gc);return i&&(n=i[1],r=i[2]),r=(0,Wc.default)(r),r!==e&&(t=!0),{deprecatedUsage:t,unescaped:r,quoteMark:n}}function Yc(e){if(e.quoteMark!==void 0||e.value===void 0)return e;Vc();var t=ci(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 qr=function(e){zc(t,e);function t(r){var i;return r===void 0&&(r={}),i=e.call(this,Yc(r))||this,i.type=Bc.ATTRIBUTE,i.raws=i.raws||{},Object.defineProperty(i.raws,"unquoted",{get:zt(function(){return i.value},"attr.raws.unquoted is deprecated. Call attr.value instead."),set:zt(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 s=this._determineQuoteMark(i),o=ui[s],a=(0,Ut.default)(this._value,o);return a},n._determineQuoteMark=function(i){return i.smart?this.smartQuoteMark(i):this.preferredQuoteMark(i)},n.setValue=function(i,s){s===void 0&&(s={}),this._value=i,this._quoteMark=this._determineQuoteMark(s),this._syncRawValue()},n.smartQuoteMark=function(i){var s=this.value,o=s.replace(/[^']/g,"").length,a=s.replace(/[^"]/g,"").length;if(o+a===0){var u=(0,Ut.default)(s,{isIdentifier:!0});if(u===s)return t.NO_QUOTE;var l=this.preferredQuoteMark(i);if(l===t.NO_QUOTE){var f=this.quoteMark||i.quoteMark||t.DOUBLE_QUOTE,d=ui[f],g=(0,Ut.default)(s,d);if(g.length<u.length)return f}return l}else return a===o?this.preferredQuoteMark(i):a<o?t.DOUBLE_QUOTE:t.SINGLE_QUOTE},n.preferredQuoteMark=function(i){var s=i.preferCurrentQuoteMark?this.quoteMark:i.quoteMark;return s===void 0&&(s=i.preferCurrentQuoteMark?i.quoteMark:this.quoteMark),s===void 0&&(s=t.DOUBLE_QUOTE),s},n._syncRawValue=function(){var i=(0,Ut.default)(this._value,ui[this.quoteMark]);i===this._value?this.raws&&delete this.raws.value:this.raws.value=i},n._handleEscapes=function(i,s){if(this._constructed){var o=(0,Ut.default)(s,{isIdentifier:!0});o!==s?this.raws[i]=o:delete this.raws[i]}},n._spacesFor=function(i){var s={before:"",after:""},o=this.spaces[i]||{},a=this.raws.spaces&&this.raws.spaces[i]||{};return Object.assign(s,o,a)},n._stringFor=function(i,s,o){s===void 0&&(s=i),o===void 0&&(o=Zs);var a=this._spacesFor(s);return o(this.stringifyProperty(i),a)},n.offsetOf=function(i){var s=1,o=this._spacesFor("attribute");if(s+=o.before.length,i==="namespace"||i==="ns")return this.namespace?s:-1;if(i==="attributeNS"||(s+=this.namespaceString.length,this.namespace&&(s+=1),i==="attribute"))return s;s+=this.stringifyProperty("attribute").length,s+=o.after.length;var a=this._spacesFor("operator");s+=a.before.length;var u=this.stringifyProperty("operator");if(i==="operator")return u?s:-1;s+=u.length,s+=a.after.length;var l=this._spacesFor("value");s+=l.before.length;var f=this.stringifyProperty("value");if(i==="value")return f?s:-1;s+=f.length,s+=l.after.length;var d=this._spacesFor("insensitive");return s+=d.before.length,i==="insensitive"&&this.insensitive?s:-1},n.toString=function(){var i=this,s=[this.rawSpaceBefore,"["];return s.push(this._stringFor("qualifiedAttribute","attribute")),this.operator&&(this.value||this.value==="")&&(s.push(this._stringFor("operator")),s.push(this._stringFor("value")),s.push(this._stringFor("insensitiveFlag","insensitive",function(o,a){return o.length>0&&!i.quoted&&a.before.length===0&&!(i.spaces.value&&i.spaces.value.after)&&(a.before=" "),Zs(o,a)}))),s.push("]"),s.push(this.rawSpaceAfter),s.join("")},Uc(t,[{key:"quoted",get:function(){var i=this.quoteMark;return i==="'"||i==='"'},set:function(i){Hc()}},{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 s=ci(i),o=s.deprecatedUsage,a=s.unescaped,u=s.quoteMark;if(o&&jc(),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}(qc.default);Gt.default=qr;qr.NO_QUOTE=null;qr.SINGLE_QUOTE="'";qr.DOUBLE_QUOTE='"';var ui=(ai={"'":{quotes:"single",wrap:!0},'"':{quotes:"double",wrap:!0}},ai[null]={isIdentifier:!0},ai);function Zs(e,t){return""+t.before+e+t.after}});var hi=R((jt,ea)=>{"use strict";c();jt.__esModule=!0;jt.default=void 0;var Xc=Kc(Wr()),Qc=ae();function Kc(e){return e&&e.__esModule?e:{default:e}}function Jc(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,pi(e,t)}function pi(e,t){return pi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},pi(e,t)}var Zc=function(e){Jc(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=Qc.UNIVERSAL,r.value="*",r}return t}(Xc.default);jt.default=Zc;ea.exports=jt.default});var gi=R((Ht,ta)=>{"use strict";c();Ht.__esModule=!0;Ht.default=void 0;var ed=rd(Ne()),td=ae();function rd(e){return e&&e.__esModule?e:{default:e}}function nd(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mi(e,t)}function mi(e,t){return mi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},mi(e,t)}var id=function(e){nd(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=td.COMBINATOR,r}return t}(ed.default);Ht.default=id;ta.exports=Ht.default});var bi=R((Vt,ra)=>{"use strict";c();Vt.__esModule=!0;Vt.default=void 0;var od=ad(Ne()),sd=ae();function ad(e){return e&&e.__esModule?e:{default:e}}function ud(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vi(e,t)}function vi(e,t){return vi=Object.setPrototypeOf||function(r,i){return r.__proto__=i,r},vi(e,t)}var ld=function(e){ud(t,e);function t(n){var r;return r=e.call(this,n)||this,r.type=sd.NESTING,r.value="&",r}return t}(od.default);Vt.default=ld;ra.exports=Vt.default});var ia=R((Br,na)=>{"use strict";c();Br.__esModule=!0;Br.default=fd;function fd(e){return e.sort(function(t,n){return t-n})}na.exports=Br.default});var yi=R(A=>{"use strict";c();A.__esModule=!0;A.combinator=A.word=A.comment=A.str=A.tab=A.newline=A.feed=A.cr=A.backslash=A.bang=A.slash=A.doubleQuote=A.singleQuote=A.space=A.greaterThan=A.pipe=A.equals=A.plus=A.caret=A.tilde=A.dollar=A.closeSquare=A.openSquare=A.closeParenthesis=A.openParenthesis=A.semicolon=A.colon=A.comma=A.at=A.asterisk=A.ampersand=void 0;var cd=38;A.ampersand=cd;var dd=42;A.asterisk=dd;var pd=64;A.at=pd;var hd=44;A.comma=hd;var md=58;A.colon=md;var gd=59;A.semicolon=gd;var vd=40;A.openParenthesis=vd;var bd=41;A.closeParenthesis=bd;var yd=91;A.openSquare=yd;var xd=93;A.closeSquare=xd;var wd=36;A.dollar=wd;var _d=126;A.tilde=_d;var Sd=94;A.caret=Sd;var kd=43;A.plus=kd;var Td=61;A.equals=Td;var Od=124;A.pipe=Od;var Ed=62;A.greaterThan=Ed;var Pd=32;A.space=Pd;var oa=39;A.singleQuote=oa;var Ad=34;A.doubleQuote=Ad;var Id=47;A.slash=Id;var Rd=33;A.bang=Rd;var Ld=92;A.backslash=Ld;var Cd=13;A.cr=Cd;var Dd=12;A.feed=Dd;var Fd=10;A.newline=Fd;var Nd=9;A.tab=Nd;var Md=oa;A.str=Md;var $d=-1;A.comment=$d;var Wd=-2;A.word=Wd;var qd=-3;A.combinator=qd});var ua=R(Yt=>{"use strict";c();Yt.__esModule=!0;Yt.default=Vd;Yt.FIELDS=void 0;var O=Bd(yi()),lt,Y;function aa(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return aa=function(){return e},e}function Bd(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=aa();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 s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}var Ud=(lt={},lt[O.tab]=!0,lt[O.newline]=!0,lt[O.cr]=!0,lt[O.feed]=!0,lt),zd=(Y={},Y[O.space]=!0,Y[O.tab]=!0,Y[O.newline]=!0,Y[O.cr]=!0,Y[O.feed]=!0,Y[O.ampersand]=!0,Y[O.asterisk]=!0,Y[O.bang]=!0,Y[O.comma]=!0,Y[O.colon]=!0,Y[O.semicolon]=!0,Y[O.openParenthesis]=!0,Y[O.closeParenthesis]=!0,Y[O.openSquare]=!0,Y[O.closeSquare]=!0,Y[O.singleQuote]=!0,Y[O.doubleQuote]=!0,Y[O.plus]=!0,Y[O.pipe]=!0,Y[O.tilde]=!0,Y[O.greaterThan]=!0,Y[O.equals]=!0,Y[O.dollar]=!0,Y[O.caret]=!0,Y[O.slash]=!0,Y),xi={},sa="0123456789abcdefABCDEF";for(Ur=0;Ur<sa.length;Ur++)xi[sa.charCodeAt(Ur)]=!0;var Ur;function Gd(e,t){var n=t,r;do{if(r=e.charCodeAt(n),zd[r])return n-1;r===O.backslash?n=jd(e,n)+1:n++}while(n<e.length);return n-1}function jd(e,t){var n=t,r=e.charCodeAt(n+1);if(!Ud[r])if(xi[r]){var i=0;do n++,i++,r=e.charCodeAt(n+1);while(xi[r]&&i<6);i<6&&r===O.space&&n++}else n++;return n}var Hd={TYPE:0,START_LINE:1,START_COL:2,END_LINE:3,END_COL:4,START_POS:5,END_POS:6};Yt.FIELDS=Hd;function Vd(e){var t=[],n=e.css.valueOf(),r=n,i=r.length,s=-1,o=1,a=0,u=0,l,f,d,g,h,p,v,_,b,y,S,E,T;function D(F,C){if(e.safe)n+=C,b=n.length-1;else throw e.error("Unclosed "+F,o,a-s,a)}for(;a<i;){switch(l=n.charCodeAt(a),l===O.newline&&(s=a,o+=1),l){case O.space:case O.tab:case O.newline:case O.cr:case O.feed:b=a;do b+=1,l=n.charCodeAt(b),l===O.newline&&(s=b,o+=1);while(l===O.space||l===O.newline||l===O.tab||l===O.cr||l===O.feed);T=O.space,g=o,d=b-s-1,u=b;break;case O.plus:case O.greaterThan:case O.tilde:case O.pipe:b=a;do b+=1,l=n.charCodeAt(b);while(l===O.plus||l===O.greaterThan||l===O.tilde||l===O.pipe);T=O.combinator,g=o,d=a-s,u=b;break;case O.asterisk:case O.ampersand:case O.bang:case O.comma:case O.equals:case O.dollar:case O.caret:case O.openSquare:case O.closeSquare:case O.colon:case O.semicolon:case O.openParenthesis:case O.closeParenthesis:b=a,T=l,g=o,d=a-s,u=b+1;break;case O.singleQuote:case O.doubleQuote:E=l===O.singleQuote?"'":'"',b=a;do for(h=!1,b=n.indexOf(E,b+1),b===-1&&D("quote",E),p=b;n.charCodeAt(p-1)===O.backslash;)p-=1,h=!h;while(h);T=O.str,g=o,d=a-s,u=b+1;break;default:l===O.slash&&n.charCodeAt(a+1)===O.asterisk?(b=n.indexOf("*/",a+2)+1,b===0&&D("comment","*/"),f=n.slice(a,b+1),_=f.split(`
3
3
  `),v=_.length-1,v>0?(y=o+v,S=b-_[v].length):(y=o,S=s),T=O.comment,o=y,g=y,d=b-S):l===O.slash?(b=a,T=l,g=o,d=a-s,u=b+1):(b=Gd(n,a),T=O.word,g=o,d=b-s),u=b+1;break}t.push([T,o,a-s,g,d,a,u]),S&&(s=S,S=null),a=u}return t}});var ga=R((Xt,ma)=>{"use strict";c();Xt.__esModule=!0;Xt.default=void 0;var Yd=ke(Gn()),wi=ke(Hn()),Xd=ke(Xn()),la=ke(Kn()),Qd=ke(Zn()),Kd=ke(ri()),_i=ke(ii()),Jd=ke(si()),fa=zr(di()),Zd=ke(hi()),Si=ke(gi()),ep=ke(bi()),tp=ke(ia()),k=zr(ua()),P=zr(yi()),rp=zr(ae()),ee=It(),Je,ki;function ha(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return ha=function(){return e},e}function zr(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=ha();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 s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function ke(e){return e&&e.__esModule?e:{default:e}}function ca(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 np(e,t,n){return t&&ca(e.prototype,t),n&&ca(e,n),e}var Ei=(Je={},Je[P.space]=!0,Je[P.cr]=!0,Je[P.feed]=!0,Je[P.newline]=!0,Je[P.tab]=!0,Je),ip=Object.assign({},Ei,(ki={},ki[P.comment]=!0,ki));function da(e){return{line:e[k.FIELDS.START_LINE],column:e[k.FIELDS.START_COL]}}function pa(e){return{line:e[k.FIELDS.END_LINE],column:e[k.FIELDS.END_COL]}}function Ze(e,t,n,r){return{start:{line:e,column:t},end:{line:n,column:r}}}function ft(e){return Ze(e[k.FIELDS.START_LINE],e[k.FIELDS.START_COL],e[k.FIELDS.END_LINE],e[k.FIELDS.END_COL])}function Ti(e,t){if(!!e)return Ze(e[k.FIELDS.START_LINE],e[k.FIELDS.START_COL],t[k.FIELDS.END_LINE],t[k.FIELDS.END_COL])}function ct(e,t){var n=e[t];if(typeof n=="string")return n.indexOf("\\")!==-1&&((0,ee.ensureObject)(e,"raws"),e[t]=(0,ee.unesc)(n),e.raws[t]===void 0&&(e.raws[t]=n)),e}function Oi(e,t){for(var n=-1,r=[];(n=e.indexOf(t,n+1))!==-1;)r.push(n);return r}function op(){var e=Array.prototype.concat.apply([],arguments);return e.filter(function(t,n){return n===e.indexOf(t)})}var sp=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,k.default)({css:this.css,error:this._errorGenerator(),safe:this.options.safe});var i=Ti(this.tokens[0],this.tokens[this.tokens.length-1]);this.root=new Yd.default({source:i}),this.root.errorGenerator=this._errorGenerator();var s=new wi.default({source:{start:{line:1,column:1}}});this.root.append(s),this.current=s,this.loop()}var t=e.prototype;return t._errorGenerator=function(){var r=this;return function(i,s){return typeof r.rule=="string"?new Error(i):r.rule.error(i,s)}},t.attribute=function(){var r=[],i=this.currToken;for(this.position++;this.position<this.tokens.length&&this.currToken[k.FIELDS.TYPE]!==P.closeSquare;)r.push(this.currToken),this.position++;if(this.currToken[k.FIELDS.TYPE]!==P.closeSquare)return this.expected("closing square bracket",this.currToken[k.FIELDS.START_POS]);var s=r.length,o={source:Ze(i[1],i[2],this.currToken[3],this.currToken[4]),sourceIndex:i[k.FIELDS.START_POS]};if(s===1&&!~[P.word].indexOf(r[0][k.FIELDS.TYPE]))return this.expected("attribute",r[0][k.FIELDS.START_POS]);for(var a=0,u="",l="",f=null,d=!1;a<s;){var g=r[a],h=this.content(g),p=r[a+1];switch(g[k.FIELDS.TYPE]){case P.space:if(d=!0,this.options.lossy)break;if(f){(0,ee.ensureObject)(o,"spaces",f);var v=o.spaces[f].after||"";o.spaces[f].after=v+h;var _=(0,ee.getProp)(o,"raws","spaces",f,"after")||null;_&&(o.raws.spaces[f].after=_+h)}else u=u+h,l=l+h;break;case P.asterisk:if(p[k.FIELDS.TYPE]===P.equals)o.operator=h,f="operator";else if((!o.namespace||f==="namespace"&&!d)&&p){u&&((0,ee.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=u,u=""),l&&((0,ee.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=u,l=""),o.namespace=(o.namespace||"")+h;var b=(0,ee.getProp)(o,"raws","namespace")||null;b&&(o.raws.namespace+=h),f="namespace"}d=!1;break;case P.dollar:if(f==="value"){var y=(0,ee.getProp)(o,"raws","value");o.value+="$",y&&(o.raws.value=y+"$");break}case P.caret:p[k.FIELDS.TYPE]===P.equals&&(o.operator=h,f="operator"),d=!1;break;case P.combinator:if(h==="~"&&p[k.FIELDS.TYPE]===P.equals&&(o.operator=h,f="operator"),h!=="|"){d=!1;break}p[k.FIELDS.TYPE]===P.equals?(o.operator=h,f="operator"):!o.namespace&&!o.attribute&&(o.namespace=!0),d=!1;break;case P.word:if(p&&this.content(p)==="|"&&r[a+2]&&r[a+2][k.FIELDS.TYPE]!==P.equals&&!o.operator&&!o.namespace)o.namespace=h,f="namespace";else if(!o.attribute||f==="attribute"&&!d){u&&((0,ee.ensureObject)(o,"spaces","attribute"),o.spaces.attribute.before=u,u=""),l&&((0,ee.ensureObject)(o,"raws","spaces","attribute"),o.raws.spaces.attribute.before=l,l=""),o.attribute=(o.attribute||"")+h;var S=(0,ee.getProp)(o,"raws","attribute")||null;S&&(o.raws.attribute+=h),f="attribute"}else if(!o.value&&o.value!==""||f==="value"&&!d){var E=(0,ee.unesc)(h),T=(0,ee.getProp)(o,"raws","value")||"",D=o.value||"";o.value=D+E,o.quoteMark=null,(E!==h||T)&&((0,ee.ensureObject)(o,"raws"),o.raws.value=(T||D)+h),f="value"}else{var F=h==="i"||h==="I";(o.value||o.value==="")&&(o.quoteMark||d)?(o.insensitive=F,(!F||h==="I")&&((0,ee.ensureObject)(o,"raws"),o.raws.insensitiveFlag=h),f="insensitive",u&&((0,ee.ensureObject)(o,"spaces","insensitive"),o.spaces.insensitive.before=u,u=""),l&&((0,ee.ensureObject)(o,"raws","spaces","insensitive"),o.raws.spaces.insensitive.before=l,l="")):(o.value||o.value==="")&&(f="value",o.value+=h,o.raws.value&&(o.raws.value+=h))}d=!1;break;case P.str:if(!o.attribute||!o.operator)return this.error("Expected an attribute followed by an operator preceding the string.",{index:g[k.FIELDS.START_POS]});var C=(0,fa.unescapeValue)(h),H=C.unescaped,U=C.quoteMark;o.value=H,o.quoteMark=U,f="value",(0,ee.ensureObject)(o,"raws"),o.raws.value=h,d=!1;break;case P.equals:if(!o.attribute)return this.expected("attribute",g[k.FIELDS.START_POS],h);if(o.value)return this.error('Unexpected "=" found; an operator was already defined.',{index:g[k.FIELDS.START_POS]});o.operator=o.operator?o.operator+h:h,f="operator",d=!1;break;case P.comment:if(f)if(d||p&&p[k.FIELDS.TYPE]===P.space||f==="insensitive"){var J=(0,ee.getProp)(o,"spaces",f,"after")||"",$=(0,ee.getProp)(o,"raws","spaces",f,"after")||J;(0,ee.ensureObject)(o,"raws","spaces",f),o.raws.spaces[f].after=$+h}else{var V=o[f]||"",ne=(0,ee.getProp)(o,"raws",f)||V;(0,ee.ensureObject)(o,"raws"),o.raws[f]=ne+h}else l=l+h;break;default:return this.error('Unexpected "'+h+'" found.',{index:g[k.FIELDS.START_POS]})}a++}ct(o,"attribute"),ct(o,"namespace"),this.newNode(new fa.default(o)),this.position++},t.parseWhitespaceEquivalentTokens=function(r){r<0&&(r=this.tokens.length);var i=this.position,s=[],o="",a=void 0;do if(Ei[this.currToken[k.FIELDS.TYPE]])this.options.lossy||(o+=this.content());else if(this.currToken[k.FIELDS.TYPE]===P.comment){var u={};o&&(u.before=o,o=""),a=new la.default({value:this.content(),source:ft(this.currToken),sourceIndex:this.currToken[k.FIELDS.START_POS],spaces:u}),s.push(a)}while(++this.position<r);if(o){if(a)a.spaces.after=o;else if(!this.options.lossy){var l=this.tokens[i],f=this.tokens[this.position-1];s.push(new _i.default({value:"",source:Ze(l[k.FIELDS.START_LINE],l[k.FIELDS.START_COL],f[k.FIELDS.END_LINE],f[k.FIELDS.END_COL]),sourceIndex:l[k.FIELDS.START_POS],spaces:{before:o,after:""}}))}}return s},t.convertWhitespaceNodesToSpace=function(r,i){var s=this;i===void 0&&(i=!1);var o="",a="";r.forEach(function(l){var f=s.lossySpace(l.spaces.before,i),d=s.lossySpace(l.rawSpaceBefore,i);o+=f+s.lossySpace(l.spaces.after,i&&f.length===0),a+=f+l.value+s.lossySpace(l.rawSpaceAfter,i&&d.length===0)}),a===o&&(a=void 0);var u={space:o,rawSpace:a};return u},t.isNamedCombinator=function(r){return r===void 0&&(r=this.position),this.tokens[r+0]&&this.tokens[r+0][k.FIELDS.TYPE]===P.slash&&this.tokens[r+1]&&this.tokens[r+1][k.FIELDS.TYPE]===P.word&&this.tokens[r+2]&&this.tokens[r+2][k.FIELDS.TYPE]===P.slash},t.namedCombinator=function(){if(this.isNamedCombinator()){var r=this.content(this.tokens[this.position+1]),i=(0,ee.unesc)(r).toLowerCase(),s={};i!==r&&(s.value="/"+r+"/");var o=new Si.default({value:"/"+i+"/",source:Ze(this.currToken[k.FIELDS.START_LINE],this.currToken[k.FIELDS.START_COL],this.tokens[this.position+2][k.FIELDS.END_LINE],this.tokens[this.position+2][k.FIELDS.END_COL]),sourceIndex:this.currToken[k.FIELDS.START_POS],raws:s});return this.position=this.position+3,o}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][k.FIELDS.TYPE]===P.comma){var s=this.parseWhitespaceEquivalentTokens(i);if(s.length>0){var o=this.current.last;if(o){var a=this.convertWhitespaceNodesToSpace(s),u=a.space,l=a.rawSpace;l!==void 0&&(o.rawSpaceAfter+=l),o.spaces.after+=u}else s.forEach(function(T){return r.newNode(T)})}return}var f=this.currToken,d=void 0;i>this.position&&(d=this.parseWhitespaceEquivalentTokens(i));var g;if(this.isNamedCombinator()?g=this.namedCombinator():this.currToken[k.FIELDS.TYPE]===P.combinator?(g=new Si.default({value:this.content(),source:ft(this.currToken),sourceIndex:this.currToken[k.FIELDS.START_POS]}),this.position++):Ei[this.currToken[k.FIELDS.TYPE]]||d||this.unexpected(),g){if(d){var h=this.convertWhitespaceNodesToSpace(d),p=h.space,v=h.rawSpace;g.spaces.before=p,g.rawSpaceBefore=v}}else{var _=this.convertWhitespaceNodesToSpace(d,!0),b=_.space,y=_.rawSpace;y||(y=b);var S={},E={spaces:{}};b.endsWith(" ")&&y.endsWith(" ")?(S.before=b.slice(0,b.length-1),E.spaces.before=y.slice(0,y.length-1)):b.startsWith(" ")&&y.startsWith(" ")?(S.after=b.slice(1),E.spaces.after=y.slice(1)):E.value=y,g=new Si.default({value:" ",source:Ti(f,this.tokens[this.position-1]),sourceIndex:f[k.FIELDS.START_POS],spaces:S,raws:E})}return this.currToken&&this.currToken[k.FIELDS.TYPE]===P.space&&(g.spaces.after=this.optionalSpace(this.content()),this.position++),this.newNode(g)},t.comma=function(){if(this.position===this.tokens.length-1){this.root.trailingComma=!0,this.position++;return}this.current._inferEndPosition();var r=new wi.default({source:{start:da(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 la.default({value:this.content(),source:ft(r),sourceIndex:r[k.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[k.FIELDS.START_POS]})},t.missingParenthesis=function(){return this.expected("opening parenthesis",this.currToken[k.FIELDS.START_POS])},t.missingSquareBracket=function(){return this.expected("opening square bracket",this.currToken[k.FIELDS.START_POS])},t.unexpected=function(){return this.error("Unexpected '"+this.content()+"'. Escaping special characters with \\ may help.",this.currToken[k.FIELDS.START_POS])},t.namespace=function(){var r=this.prevToken&&this.content(this.prevToken)||!0;if(this.nextToken[k.FIELDS.TYPE]===P.word)return this.position++,this.word(r);if(this.nextToken[k.FIELDS.TYPE]===P.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 ep.default({value:this.content(),source:ft(i),sourceIndex:i[k.FIELDS.START_POS]})),this.position++},t.parentheses=function(){var r=this.current.last,i=1;if(this.position++,r&&r.type===rp.PSEUDO){var s=new wi.default({source:{start:da(this.tokens[this.position-1])}}),o=this.current;for(r.append(s),this.current=s;this.position<this.tokens.length&&i;)this.currToken[k.FIELDS.TYPE]===P.openParenthesis&&i++,this.currToken[k.FIELDS.TYPE]===P.closeParenthesis&&i--,i?this.parse():(this.current.source.end=pa(this.currToken),this.current.parent.source.end=pa(this.currToken),this.position++);this.current=o}else{for(var a=this.currToken,u="(",l;this.position<this.tokens.length&&i;)this.currToken[k.FIELDS.TYPE]===P.openParenthesis&&i++,this.currToken[k.FIELDS.TYPE]===P.closeParenthesis&&i--,l=this.currToken,u+=this.parseParenthesisToken(this.currToken),this.position++;r?r.appendToPropertyAndEscape("value",u,u):this.newNode(new _i.default({value:u,source:Ze(a[k.FIELDS.START_LINE],a[k.FIELDS.START_COL],l[k.FIELDS.END_LINE],l[k.FIELDS.END_COL]),sourceIndex:a[k.FIELDS.START_POS]}))}if(i)return this.expected("closing parenthesis",this.currToken[k.FIELDS.START_POS])},t.pseudo=function(){for(var r=this,i="",s=this.currToken;this.currToken&&this.currToken[k.FIELDS.TYPE]===P.colon;)i+=this.content(),this.position++;if(!this.currToken)return this.expected(["pseudo-class","pseudo-element"],this.position-1);if(this.currToken[k.FIELDS.TYPE]===P.word)this.splitWord(!1,function(o,a){i+=o,r.newNode(new Jd.default({value:i,source:Ti(s,r.currToken),sourceIndex:s[k.FIELDS.START_POS]})),a>1&&r.nextToken&&r.nextToken[k.FIELDS.TYPE]===P.openParenthesis&&r.error("Misplaced parenthesis.",{index:r.nextToken[k.FIELDS.START_POS]})});else return this.expected(["pseudo-class","pseudo-element"],this.currToken[k.FIELDS.START_POS])},t.space=function(){var r=this.content();this.position===0||this.prevToken[k.FIELDS.TYPE]===P.comma||this.prevToken[k.FIELDS.TYPE]===P.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[k.FIELDS.TYPE]===P.comma||this.nextToken[k.FIELDS.TYPE]===P.closeParenthesis?(this.current.last.spaces.after=this.optionalSpace(r),this.position++):this.combinator()},t.string=function(){var r=this.currToken;this.newNode(new _i.default({value:this.content(),source:ft(r),sourceIndex:r[k.FIELDS.START_POS]})),this.position++},t.universal=function(r){var i=this.nextToken;if(i&&this.content(i)==="|")return this.position++,this.namespace();var s=this.currToken;this.newNode(new Zd.default({value:this.content(),source:ft(s),sourceIndex:s[k.FIELDS.START_POS]}),r),this.position++},t.splitWord=function(r,i){for(var s=this,o=this.nextToken,a=this.content();o&&~[P.dollar,P.caret,P.equals,P.word].indexOf(o[k.FIELDS.TYPE]);){this.position++;var u=this.content();if(a+=u,u.lastIndexOf("\\")===u.length-1){var l=this.nextToken;l&&l[k.FIELDS.TYPE]===P.space&&(a+=this.requiredSpace(this.content(l)),this.position++)}o=this.nextToken}var f=Oi(a,".").filter(function(p){var v=a[p-1]==="\\",_=/^\d+\.\d+%$/.test(a);return!v&&!_}),d=Oi(a,"#").filter(function(p){return a[p-1]!=="\\"}),g=Oi(a,"#{");g.length&&(d=d.filter(function(p){return!~g.indexOf(p)}));var h=(0,tp.default)(op([0].concat(f,d)));h.forEach(function(p,v){var _=h[v+1]||a.length,b=a.slice(p,_);if(v===0&&i)return i.call(s,b,h.length);var y,S=s.currToken,E=S[k.FIELDS.START_POS]+h[v],T=Ze(S[1],S[2]+p,S[3],S[2]+(_-1));if(~f.indexOf(p)){var D={value:b.slice(1),source:T,sourceIndex:E};y=new Xd.default(ct(D,"value"))}else if(~d.indexOf(p)){var F={value:b.slice(1),source:T,sourceIndex:E};y=new Qd.default(ct(F,"value"))}else{var C={value:b,source:T,sourceIndex:E};ct(C,"value"),y=new Kd.default(C)}s.newNode(y,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[k.FIELDS.TYPE]){case P.space:this.space();break;case P.comment:this.comment();break;case P.openParenthesis:this.parentheses();break;case P.closeParenthesis:r&&this.missingParenthesis();break;case P.openSquare:this.attribute();break;case P.dollar:case P.caret:case P.equals:case P.word:this.word();break;case P.colon:this.pseudo();break;case P.comma:this.comma();break;case P.asterisk:this.universal();break;case P.ampersand:this.nesting();break;case P.slash:case P.combinator:this.combinator();break;case P.str:this.string();break;case P.closeSquare:this.missingSquareBracket();case P.semicolon:this.missingBackslash();default:this.unexpected()}},t.expected=function(r,i,s){if(Array.isArray(r)){var o=r.pop();r=r.join(", ")+" or "+o}var a=/^[aeiou]/.test(r[0])?"an":"a";return s?this.error("Expected "+a+" "+r+', found "'+s+'" 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[k.FIELDS.TYPE]===P.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,ct(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[k.FIELDS.START_POS],r[k.FIELDS.END_POS])},t.locateNextMeaningfulToken=function(r){r===void 0&&(r=this.position+1);for(var i=r;i<this.tokens.length;)if(ip[this.tokens[i][k.FIELDS.TYPE]]){i++;continue}else return i;return-1},np(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}();Xt.default=sp;ma.exports=Xt.default});var ba=R((Qt,va)=>{"use strict";c();Qt.__esModule=!0;Qt.default=void 0;var ap=up(ga());function up(e){return e&&e.__esModule?e:{default:e}}var lp=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 s=Object.assign({},this.options,i);return s.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 s=new ap.default(r,this._parseOptions(i));return s.root},t._parseOptions=function(r){return{lossy:this._isLossy(r)}},t._run=function(r,i){var s=this;return i===void 0&&(i={}),new Promise(function(o,a){try{var u=s._root(r,i);Promise.resolve(s.func(u)).then(function(l){var f=void 0;return s._shouldUpdateSelector(r,i)&&(f=u.toString(),r.selector=f),{transform:l,root:u,string:f}}).then(o,a)}catch(l){a(l);return}})},t._runSync=function(r,i){i===void 0&&(i={});var s=this._root(r,i),o=this.func(s);if(o&&typeof o.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=s.toString(),r.selector=a),{transform:o,root:s,string:a}},t.ast=function(r,i){return this._run(r,i).then(function(s){return s.root})},t.astSync=function(r,i){return this._runSync(r,i).root},t.transform=function(r,i){return this._run(r,i).then(function(s){return s.transform})},t.transformSync=function(r,i){return this._runSync(r,i).transform},t.process=function(r,i){return this._run(r,i).then(function(s){return s.string||s.root.toString()})},t.processSync=function(r,i){var s=this._runSync(r,i);return s.string||s.root.toString()},e}();Qt.default=lp;va.exports=Qt.default});var ya=R(K=>{"use strict";c();K.__esModule=!0;K.universal=K.tag=K.string=K.selector=K.root=K.pseudo=K.nesting=K.id=K.comment=K.combinator=K.className=K.attribute=void 0;var fp=Te(di()),cp=Te(Xn()),dp=Te(gi()),pp=Te(Kn()),hp=Te(Zn()),mp=Te(bi()),gp=Te(si()),vp=Te(Gn()),bp=Te(Hn()),yp=Te(ii()),xp=Te(ri()),wp=Te(hi());function Te(e){return e&&e.__esModule?e:{default:e}}var _p=function(t){return new fp.default(t)};K.attribute=_p;var Sp=function(t){return new cp.default(t)};K.className=Sp;var kp=function(t){return new dp.default(t)};K.combinator=kp;var Tp=function(t){return new pp.default(t)};K.comment=Tp;var Op=function(t){return new hp.default(t)};K.id=Op;var Ep=function(t){return new mp.default(t)};K.nesting=Ep;var Pp=function(t){return new gp.default(t)};K.pseudo=Pp;var Ap=function(t){return new vp.default(t)};K.root=Ap;var Ip=function(t){return new bp.default(t)};K.selector=Ip;var Rp=function(t){return new yp.default(t)};K.string=Rp;var Lp=function(t){return new xp.default(t)};K.tag=Lp;var Cp=function(t){return new wp.default(t)};K.universal=Cp});var Sa=R(G=>{"use strict";c();G.__esModule=!0;G.isNode=Pi;G.isPseudoElement=_a;G.isPseudoClass=Gp;G.isContainer=jp;G.isNamespace=Hp;G.isUniversal=G.isTag=G.isString=G.isSelector=G.isRoot=G.isPseudo=G.isNesting=G.isIdentifier=G.isComment=G.isCombinator=G.isClassName=G.isAttribute=void 0;var te=ae(),me,Dp=(me={},me[te.ATTRIBUTE]=!0,me[te.CLASS]=!0,me[te.COMBINATOR]=!0,me[te.COMMENT]=!0,me[te.ID]=!0,me[te.NESTING]=!0,me[te.PSEUDO]=!0,me[te.ROOT]=!0,me[te.SELECTOR]=!0,me[te.STRING]=!0,me[te.TAG]=!0,me[te.UNIVERSAL]=!0,me);function Pi(e){return typeof e=="object"&&Dp[e.type]}function Oe(e,t){return Pi(t)&&t.type===e}var xa=Oe.bind(null,te.ATTRIBUTE);G.isAttribute=xa;var Fp=Oe.bind(null,te.CLASS);G.isClassName=Fp;var Np=Oe.bind(null,te.COMBINATOR);G.isCombinator=Np;var Mp=Oe.bind(null,te.COMMENT);G.isComment=Mp;var $p=Oe.bind(null,te.ID);G.isIdentifier=$p;var Wp=Oe.bind(null,te.NESTING);G.isNesting=Wp;var Ai=Oe.bind(null,te.PSEUDO);G.isPseudo=Ai;var qp=Oe.bind(null,te.ROOT);G.isRoot=qp;var Bp=Oe.bind(null,te.SELECTOR);G.isSelector=Bp;var Up=Oe.bind(null,te.STRING);G.isString=Up;var wa=Oe.bind(null,te.TAG);G.isTag=wa;var zp=Oe.bind(null,te.UNIVERSAL);G.isUniversal=zp;function _a(e){return Ai(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 Gp(e){return Ai(e)&&!_a(e)}function jp(e){return!!(Pi(e)&&e.walk)}function Hp(e){return xa(e)||wa(e)}});var ka=R(Ae=>{"use strict";c();Ae.__esModule=!0;var Ii=ae();Object.keys(Ii).forEach(function(e){e==="default"||e==="__esModule"||e in Ae&&Ae[e]===Ii[e]||(Ae[e]=Ii[e])});var Ri=ya();Object.keys(Ri).forEach(function(e){e==="default"||e==="__esModule"||e in Ae&&Ae[e]===Ri[e]||(Ae[e]=Ri[e])});var Li=Sa();Object.keys(Li).forEach(function(e){e==="default"||e==="__esModule"||e in Ae&&Ae[e]===Li[e]||(Ae[e]=Li[e])})});var Ea=R((Kt,Oa)=>{"use strict";c();Kt.__esModule=!0;Kt.default=void 0;var Vp=Qp(ba()),Yp=Xp(ka());function Ta(){if(typeof WeakMap!="function")return null;var e=new WeakMap;return Ta=function(){return e},e}function Xp(e){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var t=Ta();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 s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(n,i,s):n[i]=e[i]}return n.default=e,t&&t.set(e,n),n}function Qp(e){return e&&e.__esModule?e:{default:e}}var Ci=function(t){return new Vp.default(t)};Object.assign(Ci,Yp);delete Ci.__esModule;var Kp=Ci;Kt.default=Kp;Oa.exports=Kt.default});var Pa=R(Di=>{"use strict";c();Object.defineProperty(Di,"__esModule",{value:!0});Object.defineProperty(Di,"default",{enumerable:!0,get:()=>Jp});function Jp(e){return e.replace(/\\,/g,"\\2c ")}});var Ia=R((Yg,Aa)=>{"use strict";c();Aa.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 Ni=R(Fi=>{"use strict";c();Object.defineProperty(Fi,"__esModule",{value:!0});function Zp(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Zp(Fi,{parseColor:()=>oh,formatColor:()=>sh});var Ra=eh(Ia());function eh(e){return e&&e.__esModule?e:{default:e}}var th=/^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i,rh=/^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i,Ge=/(?:\d+|\d*\.\d+)%?/,Gr=/(?:\s*,\s*|\s+)/,La=/\s*[,/]\s*/,je=/var\(--(?:[^ )]*?)\)/,nh=new RegExp(`^(rgb)a?\\(\\s*(${Ge.source}|${je.source})(?:${Gr.source}(${Ge.source}|${je.source}))?(?:${Gr.source}(${Ge.source}|${je.source}))?(?:${La.source}(${Ge.source}|${je.source}))?\\s*\\)$`),ih=new RegExp(`^(hsl)a?\\(\\s*((?:${Ge.source})(?:deg|rad|grad|turn)?|${je.source})(?:${Gr.source}(${Ge.source}|${je.source}))?(?:${Gr.source}(${Ge.source}|${je.source}))?(?:${La.source}(${Ge.source}|${je.source}))?\\s*\\)$`);function oh(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 Ra.default)return{mode:"rgb",color:Ra.default[e].map(u=>u.toString())};let i=e.replace(rh,(u,l,f,d,g)=>["#",l,l,f,f,d,d,g?g+g:""].join("")).match(th);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 s;let o=(s=e.match(nh))!==null&&s!==void 0?s:e.match(ih);if(o===null)return null;let a=[o[2],o[3],o[4]].filter(Boolean).map(u=>u.toString());return!t&&a.length!==3||a.length<3&&!a.some(u=>/^var\(.*?\)$/.test(u))?null:{mode:o[1],color:a,alpha:(n=o[5])===null||n===void 0||(r=n.toString)===null||r===void 0?void 0:r.call(n)}}function sh({mode:e,color:t,alpha:n}){let r=n!==void 0;return`${e}(${t.join(" ")}${r?` / ${n}`:""})`}});var $i=R(Mi=>{"use strict";c();Object.defineProperty(Mi,"__esModule",{value:!0});function ah(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}ah(Mi,{withAlphaValue:()=>uh,default:()=>lh});var jr=Ni();function uh(e,t,n){if(typeof e=="function")return e({opacityValue:t});let r=(0,jr.parseColor)(e,{loose:!0});return r===null?n:(0,jr.formatColor)({...r,alpha:t})}function lh({color:e,property:t,variable:n}){let r=[].concat(t);if(typeof e=="function")return{[n]:"1",...Object.fromEntries(r.map(s=>[s,e({opacityVariable:n,opacityValue:`var(${n})`})]))};let i=(0,jr.parseColor)(e);return i===null?Object.fromEntries(r.map(s=>[s,e])):i.alpha!==void 0?Object.fromEntries(r.map(s=>[s,e])):{[n]:"1",...Object.fromEntries(r.map(s=>[s,(0,jr.formatColor)({...i,alpha:`var(${n})`})]))}}});var Ma=R(Wi=>{"use strict";c();Object.defineProperty(Wi,"__esModule",{value:!0});function fh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}fh(Wi,{pattern:()=>dh,withoutCapturing:()=>Da,any:()=>Fa,optional:()=>ph,zeroOrMore:()=>hh,nestedBrackets:()=>Na,escape:()=>et});var Ca=/[\\^$.*+?()[\]{}|]/g,ch=RegExp(Ca.source);function Jt(e){return e=Array.isArray(e)?e:[e],e=e.map(t=>t instanceof RegExp?t.source:t),e.join("")}function dh(e){return new RegExp(Jt(e),"g")}function Da(e){return new RegExp(`(?:${Jt(e)})`,"g")}function Fa(e){return`(?:${e.map(Jt).join("|")})`}function ph(e){return`(?:${Jt(e)})?`}function hh(e){return`(?:${Jt(e)})*`}function Na(e,t,n=1){return Da([et(e),/[^\s]*/,n===1?`[^${et(e)}${et(t)}s]*`:Fa([`[^${et(e)}${et(t)}s]*`,Na(e,t,n-1)]),/[^\s]*/,et(t)])}function et(e){return e&&ch.test(e)?e.replace(Ca,"\\$&"):e||""}});var Wa=R(qi=>{"use strict";c();Object.defineProperty(qi,"__esModule",{value:!0});Object.defineProperty(qi,"splitAtTopLevelOnly",{enumerable:!0,get:()=>vh});var mh=gh(Ma());function $a(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return($a=function(r){return r?n:t})(e)}function gh(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=$a(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function*vh(e,t){let n=new RegExp(`[(){}\\[\\]${mh.escape(t)}]`,"g"),r=0,i=0,s=!1,o=0,a=0,u=t.length;for(let l of e.matchAll(n)){let f=l[0]===t[o],d=o===u-1,g=f&&d;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),o++),g&&r===0&&(s=!0,yield e.substring(i,a),i=a+u),o===u&&(o=0,a=0)}s?yield e.substring(i):yield e}});var Ba=R(Bi=>{"use strict";c();Object.defineProperty(Bi,"__esModule",{value:!0});function bh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}bh(Bi,{parseBoxShadowValue:()=>_h,formatBoxShadowValue:()=>Sh});var yh=Wa(),xh=new Set(["inset","inherit","initial","revert","unset"]),wh=/\ +(?![^(]*\))/g,qa=/^-?(\d+|\.\d+)(.*?)$/g;function _h(e){return Array.from((0,yh.splitAtTopLevelOnly)(e,",")).map(n=>{let r=n.trim(),i={raw:r},s=r.split(wh),o=new Set;for(let a of s)qa.lastIndex=0,!o.has("KEYWORD")&&xh.has(a)?(i.keyword=a,o.add("KEYWORD")):qa.test(a)?o.has("X")?o.has("Y")?o.has("BLUR")?o.has("SPREAD")||(i.spread=a,o.add("SPREAD")):(i.blur=a,o.add("BLUR")):(i.y=a,o.add("Y")):(i.x=a,o.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 Sh(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 Ya=R(zi=>{"use strict";c();Object.defineProperty(zi,"__esModule",{value:!0});function kh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}kh(zi,{normalize:()=>He,url:()=>Ga,number:()=>Eh,percentage:()=>ja,length:()=>Ha,lineWidth:()=>Ih,shadow:()=>Rh,color:()=>Lh,image:()=>Ch,gradient:()=>Va,position:()=>Nh,familyName:()=>Mh,genericName:()=>Wh,absoluteSize:()=>Bh,relativeSize:()=>zh});var Th=Ni(),Oh=Ba(),Ui=["min","max","clamp","calc"],za=/,(?![^(]*\))/g,Hr=/_(?![^(]*\))/g;function He(e,t=!0){return e.includes("url(")?e.split(/(url\(.*?\))/g).filter(Boolean).map(n=>/^url\(.*?\)$/.test(n)?n:He(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 Ga(e){return e.startsWith("url(")}function Eh(e){return!isNaN(Number(e))||Ui.some(t=>new RegExp(`^${t}\\(.+?`).test(e))}function ja(e){return e.split(Hr).every(t=>/%$/g.test(t)||Ui.some(n=>new RegExp(`^${n}\\(.+?%`).test(t)))}var Ph=["cm","mm","Q","in","pc","pt","px","em","ex","ch","rem","lh","vw","vh","vmin","vmax"],Ua=`(?:${Ph.join("|")})`;function Ha(e){return e.split(Hr).every(t=>t==="0"||new RegExp(`${Ua}$`).test(t)||Ui.some(n=>new RegExp(`^${n}\\(.+?${Ua}`).test(t)))}var Ah=new Set(["thin","medium","thick"]);function Ih(e){return Ah.has(e)}function Rh(e){let t=(0,Oh.parseBoxShadowValue)(He(e));for(let n of t)if(!n.valid)return!1;return!0}function Lh(e){let t=0;return e.split(Hr).every(r=>(r=He(r),r.startsWith("var(")?!0:(0,Th.parseColor)(r,{loose:!0})!==null?(t++,!0):!1))?t>0:!1}function Ch(e){let t=0;return e.split(za).every(r=>(r=He(r),r.startsWith("var(")?!0:Ga(r)||Va(r)||["element(","image(","cross-fade(","image-set("].some(i=>r.startsWith(i))?(t++,!0):!1))?t>0:!1}var Dh=new Set(["linear-gradient","radial-gradient","repeating-linear-gradient","repeating-radial-gradient","conic-gradient"]);function Va(e){e=He(e);for(let t of Dh)if(e.startsWith(`${t}(`))return!0;return!1}var Fh=new Set(["center","top","right","bottom","left"]);function Nh(e){let t=0;return e.split(Hr).every(r=>(r=He(r),r.startsWith("var(")?!0:Fh.has(r)||Ha(r)||ja(r)?(t++,!0):!1))?t>0:!1}function Mh(e){let t=0;return e.split(za).every(r=>(r=He(r),r.startsWith("var(")?!0:r.includes(" ")&&!/(['"])([^"']+)\1/g.test(r)||/^\d/g.test(r)?!1:(t++,!0)))?t>0:!1}var $h=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","math","emoji","fangsong"]);function Wh(e){return $h.has(e)}var qh=new Set(["xx-small","x-small","small","medium","large","x-large","x-large","xxx-large"]);function Bh(e){return qh.has(e)}var Uh=new Set(["larger","smaller"]);function zh(e){return Uh.has(e)}});var ru=R(Hi=>{"use strict";c();Object.defineProperty(Hi,"__esModule",{value:!0});function Gh(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}Gh(Hi,{updateAllClasses:()=>Vh,asValue:()=>er,parseColorFormat:()=>Gi,asColor:()=>Za,asLookupValue:()=>eu,coerceValue:()=>Kh});var jh=ji(Ea()),Hh=ji(Pa()),Xa=$i(),ge=Ya(),Qa=ji(In());function ji(e){return e&&e.__esModule?e:{default:e}}function Vh(e,t){return(0,jh.default)(i=>{i.walkClasses(s=>{let o=t(s.value);s.value=o,s.raws&&s.raws.value&&(s.raws.value=(0,Hh.default)(s.raws.value))})}).processSync(e)}function Ja(e,t){if(!Zt(e))return;let n=e.slice(1,-1);if(!!t(n))return(0,ge.normalize)(n)}function Yh(e,t={},n){let r=t[e];if(r!==void 0)return(0,Qa.default)(r);if(Zt(e)){let i=Ja(e,n);return i===void 0?void 0:(0,Qa.default)(i)}}function er(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("-")?Yh(e.slice(1),t.values,n):Ja(e,n)}function Zt(e){return e.startsWith("[")&&e.endsWith("]")}function Xh(e){let t=e.lastIndexOf("/");return t===-1||t===e.length-1?[e]:[e.slice(0,t),e.slice(t+1)]}function Gi(e){if(typeof e=="string"&&e.includes("<alpha-value>")){let t=e;return({opacityValue:n=1})=>t.replace("<alpha-value>",n)}return e}function Za(e,t={},{tailwindConfig:n={}}={}){var r;if(((r=t.values)===null||r===void 0?void 0:r[e])!==void 0){var i;return Gi((i=t.values)===null||i===void 0?void 0:i[e])}let[s,o]=Xh(e);if(o!==void 0){var a,u,l,f;let d=(f=(a=t.values)===null||a===void 0?void 0:a[s])!==null&&f!==void 0?f:Zt(s)?s.slice(1,-1):void 0;return d===void 0?void 0:(d=Gi(d),Zt(o)?(0,Xa.withAlphaValue)(d,o.slice(1,-1)):((u=n.theme)===null||u===void 0||(l=u.opacity)===null||l===void 0?void 0:l[o])===void 0?void 0:(0,Xa.withAlphaValue)(d,n.theme.opacity[o]))}return er(e,t,{validate:ge.color})}function eu(e,t={}){var n;return(n=t.values)===null||n===void 0?void 0:n[e]}function Ee(e){return(t,n)=>er(t,n,{validate:e})}var tu={any:er,color:Za,url:Ee(ge.url),image:Ee(ge.image),length:Ee(ge.length),percentage:Ee(ge.percentage),position:Ee(ge.position),lookup:eu,"generic-name":Ee(ge.genericName),"family-name":Ee(ge.familyName),number:Ee(ge.number),"line-width":Ee(ge.lineWidth),"absolute-size":Ee(ge.absoluteSize),"relative-size":Ee(ge.relativeSize),shadow:Ee(ge.shadow)},Ka=Object.keys(tu);function Qh(e,t){let n=e.indexOf(t);return n===-1?[void 0,e]:[e.slice(0,n),e.slice(n+1)]}function Kh(e,t,n,r){if(Zt(t)){let i=t.slice(1,-1),[s,o]=Qh(i,":");if(!/^[\w-_]+$/g.test(s))o=i;else if(s!==void 0&&!Ka.includes(s))return[];if(o.length>0&&Ka.includes(s))return[er(`[${o}]`,n),s]}for(let i of[].concat(e)){let s=tu[i](t,n,{tailwindConfig:r});if(s!==void 0)return[s,i]}return[]}});var nu=R(Vi=>{"use strict";c();Object.defineProperty(Vi,"__esModule",{value:!0});Object.defineProperty(Vi,"default",{enumerable:!0,get:()=>Jh});function Jh(e){return typeof e=="function"?e({}):e}});var uu=R(Xi=>{"use strict";c();Object.defineProperty(Xi,"__esModule",{value:!0});Object.defineProperty(Xi,"default",{enumerable:!0,get:()=>b0});var Zh=tt(In()),e0=tt(cs()),t0=tt(ds()),r0=tt(Cn()),n0=tt(hs()),su=ms(),iu=gs(),i0=bs(),o0=tt(ys()),s0=xs(),a0=ru(),u0=$i(),l0=tt(nu());function tt(e){return e&&e.__esModule?e:{default:e}}function dt(e){return typeof e=="function"}function tr(e){return typeof e=="object"&&e!==null}function rr(e,...t){let n=t.pop();for(let r of t)for(let i in r){let s=n(e[i],r[i]);s===void 0?tr(e[i])&&tr(r[i])?e[i]=rr(e[i],r[i],n):e[i]=r[i]:e[i]=s}return e}var Yi={colors:n0.default,negative(e){return Object.keys(e).filter(t=>e[t]!=="0").reduce((t,n)=>{let r=(0,Zh.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 f0(e,...t){return dt(e)?e(...t):e}function c0(e){return e.reduce((t,{extend:n})=>rr(t,n,(r,i)=>r===void 0?[i]:Array.isArray(r)?[i,...r]:[i,r]),{})}function d0(e){return{...e.reduce((t,n)=>(0,su.defaults)(t,n),{}),extend:c0(e)}}function ou(e,t){if(Array.isArray(e)&&tr(e[0]))return e.concat(t);if(Array.isArray(t)&&tr(t[0])&&tr(e))return[e,...t];if(Array.isArray(t))return t}function p0({extend:e,...t}){return rr(t,e,(n,r)=>!dt(n)&&!r.some(dt)?rr({},n,...r,ou):(i,s)=>rr({},...[n,...r].map(o=>f0(o,i,s)),ou))}function*h0(e){let t=(0,iu.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,s]=r,o=(0,iu.toPath)(i);o.alpha=s,yield o}}function m0(e){let t=(n,r)=>{for(let i of h0(n)){let s=0,o=e;for(;o!=null&&s<i.length;)o=o[i[s++]],o=dt(o)&&(i.alpha===void 0||s<=i.length-1)?o(t,Yi):o;if(o!==void 0){if(i.alpha!==void 0){let a=(0,a0.parseColorFormat)(o);return(0,u0.withAlphaValue)(a,i.alpha,(0,l0.default)(a))}return(0,o0.default)(o)?(0,s0.cloneDeep)(o):o}}return r};return Object.assign(t,{theme:t,...Yi}),Object.keys(e).reduce((n,r)=>(n[r]=dt(e[r])?e[r](t,Yi):e[r],n),{})}function au(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(s=>{s.__isOptionsFunction&&(s=s());var o;t=[...t,...au([(o=s==null?void 0:s.config)!==null&&o!==void 0?o:{}])]})}),t}function g0(e){return[...e].reduceRight((n,r)=>dt(r)?r({corePlugins:n}):(0,t0.default)(r,n),e0.default)}function v0(e){return[...e].reduceRight((n,r)=>[...n,...r],[])}function b0(e){let t=[...au(e),{prefix:"",important:!1,separator:":",variantOrder:r0.default.variantOrder}];var n,r;return(0,i0.normalizeConfig)((0,su.defaults)({theme:m0(p0(d0(t.map(i=>(n=i==null?void 0:i.theme)!==null&&n!==void 0?n:{})))),corePlugins:g0(t.map(i=>i.corePlugins)),plugins:v0(e.map(i=>(r=i==null?void 0:i.plugins)!==null&&r!==void 0?r:[]))},...t))}});var lu={};nn(lu,{default:()=>y0});var y0,fu=vr(()=>{c();y0={yellow:e=>e}});var hu=R(Qi=>{"use strict";c();Object.defineProperty(Qi,"__esModule",{value:!0});function x0(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}x0(Qi,{flagEnabled:()=>S0,issueFlagNotices:()=>k0,default:()=>T0});var w0=pu((fu(),br(lu))),_0=pu((Rr(),br(Ir)));function pu(e){return e&&e.__esModule?e:{default:e}}var cu={optimizeUniversalDefaults:!1},nr={future:["hoverOnlyWhenSupported","respectDefaultRingColorOpacity"],experimental:["optimizeUniversalDefaults","matchVariant"]};function S0(e,t){if(nr.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:cu[t])!==null&&i!==void 0?i:!1)}if(nr.experimental.includes(t)){var s,o,a;return e.experimental==="all"||((a=(o=e==null||(s=e.experimental)===null||s===void 0?void 0:s[t])!==null&&o!==void 0?o:cu[t])!==null&&a!==void 0?a:!1)}return!1}function du(e){if(e.experimental==="all")return nr.experimental;var t;return Object.keys((t=e==null?void 0:e.experimental)!==null&&t!==void 0?t:{}).filter(n=>nr.experimental.includes(n)&&e.experimental[n])}function k0(e){if(process.env.JEST_WORKER_ID===void 0&&du(e).length>0){let t=du(e).map(n=>w0.default.yellow(n)).join(", ");_0.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 T0=nr});var gu=R(Ki=>{"use strict";c();Object.defineProperty(Ki,"__esModule",{value:!0});Object.defineProperty(Ki,"default",{enumerable:!0,get:()=>mu});var O0=P0(Cn()),E0=hu();function P0(e){return e&&e.__esModule?e:{default:e}}function mu(e){var t;let n=((t=e==null?void 0:e.presets)!==null&&t!==void 0?t:[O0.default]).slice().reverse().flatMap(s=>mu(typeof s=="function"?s():s)),r={respectDefaultRingColorOpacity:{theme:{ringColor:{DEFAULT:"#3b82f67f"}}}},i=Object.keys(r).filter(s=>(0,E0.flagEnabled)(e,s)).map(s=>r[s]);return[e,...i,...n]}});var bu=R(Ji=>{"use strict";c();Object.defineProperty(Ji,"__esModule",{value:!0});Object.defineProperty(Ji,"default",{enumerable:!0,get:()=>R0});var A0=vu(uu()),I0=vu(gu());function vu(e){return e&&e.__esModule?e:{default:e}}function R0(...e){let[,...t]=(0,I0.default)(e[0]);return(0,A0.default)([...e,...t])}});var xu=R((av,yu)=>{c();var Zi=bu();yu.exports=(Zi.__esModule?Zi:{default:Zi}).default});c();c();c();var at;function nl(e){at=e}var vt=null;async function Fe(){return at||(vt?(await vt,at):(vt=Promise.resolve().then(()=>(Ao(),Po)).then(e=>e.getYogaModule()).then(e=>at=e),await vt,vt=null,at))}c();c();c();var bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),il=bt((e,t)=>{t.exports=["em","ex","ch","rem","vh","vw","vmin","vmax","px","mm","cm","in","pt","pc","mozmm"]}),ol=bt((e,t)=>{t.exports=["deg","grad","rad","turn"]}),sl=bt((e,t)=>{t.exports=["dpi","dpcm","dppx"]}),al=bt((e,t)=>{t.exports=["Hz","kHz"]}),ul=bt((e,t)=>{t.exports=["s","ms"]}),ll=il(),Io=ol(),Ro=sl(),Lo=al(),Co=ul();function sn(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(fl(e)>1)throw new Error("Only one dot is allowed");if(/%$/.test(e)){this.type="percentage",this.value=on(e),this.unit="%";return}var t=dl(e);if(!t){this.type="number",this.value=on(e);return}this.type=hl(t),this.value=on(e.substr(0,e.length-t.length)),this.unit=t}sn.prototype.valueOf=function(){return this.value};sn.prototype.toString=function(){return this.value+(this.unit||"")};function ze(e){return new sn(e)}function fl(e){var t=e.match(/\./g);return t?t.length:0}function on(e){var t=parseFloat(e);if(isNaN(t))throw new Error("Invalid number: "+e);return t}var cl=[].concat(Io,Lo,ll,Ro,Co);function dl(e){var t=e.match(/\D+$/),n=t&&t[0];if(n&&cl.indexOf(n)===-1)throw new Error("Invalid unit: "+n);return n}var pl=Object.assign(yr(Io,"angle"),yr(Lo,"frequency"),yr(Ro,"resolution"),yr(Co,"time"));function yr(e,t){return Object.fromEntries(e.map(n=>[n,t]))}function hl(e){return pl[e]||"length"}import ml from"linebreak";function fn(e){let t=typeof e;return!(t==="number"||t==="bigint"||t==="string"||t==="boolean")}function Do(e){return/^class\s/.test(e.toString())}function Fo(e){return"dangerouslySetInnerHTML"in e}function No(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 _e(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 s=new ze(e);if(s.type==="length")switch(s.unit){case"em":return s.value*t;case"rem":return s.value*16;case"vw":return~~(s.value*r._viewportWidth/100);case"vh":return~~(s.value*r._viewportHeight/100);default:return s.value}else if(s.type==="angle")switch(s.unit){case"deg":return s.value;case"rad":return s.value*180/Math.PI;default:return s.value}else if(s.type==="percentage"&&i)return s.value/100*n}catch{}}function yt(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 he(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(s=>`"${s}"`).join(" | ")}. Received: "${e}".`);i=n}return i}var an,un,Mo=[32,160,4961,65792,65793,4153,4241,10].map(e=>String.fromCodePoint(e));function pe(e,t,n){if(!an||!un){if(!(typeof Intl<"u"&&"Segmenter"in Intl))throw new Error("Intl.Segmenter does not exist, please use import a polyfill.");an=new Intl.Segmenter(n,{granularity:"word"}),un=new Intl.Segmenter(n,{granularity:"grapheme"})}return t==="word"?[...an.segment(e)].map(r=>r.segment):[...un.segment(e)].map(r=>r.segment)}function I(e,t,n){let r="";for(let[i,s]of Object.entries(t))typeof s<"u"&&(r+=` ${i}="${s}"`);return n?`<${e}${r}>${n}</${e}>`:`<${e}${r}/>`}function $o(e=20){let t=new Map;function n(i,s){if(t.size>=e){let o=t.keys().next().value;t.delete(o)}t.set(i,s)}function r(i){if(!t.has(i))return;let o=t.get(i);return t.delete(i),t.set(i,o),o}return{set:n,get:r}}var Wo={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",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"},gl=/[\r\n%#()<>?[\\\]^`{|}"']/g;function ln(e,t){if(!e)return"";if(Array.isArray(e))return e.map(a=>ln(a,t)).join("");if(typeof e!="object")return String(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,...s}=e.props||{},o=(i==null?void 0:i.color)||t;return`<${n}${Object.entries(s).map(([a,u])=>(typeof u=="string"&&u.toLowerCase()==="currentcolor"&&(u=o),` ${Wo[a]||a}="${u}"`)).join("")}>${ln(r,o)}</${n}>`}function xt(e){return e?e.split(/[, ]/).filter(Boolean).map(Number):null}function qo(e,t){let{viewBox:n,viewbox:r,width:i,height:s,className:o,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,d=xt(n),g=d?d[3]/d[2]:null;return i=i||g&&s?s/g:null,s=s||g&&i?i*g:null,l.width=i,l.height=s,n&&(l.viewBox=n),`data:image/svg+xml;utf8,${`<svg ${Object.entries(l).map(([h,p])=>(typeof p=="string"&&p.toLowerCase()==="currentcolor"&&(p=f),` ${Wo[h]||h}="${p}"`)).join("")}>${ln(u,f)}</svg>`.replace(gl,encodeURIComponent)}`}function Bo(e){return typeof e=="string"}function Uo(e,t){if(t==="break-all")return{words:pe(e,"grapheme"),requiredBreaks:[]};if(t==="keep-all")return{words:pe(e,"word"),requiredBreaks:[]};let n=new ml(e),r=0,i=n.nextBreak(),s=[],o=[!1];for(;i;){let a=e.slice(r,i.position);s.push(a),i.required?o.push(!0):o.push(!1),r=i.position,i=n.nextBreak()}return{words:s,requiredBreaks:o}}c();c();var Se="flex",zo={p:{display:Se,marginTop:"1em",marginBottom:"1em"},div:{display:Se},blockquote:{display:Se,marginTop:"1em",marginBottom:"1em",marginLeft:40,marginRight:40},center:{display:Se,textAlign:"center"},hr:{display:Se,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"auto",marginRight:"auto",borderWidth:1,borderStyle:"solid"},h1:{display:Se,fontSize:"2em",marginTop:"0.67em",marginBottom:"0.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h2:{display:Se,fontSize:"1.5em",marginTop:"0.83em",marginBottom:"0.83em",marginLeft:0,marginRight:0,fontWeight:"bold"},h3:{display:Se,fontSize:"1.17em",marginTop:"1em",marginBottom:"1em",marginLeft:0,marginRight:0,fontWeight:"bold"},h4:{display:Se,marginTop:"1.33em",marginBottom:"1.33em",marginLeft:0,marginRight:0,fontWeight:"bold"},h5:{display:Se,fontSize:"0.83em",marginTop:"1.67em",marginBottom:"1.67em",marginLeft:0,marginRight:0,fontWeight:"bold"},h6:{display:Se,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:Se,fontFamily:"monospace",whiteSpace:"pre",marginTop:"1em",marginBottom:"1em"},mark:{backgroundColor:"yellow",color:"black"},big:{fontSize:"larger"},small:{fontSize:"smaller"},s:{textDecoration:"line-through"}};c();var vl=new Set(["color","font","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","textAlign","textTransform","textShadowOffset","textShadowColor","textShadowRadius","textDecorationLine","textDecorationStyle","textDecorationColor","whiteSpace","transform","wordBreak","opacity","filter","_viewportWidth","_viewportHeight","_inheritedClipPathId","_inheritedMaskId","_inheritedBackgroundClipTextPath"]);function cn(e){let t={};for(let n in e)vl.has(n)&&(t[n]=e[n]);return t}c();import{getPropertyName as xl,getStylesForProperty as Ke}from"css-to-react-native";import{parseElementStyle as wl}from"css-background-parser";import{parse as _l}from"css-box-shadow";c();import bl from"postcss-value-parser";function yl(e,t){try{let n=new ze(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 dn(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=yl(e,t);return r.absolute?{[n?"xAbsolute":"yAbsolute"]:r.absolute}:r.relative?{[n?"xRelative":"yRelative"]:r.relative}:{}}}}function pn(e,t){if(typeof e=="number")return{xAbsolute:e};let n;try{n=bl(e).nodes.filter(r=>r.type==="word").map(r=>r.value)}catch{return{}}return n.length===1?dn(n[0],t,!0):n.length===2?((n[0]==="top"||n[0]==="bottom"||n[1]==="left"||n[1]==="right")&&n.reverse(),{...dn(n[0],t,!0),...dn(n[1],t,!1)}):{}}var Sl=new Set(["flex","flexGrow","flexShrink","flexBasis","fontWeight","lineHeight","opacity","scale","scaleX","scaleY"]),kl=new Set(["lineHeight"]);function Tl(e,t,n,r){return e==="textDecoration"&&!n.includes(t.textDecorationColor)&&(t.textDecorationColor=r),t}function wt(e,t){return typeof t=="number"?Sl.has(e)?kl.has(e)?t:String(t):t+"px":t}function Ol(e,t,n){if(e==="lineHeight")return{lineHeight:wt(e,t)};if(e==="fontFamily")return{fontFamily:t.split(",").map(r=>r.trim().replace(/(^['"])|(['"]$)/g,"").toLocaleLowerCase())};if(e==="borderRadius"){if(typeof t!="string"||!t.includes("/"))return;let[r,i]=t.split("/"),s=Ke(e,r,!0),o=Ke(e,i,!0);for(let a in s)o[a]=wt(e,s[a])+" "+wt(e,o[a]);return o}if(/^border(Top|Right|Bottom|Left)?$/.test(e)){let r=Ke("border",t,!0);r.borderWidth===1&&!String(t).includes("1px")&&(r.borderWidth=3),r.borderColor==="black"&&!String(t).includes("black")&&(r.borderColor=n);let i={Width:wt(e+"Width",r.borderWidth),Style:he(r.borderStyle,{solid:"solid",dashed:"dashed"},"solid",e+"Style"),Color:r.borderColor},s={};for(let o of e==="border"?["Top","Right","Bottom","Left"]:[e.slice(6)])for(let a in i)s["border"+o+a]=i[a];return s}if(e==="boxShadow"){if(!t)throw new Error('Invalid `boxShadow` value: "'+t+'".');return{[e]:typeof t=="string"?_l(t):t}}if(e==="transform"){if(typeof t!="string")throw new Error("Invalid `transform` value.");let r={},i=t.replace(/(-?[\d.]+%)/g,(o,a)=>{let u=~~(Math.random()*1e9);return r[u]=a,u+"px"}),s=Ke("transform",i,!0);for(let o of s.transform)for(let a in o)r[o[a]]&&(o[a]=r[o[a]]);return s}if(e==="background")return t=t.toString().trim(),/^(linear-gradient|radial-gradient|url)\(/.test(t)?Ke("backgroundImage",t,!0):Ke("background",t,!0)}function Go(e){return e==="transform"?" Only absolute lengths such as `10px` are supported.":""}var jo=/rgb\((\d+)\s+(\d+)\s+(\d+)\s*\/\s*([\.\d]+)\)/;function Ho(e){if(typeof e=="string"&&jo.test(e.trim()))return e.trim().replace(jo,(t,n,r,i,s)=>`rgba(${n}, ${r}, ${i}, ${s})`);if(typeof e=="object"&&e!==null){for(let t in e)e[t]=Ho(e[t]);return e}return e}function xr(e,t){let n={};if(e){let i=El(e.color,t.color);n.color=i;for(let s in e){if(s.startsWith("_")){n[s]=e[s];continue}if(s==="color")continue;let o=xl(s),a=Al(e[s],i);try{let u=Ol(o,a,i)||Tl(o,Ke(o,wt(o,a),!0),a,i);Object.assign(n,u)}catch(u){throw new Error(u.message+(u.message.includes(a)?`
4
4
  `+Go(o):`
5
- in CSS rule \`${o}: ${a}\`.${Go(o)}`))}}}if(n.backgroundImage){let{backgrounds:i}=wl(n);n.backgroundImage=i}let r=typeof n.fontSize=="number"?n.fontSize:t.fontSize;if(typeof r=="string")try{let i=new ze(r);switch(i.unit){case"em":r=i.value*t.fontSize;break;case"rem":r=i.value*16;break}}catch{r=16}typeof n.fontSize<"u"&&(n.fontSize=r),n.transformOrigin&&(n.transformOrigin=pn(n.transformOrigin,r));for(let i in n){let s=n[i];if(i==="lineHeight")typeof s=="string"&&(s=n[i]=_e(s,r,r,t,!0)/r);else{if(typeof s=="string"){let o=_e(s,r,r,t);typeof o<"u"&&(n[i]=o),s=n[i]}if(typeof s=="string"||typeof s=="object"){let o=Ho(s);o&&(n[i]=o),s=n[i]}}if(i==="opacity"&&(s=n[i]=s*t.opacity),i==="transform"){let o=s;for(let a of o){let u=Object.keys(a)[0],l=a[u],f=typeof l=="string"?_e(l,r,r,t)??l:l;a[u]=f}}}return n}function El(e,t){return e&&e.toLowerCase()!=="currentcolor"?e:t}function Pl(e,t){return e.replace(/currentcolor/gi,t)}function Al(e,t){return Bo(e)&&(e=Pl(e,t)),e}c();var Il="image/avif",Rl="image/webp",wr="image/png",_r="image/jpeg",Sr="image/gif",mn="image/svg+xml";function Qo(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 s=t.getUint8(i+1+n);if(s===192||s===193||s===194)return[t.getUint16(i+7+n,!1),t.getUint16(i+5+n,!1)];n+=i+2}throw new TypeError("Invalid JPEG")}function Ko(e){let t=new Uint8Array(e.slice(6,10));return[t[0]|t[1]<<8,t[2]|t[3]<<8]}function Jo(e){let t=new DataView(e);return[t.getUint16(18,!1),t.getUint16(22,!1)]}var Vo=$o(100),hn=new Map,Ll=[wr,_r,Sr,mn];function Cl(e){let t="",n=new Uint8Array(e);for(let r=0;r<n.byteLength;r++)t+=String.fromCharCode(n[r]);return btoa(t)}function Dl(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 Yo(e,t){let n=t.match(/<svg[^>]*>/)[0],r=n.match(/viewBox=['"](.+)['"]/),i=r?xt(r[1]):null,s=n.match(/width=['"](\d*\.\d+|\d+)['"]/),o=n.match(/height=['"](\d*\.\d+|\d+)['"]/);if(!i&&(!s||!o))throw new Error(`Failed to parse SVG from ${e}: missing "viewBox"`);let a=i?[i[2],i[3]]:[+s[1],+o[1]],u=a[0]/a[1];return s&&o?[+s[1],+o[1]]:s?[+s[1],+s[1]/u]:o?[+o[1]*u,+o[1]]:[a[0],a[1]]}function Xo(e){let t,n=Fl(new Uint8Array(e));switch(n){case wr:t=Jo(e);break;case Sr:t=Ko(e);break;case _r:t=Qo(e);break}if(!Ll.includes(n))throw new Error(`Unsupported image type: ${n||"unknown"}`);return[`data:${n};base64,${Cl(e)}`,t]}async function kr(e){if(!e)throw new Error("Image source is not provided.");if(typeof e=="object"){let[i,s]=Xo(e);return[i,...s]}if((e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),e.startsWith("data:")){let i;try{i=/data:(?<imageType>[a-z/+]+)(;(?<encodingType>base64|utf8))?,(?<dataString>.*)/g.exec(e).groups}catch{return console.warn("Image data URI resolved without size:"+e),[e]}let{imageType:s,encodingType:o,dataString:a}=i;if(s===mn){let u=o==="base64"?atob(a):decodeURIComponent(a.replace(/ /g,"%20")),l=o==="base64"?e:`data:image/svg+xml;base64,${btoa(u)}`,f=Yo(e,u);return[l,...f]}else if(o==="base64"){let u,l=Dl(a);switch(s){case wr:u=Jo(l);break;case Sr:u=Ko(l);break;case _r:u=Qo(l);break}return[e,...u]}else return console.warn("Image data URI resolved without size:"+e),[e]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(hn.has(e))return hn.get(e);let t=Vo.get(e);if(t)return t;let n=e,r=fetch(n).then(i=>{let s=i.headers.get("content-type");return s==="image/svg+xml"||s==="application/svg+xml"?i.text():i.arrayBuffer()}).then(i=>{if(typeof i=="string")try{let a=`data:image/svg+xml;base64,${btoa(i)}`,u=Yo(n,i);return[a,...u]}catch(a){throw new Error(`Failed to parse SVG image: ${a.message}`)}let[s,o]=Xo(i);return[s,...o]}).then(i=>(Vo.set(n,i),i)).catch(i=>(console.error(`Can't load image ${n}: `+i.message),[]));return hn.set(n,r),r}function Fl(e){return[255,216,255].every((t,n)=>e[n]===t)?_r:[137,80,78,71,13,10,26,10].every((t,n)=>e[n]===t)?wr:[71,73,70,56].every((t,n)=>e[n]===t)?Sr:[82,73,70,70,0,0,0,0,87,69,66,80].every((t,n)=>!t||e[n]===t)?Rl:[60,63,120,109,108].every((t,n)=>e[n]===t)?mn:[0,0,0,0,102,116,121,112,97,118,105,102].every((t,n)=>!t||e[n]===t)?Il:null}async function gn(e,t,n,r,i){let s=await Fe(),o={...n,...xr(zo[t],n),...xr(r,n)};if(t==="img"){let[a,u,l]=await kr(i.src);if(u===void 0&&l===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.");u=parseInt(i.width),l=parseInt(i.height)}let f=l/u,d=(o.borderLeftWidth||0)+(o.borderRightWidth||0)+(o.paddingLeft||0)+(o.paddingRight||0),g=(o.borderTopWidth||0)+(o.borderBottomWidth||0)+(o.paddingTop||0)+(o.paddingBottom||0),h=o.width||i.width,p=o.height||i.height,v=typeof h!="string"&&typeof p!="string";typeof h=="number"&&v&&(h-=d),typeof p=="number"&&v&&(p-=g),h===void 0&&p===void 0?(h=u,p=l):h===void 0?typeof p=="number"?h=p/f:e.setAspectRatio(1/f):p===void 0&&(typeof h=="number"?p=h*f:e.setAspectRatio(1/f)),o.width=v?h+d:h,o.height=v?p+g:p,o.__src=a}if(t==="svg"){let a=i.viewBox||i.viewbox,u=xt(a),l=u?u[3]/u[2]:null,{width:f,height:d}=i;typeof f>"u"&&d?l==null?f=0:typeof d=="string"&&d.endsWith("%")?f=parseInt(d)/l+"%":(d=_e(d,n.fontSize,1,n),f=d/l):typeof d>"u"&&f?l==null?f=0:typeof f=="string"&&f.endsWith("%")?d=parseInt(f)*l+"%":(f=_e(f,n.fontSize,1,n),d=f*l):(typeof f<"u"&&(f=_e(f,n.fontSize,1,n)||f),typeof d<"u"&&(d=_e(d,n.fontSize,1,n)||d),f||=u==null?void 0:u[2],d||=u==null?void 0:u[3]),!o.width&&f&&(o.width=f),!o.height&&d&&(o.height=d)}return e.setDisplay(he(o.display,{flex:s.DISPLAY_FLEX,none:s.DISPLAY_NONE},s.DISPLAY_FLEX,"display")),e.setAlignContent(he(o.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(he(o.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(he(o.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(he(o.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(he(o.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(he(o.flexWrap,{wrap:s.WRAP_WRAP,nowrap:s.WRAP_NO_WRAP,"wrap-reverse":s.WRAP_WRAP_REVERSE},s.WRAP_NO_WRAP,"flexWrap")),typeof e.setGap<"u"&&typeof e.getGap<"u"&&(typeof o.gap<"u"&&e.setGap(s.GUTTER_ALL,o.gap),typeof o.rowGap<"u"&&e.setGap(s.GUTTER_ROW,o.rowGap),typeof o.columnGap<"u"&&e.setGap(s.GUTTER_COLUMN,o.columnGap)),typeof o.flexBasis<"u"&&e.setFlexBasis(o.flexBasis),e.setFlexGrow(typeof o.flexGrow>"u"?0:o.flexGrow),e.setFlexShrink(typeof o.flexShrink>"u"?0:o.flexShrink),typeof o.maxHeight<"u"&&e.setMaxHeight(o.maxHeight),typeof o.maxWidth<"u"&&e.setMaxWidth(o.maxWidth),typeof o.minHeight<"u"&&e.setMinHeight(o.minHeight),typeof o.minWidth<"u"&&e.setMinWidth(o.minWidth),e.setOverflow(he(o.overflow,{visible:s.OVERFLOW_VISIBLE,hidden:s.OVERFLOW_HIDDEN},s.OVERFLOW_VISIBLE,"overflow")),e.setMargin(s.EDGE_TOP,o.marginTop||0),e.setMargin(s.EDGE_BOTTOM,o.marginBottom||0),e.setMargin(s.EDGE_LEFT,o.marginLeft||0),e.setMargin(s.EDGE_RIGHT,o.marginRight||0),e.setBorder(s.EDGE_TOP,o.borderTopWidth||0),e.setBorder(s.EDGE_BOTTOM,o.borderBottomWidth||0),e.setBorder(s.EDGE_LEFT,o.borderLeftWidth||0),e.setBorder(s.EDGE_RIGHT,o.borderRightWidth||0),e.setPadding(s.EDGE_TOP,o.paddingTop||0),e.setPadding(s.EDGE_BOTTOM,o.paddingBottom||0),e.setPadding(s.EDGE_LEFT,o.paddingLeft||0),e.setPadding(s.EDGE_RIGHT,o.paddingRight||0),e.setPositionType(he(o.position,{absolute:s.POSITION_TYPE_ABSOLUTE,relative:s.POSITION_TYPE_RELATIVE},s.POSITION_TYPE_RELATIVE,"position")),typeof o.top<"u"&&e.setPosition(s.EDGE_TOP,o.top),typeof o.bottom<"u"&&e.setPosition(s.EDGE_BOTTOM,o.bottom),typeof o.left<"u"&&e.setPosition(s.EDGE_LEFT,o.left),typeof o.right<"u"&&e.setPosition(s.EDGE_RIGHT,o.right),typeof o.height<"u"?e.setHeight(o.height):e.setHeightAuto(),typeof o.width<"u"?e.setWidth(o.width):e.setWidthAuto(),[o,cn(o)]}c();c();c();var Zo=[1,0,0,1,0,0];function Nl(e,t,n){let r=[...Zo];for(let i of e){let s=Object.keys(i)[0],o=i[s];if(typeof o=="string")if(s==="translateX")o=parseFloat(o)/100*t,i[s]=o;else if(s==="translateY")o=parseFloat(o)/100*n,i[s]=o;else throw new Error(`Invalid transform: "${s}: ${o}".`);let a=o,u=[...Zo];switch(s){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),d=Math.sin(l);u[0]=f,u[1]=d,u[2]=-d,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=yt(u,r)}e.splice(0,e.length),e.push(...r),e.__resolved=!0}function _t({left:e,top:t,width:n,height:r},i,s,o){let a;i.__resolved||Nl(i,n,r);let u=i;if(s)a=u;else{let l=(o==null?void 0:o.xAbsolute)??((o==null?void 0:o.xRelative)??50)*n/100,f=(o==null?void 0:o.yAbsolute)??((o==null?void 0:o.yRelative)??50)*r/100,d=e+l,g=t+f;a=yt([1,0,0,1,d,g],yt(u,[1,0,0,1,-d,-g])),u.__parent&&(a=yt(u.__parent,a)),u.splice(0,6,...a)}return`matrix(${a.map(l=>l.toFixed(2)).join(",")})`}function es({left:e,top:t,width:n,height:r,isInheritingTransform:i},s){let o="",a=1;return s.transform&&(o=_t({left:e,top:t,width:n,height:r},s.transform,i,s.transformOrigin)),s.opacity!==void 0&&(a=+s.opacity),{matrix:o,opacity:a}}function vn({id:e,content:t,filter:n,left:r,top:i,width:s,height:o,matrix:a,opacity:u,image:l,clipPathId:f,debug:d,shape:g,decorationShape:h},p){let v="";if(d&&(v=I("rect",{x:r,y:i-o,width:s,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0})),l){let b={href:l,x:r,y:i,width:s,height:o,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+I("image",{...b,opacity:u!==1?u:void 0})+(h||"")+(n?"</g>":"")+v,""]}let _={x:r,y:i,width:s,height:o,"font-weight":p.fontWeight,"font-style":p.fontStyle,"font-size":p.fontSize,"font-family":p.fontFamily,"letter-spacing":p.letterSpacing||void 0,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+I("text",{..._,fill:p.color,opacity:u!==1?u:void 0},t)+(h||"")+(n?"</g>":"")+v,g?I("text",_,t):""]}c();function Ml(e,t,n){return e.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,i,s,o){return i+(parseFloat(s)+t)+","+(parseFloat(o)+n)})}function ts({id:e,width:t,height:n},r){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let i=r.shadowRadius*r.shadowRadius/4,s=Math.min(r.shadowOffset.width-i,0),o=Math.max(r.shadowOffset.width+i+t,t),a=Math.min(r.shadowOffset.height-i,0),u=Math.max(r.shadowOffset.height+i+n,n);return`<defs><filter id="satori_s-${e}" x="${s/t*100}%" y="${a/n*100}%" width="${(o-s)/t*100}%" height="${(u-a)/n*100}%"><feDropShadow dx="${r.shadowOffset.width}" dy="${r.shadowOffset.height}" stdDeviation="${r.shadowRadius/2}" flood-color="${r.shadowColor}" flood-opacity="1"/></filter></defs>`}function rs({width:e,height:t,shape:n,opacity:r,id:i},s){if(!s.boxShadow)return null;let o="",a="";for(let u=s.boxShadow.length-1;u>=0;u--){let l="",f=s.boxShadow[u];f.spreadRadius&&f.inset&&(f.spreadRadius=-f.spreadRadius);let d=f.blurRadius*f.blurRadius/4+(f.spreadRadius||0),g=Math.min(-d-(f.inset?f.offsetX:0),0),h=Math.max(d+e-(f.inset?f.offsetX:0),e),p=Math.min(-d-(f.inset?f.offsetY:0),0),v=Math.max(d+t-(f.inset?f.offsetY:0),t),_=`satori_s-${i}-${u}`,b=`satori_ms-${i}-${u}`,y=f.spreadRadius?n.replace('stroke-width="0"',`stroke-width="${f.spreadRadius*2}"`):n;l+=I("mask",{id:b,maskUnits:"userSpaceOnUse"},I("rect",{x:0,y:0,width:s._viewportWidth,height:s._viewportHeight,fill:f.inset?"#000":"#fff"})+y.replace('fill="#fff"',f.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let S=y.replace(/d="([^"]+)"/,(E,T)=>'d="'+Ml(T,f.offsetX,f.offsetY)+'"').replace(/x="([^"]+)"/,(E,T)=>'x="'+(parseFloat(T)+f.offsetX)+'"').replace(/y="([^"]+)"/,(E,T)=>'y="'+(parseFloat(T)+f.offsetY)+'"');f.spreadRadius&&f.spreadRadius<0&&(l+=I("mask",{id:b+"-neg",maskUnits:"userSpaceOnUse"},S.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-f.spreadRadius*2}"`))),f.spreadRadius&&f.spreadRadius<0&&(S=I("g",{mask:`url(#${b}-neg)`},S)),l+=I("defs",{},I("filter",{id:_,x:`${g/e*100}%`,y:`${p/t*100}%`,width:`${(h-g)/e*100}%`,height:`${(v-p)/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(#${b})`,filter:`url(#${_})`,opacity:r},S),f.inset?a+=l:o+=l}return[o,a]}c();function bn({width:e,left:t,top:n,ascender:r,clipPathId:i},s){let{textDecorationColor:o,textDecorationStyle:a,textDecorationLine:u,fontSize:l}=s;if(!u||u==="none")return"";let f=Math.max(1,l*.1),d=u==="line-through"?n+r*.5:u==="underline"?n+r*1.1:n,g=a==="dashed"?`${f*1.2} ${f*2}`:a==="dotted"?`0 ${f*2}`:void 0;return I("line",{x1:t,y1:d,x2:t+e,y2:d,stroke:o,"stroke-width":f,"stroke-dasharray":g,"stroke-linecap":a==="dotted"?"round":"square","clip-path":i?`url(#${i})`:void 0})}async function*yn(e,t){var To;let n=await Fe(),{parentStyle:r,inheritedStyle:i,parent:s,font:o,id:a,isInheritingTransform:u,debug:l,embedFont:f,graphemeImages:d,locale:g,canLoadAdditionalAssets:h}=t,{textAlign:p,textOverflow:v,whiteSpace:_,wordBreak:b,lineHeight:y,filter:S,_inheritedBackgroundClipTextPath:E}=r;r.textTransform==="uppercase"?e=e.toLocaleUpperCase(g):r.textTransform==="lowercase"?e=e.toLocaleLowerCase(g):r.textTransform==="capitalize"&&(e=pe(e,"word",g).map(W=>pe(W,"grapheme",g).map((B,q)=>q===0?B.toLocaleUpperCase(g):B).join("")).join(""));let T=["pre","pre-wrap","pre-line"].includes(_),D=!["pre","pre-wrap"].includes(_);T||(e=e.replace(/\n/g," ")),D&&(e=e.replace(/[ ]+/g," "),e=e.trim());let F=b==="break-word",{words:C,requiredBreaks:H}=Uo(e,b),U=n.Node.create();U.setAlignItems(n.ALIGN_BASELINE),U.setJustifyContent(he(r.textAlign,{left:n.JUSTIFY_FLEX_START,right:n.JUSTIFY_FLEX_END,center:n.JUSTIFY_CENTER,justify:n.JUSTIFY_SPACE_BETWEEN,start:n.JUSTIFY_FLEX_START,end:n.JUSTIFY_FLEX_END},n.JUSTIFY_FLEX_START,"textAlign")),s.insertChild(U,s.getChildCount());let J=r.fontSize,$=o.getEngine(J,y,r,g),V=h?pe(e,"grapheme").filter(W=>!$.has(W)):[];yield V.map(W=>({word:W,locale:g})),V.length&&($=o.getEngine(J,y,r,g));let ne=new Map;function Z(W){if(ne.has(W))return ne.get(W);let B=$.measure(W,r);return ne.set(W,B),B}function le(W){return!!(d&&d[W])}function ye(W){let B=0;for(let q of W)le(q)?B+=r.fontSize:B+=Z(q);return{width:B}}let L=W=>{if(W.length===0)return{originWidth:0,endingSpacesWidth:0};let{width:B}=ye(pe(W,"grapheme")),q=W.trimEnd()===W?B:ye(pe(W.trimEnd(),"grapheme")).width;return{originWidth:B,endingSpacesWidth:B-q}};typeof r.flexShrink>"u"&&s.setFlexShrink(1);let N=[],z=[],M=[],fe=[],xe=[];function Qr(W){let B=0,q=0,be=0,ce=-1,de=0,re=0,oe=0;N=[],M=[0],fe=[],xe=[];let De=0;for(;De<C.length;){let X=C[De],Ye=T&&H[De],we=0,Be=0,{originWidth:gt,endingSpacesWidth:Xe}=L(X);we=gt,Be=Xe,Ye&&re===0&&(re=$.height(X));let se=",.!?:-@)>]}%#".indexOf(X[0])<0,ue=!q,Ue=De&&se&&q+we>W+Be&&_!=="nowrap"&&_!=="pre";if(F&&we>W&&(!q||Ue||Ye)){let Qe=pe(X,"grapheme");C.splice(De,1,...Qe),q>0&&(N.push(q),z.push(oe),B++,de+=re,q=0,re=0,oe=0,M.push(1),ce=-1);continue}if(Ye||Ue)D&&X===" "&&(we=0),N.push(q),z.push(oe),B++,de+=re,q=we,re=we?$.height(X):0,oe=we?$.baseline(X):0,M.push(1),ce=-1,Ye||(be=Math.max(be,W));else{q+=we;let Qe=$.height(X);Qe>re&&(re=Qe,oe=$.baseline(X)),ue&&M[M.length-1]++}ue&&ce++,be=Math.max(be,q);let st=q-we;if(we===0)xe.push({y:de,x:st,width:0,line:B,lineIndex:ce,isImage:!1});else{let Qe=pe(X,"word");for(let tn=0;tn<Qe.length;tn++){let rn=Qe[tn],mr=0,Oo=!1;le(rn)?(mr=r.fontSize,Oo=!0):mr=Z(rn),fe.push(rn),xe.push({y:de,x:st,width:mr,line:B,lineIndex:ce,isImage:Oo}),st+=mr}}De++}return q&&(B++,N.push(q),z.push(oe),de+=re),{width:be,height:de}}U.setMeasureFunc(W=>{let{width:B,height:q}=Qr(W);if(r.textWrap==="balance"){let be=B/2,ce=B,de=B;for(;be+1<ce;){de=(be+ce)/2;let{height:re}=Qr(de);re>q?be=de:ce=de}return Qr(ce),{width:ce,height:q}}return{width:B,height:q}});let[Vu,Yu]=yield,Kr="",lr="",We=i._inheritedClipPathId,bo=i._inheritedMaskId,{left:yo,top:xo,width:fr,height:wo}=U.getComputedLayout(),Jr=s.getComputedWidth()-s.getComputedPadding(n.EDGE_LEFT)-s.getComputedPadding(n.EDGE_RIGHT)-s.getComputedBorder(n.EDGE_LEFT)-s.getComputedBorder(n.EDGE_RIGHT),it=Vu+yo,ot=Yu+xo,{matrix:Ce,opacity:cr}=es({left:yo,top:xo,width:fr,height:wo,isInheritingTransform:u},r),dr="";r.textShadowOffset&&(dr=ts({width:fr,height:wo,id:a},{shadowColor:r.textShadowColor,shadowOffset:r.textShadowOffset,shadowRadius:r.textShadowRadius}));let mt="",pr="",_o="",Zr=-1,So=v==="ellipsis"?ye(["\u2026"]).width:0,Xu=v==="ellipsis"?ye([" "]).width:0,hr={},qe=null,ko=0;for(let W=0;W<fe.length;W++){let B=xe[W];if(!B)continue;let q=fe[W],be=null,ce=!1,de=d?d[q]:null,re=B.y,oe=B.x,De=B.width,X=B.line;if(X===Zr)continue;let Ye=!1;if(N.length>1){let se=fr-N[X];if(p==="right"||p==="end")oe+=se;else if(p==="center")oe+=se/2;else if(p==="justify"&&X<N.length-1){let ue=M[X];oe+=(ue>1?se/(ue-1):0)*B.lineIndex,Ye=!0}}if(hr[X]||(hr[X]=[oe,Ye?fr:N[X]]),v==="ellipsis"&&N[X]>Jr&&B.x+De+So+Xu>Jr){let se=pe(q,"grapheme",g),ue="",Ue=0;for(let en of se){let st=B.x+ye([ue+en]).width;if(ue&&st+So>Jr)break;ue+=en,Ue=st}q=ue+"\u2026",Zr=X,hr[X][1]=Ue,ce=!0}let we=z[X],Be=$.baseline(q),gt=$.height(q),Xe=we-Be;if(de)re+=0;else if(f){if(!Mo.includes(q)&&fe[W+1]&&xe[W+1]&&!xe[W+1].isImage&&re===xe[W+1].y&&!ce){qe===null&&(ko=oe),qe=qe===null?q:qe+q;continue}let se=qe===null?q:qe+q,ue=qe===null?oe:ko,Ue=B.width+oe-ue;be=$.getSVG(se,{...r,left:it+ue,top:ot+re+Be+Xe,letterSpacing:r.letterSpacing}),qe=null,l&&(_o+=I("rect",{x:it+ue,y:ot+re+Xe,width:Ue,height:gt,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:Ce||void 0,"clip-path":We?`url(#${We})`:void 0})+I("line",{x1:it+oe,x2:it+oe+B.width,y1:ot+re+Xe+Be,y2:ot+re+Xe+Be,stroke:"#14c000","stroke-width":1,transform:Ce||void 0,"clip-path":We?`url(#${We})`:void 0}))}else re+=Be+Xe;if(r.textDecorationLine&&(X!==((To=xe[W+1])==null?void 0:To.line)||Zr===X)){let se=hr[X];se&&!se[2]&&(mt+=bn({left:it+se[0],top:ot+gt*+X,width:se[1],ascender:$.baseline(q),clipPathId:We},r),se[2]=1)}if(be!==null)pr+=be+" ";else{let[se,ue]=vn({content:q,filter:dr,id:a,left:it+oe,top:ot+re,width:De,height:gt,matrix:Ce,opacity:cr,image:de,clipPathId:We,debug:l,shape:!!E,decorationShape:mt},r);Kr+=se,lr+=ue,mt=""}}if(pr){let W=r.color!=="transparent"&&cr!==0?I("path",{fill:r.color,d:pr,transform:Ce||void 0,opacity:cr!==1?cr:void 0,"clip-path":We?`url(#${We})`:void 0,mask:bo?`url(#${bo})`:void 0,style:S?`filter:${S}`:void 0}):"";E&&(lr=I("path",{d:pr,transform:Ce||void 0})),Kr+=(dr?dr+I("g",{filter:`url(#satori_s-${a})`},W+mt):W+mt)+_o}return lr&&(r._inheritedBackgroundClipTextPath.value+=lr),Kr}c();c();c();var xn=xn||{},ns={type:"directional",value:"bottom"};xn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,zeroValue:/[0]/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(L){var N=new Error(t+": "+L);throw N.source=t,N}function r(){var L=i();return t.length>0&&n("Invalid input not EOF"),L}function i(){return E(s)}function s(){return o("linear-gradient",e.linearGradient,u,ns)||o("repeating-linear-gradient",e.repeatingLinearGradient,u,ns)||o("radial-gradient",e.radialGradient,g)||o("repeating-radial-gradient",e.repeatingRadialGradient,g)}function o(L,N,z,M){return a(N,function(fe){var xe=z();return xe?le(e.comma)||n("Missing comma before color stops"):xe=M,{type:L,orientation:xe,colorStops:E(T)}})}function a(L,N){var z=le(L);if(z){le(e.startCall)||n("Missing (");var M=N(z);return le(e.endCall)||n("Missing )"),M}}function u(){return l()||f()||d()}function l(){return Z("directional",e.sideOrCorner,1)}function f(){return Z("angular",e.angleValue,1)}function d(){return Z("directional",e.zeroValue,0)}function g(){var L,N=h(),z;return N&&(L=[],L.push(N),z=t,le(e.comma)&&(N=h(),N?L.push(N):t=z)),L}function h(){var L=p()||v();if(L)L.at=b();else{var N=_();if(N){L=N;var z=b();z&&(L.at=z)}else{var z=b();if(z)L={type:"shape",value:"ellipse",at:z};else{var M=y();M&&(L={type:"default-radial",at:M})}}}return L}function p(){var L=Z("shape",/^(circle)/i,0);return L&&(L.style=ne()||_()),L}function v(){var L=Z("shape",/^(ellipse)/i,0);return L&&(L.style=$()||_()),L}function _(){return Z("extent-keyword",e.extentKeywords,1)}function b(){if(Z("position",/^at/,0)){var L=y();return L||n("Missing positioning value"),L}}function y(){var L=S();if(L.x||L.y)return{type:"position",value:L}}function S(){return{x:$(),y:$()}}function E(L){var N=L(),z=[];if(N)for(z.push(N);le(e.comma);)N=L(),N?z.push(N):n("One extra comma");return z}function T(){var L=D();return L||n("Expected color definition"),L.length=$(),L}function D(){return C()||U()||H()||F()}function F(){return Z("literal",e.literalColor,0)}function C(){return Z("hex",e.hexColor,1)}function H(){return a(e.rgbColor,function(){return{type:"rgb",value:E(J)}})}function U(){return a(e.rgbaColor,function(){return{type:"rgba",value:E(J)}})}function J(){return le(e.number)[1]}function $(){return Z("%",e.percentageValue,1)||V()||ne()}function V(){return Z("position-keyword",e.positionKeywords,1)}function ne(){return Z("px",e.pixelValue,1)||Z("em",e.emValue,1)}function Z(L,N,z){var M=le(N);if(M)return{type:L,value:M[z]}}function le(L){var N,z;return z=/^[\n\r\t\s]+/.exec(t),z&&ye(z[0].length),N=L.exec(t),N&&ye(N[0].length),N}function ye(L){t=t.substr(L)}return function(L){return t=L.toString(),r()}}();var wn=xn;function $l(e){return e.type==="literal"?e.value:e.type==="hex"?`#${e.value}`:e.type==="rgb"?`rgb(${e.value.join(",")})`:e.type==="rgba"?`rgba(${e.value.join(",")})`:"transparent"}function Wl(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),[t,n,r,i]}function ql(e,t){return typeof e=="string"&&e.endsWith("%")?t*parseFloat(e)/100:+e}function _n(e,{x:t,y:n,defaultX:r,defaultY:i}){return(e?e.split(" ").map(s=>{try{let o=new ze(s);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(s=>s!==null):[r,i]).map((s,o)=>ql(s,[t,n][o]))}function is(e,t){let n=[];for(let o of t){let a=$l(o);if(!n.length&&(n.push({offset:0,color:a}),typeof o.length>"u"||o.length.value==="0"))continue;let u=typeof o.length>"u"?void 0:o.length.type==="%"?o.length.value/100:o.length.value/e;n.push({offset:u,color:a})}n.length||n.push({offset:0,color:"transparent"});let r=n[n.length-1];r.offset!==1&&(typeof r.offset>"u"?r.offset=1:n.push({offset:1,color:r.color}));let i=0,s=1;for(let o=0;o<n.length;o++)if(typeof n[o].offset>"u"){for(s<o&&(s=o);typeof n[s].offset>"u";)s++;n[o].offset=(n[s].offset-n[i].offset)/(s-i)*(o-i)+n[i].offset}else i=o;return n}async function Sn({id:e,width:t,height:n,left:r,top:i},{image:s,size:o,position:a,repeat:u}){u=u||"repeat";let l=u==="repeat-x"||u==="repeat",f=u==="repeat-y"||u==="repeat",d=_n(o,{x:t,y:n,defaultX:t,defaultY:n}),g=_n(a,{x:t,y:n,defaultX:0,defaultY:0});if(s.startsWith("linear-gradient(")){let h=wn.parse(s)[0],[p,v]=d,_,b,y,S;if(h.orientation.type==="directional")[_,b,y,S]=Wl(h.orientation.value);else if(h.orientation.type==="angular"){let C=+h.orientation.value/180*Math.PI-Math.PI/2,H=Math.cos(C),U=Math.sin(C);_=0,b=0,y=H,S=U,y<0&&(_-=y,y=0),S<0&&(b-=S,S=0)}let E=is(t,h.colorStops),T=`satori_bi${e}`,D=`satori_pattern_${e}`,F=I("pattern",{id:D,x:g[0]/t,y:g[1]/n,width:l?p/t:"1",height:f?v/n:"1",patternUnits:"objectBoundingBox"},I("linearGradient",{id:T,x1:_,y1:b,x2:y,y2:S},E.map(C=>I("stop",{offset:C.offset*100+"%","stop-color":C.color})).join(""))+I("rect",{x:0,y:0,width:p,height:v,fill:`url(#${T})`}));return[D,F]}if(s.startsWith("radial-gradient(")){let h=wn.parse(s)[0],p=h.orientation[0],[v,_]=d,b="circle",y=v/2,S=_/2;if(p.type==="shape"){if(b=p.value,p.at)if(p.at.type==="position")y=p.at.value.x.value,S=p.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+p.at.type)}else throw new Error("orientation.type not implemented: "+p.type);let E=is(t,h.colorStops),T=`satori_radial_${e}`,D=`satori_pattern_${e}`,F=`satori_mask_${e}`,C={},H=Math.max(Math.abs(v-y),Math.abs(y)),U=Math.max(Math.abs(_-S),Math.abs(S));if(b==="circle")C.r=Math.sqrt(H*H+U*U);else if(b==="ellipse"){let V=U!==0?H/U:1;C.ry=Math.sqrt(H*H+U*U*V*V)/V,C.rx=C.ry*V}let J=I("pattern",{id:D,x:g[0]/t,y:g[1]/n,width:l?v/t:"1",height:f?_/n:"1",patternUnits:"objectBoundingBox"},I("radialGradient",{id:T},E.map(V=>I("stop",{offset:V.offset,"stop-color":V.color})).join(""))+I("mask",{id:F},I("rect",{x:0,y:0,width:v,height:_,fill:"#fff"}))+I(b,{cx:y,cy:S,width:v,height:_,...C,fill:`url(#${T})`,mask:`url(#${F})`}));return[D,J]}if(s.startsWith("url(")){let h=_n(o,{x:t,y:n,defaultX:0,defaultY:0}),[p,v,_]=await kr(s.slice(4,-1)),b=h[0]||v,y=h[1]||_;return[`satori_bi${e}`,I("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0]+r,y:g[1]+i,width:l?b:"100%",height:f?y:"100%"},I("image",{x:0,y:0,width:b,height:y,preserveAspectRatio:"none",href:p}))]}throw new Error(`Invalid background image: "${s}"`)}c();function Bl([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 Tr(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 Or(e){e[0]=e[1]=Math.min(e[0],e[1])}function Er(e,t,n,r,i){if(typeof e=="string"){let s=e.split(" ").map(a=>a.trim()),o=!s[1]&&!s[0].endsWith("%");return s[1]=s[1]||s[0],[o,[Math.min(_e(s[0],r,t,i,!0),t),Math.min(_e(s[1],r,n,i,!0),n)]]}return typeof e=="number"?[!0,[Math.min(e,t),Math.min(e,n)]]:[!0,void 0]}var Pr=e=>e&&e[0]!==0&&e[1]!==0;function ut({left:e,top:t,width:n,height:r},i,s){let{borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:u,borderBottomRightRadius:l,fontSize:f}=i,d,g,h,p;if([d,o]=Er(o,n,r,f,i),[g,a]=Er(a,n,r,f,i),[h,u]=Er(u,n,r,f,i),[p,l]=Er(l,n,r,f,i),!s&&!Pr(o)&&!Pr(a)&&!Pr(u)&&!Pr(l))return"";o||=[0,0],a||=[0,0],u||=[0,0],l||=[0,0],[o[0],a[0]]=Tr(o[0],a[0],n),[u[0],l[0]]=Tr(u[0],l[0],n),[o[1],u[1]]=Tr(o[1],u[1],r),[a[1],l[1]]=Tr(a[1],l[1],r),d&&Or(o),g&&Or(a),h&&Or(u),p&&Or(l);let v=[];v[0]=[a,a],v[1]=[l,[-l[0],l[1]]],v[2]=[u,[-u[0],-u[1]]],v[3]=[o,[o[0],-o[1]]];let _=`h${n-o[0]-a[0]} a${v[0][0]} 0 0 1 ${v[0][1]}`,b=`v${r-a[1]-l[1]} a${v[1][0]} 0 0 1 ${v[1][1]}`,y=`h${l[0]+u[0]-n} a${v[2][0]} 0 0 1 ${v[2][1]}`,S=`v${u[1]+o[1]-r} a${v[3][0]} 0 0 1 ${v[3][1]}`;if(s){let T=function($){let V=Bl([o,a,l,u][$]);return $===0?[[e+o[0]-V,t+o[1]-V],[e+o[0],t]]:$===1?[[e+n-a[0]+V,t+a[1]-V],[e+n,t+a[1]]]:$===2?[[e+n-l[0]+V,t+r-l[1]+V],[e+n-l[0],t+r]]:[[e+u[0]-V,t+r-u[1]+V],[e,t+r-u[1]]]},E=s.indexOf(!1);if(!s.includes(!0))throw new Error("Invalid `partialSides`.");if(E===-1)E=0;else for(;!s[E];)E=(E+1)%4;let D="",F=T(E),C=`M${F[0]} A${v[(E+3)%4][0]} 0 0 1 ${F[1]}`,H=0;for(;H<4&&s[(E+H)%4];H++)D+=C+" ",C=[_,b,y,S][(E+H)%4];let U=(E+H)%4;D+=C.split(" ")[0];let J=T(U);return D+=` A${v[(U+3)%4][0]} 0 0 1 ${J[0]}`,D}return`M${e+o[0]},${t} ${_} ${b} ${y} ${S}`}c();c();c();function os(e,t,n){return n[e+"Width"]===n[t+"Width"]&&n[e+"Style"]===n[t+"Style"]&&n[e+"Color"]===n[t+"Color"]}function ss({id:e,currentClipPathId:t,borderPath:n,borderType:r,left:i,top:s,width:o,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:s,width:o,height:a,d:n||void 0})),f]}function St({left:e,top:t,width:n,height:r,props:i,asContentMask:s,maskBorderOnly:o},a){let u=["borderTop","borderRight","borderBottom","borderLeft"];if(!s&&!u.some(h=>a[h+"Width"]))return"";let l="",f=0;for(;f>0&&os(u[f],u[(f+3)%4],a);)f=(f+3)%4;let d=[!1,!1,!1,!1],g=[];for(let h=0;h<4;h++){let p=(f+h)%4,v=(f+h+1)%4,_=u[p],b=u[v];if(d[p]=!0,g=[a[_+"Width"],a[_+"Style"],a[_+"Color"],_],!os(_,b,a)){let y=(g[0]||0)+(s&&!o&&a[_.replace("border","padding")]||0);y&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":y*2,"stroke-dasharray":!s&&g[1]==="dashed"?y*2+" "+y:void 0,d:ut({left:e,top:t,width:n,height:r},a,d)})),d=[!1,!1,!1,!1]}}if(d.some(Boolean)){let h=(g[0]||0)+(s&&!o&&a[g[3].replace("border","padding")]||0);h&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":h*2,"stroke-dasharray":!s&&g[1]==="dashed"?h*2+" "+h:void 0,d:ut({left:e,top:t,width:n,height:r},a,d)}))}return l}function kn({id:e,left:t,top:n,width:r,height:i,matrix:s,borderOnly:o},a){let u=(a.borderLeftWidth||0)+(o?0:a.paddingLeft||0),l=(a.borderTopWidth||0)+(o?0:a.paddingTop||0),f=(a.borderRightWidth||0)+(o?0:a.paddingRight||0),d=(a.borderBottomWidth||0)+(o?0:a.paddingBottom||0),g={x:t+u,y:n+l,width:r-u-f,height:i-l-d};return I("mask",{id:e},I("rect",{...g,fill:"#fff",mask:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0})+St({left:t,top:n,width:r,height:i,props:{transform:s||void 0},asContentMask:!0,maskBorderOnly:o},a))}function Tn({left:e,top:t,width:n,height:r,path:i,matrix:s,id:o,currentClipPath:a,src:u},l){if(l.overflow!=="hidden"&&!u)return"";let f=kn({id:`satori_om-${o}`,left:e,top:t,width:n,height:r,matrix:s,borderOnly:!u},l);return I("clipPath",{id:`satori_cp-${o}`,"clip-path":a},I(i?"path":"rect",{x:e,y:t,width:n,height:r,d:i||void 0}))+f}async function kt({id:e,left:t,top:n,width:r,height:i,isInheritingTransform:s,src:o,debug:a},u){if(u.display==="none")return"";let l=!!o,f="rect",d="",g="",h=[],p=1,v="";u.backgroundColor&&h.push(u.backgroundColor),u.opacity!==void 0&&(p=+u.opacity),u.transform&&(d=_t({left:t,top:n,width:r,height:i},u.transform,s,u.transformOrigin));let _="";if(u.backgroundImage){let J=[];for(let $=0;$<u.backgroundImage.length;$++){let V=u.backgroundImage[$],ne=await Sn({id:e+"_"+$,width:r,height:i,left:t,top:n},V);ne&&J.unshift(ne)}for(let $ of J)h.push(`url(#${$[0]})`),g+=$[1],$[2]&&(_+=$[2])}let b=ut({left:t,top:n,width:r,height:i},u);b&&(f="path");let y=u._inheritedClipPathId,S=u._inheritedMaskId;a&&(v=I("rect",{x:t,y:n,width:r,height:i,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:d||void 0,"clip-path":y?`url(#${y})`:void 0}));let{backgroundClip:E,filter:T}=u,D=E==="text"?`url(#satori_bct-${e})`:y?`url(#${y})`:void 0,F=Tn({left:t,top:n,width:r,height:i,path:b,id:e,matrix:d,currentClipPath:D,src:o},u),C=h.map(J=>I(f,{x:t,y:n,width:r,height:i,fill:J,d:b||void 0,transform:d||void 0,"clip-path":D,style:T?`filter:${T}`:void 0,mask:S?`url(#${S})`:void 0})).join(""),H=ss({id:e,left:t,top:n,width:r,height:i,currentClipPathId:y,borderPath:b,borderType:f},u);if(l){let J=(u.borderLeftWidth||0)+(u.paddingLeft||0),$=(u.borderTopWidth||0)+(u.paddingTop||0),V=(u.borderRightWidth||0)+(u.paddingRight||0),ne=(u.borderBottomWidth||0)+(u.paddingBottom||0),Z=u.objectFit==="contain"?"xMidYMid":u.objectFit==="cover"?"xMidYMid slice":"none";C+=I("image",{x:t+J,y:n+$,width:r-J-V,height:i-$-ne,href:o,preserveAspectRatio:Z,transform:d||void 0,style:T?`filter:${T}`:void 0,"clip-path":`url(#satori_cp-${e})`,mask:`url(#satori_om-${e})`})}if(H){g+=H[0];let J=H[1];C+=St({left:t,top:n,width:r,height:i,props:{transform:d||void 0,"clip-path":`url(#${J})`}},u)}let U=rs({width:r,height:i,id:e,opacity:p,shape:I(f,{x:t,y:n,width:r,height:i,fill:"#fff",stroke:"#fff","stroke-width":0,d:b||void 0,transform:d||void 0,"clip-path":D,mask:S?`url(#${S})`:void 0})},u);return(g?I("defs",{},g):"")+(U?U[0]:"")+F+(p!==1?`<g opacity="${p}">`:"")+(_||C)+(p!==1?"</g>":"")+(U?U[1]:"")+v}c();import Ul from"emoji-regex";var zl=new RegExp(Ul(),""),On={emoji:zl,symbol:/\p{Symbol}/u,math:/\p{Math}/u},Tt={"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},Ar=Object.keys({...Tt,...On});function as(e){return Ar.includes(e)}function us(e,t){if(t&&Tt[t]&&Tt[t].test(e))return t;for(let n of Object.keys(On))if(On[n].test(e))return n;for(let n of Object.keys(Tt))if(Tt[n].test(e))return n;return"unknown"}function ls(e){if(e)return Ar.find(t=>t.toLowerCase()===e.toLowerCase()||t.toLowerCase().startsWith(e.toLowerCase()))}async function*Ot(e,t){let n=await Fe(),{id:r,inheritedStyle:i,parent:s,font:o,debug:a,locale:u,embedFont:l=!0,graphemeImages:f,canLoadAdditionalAssets:d,getTwStyles:g}=t;if(e===null||typeof e>"u")return yield,yield,"";if(!fn(e)||typeof e.type=="function"){let M;if(!fn(e))M=yn(String(e),t),yield(await M.next()).value;else{if(Do(e.type))throw new Error("Class component is not supported.");M=Ot(e.type(e.props),t),yield(await M.next()).value}await M.next();let fe=yield;return(await M.next(fe)).value}let{type:h,props:p}=e;if(p&&Fo(p))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:v,children:_,tw:b,lang:y=u}=p||{},S=ls(y);if(b){let M=g(b,v);v=Object.assign(M,v)}let E=n.Node.create();s.insertChild(E,s.getChildCount());let[T,D]=await gn(E,h,i,v,p),F=T.transform===i.transform;if(F||(T.transform.__parent=i.transform),T.overflow==="hidden"&&(D._inheritedClipPathId=`satori_cp-${r}`,D._inheritedMaskId=`satori_om-${r}`),T.backgroundClip==="text"){let M={value:""};D._inheritedBackgroundClipTextPath=M,T._inheritedBackgroundClipTextPath=M}let C=No(_),H=[],U=0,J=[];for(let M of C){let fe=Ot(M,{id:r+"-"+U++,parentStyle:T,inheritedStyle:D,isInheritingTransform:!0,parent:E,font:o,embedFont:l,debug:a,graphemeImages:f,canLoadAdditionalAssets:d,locale:S,getTwStyles:g});d?J.push(...(await fe.next()).value||[]):await fe.next(),H.push(fe)}yield J;for(let M of H)await M.next();let[$,V]=yield,{left:ne,top:Z,width:le,height:ye}=E.getComputedLayout();ne+=$,Z+=V;let L="",N="",z="";if(h==="img"){let M=T.__src;N=await kt({id:r,left:ne,top:Z,width:le,height:ye,src:M,isInheritingTransform:F,debug:a},T)}else if(h==="svg"){let M=T.color,fe=qo(e,M);N=await kt({id:r,left:ne,top:Z,width:le,height:ye,src:fe,isInheritingTransform:F,debug:a},T)}else{let M=v==null?void 0:v.display;if(h==="div"&&_&&typeof _!="string"&&M!=="flex"&&M!=="none")throw new Error('Expected <div> to have explicit "display: flex" or "display: none" if it has more than one child node.');N=await kt({id:r,left:ne,top:Z,width:le,height:ye,isInheritingTransform:F,debug:a},T)}for(let M of H)L+=(await M.next([ne,Z])).value;return T._inheritedBackgroundClipTextPath&&(z+=I("clipPath",{id:`satori_bct-${r}`,"clip-path":T._inheritedClipPathId?`url(#${T._inheritedClipPathId})`:void 0},T._inheritedBackgroundClipTextPath.value)),z+N+L}c();import En from"@shuding/opentype.js";var fs="unknown";function Gl(e,t,[n,r],[i,s]){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!==s){if(r===t)return-1;if(s===t)return 1}return-1}var Et=class{constructor(t){this.fonts=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)],s=i[0];for(let o=1;o<i.length;o++){let[,a,u]=s,[,l,f]=i[o];Gl(n,r,[a,u],[l,f])>0&&(s=i[o])}return s[0]}addFonts(t){for(let n of t){let{name:r,data:i,lang:s}=n;if(s&&!as(s))throw new Error(`Invalid value for props \`lang\`: "${s}". The value must be one of the following: ${Ar.join(", ")}.`);let o=s??fs,a=En.parse("buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i,{lowMemory:!0}),u=a.charToGlyphIndex;a.charToGlyphIndex=f=>{let d=u.call(a,f);return d===0&&a._trackBrokenChars&&a._trackBrokenChars.push(f),d},this.defaultFont||(this.defaultFont=a);let l=`${r.toLowerCase()}_${o}`;this.fonts.has(l)||this.fonts.set(l,[]),this.fonts.get(l).push([a,n.weight,n.style])}}getEngine(t=16,n=1.2,{fontFamily:r,fontWeight:i=400,fontStyle:s="normal"},o){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(y=>y.toLowerCase());let a=[];r.forEach(y=>{let S=this.get({name:y,weight:i,style:s});if(S){a.push(S);return}let E=this.get({name:y+"_unknown",weight:i,style:s});if(E){a.push(E);return}});let u=Array.from(this.fonts.keys()),l=[],f=[],d=[];for(let y of u)if(!r.includes(y))if(o){let S=jl(y);S?S===o?l.push(this.get({name:y,weight:i,style:s})):f.push(this.get({name:y,weight:i,style:s})):d.push(this.get({name:y,weight:i,style:s}))}else d.push(this.get({name:y,weight:i,style:s}));let g=new Map,h=(y,S=!0)=>{let E=y.charCodeAt(0);if(g.has(E))return g.get(E);let T=[...a,...d,...l,...S?f:[]],D=T.find((F,C)=>!!F.charToGlyphIndex(y)||S&&C===T.length-1);return D&&g.set(E,D),D},p=(y,S=!1)=>{var T,D;return((S?(D=(T=y.tables)==null?void 0:T.os2)==null?void 0:D.sTypoAscender:0)||y.ascender)/y.unitsPerEm*t},v=(y,S=!1)=>{var T,D;return((S?(D=(T=y.tables)==null?void 0:T.os2)==null?void 0:D.sTypoDescender:0)||y.descender)/y.unitsPerEm*t},_=y=>h(y,!1),b={has:y=>{if(y===`
5
+ in CSS rule \`${o}: ${a}\`.${Go(o)}`))}}}if(n.backgroundImage){let{backgrounds:i}=wl(n);n.backgroundImage=i}let r=typeof n.fontSize=="number"?n.fontSize:t.fontSize;if(typeof r=="string")try{let i=new ze(r);switch(i.unit){case"em":r=i.value*t.fontSize;break;case"rem":r=i.value*16;break}}catch{r=16}typeof n.fontSize<"u"&&(n.fontSize=r),n.transformOrigin&&(n.transformOrigin=pn(n.transformOrigin,r));for(let i in n){let s=n[i];if(i==="lineHeight")typeof s=="string"&&(s=n[i]=_e(s,r,r,t,!0)/r);else{if(typeof s=="string"){let o=_e(s,r,r,t);typeof o<"u"&&(n[i]=o),s=n[i]}if(typeof s=="string"||typeof s=="object"){let o=Ho(s);o&&(n[i]=o),s=n[i]}}if(i==="opacity"&&(s=n[i]=s*t.opacity),i==="transform"){let o=s;for(let a of o){let u=Object.keys(a)[0],l=a[u],f=typeof l=="string"?_e(l,r,r,t)??l:l;a[u]=f}}}return n}function El(e,t){return e&&e.toLowerCase()!=="currentcolor"?e:t}function Pl(e,t){return e.replace(/currentcolor/gi,t)}function Al(e,t){return Bo(e)&&(e=Pl(e,t)),e}c();var Il="image/avif",Rl="image/webp",wr="image/png",_r="image/jpeg",Sr="image/gif",mn="image/svg+xml";function Qo(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 s=t.getUint8(i+1+n);if(s===192||s===193||s===194)return[t.getUint16(i+7+n,!1),t.getUint16(i+5+n,!1)];n+=i+2}throw new TypeError("Invalid JPEG")}function Ko(e){let t=new Uint8Array(e.slice(6,10));return[t[0]|t[1]<<8,t[2]|t[3]<<8]}function Jo(e){let t=new DataView(e);return[t.getUint16(18,!1),t.getUint16(22,!1)]}var Vo=$o(100),hn=new Map,Ll=[wr,_r,Sr,mn];function Cl(e){let t="",n=new Uint8Array(e);for(let r=0;r<n.byteLength;r++)t+=String.fromCharCode(n[r]);return btoa(t)}function Dl(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 Yo(e,t){let n=t.match(/<svg[^>]*>/)[0],r=n.match(/viewBox=['"](.+)['"]/),i=r?xt(r[1]):null,s=n.match(/width=['"](\d*\.\d+|\d+)['"]/),o=n.match(/height=['"](\d*\.\d+|\d+)['"]/);if(!i&&(!s||!o))throw new Error(`Failed to parse SVG from ${e}: missing "viewBox"`);let a=i?[i[2],i[3]]:[+s[1],+o[1]],u=a[0]/a[1];return s&&o?[+s[1],+o[1]]:s?[+s[1],+s[1]/u]:o?[+o[1]*u,+o[1]]:[a[0],a[1]]}function Xo(e){let t,n=Fl(new Uint8Array(e));switch(n){case wr:t=Jo(e);break;case Sr:t=Ko(e);break;case _r:t=Qo(e);break}if(!Ll.includes(n))throw new Error(`Unsupported image type: ${n||"unknown"}`);return[`data:${n};base64,${Cl(e)}`,t]}async function kr(e){if(!e)throw new Error("Image source is not provided.");if(typeof e=="object"){let[i,s]=Xo(e);return[i,...s]}if((e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'"))&&(e=e.slice(1,-1)),e.startsWith("data:")){let i;try{i=/data:(?<imageType>[a-z/+]+)(;(?<encodingType>base64|utf8))?,(?<dataString>.*)/g.exec(e).groups}catch{return console.warn("Image data URI resolved without size:"+e),[e]}let{imageType:s,encodingType:o,dataString:a}=i;if(s===mn){let u=o==="base64"?atob(a):decodeURIComponent(a.replace(/ /g,"%20")),l=o==="base64"?e:`data:image/svg+xml;base64,${btoa(u)}`,f=Yo(e,u);return[l,...f]}else if(o==="base64"){let u,l=Dl(a);switch(s){case wr:u=Jo(l);break;case Sr:u=Ko(l);break;case _r:u=Qo(l);break}return[e,...u]}else return console.warn("Image data URI resolved without size:"+e),[e]}if(!globalThis.fetch)throw new Error("`fetch` is required to be polyfilled to load images.");if(hn.has(e))return hn.get(e);let t=Vo.get(e);if(t)return t;let n=e,r=fetch(n).then(i=>{let s=i.headers.get("content-type");return s==="image/svg+xml"||s==="application/svg+xml"?i.text():i.arrayBuffer()}).then(i=>{if(typeof i=="string")try{let a=`data:image/svg+xml;base64,${btoa(i)}`,u=Yo(n,i);return[a,...u]}catch(a){throw new Error(`Failed to parse SVG image: ${a.message}`)}let[s,o]=Xo(i);return[s,...o]}).then(i=>(Vo.set(n,i),i)).catch(i=>(console.error(`Can't load image ${n}: `+i.message),[]));return hn.set(n,r),r}function Fl(e){return[255,216,255].every((t,n)=>e[n]===t)?_r:[137,80,78,71,13,10,26,10].every((t,n)=>e[n]===t)?wr:[71,73,70,56].every((t,n)=>e[n]===t)?Sr:[82,73,70,70,0,0,0,0,87,69,66,80].every((t,n)=>!t||e[n]===t)?Rl:[60,63,120,109,108].every((t,n)=>e[n]===t)?mn:[0,0,0,0,102,116,121,112,97,118,105,102].every((t,n)=>!t||e[n]===t)?Il:null}async function gn(e,t,n,r,i){let s=await Fe(),o={...n,...xr(zo[t],n),...xr(r,n)};if(t==="img"){let[a,u,l]=await kr(i.src);if(u===void 0&&l===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.");u=parseInt(i.width),l=parseInt(i.height)}let f=l/u,d=(o.borderLeftWidth||0)+(o.borderRightWidth||0)+(o.paddingLeft||0)+(o.paddingRight||0),g=(o.borderTopWidth||0)+(o.borderBottomWidth||0)+(o.paddingTop||0)+(o.paddingBottom||0),h=o.width||i.width,p=o.height||i.height,v=typeof h!="string"&&typeof p!="string";typeof h=="number"&&v&&(h-=d),typeof p=="number"&&v&&(p-=g),h===void 0&&p===void 0?(h=u,p=l):h===void 0?typeof p=="number"?h=p/f:e.setAspectRatio(1/f):p===void 0&&(typeof h=="number"?p=h*f:e.setAspectRatio(1/f)),o.width=v?h+d:h,o.height=v?p+g:p,o.__src=a}if(t==="svg"){let a=i.viewBox||i.viewbox,u=xt(a),l=u?u[3]/u[2]:null,{width:f,height:d}=i;typeof f>"u"&&d?l==null?f=0:typeof d=="string"&&d.endsWith("%")?f=parseInt(d)/l+"%":(d=_e(d,n.fontSize,1,n),f=d/l):typeof d>"u"&&f?l==null?f=0:typeof f=="string"&&f.endsWith("%")?d=parseInt(f)*l+"%":(f=_e(f,n.fontSize,1,n),d=f*l):(typeof f<"u"&&(f=_e(f,n.fontSize,1,n)||f),typeof d<"u"&&(d=_e(d,n.fontSize,1,n)||d),f||=u==null?void 0:u[2],d||=u==null?void 0:u[3]),!o.width&&f&&(o.width=f),!o.height&&d&&(o.height=d)}return e.setDisplay(he(o.display,{flex:s.DISPLAY_FLEX,none:s.DISPLAY_NONE},s.DISPLAY_FLEX,"display")),e.setAlignContent(he(o.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(he(o.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(he(o.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(he(o.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(he(o.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(he(o.flexWrap,{wrap:s.WRAP_WRAP,nowrap:s.WRAP_NO_WRAP,"wrap-reverse":s.WRAP_WRAP_REVERSE},s.WRAP_NO_WRAP,"flexWrap")),typeof o.gap<"u"&&e.setGap(s.GUTTER_ALL,o.gap),typeof o.rowGap<"u"&&e.setGap(s.GUTTER_ROW,o.rowGap),typeof o.columnGap<"u"&&e.setGap(s.GUTTER_COLUMN,o.columnGap),typeof o.flexBasis<"u"&&e.setFlexBasis(o.flexBasis),e.setFlexGrow(typeof o.flexGrow>"u"?0:o.flexGrow),e.setFlexShrink(typeof o.flexShrink>"u"?0:o.flexShrink),typeof o.maxHeight<"u"&&e.setMaxHeight(o.maxHeight),typeof o.maxWidth<"u"&&e.setMaxWidth(o.maxWidth),typeof o.minHeight<"u"&&e.setMinHeight(o.minHeight),typeof o.minWidth<"u"&&e.setMinWidth(o.minWidth),e.setOverflow(he(o.overflow,{visible:s.OVERFLOW_VISIBLE,hidden:s.OVERFLOW_HIDDEN},s.OVERFLOW_VISIBLE,"overflow")),e.setMargin(s.EDGE_TOP,o.marginTop||0),e.setMargin(s.EDGE_BOTTOM,o.marginBottom||0),e.setMargin(s.EDGE_LEFT,o.marginLeft||0),e.setMargin(s.EDGE_RIGHT,o.marginRight||0),e.setBorder(s.EDGE_TOP,o.borderTopWidth||0),e.setBorder(s.EDGE_BOTTOM,o.borderBottomWidth||0),e.setBorder(s.EDGE_LEFT,o.borderLeftWidth||0),e.setBorder(s.EDGE_RIGHT,o.borderRightWidth||0),e.setPadding(s.EDGE_TOP,o.paddingTop||0),e.setPadding(s.EDGE_BOTTOM,o.paddingBottom||0),e.setPadding(s.EDGE_LEFT,o.paddingLeft||0),e.setPadding(s.EDGE_RIGHT,o.paddingRight||0),e.setPositionType(he(o.position,{absolute:s.POSITION_TYPE_ABSOLUTE,relative:s.POSITION_TYPE_RELATIVE},s.POSITION_TYPE_RELATIVE,"position")),typeof o.top<"u"&&e.setPosition(s.EDGE_TOP,o.top),typeof o.bottom<"u"&&e.setPosition(s.EDGE_BOTTOM,o.bottom),typeof o.left<"u"&&e.setPosition(s.EDGE_LEFT,o.left),typeof o.right<"u"&&e.setPosition(s.EDGE_RIGHT,o.right),typeof o.height<"u"?e.setHeight(o.height):e.setHeightAuto(),typeof o.width<"u"?e.setWidth(o.width):e.setWidthAuto(),[o,cn(o)]}c();c();c();var Zo=[1,0,0,1,0,0];function Nl(e,t,n){let r=[...Zo];for(let i of e){let s=Object.keys(i)[0],o=i[s];if(typeof o=="string")if(s==="translateX")o=parseFloat(o)/100*t,i[s]=o;else if(s==="translateY")o=parseFloat(o)/100*n,i[s]=o;else throw new Error(`Invalid transform: "${s}: ${o}".`);let a=o,u=[...Zo];switch(s){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),d=Math.sin(l);u[0]=f,u[1]=d,u[2]=-d,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=yt(u,r)}e.splice(0,e.length),e.push(...r),e.__resolved=!0}function _t({left:e,top:t,width:n,height:r},i,s,o){let a;i.__resolved||Nl(i,n,r);let u=i;if(s)a=u;else{let l=(o==null?void 0:o.xAbsolute)??((o==null?void 0:o.xRelative)??50)*n/100,f=(o==null?void 0:o.yAbsolute)??((o==null?void 0:o.yRelative)??50)*r/100,d=e+l,g=t+f;a=yt([1,0,0,1,d,g],yt(u,[1,0,0,1,-d,-g])),u.__parent&&(a=yt(u.__parent,a)),u.splice(0,6,...a)}return`matrix(${a.map(l=>l.toFixed(2)).join(",")})`}function es({left:e,top:t,width:n,height:r,isInheritingTransform:i},s){let o="",a=1;return s.transform&&(o=_t({left:e,top:t,width:n,height:r},s.transform,i,s.transformOrigin)),s.opacity!==void 0&&(a=+s.opacity),{matrix:o,opacity:a}}function vn({id:e,content:t,filter:n,left:r,top:i,width:s,height:o,matrix:a,opacity:u,image:l,clipPathId:f,debug:d,shape:g,decorationShape:h},p){let v="";if(d&&(v=I("rect",{x:r,y:i-o,width:s,height:o,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0})),l){let b={href:l,x:r,y:i,width:s,height:o,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+I("image",{...b,opacity:u!==1?u:void 0})+(h||"")+(n?"</g>":"")+v,""]}let _={x:r,y:i,width:s,height:o,"font-weight":p.fontWeight,"font-style":p.fontStyle,"font-size":p.fontSize,"font-family":p.fontFamily,"letter-spacing":p.letterSpacing||void 0,transform:a||void 0,"clip-path":f?`url(#${f})`:void 0,style:p.filter?`filter:${p.filter}`:void 0};return[(n?`${n}<g filter="url(#satori_s-${e})">`:"")+I("text",{..._,fill:p.color,opacity:u!==1?u:void 0},t)+(h||"")+(n?"</g>":"")+v,g?I("text",_,t):""]}c();function Ml(e,t,n){return e.replace(/([MA])([0-9.-]+),([0-9.-]+)/g,function(r,i,s,o){return i+(parseFloat(s)+t)+","+(parseFloat(o)+n)})}function ts({id:e,width:t,height:n},r){if(!r.shadowColor||!r.shadowOffset||typeof r.shadowRadius>"u")return"";let i=r.shadowRadius*r.shadowRadius/4,s=Math.min(r.shadowOffset.width-i,0),o=Math.max(r.shadowOffset.width+i+t,t),a=Math.min(r.shadowOffset.height-i,0),u=Math.max(r.shadowOffset.height+i+n,n);return`<defs><filter id="satori_s-${e}" x="${s/t*100}%" y="${a/n*100}%" width="${(o-s)/t*100}%" height="${(u-a)/n*100}%"><feDropShadow dx="${r.shadowOffset.width}" dy="${r.shadowOffset.height}" stdDeviation="${r.shadowRadius/2}" flood-color="${r.shadowColor}" flood-opacity="1"/></filter></defs>`}function rs({width:e,height:t,shape:n,opacity:r,id:i},s){if(!s.boxShadow)return null;let o="",a="";for(let u=s.boxShadow.length-1;u>=0;u--){let l="",f=s.boxShadow[u];f.spreadRadius&&f.inset&&(f.spreadRadius=-f.spreadRadius);let d=f.blurRadius*f.blurRadius/4+(f.spreadRadius||0),g=Math.min(-d-(f.inset?f.offsetX:0),0),h=Math.max(d+e-(f.inset?f.offsetX:0),e),p=Math.min(-d-(f.inset?f.offsetY:0),0),v=Math.max(d+t-(f.inset?f.offsetY:0),t),_=`satori_s-${i}-${u}`,b=`satori_ms-${i}-${u}`,y=f.spreadRadius?n.replace('stroke-width="0"',`stroke-width="${f.spreadRadius*2}"`):n;l+=I("mask",{id:b,maskUnits:"userSpaceOnUse"},I("rect",{x:0,y:0,width:s._viewportWidth,height:s._viewportHeight,fill:f.inset?"#000":"#fff"})+y.replace('fill="#fff"',f.inset?'fill="#fff"':'fill="#000"').replace('stroke="#fff"',""));let S=y.replace(/d="([^"]+)"/,(E,T)=>'d="'+Ml(T,f.offsetX,f.offsetY)+'"').replace(/x="([^"]+)"/,(E,T)=>'x="'+(parseFloat(T)+f.offsetX)+'"').replace(/y="([^"]+)"/,(E,T)=>'y="'+(parseFloat(T)+f.offsetY)+'"');f.spreadRadius&&f.spreadRadius<0&&(l+=I("mask",{id:b+"-neg",maskUnits:"userSpaceOnUse"},S.replace('stroke="#fff"','stroke="#000"').replace(/stroke-width="[^"]+"/,`stroke-width="${-f.spreadRadius*2}"`))),f.spreadRadius&&f.spreadRadius<0&&(S=I("g",{mask:`url(#${b}-neg)`},S)),l+=I("defs",{},I("filter",{id:_,x:`${g/e*100}%`,y:`${p/t*100}%`,width:`${(h-g)/e*100}%`,height:`${(v-p)/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(#${b})`,filter:`url(#${_})`,opacity:r},S),f.inset?a+=l:o+=l}return[o,a]}c();function bn({width:e,left:t,top:n,ascender:r,clipPathId:i},s){let{textDecorationColor:o,textDecorationStyle:a,textDecorationLine:u,fontSize:l}=s;if(!u||u==="none")return"";let f=Math.max(1,l*.1),d=u==="line-through"?n+r*.5:u==="underline"?n+r*1.1:n,g=a==="dashed"?`${f*1.2} ${f*2}`:a==="dotted"?`0 ${f*2}`:void 0;return I("line",{x1:t,y1:d,x2:t+e,y2:d,stroke:o,"stroke-width":f,"stroke-dasharray":g,"stroke-linecap":a==="dotted"?"round":"square","clip-path":i?`url(#${i})`:void 0})}async function*yn(e,t){var To;let n=await Fe(),{parentStyle:r,inheritedStyle:i,parent:s,font:o,id:a,isInheritingTransform:u,debug:l,embedFont:f,graphemeImages:d,locale:g,canLoadAdditionalAssets:h}=t,{textAlign:p,textOverflow:v,whiteSpace:_,wordBreak:b,lineHeight:y,filter:S,_inheritedBackgroundClipTextPath:E}=r;r.textTransform==="uppercase"?e=e.toLocaleUpperCase(g):r.textTransform==="lowercase"?e=e.toLocaleLowerCase(g):r.textTransform==="capitalize"&&(e=pe(e,"word",g).map(W=>pe(W,"grapheme",g).map((B,q)=>q===0?B.toLocaleUpperCase(g):B).join("")).join(""));let T=["pre","pre-wrap","pre-line"].includes(_),D=!["pre","pre-wrap"].includes(_);T||(e=e.replace(/\n/g," ")),D&&(e=e.replace(/[ ]+/g," "),e=e.trim());let F=b==="break-word",{words:C,requiredBreaks:H}=Uo(e,b),U=n.Node.create();U.setAlignItems(n.ALIGN_BASELINE),U.setJustifyContent(he(r.textAlign,{left:n.JUSTIFY_FLEX_START,right:n.JUSTIFY_FLEX_END,center:n.JUSTIFY_CENTER,justify:n.JUSTIFY_SPACE_BETWEEN,start:n.JUSTIFY_FLEX_START,end:n.JUSTIFY_FLEX_END},n.JUSTIFY_FLEX_START,"textAlign")),s.insertChild(U,s.getChildCount());let J=r.fontSize,$=o.getEngine(J,y,r,g),V=h?pe(e,"grapheme").filter(W=>!$.has(W)):[];yield V.map(W=>({word:W,locale:g})),V.length&&($=o.getEngine(J,y,r,g));let ne=new Map;function Z(W){if(ne.has(W))return ne.get(W);let B=$.measure(W,r);return ne.set(W,B),B}function le(W){return!!(d&&d[W])}function ye(W){let B=0;for(let q of W)le(q)?B+=r.fontSize:B+=Z(q);return{width:B}}let L=W=>{if(W.length===0)return{originWidth:0,endingSpacesWidth:0};let{width:B}=ye(pe(W,"grapheme")),q=W.trimEnd()===W?B:ye(pe(W.trimEnd(),"grapheme")).width;return{originWidth:B,endingSpacesWidth:B-q}};typeof r.flexShrink>"u"&&s.setFlexShrink(1);let N=[],z=[],M=[],fe=[],xe=[];function Qr(W){let B=0,q=0,be=0,ce=-1,de=0,re=0,oe=0;N=[],M=[0],fe=[],xe=[];let De=0;for(;De<C.length;){let X=C[De],Ye=T&&H[De],we=0,Be=0,{originWidth:gt,endingSpacesWidth:Xe}=L(X);we=gt,Be=Xe,Ye&&re===0&&(re=$.height(X));let se=",.!?:-@)>]}%#".indexOf(X[0])<0,ue=!q,Ue=De&&se&&q+we>W+Be&&_!=="nowrap"&&_!=="pre";if(F&&we>W&&(!q||Ue||Ye)){let Qe=pe(X,"grapheme");C.splice(De,1,...Qe),q>0&&(N.push(q),z.push(oe),B++,de+=re,q=0,re=0,oe=0,M.push(1),ce=-1);continue}if(Ye||Ue)D&&X===" "&&(we=0),N.push(q),z.push(oe),B++,de+=re,q=we,re=we?$.height(X):0,oe=we?$.baseline(X):0,M.push(1),ce=-1,Ye||(be=Math.max(be,W));else{q+=we;let Qe=$.height(X);Qe>re&&(re=Qe,oe=$.baseline(X)),ue&&M[M.length-1]++}ue&&ce++,be=Math.max(be,q);let st=q-we;if(we===0)xe.push({y:de,x:st,width:0,line:B,lineIndex:ce,isImage:!1});else{let Qe=pe(X,"word");for(let tn=0;tn<Qe.length;tn++){let rn=Qe[tn],mr=0,Oo=!1;le(rn)?(mr=r.fontSize,Oo=!0):mr=Z(rn),fe.push(rn),xe.push({y:de,x:st,width:mr,line:B,lineIndex:ce,isImage:Oo}),st+=mr}}De++}return q&&(B++,N.push(q),z.push(oe),de+=re),{width:be,height:de}}U.setMeasureFunc(W=>{let{width:B,height:q}=Qr(W);if(r.textWrap==="balance"){let be=B/2,ce=B,de=B;for(;be+1<ce;){de=(be+ce)/2;let{height:re}=Qr(de);re>q?be=de:ce=de}return Qr(ce),{width:ce,height:q}}return{width:B,height:q}});let[Vu,Yu]=yield,Kr="",lr="",We=i._inheritedClipPathId,bo=i._inheritedMaskId,{left:yo,top:xo,width:fr,height:wo}=U.getComputedLayout(),Jr=s.getComputedWidth()-s.getComputedPadding(n.EDGE_LEFT)-s.getComputedPadding(n.EDGE_RIGHT)-s.getComputedBorder(n.EDGE_LEFT)-s.getComputedBorder(n.EDGE_RIGHT),it=Vu+yo,ot=Yu+xo,{matrix:Ce,opacity:cr}=es({left:yo,top:xo,width:fr,height:wo,isInheritingTransform:u},r),dr="";r.textShadowOffset&&(dr=ts({width:fr,height:wo,id:a},{shadowColor:r.textShadowColor,shadowOffset:r.textShadowOffset,shadowRadius:r.textShadowRadius}));let mt="",pr="",_o="",Zr=-1,So=v==="ellipsis"?ye(["\u2026"]).width:0,Xu=v==="ellipsis"?ye([" "]).width:0,hr={},qe=null,ko=0;for(let W=0;W<fe.length;W++){let B=xe[W];if(!B)continue;let q=fe[W],be=null,ce=!1,de=d?d[q]:null,re=B.y,oe=B.x,De=B.width,X=B.line;if(X===Zr)continue;let Ye=!1;if(N.length>1){let se=fr-N[X];if(p==="right"||p==="end")oe+=se;else if(p==="center")oe+=se/2;else if(p==="justify"&&X<N.length-1){let ue=M[X];oe+=(ue>1?se/(ue-1):0)*B.lineIndex,Ye=!0}}if(hr[X]||(hr[X]=[oe,Ye?fr:N[X]]),v==="ellipsis"&&N[X]>Jr&&B.x+De+So+Xu>Jr){let se=pe(q,"grapheme",g),ue="",Ue=0;for(let en of se){let st=B.x+ye([ue+en]).width;if(ue&&st+So>Jr)break;ue+=en,Ue=st}q=ue+"\u2026",Zr=X,hr[X][1]=Ue,ce=!0}let we=z[X],Be=$.baseline(q),gt=$.height(q),Xe=we-Be;if(de)re+=0;else if(f){if(!Mo.includes(q)&&fe[W+1]&&xe[W+1]&&!xe[W+1].isImage&&re===xe[W+1].y&&!ce){qe===null&&(ko=oe),qe=qe===null?q:qe+q;continue}let se=qe===null?q:qe+q,ue=qe===null?oe:ko,Ue=B.width+oe-ue;be=$.getSVG(se,{...r,left:it+ue,top:ot+re+Be+Xe,letterSpacing:r.letterSpacing}),qe=null,l&&(_o+=I("rect",{x:it+ue,y:ot+re+Xe,width:Ue,height:gt,fill:"transparent",stroke:"#575eff","stroke-width":1,transform:Ce||void 0,"clip-path":We?`url(#${We})`:void 0})+I("line",{x1:it+oe,x2:it+oe+B.width,y1:ot+re+Xe+Be,y2:ot+re+Xe+Be,stroke:"#14c000","stroke-width":1,transform:Ce||void 0,"clip-path":We?`url(#${We})`:void 0}))}else re+=Be+Xe;if(r.textDecorationLine&&(X!==((To=xe[W+1])==null?void 0:To.line)||Zr===X)){let se=hr[X];se&&!se[2]&&(mt+=bn({left:it+se[0],top:ot+gt*+X,width:se[1],ascender:$.baseline(q),clipPathId:We},r),se[2]=1)}if(be!==null)pr+=be+" ";else{let[se,ue]=vn({content:q,filter:dr,id:a,left:it+oe,top:ot+re,width:De,height:gt,matrix:Ce,opacity:cr,image:de,clipPathId:We,debug:l,shape:!!E,decorationShape:mt},r);Kr+=se,lr+=ue,mt=""}}if(pr){let W=r.color!=="transparent"&&cr!==0?I("path",{fill:r.color,d:pr,transform:Ce||void 0,opacity:cr!==1?cr:void 0,"clip-path":We?`url(#${We})`:void 0,mask:bo?`url(#${bo})`:void 0,style:S?`filter:${S}`:void 0}):"";E&&(lr=I("path",{d:pr,transform:Ce||void 0})),Kr+=(dr?dr+I("g",{filter:`url(#satori_s-${a})`},W+mt):W+mt)+_o}return lr&&(r._inheritedBackgroundClipTextPath.value+=lr),Kr}c();c();c();var xn=xn||{},ns={type:"directional",value:"bottom"};xn.parse=function(){var e={linearGradient:/^(\-(webkit|o|ms|moz)\-)?(linear\-gradient)/i,repeatingLinearGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-linear\-gradient)/i,radialGradient:/^(\-(webkit|o|ms|moz)\-)?(radial\-gradient)/i,repeatingRadialGradient:/^(\-(webkit|o|ms|moz)\-)?(repeating\-radial\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,zeroValue:/[0]/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function n(L){var N=new Error(t+": "+L);throw N.source=t,N}function r(){var L=i();return t.length>0&&n("Invalid input not EOF"),L}function i(){return E(s)}function s(){return o("linear-gradient",e.linearGradient,u,ns)||o("repeating-linear-gradient",e.repeatingLinearGradient,u,ns)||o("radial-gradient",e.radialGradient,g)||o("repeating-radial-gradient",e.repeatingRadialGradient,g)}function o(L,N,z,M){return a(N,function(fe){var xe=z();return xe?le(e.comma)||n("Missing comma before color stops"):xe=M,{type:L,orientation:xe,colorStops:E(T)}})}function a(L,N){var z=le(L);if(z){le(e.startCall)||n("Missing (");var M=N(z);return le(e.endCall)||n("Missing )"),M}}function u(){return l()||f()||d()}function l(){return Z("directional",e.sideOrCorner,1)}function f(){return Z("angular",e.angleValue,1)}function d(){return Z("directional",e.zeroValue,0)}function g(){var L,N=h(),z;return N&&(L=[],L.push(N),z=t,le(e.comma)&&(N=h(),N?L.push(N):t=z)),L}function h(){var L=p()||v();if(L)L.at=b();else{var N=_();if(N){L=N;var z=b();z&&(L.at=z)}else{var z=b();if(z)L={type:"shape",value:"ellipse",at:z};else{var M=y();M&&(L={type:"default-radial",at:M})}}}return L}function p(){var L=Z("shape",/^(circle)/i,0);return L&&(L.style=ne()||_()),L}function v(){var L=Z("shape",/^(ellipse)/i,0);return L&&(L.style=$()||_()),L}function _(){return Z("extent-keyword",e.extentKeywords,1)}function b(){if(Z("position",/^at/,0)){var L=y();return L||n("Missing positioning value"),L}}function y(){var L=S();if(L.x||L.y)return{type:"position",value:L}}function S(){return{x:$(),y:$()}}function E(L){var N=L(),z=[];if(N)for(z.push(N);le(e.comma);)N=L(),N?z.push(N):n("One extra comma");return z}function T(){var L=D();return L||n("Expected color definition"),L.length=$(),L}function D(){return C()||U()||H()||F()}function F(){return Z("literal",e.literalColor,0)}function C(){return Z("hex",e.hexColor,1)}function H(){return a(e.rgbColor,function(){return{type:"rgb",value:E(J)}})}function U(){return a(e.rgbaColor,function(){return{type:"rgba",value:E(J)}})}function J(){return le(e.number)[1]}function $(){return Z("%",e.percentageValue,1)||V()||ne()}function V(){return Z("position-keyword",e.positionKeywords,1)}function ne(){return Z("px",e.pixelValue,1)||Z("em",e.emValue,1)}function Z(L,N,z){var M=le(N);if(M)return{type:L,value:M[z]}}function le(L){var N,z;return z=/^[\n\r\t\s]+/.exec(t),z&&ye(z[0].length),N=L.exec(t),N&&ye(N[0].length),N}function ye(L){t=t.substr(L)}return function(L){return t=L.toString(),r()}}();var wn=xn;function $l(e){return e.type==="literal"?e.value:e.type==="hex"?`#${e.value}`:e.type==="rgb"?`rgb(${e.value.join(",")})`:e.type==="rgba"?`rgba(${e.value.join(",")})`:"transparent"}function Wl(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),[t,n,r,i]}function ql(e,t){return typeof e=="string"&&e.endsWith("%")?t*parseFloat(e)/100:+e}function _n(e,{x:t,y:n,defaultX:r,defaultY:i}){return(e?e.split(" ").map(s=>{try{let o=new ze(s);return o.type==="length"||o.type==="number"?o.value:o.value+o.unit}catch{return null}}).filter(s=>s!==null):[r,i]).map((s,o)=>ql(s,[t,n][o]))}function is(e,t){let n=[];for(let o of t){let a=$l(o);if(!n.length&&(n.push({offset:0,color:a}),typeof o.length>"u"||o.length.value==="0"))continue;let u=typeof o.length>"u"?void 0:o.length.type==="%"?o.length.value/100:o.length.value/e;n.push({offset:u,color:a})}n.length||n.push({offset:0,color:"transparent"});let r=n[n.length-1];r.offset!==1&&(typeof r.offset>"u"?r.offset=1:n.push({offset:1,color:r.color}));let i=0,s=1;for(let o=0;o<n.length;o++)if(typeof n[o].offset>"u"){for(s<o&&(s=o);typeof n[s].offset>"u";)s++;n[o].offset=(n[s].offset-n[i].offset)/(s-i)*(o-i)+n[i].offset}else i=o;return n}async function Sn({id:e,width:t,height:n,left:r,top:i},{image:s,size:o,position:a,repeat:u}){u=u||"repeat";let l=u==="repeat-x"||u==="repeat",f=u==="repeat-y"||u==="repeat",d=_n(o,{x:t,y:n,defaultX:t,defaultY:n}),g=_n(a,{x:t,y:n,defaultX:0,defaultY:0});if(s.startsWith("linear-gradient(")){let h=wn.parse(s)[0],[p,v]=d,_,b,y,S;if(h.orientation.type==="directional")[_,b,y,S]=Wl(h.orientation.value);else if(h.orientation.type==="angular"){let C=+h.orientation.value/180*Math.PI-Math.PI/2,H=Math.cos(C),U=Math.sin(C);_=0,b=0,y=H,S=U,y<0&&(_-=y,y=0),S<0&&(b-=S,S=0)}let E=is(t,h.colorStops),T=`satori_bi${e}`,D=`satori_pattern_${e}`,F=I("pattern",{id:D,x:g[0]/t,y:g[1]/n,width:l?p/t:"1",height:f?v/n:"1",patternUnits:"objectBoundingBox"},I("linearGradient",{id:T,x1:_,y1:b,x2:y,y2:S},E.map(C=>I("stop",{offset:C.offset*100+"%","stop-color":C.color})).join(""))+I("rect",{x:0,y:0,width:p,height:v,fill:`url(#${T})`}));return[D,F]}if(s.startsWith("radial-gradient(")){let h=wn.parse(s)[0],p=h.orientation[0],[v,_]=d,b="circle",y=v/2,S=_/2;if(p.type==="shape"){if(b=p.value,p.at)if(p.at.type==="position")y=p.at.value.x.value,S=p.at.value.y.value;else throw new Error("orientation.at.type not implemented: "+p.at.type)}else throw new Error("orientation.type not implemented: "+p.type);let E=is(t,h.colorStops),T=`satori_radial_${e}`,D=`satori_pattern_${e}`,F=`satori_mask_${e}`,C={},H=Math.max(Math.abs(v-y),Math.abs(y)),U=Math.max(Math.abs(_-S),Math.abs(S));if(b==="circle")C.r=Math.sqrt(H*H+U*U);else if(b==="ellipse"){let V=U!==0?H/U:1;C.ry=Math.sqrt(H*H+U*U*V*V)/V,C.rx=C.ry*V}let J=I("pattern",{id:D,x:g[0]/t,y:g[1]/n,width:l?v/t:"1",height:f?_/n:"1",patternUnits:"objectBoundingBox"},I("radialGradient",{id:T},E.map(V=>I("stop",{offset:V.offset,"stop-color":V.color})).join(""))+I("mask",{id:F},I("rect",{x:0,y:0,width:v,height:_,fill:"#fff"}))+I(b,{cx:y,cy:S,width:v,height:_,...C,fill:`url(#${T})`,mask:`url(#${F})`}));return[D,J]}if(s.startsWith("url(")){let h=_n(o,{x:t,y:n,defaultX:0,defaultY:0}),[p,v,_]=await kr(s.slice(4,-1)),b=h[0]||v,y=h[1]||_;return[`satori_bi${e}`,I("pattern",{id:`satori_bi${e}`,patternContentUnits:"userSpaceOnUse",patternUnits:"userSpaceOnUse",x:g[0]+r,y:g[1]+i,width:l?b:"100%",height:f?y:"100%"},I("image",{x:0,y:0,width:b,height:y,preserveAspectRatio:"none",href:p}))]}throw new Error(`Invalid background image: "${s}"`)}c();function Bl([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 Tr(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 Or(e){e[0]=e[1]=Math.min(e[0],e[1])}function Er(e,t,n,r,i){if(typeof e=="string"){let s=e.split(" ").map(a=>a.trim()),o=!s[1]&&!s[0].endsWith("%");return s[1]=s[1]||s[0],[o,[Math.min(_e(s[0],r,t,i,!0),t),Math.min(_e(s[1],r,n,i,!0),n)]]}return typeof e=="number"?[!0,[Math.min(e,t),Math.min(e,n)]]:[!0,void 0]}var Pr=e=>e&&e[0]!==0&&e[1]!==0;function ut({left:e,top:t,width:n,height:r},i,s){let{borderTopLeftRadius:o,borderTopRightRadius:a,borderBottomLeftRadius:u,borderBottomRightRadius:l,fontSize:f}=i,d,g,h,p;if([d,o]=Er(o,n,r,f,i),[g,a]=Er(a,n,r,f,i),[h,u]=Er(u,n,r,f,i),[p,l]=Er(l,n,r,f,i),!s&&!Pr(o)&&!Pr(a)&&!Pr(u)&&!Pr(l))return"";o||=[0,0],a||=[0,0],u||=[0,0],l||=[0,0],[o[0],a[0]]=Tr(o[0],a[0],n),[u[0],l[0]]=Tr(u[0],l[0],n),[o[1],u[1]]=Tr(o[1],u[1],r),[a[1],l[1]]=Tr(a[1],l[1],r),d&&Or(o),g&&Or(a),h&&Or(u),p&&Or(l);let v=[];v[0]=[a,a],v[1]=[l,[-l[0],l[1]]],v[2]=[u,[-u[0],-u[1]]],v[3]=[o,[o[0],-o[1]]];let _=`h${n-o[0]-a[0]} a${v[0][0]} 0 0 1 ${v[0][1]}`,b=`v${r-a[1]-l[1]} a${v[1][0]} 0 0 1 ${v[1][1]}`,y=`h${l[0]+u[0]-n} a${v[2][0]} 0 0 1 ${v[2][1]}`,S=`v${u[1]+o[1]-r} a${v[3][0]} 0 0 1 ${v[3][1]}`;if(s){let T=function($){let V=Bl([o,a,l,u][$]);return $===0?[[e+o[0]-V,t+o[1]-V],[e+o[0],t]]:$===1?[[e+n-a[0]+V,t+a[1]-V],[e+n,t+a[1]]]:$===2?[[e+n-l[0]+V,t+r-l[1]+V],[e+n-l[0],t+r]]:[[e+u[0]-V,t+r-u[1]+V],[e,t+r-u[1]]]},E=s.indexOf(!1);if(!s.includes(!0))throw new Error("Invalid `partialSides`.");if(E===-1)E=0;else for(;!s[E];)E=(E+1)%4;let D="",F=T(E),C=`M${F[0]} A${v[(E+3)%4][0]} 0 0 1 ${F[1]}`,H=0;for(;H<4&&s[(E+H)%4];H++)D+=C+" ",C=[_,b,y,S][(E+H)%4];let U=(E+H)%4;D+=C.split(" ")[0];let J=T(U);return D+=` A${v[(U+3)%4][0]} 0 0 1 ${J[0]}`,D}return`M${e+o[0]},${t} ${_} ${b} ${y} ${S}`}c();c();c();function os(e,t,n){return n[e+"Width"]===n[t+"Width"]&&n[e+"Style"]===n[t+"Style"]&&n[e+"Color"]===n[t+"Color"]}function ss({id:e,currentClipPathId:t,borderPath:n,borderType:r,left:i,top:s,width:o,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:s,width:o,height:a,d:n||void 0})),f]}function St({left:e,top:t,width:n,height:r,props:i,asContentMask:s,maskBorderOnly:o},a){let u=["borderTop","borderRight","borderBottom","borderLeft"];if(!s&&!u.some(h=>a[h+"Width"]))return"";let l="",f=0;for(;f>0&&os(u[f],u[(f+3)%4],a);)f=(f+3)%4;let d=[!1,!1,!1,!1],g=[];for(let h=0;h<4;h++){let p=(f+h)%4,v=(f+h+1)%4,_=u[p],b=u[v];if(d[p]=!0,g=[a[_+"Width"],a[_+"Style"],a[_+"Color"],_],!os(_,b,a)){let y=(g[0]||0)+(s&&!o&&a[_.replace("border","padding")]||0);y&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":y*2,"stroke-dasharray":!s&&g[1]==="dashed"?y*2+" "+y:void 0,d:ut({left:e,top:t,width:n,height:r},a,d)})),d=[!1,!1,!1,!1]}}if(d.some(Boolean)){let h=(g[0]||0)+(s&&!o&&a[g[3].replace("border","padding")]||0);h&&(l+=I("path",{width:n,height:r,...i,fill:"none",stroke:s?"#000":g[2],"stroke-width":h*2,"stroke-dasharray":!s&&g[1]==="dashed"?h*2+" "+h:void 0,d:ut({left:e,top:t,width:n,height:r},a,d)}))}return l}function kn({id:e,left:t,top:n,width:r,height:i,matrix:s,borderOnly:o},a){let u=(a.borderLeftWidth||0)+(o?0:a.paddingLeft||0),l=(a.borderTopWidth||0)+(o?0:a.paddingTop||0),f=(a.borderRightWidth||0)+(o?0:a.paddingRight||0),d=(a.borderBottomWidth||0)+(o?0:a.paddingBottom||0),g={x:t+u,y:n+l,width:r-u-f,height:i-l-d};return I("mask",{id:e},I("rect",{...g,fill:"#fff",mask:a._inheritedMaskId?`url(#${a._inheritedMaskId})`:void 0})+St({left:t,top:n,width:r,height:i,props:{transform:s||void 0},asContentMask:!0,maskBorderOnly:o},a))}function Tn({left:e,top:t,width:n,height:r,path:i,matrix:s,id:o,currentClipPath:a,src:u},l){if(l.overflow!=="hidden"&&!u)return"";let f=kn({id:`satori_om-${o}`,left:e,top:t,width:n,height:r,matrix:s,borderOnly:!u},l);return I("clipPath",{id:`satori_cp-${o}`,"clip-path":a},I(i?"path":"rect",{x:e,y:t,width:n,height:r,d:i||void 0}))+f}async function kt({id:e,left:t,top:n,width:r,height:i,isInheritingTransform:s,src:o,debug:a},u){if(u.display==="none")return"";let l=!!o,f="rect",d="",g="",h=[],p=1,v="";u.backgroundColor&&h.push(u.backgroundColor),u.opacity!==void 0&&(p=+u.opacity),u.transform&&(d=_t({left:t,top:n,width:r,height:i},u.transform,s,u.transformOrigin));let _="";if(u.backgroundImage){let J=[];for(let $=0;$<u.backgroundImage.length;$++){let V=u.backgroundImage[$],ne=await Sn({id:e+"_"+$,width:r,height:i,left:t,top:n},V);ne&&J.unshift(ne)}for(let $ of J)h.push(`url(#${$[0]})`),g+=$[1],$[2]&&(_+=$[2])}let b=ut({left:t,top:n,width:r,height:i},u);b&&(f="path");let y=u._inheritedClipPathId,S=u._inheritedMaskId;a&&(v=I("rect",{x:t,y:n,width:r,height:i,fill:"transparent",stroke:"#ff5757","stroke-width":1,transform:d||void 0,"clip-path":y?`url(#${y})`:void 0}));let{backgroundClip:E,filter:T}=u,D=E==="text"?`url(#satori_bct-${e})`:y?`url(#${y})`:void 0,F=Tn({left:t,top:n,width:r,height:i,path:b,id:e,matrix:d,currentClipPath:D,src:o},u),C=h.map(J=>I(f,{x:t,y:n,width:r,height:i,fill:J,d:b||void 0,transform:d||void 0,"clip-path":D,style:T?`filter:${T}`:void 0,mask:S?`url(#${S})`:void 0})).join(""),H=ss({id:e,left:t,top:n,width:r,height:i,currentClipPathId:y,borderPath:b,borderType:f},u);if(l){let J=(u.borderLeftWidth||0)+(u.paddingLeft||0),$=(u.borderTopWidth||0)+(u.paddingTop||0),V=(u.borderRightWidth||0)+(u.paddingRight||0),ne=(u.borderBottomWidth||0)+(u.paddingBottom||0),Z=u.objectFit==="contain"?"xMidYMid":u.objectFit==="cover"?"xMidYMid slice":"none";C+=I("image",{x:t+J,y:n+$,width:r-J-V,height:i-$-ne,href:o,preserveAspectRatio:Z,transform:d||void 0,style:T?`filter:${T}`:void 0,"clip-path":`url(#satori_cp-${e})`,mask:`url(#satori_om-${e})`})}if(H){g+=H[0];let J=H[1];C+=St({left:t,top:n,width:r,height:i,props:{transform:d||void 0,"clip-path":`url(#${J})`}},u)}let U=rs({width:r,height:i,id:e,opacity:p,shape:I(f,{x:t,y:n,width:r,height:i,fill:"#fff",stroke:"#fff","stroke-width":0,d:b||void 0,transform:d||void 0,"clip-path":D,mask:S?`url(#${S})`:void 0})},u);return(g?I("defs",{},g):"")+(U?U[0]:"")+F+(p!==1?`<g opacity="${p}">`:"")+(_||C)+(p!==1?"</g>":"")+(U?U[1]:"")+v}c();import Ul from"emoji-regex";var zl=new RegExp(Ul(),""),On={emoji:zl,symbol:/\p{Symbol}/u,math:/\p{Math}/u},Tt={"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},Ar=Object.keys({...Tt,...On});function as(e){return Ar.includes(e)}function us(e,t){if(t&&Tt[t]&&Tt[t].test(e))return t;for(let n of Object.keys(On))if(On[n].test(e))return n;for(let n of Object.keys(Tt))if(Tt[n].test(e))return n;return"unknown"}function ls(e){if(e)return Ar.find(t=>t.toLowerCase()===e.toLowerCase()||t.toLowerCase().startsWith(e.toLowerCase()))}async function*Ot(e,t){let n=await Fe(),{id:r,inheritedStyle:i,parent:s,font:o,debug:a,locale:u,embedFont:l=!0,graphemeImages:f,canLoadAdditionalAssets:d,getTwStyles:g}=t;if(e===null||typeof e>"u")return yield,yield,"";if(!fn(e)||typeof e.type=="function"){let M;if(!fn(e))M=yn(String(e),t),yield(await M.next()).value;else{if(Do(e.type))throw new Error("Class component is not supported.");M=Ot(e.type(e.props),t),yield(await M.next()).value}await M.next();let fe=yield;return(await M.next(fe)).value}let{type:h,props:p}=e;if(p&&Fo(p))throw new Error("dangerouslySetInnerHTML property is not supported. See documentation for more information https://github.com/vercel/satori#jsx.");let{style:v,children:_,tw:b,lang:y=u}=p||{},S=ls(y);if(b){let M=g(b,v);v=Object.assign(M,v)}let E=n.Node.create();s.insertChild(E,s.getChildCount());let[T,D]=await gn(E,h,i,v,p),F=T.transform===i.transform;if(F||(T.transform.__parent=i.transform),T.overflow==="hidden"&&(D._inheritedClipPathId=`satori_cp-${r}`,D._inheritedMaskId=`satori_om-${r}`),T.backgroundClip==="text"){let M={value:""};D._inheritedBackgroundClipTextPath=M,T._inheritedBackgroundClipTextPath=M}let C=No(_),H=[],U=0,J=[];for(let M of C){let fe=Ot(M,{id:r+"-"+U++,parentStyle:T,inheritedStyle:D,isInheritingTransform:!0,parent:E,font:o,embedFont:l,debug:a,graphemeImages:f,canLoadAdditionalAssets:d,locale:S,getTwStyles:g});d?J.push(...(await fe.next()).value||[]):await fe.next(),H.push(fe)}yield J;for(let M of H)await M.next();let[$,V]=yield,{left:ne,top:Z,width:le,height:ye}=E.getComputedLayout();ne+=$,Z+=V;let L="",N="",z="";if(h==="img"){let M=T.__src;N=await kt({id:r,left:ne,top:Z,width:le,height:ye,src:M,isInheritingTransform:F,debug:a},T)}else if(h==="svg"){let M=T.color,fe=qo(e,M);N=await kt({id:r,left:ne,top:Z,width:le,height:ye,src:fe,isInheritingTransform:F,debug:a},T)}else{let M=v==null?void 0:v.display;if(h==="div"&&_&&typeof _!="string"&&M!=="flex"&&M!=="none")throw new Error('Expected <div> to have explicit "display: flex" or "display: none" if it has more than one child node.');N=await kt({id:r,left:ne,top:Z,width:le,height:ye,isInheritingTransform:F,debug:a},T)}for(let M of H)L+=(await M.next([ne,Z])).value;return T._inheritedBackgroundClipTextPath&&(z+=I("clipPath",{id:`satori_bct-${r}`,"clip-path":T._inheritedClipPathId?`url(#${T._inheritedClipPathId})`:void 0},T._inheritedBackgroundClipTextPath.value)),z+N+L}c();import En from"@shuding/opentype.js";var fs="unknown";function Gl(e,t,[n,r],[i,s]){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!==s){if(r===t)return-1;if(s===t)return 1}return-1}var Et=class{constructor(t){this.fonts=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)],s=i[0];for(let o=1;o<i.length;o++){let[,a,u]=s,[,l,f]=i[o];Gl(n,r,[a,u],[l,f])>0&&(s=i[o])}return s[0]}addFonts(t){for(let n of t){let{name:r,data:i,lang:s}=n;if(s&&!as(s))throw new Error(`Invalid value for props \`lang\`: "${s}". The value must be one of the following: ${Ar.join(", ")}.`);let o=s??fs,a=En.parse("buffer"in i?i.buffer.slice(i.byteOffset,i.byteOffset+i.byteLength):i,{lowMemory:!0}),u=a.charToGlyphIndex;a.charToGlyphIndex=f=>{let d=u.call(a,f);return d===0&&a._trackBrokenChars&&a._trackBrokenChars.push(f),d},this.defaultFont||(this.defaultFont=a);let l=`${r.toLowerCase()}_${o}`;this.fonts.has(l)||this.fonts.set(l,[]),this.fonts.get(l).push([a,n.weight,n.style])}}getEngine(t=16,n=1.2,{fontFamily:r,fontWeight:i=400,fontStyle:s="normal"},o){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(y=>y.toLowerCase());let a=[];r.forEach(y=>{let S=this.get({name:y,weight:i,style:s});if(S){a.push(S);return}let E=this.get({name:y+"_unknown",weight:i,style:s});if(E){a.push(E);return}});let u=Array.from(this.fonts.keys()),l=[],f=[],d=[];for(let y of u)if(!r.includes(y))if(o){let S=jl(y);S?S===o?l.push(this.get({name:y,weight:i,style:s})):f.push(this.get({name:y,weight:i,style:s})):d.push(this.get({name:y,weight:i,style:s}))}else d.push(this.get({name:y,weight:i,style:s}));let g=new Map,h=(y,S=!0)=>{let E=y.charCodeAt(0);if(g.has(E))return g.get(E);let T=[...a,...d,...l,...S?f:[]],D=T.find((F,C)=>!!F.charToGlyphIndex(y)||S&&C===T.length-1);return D&&g.set(E,D),D},p=(y,S=!1)=>{var T,D;return((S?(D=(T=y.tables)==null?void 0:T.os2)==null?void 0:D.sTypoAscender:0)||y.ascender)/y.unitsPerEm*t},v=(y,S=!1)=>{var T,D;return((S?(D=(T=y.tables)==null?void 0:T.os2)==null?void 0:D.sTypoDescender:0)||y.descender)/y.unitsPerEm*t},_=y=>h(y,!1),b={has:y=>{if(y===`
6
6
  `)return!0;let S=_(y);return S?(S._trackBrokenChars=[],S.stringToGlyphs(y),S._trackBrokenChars.length?(S._trackBrokenChars=void 0,!1):!0):!1},baseline:(y,S=typeof y>"u"?a[0]:h(y))=>{let E=p(S,!0),T=v(S,!0),D=b.height(y,S),{yMax:F,yMin:C}=S.tables.head,H=E-T,U=(F/(F-C)-1)*H;return D*((1.2/n+1)/2)+U},height:(y,S=typeof y>"u"?a[0]:h(y))=>(p(S)-v(S))*(n/1.2),measure:(y,S)=>this.measure(h,y,S),getSVG:(y,S)=>this.getSVG(h,y,S)};return b}patchFontFallbackResolver(t,n){let r=[];t._trackBrokenChars=r;let i=t.stringToGlyphs;return t.stringToGlyphs=(s,...o)=>{let a=i.call(t,s,...o);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 d=f.charToGlyph(l),g=t.unitsPerEm/f.unitsPerEm,h=new En.Path;h.unitsPerEm=t.unitsPerEm,h.commands=d.path.commands.map(v=>{let _={...v};for(let b in _)typeof _[b]=="number"&&(_[b]*=g);return _});let p=new En.Glyph({...d,advanceWidth:d.advanceWidth*g,xMin:d.xMin*g,xMax:d.xMax*g,yMin:d.yMin*g,yMax:d.yMax*g,path:h});a[u]=p}}return a},()=>{t.stringToGlyphs=i,t._trackBrokenChars=void 0}}measure(t,n,{fontSize:r,letterSpacing:i=0}){let s=t(n),o=this.patchFontFallbackResolver(s,t);try{return s.getAdvanceWidth(n,r,{letterSpacing:i/r})}finally{o()}}getSVG(t,n,{fontSize:r,top:i,left:s,letterSpacing:o=0}){let a=t(n),u=this.patchFontFallbackResolver(a,t);try{return r===0?"":a.getPath(n.replace(/\n/g,""),s,i,r,{letterSpacing:o/r}).toPathData(1)}finally{u()}}};function jl(e){let t=e.split("_"),n=t[t.length-1];return n===fs?void 0:n}c();function Pn({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"},n)}c();c();var zu=tl(xu());c();c();c();c();var L0=["ios","android","windows","macos","web"];function _u(e){return L0.includes(e)}var C0=["portrait","landscape"];function Su(e){return C0.includes(e)}var wu;(function(e){e.fontSize="fontSize",e.lineHeight="lineHeight"})(wu||(wu={}));var j;(function(e){e.rem="rem",e.em="em",e.px="px",e.percent="%",e.vw="vw",e.vh="vh",e.none="<no-css-unit>"})(j||(j={}));function eo(e){return typeof e=="string"}function to(e){return typeof e=="object"}var ro;function m(e){return{kind:"complete",style:e}}function ie(e,t={}){let{fractions:n}=t;if(n&&e.includes("/")){let[s="",o=""]=e.split("/",2),a=ie(s),u=ie(o);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,j.none];switch(i==null?void 0:i[1]){case"rem":return[r,j.rem];case"px":return[r,j.px];case"em":return[r,j.em];case"%":return[r,j.percent];case"vw":return[r,j.vw];case"vh":return[r,j.vh];default:return null}}function $e(e,t,n={}){let r=Re(t,n);return r===null?null:m({[e]:r})}function Vr(e,t,n){let r=Re(t);return r!==null&&(n[e]=r),n}function Tu(e,t){let n=Re(t);return n===null?null:{[e]:n}}function Re(e,t={}){if(e===void 0)return null;let n=ie(String(e),t);return n?Ve(...n,t):null}function Ve(e,t,n={}){let{isNegative:r,device:i}=n;switch(t){case j.rem:return e*16*(r?-1:1);case j.px:return e*(r?-1:1);case j.percent:return`${r?"-":""}${e}%`;case j.none:return e*(r?-1:1);case j.vw:return i!=null&&i.windowDimensions?i.windowDimensions.width*(e/100):(ve("`vw` CSS unit requires configuration with `useDeviceContext()`"),null);case j.vh:return i!=null&&i.windowDimensions?i.windowDimensions.height*(e/100):(ve("`vh` CSS unit requires configuration with `useDeviceContext()`"),null);default:return null}}function no(e){let t=ie(e);if(!t)return null;let[n,r]=t;switch(r){case j.rem:return n*16;case j.px:return n;default:return null}}var D0={t:"Top",tr:"TopRight",tl:"TopLeft",b:"Bottom",br:"BottomRight",bl:"BottomLeft",l:"Left",r:"Right",x:"Horizontal",y:"Vertical"};function io(e){return D0[e??""]||"All"}function oo(e){let t="All";return[e.replace(/^-(t|b|r|l|tr|tl|br|bl)(-|$)/,(r,i)=>(t=io(i),"")),t]}function rt(e,t={}){if(e.includes("/")){let n=ku(e,{...t,fractions:!0});if(n)return n}return e[0]==="["&&(e=e.slice(1,-1)),ku(e,t)}function Pe(e,t,n={}){let r=rt(t,n);return r===null?null:m({[e]:r})}function ku(e,t={}){if(e==="px")return 1;let n=ie(e,t);if(!n)return null;let[r,i]=n;return t.fractions&&(i=j.percent,r*=100),i===j.none&&(r=r/4,i=j.rem),Ve(r,i,t)}function F0(...e){console.warn(...e)}function N0(...e){}var ve=typeof process>"u"||((ro=process==null?void 0:process.env)===null||ro===void 0?void 0:ro.JEST_WORKER_ID)===void 0?F0:N0;var M0=[["aspect-square",m({aspectRatio:1})],["aspect-video",m({aspectRatio:16/9})],["items-center",m({alignItems:"center"})],["items-start",m({alignItems:"flex-start"})],["items-end",m({alignItems:"flex-end"})],["items-baseline",m({alignItems:"baseline"})],["items-stretch",m({alignItems:"stretch"})],["justify-start",m({justifyContent:"flex-start"})],["justify-end",m({justifyContent:"flex-end"})],["justify-center",m({justifyContent:"center"})],["justify-between",m({justifyContent:"space-between"})],["justify-around",m({justifyContent:"space-around"})],["justify-evenly",m({justifyContent:"space-evenly"})],["content-start",m({alignContent:"flex-start"})],["content-end",m({alignContent:"flex-end"})],["content-between",m({alignContent:"space-between"})],["content-around",m({alignContent:"space-around"})],["content-stretch",m({alignContent:"stretch"})],["content-center",m({alignContent:"center"})],["self-auto",m({alignSelf:"auto"})],["self-start",m({alignSelf:"flex-start"})],["self-end",m({alignSelf:"flex-end"})],["self-center",m({alignSelf:"center"})],["self-stretch",m({alignSelf:"stretch"})],["self-baseline",m({alignSelf:"baseline"})],["direction-inherit",m({direction:"inherit"})],["direction-ltr",m({direction:"ltr"})],["direction-rtl",m({direction:"rtl"})],["hidden",m({display:"none"})],["flex",m({display:"flex"})],["flex-row",m({flexDirection:"row"})],["flex-row-reverse",m({flexDirection:"row-reverse"})],["flex-col",m({flexDirection:"column"})],["flex-col-reverse",m({flexDirection:"column-reverse"})],["flex-wrap",m({flexWrap:"wrap"})],["flex-wrap-reverse",m({flexWrap:"wrap-reverse"})],["flex-nowrap",m({flexWrap:"nowrap"})],["flex-auto",m({flexGrow:1,flexShrink:1,flexBasis:"auto"})],["flex-initial",m({flexGrow:0,flexShrink:1,flexBasis:"auto"})],["flex-none",m({flexGrow:0,flexShrink:0,flexBasis:"auto"})],["overflow-hidden",m({overflow:"hidden"})],["overflow-visible",m({overflow:"visible"})],["overflow-scroll",m({overflow:"scroll"})],["absolute",m({position:"absolute"})],["relative",m({position:"relative"})],["italic",m({fontStyle:"italic"})],["not-italic",m({fontStyle:"normal"})],["oldstyle-nums",ir("oldstyle-nums")],["small-caps",ir("small-caps")],["lining-nums",ir("lining-nums")],["tabular-nums",ir("tabular-nums")],["proportional-nums",ir("proportional-nums")],["font-thin",m({fontWeight:"100"})],["font-100",m({fontWeight:"100"})],["font-extralight",m({fontWeight:"200"})],["font-200",m({fontWeight:"200"})],["font-light",m({fontWeight:"300"})],["font-300",m({fontWeight:"300"})],["font-normal",m({fontWeight:"normal"})],["font-400",m({fontWeight:"400"})],["font-medium",m({fontWeight:"500"})],["font-500",m({fontWeight:"500"})],["font-semibold",m({fontWeight:"600"})],["font-600",m({fontWeight:"600"})],["font-bold",m({fontWeight:"bold"})],["font-700",m({fontWeight:"700"})],["font-extrabold",m({fontWeight:"800"})],["font-800",m({fontWeight:"800"})],["font-black",m({fontWeight:"900"})],["font-900",m({fontWeight:"900"})],["include-font-padding",m({includeFontPadding:!0})],["remove-font-padding",m({includeFontPadding:!1})],["max-w-none",m({maxWidth:"99999%"})],["text-left",m({textAlign:"left"})],["text-center",m({textAlign:"center"})],["text-right",m({textAlign:"right"})],["text-justify",m({textAlign:"justify"})],["text-auto",m({textAlign:"auto"})],["underline",m({textDecorationLine:"underline"})],["line-through",m({textDecorationLine:"line-through"})],["no-underline",m({textDecorationLine:"none"})],["uppercase",m({textTransform:"uppercase"})],["lowercase",m({textTransform:"lowercase"})],["capitalize",m({textTransform:"capitalize"})],["normal-case",m({textTransform:"none"})],["w-auto",m({width:"auto"})],["h-auto",m({height:"auto"})],["shadow-sm",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.025,elevation:1})],["shadow",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:1,shadowOpacity:.075,elevation:2})],["shadow-md",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowRadius:3,shadowOpacity:.125,elevation:3})],["shadow-lg",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.15,shadowRadius:8,elevation:8})],["shadow-xl",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.19,shadowRadius:20,elevation:12})],["shadow-2xl",m({shadowOffset:{width:1,height:1},shadowColor:"#000",shadowOpacity:.25,shadowRadius:30,elevation:16})],["shadow-none",m({shadowOffset:{width:0,height:0},shadowColor:"#000",shadowRadius:0,shadowOpacity:0,elevation:0})]],so=M0;function ir(e){return{kind:"dependent",complete(t){(!t.fontVariant||!Array.isArray(t.fontVariant))&&(t.fontVariant=[]),t.fontVariant.push(e)}}}var or=class{constructor(t){this.ir=new Map(so),this.styles=new Map,this.prefixes=new Map,this.ir=new Map([...so,...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)}};c();c();function ao(e,t,n={}){let r=t==null?void 0:t[e];if(!r)return Pe("fontSize",e,n);if(typeof r=="string")return $e("fontSize",r);let i={},[s,o]=r,a=Tu("fontSize",s);if(a&&(i=a),typeof o=="string")return m(Vr("lineHeight",Ou(o,i),i));let{lineHeight:u,letterSpacing:l}=o;return u&&Vr("lineHeight",Ou(u,i),i),l&&Vr("letterSpacing",l,i),m(i)}function Ou(e,t){let n=ie(e);if(n){let[r,i]=n;if((i===j.none||i===j.em)&&typeof t.fontSize=="number")return t.fontSize*r}return e}c();function uo(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=ie(r);if(!i)return null;let[s,o]=i;if(o===j.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*s}};let a=Ve(s,o);return a!==null?m({lineHeight:a}):null}c();function lo(e,t,n,r,i){let s="";if(r[0]==="[")s=r.slice(1,-1);else{let l=i==null?void 0:i[r];if(l)s=l;else{let f=rt(r);return f&&typeof f=="number"?Eu(f,j.px,t,e):null}}if(s==="auto")return Pu(t,e,"auto");let o=ie(s);if(!o)return null;let[a,u]=o;return n&&(a=-a),Eu(a,u,t,e)}function Eu(e,t,n,r){let i=Ve(e,t);return i===null?null:Pu(n,r,i)}function Pu(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}}c();function fo(e){if(!e)return{};let t=Object.entries(e).reduce((i,[s,o])=>{let a=[0,1/0,0],u=typeof o=="string"?{min:o}:o,l=u.min?no(u.min):0;l===null?ve(`invalid screen config value: ${s}->min: ${u.min}`):a[0]=l;let f=u.max?no(u.max):1/0;return f===null?ve(`invalid screen config value: ${s}->max: ${u.max}`):a[1]=f,i[s]=a,i},{}),n=Object.values(t);n.sort((i,s)=>{let[o,a]=i,[u,l]=s;return a===1/0||l===1/0?o-u:a-l});let r=0;return n.forEach(i=>i[2]=r++),t}c();function co(e,t){let n=t==null?void 0:t[e];if(!n)return null;if(typeof n=="string")return m({fontFamily:n});let r=n[0];return r?m({fontFamily:r}):null}c();function nt(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=Ru(t,n),!i)return null;if(r){let s=Number(r);if(!Number.isNaN(s))return i=Au(i,s/100),m({[Yr[e].color]:i})}return{kind:"dependent",complete(s){let o=Yr[e].opacity,a=s[o];typeof a=="number"&&(i=Au(i,a)),s[Yr[e].color]=i}}}function sr(e,t){let n=parseInt(t,10);if(Number.isNaN(n))return null;let r=n/100,i={[Yr[e].opacity]:r};return{kind:"complete",style:i}}function Au(e,t){return e.startsWith("#")?e=$0(e):e.startsWith("rgb(")&&(e=e.replace(/^rgb\(/,"rgba(").replace(/\)$/,", 1)")),e.replace(/, ?\d*\.?(\d+)\)$/,`, ${t})`)}function Iu(e){for(let t in e)t.startsWith("__opacity_")&&delete e[t]}var Yr={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 $0(e){let t=e;e=e.replace(W0,(o,a,u,l)=>a+a+u+u+l+l);let n=q0.exec(e);if(!n)return ve(`invalid config hex color value: ${t}`),"rgba(0, 0, 0, 1)";let r=parseInt(n[1],16),i=parseInt(n[2],16),s=parseInt(n[3],16);return`rgba(${r}, ${i}, ${s}, 1)`}function Ru(e,t){let n=t[e];if(eo(n))return n;if(to(n)&&eo(n.DEFAULT))return n.DEFAULT;let[r="",...i]=e.split("-");for(;r!==e;){let s=t[r];if(to(s))return Ru(i.join("-"),s);if(i.length===0)return"";r=`${r}-${i.shift()}`}return""}var W0=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,q0=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;c();function Cu(e,t){let[n,r]=oo(e);if(n.match(/^(-?(\d)+)?$/))return B0(n,r,t==null?void 0:t.borderWidth);if(n=n.replace(/^-/,""),["dashed","solid","dotted"].includes(n))return m({borderStyle:n});let s="border";switch(r){case"Bottom":s="borderBottom";break;case"Top":s="borderTop";break;case"Left":s="borderLeft";break;case"Right":s="borderRight";break}let o=nt(s,n,t==null?void 0:t.borderColor);if(o)return o;let a=`border${r==="All"?"":r}Width`;n=n.replace(/^-/,"");let u=n.slice(1,-1),l=Pe(a,u);return typeof(l==null?void 0:l.style[a])!="number"?null:l}function B0(e,t,n){if(!n)return null;e=e.replace(/^-/,"");let i=n[e===""?"DEFAULT":e];if(i===void 0)return null;let s=`border${t==="All"?"":t}Width`;return $e(s,i)}function Du(e,t){if(!t)return null;let[n,r]=oo(e);n=n.replace(/^-/,""),n===""&&(n="DEFAULT");let i=`border${r==="All"?"":r}Radius`,s=t[n];if(s)return Lu($e(i,s));let o=Pe(i,n);return typeof(o==null?void 0:o.style[i])!="number"?null:Lu(o)}function Lu(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}c();function pt(e,t,n,r){let i=null;e==="inset"&&(t=t.replace(/^(x|y)-/,(a,u)=>(i=u==="x"?"x":"y","")));let s=r==null?void 0:r[t];if(s){let a=Re(s,{isNegative:n});if(a!==null)return Fu(e,i,a)}let o=rt(t,{isNegative:n});return o!==null?Fu(e,i,o):null}function Fu(e,t,n){if(e!=="inset")return m({[e]:n});switch(t){case null:return m({top:n,left:n,right:n,bottom:n});case"y":return m({top:n,bottom:n});case"x":return m({left:n,right:n})}}c();function ar(e,t,n){var r;t=t.replace(/^-/,"");let i=t===""?"DEFAULT":t,s=Number((r=n==null?void 0:n[i])!==null&&r!==void 0?r:t);return Number.isNaN(s)?null:m({[`flex${e}`]:s})}function Nu(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 m({flexGrow:Number(e),flexBasis:"0%"});let i=e.match(/^(\d+)\s+(\d+)$/);if(i)return m({flexGrow:Number(i[1]),flexShrink:Number(i[2])});if(i=e.match(/^(\d+)\s+([^ ]+)$/),i){let s=Re((n=i[2])!==null&&n!==void 0?n:"");return s?m({flexGrow:Number(i[1]),flexBasis:s}):null}if(i=e.match(/^(\d+)\s+(\d+)\s+(.+)$/),i){let s=Re((r=i[3])!==null&&r!==void 0?r:"");return s?m({flexGrow:Number(i[1]),flexShrink:Number(i[2]),flexBasis:s}):null}return null}c();function po(e,t,n={},r){let i=r==null?void 0:r[t];return i!==void 0?$e(e,i,n):Pe(e,t,n)}function ur(e,t,n={},r){let i=Re(r==null?void 0:r[t],n);return i?m({[e]:i}):(t==="screen"&&(t=e.includes("Width")?"100vw":"100vh"),Pe(e,t,n))}c();function Mu(e,t,n){let r=n==null?void 0:n[e];if(r){let i=ie(r,{isNegative:t});if(!i)return null;let[s,o]=i;if(o===j.em)return U0(s);if(o===j.percent)return ve("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=Ve(s,o,{isNegative:t});return a!==null?m({letterSpacing:a}):null}return Pe("letterSpacing",e,{isNegative:t})}function U0(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}}}c();function $u(e,t){let n=t==null?void 0:t[e];if(n){let i=ie(String(n));if(i)return m({opacity:i[0]})}let r=ie(e);return r?m({opacity:r[0]/100}):null}c();function Wu(e){let t=parseInt(e,10);return Number.isNaN(t)?null:{kind:"complete",style:{shadowOpacity:t/100}}}function qu(e){if(e.includes("/")){let[n="",r=""]=e.split("/",2),i=ho(n),s=ho(r);return i===null||s===null?null:{kind:"complete",style:{shadowOffset:{width:i,height:s}}}}let t=ho(e);return t===null?null:{kind:"complete",style:{shadowOffset:{width:t,height:t}}}}function ho(e){let t=rt(e);return typeof t=="number"?t:null}var ht=class{constructor(t,n={},r,i,s){var o,a,u,l,f,d;this.config=n,this.cache=r,this.position=0,this.isNull=!1,this.isNegative=!1,this.context={},this.context.device=i;let g=t.trim().split(":"),h=[];g.length===1?this.string=t:(this.string=(o=g.pop())!==null&&o!==void 0?o:"",h=g),this.char=this.string[0];let p=fo((a=this.config.theme)===null||a===void 0?void 0:a.screens);for(let v of h)if(p[v]){let _=(u=p[v])===null||u===void 0?void 0:u[2];_!==void 0&&(this.order=((l=this.order)!==null&&l!==void 0?l:0)+_);let b=(f=i.windowDimensions)===null||f===void 0?void 0:f.width;if(b){let[y,S]=(d=p[v])!==null&&d!==void 0?d:[0,0];(b<=y||b>S)&&(this.isNull=!0)}else this.isNull=!0}else _u(v)?this.isNull=v!==s:Su(v)?i.windowDimensions?(i.windowDimensions.width>i.windowDimensions.height?"landscape":"portrait")!==v?this.isNull=!0:this.incrementOrder():this.isNull=!0:v==="retina"?i.pixelDensity===2?this.incrementOrder():this.isNull=!0:v==="dark"?i.colorScheme!=="dark"?this.isNull=!0:this.incrementOrder():this.handlePossibleArbitraryBreakpointPrefix(v)||(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,s;let o=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=io(u[1]),d=lo(l,f,this.isNegative,this.rest,(r=this.config.theme)===null||r===void 0?void 0:r[l]);if(d)return d}}}if(this.consumePeeked("h-")&&(a=po("height",this.rest,this.context,o==null?void 0:o.height),a)||this.consumePeeked("w-")&&(a=po("width",this.rest,this.context,o==null?void 0:o.width),a)||this.consumePeeked("min-w-")&&(a=ur("minWidth",this.rest,this.context,o==null?void 0:o.minWidth),a)||this.consumePeeked("min-h-")&&(a=ur("minHeight",this.rest,this.context,o==null?void 0:o.minHeight),a)||this.consumePeeked("max-w-")&&(a=ur("maxWidth",this.rest,this.context,o==null?void 0:o.maxWidth),a)||this.consumePeeked("max-h-")&&(a=ur("maxHeight",this.rest,this.context,o==null?void 0:o.maxHeight),a)||this.consumePeeked("leading-")&&(a=uo(this.rest,o==null?void 0:o.lineHeight),a)||this.consumePeeked("text-")&&(a=ao(this.rest,o==null?void 0:o.fontSize,this.context),a||(a=nt("text",this.rest,o==null?void 0:o.textColor),a)||this.consumePeeked("opacity-")&&(a=sr("text",this.rest),a))||this.consumePeeked("font-")&&(a=co(this.rest,o==null?void 0:o.fontFamily),a)||this.consumePeeked("aspect-")&&(this.consumePeeked("ratio-")&&ve("`aspect-ratio-{ratio}` is deprecated, use `aspect-{ratio}` instead"),a=$e("aspectRatio",this.rest,{fractions:!0}),a)||this.consumePeeked("tint-")&&(a=nt("tint",this.rest,o==null?void 0:o.colors),a)||this.consumePeeked("bg-")&&(a=nt("bg",this.rest,o==null?void 0:o.backgroundColor),a||this.consumePeeked("opacity-")&&(a=sr("bg",this.rest),a))||this.consumePeeked("border")&&(a=Cu(this.rest,o),a||this.consumePeeked("-opacity-")&&(a=sr("border",this.rest),a))||this.consumePeeked("rounded")&&(a=Du(this.rest,o==null?void 0:o.borderRadius),a)||this.consumePeeked("bottom-")&&(a=pt("bottom",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("top-")&&(a=pt("top",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("left-")&&(a=pt("left",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("right-")&&(a=pt("right",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("inset-")&&(a=pt("inset",this.rest,this.isNegative,o==null?void 0:o.inset),a)||this.consumePeeked("flex-")&&(this.consumePeeked("grow")?a=ar("Grow",this.rest,o==null?void 0:o.flexGrow):this.consumePeeked("shrink")?a=ar("Shrink",this.rest,o==null?void 0:o.flexShrink):a=Nu(this.rest,o==null?void 0:o.flex),a)||this.consumePeeked("grow")&&(a=ar("Grow",this.rest,o==null?void 0:o.flexGrow),a)||this.consumePeeked("shrink")&&(a=ar("Shrink",this.rest,o==null?void 0:o.flexShrink),a)||this.consumePeeked("shadow-color-opacity-")&&(a=sr("shadow",this.rest),a)||this.consumePeeked("shadow-opacity-")&&(a=Wu(this.rest),a)||this.consumePeeked("shadow-offset-")&&(a=qu(this.rest),a)||this.consumePeeked("shadow-radius-")&&(a=Pe("shadowRadius",this.rest),a)||this.consumePeeked("shadow-")&&(a=nt("shadow",this.rest,o==null?void 0:o.colors),a))return a;if(this.consumePeeked("elevation-")){let u=parseInt(this.rest,10);if(!Number.isNaN(u))return m({elevation:u})}if(this.consumePeeked("opacity-")&&(a=$u(this.rest,o==null?void 0:o.opacity),a)||this.consumePeeked("tracking-")&&(a=Mu(this.rest,this.isNegative,o==null?void 0:o.letterSpacing),a))return a;if(this.consumePeeked("z-")){let u=Number((s=(i=o==null?void 0:o.zIndex)===null||i===void 0?void 0:i[this.rest])!==null&&s!==void 0?s:this.rest);if(!Number.isNaN(u))return m({zIndex:u})}return ve(`\`${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,[,s="",o="",a=""]=r,u=o==="w"?i.width:i.height,l=ie(a,this.context);if(l===null)return this.isNull=!0,!0;let[f,d]=l;return d!=="px"&&(this.isNull=!0),(s==="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}};c();function Bu(e){let t=[],n=null;return e.forEach(r=>{if(typeof r=="string")t=[...t,...mo(r)];else if(Array.isArray(r))t=[...t,...r.flatMap(mo)];else if(typeof r=="object"&&r!==null)for(let[i,s]of Object.entries(r))typeof s=="boolean"?t=[...t,...s?mo(i):[]]:n?n[i]=s:n={[i]:s}}),[t.filter(Boolean).filter(z0),n]}function mo(e){return e.trim().split(/\s+/)}function z0(e,t,n){return n.indexOf(e)===t}c();function Uu(e){var t;return(t=e==null?void 0:e.reduce((n,r)=>({...n,...G0(r.handler)}),{}))!==null&&t!==void 0?t:{}}function G0(e){let t={};return e({addUtilities:n=>{t=n},...j0}),t}function Le(e){throw new Error(`tailwindcss plugin function argument object prop "${e}" not implemented`)}var j0={addComponents:Le,addBase:Le,addVariant:Le,e:Le,prefix:Le,theme:Le,variants:Le,config:Le,corePlugins:Le,matchUtilities:Le,postcss:null};function Gu(e,t){let n=(0,zu.default)(H0(e)),r={},i=Uu(n.plugins),s={},o=Object.entries(i).map(([p,v])=>typeof v=="string"?(s[p]=v,[p,{kind:"null"}]):[p,m(v)]).filter(([,p])=>p.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 p=l[u];if(p)return p;let v=new or(o);return l[u]=v,v}function d(...p){let v=f(),_={},b=[],y=[],[S,E]=Bu(p),T=S.join(" "),D=v.getStyle(T);if(D)return{...D,...E||{}};for(let F of S){let C=v.getIr(F);if(!C&&F in s){let U=d(s[F]);v.setIr(F,m(U)),_={..._,...U};continue}switch(C=new ht(F,n,v,r,t).parse(),C.kind){case"complete":_={..._,...C.style},v.setIr(F,C);break;case"dependent":b.push(C);break;case"ordered":y.push(C);break;case"null":v.setIr(F,C);break}}if(y.length>0){y.sort((F,C)=>F.order-C.order);for(let F of y)switch(F.styleIr.kind){case"complete":_={..._,...F.styleIr.style};break;case"dependent":b.push(F.styleIr);break}}if(b.length>0){for(let F of b){let C=F.complete(_);C&&ve(C)}Iu(_)}return T!==""&&v.setStyle(T,_),E&&(_={..._,...E}),_}function g(p){let v=d(p.split(/\s+/g).map(_=>_.replace(/^(bg|text|border)-/,"")).map(_=>`bg-${_}`).join(" "));return typeof v.backgroundColor=="string"?v.backgroundColor:void 0}let h=(p,...v)=>{let _="";return p.forEach((b,y)=>{var S;_+=b+((S=v[y])!==null&&S!==void 0?S:"")}),d(_)};return h.style=d,h.color=g,h.prefixMatch=(...p)=>{let v=p.sort().join(":"),_=f(),b=_.getPrefixMatch(v);if(b!==void 0)return b;let E=new ht(`${v}:flex`,n,_,r,t).parse().kind!=="null";return _.setPrefixMatch(v,E),E},h.setWindowDimensions=p=>{r.windowDimensions=p,u=a()},h.setFontScale=p=>{r.fontScale=p,u=a()},h.setPixelDensity=p=>{r.pixelDensity=p,u=a()},h.setColorScheme=p=>{r.colorScheme=p,u=a()},h}function H0(e){return{...e,content:["_no_warnings_please"]}}var Y0={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 X0(e){return Gu({...e,plugins:[...(e==null?void 0:e.plugins)??[],Y0]},"web")}var Xr;function go({width:e,height:t,config:n}){return Xr||(Xr=X0(n)),Xr.setWindowDimensions({width:+e,height:+t}),Xr}var vo=new WeakMap;async function Hu(e,t){let n=await Fe();if(!n||!n.Node)throw new Error("Satori is not initialized: expect `yoga` to be loaded, got "+n);t.fonts=t.fonts||[];let r;vo.has(t.fonts)?r=vo.get(t.fonts):vo.set(t.fonts,r=new Et(t.fonts));let i="width"in t?t.width:void 0,s="height"in t?t.height:void 0,o=n.Node.create();i&&o.setWidth(i),s&&o.setHeight(s),o.setFlexDirection(n.FLEX_DIRECTION_ROW),o.setFlexWrap(n.WRAP_WRAP),o.setAlignContent(n.ALIGN_AUTO),o.setAlignItems(n.ALIGN_FLEX_START),o.setJustifyContent(n.JUSTIFY_FLEX_START),o.setOverflow(n.OVERFLOW_HIDDEN);let a={...t.graphemeImages},u=new Set,l=Ot(e,{id:"id",parentStyle:{},inheritedStyle:{fontSize:16,fontWeight:"normal",fontFamily:"serif",fontStyle:"normal",lineHeight:1.2,color:"black",opacity:1,whiteSpace:"normal",_viewportWidth:i,_viewportHeight:s},parent:o,font:r,embedFont:t.embedFont,debug:t.debug,graphemeImages:a,canLoadAdditionalAssets:!!t.loadAdditionalAsset,getTwStyles:(p,v)=>{let b={...go({width:i,height:s,config:t.tailwindConfig})([p])};return typeof b.lineHeight=="number"&&(b.lineHeight=b.lineHeight/(+b.fontSize||v.fontSize||16)),b.shadowColor&&b.boxShadow&&(b.boxShadow=b.boxShadow.replace(/rgba?\([^)]+\)/,b.shadowColor)),b}}),f=(await l.next()).value;if(t.loadAdditionalAsset&&f.length){let p=Q0(f),v=[],_={};await Promise.all(Object.entries(p).flatMap(([b,y])=>y.map(S=>{let E=`${b}_${S}`;return u.has(E)?null:(u.add(E),t.loadAdditionalAsset(b,S).then(T=>{typeof T=="string"?_[S]=T:T&&v.push(T)}))}))),r.addFonts(v),Object.assign(a,_)}await l.next(),o.calculateLayout(i,s,n.DIRECTION_LTR);let d=(await l.next([0,0])).value,g=o.getComputedWidth(),h=o.getComputedHeight();return o.freeRecursive(),Pn({width:g,height:h,content:d})}function Q0(e){let t={},n={};for(let{word:r,locale:i}of e){let s=us(r,i);n[s]=n[s]||"",n[s]+=r}return Object.keys(n).forEach(r=>{t[r]=t[r]||[],r==="emoji"?t[r].push(...ju(pe(n[r],"grapheme"))):(t[r][0]=t[r][0]||"",t[r][0]+=ju(pe(n[r],"grapheme",r==="unknown"?void 0:r)).join(""))}),t}function ju(e){return Array.from(new Set(e))}export{Hu as default,nl as init};
7
7
  //# sourceMappingURL=index.wasm.js.map