diff --git a/dist/assets/index-B996h0A2.js b/dist/assets/index-B996h0A2.js new file mode 100644 index 0000000..15ce1b2 --- /dev/null +++ b/dist/assets/index-B996h0A2.js @@ -0,0 +1,68 @@ +function jf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Pf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $u={exports:{}},Tl={},Wu={exports:{}},I={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Sr=Symbol.for("react.element"),_f=Symbol.for("react.portal"),Lf=Symbol.for("react.fragment"),Rf=Symbol.for("react.strict_mode"),Tf=Symbol.for("react.profiler"),zf=Symbol.for("react.provider"),Of=Symbol.for("react.context"),If=Symbol.for("react.forward_ref"),Uf=Symbol.for("react.suspense"),Mf=Symbol.for("react.memo"),Df=Symbol.for("react.lazy"),Es=Symbol.iterator;function Ff(e){return e===null||typeof e!="object"?null:(e=Es&&e[Es]||e["@@iterator"],typeof e=="function"?e:null)}var Hu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qu=Object.assign,Ku={};function _n(e,t,n){this.props=e,this.context=t,this.refs=Ku,this.updater=n||Hu}_n.prototype.isReactComponent={};_n.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Gu(){}Gu.prototype=_n.prototype;function Co(e,t,n){this.props=e,this.context=t,this.refs=Ku,this.updater=n||Hu}var No=Co.prototype=new Gu;No.constructor=Co;Qu(No,_n.prototype);No.isPureReactComponent=!0;var Cs=Array.isArray,Xu=Object.prototype.hasOwnProperty,jo={current:null},Yu={key:!0,ref:!0,__self:!0,__source:!0};function Ju(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Xu.call(t,r)&&!Yu.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,J=P[B];if(0>>1;Bl(On,T))Mel(Zt,On)?(P[B]=Zt,P[Me]=T,B=Me):(P[B]=On,P[Ue]=T,B=Ue);else if(Mel(Zt,T))P[B]=Zt,P[Me]=T,B=Me;else break e}}return z}function l(P,z){var T=P.sortIndex-z.sortIndex;return T!==0?T:P.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],c=[],m=1,d=null,v=3,S=!1,g=!1,x=!1,k=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function h(P){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=P)r(c),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(c)}}function y(P){if(x=!1,h(P),!g)if(n(s)!==null)g=!0,Ut(C);else{var z=n(c);z!==null&&ke(y,z.startTime-P)}}function C(P,z){g=!1,x&&(x=!1,p(R),R=-1),S=!0;var T=v;try{for(h(z),d=n(s);d!==null&&(!(d.expirationTime>z)||P&&!se());){var B=d.callback;if(typeof B=="function"){d.callback=null,v=d.priorityLevel;var J=B(d.expirationTime<=z);z=e.unstable_now(),typeof J=="function"?d.callback=J:d===n(s)&&r(s),h(z)}else r(s);d=n(s)}if(d!==null)var Mt=!0;else{var Ue=n(c);Ue!==null&&ke(y,Ue.startTime-z),Mt=!1}return Mt}finally{d=null,v=T,S=!1}}var j=!1,_=null,R=-1,A=5,O=-1;function se(){return!(e.unstable_now()-OP||125B?(P.sortIndex=T,t(c,P),n(s)===null&&P===n(c)&&(x?(p(R),R=-1):x=!0,ke(y,T-B))):(P.sortIndex=J,t(s,P),g||S||(g=!0,Ut(C))),P},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(P){var z=v;return function(){var T=v;v=z;try{return P.apply(this,arguments)}finally{v=T}}}})(na);ta.exports=na;var Jf=ta.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zf=w,je=Jf;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ni=Object.prototype.hasOwnProperty,qf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,js={},Ps={};function bf(e){return Ni.call(Ps,e)?!0:Ni.call(js,e)?!1:qf.test(e)?Ps[e]=!0:(js[e]=!0,!1)}function ed(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function td(e,t,n,r){if(t===null||typeof t>"u"||ed(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function me(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oe[t]=new me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){oe[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var _o=/[\-:]([a-z])/g;function Lo(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(_o,Lo);oe[t]=new me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(_o,Lo);oe[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(_o,Lo);oe[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ro(e,t,n,r){var l=oe.hasOwnProperty(t)?oe[t]:null;(l!==null?l.type!==0:r||!(2u||l[o]!==i[u]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{ei=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$n(e):""}function nd(e){switch(e.tag){case 5:return $n(e.type);case 16:return $n("Lazy");case 13:return $n("Suspense");case 19:return $n("SuspenseList");case 0:case 2:case 15:return e=ti(e.type,!1),e;case 11:return e=ti(e.type.render,!1),e;case 1:return e=ti(e.type,!0),e;default:return""}}function Li(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nn:return"Fragment";case tn:return"Portal";case ji:return"Profiler";case To:return"StrictMode";case Pi:return"Suspense";case _i:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ia:return(e.displayName||"Context")+".Consumer";case la:return(e._context.displayName||"Context")+".Provider";case zo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Oo:return t=e.displayName||null,t!==null?t:Li(e.type)||"Memo";case dt:t=e._payload,e=e._init;try{return Li(e(t))}catch{}}return null}function rd(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Li(t);case 8:return t===To?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sa(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ld(e){var t=sa(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rr(e){e._valueTracker||(e._valueTracker=ld(e))}function ua(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sa(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function il(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ri(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ls(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_t(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function aa(e,t){t=t.checked,t!=null&&Ro(e,"checked",t,!1)}function Ti(e,t){aa(e,t);var n=_t(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zi(e,t.type,n):t.hasOwnProperty("defaultValue")&&zi(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Rs(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zi(e,t,n){(t!=="number"||il(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Wn=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Tr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},id=["Webkit","ms","Moz","O"];Object.keys(Kn).forEach(function(e){id.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Kn[t]=Kn[e]})});function pa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Kn.hasOwnProperty(e)&&Kn[e]?(""+t).trim():t+"px"}function ha(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=pa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var od=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ui(e,t){if(t){if(od[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Mi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Di=null;function Io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fi=null,mn=null,vn=null;function Os(e){if(e=Er(e)){if(typeof Fi!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Ml(t),Fi(e.stateNode,e.type,t))}}function ma(e){mn?vn?vn.push(e):vn=[e]:mn=e}function va(){if(mn){var e=mn,t=vn;if(vn=mn=null,Os(e),t)for(e=0;e>>=0,e===0?32:31-(gd(e)/yd|0)|0}var zr=64,Or=4194304;function Hn(e){switch(e&-e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function al(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=Hn(u):(i&=o,i!==0&&(r=Hn(i)))}else o=n&~l,o!==0?r=Hn(o):i!==0&&(r=Hn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ve(t),e[t]=n}function kd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Xn),$s=" ",Ws=!1;function Ma(e,t){switch(e){case"keyup":return Jd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Da(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function qd(e,t){switch(e){case"compositionend":return Da(t);case"keypress":return t.which!==32?null:(Ws=!0,$s);case"textInput":return e=t.data,e===$s&&Ws?null:e;default:return null}}function bd(e,t){if(rn)return e==="compositionend"||!$o&&Ma(e,t)?(e=Ia(),Yr=Ao=vt=null,rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Gs(n)}}function Va(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Va(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $a(){for(var e=window,t=il();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=il(e.document)}return t}function Wo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function up(e){var t=$a(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Va(n.ownerDocument.documentElement,n)){if(r!==null&&Wo(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Xs(n,i);var o=Xs(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ln=null,Hi=null,Jn=null,Qi=!1;function Ys(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qi||ln==null||ln!==il(r)||(r=ln,"selectionStart"in r&&Wo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Jn&&ur(Jn,r)||(Jn=r,r=dl(Hi,"onSelect"),0un||(e.current=Zi[un],Zi[un]=null,un--)}function V(e,t){un++,Zi[un]=e.current,e.current=t}var Lt={},fe=Tt(Lt),we=Tt(!1),Ht=Lt;function xn(e,t){var n=e.type.contextTypes;if(!n)return Lt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Se(e){return e=e.childContextTypes,e!=null}function hl(){W(we),W(fe)}function nu(e,t,n){if(fe.current!==Lt)throw Error(E(168));V(fe,t),V(we,n)}function Za(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(E(108,rd(e)||"Unknown",l));return G({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Ht=fe.current,V(fe,e),V(we,we.current),!0}function ru(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=Za(e,t,Ht),r.__reactInternalMemoizedMergedChildContext=e,W(we),W(fe),V(fe,e)):W(we),V(we,n)}var qe=null,Dl=!1,mi=!1;function qa(e){qe===null?qe=[e]:qe.push(e)}function Sp(e){Dl=!0,qa(e)}function zt(){if(!mi&&qe!==null){mi=!0;var e=0,t=F;try{var n=qe;for(F=1;e>=o,l-=o,be=1<<32-Ve(t)+l|n<R?(A=_,_=null):A=_.sibling;var O=v(p,_,h[R],y);if(O===null){_===null&&(_=A);break}e&&_&&O.alternate===null&&t(p,_),f=i(O,f,R),j===null?C=O:j.sibling=O,j=O,_=A}if(R===h.length)return n(p,_),H&&Dt(p,R),C;if(_===null){for(;RR?(A=_,_=null):A=_.sibling;var se=v(p,_,O.value,y);if(se===null){_===null&&(_=A);break}e&&_&&se.alternate===null&&t(p,_),f=i(se,f,R),j===null?C=se:j.sibling=se,j=se,_=A}if(O.done)return n(p,_),H&&Dt(p,R),C;if(_===null){for(;!O.done;R++,O=h.next())O=d(p,O.value,y),O!==null&&(f=i(O,f,R),j===null?C=O:j.sibling=O,j=O);return H&&Dt(p,R),C}for(_=r(p,_);!O.done;R++,O=h.next())O=S(_,p,R,O.value,y),O!==null&&(e&&O.alternate!==null&&_.delete(O.key===null?R:O.key),f=i(O,f,R),j===null?C=O:j.sibling=O,j=O);return e&&_.forEach(function(st){return t(p,st)}),H&&Dt(p,R),C}function k(p,f,h,y){if(typeof h=="object"&&h!==null&&h.type===nn&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Lr:e:{for(var C=h.key,j=f;j!==null;){if(j.key===C){if(C=h.type,C===nn){if(j.tag===7){n(p,j.sibling),f=l(j,h.props.children),f.return=p,p=f;break e}}else if(j.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===dt&&ou(C)===j.type){n(p,j.sibling),f=l(j,h.props),f.ref=An(p,j,h),f.return=p,p=f;break e}n(p,j);break}else t(p,j);j=j.sibling}h.type===nn?(f=Wt(h.props.children,p.mode,y,h.key),f.return=p,p=f):(y=rl(h.type,h.key,h.props,null,p.mode,y),y.ref=An(p,f,h),y.return=p,p=y)}return o(p);case tn:e:{for(j=h.key;f!==null;){if(f.key===j)if(f.tag===4&&f.stateNode.containerInfo===h.containerInfo&&f.stateNode.implementation===h.implementation){n(p,f.sibling),f=l(f,h.children||[]),f.return=p,p=f;break e}else{n(p,f);break}else t(p,f);f=f.sibling}f=Ei(h,p.mode,y),f.return=p,p=f}return o(p);case dt:return j=h._init,k(p,f,j(h._payload),y)}if(Wn(h))return g(p,f,h,y);if(In(h))return x(p,f,h,y);Br(p,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,f!==null&&f.tag===6?(n(p,f.sibling),f=l(f,h),f.return=p,p=f):(n(p,f),f=ki(h,p.mode,y),f.return=p,p=f),o(p)):n(p,f)}return k}var En=nc(!0),rc=nc(!1),yl=Tt(null),wl=null,fn=null,Go=null;function Xo(){Go=fn=wl=null}function Yo(e){var t=yl.current;W(yl),e._currentValue=t}function eo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yn(e,t){wl=e,Go=fn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ye=!0),e.firstContext=null)}function Oe(e){var t=e._currentValue;if(Go!==e)if(e={context:e,memoizedValue:t,next:null},fn===null){if(wl===null)throw Error(E(308));fn=e,wl.dependencies={lanes:0,firstContext:e}}else fn=fn.next=e;return t}var Bt=null;function Jo(e){Bt===null?Bt=[e]:Bt.push(e)}function lc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Jo(t)):(n.next=l.next,l.next=n),t.interleaved=n,lt(e,r)}function lt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var pt=!1;function Zo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ic(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function tt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Et(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,M&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,lt(e,n)}return l=r.interleaved,l===null?(t.next=t,Jo(r)):(t.next=l.next,l.next=t),r.interleaved=t,lt(e,n)}function Zr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mo(e,n)}}function su(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Sl(e,t,n,r){var l=e.updateQueue;pt=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(u!==null){l.shared.pending=null;var s=u,c=s.next;s.next=null,o===null?i=c:o.next=c,o=s;var m=e.alternate;m!==null&&(m=m.updateQueue,u=m.lastBaseUpdate,u!==o&&(u===null?m.firstBaseUpdate=c:u.next=c,m.lastBaseUpdate=s))}if(i!==null){var d=l.baseState;o=0,m=c=s=null,u=i;do{var v=u.lane,S=u.eventTime;if((r&v)===v){m!==null&&(m=m.next={eventTime:S,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var g=e,x=u;switch(v=t,S=n,x.tag){case 1:if(g=x.payload,typeof g=="function"){d=g.call(S,d,v);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,v=typeof g=="function"?g.call(S,d,v):g,v==null)break e;d=G({},d,v);break e;case 2:pt=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,v=l.effects,v===null?l.effects=[u]:v.push(u))}else S={eventTime:S,lane:v,tag:u.tag,payload:u.payload,callback:u.callback,next:null},m===null?(c=m=S,s=d):m=m.next=S,o|=v;if(u=u.next,u===null){if(u=l.shared.pending,u===null)break;v=u,u=v.next,v.next=null,l.lastBaseUpdate=v,l.shared.pending=null}}while(!0);if(m===null&&(s=d),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Gt|=o,e.lanes=o,e.memoizedState=d}}function uu(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=gi.transition;gi.transition={};try{e(!1),t()}finally{F=n,gi.transition=r}}function kc(){return Ie().memoizedState}function Cp(e,t,n){var r=Nt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ec(e))Cc(t,n);else if(n=lc(e,t,n,r),n!==null){var l=pe();$e(n,e,r,l),Nc(n,t,r)}}function Np(e,t,n){var r=Nt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ec(e))Cc(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,We(u,o)){var s=t.interleaved;s===null?(l.next=l,Jo(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=lc(e,t,l,r),n!==null&&(l=pe(),$e(n,e,r,l),Nc(n,t,r))}}function Ec(e){var t=e.alternate;return e===K||t!==null&&t===K}function Cc(e,t){Zn=kl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Nc(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mo(e,n)}}var El={readContext:Oe,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useInsertionEffect:ue,useLayoutEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useMutableSource:ue,useSyncExternalStore:ue,useId:ue,unstable_isNewReconciler:!1},jp={readContext:Oe,useCallback:function(e,t){return Ke().memoizedState=[e,t===void 0?null:t],e},useContext:Oe,useEffect:cu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,br(4194308,4,gc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return br(4194308,4,e,t)},useInsertionEffect:function(e,t){return br(4,2,e,t)},useMemo:function(e,t){var n=Ke();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ke();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Cp.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Ke();return e={current:e},t.memoizedState=e},useState:au,useDebugValue:is,useDeferredValue:function(e){return Ke().memoizedState=e},useTransition:function(){var e=au(!1),t=e[0];return e=Ep.bind(null,e[1]),Ke().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,l=Ke();if(H){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),re===null)throw Error(E(349));Kt&30||ac(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,cu(fc.bind(null,r,i,e),[e]),r.flags|=2048,vr(9,cc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ke(),t=re.identifierPrefix;if(H){var n=et,r=be;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ge]=t,e[fr]=r,Uc(e,t,!1,!1),t.stateNode=e;e:{switch(o=Mi(n,r),n){case"dialog":$("cancel",e),$("close",e),l=r;break;case"iframe":case"object":case"embed":$("load",e),l=r;break;case"video":case"audio":for(l=0;ljn&&(t.flags|=128,r=!0,Bn(i,!1),t.lanes=4194304)}else{if(!r)if(e=xl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Bn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!H)return ae(t),null}else 2*Z()-i.renderingStartTime>jn&&n!==1073741824&&(t.flags|=128,r=!0,Bn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Z(),t.sibling=null,n=Q.current,V(Q,r?n&1|2:n&1),t):(ae(t),null);case 22:case 23:return fs(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(ae(t),t.subtreeFlags&6&&(t.flags|=8192)):ae(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Ip(e,t){switch(Qo(t),t.tag){case 1:return Se(t.type)&&hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(),W(we),W(fe),es(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return bo(t),null;case 13:if(W(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Q),null;case 4:return Cn(),null;case 10:return Yo(t.type._context),null;case 22:case 23:return fs(),null;case 24:return null;default:return null}}var $r=!1,ce=!1,Up=typeof WeakSet=="function"?WeakSet:Set,L=null;function dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function ao(e,t,n){try{n()}catch(r){X(e,t,r)}}var xu=!1;function Mp(e,t){if(Ki=cl,e=$a(),Wo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,c=0,m=0,d=e,v=null;t:for(;;){for(var S;d!==n||l!==0&&d.nodeType!==3||(u=o+l),d!==i||r!==0&&d.nodeType!==3||(s=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(S=d.firstChild)!==null;)v=d,d=S;for(;;){if(d===e)break t;if(v===n&&++c===l&&(u=o),v===i&&++m===r&&(s=o),(S=d.nextSibling)!==null)break;d=v,v=d.parentNode}d=S}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gi={focusedElem:e,selectionRange:n},cl=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var x=g.memoizedProps,k=g.memoizedState,p=t.stateNode,f=p.getSnapshotBeforeUpdate(t.elementType===t.type?x:Fe(t.type,x),k);p.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(y){X(t,t.return,y)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return g=xu,xu=!1,g}function qn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ao(t,n,i)}l=l.next}while(l!==r)}}function Bl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function co(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fc(e){var t=e.alternate;t!==null&&(e.alternate=null,Fc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ge],delete t[fr],delete t[Ji],delete t[yp],delete t[wp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ac(e){return e.tag===5||e.tag===3||e.tag===4}function ku(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ac(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pl));else if(r!==4&&(e=e.child,e!==null))for(fo(e,t,n),e=e.sibling;e!==null;)fo(e,t,n),e=e.sibling}function po(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(po(e,t,n),e=e.sibling;e!==null;)po(e,t,n),e=e.sibling}var le=null,Ae=!1;function ft(e,t,n){for(n=n.child;n!==null;)Bc(e,t,n),n=n.sibling}function Bc(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(zl,n)}catch{}switch(n.tag){case 5:ce||dn(n,t);case 6:var r=le,l=Ae;le=null,ft(e,t,n),le=r,Ae=l,le!==null&&(Ae?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ae?(e=le,n=n.stateNode,e.nodeType===8?hi(e.parentNode,n):e.nodeType===1&&hi(e,n),or(e)):hi(le,n.stateNode));break;case 4:r=le,l=Ae,le=n.stateNode.containerInfo,Ae=!0,ft(e,t,n),le=r,Ae=l;break;case 0:case 11:case 14:case 15:if(!ce&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ao(n,t,o),l=l.next}while(l!==r)}ft(e,t,n);break;case 1:if(!ce&&(dn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){X(n,t,u)}ft(e,t,n);break;case 21:ft(e,t,n);break;case 22:n.mode&1?(ce=(r=ce)||n.memoizedState!==null,ft(e,t,n),ce=r):ft(e,t,n);break;default:ft(e,t,n)}}function Eu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Up),t.forEach(function(r){var l=Qp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function De(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Fp(r/1960))-r,10e?16:e,gt===null)var r=!1;else{if(e=gt,gt=null,jl=0,M&6)throw Error(E(331));var l=M;for(M|=4,L=e.current;L!==null;){var i=L,o=i.child;if(L.flags&16){var u=i.deletions;if(u!==null){for(var s=0;sZ()-as?$t(e,0):us|=n),xe(e,t)}function Xc(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=pe();e=lt(e,t),e!==null&&(xr(e,t,n),xe(e,n))}function Hp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xc(e,n)}function Qp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),Xc(e,n)}var Yc;Yc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||we.current)ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ye=!1,zp(e,t,n);ye=!!(e.flags&131072)}else ye=!1,H&&t.flags&1048576&&ba(t,gl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;el(e,t),e=t.pendingProps;var l=xn(t,fe.current);yn(t,n),l=ns(null,t,r,e,l,n);var i=rs();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Se(r)?(i=!0,ml(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Zo(t),l.updater=Al,t.stateNode=l,l._reactInternals=t,no(t,r,e,n),t=io(null,t,r,!0,i,n)):(t.tag=0,H&&i&&Ho(t),de(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(el(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Gp(r),e=Fe(r,e),l){case 0:t=lo(null,t,r,e,n);break e;case 1:t=yu(null,t,r,e,n);break e;case 11:t=vu(null,t,r,e,n);break e;case 14:t=gu(null,t,r,Fe(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Fe(r,l),lo(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Fe(r,l),yu(e,t,r,l,n);case 3:e:{if(zc(t),e===null)throw Error(E(387));r=t.pendingProps,i=t.memoizedState,l=i.element,ic(e,t),Sl(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Nn(Error(E(423)),t),t=wu(e,t,r,n,l);break e}else if(r!==l){l=Nn(Error(E(424)),t),t=wu(e,t,r,n,l);break e}else for(Ce=kt(t.stateNode.containerInfo.firstChild),Ne=t,H=!0,Be=null,n=rc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(kn(),r===l){t=it(e,t,n);break e}de(e,t,r,n)}t=t.child}return t;case 5:return oc(t),e===null&&bi(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Xi(r,l)?o=null:i!==null&&Xi(r,i)&&(t.flags|=32),Tc(e,t),de(e,t,o,n),t.child;case 6:return e===null&&bi(t),null;case 13:return Oc(e,t,n);case 4:return qo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=En(t,null,r,n):de(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Fe(r,l),vu(e,t,r,l,n);case 7:return de(e,t,t.pendingProps,n),t.child;case 8:return de(e,t,t.pendingProps.children,n),t.child;case 12:return de(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,V(yl,r._currentValue),r._currentValue=o,i!==null)if(We(i.value,o)){if(i.children===l.children&&!we.current){t=it(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=tt(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?s.next=s:(s.next=m.next,m.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),eo(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(E(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),eo(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}de(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,yn(t,n),l=Oe(l),r=r(l),t.flags|=1,de(e,t,r,n),t.child;case 14:return r=t.type,l=Fe(r,t.pendingProps),l=Fe(r.type,l),gu(e,t,r,l,n);case 15:return Lc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Fe(r,l),el(e,t),t.tag=1,Se(r)?(e=!0,ml(t)):e=!1,yn(t,n),jc(t,r,l),no(t,r,l,n),io(null,t,r,!0,e,n);case 19:return Ic(e,t,n);case 22:return Rc(e,t,n)}throw Error(E(156,t.tag))};function Jc(e,t){return Ea(e,t)}function Kp(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Te(e,t,n,r){return new Kp(e,t,n,r)}function ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gp(e){if(typeof e=="function")return ps(e)?1:0;if(e!=null){if(e=e.$$typeof,e===zo)return 11;if(e===Oo)return 14}return 2}function jt(e,t){var n=e.alternate;return n===null?(n=Te(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function rl(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")ps(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case nn:return Wt(n.children,l,i,t);case To:o=8,l|=8;break;case ji:return e=Te(12,n,t,l|2),e.elementType=ji,e.lanes=i,e;case Pi:return e=Te(13,n,t,l),e.elementType=Pi,e.lanes=i,e;case _i:return e=Te(19,n,t,l),e.elementType=_i,e.lanes=i,e;case oa:return $l(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case la:o=10;break e;case ia:o=9;break e;case zo:o=11;break e;case Oo:o=14;break e;case dt:o=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Te(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Wt(e,t,n,r){return e=Te(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Te(22,e,r,t),e.elementType=oa,e.lanes=n,e.stateNode={isHidden:!1},e}function ki(e,t,n){return e=Te(6,e,null,t),e.lanes=n,e}function Ei(e,t,n){return t=Te(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Xp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ri(0),this.expirationTimes=ri(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ri(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function hs(e,t,n,r,l,i,o,u,s){return e=new Xp(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Te(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zo(i),e}function Yp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ef)}catch(e){console.error(e)}}ef(),ea.exports=Pe;var eh=ea.exports,tf,Tu=eh;tf=Tu.createRoot,Tu.hydrateRoot;/** + * @remix-run/router v1.23.2 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function yr(){return yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ys(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function nh(){return Math.random().toString(36).substr(2,8)}function Ou(e,t){return{usr:e.state,key:e.key,idx:t}}function yo(e,t,n,r){return n===void 0&&(n=null),yr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Tn(t):t,{state:n,key:t&&t.key||r||nh()})}function Ll(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Tn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function rh(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,u=yt.Pop,s=null,c=m();c==null&&(c=0,o.replaceState(yr({},o.state,{idx:c}),""));function m(){return(o.state||{idx:null}).idx}function d(){u=yt.Pop;let k=m(),p=k==null?null:k-c;c=k,s&&s({action:u,location:x.location,delta:p})}function v(k,p){u=yt.Push;let f=yo(x.location,k,p);c=m()+1;let h=Ou(f,c),y=x.createHref(f);try{o.pushState(h,"",y)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;l.location.assign(y)}i&&s&&s({action:u,location:x.location,delta:1})}function S(k,p){u=yt.Replace;let f=yo(x.location,k,p);c=m();let h=Ou(f,c),y=x.createHref(f);o.replaceState(h,"",y),i&&s&&s({action:u,location:x.location,delta:0})}function g(k){let p=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof k=="string"?k:Ll(k);return f=f.replace(/ $/,"%20"),Y(p,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,p)}let x={get action(){return u},get location(){return e(l,o)},listen(k){if(s)throw new Error("A history only accepts one active listener");return l.addEventListener(zu,d),s=k,()=>{l.removeEventListener(zu,d),s=null}},createHref(k){return t(l,k)},createURL:g,encodeLocation(k){let p=g(k);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:v,replace:S,go(k){return o.go(k)}};return x}var Iu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Iu||(Iu={}));function lh(e,t,n){return n===void 0&&(n="/"),ih(e,t,n)}function ih(e,t,n,r){let l=typeof t=="string"?Tn(t):t,i=Pn(l.pathname||"/",n);if(i==null)return null;let o=nf(e);oh(o);let u=null;for(let s=0;u==null&&s{let s={relativePath:u===void 0?i.path||"":u,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};s.relativePath.startsWith("/")&&(Y(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let c=Pt([r,s.relativePath]),m=n.concat(s);i.children&&i.children.length>0&&(Y(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),nf(i.children,t,m,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:ph(c,i.index),routesMeta:m})};return e.forEach((i,o)=>{var u;if(i.path===""||!((u=i.path)!=null&&u.includes("?")))l(i,o);else for(let s of rf(i.path))l(i,o,s)}),t}function rf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=rf(r.join("/")),u=[];return u.push(...o.map(s=>s===""?i:[i,s].join("/"))),l&&u.push(...o),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function oh(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hh(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sh=/^:[\w-]+$/,uh=3,ah=2,ch=1,fh=10,dh=-2,Uu=e=>e==="*";function ph(e,t){let n=e.split("/"),r=n.length;return n.some(Uu)&&(r+=dh),t&&(r+=ah),n.filter(l=>!Uu(l)).reduce((l,i)=>l+(sh.test(i)?uh:i===""?ch:fh),r)}function hh(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function mh(e,t,n){let{routesMeta:r}=e,l={},i="/",o=[];for(let u=0;u{let{paramName:v,isOptional:S}=m;if(v==="*"){let x=u[d]||"";o=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const g=u[d];return S&&!g?c[v]=void 0:c[v]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function vh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ys(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,u,s)=>(r.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function gh(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ys(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Pn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const yh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wh=e=>yh.test(e);function Sh(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Tn(e):e,i;if(n)if(wh(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),ys(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Mu(n.substring(1),"/"):i=Mu(n,t)}else i=t;return{pathname:i,search:Eh(r),hash:Ch(l)}}function Mu(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Ci(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function xh(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function lf(e,t){let n=xh(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function of(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Tn(e):(l=yr({},e),Y(!l.pathname||!l.pathname.includes("?"),Ci("?","pathname","search",l)),Y(!l.pathname||!l.pathname.includes("#"),Ci("#","pathname","hash",l)),Y(!l.search||!l.search.includes("#"),Ci("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,u;if(o==null)u=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),d-=1;l.pathname=v.join("/")}u=d>=0?t[d]:"/"}let s=Sh(l,u),c=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(c||m)&&(s.pathname+="/"),s}const Pt=e=>e.join("/").replace(/\/\/+/g,"/"),kh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Eh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ch=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Nh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const sf=["post","put","patch","delete"];new Set(sf);const jh=["get",...sf];new Set(jh);/** + * React Router v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function wr(){return wr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current=!0}),w.useCallback(function(c,m){if(m===void 0&&(m={}),!u.current)return;if(typeof c=="number"){r.go(c);return}let d=of(c,JSON.parse(o),i,m.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Pt([t,d.pathname])),(m.replace?r.replace:r.push)(d,m.state,m)},[t,r,o,i,e])}function Lh(){let{matches:e}=w.useContext(It),t=e[e.length-1];return t?t.params:{}}function Yl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=w.useContext(Ot),{matches:l}=w.useContext(It),{pathname:i}=zn(),o=JSON.stringify(lf(l,r.v7_relativeSplatPath));return w.useMemo(()=>of(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Rh(e,t){return Th(e,t)}function Th(e,t,n,r){Nr()||Y(!1);let{navigator:l}=w.useContext(Ot),{matches:i}=w.useContext(It),o=i[i.length-1],u=o?o.params:{};o&&o.pathname;let s=o?o.pathnameBase:"/";o&&o.route;let c=zn(),m;if(t){var d;let k=typeof t=="string"?Tn(t):t;s==="/"||(d=k.pathname)!=null&&d.startsWith(s)||Y(!1),m=k}else m=c;let v=m.pathname||"/",S=v;if(s!=="/"){let k=s.replace(/^\//,"").split("/");S="/"+v.replace(/^\//,"").split("/").slice(k.length).join("/")}let g=lh(e,{pathname:S}),x=Mh(g&&g.map(k=>Object.assign({},k,{params:Object.assign({},u,k.params),pathname:Pt([s,l.encodeLocation?l.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?s:Pt([s,l.encodeLocation?l.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&x?w.createElement(Xl.Provider,{value:{location:wr({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:yt.Pop}},x):x}function zh(){let e=Bh(),t=Nh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:l},n):null,null)}const Oh=w.createElement(zh,null);class Ih extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?w.createElement(It.Provider,{value:this.props.routeContext},w.createElement(af.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Uh(e){let{routeContext:t,match:n,children:r}=e,l=w.useContext(Gl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(It.Provider,{value:t},r)}function Mh(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,u=(l=n)==null?void 0:l.errors;if(u!=null){let m=o.findIndex(d=>d.route.id&&(u==null?void 0:u[d.route.id])!==void 0);m>=0||Y(!1),o=o.slice(0,Math.min(o.length,m+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((m,d,v)=>{let S,g=!1,x=null,k=null;n&&(S=u&&d.route.id?u[d.route.id]:void 0,x=d.route.errorElement||Oh,s&&(c<0&&v===0?($h("route-fallback"),g=!0,k=null):c===v&&(g=!0,k=d.route.hydrateFallbackElement||null)));let p=t.concat(o.slice(0,v+1)),f=()=>{let h;return S?h=x:g?h=k:d.route.Component?h=w.createElement(d.route.Component,null):d.route.element?h=d.route.element:h=m,w.createElement(Uh,{match:d,routeContext:{outlet:m,matches:p,isDataRoute:n!=null},children:h})};return n&&(d.route.ErrorBoundary||d.route.errorElement||v===0)?w.createElement(Ih,{location:n.location,revalidation:n.revalidation,component:x,error:S,children:f(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):f()},null)}var df=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(df||{}),pf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(pf||{});function Dh(e){let t=w.useContext(Gl);return t||Y(!1),t}function Fh(e){let t=w.useContext(uf);return t||Y(!1),t}function Ah(e){let t=w.useContext(It);return t||Y(!1),t}function hf(e){let t=Ah(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function Bh(){var e;let t=w.useContext(af),n=Fh(),r=hf();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Vh(){let{router:e}=Dh(df.UseNavigateStable),t=hf(pf.UseNavigateStable),n=w.useRef(!1);return cf(()=>{n.current=!0}),w.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,wr({fromRouteId:t},i)))},[e,t])}const Du={};function $h(e,t,n){Du[e]||(Du[e]=!0)}function Wh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ll(e){Y(!1)}function Hh(e){let{basename:t="/",children:n=null,location:r,navigationType:l=yt.Pop,navigator:i,static:o=!1,future:u}=e;Nr()&&Y(!1);let s=t.replace(/^\/*/,"/"),c=w.useMemo(()=>({basename:s,navigator:i,static:o,future:wr({v7_relativeSplatPath:!1},u)}),[s,u,i,o]);typeof r=="string"&&(r=Tn(r));let{pathname:m="/",search:d="",hash:v="",state:S=null,key:g="default"}=r,x=w.useMemo(()=>{let k=Pn(m,s);return k==null?null:{location:{pathname:k,search:d,hash:v,state:S,key:g},navigationType:l}},[s,m,d,v,S,g,l]);return x==null?null:w.createElement(Ot.Provider,{value:c},w.createElement(Xl.Provider,{children:n,value:x}))}function Qh(e){let{children:t,location:n}=e;return Rh(So(t),n)}new Promise(()=>{});function So(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,l)=>{if(!w.isValidElement(r))return;let i=[...t,l];if(r.type===w.Fragment){n.push.apply(n,So(r.props.children,i));return}r.type!==ll&&Y(!1),!r.props.index||!r.props.children||Y(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=So(r.props.children,i)),n.push(o)}),n}/** + * React Router DOM v6.30.3 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Rl(){return Rl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Kh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gh(e,t){return e.button===0&&(!t||t==="_self")&&!Kh(e)}function xo(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function Xh(e,t){let n=xo(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(i=>{n.append(l,i)})}),n}const Yh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Jh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Zh="6";try{window.__reactRouterVersion=Zh}catch{}const qh=w.createContext({isTransitioning:!1}),bh="startTransition",Fu=Wf[bh];function em(e){let{basename:t,children:n,future:r,window:l}=e,i=w.useRef();i.current==null&&(i.current=th({window:l,v5Compat:!0}));let o=i.current,[u,s]=w.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},m=w.useCallback(d=>{c&&Fu?Fu(()=>s(d)):s(d)},[s,c]);return w.useLayoutEffect(()=>o.listen(m),[o,m]),w.useEffect(()=>Wh(r),[r]),w.createElement(Hh,{basename:t,children:n,location:u.location,navigationType:u.action,navigator:o,future:r})}const tm=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",nm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jl=w.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:u,target:s,to:c,preventScrollReset:m,viewTransition:d}=t,v=mf(t,Yh),{basename:S}=w.useContext(Ot),g,x=!1;if(typeof c=="string"&&nm.test(c)&&(g=c,tm))try{let h=new URL(window.location.href),y=c.startsWith("//")?new URL(h.protocol+c):new URL(c),C=Pn(y.pathname,S);y.origin===h.origin&&C!=null?c=C+y.search+y.hash:x=!0}catch{}let k=Ph(c,{relative:l}),p=lm(c,{replace:o,state:u,target:s,preventScrollReset:m,relative:l,viewTransition:d});function f(h){r&&r(h),h.defaultPrevented||p(h)}return w.createElement("a",Rl({},v,{href:g||k,onClick:x||i?r:f,ref:n,target:s}))}),Au=w.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:u,to:s,viewTransition:c,children:m}=t,d=mf(t,Jh),v=Yl(s,{relative:d.relative}),S=zn(),g=w.useContext(uf),{navigator:x,basename:k}=w.useContext(Ot),p=g!=null&&om(v)&&c===!0,f=x.encodeLocation?x.encodeLocation(v).pathname:v.pathname,h=S.pathname,y=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;l||(h=h.toLowerCase(),y=y?y.toLowerCase():null,f=f.toLowerCase()),y&&k&&(y=Pn(y,k)||y);const C=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let j=h===f||!o&&h.startsWith(f)&&h.charAt(C)==="/",_=y!=null&&(y===f||!o&&y.startsWith(f)&&y.charAt(f.length)==="/"),R={isActive:j,isPending:_,isTransitioning:p},A=j?r:void 0,O;typeof i=="function"?O=i(R):O=[i,j?"active":null,_?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let se=typeof u=="function"?u(R):u;return w.createElement(Jl,Rl({},d,{"aria-current":A,className:O,ref:n,style:se,to:s,viewTransition:c}),typeof m=="function"?m(R):m)});var ko;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ko||(ko={}));var Bu;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Bu||(Bu={}));function rm(e){let t=w.useContext(Gl);return t||Y(!1),t}function lm(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:u}=t===void 0?{}:t,s=ff(),c=zn(),m=Yl(e,{relative:o});return w.useCallback(d=>{if(Gh(d,n)){d.preventDefault();let v=r!==void 0?r:Ll(c)===Ll(m);s(e,{replace:v,state:l,preventScrollReset:i,relative:o,viewTransition:u})}},[c,s,m,r,l,n,e,i,o,u])}function im(e){let t=w.useRef(xo(e)),n=w.useRef(!1),r=zn(),l=w.useMemo(()=>Xh(r.search,n.current?null:t.current),[r.search]),i=ff(),o=w.useCallback((u,s)=>{const c=xo(typeof u=="function"?u(l):u);n.current=!0,i("?"+c,s)},[i,l]);return[l,o]}function om(e,t){t===void 0&&(t={});let n=w.useContext(qh);n==null&&Y(!1);let{basename:r}=rm(ko.useViewTransitionState),l=Yl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Pn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Pn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return wo(l.pathname,o)!=null||wo(l.pathname,i)!=null}const vf=w.createContext(null);function Vu(){try{return localStorage.getItem("authToken")||""}catch{return""}}function Qr(e){try{e?localStorage.setItem("authToken",e):localStorage.removeItem("authToken")}catch{}}function sm({children:e}){const[t,n]=w.useState(Vu),[r,l]=w.useState(null),[i,o]=w.useState(!!Vu()),[u,s]=w.useState(null);w.useEffect(()=>{if(!t){l(null),o(!1),s(null);return}let g=!1;return o(!0),fetch("/api/auth/me",{headers:{Authorization:`Bearer ${t}`}}).then(async x=>{const k=await x.json().catch(()=>({}));if(!x.ok)throw new Error(k.error||"Kon sessie niet verifiëren.");g||(l(k.user||null),s(null))}).catch(()=>{g||(l(null),n(""),Qr(""))}).finally(()=>{g||o(!1)}),()=>{g=!0}},[t]);async function c(g){s(null);const x=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),k=await x.json().catch(()=>({}));if(!x.ok)throw new Error(k.error||"Login mislukt.");return n(k.token),Qr(k.token),l(k.user),k.user}async function m(g){s(null);const x=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),k=await x.json().catch(()=>({}));if(!x.ok)throw new Error(k.error||"Registratie mislukt.");return n(k.token),Qr(k.token),l(k.user),k.user}function d(){n(""),Qr(""),l(null)}const v=w.useMemo(()=>(g,x={})=>{const k={...x.headers||{},...t?{Authorization:`Bearer ${t}`}:{}};return fetch(g,{...x,headers:k})},[t]),S={user:r,token:t,loading:i,error:u,login:c,register:m,logout:d,authFetch:v};return a.jsx(vf.Provider,{value:S,children:e})}function gf(){const e=w.useContext(vf);if(!e)throw new Error("useAuth moet binnen een AuthProvider gebruikt worden");return e}function um(){const e=({isActive:r})=>r?"nav-link active":"nav-link",{user:t,logout:n}=gf();return a.jsxs("nav",{className:"site-nav",children:[a.jsx(Jl,{className:"nav-logo",to:"/",children:"Siti Plugin Repo"}),a.jsxs("div",{className:"nav-links",children:[a.jsx(Au,{to:"/",end:!0,className:e,children:"Plugins"}),a.jsx(Au,{to:"/licenses",className:e,children:"Licenties"})]}),a.jsx("div",{className:"nav-user",children:t?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"nav-user-name",children:["Hallo, ",t.name]}),a.jsx("button",{className:"ghost ghost-small",type:"button",onClick:n,children:"Uitloggen"})]}):a.jsx("span",{className:"nav-user-guest",children:"Niet ingelogd"})})]})}function am(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[l,i]=w.useState(null),[o,u]=w.useState(null);return w.useEffect(()=>{async function s(){try{const c=await fetch("/api/plugins");if(!c.ok)throw new Error("Kon plugins niet laden");const m=await c.json();t(m.items||[]),u(m.updatedAt)}catch{i("Laden van repository data is mislukt.")}finally{r(!1)}}s()},[]),a.jsxs("div",{className:"page",children:[a.jsxs("header",{className:"hero",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:"WordPress plugin overzicht"}),a.jsx("h1",{children:"Siti Plugin Repo"}),a.jsx("p",{className:"subtitle",children:"Al je publieke WordPress plugins op één plek."})]}),a.jsx("a",{className:"cta",href:"https://github.com/SitiWeb",target:"_blank",rel:"noreferrer",children:"GitHub SitiWeb"})]}),a.jsxs("section",{className:"grid",children:[n&&a.jsx("div",{className:"state",children:"Bezig met laden…"}),l&&a.jsx("div",{className:"state error",children:l}),!n&&!l&&e.length===0&&a.jsx("div",{className:"state",children:"Geen repositories gevonden."}),e.map(s=>{var g,x;const c=((g=s.manifest)==null?void 0:g.plugin_name)||s.name,m=((x=s.manifest)==null?void 0:x.description)||s.description,d=new URLSearchParams;s.provider&&d.set("provider",s.provider),s.baseUrl&&d.set("baseUrl",s.baseUrl);const v=s.provider==="gitea"?"Gitea":"GitHub",S=`/plugin/${s.fullName}`+(d.toString()?`?${d.toString()}`:"");return a.jsxs("article",{className:"card",children:[a.jsxs("div",{className:"card-header",children:[a.jsx("h2",{children:c}),a.jsx("span",{className:"pill",children:s.fullName})]}),a.jsx("p",{children:m}),a.jsxs("div",{className:"meta",children:[a.jsxs("span",{children:["★ ",s.stars]}),a.jsxs("span",{children:["Forks ",s.forks]}),a.jsxs("span",{children:["Issues ",s.issues]})]}),s.topics.length>0&&a.jsx("div",{className:"topics",children:s.topics.slice(0,4).map(k=>a.jsx("span",{className:"topic",children:k},k))}),a.jsxs("div",{className:"actions",children:[a.jsx(Jl,{className:"link",to:S,children:"Bekijk details →"}),a.jsx("a",{className:"ghost",href:s.repoUrl,target:"_blank",rel:"noreferrer",children:v})]})]},s.fullName)})]}),a.jsx("footer",{className:"footer",children:a.jsxs("span",{children:["Laatste sync: ",o?new Date(o).toLocaleString("nl-NL"):"-"]})})]})}function cm(){const{owner:e,repo:t}=Lh(),[n]=im(),r=(n.get("provider")||"github").toLowerCase(),l=n.get("baseUrl")||"",[i,o]=w.useState(null),[u,s]=w.useState(!0),[c,m]=w.useState(null);w.useEffect(()=>{async function y(){try{const C=new URLSearchParams;r&&C.set("provider",r),l&&C.set("baseUrl",l);const j=C.toString(),_=await fetch(`/api/plugins/${e}/${t}${j.length>0?`?${j}`:""}`);if(!_.ok)throw new Error("Kon details niet laden");const R=await _.json();o(R)}catch{m("Laden van plugin details is mislukt.")}finally{s(!1)}}y()},[e,t,r,l]);const d=i==null?void 0:i.manifest,v=(d==null?void 0:d.plugin_name)||(i==null?void 0:i.name)||t,S=(d==null?void 0:d.description)||(i==null?void 0:i.description),g=(d==null?void 0:d.author)||"-",x=(d==null?void 0:d.version)||"-",k=(i==null?void 0:i.provider)==="gitea"?"Gitea":"GitHub",p=i==null?void 0:i.download,f=w.useMemo(()=>(i==null?void 0:i.releases)||[],[i]),h=w.useMemo(()=>(i==null?void 0:i.commits)||[],[i]);return a.jsxs("div",{className:"page",children:[a.jsxs("header",{className:"detail-hero",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:"Plugin details"}),a.jsx("h1",{children:v}),a.jsx("p",{className:"subtitle",children:S})]}),a.jsxs("div",{className:"detail-actions",children:[a.jsx(Jl,{className:"ghost",to:"/",children:"← Terug"}),(i==null?void 0:i.repoUrl)&&a.jsx("a",{className:"ghost",href:i.repoUrl,target:"_blank",rel:"noreferrer",children:k}),(p==null?void 0:p.url)&&a.jsxs("a",{className:"cta",href:p.url,target:"_blank",rel:"noreferrer",children:["Download ",p.version]})]})]}),u&&a.jsx("div",{className:"state",children:"Bezig met laden…"}),c&&a.jsx("div",{className:"state error",children:c}),!u&&!c&&i&&a.jsxs("section",{className:"detail-grid",children:[a.jsxs("div",{className:"card",children:[a.jsx("h2",{children:"Manifest"}),a.jsxs("div",{className:"detail-list",children:[a.jsxs("div",{children:[a.jsx("span",{children:"Naam"}),a.jsx("strong",{children:v})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Versie"}),a.jsx("strong",{children:x})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Auteur"}),a.jsx("strong",{children:g})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Repository"}),a.jsx("strong",{children:i.fullName})]})]}),(d==null?void 0:d.author_url)&&a.jsx("a",{className:"link",href:d.author_url,target:"_blank",rel:"noreferrer",children:"Auteur website →"})]}),a.jsxs("div",{className:"card",children:[a.jsx("h2",{children:"Releases"}),f.length===0&&a.jsx("p",{children:"Geen releases gevonden."}),a.jsx("ul",{className:"list",children:f.map(y=>{const C=y.tag||y.name||y.url;return a.jsxs("li",{children:[a.jsxs("div",{children:[a.jsx("a",{href:y.url,target:"_blank",rel:"noreferrer",children:y.name}),a.jsx("span",{children:y.publishedAt?new Date(y.publishedAt).toLocaleDateString("nl-NL"):"-"})]}),y.downloadUrl&&a.jsx("a",{className:"ghost",href:y.downloadUrl,target:"_blank",rel:"noreferrer",children:"Download"})]},C)})})]}),a.jsxs("div",{className:"card",children:[a.jsx("h2",{children:"Recente commits"}),h.length===0&&a.jsx("p",{children:"Geen commits gevonden."}),a.jsx("ul",{className:"list",children:h.map(y=>{var C;return a.jsxs("li",{children:[a.jsx("a",{href:y.url,target:"_blank",rel:"noreferrer",children:((C=y.message)==null?void 0:C.split(` +`)[0])||y.sha.slice(0,7)}),a.jsx("span",{children:y.author||"-"})]},y.sha)})})]})]})]})}const yf="nl-NL";function Eo(e,t=yf){return e?new Date(e).toLocaleString(t):"-"}function fm(e,t=yf){return e?new Date(e).toLocaleDateString(t):"-"}function dm({license:e}){const t=e.hostnames||[],n=e.primaryHostname||"Nog niet gekoppeld";return a.jsxs("article",{className:"card license-card",children:[a.jsxs("div",{className:"license-card-header",children:[a.jsxs("div",{children:[a.jsx("h3",{children:e.pluginName||e.label||"Licentie"}),a.jsx("p",{className:"license-subtitle",children:e.repoFullName||"-"})]}),a.jsx("span",{className:"pill",children:e.key})]}),a.jsxs("div",{className:"detail-list license-detail-list",children:[a.jsxs("div",{children:[a.jsx("span",{children:"Hostname"}),a.jsx("strong",{children:n})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Huidige versie"}),a.jsx("strong",{children:e.lastUsedVersion||"-"})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Laatste release"}),a.jsx("strong",{children:e.pluginVersion||"-"})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Aangemaakt"}),a.jsx("strong",{children:fm(e.createdAt)})]}),a.jsxs("div",{children:[a.jsx("span",{children:"Laatste check"}),a.jsx("strong",{children:Eo(e.lastVersionCheckAt)})]})]}),e.note&&a.jsxs("p",{className:"license-note",children:["Notitie: ",e.note]}),t.length>0&&a.jsxs("div",{className:"host-list",children:[a.jsx("p",{className:"hint",children:"Hostnames"}),a.jsx("ul",{children:t.map(r=>a.jsxs("li",{children:[a.jsxs("div",{children:[a.jsx("strong",{children:r.hostname}),a.jsxs("span",{children:[r.hits||0," checks"]})]}),a.jsx("span",{children:Eo(r.lastSeenAt)})]},`${r.hostname}-${r.firstSeenAt||r.lastSeenAt}`))})]}),a.jsxs("div",{className:"license-links",children:[e.repoUrl&&a.jsx("a",{className:"link",href:e.repoUrl,target:"_blank",rel:"noreferrer",children:"Repository →"}),e.pluginName&&a.jsx("span",{className:"ghost-pill",children:e.pluginName})]})]})}function pm(){var ks;const{user:e,token:t,authFetch:n,login:r,register:l,loading:i}=gf(),[o,u]=w.useState([]),[s,c]=w.useState([]),[m,d]=w.useState([]),[v,S]=w.useState(""),[g,x]=w.useState(""),[k,p]=w.useState(""),[f,h]=w.useState(""),[y,C]=w.useState(!0),[j,_]=w.useState(null),[R,A]=w.useState(!1),[O,se]=w.useState(!1),[st,ut]=w.useState(!1),[jr,Pr]=w.useState(null),[Ut,ke]=w.useState(null),[P,z]=w.useState(null),[T,B]=w.useState(null),[J,Mt]=w.useState(!1),[Ue,On]=w.useState(""),[Me,Zt]=w.useState(""),[ws,wf]=w.useState(""),[qt,bt]=w.useState({username:"",name:"",email:"",password:"",isAdmin:!1}),at=!!(e&&t);w.useEffect(()=>{let N=!1;async function U(){var D;C(!0),_(null);try{const te=await fetch("/api/plugins"),ve=await te.json().catch(()=>({}));if(!te.ok)throw new Error(ve.error||"Kon plugins niet laden.");if(N)return;c(ve.items||[]);const He=(D=ve.items)==null?void 0:D[0];if(He){const Zl=He.ownerRepo||He.fullName;S(Nf=>Nf||Zl)}}catch(te){N||_(te.message||"Kon plugins niet laden.")}finally{N||C(!1)}}return U(),()=>{N=!0}},[]),w.useEffect(()=>{if(!at){d([]),x("");return}e&&!g&&x(String(e.id))},[at,g,e]),w.useEffect(()=>{if(!at||!e)return;if(!e.isAdmin){d([e]);return}let N=!1;async function U(){try{const D=await n("/api/admin/users"),te=await D.json().catch(()=>({}));if(!D.ok)throw new Error(te.error||"Kon gebruikers niet laden.");if(N)return;d(te.items||[]),!g&&(te.items||[]).length>0&&x(String(te.items[0].id))}catch(D){N||ke({variant:"error",message:D.message})}}return U(),()=>{N=!0}},[n,at,g,e]);const ct=w.useCallback(async(N=!0,U)=>{if(!t){u([]),Pr(null),N&&ke({variant:"error",message:"Log in om licenties te beheren."});return}N&&ke(null),ut(!0);try{const D=U||e!=null&&e.isAdmin&&g||(e?String(e.id):"");let te="/api/licenses";e!=null&&e.isAdmin&&D&&(te+=`?userId=${D}`);const ve=await n(te),He=await ve.json().catch(()=>({}));if(ve.status===401)throw new Error("Sessie verlopen, log opnieuw in.");if(!ve.ok)throw new Error(He.error||"Kon licenties niet laden.");u(He.items||[]),Pr(He.updatedAt)}catch(D){N&&ke({variant:"error",message:D.message})}finally{ut(!1)}},[n,g,t,e]);w.useEffect(()=>{ct(!1)},[ct]),w.useEffect(()=>{if(!v&&s.length>0){const N=s[0].ownerRepo||s[0].fullName;S(N)}},[s,v]);const Je=w.useMemo(()=>s.find(N=>(N.ownerRepo||N.fullName)===v)||null,[s,v]),Ss=w.useMemo(()=>{const N=U=>U?new Date(U).getTime():0;return[...o].sort((U,D)=>N(D.createdAt)-N(U.createdAt))},[o]);async function Sf(N){var U;if(N.preventDefault(),ke(null),!at){ke({variant:"error",message:"Log in om een licentie aan te maken."});return}if(!Je){ke({variant:"error",message:"Selecteer een plugin."});return}A(!0);try{const te={...{label:k.trim()||((U=Je.manifest)==null?void 0:U.plugin_name)||Je.name||Je.fullName,note:f.trim()||void 0,repo:{repo:Je.ownerRepo||Je.fullName,provider:Je.provider||"github",baseUrl:Je.baseUrl}},userId:e!=null&&e.isAdmin?Number(g||e.id):void 0},ve=await n("/api/licenses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)}),He=await ve.json().catch(()=>({}));if(ve.status===401)throw new Error("Sessie verlopen, log opnieuw in.");if(!ve.ok)throw new Error(He.error||"Licentie aanmaken mislukt.");u(Zl=>[He,...Zl]),ke({variant:"success",message:"Licentie aangemaakt."}),p(""),h("")}catch(D){ke({variant:"error",message:D.message})}finally{A(!1)}}async function xf(N){N.preventDefault(),z(null),se(!0);try{const U=await n("/api/admin/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qt)}),D=await U.json().catch(()=>({}));if(!U.ok)throw new Error(D.error||"Gebruiker aanmaken mislukt.");z({variant:"success",message:"Gebruiker aangemaakt."}),bt({username:"",name:"",email:"",password:"",isAdmin:!1}),d(te=>[...te,D.user]),g||x(String(D.user.id))}catch(U){z({variant:"error",message:U.message})}finally{se(!1)}}async function kf(N){if(N.preventDefault(),B(null),!Ue.trim()||!Me.trim()){B({ok:!1,message:"Vul zowel licentiecode als hostname in."});return}Mt(!0);try{const U=await fetch("/api/licenses/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:Ue.trim(),hostname:Me.trim(),currentVersion:ws.trim()||void 0})}),D=await U.json().catch(()=>({}));if(!U.ok)throw new Error(D.error||"Controle mislukt.");B({ok:!0,data:D}),D.license&&u(te=>te.map(ve=>ve.key===D.license.key?D.license:ve))}catch(U){B({ok:!1,message:U.message})}finally{Mt(!1)}}const Ef=w.useCallback(async N=>{await r(N),await ct(!1)},[r,ct]),Cf=w.useCallback(async N=>{await l(N),await ct(!1)},[l,ct]),xs=y||i&&!!t;return a.jsxs("div",{className:"page",children:[a.jsxs("header",{className:"hero",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:"Licentiebeheer"}),a.jsx("h1",{children:"Licenties"}),a.jsx("p",{className:"subtitle",children:"Maak licenties voor iedere plugin en beheer welke hostname de licentie daadwerkelijk gebruikt."}),a.jsx("p",{className:"hint",children:"Een licentie is geldig voor één hostname. De eerste hostname die controleert wordt automatisch gekoppeld als licentiehouder."})]}),a.jsx("button",{className:"ghost",type:"button",onClick:()=>ct(),disabled:st||!at,children:st?"Vernieuwen…":"Vernieuw lijst"})]}),a.jsxs("div",{className:"license-meta-bar",children:[a.jsxs("span",{children:["Actieve licenties: ",o.length]}),a.jsxs("span",{children:["Laatste update: ",Eo(jr)]}),e&&a.jsxs("span",{children:["Ingelogd als: ",e.email]}),(e==null?void 0:e.isAdmin)&&m.length>0&&a.jsxs("label",{className:"inline-field",children:[a.jsx("span",{children:"Licenties gebruiker"}),a.jsx("select",{value:g,onChange:N=>{x(N.target.value),ct(!0,N.target.value)},children:m.map(N=>a.jsxs("option",{value:N.id,children:[N.name," (",N.email,")"]},N.id))})]})]}),xs&&a.jsx("div",{className:"state",children:"Bezig met laden…"}),j&&a.jsx("div",{className:"state error",children:j}),!xs&&!j&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{className:"license-forms",children:[at?a.jsxs("article",{className:"card",children:[a.jsx("h2",{children:"Nieuwe licentie"}),a.jsx("p",{className:"hint",children:"Kies een plugin en genereer direct een licentiesleutel."}),a.jsxs("form",{className:"form-grid",onSubmit:Sf,children:[a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Plugin"}),a.jsx("select",{value:v,onChange:N=>S(N.target.value),disabled:s.length===0,children:s.map(N=>{var D;const U=N.ownerRepo||N.fullName;return a.jsxs("option",{value:U,children:[((D=N.manifest)==null?void 0:D.plugin_name)||N.name," (",N.fullName,")"]},U)})})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Label (optioneel)"}),a.jsx("input",{value:k,onChange:N=>p(N.target.value),placeholder:"Naam of klant"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Notitie"}),a.jsx("textarea",{value:f,onChange:N=>h(N.target.value),placeholder:"Bijv. contactpersoon of extra info",rows:3})]}),(e==null?void 0:e.isAdmin)&&a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Licentie voor gebruiker"}),a.jsx("select",{value:g,onChange:N=>x(N.target.value),children:m.map(N=>a.jsxs("option",{value:N.id,children:[N.name," (",N.email,")"]},N.id))})]}),a.jsx("button",{className:"cta",type:"submit",disabled:R||!Je,children:R?"Aanmaken…":"Licentie aanmaken"})]}),Ut&&a.jsx("div",{className:`state inline ${Ut.variant==="error"?"error":"success"}`,children:Ut.message})]}):a.jsx(hm,{onLogin:Ef,onRegister:Cf}),a.jsxs("article",{className:"card",children:[a.jsx("h2",{children:"Test of valideer"}),a.jsx("p",{className:"hint",children:"Gebruik dit formulier zoals de plugin dat zou doen om de huidige versie en hostname te controleren."}),a.jsxs("form",{className:"form-grid",onSubmit:kf,children:[a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Licentiecode"}),a.jsx("input",{value:Ue,onChange:N=>On(N.target.value),placeholder:"SITI-XXXX-XXXX"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Hostname"}),a.jsx("input",{value:Me,onChange:N=>Zt(N.target.value),placeholder:"voorbeeld.nl"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Deze site draait versie"}),a.jsx("input",{value:ws,onChange:N=>wf(N.target.value),placeholder:"bijv. 1.9.3"})]}),a.jsx("button",{className:"ghost",type:"submit",disabled:J,children:J?"Controleren…":"Controleer licentie"})]}),T&&T.ok&&((ks=T.data)==null?void 0:ks.license)&&a.jsxs("div",{className:"state success inline",children:[a.jsx("strong",{children:"Licentie geldig"}),a.jsx("p",{children:T.data.license.pluginName||"Plugin"}),a.jsxs("p",{children:["Huidige versie:"," ",a.jsx("strong",{children:T.data.license.lastUsedVersion||T.data.license.pluginVersion||"-"})]}),a.jsxs("p",{children:["Laatste release:"," ",a.jsx("strong",{children:T.data.license.pluginVersion||"-"})]}),a.jsxs("p",{children:["Gekoppeld aan:"," ",a.jsx("strong",{children:T.data.license.primaryHostname||"Nog niet gekoppeld"})]})]}),T&&!T.ok&&a.jsx("div",{className:"state error inline",children:T.message})]})]}),(e==null?void 0:e.isAdmin)&&a.jsx("section",{className:"license-forms",children:a.jsxs("article",{className:"card",children:[a.jsx("h2",{children:"Gebruiker toevoegen"}),a.jsx("p",{className:"hint",children:"Admins kunnen extra gebruikers aanmaken en direct licenties toewijzen."}),a.jsxs("form",{className:"form-grid",onSubmit:xf,children:[a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Gebruikersnaam"}),a.jsx("input",{value:qt.username,onChange:N=>bt(U=>({...U,username:N.target.value})),placeholder:"gebruikersnaam"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Naam"}),a.jsx("input",{value:qt.name,onChange:N=>bt(U=>({...U,name:N.target.value})),placeholder:"Volledige naam"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"E-mail"}),a.jsx("input",{type:"email",value:qt.email,onChange:N=>bt(U=>({...U,email:N.target.value})),placeholder:"naam@bedrijf.nl"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Wachtwoord"}),a.jsx("input",{type:"password",value:qt.password,onChange:N=>bt(U=>({...U,password:N.target.value})),placeholder:"Minimaal 8 karakters"})]}),a.jsxs("label",{className:"checkbox-field",children:[a.jsx("input",{type:"checkbox",checked:qt.isAdmin,onChange:N=>bt(U=>({...U,isAdmin:N.target.checked}))}),a.jsx("span",{children:"Maak deze gebruiker admin"})]}),a.jsx("button",{className:"cta",type:"submit",disabled:O,children:O?"Bezig…":"Gebruiker aanmaken"})]}),P&&a.jsx("div",{className:`state inline ${P.variant==="error"?"error":"success"}`,children:P.message})]})}),at?a.jsx("section",{className:"license-grid",children:Ss.length===0?a.jsx("div",{className:"state",children:"Nog geen licenties aangemaakt."}):Ss.map(N=>a.jsx(dm,{license:N},N.id||N.key))}):a.jsx("div",{className:"state",children:"Log in of registreer om licenties te bekijken en te beheren."})]})]})}function hm({onLogin:e,onRegister:t}){const[n,r]=w.useState("login"),[l,i]=w.useState({identifier:"",password:""}),[o,u]=w.useState({username:"",name:"",email:"",password:""}),[s,c]=w.useState(null),[m,d]=w.useState(!1);async function v(S){S.preventDefault(),c(null),d(!0);try{n==="login"?(await e(l),c({variant:"success",message:"Succesvol ingelogd."})):(await t(o),c({variant:"success",message:"Account aangemaakt en ingelogd."}))}catch(g){c({variant:"error",message:g.message||"Actie mislukt."})}finally{d(!1)}}return a.jsxs("article",{className:"card auth-card",children:[a.jsxs("div",{className:"auth-tabs",children:[a.jsx("button",{type:"button",className:n==="login"?"auth-tab active":"auth-tab",onClick:()=>r("login"),disabled:m,children:"Inloggen"}),a.jsx("button",{type:"button",className:n==="register"?"auth-tab active":"auth-tab",onClick:()=>r("register"),disabled:m,children:"Registreren"})]}),a.jsxs("form",{className:"form-grid",onSubmit:v,children:[n==="login"?a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Gebruikersnaam of e-mail"}),a.jsx("input",{value:l.identifier,onChange:S=>i(g=>({...g,identifier:S.target.value})),placeholder:"jouwnaam of mail"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Wachtwoord"}),a.jsx("input",{type:"password",value:l.password,onChange:S=>i(g=>({...g,password:S.target.value})),placeholder:"••••••••"})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Gebruikersnaam"}),a.jsx("input",{value:o.username,onChange:S=>u(g=>({...g,username:S.target.value})),placeholder:"gebruikersnaam"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Naam"}),a.jsx("input",{value:o.name,onChange:S=>u(g=>({...g,name:S.target.value})),placeholder:"Volledige naam"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"E-mailadres"}),a.jsx("input",{type:"email",value:o.email,onChange:S=>u(g=>({...g,email:S.target.value})),placeholder:"naam@bedrijf.nl"})]}),a.jsxs("label",{className:"field",children:[a.jsx("span",{children:"Wachtwoord"}),a.jsx("input",{type:"password",value:o.password,onChange:S=>u(g=>({...g,password:S.target.value})),placeholder:"Minimaal 8 karakters"})]})]}),a.jsx("button",{className:"cta",type:"submit",disabled:m,children:m?"Verwerken…":n==="login"?"Inloggen":"Registreren"})]}),s&&a.jsx("div",{className:`state inline ${s.variant==="error"?"error":"success"}`,children:s.message})]})}function mm(){return a.jsxs("div",{className:"app",children:[a.jsx(um,{}),a.jsxs(Qh,{children:[a.jsx(ll,{path:"/",element:a.jsx(am,{})}),a.jsx(ll,{path:"/plugin/:owner/:repo",element:a.jsx(cm,{})}),a.jsx(ll,{path:"/licenses",element:a.jsx(pm,{})})]})]})}tf(document.getElementById("root")).render(a.jsx(qu.StrictMode,{children:a.jsx(em,{children:a.jsx(sm,{children:a.jsx(mm,{})})})})); diff --git a/dist/assets/index-garE9QaM.js b/dist/assets/index-garE9QaM.js deleted file mode 100644 index bd9acb2..0000000 --- a/dist/assets/index-garE9QaM.js +++ /dev/null @@ -1,68 +0,0 @@ -function kf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function Ef(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Bs={exports:{}},Rl={},Vs={exports:{}},I={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var wr=Symbol.for("react.element"),Cf=Symbol.for("react.portal"),Nf=Symbol.for("react.fragment"),jf=Symbol.for("react.strict_mode"),Pf=Symbol.for("react.profiler"),_f=Symbol.for("react.provider"),Lf=Symbol.for("react.context"),Tf=Symbol.for("react.forward_ref"),Rf=Symbol.for("react.suspense"),zf=Symbol.for("react.memo"),Of=Symbol.for("react.lazy"),Su=Symbol.iterator;function If(e){return e===null||typeof e!="object"?null:(e=Su&&e[Su]||e["@@iterator"],typeof e=="function"?e:null)}var $s={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ws=Object.assign,Hs={};function _n(e,t,n){this.props=e,this.context=t,this.refs=Hs,this.updater=n||$s}_n.prototype.isReactComponent={};_n.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};_n.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Qs(){}Qs.prototype=_n.prototype;function Eo(e,t,n){this.props=e,this.context=t,this.refs=Hs,this.updater=n||$s}var Co=Eo.prototype=new Qs;Co.constructor=Eo;Ws(Co,_n.prototype);Co.isPureReactComponent=!0;var ku=Array.isArray,Ks=Object.prototype.hasOwnProperty,No={current:null},Gs={key:!0,ref:!0,__self:!0,__source:!0};function Xs(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Ks.call(t,r)&&!Gs.hasOwnProperty(r)&&(l[r]=t[r]);var s=arguments.length-2;if(s===1)l.children=n;else if(1>>1,J=j[B];if(0>>1;Bl(zn,R))Fel(Zt,zn)?(j[B]=Zt,j[Fe]=R,B=Fe):(j[B]=zn,j[Me]=R,B=Me);else if(Fel(Zt,R))j[B]=Zt,j[Fe]=R,B=Fe;else break e}}return z}function l(j,z){var R=j.sortIndex-z.sortIndex;return R!==0?R:j.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var u=[],a=[],m=1,h=null,v=3,x=!1,g=!1,y=!1,k=typeof setTimeout=="function"?setTimeout:null,d=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(j){for(var z=n(a);z!==null;){if(z.callback===null)r(a);else if(z.startTime<=j)r(a),z.sortIndex=z.expirationTime,t(u,z);else break;z=n(a)}}function S(j){if(y=!1,p(j),!g)if(n(u)!==null)g=!0,Mt(C);else{var z=n(a);z!==null&&ke(S,z.startTime-j)}}function C(j,z){g=!1,y&&(y=!1,d(T),T=-1),x=!0;var R=v;try{for(p(z),h=n(u);h!==null&&(!(h.expirationTime>z)||j&&!ue());){var B=h.callback;if(typeof B=="function"){h.callback=null,v=h.priorityLevel;var J=B(h.expirationTime<=z);z=e.unstable_now(),typeof J=="function"?h.callback=J:h===n(u)&&r(u),p(z)}else r(u);h=n(u)}if(h!==null)var Ft=!0;else{var Me=n(a);Me!==null&&ke(S,Me.startTime-z),Ft=!1}return Ft}finally{h=null,v=R,x=!1}}var _=!1,L=null,T=-1,A=5,O=-1;function ue(){return!(e.unstable_now()-Oj||125B?(j.sortIndex=R,t(a,j),n(u)===null&&j===n(a)&&(y?(d(T),T=-1):y=!0,ke(S,R-B))):(j.sortIndex=J,t(u,j),g||x||(g=!0,Mt(C))),j},e.unstable_shouldYield=ue,e.unstable_wrapCallback=function(j){var z=v;return function(){var R=v;v=z;try{return j.apply(this,arguments)}finally{v=R}}}})(ea);bs.exports=ea;var Kf=bs.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Gf=w,je=Kf;function E(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ni=Object.prototype.hasOwnProperty,Xf=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Cu={},Nu={};function Yf(e){return Ni.call(Nu,e)?!0:Ni.call(Cu,e)?!1:Xf.test(e)?Nu[e]=!0:(Cu[e]=!0,!1)}function Jf(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Zf(e,t,n,r){if(t===null||typeof t>"u"||Jf(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function me(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){oe[e]=new me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];oe[t]=new me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){oe[e]=new me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){oe[e]=new me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){oe[e]=new me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){oe[e]=new me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){oe[e]=new me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){oe[e]=new me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){oe[e]=new me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Po=/[\-:]([a-z])/g;function _o(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Po,_o);oe[t]=new me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Po,_o);oe[t]=new me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Po,_o);oe[t]=new me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){oe[e]=new me(e,1,!1,e.toLowerCase(),null,!1,!1)});oe.xlinkHref=new me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){oe[e]=new me(e,1,!1,e.toLowerCase(),null,!0,!0)});function Lo(e,t,n,r){var l=oe.hasOwnProperty(t)?oe[t]:null;(l!==null?l.type!==0:r||!(2s||l[o]!==i[s]){var u=` -`+l[o].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=o&&0<=s);break}}}finally{ei=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Vn(e):""}function qf(e){switch(e.tag){case 5:return Vn(e.type);case 16:return Vn("Lazy");case 13:return Vn("Suspense");case 19:return Vn("SuspenseList");case 0:case 2:case 15:return e=ti(e.type,!1),e;case 11:return e=ti(e.type.render,!1),e;case 1:return e=ti(e.type,!0),e;default:return""}}function Li(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case nn:return"Fragment";case tn:return"Portal";case ji:return"Profiler";case To:return"StrictMode";case Pi:return"Suspense";case _i:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ra:return(e.displayName||"Context")+".Consumer";case na:return(e._context.displayName||"Context")+".Provider";case Ro:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case zo:return t=e.displayName||null,t!==null?t:Li(e.type)||"Memo";case dt:t=e._payload,e=e._init;try{return Li(e(t))}catch{}}return null}function bf(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Li(t);case 8:return t===To?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function _t(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ia(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ed(e){var t=ia(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Tr(e){e._valueTracker||(e._valueTracker=ed(e))}function oa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ia(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function il(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Ti(e,t){var n=t.checked;return G({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Pu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=_t(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ua(e,t){t=t.checked,t!=null&&Lo(e,"checked",t,!1)}function Ri(e,t){ua(e,t);var n=_t(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?zi(e,t.type,n):t.hasOwnProperty("defaultValue")&&zi(e,t.type,_t(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _u(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function zi(e,t,n){(t!=="number"||il(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Rr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function tr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Qn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},td=["Webkit","ms","Moz","O"];Object.keys(Qn).forEach(function(e){td.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Qn[t]=Qn[e]})});function fa(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Qn.hasOwnProperty(e)&&Qn[e]?(""+t).trim():t+"px"}function da(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=fa(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var nd=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mi(e,t){if(t){if(nd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(E(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(E(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(E(61))}if(t.style!=null&&typeof t.style!="object")throw Error(E(62))}}function Fi(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Di=null;function Oo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ui=null,mn=null,vn=null;function Ru(e){if(e=kr(e)){if(typeof Ui!="function")throw Error(E(280));var t=e.stateNode;t&&(t=Fl(t),Ui(e.stateNode,e.type,t))}}function pa(e){mn?vn?vn.push(e):vn=[e]:mn=e}function ha(){if(mn){var e=mn,t=vn;if(vn=mn=null,Ru(e),t)for(e=0;e>>=0,e===0?32:31-(pd(e)/hd|0)|0}var zr=64,Or=4194304;function Wn(e){switch(e&-e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function al(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~l;s!==0?r=Wn(s):(i&=o,i!==0&&(r=Wn(i)))}else o=n&~l,o!==0?r=Wn(o):i!==0&&(r=Wn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xr(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ve(t),e[t]=n}function yd(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Gn),Bu=" ",Vu=!1;function Ia(e,t){switch(e){case"keyup":return Kd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ma(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var rn=!1;function Xd(e,t){switch(e){case"compositionend":return Ma(t);case"keypress":return t.which!==32?null:(Vu=!0,Bu);case"textInput":return e=t.data,e===Bu&&Vu?null:e;default:return null}}function Yd(e,t){if(rn)return e==="compositionend"||!Vo&&Ia(e,t)?(e=za(),Yr=Uo=vt=null,rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qu(n)}}function Aa(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Aa(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ba(){for(var e=window,t=il();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=il(e.document)}return t}function $o(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function lp(e){var t=Ba(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Aa(n.ownerDocument.documentElement,n)){if(r!==null&&$o(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Ku(n,i);var o=Ku(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ln=null,Hi=null,Yn=null,Qi=!1;function Gu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qi||ln==null||ln!==il(r)||(r=ln,"selectionStart"in r&&$o(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Yn&&ur(Yn,r)||(Yn=r,r=dl(Hi,"onSelect"),0sn||(e.current=Zi[sn],Zi[sn]=null,sn--)}function V(e,t){sn++,Zi[sn]=e.current,e.current=t}var Lt={},fe=Rt(Lt),we=Rt(!1),Ht=Lt;function Sn(e,t){var n=e.type.contextTypes;if(!n)return Lt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function xe(e){return e=e.childContextTypes,e!=null}function hl(){W(we),W(fe)}function es(e,t,n){if(fe.current!==Lt)throw Error(E(168));V(fe,t),V(we,n)}function Ya(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(E(108,bf(e)||"Unknown",l));return G({},n,r)}function ml(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lt,Ht=fe.current,V(fe,e),V(we,we.current),!0}function ts(e,t,n){var r=e.stateNode;if(!r)throw Error(E(169));n?(e=Ya(e,t,Ht),r.__reactInternalMemoizedMergedChildContext=e,W(we),W(fe),V(fe,e)):W(we),V(we,n)}var qe=null,Dl=!1,mi=!1;function Ja(e){qe===null?qe=[e]:qe.push(e)}function vp(e){Dl=!0,Ja(e)}function zt(){if(!mi&&qe!==null){mi=!0;var e=0,t=U;try{var n=qe;for(U=1;e>=o,l-=o,be=1<<32-Ve(t)+l|n<T?(A=L,L=null):A=L.sibling;var O=v(d,L,p[T],S);if(O===null){L===null&&(L=A);break}e&&L&&O.alternate===null&&t(d,L),f=i(O,f,T),_===null?C=O:_.sibling=O,_=O,L=A}if(T===p.length)return n(d,L),H&&Dt(d,T),C;if(L===null){for(;TT?(A=L,L=null):A=L.sibling;var ue=v(d,L,O.value,S);if(ue===null){L===null&&(L=A);break}e&&L&&ue.alternate===null&&t(d,L),f=i(ue,f,T),_===null?C=ue:_.sibling=ue,_=ue,L=A}if(O.done)return n(d,L),H&&Dt(d,T),C;if(L===null){for(;!O.done;T++,O=p.next())O=h(d,O.value,S),O!==null&&(f=i(O,f,T),_===null?C=O:_.sibling=O,_=O);return H&&Dt(d,T),C}for(L=r(d,L);!O.done;T++,O=p.next())O=x(L,d,T,O.value,S),O!==null&&(e&&O.alternate!==null&&L.delete(O.key===null?T:O.key),f=i(O,f,T),_===null?C=O:_.sibling=O,_=O);return e&&L.forEach(function(ut){return t(d,ut)}),H&&Dt(d,T),C}function k(d,f,p,S){if(typeof p=="object"&&p!==null&&p.type===nn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case Lr:e:{for(var C=p.key,_=f;_!==null;){if(_.key===C){if(C=p.type,C===nn){if(_.tag===7){n(d,_.sibling),f=l(_,p.props.children),f.return=d,d=f;break e}}else if(_.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===dt&&ls(C)===_.type){n(d,_.sibling),f=l(_,p.props),f.ref=Un(d,_,p),f.return=d,d=f;break e}n(d,_);break}else t(d,_);_=_.sibling}p.type===nn?(f=Wt(p.props.children,d.mode,S,p.key),f.return=d,d=f):(S=rl(p.type,p.key,p.props,null,d.mode,S),S.ref=Un(d,f,p),S.return=d,d=S)}return o(d);case tn:e:{for(_=p.key;f!==null;){if(f.key===_)if(f.tag===4&&f.stateNode.containerInfo===p.containerInfo&&f.stateNode.implementation===p.implementation){n(d,f.sibling),f=l(f,p.children||[]),f.return=d,d=f;break e}else{n(d,f);break}else t(d,f);f=f.sibling}f=Ei(p,d.mode,S),f.return=d,d=f}return o(d);case dt:return _=p._init,k(d,f,_(p._payload),S)}if($n(p))return g(d,f,p,S);if(On(p))return y(d,f,p,S);Br(d,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,f!==null&&f.tag===6?(n(d,f.sibling),f=l(f,p),f.return=d,d=f):(n(d,f),f=ki(p,d.mode,S),f.return=d,d=f),o(d)):n(d,f)}return k}var En=ec(!0),tc=ec(!1),yl=Rt(null),wl=null,fn=null,Ko=null;function Go(){Ko=fn=wl=null}function Xo(e){var t=yl.current;W(yl),e._currentValue=t}function eo(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yn(e,t){wl=e,Ko=fn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ye=!0),e.firstContext=null)}function Oe(e){var t=e._currentValue;if(Ko!==e)if(e={context:e,memoizedValue:t,next:null},fn===null){if(wl===null)throw Error(E(308));fn=e,wl.dependencies={lanes:0,firstContext:e}}else fn=fn.next=e;return t}var Bt=null;function Yo(e){Bt===null?Bt=[e]:Bt.push(e)}function nc(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Yo(t)):(n.next=l.next,l.next=n),t.interleaved=n,lt(e,r)}function lt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var pt=!1;function Jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function rc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function tt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Et(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,F&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,lt(e,n)}return l=r.interleaved,l===null?(t.next=t,Yo(r)):(t.next=l.next,l.next=t),r.interleaved=t,lt(e,n)}function Zr(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mo(e,n)}}function is(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?l=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function xl(e,t,n,r){var l=e.updateQueue;pt=!1;var i=l.firstBaseUpdate,o=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,a=u.next;u.next=null,o===null?i=a:o.next=a,o=u;var m=e.alternate;m!==null&&(m=m.updateQueue,s=m.lastBaseUpdate,s!==o&&(s===null?m.firstBaseUpdate=a:s.next=a,m.lastBaseUpdate=u))}if(i!==null){var h=l.baseState;o=0,m=a=u=null,s=i;do{var v=s.lane,x=s.eventTime;if((r&v)===v){m!==null&&(m=m.next={eventTime:x,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,y=s;switch(v=t,x=n,y.tag){case 1:if(g=y.payload,typeof g=="function"){h=g.call(x,h,v);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=y.payload,v=typeof g=="function"?g.call(x,h,v):g,v==null)break e;h=G({},h,v);break e;case 2:pt=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,v=l.effects,v===null?l.effects=[s]:v.push(s))}else x={eventTime:x,lane:v,tag:s.tag,payload:s.payload,callback:s.callback,next:null},m===null?(a=m=x,u=h):m=m.next=x,o|=v;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;v=s,s=v.next,v.next=null,l.lastBaseUpdate=v,l.shared.pending=null}}while(!0);if(m===null&&(u=h),l.baseState=u,l.firstBaseUpdate=a,l.lastBaseUpdate=m,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else i===null&&(l.shared.lanes=0);Gt|=o,e.lanes=o,e.memoizedState=h}}function os(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=gi.transition;gi.transition={};try{e(!1),t()}finally{U=n,gi.transition=r}}function xc(){return Ie().memoizedState}function xp(e,t,n){var r=Nt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Sc(e))kc(t,n);else if(n=nc(e,t,n,r),n!==null){var l=pe();$e(n,e,r,l),Ec(n,t,r)}}function Sp(e,t,n){var r=Nt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Sc(e))kc(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,n);if(l.hasEagerState=!0,l.eagerState=s,We(s,o)){var u=t.interleaved;u===null?(l.next=l,Yo(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=nc(e,t,l,r),n!==null&&(l=pe(),$e(n,e,r,l),Ec(n,t,r))}}function Sc(e){var t=e.alternate;return e===K||t!==null&&t===K}function kc(e,t){Jn=kl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ec(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Mo(e,n)}}var El={readContext:Oe,useCallback:se,useContext:se,useEffect:se,useImperativeHandle:se,useInsertionEffect:se,useLayoutEffect:se,useMemo:se,useReducer:se,useRef:se,useState:se,useDebugValue:se,useDeferredValue:se,useTransition:se,useMutableSource:se,useSyncExternalStore:se,useId:se,unstable_isNewReconciler:!1},kp={readContext:Oe,useCallback:function(e,t){return Ke().memoizedState=[e,t===void 0?null:t],e},useContext:Oe,useEffect:ss,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,br(4194308,4,mc.bind(null,t,e),n)},useLayoutEffect:function(e,t){return br(4194308,4,e,t)},useInsertionEffect:function(e,t){return br(4,2,e,t)},useMemo:function(e,t){var n=Ke();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ke();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=xp.bind(null,K,e),[r.memoizedState,e]},useRef:function(e){var t=Ke();return e={current:e},t.memoizedState=e},useState:us,useDebugValue:lu,useDeferredValue:function(e){return Ke().memoizedState=e},useTransition:function(){var e=us(!1),t=e[0];return e=wp.bind(null,e[1]),Ke().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=K,l=Ke();if(H){if(n===void 0)throw Error(E(407));n=n()}else{if(n=t(),re===null)throw Error(E(349));Kt&30||uc(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,ss(ac.bind(null,r,i,e),[e]),r.flags|=2048,mr(9,sc.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Ke(),t=re.identifierPrefix;if(H){var n=et,r=be;n=(r&~(1<<32-Ve(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=pr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ge]=t,e[cr]=r,Oc(e,t,!1,!1),t.stateNode=e;e:{switch(o=Fi(n,r),n){case"dialog":$("cancel",e),$("close",e),l=r;break;case"iframe":case"object":case"embed":$("load",e),l=r;break;case"video":case"audio":for(l=0;ljn&&(t.flags|=128,r=!0,An(i,!1),t.lanes=4194304)}else{if(!r)if(e=Sl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),An(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!H)return ae(t),null}else 2*Z()-i.renderingStartTime>jn&&n!==1073741824&&(t.flags|=128,r=!0,An(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Z(),t.sibling=null,n=Q.current,V(Q,r?n&1|2:n&1),t):(ae(t),null);case 22:case 23:return cu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ee&1073741824&&(ae(t),t.subtreeFlags&6&&(t.flags|=8192)):ae(t),null;case 24:return null;case 25:return null}throw Error(E(156,t.tag))}function Tp(e,t){switch(Ho(t),t.tag){case 1:return xe(t.type)&&hl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Cn(),W(we),W(fe),bo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(W(Q),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(E(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return W(Q),null;case 4:return Cn(),null;case 10:return Xo(t.type._context),null;case 22:case 23:return cu(),null;case 24:return null;default:return null}}var $r=!1,ce=!1,Rp=typeof WeakSet=="function"?WeakSet:Set,P=null;function dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){X(e,t,r)}else n.current=null}function ao(e,t,n){try{n()}catch(r){X(e,t,r)}}var ws=!1;function zp(e,t){if(Ki=cl,e=Ba(),$o(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,s=-1,u=-1,a=0,m=0,h=e,v=null;t:for(;;){for(var x;h!==n||l!==0&&h.nodeType!==3||(s=o+l),h!==i||r!==0&&h.nodeType!==3||(u=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(x=h.firstChild)!==null;)v=h,h=x;for(;;){if(h===e)break t;if(v===n&&++a===l&&(s=o),v===i&&++m===r&&(u=o),(x=h.nextSibling)!==null)break;h=v,v=h.parentNode}h=x}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gi={focusedElem:e,selectionRange:n},cl=!1,P=t;P!==null;)if(t=P,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,P=e;else for(;P!==null;){t=P;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,k=g.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?y:Ue(t.type,y),k);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(E(163))}}catch(S){X(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,P=e;break}P=t.return}return g=ws,ws=!1,g}function Zn(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&ao(t,n,i)}l=l.next}while(l!==r)}}function Bl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function co(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Fc(e){var t=e.alternate;t!==null&&(e.alternate=null,Fc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ge],delete t[cr],delete t[Ji],delete t[hp],delete t[mp])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Dc(e){return e.tag===5||e.tag===3||e.tag===4}function xs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pl));else if(r!==4&&(e=e.child,e!==null))for(fo(e,t,n),e=e.sibling;e!==null;)fo(e,t,n),e=e.sibling}function po(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(po(e,t,n),e=e.sibling;e!==null;)po(e,t,n),e=e.sibling}var le=null,Ae=!1;function ft(e,t,n){for(n=n.child;n!==null;)Uc(e,t,n),n=n.sibling}function Uc(e,t,n){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(zl,n)}catch{}switch(n.tag){case 5:ce||dn(n,t);case 6:var r=le,l=Ae;le=null,ft(e,t,n),le=r,Ae=l,le!==null&&(Ae?(e=le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):le.removeChild(n.stateNode));break;case 18:le!==null&&(Ae?(e=le,n=n.stateNode,e.nodeType===8?hi(e.parentNode,n):e.nodeType===1&&hi(e,n),ir(e)):hi(le,n.stateNode));break;case 4:r=le,l=Ae,le=n.stateNode.containerInfo,Ae=!0,ft(e,t,n),le=r,Ae=l;break;case 0:case 11:case 14:case 15:if(!ce&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ao(n,t,o),l=l.next}while(l!==r)}ft(e,t,n);break;case 1:if(!ce&&(dn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){X(n,t,s)}ft(e,t,n);break;case 21:ft(e,t,n);break;case 22:n.mode&1?(ce=(r=ce)||n.memoizedState!==null,ft(e,t,n),ce=r):ft(e,t,n);break;default:ft(e,t,n)}}function Ss(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Rp),t.forEach(function(r){var l=Vp.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function De(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=Z()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Ip(r/1960))-r,10e?16:e,gt===null)var r=!1;else{if(e=gt,gt=null,jl=0,F&6)throw Error(E(331));var l=F;for(F|=4,P=e.current;P!==null;){var i=P,o=i.child;if(P.flags&16){var s=i.deletions;if(s!==null){for(var u=0;uZ()-su?$t(e,0):uu|=n),Se(e,t)}function Kc(e,t){t===0&&(e.mode&1?(t=Or,Or<<=1,!(Or&130023424)&&(Or=4194304)):t=1);var n=pe();e=lt(e,t),e!==null&&(xr(e,t,n),Se(e,n))}function Bp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kc(e,n)}function Vp(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(E(314))}r!==null&&r.delete(t),Kc(e,n)}var Gc;Gc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||we.current)ye=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ye=!1,_p(e,t,n);ye=!!(e.flags&131072)}else ye=!1,H&&t.flags&1048576&&Za(t,gl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;el(e,t),e=t.pendingProps;var l=Sn(t,fe.current);yn(t,n),l=tu(null,t,r,e,l,n);var i=nu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,xe(r)?(i=!0,ml(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Jo(t),l.updater=Al,t.stateNode=l,l._reactInternals=t,no(t,r,e,n),t=io(null,t,r,!0,i,n)):(t.tag=0,H&&i&&Wo(t),de(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(el(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Wp(r),e=Ue(r,e),l){case 0:t=lo(null,t,r,e,n);break e;case 1:t=vs(null,t,r,e,n);break e;case 11:t=hs(null,t,r,e,n);break e;case 14:t=ms(null,t,r,Ue(r.type,e),n);break e}throw Error(E(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),lo(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),vs(e,t,r,l,n);case 3:e:{if(Tc(t),e===null)throw Error(E(387));r=t.pendingProps,i=t.memoizedState,l=i.element,rc(e,t),xl(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=Nn(Error(E(423)),t),t=gs(e,t,r,n,l);break e}else if(r!==l){l=Nn(Error(E(424)),t),t=gs(e,t,r,n,l);break e}else for(Ce=kt(t.stateNode.containerInfo.firstChild),Ne=t,H=!0,Be=null,n=tc(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(kn(),r===l){t=it(e,t,n);break e}de(e,t,r,n)}t=t.child}return t;case 5:return lc(t),e===null&&bi(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,Xi(r,l)?o=null:i!==null&&Xi(r,i)&&(t.flags|=32),Lc(e,t),de(e,t,o,n),t.child;case 6:return e===null&&bi(t),null;case 13:return Rc(e,t,n);case 4:return Zo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=En(t,null,r,n):de(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),hs(e,t,r,l,n);case 7:return de(e,t,t.pendingProps,n),t.child;case 8:return de(e,t,t.pendingProps.children,n),t.child;case 12:return de(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,V(yl,r._currentValue),r._currentValue=o,i!==null)if(We(i.value,o)){if(i.children===l.children&&!we.current){t=it(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=tt(-1,n&-n),u.tag=2;var a=i.updateQueue;if(a!==null){a=a.shared;var m=a.pending;m===null?u.next=u:(u.next=m.next,m.next=u),a.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),eo(i.return,n,t),s.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(E(341));o.lanes|=n,s=o.alternate,s!==null&&(s.lanes|=n),eo(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}de(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,yn(t,n),l=Oe(l),r=r(l),t.flags|=1,de(e,t,r,n),t.child;case 14:return r=t.type,l=Ue(r,t.pendingProps),l=Ue(r.type,l),ms(e,t,r,l,n);case 15:return Pc(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:Ue(r,l),el(e,t),t.tag=1,xe(r)?(e=!0,ml(t)):e=!1,yn(t,n),Cc(t,r,l),no(t,r,l,n),io(null,t,r,!0,e,n);case 19:return zc(e,t,n);case 22:return _c(e,t,n)}throw Error(E(156,t.tag))};function Xc(e,t){return Sa(e,t)}function $p(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Re(e,t,n,r){return new $p(e,t,n,r)}function du(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Wp(e){if(typeof e=="function")return du(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ro)return 11;if(e===zo)return 14}return 2}function jt(e,t){var n=e.alternate;return n===null?(n=Re(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function rl(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")du(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case nn:return Wt(n.children,l,i,t);case To:o=8,l|=8;break;case ji:return e=Re(12,n,t,l|2),e.elementType=ji,e.lanes=i,e;case Pi:return e=Re(13,n,t,l),e.elementType=Pi,e.lanes=i,e;case _i:return e=Re(19,n,t,l),e.elementType=_i,e.lanes=i,e;case la:return $l(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case na:o=10;break e;case ra:o=9;break e;case Ro:o=11;break e;case zo:o=14;break e;case dt:o=16,r=null;break e}throw Error(E(130,e==null?e:typeof e,""))}return t=Re(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function Wt(e,t,n,r){return e=Re(7,e,r,t),e.lanes=n,e}function $l(e,t,n,r){return e=Re(22,e,r,t),e.elementType=la,e.lanes=n,e.stateNode={isHidden:!1},e}function ki(e,t,n){return e=Re(6,e,null,t),e.lanes=n,e}function Ei(e,t,n){return t=Re(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Hp(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ri(0),this.expirationTimes=ri(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ri(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function pu(e,t,n,r,l,i,o,s,u){return e=new Hp(e,t,n,s,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Re(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Jo(i),e}function Qp(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qc)}catch(e){console.error(e)}}qc(),qs.exports=Pe;var Jp=qs.exports,bc,Ls=Jp;bc=Ls.createRoot,Ls.hydrateRoot;/** - * @remix-run/router v1.23.2 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function gr(){return gr=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function gu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qp(){return Math.random().toString(36).substr(2,8)}function Rs(e,t){return{usr:e.state,key:e.key,idx:t}}function yo(e,t,n,r){return n===void 0&&(n=null),gr({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Rn(t):t,{state:n,key:t&&t.key||r||qp()})}function Ll(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Rn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function bp(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:i=!1}=r,o=l.history,s=yt.Pop,u=null,a=m();a==null&&(a=0,o.replaceState(gr({},o.state,{idx:a}),""));function m(){return(o.state||{idx:null}).idx}function h(){s=yt.Pop;let k=m(),d=k==null?null:k-a;a=k,u&&u({action:s,location:y.location,delta:d})}function v(k,d){s=yt.Push;let f=yo(y.location,k,d);a=m()+1;let p=Rs(f,a),S=y.createHref(f);try{o.pushState(p,"",S)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;l.location.assign(S)}i&&u&&u({action:s,location:y.location,delta:1})}function x(k,d){s=yt.Replace;let f=yo(y.location,k,d);a=m();let p=Rs(f,a),S=y.createHref(f);o.replaceState(p,"",S),i&&u&&u({action:s,location:y.location,delta:0})}function g(k){let d=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof k=="string"?k:Ll(k);return f=f.replace(/ $/,"%20"),Y(d,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,d)}let y={get action(){return s},get location(){return e(l,o)},listen(k){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Ts,h),u=k,()=>{l.removeEventListener(Ts,h),u=null}},createHref(k){return t(l,k)},createURL:g,encodeLocation(k){let d=g(k);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:v,replace:x,go(k){return o.go(k)}};return y}var zs;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(zs||(zs={}));function eh(e,t,n){return n===void 0&&(n="/"),th(e,t,n)}function th(e,t,n,r){let l=typeof t=="string"?Rn(t):t,i=Pn(l.pathname||"/",n);if(i==null)return null;let o=ef(e);nh(o);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(Y(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let a=Pt([r,u.relativePath]),m=n.concat(u);i.children&&i.children.length>0&&(Y(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+a+'".')),ef(i.children,t,m,a)),!(i.path==null&&!i.index)&&t.push({path:a,score:ah(a,i.index),routesMeta:m})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))l(i,o);else for(let u of tf(i.path))l(i,o,u)}),t}function tf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return l?[i,""]:[i];let o=tf(r.join("/")),s=[];return s.push(...o.map(u=>u===""?i:[i,u].join("/"))),l&&s.push(...o),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function nh(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:ch(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const rh=/^:[\w-]+$/,lh=3,ih=2,oh=1,uh=10,sh=-2,Os=e=>e==="*";function ah(e,t){let n=e.split("/"),r=n.length;return n.some(Os)&&(r+=sh),t&&(r+=ih),n.filter(l=>!Os(l)).reduce((l,i)=>l+(rh.test(i)?lh:i===""?oh:uh),r)}function ch(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function fh(e,t,n){let{routesMeta:r}=e,l={},i="/",o=[];for(let s=0;s{let{paramName:v,isOptional:x}=m;if(v==="*"){let y=s[h]||"";o=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const g=s[h];return x&&!g?a[v]=void 0:a[v]=(g||"").replace(/%2F/g,"/"),a},{}),pathname:i,pathnameBase:o,pattern:e}}function dh(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),gu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function ph(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return gu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Pn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const hh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mh=e=>hh.test(e);function vh(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Rn(e):e,i;if(n)if(mh(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),gu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Is(n.substring(1),"/"):i=Is(n,t)}else i=t;return{pathname:i,search:wh(r),hash:xh(l)}}function Is(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Ci(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function gh(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function nf(e,t){let n=gh(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function rf(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Rn(e):(l=gr({},e),Y(!l.pathname||!l.pathname.includes("?"),Ci("?","pathname","search",l)),Y(!l.pathname||!l.pathname.includes("#"),Ci("#","pathname","hash",l)),Y(!l.search||!l.search.includes("#"),Ci("#","search","hash",l)));let i=e===""||l.pathname==="",o=i?"/":l.pathname,s;if(o==null)s=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),h-=1;l.pathname=v.join("/")}s=h>=0?t[h]:"/"}let u=vh(l,s),a=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(a||m)&&(u.pathname+="/"),u}const Pt=e=>e.join("/").replace(/\/\/+/g,"/"),yh=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),wh=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,xh=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Sh(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const lf=["post","put","patch","delete"];new Set(lf);const kh=["get",...lf];new Set(kh);/** - * React Router v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function yr(){return yr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),w.useCallback(function(a,m){if(m===void 0&&(m={}),!s.current)return;if(typeof a=="number"){r.go(a);return}let h=rf(a,JSON.parse(o),i,m.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:Pt([t,h.pathname])),(m.replace?r.replace:r.push)(h,m.state,m)},[t,r,o,i,e])}function jh(){let{matches:e}=w.useContext(It),t=e[e.length-1];return t?t.params:{}}function Yl(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=w.useContext(Ot),{matches:l}=w.useContext(It),{pathname:i}=Nr(),o=JSON.stringify(nf(l,r.v7_relativeSplatPath));return w.useMemo(()=>rf(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Ph(e,t){return _h(e,t)}function _h(e,t,n,r){Cr()||Y(!1);let{navigator:l}=w.useContext(Ot),{matches:i}=w.useContext(It),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let a=Nr(),m;if(t){var h;let k=typeof t=="string"?Rn(t):t;u==="/"||(h=k.pathname)!=null&&h.startsWith(u)||Y(!1),m=k}else m=a;let v=m.pathname||"/",x=v;if(u!=="/"){let k=u.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(k.length).join("/")}let g=eh(e,{pathname:x}),y=Oh(g&&g.map(k=>Object.assign({},k,{params:Object.assign({},s,k.params),pathname:Pt([u,l.encodeLocation?l.encodeLocation(k.pathname).pathname:k.pathname]),pathnameBase:k.pathnameBase==="/"?u:Pt([u,l.encodeLocation?l.encodeLocation(k.pathnameBase).pathname:k.pathnameBase])})),i,n,r);return t&&y?w.createElement(Xl.Provider,{value:{location:yr({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:yt.Pop}},y):y}function Lh(){let e=Dh(),t=Sh(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return w.createElement(w.Fragment,null,w.createElement("h2",null,"Unexpected Application Error!"),w.createElement("h3",{style:{fontStyle:"italic"}},t),n?w.createElement("pre",{style:l},n):null,null)}const Th=w.createElement(Lh,null);class Rh extends w.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?w.createElement(It.Provider,{value:this.props.routeContext},w.createElement(uf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zh(e){let{routeContext:t,match:n,children:r}=e,l=w.useContext(Gl);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),w.createElement(It.Provider,{value:t},r)}function Oh(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,s=(l=n)==null?void 0:l.errors;if(s!=null){let m=o.findIndex(h=>h.route.id&&(s==null?void 0:s[h.route.id])!==void 0);m>=0||Y(!1),o=o.slice(0,Math.min(o.length,m+1))}let u=!1,a=-1;if(n&&r&&r.v7_partialHydration)for(let m=0;m=0?o=o.slice(0,a+1):o=[o[0]];break}}}return o.reduceRight((m,h,v)=>{let x,g=!1,y=null,k=null;n&&(x=s&&h.route.id?s[h.route.id]:void 0,y=h.route.errorElement||Th,u&&(a<0&&v===0?(Ah("route-fallback"),g=!0,k=null):a===v&&(g=!0,k=h.route.hydrateFallbackElement||null)));let d=t.concat(o.slice(0,v+1)),f=()=>{let p;return x?p=y:g?p=k:h.route.Component?p=w.createElement(h.route.Component,null):h.route.element?p=h.route.element:p=m,w.createElement(zh,{match:h,routeContext:{outlet:m,matches:d,isDataRoute:n!=null},children:p})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?w.createElement(Rh,{location:n.location,revalidation:n.revalidation,component:y,error:x,children:f(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):f()},null)}var af=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(af||{}),cf=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(cf||{});function Ih(e){let t=w.useContext(Gl);return t||Y(!1),t}function Mh(e){let t=w.useContext(of);return t||Y(!1),t}function Fh(e){let t=w.useContext(It);return t||Y(!1),t}function ff(e){let t=Fh(),n=t.matches[t.matches.length-1];return n.route.id||Y(!1),n.route.id}function Dh(){var e;let t=w.useContext(uf),n=Mh(),r=ff();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Uh(){let{router:e}=Ih(af.UseNavigateStable),t=ff(cf.UseNavigateStable),n=w.useRef(!1);return sf(()=>{n.current=!0}),w.useCallback(function(l,i){i===void 0&&(i={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,yr({fromRouteId:t},i)))},[e,t])}const Ms={};function Ah(e,t,n){Ms[e]||(Ms[e]=!0)}function Bh(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function ll(e){Y(!1)}function Vh(e){let{basename:t="/",children:n=null,location:r,navigationType:l=yt.Pop,navigator:i,static:o=!1,future:s}=e;Cr()&&Y(!1);let u=t.replace(/^\/*/,"/"),a=w.useMemo(()=>({basename:u,navigator:i,static:o,future:yr({v7_relativeSplatPath:!1},s)}),[u,s,i,o]);typeof r=="string"&&(r=Rn(r));let{pathname:m="/",search:h="",hash:v="",state:x=null,key:g="default"}=r,y=w.useMemo(()=>{let k=Pn(m,u);return k==null?null:{location:{pathname:k,search:h,hash:v,state:x,key:g},navigationType:l}},[u,m,h,v,x,g,l]);return y==null?null:w.createElement(Ot.Provider,{value:a},w.createElement(Xl.Provider,{children:n,value:y}))}function $h(e){let{children:t,location:n}=e;return Ph(xo(t),n)}new Promise(()=>{});function xo(e,t){t===void 0&&(t=[]);let n=[];return w.Children.forEach(e,(r,l)=>{if(!w.isValidElement(r))return;let i=[...t,l];if(r.type===w.Fragment){n.push.apply(n,xo(r.props.children,i));return}r.type!==ll&&Y(!1),!r.props.index||!r.props.children||Y(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=xo(r.props.children,i)),n.push(o)}),n}/** - * React Router DOM v6.30.3 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Tl(){return Tl=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Wh(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Hh(e,t){return e.button===0&&(!t||t==="_self")&&!Wh(e)}const Qh=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Kh=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Gh="6";try{window.__reactRouterVersion=Gh}catch{}const Xh=w.createContext({isTransitioning:!1}),Yh="startTransition",Fs=Af[Yh];function Jh(e){let{basename:t,children:n,future:r,window:l}=e,i=w.useRef();i.current==null&&(i.current=Zp({window:l,v5Compat:!0}));let o=i.current,[s,u]=w.useState({action:o.action,location:o.location}),{v7_startTransition:a}=r||{},m=w.useCallback(h=>{a&&Fs?Fs(()=>u(h)):u(h)},[u,a]);return w.useLayoutEffect(()=>o.listen(m),[o,m]),w.useEffect(()=>Bh(r),[r]),w.createElement(Vh,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}const Zh=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qh=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jl=w.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:i,replace:o,state:s,target:u,to:a,preventScrollReset:m,viewTransition:h}=t,v=df(t,Qh),{basename:x}=w.useContext(Ot),g,y=!1;if(typeof a=="string"&&qh.test(a)&&(g=a,Zh))try{let p=new URL(window.location.href),S=a.startsWith("//")?new URL(p.protocol+a):new URL(a),C=Pn(S.pathname,x);S.origin===p.origin&&C!=null?a=C+S.search+S.hash:y=!0}catch{}let k=Eh(a,{relative:l}),d=em(a,{replace:o,state:s,target:u,preventScrollReset:m,relative:l,viewTransition:h});function f(p){r&&r(p),p.defaultPrevented||d(p)}return w.createElement("a",Tl({},v,{href:g||k,onClick:y||i?r:f,ref:n,target:u}))}),Ds=w.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:i="",end:o=!1,style:s,to:u,viewTransition:a,children:m}=t,h=df(t,Kh),v=Yl(u,{relative:h.relative}),x=Nr(),g=w.useContext(of),{navigator:y,basename:k}=w.useContext(Ot),d=g!=null&&tm(v)&&a===!0,f=y.encodeLocation?y.encodeLocation(v).pathname:v.pathname,p=x.pathname,S=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;l||(p=p.toLowerCase(),S=S?S.toLowerCase():null,f=f.toLowerCase()),S&&k&&(S=Pn(S,k)||S);const C=f!=="/"&&f.endsWith("/")?f.length-1:f.length;let _=p===f||!o&&p.startsWith(f)&&p.charAt(C)==="/",L=S!=null&&(S===f||!o&&S.startsWith(f)&&S.charAt(f.length)==="/"),T={isActive:_,isPending:L,isTransitioning:d},A=_?r:void 0,O;typeof i=="function"?O=i(T):O=[i,_?"active":null,L?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let ue=typeof s=="function"?s(T):s;return w.createElement(Jl,Tl({},h,{"aria-current":A,className:O,ref:n,style:ue,to:u,viewTransition:a}),typeof m=="function"?m(T):m)});var So;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(So||(So={}));var Us;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Us||(Us={}));function bh(e){let t=w.useContext(Gl);return t||Y(!1),t}function em(e,t){let{target:n,replace:r,state:l,preventScrollReset:i,relative:o,viewTransition:s}=t===void 0?{}:t,u=Ch(),a=Nr(),m=Yl(e,{relative:o});return w.useCallback(h=>{if(Hh(h,n)){h.preventDefault();let v=r!==void 0?r:Ll(a)===Ll(m);u(e,{replace:v,state:l,preventScrollReset:i,relative:o,viewTransition:s})}},[a,u,m,r,l,n,e,i,o,s])}function tm(e,t){t===void 0&&(t={});let n=w.useContext(Xh);n==null&&Y(!1);let{basename:r}=bh(So.useViewTransitionState),l=Yl(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Pn(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Pn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return wo(l.pathname,o)!=null||wo(l.pathname,i)!=null}const pf=w.createContext(null);function As(){try{return localStorage.getItem("authToken")||""}catch{return""}}function Qr(e){try{e?localStorage.setItem("authToken",e):localStorage.removeItem("authToken")}catch{}}function nm({children:e}){const[t,n]=w.useState(As),[r,l]=w.useState(null),[i,o]=w.useState(!!As()),[s,u]=w.useState(null);w.useEffect(()=>{if(!t){l(null),o(!1),u(null);return}let g=!1;return o(!0),fetch("/api/auth/me",{headers:{Authorization:`Bearer ${t}`}}).then(async y=>{const k=await y.json().catch(()=>({}));if(!y.ok)throw new Error(k.error||"Kon sessie niet verifiëren.");g||(l(k.user||null),u(null))}).catch(()=>{g||(l(null),n(""),Qr(""))}).finally(()=>{g||o(!1)}),()=>{g=!0}},[t]);async function a(g){u(null);const y=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),k=await y.json().catch(()=>({}));if(!y.ok)throw new Error(k.error||"Login mislukt.");return n(k.token),Qr(k.token),l(k.user),k.user}async function m(g){u(null);const y=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),k=await y.json().catch(()=>({}));if(!y.ok)throw new Error(k.error||"Registratie mislukt.");return n(k.token),Qr(k.token),l(k.user),k.user}function h(){n(""),Qr(""),l(null)}const v=w.useMemo(()=>(g,y={})=>{const k={...y.headers||{},...t?{Authorization:`Bearer ${t}`}:{}};return fetch(g,{...y,headers:k})},[t]),x={user:r,token:t,loading:i,error:s,login:a,register:m,logout:h,authFetch:v};return c.jsx(pf.Provider,{value:x,children:e})}function hf(){const e=w.useContext(pf);if(!e)throw new Error("useAuth moet binnen een AuthProvider gebruikt worden");return e}function rm(){const e=({isActive:r})=>r?"nav-link active":"nav-link",{user:t,logout:n}=hf();return c.jsxs("nav",{className:"site-nav",children:[c.jsx(Jl,{className:"nav-logo",to:"/",children:"Siti Plugin Repo"}),c.jsxs("div",{className:"nav-links",children:[c.jsx(Ds,{to:"/",end:!0,className:e,children:"Plugins"}),c.jsx(Ds,{to:"/licenses",className:e,children:"Licenties"})]}),c.jsx("div",{className:"nav-user",children:t?c.jsxs(c.Fragment,{children:[c.jsxs("span",{className:"nav-user-name",children:["Hallo, ",t.name]}),c.jsx("button",{className:"ghost ghost-small",type:"button",onClick:n,children:"Uitloggen"})]}):c.jsx("span",{className:"nav-user-guest",children:"Niet ingelogd"})})]})}function lm(){const[e,t]=w.useState([]),[n,r]=w.useState(!0),[l,i]=w.useState(null),[o,s]=w.useState(null);return w.useEffect(()=>{async function u(){try{const a=await fetch("/api/plugins");if(!a.ok)throw new Error("Kon plugins niet laden");const m=await a.json();t(m.items||[]),s(m.updatedAt)}catch{i("Laden van GitHub data is mislukt.")}finally{r(!1)}}u()},[]),c.jsxs("div",{className:"page",children:[c.jsxs("header",{className:"hero",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow",children:"WordPress plugin overzicht"}),c.jsx("h1",{children:"Siti Plugin Repo"}),c.jsx("p",{className:"subtitle",children:"Al je publieke WordPress plugins op één plek."})]}),c.jsx("a",{className:"cta",href:"https://github.com/SitiWeb",target:"_blank",rel:"noreferrer",children:"GitHub SitiWeb"})]}),c.jsxs("section",{className:"grid",children:[n&&c.jsx("div",{className:"state",children:"Bezig met laden…"}),l&&c.jsx("div",{className:"state error",children:l}),!n&&!l&&e.length===0&&c.jsx("div",{className:"state",children:"Geen repositories gevonden."}),e.map(u=>{var h,v;const a=((h=u.manifest)==null?void 0:h.plugin_name)||u.name,m=((v=u.manifest)==null?void 0:v.description)||u.description;return c.jsxs("article",{className:"card",children:[c.jsxs("div",{className:"card-header",children:[c.jsx("h2",{children:a}),c.jsx("span",{className:"pill",children:u.fullName})]}),c.jsx("p",{children:m}),c.jsxs("div",{className:"meta",children:[c.jsxs("span",{children:["★ ",u.stars]}),c.jsxs("span",{children:["Forks ",u.forks]}),c.jsxs("span",{children:["Issues ",u.issues]})]}),u.topics.length>0&&c.jsx("div",{className:"topics",children:u.topics.slice(0,4).map(x=>c.jsx("span",{className:"topic",children:x},x))}),c.jsxs("div",{className:"actions",children:[c.jsx(Jl,{className:"link",to:`/plugin/${u.fullName}`,children:"Bekijk details →"}),c.jsx("a",{className:"ghost",href:u.repoUrl,target:"_blank",rel:"noreferrer",children:"GitHub"})]})]},u.fullName)})]}),c.jsx("footer",{className:"footer",children:c.jsxs("span",{children:["Laatste sync: ",o?new Date(o).toLocaleString("nl-NL"):"-"]})})]})}function im(){const{owner:e,repo:t}=jh(),[n,r]=w.useState(null),[l,i]=w.useState(!0),[o,s]=w.useState(null);w.useEffect(()=>{async function y(){try{const k=await fetch(`/api/plugins/${e}/${t}`);if(!k.ok)throw new Error("Kon details niet laden");const d=await k.json();r(d)}catch{s("Laden van plugin details is mislukt.")}finally{i(!1)}}y()},[e,t]);const u=n==null?void 0:n.manifest,a=(u==null?void 0:u.plugin_name)||(n==null?void 0:n.name)||t,m=(u==null?void 0:u.description)||(n==null?void 0:n.description),h=(u==null?void 0:u.author)||"-",v=(u==null?void 0:u.version)||"-",x=w.useMemo(()=>(n==null?void 0:n.releases)||[],[n]),g=w.useMemo(()=>(n==null?void 0:n.commits)||[],[n]);return c.jsxs("div",{className:"page",children:[c.jsxs("header",{className:"detail-hero",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow",children:"Plugin details"}),c.jsx("h1",{children:a}),c.jsx("p",{className:"subtitle",children:m})]}),c.jsxs("div",{className:"detail-actions",children:[c.jsx(Jl,{className:"ghost",to:"/",children:"← Terug"}),(n==null?void 0:n.repoUrl)&&c.jsx("a",{className:"cta",href:n.repoUrl,target:"_blank",rel:"noreferrer",children:"GitHub"})]})]}),l&&c.jsx("div",{className:"state",children:"Bezig met laden…"}),o&&c.jsx("div",{className:"state error",children:o}),!l&&!o&&n&&c.jsxs("section",{className:"detail-grid",children:[c.jsxs("div",{className:"card",children:[c.jsx("h2",{children:"Manifest"}),c.jsxs("div",{className:"detail-list",children:[c.jsxs("div",{children:[c.jsx("span",{children:"Naam"}),c.jsx("strong",{children:a})]}),c.jsxs("div",{children:[c.jsx("span",{children:"Versie"}),c.jsx("strong",{children:v})]}),c.jsxs("div",{children:[c.jsx("span",{children:"Auteur"}),c.jsx("strong",{children:h})]}),c.jsxs("div",{children:[c.jsx("span",{children:"Repository"}),c.jsx("strong",{children:n.fullName})]})]}),(u==null?void 0:u.author_url)&&c.jsx("a",{className:"link",href:u.author_url,target:"_blank",rel:"noreferrer",children:"Auteur website →"})]}),c.jsxs("div",{className:"card",children:[c.jsx("h2",{children:"Releases"}),x.length===0&&c.jsx("p",{children:"Geen releases gevonden."}),c.jsx("ul",{className:"list",children:x.map(y=>c.jsxs("li",{children:[c.jsx("a",{href:y.url,target:"_blank",rel:"noreferrer",children:y.name}),c.jsx("span",{children:y.publishedAt?new Date(y.publishedAt).toLocaleDateString("nl-NL"):"-"})]},y.tag))})]}),c.jsxs("div",{className:"card",children:[c.jsx("h2",{children:"Recente commits"}),g.length===0&&c.jsx("p",{children:"Geen commits gevonden."}),c.jsx("ul",{className:"list",children:g.map(y=>{var k;return c.jsxs("li",{children:[c.jsx("a",{href:y.url,target:"_blank",rel:"noreferrer",children:((k=y.message)==null?void 0:k.split(` -`)[0])||y.sha.slice(0,7)}),c.jsx("span",{children:y.author||"-"})]},y.sha)})})]})]})]})}const mf="nl-NL";function ko(e,t=mf){return e?new Date(e).toLocaleString(t):"-"}function om(e,t=mf){return e?new Date(e).toLocaleDateString(t):"-"}function um({license:e}){const t=e.hostnames||[],n=e.primaryHostname||"Nog niet gekoppeld";return c.jsxs("article",{className:"card license-card",children:[c.jsxs("div",{className:"license-card-header",children:[c.jsxs("div",{children:[c.jsx("h3",{children:e.pluginName||e.label||"Licentie"}),c.jsx("p",{className:"license-subtitle",children:e.repoFullName||"-"})]}),c.jsx("span",{className:"pill",children:e.key})]}),c.jsxs("div",{className:"detail-list license-detail-list",children:[c.jsxs("div",{children:[c.jsx("span",{children:"Versie"}),c.jsx("strong",{children:e.pluginVersion||"-"})]}),c.jsxs("div",{children:[c.jsx("span",{children:"Hostname"}),c.jsx("strong",{children:n})]}),c.jsxs("div",{children:[c.jsx("span",{children:"Aangemaakt"}),c.jsx("strong",{children:om(e.createdAt)})]}),c.jsxs("div",{children:[c.jsx("span",{children:"Laatste check"}),c.jsx("strong",{children:ko(e.lastVersionCheckAt)})]})]}),e.note&&c.jsxs("p",{className:"license-note",children:["Notitie: ",e.note]}),t.length>0&&c.jsxs("div",{className:"host-list",children:[c.jsx("p",{className:"hint",children:"Hostnames"}),c.jsx("ul",{children:t.map(r=>c.jsxs("li",{children:[c.jsxs("div",{children:[c.jsx("strong",{children:r.hostname}),c.jsxs("span",{children:[r.hits||0," checks"]})]}),c.jsx("span",{children:ko(r.lastSeenAt)})]},`${r.hostname}-${r.firstSeenAt||r.lastSeenAt}`))})]}),c.jsxs("div",{className:"license-links",children:[e.repoUrl&&c.jsx("a",{className:"link",href:e.repoUrl,target:"_blank",rel:"noreferrer",children:"Repository →"}),e.pluginName&&c.jsx("span",{className:"ghost-pill",children:e.pluginName})]})]})}function sm(){var xu;const{user:e,token:t,authFetch:n,login:r,register:l,loading:i}=hf(),[o,s]=w.useState([]),[u,a]=w.useState([]),[m,h]=w.useState([]),[v,x]=w.useState(""),[g,y]=w.useState(""),[k,d]=w.useState(""),[f,p]=w.useState(""),[S,C]=w.useState(!0),[_,L]=w.useState(null),[T,A]=w.useState(!1),[O,ue]=w.useState(!1),[ut,st]=w.useState(!1),[jr,Pr]=w.useState(null),[Mt,ke]=w.useState(null),[j,z]=w.useState(null),[R,B]=w.useState(null),[J,Ft]=w.useState(!1),[Me,zn]=w.useState(""),[Fe,Zt]=w.useState(""),[qt,bt]=w.useState({username:"",name:"",email:"",password:"",isAdmin:!1}),at=!!(e&&t);w.useEffect(()=>{let N=!1;async function M(){var D;C(!0),L(null);try{const te=await fetch("/api/plugins"),ve=await te.json().catch(()=>({}));if(!te.ok)throw new Error(ve.error||"Kon plugins niet laden.");if(N)return;a(ve.items||[]);const He=(D=ve.items)==null?void 0:D[0];if(He){const Zl=He.ownerRepo||He.fullName;x(Sf=>Sf||Zl)}}catch(te){N||L(te.message||"Kon plugins niet laden.")}finally{N||C(!1)}}return M(),()=>{N=!0}},[]),w.useEffect(()=>{if(!at){h([]),y("");return}e&&!g&&y(String(e.id))},[at,g,e]),w.useEffect(()=>{if(!at||!e)return;if(!e.isAdmin){h([e]);return}let N=!1;async function M(){try{const D=await n("/api/admin/users"),te=await D.json().catch(()=>({}));if(!D.ok)throw new Error(te.error||"Kon gebruikers niet laden.");if(N)return;h(te.items||[]),!g&&(te.items||[]).length>0&&y(String(te.items[0].id))}catch(D){N||ke({variant:"error",message:D.message})}}return M(),()=>{N=!0}},[n,at,g,e]);const ct=w.useCallback(async(N=!0,M)=>{if(!t){s([]),Pr(null),N&&ke({variant:"error",message:"Log in om licenties te beheren."});return}N&&ke(null),st(!0);try{const D=M||e!=null&&e.isAdmin&&g||(e?String(e.id):"");let te="/api/licenses";e!=null&&e.isAdmin&&D&&(te+=`?userId=${D}`);const ve=await n(te),He=await ve.json().catch(()=>({}));if(ve.status===401)throw new Error("Sessie verlopen, log opnieuw in.");if(!ve.ok)throw new Error(He.error||"Kon licenties niet laden.");s(He.items||[]),Pr(He.updatedAt)}catch(D){N&&ke({variant:"error",message:D.message})}finally{st(!1)}},[n,g,t,e]);w.useEffect(()=>{ct(!1)},[ct]),w.useEffect(()=>{if(!v&&u.length>0){const N=u[0].ownerRepo||u[0].fullName;x(N)}},[u,v]);const Je=w.useMemo(()=>u.find(N=>(N.ownerRepo||N.fullName)===v)||null,[u,v]),yu=w.useMemo(()=>{const N=M=>M?new Date(M).getTime():0;return[...o].sort((M,D)=>N(D.createdAt)-N(M.createdAt))},[o]);async function vf(N){var M;if(N.preventDefault(),ke(null),!at){ke({variant:"error",message:"Log in om een licentie aan te maken."});return}if(!Je){ke({variant:"error",message:"Selecteer een plugin."});return}A(!0);try{const te={...{label:k.trim()||((M=Je.manifest)==null?void 0:M.plugin_name)||Je.name||Je.fullName,note:f.trim()||void 0,repo:{repo:Je.ownerRepo||Je.fullName,provider:Je.provider||"github",baseUrl:Je.baseUrl}},userId:e!=null&&e.isAdmin?Number(g||e.id):void 0},ve=await n("/api/licenses",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(te)}),He=await ve.json().catch(()=>({}));if(ve.status===401)throw new Error("Sessie verlopen, log opnieuw in.");if(!ve.ok)throw new Error(He.error||"Licentie aanmaken mislukt.");s(Zl=>[He,...Zl]),ke({variant:"success",message:"Licentie aangemaakt."}),d(""),p("")}catch(D){ke({variant:"error",message:D.message})}finally{A(!1)}}async function gf(N){N.preventDefault(),z(null),ue(!0);try{const M=await n("/api/admin/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(qt)}),D=await M.json().catch(()=>({}));if(!M.ok)throw new Error(D.error||"Gebruiker aanmaken mislukt.");z({variant:"success",message:"Gebruiker aangemaakt."}),bt({username:"",name:"",email:"",password:"",isAdmin:!1}),h(te=>[...te,D.user]),g||y(String(D.user.id))}catch(M){z({variant:"error",message:M.message})}finally{ue(!1)}}async function yf(N){if(N.preventDefault(),B(null),!Me.trim()||!Fe.trim()){B({ok:!1,message:"Vul zowel licentiecode als hostname in."});return}Ft(!0);try{const M=await fetch("/api/licenses/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:Me.trim(),hostname:Fe.trim()})}),D=await M.json().catch(()=>({}));if(!M.ok)throw new Error(D.error||"Controle mislukt.");B({ok:!0,data:D}),D.license&&s(te=>te.map(ve=>ve.key===D.license.key?D.license:ve))}catch(M){B({ok:!1,message:M.message})}finally{Ft(!1)}}const wf=w.useCallback(async N=>{await r(N),await ct(!1)},[r,ct]),xf=w.useCallback(async N=>{await l(N),await ct(!1)},[l,ct]),wu=S||i&&!!t;return c.jsxs("div",{className:"page",children:[c.jsxs("header",{className:"hero",children:[c.jsxs("div",{children:[c.jsx("p",{className:"eyebrow",children:"Licentiebeheer"}),c.jsx("h1",{children:"Licenties"}),c.jsx("p",{className:"subtitle",children:"Maak licenties voor iedere plugin en beheer welke hostname de licentie daadwerkelijk gebruikt."}),c.jsx("p",{className:"hint",children:"Een licentie is geldig voor één hostname. De eerste hostname die controleert wordt automatisch gekoppeld als licentiehouder."})]}),c.jsx("button",{className:"ghost",type:"button",onClick:()=>ct(),disabled:ut||!at,children:ut?"Vernieuwen…":"Vernieuw lijst"})]}),c.jsxs("div",{className:"license-meta-bar",children:[c.jsxs("span",{children:["Actieve licenties: ",o.length]}),c.jsxs("span",{children:["Laatste update: ",ko(jr)]}),e&&c.jsxs("span",{children:["Ingelogd als: ",e.email]}),(e==null?void 0:e.isAdmin)&&m.length>0&&c.jsxs("label",{className:"inline-field",children:[c.jsx("span",{children:"Licenties gebruiker"}),c.jsx("select",{value:g,onChange:N=>{y(N.target.value),ct(!0,N.target.value)},children:m.map(N=>c.jsxs("option",{value:N.id,children:[N.name," (",N.email,")"]},N.id))})]})]}),wu&&c.jsx("div",{className:"state",children:"Bezig met laden…"}),_&&c.jsx("div",{className:"state error",children:_}),!wu&&!_&&c.jsxs(c.Fragment,{children:[c.jsxs("section",{className:"license-forms",children:[at?c.jsxs("article",{className:"card",children:[c.jsx("h2",{children:"Nieuwe licentie"}),c.jsx("p",{className:"hint",children:"Kies een plugin en genereer direct een licentiesleutel."}),c.jsxs("form",{className:"form-grid",onSubmit:vf,children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Plugin"}),c.jsx("select",{value:v,onChange:N=>x(N.target.value),disabled:u.length===0,children:u.map(N=>{var D;const M=N.ownerRepo||N.fullName;return c.jsxs("option",{value:M,children:[((D=N.manifest)==null?void 0:D.plugin_name)||N.name," (",N.fullName,")"]},M)})})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Label (optioneel)"}),c.jsx("input",{value:k,onChange:N=>d(N.target.value),placeholder:"Naam of klant"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Notitie"}),c.jsx("textarea",{value:f,onChange:N=>p(N.target.value),placeholder:"Bijv. contactpersoon of extra info",rows:3})]}),(e==null?void 0:e.isAdmin)&&c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Licentie voor gebruiker"}),c.jsx("select",{value:g,onChange:N=>y(N.target.value),children:m.map(N=>c.jsxs("option",{value:N.id,children:[N.name," (",N.email,")"]},N.id))})]}),c.jsx("button",{className:"cta",type:"submit",disabled:T||!Je,children:T?"Aanmaken…":"Licentie aanmaken"})]}),Mt&&c.jsx("div",{className:`state inline ${Mt.variant==="error"?"error":"success"}`,children:Mt.message})]}):c.jsx(am,{onLogin:wf,onRegister:xf}),c.jsxs("article",{className:"card",children:[c.jsx("h2",{children:"Test of valideer"}),c.jsx("p",{className:"hint",children:"Gebruik dit formulier zoals de plugin dat zou doen om de huidige versie en hostname te controleren."}),c.jsxs("form",{className:"form-grid",onSubmit:yf,children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Licentiecode"}),c.jsx("input",{value:Me,onChange:N=>zn(N.target.value),placeholder:"SITI-XXXX-XXXX"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Hostname"}),c.jsx("input",{value:Fe,onChange:N=>Zt(N.target.value),placeholder:"voorbeeld.nl"})]}),c.jsx("button",{className:"ghost",type:"submit",disabled:J,children:J?"Controleren…":"Controleer licentie"})]}),R&&R.ok&&((xu=R.data)==null?void 0:xu.license)&&c.jsxs("div",{className:"state success inline",children:[c.jsx("strong",{children:"Licentie geldig"}),c.jsxs("p",{children:[R.data.license.pluginName||"Plugin"," — versie ",R.data.license.pluginVersion||"-"]}),c.jsxs("p",{children:["Gekoppeld aan: ",c.jsx("strong",{children:R.data.license.primaryHostname||"Nog niet gekoppeld"})]})]}),R&&!R.ok&&c.jsx("div",{className:"state error inline",children:R.message})]})]}),(e==null?void 0:e.isAdmin)&&c.jsx("section",{className:"license-forms",children:c.jsxs("article",{className:"card",children:[c.jsx("h2",{children:"Gebruiker toevoegen"}),c.jsx("p",{className:"hint",children:"Admins kunnen extra gebruikers aanmaken en direct licenties toewijzen."}),c.jsxs("form",{className:"form-grid",onSubmit:gf,children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Gebruikersnaam"}),c.jsx("input",{value:qt.username,onChange:N=>bt(M=>({...M,username:N.target.value})),placeholder:"gebruikersnaam"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Naam"}),c.jsx("input",{value:qt.name,onChange:N=>bt(M=>({...M,name:N.target.value})),placeholder:"Volledige naam"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"E-mail"}),c.jsx("input",{type:"email",value:qt.email,onChange:N=>bt(M=>({...M,email:N.target.value})),placeholder:"naam@bedrijf.nl"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Wachtwoord"}),c.jsx("input",{type:"password",value:qt.password,onChange:N=>bt(M=>({...M,password:N.target.value})),placeholder:"Minimaal 8 karakters"})]}),c.jsxs("label",{className:"checkbox-field",children:[c.jsx("input",{type:"checkbox",checked:qt.isAdmin,onChange:N=>bt(M=>({...M,isAdmin:N.target.checked}))}),c.jsx("span",{children:"Maak deze gebruiker admin"})]}),c.jsx("button",{className:"cta",type:"submit",disabled:O,children:O?"Bezig…":"Gebruiker aanmaken"})]}),j&&c.jsx("div",{className:`state inline ${j.variant==="error"?"error":"success"}`,children:j.message})]})}),at?c.jsx("section",{className:"license-grid",children:yu.length===0?c.jsx("div",{className:"state",children:"Nog geen licenties aangemaakt."}):yu.map(N=>c.jsx(um,{license:N},N.id||N.key))}):c.jsx("div",{className:"state",children:"Log in of registreer om licenties te bekijken en te beheren."})]})]})}function am({onLogin:e,onRegister:t}){const[n,r]=w.useState("login"),[l,i]=w.useState({identifier:"",password:""}),[o,s]=w.useState({username:"",name:"",email:"",password:""}),[u,a]=w.useState(null),[m,h]=w.useState(!1);async function v(x){x.preventDefault(),a(null),h(!0);try{n==="login"?(await e(l),a({variant:"success",message:"Succesvol ingelogd."})):(await t(o),a({variant:"success",message:"Account aangemaakt en ingelogd."}))}catch(g){a({variant:"error",message:g.message||"Actie mislukt."})}finally{h(!1)}}return c.jsxs("article",{className:"card auth-card",children:[c.jsxs("div",{className:"auth-tabs",children:[c.jsx("button",{type:"button",className:n==="login"?"auth-tab active":"auth-tab",onClick:()=>r("login"),disabled:m,children:"Inloggen"}),c.jsx("button",{type:"button",className:n==="register"?"auth-tab active":"auth-tab",onClick:()=>r("register"),disabled:m,children:"Registreren"})]}),c.jsxs("form",{className:"form-grid",onSubmit:v,children:[n==="login"?c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Gebruikersnaam of e-mail"}),c.jsx("input",{value:l.identifier,onChange:x=>i(g=>({...g,identifier:x.target.value})),placeholder:"jouwnaam of mail"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Wachtwoord"}),c.jsx("input",{type:"password",value:l.password,onChange:x=>i(g=>({...g,password:x.target.value})),placeholder:"••••••••"})]})]}):c.jsxs(c.Fragment,{children:[c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Gebruikersnaam"}),c.jsx("input",{value:o.username,onChange:x=>s(g=>({...g,username:x.target.value})),placeholder:"gebruikersnaam"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Naam"}),c.jsx("input",{value:o.name,onChange:x=>s(g=>({...g,name:x.target.value})),placeholder:"Volledige naam"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"E-mailadres"}),c.jsx("input",{type:"email",value:o.email,onChange:x=>s(g=>({...g,email:x.target.value})),placeholder:"naam@bedrijf.nl"})]}),c.jsxs("label",{className:"field",children:[c.jsx("span",{children:"Wachtwoord"}),c.jsx("input",{type:"password",value:o.password,onChange:x=>s(g=>({...g,password:x.target.value})),placeholder:"Minimaal 8 karakters"})]})]}),c.jsx("button",{className:"cta",type:"submit",disabled:m,children:m?"Verwerken…":n==="login"?"Inloggen":"Registreren"})]}),u&&c.jsx("div",{className:`state inline ${u.variant==="error"?"error":"success"}`,children:u.message})]})}function cm(){return c.jsxs("div",{className:"app",children:[c.jsx(rm,{}),c.jsxs($h,{children:[c.jsx(ll,{path:"/",element:c.jsx(lm,{})}),c.jsx(ll,{path:"/plugin/:owner/:repo",element:c.jsx(im,{})}),c.jsx(ll,{path:"/licenses",element:c.jsx(sm,{})})]})]})}bc(document.getElementById("root")).render(c.jsx(Js.StrictMode,{children:c.jsx(Jh,{children:c.jsx(nm,{children:c.jsx(cm,{})})})})); diff --git a/dist/index.html b/dist/index.html index 351050f..11d9a69 100644 --- a/dist/index.html +++ b/dist/index.html @@ -5,7 +5,7 @@ Siti Plugin Repo - + diff --git a/server/index.js b/server/index.js index dcdaa44..8fcc42c 100644 --- a/server/index.js +++ b/server/index.js @@ -383,7 +383,11 @@ app.post("/api/licenses/verify", async (req, res) => { return res.status(404).json({ valid: false, error: "Licentie niet gevonden." }); } - const result = await touchLicenseHostname(license, hostname); + const rawVersion = req.body?.currentVersion ?? req.body?.pluginVersion ?? null; + const pluginVersion = + rawVersion && String(rawVersion).trim().length > 0 ? String(rawVersion).trim().slice(0, 64) : null; + + const result = await touchLicenseHostname(license, hostname, { pluginVersion }); if (!result.ok) { const status = result.conflict ? 403 : 400; return res.status(status).json({ valid: false, error: result.error, boundHostname: license.primary_hostname }); diff --git a/server/lib/licenseService.js b/server/lib/licenseService.js index 5cdfc72..0a5f631 100644 --- a/server/lib/licenseService.js +++ b/server/lib/licenseService.js @@ -113,7 +113,8 @@ export async function buildLicensePayload(row) { repoFullName: row.repo_name, repoUrl: null, pluginName: row.label, - pluginVersion: null, + pluginVersion: row.last_used_version || null, + lastUsedVersion: row.last_used_version, repo: null }; } @@ -134,7 +135,8 @@ export async function buildLicensePayload(row) { repoFullName: info.fullName, repoUrl: info.repoUrl, pluginName: manifest?.plugin_name || info.name || row.label, - pluginVersion: manifest?.version || null, + pluginVersion: manifest?.version || row.last_used_version || null, + lastUsedVersion: row.last_used_version, repo: repoEntry, hostnames }; @@ -152,25 +154,32 @@ export async function buildLicensePayload(row) { repoFullName: row.repo_name, repoUrl: repoEntry?.baseUrl ? `${repoEntry.baseUrl.replace(/\/$/, "")}/${row.repo_name}` : null, pluginName: row.label, - pluginVersion: null, + pluginVersion: row.last_used_version || null, + lastUsedVersion: row.last_used_version, repo: repoEntry, hostnames }; } } -export async function touchLicenseHostname(license, hostname) { +export async function touchLicenseHostname(license, hostname, options = {}) { const normalizedHost = normalizeHostname(hostname); if (!normalizedHost) { return { ok: false, error: "Ongeldige hostname." }; } const trimmed = hostname.trim(); + const rawVersion = + typeof options?.pluginVersion === "string" && options.pluginVersion.trim().length > 0 + ? options.pluginVersion.trim() + : null; + const pluginVersion = rawVersion ? rawVersion.slice(0, 64) : null; + + const updateFields = []; + const params = []; + if (!license.primary_hostname_normalized) { - await db.query( - `UPDATE licenses SET primary_hostname = ?, primary_hostname_normalized = ?, last_version_check_at = NOW(), updated_at = NOW() - WHERE id = ?`, - [trimmed, normalizedHost, license.id] - ); + updateFields.push("primary_hostname = ?", "primary_hostname_normalized = ?"); + params.push(trimmed, normalizedHost); } else if (license.primary_hostname_normalized !== normalizedHost) { return { ok: false, @@ -178,9 +187,20 @@ export async function touchLicenseHostname(license, hostname) { error: `Licentie hoort bij ${license.primary_hostname || "een andere site"}.` }; } else { - await db.query(`UPDATE licenses SET last_version_check_at = NOW(), updated_at = NOW() WHERE id = ?`, [license.id]); + // No hostname change, but still keep the hostname casing in sync. + updateFields.push("primary_hostname = ?"); + params.push(trimmed); } + updateFields.push("last_version_check_at = NOW()", "updated_at = NOW()"); + + if (pluginVersion) { + updateFields.push("last_used_version = ?"); + params.push(pluginVersion); + } + + await db.query(`UPDATE licenses SET ${updateFields.join(", ")} WHERE id = ?`, [...params, license.id]); + await db.query( `INSERT INTO license_hostnames (license_id, hostname, normalized, first_seen_at, last_seen_at, hits) VALUES (?, ?, ?, NOW(), NOW(), 1) diff --git a/server/lib/schema.js b/server/lib/schema.js index aecca64..82ad3de 100644 --- a/server/lib/schema.js +++ b/server/lib/schema.js @@ -19,6 +19,13 @@ async function createUsersTable() { } } +async function ensureColumn(table, column, definition) { + const [columns] = await db.query(`SHOW COLUMNS FROM ${table} LIKE ?`, [column]); + if (columns.length === 0) { + await db.query(`ALTER TABLE ${table} ADD COLUMN ${definition}`); + } +} + async function createLicensesTable() { await db.query(` CREATE TABLE IF NOT EXISTS licenses ( @@ -33,11 +40,18 @@ async function createLicensesTable() { created_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, last_version_check_at DATETIME NULL, + last_used_version VARCHAR(64) NULL, primary_hostname VARCHAR(255) NULL, primary_hostname_normalized VARCHAR(255) NULL, FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; `); + + await ensureColumn( + "licenses", + "last_used_version", + "last_used_version VARCHAR(64) NULL AFTER last_version_check_at" + ); } async function createLicenseHostnamesTable() { diff --git a/src/components/LicenseCard.jsx b/src/components/LicenseCard.jsx index e21dfe5..1007c61 100644 --- a/src/components/LicenseCard.jsx +++ b/src/components/LicenseCard.jsx @@ -15,14 +15,18 @@ export default function LicenseCard({ license }) {
-
- Versie - {license.pluginVersion || "-"} -
Hostname {primaryHostname}
+
+ Huidige versie + {license.lastUsedVersion || "-"} +
+
+ Laatste release + {license.pluginVersion || "-"} +
Aangemaakt {formatDate(license.createdAt)} diff --git a/src/pages/LicenseManager.jsx b/src/pages/LicenseManager.jsx index b46f4dd..538e444 100644 --- a/src/pages/LicenseManager.jsx +++ b/src/pages/LicenseManager.jsx @@ -24,6 +24,7 @@ export default function LicenseManager() { const [verifying, setVerifying] = useState(false); const [verifyKey, setVerifyKey] = useState(""); const [verifyHostname, setVerifyHostname] = useState(""); + const [verifyVersion, setVerifyVersion] = useState(""); const [newUserForm, setNewUserForm] = useState({ username: "", name: "", @@ -268,7 +269,8 @@ export default function LicenseManager() { headers: { "Content-Type": "application/json" }, body: JSON.stringify({ key: verifyKey.trim(), - hostname: verifyHostname.trim() + hostname: verifyHostname.trim(), + currentVersion: verifyVersion.trim() || undefined }) }); const data = await response.json().catch(() => ({})); @@ -440,6 +442,14 @@ export default function LicenseManager() { placeholder="voorbeeld.nl" /> + @@ -447,11 +457,22 @@ export default function LicenseManager() { {verifyStatus && verifyStatus.ok && verifyStatus.data?.license && (
Licentie geldig +

{verifyStatus.data.license.pluginName || "Plugin"}

- {verifyStatus.data.license.pluginName || "Plugin"} — versie {verifyStatus.data.license.pluginVersion || "-"} + Huidige versie:{" "} + + {verifyStatus.data.license.lastUsedVersion || + verifyStatus.data.license.pluginVersion || + "-"} +

- Gekoppeld aan: {verifyStatus.data.license.primaryHostname || "Nog niet gekoppeld"} + Laatste release:{" "} + {verifyStatus.data.license.pluginVersion || "-"} +

+

+ Gekoppeld aan:{" "} + {verifyStatus.data.license.primaryHostname || "Nog niet gekoppeld"}

)}