soop-avatar 1.1.5 → 1.1.6

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.
@@ -1939,8 +1939,8 @@ function Gn(e) {
1939
1939
  }
1940
1940
  fn(["click"]);
1941
1941
  //#endregion
1942
- //#region src/library.css?inline
1943
- var Kn = ".avatar-preview-anchor{border-radius:50%;place-items:center;width:40px;height:40px;display:grid;position:relative}.avatar-preview-anchor.avatar-live{box-sizing:border-box;background:linear-gradient(113.84deg,#0082ff 5.63%,#0a96ff 44.46%,#05bcff 57.4%,#00f0ff 75.9%,#04f0fc 78.67%,#10f1f5 81.44%,#24f4e8 84.22%,#40f7d7 87.92%,#64fbc1 90.69%,#82ffb0 92.54%);padding:2px}.avatar{object-fit:cover;border-radius:50%;width:36px;height:36px;display:block}.avatar-offline .avatar{filter:grayscale()}.avatar-preview{z-index:30;pointer-events:none;width:min(372px,100vw);max-width:372px;position:absolute;bottom:calc(100% + .75rem);left:auto;right:0}.avatar-list .avatar-preview{aspect-ratio:16/9;object-fit:cover}.avatar-preview-anchor:hover,.avatar-preview-anchor:focus-within{transition:transform .15s;transform:scale(1.08)}.avatar-list{width:100%;max-width:264px;position:relative}.avatar-stack{align-items:center;width:100%;min-height:40px;display:flex}.avatar-stack-item{flex:0 0 40px;height:40px;margin-right:-12px;position:static}.avatar-stack-item:hover,.avatar-stack-item:focus-within{z-index:10}.avatar-more{z-index:11;color:#fff;cursor:pointer;width:40px;height:40px;font:inherit;background:#282c34;border:1px solid #fff9;border-radius:50%;flex:0 0 40px;margin-left:8px;font-size:.85rem;position:relative}.avatar-overflow{z-index:20;box-sizing:border-box;background:#20242b;border:1px solid #fff3;border-radius:8px;grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:12px;width:100%;max-height:200px;padding:12px;display:grid;position:absolute;top:52px;left:0;overflow:auto}.avatar-overflow-item{place-items:center;height:40px;display:grid}", qn = 0, $;
1942
+ //#region src/components/Soop.css?inline
1943
+ var Kn = ".avatar-preview-anchor{border-radius:50%;place-items:center;width:40px;height:40px;display:grid;position:relative}.avatar-preview-anchor.avatar-live{background:0 0;position:relative}.avatar-preview-anchor.avatar-live:before{content:\"\";background:linear-gradient(113.84deg,#0082ff 5.63%,#0a96ff 44.46%,#05bcff 57.4%,#00f0ff 75.9%,#04f0fc 78.67%,#10f1f5 81.44%,#24f4e8 84.22%,#40f7d7 87.92%,#64fbc1 90.69%,#82ffb0 92.54%);border-radius:50%;padding:4px;position:absolute;inset:0;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 2px),#000 0);mask:radial-gradient(farthest-side,#0000 calc(100% - 2px),#000 0)}.avatar{z-index:1;object-fit:cover;background:0 0;border-radius:50%;width:32px;height:32px;display:block;position:relative}.avatar-offline .avatar{filter:grayscale()}.avatar-preview{z-index:30;box-sizing:border-box;opacity:1;pointer-events:none;width:min(372px,100vw);max-width:372px;height:auto;transition:opacity .15s,transform .15s;position:absolute;inset:auto 0 calc(100% + .75rem) auto;transform:translateY(0)}.avatar-list .avatar-preview{aspect-ratio:16/9;object-fit:cover;height:auto}.avatar-preview-anchor:hover,.avatar-preview-anchor:focus-within{transition:transform .15s;transform:scale(1.08)}.avatar-list{width:100%;max-width:264px;position:relative}.avatar-stack{align-items:center;width:100%;min-height:40px;display:flex}.avatar-stack-item{flex:0 0 40px;height:40px;margin-right:-12px;transition:transform .15s;position:static}.avatar-stack-item:hover,.avatar-stack-item:focus-within{z-index:10}.avatar-more{z-index:11;color:#fff;cursor:pointer;width:40px;height:40px;font:inherit;background:#282c34;border:1px solid #fff9;border-radius:50%;flex:0 0 40px;margin-left:8px;font-size:.85rem;transition:background-color .15s,transform .15s;position:relative}.avatar-more:hover,.avatar-more:focus-visible{background:#3c4350;transform:translateY(-2px)}.avatar-more:focus-visible{outline-offset:3px;outline:2px solid #82ffb0}.avatar-overflow{z-index:20;box-sizing:border-box;background:#20242b;border:1px solid #fff3;border-radius:8px;grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:12px;width:100%;max-height:200px;padding:12px;display:grid;position:absolute;top:52px;left:0;overflow:hidden auto}.avatar-overflow-item{place-items:center;width:100%;height:40px;display:grid;position:static}.avatar-overflow-item:hover,.avatar-overflow-item:focus-within{z-index:2}", qn = 0, $;
1944
1944
  function Jn(e) {
1945
1945
  let [t, n] = Gt(e.userIds), [r, i] = Gt(e.visibleCount), a = !1;
1946
1946
  qn === 0 && ($ = document.createElement("style"), $.dataset.soopAvatar = "", $.textContent = Kn, document.head.appendChild($)), qn += 1;
@@ -1 +1 @@
1
- var SoopAvatar=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=class extends Error{source;constructor(e){let t=Error,n=t.stackTraceLimit;n!==void 0&&(t.stackTraceLimit=0),super(),n!==void 0&&(t.stackTraceLimit=n),this.source=e}},n=class extends Error{source;constructor(e,t){super(t instanceof Error?t.message:String(t),{cause:t}),this.source=e}};function r(e){return e instanceof n?e.cause:e}var i=1024,a=2048,o=4096,s=1024,c=4096,l={},u={};function d(e){return e===u?void 0:e}var f={},p=Symbol(`refresh`),m=new Set;function h(e){for(;e.tn;)e=e.tn;return e}function g(e,t){if(e=h(e),t=h(t),e===t)return e;t.tn=e;for(let n of t.Ae)e.Ae.add(n);return t.Ae.clear(),e.en[0].push(...t.en[0]),e.en[1].push(...t.en[1]),t.en[0].length=0,t.en[1].length=0,e}function _(e){let t=e.o?.Be;if(!t)return;let n=h(t);if(m.has(n))return n;e.o!==null&&(e.o.Be=void 0)}function v(e){if(ee(e)&&e.o?.Et){let t=z(e).Et=je(e.o?.Et);if(t.an!==!0)return t;e.o!==null&&(e.o.Et=null)}return _(e)?._e??e._e}function ee(e){let t=e.o;return t!==null&&t.De!==void 0&&t.De!==l}function te(e,t){let n=h(t),r=e.o?.Be;if(r){if(r.tn){z(e).Be=t,e.T|=s;return}let i=h(r);if(m.has(i)){i!==n&&!ee(e)&&(n.rn&&h(n.rn)===i?(z(e).Be=t,e.T|=s):i.rn&&h(i.rn)===n||g(n,i));return}}z(e).Be=t,e.T|=s}var y=new Set,b={eE:Array(2e3).fill(void 0),tE:!1,xe:0,EE:0},x={eE:Array(2e3).fill(void 0),tE:!1,xe:0,EE:0};function ne(e){e.ie&16?e.ie&=-12:(A(e,x),e.ie&=-4)}var S=0,C=null,re=!1,ie=!1,ae=!1,oe=0,se=new Set;function ce(e){let t=e.k;return y.size===0&&m.size===0&&e.Qt.length===0&&t.Ke.length===0&&t.m.length===0&&t.cn.size===0&&se.size===0}function le(){if(se.size!==0)for(let e of se){if(e.u!==null){se.delete(e);continue}e.Pe===l&&(e.o?.De===void 0||e.o?.De===l)&&(e.o?.t||(se.delete(e),e.o?.ft?.()))}}function ue(){return{Te:S,yt:[],Ne:new Map,Ke:[],m:[],cn:new Set,oe:[],bt:{Lt:[[],[]],Qt:[]},an:!1,ln:new Set}}function de(e,t){t.an=e,e.oe.push(...t.oe);for(let n of m)n._e===t&&(n._e=e);t.Ke.length&&(e.Ke.push(...t.Ke),t.Ke.length=0),t.m.length&&(e.m.push(...t.m),t.m.length=0);for(let n of t.cn)e.cn.add(n);for(let[n,r]of t.Ne){let t=e.Ne.get(n);t||e.Ne.set(n,t=new Set);for(let e of r)t.add(e)}for(let n of t.ln)e.ln.add(n)}function w(){if(ie){pe();return}re||(re=!0,!oe&&!D.sn&&queueMicrotask(De))}function fe(e){if(ie)return;ie=!0;let t=`[REACTIVITY_HALTED]`;e===void 0?console.error(t):console.error(t,e)}function pe(){ae||(ae=!0,console.error(`[REACTIVITY_HALTED]`))}var me=0,he=class{ve=null;Lt=[[],[]];Qt=[];Mt=0;created=S;addChild(e){this.Qt.push(e),e.ve=this}removeChild(e){let t=this.Qt.indexOf(e);t>=0&&(this.Qt.splice(t,1),e.ve=null)}notify(e,t,n,r){return this.ve?this.ve.notify(e,t,n,r):!1}run(e){if(this.Lt[e-1].length){let t=this.Lt[e-1];this.Lt[e-1]=[],Oe(t,e)}let t=this.Qt,n=++me;for(let r=0;r<t.length;){let i=t[r];if(i.Mt!==n&&(i.Mt=n,i.run?.(e),t[r]!==i)){r=0;continue}r++}}enqueue(e,t){e&&(I?h(I).en[e-1].push(t):this.Lt[e-1].push(t)),w()}stashQueues(e){e.Lt[0].push(...this.Lt[0]),e.Lt[1].push(...this.Lt[1]),this.Lt=[[],[]];for(let t=0;t<this.Qt.length;t++){let n=this.Qt[t],r=e.Qt[t];r||(r={Lt:[[],[]],Qt:[]},e.Qt[t]=r),n.stashQueues(r)}}restoreQueues(e){this.Lt[0].push(...e.Lt[0]),this.Lt[1].push(...e.Lt[1]);for(let t=0;t<e.Qt.length;t++){let n=e.Qt[t],r=this.Qt[t];r&&r.restoreQueues(n)}}},T=class e extends he{sn=!1;k=ue();static Ce;static Fe;static tt;static Vt=null;static G=null;static M=null;static h=null;static j=null;static Rt=null;static Gt=null;static Oe=null;static de=null;static ye=null;static un=null;static Pt=null;static Dt=null;static Ht=null;static Je=null;static p=null;static Bt=null;static wt=null;static vt=null;static fn=null;static En=null;static Tn=null;static dn=null;static Ft=null;static ht=null;static gt=null;static je=null;static $e=null;static ze=null;static In=null;flush(){if(!this.sn){if(C===null&&b.EE<b.xe&&this.Lt[0].length===0&&this.Lt[1].length===0&&this.Qt.length===0&&ce(this)){this.sn=!0;try{Se()}finally{this.sn=!1}S++,re=b.EE>=b.xe||this.Lt[0].length!==0||this.Lt[1].length!==0||this.k.yt.length!==0;return}this.sn=!0;try{if(Re(b,e.Ce),C){if(!Ae(C)){let t=C;Re(x,this.k===t?ne:e.Ce),this.k===t&&(Ee=this.k=ue()),m.size&&(e.dn(1),e.dn(2)),this.stashQueues(t.bt),S++,re=b.EE>=b.xe||this.k.yt.length>0,Te(t.yt),C=null,Ce(null,!0);return}let t=C,n=this.k;if(n!==t&&n.yt.push(...t.yt),this.restoreQueues(t.bt),y.delete(t),C=null,Te(n.yt),Ce(t),n===t){let e=ue();e.yt=n.yt,e.Ke=n.Ke,e.m=n.m,e.cn=n.cn,Ee=this.k=e}}else ce(this)?(Se(),b.EE>=b.xe&&(Re(b,e.Ce),Se())):(y.size&&Re(x,e.Ce),Ce());S++,re=b.EE>=b.xe,m.size&&e.dn(1),this.run(1),m.size&&e.dn(2),this.run(2)}finally{this.sn=!1}}}notify(t,n,r,i){if(n&1){if(r&1){let n=i===void 0?t.o?._:i;if(n?.i)return!0;if(C&&n){let r=n.source,i=C.Ne.get(r);i||C.Ne.set(r,i=new Set);let a=i.size;i.add(t),i.size!==a&&(w(),e.wt?.(C))}}return!0}return!1}initTransition(e){if(e&&=je(e),e&&e===C||!e&&C&&C.Te===S)return;if(!C)C=e??ue();else if(e){let t=C;de(e,t),y.delete(t),C=e}y.add(C),C.Te=S;let t=this.k;if(t!==C){for(let e=0;e<t.yt.length;e++){let n=t.yt[e];n._e=C,C.yt.push(n)}for(let e=0;e<t.Ke.length;e++){let n=t.Ke[e];n._e=C,C.Ke.push(n)}t.m.length&&C.m.push(...t.m);for(let e of t.cn)C.cn.add(e);if(t.ln.size){for(let e of t.ln)C.ln.add(e);t.ln.clear()}Ee=this.k=C}for(let e of m)e._e||=C}};function E(e){Ee.yt.push(e)}var ge=!1,_e=0;function ve(){_e++}function ye(e,t=!1){e._t=_e;let n=e.T,r=(n&1024?e.o?.Be:void 0)||I,i=!!(n&512)&&e.o?.Qe!==void 0,s=ge;for(let n=e.u;n!==null;n=n.fe){let e=n.ae;if(s&&(e.ie&=~a),e.ie&4&&n.ll===e.Ze&&n!==e.Ye&&(e.ie|=o),i&&e.T&8){e.ie|=256;continue}t&&r?(e.ie|=128,te(e,r)):t&&(e.ie|=128,e.o&&(e.o.Be=void 0)),k(e)}}function be(e){let t=e;if(!t.Se){e.Pe!==l&&(e.be=e.Pe,e.Pe=l),e.T&256&&T.un(e);return}e.Pe!==l&&(e.be=e.Pe,e.Pe=l,e.Re&&e.Re!==3&&(e.Xe=!0)),t.Ie=!1,t.ie&=~i,t.S&1||(t.S&=-5),t.o!=null&&(t.o.qe!==null||t.o.We!==null)&&T.Fe(t,!1,!0),e.T&256&&T.un(e)}var xe=null;function Se(){let e=Ee.yt;for(let t=0;t<e.length;t++)be(e[t]);e.length=0,xe?.()}function Ce(e=null,t=!1){let n=!t;n&&Se(),!t&&D.Qt.length&&we(D);let r=b.EE>=b.xe;if(r&&Re(b,T.Ce),n){r&&Se();let t=e??D.k;if(t.Ke.length&&T.fn(t.Ke),t.ln.size){for(let e of t.ln)e.ie&64||k(e);t.ln.clear(),w()}t.m.length&&(T.M(t.m),D.Qt.length&&we(D)),t.cn.size&&T.Vt(t.cn,e),le(),m.size&&T.Tn(e)}}function we(e){for(let t of e.Qt)t.se?.(),we(t)}function Te(e){for(let t=0;t<e.length;t++)e[t]._e=C}var D=new T,Ee=D.k;function De(e){if(e){oe++;try{return e()}finally{try{De()}finally{oe--}}}if(!D.sn&&!ie)for(;re||C;)D.flush()}function Oe(e,t){for(let n=0;n<e.length;n++)e[n](t)}function ke(e,n){if(e.ie&96)return!1;if(e.o?.le?.has(n))return!0;for(let t=e.nt;t;t=t.it){let e=t.ut;for(;e;){if(e===n||e.lt===n)return!0;e=e.o?.It}}return!!(e.S&1&&e.o?._ instanceof t&&e.o?._.source===n)}function Ae(e){if(e.an)return!0;if(e.oe.length)return!1;let t=!0;for(let[n,r]of e.Ne){let i=!1;for(let e of r){if(ke(e,n)){i=!0;break}r.delete(e)}if(!i)e.Ne.delete(n);else if(n.S&1&&n.o?._?.source===n){t=!1;break}}return t&&T.En?.(e)&&(t=!1),t&&(e.an=!0),t}function je(e){for(;e.an&&typeof e.an==`object`;)e=e.an;return e}function Me(e,t){let n=C;try{return C=je(e),t()}finally{C=n}}function O(e){return e.ie&32?x:b}function k(e){if(e.Re===3){let t=e;t.Xe||(t.Xe=!0,t.C.enqueue(2,t.Ut));return}let t=O(e);t.xe>e.Le&&(t.xe=e.Le),Pe(e,t)}function Ne(e,t){let n=(e.ve?.Ct?e.ve.Ot?.Le:e.ve?.Le)??-1;n>=e.Le&&(e.Le=n+1);let r=e.Le,i=t.eE[r];if(i===void 0)t.eE[r]=e;else{let t=i.st;t.ot=e,e.st=t,i.st=e}r>t.EE&&(t.EE=r)}function Pe(e,t){let n=e.ie;n&1036||(n&1?e.ie=n&-4|10:(e.ie=n|8,t.tE&&!(n&2)&&(t.tE=!1)),n&16||Ne(e,t))}function Fe(e,t){let n=e.ie;n&1052||(e.ie=n|16,Ne(e,t))}function A(e,t){let n=e.ie;if(!(n&24))return;e.ie=n&-25;let r=e.Le;if(e.st===e)t.eE[r]=void 0;else{let n=e.ot,i=t.eE[r],a=n??i;e===i?t.eE[r]=n:e.st.ot=n,a.st=e.st}e.st=e,e.ot=void 0}function Ie(e){if(!e.tE){e.tE=!0;for(let t=0;t<=e.EE;t++)for(let n=e.eE[t];n!==void 0;n=n.ot)n.ie&8&&Le(n)}}function Le(e,t=2){let n=e.ie;if(!((n&3)>=t)){e.ie=n&-4|t;for(let t=e.u;t!==null;t=t.fe)Le(t.ae,1);if(e.T&4096)for(let t=e.o.l;t!==null;t=t.ce)for(let e=t.u;e!==null;e=e.fe)Le(e.ae,1)}}function Re(e,t){for(e.tE=!1,e.xe=0;e.xe<=e.EE;e.xe++){let n=e.eE[e.xe];for(;n!==void 0;)n.ie&8?t(n):ze(n,e),n=e.eE[e.xe]}e.EE=0}function ze(e,t){A(e,t);let n=e.Le;for(let t=e.nt;t;t=t.it){let e=t.ut,r=e.lt||e;r.Se&&r.Le>=n&&(n=r.Le+1)}if(e.Le!==n){e.Le=n;for(let t=e.u;t!==null;t=t.fe)Fe(t.ae,O(t.ae))}}function Be(e){let t=e.ke;for(;t;){let e=t.ie;t.ie=e|32,e&24&&(A(t,e&32?x:b),e&8?Pe(t,x):Fe(t,x)),Be(t),t=t.Ve}}function Ve(e,t=!1,n){let r=e.ie;if(r&64)return;if(t){e.ie=r|64;let t=e;(t.o?.Ge||t.o?.ge)&&T.un(t)}t&&e.Se&&e.o!==null&&(e.o.Ee=null);let i=n?e.o?.qe??null:e.ke;for(;i;){let e=i.Ve,t=i;t.T&=-33,A(t,O(t)),Qe(t),Ve(i,!0),i=e}if(n?e.o!==null&&(e.o.qe=null):(e.ke=null,e.Me=0),t&&!n&&!(r&32)&&e.ve!==null&&!(e.ve.ie&64)){let t=e.ct,n=e.Ve;t===null?e.ve.ke=n:t.Ve=n,n!==null&&(n.ct=t),e.ct=null}if(He(e,n),t&&e.At){let t=e.At;e.At=void 0,t()}}function He(e,t){let n=t?e.o?.We:e.he;if(n){if(Array.isArray(n))for(let e=0;e<n.length;e++){let t=n[e];t.call(t)}else n.call(n);t?e.o!==null&&(e.o.We=null):e.he=null}}function Ue(e,t){let n=e;for(;n.T&4&&n.ve;)n=n.ve;if(n.id!=null)return Ke(n.id,t?n.Me++:n.Me);throw Error(``)}function We(e){return Ue(e,!0)}function Ge(e,t,n){return e?.id??(t?n?.id:n?.id==null?void 0:We(n))}function Ke(e,t){let n=t.toString(36),r=n.length-1;return e+(r?String.fromCharCode(64+r):``)+n}function qe(e){return F&&(F.he?Array.isArray(F.he)?F.he.push(e):F.he=[F.he,e]:F.he=e),e}function Je(e=!0){Ve(this,e)}function j(e){let t=F,n=e?.transparent??!1,r={id:Ge(e,n,t),T:n?4:0,Ct:!0,Ot:t?.Ct?t.Ot:t,ke:null,Ve:null,ct:null,he:null,C:t?.C??D,we:t?.we||f,Me:0,o:null,ve:t,dispose:Je};if(t){let e=t.ke;e===null?t.ke=r:(r.Ve=e,e.ct=r,t.ke=r)}return r}function Ye(e,t){let n=j(t);return W(n,()=>e(()=>n.dispose()))}function Xe(e){let t=e.ut,n=e.it,r=e.fe,i=e.el;if(r===null?t.rt=i:r.el=i,i!==null)i.fe=r;else if(t.u=r,r===null){t.o?.ft?.();let e=t;e.Se&&e.T&32&&!(e.ie&32)&&!(e.S&1)&&$e(e)}return n}function Ze(e){let t=e.Ye,n=t===null?e.nt:t.it;if(n!==null){do n=Xe(n);while(n!==null);t===null?e.nt=null:t.it=null}}function Qe(e){let t=e.nt;if(t){do t=Xe(t);while(t!==null);e.nt=null,e.Ye=null}}function $e(e){A(e,O(e)),Qe(e),Ve(e,!0)}function et(e,t,n=!1){let r=t.Ye;if(r!==null&&r.ut===e){r.me&&=n;return}let i=null,a=t.ie&4;if(a&&(i=r===null?t.nt:r.it,i!==null&&i.ut===e)){i.ll=t.Ze,t.Ye=i,i.me=n;return}let o=e.rt;if(o!==null&&o.ae===t&&(!a||o.ll===t.Ze)){a?o.me&&=n:o.me=n;return}let s=t.Ye=e.rt={ut:e,ae:t,it:i,el:o,fe:null,ll:t.Ze,me:n};r===null?t.nt=s:r.it=s,o===null?e.u=s:o.fe=s,ve()}function tt(e,t){return!e.o?.le?.has(t)&&((z(e).le??=new Set).add(t),!0)}function nt(e,t){return e.o?.le?.delete(t)?(e.o?.le.size===0&&e.o!==null&&(e.o.le=void 0),!0):!1}function rt(e){e.o?.le?.clear(),e.o!==null&&(e.o.le=void 0)}function it(e,t){z(e).ue=!0,t.source&&tt(e,t.source),e.S&2||at(e,t.source,t)}function at(e,n,r){if(!n){e.o!==null&&(e.o._=null);return}if(r instanceof t&&r.source===n){z(e)._=r;return}let i=e.o?._;(!(i instanceof t)||i.source!==n)&&(z(e)._=new t(n))}function M(e,t){for(let n=e.u;n!==null;n=n.fe)t(n.ae,n);for(let n=e.o?.l??null;n!==null;n=n.ce)for(let e=n.u;e!==null;e=e.fe)t(e.ae,e)}function ot(e){e.Se&&e.T&32&&!e.u&&!(e.ie&32)&&!(e.S&1)&&$e(e)}function st(e){let t,n=new Set,r=e=>{n.has(e)||(n.add(e),!e.u&&e.T&32&&(t??=[]).push(e),M(e,r))};if(M(e,r),t)for(let e of t)ot(e)}function ct(e,t){let n=!1,r=new Set,i=e=>{r.has(e)||(r.add(e),e.o?._===t&&(k(e),n=!0),M(e,i))};M(e,i),n&&w()}function lt(e){let t=!1,n,r=new Set,i=T.de,a=o=>{if(r.has(o)||!nt(o,e))return;r.add(o),o.Te=S;let s=o.o?.le?.values().next().value,c=o.S&2;s?(c||at(o,s),i!==null&&i(o)):(o.S&=-2,c||at(o),i!==null&&i(o),o.o?.ue&&(k(o),t=!0),o.o!==null&&(o.o.ue=!1),!o.u&&o.T&32&&(n??=[]).push(o)),M(o,a)};if(M(e,a),n)for(let e of n)ot(e);t&&w()}function ut(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function dt(e,n,r){let i=!1,a=!1;if(typeof n==`object`&&n&&V(()=>{i=n[Symbol.asyncIterator],a=!i&&ut(n)}),!a&&!i)return e.o!==null&&(e.o.Ee=null),e.Ie=!1,n;z(e).Ee=n;let o,s=()=>{let t=v(e);if(t&&e.S&4&&!je(t).Ne.has(e)){e._e=null;return}D.initTransition(t)},c=r=>{if(e.o?.Ee!==n)return;let i=r instanceof t;if(i&&e.Ie){e.o!==null&&(e.o.Ee=null),it(e,r),e.Te=S;return}s(),N(e,i?1:2,r),e.Te=S,i||st(e)},u=(t,i)=>{if(e.o?.Ee!==n||e.ie&130)return;s();let a=!!(e.S&4);Ze(e),ft(e);let o=_(e);if(o&&o.Ae.delete(e),r)r(t),a&&ft(e,!0);else if(e.o?.De!==void 0)e.Pe===l&&E(e),e.Pe=t,T.Oe!==null&&T.Oe(e,t),ee(e)||ye(e),e.Te=S;else if(o){let n=e.Re,r=e.be,i=e.Ue;try{(!n&&a||!i||!i(t,r))&&(e.be=t,e.Te=S,T.Oe!==null&&T.Oe(e,t),ye(e,!0))}catch(t){N(e,2,t)}}else try{U(e,()=>t)}catch(t){N(e,2,t)}e.Pe===l&&(e.Ie=!1),lt(e),w(),De(),i?.()},d=()=>e.T&32&&!e.u&&!(e.S&1)?($e(e),!0):!1,f=(t,r)=>{let i=t[Symbol.asyncIterator](),a=!1,s=!1,l=!r,f=()=>{if(!s){s=!0;try{let e=i.return?.();ut(e)&&e.then(void 0,()=>{})}catch{}}};r?r(f):qe(f);let p=()=>{d()||m()},m=()=>{let t,r,f=!1,h=!1,g=!0,_=i.next();if((ut(_)?_:{then:e=>void e(_)}).then(r=>{if(g&&l)t=r,f=!0,r.done&&(s=!0);else if(e.o?.Ee!==n)return;else r.done?(s=!0,a?(w(),De()):u(void 0),d()):(a=!0,u(r.value,p))},t=>{g&&l?(r=t,h=!0):e.o?.Ee===n&&(s=!0,c(t),d())}),g=!1,h){if(s=!0,c(r),l)throw r;return!0}return f&&!t.done?(o=t.value,a=!0,m()):f&&t.done},h=m();return l=!1,a||h},p=null,m=(e,t)=>{let n=!1;if(typeof e==`object`&&e&&V(()=>{n=e[Symbol.asyncIterator]}),!n)return!1;let r=f(e,t);return t||(p=r),!0};if(a){let r=!1,i=!1,a,s=!0,l=t=>{e.he?Array.isArray(e.he)?e.he.push(t):e.he=[e.he,t]:e.he=t};if(n.then(t=>{s?(o=t,r=!0):e.o?.Ee===n&&!(e.ie&64)&&m(t,l)||(u(t),d())},e=>{s?(a=e,i=!0):(c(e),d())}),s=!1,i)throw c(a),a;if(r)m(o)||(e.Ie=!1);else{if(e.Ie)return e.be;throw D.initTransition(v(e)),new t(F)}}if(i&&m(n),p!==null){if(!p){if(e.Ie)return e.be;throw D.initTransition(v(e)),new t(F)}e.Ie=!1}return o}function ft(e,t=!1){e.o?.le&&rt(e),e.o?.ue&&e.o!==null&&(e.o.ue=!1),e.o!==null&&(e.o.pe=!1),e.S=t?0:e.S&4,e.o?._&&at(e),(e.o?.Ge||e.o?.ge)&&T.de(e),e.o?.l&&e.T&2048&&T.ye!==null&&T.ye(e),e.o?.A&&e.o.A.call(e)}function N(e,r,i,a,o){r===2&&!(i instanceof n)&&!(i instanceof t)&&(i=new n(e,i));let s=r===1&&i instanceof t?i.source:void 0,c=s===e,l=r===1&&e.o?.De!==void 0&&!c,u=l&&ee(e);a||(r===1&&s?(tt(e,s),e.S=1|e.S&4,at(e,s,i)):(rt(e),e.S=r|(r===2?0:e.S&4),z(e)._=i),T.de!==null&&T.de(e),e.o?.l&&e.T&2048&&T.ye!==null&&T.ye(e)),o&&!a&&te(e,o);let d=a||u,f=a||l?void 0:o;if(e.o?.A){if(a&&r===1)return;d?e.o.A.call(e,r,i):e.o.A.call(e);return}M(e,(e,n)=>{if(e.Te=S,r===1&&s&&!e.o?.le?.has(s)||r!==1&&(e.o?._!==i||e.o?.le)){if(n.me&&r!==1&&!(i instanceof t)){k(e),w();return}!d&&!e._e&&E(e),N(e,r,i,d,f)}})}T.Ce=L,T.Fe=Ve;var P=!1,pt=!1,mt=!1,ht=!1,F=null,I=null;function L(e,n=!1){ve();let r=e.Re;if(!n){if(e._e&&(!r||C)&&C!==e._e&&D.initTransition(e._e),A(e,O(e)),e.o!==null&&(e.o.Ee=null),e._e||r===3)Ve(e);else if(e.ke!==null||e.he!==null){Be(e);let t=z(e);t.We=e.he,t.qe=e.ke,e.he=null,e.ke=null,e.Me=0}}let i=!!(e.ie&128),s=!!(e.T&128)&&e.o?.De!==l&&e.o?.De!==void 0,c=!!(e.S&4),f=e.S&2?e.o?._:void 0,p=(e.ie&a)!==0,m=e.Ie,h=F;F=e,e.Ye=null,e.Ze++,e.ie=4,e.Te=S;let g=e.Pe===l?e.be:e.Pe,_=e.Le,v=!1,ee=P,te=I;P=!0;let y=ht;if(ht=!1,i){let t=T.je(e,!0);t?I=t:t===!1&&(i=!1)}else if(C&&!n&&C.Ke.length){let t=T.je(e,!1);t&&(i=!0,I=t)}let b=r&&r!==2,x=pt;b&&(pt=!0);try{if(e.T&64)g=e.Se(g),e.o!==null&&(e.o.Ee=null),e.Ie=!1;else{let t=e.o?.Ee,n=e.Se(g),r=typeof n==`object`&&!!n,i=e.o?.Ee!==t;g=i||!r?n:dt(e,n),!i&&!r&&(e.o!==null&&(e.o.Ee=null),e.Ie=!1)}(e.S!==0||e.o!==null)&&ft(e,n),e.T&1024&&e.o?.Be&&T.ze(e)}catch(n){let r=n instanceof t;if(r&&e.Ie)it(e,n);else{r&&I&&T.$e(e);let t=!1;r&&(z(e).ue=!0,T.Je!==null&&(t=T.Je(e,p))),N(e,r?1:2,n,void 0,r?e.o?.Be:void 0),t&&T.p(e)}}finally{P=ee,ht=y,b&&(pt=x),v=(e.ie&o)!==0,e.ie=0|(n?e.ie&256:0),F=h}if(!e.o?._){Ze(e);let t=s?d(e.o?.De):e.Pe===l?e.be:e.Pe,a=!1;try{a=!r&&c||!e.Ue||!e.Ue(t,g)}catch(t){N(e,2,t)}if(r&&a&&(e.Xe=!e.o?._,n||e.C.enqueue(r,e.et??=T.tt.bind(null,e))),!e.o?._){if(a){let t=s?e.o?.De:void 0;n||r&&(C!==e._e||C===null)||i?(e.be=g,s&&i&&(z(e).De=g===void 0?u:g,e.Pe=l)):(e.Pe=g,m&&(e.Ie=!0),(C||e._e)&&T.Oe!==null&&T.Oe(e,g)),e.u!==null&&(!s||i||e.o?.De!==t)&&ye(e,i||s)}else if(s)e.Pe===l&&E(e),e.Pe=g,m&&(e.Ie=!0);else if(e.Le!=_)for(let t=e.u;t!==null;t=t.fe)Fe(t.ae,O(t.ae))}f!==void 0&&!a&&!e.o?._&&ct(e,f)}I=te,(e.Pe!==l||e.o!==null&&(e.o.qe!==null||e.o.We!==null)||e.S&5)&&(!n||e.S&1)&&(!e._e||s)&&E(e),e._e&&r&&C!==e._e&&Me(e._e,()=>L(e)),v&&(k(e),w())}function gt(e){if(!(e.ie&4)){if(e.ie&1)for(let t=e.nt;t;t=t.it){let n=t.ut,r=n.lt||n;if(r.Se&&gt(r),e.ie&2)break}(e.ie&130||e.o?._&&e.Te<S&&!e.o?.Ee)&&L(e),e.ie&=280}}function R(e,t){let n=t?.transparent??!1,r=typeof t==`object`&&!!t&&`loadingValue`in t,i={id:Ge(t,n,F),T:(n?4:0)|!!t?.ownedWrite|(!F||t?.lazy?32:0)|(t?.sync?64:0)|(t?.H?2:0)|0,Ue:t?.equals==null?bt:t.equals,he:null,C:F?.C??D,we:F?.we??f,Me:0,Se:e,be:r?t.loadingValue:void 0,Le:0,ot:void 0,st:null,nt:null,Ye:null,Ze:0,u:null,rt:null,ve:F,Ve:null,ct:null,ke:null,ie:t?.lazy?512:0,S:r?0:4,Te:S,Pe:l,_e:null,_t:-1,Ie:r,o:null};return t?.unobserved&&(z(i).ft=t.unobserved),yt(i,t),i}function z(e){return e.o??={De:void 0,Et:void 0,Be:void 0,Ge:void 0,ge:void 0,It:void 0,t:0,Ee:null,_:void 0,ue:void 0,le:void 0,A:void 0,pe:!1,l:null,ft:void 0,Qe:void 0,We:null,qe:null,Nt:void 0}}function _t(e,t,n,r,i,a){let o=a?.transparent??!1,s={id:Ge(a,o,F),T:(o?4:0)|!!a?.ownedWrite|(a?.sync?64:0)|0,Ue:!1,he:null,C:F?.C??D,we:F?.we??f,Me:0,Se:e,be:void 0,Le:0,ot:void 0,st:null,nt:null,Ye:null,Ze:0,u:null,rt:null,ve:F,Ve:null,ct:null,ke:null,ie:512,S:4,Te:S,Pe:l,_e:null,_t:-1,Ie:!1,Xe:!1,Tt:void 0,dt:t,St:n,At:void 0,Re:r,o:null};return i!==void 0&&(z(s).A=i),a?.unobserved&&(z(s).ft=a.unobserved),yt(s,vt),s}var vt={lazy:!0};function yt(e,t){e.st=e;let n=F?.Ct?F.Ot:F;if(F){let t=F.ke;t===null?F.ke=e:(e.Ve=t,t.ct=e,F.ke=e)}n&&(e.Le=n.Le+1),T.Rt!==null&&T.Rt(e),!t?.lazy&&L(e,!0)}function B(e,t,n=null){let r={Ue:t?.equals==null?bt:t.equals,T:+!!t?.ownedWrite|(t?.H?2:0),be:e,u:null,rt:null,Te:S,lt:n,ce:n?.o?.l||null,Pe:l,_e:null,_t:-1,o:null};return t?.unobserved&&(z(r).ft=t.unobserved),n&&(z(n).l=r,n.T|=c),r}function bt(e,t){return e===t}function V(e,t){if(T.Gt===null&&!P)return e();let n=P;P=!1;try{return T.Gt===null?e():T.Gt(e)}finally{P=n}}function xt(e,t){e.ie&512?(e.ie&=-513,L(e,!0)):e.ie&64?e.T&32&&L(e,!0):t&&gt(e)}function H(e){if(ht)return T.Pt(e);let t=F;t?.Ct&&(t=t.Ot);let n=e,r=e.lt||e;if(typeof n.Se==`function`&&xt(e,!1),!n.Se&&r===e&&e.o?.De===void 0&&e.o?.Qe===void 0&&C===null&&I===null)return t&&P&&et(e,t),!t||e.Pe===l||t.T&16?e.be:e.Pe;if(t&&P&&(et(e,t,mt),r.Se)){let n=O(e);r.Le>=n.xe&&(Le(t),Ie(n),gt(r));let i=r.Le;i>=t.Le&&e.ve!==t&&(t.Le=i+1)}if(r.S&1){if(t&&!(pt&&r._e&&C!==r._e)){if(I===null||T.ht(r))throw!P&&e!==t&&et(e,t),r.o?._}else if(t&&r.S&4)throw!P&&e!==t&&et(e,t),r.o?._;else if(!t&&r.S&4)throw r.o?._}if(r.Se&&r.S&2){if(P&&r.Te<S)return L(r),H(e);throw r.o?._}if(e.o?.De!==void 0&&e.o?.De!==l)return d(e.o?.De);if(I!==null&&C!==null&&t!==null&&T.Ft(e,r,t))return e.be;let i=!t||I!==null&&T.gt(e,r,t)||e.Pe===l||t.T&16||pt&&e._e&&C!==e._e?e.be:e.Pe;return!t&&r===e&&typeof n.Se==`function`&&e.T&32&&!(r.S&1)&&!e.u&&$e(e),i}function U(e,t){if(e._e&&C!==e._e&&D.initTransition(e._e),e.T&128)return T.vt(e,t);let n=e.Pe===l?e.be:e.Pe;if(typeof t==`function`&&(t=t(n)),!(e.S&4||!e.Ue||!e.Ue(n,t)))return t;let r=e.Pe!==l;return r||E(e),e.Pe=t,e.T&256&&T.Oe!==null&&T.Oe(e,t),e.Se!==void 0&&(e.Te=S),r&&e._t===_e&&I===null?t:(ye(e),w(),t)}function St(e){A(e,O(e)),!(e.ie&1024)&&e.Pe===l&&(E(e),w()),e.ie=e.ie&-4|i,e.kt=S}function Ct(e,t){let n=U(e,t);return St(e),n}function W(e,t){let n=F,r=P;F=e,P=!1;try{return t()}finally{F=n,P=r}}function wt(e,t,n,r){let i=_t(e,t,n,r?.user?2:1,Tt,r);L(i,!0),!r?.defer&&(i.Re===2||r?.schedule?i.C.enqueue(i.Re,Et.bind(null,i)):Et(i))}function Tt(e,t){let n=e===void 0?this.S:e,i=t===void 0?this.o?._:t;if(n&2){if(this.C.notify(this,1,0),this.Re===2){this.S&2&&(this.Xe=!0,this.C.enqueue(this.Re,this.et??=Et.bind(null,this)));return}if(!this.C.notify(this,2,2))throw fe(r(i)),i}else this.Re===1&&this.C.notify(this,3,n,i)}function Et(e){if(!e.Xe||e.ie&64)return;if(e.S&2&&e.Re===2){let t=r(e.o?._);e.Tt=e.be,e.Xe=!1;try{e.St?e.St(t,()=>{let t=e.At;e.At=void 0,t?.()}):console.error(t)}catch(t){if(!e.C.notify(e,2,2))throw fe(t),t}return}let t=e.At;e.At=void 0;try{t?.(),e.At=e.dt(e.be,e.Tt)}catch(t){if(z(e)._=new n(e,t),e.S|=2,!e.C.notify(e,2,2))throw fe(t),t}finally{e.Tt=e.be,e.Xe=!1}}T.tt=Et;function G(e){let t=H.bind(null,e);return t[p]=e,t}function Dt(e,t){if(typeof e==`function`){let n=R(e,t);return n.T&=-33,[G(n),Ct.bind(null,n)]}let n=B(e,t);return[G(n),U.bind(null,n)]}function Ot(e,t){return G(R(e,t))}function kt(e,t,n){wt(e,t,void 0,n)}var At=Symbol(0);function jt(e,t,n){let r=typeof n?.keyed==`function`?n.keyed:void 0,i=t.length>1,a=t,o={jt:j(),Wt:0,xt:e,Kt:[],$t:a,qt:[],zt:[],Jt:r,Xt:r||n?.keyed===!1?[]:void 0,Yt:i&&n?.keyed!==!1?[]:void 0,Zt:n?.keyed===!1,ts:n?.fallback},s=R(Nt.bind(o));return o.jt.Ot=s,s.T&=-33,G(s)}var Mt={ownedWrite:!0};function Nt(){let e=this.xt()||[],t=e.length;return e[At],W(this.jt,()=>{let n,r,i,a,o=this.Xt?this.Zt?()=>(i[r]=B(e[r],Mt),this.$t(G(i[r]),r)):()=>(i[r]=B(e[r],Mt),a&&(a[r]=B(r,Mt)),this.$t(G(i[r]),a?G(a[r]):void 0)):this.Yt?()=>{let t=e[r];return a[r]=B(r,Mt),this.$t(t,G(a[r]))}:()=>{let t=e[r];return this.$t(t)};if(t===0)this.Wt!==0&&(this.jt.dispose(!1),this.zt=[],this.Kt=[],this.qt=[],this.Wt=0,this.Xt&&=[],this.Yt&&=[]),this.ts&&!this.qt[0]&&(this.zt[0]?.dispose(),this.qt[0]=W(this.zt[0]=j(),this.ts));else if(this.Wt===0){let s=Array(t),c=Array(t);i=this.Xt&&Array(t),a=this.Yt&&Array(t);try{for(r=0;r<t;r++)s[r]=W(c[r]=j(),o)}catch(e){for(n=0;n<=r;n++)c[n]?.dispose();throw e}this.zt[0]&&this.zt[0].dispose(),this.qt=s,this.zt=c,i&&(this.Xt=i),a&&(this.Yt=a),this.Kt=e.slice(0),this.Wt=t}else{let s,c,l,u,d,f,p,m,h;for(s=0,c=Math.min(this.Wt,t);s<c&&(this.Kt[s]===e[s]||this.Xt&&Pt(this.Jt,this.Kt[s],e[s]));s++)this.Xt&&U(this.Xt[s],e[s]);for(c=this.Wt-1,l=t-1;c>=s&&l>=s&&(this.Kt[c]===e[l]||this.Xt&&Pt(this.Jt,this.Kt[c],e[l]));c--,l--);if(s===t&&this.Wt===t){this.Kt=e.slice(0);return}let g=t-this.Wt,_=Array(t),v=Array(t);for(i=this.Xt?Array(t):void 0,a=this.Yt?Array(t):void 0,f=new Map,p=Array(l+1),r=l;r>=s;r--)u=e[r],d=this.Jt?this.Jt(u):u,n=f.get(d),p[r]=n===void 0?-1:n,f.set(d,r);for(n=s;n<=c;n++)u=this.Kt[n],d=this.Jt?this.Jt(u):u,r=f.get(d),r!==void 0&&r!==-1?(_[r]=this.qt[n],v[r]=this.zt[n],i&&(i[r]=this.Xt[n]),a&&(a[r]=this.Yt[n]),r=p[r],f.set(d,r)):(m??=[]).push(this.zt[n]);try{for(r=s;r<=l;r++)v[r]===void 0&&((h??=[]).push(v[r]=j()),_[r]=W(v[r],o))}catch(e){if(h)for(n=0;n<h.length;n++)h[n].dispose();throw e}for(n=0;n<s;n++)_[n]=this.qt[n],v[n]=this.zt[n],i&&(i[n]=this.Xt[n]),a&&(a[n]=this.Yt[n]);for(r=s;r<=l;r++)i&&U(i[r],e[r]),a&&U(a[r],r);for(r=l+1;r<t;r++)_[r]=this.qt[r-g],v[r]=this.zt[r-g],i&&(i[r]=this.Xt[r-g],U(i[r],e[r])),a&&(a[r]=this.Yt[r-g],g!==0&&U(a[r],r));if(this.qt=_,this.zt=v,i&&(this.Xt=i),a&&(this.Yt=a),this.Wt=t,this.Kt=e.slice(0),m)for(n=0;n<m.length;n++)m[n].dispose()}}),this.qt}function Pt(e,t,n){return!e||e(t)===e(n)}function Ft(e,t){let n=R(e,{lazy:!0});return z(n).A=(e,t)=>{let i=e===void 0?n.S:e,a=t===void 0?n.o?._:t;n.S&=~n.R;let o=n.C.notify(n,3,i,a),s=i&~n.R&3;if(s&&(n.S&=~s,n.o?._===a&&!(n.S&3)&&n.o!==null&&(n.o._=void 0)),!o&&i&2)throw fe(r(a)),a},n.R=t,n.T&=-33,L(n,!0),n}function It(e,t,n,r){let i=e.C;return i.addChild(e.C=n),qe(()=>i.removeChild(e.C)),W(e,()=>{let e=R(t);return Ft(()=>Ht(H(e)),r)})}var Lt=Symbol(),Rt=class extends he{ee;v=new Set;te;N=!0;I=B(!1,{ownedWrite:!0,H:!0});_;D=B(!1,{ownedWrite:!0,H:!0});W;L=!1;re;ne=Lt;constructor(e){super(),this.ee=e}run(e){if(!(!e||H(this.I)))return super.run(e)}notify(e,t,n,i){if(!(t&this.ee))return super.notify(e,t,n,i);if(this.L&&this.re){let e=V(()=>{try{return this.re()}catch{return Lt}});e!==this.ne&&(this.ne=e,this.L=!1,this.v.clear())}if(this.ee&1&&this.L)return super.notify(e,t,n,i);if(n&this.ee){this.N=!0;let t=i?.source||e.o?._?.source;if(t){let e=this.v.size===0;this.v.add(t),e&&U(this.I,!0),this.ee&2&&U(this._,r(t.o?._))}}return t&=~this.ee,!t||super.notify(e,t,n,i)}se(){for(let e of this.v)(e.ie&64||!e.o?.t&&!(e.S&this.ee)&&!(this.ee&2&&e.S&1))&&this.v.delete(e);if(!this.v.size&&(this.N=this.ee&1&&this.N&&!this.L&&this.te?!!(this.te.S&this.ee):!1,!this.N&&(U(this.I,!1),this.re)))try{this.ne=V(()=>this.re())}catch{}}};function zt(e,n,r,i){let a=j(),o=new Rt(e);e===2&&(o._=B(void 0,{ownedWrite:!0,H:!0})),i&&(o.re=i);let s=o.te=It(a,n,o,e);return V(()=>{let n=!1;try{H(s)}catch(e){if(e instanceof t)n=!0;else throw e}o.N=n||!!(s.S&e)||s.o?._ instanceof t}),G(R(()=>{if(!H(o.I)){let e=H(s);if(!V(()=>H(o.I)))return o.L=!0,e}return r(o)},{H:!0}))}function Bt(e,t,n){return zt(1,e,()=>t(),n?.on)}function Vt(e,t){return zt(2,e,e=>t(G(e._),()=>{for(let t of e.v)L(t);w()}))}function Ht(e,t){if(typeof e==`function`&&!e.length){if(t?.doNotUnwrap)return e;do e=e();while(typeof e==`function`&&!e.length)}if(!(t?.skipNonRendered&&(e==null||e===!0||e===!1||e===``))){if(Array.isArray(e)){let n=[];return Ut(e,n,t)?()=>{let e=[];return Ut(n,e,{...t,doNotUnwrap:!1}),e}:n}return e}}function Ut(e,n=[],r){let i=null,a=!1;for(let o=0;o<e.length;o++)try{let t=e[o];if(typeof t==`function`&&!t.length){if(r?.doNotUnwrap){n.push(t),a=!0;continue}do t=t();while(typeof t==`function`&&!t.length)}Array.isArray(t)?a=Ut(t,n,r):r?.skipNonRendered&&(t==null||t===!0||t===!1||t===``)||n.push(t)}catch(e){if(!(e instanceof t))throw e;i=e}if(i)throw i;return a}var Wt=!1,Gt={hydrating:!1,registry:void 0,done:!1},Kt,qt,Jt,Yt,Xt,Zt=(...e)=>(Kt||Ot)(...e),Qt=(...e)=>(qt||Dt)(...e),$t=(...e)=>(Jt||Vt)(...e),en=(...e)=>(Yt||kt)(...e),tn=(e,t,n)=>(Xt||Bt)(e,t,n);function K(e,t){return V(()=>e(t||{}))}var nn=0;function rn(){return Gt.hydrating?Gt.getNextContextId():`cl-${nn++}`}var an=e=>`Stale read from <${e}>.`;function on(e){let t=`fallback`in e?{keyed:e.keyed,fallback:()=>e.fallback}:{keyed:e.keyed};return jt(()=>e.each,e.children,t)}function sn(e){let t=e.keyed,n=Ot(()=>e.when,void 0),r=t?n:Ot(n,{equals:(e,t)=>!e==!t,sync:!0});return Ot(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?V(t?()=>a(i):()=>a(()=>{if(!V(r))throw an(`Show`);return n()}),Wt):a}return e.fallback},{sync:!0})}function cn(e){return $t(()=>e.children,(t,n)=>{let r=e.fallback;return typeof r==`function`&&r.length?r(t,n):r})}function ln(e){return tn(()=>e.children,()=>e.fallback,`on`in e?{on:()=>e.on}:void 0)}var q=Symbol(`slot`),un=Symbol(`host`),dn={transparent:!0,sync:!0};function J(e,t,n){en(e,t,n?{sync:!0,...n,transparent:!n.scope}:dn)}function fn(e,t,n,r){let i=n.length,a=t.length,o=i,s=0,c=0,l=t[a-1],u=l[q],d=l.parentNode===e&&(!u||u===r)?l.nextSibling:r||null,f=null,p,m,h=t=>{if(!t)return!1;let n=t[q];return t.parentNode===e&&(!n||n===r)};for(;s<a||c<o;){if(t[s]===n[c]&&h(t[s])){s++,c++;continue}for(;t[a-1]===n[o-1]&&h(t[a-1]);)a--,o--;if(a===s){let t;if(o<i){if(c){let i=n[c-1],a=i[q];t=i.parentNode===e&&(!a||a===r)?i.nextSibling:d}else t=n[o-c]}else t=d;for(;c<o;){let i=n[c++];e.insertBefore(i,t),r&&(i[q]=r)}}else if(o===c)for(;s<a;){let n=t[s++];if(!f||!f.has(n)){let t=n[q];n.parentNode===e&&(!t||t===r)&&n.remove()}}else if((p=t[s])===n[o-1]&&n[c]===t[a-1]&&p.parentNode===e&&(!(m=p[q])||m===r)){if(r)do{let n=t[--a];if(e.insertBefore(n,p),n[q]=r,c++,s>=a-1||c>=o)break}while(t[s]===n[o-1]&&n[c]===t[a-1]);else do if(e.insertBefore(t[--a],p),c++,s>=a-1||c>=o)break;while(t[s]===n[o-1]&&n[c]===t[a-1])}else{if(!f){f=new Map;let e=c;for(;e<o;)f.set(n[e],e++)}let i=f.get(t[s]);if(i!=null){if(c<i&&i<o){let l=s,u=1,p;for(;++l<a&&l<o&&(p=f.get(t[l]))!=null&&p===i+u;)u++;if(u>i-c){let a=t[s],o=a[q],l=a.parentNode===e&&(!o||o===r)?a:d;for(;c<i;){let t=n[c++];e.insertBefore(t,l),r&&(t[q]=r)}}else{let i=t[s++],a=n[c++],o=i[q];i.parentNode===e&&(!o||o===r)?e.replaceChild(a,i):e.insertBefore(a,d),r&&(a[q]=r)}}else s++}else{let n=t[s++],i=n[q];n.parentNode===e&&(!i||i===r)&&n.remove()}}}}var pn=`_$SOLID_EVENT_OWNER`,mn={},hn=new Set,Y=new Map;function gn(e,t,n,r={}){let i;yn(t);try{Ye(a=>{if(i=a,t===document){let t=e();J(()=>Ht(t),()=>{})}else{let i=e();Q(t,()=>i,t.firstChild?null:void 0,n,{...r.insertOptions,schedule:!0})}},{id:r.renderId}),De()}catch(e){throw i&&i(),bn(t),e}return()=>{i(),bn(t),t.textContent=``}}function _n(e,t,n){let r=document.createElement(`template`);return r.innerHTML=e,n===2?r.content.firstChild.firstChild:r.content.firstChild}function X(e,t){let n;return t===1?r=>document.importNode(n||=_n(e,r,t),!0):r=>(n||=_n(e,r,t)).cloneNode(!0)}function vn(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];hn.has(n)||(hn.add(n),Y.forEach((e,t)=>Cn(n,t,e)))}}function yn(e){let t=xn(e,e);t&&(t.roots=(t.roots||0)+1)}function bn(e){let t=Y.get(e);t&&(t.roots>1?t.roots--:delete t.roots),Sn(e,e)}function xn(e,t=e){if(!e||!t)return;let n=Y.get(e);return n||Y.set(e,n={owners:new Map,handlers:new Map}),n.owners.set(t,(n.owners.get(t)||0)+1),hn.forEach(t=>Cn(t,e,n)),n}function Sn(e,t=e){let n=Y.get(e);if(!n)return;let r=n.owners.get(t);r>1?n.owners.set(t,r-1):n.owners.delete(t),!n.owners.size&&(n.handlers.forEach((t,n)=>e.removeEventListener(n,t)),Y.delete(e))}function Cn(e,t,n){if(n.handlers.has(e))return;let r=e=>An(e,t,n);n.handlers.set(e,r),t.addEventListener(e,r)}function wn(e,t){let n=e,r=0;for(;n;){if(t.owners.has(n))return{owner:n,distance:r};r++,n=n._$host||n.parentNode||n.host}}var Tn=null;function En(e){if(Tn!==null)for(let t=0;t<Tn.length;t++)Tn[t](e);return e}function Dn(e,t,n){kn(e)||(n==null||n===!1?e.removeAttribute(t):e.setAttribute(t,n===!0?``:n),Tn!==null&&(t===`href`||t===`action`)&&En(e))}var On={scope:!0},Z=null;function Q(e,t,n,r,i){let a=n!==void 0,o=i&&i.host;if(a&&!r&&(r=[]),Z!==null&&(r=Z.claimInitial(e,a,r)),typeof t!=`function`&&(t=Mn(t,r,a,!0),typeof t!=`function`)){jn(e,t,r,n),o&&Nn(t,o);return}if(a&&r.length===0){let t=document.createTextNode(``);e.insertBefore(t,n),r=[t]}let s=r;J(r=>{Z!==null&&(s=Z.reclaimRegion(s,e,n));let c=Mn(t(),s,a,!0);return typeof c==`function`?(J(()=>(Z!==null&&(s=Z.reclaimRegion(s,e,n)),Mn(c,s,a)),t=>{s=jn(e,t,s,n),o&&Nn(s,o)},r!==void 0&&!(i&&i.schedule)?{...i,schedule:!0}:i),mn):c},t=>{t!==mn&&(s=jn(e,t,s,n),o&&Nn(s,o))},t.$s?i?{...i,scope:!0}:On:i)}function kn(e){if(!Gt.hydrating)return!1;if(!e||e.isConnected)return!0;let t=Gt.claimRoots;if(t){for(let n=0;n<t.length;n++)if(t[n].contains(e))return!0}return!1}function An(e,t,n){if(Z!==null&&Z.dedupEvent(e))return;let r=e[pn],i;if(r){if(r===!0||r===t||!t.contains(r))return;i=r}let a=n&&(n.owners.size===1&&n.owners.has(t)?t:wn(e.target,n)?.owner);if(n&&!a||a&&a===i)return;e[pn]=a||!0;let o=i||e.target,s=`$$${e.type}`,c=e.target,l=a||t||e.currentTarget,u=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),d=()=>{let t=o[s];if(t===void 0&&o.hasAttribute&&o.hasAttribute(`_bnd`)){let n=globalThis[Symbol.for(`solid.bnd`)];n&&(t=n.resolve(o,e.type))}if(t&&!o.disabled){let n=o[`${s}Data`];if(n===void 0?t.call(o,e):t.call(o,n,e),e.cancelBubble)return}return o.host&&typeof o.host!=`string`&&!o.host._$host&&o.contains(e.target)&&u(o.host),!0},f=()=>{for(;o&&d()&&o!==l&&o.parentNode!==l;)o=o._$host||o.parentNode||o.host};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return o||l||document}}),i)i===e.target&&(o=i._$host||i.parentNode||i.host),o&&o!==l&&f();else if(e.composedPath){let t=e.composedPath();if(t.length){u(t[0]);for(let e=0;e<t.length&&(o=t[e],d());e++){if(o._$host){o=o._$host,f();break}if(o===l||o.parentNode===l)break}}else f()}else f();u(c)}function jn(e,t,n,r){if(Z!==null&&kn(e)){if(t&&t!==n){let e=Array.isArray(t);for(let r of e?t:[t])if(r&&r.nodeType){if(!kn(r))return n}else if(e&&(typeof r==`string`||typeof r==`number`))return n}return t}if(t===n)return t;let i=typeof t,a=r!==void 0;if(i===`string`||i===`number`){let r=typeof n;r===`string`||r===`number`?e.firstChild.data=t:Fn(e,n)?e.textContent=t:(In(e,n),e.insertBefore(document.createTextNode(t),e.firstChild))}else if(t===void 0)Ln(e,n,r);else if(t.nodeType)Array.isArray(n)?Ln(e,n,a?r:null,t):n&&n.nodeType?n.parentNode===e?e.replaceChild(t,n):e.appendChild(t):n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t),r&&(t[q]=r);else if(Array.isArray(t)){let i=n&&Array.isArray(n);for(let e=0,r=t.length;e<r;e++){let r=t[e],a=typeof r;if(a===`string`||a===`number`){let a=i?n[e]:void 0;a&&a.nodeType===3?(a.data!==``+r&&(a.data=r),t[e]=a):t[e]=document.createTextNode(r)}}t.length===0?Ln(e,n,r):i?n.length===0?Pn(e,t,r):fn(e,n,t,r):(n&&Ln(e,n),Pn(e,t))}return t}function Mn(e,t,n,r){if(e=Ht(e,{skipNonRendered:!0,doNotUnwrap:r}),r&&typeof e==`function`)return e;if(n&&!Array.isArray(e)&&(e=[e??``]),Gt.hydrating&&Array.isArray(e))for(let n=0,r=e.length;n<r;n++){let r=e[n],i=t&&t[n],a=typeof r;(a===`string`||a===`number`)&&i&&i.nodeType===3&&(e[n]=i)}return e}function Nn(e,t){if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)Nn(e[n],t);else e&&e.nodeType&&e[un]!==t&&(e[un]=t,Object.defineProperty(e,"_$host",{get:t,configurable:!0}))}function Pn(e,t,n=null){for(let r=0,i=t.length;r<i;r++){let i=t[r];e.insertBefore(i,n),n&&(i[q]=n)}}function Fn(e,t){if(t==null)return!0;if(Array.isArray(t))return t.length?e.firstChild===t[0]&&e.lastChild===t[t.length-1]:e.firstChild===null;if(t===``)return e.firstChild===null;if(t.nodeType)return e.firstChild===t&&e.lastChild===t;let n=e.firstChild;return n!==null&&n.nodeType===3&&e.lastChild===n}function In(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];r.parentNode===e&&r.remove()}else if(t.nodeType)t.parentNode===e&&t.remove();else{let t=e.firstChild;t&&t.nodeType===3&&t.remove()}}function Ln(e,t,n,r){if(n===void 0)return Fn(e,t)?e.textContent=``:In(e,t);if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(r!==o){let t=o[q],s=o.parentNode===e&&(!t||t===n);r&&!i&&!a?s?e.replaceChild(r,o):e.insertBefore(r,n):s&&o.remove()}else i=!0}}else r&&e.insertBefore(r,n);r&&n&&(r[q]=n)}var Rn=class{#e;constructor(e,t){this.#e=new URL(e,t)}async fetchBody(){try{let e=await fetch(this.#e);return e.ok?await e.json():void 0}catch{return}}},zn=class e{static#e={channel:`https://api-channel.sooplive.com`,profile:`https://stimg.sooplive.com`,preview:`https://liveimg.sooplive.com`};static station(t){let n=`/v1.1/channel/${t}/station`,r=e.#e.channel;return new Rn(n,r)}static broadcast(t){let n=`/v1.1/channel/${t}/home/section/broad`,r=e.#e.channel;return new Rn(n,r)}static profile(t){let[n,r]=[t,t.substring(0,2)],i=`/LOGO/${r}/${n}/${n}.webp`,a=e.#e.profile;return new URL(i,a)}static preview(t){let n=`/${t}`,r=e.#e.preview;return new URL(n,r)}},Bn=class e{id;profile;nickname;constructor(e){this.id=e.id,this.nickname=e.nickname,this.profile=zn.profile(this.id)}async fetchBroadcast(){return Vn.create(this.id)}static async create(t){let n=await zn.station(t).fetchBody();if(!n)return;let{userNick:r,broadStart:i,profileImage:a}=n.station;return new e({id:t,nickname:r})}},Vn=class e{id;preview;title;viewers;category;static async create(t){let n=await zn.broadcast(t).fetchBody();if(!n||typeof n.broadNo!=`number`||!Number.isFinite(n.broadNo))return;let{broadNo:r,broadTitle:i,currentSumViewer:a,categoryName:o}=n;return new e({id:r.toString(),title:i,viewers:a,category:o})}constructor(e){this.id=e.id,this.title=e.title,this.viewers=e.viewers,this.category=e.category,this.preview=zn.preview(this.id)}},Hn=X(`<div class=avatar-preview-anchor>`),Un=X(`<img class=avatar>`),Wn=X(`<button class=avatar-more type=button>+`),Gn=X(`<div class=avatar-overflow role=list>`),Kn=X(`<section class=avatar-list aria-label="Avatar list"style=min-width:264px><div class=avatar-stack><!><!></div><!><!>`),qn=X(`<div class=avatar-stack-item>`),Jn=X(`<div class=avatar-overflow-item role=listitem>`),Yn=X(`<img class=avatar-preview alt="Broadcast preview">`);function Xn(e){let t=Zt(async()=>{let t=await Bn.create(e.userId);return t?{user:t,broad:await t.fetchBroadcast()}:{user:void 0,broad:void 0}}),n=()=>t()?.user,r=()=>t()?.broad?.preview.href,i=()=>!!r();return K(cn,{fallback:[],get children(){return K(ln,{fallback:[],get children(){var t=Hn();return t.addEventListener(`blur`,()=>e.onPreviewChange?.(void 0)),t.addEventListener(`focus`,()=>e.onPreviewChange?.(r())),t.addEventListener(`mouseleave`,()=>e.onPreviewChange?.(void 0)),t.addEventListener(`mouseenter`,()=>e.onPreviewChange?.(r())),Q(t,K(sn,{get when(){return n()},keyed:!0,children:t=>(()=>{var n=Un();return J(()=>({e:t.profile.href,t:`${e.userId} profile`}),({e,t},r)=>{e!==r?.e&&Dn(n,`src`,e),t!==r?.t&&Dn(n,`alt`,t)}),n})()})),J(()=>({e:!!i(),t:!i()}),({e,t:n},r)=>{e!==r?.e&&t.classList.toggle(`avatar-live`,e),n!==r?.t&&t.classList.toggle(`avatar-offline`,n)}),t}})}})}function Zn(e){let[t,n]=Qt(!1),[r,i]=Qt(),a=`avatar-overflow-${rn()}`,o=()=>typeof e.userIds==`function`?e.userIds():e.userIds,s=()=>{let t=typeof e.visibleCount==`function`?e.visibleCount():e.visibleCount;return Math.max(0,t??4)},c=()=>o().slice(0,s()),l=()=>o().slice(s());var u=Kn(),d=u.firstChild,f=d.firstChild,p=f.nextSibling,m=d.nextSibling,h=m.nextSibling;return Q(d,K(on,{get each(){return c()},children:e=>(()=>{var t=qn();return Q(t,K(Xn,{userId:e,onPreviewChange:i})),t})()}),f),Q(d,K(sn,{get when(){return l().length>0},get children(){var e=Wn();return e.firstChild,e.$$click=()=>n(e=>!e),Dn(e,`aria-controls`,a),Q(e,()=>l().length,null),J(()=>t()?`true`:`false`,t=>{Dn(e,`aria-expanded`,t)}),e}}),p),Q(u,K(sn,{get when(){return t()},get children(){var e=Gn();return Dn(e,`id`,a),Q(e,K(on,{get each(){return l()},children:e=>(()=>{var t=Jn();return Q(t,K(Xn,{userId:e,onPreviewChange:i})),t})()})),e}}),m),Q(u,K(sn,{get when(){return r()},children:e=>(()=>{var t=Yn();return J(()=>e(),e=>{Dn(t,`src`,e)}),t})()}),h),u}vn([`click`]);var Qn=`.avatar-preview-anchor{border-radius:50%;place-items:center;width:40px;height:40px;display:grid;position:relative}.avatar-preview-anchor.avatar-live{box-sizing:border-box;background:linear-gradient(113.84deg,#0082ff 5.63%,#0a96ff 44.46%,#05bcff 57.4%,#00f0ff 75.9%,#04f0fc 78.67%,#10f1f5 81.44%,#24f4e8 84.22%,#40f7d7 87.92%,#64fbc1 90.69%,#82ffb0 92.54%);padding:2px}.avatar{object-fit:cover;border-radius:50%;width:36px;height:36px;display:block}.avatar-offline .avatar{filter:grayscale()}.avatar-preview{z-index:30;pointer-events:none;width:min(372px,100vw);max-width:372px;position:absolute;bottom:calc(100% + .75rem);left:auto;right:0}.avatar-list .avatar-preview{aspect-ratio:16/9;object-fit:cover}.avatar-preview-anchor:hover,.avatar-preview-anchor:focus-within{transition:transform .15s;transform:scale(1.08)}.avatar-list{width:100%;max-width:264px;position:relative}.avatar-stack{align-items:center;width:100%;min-height:40px;display:flex}.avatar-stack-item{flex:0 0 40px;height:40px;margin-right:-12px;position:static}.avatar-stack-item:hover,.avatar-stack-item:focus-within{z-index:10}.avatar-more{z-index:11;color:#fff;cursor:pointer;width:40px;height:40px;font:inherit;background:#282c34;border:1px solid #fff9;border-radius:50%;flex:0 0 40px;margin-left:8px;font-size:.85rem;position:relative}.avatar-overflow{z-index:20;box-sizing:border-box;background:#20242b;border:1px solid #fff3;border-radius:8px;grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:12px;width:100%;max-height:200px;padding:12px;display:grid;position:absolute;top:52px;left:0;overflow:auto}.avatar-overflow-item{place-items:center;height:40px;display:grid}`,$n=0,$;function er(e){let[t,n]=Qt(e.userIds),[r,i]=Qt(e.visibleCount),a=!1;$n===0&&($=document.createElement(`style`),$.dataset.soopAvatar=``,$.textContent=Qn,document.head.appendChild($)),$n+=1;let o=gn(()=>K(Zn,{userIds:t,visibleCount:r}),e.target);return{update(e){e.userIds&&n(e.userIds),e.visibleCount!==void 0&&i(e.visibleCount)},destroy(){a||(a=!0,o(),--$n,$n===0&&($?.remove(),$=void 0))}}}return e.AvatarList=Zn,e.mount=er,e})({});
1
+ var SoopAvatar=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=class extends Error{source;constructor(e){let t=Error,n=t.stackTraceLimit;n!==void 0&&(t.stackTraceLimit=0),super(),n!==void 0&&(t.stackTraceLimit=n),this.source=e}},n=class extends Error{source;constructor(e,t){super(t instanceof Error?t.message:String(t),{cause:t}),this.source=e}};function r(e){return e instanceof n?e.cause:e}var i=1024,a=2048,o=4096,s=1024,c=4096,l={},u={};function d(e){return e===u?void 0:e}var f={},p=Symbol(`refresh`),m=new Set;function h(e){for(;e.tn;)e=e.tn;return e}function g(e,t){if(e=h(e),t=h(t),e===t)return e;t.tn=e;for(let n of t.Ae)e.Ae.add(n);return t.Ae.clear(),e.en[0].push(...t.en[0]),e.en[1].push(...t.en[1]),t.en[0].length=0,t.en[1].length=0,e}function _(e){let t=e.o?.Be;if(!t)return;let n=h(t);if(m.has(n))return n;e.o!==null&&(e.o.Be=void 0)}function v(e){if(ee(e)&&e.o?.Et){let t=z(e).Et=je(e.o?.Et);if(t.an!==!0)return t;e.o!==null&&(e.o.Et=null)}return _(e)?._e??e._e}function ee(e){let t=e.o;return t!==null&&t.De!==void 0&&t.De!==l}function te(e,t){let n=h(t),r=e.o?.Be;if(r){if(r.tn){z(e).Be=t,e.T|=s;return}let i=h(r);if(m.has(i)){i!==n&&!ee(e)&&(n.rn&&h(n.rn)===i?(z(e).Be=t,e.T|=s):i.rn&&h(i.rn)===n||g(n,i));return}}z(e).Be=t,e.T|=s}var y=new Set,b={eE:Array(2e3).fill(void 0),tE:!1,xe:0,EE:0},x={eE:Array(2e3).fill(void 0),tE:!1,xe:0,EE:0};function ne(e){e.ie&16?e.ie&=-12:(A(e,x),e.ie&=-4)}var S=0,C=null,re=!1,ie=!1,ae=!1,oe=0,se=new Set;function ce(e){let t=e.k;return y.size===0&&m.size===0&&e.Qt.length===0&&t.Ke.length===0&&t.m.length===0&&t.cn.size===0&&se.size===0}function le(){if(se.size!==0)for(let e of se){if(e.u!==null){se.delete(e);continue}e.Pe===l&&(e.o?.De===void 0||e.o?.De===l)&&(e.o?.t||(se.delete(e),e.o?.ft?.()))}}function ue(){return{Te:S,yt:[],Ne:new Map,Ke:[],m:[],cn:new Set,oe:[],bt:{Lt:[[],[]],Qt:[]},an:!1,ln:new Set}}function de(e,t){t.an=e,e.oe.push(...t.oe);for(let n of m)n._e===t&&(n._e=e);t.Ke.length&&(e.Ke.push(...t.Ke),t.Ke.length=0),t.m.length&&(e.m.push(...t.m),t.m.length=0);for(let n of t.cn)e.cn.add(n);for(let[n,r]of t.Ne){let t=e.Ne.get(n);t||e.Ne.set(n,t=new Set);for(let e of r)t.add(e)}for(let n of t.ln)e.ln.add(n)}function w(){if(ie){pe();return}re||(re=!0,!oe&&!D.sn&&queueMicrotask(De))}function fe(e){if(ie)return;ie=!0;let t=`[REACTIVITY_HALTED]`;e===void 0?console.error(t):console.error(t,e)}function pe(){ae||(ae=!0,console.error(`[REACTIVITY_HALTED]`))}var me=0,he=class{ve=null;Lt=[[],[]];Qt=[];Mt=0;created=S;addChild(e){this.Qt.push(e),e.ve=this}removeChild(e){let t=this.Qt.indexOf(e);t>=0&&(this.Qt.splice(t,1),e.ve=null)}notify(e,t,n,r){return this.ve?this.ve.notify(e,t,n,r):!1}run(e){if(this.Lt[e-1].length){let t=this.Lt[e-1];this.Lt[e-1]=[],Oe(t,e)}let t=this.Qt,n=++me;for(let r=0;r<t.length;){let i=t[r];if(i.Mt!==n&&(i.Mt=n,i.run?.(e),t[r]!==i)){r=0;continue}r++}}enqueue(e,t){e&&(I?h(I).en[e-1].push(t):this.Lt[e-1].push(t)),w()}stashQueues(e){e.Lt[0].push(...this.Lt[0]),e.Lt[1].push(...this.Lt[1]),this.Lt=[[],[]];for(let t=0;t<this.Qt.length;t++){let n=this.Qt[t],r=e.Qt[t];r||(r={Lt:[[],[]],Qt:[]},e.Qt[t]=r),n.stashQueues(r)}}restoreQueues(e){this.Lt[0].push(...e.Lt[0]),this.Lt[1].push(...e.Lt[1]);for(let t=0;t<e.Qt.length;t++){let n=e.Qt[t],r=this.Qt[t];r&&r.restoreQueues(n)}}},T=class e extends he{sn=!1;k=ue();static Ce;static Fe;static tt;static Vt=null;static G=null;static M=null;static h=null;static j=null;static Rt=null;static Gt=null;static Oe=null;static de=null;static ye=null;static un=null;static Pt=null;static Dt=null;static Ht=null;static Je=null;static p=null;static Bt=null;static wt=null;static vt=null;static fn=null;static En=null;static Tn=null;static dn=null;static Ft=null;static ht=null;static gt=null;static je=null;static $e=null;static ze=null;static In=null;flush(){if(!this.sn){if(C===null&&b.EE<b.xe&&this.Lt[0].length===0&&this.Lt[1].length===0&&this.Qt.length===0&&ce(this)){this.sn=!0;try{Se()}finally{this.sn=!1}S++,re=b.EE>=b.xe||this.Lt[0].length!==0||this.Lt[1].length!==0||this.k.yt.length!==0;return}this.sn=!0;try{if(Re(b,e.Ce),C){if(!Ae(C)){let t=C;Re(x,this.k===t?ne:e.Ce),this.k===t&&(Ee=this.k=ue()),m.size&&(e.dn(1),e.dn(2)),this.stashQueues(t.bt),S++,re=b.EE>=b.xe||this.k.yt.length>0,Te(t.yt),C=null,Ce(null,!0);return}let t=C,n=this.k;if(n!==t&&n.yt.push(...t.yt),this.restoreQueues(t.bt),y.delete(t),C=null,Te(n.yt),Ce(t),n===t){let e=ue();e.yt=n.yt,e.Ke=n.Ke,e.m=n.m,e.cn=n.cn,Ee=this.k=e}}else ce(this)?(Se(),b.EE>=b.xe&&(Re(b,e.Ce),Se())):(y.size&&Re(x,e.Ce),Ce());S++,re=b.EE>=b.xe,m.size&&e.dn(1),this.run(1),m.size&&e.dn(2),this.run(2)}finally{this.sn=!1}}}notify(t,n,r,i){if(n&1){if(r&1){let n=i===void 0?t.o?._:i;if(n?.i)return!0;if(C&&n){let r=n.source,i=C.Ne.get(r);i||C.Ne.set(r,i=new Set);let a=i.size;i.add(t),i.size!==a&&(w(),e.wt?.(C))}}return!0}return!1}initTransition(e){if(e&&=je(e),e&&e===C||!e&&C&&C.Te===S)return;if(!C)C=e??ue();else if(e){let t=C;de(e,t),y.delete(t),C=e}y.add(C),C.Te=S;let t=this.k;if(t!==C){for(let e=0;e<t.yt.length;e++){let n=t.yt[e];n._e=C,C.yt.push(n)}for(let e=0;e<t.Ke.length;e++){let n=t.Ke[e];n._e=C,C.Ke.push(n)}t.m.length&&C.m.push(...t.m);for(let e of t.cn)C.cn.add(e);if(t.ln.size){for(let e of t.ln)C.ln.add(e);t.ln.clear()}Ee=this.k=C}for(let e of m)e._e||=C}};function E(e){Ee.yt.push(e)}var ge=!1,_e=0;function ve(){_e++}function ye(e,t=!1){e._t=_e;let n=e.T,r=(n&1024?e.o?.Be:void 0)||I,i=!!(n&512)&&e.o?.Qe!==void 0,s=ge;for(let n=e.u;n!==null;n=n.fe){let e=n.ae;if(s&&(e.ie&=~a),e.ie&4&&n.ll===e.Ze&&n!==e.Ye&&(e.ie|=o),i&&e.T&8){e.ie|=256;continue}t&&r?(e.ie|=128,te(e,r)):t&&(e.ie|=128,e.o&&(e.o.Be=void 0)),k(e)}}function be(e){let t=e;if(!t.Se){e.Pe!==l&&(e.be=e.Pe,e.Pe=l),e.T&256&&T.un(e);return}e.Pe!==l&&(e.be=e.Pe,e.Pe=l,e.Re&&e.Re!==3&&(e.Xe=!0)),t.Ie=!1,t.ie&=~i,t.S&1||(t.S&=-5),t.o!=null&&(t.o.qe!==null||t.o.We!==null)&&T.Fe(t,!1,!0),e.T&256&&T.un(e)}var xe=null;function Se(){let e=Ee.yt;for(let t=0;t<e.length;t++)be(e[t]);e.length=0,xe?.()}function Ce(e=null,t=!1){let n=!t;n&&Se(),!t&&D.Qt.length&&we(D);let r=b.EE>=b.xe;if(r&&Re(b,T.Ce),n){r&&Se();let t=e??D.k;if(t.Ke.length&&T.fn(t.Ke),t.ln.size){for(let e of t.ln)e.ie&64||k(e);t.ln.clear(),w()}t.m.length&&(T.M(t.m),D.Qt.length&&we(D)),t.cn.size&&T.Vt(t.cn,e),le(),m.size&&T.Tn(e)}}function we(e){for(let t of e.Qt)t.se?.(),we(t)}function Te(e){for(let t=0;t<e.length;t++)e[t]._e=C}var D=new T,Ee=D.k;function De(e){if(e){oe++;try{return e()}finally{try{De()}finally{oe--}}}if(!D.sn&&!ie)for(;re||C;)D.flush()}function Oe(e,t){for(let n=0;n<e.length;n++)e[n](t)}function ke(e,n){if(e.ie&96)return!1;if(e.o?.le?.has(n))return!0;for(let t=e.nt;t;t=t.it){let e=t.ut;for(;e;){if(e===n||e.lt===n)return!0;e=e.o?.It}}return!!(e.S&1&&e.o?._ instanceof t&&e.o?._.source===n)}function Ae(e){if(e.an)return!0;if(e.oe.length)return!1;let t=!0;for(let[n,r]of e.Ne){let i=!1;for(let e of r){if(ke(e,n)){i=!0;break}r.delete(e)}if(!i)e.Ne.delete(n);else if(n.S&1&&n.o?._?.source===n){t=!1;break}}return t&&T.En?.(e)&&(t=!1),t&&(e.an=!0),t}function je(e){for(;e.an&&typeof e.an==`object`;)e=e.an;return e}function Me(e,t){let n=C;try{return C=je(e),t()}finally{C=n}}function O(e){return e.ie&32?x:b}function k(e){if(e.Re===3){let t=e;t.Xe||(t.Xe=!0,t.C.enqueue(2,t.Ut));return}let t=O(e);t.xe>e.Le&&(t.xe=e.Le),Pe(e,t)}function Ne(e,t){let n=(e.ve?.Ct?e.ve.Ot?.Le:e.ve?.Le)??-1;n>=e.Le&&(e.Le=n+1);let r=e.Le,i=t.eE[r];if(i===void 0)t.eE[r]=e;else{let t=i.st;t.ot=e,e.st=t,i.st=e}r>t.EE&&(t.EE=r)}function Pe(e,t){let n=e.ie;n&1036||(n&1?e.ie=n&-4|10:(e.ie=n|8,t.tE&&!(n&2)&&(t.tE=!1)),n&16||Ne(e,t))}function Fe(e,t){let n=e.ie;n&1052||(e.ie=n|16,Ne(e,t))}function A(e,t){let n=e.ie;if(!(n&24))return;e.ie=n&-25;let r=e.Le;if(e.st===e)t.eE[r]=void 0;else{let n=e.ot,i=t.eE[r],a=n??i;e===i?t.eE[r]=n:e.st.ot=n,a.st=e.st}e.st=e,e.ot=void 0}function Ie(e){if(!e.tE){e.tE=!0;for(let t=0;t<=e.EE;t++)for(let n=e.eE[t];n!==void 0;n=n.ot)n.ie&8&&Le(n)}}function Le(e,t=2){let n=e.ie;if(!((n&3)>=t)){e.ie=n&-4|t;for(let t=e.u;t!==null;t=t.fe)Le(t.ae,1);if(e.T&4096)for(let t=e.o.l;t!==null;t=t.ce)for(let e=t.u;e!==null;e=e.fe)Le(e.ae,1)}}function Re(e,t){for(e.tE=!1,e.xe=0;e.xe<=e.EE;e.xe++){let n=e.eE[e.xe];for(;n!==void 0;)n.ie&8?t(n):ze(n,e),n=e.eE[e.xe]}e.EE=0}function ze(e,t){A(e,t);let n=e.Le;for(let t=e.nt;t;t=t.it){let e=t.ut,r=e.lt||e;r.Se&&r.Le>=n&&(n=r.Le+1)}if(e.Le!==n){e.Le=n;for(let t=e.u;t!==null;t=t.fe)Fe(t.ae,O(t.ae))}}function Be(e){let t=e.ke;for(;t;){let e=t.ie;t.ie=e|32,e&24&&(A(t,e&32?x:b),e&8?Pe(t,x):Fe(t,x)),Be(t),t=t.Ve}}function Ve(e,t=!1,n){let r=e.ie;if(r&64)return;if(t){e.ie=r|64;let t=e;(t.o?.Ge||t.o?.ge)&&T.un(t)}t&&e.Se&&e.o!==null&&(e.o.Ee=null);let i=n?e.o?.qe??null:e.ke;for(;i;){let e=i.Ve,t=i;t.T&=-33,A(t,O(t)),Qe(t),Ve(i,!0),i=e}if(n?e.o!==null&&(e.o.qe=null):(e.ke=null,e.Me=0),t&&!n&&!(r&32)&&e.ve!==null&&!(e.ve.ie&64)){let t=e.ct,n=e.Ve;t===null?e.ve.ke=n:t.Ve=n,n!==null&&(n.ct=t),e.ct=null}if(He(e,n),t&&e.At){let t=e.At;e.At=void 0,t()}}function He(e,t){let n=t?e.o?.We:e.he;if(n){if(Array.isArray(n))for(let e=0;e<n.length;e++){let t=n[e];t.call(t)}else n.call(n);t?e.o!==null&&(e.o.We=null):e.he=null}}function Ue(e,t){let n=e;for(;n.T&4&&n.ve;)n=n.ve;if(n.id!=null)return Ke(n.id,t?n.Me++:n.Me);throw Error(``)}function We(e){return Ue(e,!0)}function Ge(e,t,n){return e?.id??(t?n?.id:n?.id==null?void 0:We(n))}function Ke(e,t){let n=t.toString(36),r=n.length-1;return e+(r?String.fromCharCode(64+r):``)+n}function qe(e){return F&&(F.he?Array.isArray(F.he)?F.he.push(e):F.he=[F.he,e]:F.he=e),e}function Je(e=!0){Ve(this,e)}function j(e){let t=F,n=e?.transparent??!1,r={id:Ge(e,n,t),T:n?4:0,Ct:!0,Ot:t?.Ct?t.Ot:t,ke:null,Ve:null,ct:null,he:null,C:t?.C??D,we:t?.we||f,Me:0,o:null,ve:t,dispose:Je};if(t){let e=t.ke;e===null?t.ke=r:(r.Ve=e,e.ct=r,t.ke=r)}return r}function Ye(e,t){let n=j(t);return W(n,()=>e(()=>n.dispose()))}function Xe(e){let t=e.ut,n=e.it,r=e.fe,i=e.el;if(r===null?t.rt=i:r.el=i,i!==null)i.fe=r;else if(t.u=r,r===null){t.o?.ft?.();let e=t;e.Se&&e.T&32&&!(e.ie&32)&&!(e.S&1)&&$e(e)}return n}function Ze(e){let t=e.Ye,n=t===null?e.nt:t.it;if(n!==null){do n=Xe(n);while(n!==null);t===null?e.nt=null:t.it=null}}function Qe(e){let t=e.nt;if(t){do t=Xe(t);while(t!==null);e.nt=null,e.Ye=null}}function $e(e){A(e,O(e)),Qe(e),Ve(e,!0)}function et(e,t,n=!1){let r=t.Ye;if(r!==null&&r.ut===e){r.me&&=n;return}let i=null,a=t.ie&4;if(a&&(i=r===null?t.nt:r.it,i!==null&&i.ut===e)){i.ll=t.Ze,t.Ye=i,i.me=n;return}let o=e.rt;if(o!==null&&o.ae===t&&(!a||o.ll===t.Ze)){a?o.me&&=n:o.me=n;return}let s=t.Ye=e.rt={ut:e,ae:t,it:i,el:o,fe:null,ll:t.Ze,me:n};r===null?t.nt=s:r.it=s,o===null?e.u=s:o.fe=s,ve()}function tt(e,t){return!e.o?.le?.has(t)&&((z(e).le??=new Set).add(t),!0)}function nt(e,t){return e.o?.le?.delete(t)?(e.o?.le.size===0&&e.o!==null&&(e.o.le=void 0),!0):!1}function rt(e){e.o?.le?.clear(),e.o!==null&&(e.o.le=void 0)}function it(e,t){z(e).ue=!0,t.source&&tt(e,t.source),e.S&2||at(e,t.source,t)}function at(e,n,r){if(!n){e.o!==null&&(e.o._=null);return}if(r instanceof t&&r.source===n){z(e)._=r;return}let i=e.o?._;(!(i instanceof t)||i.source!==n)&&(z(e)._=new t(n))}function M(e,t){for(let n=e.u;n!==null;n=n.fe)t(n.ae,n);for(let n=e.o?.l??null;n!==null;n=n.ce)for(let e=n.u;e!==null;e=e.fe)t(e.ae,e)}function ot(e){e.Se&&e.T&32&&!e.u&&!(e.ie&32)&&!(e.S&1)&&$e(e)}function st(e){let t,n=new Set,r=e=>{n.has(e)||(n.add(e),!e.u&&e.T&32&&(t??=[]).push(e),M(e,r))};if(M(e,r),t)for(let e of t)ot(e)}function ct(e,t){let n=!1,r=new Set,i=e=>{r.has(e)||(r.add(e),e.o?._===t&&(k(e),n=!0),M(e,i))};M(e,i),n&&w()}function lt(e){let t=!1,n,r=new Set,i=T.de,a=o=>{if(r.has(o)||!nt(o,e))return;r.add(o),o.Te=S;let s=o.o?.le?.values().next().value,c=o.S&2;s?(c||at(o,s),i!==null&&i(o)):(o.S&=-2,c||at(o),i!==null&&i(o),o.o?.ue&&(k(o),t=!0),o.o!==null&&(o.o.ue=!1),!o.u&&o.T&32&&(n??=[]).push(o)),M(o,a)};if(M(e,a),n)for(let e of n)ot(e);t&&w()}function ut(e){return typeof e==`object`&&!!e&&typeof e.then==`function`}function dt(e,n,r){let i=!1,a=!1;if(typeof n==`object`&&n&&V(()=>{i=n[Symbol.asyncIterator],a=!i&&ut(n)}),!a&&!i)return e.o!==null&&(e.o.Ee=null),e.Ie=!1,n;z(e).Ee=n;let o,s=()=>{let t=v(e);if(t&&e.S&4&&!je(t).Ne.has(e)){e._e=null;return}D.initTransition(t)},c=r=>{if(e.o?.Ee!==n)return;let i=r instanceof t;if(i&&e.Ie){e.o!==null&&(e.o.Ee=null),it(e,r),e.Te=S;return}s(),N(e,i?1:2,r),e.Te=S,i||st(e)},u=(t,i)=>{if(e.o?.Ee!==n||e.ie&130)return;s();let a=!!(e.S&4);Ze(e),ft(e);let o=_(e);if(o&&o.Ae.delete(e),r)r(t),a&&ft(e,!0);else if(e.o?.De!==void 0)e.Pe===l&&E(e),e.Pe=t,T.Oe!==null&&T.Oe(e,t),ee(e)||ye(e),e.Te=S;else if(o){let n=e.Re,r=e.be,i=e.Ue;try{(!n&&a||!i||!i(t,r))&&(e.be=t,e.Te=S,T.Oe!==null&&T.Oe(e,t),ye(e,!0))}catch(t){N(e,2,t)}}else try{U(e,()=>t)}catch(t){N(e,2,t)}e.Pe===l&&(e.Ie=!1),lt(e),w(),De(),i?.()},d=()=>e.T&32&&!e.u&&!(e.S&1)?($e(e),!0):!1,f=(t,r)=>{let i=t[Symbol.asyncIterator](),a=!1,s=!1,l=!r,f=()=>{if(!s){s=!0;try{let e=i.return?.();ut(e)&&e.then(void 0,()=>{})}catch{}}};r?r(f):qe(f);let p=()=>{d()||m()},m=()=>{let t,r,f=!1,h=!1,g=!0,_=i.next();if((ut(_)?_:{then:e=>void e(_)}).then(r=>{if(g&&l)t=r,f=!0,r.done&&(s=!0);else if(e.o?.Ee!==n)return;else r.done?(s=!0,a?(w(),De()):u(void 0),d()):(a=!0,u(r.value,p))},t=>{g&&l?(r=t,h=!0):e.o?.Ee===n&&(s=!0,c(t),d())}),g=!1,h){if(s=!0,c(r),l)throw r;return!0}return f&&!t.done?(o=t.value,a=!0,m()):f&&t.done},h=m();return l=!1,a||h},p=null,m=(e,t)=>{let n=!1;if(typeof e==`object`&&e&&V(()=>{n=e[Symbol.asyncIterator]}),!n)return!1;let r=f(e,t);return t||(p=r),!0};if(a){let r=!1,i=!1,a,s=!0,l=t=>{e.he?Array.isArray(e.he)?e.he.push(t):e.he=[e.he,t]:e.he=t};if(n.then(t=>{s?(o=t,r=!0):e.o?.Ee===n&&!(e.ie&64)&&m(t,l)||(u(t),d())},e=>{s?(a=e,i=!0):(c(e),d())}),s=!1,i)throw c(a),a;if(r)m(o)||(e.Ie=!1);else{if(e.Ie)return e.be;throw D.initTransition(v(e)),new t(F)}}if(i&&m(n),p!==null){if(!p){if(e.Ie)return e.be;throw D.initTransition(v(e)),new t(F)}e.Ie=!1}return o}function ft(e,t=!1){e.o?.le&&rt(e),e.o?.ue&&e.o!==null&&(e.o.ue=!1),e.o!==null&&(e.o.pe=!1),e.S=t?0:e.S&4,e.o?._&&at(e),(e.o?.Ge||e.o?.ge)&&T.de(e),e.o?.l&&e.T&2048&&T.ye!==null&&T.ye(e),e.o?.A&&e.o.A.call(e)}function N(e,r,i,a,o){r===2&&!(i instanceof n)&&!(i instanceof t)&&(i=new n(e,i));let s=r===1&&i instanceof t?i.source:void 0,c=s===e,l=r===1&&e.o?.De!==void 0&&!c,u=l&&ee(e);a||(r===1&&s?(tt(e,s),e.S=1|e.S&4,at(e,s,i)):(rt(e),e.S=r|(r===2?0:e.S&4),z(e)._=i),T.de!==null&&T.de(e),e.o?.l&&e.T&2048&&T.ye!==null&&T.ye(e)),o&&!a&&te(e,o);let d=a||u,f=a||l?void 0:o;if(e.o?.A){if(a&&r===1)return;d?e.o.A.call(e,r,i):e.o.A.call(e);return}M(e,(e,n)=>{if(e.Te=S,r===1&&s&&!e.o?.le?.has(s)||r!==1&&(e.o?._!==i||e.o?.le)){if(n.me&&r!==1&&!(i instanceof t)){k(e),w();return}!d&&!e._e&&E(e),N(e,r,i,d,f)}})}T.Ce=L,T.Fe=Ve;var P=!1,pt=!1,mt=!1,ht=!1,F=null,I=null;function L(e,n=!1){ve();let r=e.Re;if(!n){if(e._e&&(!r||C)&&C!==e._e&&D.initTransition(e._e),A(e,O(e)),e.o!==null&&(e.o.Ee=null),e._e||r===3)Ve(e);else if(e.ke!==null||e.he!==null){Be(e);let t=z(e);t.We=e.he,t.qe=e.ke,e.he=null,e.ke=null,e.Me=0}}let i=!!(e.ie&128),s=!!(e.T&128)&&e.o?.De!==l&&e.o?.De!==void 0,c=!!(e.S&4),f=e.S&2?e.o?._:void 0,p=(e.ie&a)!==0,m=e.Ie,h=F;F=e,e.Ye=null,e.Ze++,e.ie=4,e.Te=S;let g=e.Pe===l?e.be:e.Pe,_=e.Le,v=!1,ee=P,te=I;P=!0;let y=ht;if(ht=!1,i){let t=T.je(e,!0);t?I=t:t===!1&&(i=!1)}else if(C&&!n&&C.Ke.length){let t=T.je(e,!1);t&&(i=!0,I=t)}let b=r&&r!==2,x=pt;b&&(pt=!0);try{if(e.T&64)g=e.Se(g),e.o!==null&&(e.o.Ee=null),e.Ie=!1;else{let t=e.o?.Ee,n=e.Se(g),r=typeof n==`object`&&!!n,i=e.o?.Ee!==t;g=i||!r?n:dt(e,n),!i&&!r&&(e.o!==null&&(e.o.Ee=null),e.Ie=!1)}(e.S!==0||e.o!==null)&&ft(e,n),e.T&1024&&e.o?.Be&&T.ze(e)}catch(n){let r=n instanceof t;if(r&&e.Ie)it(e,n);else{r&&I&&T.$e(e);let t=!1;r&&(z(e).ue=!0,T.Je!==null&&(t=T.Je(e,p))),N(e,r?1:2,n,void 0,r?e.o?.Be:void 0),t&&T.p(e)}}finally{P=ee,ht=y,b&&(pt=x),v=(e.ie&o)!==0,e.ie=0|(n?e.ie&256:0),F=h}if(!e.o?._){Ze(e);let t=s?d(e.o?.De):e.Pe===l?e.be:e.Pe,a=!1;try{a=!r&&c||!e.Ue||!e.Ue(t,g)}catch(t){N(e,2,t)}if(r&&a&&(e.Xe=!e.o?._,n||e.C.enqueue(r,e.et??=T.tt.bind(null,e))),!e.o?._){if(a){let t=s?e.o?.De:void 0;n||r&&(C!==e._e||C===null)||i?(e.be=g,s&&i&&(z(e).De=g===void 0?u:g,e.Pe=l)):(e.Pe=g,m&&(e.Ie=!0),(C||e._e)&&T.Oe!==null&&T.Oe(e,g)),e.u!==null&&(!s||i||e.o?.De!==t)&&ye(e,i||s)}else if(s)e.Pe===l&&E(e),e.Pe=g,m&&(e.Ie=!0);else if(e.Le!=_)for(let t=e.u;t!==null;t=t.fe)Fe(t.ae,O(t.ae))}f!==void 0&&!a&&!e.o?._&&ct(e,f)}I=te,(e.Pe!==l||e.o!==null&&(e.o.qe!==null||e.o.We!==null)||e.S&5)&&(!n||e.S&1)&&(!e._e||s)&&E(e),e._e&&r&&C!==e._e&&Me(e._e,()=>L(e)),v&&(k(e),w())}function gt(e){if(!(e.ie&4)){if(e.ie&1)for(let t=e.nt;t;t=t.it){let n=t.ut,r=n.lt||n;if(r.Se&&gt(r),e.ie&2)break}(e.ie&130||e.o?._&&e.Te<S&&!e.o?.Ee)&&L(e),e.ie&=280}}function R(e,t){let n=t?.transparent??!1,r=typeof t==`object`&&!!t&&`loadingValue`in t,i={id:Ge(t,n,F),T:(n?4:0)|!!t?.ownedWrite|(!F||t?.lazy?32:0)|(t?.sync?64:0)|(t?.H?2:0)|0,Ue:t?.equals==null?bt:t.equals,he:null,C:F?.C??D,we:F?.we??f,Me:0,Se:e,be:r?t.loadingValue:void 0,Le:0,ot:void 0,st:null,nt:null,Ye:null,Ze:0,u:null,rt:null,ve:F,Ve:null,ct:null,ke:null,ie:t?.lazy?512:0,S:r?0:4,Te:S,Pe:l,_e:null,_t:-1,Ie:r,o:null};return t?.unobserved&&(z(i).ft=t.unobserved),yt(i,t),i}function z(e){return e.o??={De:void 0,Et:void 0,Be:void 0,Ge:void 0,ge:void 0,It:void 0,t:0,Ee:null,_:void 0,ue:void 0,le:void 0,A:void 0,pe:!1,l:null,ft:void 0,Qe:void 0,We:null,qe:null,Nt:void 0}}function _t(e,t,n,r,i,a){let o=a?.transparent??!1,s={id:Ge(a,o,F),T:(o?4:0)|!!a?.ownedWrite|(a?.sync?64:0)|0,Ue:!1,he:null,C:F?.C??D,we:F?.we??f,Me:0,Se:e,be:void 0,Le:0,ot:void 0,st:null,nt:null,Ye:null,Ze:0,u:null,rt:null,ve:F,Ve:null,ct:null,ke:null,ie:512,S:4,Te:S,Pe:l,_e:null,_t:-1,Ie:!1,Xe:!1,Tt:void 0,dt:t,St:n,At:void 0,Re:r,o:null};return i!==void 0&&(z(s).A=i),a?.unobserved&&(z(s).ft=a.unobserved),yt(s,vt),s}var vt={lazy:!0};function yt(e,t){e.st=e;let n=F?.Ct?F.Ot:F;if(F){let t=F.ke;t===null?F.ke=e:(e.Ve=t,t.ct=e,F.ke=e)}n&&(e.Le=n.Le+1),T.Rt!==null&&T.Rt(e),!t?.lazy&&L(e,!0)}function B(e,t,n=null){let r={Ue:t?.equals==null?bt:t.equals,T:+!!t?.ownedWrite|(t?.H?2:0),be:e,u:null,rt:null,Te:S,lt:n,ce:n?.o?.l||null,Pe:l,_e:null,_t:-1,o:null};return t?.unobserved&&(z(r).ft=t.unobserved),n&&(z(n).l=r,n.T|=c),r}function bt(e,t){return e===t}function V(e,t){if(T.Gt===null&&!P)return e();let n=P;P=!1;try{return T.Gt===null?e():T.Gt(e)}finally{P=n}}function xt(e,t){e.ie&512?(e.ie&=-513,L(e,!0)):e.ie&64?e.T&32&&L(e,!0):t&&gt(e)}function H(e){if(ht)return T.Pt(e);let t=F;t?.Ct&&(t=t.Ot);let n=e,r=e.lt||e;if(typeof n.Se==`function`&&xt(e,!1),!n.Se&&r===e&&e.o?.De===void 0&&e.o?.Qe===void 0&&C===null&&I===null)return t&&P&&et(e,t),!t||e.Pe===l||t.T&16?e.be:e.Pe;if(t&&P&&(et(e,t,mt),r.Se)){let n=O(e);r.Le>=n.xe&&(Le(t),Ie(n),gt(r));let i=r.Le;i>=t.Le&&e.ve!==t&&(t.Le=i+1)}if(r.S&1){if(t&&!(pt&&r._e&&C!==r._e)){if(I===null||T.ht(r))throw!P&&e!==t&&et(e,t),r.o?._}else if(t&&r.S&4)throw!P&&e!==t&&et(e,t),r.o?._;else if(!t&&r.S&4)throw r.o?._}if(r.Se&&r.S&2){if(P&&r.Te<S)return L(r),H(e);throw r.o?._}if(e.o?.De!==void 0&&e.o?.De!==l)return d(e.o?.De);if(I!==null&&C!==null&&t!==null&&T.Ft(e,r,t))return e.be;let i=!t||I!==null&&T.gt(e,r,t)||e.Pe===l||t.T&16||pt&&e._e&&C!==e._e?e.be:e.Pe;return!t&&r===e&&typeof n.Se==`function`&&e.T&32&&!(r.S&1)&&!e.u&&$e(e),i}function U(e,t){if(e._e&&C!==e._e&&D.initTransition(e._e),e.T&128)return T.vt(e,t);let n=e.Pe===l?e.be:e.Pe;if(typeof t==`function`&&(t=t(n)),!(e.S&4||!e.Ue||!e.Ue(n,t)))return t;let r=e.Pe!==l;return r||E(e),e.Pe=t,e.T&256&&T.Oe!==null&&T.Oe(e,t),e.Se!==void 0&&(e.Te=S),r&&e._t===_e&&I===null?t:(ye(e),w(),t)}function St(e){A(e,O(e)),!(e.ie&1024)&&e.Pe===l&&(E(e),w()),e.ie=e.ie&-4|i,e.kt=S}function Ct(e,t){let n=U(e,t);return St(e),n}function W(e,t){let n=F,r=P;F=e,P=!1;try{return t()}finally{F=n,P=r}}function wt(e,t,n,r){let i=_t(e,t,n,r?.user?2:1,Tt,r);L(i,!0),!r?.defer&&(i.Re===2||r?.schedule?i.C.enqueue(i.Re,Et.bind(null,i)):Et(i))}function Tt(e,t){let n=e===void 0?this.S:e,i=t===void 0?this.o?._:t;if(n&2){if(this.C.notify(this,1,0),this.Re===2){this.S&2&&(this.Xe=!0,this.C.enqueue(this.Re,this.et??=Et.bind(null,this)));return}if(!this.C.notify(this,2,2))throw fe(r(i)),i}else this.Re===1&&this.C.notify(this,3,n,i)}function Et(e){if(!e.Xe||e.ie&64)return;if(e.S&2&&e.Re===2){let t=r(e.o?._);e.Tt=e.be,e.Xe=!1;try{e.St?e.St(t,()=>{let t=e.At;e.At=void 0,t?.()}):console.error(t)}catch(t){if(!e.C.notify(e,2,2))throw fe(t),t}return}let t=e.At;e.At=void 0;try{t?.(),e.At=e.dt(e.be,e.Tt)}catch(t){if(z(e)._=new n(e,t),e.S|=2,!e.C.notify(e,2,2))throw fe(t),t}finally{e.Tt=e.be,e.Xe=!1}}T.tt=Et;function G(e){let t=H.bind(null,e);return t[p]=e,t}function Dt(e,t){if(typeof e==`function`){let n=R(e,t);return n.T&=-33,[G(n),Ct.bind(null,n)]}let n=B(e,t);return[G(n),U.bind(null,n)]}function Ot(e,t){return G(R(e,t))}function kt(e,t,n){wt(e,t,void 0,n)}var At=Symbol(0);function jt(e,t,n){let r=typeof n?.keyed==`function`?n.keyed:void 0,i=t.length>1,a=t,o={jt:j(),Wt:0,xt:e,Kt:[],$t:a,qt:[],zt:[],Jt:r,Xt:r||n?.keyed===!1?[]:void 0,Yt:i&&n?.keyed!==!1?[]:void 0,Zt:n?.keyed===!1,ts:n?.fallback},s=R(Nt.bind(o));return o.jt.Ot=s,s.T&=-33,G(s)}var Mt={ownedWrite:!0};function Nt(){let e=this.xt()||[],t=e.length;return e[At],W(this.jt,()=>{let n,r,i,a,o=this.Xt?this.Zt?()=>(i[r]=B(e[r],Mt),this.$t(G(i[r]),r)):()=>(i[r]=B(e[r],Mt),a&&(a[r]=B(r,Mt)),this.$t(G(i[r]),a?G(a[r]):void 0)):this.Yt?()=>{let t=e[r];return a[r]=B(r,Mt),this.$t(t,G(a[r]))}:()=>{let t=e[r];return this.$t(t)};if(t===0)this.Wt!==0&&(this.jt.dispose(!1),this.zt=[],this.Kt=[],this.qt=[],this.Wt=0,this.Xt&&=[],this.Yt&&=[]),this.ts&&!this.qt[0]&&(this.zt[0]?.dispose(),this.qt[0]=W(this.zt[0]=j(),this.ts));else if(this.Wt===0){let s=Array(t),c=Array(t);i=this.Xt&&Array(t),a=this.Yt&&Array(t);try{for(r=0;r<t;r++)s[r]=W(c[r]=j(),o)}catch(e){for(n=0;n<=r;n++)c[n]?.dispose();throw e}this.zt[0]&&this.zt[0].dispose(),this.qt=s,this.zt=c,i&&(this.Xt=i),a&&(this.Yt=a),this.Kt=e.slice(0),this.Wt=t}else{let s,c,l,u,d,f,p,m,h;for(s=0,c=Math.min(this.Wt,t);s<c&&(this.Kt[s]===e[s]||this.Xt&&Pt(this.Jt,this.Kt[s],e[s]));s++)this.Xt&&U(this.Xt[s],e[s]);for(c=this.Wt-1,l=t-1;c>=s&&l>=s&&(this.Kt[c]===e[l]||this.Xt&&Pt(this.Jt,this.Kt[c],e[l]));c--,l--);if(s===t&&this.Wt===t){this.Kt=e.slice(0);return}let g=t-this.Wt,_=Array(t),v=Array(t);for(i=this.Xt?Array(t):void 0,a=this.Yt?Array(t):void 0,f=new Map,p=Array(l+1),r=l;r>=s;r--)u=e[r],d=this.Jt?this.Jt(u):u,n=f.get(d),p[r]=n===void 0?-1:n,f.set(d,r);for(n=s;n<=c;n++)u=this.Kt[n],d=this.Jt?this.Jt(u):u,r=f.get(d),r!==void 0&&r!==-1?(_[r]=this.qt[n],v[r]=this.zt[n],i&&(i[r]=this.Xt[n]),a&&(a[r]=this.Yt[n]),r=p[r],f.set(d,r)):(m??=[]).push(this.zt[n]);try{for(r=s;r<=l;r++)v[r]===void 0&&((h??=[]).push(v[r]=j()),_[r]=W(v[r],o))}catch(e){if(h)for(n=0;n<h.length;n++)h[n].dispose();throw e}for(n=0;n<s;n++)_[n]=this.qt[n],v[n]=this.zt[n],i&&(i[n]=this.Xt[n]),a&&(a[n]=this.Yt[n]);for(r=s;r<=l;r++)i&&U(i[r],e[r]),a&&U(a[r],r);for(r=l+1;r<t;r++)_[r]=this.qt[r-g],v[r]=this.zt[r-g],i&&(i[r]=this.Xt[r-g],U(i[r],e[r])),a&&(a[r]=this.Yt[r-g],g!==0&&U(a[r],r));if(this.qt=_,this.zt=v,i&&(this.Xt=i),a&&(this.Yt=a),this.Wt=t,this.Kt=e.slice(0),m)for(n=0;n<m.length;n++)m[n].dispose()}}),this.qt}function Pt(e,t,n){return!e||e(t)===e(n)}function Ft(e,t){let n=R(e,{lazy:!0});return z(n).A=(e,t)=>{let i=e===void 0?n.S:e,a=t===void 0?n.o?._:t;n.S&=~n.R;let o=n.C.notify(n,3,i,a),s=i&~n.R&3;if(s&&(n.S&=~s,n.o?._===a&&!(n.S&3)&&n.o!==null&&(n.o._=void 0)),!o&&i&2)throw fe(r(a)),a},n.R=t,n.T&=-33,L(n,!0),n}function It(e,t,n,r){let i=e.C;return i.addChild(e.C=n),qe(()=>i.removeChild(e.C)),W(e,()=>{let e=R(t);return Ft(()=>Ht(H(e)),r)})}var Lt=Symbol(),Rt=class extends he{ee;v=new Set;te;N=!0;I=B(!1,{ownedWrite:!0,H:!0});_;D=B(!1,{ownedWrite:!0,H:!0});W;L=!1;re;ne=Lt;constructor(e){super(),this.ee=e}run(e){if(!(!e||H(this.I)))return super.run(e)}notify(e,t,n,i){if(!(t&this.ee))return super.notify(e,t,n,i);if(this.L&&this.re){let e=V(()=>{try{return this.re()}catch{return Lt}});e!==this.ne&&(this.ne=e,this.L=!1,this.v.clear())}if(this.ee&1&&this.L)return super.notify(e,t,n,i);if(n&this.ee){this.N=!0;let t=i?.source||e.o?._?.source;if(t){let e=this.v.size===0;this.v.add(t),e&&U(this.I,!0),this.ee&2&&U(this._,r(t.o?._))}}return t&=~this.ee,!t||super.notify(e,t,n,i)}se(){for(let e of this.v)(e.ie&64||!e.o?.t&&!(e.S&this.ee)&&!(this.ee&2&&e.S&1))&&this.v.delete(e);if(!this.v.size&&(this.N=this.ee&1&&this.N&&!this.L&&this.te?!!(this.te.S&this.ee):!1,!this.N&&(U(this.I,!1),this.re)))try{this.ne=V(()=>this.re())}catch{}}};function zt(e,n,r,i){let a=j(),o=new Rt(e);e===2&&(o._=B(void 0,{ownedWrite:!0,H:!0})),i&&(o.re=i);let s=o.te=It(a,n,o,e);return V(()=>{let n=!1;try{H(s)}catch(e){if(e instanceof t)n=!0;else throw e}o.N=n||!!(s.S&e)||s.o?._ instanceof t}),G(R(()=>{if(!H(o.I)){let e=H(s);if(!V(()=>H(o.I)))return o.L=!0,e}return r(o)},{H:!0}))}function Bt(e,t,n){return zt(1,e,()=>t(),n?.on)}function Vt(e,t){return zt(2,e,e=>t(G(e._),()=>{for(let t of e.v)L(t);w()}))}function Ht(e,t){if(typeof e==`function`&&!e.length){if(t?.doNotUnwrap)return e;do e=e();while(typeof e==`function`&&!e.length)}if(!(t?.skipNonRendered&&(e==null||e===!0||e===!1||e===``))){if(Array.isArray(e)){let n=[];return Ut(e,n,t)?()=>{let e=[];return Ut(n,e,{...t,doNotUnwrap:!1}),e}:n}return e}}function Ut(e,n=[],r){let i=null,a=!1;for(let o=0;o<e.length;o++)try{let t=e[o];if(typeof t==`function`&&!t.length){if(r?.doNotUnwrap){n.push(t),a=!0;continue}do t=t();while(typeof t==`function`&&!t.length)}Array.isArray(t)?a=Ut(t,n,r):r?.skipNonRendered&&(t==null||t===!0||t===!1||t===``)||n.push(t)}catch(e){if(!(e instanceof t))throw e;i=e}if(i)throw i;return a}var Wt=!1,Gt={hydrating:!1,registry:void 0,done:!1},Kt,qt,Jt,Yt,Xt,Zt=(...e)=>(Kt||Ot)(...e),Qt=(...e)=>(qt||Dt)(...e),$t=(...e)=>(Jt||Vt)(...e),en=(...e)=>(Yt||kt)(...e),tn=(e,t,n)=>(Xt||Bt)(e,t,n);function K(e,t){return V(()=>e(t||{}))}var nn=0;function rn(){return Gt.hydrating?Gt.getNextContextId():`cl-${nn++}`}var an=e=>`Stale read from <${e}>.`;function on(e){let t=`fallback`in e?{keyed:e.keyed,fallback:()=>e.fallback}:{keyed:e.keyed};return jt(()=>e.each,e.children,t)}function sn(e){let t=e.keyed,n=Ot(()=>e.when,void 0),r=t?n:Ot(n,{equals:(e,t)=>!e==!t,sync:!0});return Ot(()=>{let i=r();if(i){let a=e.children;return typeof a==`function`&&a.length>0?V(t?()=>a(i):()=>a(()=>{if(!V(r))throw an(`Show`);return n()}),Wt):a}return e.fallback},{sync:!0})}function cn(e){return $t(()=>e.children,(t,n)=>{let r=e.fallback;return typeof r==`function`&&r.length?r(t,n):r})}function ln(e){return tn(()=>e.children,()=>e.fallback,`on`in e?{on:()=>e.on}:void 0)}var q=Symbol(`slot`),un=Symbol(`host`),dn={transparent:!0,sync:!0};function J(e,t,n){en(e,t,n?{sync:!0,...n,transparent:!n.scope}:dn)}function fn(e,t,n,r){let i=n.length,a=t.length,o=i,s=0,c=0,l=t[a-1],u=l[q],d=l.parentNode===e&&(!u||u===r)?l.nextSibling:r||null,f=null,p,m,h=t=>{if(!t)return!1;let n=t[q];return t.parentNode===e&&(!n||n===r)};for(;s<a||c<o;){if(t[s]===n[c]&&h(t[s])){s++,c++;continue}for(;t[a-1]===n[o-1]&&h(t[a-1]);)a--,o--;if(a===s){let t;if(o<i){if(c){let i=n[c-1],a=i[q];t=i.parentNode===e&&(!a||a===r)?i.nextSibling:d}else t=n[o-c]}else t=d;for(;c<o;){let i=n[c++];e.insertBefore(i,t),r&&(i[q]=r)}}else if(o===c)for(;s<a;){let n=t[s++];if(!f||!f.has(n)){let t=n[q];n.parentNode===e&&(!t||t===r)&&n.remove()}}else if((p=t[s])===n[o-1]&&n[c]===t[a-1]&&p.parentNode===e&&(!(m=p[q])||m===r)){if(r)do{let n=t[--a];if(e.insertBefore(n,p),n[q]=r,c++,s>=a-1||c>=o)break}while(t[s]===n[o-1]&&n[c]===t[a-1]);else do if(e.insertBefore(t[--a],p),c++,s>=a-1||c>=o)break;while(t[s]===n[o-1]&&n[c]===t[a-1])}else{if(!f){f=new Map;let e=c;for(;e<o;)f.set(n[e],e++)}let i=f.get(t[s]);if(i!=null){if(c<i&&i<o){let l=s,u=1,p;for(;++l<a&&l<o&&(p=f.get(t[l]))!=null&&p===i+u;)u++;if(u>i-c){let a=t[s],o=a[q],l=a.parentNode===e&&(!o||o===r)?a:d;for(;c<i;){let t=n[c++];e.insertBefore(t,l),r&&(t[q]=r)}}else{let i=t[s++],a=n[c++],o=i[q];i.parentNode===e&&(!o||o===r)?e.replaceChild(a,i):e.insertBefore(a,d),r&&(a[q]=r)}}else s++}else{let n=t[s++],i=n[q];n.parentNode===e&&(!i||i===r)&&n.remove()}}}}var pn=`_$SOLID_EVENT_OWNER`,mn={},hn=new Set,Y=new Map;function gn(e,t,n,r={}){let i;yn(t);try{Ye(a=>{if(i=a,t===document){let t=e();J(()=>Ht(t),()=>{})}else{let i=e();Q(t,()=>i,t.firstChild?null:void 0,n,{...r.insertOptions,schedule:!0})}},{id:r.renderId}),De()}catch(e){throw i&&i(),bn(t),e}return()=>{i(),bn(t),t.textContent=``}}function _n(e,t,n){let r=document.createElement(`template`);return r.innerHTML=e,n===2?r.content.firstChild.firstChild:r.content.firstChild}function X(e,t){let n;return t===1?r=>document.importNode(n||=_n(e,r,t),!0):r=>(n||=_n(e,r,t)).cloneNode(!0)}function vn(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];hn.has(n)||(hn.add(n),Y.forEach((e,t)=>Cn(n,t,e)))}}function yn(e){let t=xn(e,e);t&&(t.roots=(t.roots||0)+1)}function bn(e){let t=Y.get(e);t&&(t.roots>1?t.roots--:delete t.roots),Sn(e,e)}function xn(e,t=e){if(!e||!t)return;let n=Y.get(e);return n||Y.set(e,n={owners:new Map,handlers:new Map}),n.owners.set(t,(n.owners.get(t)||0)+1),hn.forEach(t=>Cn(t,e,n)),n}function Sn(e,t=e){let n=Y.get(e);if(!n)return;let r=n.owners.get(t);r>1?n.owners.set(t,r-1):n.owners.delete(t),!n.owners.size&&(n.handlers.forEach((t,n)=>e.removeEventListener(n,t)),Y.delete(e))}function Cn(e,t,n){if(n.handlers.has(e))return;let r=e=>An(e,t,n);n.handlers.set(e,r),t.addEventListener(e,r)}function wn(e,t){let n=e,r=0;for(;n;){if(t.owners.has(n))return{owner:n,distance:r};r++,n=n._$host||n.parentNode||n.host}}var Tn=null;function En(e){if(Tn!==null)for(let t=0;t<Tn.length;t++)Tn[t](e);return e}function Dn(e,t,n){kn(e)||(n==null||n===!1?e.removeAttribute(t):e.setAttribute(t,n===!0?``:n),Tn!==null&&(t===`href`||t===`action`)&&En(e))}var On={scope:!0},Z=null;function Q(e,t,n,r,i){let a=n!==void 0,o=i&&i.host;if(a&&!r&&(r=[]),Z!==null&&(r=Z.claimInitial(e,a,r)),typeof t!=`function`&&(t=Mn(t,r,a,!0),typeof t!=`function`)){jn(e,t,r,n),o&&Nn(t,o);return}if(a&&r.length===0){let t=document.createTextNode(``);e.insertBefore(t,n),r=[t]}let s=r;J(r=>{Z!==null&&(s=Z.reclaimRegion(s,e,n));let c=Mn(t(),s,a,!0);return typeof c==`function`?(J(()=>(Z!==null&&(s=Z.reclaimRegion(s,e,n)),Mn(c,s,a)),t=>{s=jn(e,t,s,n),o&&Nn(s,o)},r!==void 0&&!(i&&i.schedule)?{...i,schedule:!0}:i),mn):c},t=>{t!==mn&&(s=jn(e,t,s,n),o&&Nn(s,o))},t.$s?i?{...i,scope:!0}:On:i)}function kn(e){if(!Gt.hydrating)return!1;if(!e||e.isConnected)return!0;let t=Gt.claimRoots;if(t){for(let n=0;n<t.length;n++)if(t[n].contains(e))return!0}return!1}function An(e,t,n){if(Z!==null&&Z.dedupEvent(e))return;let r=e[pn],i;if(r){if(r===!0||r===t||!t.contains(r))return;i=r}let a=n&&(n.owners.size===1&&n.owners.has(t)?t:wn(e.target,n)?.owner);if(n&&!a||a&&a===i)return;e[pn]=a||!0;let o=i||e.target,s=`$$${e.type}`,c=e.target,l=a||t||e.currentTarget,u=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),d=()=>{let t=o[s];if(t===void 0&&o.hasAttribute&&o.hasAttribute(`_bnd`)){let n=globalThis[Symbol.for(`solid.bnd`)];n&&(t=n.resolve(o,e.type))}if(t&&!o.disabled){let n=o[`${s}Data`];if(n===void 0?t.call(o,e):t.call(o,n,e),e.cancelBubble)return}return o.host&&typeof o.host!=`string`&&!o.host._$host&&o.contains(e.target)&&u(o.host),!0},f=()=>{for(;o&&d()&&o!==l&&o.parentNode!==l;)o=o._$host||o.parentNode||o.host};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return o||l||document}}),i)i===e.target&&(o=i._$host||i.parentNode||i.host),o&&o!==l&&f();else if(e.composedPath){let t=e.composedPath();if(t.length){u(t[0]);for(let e=0;e<t.length&&(o=t[e],d());e++){if(o._$host){o=o._$host,f();break}if(o===l||o.parentNode===l)break}}else f()}else f();u(c)}function jn(e,t,n,r){if(Z!==null&&kn(e)){if(t&&t!==n){let e=Array.isArray(t);for(let r of e?t:[t])if(r&&r.nodeType){if(!kn(r))return n}else if(e&&(typeof r==`string`||typeof r==`number`))return n}return t}if(t===n)return t;let i=typeof t,a=r!==void 0;if(i===`string`||i===`number`){let r=typeof n;r===`string`||r===`number`?e.firstChild.data=t:Fn(e,n)?e.textContent=t:(In(e,n),e.insertBefore(document.createTextNode(t),e.firstChild))}else if(t===void 0)Ln(e,n,r);else if(t.nodeType)Array.isArray(n)?Ln(e,n,a?r:null,t):n&&n.nodeType?n.parentNode===e?e.replaceChild(t,n):e.appendChild(t):n&&e.firstChild?e.replaceChild(t,e.firstChild):e.appendChild(t),r&&(t[q]=r);else if(Array.isArray(t)){let i=n&&Array.isArray(n);for(let e=0,r=t.length;e<r;e++){let r=t[e],a=typeof r;if(a===`string`||a===`number`){let a=i?n[e]:void 0;a&&a.nodeType===3?(a.data!==``+r&&(a.data=r),t[e]=a):t[e]=document.createTextNode(r)}}t.length===0?Ln(e,n,r):i?n.length===0?Pn(e,t,r):fn(e,n,t,r):(n&&Ln(e,n),Pn(e,t))}return t}function Mn(e,t,n,r){if(e=Ht(e,{skipNonRendered:!0,doNotUnwrap:r}),r&&typeof e==`function`)return e;if(n&&!Array.isArray(e)&&(e=[e??``]),Gt.hydrating&&Array.isArray(e))for(let n=0,r=e.length;n<r;n++){let r=e[n],i=t&&t[n],a=typeof r;(a===`string`||a===`number`)&&i&&i.nodeType===3&&(e[n]=i)}return e}function Nn(e,t){if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)Nn(e[n],t);else e&&e.nodeType&&e[un]!==t&&(e[un]=t,Object.defineProperty(e,"_$host",{get:t,configurable:!0}))}function Pn(e,t,n=null){for(let r=0,i=t.length;r<i;r++){let i=t[r];e.insertBefore(i,n),n&&(i[q]=n)}}function Fn(e,t){if(t==null)return!0;if(Array.isArray(t))return t.length?e.firstChild===t[0]&&e.lastChild===t[t.length-1]:e.firstChild===null;if(t===``)return e.firstChild===null;if(t.nodeType)return e.firstChild===t&&e.lastChild===t;let n=e.firstChild;return n!==null&&n.nodeType===3&&e.lastChild===n}function In(e,t){if(Array.isArray(t))for(let n=0;n<t.length;n++){let r=t[n];r.parentNode===e&&r.remove()}else if(t.nodeType)t.parentNode===e&&t.remove();else{let t=e.firstChild;t&&t.nodeType===3&&t.remove()}}function Ln(e,t,n,r){if(n===void 0)return Fn(e,t)?e.textContent=``:In(e,t);if(t.length){let i=!1;for(let a=t.length-1;a>=0;a--){let o=t[a];if(r!==o){let t=o[q],s=o.parentNode===e&&(!t||t===n);r&&!i&&!a?s?e.replaceChild(r,o):e.insertBefore(r,n):s&&o.remove()}else i=!0}}else r&&e.insertBefore(r,n);r&&n&&(r[q]=n)}var Rn=class{#e;constructor(e,t){this.#e=new URL(e,t)}async fetchBody(){try{let e=await fetch(this.#e);return e.ok?await e.json():void 0}catch{return}}},zn=class e{static#e={channel:`https://api-channel.sooplive.com`,profile:`https://stimg.sooplive.com`,preview:`https://liveimg.sooplive.com`};static station(t){let n=`/v1.1/channel/${t}/station`,r=e.#e.channel;return new Rn(n,r)}static broadcast(t){let n=`/v1.1/channel/${t}/home/section/broad`,r=e.#e.channel;return new Rn(n,r)}static profile(t){let[n,r]=[t,t.substring(0,2)],i=`/LOGO/${r}/${n}/${n}.webp`,a=e.#e.profile;return new URL(i,a)}static preview(t){let n=`/${t}`,r=e.#e.preview;return new URL(n,r)}},Bn=class e{id;profile;nickname;constructor(e){this.id=e.id,this.nickname=e.nickname,this.profile=zn.profile(this.id)}async fetchBroadcast(){return Vn.create(this.id)}static async create(t){let n=await zn.station(t).fetchBody();if(!n)return;let{userNick:r,broadStart:i,profileImage:a}=n.station;return new e({id:t,nickname:r})}},Vn=class e{id;preview;title;viewers;category;static async create(t){let n=await zn.broadcast(t).fetchBody();if(!n||typeof n.broadNo!=`number`||!Number.isFinite(n.broadNo))return;let{broadNo:r,broadTitle:i,currentSumViewer:a,categoryName:o}=n;return new e({id:r.toString(),title:i,viewers:a,category:o})}constructor(e){this.id=e.id,this.title=e.title,this.viewers=e.viewers,this.category=e.category,this.preview=zn.preview(this.id)}},Hn=X(`<div class=avatar-preview-anchor>`),Un=X(`<img class=avatar>`),Wn=X(`<button class=avatar-more type=button>+`),Gn=X(`<div class=avatar-overflow role=list>`),Kn=X(`<section class=avatar-list aria-label="Avatar list"style=min-width:264px><div class=avatar-stack><!><!></div><!><!>`),qn=X(`<div class=avatar-stack-item>`),Jn=X(`<div class=avatar-overflow-item role=listitem>`),Yn=X(`<img class=avatar-preview alt="Broadcast preview">`);function Xn(e){let t=Zt(async()=>{let t=await Bn.create(e.userId);return t?{user:t,broad:await t.fetchBroadcast()}:{user:void 0,broad:void 0}}),n=()=>t()?.user,r=()=>t()?.broad?.preview.href,i=()=>!!r();return K(cn,{fallback:[],get children(){return K(ln,{fallback:[],get children(){var t=Hn();return t.addEventListener(`blur`,()=>e.onPreviewChange?.(void 0)),t.addEventListener(`focus`,()=>e.onPreviewChange?.(r())),t.addEventListener(`mouseleave`,()=>e.onPreviewChange?.(void 0)),t.addEventListener(`mouseenter`,()=>e.onPreviewChange?.(r())),Q(t,K(sn,{get when(){return n()},keyed:!0,children:t=>(()=>{var n=Un();return J(()=>({e:t.profile.href,t:`${e.userId} profile`}),({e,t},r)=>{e!==r?.e&&Dn(n,`src`,e),t!==r?.t&&Dn(n,`alt`,t)}),n})()})),J(()=>({e:!!i(),t:!i()}),({e,t:n},r)=>{e!==r?.e&&t.classList.toggle(`avatar-live`,e),n!==r?.t&&t.classList.toggle(`avatar-offline`,n)}),t}})}})}function Zn(e){let[t,n]=Qt(!1),[r,i]=Qt(),a=`avatar-overflow-${rn()}`,o=()=>typeof e.userIds==`function`?e.userIds():e.userIds,s=()=>{let t=typeof e.visibleCount==`function`?e.visibleCount():e.visibleCount;return Math.max(0,t??4)},c=()=>o().slice(0,s()),l=()=>o().slice(s());var u=Kn(),d=u.firstChild,f=d.firstChild,p=f.nextSibling,m=d.nextSibling,h=m.nextSibling;return Q(d,K(on,{get each(){return c()},children:e=>(()=>{var t=qn();return Q(t,K(Xn,{userId:e,onPreviewChange:i})),t})()}),f),Q(d,K(sn,{get when(){return l().length>0},get children(){var e=Wn();return e.firstChild,e.$$click=()=>n(e=>!e),Dn(e,`aria-controls`,a),Q(e,()=>l().length,null),J(()=>t()?`true`:`false`,t=>{Dn(e,`aria-expanded`,t)}),e}}),p),Q(u,K(sn,{get when(){return t()},get children(){var e=Gn();return Dn(e,`id`,a),Q(e,K(on,{get each(){return l()},children:e=>(()=>{var t=Jn();return Q(t,K(Xn,{userId:e,onPreviewChange:i})),t})()})),e}}),m),Q(u,K(sn,{get when(){return r()},children:e=>(()=>{var t=Yn();return J(()=>e(),e=>{Dn(t,`src`,e)}),t})()}),h),u}vn([`click`]);var Qn=`.avatar-preview-anchor{border-radius:50%;place-items:center;width:40px;height:40px;display:grid;position:relative}.avatar-preview-anchor.avatar-live{background:0 0;position:relative}.avatar-preview-anchor.avatar-live:before{content:"";background:linear-gradient(113.84deg,#0082ff 5.63%,#0a96ff 44.46%,#05bcff 57.4%,#00f0ff 75.9%,#04f0fc 78.67%,#10f1f5 81.44%,#24f4e8 84.22%,#40f7d7 87.92%,#64fbc1 90.69%,#82ffb0 92.54%);border-radius:50%;padding:4px;position:absolute;inset:0;-webkit-mask:radial-gradient(farthest-side,#0000 calc(100% - 2px),#000 0);mask:radial-gradient(farthest-side,#0000 calc(100% - 2px),#000 0)}.avatar{z-index:1;object-fit:cover;background:0 0;border-radius:50%;width:32px;height:32px;display:block;position:relative}.avatar-offline .avatar{filter:grayscale()}.avatar-preview{z-index:30;box-sizing:border-box;opacity:1;pointer-events:none;width:min(372px,100vw);max-width:372px;height:auto;transition:opacity .15s,transform .15s;position:absolute;inset:auto 0 calc(100% + .75rem) auto;transform:translateY(0)}.avatar-list .avatar-preview{aspect-ratio:16/9;object-fit:cover;height:auto}.avatar-preview-anchor:hover,.avatar-preview-anchor:focus-within{transition:transform .15s;transform:scale(1.08)}.avatar-list{width:100%;max-width:264px;position:relative}.avatar-stack{align-items:center;width:100%;min-height:40px;display:flex}.avatar-stack-item{flex:0 0 40px;height:40px;margin-right:-12px;transition:transform .15s;position:static}.avatar-stack-item:hover,.avatar-stack-item:focus-within{z-index:10}.avatar-more{z-index:11;color:#fff;cursor:pointer;width:40px;height:40px;font:inherit;background:#282c34;border:1px solid #fff9;border-radius:50%;flex:0 0 40px;margin-left:8px;font-size:.85rem;transition:background-color .15s,transform .15s;position:relative}.avatar-more:hover,.avatar-more:focus-visible{background:#3c4350;transform:translateY(-2px)}.avatar-more:focus-visible{outline-offset:3px;outline:2px solid #82ffb0}.avatar-overflow{z-index:20;box-sizing:border-box;background:#20242b;border:1px solid #fff3;border-radius:8px;grid-template-columns:repeat(auto-fit,minmax(40px,1fr));gap:12px;width:100%;max-height:200px;padding:12px;display:grid;position:absolute;top:52px;left:0;overflow:hidden auto}.avatar-overflow-item{place-items:center;width:100%;height:40px;display:grid;position:static}.avatar-overflow-item:hover,.avatar-overflow-item:focus-within{z-index:2}`,$n=0,$;function er(e){let[t,n]=Qt(e.userIds),[r,i]=Qt(e.visibleCount),a=!1;$n===0&&($=document.createElement(`style`),$.dataset.soopAvatar=``,$.textContent=Qn,document.head.appendChild($)),$n+=1;let o=gn(()=>K(Zn,{userIds:t,visibleCount:r}),e.target);return{update(e){e.userIds&&n(e.userIds),e.visibleCount!==void 0&&i(e.visibleCount)},destroy(){a||(a=!0,o(),--$n,$n===0&&($?.remove(),$=void 0))}}}return e.AvatarList=Zn,e.mount=er,e})({});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soop-avatar",
3
- "version": "1.1.5",
3
+ "version": "1.1.6",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "scripts": {