(function(){const j=document.createElement("link").relList;if(j&&j.supports&&j.supports("modulepreload"))return;for(const _ of document.querySelectorAll('link[rel="modulepreload"]'))d(_);new MutationObserver(_=>{for(const G of _)if(G.type==="childList")for(const I of G.addedNodes)I.tagName==="LINK"&&I.rel==="modulepreload"&&d(I)}).observe(document,{childList:!0,subtree:!0});function p(_){const G={};return _.integrity&&(G.integrity=_.integrity),_.referrerPolicy&&(G.referrerPolicy=_.referrerPolicy),_.crossOrigin==="use-credentials"?G.credentials="include":_.crossOrigin==="anonymous"?G.credentials="omit":G.credentials="same-origin",G}function d(_){if(_.ep)return;_.ep=!0;const G=p(_);fetch(_.href,G)}})();function Hh(b){return b&&b.__esModule&&Object.prototype.hasOwnProperty.call(b,"default")?b.default:b}var _s={exports:{}},fn={};var vh;function qv(){if(vh)return fn;vh=1;var b=Symbol.for("react.transitional.element"),j=Symbol.for("react.fragment");function p(d,_,G){var I=null;if(G!==void 0&&(I=""+G),_.key!==void 0&&(I=""+_.key),"key"in _){G={};for(var L in _)L!=="key"&&(G[L]=_[L])}else G=_;return _=G.ref,{$$typeof:b,type:d,key:I,ref:_!==void 0?_:null,props:G}}return fn.Fragment=j,fn.jsx=p,fn.jsxs=p,fn}var yh;function Yv(){return yh||(yh=1,_s.exports=qv()),_s.exports}var f=Yv(),Ms={exports:{}},Q={};var gh;function Bv(){if(gh)return Q;gh=1;var b=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),I=Symbol.for("react.context"),L=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),ol=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),T=Symbol.for("react.activity"),M=Symbol.for("react.view_transition"),gl=Symbol.iterator;function Yl(r){return r===null||typeof r!="object"?null:(r=gl&&r[gl]||r["@@iterator"],typeof r=="function"?r:null)}var Vl={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},il=Object.assign,at={};function xl(r,x,q){this.props=r,this.context=x,this.refs=at,this.updater=q||Vl}xl.prototype.isReactComponent={},xl.prototype.setState=function(r,x){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,x,"setState")},xl.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Jt(){}Jt.prototype=xl.prototype;function Hl(r,x,q){this.props=r,this.context=x,this.refs=at,this.updater=q||Vl}var yt=Hl.prototype=new Jt;yt.constructor=Hl,il(yt,xl.prototype),yt.isPureReactComponent=!0;var Zl=Array.isArray;function k(){}var al={H:null,A:null,T:null,S:null},_t=Object.prototype.hasOwnProperty;function lt(r,x,q){var H=q.ref;return{$$typeof:b,type:r,key:x,ref:H!==void 0?H:null,props:q}}function ut(r,x){return lt(r.type,x,r.props)}function Bl(r){return typeof r=="object"&&r!==null&&r.$$typeof===b}function Gt(r){var x={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(q){return x[q]})}var nt=/\/+/g;function _l(r,x){return typeof r=="object"&&r!==null&&r.key!=null?Gt(""+r.key):x.toString(36)}function O(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(k,k):(r.status="pending",r.then(function(x){r.status==="pending"&&(r.status="fulfilled",r.value=x)},function(x){r.status==="pending"&&(r.status="rejected",r.reason=x)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function B(r,x,q,H,tl){var ul=typeof r;(ul==="undefined"||ul==="boolean")&&(r=null);var el=!1;if(r===null)el=!0;else switch(ul){case"bigint":case"string":case"number":el=!0;break;case"object":switch(r.$$typeof){case b:case j:el=!0;break;case U:return el=r._init,B(el(r._payload),x,q,H,tl)}}if(el)return tl=tl(r),el=H===""?"."+_l(r,0):H,Zl(tl)?(q="",el!=null&&(q=el.replace(nt,"$&/")+"/"),B(tl,x,q,"",function(Al){return Al})):tl!=null&&(Bl(tl)&&(tl=ut(tl,q+(tl.key==null||r&&r.key===tl.key?"":(""+tl.key).replace(nt,"$&/")+"/")+el)),x.push(tl)),1;el=0;var E=H===""?".":H+":";if(Zl(r))for(var C=0;C>>1,J=O[rl];if(0<_(J,B))O[rl]=B,O[w]=J,w=rl;else break l}}function p(O){return O.length===0?null:O[0]}function d(O){if(O.length===0)return null;var B=O[0],w=O.pop();if(w!==B){O[0]=w;l:for(var rl=0,J=O.length,Gl=J>>>1;rl_(ce,w))r_(x,ce)?(O[rl]=x,O[r]=w,rl=r):(O[rl]=ce,O[wt]=w,rl=wt);else if(r_(x,w))O[rl]=x,O[r]=w,rl=r;else break l}}return B}function _(O,B){var w=O.sortIndex-B.sortIndex;return w!==0?w:O.id-B.id}if(b.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var G=performance;b.unstable_now=function(){return G.now()}}else{var I=Date,L=I.now();b.unstable_now=function(){return I.now()-L}}var K=[],ol=[],U=1,T=null,M=3,gl=!1,Yl=!1,Vl=!1,il=!1,at=typeof setTimeout=="function"?setTimeout:null,xl=typeof clearTimeout=="function"?clearTimeout:null,Jt=typeof setImmediate<"u"?setImmediate:null;function Hl(O){for(var B=p(ol);B!==null;){if(B.callback===null)d(ol);else if(B.startTime<=O)d(ol),B.sortIndex=B.expirationTime,j(K,B);else break;B=p(ol)}}function yt(O){if(Vl=!1,Hl(O),!Yl)if(p(K)!==null)Yl=!0,Zl||(Zl=!0,Bl());else{var B=p(ol);B!==null&&_l(yt,B.startTime-O)}}var Zl=!1,k=-1,al=5,_t=-1;function lt(){return il?!0:!(b.unstable_now()-_tO&<());){var rl=T.callback;if(typeof rl=="function"){T.callback=null,M=T.priorityLevel;var J=rl(T.expirationTime<=O);if(O=b.unstable_now(),typeof J=="function"){T.callback=J,Hl(O),B=!0;break t}T===p(K)&&d(K),Hl(O)}else d(K);T=p(K)}if(T!==null)B=!0;else{var Gl=p(ol);Gl!==null&&_l(yt,Gl.startTime-O),B=!1}}break l}finally{T=null,M=w,gl=!1}B=void 0}}finally{B?Bl():Zl=!1}}}var Bl;if(typeof Jt=="function")Bl=function(){Jt(ut)};else if(typeof MessageChannel<"u"){var Gt=new MessageChannel,nt=Gt.port2;Gt.port1.onmessage=ut,Bl=function(){nt.postMessage(null)}}else Bl=function(){at(ut,0)};function _l(O,B){k=at(function(){O(b.unstable_now())},B)}b.unstable_IdlePriority=5,b.unstable_ImmediatePriority=1,b.unstable_LowPriority=4,b.unstable_NormalPriority=3,b.unstable_Profiling=null,b.unstable_UserBlockingPriority=2,b.unstable_cancelCallback=function(O){O.callback=null},b.unstable_forceFrameRate=function(O){0>O||125rl?(O.sortIndex=w,j(ol,O),p(K)===null&&O===p(ol)&&(Vl?(xl(k),k=-1):Vl=!0,_l(yt,w-rl))):(O.sortIndex=J,j(K,O),Yl||gl||(Yl=!0,Zl||(Zl=!0,Bl()))),O},b.unstable_shouldYield=lt,b.unstable_wrapCallback=function(O){var B=M;return function(){var w=M;M=B;try{return O.apply(this,arguments)}finally{M=w}}}})(Rs)),Rs}var Eh;function Xv(){return Eh||(Eh=1,Ds.exports=wv()),Ds.exports}var Us={exports:{}},Pl={};var Th;function Qv(){if(Th)return Pl;Th=1;var b=Qs();function j(U){var T="https://react.dev/errors/"+U;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b)}catch(j){console.error(j)}}return b(),Us.exports=Qv(),Us.exports}var Nh;function Vv(){if(Nh)return sn;Nh=1;var b=Xv(),j=Qs(),p=Lv();function d(l){var t="https://react.dev/errors/"+l;if(1kt||(l.current=gt[kt],gt[kt]=null,kt--)}function bl(l,t){kt++,gt[kt]=l.current,l.current=t}var Wt=tt(null),hu=tt(null),Ne=tt(null),hn=tt(null);function mn(l,t){switch(bl(Ne,t),bl(hu,l),bl(Wt,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?x0(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=x0(t),l=p0(t,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}Kl(Wt),bl(Wt,l)}function Na(){Kl(Wt),Kl(hu),Kl(Ne)}function ki(l){var t=l.memoizedState;t!==null&&(ou._currentValue=t.memoizedState,bl(hn,l)),t=Wt.current;var e=p0(t,l.type);t!==e&&(bl(hu,l),bl(Wt,e))}function vn(l){hu.current===l&&(Kl(Wt),Kl(hu)),hn.current===l&&(Kl(hn),ou._currentValue=Al)}var Wi,Vs;function xe(l){if(Wi===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Wi=t&&t[1]||"",Vs=-1)":-1u||s[a]!==v[u]){var S=` `+s[a].replace(" at new "," at ");return l.displayName&&S.includes("")&&(S=S.replace("",l.displayName)),S}while(1<=a&&0<=u);break}}}finally{$i=!1,Error.prepareStackTrace=e}return(e=l?l.displayName||l.name:"")?xe(e):""}function wh(l,t){switch(l.tag){case 26:case 27:case 5:return xe(l.type);case 16:return xe("Lazy");case 13:return l.child!==t&&t!==null?xe("Suspense Fallback"):xe("Suspense");case 19:return xe("SuspenseList");case 0:case 15:return Fi(l.type,!1);case 11:return Fi(l.type.render,!1);case 1:return Fi(l.type,!0);case 31:return xe("Activity");case 30:return xe("ViewTransition");default:return""}}function Zs(l){try{var t="",e=null;do t+=wh(l,e),e=l,l=l.return;while(l);return t}catch(a){return` Error generating stack: `+a.message+` `+a.stack}}var Ii=Object.prototype.hasOwnProperty,Pi=b.unstable_scheduleCallback,lc=b.unstable_cancelCallback,Xh=b.unstable_shouldYield,Qh=b.unstable_requestPaint,St=b.unstable_now,Lh=b.unstable_getCurrentPriorityLevel,Ks=b.unstable_ImmediatePriority,Js=b.unstable_UserBlockingPriority,yn=b.unstable_NormalPriority,Vh=b.unstable_LowPriority,ks=b.unstable_IdlePriority,Zh=b.log,Kh=b.unstable_setDisableYieldValue,mu=null,bt=null;function pe(l){if(typeof Zh=="function"&&Kh(l),bt&&typeof bt.setStrictMode=="function")try{bt.setStrictMode(mu,l)}catch{}}var Et=Math.clz32?Math.clz32:Wh,Jh=Math.log,kh=Math.LN2;function Wh(l){return l>>>=0,l===0?32:31-(Jh(l)/kh|0)|0}var gn=256,Sn=262144,bn=4194304;function la(l){var t=l&42;if(t!==0)return t;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&-l;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function En(l,t,e){var a=l.pendingLanes;if(a===0)return 0;var u=0,n=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var c=a&134217727;return c!==0?(a=c&~n,a!==0?u=la(a):(i&=c,i!==0?u=la(i):e||(e=c&~l,e!==0&&(u=la(e))))):(c=a&~n,c!==0?u=la(c):i!==0?u=la(i):e||(e=a&~l,e!==0&&(u=la(e)))),u===0?0:t!==0&&t!==u&&(t&n)===0&&(n=u&-u,e=t&-t,n>=e||n===32&&(e&4194048)!==0)?t:u}function vu(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function Ws(l,t){(t&8)!==0&&(t|=t&32);var e=l.entangledLanes;if(e!==0)for(l=l.entanglements,e&=t;0e;e++)t.push(l);return t}function yu(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function Fh(l,t,e,a,u,n){var i=l.pendingLanes;l.pendingLanes=e,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=e,l.entangledLanes&=e,l.errorRecoveryDisabledLanes&=e,l.shellSuspendCounter=0;var c=l.entanglements,s=l.expirationTimes,v=l.hiddenUpdates;for(e=i&~e;0"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),rc=!1;if(oe)try{var Eu={};Object.defineProperty(Eu,"passive",{get:function(){rc=!0}}),window.addEventListener("test",Eu,Eu),window.removeEventListener("test",Eu,Eu)}catch{rc=!1}var Ae=null,dc=null,An=null;function Eo(){if(An)return An;var l,t=dc,e=t.length,a,u="value"in Ae?Ae.value:Ae.textContent,n=u.length;for(l=0;l=Nu),Ao=" ",Oo=!1;function jo(l,t){switch(l){case"keyup":return R1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _o(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Da=!1;function H1(l,t){switch(l){case"compositionend":return _o(t);case"keypress":return t.which!==32?null:(Oo=!0,Ao);case"textInput":return l=t.data,l===Ao&&Oo?null:l;default:return null}}function q1(l,t){if(Da)return l==="compositionend"||!gc&&jo(l,t)?(l=Eo(),An=dc=Ae=null,Da=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1"u")return null;try{return l.activeElement||l.body}catch{return l.body}}function Yo(l){for(;l&&l.firstChild;)l=l.firstChild;return l}function Bo(l,t){var e=Yo(l);l=0;for(var a;e;){if(e.nodeType===3){if(a=l+e.textContent.length,l<=t&&a>=t)return{node:e,offset:t-l};l=a}l:{for(;e;){if(e.nextSibling){e=e.nextSibling;break l}e=e.parentNode}e=void 0}e=Yo(e)}}function Go(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?Go(l,t.parentNode):"contains"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function wo(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=Ec(l.document);t instanceof l.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href=="string"}catch{e=!1}if(e)l=t.contentWindow;else break;t=Ec(l.document)}return t}function Tc(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||t==="textarea"||l.contentEditable==="true")}var V1=oe&&"documentMode"in document&&11>=document.documentMode,Ra=null,zc=null,Ou=null,Nc=!1;function Xo(l,t,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;Nc||Ra==null||Ra!==Ec(a)||(a=Ra,"selectionStart"in a&&Tc(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ou&&Au(Ou,a)||(Ou=a,a=Ci(zc,"onSelect"),0>=i,u-=i,Ft=1<<32-Et(t)+u|e<X?(Ul=Y,Y=null):Ul=Y.sibling;var nl=h(m,Y,y[X],z);if(nl===null){Y===null&&(Y=Ul);break}l&&Y&&nl.alternate===null&&t(m,Y),o=n(nl,o,X),ll===null?D=nl:ll.sibling=nl,ll=nl,Y=Ul}if(X===y.length)return e(m,Y),W&&me(m,X),D;if(Y===null){for(;XX?(Ul=Y,Y=null):Ul=Y.sibling;var Fe=h(m,Y,nl.value,z);if(Fe===null){Y===null&&(Y=Ul);break}l&&Y&&Fe.alternate===null&&t(m,Y),o=n(Fe,o,X),ll===null?D=Fe:ll.sibling=Fe,ll=Fe,Y=Ul}if(nl.done)return e(m,Y),W&&me(m,X),D;if(Y===null){for(;!nl.done;X++,nl=y.next())nl=N(m,nl.value,z),nl!==null&&(o=n(nl,o,X),ll===null?D=nl:ll.sibling=nl,ll=nl);return W&&me(m,X),D}for(Y=a(Y);!nl.done;X++,nl=y.next())nl=g(Y,m,X,nl.value,z),nl!==null&&(l&&(Ul=nl.alternate,Ul!==null&&Y.delete(Ul.key===null?X:Ul.key)),o=n(nl,o,X),ll===null?D=nl:ll.sibling=nl,ll=nl);return l&&Y.forEach(function(Hv){return t(m,Hv)}),W&&me(m,X),D}function Z(m,o,y,z){if(typeof y=="object"&&y!==null&&y.type===ut&&y.key===null&&y.props.ref===void 0&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case _t:l:{for(var D=y.key;o!==null;){if(o.key===D){if(D=y.type,D===ut){if(o.tag===7){e(m,o.sibling),z=u(o,y.props.children),De(z,y),z.return=m,m=z;break l}}else if(o.elementType===D||typeof D=="object"&&D!==null&&D.$$typeof===J&&ha(D)===o.type){e(m,o.sibling),z=u(o,y.props),De(z,y),z.return=m,m=z;break l}e(m,o);break}else t(m,o);o=o.sibling}y.type===ut?(z=ia(y.props.children,m.mode,z,y.key),De(z,y),z.return=m,m=z):(z=qn(y.type,y.key,y.props,null,m.mode,z),De(z,y),z.return=m,m=z)}return i(m);case lt:l:{for(D=y.key;o!==null;){if(o.key===D)if(o.tag===4&&o.stateNode.containerInfo===y.containerInfo&&o.stateNode.implementation===y.implementation){e(m,o.sibling),z=u(o,y.children||[]),z.return=m,m=z;break l}else{e(m,o);break}else t(m,o);o=o.sibling}z=Mc(y,m.mode,z),z.return=m,m=z}return i(m);case J:return y=ha(y),Z(m,o,y,z)}if(el(y))return A(m,o,y,z);if(H(y)){if(D=H(y),typeof D!="function")throw Error(d(150));return y=D.call(y),R(m,o,y,z)}if(typeof y.then=="function")return Z(m,o,Kn(y),z);if(y.$$typeof===_l)return Z(m,o,Qn(m,y),z);Jn(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,o!==null&&o.tag===6?(e(m,o.sibling),z=u(o,y),z.return=m,m=z):(e(m,o),z=_c(y,m.mode,z),z.return=m,m=z),i(m)):e(m,o)}return function(m,o,y,z){try{Ru=0;var D=Z(m,o,y,z);return Qa=null,D}catch(Y){if(Y===Xa||Y===Vn)throw Y;var ll=rt(29,Y,null,m.mode);return ll.lanes=z,ll.return=m,ll}}}var va=rr(!0),dr=rr(!1),Re=!1;function wc(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Ue(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function He(l,t,e){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(sl&2)!==0){var u=a.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),a.pending=t,t=Hn(l),Wo(l,null,e),t}return Un(l,a,t,e),Hn(l)}function Uu(l,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194048)!==0)){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Is(l,e)}}function Qc(l,t){var e=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var u=null,n=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};n===null?u=n=i:n=n.next=i,e=e.next}while(e!==null);n===null?u=n=t:n=n.next=t}else u=n=t;e={baseState:a.baseState,firstBaseUpdate:u,lastBaseUpdate:n,shared:a.shared,callbacks:a.callbacks},l.updateQueue=e;return}l=e.lastBaseUpdate,l===null?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=t}var Lc=!1;function Hu(){if(Lc){var l=wa;if(l!==null)throw l}}function qu(l,t,e,a){Lc=!1;var u=l.updateQueue;Re=!1;var n=u.firstBaseUpdate,i=u.lastBaseUpdate,c=u.shared.pending;if(c!==null){u.shared.pending=null;var s=c,v=s.next;s.next=null,i===null?n=v:i.next=v,i=s;var S=l.alternate;S!==null&&(S=S.updateQueue,c=S.lastBaseUpdate,c!==i&&(c===null?S.firstBaseUpdate=v:c.next=v,S.lastBaseUpdate=s))}if(n!==null){var N=u.baseState;i=0,S=v=s=null,c=n;do{var h=c.lane&-536870913,g=h!==c.lane;if(g?(P&h)===h:(a&h)===h){h!==0&&h===ra&&(Lc=!0),S!==null&&(S=S.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});l:{var A=l,R=c;h=t;var Z=e;switch(R.tag){case 1:if(A=R.payload,typeof A=="function"){N=A.call(Z,N,h);break l}N=A;break l;case 3:A.flags=A.flags&-65537|128;case 0:if(A=R.payload,h=typeof A=="function"?A.call(Z,N,h):A,h==null)break l;N=k({},N,h);break l;case 2:Re=!0}}h=c.callback,h!==null&&(l.flags|=64,g&&(l.flags|=8192),g=u.callbacks,g===null?u.callbacks=[h]:g.push(h))}else g={lane:h,tag:c.tag,payload:c.payload,callback:c.callback,next:null},S===null?(v=S=g,s=N):S=S.next=g,i|=h;if(c=c.next,c===null){if(c=u.shared.pending,c===null)break;g=c,c=g.next,g.next=null,u.lastBaseUpdate=g,u.shared.pending=null}}while(!0);S===null&&(s=N),u.baseState=s,u.firstBaseUpdate=v,u.lastBaseUpdate=S,n===null&&(u.shared.lanes=0),Qe|=i,l.lanes=i,l.memoizedState=N}}function hr(l,t){if(typeof l!="function")throw Error(d(191,l));l.call(t)}function mr(l,t){var e=l.callbacks;if(e!==null)for(l.callbacks=null,l=0;ln?n:8;var i=E.T,c={};c.types=i!==null?i.types:null,E.T=c,of(l,!1,t,e);try{var s=u(),v=E.S;if(v!==null&&v(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var S=tm(s,a);wu(l,t,S,Ot(l))}else wu(l,t,a,Ot(l))}catch(N){wu(l,t,{then:function(){},status:"rejected",reason:N},Ot())}finally{C.p=n,i!==null&&c.types!==null&&(i.types=c.types),E.T=i}}function cm(){}function ff(l,t,e,a){if(l.tag!==5)throw Error(d(476));var u=Kr(l).queue;Zr(l,u,t,Al,e===null?cm:function(){return Jr(l),e(a)})}function Kr(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:Al,baseState:Al,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Se,lastRenderedState:Al},next:null};var e={};return t.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Se,lastRenderedState:e},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function Jr(l){var t=Kr(l);t.next===null&&(t=l.alternate.memoizedState),wu(l,t.next.queue,{},Ot())}function sf(){return kl(ou)}function kr(){return Ml().memoizedState}function Wr(){return Ml().memoizedState}function fm(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var e=Ot();l=Ue(e);var a=He(t,l,e);a!==null&&(vt(a,t,e),Uu(a,t,e)),t={cache:qc()},l.payload=t;return}t=t.return}}function sm(l,t,e){var a=Ot();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},ai(l)?Fr(t,e):(e=Oc(l,t,e,a),e!==null&&(vt(e,l,a),Ir(e,t,a)))}function $r(l,t,e){var a=Ot();wu(l,t,e,a)}function wu(l,t,e,a){var u={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(ai(l))Fr(t,u);else{var n=l.alternate;if(l.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var i=t.lastRenderedState,c=n(i,e);if(u.hasEagerState=!0,u.eagerState=c,zt(c,i))return Un(l,t,u,0),Sl===null&&Rn(),!1}catch{}if(e=Oc(l,t,u,a),e!==null)return vt(e,l,a),Ir(e,t,a),!0}return!1}function of(l,t,e,a){if(a={lane:2,revertLane:ls(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ai(l)){if(t)throw Error(d(479))}else t=Oc(l,e,a,2),t!==null&&vt(t,l,2)}function ai(l){var t=l.alternate;return l===V||t!==null&&t===V}function Fr(l,t){La=$n=!0;var e=l.pending;e===null?t.next=t:(t.next=e.next,e.next=t),l.pending=t}function Ir(l,t,e){if((e&4194048)!==0){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,Is(l,e)}}var ui={readContext:kl,use:Pn,useCallback:Ol,useContext:Ol,useEffect:Ol,useImperativeHandle:Ol,useLayoutEffect:Ol,useInsertionEffect:Ol,useMemo:Ol,useReducer:Ol,useRef:Ol,useState:Ol,useDebugValue:Ol,useDeferredValue:Ol,useTransition:Ol,useSyncExternalStore:Ol,useId:Ol,useHostTransitionStatus:Ol,useFormState:Ol,useActionState:Ol,useOptimistic:Ol,useMemoCache:Ol,useCacheRefresh:Ol,useEffectEvent:Ol},Pr={readContext:kl,use:Pn,useCallback:function(l,t){return ct().memoizedState=[l,t===void 0?null:t],l},useContext:kl,useEffect:qr,useImperativeHandle:function(l,t,e){e=e!=null?e.concat([l]):null,ti(4194308,4,wr.bind(null,t,l),e)},useLayoutEffect:function(l,t){return ti(4194308,4,l,t)},useInsertionEffect:function(l,t){ti(4,2,l,t)},useMemo:function(l,t){var e=ct();t=t===void 0?null:t;var a=l();if(ya){pe(!0);try{l()}finally{pe(!1)}}return e.memoizedState=[a,t],a},useReducer:function(l,t,e){var a=ct();if(e!==void 0){var u=e(t);if(ya){pe(!0);try{e(t)}finally{pe(!1)}}}else u=t;return a.memoizedState=a.baseState=u,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},a.queue=l,l=l.dispatch=sm.bind(null,V,l),[a.memoizedState,l]},useRef:function(l){var t=ct();return l={current:l},t.memoizedState=l},useState:function(l){l=ef(l);var t=l.queue,e=$r.bind(null,V,t);return t.dispatch=e,[l.memoizedState,e]},useDebugValue:nf,useDeferredValue:function(l,t){var e=ct();return cf(e,l,t)},useTransition:function(){var l=ef(!1);return l=Zr.bind(null,V,l.queue,!0,!1),ct().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,e){var a=V,u=ct();if(W){if(e===void 0)throw Error(d(407));e=e()}else{if(e=t(),Sl===null)throw Error(d(349));(P&127)!==0||Er(a,t,e)}u.memoizedState=e;var n={value:e,getSnapshot:t};return u.queue=n,qr(zr.bind(null,a,n,l),[l]),a.flags|=2048,Za(9,{destroy:void 0},Tr.bind(null,a,n,e,t),null),e},useId:function(){var l=ct(),t=Sl.identifierPrefix;if(W){var e=It,a=Ft;e=(a&~(1<<32-Et(a)-1)).toString(32)+e,t="_"+t+"R_"+e,e=Fn++,0<\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?n.multiple=!0:a.size&&(n.size=a.size);break;default:n=typeof a.is=="string"?i.createElement(u,{is:a.is}):i.createElement(u)}}n[Jl]=t,n[ot]=a;l:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)n.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break l;for(;i.sibling===null;){if(i.return===null||i.return===t)break l;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=n;l:switch(Il(n,u,a),u){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break l;case"img":a=!0;break l;default:a=!1}a&&Ee(t)}}return Tl(t),t.subtreeFlags&=-33554433,Nf(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,e),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==a&&Ee(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(l=Ne.current,Ga(t)){if(l=t.stateNode,e=t.memoizedProps,a=null,u=Xl,u!==null)switch(u.tag){case 27:case 5:a=u.memoizedProps}l[Jl]=t,l=!!(l.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||z0(l.nodeValue,e)),l||Me(t,!0)}else l=Pu(l).createTextNode(a),l[Jl]=t,t.stateNode=l}return Tl(t),null;case 31:if(e=t.memoizedState,l===null||l.memoizedState!==null){if(a=Ga(t),e!==null){if(l===null){if(!a)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(557));l[Jl]=t}else ca(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tl(t),l=!1}else e=Rc(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),l=!0;if(!l)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Tl(t),null;case 13:if(a=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(u=Ga(t),a!==null&&a.dehydrated!==null){if(l===null){if(!u)throw Error(d(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(d(317));u[Jl]=t}else ca(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Tl(t),u=!1}else u=Rc(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(t),(t.flags&128)!==0?(t.lanes=e,t):(e=a!==null,l=l!==null&&l.memoizedState!==null,e&&(a=t.child,u=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(u=a.alternate.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==u&&(a.flags|=2048)),e!==l&&e&&(t.child.flags|=8192),oi(t,t.updateQueue),Tl(t),null);case 4:return Na(),l===null&&us(t.stateNode.containerInfo),t.flags|=67108864,Tl(t),null;case 10:return ye(t.type),Tl(t),null;case 19:if(Jc(t),a=t.memoizedState,a===null)return Tl(t),null;if(u=(t.flags&128)!==0,n=a.rendering,n===null)if(u)Qu(a,!1);else{if(jl!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(n=Wn(l),n!==null){for(t.flags|=128,Qu(a,!1),l=n.updateQueue,t.updateQueue=l,oi(t,l),t.subtreeFlags=0,l=e,e=t.child;e!==null;)$o(e,l),e=e.sibling;return Yu(t,$l.current&1|2),W&&me(t,a.treeForkCount),t.child}l=l.sibling}a.tail!==null&&St()>zi&&(t.flags|=128,u=!0,Qu(a,!1),t.lanes=4194304)}else{if(!u)if(l=Wn(n),l!==null){if(t.flags|=128,u=!0,l=l.updateQueue,t.updateQueue=l,oi(t,l),Qu(a,!0),a.tail===null&&a.tailMode!=="collapsed"&&a.tailMode!=="visible"&&!n.alternate&&!W)return Tl(t),null}else 2*St()-a.renderingStartTime>zi&&e!==536870912&&(t.flags|=128,u=!0,Qu(a,!1),t.lanes=4194304);a.isBackwards?(n.sibling=t.child,t.child=n):(l=a.last,l!==null?l.sibling=n:t.child=n,a.last=n)}if(a.tail!==null){l=a.tail;l:{for(e=l;e!==null;){if(e.alternate!==null){e=!1;break l}e=e.sibling}e=!0}return a.rendering=l,a.tail=l.sibling,a.renderingStartTime=St(),l.sibling=null,n=$l.current,n=u?n&1|2:n&1,a.tailMode==="visible"||a.tailMode==="collapsed"||!e||W?Yu(t,n):(e=n,bl(Wl,t),bl($l,e),et===null&&(et=t)),W&&me(t,a.treeForkCount),l}return Tl(t),null;case 22:case 23:return Nt(t),Zc(),a=t.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(e&536870912)!==0&&(t.flags&128)===0&&(Tl(t),t.subtreeFlags&6&&(t.flags|=8192)):Tl(t),e=t.updateQueue,e!==null&&oi(t,e.retryQueue),e=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==e&&(t.flags|=2048),l!==null&&Kl(da),null;case 24:return e=null,l!==null&&(e=l.memoizedState.cache),t.memoizedState.cache!==e&&(t.flags|=2048),ye(Cl),Tl(t),null;case 25:return null;case 30:return t.flags|=33554432,Tl(t),null}throw Error(d(156,t.tag))}function ym(l,t){switch(Cc(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return ye(Cl),Na(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return vn(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(d(340));ca()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(Nt(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(d(340));ca()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return Jc(t),l=t.flags,l&65536?(t.flags=l&-65537|128,l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null),t.flags|=4,t):null;case 4:return Na(),null;case 10:return ye(t.type),null;case 22:case 23:return Nt(t),Zc(),l!==null&&Kl(da),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return ye(Cl),null;case 25:return null;default:return null}}function xd(l,t){switch(Cc(t),t.tag){case 3:ye(Cl),Na();break;case 26:case 27:case 5:vn(t);break;case 4:Na();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:Jc(t);break;case 10:ye(t.type);break;case 22:case 23:Nt(t),Zc(),l!==null&&Kl(da);break;case 24:ye(Cl)}}function Lu(l,t){try{var e=t.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var u=a.next;e=u;do{if((e.tag&l)===l){a=void 0;var n=e.create,i=e.inst;a=n(),i.destroy=a}e=e.next}while(e!==u)}}catch(c){ml(t,t.return,c)}}function Ge(l,t,e){try{var a=t.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var n=u.next;a=n;do{if((a.tag&l)===l){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,u=t;var s=e,v=c;try{v()}catch(S){ml(u,s,S)}}}a=a.next}while(a!==n)}}catch(S){ml(t,t.return,S)}}function pd(l){var t=l.updateQueue;if(t!==null){var e=l.stateNode;try{mr(t,e)}catch(a){ml(l,l.return,a)}}}function Ad(l,t,e){e.props=ga(l.type,l.memoizedProps),e.state=l.memoizedState;try{e.componentWillUnmount()}catch(a){ml(l,t,a)}}function Pt(l,t){try{var e=l.ref;if(e!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:var u=l.stateNode,n=re(l.memoizedProps,u);(u.ref===null||u.ref.name!==n)&&(u.ref=R0(n)),a=u.ref;break;case 7:if(l.stateNode===null){var i=new jt(l);T(l.child,!1,iv,i,void 0,void 0),l.stateNode=i}a=l.stateNode;break;default:a=l.stateNode}typeof e=="function"?l.refCleanup=e(a):e.current=a}}catch(c){ml(l,t,c)}}function Fl(l,t){var e=l.ref,a=l.refCleanup;if(e!==null)if(typeof a=="function")try{a()}catch(u){ml(l,t,u)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof e=="function")try{e(null)}catch(u){ml(l,t,u)}else e.current=null}function ri(l,t){if((l.tag===5||l.tag===27||l.tag===6)&&l.alternate===null&&t!==null)for(var e=0;e title"))),Il(a,t,e),a[Jl]=l,wl(a),t=a;break l;case"link":if(n=$0("link","href",u).get(t+(e.href||""))){for(i=0;iZ&&(i=Z,Z=R,R=i);var m=Bo(c,R),o=Bo(c,Z);if(m&&o&&(g.rangeCount!==1||g.anchorNode!==m.node||g.anchorOffset!==m.offset||g.focusNode!==o.node||g.focusOffset!==o.offset)){var y=N.createRange();y.setStart(m.node,m.offset),g.removeAllRanges(),R>Z?(g.addRange(y),g.extend(o.node,o.offset)):(y.setEnd(o.node,o.offset),g.addRange(y))}}}}for(N=[],g=c;g=g.parentNode;)g.nodeType===1&&N.push({element:g,left:g.scrollLeft,top:g.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;ce?32:e,E.T=null,e=Vf,Vf=null;var n=Zt,i=ne;if(pl=0,Ta=Zt=null,ne=0,(sl&6)!==0)throw Error(d(331));var c=sl;if(sl|=4,Wd(n.current),Kd(n,n.current,i,e),sl=c,$u(0,!1),bt&&typeof bt.onPostCommitFiberRoot=="function")try{bt.onPostCommitFiberRoot(mu,n)}catch{}return!0}finally{C.p=u,E.T=a,o0(l,t)}}function r0(l,t,e){t=Dt(e,t),t=hf(l.stateNode,t,2),l=He(l,t,2),l!==null&&(yu(l,2),ie(l))}function ml(l,t,e){if(l.tag===3)r0(l,l,e);else for(;t!==null;){if(t.tag===3){r0(t,l,e);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Le===null||!Le.has(a))){l=Dt(e,l),e=cd(2),a=He(t,e,2),a!==null&&(fd(e,a,t,l),yu(a,2),ie(a));break}}t=t.return}}function Ff(l,t,e){var a=l.pingCache;if(a===null){a=l.pingCache=new Em;var u=new Set;a.set(t,u)}else u=a.get(t),u===void 0&&(u=new Set,a.set(t,u));u.has(e)||(Xf=!0,u.add(e),l=jm.bind(null,l,t,e),t.then(l,l))}function jm(l,t,e){var a=l.pingCache;a!==null&&a.delete(t),l.pingedLanes|=l.suspendedLanes&e,l.warmLanes&=~e,Sl===l&&(P&e)===e&&((jl===4||jl===3&&(P&62914560)===P&&300>St()-Ti)&&(sl&2)===0?eu(l,0):Ei|=e,Fa===P&&(Fa=0)),ie(l)}function d0(l,t){t===0&&(t=$s()),l=na(l,t),l!==null&&(yu(l,t),ie(l))}function _m(l){var t=l.memoizedState,e=0;t!==null&&(e=t.retryLane),d0(l,e)}function Mm(l,t){var e=0;switch(l.tag){case 31:case 13:var a=l.stateNode,u=l.memoizedState;u!==null&&(e=u.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),d0(l,e)}function Cm(l,t){return Pi(l,t)}var uu=null,nu=null,If=!1,_i=!1,Pf=!1,Ze=0;function ie(l){l!==nu&&l.next===null&&(nu===null?uu=nu=l:nu=nu.next=l),_i=!0,If||(If=!0,Rm())}function $u(l,t){if(!Pf&&_i){Pf=!0;do for(var e=!1,a=uu;a!==null;){if(l!==0){var u=a.pendingLanes;if(u===0)var n=0;else{var i=a.suspendedLanes,c=a.pingedLanes;n=(1<<31-Et(42|l)+1)-1,n&=u&~(i&~c),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(e=!0,y0(a,n))}else n=P,n=En(a,a===Sl?n:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(n&3)===0||vu(a,n)||(e=!0,y0(a,n));a=a.next}while(e);Pf=!1}}function Dm(){h0()}function h0(){_i=If=!1;var l=0;Ze!==0&&Vm()&&(l=Ze);for(var t=St(),e=null,a=uu;a!==null;){var u=a.next,n=m0(a,t);n===0?(a.next=null,e===null?uu=u:e.next=u,u===null&&(nu=e)):(e=a,(l!==0||(n&3)!==0)&&(_i=!0)),a=u}pl!==0&&pl!==5||$u(l),Ze!==0&&(Ze=0)}function m0(l,t){for(var e=l.suspendedLanes,a=l.pingedLanes,u=l.expirationTimes,n=l.pendingLanes&-62914561;0c)break;var S=s.transferSize,N=s.initiatorType;S&&N0(N)&&(s=s.responseEnd,i+=S*(sUi){R.length=A;break}y=new Promise($m.bind(y)),R.push(y)}}}if(0"u"?null:document;function K0(l,t,e){var a=cu;if(a&&typeof t=="string"&&t){var u=Mt(t);u='link[rel="'+l+'"][href="'+u+'"]',typeof e=="string"&&(u+='[crossorigin="'+e+'"]'),Z0.has(u)||(Z0.add(u),l={rel:l,crossOrigin:e,href:t},a.querySelector(u)===null&&(t=a.createElement("link"),Il(t,"link",l),wl(t),a.head.appendChild(t)))}}function vv(l){ze.D(l),K0("dns-prefetch",l,null)}function yv(l,t){ze.C(l,t),K0("preconnect",l,t)}function gv(l,t,e){ze.L(l,t,e);var a=cu;if(a&&l&&t){var u='link[rel="preload"][as="'+Mt(t)+'"]';t==="image"&&e&&e.imageSrcSet?(u+='[imagesrcset="'+Mt(e.imageSrcSet)+'"]',typeof e.imageSizes=="string"&&(u+='[imagesizes="'+Mt(e.imageSizes)+'"]')):u+='[href="'+Mt(l)+'"]';var n=u;switch(t){case"style":n=fu(l);break;case"script":n=su(l)}if(!(Bt.has(n)||(l=k({rel:"preload",href:t==="image"&&e&&e.imageSrcSet?void 0:l,as:t},e),Bt.set(n,l),a.querySelector(u)!==null||t==="style"&&a.querySelector(tn(n))||t==="script"&&a.querySelector(en(n))))){var i=a.createElement("link");Il(i,"link",l),t==="style"&&(i[Tn]=!0,i.onload=i.onerror=function(){uo(i)}),wl(i),a.head.appendChild(i)}}}function Sv(l,t){ze.m(l,t);var e=cu;if(e&&l){var a=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+Mt(a)+'"][href="'+Mt(l)+'"]',n=u;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=su(l)}if(!Bt.has(n)&&(l=k({rel:"modulepreload",href:l},t),Bt.set(n,l),e.querySelector(u)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(e.querySelector(en(n)))return}a=e.createElement("link"),Il(a,"link",l),wl(a),e.head.appendChild(a)}}}function bv(l,t,e){ze.S(l,t,e);var a=cu;if(a&&l){var u=Aa(a).hoistableStyles,n=fu(l);t=t||"default";var i=u.get(n);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(tn(n)))c.loading=5;else{l=k({rel:"stylesheet",href:l,"data-precedence":t},e),(e=Bt.get(n))&&Es(l,e);var s=i=a.createElement("link");wl(s),Il(s,"link",l),s._p=new Promise(function(v,S){s.onload=v,s.onerror=S}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,Di(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:c},u.set(n,i)}}}function Ev(l,t){ze.X(l,t);var e=cu;if(e&&l){var a=Aa(e).hoistableScripts,u=su(l),n=a.get(u);n||(n=e.querySelector(en(u)),n||(l=k({src:l,async:!0},t),(t=Bt.get(u))&&Ts(l,t),n=e.createElement("script"),wl(n),Il(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function Tv(l,t){ze.M(l,t);var e=cu;if(e&&l){var a=Aa(e).hoistableScripts,u=su(l),n=a.get(u);n||(n=e.querySelector(en(u)),n||(l=k({src:l,async:!0,type:"module"},t),(t=Bt.get(u))&&Ts(l,t),n=e.createElement("script"),wl(n),Il(n,"link",l),e.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},a.set(u,n))}}function J0(l,t,e,a){var u=(u=Ne.current)?ln(u):null;if(!u)throw Error(d(446));switch(l){case"meta":case"title":return null;case"style":return typeof e.precedence=="string"&&typeof e.href=="string"?(e=fu(e.href),t=Aa(u).hoistableStyles,a=t.get(e),a||(a={type:"style",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(e.rel==="stylesheet"&&typeof e.href=="string"&&typeof e.precedence=="string"){l=fu(e.href);var n=Aa(u).hoistableStyles,i=n.get(l);if(i||(u=u.ownerDocument||u,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(l,i),(n=u.querySelector(tn(l)))?n._p||(i.instance=n,i.state.loading=5):(n=Bt.get(l),n||(n={rel:"preload",as:"style",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},Bt.set(l,n)),zv(u,l,n,i.state))),t&&a===null)throw Error(d(528,""));return i}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=e.async,e=e.src,typeof e=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(e=su(e),t=Aa(u).hoistableScripts,a=t.get(e),a||(a={type:"script",instance:null,count:0,state:null},t.set(e,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,l))}}function fu(l){return'href="'+Mt(l)+'"'}function tn(l){return'link[rel="stylesheet"]['+l+"]"}function k0(l){return k({},l,{"data-precedence":l.precedence,precedence:null})}function zv(l,t,e,a){if(t=l.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Tn]!==!0){a.loading=1;return}}else t=l.createElement("link"),t[Tn]=!0,t.onload=t.onerror=uo.bind(null,t),Il(t,"link",e),wl(t),l.head.appendChild(t);a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2})}function su(l){return'[src="'+Mt(l)+'"]'}function en(l){return"script[async]"+l}function W0(l,t,e){if(t.count++,t.instance===null)switch(t.type){case"style":var a=l.querySelector('style[data-href~="'+Mt(e.href)+'"]');if(a)return t.instance=a,wl(a),a;var u=k({},e,{"data-href":e.href,"data-precedence":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement("style"),wl(a),Il(a,"style",u),Di(a,e.precedence,l),t.instance=a;case"stylesheet":u=fu(e.href);var n=l.querySelector(tn(u));if(n)return t.state.loading|=4,t.instance=n,wl(n),n;a=k0(e),(u=Bt.get(u))&&Es(a,u),n=(l.ownerDocument||l).createElement("link"),wl(n);var i=n;return i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),Il(n,"link",a),t.state.loading|=4,Di(n,e.precedence,l),t.instance=n;case"script":return n=su(e.src),(u=l.querySelector(en(n)))?(t.instance=u,wl(u),u):(a=e,(u=Bt.get(n))&&(a=k({},e),Ts(a,u)),l=l.ownerDocument||l,u=l.createElement("script"),wl(u),Il(u,"link",a),l.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Di(a,e.precedence,l));return t.instance}function Di(l,t,e){for(var a=e.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=a.length?a[a.length-1]:null,n=u,i=0;i title"):null)}function Nv(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(l=t.disabled,typeof t.precedence=="string"&&l==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function F0(l,t){return l==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function I0(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function P0(l){return(l.width||100)*(l.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function lh(l,t){typeof t.decode=="function"&&(l.imgCount++,t.complete||(l.imgBytes+=P0(t),l.suspenseyImages.push(t)),l=Av.bind(l),t.decode().then(l,l))}function xv(l,t,e,a){if(e.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var u=fu(a.href),n=t.querySelector(tn(u));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=an.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=n,wl(n);return}n=t.ownerDocument||t,a=k0(a),(u=Bt.get(u))&&Es(a,u),n=n.createElement("link"),wl(n);var i=n;i._p=new Promise(function(c,s){i.onload=c,i.onerror=s}),Il(n,"link",a),e.instance=n}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=an.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}var Ui=0;function pv(l,t){return l.stylesheets&&l.count===0&&qi(l,l.stylesheets),0Ui?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(u)}}:null}function th(l){if(l.count===0&&(l.imgCount===0||!l.waitingForImages)){if(l.stylesheets)qi(l,l.stylesheets);else if(l.unsuspend){var t=l.unsuspend;l.unsuspend=null,t()}}}function an(){this.count--,th(this)}function Av(){this.imgCount--,th(this)}var Hi=null;function qi(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,Hi=new Map,t.forEach(Ov,l),Hi=null,an.call(l))}function Ov(l,t){if(!(t.state.loading&4)){var e=Hi.get(l);if(e)var a=e.get(null);else{e=new Map,Hi.set(l,e);for(var u=l.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b)}catch(j){console.error(j)}}return b(),Cs.exports=Vv(),Cs.exports}var Kv=Zv();const Jv=Hh(Kv);const kv=b=>b.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),qh=(...b)=>b.filter((j,p,d)=>!!j&&j.trim()!==""&&d.indexOf(j)===p).join(" ").trim();var Wv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const $v=fl.forwardRef(({color:b="currentColor",size:j=24,strokeWidth:p=2,absoluteStrokeWidth:d,className:_="",children:G,iconNode:I,...L},K)=>fl.createElement("svg",{ref:K,...Wv,width:j,height:j,stroke:b,strokeWidth:d?Number(p)*24/Number(j):p,className:qh("lucide",_),...L},[...I.map(([ol,U])=>fl.createElement(ol,U)),...Array.isArray(G)?G:[G]]));const zl=(b,j)=>{const p=fl.forwardRef(({className:d,..._},G)=>fl.createElement($v,{ref:G,iconNode:j,className:qh(`lucide-${kv(b)}`,d),..._}));return p.displayName=`${b}`,p};const Fv=zl("ArrowDownLeft",[["path",{d:"M17 7 7 17",key:"15tmo1"}],["path",{d:"M17 17H7V7",key:"1org7z"}]]);const on=zl("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);const Pe=zl("ArrowUpRight",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]);const Yh=zl("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);const Li=zl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);const ph=zl("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const Ah=zl("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const Iv=zl("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const Pv=zl("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);const Ki=zl("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const Hs=zl("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const Vi=zl("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const ly=zl("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);const ty=zl("Leaf",[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]]);const Oh=zl("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const ey=zl("Palette",[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]]);const qs=zl("Pickaxe",[["path",{d:"M14.531 12.469 6.619 20.38a1 1 0 1 1-3-3l7.912-7.912",key:"we99rg"}],["path",{d:"M15.686 4.314A12.5 12.5 0 0 0 5.461 2.958 1 1 0 0 0 5.58 4.71a22 22 0 0 1 6.318 3.393",key:"1w6hck"}],["path",{d:"M17.7 3.7a1 1 0 0 0-1.4 0l-4.6 4.6a1 1 0 0 0 0 1.4l2.6 2.6a1 1 0 0 0 1.4 0l4.6-4.6a1 1 0 0 0 0-1.4z",key:"15hgfx"}],["path",{d:"M19.686 8.314a12.501 12.501 0 0 1 1.356 10.225 1 1 0 0 1-1.751-.119 22 22 0 0 0-3.393-6.319",key:"452b4h"}]]);const ay=zl("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);const ws=zl("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);const Xs=zl("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);const uy=zl("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);const ny=zl("Swords",[["polyline",{points:"14.5 17.5 3 6 3 3 6 3 17.5 14.5",key:"1hfsw2"}],["line",{x1:"13",x2:"19",y1:"19",y2:"13",key:"1vrmhu"}],["line",{x1:"16",x2:"20",y1:"16",y2:"20",key:"1bron3"}],["line",{x1:"19",x2:"21",y1:"21",y2:"19",key:"13pww6"}],["polyline",{points:"14.5 6.5 18 3 21 3 21 6 17.5 9.5",key:"hbey2j"}],["line",{x1:"5",x2:"9",y1:"14",y2:"18",key:"1hf58s"}],["line",{x1:"7",x2:"4",y1:"17",y2:"20",key:"pidxm4"}],["line",{x1:"3",x2:"5",y1:"19",y2:"21",key:"1pehsh"}]]);const Ys=zl("Wallet",[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]);const Bs=zl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const iy=zl("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function cy(b,j,p){return JSON.stringify(["wikideck:pow:v1",b.height,b.previousHash,b.seed,b.article.pageId,b.article.revisionId,b.article.title,b.article.extract,b.article.image??"",b.article.url,b.article.source,b.article.category,b.difficulty,b.createdAt,j,p])}function fy(b,j,p,d){return JSON.stringify(["wikideck:claim:v1",cy(b,j,p),d])}function sy(b){return JSON.stringify(["wikideck:transfer:v1",b.cardHash,b.from,b.to,b.sequence])}function rn(b,j){let p=b.blocks.find(d=>d.hash===j)?.owner;for(const d of b.transfers)d.cardHash===j&&(p=d.to);return p}function Ji(b){const j=parseInt(b.slice(-4),16)%100;return j<3?"Legendary":j<15?"Epic":j<40?"Rare":"Common"}function oy(b){return{power:30+parseInt(b.slice(8,10),16)%70,defense:30+parseInt(b.slice(10,12),16)%70,knowledge:30+parseInt(b.slice(12,14),16)%70}}const Bh=b=>btoa(String.fromCharCode(...new Uint8Array(b)));async function jh(){const b=await new Promise((j,p)=>{const d=indexedDB.open("wikideck-wallet",1);d.onupgradeneeded=()=>d.result.createObjectStore("keys"),d.onsuccess=()=>j(d.result),d.onerror=()=>p(new Error("Enable browser storage to create your local wallet."))});try{const j=await new Promise((I,L)=>{const K=b.transaction("keys").objectStore("keys").get("identity");K.onsuccess=()=>I(K.result),K.onerror=()=>L(K.error)});if(j)return j;const p=await crypto.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!1,["sign","verify"]),d=await crypto.subtle.exportKey("spki",p.publicKey),_=new Uint8Array(await crypto.subtle.digest("SHA-256",d)),G={privateKey:p.privateKey,publicKey:Bh(d),address:Array.from(_,I=>I.toString(16).padStart(2,"0")).join("")};return await new Promise((I,L)=>{const K=b.transaction("keys","readwrite");K.objectStore("keys").put(G,"identity"),K.oncomplete=()=>I(),K.onerror=()=>L(K.error)}),G}finally{b.close()}}let _h;function Mh(){return _h??=(async()=>navigator.locks?await navigator.locks.request("wikideck-wallet-init",jh):jh())().catch(b=>{throw _h=void 0,b})}async function Ch(b,j){return Bh(await crypto.subtle.sign({name:"ECDSA",hash:"SHA-256"},b.privateKey,new TextEncoder().encode(j)))}const ry=[{pageId:22780,title:"Octopus",extract:"An octopus is a soft-bodied marine mollusc with eight arms. These remarkable animals use camouflage, problem-solving, and jet propulsion to navigate their world.",category:"Nature",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=22780",image:"https://upload.wikimedia.org/wikipedia/commons/5/57/Octopus2.jpg"},{pageId:736,title:"Albert Einstein",extract:"Albert Einstein was a theoretical physicist whose work on relativity transformed our understanding of space, time, and gravity. He received the 1921 Nobel Prize in Physics.",category:"People",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=736",image:"https://upload.wikimedia.org/wikipedia/commons/2/28/Albert_Einstein_Head_cleaned.jpg"},{pageId:19331,title:"Moon",extract:"The Moon is Earth’s natural satellite. Its cratered surface records billions of years of impacts, and its gravitational influence helps drive the ocean tides.",category:"Space",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=19331",image:"https://upload.wikimedia.org/wikipedia/commons/e/e1/FullMoon2010.jpg"},{pageId:23053,title:"Periodic table",extract:"The periodic table arranges chemical elements by atomic number and recurring properties. Its structure reveals patterns in the building blocks of matter.",category:"Science",revisionId:0,source:"offline",url:"https://en.wikipedia.org/?curid=23053",image:"https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Colour_18-col_PT_with_labels.svg/960px-Colour_18-col_PT_with_labels.svg.png"}],dn=ry.map((b,j)=>({article:b,hash:["000eca7498a26d1908613726da6e869d7c9c936f4a461cb439ef24672b9a0008","000b1a387a067a7d698677965ca1ca7b0eb5e590811431bdb9aad62268180001","0008a4fa5893e9ddbd679cbcc7f0938706aa70aab8c8af42a4bc67a42520001","0009a4fa5893e9ddbd679cbcc7f0938706aa70aab8c8af42a4bc67a42520020"][j]}));function dy(b){if(!b.image)return b.url;const j=new URL(b.image).pathname.split("/");return`https://commons.wikimedia.org/wiki/File:${j.includes("thumb")?j.at(-2):j.at(-1)}`}function Zi({card:b,onClick:j}){const{article:p,hash:d}=b,_=Ji(d),G=oy(d);return f.jsxs("button",{className:`wiki-card ${_.toLowerCase()}`,onClick:j,tabIndex:j?0:-1,"aria-label":`View ${p.title} ${_} card`,children:[f.jsxs("div",{className:"card-top",children:[f.jsxs("span",{children:[f.jsx(Xs,{size:11})," ",_]}),f.jsxs("span",{children:["W / ",String(p.pageId).slice(-4)]})]}),f.jsxs("div",{className:`card-art art-${p.category.toLowerCase()}`,children:[p.image?f.jsx("img",{src:p.image,alt:p.title,loading:"lazy",referrerPolicy:"no-referrer",onError:I=>{I.currentTarget.style.display="none"}}):f.jsx(Ki,{size:64}),f.jsx("span",{className:"card-category",children:p.category})]}),f.jsxs("div",{className:"card-content",children:[f.jsxs("div",{className:"card-title",children:[f.jsx("h3",{children:p.title}),f.jsx(Pe,{size:16})]}),f.jsx("p",{children:p.extract}),f.jsxs("div",{className:"card-stats",children:[f.jsxs("span",{children:[f.jsx(ny,{size:12}),G.power]}),f.jsxs("span",{children:[f.jsx(ws,{size:12}),G.defense]}),f.jsxs("span",{children:[f.jsx(Yh,{size:12}),G.knowledge]})]})]}),f.jsxs("div",{className:"card-bottom",children:[f.jsxs("span",{children:["WIKIPEDIA · #",p.pageId]}),f.jsx("span",{children:b.block?`BLOCK ${b.block.height}`:"PREVIEW"})]})]})}function hy(b){fl.useEffect(()=>{if(!b)return;const j=document.activeElement,p=document.querySelector('[role="dialog"]');if(!p)return;const d=Array.from(document.querySelectorAll(".sidebar, .main-shell"));d.forEach(L=>{L.inert=!0});const _=document.body.style.overflow;document.body.style.overflow="hidden";const G=()=>Array.from(p.querySelectorAll('a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), [tabindex="0"]')).filter(L=>L.getClientRects().length>0);G()[0]?.focus();const I=L=>{if(L.key!=="Tab")return;const K=G(),ol=K[0],U=K.at(-1);L.shiftKey&&document.activeElement===ol?(L.preventDefault(),U?.focus()):!L.shiftKey&&document.activeElement===U&&(L.preventDefault(),ol?.focus())};return p.addEventListener("keydown",I),()=>{p.removeEventListener("keydown",I),d.forEach(L=>{L.inert=!1}),document.body.style.overflow=_,j?.isConnected&&j.focus()}},[b])}const Ls=[{id:"mocha",label:"Mocha",base:"#1e1e2e"},{id:"macchiato",label:"Macchiato",base:"#24273a"},{id:"frappe",label:"Frappé",base:"#303446"},{id:"latte",label:"Latte",base:"#eff1f5"}],Dh="wikideck-theme",my="mocha";function Gh(b){return Ls.some(j=>j.id===b)}function Rh(b){return Gh(b)?b:my}function Uh(b){document.documentElement.dataset.theme=b,document.documentElement.style.colorScheme=b==="latte"?"light":"dark",document.querySelector('meta[name="theme-color"]')?.setAttribute("content",Ls.find(j=>j.id===b).base)}function vy(){const[b,j]=fl.useState(()=>Rh(document.documentElement.dataset.theme));fl.useEffect(()=>{const d=_=>{if(_.key!==Dh&&_.key!==null)return;const G=Rh(_.newValue);Uh(G),j(G)};return window.addEventListener("storage",d),()=>window.removeEventListener("storage",d)},[]);const p=d=>{if(Gh(d)){Uh(d),j(d);try{localStorage.setItem(Dh,d)}catch{}}};return f.jsxs("label",{className:"theme-picker",title:"Choose your Catppuccin flavor",children:[f.jsx(ey,{size:15,"aria-hidden":"true"}),f.jsx("select",{"aria-label":"Catppuccin theme",value:b,onChange:d=>p(d.target.value),children:Ls.map(d=>f.jsx("option",{value:d.id,children:d.label},d.id))})]})}const Ie=b=>`${b.slice(0,6)}…${b.slice(-4)}`;async function Gs(b,j){const p=await fetch(`/api/${b}`,j?{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)}:{});if(!p.headers.get("content-type")?.includes("application/json"))throw new Error("The API is unavailable. Start both Wikideck services.");const d=await p.json();if(!p.ok)throw new Error(d.error??"Request failed");return d}function yy(){const[b,j]=fl.useState("Discover"),[p,d]=fl.useState(),[_,G]=fl.useState(),[I,L]=fl.useState(""),[K,ol]=fl.useState(""),[U,T]=fl.useState(null),[M,gl]=fl.useState(),[Yl,Vl]=fl.useState(""),[il,at]=fl.useState("All cards"),[xl,Jt]=fl.useState(!1),[Hl,yt]=fl.useState(!1),[Zl,k]=fl.useState(!1),[al,_t]=fl.useState(.5),[lt,ut]=fl.useState({attempts:0,rate:0,hash:""}),[Bl,Gt]=fl.useState(""),[nt,_l]=fl.useState(!1);hy(!!(U||M));const O=fl.useRef(null),B=fl.useRef(0),w=fl.useRef(""),rl=fl.useRef(null),J=()=>{O.current?.terminate(),O.current=null,w.current="",B.current++,Jt(!1)},Gl=async()=>{const E=await Gs("state");return G(E),L(""),w.current&&w.current!==E.challenge.seed&&(J(),ol("A new block was mined. Start again to discover the next article.")),E};fl.useEffect(()=>{Mh().then(d).catch(Al=>L(Al.message)),Gl().catch(Al=>L(Al.message));const E=setInterval(()=>Gl().catch(Al=>L(Al.message)),8e3),C=()=>{document.hidden&&J()};return document.addEventListener("visibilitychange",C),()=>{clearInterval(E),O.current?.terminate(),document.removeEventListener("visibilitychange",C)}},[]),fl.useEffect(()=>{if(K){const E=setTimeout(()=>ol(""),6e3);return()=>clearTimeout(E)}},[K]),fl.useEffect(()=>{const E=C=>{C.key==="Escape"&&!nt&&(T(null),gl(void 0))};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[nt]);const wt=async()=>{if(!p||!Zl||xl||Hl)return;L(""),J();const E=B.current;Jt(!0),ut({attempts:0,rate:0,hash:""});try{const C=await Gl();if(E!==B.current||document.hidden){J();return}w.current=C.challenge.seed;const Al=new Worker(new URL("/assets/miner.worker-BXjAkXbr.js",import.meta.url),{type:"module"});O.current=Al,Al.onerror=()=>{J(),L("Mining worker could not start. Check WebAssembly support.")},Al.onmessage=async({data:gt})=>{if(E===B.current&&(gt.type==="progress"&&ut(gt),gt.type==="error"&&(J(),L(gt.message)),gt.type==="found")){J(),yt(!0);try{const kt=await Ch(p,fy(C.challenge,p.address,gt.nonce,gt.hash)),{block:tt}=await Gs("mine",{owner:p.address,publicKey:p.publicKey,signature:kt,nonce:gt.nonce,hash:gt.hash,seed:C.challenge.seed});await Gl(),gl({article:tt.article,hash:tt.hash,block:tt}),ol(`Block #${tt.height} verified. ${tt.article.title} is yours!`)}catch(kt){L(kt.message)}finally{yt(!1)}}},Al.postMessage({challenge:C.challenge,owner:p.address,duty:al})}catch(C){J(),L(C.message)}},ce=async()=>{if(!(!p||!M?.block||!_)){_l(!0);try{const E={cardHash:M.hash,from:p.address,to:Bl.trim().toLowerCase(),sequence:_.transfers.filter(C=>C.cardHash===M.hash).length};await Gs("transfer",{...E,publicKey:p.publicKey,signature:await Ch(p,sy(E))}),await Gl(),T(null),gl(void 0),Gt(""),ol("Card transferred. Ownership has been updated.")}catch(E){L(E.message)}finally{_l(!1)}}},r=_?.blocks.filter(E=>rn(_,E.hash)===p?.address)??[],x=b==="My collection"?r.map(E=>({article:E.article,hash:E.hash,block:E})):_?.blocks.length?[..._.blocks].reverse().slice(0,12).map(E=>({article:E.article,hash:E.hash,block:E})):dn,q=x.filter(E=>(il==="All cards"||E.article.category===il)&&`${E.article.title} ${E.article.extract}`.toLowerCase().includes(Yl.toLowerCase())),H=()=>{j("Discover"),setTimeout(()=>rl.current?.scrollIntoView({behavior:"smooth",block:"center"}),50)},tl=async()=>{if(p)try{await navigator.clipboard.writeText(p.address),ol("Wallet address copied.")}catch{T("wallet"),ol("Copy your address from the wallet panel.")}},ul=async()=>{L("");try{d(await Mh()),await Gl()}catch(E){L(E.message)}},el=()=>{nt||(T(null),gl(void 0))};return f.jsxs("div",{className:"app-shell",children:[f.jsxs("aside",{className:"sidebar",children:[f.jsxs("a",{href:"#",className:"brand",onClick:E=>{E.preventDefault(),j("Discover")},children:[f.jsxs("span",{className:"brand-mark",children:["w",f.jsx("span",{children:"✦"})]}),"wikideck",f.jsx("span",{className:"brand-dot",children:"."})]}),f.jsx("div",{className:"sidebar-label",children:"YOUR NEXT DISCOVERY"}),f.jsx("nav",{"aria-label":"Main navigation",children:["Discover","My collection","Block explorer"].map((E,C)=>{const Al=[ly,Vi,Ki][C];return f.jsxs("button",{className:`nav-item ${b===E?"active":""}`,onClick:()=>{j(E),Vl(""),at("All cards")},children:[f.jsx(Al,{size:18}),E,E==="My collection"&&f.jsx("span",{className:"nav-count",children:r.length})]},E)})}),f.jsxs("div",{className:"sidebar-note",children:[f.jsx("span",{className:"tiny-spark",children:"✦"}),f.jsxs("h3",{children:["A little curiosity.",f.jsx("br",{}),"An entire universe."]}),f.jsx("p",{children:"Turn the world’s knowledge into something you can collect."}),f.jsxs("button",{onClick:()=>T("guide"),children:["How it works ",f.jsx(Pe,{size:15})]})]}),f.jsxs("div",{className:"sidebar-bottom",children:[f.jsx("span",{className:"network-dot"}),f.jsx("span",{children:"Local network"}),f.jsx("span",{className:"prototype",children:"ALPHA"})]}),f.jsxs("button",{className:"help-link",onClick:()=>T("guide"),children:[f.jsx(Ah,{size:16})," The field guide ",f.jsx(Pe,{size:14})]})]}),f.jsxs("div",{className:"main-shell",children:[f.jsxs("header",{className:"topbar",children:[f.jsxs("div",{className:"breadcrumbs",children:["Explore ",f.jsx(ph,{size:13}),f.jsx("span",{children:b})]}),f.jsxs("div",{className:"top-actions",children:[f.jsx(vy,{}),f.jsxs("span",{className:"network-pill",children:[f.jsx("span",{className:`network-dot ${_?"":"disconnected"}`}),_?"Network online":"Connecting"]}),f.jsxs("button",{className:"wallet-button",onClick:()=>T("wallet"),children:[f.jsx("span",{className:"wallet-avatar",children:f.jsx(Ys,{size:14})}),p?Ie(p.address):"Creating wallet",f.jsx(ph,{size:14})]})]})]}),f.jsxs("main",{children:[I&&f.jsxs("div",{className:"error-banner",role:"alert",children:[f.jsx(Ah,{size:17}),f.jsx("span",{children:I}),f.jsx("button",{onClick:ul,children:"Retry"}),f.jsx("button",{"aria-label":"Dismiss error",onClick:()=>L(""),children:f.jsx(Bs,{size:16})})]}),b==="Discover"&&f.jsxs(f.Fragment,{children:[f.jsxs("section",{className:"hero",children:[f.jsxs("div",{className:"hero-copy",children:[f.jsxs("span",{className:"eyebrow",children:[f.jsx("span",{})," THE KNOWLEDGE IS REAL. SO ARE THE CARDS."]}),f.jsxs("h1",{children:["Mine knowledge.",f.jsx("br",{}),"Collect the ",f.jsx("span",{children:"extraordinary."})]}),f.jsx("p",{children:"One encyclopedia. Endless discoveries. Put your curiosity to work and turn Wikipedia into your next great collection."}),f.jsxs("div",{className:"hero-actions",children:[f.jsxs("button",{className:"button dark",onClick:H,children:[f.jsx(qs,{size:17})," Start your discovery ",f.jsx(Pe,{size:17})]}),f.jsxs("button",{className:"text-button",onClick:()=>T("guide"),children:["How it works ",f.jsx(on,{size:16})]})]}),f.jsxs("div",{className:"hero-foot",children:[f.jsxs("span",{children:[f.jsx(Li,{size:13})," No purchase needed"]}),f.jsxs("span",{children:[f.jsx(Li,{size:13})," Mined in your browser"]})]})]}),f.jsxs("div",{className:"hero-visual",children:[f.jsx("div",{className:"orbit orbit-one"}),f.jsx("div",{className:"orbit orbit-two"}),f.jsx("span",{className:"orbit-spark spark-one",children:"✳"}),f.jsx("span",{className:"orbit-spark spark-two",children:"+"}),f.jsxs("div",{className:"floating-label label-top",children:[f.jsx("span",{className:"network-dot"})," Powered by curiosity"]}),f.jsx("div",{className:"hero-card back-card",children:f.jsx(Zi,{card:dn[2],onClick:()=>gl(dn[2])})}),f.jsx("div",{className:"hero-card front-card",children:f.jsx(Zi,{card:dn[0],onClick:()=>gl(dn[0])})}),f.jsxs("div",{className:"floating-label label-bottom",children:[f.jsx(Xs,{size:15})," A world worth collecting ",f.jsx(Pe,{size:13})]})]})]}),f.jsxs("section",{className:"metrics","aria-label":"Network statistics",children:[f.jsxs("div",{children:[f.jsx("span",{className:"metric-icon",children:f.jsx(Vi,{size:19})}),f.jsxs("div",{children:[f.jsx("span",{children:"Cards discovered"}),f.jsxs("strong",{children:[_?.blocks.length.toLocaleString()??"—",f.jsx("small",{children:"on this network"})]})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"metric-icon",children:f.jsx(Ki,{size:19})}),f.jsxs("div",{children:[f.jsx("span",{children:"Next block"}),f.jsxs("strong",{children:["#",_?.challenge.height.toString().padStart(4,"0")??"—",f.jsx("small",{children:"a new discovery"})]})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"metric-icon",children:f.jsx(Ys,{size:19})}),f.jsxs("div",{children:[f.jsx("span",{children:"Your collection"}),f.jsxs("strong",{children:[r.length,f.jsx("small",{children:r.length===1?"unique story":"unique stories"})]})]})]}),f.jsxs("div",{children:[f.jsx("span",{className:"metric-icon leaf",children:f.jsx(ty,{size:19})}),f.jsxs("div",{children:[f.jsx("span",{children:"Proof of curiosity"}),f.jsxs("strong",{className:"algorithm",children:["Argon2id",f.jsx("small",{children:"memory-hard · 16 MiB"})]})]})]})]}),f.jsxs("section",{className:"mining-panel",ref:rl,children:[f.jsxs("div",{className:"mining-description",children:[f.jsxs("div",{className:"section-eyebrow",children:[f.jsx("span",{className:xl?"network-dot":"idle-dot"})," ",xl?"YOUR MINER IS RUNNING":Hl?"VERIFYING YOUR DISCOVERY":"YOUR NEXT CARD STARTS HERE"]}),f.jsx("h2",{children:xl?"A little work. A new world.":Hl?"Making it official.":"Ready to uncover something?"}),f.jsx("p",{children:xl?"Your browser is solving a memory-hard puzzle. Every attempt is another chance to discover.":"Solve a block in your browser. Get a one-of-a-kind card from a real Wikipedia article."}),f.jsxs("div",{className:"mining-meta",children:[f.jsxs("span",{children:[f.jsx(Pv,{size:13})," One local worker"]}),f.jsxs("span",{children:[f.jsx(ws,{size:13})," Server-verified proof"]}),f.jsxs("span",{children:[f.jsx(iy,{size:13})," No gas fees"]})]})]}),f.jsxs("div",{className:"miner-controls",children:[f.jsxs("div",{className:"miner-display",children:[f.jsxs("div",{children:[f.jsx("span",{children:xl?"HASH RATE":"NEXT ARTICLE"}),f.jsx("strong",{children:xl?`${lt.rate.toFixed(1)} H/s`:_?.challenge.article.title??"Finding an article…"})]}),f.jsx("div",{className:`signal-bars ${xl?"running":""}`,children:Array.from({length:18},(E,C)=>f.jsx("i",{style:{height:`${10+(C*13+7)%23}px`,animationDelay:`${C*.07}s`}},C))})]}),xl||Hl?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"hash-line",children:Hl?"Proof found. Verifying and saving…":`${lt.attempts} attempts · ${lt.hash.slice(0,22)||"Initializing WebAssembly"}…`}),f.jsxs("button",{className:"button mining-stop",disabled:Hl,onClick:J,children:[Hl?f.jsx(Oh,{size:16,className:"spin"}):f.jsx(uy,{size:14}),Hl?"Verifying block":"Stop mining"]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"intensity",children:[f.jsx("label",{htmlFor:"duty",children:"Worker duty cycle"}),f.jsxs("select",{id:"duty",value:al,onChange:E=>_t(Number(E.target.value)),children:[f.jsx("option",{value:.25,children:"Gentle · 25%"}),f.jsx("option",{value:.5,children:"Balanced · 50%"}),f.jsx("option",{value:.85,children:"Focused · 85%"})]})]}),f.jsxs("label",{className:"consent",children:[f.jsx("input",{type:"checkbox",checked:Zl,onChange:E=>k(E.target.checked)}),"I agree to use this device’s CPU and battery."]}),f.jsxs("button",{className:"button lime",onClick:wt,disabled:!Zl||!p||!_,children:[f.jsx(qs,{size:17})," Start mining ",f.jsx(on,{size:16})]})]}),f.jsx("small",{className:"miner-footnote",children:"Always opt-in. Stops when you switch tabs. No background mining."})]})]})]}),b!=="Block explorer"?f.jsxs("section",{className:"discover-section",children:[f.jsxs("div",{className:"section-heading",children:[f.jsxs("div",{children:[f.jsx("div",{className:"section-eyebrow",children:b==="My collection"?"YOUR PERSONAL ENCYCLOPEDIA":"AN ENCYCLOPEDIA, REIMAGINED"}),f.jsxs("h2",{children:[b==="My collection"?"Your cabinet of curiosities":"A world of possible discoveries",f.jsx("span",{className:"count-badge",children:x.length})]}),f.jsx("p",{children:b==="My collection"?"Every card has a story. These ones belong to you.":_?.blocks.length?"Real cards recently mined on your local network.":"A taste of what’s out there. Preview cards are examples, not owned assets."})]}),b==="Discover"&&f.jsxs("button",{className:"text-button",onClick:()=>j("My collection"),children:["My collection ",f.jsx(on,{size:16})]})]}),f.jsxs("div",{className:"filter-bar",children:[f.jsx("div",{className:"category-tabs",children:["All cards","Nature","Space","Science","People","History","Culture"].map(E=>f.jsx("button",{className:il===E?"selected":"",onClick:()=>at(E),children:E},E))}),f.jsxs("label",{className:"search-input",children:[f.jsx(ay,{size:15}),f.jsx("input",{"aria-label":"Search cards",placeholder:"Find a discovery…",value:Yl,onChange:E=>Vl(E.target.value)})]})]}),q.length?f.jsx("div",{className:"card-grid",children:q.map(E=>f.jsxs("div",{className:"card-wrap",children:[f.jsx(Zi,{card:E,onClick:()=>gl(E)}),f.jsxs("div",{className:"card-list-caption",children:[f.jsx("span",{children:E.block?`Block #${E.block.height}`:"Example discovery"}),f.jsx("span",{className:"caption-dot"}),E.block?Ie(rn(_,E.hash)??""):"Not yet mined"]})]},E.hash))}):f.jsxs("div",{className:"empty-state",children:[f.jsx(Vi,{size:38}),f.jsx("h3",{children:Yl||il!=="All cards"?"No discoveries here. Yet.":"Your first discovery is waiting."}),f.jsx("p",{children:Yl||il!=="All cards"?"Try another search or explore a different category.":"Mine your first block to turn a Wikipedia article into a card you own."}),f.jsxs("button",{className:"button dark",onClick:H,children:[f.jsx(qs,{size:16})," Discover your first card"]})]})]}):f.jsxs("section",{className:"explorer-section",children:[f.jsx("div",{className:"section-eyebrow",children:"FOLLOW THE KNOWLEDGE"}),f.jsxs("div",{className:"section-heading",children:[f.jsxs("div",{children:[f.jsxs("h1",{children:["Block explorer",f.jsx("span",{className:"count-badge",children:_?.blocks.length??0})]}),f.jsx("p",{children:"Every article. Every proof. Independently verifiable."})]}),f.jsxs("a",{className:"button outline",href:"/api/chain",target:"_blank",rel:"noreferrer",children:["View chain JSON ",f.jsx(Hs,{size:15})]})]}),f.jsxs("div",{className:"explorer-note",children:[f.jsx(ws,{size:18}),f.jsx("p",{children:"This is a local, single-coordinator proof-of-work chain. It is not a decentralized mainnet. Transfers are signed ownership records, not mined blocks."})]}),_?.blocks.length?f.jsx("div",{className:"table-scroll",children:f.jsxs("table",{children:[f.jsx("thead",{children:f.jsxs("tr",{children:[f.jsx("th",{children:"Block"}),f.jsx("th",{children:"Discovery"}),f.jsx("th",{children:"Proof hash"}),f.jsx("th",{children:"Current owner"}),f.jsx("th",{children:"Rarity"})]})}),f.jsx("tbody",{children:[..._.blocks].reverse().map(E=>f.jsxs("tr",{onClick:()=>gl({article:E.article,hash:E.hash,block:E}),children:[f.jsxs("td",{children:["#",E.height.toString().padStart(4,"0")]}),f.jsxs("td",{children:[f.jsx("strong",{children:E.article.title}),f.jsxs("small",{children:["Wikipedia #",E.article.pageId]})]}),f.jsx("td",{className:"mono",children:Ie(E.hash)}),f.jsx("td",{className:"mono",children:Ie(rn(_,E.hash)??"")}),f.jsx("td",{children:f.jsx("span",{className:`rarity-tag ${Ji(E.hash).toLowerCase()}`,children:Ji(E.hash)})})]},E.hash))})]})}):f.jsxs("div",{className:"empty-state",children:[f.jsx(Ki,{size:40}),f.jsx("h3",{children:"A new chain. A blank page."}),f.jsx("p",{children:"Be the first to mine a block and make a discovery."}),f.jsxs("button",{className:"button dark",onClick:H,children:["Mine the first block ",f.jsx(on,{size:16})]})]}),f.jsx("h2",{className:"transfer-title",children:"Ownership journal"}),_?.transfers.length?f.jsx("div",{className:"journal",children:_.transfers.map((E,C)=>f.jsxs("div",{children:[f.jsx(Fv,{size:18}),f.jsx("span",{children:Ie(E.cardHash)}),f.jsxs("span",{children:[Ie(E.from)," → ",Ie(E.to)]}),f.jsxs("span",{children:["Transfer #",E.sequence+1]}),f.jsx(Li,{size:14})]},C))}):f.jsx("p",{className:"muted",children:"No transfers yet. Open a card you own to send it to another wallet."})]}),f.jsxs("footer",{children:[f.jsxs("a",{href:"https://en.wikipedia.org",target:"_blank",rel:"noreferrer",children:[f.jsx(Yh,{size:16})," Built on the shoulders of Wikipedia."]}),f.jsxs("span",{children:["Curiosity is the currency.",f.jsx("span",{className:"footer-star",children:"✦"})]}),f.jsxs("p",{children:["Independent experiment, not affiliated with Wikimedia. Live text: ",f.jsx("a",{href:"https://creativecommons.org/licenses/by-sa/4.0/",target:"_blank",rel:"noreferrer",children:"CC BY-SA 4.0"}),". Image credits on each card. No monetary value."]})]})]})]}),K&&f.jsxs("div",{className:"toast",role:"status",children:[f.jsx("span",{children:f.jsx(Li,{size:16})}),K,f.jsx("button",{onClick:()=>ol(""),"aria-label":"Dismiss notification",children:f.jsx(Bs,{size:14})})]}),(U||M)&&f.jsx("div",{className:"modal-backdrop",onClick:E=>{E.target===E.currentTarget&&el()},children:f.jsxs("section",{className:`modal ${M&&!U?"card-modal":""}`,role:"dialog","aria-modal":"true","aria-label":U==="wallet"?"Local wallet":U==="transfer"?"Transfer card":U==="guide"?"How Wikideck works":"Card details",children:[f.jsx("button",{className:"modal-close","aria-label":"Close dialog",onClick:el,disabled:nt,children:f.jsx(Bs,{size:20})}),U==="guide"?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"modal-icon",children:f.jsx(Xs,{size:24})}),f.jsx("div",{className:"section-eyebrow",children:"THE FIELD GUIDE"}),f.jsx("h2",{children:"A universe in every card."}),f.jsxs("div",{className:"guide-steps",children:[f.jsxs("div",{children:[f.jsx("span",{children:"01"}),f.jsxs("div",{children:[f.jsx("h3",{children:"Put curiosity to work."}),f.jsx("p",{children:"Opt in to one browser worker running memory-hard Argon2id in WebAssembly. It uses 16 MiB per hash, two passes, and a low demo difficulty."})]})]}),f.jsxs("div",{children:[f.jsx("span",{children:"02"}),f.jsxs("div",{children:[f.jsx("h3",{children:"Discover a little of everything."}),f.jsx("p",{children:"Each block commits to a Wikipedia page ID, revision, and text snapshot. The server checks your proof and P-256 wallet signature before awarding a card."})]})]}),f.jsxs("div",{children:[f.jsx("span",{children:"03"}),f.jsxs("div",{children:[f.jsx("h3",{children:"Make it your collection."}),f.jsx("p",{children:"Rarity and game stats come from the mined hash, not scientific importance. Send cards with signed transfers. There is no combat mode or real-money marketplace yet."})]})]})]}),f.jsxs("div",{className:"info-box",children:[f.jsx("strong",{children:"An honest experiment."}),f.jsx("p",{children:"Argon2id is memory-hard, not Monero’s RandomX and not proven ASIC-proof. This local coordinator is not a decentralized blockchain. Cards are not public-chain NFTs and have no promised monetary value. Mining consumes energy and may warm your device. On Wikipedia outages, clearly labeled offline starter articles are used."})]}),f.jsxs("button",{className:"button dark full",onClick:()=>{el(),H()},children:["Let’s discover something ",f.jsx(on,{size:16})]})]}):U==="wallet"?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"modal-icon",children:f.jsx(Ys,{size:24})}),f.jsx("div",{className:"section-eyebrow",children:"YOUR LOCAL IDENTITY"}),f.jsx("h2",{children:"A wallet for your wonders."}),f.jsx("p",{className:"muted",children:"Your browser created a P-256 signing key. No extension, account, or cryptocurrency required."}),f.jsx("label",{className:"field-label",children:"YOUR RECEIVE ADDRESS"}),f.jsx("div",{className:"address-box",children:p?.address??"Creating your wallet…"}),f.jsxs("button",{className:"button dark full",onClick:tl,children:[f.jsx(Iv,{size:16})," Copy wallet address"]}),f.jsxs("div",{className:"info-box",children:[f.jsx("strong",{children:"This wallet lives in this browser."}),f.jsx("p",{children:"The non-extractable private key is stored in IndexedDB. Clearing site data or losing this browser profile permanently loses access. There is no recovery or backup in this prototype. Use only for testing."})]}),f.jsxs("p",{className:"wallet-count",children:[f.jsx(Vi,{size:17})," ",r.length," cards in your collection"]})]}):U==="transfer"?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"modal-icon",children:f.jsx(Pe,{size:24})}),f.jsx("div",{className:"section-eyebrow",children:"PASS ON THE CURIOSITY"}),f.jsxs("h2",{children:["Send ",M?.article.title,"."]}),f.jsx("p",{className:"muted",children:"The recipient must create a Wikideck wallet on this same local network and share their 64-character receive address."}),f.jsx("label",{className:"field-label",htmlFor:"recipient",children:"RECIPIENT ADDRESS"}),f.jsx("input",{className:"recipient-input",id:"recipient",value:Bl,onChange:E=>Gt(E.target.value),placeholder:"Paste a 64-character wallet address",autoComplete:"off"}),f.jsxs("div",{className:"info-box",children:[f.jsx("strong",{children:"Transfers cannot be undone."}),f.jsx("p",{children:"This will sign an ownership transfer. Double-check the address; there is no recovery for mistakes."})]}),I&&f.jsx("p",{className:"transfer-error",role:"alert",children:I}),f.jsxs("button",{className:"button dark full",disabled:nt||!/^[a-fA-F0-9]{64}$/.test(Bl.trim())||Bl.trim().toLowerCase()===p?.address,onClick:ce,children:[nt?f.jsx(Oh,{className:"spin",size:16}):f.jsx(Pe,{size:16}),nt?"Signing transfer…":"Confirm & send card"]})]}):M&&f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"detail-card",children:f.jsx(Zi,{card:M})}),f.jsxs("div",{className:"detail-copy",children:[f.jsx("div",{className:"section-eyebrow",children:M.block?`DISCOVERED IN BLOCK #${M.block.height}`:"EXAMPLE CARD · NOT OWNED"}),f.jsx("h2",{children:M.article.title}),f.jsx("p",{children:M.article.extract}),f.jsxs("div",{className:"detail-facts",children:[f.jsxs("span",{children:["Page ID",f.jsxs("strong",{children:["#",M.article.pageId]})]}),f.jsxs("span",{children:["Rarity",f.jsx("strong",{children:Ji(M.hash)})]}),f.jsxs("span",{children:["Content",f.jsx("strong",{children:M.article.source==="live"?`Revision ${M.article.revisionId}`:"Offline starter"})]})]}),M.block&&f.jsxs(f.Fragment,{children:[f.jsx("label",{className:"field-label",children:"VERIFIED PROOF HASH"}),f.jsx("div",{className:"address-box",children:M.hash}),f.jsxs("p",{className:"muted",children:["Current owner: ",Ie(rn(_,M.hash)??"")]})]}),f.jsxs("div",{className:"detail-links",children:[f.jsxs("a",{href:M.article.url,target:"_blank",rel:"noreferrer",children:["Read on Wikipedia ",f.jsx(Hs,{size:14})]}),f.jsxs("a",{href:dy(M.article),target:"_blank",rel:"noreferrer",children:["Image & license ",f.jsx(Hs,{size:14})]})]}),f.jsxs("p",{className:"attribution",children:[M.article.source==="live"?"Text by Wikipedia contributors, CC BY-SA 4.0. Excerpt shortened for card display.":"Original starter summary; linked to the real Wikipedia article. No live revision captured."," Stats are game values, not encyclopedia facts."]}),M.block&&rn(_,M.hash)===p?.address&&f.jsxs("button",{className:"button dark full",onClick:()=>T("transfer"),children:["Transfer this card ",f.jsx(Pe,{size:16})]})]})]})]})})]})}Jv.createRoot(document.getElementById("root")).render(f.jsx(Gv.StrictMode,{children:f.jsx(yy,{})}));