From cb9eccaf55ee260c253b5dc51ef6c94d487359c6 Mon Sep 17 00:00:00 2001 From: thewilley <89783791+TheWilley@users.noreply.github.com> Date: Sun, 4 Feb 2024 23:11:30 +0100 Subject: [PATCH] Updates --- .../{index-9f1d9a42.js => index-80a16350.js} | 20 +++++++++---------- index.html | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) rename assets/{index-9f1d9a42.js => index-80a16350.js} (92%) diff --git a/assets/index-9f1d9a42.js b/assets/index-80a16350.js similarity index 92% rename from assets/index-9f1d9a42.js rename to assets/index-80a16350.js index b6c0e1f..fc180a1 100644 --- a/assets/index-9f1d9a42.js +++ b/assets/index-80a16350.js @@ -6,7 +6,7 @@ var Rp=Object.defineProperty;var Pp=(e,t,n)=>t in e?Rp(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var pl=Symbol.for("react.element"),Np=Symbol.for("react.portal"),Lp=Symbol.for("react.fragment"),jp=Symbol.for("react.strict_mode"),Fp=Symbol.for("react.profiler"),Dp=Symbol.for("react.provider"),Mp=Symbol.for("react.context"),Op=Symbol.for("react.forward_ref"),zp=Symbol.for("react.suspense"),Ip=Symbol.for("react.memo"),Ap=Symbol.for("react.lazy"),Gu=Symbol.iterator;function Up(e){return e===null||typeof e!="object"?null:(e=Gu&&e[Gu]||e["@@iterator"],typeof e=="function"?e:null)}var Lc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},jc=Object.assign,Fc={};function fr(e,t,n){this.props=e,this.context=t,this.refs=Fc,this.updater=n||Lc}fr.prototype.isReactComponent={};fr.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")};fr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dc(){}Dc.prototype=fr.prototype;function $a(e,t,n){this.props=e,this.context=t,this.refs=Fc,this.updater=n||Lc}var Ba=$a.prototype=new Dc;Ba.constructor=$a;jc(Ba,fr.prototype);Ba.isPureReactComponent=!0;var Xu=Array.isArray,Mc=Object.prototype.hasOwnProperty,Ha={current:null},Oc={key:!0,ref:!0,__self:!0,__source:!0};function zc(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Mc.call(t,r)&&!Oc.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1t in e?Rp(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */(function(e){function t(F,U){var H=F.length;F.push(U);e:for(;0>>1,ie=F[q];if(0>>1;ql(dt,H))Iel(At,dt)?(F[q]=At,F[Ie]=H,q=Ie):(F[q]=dt,F[Pe]=H,q=Pe);else if(Iel(At,H))F[q]=At,F[Ie]=H,q=Ie;else break e}}return U}function l(F,U){var H=F.sortIndex-U.sortIndex;return H!==0?H:F.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],s=[],c=1,m=null,p=3,g=!1,x=!1,S=!1,E=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 v(F){for(var U=n(s);U!==null;){if(U.callback===null)r(s);else if(U.startTime<=F)r(s),U.sortIndex=U.expirationTime,t(u,U);else break;U=n(s)}}function C(F){if(S=!1,v(F),!x)if(n(u)!==null)x=!0,me(N);else{var U=n(s);U!==null&&X(C,U.startTime-F)}}function N(F,U){x=!1,S&&(S=!1,d(L),L=-1),g=!0;var H=p;try{for(v(U),m=n(u);m!==null&&(!(m.expirationTime>U)||F&&!V());){var q=m.callback;if(typeof q=="function"){m.callback=null,p=m.priorityLevel;var ie=q(m.expirationTime<=U);U=e.unstable_now(),typeof ie=="function"?m.callback=ie:m===n(u)&&r(u),v(U)}else r(u);m=n(u)}if(m!==null)var xt=!0;else{var Pe=n(s);Pe!==null&&X(C,Pe.startTime-U),xt=!1}return xt}finally{m=null,p=H,g=!1}}var y=!1,P=null,L=-1,M=5,I=-1;function V(){return!(e.unstable_now()-IF||125q?(F.sortIndex=H,t(s,F),n(u)===null&&F===n(s)&&(S?(d(L),L=-1):S=!0,X(C,H-q))):(F.sortIndex=ie,t(u,F),x||g||(x=!0,me(N))),F},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(F){var U=p;return function(){var H=p;p=U;try{return F.apply(this,arguments)}finally{p=H}}}})($c);Uc.exports=$c;var Zp=Uc.exports;/** + */(function(e){function t(F,U){var H=F.length;F.push(U);e:for(;0>>1,ie=F[q];if(0>>1;ql(dt,H))Iel(At,dt)?(F[q]=At,F[Ie]=H,q=Ie):(F[q]=dt,F[Pe]=H,q=Pe);else if(Iel(At,H))F[q]=At,F[Ie]=H,q=Ie;else break e}}return U}function l(F,U){var H=F.sortIndex-U.sortIndex;return H!==0?H:F.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],s=[],c=1,m=null,p=3,g=!1,x=!1,S=!1,E=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 v(F){for(var U=n(s);U!==null;){if(U.callback===null)r(s);else if(U.startTime<=F)r(s),U.sortIndex=U.expirationTime,t(u,U);else break;U=n(s)}}function C(F){if(S=!1,v(F),!x)if(n(u)!==null)x=!0,me(N);else{var U=n(s);U!==null&&X(C,U.startTime-F)}}function N(F,U){x=!1,S&&(S=!1,d(L),L=-1),g=!0;var H=p;try{for(v(U),m=n(u);m!==null&&(!(m.expirationTime>U)||F&&!V());){var q=m.callback;if(typeof q=="function"){m.callback=null,p=m.priorityLevel;var ie=q(m.expirationTime<=U);U=e.unstable_now(),typeof ie=="function"?m.callback=ie:m===n(u)&&r(u),v(U)}else r(u);m=n(u)}if(m!==null)var xt=!0;else{var Pe=n(s);Pe!==null&&X(C,Pe.startTime-U),xt=!1}return xt}finally{m=null,p=H,g=!1}}var y=!1,P=null,L=-1,O=5,I=-1;function V(){return!(e.unstable_now()-IF||125q?(F.sortIndex=H,t(s,F),n(u)===null&&F===n(s)&&(S?(d(L),L=-1):S=!0,X(C,H-q))):(F.sortIndex=ie,t(u,F),x||g||(x=!0,me(N))),F},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(F){var U=p;return function(){var H=p;p=U;try{return F.apply(this,arguments)}finally{p=H}}}})($c);Uc.exports=$c;var Zp=Uc.exports;/** * @license React * react-dom.production.min.js * @@ -34,10 +34,10 @@ var Rp=Object.defineProperty;var Pp=(e,t,n)=>t in e?Rp(e,t,{enumerable:!0,config `+ii+e}var ai=!1;function ui(e,t){if(!e||ai)return"";ai=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(s){var r=s}Reflect.construct(e,[],t)}else{try{t.call()}catch(s){r=s}e.call(t.prototype)}else{try{throw Error()}catch(s){r=s}e()}}catch(s){if(s&&r&&typeof s.stack=="string"){for(var l=s.stack.split(` `),o=r.stack.split(` `),i=l.length-1,a=o.length-1;1<=i&&0<=a&&l[i]!==o[a];)a--;for(;1<=i&&0<=a;i--,a--)if(l[i]!==o[a]){if(i!==1||a!==1)do if(i--,a--,0>a||l[i]!==o[a]){var u=` -`+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{ai=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function nh(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ui(e.type,!1),e;case 11:return e=ui(e.type.render,!1),e;case 1:return e=ui(e.type,!0),e;default:return""}}function Hi(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 $n:return"Fragment";case Un:return"Portal";case Ui:return"Profiler";case Ya:return"StrictMode";case $i:return"Suspense";case Bi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wc:return(e.displayName||"Context")+".Consumer";case Vc:return(e._context.displayName||"Context")+".Provider";case Ga:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xa:return t=e.displayName||null,t!==null?t:Hi(e.type)||"Memo";case Wt:t=e._payload,e=e._init;try{return Hi(e(t))}catch{}}return null}function rh(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 Hi(t);case 8:return t===Ya?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lh(e){var t=Kc(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rl(e){e._valueTracker||(e._valueTracker=lh(e))}function Yc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function oo(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 Vi(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function es(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=on(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 Gc(e,t){t=t.checked,t!=null&&Ka(e,"checked",t,!1)}function Wi(e,t){Gc(e,t);var n=on(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")?Qi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Qi(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ts(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 Qi(e,t,n){(t!=="number"||oo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dr=Array.isArray;function bn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Pl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ir={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},oh=["Webkit","ms","Moz","O"];Object.keys(Ir).forEach(function(e){oh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ir[t]=Ir[e]})});function qc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ir.hasOwnProperty(e)&&Ir[e]?(""+t).trim():t+"px"}function bc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=qc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ih=he({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 Gi(e,t){if(t){if(ih[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Xi(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 Ji=null;function Ja(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zi=null,er=null,tr=null;function ls(e){if(e=vl(e)){if(typeof Zi!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Ao(t),Zi(e.stateNode,e.type,t))}}function ed(e){er?tr?tr.push(e):tr=[e]:er=e}function td(){if(er){var e=er,t=tr;if(tr=er=null,ls(e),t)for(e=0;e>>=0,e===0?32:31-(gh(e)/yh|0)|0}var Nl=64,Ll=4194304;function Mr(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 so(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Mr(a):(o&=i,o!==0&&(r=Mr(o)))}else i=n&~l,i!==0?r=Mr(i):o!==0&&(r=Mr(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&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 hl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gt(t),e[t]=n}function Eh(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=Ur),ps=String.fromCharCode(32),hs=!1;function Sd(e,t){switch(e){case"keyup":return Jh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bn=!1;function qh(e,t){switch(e){case"compositionend":return Ed(t);case"keypress":return t.which!==32?null:(hs=!0,ps);case"textInput":return e=t.data,e===ps&&hs?null:e;default:return null}}function bh(e,t){if(Bn)return e==="compositionend"||!lu&&Sd(e,t)?(e=wd(),Yl=tu=Gt=null,Bn=!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=ys(n)}}function Td(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Td(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rd(){for(var e=window,t=oo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oo(e.document)}return t}function ou(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 um(e){var t=Rd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Td(n.ownerDocument.documentElement,n)){if(r!==null&&ou(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,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ws(n,o);var i=ws(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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,Hn=null,ra=null,Br=null,la=!1;function xs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;la||Hn==null||Hn!==oo(r)||(r=Hn,"selectionStart"in r&&ou(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}),Br&&nl(Br,r)||(Br=r,r=po(ra,"onSelect"),0Qn||(e.current=ca[Qn],ca[Qn]=null,Qn--)}function oe(e,t){Qn++,ca[Qn]=e.current,e.current=t}var an={},ze=cn(an),Ke=cn(!1),Rn=an;function ir(e,t){var n=e.type.contextTypes;if(!n)return an;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ye(e){return e=e.childContextTypes,e!=null}function mo(){ue(Ke),ue(ze)}function Rs(e,t,n){if(ze.current!==an)throw Error(j(168));oe(ze,t),oe(Ke,n)}function zd(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(j(108,rh(e)||"Unknown",l));return he({},n,r)}function vo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,Rn=ze.current,oe(ze,e),oe(Ke,Ke.current),!0}function Ps(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=zd(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ue(Ke),ue(ze),oe(ze,e)):ue(Ke),oe(Ke,n)}var Nt=null,Uo=!1,Ei=!1;function Id(e){Nt===null?Nt=[e]:Nt.push(e)}function xm(e){Uo=!0,Id(e)}function dn(){if(!Ei&&Nt!==null){Ei=!0;var e=0,t=ee;try{var n=Nt;for(ee=1;e>=i,l-=i,Lt=1<<32-gt(t)+l|n<L?(M=P,P=null):M=P.sibling;var I=p(d,P,v[L],C);if(I===null){P===null&&(P=M);break}e&&P&&I.alternate===null&&t(d,P),f=o(I,f,L),y===null?N=I:y.sibling=I,y=I,P=M}if(L===v.length)return n(d,P),de&&mn(d,L),N;if(P===null){for(;LL?(M=P,P=null):M=P.sibling;var V=p(d,P,I.value,C);if(V===null){P===null&&(P=M);break}e&&P&&V.alternate===null&&t(d,P),f=o(V,f,L),y===null?N=V:y.sibling=V,y=V,P=M}if(I.done)return n(d,P),de&&mn(d,L),N;if(P===null){for(;!I.done;L++,I=v.next())I=m(d,I.value,C),I!==null&&(f=o(I,f,L),y===null?N=I:y.sibling=I,y=I);return de&&mn(d,L),N}for(P=r(d,P);!I.done;L++,I=v.next())I=g(P,d,L,I.value,C),I!==null&&(e&&I.alternate!==null&&P.delete(I.key===null?L:I.key),f=o(I,f,L),y===null?N=I:y.sibling=I,y=I);return e&&P.forEach(function(Z){return t(d,Z)}),de&&mn(d,L),N}function E(d,f,v,C){if(typeof v=="object"&&v!==null&&v.type===$n&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Tl:e:{for(var N=v.key,y=f;y!==null;){if(y.key===N){if(N=v.type,N===$n){if(y.tag===7){n(d,y.sibling),f=l(y,v.props.children),f.return=d,d=f;break e}}else if(y.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Wt&&Os(N)===y.type){n(d,y.sibling),f=l(y,v.props),f.ref=kr(d,y,v),f.return=d,d=f;break e}n(d,y);break}else t(d,y);y=y.sibling}v.type===$n?(f=_n(v.props.children,d.mode,C,v.key),f.return=d,d=f):(C=to(v.type,v.key,v.props,null,d.mode,C),C.ref=kr(d,f,v),C.return=d,d=C)}return i(d);case Un:e:{for(y=v.key;f!==null;){if(f.key===y)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(d,f.sibling),f=l(f,v.children||[]),f.return=d,d=f;break e}else{n(d,f);break}else t(d,f);f=f.sibling}f=Li(v,d.mode,C),f.return=d,d=f}return i(d);case Wt:return y=v._init,E(d,f,y(v._payload),C)}if(Dr(v))return x(d,f,v,C);if(yr(v))return S(d,f,v,C);Il(d,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,f!==null&&f.tag===6?(n(d,f.sibling),f=l(f,v),f.return=d,d=f):(n(d,f),f=Ni(v,d.mode,C),f.return=d,d=f),i(d)):n(d,f)}return E}var ur=Qd(!0),Kd=Qd(!1),gl={},Tt=cn(gl),il=cn(gl),al=cn(gl);function Sn(e){if(e===gl)throw Error(j(174));return e}function hu(e,t){switch(oe(al,t),oe(il,e),oe(Tt,gl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yi(t,e)}ue(Tt),oe(Tt,t)}function sr(){ue(Tt),ue(il),ue(al)}function Yd(e){Sn(al.current);var t=Sn(Tt.current),n=Yi(t,e.type);t!==n&&(oe(il,e),oe(Tt,n))}function mu(e){il.current===e&&(ue(Tt),ue(il))}var fe=cn(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ki=[];function vu(){for(var e=0;en?n:4,e(!0);var r=Ci.transition;Ci.transition={};try{e(!1),t()}finally{ee=n,Ci.transition=r}}function cf(){return ct().memoizedState}function Cm(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},df(e))ff(t,n);else if(n=Bd(e,t,n,r),n!==null){var l=Ue();yt(n,e,r,l),pf(n,t,r)}}function _m(e,t,n){var r=rn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(df(e))ff(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,wt(a,i)){var u=t.interleaved;u===null?(l.next=l,fu(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Bd(e,t,l,r),n!==null&&(l=Ue(),yt(n,e,r,l),pf(n,t,r))}}function df(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function ff(e,t){Hr=ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qa(e,n)}}var Co={readContext:st,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},Tm={readContext:st,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Is,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4194308,4,lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zl(4,2,e,t)},useMemo:function(e,t){var n=kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kt();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=Cm.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:zs,useDebugValue:Su,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=zs(!1),t=e[0];return e=km.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,l=kt();if(de){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Re===null)throw Error(j(349));Nn&30||Jd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Is(qd.bind(null,r,o,e),[e]),r.flags|=2048,cl(9,Zd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kt(),t=Re.identifierPrefix;if(de){var n=jt,r=Lt;n=(r&~(1<<32-gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ul++,0")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{ai=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Fr(e):""}function nh(e){switch(e.tag){case 5:return Fr(e.type);case 16:return Fr("Lazy");case 13:return Fr("Suspense");case 19:return Fr("SuspenseList");case 0:case 2:case 15:return e=ui(e.type,!1),e;case 11:return e=ui(e.type.render,!1),e;case 1:return e=ui(e.type,!0),e;default:return""}}function Hi(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 $n:return"Fragment";case Un:return"Portal";case Ui:return"Profiler";case Ya:return"StrictMode";case $i:return"Suspense";case Bi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Wc:return(e.displayName||"Context")+".Consumer";case Vc:return(e._context.displayName||"Context")+".Provider";case Ga:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Xa:return t=e.displayName||null,t!==null?t:Hi(e.type)||"Memo";case Wt:t=e._payload,e=e._init;try{return Hi(e(t))}catch{}}return null}function rh(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 Hi(t);case 8:return t===Ya?"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 on(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function lh(e){var t=Kc(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,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rl(e){e._valueTracker||(e._valueTracker=lh(e))}function Yc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Kc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function oo(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 Vi(e,t){var n=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function es(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=on(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 Gc(e,t){t=t.checked,t!=null&&Ka(e,"checked",t,!1)}function Wi(e,t){Gc(e,t);var n=on(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")?Qi(e,t.type,n):t.hasOwnProperty("defaultValue")&&Qi(e,t.type,on(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ts(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 Qi(e,t,n){(t!=="number"||oo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Dr=Array.isArray;function bn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Pl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Jr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ir={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},oh=["Webkit","ms","Moz","O"];Object.keys(Ir).forEach(function(e){oh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ir[t]=Ir[e]})});function qc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ir.hasOwnProperty(e)&&Ir[e]?(""+t).trim():t+"px"}function bc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=qc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var ih=he({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 Gi(e,t){if(t){if(ih[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Xi(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 Ji=null;function Ja(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zi=null,er=null,tr=null;function ls(e){if(e=vl(e)){if(typeof Zi!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Ao(t),Zi(e.stateNode,e.type,t))}}function ed(e){er?tr?tr.push(e):tr=[e]:er=e}function td(){if(er){var e=er,t=tr;if(tr=er=null,ls(e),t)for(e=0;e>>=0,e===0?32:31-(gh(e)/yh|0)|0}var Nl=64,Ll=4194304;function Or(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 so(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Or(a):(o&=i,o!==0&&(r=Or(o)))}else i=n&~l,i!==0?r=Or(i):o!==0&&(r=Or(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&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 hl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gt(t),e[t]=n}function Eh(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=Ur),ps=String.fromCharCode(32),hs=!1;function Sd(e,t){switch(e){case"keyup":return Jh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ed(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bn=!1;function qh(e,t){switch(e){case"compositionend":return Ed(t);case"keypress":return t.which!==32?null:(hs=!0,ps);case"textInput":return e=t.data,e===ps&&hs?null:e;default:return null}}function bh(e,t){if(Bn)return e==="compositionend"||!lu&&Sd(e,t)?(e=wd(),Yl=tu=Gt=null,Bn=!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=ys(n)}}function Td(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Td(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Rd(){for(var e=window,t=oo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=oo(e.document)}return t}function ou(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 um(e){var t=Rd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Td(n.ownerDocument.documentElement,n)){if(r!==null&&ou(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,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ws(n,o);var i=ws(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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,Hn=null,ra=null,Br=null,la=!1;function xs(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;la||Hn==null||Hn!==oo(r)||(r=Hn,"selectionStart"in r&&ou(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}),Br&&nl(Br,r)||(Br=r,r=po(ra,"onSelect"),0Qn||(e.current=ca[Qn],ca[Qn]=null,Qn--)}function oe(e,t){Qn++,ca[Qn]=e.current,e.current=t}var an={},ze=cn(an),Ke=cn(!1),Rn=an;function ir(e,t){var n=e.type.contextTypes;if(!n)return an;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ye(e){return e=e.childContextTypes,e!=null}function mo(){ue(Ke),ue(ze)}function Rs(e,t,n){if(ze.current!==an)throw Error(j(168));oe(ze,t),oe(Ke,n)}function zd(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(j(108,rh(e)||"Unknown",l));return he({},n,r)}function vo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,Rn=ze.current,oe(ze,e),oe(Ke,Ke.current),!0}function Ps(e,t,n){var r=e.stateNode;if(!r)throw Error(j(169));n?(e=zd(e,t,Rn),r.__reactInternalMemoizedMergedChildContext=e,ue(Ke),ue(ze),oe(ze,e)):ue(Ke),oe(Ke,n)}var Nt=null,Uo=!1,Ei=!1;function Id(e){Nt===null?Nt=[e]:Nt.push(e)}function xm(e){Uo=!0,Id(e)}function dn(){if(!Ei&&Nt!==null){Ei=!0;var e=0,t=ee;try{var n=Nt;for(ee=1;e>=i,l-=i,Lt=1<<32-gt(t)+l|n<L?(O=P,P=null):O=P.sibling;var I=p(d,P,v[L],C);if(I===null){P===null&&(P=O);break}e&&P&&I.alternate===null&&t(d,P),f=o(I,f,L),y===null?N=I:y.sibling=I,y=I,P=O}if(L===v.length)return n(d,P),de&&mn(d,L),N;if(P===null){for(;LL?(O=P,P=null):O=P.sibling;var V=p(d,P,I.value,C);if(V===null){P===null&&(P=O);break}e&&P&&V.alternate===null&&t(d,P),f=o(V,f,L),y===null?N=V:y.sibling=V,y=V,P=O}if(I.done)return n(d,P),de&&mn(d,L),N;if(P===null){for(;!I.done;L++,I=v.next())I=m(d,I.value,C),I!==null&&(f=o(I,f,L),y===null?N=I:y.sibling=I,y=I);return de&&mn(d,L),N}for(P=r(d,P);!I.done;L++,I=v.next())I=g(P,d,L,I.value,C),I!==null&&(e&&I.alternate!==null&&P.delete(I.key===null?L:I.key),f=o(I,f,L),y===null?N=I:y.sibling=I,y=I);return e&&P.forEach(function(Z){return t(d,Z)}),de&&mn(d,L),N}function E(d,f,v,C){if(typeof v=="object"&&v!==null&&v.type===$n&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Tl:e:{for(var N=v.key,y=f;y!==null;){if(y.key===N){if(N=v.type,N===$n){if(y.tag===7){n(d,y.sibling),f=l(y,v.props.children),f.return=d,d=f;break e}}else if(y.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===Wt&&Ms(N)===y.type){n(d,y.sibling),f=l(y,v.props),f.ref=kr(d,y,v),f.return=d,d=f;break e}n(d,y);break}else t(d,y);y=y.sibling}v.type===$n?(f=_n(v.props.children,d.mode,C,v.key),f.return=d,d=f):(C=to(v.type,v.key,v.props,null,d.mode,C),C.ref=kr(d,f,v),C.return=d,d=C)}return i(d);case Un:e:{for(y=v.key;f!==null;){if(f.key===y)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(d,f.sibling),f=l(f,v.children||[]),f.return=d,d=f;break e}else{n(d,f);break}else t(d,f);f=f.sibling}f=Li(v,d.mode,C),f.return=d,d=f}return i(d);case Wt:return y=v._init,E(d,f,y(v._payload),C)}if(Dr(v))return x(d,f,v,C);if(yr(v))return S(d,f,v,C);Il(d,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,f!==null&&f.tag===6?(n(d,f.sibling),f=l(f,v),f.return=d,d=f):(n(d,f),f=Ni(v,d.mode,C),f.return=d,d=f),i(d)):n(d,f)}return E}var ur=Qd(!0),Kd=Qd(!1),gl={},Tt=cn(gl),il=cn(gl),al=cn(gl);function Sn(e){if(e===gl)throw Error(j(174));return e}function hu(e,t){switch(oe(al,t),oe(il,e),oe(Tt,gl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yi(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yi(t,e)}ue(Tt),oe(Tt,t)}function sr(){ue(Tt),ue(il),ue(al)}function Yd(e){Sn(al.current);var t=Sn(Tt.current),n=Yi(t,e.type);t!==n&&(oe(il,e),oe(Tt,n))}function mu(e){il.current===e&&(ue(Tt),ue(il))}var fe=cn(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ki=[];function vu(){for(var e=0;en?n:4,e(!0);var r=Ci.transition;Ci.transition={};try{e(!1),t()}finally{ee=n,Ci.transition=r}}function cf(){return ct().memoizedState}function Cm(e,t,n){var r=rn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},df(e))ff(t,n);else if(n=Bd(e,t,n,r),n!==null){var l=Ue();yt(n,e,r,l),pf(n,t,r)}}function _m(e,t,n){var r=rn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(df(e))ff(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,wt(a,i)){var u=t.interleaved;u===null?(l.next=l,fu(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Bd(e,t,l,r),n!==null&&(l=Ue(),yt(n,e,r,l),pf(n,t,r))}}function df(e){var t=e.alternate;return e===pe||t!==null&&t===pe}function ff(e,t){Hr=ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function pf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qa(e,n)}}var Co={readContext:st,useCallback:De,useContext:De,useEffect:De,useImperativeHandle:De,useInsertionEffect:De,useLayoutEffect:De,useMemo:De,useReducer:De,useRef:De,useState:De,useDebugValue:De,useDeferredValue:De,useTransition:De,useMutableSource:De,useSyncExternalStore:De,useId:De,unstable_isNewReconciler:!1},Tm={readContext:st,useCallback:function(e,t){return kt().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Is,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Zl(4194308,4,lf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zl(4,2,e,t)},useMemo:function(e,t){var n=kt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=kt();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=Cm.bind(null,pe,e),[r.memoizedState,e]},useRef:function(e){var t=kt();return e={current:e},t.memoizedState=e},useState:zs,useDebugValue:Su,useDeferredValue:function(e){return kt().memoizedState=e},useTransition:function(){var e=zs(!1),t=e[0];return e=km.bind(null,e[1]),kt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=pe,l=kt();if(de){if(n===void 0)throw Error(j(407));n=n()}else{if(n=t(),Re===null)throw Error(j(349));Nn&30||Jd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Is(qd.bind(null,r,o,e),[e]),r.flags|=2048,cl(9,Zd.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=kt(),t=Re.identifierPrefix;if(de){var n=jt,r=Lt;n=(r&~(1<<32-gt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ul++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ct]=t,e[ol]=r,Ef(e,t,!1,!1),t.stateNode=e;e:{switch(i=Xi(n,r),n){case"dialog":ae("cancel",e),ae("close",e),l=r;break;case"iframe":case"object":case"embed":ae("load",e),l=r;break;case"video":case"audio":for(l=0;ldr&&(t.flags|=128,r=!0,Cr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Eo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!de)return Me(t),null}else 2*xe()-o.renderingStartTime>dr&&n!==1073741824&&(t.flags|=128,r=!0,Cr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=xe(),t.sibling=null,n=fe.current,oe(fe,r?n&1|2:n&1),t):(Me(t),null);case 22:case 23:return Ru(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(Me(t),t.subtreeFlags&6&&(t.flags|=8192)):Me(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Mm(e,t){switch(au(t),t.tag){case 1:return Ye(t.type)&&mo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sr(),ue(Ke),ue(ze),vu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mu(t),null;case 13:if(ue(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(fe),null;case 4:return sr(),null;case 10:return du(t.type._context),null;case 22:case 23:return Ru(),null;case 24:return null;default:return null}}var Ul=!1,Oe=!1,Om=typeof WeakSet=="function"?WeakSet:Set,O=null;function Xn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function Ea(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Ks=!1;function zm(e,t){if(oa=co,e=Rd(),ou(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,s=0,c=0,m=e,p=null;t:for(;;){for(var g;m!==n||l!==0&&m.nodeType!==3||(a=i+l),m!==o||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break t;if(p===n&&++s===l&&(a=i),p===o&&++c===r&&(u=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ia={focusedElem:e,selectionRange:n},co=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,E=x.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?S:pt(t.type,S),E);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(C){ge(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return x=Ks,Ks=!1,x}function Vr(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 o=l.destroy;l.destroy=void 0,o!==void 0&&Ea(t,n,o)}l=l.next}while(l!==r)}}function Ho(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 ka(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 _f(e){var t=e.alternate;t!==null&&(e.alternate=null,_f(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[ol],delete t[sa],delete t[ym],delete t[wm])),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 Tf(e){return e.tag===5||e.tag===3||e.tag===4}function Ys(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tf(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 Ca(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=ho));else if(r!==4&&(e=e.child,e!==null))for(Ca(e,t,n),e=e.sibling;e!==null;)Ca(e,t,n),e=e.sibling}function _a(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(_a(e,t,n),e=e.sibling;e!==null;)_a(e,t,n),e=e.sibling}var Le=null,ht=!1;function Ht(e,t,n){for(n=n.child;n!==null;)Rf(e,t,n),n=n.sibling}function Rf(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Mo,n)}catch{}switch(n.tag){case 5:Oe||Xn(n,t);case 6:var r=Le,l=ht;Le=null,Ht(e,t,n),Le=r,ht=l,Le!==null&&(ht?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(ht?(e=Le,n=n.stateNode,e.nodeType===8?Si(e.parentNode,n):e.nodeType===1&&Si(e,n),el(e)):Si(Le,n.stateNode));break;case 4:r=Le,l=ht,Le=n.stateNode.containerInfo,ht=!0,Ht(e,t,n),Le=r,ht=l;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Ea(n,t,i),l=l.next}while(l!==r)}Ht(e,t,n);break;case 1:if(!Oe&&(Xn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}Ht(e,t,n);break;case 21:Ht(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,Ht(e,t,n),Oe=r):Ht(e,t,n);break;default:Ht(e,t,n)}}function Gs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Om),t.forEach(function(r){var l=Qm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Am(r/1960))-r,10e?16:e,Xt===null)var r=!1;else{if(e=Xt,Xt=null,Ro=0,J&6)throw Error(j(331));var l=J;for(J|=4,O=e.current;O!==null;){var o=O,i=o.child;if(O.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uxe()-_u?Cn(e,0):Cu|=n),Ge(e,t)}function Of(e,t){t===0&&(e.mode&1?(t=Ll,Ll<<=1,!(Ll&130023424)&&(Ll=4194304)):t=1);var n=Ue();e=Ot(e,t),e!==null&&(hl(e,t,n),Ge(e,n))}function Wm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Of(e,n)}function Qm(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(j(314))}r!==null&&r.delete(t),Of(e,n)}var zf;zf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,Fm(e,t,n);We=!!(e.flags&131072)}else We=!1,de&&t.flags&1048576&&Ad(t,yo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ql(e,t),e=t.pendingProps;var l=ir(t,ze.current);rr(t,n),l=yu(null,t,r,e,l,n);var o=wu();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,Ye(r)?(o=!0,vo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,pu(t),l.updater=$o,t.stateNode=l,l._reactInternals=t,ma(t,r,e,n),t=ya(null,t,r,!0,o,n)):(t.tag=0,de&&o&&iu(t),Ae(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ql(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Ym(r),e=pt(r,e),l){case 0:t=ga(null,t,r,e,n);break e;case 1:t=Vs(null,t,r,e,n);break e;case 11:t=Bs(null,t,r,e,n);break e;case 14:t=Hs(null,t,r,pt(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ga(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),Vs(e,t,r,l,n);case 3:e:{if(wf(t),e===null)throw Error(j(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Hd(e,t),So(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=cr(Error(j(423)),t),t=Ws(e,t,r,n,l);break e}else if(r!==l){l=cr(Error(j(424)),t),t=Ws(e,t,r,n,l);break e}else for(Ze=en(t.stateNode.containerInfo.firstChild),qe=t,de=!0,vt=null,n=Kd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ar(),r===l){t=zt(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return Yd(t),e===null&&fa(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,aa(r,l)?i=null:o!==null&&aa(r,o)&&(t.flags|=32),yf(e,t),Ae(e,t,i,n),t.child;case 6:return e===null&&fa(t),null;case 13:return xf(e,t,n);case 4:return hu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ur(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),Bs(e,t,r,l,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,oe(wo,r._currentValue),r._currentValue=i,o!==null)if(wt(o.value,i)){if(o.children===l.children&&!Ke.current){t=zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Ft(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var c=s.pending;c===null?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),pa(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(j(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),pa(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ae(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,rr(t,n),l=st(l),r=r(l),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,l=pt(r,t.pendingProps),l=pt(r.type,l),Hs(e,t,r,l,n);case 15:return vf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ql(e,t),t.tag=1,Ye(r)?(e=!0,vo(t)):e=!1,rr(t,n),Wd(t,r,l),ma(t,r,l,n),ya(null,t,r,!0,e,n);case 19:return Sf(e,t,n);case 22:return gf(e,t,n)}throw Error(j(156,t.tag))};function If(e,t){return ud(e,t)}function Km(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 at(e,t,n,r){return new Km(e,t,n,r)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ym(e){if(typeof e=="function")return Nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ga)return 11;if(e===Xa)return 14}return 2}function ln(e,t){var n=e.alternate;return n===null?(n=at(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 to(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Nu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case $n:return _n(n.children,l,o,t);case Ya:i=8,l|=8;break;case Ui:return e=at(12,n,t,l|2),e.elementType=Ui,e.lanes=o,e;case $i:return e=at(13,n,t,l),e.elementType=$i,e.lanes=o,e;case Bi:return e=at(19,n,t,l),e.elementType=Bi,e.lanes=o,e;case Qc:return Wo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vc:i=10;break e;case Wc:i=9;break e;case Ga:i=11;break e;case Xa:i=14;break e;case Wt:i=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=at(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function _n(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Wo(e,t,n,r){return e=at(22,e,r,t),e.elementType=Qc,e.lanes=n,e.stateNode={isHidden:!1},e}function Ni(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function Li(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gm(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=ci(0),this.expirationTimes=ci(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ci(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Lu(e,t,n,r,l,o,i,a,u){return e=new Gm(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=at(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(o),e}function Xm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bf)}catch(e){console.error(e)}}Bf(),Ac.exports=et;var Mu=Ac.exports;const ev=Ua(Mu),tv=Rc({__proto__:null,default:ev},[Mu]);var nc=Mu;Ii.createRoot=nc.createRoot,Ii.hydrateRoot=nc.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function Ri(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function va(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Nm=typeof WeakMap=="function"?WeakMap:Map;function hf(e,t,n){n=Ft(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){To||(To=!0,Ta=r),va(e,t)},n}function mf(e,t,n){n=Ft(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){va(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){va(e,t),typeof r!="function"&&(nn===null?nn=new Set([this]):nn.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function As(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Nm;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=Vm.bind(null,e,t,n),t.then(e,e))}function Us(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function $s(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ft(-1,1),t.tag=2,tn(n,t,1))),n.lanes|=1),e)}var Lm=It.ReactCurrentOwner,We=!1;function Ae(e,t,n,r){t.child=e===null?Kd(t,null,n,r):ur(t,e.child,n,r)}function Bs(e,t,n,r,l){n=n.render;var o=t.ref;return rr(t,l),r=yu(e,t,n,r,o,l),n=wu(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,zt(e,t,l)):(de&&n&&iu(t),t.flags|=1,Ae(e,t,r,l),t.child)}function Hs(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Nu(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,vf(e,t,o,r,l)):(e=to(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:nl,n(i,r)&&e.ref===t.ref)return zt(e,t,l)}return t.flags|=1,e=ln(o,r),e.ref=t.ref,e.return=t,t.child=e}function vf(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(nl(o,r)&&e.ref===t.ref)if(We=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,zt(e,t,l)}return ga(e,t,n,r,l)}function gf(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},oe(Jn,Je),Je|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,oe(Jn,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,oe(Jn,Je),Je|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,oe(Jn,Je),Je|=r;return Ae(e,t,l,n),t.child}function yf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ga(e,t,n,r,l){var o=Ye(n)?Rn:ze.current;return o=ir(t,o),rr(t,l),n=yu(e,t,n,r,o,l),r=wu(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,zt(e,t,l)):(de&&r&&iu(t),t.flags|=1,Ae(e,t,n,l),t.child)}function Vs(e,t,n,r,l){if(Ye(n)){var o=!0;vo(t)}else o=!1;if(rr(t,l),t.stateNode===null)ql(e,t),Wd(t,n,r),ma(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var u=i.context,s=n.contextType;typeof s=="object"&&s!==null?s=st(s):(s=Ye(n)?Rn:ze.current,s=ir(t,s));var c=n.getDerivedStateFromProps,m=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function";m||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||u!==s)&&Os(t,i,r,s),Qt=!1;var p=t.memoizedState;i.state=p,So(t,r,i,l),u=t.memoizedState,a!==r||p!==u||Ke.current||Qt?(typeof c=="function"&&(ha(t,n,c,r),u=t.memoizedState),(a=Qt||Ds(t,n,a,r,p,u,s))?(m||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),i.props=r,i.state=u,i.context=s,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Hd(e,t),a=t.memoizedProps,s=t.type===t.elementType?a:pt(t.type,a),i.props=s,m=t.pendingProps,p=i.context,u=n.contextType,typeof u=="object"&&u!==null?u=st(u):(u=Ye(n)?Rn:ze.current,u=ir(t,u));var g=n.getDerivedStateFromProps;(c=typeof g=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==m||p!==u)&&Os(t,i,r,u),Qt=!1,p=t.memoizedState,i.state=p,So(t,r,i,l);var x=t.memoizedState;a!==m||p!==x||Ke.current||Qt?(typeof g=="function"&&(ha(t,n,g,r),x=t.memoizedState),(s=Qt||Ds(t,n,s,r,p,x,u)||!1)?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,x,u),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,x,u)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),i.props=r,i.state=x,i.context=u,r=s):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return ya(e,t,n,r,o,l)}function ya(e,t,n,r,l,o){yf(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&Ps(t,n,!1),zt(e,t,o);r=t.stateNode,Lm.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=ur(t,e.child,null,o),t.child=ur(t,null,a,o)):Ae(e,t,a,o),t.memoizedState=r.state,l&&Ps(t,n,!0),t.child}function wf(e){var t=e.stateNode;t.pendingContext?Rs(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Rs(e,t.context,!1),hu(e,t.containerInfo)}function Ws(e,t,n,r,l){return ar(),uu(l),t.flags|=256,Ae(e,t,n,r),t.child}var wa={dehydrated:null,treeContext:null,retryLane:0};function xa(e){return{baseLanes:e,cachePool:null,transitions:null}}function xf(e,t,n){var r=t.pendingProps,l=fe.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),oe(fe,l&1),e===null)return fa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Wo(i,r,0,null),e=_n(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=xa(n),t.memoizedState=wa,e):Eu(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return jm(e,t,i,r,a,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,a=l.sibling;var u={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=ln(l,u),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=ln(a,o):(o=_n(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?xa(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=wa,r}return o=e.child,e=o.sibling,r=ln(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Eu(e,t){return t=Wo({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Al(e,t,n,r){return r!==null&&uu(r),ur(t,e.child,null,n),e=Eu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jm(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=Ri(Error(j(422))),Al(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Wo({mode:"visible",children:r.children},l,0,null),o=_n(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&ur(t,e.child,null,i),t.child.memoizedState=xa(i),t.memoizedState=wa,o);if(!(t.mode&1))return Al(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(j(419)),r=Ri(o,r,void 0),Al(e,t,i,r)}if(a=(i&e.childLanes)!==0,We||a){if(r=Re,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Mt(e,l),yt(r,e,l,-1))}return Pu(),r=Ri(Error(j(421))),Al(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=Wm.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,Ze=en(l.nextSibling),qe=t,de=!0,vt=null,e!==null&&(ot[it++]=Lt,ot[it++]=jt,ot[it++]=Pn,Lt=e.id,jt=e.overflow,Pn=t),t=Eu(t,r.children),t.flags|=4096,t)}function Qs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),pa(e.return,t,n)}function Pi(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function Sf(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(Ae(e,t,r.children,n),r=fe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Qs(e,n,t);else if(e.tag===19)Qs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(oe(fe,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),Pi(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Eo(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}Pi(t,!0,n,null,o);break;case"together":Pi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ql(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function zt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ln|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,n=ln(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ln(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fm(e,t,n){switch(t.tag){case 3:wf(t),ar();break;case 5:Yd(t);break;case 1:Ye(t.type)&&vo(t);break;case 4:hu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;oe(wo,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(oe(fe,fe.current&1),t.flags|=128,null):n&t.child.childLanes?xf(e,t,n):(oe(fe,fe.current&1),e=zt(e,t,n),e!==null?e.sibling:null);oe(fe,fe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Sf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),oe(fe,fe.current),r)break;return null;case 22:case 23:return t.lanes=0,gf(e,t,n)}return zt(e,t,n)}var Ef,Sa,kf,Cf;Ef=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Sa=function(){};kf=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,Sn(Tt.current);var o=null;switch(n){case"input":l=Vi(e,l),r=Vi(e,r),o=[];break;case"select":l=he({},l,{value:void 0}),r=he({},r,{value:void 0}),o=[];break;case"textarea":l=Ki(e,l),r=Ki(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ho)}Gi(n,r);var i;n=null;for(s in l)if(!r.hasOwnProperty(s)&&l.hasOwnProperty(s)&&l[s]!=null)if(s==="style"){var a=l[s];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else s!=="dangerouslySetInnerHTML"&&s!=="children"&&s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Xr.hasOwnProperty(s)?o||(o=[]):(o=o||[]).push(s,null));for(s in r){var u=r[s];if(a=l!=null?l[s]:void 0,r.hasOwnProperty(s)&&u!==a&&(u!=null||a!=null))if(s==="style")if(a){for(i in a)!a.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&a[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(o||(o=[]),o.push(s,n)),n=u;else s==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,a=a?a.__html:void 0,u!=null&&a!==u&&(o=o||[]).push(s,u)):s==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(s,""+u):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&(Xr.hasOwnProperty(s)?(u!=null&&s==="onScroll"&&ae("scroll",e),o||a===u||(o=[])):(o=o||[]).push(s,u))}n&&(o=o||[]).push("style",n);var s=o;(t.updateQueue=s)&&(t.flags|=4)}};Cf=function(e,t,n,r){n!==r&&(t.flags|=4)};function Cr(e,t){if(!de)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Dm(e,t,n){var r=t.pendingProps;switch(au(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Ye(t.type)&&mo(),Oe(t),null;case 3:return r=t.stateNode,sr(),ue(Ke),ue(ze),vu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(zl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,vt!==null&&(Na(vt),vt=null))),Sa(e,t),Oe(t),null;case 5:mu(t);var l=Sn(al.current);if(n=t.type,e!==null&&t.stateNode!=null)kf(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(j(166));return Oe(t),null}if(e=Sn(Tt.current),zl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[Ct]=t,r[ol]=o,e=(t.mode&1)!==0,n){case"dialog":ae("cancel",r),ae("close",r);break;case"iframe":case"object":case"embed":ae("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[Ct]=t,e[ol]=r,Ef(e,t,!1,!1),t.stateNode=e;e:{switch(i=Xi(n,r),n){case"dialog":ae("cancel",e),ae("close",e),l=r;break;case"iframe":case"object":case"embed":ae("load",e),l=r;break;case"video":case"audio":for(l=0;ldr&&(t.flags|=128,r=!0,Cr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Eo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!de)return Oe(t),null}else 2*xe()-o.renderingStartTime>dr&&n!==1073741824&&(t.flags|=128,r=!0,Cr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=xe(),t.sibling=null,n=fe.current,oe(fe,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Ru(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function Om(e,t){switch(au(t),t.tag){case 1:return Ye(t.type)&&mo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return sr(),ue(Ke),ue(ze),vu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mu(t),null;case 13:if(ue(fe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));ar()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ue(fe),null;case 4:return sr(),null;case 10:return du(t.type._context),null;case 22:case 23:return Ru(),null;case 24:return null;default:return null}}var Ul=!1,Me=!1,Mm=typeof WeakSet=="function"?WeakSet:Set,M=null;function Xn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ge(e,t,r)}else n.current=null}function Ea(e,t,n){try{n()}catch(r){ge(e,t,r)}}var Ks=!1;function zm(e,t){if(oa=co,e=Rd(),ou(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,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,s=0,c=0,m=e,p=null;t:for(;;){for(var g;m!==n||l!==0&&m.nodeType!==3||(a=i+l),m!==o||r!==0&&m.nodeType!==3||(u=i+r),m.nodeType===3&&(i+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break t;if(p===n&&++s===l&&(a=i),p===o&&++c===r&&(u=i),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ia={focusedElem:e,selectionRange:n},co=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var S=x.memoizedProps,E=x.memoizedState,d=t.stateNode,f=d.getSnapshotBeforeUpdate(t.elementType===t.type?S:pt(t.type,S),E);d.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(C){ge(t,t.return,C)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return x=Ks,Ks=!1,x}function Vr(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 o=l.destroy;l.destroy=void 0,o!==void 0&&Ea(t,n,o)}l=l.next}while(l!==r)}}function Ho(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 ka(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 _f(e){var t=e.alternate;t!==null&&(e.alternate=null,_f(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[ol],delete t[sa],delete t[ym],delete t[wm])),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 Tf(e){return e.tag===5||e.tag===3||e.tag===4}function Ys(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tf(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 Ca(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=ho));else if(r!==4&&(e=e.child,e!==null))for(Ca(e,t,n),e=e.sibling;e!==null;)Ca(e,t,n),e=e.sibling}function _a(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(_a(e,t,n),e=e.sibling;e!==null;)_a(e,t,n),e=e.sibling}var Le=null,ht=!1;function Ht(e,t,n){for(n=n.child;n!==null;)Rf(e,t,n),n=n.sibling}function Rf(e,t,n){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Oo,n)}catch{}switch(n.tag){case 5:Me||Xn(n,t);case 6:var r=Le,l=ht;Le=null,Ht(e,t,n),Le=r,ht=l,Le!==null&&(ht?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(ht?(e=Le,n=n.stateNode,e.nodeType===8?Si(e.parentNode,n):e.nodeType===1&&Si(e,n),el(e)):Si(Le,n.stateNode));break;case 4:r=Le,l=ht,Le=n.stateNode.containerInfo,ht=!0,Ht(e,t,n),Le=r,ht=l;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Ea(n,t,i),l=l.next}while(l!==r)}Ht(e,t,n);break;case 1:if(!Me&&(Xn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ge(n,t,a)}Ht(e,t,n);break;case 21:Ht(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,Ht(e,t,n),Me=r):Ht(e,t,n);break;default:Ht(e,t,n)}}function Gs(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Mm),t.forEach(function(r){var l=Qm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Am(r/1960))-r,10e?16:e,Xt===null)var r=!1;else{if(e=Xt,Xt=null,Ro=0,J&6)throw Error(j(331));var l=J;for(J|=4,M=e.current;M!==null;){var o=M,i=o.child;if(M.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uxe()-_u?Cn(e,0):Cu|=n),Ge(e,t)}function Mf(e,t){t===0&&(e.mode&1?(t=Ll,Ll<<=1,!(Ll&130023424)&&(Ll=4194304)):t=1);var n=Ue();e=Mt(e,t),e!==null&&(hl(e,t,n),Ge(e,n))}function Wm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Mf(e,n)}function Qm(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(j(314))}r!==null&&r.delete(t),Mf(e,n)}var zf;zf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,Fm(e,t,n);We=!!(e.flags&131072)}else We=!1,de&&t.flags&1048576&&Ad(t,yo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ql(e,t),e=t.pendingProps;var l=ir(t,ze.current);rr(t,n),l=yu(null,t,r,e,l,n);var o=wu();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,Ye(r)?(o=!0,vo(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,pu(t),l.updater=$o,t.stateNode=l,l._reactInternals=t,ma(t,r,e,n),t=ya(null,t,r,!0,o,n)):(t.tag=0,de&&o&&iu(t),Ae(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ql(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Ym(r),e=pt(r,e),l){case 0:t=ga(null,t,r,e,n);break e;case 1:t=Vs(null,t,r,e,n);break e;case 11:t=Bs(null,t,r,e,n);break e;case 14:t=Hs(null,t,r,pt(r.type,e),n);break e}throw Error(j(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ga(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),Vs(e,t,r,l,n);case 3:e:{if(wf(t),e===null)throw Error(j(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Hd(e,t),So(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=cr(Error(j(423)),t),t=Ws(e,t,r,n,l);break e}else if(r!==l){l=cr(Error(j(424)),t),t=Ws(e,t,r,n,l);break e}else for(Ze=en(t.stateNode.containerInfo.firstChild),qe=t,de=!0,vt=null,n=Kd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ar(),r===l){t=zt(e,t,n);break e}Ae(e,t,r,n)}t=t.child}return t;case 5:return Yd(t),e===null&&fa(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,aa(r,l)?i=null:o!==null&&aa(r,o)&&(t.flags|=32),yf(e,t),Ae(e,t,i,n),t.child;case 6:return e===null&&fa(t),null;case 13:return xf(e,t,n);case 4:return hu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ur(t,null,r,n):Ae(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),Bs(e,t,r,l,n);case 7:return Ae(e,t,t.pendingProps,n),t.child;case 8:return Ae(e,t,t.pendingProps.children,n),t.child;case 12:return Ae(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,oe(wo,r._currentValue),r._currentValue=i,o!==null)if(wt(o.value,i)){if(o.children===l.children&&!Ke.current){t=zt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Ft(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var c=s.pending;c===null?u.next=u:(u.next=c.next,c.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),pa(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(j(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),pa(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}Ae(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,rr(t,n),l=st(l),r=r(l),t.flags|=1,Ae(e,t,r,n),t.child;case 14:return r=t.type,l=pt(r,t.pendingProps),l=pt(r.type,l),Hs(e,t,r,l,n);case 15:return vf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:pt(r,l),ql(e,t),t.tag=1,Ye(r)?(e=!0,vo(t)):e=!1,rr(t,n),Wd(t,r,l),ma(t,r,l,n),ya(null,t,r,!0,e,n);case 19:return Sf(e,t,n);case 22:return gf(e,t,n)}throw Error(j(156,t.tag))};function If(e,t){return ud(e,t)}function Km(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 at(e,t,n,r){return new Km(e,t,n,r)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ym(e){if(typeof e=="function")return Nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ga)return 11;if(e===Xa)return 14}return 2}function ln(e,t){var n=e.alternate;return n===null?(n=at(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 to(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Nu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case $n:return _n(n.children,l,o,t);case Ya:i=8,l|=8;break;case Ui:return e=at(12,n,t,l|2),e.elementType=Ui,e.lanes=o,e;case $i:return e=at(13,n,t,l),e.elementType=$i,e.lanes=o,e;case Bi:return e=at(19,n,t,l),e.elementType=Bi,e.lanes=o,e;case Qc:return Wo(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Vc:i=10;break e;case Wc:i=9;break e;case Ga:i=11;break e;case Xa:i=14;break e;case Wt:i=16,r=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=at(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function _n(e,t,n,r){return e=at(7,e,r,t),e.lanes=n,e}function Wo(e,t,n,r){return e=at(22,e,r,t),e.elementType=Qc,e.lanes=n,e.stateNode={isHidden:!1},e}function Ni(e,t,n){return e=at(6,e,null,t),e.lanes=n,e}function Li(e,t,n){return t=at(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gm(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=ci(0),this.expirationTimes=ci(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ci(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Lu(e,t,n,r,l,o,i,a,u){return e=new Gm(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=at(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},pu(o),e}function Xm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bf)}catch(e){console.error(e)}}Bf(),Ac.exports=et;var Ou=Ac.exports;const ev=Ua(Ou),tv=Rc({__proto__:null,default:ev},[Ou]);var nc=Ou;Ii.createRoot=nc.createRoot,Ii.hydrateRoot=nc.hydrateRoot;/** * @remix-run/router v1.15.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function un(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rv(){return Math.random().toString(36).substr(2,8)}function lc(e,t){return{usr:e.state,key:e.key,idx:t}}function fl(e,t,n,r){return n===void 0&&(n=null),ye({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Rt(t):t,{state:n,key:t&&t.key||r||rv()})}function yl(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 Rt(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 lv(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=we.Pop,u=null,s=c();s==null&&(s=0,i.replaceState(ye({},i.state,{idx:s}),""));function c(){return(i.state||{idx:null}).idx}function m(){a=we.Pop;let E=c(),d=E==null?null:E-s;s=E,u&&u({action:a,location:S.location,delta:d})}function p(E,d){a=we.Push;let f=fl(S.location,E,d);n&&n(f,E),s=c()+1;let v=lc(f,s),C=S.createHref(f);try{i.pushState(v,"",C)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;l.location.assign(C)}o&&u&&u({action:a,location:S.location,delta:1})}function g(E,d){a=we.Replace;let f=fl(S.location,E,d);n&&n(f,E),s=c();let v=lc(f,s),C=S.createHref(f);i.replaceState(v,"",C),o&&u&&u({action:a,location:S.location,delta:0})}function x(E){let d=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof E=="string"?E:yl(E);return K(d,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,d)}let S={get action(){return a},get location(){return e(l,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(rc,m),u=E,()=>{l.removeEventListener(rc,m),u=null}},createHref(E){return t(l,E)},createURL:x,encodeLocation(E){let d=x(E);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:p,replace:g,go(E){return i.go(E)}};return S}var ve;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ve||(ve={}));const ov=new Set(["lazy","caseSensitive","path","id","index","children"]);function iv(e){return e.index===!0}function La(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],a=typeof l.id=="string"?l.id:i.join("-");if(K(l.index!==!0||!l.children,"Cannot specify children on an index route"),K(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),iv(l)){let u=ye({},l,t(l),{id:a});return r[a]=u,u}else{let u=ye({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=La(l.children,t,i,r)),u}})}function Zn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Rt(t):t,l=wl(r.pathname||"/",n);if(l==null)return null;let o=Hf(e);uv(o);let i=null;for(let a=0;i==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(K(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 s=Tn([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(K(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Hf(o.children,t,c,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:mv(s,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Vf(o.path))l(o,i,u)}),t}function Vf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=Vf(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function uv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:vv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sv=/^:[\w-]+$/,cv=3,dv=2,fv=1,pv=10,hv=-2,oc=e=>e==="*";function mv(e,t){let n=e.split("/"),r=n.length;return n.some(oc)&&(r+=hv),t&&(r+=dv),n.filter(l=>!oc(l)).reduce((l,o)=>l+(sv.test(o)?cv:o===""?fv:pv),r)}function vv(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 gv(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{let{paramName:p,isOptional:g}=c;if(p==="*"){let S=a[m]||"";i=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const x=a[m];return g&&!x?s[p]=void 0:s[p]=Sv(x||"",p),s},{}),pathname:o,pathnameBase:i,pattern:e}}function wv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),un(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,(i,a,u)=>(r.push({paramName:a,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 xv(e){try{return decodeURI(e)}catch(t){return un(!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 Sv(e,t){try{return decodeURIComponent(e)}catch(n){return un(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function wl(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)||"/"}function Ev(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Rt(e):e;return{pathname:n?n.startsWith("/")?n:kv(n,t):t,search:Rv(r),hash:Pv(l)}}function kv(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 ji(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 Wf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cv(e,t){let n=Wf(e);return t?n.map((r,l)=>l===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function _v(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Rt(e):(l=ye({},e),K(!l.pathname||!l.pathname.includes("?"),ji("?","pathname","search",l)),K(!l.pathname||!l.pathname.includes("#"),ji("#","pathname","hash",l)),K(!l.search||!l.search.includes("#"),ji("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let m=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),m-=1;l.pathname=p.join("/")}a=m>=0?t[m]:"/"}let u=Ev(l,a),s=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||c)&&(u.pathname+="/"),u}const Tn=e=>e.join("/").replace(/\/\/+/g,"/"),Tv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Rv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Pv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ou{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Qf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Kf=["post","put","patch","delete"],Nv=new Set(Kf),Lv=["get",...Kf],jv=new Set(Lv),Fv=new Set([301,302,303,307,308]),Dv=new Set([307,308]),Fi={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Yf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ov=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gf="remix-router-transitions";function zv(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;K(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let w=e.detectErrorBoundary;l=k=>({hasErrorBoundary:w(k)})}else l=Ov;let o={},i=La(e.routes,l,void 0,o),a,u=e.basename||"/",s=ye({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),c=null,m=new Set,p=null,g=null,x=null,S=e.hydrationData!=null,E=Zn(i,e.history.location,u),d=null;if(E==null){let w=rt(404,{pathname:e.history.location.pathname}),{matches:k,route:T}=pc(i);E=k,d={[T.id]:w}}let f,v=E.some(w=>w.route.lazy),C=E.some(w=>w.route.loader);if(v)f=!1;else if(!C)f=!0;else if(s.v7_partialHydration){let w=e.hydrationData?e.hydrationData.loaderData:null,k=e.hydrationData?e.hydrationData.errors:null;f=E.every(T=>T.route.loader&&T.route.loader.hydrate!==!0&&(w&&w[T.route.id]!==void 0||k&&k[T.route.id]!==void 0))}else f=e.hydrationData!=null;let N,y={historyAction:e.history.action,location:e.history.location,matches:E,initialized:f,navigation:Fi,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||d,fetchers:new Map,blockers:new Map},P=we.Pop,L=!1,M,I=!1,V=new Map,Z=null,b=!1,re=!1,He=[],me=[],X=new Map,F=0,U=-1,H=new Map,q=new Set,ie=new Map,xt=new Map,Pe=new Set,dt=new Map,Ie=new Map,At=!1;function fp(){if(c=e.history.listen(w=>{let{action:k,location:T,delta:D}=w;if(At){At=!1;return}un(Ie.size===0||D!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let z=Qu({currentLocation:y.location,nextLocation:T,historyAction:k});if(z&&D!=null){At=!0,e.history.go(D*-1),El(z,{state:"blocked",location:T,proceed(){El(z,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),e.history.go(D)},reset(){let Q=new Map(y.blockers);Q.set(z,Tr),Xe({blockers:Q})}});return}return fn(k,T)}),n){Yv(t,V);let w=()=>Gv(t,V);t.addEventListener("pagehide",w),Z=()=>t.removeEventListener("pagehide",w)}return y.initialized||fn(we.Pop,y.location,{initialHydration:!0}),N}function pp(){c&&c(),Z&&Z(),m.clear(),M&&M.abort(),y.fetchers.forEach((w,k)=>Sl(k)),y.blockers.forEach((w,k)=>Wu(k))}function hp(w){return m.add(w),()=>m.delete(w)}function Xe(w,k){k===void 0&&(k={}),y=ye({},y,w);let T=[],D=[];s.v7_fetcherPersist&&y.fetchers.forEach((z,Q)=>{z.state==="idle"&&(Pe.has(Q)?D.push(Q):T.push(Q))}),[...m].forEach(z=>z(y,{deletedFetchers:D,unstable_viewTransitionOpts:k.viewTransitionOpts,unstable_flushSync:k.flushSync===!0})),s.v7_fetcherPersist&&(T.forEach(z=>y.fetchers.delete(z)),D.forEach(z=>Sl(z)))}function mr(w,k,T){var D,z;let{flushSync:Q}=T===void 0?{}:T,B=y.actionData!=null&&y.navigation.formMethod!=null&&mt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((D=w.state)==null?void 0:D._isRedirect)!==!0,$;k.actionData?Object.keys(k.actionData).length>0?$=k.actionData:$=null:B?$=y.actionData:$=null;let A=k.loaderData?fc(y.loaderData,k.loaderData,k.matches||[],k.errors):y.loaderData,G=y.blockers;G.size>0&&(G=new Map(G),G.forEach((le,Ne)=>G.set(Ne,Tr)));let Ce=L===!0||y.navigation.formMethod!=null&&mt(y.navigation.formMethod)&&((z=w.state)==null?void 0:z._isRedirect)!==!0;a&&(i=a,a=void 0),b||P===we.Pop||(P===we.Push?e.history.push(w,w.state):P===we.Replace&&e.history.replace(w,w.state));let W;if(P===we.Pop){let le=V.get(y.location.pathname);le&&le.has(w.pathname)?W={currentLocation:y.location,nextLocation:w}:V.has(w.pathname)&&(W={currentLocation:w,nextLocation:y.location})}else if(I){let le=V.get(y.location.pathname);le?le.add(w.pathname):(le=new Set([w.pathname]),V.set(y.location.pathname,le)),W={currentLocation:y.location,nextLocation:w}}Xe(ye({},k,{actionData:$,loaderData:A,historyAction:P,location:w,initialized:!0,navigation:Fi,revalidation:"idle",restoreScrollPosition:Yu(w,k.matches||y.matches),preventScrollReset:Ce,blockers:G}),{viewTransitionOpts:W,flushSync:Q===!0}),P=we.Pop,L=!1,I=!1,b=!1,re=!1,He=[],me=[]}async function Au(w,k){if(typeof w=="number"){e.history.go(w);return}let T=ja(y.location,y.matches,u,s.v7_prependBasename,w,s.v7_relativeSplatPath,k==null?void 0:k.fromRouteId,k==null?void 0:k.relative),{path:D,submission:z,error:Q}=ic(s.v7_normalizeFormMethod,!1,T,k),B=y.location,$=fl(y.location,D,k&&k.state);$=ye({},$,e.history.encodeLocation($));let A=k&&k.replace!=null?k.replace:void 0,G=we.Push;A===!0?G=we.Replace:A===!1||z!=null&&mt(z.formMethod)&&z.formAction===y.location.pathname+y.location.search&&(G=we.Replace);let Ce=k&&"preventScrollReset"in k?k.preventScrollReset===!0:void 0,W=(k&&k.unstable_flushSync)===!0,le=Qu({currentLocation:B,nextLocation:$,historyAction:G});if(le){El(le,{state:"blocked",location:$,proceed(){El(le,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),Au(w,k)},reset(){let Ne=new Map(y.blockers);Ne.set(le,Tr),Xe({blockers:Ne})}});return}return await fn(G,$,{submission:z,pendingError:Q,preventScrollReset:Ce,replace:k&&k.replace,enableViewTransition:k&&k.unstable_viewTransition,flushSync:W})}function mp(){if(qo(),Xe({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){fn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}fn(P||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation})}}async function fn(w,k,T){M&&M.abort(),M=null,P=w,b=(T&&T.startUninterruptedRevalidation)===!0,Cp(y.location,y.matches),L=(T&&T.preventScrollReset)===!0,I=(T&&T.enableViewTransition)===!0;let D=a||i,z=T&&T.overrideNavigation,Q=Zn(D,k,u),B=(T&&T.flushSync)===!0;if(!Q){let Ne=rt(404,{pathname:k.pathname}),{matches:nt,route:_e}=pc(D);bo(),mr(k,{matches:nt,loaderData:{},errors:{[_e.id]:Ne}},{flushSync:B});return}if(y.initialized&&!re&&Bv(y.location,k)&&!(T&&T.submission&&mt(T.submission.formMethod))){mr(k,{matches:Q},{flushSync:B});return}M=new AbortController;let $=Pr(e.history,k,M.signal,T&&T.submission),A,G;if(T&&T.pendingError)G={[Kr(Q).route.id]:T.pendingError};else if(T&&T.submission&&mt(T.submission.formMethod)){let Ne=await vp($,k,T.submission,Q,{replace:T.replace,flushSync:B});if(Ne.shortCircuited)return;A=Ne.pendingActionData,G=Ne.pendingActionError,z=Di(k,T.submission),B=!1,$=new Request($.url,{signal:$.signal})}let{shortCircuited:Ce,loaderData:W,errors:le}=await gp($,k,Q,z,T&&T.submission,T&&T.fetcherSubmission,T&&T.replace,T&&T.initialHydration===!0,B,A,G);Ce||(M=null,mr(k,ye({matches:Q},A?{actionData:A}:{},{loaderData:W,errors:le})))}async function vp(w,k,T,D,z){z===void 0&&(z={}),qo();let Q=Qv(k,T);Xe({navigation:Q},{flushSync:z.flushSync===!0});let B,$=Da(D,k);if(!$.route.action&&!$.route.lazy)B={type:ve.error,error:rt(405,{method:w.method,pathname:k.pathname,routeId:$.route.id})};else if(B=await Rr("action",w,$,D,o,l,u,s.v7_relativeSplatPath),w.signal.aborted)return{shortCircuited:!0};if(kn(B)){let A;return z&&z.replace!=null?A=z.replace:A=B.location===y.location.pathname+y.location.search,await vr(y,B,{submission:T,replace:A}),{shortCircuited:!0}}if(qn(B)){let A=Kr(D,$.route.id);return(z&&z.replace)!==!0&&(P=we.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:B.error}}}if(En(B))throw rt(400,{type:"defer-action"});return{pendingActionData:{[$.route.id]:B.data}}}async function gp(w,k,T,D,z,Q,B,$,A,G,Ce){let W=D||Di(k,z),le=z||Q||vc(W),Ne=a||i,[nt,_e]=ac(e.history,y,T,le,k,s.v7_partialHydration&&$===!0,re,He,me,Pe,ie,q,Ne,u,G,Ce);if(bo(te=>!(T&&T.some(se=>se.route.id===te))||nt&&nt.some(se=>se.route.id===te)),U=++F,nt.length===0&&_e.length===0){let te=Hu();return mr(k,ye({matches:T,loaderData:{},errors:Ce||null},G?{actionData:G}:{},te?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A}),{shortCircuited:!0}}if(!b&&(!s.v7_partialHydration||!$)){_e.forEach(se=>{let St=y.fetchers.get(se.key),Cl=Nr(void 0,St?St.data:void 0);y.fetchers.set(se.key,Cl)});let te=G||y.actionData;Xe(ye({navigation:W},te?Object.keys(te).length===0?{actionData:null}:{actionData:te}:{},_e.length>0?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A})}_e.forEach(te=>{X.has(te.key)&&$t(te.key),te.controller&&X.set(te.key,te.controller)});let On=()=>_e.forEach(te=>$t(te.key));M&&M.signal.addEventListener("abort",On);let{results:ei,loaderResults:zn,fetcherResults:Bt}=await Uu(y.matches,T,nt,_e,w);if(w.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",On),_e.forEach(te=>X.delete(te.key));let pn=hc(ei);if(pn){if(pn.idx>=nt.length){let te=_e[pn.idx-nt.length].key;q.add(te)}return await vr(y,pn.result,{replace:B}),{shortCircuited:!0}}let{loaderData:ti,errors:ni}=dc(y,T,nt,zn,Ce,_e,Bt,dt);dt.forEach((te,se)=>{te.subscribe(St=>{(St||te.done)&&dt.delete(se)})});let ri=Hu(),In=Vu(U),kl=ri||In||_e.length>0;return ye({loaderData:ti,errors:ni},kl?{fetchers:new Map(y.fetchers)}:{})}function yp(w,k,T,D){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");X.has(w)&&$t(w);let z=(D&&D.unstable_flushSync)===!0,Q=a||i,B=ja(y.location,y.matches,u,s.v7_prependBasename,T,s.v7_relativeSplatPath,k,D==null?void 0:D.relative),$=Zn(Q,B,u);if(!$){gr(w,k,rt(404,{pathname:B}),{flushSync:z});return}let{path:A,submission:G,error:Ce}=ic(s.v7_normalizeFormMethod,!0,B,D);if(Ce){gr(w,k,Ce,{flushSync:z});return}let W=Da($,A);if(L=(D&&D.preventScrollReset)===!0,G&&mt(G.formMethod)){wp(w,k,A,W,$,z,G);return}ie.set(w,{routeId:k,path:A}),xp(w,k,A,W,$,z,G)}async function wp(w,k,T,D,z,Q,B){if(qo(),ie.delete(w),!D.route.action&&!D.route.lazy){let se=rt(405,{method:B.formMethod,pathname:T,routeId:k});gr(w,k,se,{flushSync:Q});return}let $=y.fetchers.get(w);Ut(w,Kv(B,$),{flushSync:Q});let A=new AbortController,G=Pr(e.history,T,A.signal,B);X.set(w,A);let Ce=F,W=await Rr("action",G,D,z,o,l,u,s.v7_relativeSplatPath);if(G.signal.aborted){X.get(w)===A&&X.delete(w);return}if(s.v7_fetcherPersist&&Pe.has(w)){if(kn(W)||qn(W)){Ut(w,Vt(void 0));return}}else{if(kn(W))if(X.delete(w),U>Ce){Ut(w,Vt(void 0));return}else return q.add(w),Ut(w,Nr(B)),vr(y,W,{fetcherSubmission:B});if(qn(W)){gr(w,k,W.error);return}}if(En(W))throw rt(400,{type:"defer-action"});let le=y.navigation.location||y.location,Ne=Pr(e.history,le,A.signal),nt=a||i,_e=y.navigation.state!=="idle"?Zn(nt,y.navigation.location,u):y.matches;K(_e,"Didn't find any matches after fetcher action");let On=++F;H.set(w,On);let ei=Nr(B,W.data);y.fetchers.set(w,ei);let[zn,Bt]=ac(e.history,y,_e,B,le,!1,re,He,me,Pe,ie,q,nt,u,{[D.route.id]:W.data},void 0);Bt.filter(se=>se.key!==w).forEach(se=>{let St=se.key,Cl=y.fetchers.get(St),Tp=Nr(void 0,Cl?Cl.data:void 0);y.fetchers.set(St,Tp),X.has(St)&&$t(St),se.controller&&X.set(St,se.controller)}),Xe({fetchers:new Map(y.fetchers)});let pn=()=>Bt.forEach(se=>$t(se.key));A.signal.addEventListener("abort",pn);let{results:ti,loaderResults:ni,fetcherResults:ri}=await Uu(y.matches,_e,zn,Bt,Ne);if(A.signal.aborted)return;A.signal.removeEventListener("abort",pn),H.delete(w),X.delete(w),Bt.forEach(se=>X.delete(se.key));let In=hc(ti);if(In){if(In.idx>=zn.length){let se=Bt[In.idx-zn.length].key;q.add(se)}return vr(y,In.result)}let{loaderData:kl,errors:te}=dc(y,y.matches,zn,ni,void 0,Bt,ri,dt);if(y.fetchers.has(w)){let se=Vt(W.data);y.fetchers.set(w,se)}Vu(On),y.navigation.state==="loading"&&On>U?(K(P,"Expected pending action"),M&&M.abort(),mr(y.navigation.location,{matches:_e,loaderData:kl,errors:te,fetchers:new Map(y.fetchers)})):(Xe({errors:te,loaderData:fc(y.loaderData,kl,_e,te),fetchers:new Map(y.fetchers)}),re=!1)}async function xp(w,k,T,D,z,Q,B){let $=y.fetchers.get(w);Ut(w,Nr(B,$?$.data:void 0),{flushSync:Q});let A=new AbortController,G=Pr(e.history,T,A.signal);X.set(w,A);let Ce=F,W=await Rr("loader",G,D,z,o,l,u,s.v7_relativeSplatPath);if(En(W)&&(W=await Zf(W,G.signal,!0)||W),X.get(w)===A&&X.delete(w),!G.signal.aborted){if(Pe.has(w)){Ut(w,Vt(void 0));return}if(kn(W))if(U>Ce){Ut(w,Vt(void 0));return}else{q.add(w),await vr(y,W);return}if(qn(W)){gr(w,k,W.error);return}K(!En(W),"Unhandled fetcher deferred data"),Ut(w,Vt(W.data))}}async function vr(w,k,T){let{submission:D,fetcherSubmission:z,replace:Q}=T===void 0?{}:T;k.revalidate&&(re=!0);let B=fl(w.location,k.location,{_isRedirect:!0});if(K(B,"Expected a location on the redirect navigation"),n){let le=!1;if(k.reloadDocument)le=!0;else if(Yf.test(k.location)){const Ne=e.history.createURL(k.location);le=Ne.origin!==t.location.origin||wl(Ne.pathname,u)==null}if(le){Q?t.location.replace(k.location):t.location.assign(k.location);return}}M=null;let $=Q===!0?we.Replace:we.Push,{formMethod:A,formAction:G,formEncType:Ce}=w.navigation;!D&&!z&&A&&G&&Ce&&(D=vc(w.navigation));let W=D||z;if(Dv.has(k.status)&&W&&mt(W.formMethod))await fn($,B,{submission:ye({},W,{formAction:k.location}),preventScrollReset:L});else{let le=Di(B,D);await fn($,B,{overrideNavigation:le,fetcherSubmission:z,preventScrollReset:L})}}async function Uu(w,k,T,D,z){let Q=await Promise.all([...T.map(A=>Rr("loader",z,A,k,o,l,u,s.v7_relativeSplatPath)),...D.map(A=>A.matches&&A.match&&A.controller?Rr("loader",Pr(e.history,A.path,A.controller.signal),A.match,A.matches,o,l,u,s.v7_relativeSplatPath):{type:ve.error,error:rt(404,{pathname:A.path})})]),B=Q.slice(0,T.length),$=Q.slice(T.length);return await Promise.all([mc(w,T,B,B.map(()=>z.signal),!1,y.loaderData),mc(w,D.map(A=>A.match),$,D.map(A=>A.controller?A.controller.signal:null),!0)]),{results:Q,loaderResults:B,fetcherResults:$}}function qo(){re=!0,He.push(...bo()),ie.forEach((w,k)=>{X.has(k)&&(me.push(k),$t(k))})}function Ut(w,k,T){T===void 0&&(T={}),y.fetchers.set(w,k),Xe({fetchers:new Map(y.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function gr(w,k,T,D){D===void 0&&(D={});let z=Kr(y.matches,k);Sl(w),Xe({errors:{[z.route.id]:T},fetchers:new Map(y.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function $u(w){return s.v7_fetcherPersist&&(xt.set(w,(xt.get(w)||0)+1),Pe.has(w)&&Pe.delete(w)),y.fetchers.get(w)||Mv}function Sl(w){let k=y.fetchers.get(w);X.has(w)&&!(k&&k.state==="loading"&&H.has(w))&&$t(w),ie.delete(w),H.delete(w),q.delete(w),Pe.delete(w),y.fetchers.delete(w)}function Sp(w){if(s.v7_fetcherPersist){let k=(xt.get(w)||0)-1;k<=0?(xt.delete(w),Pe.add(w)):xt.set(w,k)}else Sl(w);Xe({fetchers:new Map(y.fetchers)})}function $t(w){let k=X.get(w);K(k,"Expected fetch controller: "+w),k.abort(),X.delete(w)}function Bu(w){for(let k of w){let T=$u(k),D=Vt(T.data);y.fetchers.set(k,D)}}function Hu(){let w=[],k=!1;for(let T of q){let D=y.fetchers.get(T);K(D,"Expected fetcher: "+T),D.state==="loading"&&(q.delete(T),w.push(T),k=!0)}return Bu(w),k}function Vu(w){let k=[];for(let[T,D]of H)if(D0}function Ep(w,k){let T=y.blockers.get(w)||Tr;return Ie.get(w)!==k&&Ie.set(w,k),T}function Wu(w){y.blockers.delete(w),Ie.delete(w)}function El(w,k){let T=y.blockers.get(w)||Tr;K(T.state==="unblocked"&&k.state==="blocked"||T.state==="blocked"&&k.state==="blocked"||T.state==="blocked"&&k.state==="proceeding"||T.state==="blocked"&&k.state==="unblocked"||T.state==="proceeding"&&k.state==="unblocked","Invalid blocker state transition: "+T.state+" -> "+k.state);let D=new Map(y.blockers);D.set(w,k),Xe({blockers:D})}function Qu(w){let{currentLocation:k,nextLocation:T,historyAction:D}=w;if(Ie.size===0)return;Ie.size>1&&un(!1,"A router only supports one blocker at a time");let z=Array.from(Ie.entries()),[Q,B]=z[z.length-1],$=y.blockers.get(Q);if(!($&&$.state==="proceeding")&&B({currentLocation:k,nextLocation:T,historyAction:D}))return Q}function bo(w){let k=[];return dt.forEach((T,D)=>{(!w||w(D))&&(T.cancel(),k.push(D),dt.delete(D))}),k}function kp(w,k,T){if(p=w,x=k,g=T||null,!S&&y.navigation===Fi){S=!0;let D=Yu(y.location,y.matches);D!=null&&Xe({restoreScrollPosition:D})}return()=>{p=null,x=null,g=null}}function Ku(w,k){return g&&g(w,k.map(D=>av(D,y.loaderData)))||w.key}function Cp(w,k){if(p&&x){let T=Ku(w,k);p[T]=x()}}function Yu(w,k){if(p){let T=Ku(w,k),D=p[T];if(typeof D=="number")return D}return null}function _p(w){o={},a=La(w,l,void 0,o)}return N={get basename(){return u},get future(){return s},get state(){return y},get routes(){return i},get window(){return t},initialize:fp,subscribe:hp,enableScrollRestoration:kp,navigate:Au,fetch:yp,revalidate:mp,createHref:w=>e.history.createHref(w),encodeLocation:w=>e.history.encodeLocation(w),getFetcher:$u,deleteFetcher:Sp,dispose:pp,getBlocker:Ep,deleteBlocker:Wu,_internalFetchControllers:X,_internalActiveDeferreds:dt,_internalSetRoutes:_p},N}function Iv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ja(e,t,n,r,l,o,i,a){let u,s;if(i){u=[];for(let m of t)if(u.push(m),m.route.id===i){s=m;break}}else u=t,s=t[t.length-1];let c=_v(l||".",Cv(u,o),wl(e.pathname,n)||e.pathname,a==="path");return l==null&&(c.search=e.search,c.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!zu(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Tn([n,c.pathname])),yl(c)}function ic(e,t,n,r){if(!r||!Iv(r))return{path:n};if(r.formMethod&&!Wv(r.formMethod))return{path:n,error:rt(405,{method:r.formMethod})};let l=()=>({path:n,error:rt(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Jf(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!mt(i))return l();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,x)=>{let[S,E]=x;return""+g+S+"="+E+` -`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!mt(i))return l();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return l()}}}K(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Fa(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Fa(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=cc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=cc(u)}catch{return l()}let c={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(mt(c.formMethod))return{path:n,submission:c};let m=Rt(n);return t&&m.search&&zu(m.search)&&u.append("index",""),m.search="?"+u,{path:yl(m),submission:c}}function Av(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function ac(e,t,n,r,l,o,i,a,u,s,c,m,p,g,x,S){let E=S?Object.values(S)[0]:x?Object.values(x)[0]:void 0,d=e.createURL(t.location),f=e.createURL(l),v=S?Object.keys(S)[0]:void 0,N=Av(n,v).filter((P,L)=>{let{route:M}=P;if(M.lazy)return!0;if(M.loader==null)return!1;if(o)return M.loader.hydrate?!0:t.loaderData[M.id]===void 0&&(!t.errors||t.errors[M.id]===void 0);if(Uv(t.loaderData,t.matches[L],P)||a.some(Z=>Z===P.route.id))return!0;let I=t.matches[L],V=P;return uc(P,ye({currentUrl:d,currentParams:I.params,nextUrl:f,nextParams:V.params},r,{actionResult:E,defaultShouldRevalidate:i||d.pathname+d.search===f.pathname+f.search||d.search!==f.search||Xf(I,V)}))}),y=[];return c.forEach((P,L)=>{if(o||!n.some(b=>b.route.id===P.routeId)||s.has(L))return;let M=Zn(p,P.path,g);if(!M){y.push({key:L,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(L),V=Da(M,P.path),Z=!1;m.has(L)?Z=!1:u.includes(L)?Z=!0:I&&I.state!=="idle"&&I.data===void 0?Z=i:Z=uc(V,ye({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:f,nextParams:n[n.length-1].params},r,{actionResult:E,defaultShouldRevalidate:i})),Z&&y.push({key:L,routeId:P.routeId,path:P.path,matches:M,match:V,controller:new AbortController})}),[N,y]}function Uv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Xf(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function uc(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function sc(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];K(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";un(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!ov.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,ye({},t(l),{lazy:void 0}))}async function Rr(e,t,n,r,l,o,i,a,u){u===void 0&&(u={});let s,c,m,p=S=>{let E,d=new Promise((f,v)=>E=v);return m=()=>E(),t.signal.addEventListener("abort",m),Promise.race([S({request:t,params:n.params,context:u.requestContext}),d])};try{let S=n.route[e];if(n.route.lazy)if(S){let E,d=await Promise.all([p(S).catch(f=>{E=f}),sc(n.route,o,l)]);if(E)throw E;c=d[0]}else if(await sc(n.route,o,l),S=n.route[e],S)c=await p(S);else if(e==="action"){let E=new URL(t.url),d=E.pathname+E.search;throw rt(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:ve.data,data:void 0};else if(S)c=await p(S);else{let E=new URL(t.url),d=E.pathname+E.search;throw rt(404,{pathname:d})}K(c!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(S){s=ve.error,c=S}finally{m&&t.signal.removeEventListener("abort",m)}if(Vv(c)){let S=c.status;if(Fv.has(S)){let d=c.headers.get("Location");if(K(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!Yf.test(d))d=ja(new URL(t.url),r.slice(0,r.indexOf(n)+1),i,!0,d,a);else if(!u.isStaticRequest){let f=new URL(t.url),v=d.startsWith("//")?new URL(f.protocol+d):new URL(d),C=wl(v.pathname,i)!=null;v.origin===f.origin&&C&&(d=v.pathname+v.search+v.hash)}if(u.isStaticRequest)throw c.headers.set("Location",d),c;return{type:ve.redirect,status:S,location:d,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(u.isRouteRequest)throw{type:s===ve.error?ve.error:ve.data,response:c};let E;try{let d=c.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?c.body==null?E=null:E=await c.json():E=await c.text()}catch(d){return{type:ve.error,error:d}}return s===ve.error?{type:s,error:new Ou(S,c.statusText,E),headers:c.headers}:{type:ve.data,data:E,statusCode:c.status,headers:c.headers}}if(s===ve.error)return{type:s,error:c};if(Hv(c)){var g,x;return{type:ve.deferred,deferredData:c,statusCode:(g=c.init)==null?void 0:g.status,headers:((x=c.init)==null?void 0:x.headers)&&new Headers(c.init.headers)}}return{type:ve.data,data:c}}function Pr(e,t,n,r){let l=e.createURL(Jf(t)).toString(),o={signal:n};if(r&&mt(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Fa(r.formData):o.body=r.formData}return new Request(l,o)}function Fa(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function cc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $v(e,t,n,r,l){let o={},i=null,a,u=!1,s={};return n.forEach((c,m)=>{let p=t[m].route.id;if(K(!kn(c),"Cannot handle redirect results in processLoaderData"),qn(c)){let g=Kr(e,p),x=c.error;r&&(x=Object.values(r)[0],r=void 0),i=i||{},i[g.route.id]==null&&(i[g.route.id]=x),o[p]=void 0,u||(u=!0,a=Qf(c.error)?c.error.status:500),c.headers&&(s[p]=c.headers)}else En(c)?(l.set(p,c.deferredData),o[p]=c.deferredData.data):o[p]=c.data,c.statusCode!=null&&c.statusCode!==200&&!u&&(a=c.statusCode),c.headers&&(s[p]=c.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function dc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=$v(t,n,r,l,a);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function pc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function rt(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?a="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(i="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",a='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?a="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(a='Invalid request method "'+l.toUpperCase()+'"')),new Ou(e||500,i,new Error(a),!0)}function hc(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(kn(n))return{result:n,idx:t}}}function Jf(e){let t=typeof e=="string"?Rt(e):e;return yl(ye({},t,{hash:""}))}function Bv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function En(e){return e.type===ve.deferred}function qn(e){return e.type===ve.error}function kn(e){return(e&&e.type)===ve.redirect}function Hv(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Wv(e){return jv.has(e.toLowerCase())}function mt(e){return Nv.has(e.toLowerCase())}async function mc(e,t,n,r,l,o){for(let i=0;im.route.id===u.route.id),c=s!=null&&!Xf(s,u)&&(o&&o[u.route.id])!==void 0;if(En(a)&&(l||c)){let m=r[i];K(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await Zf(a,m,l).then(p=>{p&&(n[i]=p||n[i])})}}}async function Zf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ve.data,data:e.deferredData.unwrappedData}}catch(l){return{type:ve.error,error:l}}return{type:ve.data,data:e.deferredData.data}}}function zu(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Da(e,t){let n=typeof t=="string"?Rt(t).search:t.search;if(e[e.length-1].route.index&&zu(n||""))return e[e.length-1];let r=Wf(e);return r[r.length-1]}function vc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Di(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qv(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Nr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Kv(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Vt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Yv(e,t){try{let n=e.sessionStorage.getItem(Gf);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function Gv(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Gf,JSON.stringify(n))}catch(r){un(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function ye(){return ye=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function un(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rv(){return Math.random().toString(36).substr(2,8)}function lc(e,t){return{usr:e.state,key:e.key,idx:t}}function fl(e,t,n,r){return n===void 0&&(n=null),ye({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Rt(t):t,{state:n,key:t&&t.key||r||rv()})}function yl(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 Rt(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 lv(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=we.Pop,u=null,s=c();s==null&&(s=0,i.replaceState(ye({},i.state,{idx:s}),""));function c(){return(i.state||{idx:null}).idx}function m(){a=we.Pop;let E=c(),d=E==null?null:E-s;s=E,u&&u({action:a,location:S.location,delta:d})}function p(E,d){a=we.Push;let f=fl(S.location,E,d);n&&n(f,E),s=c()+1;let v=lc(f,s),C=S.createHref(f);try{i.pushState(v,"",C)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;l.location.assign(C)}o&&u&&u({action:a,location:S.location,delta:1})}function g(E,d){a=we.Replace;let f=fl(S.location,E,d);n&&n(f,E),s=c();let v=lc(f,s),C=S.createHref(f);i.replaceState(v,"",C),o&&u&&u({action:a,location:S.location,delta:0})}function x(E){let d=l.location.origin!=="null"?l.location.origin:l.location.href,f=typeof E=="string"?E:yl(E);return K(d,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,d)}let S={get action(){return a},get location(){return e(l,i)},listen(E){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(rc,m),u=E,()=>{l.removeEventListener(rc,m),u=null}},createHref(E){return t(l,E)},createURL:x,encodeLocation(E){let d=x(E);return{pathname:d.pathname,search:d.search,hash:d.hash}},push:p,replace:g,go(E){return i.go(E)}};return S}var ve;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ve||(ve={}));const ov=new Set(["lazy","caseSensitive","path","id","index","children"]);function iv(e){return e.index===!0}function La(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],a=typeof l.id=="string"?l.id:i.join("-");if(K(l.index!==!0||!l.children,"Cannot specify children on an index route"),K(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),iv(l)){let u=ye({},l,t(l),{id:a});return r[a]=u,u}else{let u=ye({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=La(l.children,t,i,r)),u}})}function Zn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Rt(t):t,l=wl(r.pathname||"/",n);if(l==null)return null;let o=Hf(e);uv(o);let i=null;for(let a=0;i==null&&a{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(K(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 s=Tn([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(K(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Hf(o.children,t,c,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:mv(s,o.index),routesMeta:c})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Vf(o.path))l(o,i,u)}),t}function Vf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=Vf(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function uv(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:vv(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const sv=/^:[\w-]+$/,cv=3,dv=2,fv=1,pv=10,hv=-2,oc=e=>e==="*";function mv(e,t){let n=e.split("/"),r=n.length;return n.some(oc)&&(r+=hv),t&&(r+=dv),n.filter(l=>!oc(l)).reduce((l,o)=>l+(sv.test(o)?cv:o===""?fv:pv),r)}function vv(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 gv(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{let{paramName:p,isOptional:g}=c;if(p==="*"){let S=a[m]||"";i=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const x=a[m];return g&&!x?s[p]=void 0:s[p]=Sv(x||"",p),s},{}),pathname:o,pathnameBase:i,pattern:e}}function wv(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),un(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,(i,a,u)=>(r.push({paramName:a,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 xv(e){try{return decodeURI(e)}catch(t){return un(!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 Sv(e,t){try{return decodeURIComponent(e)}catch(n){return un(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function wl(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)||"/"}function Ev(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Rt(e):e;return{pathname:n?n.startsWith("/")?n:kv(n,t):t,search:Rv(r),hash:Pv(l)}}function kv(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 ji(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 Wf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Cv(e,t){let n=Wf(e);return t?n.map((r,l)=>l===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function _v(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Rt(e):(l=ye({},e),K(!l.pathname||!l.pathname.includes("?"),ji("?","pathname","search",l)),K(!l.pathname||!l.pathname.includes("#"),ji("#","pathname","hash",l)),K(!l.search||!l.search.includes("#"),ji("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let m=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),m-=1;l.pathname=p.join("/")}a=m>=0?t[m]:"/"}let u=Ev(l,a),s=i&&i!=="/"&&i.endsWith("/"),c=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||c)&&(u.pathname+="/"),u}const Tn=e=>e.join("/").replace(/\/\/+/g,"/"),Tv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Rv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Pv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Mu{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Qf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Kf=["post","put","patch","delete"],Nv=new Set(Kf),Lv=["get",...Kf],jv=new Set(Lv),Fv=new Set([301,302,303,307,308]),Dv=new Set([307,308]),Fi={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ov={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Yf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Mv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Gf="remix-router-transitions";function zv(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;K(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let w=e.detectErrorBoundary;l=k=>({hasErrorBoundary:w(k)})}else l=Mv;let o={},i=La(e.routes,l,void 0,o),a,u=e.basename||"/",s=ye({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1},e.future),c=null,m=new Set,p=null,g=null,x=null,S=e.hydrationData!=null,E=Zn(i,e.history.location,u),d=null;if(E==null){let w=rt(404,{pathname:e.history.location.pathname}),{matches:k,route:T}=pc(i);E=k,d={[T.id]:w}}let f,v=E.some(w=>w.route.lazy),C=E.some(w=>w.route.loader);if(v)f=!1;else if(!C)f=!0;else if(s.v7_partialHydration){let w=e.hydrationData?e.hydrationData.loaderData:null,k=e.hydrationData?e.hydrationData.errors:null;f=E.every(T=>T.route.loader&&T.route.loader.hydrate!==!0&&(w&&w[T.route.id]!==void 0||k&&k[T.route.id]!==void 0))}else f=e.hydrationData!=null;let N,y={historyAction:e.history.action,location:e.history.location,matches:E,initialized:f,navigation:Fi,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||d,fetchers:new Map,blockers:new Map},P=we.Pop,L=!1,O,I=!1,V=new Map,Z=null,b=!1,re=!1,He=[],me=[],X=new Map,F=0,U=-1,H=new Map,q=new Set,ie=new Map,xt=new Map,Pe=new Set,dt=new Map,Ie=new Map,At=!1;function fp(){if(c=e.history.listen(w=>{let{action:k,location:T,delta:D}=w;if(At){At=!1;return}un(Ie.size===0||D!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let z=Qu({currentLocation:y.location,nextLocation:T,historyAction:k});if(z&&D!=null){At=!0,e.history.go(D*-1),El(z,{state:"blocked",location:T,proceed(){El(z,{state:"proceeding",proceed:void 0,reset:void 0,location:T}),e.history.go(D)},reset(){let Q=new Map(y.blockers);Q.set(z,Tr),Xe({blockers:Q})}});return}return fn(k,T)}),n){Yv(t,V);let w=()=>Gv(t,V);t.addEventListener("pagehide",w),Z=()=>t.removeEventListener("pagehide",w)}return y.initialized||fn(we.Pop,y.location,{initialHydration:!0}),N}function pp(){c&&c(),Z&&Z(),m.clear(),O&&O.abort(),y.fetchers.forEach((w,k)=>Sl(k)),y.blockers.forEach((w,k)=>Wu(k))}function hp(w){return m.add(w),()=>m.delete(w)}function Xe(w,k){k===void 0&&(k={}),y=ye({},y,w);let T=[],D=[];s.v7_fetcherPersist&&y.fetchers.forEach((z,Q)=>{z.state==="idle"&&(Pe.has(Q)?D.push(Q):T.push(Q))}),[...m].forEach(z=>z(y,{deletedFetchers:D,unstable_viewTransitionOpts:k.viewTransitionOpts,unstable_flushSync:k.flushSync===!0})),s.v7_fetcherPersist&&(T.forEach(z=>y.fetchers.delete(z)),D.forEach(z=>Sl(z)))}function mr(w,k,T){var D,z;let{flushSync:Q}=T===void 0?{}:T,B=y.actionData!=null&&y.navigation.formMethod!=null&&mt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((D=w.state)==null?void 0:D._isRedirect)!==!0,$;k.actionData?Object.keys(k.actionData).length>0?$=k.actionData:$=null:B?$=y.actionData:$=null;let A=k.loaderData?fc(y.loaderData,k.loaderData,k.matches||[],k.errors):y.loaderData,G=y.blockers;G.size>0&&(G=new Map(G),G.forEach((le,Ne)=>G.set(Ne,Tr)));let Ce=L===!0||y.navigation.formMethod!=null&&mt(y.navigation.formMethod)&&((z=w.state)==null?void 0:z._isRedirect)!==!0;a&&(i=a,a=void 0),b||P===we.Pop||(P===we.Push?e.history.push(w,w.state):P===we.Replace&&e.history.replace(w,w.state));let W;if(P===we.Pop){let le=V.get(y.location.pathname);le&&le.has(w.pathname)?W={currentLocation:y.location,nextLocation:w}:V.has(w.pathname)&&(W={currentLocation:w,nextLocation:y.location})}else if(I){let le=V.get(y.location.pathname);le?le.add(w.pathname):(le=new Set([w.pathname]),V.set(y.location.pathname,le)),W={currentLocation:y.location,nextLocation:w}}Xe(ye({},k,{actionData:$,loaderData:A,historyAction:P,location:w,initialized:!0,navigation:Fi,revalidation:"idle",restoreScrollPosition:Yu(w,k.matches||y.matches),preventScrollReset:Ce,blockers:G}),{viewTransitionOpts:W,flushSync:Q===!0}),P=we.Pop,L=!1,I=!1,b=!1,re=!1,He=[],me=[]}async function Au(w,k){if(typeof w=="number"){e.history.go(w);return}let T=ja(y.location,y.matches,u,s.v7_prependBasename,w,s.v7_relativeSplatPath,k==null?void 0:k.fromRouteId,k==null?void 0:k.relative),{path:D,submission:z,error:Q}=ic(s.v7_normalizeFormMethod,!1,T,k),B=y.location,$=fl(y.location,D,k&&k.state);$=ye({},$,e.history.encodeLocation($));let A=k&&k.replace!=null?k.replace:void 0,G=we.Push;A===!0?G=we.Replace:A===!1||z!=null&&mt(z.formMethod)&&z.formAction===y.location.pathname+y.location.search&&(G=we.Replace);let Ce=k&&"preventScrollReset"in k?k.preventScrollReset===!0:void 0,W=(k&&k.unstable_flushSync)===!0,le=Qu({currentLocation:B,nextLocation:$,historyAction:G});if(le){El(le,{state:"blocked",location:$,proceed(){El(le,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),Au(w,k)},reset(){let Ne=new Map(y.blockers);Ne.set(le,Tr),Xe({blockers:Ne})}});return}return await fn(G,$,{submission:z,pendingError:Q,preventScrollReset:Ce,replace:k&&k.replace,enableViewTransition:k&&k.unstable_viewTransition,flushSync:W})}function mp(){if(qo(),Xe({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){fn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}fn(P||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation})}}async function fn(w,k,T){O&&O.abort(),O=null,P=w,b=(T&&T.startUninterruptedRevalidation)===!0,Cp(y.location,y.matches),L=(T&&T.preventScrollReset)===!0,I=(T&&T.enableViewTransition)===!0;let D=a||i,z=T&&T.overrideNavigation,Q=Zn(D,k,u),B=(T&&T.flushSync)===!0;if(!Q){let Ne=rt(404,{pathname:k.pathname}),{matches:nt,route:_e}=pc(D);bo(),mr(k,{matches:nt,loaderData:{},errors:{[_e.id]:Ne}},{flushSync:B});return}if(y.initialized&&!re&&Bv(y.location,k)&&!(T&&T.submission&&mt(T.submission.formMethod))){mr(k,{matches:Q},{flushSync:B});return}O=new AbortController;let $=Pr(e.history,k,O.signal,T&&T.submission),A,G;if(T&&T.pendingError)G={[Kr(Q).route.id]:T.pendingError};else if(T&&T.submission&&mt(T.submission.formMethod)){let Ne=await vp($,k,T.submission,Q,{replace:T.replace,flushSync:B});if(Ne.shortCircuited)return;A=Ne.pendingActionData,G=Ne.pendingActionError,z=Di(k,T.submission),B=!1,$=new Request($.url,{signal:$.signal})}let{shortCircuited:Ce,loaderData:W,errors:le}=await gp($,k,Q,z,T&&T.submission,T&&T.fetcherSubmission,T&&T.replace,T&&T.initialHydration===!0,B,A,G);Ce||(O=null,mr(k,ye({matches:Q},A?{actionData:A}:{},{loaderData:W,errors:le})))}async function vp(w,k,T,D,z){z===void 0&&(z={}),qo();let Q=Qv(k,T);Xe({navigation:Q},{flushSync:z.flushSync===!0});let B,$=Da(D,k);if(!$.route.action&&!$.route.lazy)B={type:ve.error,error:rt(405,{method:w.method,pathname:k.pathname,routeId:$.route.id})};else if(B=await Rr("action",w,$,D,o,l,u,s.v7_relativeSplatPath),w.signal.aborted)return{shortCircuited:!0};if(kn(B)){let A;return z&&z.replace!=null?A=z.replace:A=B.location===y.location.pathname+y.location.search,await vr(y,B,{submission:T,replace:A}),{shortCircuited:!0}}if(qn(B)){let A=Kr(D,$.route.id);return(z&&z.replace)!==!0&&(P=we.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:B.error}}}if(En(B))throw rt(400,{type:"defer-action"});return{pendingActionData:{[$.route.id]:B.data}}}async function gp(w,k,T,D,z,Q,B,$,A,G,Ce){let W=D||Di(k,z),le=z||Q||vc(W),Ne=a||i,[nt,_e]=ac(e.history,y,T,le,k,s.v7_partialHydration&&$===!0,re,He,me,Pe,ie,q,Ne,u,G,Ce);if(bo(te=>!(T&&T.some(se=>se.route.id===te))||nt&&nt.some(se=>se.route.id===te)),U=++F,nt.length===0&&_e.length===0){let te=Hu();return mr(k,ye({matches:T,loaderData:{},errors:Ce||null},G?{actionData:G}:{},te?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A}),{shortCircuited:!0}}if(!b&&(!s.v7_partialHydration||!$)){_e.forEach(se=>{let St=y.fetchers.get(se.key),Cl=Nr(void 0,St?St.data:void 0);y.fetchers.set(se.key,Cl)});let te=G||y.actionData;Xe(ye({navigation:W},te?Object.keys(te).length===0?{actionData:null}:{actionData:te}:{},_e.length>0?{fetchers:new Map(y.fetchers)}:{}),{flushSync:A})}_e.forEach(te=>{X.has(te.key)&&$t(te.key),te.controller&&X.set(te.key,te.controller)});let Mn=()=>_e.forEach(te=>$t(te.key));O&&O.signal.addEventListener("abort",Mn);let{results:ei,loaderResults:zn,fetcherResults:Bt}=await Uu(y.matches,T,nt,_e,w);if(w.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",Mn),_e.forEach(te=>X.delete(te.key));let pn=hc(ei);if(pn){if(pn.idx>=nt.length){let te=_e[pn.idx-nt.length].key;q.add(te)}return await vr(y,pn.result,{replace:B}),{shortCircuited:!0}}let{loaderData:ti,errors:ni}=dc(y,T,nt,zn,Ce,_e,Bt,dt);dt.forEach((te,se)=>{te.subscribe(St=>{(St||te.done)&&dt.delete(se)})});let ri=Hu(),In=Vu(U),kl=ri||In||_e.length>0;return ye({loaderData:ti,errors:ni},kl?{fetchers:new Map(y.fetchers)}:{})}function yp(w,k,T,D){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");X.has(w)&&$t(w);let z=(D&&D.unstable_flushSync)===!0,Q=a||i,B=ja(y.location,y.matches,u,s.v7_prependBasename,T,s.v7_relativeSplatPath,k,D==null?void 0:D.relative),$=Zn(Q,B,u);if(!$){gr(w,k,rt(404,{pathname:B}),{flushSync:z});return}let{path:A,submission:G,error:Ce}=ic(s.v7_normalizeFormMethod,!0,B,D);if(Ce){gr(w,k,Ce,{flushSync:z});return}let W=Da($,A);if(L=(D&&D.preventScrollReset)===!0,G&&mt(G.formMethod)){wp(w,k,A,W,$,z,G);return}ie.set(w,{routeId:k,path:A}),xp(w,k,A,W,$,z,G)}async function wp(w,k,T,D,z,Q,B){if(qo(),ie.delete(w),!D.route.action&&!D.route.lazy){let se=rt(405,{method:B.formMethod,pathname:T,routeId:k});gr(w,k,se,{flushSync:Q});return}let $=y.fetchers.get(w);Ut(w,Kv(B,$),{flushSync:Q});let A=new AbortController,G=Pr(e.history,T,A.signal,B);X.set(w,A);let Ce=F,W=await Rr("action",G,D,z,o,l,u,s.v7_relativeSplatPath);if(G.signal.aborted){X.get(w)===A&&X.delete(w);return}if(s.v7_fetcherPersist&&Pe.has(w)){if(kn(W)||qn(W)){Ut(w,Vt(void 0));return}}else{if(kn(W))if(X.delete(w),U>Ce){Ut(w,Vt(void 0));return}else return q.add(w),Ut(w,Nr(B)),vr(y,W,{fetcherSubmission:B});if(qn(W)){gr(w,k,W.error);return}}if(En(W))throw rt(400,{type:"defer-action"});let le=y.navigation.location||y.location,Ne=Pr(e.history,le,A.signal),nt=a||i,_e=y.navigation.state!=="idle"?Zn(nt,y.navigation.location,u):y.matches;K(_e,"Didn't find any matches after fetcher action");let Mn=++F;H.set(w,Mn);let ei=Nr(B,W.data);y.fetchers.set(w,ei);let[zn,Bt]=ac(e.history,y,_e,B,le,!1,re,He,me,Pe,ie,q,nt,u,{[D.route.id]:W.data},void 0);Bt.filter(se=>se.key!==w).forEach(se=>{let St=se.key,Cl=y.fetchers.get(St),Tp=Nr(void 0,Cl?Cl.data:void 0);y.fetchers.set(St,Tp),X.has(St)&&$t(St),se.controller&&X.set(St,se.controller)}),Xe({fetchers:new Map(y.fetchers)});let pn=()=>Bt.forEach(se=>$t(se.key));A.signal.addEventListener("abort",pn);let{results:ti,loaderResults:ni,fetcherResults:ri}=await Uu(y.matches,_e,zn,Bt,Ne);if(A.signal.aborted)return;A.signal.removeEventListener("abort",pn),H.delete(w),X.delete(w),Bt.forEach(se=>X.delete(se.key));let In=hc(ti);if(In){if(In.idx>=zn.length){let se=Bt[In.idx-zn.length].key;q.add(se)}return vr(y,In.result)}let{loaderData:kl,errors:te}=dc(y,y.matches,zn,ni,void 0,Bt,ri,dt);if(y.fetchers.has(w)){let se=Vt(W.data);y.fetchers.set(w,se)}Vu(Mn),y.navigation.state==="loading"&&Mn>U?(K(P,"Expected pending action"),O&&O.abort(),mr(y.navigation.location,{matches:_e,loaderData:kl,errors:te,fetchers:new Map(y.fetchers)})):(Xe({errors:te,loaderData:fc(y.loaderData,kl,_e,te),fetchers:new Map(y.fetchers)}),re=!1)}async function xp(w,k,T,D,z,Q,B){let $=y.fetchers.get(w);Ut(w,Nr(B,$?$.data:void 0),{flushSync:Q});let A=new AbortController,G=Pr(e.history,T,A.signal);X.set(w,A);let Ce=F,W=await Rr("loader",G,D,z,o,l,u,s.v7_relativeSplatPath);if(En(W)&&(W=await Zf(W,G.signal,!0)||W),X.get(w)===A&&X.delete(w),!G.signal.aborted){if(Pe.has(w)){Ut(w,Vt(void 0));return}if(kn(W))if(U>Ce){Ut(w,Vt(void 0));return}else{q.add(w),await vr(y,W);return}if(qn(W)){gr(w,k,W.error);return}K(!En(W),"Unhandled fetcher deferred data"),Ut(w,Vt(W.data))}}async function vr(w,k,T){let{submission:D,fetcherSubmission:z,replace:Q}=T===void 0?{}:T;k.revalidate&&(re=!0);let B=fl(w.location,k.location,{_isRedirect:!0});if(K(B,"Expected a location on the redirect navigation"),n){let le=!1;if(k.reloadDocument)le=!0;else if(Yf.test(k.location)){const Ne=e.history.createURL(k.location);le=Ne.origin!==t.location.origin||wl(Ne.pathname,u)==null}if(le){Q?t.location.replace(k.location):t.location.assign(k.location);return}}O=null;let $=Q===!0?we.Replace:we.Push,{formMethod:A,formAction:G,formEncType:Ce}=w.navigation;!D&&!z&&A&&G&&Ce&&(D=vc(w.navigation));let W=D||z;if(Dv.has(k.status)&&W&&mt(W.formMethod))await fn($,B,{submission:ye({},W,{formAction:k.location}),preventScrollReset:L});else{let le=Di(B,D);await fn($,B,{overrideNavigation:le,fetcherSubmission:z,preventScrollReset:L})}}async function Uu(w,k,T,D,z){let Q=await Promise.all([...T.map(A=>Rr("loader",z,A,k,o,l,u,s.v7_relativeSplatPath)),...D.map(A=>A.matches&&A.match&&A.controller?Rr("loader",Pr(e.history,A.path,A.controller.signal),A.match,A.matches,o,l,u,s.v7_relativeSplatPath):{type:ve.error,error:rt(404,{pathname:A.path})})]),B=Q.slice(0,T.length),$=Q.slice(T.length);return await Promise.all([mc(w,T,B,B.map(()=>z.signal),!1,y.loaderData),mc(w,D.map(A=>A.match),$,D.map(A=>A.controller?A.controller.signal:null),!0)]),{results:Q,loaderResults:B,fetcherResults:$}}function qo(){re=!0,He.push(...bo()),ie.forEach((w,k)=>{X.has(k)&&(me.push(k),$t(k))})}function Ut(w,k,T){T===void 0&&(T={}),y.fetchers.set(w,k),Xe({fetchers:new Map(y.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function gr(w,k,T,D){D===void 0&&(D={});let z=Kr(y.matches,k);Sl(w),Xe({errors:{[z.route.id]:T},fetchers:new Map(y.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function $u(w){return s.v7_fetcherPersist&&(xt.set(w,(xt.get(w)||0)+1),Pe.has(w)&&Pe.delete(w)),y.fetchers.get(w)||Ov}function Sl(w){let k=y.fetchers.get(w);X.has(w)&&!(k&&k.state==="loading"&&H.has(w))&&$t(w),ie.delete(w),H.delete(w),q.delete(w),Pe.delete(w),y.fetchers.delete(w)}function Sp(w){if(s.v7_fetcherPersist){let k=(xt.get(w)||0)-1;k<=0?(xt.delete(w),Pe.add(w)):xt.set(w,k)}else Sl(w);Xe({fetchers:new Map(y.fetchers)})}function $t(w){let k=X.get(w);K(k,"Expected fetch controller: "+w),k.abort(),X.delete(w)}function Bu(w){for(let k of w){let T=$u(k),D=Vt(T.data);y.fetchers.set(k,D)}}function Hu(){let w=[],k=!1;for(let T of q){let D=y.fetchers.get(T);K(D,"Expected fetcher: "+T),D.state==="loading"&&(q.delete(T),w.push(T),k=!0)}return Bu(w),k}function Vu(w){let k=[];for(let[T,D]of H)if(D0}function Ep(w,k){let T=y.blockers.get(w)||Tr;return Ie.get(w)!==k&&Ie.set(w,k),T}function Wu(w){y.blockers.delete(w),Ie.delete(w)}function El(w,k){let T=y.blockers.get(w)||Tr;K(T.state==="unblocked"&&k.state==="blocked"||T.state==="blocked"&&k.state==="blocked"||T.state==="blocked"&&k.state==="proceeding"||T.state==="blocked"&&k.state==="unblocked"||T.state==="proceeding"&&k.state==="unblocked","Invalid blocker state transition: "+T.state+" -> "+k.state);let D=new Map(y.blockers);D.set(w,k),Xe({blockers:D})}function Qu(w){let{currentLocation:k,nextLocation:T,historyAction:D}=w;if(Ie.size===0)return;Ie.size>1&&un(!1,"A router only supports one blocker at a time");let z=Array.from(Ie.entries()),[Q,B]=z[z.length-1],$=y.blockers.get(Q);if(!($&&$.state==="proceeding")&&B({currentLocation:k,nextLocation:T,historyAction:D}))return Q}function bo(w){let k=[];return dt.forEach((T,D)=>{(!w||w(D))&&(T.cancel(),k.push(D),dt.delete(D))}),k}function kp(w,k,T){if(p=w,x=k,g=T||null,!S&&y.navigation===Fi){S=!0;let D=Yu(y.location,y.matches);D!=null&&Xe({restoreScrollPosition:D})}return()=>{p=null,x=null,g=null}}function Ku(w,k){return g&&g(w,k.map(D=>av(D,y.loaderData)))||w.key}function Cp(w,k){if(p&&x){let T=Ku(w,k);p[T]=x()}}function Yu(w,k){if(p){let T=Ku(w,k),D=p[T];if(typeof D=="number")return D}return null}function _p(w){o={},a=La(w,l,void 0,o)}return N={get basename(){return u},get future(){return s},get state(){return y},get routes(){return i},get window(){return t},initialize:fp,subscribe:hp,enableScrollRestoration:kp,navigate:Au,fetch:yp,revalidate:mp,createHref:w=>e.history.createHref(w),encodeLocation:w=>e.history.encodeLocation(w),getFetcher:$u,deleteFetcher:Sp,dispose:pp,getBlocker:Ep,deleteBlocker:Wu,_internalFetchControllers:X,_internalActiveDeferreds:dt,_internalSetRoutes:_p},N}function Iv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function ja(e,t,n,r,l,o,i,a){let u,s;if(i){u=[];for(let m of t)if(u.push(m),m.route.id===i){s=m;break}}else u=t,s=t[t.length-1];let c=_v(l||".",Cv(u,o),wl(e.pathname,n)||e.pathname,a==="path");return l==null&&(c.search=e.search,c.hash=e.hash),(l==null||l===""||l===".")&&s&&s.route.index&&!zu(c.search)&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:Tn([n,c.pathname])),yl(c)}function ic(e,t,n,r){if(!r||!Iv(r))return{path:n};if(r.formMethod&&!Wv(r.formMethod))return{path:n,error:rt(405,{method:r.formMethod})};let l=()=>({path:n,error:rt(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=Jf(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!mt(i))return l();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,x)=>{let[S,E]=x;return""+g+S+"="+E+` +`},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!mt(i))return l();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return l()}}}K(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Fa(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Fa(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=cc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=cc(u)}catch{return l()}let c={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(mt(c.formMethod))return{path:n,submission:c};let m=Rt(n);return t&&m.search&&zu(m.search)&&u.append("index",""),m.search="?"+u,{path:yl(m),submission:c}}function Av(e,t){let n=e;if(t){let r=e.findIndex(l=>l.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function ac(e,t,n,r,l,o,i,a,u,s,c,m,p,g,x,S){let E=S?Object.values(S)[0]:x?Object.values(x)[0]:void 0,d=e.createURL(t.location),f=e.createURL(l),v=S?Object.keys(S)[0]:void 0,N=Av(n,v).filter((P,L)=>{let{route:O}=P;if(O.lazy)return!0;if(O.loader==null)return!1;if(o)return O.loader.hydrate?!0:t.loaderData[O.id]===void 0&&(!t.errors||t.errors[O.id]===void 0);if(Uv(t.loaderData,t.matches[L],P)||a.some(Z=>Z===P.route.id))return!0;let I=t.matches[L],V=P;return uc(P,ye({currentUrl:d,currentParams:I.params,nextUrl:f,nextParams:V.params},r,{actionResult:E,defaultShouldRevalidate:i||d.pathname+d.search===f.pathname+f.search||d.search!==f.search||Xf(I,V)}))}),y=[];return c.forEach((P,L)=>{if(o||!n.some(b=>b.route.id===P.routeId)||s.has(L))return;let O=Zn(p,P.path,g);if(!O){y.push({key:L,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let I=t.fetchers.get(L),V=Da(O,P.path),Z=!1;m.has(L)?Z=!1:u.includes(L)?Z=!0:I&&I.state!=="idle"&&I.data===void 0?Z=i:Z=uc(V,ye({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:f,nextParams:n[n.length-1].params},r,{actionResult:E,defaultShouldRevalidate:i})),Z&&y.push({key:L,routeId:P.routeId,path:P.path,matches:O,match:V,controller:new AbortController})}),[N,y]}function Uv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Xf(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function uc(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function sc(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];K(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";un(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!ov.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,ye({},t(l),{lazy:void 0}))}async function Rr(e,t,n,r,l,o,i,a,u){u===void 0&&(u={});let s,c,m,p=S=>{let E,d=new Promise((f,v)=>E=v);return m=()=>E(),t.signal.addEventListener("abort",m),Promise.race([S({request:t,params:n.params,context:u.requestContext}),d])};try{let S=n.route[e];if(n.route.lazy)if(S){let E,d=await Promise.all([p(S).catch(f=>{E=f}),sc(n.route,o,l)]);if(E)throw E;c=d[0]}else if(await sc(n.route,o,l),S=n.route[e],S)c=await p(S);else if(e==="action"){let E=new URL(t.url),d=E.pathname+E.search;throw rt(405,{method:t.method,pathname:d,routeId:n.route.id})}else return{type:ve.data,data:void 0};else if(S)c=await p(S);else{let E=new URL(t.url),d=E.pathname+E.search;throw rt(404,{pathname:d})}K(c!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(S){s=ve.error,c=S}finally{m&&t.signal.removeEventListener("abort",m)}if(Vv(c)){let S=c.status;if(Fv.has(S)){let d=c.headers.get("Location");if(K(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!Yf.test(d))d=ja(new URL(t.url),r.slice(0,r.indexOf(n)+1),i,!0,d,a);else if(!u.isStaticRequest){let f=new URL(t.url),v=d.startsWith("//")?new URL(f.protocol+d):new URL(d),C=wl(v.pathname,i)!=null;v.origin===f.origin&&C&&(d=v.pathname+v.search+v.hash)}if(u.isStaticRequest)throw c.headers.set("Location",d),c;return{type:ve.redirect,status:S,location:d,revalidate:c.headers.get("X-Remix-Revalidate")!==null,reloadDocument:c.headers.get("X-Remix-Reload-Document")!==null}}if(u.isRouteRequest)throw{type:s===ve.error?ve.error:ve.data,response:c};let E;try{let d=c.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?c.body==null?E=null:E=await c.json():E=await c.text()}catch(d){return{type:ve.error,error:d}}return s===ve.error?{type:s,error:new Mu(S,c.statusText,E),headers:c.headers}:{type:ve.data,data:E,statusCode:c.status,headers:c.headers}}if(s===ve.error)return{type:s,error:c};if(Hv(c)){var g,x;return{type:ve.deferred,deferredData:c,statusCode:(g=c.init)==null?void 0:g.status,headers:((x=c.init)==null?void 0:x.headers)&&new Headers(c.init.headers)}}return{type:ve.data,data:c}}function Pr(e,t,n,r){let l=e.createURL(Jf(t)).toString(),o={signal:n};if(r&&mt(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=Fa(r.formData):o.body=r.formData}return new Request(l,o)}function Fa(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function cc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function $v(e,t,n,r,l){let o={},i=null,a,u=!1,s={};return n.forEach((c,m)=>{let p=t[m].route.id;if(K(!kn(c),"Cannot handle redirect results in processLoaderData"),qn(c)){let g=Kr(e,p),x=c.error;r&&(x=Object.values(r)[0],r=void 0),i=i||{},i[g.route.id]==null&&(i[g.route.id]=x),o[p]=void 0,u||(u=!0,a=Qf(c.error)?c.error.status:500),c.headers&&(s[p]=c.headers)}else En(c)?(l.set(p,c.deferredData),o[p]=c.deferredData.data):o[p]=c.data,c.statusCode!=null&&c.statusCode!==200&&!u&&(a=c.statusCode),c.headers&&(s[p]=c.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function dc(e,t,n,r,l,o,i,a){let{loaderData:u,errors:s}=$v(t,n,r,l,a);for(let c=0;cr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function pc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function rt(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",a="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?a="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?a="defer() is not supported in actions":o==="invalid-body"&&(a="Unable to encode submission body")):e===403?(i="Forbidden",a='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",a='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?a="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(a='Invalid request method "'+l.toUpperCase()+'"')),new Mu(e||500,i,new Error(a),!0)}function hc(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(kn(n))return{result:n,idx:t}}}function Jf(e){let t=typeof e=="string"?Rt(e):e;return yl(ye({},t,{hash:""}))}function Bv(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function En(e){return e.type===ve.deferred}function qn(e){return e.type===ve.error}function kn(e){return(e&&e.type)===ve.redirect}function Hv(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Vv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Wv(e){return jv.has(e.toLowerCase())}function mt(e){return Nv.has(e.toLowerCase())}async function mc(e,t,n,r,l,o){for(let i=0;im.route.id===u.route.id),c=s!=null&&!Xf(s,u)&&(o&&o[u.route.id])!==void 0;if(En(a)&&(l||c)){let m=r[i];K(m,"Expected an AbortSignal for revalidating fetcher deferred result"),await Zf(a,m,l).then(p=>{p&&(n[i]=p||n[i])})}}}async function Zf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:ve.data,data:e.deferredData.unwrappedData}}catch(l){return{type:ve.error,error:l}}return{type:ve.data,data:e.deferredData.data}}}function zu(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Da(e,t){let n=typeof t=="string"?Rt(t).search:t.search;if(e[e.length-1].route.index&&zu(n||""))return e[e.length-1];let r=Wf(e);return r[r.length-1]}function vc(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function Di(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Qv(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Nr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Kv(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Vt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Yv(e,t){try{let n=e.sessionStorage.getItem(Gf);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function Gv(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Gf,JSON.stringify(n))}catch(r){un(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.22.0 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},E,{params:Object.assign({},a,E.params),pathname:Tn([u,l.encodeLocation?l.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:Tn([u,l.encodeLocation?l.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&S?R.createElement(Xo.Provider,{value:{location:Lo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:we.Pop}},S):S}function bv(){let e=ag(),t=Qf(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)"},o=null;return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:l},n):null,o)}const eg=R.createElement(bv,null);class tg extends R.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?R.createElement(xl.Provider,{value:this.props.routeContext},R.createElement(tp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ng(e){let{routeContext:t,match:n,children:r}=e,l=R.useContext(qf);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(xl.Provider,{value:t},r)}function rg(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let c=i.findIndex(m=>m.route.id&&(a==null?void 0:a[m.route.id]));c>=0||K(!1),i=i.slice(0,Math.min(i.length,c+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((c,m,p)=>{let g,x=!1,S=null,E=null;n&&(g=a&&m.route.id?a[m.route.id]:void 0,S=m.route.errorElement||eg,u&&(s<0&&p===0?(ug("route-fallback",!1),x=!0,E=null):s===p&&(x=!0,E=m.route.hydrateFallbackElement||null)));let d=t.concat(i.slice(0,p+1)),f=()=>{let v;return g?v=S:x?v=E:m.route.Component?v=R.createElement(m.route.Component,null):m.route.element?v=m.route.element:v=c,R.createElement(ng,{match:m,routeContext:{outlet:c,matches:d,isDataRoute:n!=null},children:v})};return n&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?R.createElement(tg,{location:n.location,revalidation:n.revalidation,component:S,error:g,children:f(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):f()},null)}var Ma=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}(Ma||{});function lg(e){let t=R.useContext(bf);return t||K(!1),t}function og(e){let t=R.useContext(xl);return t||K(!1),t}function ig(e){let t=og(),n=t.matches[t.matches.length-1];return n.route.id||K(!1),n.route.id}function ag(){var e;let t=R.useContext(tp),n=lg(Ma.UseRouteError),r=ig(Ma.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const gc={};function ug(e,t,n){!t&&!gc[e]&&(gc[e]=!0)}function sg(e){return Zv(e.context)}function no(e){K(!1)}function cg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=we.Pop,navigator:o,static:i=!1,future:a}=e;Iu()&&K(!1);let u=t.replace(/^\/*/,"/"),s=R.useMemo(()=>({basename:u,navigator:o,static:i,future:Lo({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=Rt(r));let{pathname:c="/",search:m="",hash:p="",state:g=null,key:x="default"}=r,S=R.useMemo(()=>{let E=wl(c,u);return E==null?null:{location:{pathname:E,search:m,hash:p,state:g,key:x},navigationType:l}},[u,c,m,p,g,x,l]);return S==null?null:R.createElement(ep.Provider,{value:s},R.createElement(Xo.Provider,{children:n,value:S}))}new Promise(()=>{});function Oa(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,l)=>{if(!R.isValidElement(r))return;let o=[...t,l];if(r.type===R.Fragment){n.push.apply(n,Oa(r.props.children,o));return}r.type!==no&&K(!1),!r.props.index||!r.props.children||K(!1);let i={id:r.props.id||o.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&&(i.children=Oa(r.props.children,o)),n.push(i)}),n}function dg(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:R.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:R.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:R.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function Lo(){return Lo=Object.assign?Object.assign.bind():function(e){for(var t=1;tObject.assign({},E,{params:Object.assign({},a,E.params),pathname:Tn([u,l.encodeLocation?l.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?u:Tn([u,l.encodeLocation?l.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,n,r);return t&&S?R.createElement(Xo.Provider,{value:{location:Lo({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:we.Pop}},S):S}function bv(){let e=ag(),t=Qf(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)"},o=null;return R.createElement(R.Fragment,null,R.createElement("h2",null,"Unexpected Application Error!"),R.createElement("h3",{style:{fontStyle:"italic"}},t),n?R.createElement("pre",{style:l},n):null,o)}const eg=R.createElement(bv,null);class tg extends R.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?R.createElement(xl.Provider,{value:this.props.routeContext},R.createElement(tp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ng(e){let{routeContext:t,match:n,children:r}=e,l=R.useContext(qf);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),R.createElement(xl.Provider,{value:t},r)}function rg(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let c=i.findIndex(m=>m.route.id&&(a==null?void 0:a[m.route.id]));c>=0||K(!1),i=i.slice(0,Math.min(i.length,c+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((c,m,p)=>{let g,x=!1,S=null,E=null;n&&(g=a&&m.route.id?a[m.route.id]:void 0,S=m.route.errorElement||eg,u&&(s<0&&p===0?(ug("route-fallback",!1),x=!0,E=null):s===p&&(x=!0,E=m.route.hydrateFallbackElement||null)));let d=t.concat(i.slice(0,p+1)),f=()=>{let v;return g?v=S:x?v=E:m.route.Component?v=R.createElement(m.route.Component,null):m.route.element?v=m.route.element:v=c,R.createElement(ng,{match:m,routeContext:{outlet:c,matches:d,isDataRoute:n!=null},children:v})};return n&&(m.route.ErrorBoundary||m.route.errorElement||p===0)?R.createElement(tg,{location:n.location,revalidation:n.revalidation,component:S,error:g,children:f(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):f()},null)}var Oa=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}(Oa||{});function lg(e){let t=R.useContext(bf);return t||K(!1),t}function og(e){let t=R.useContext(xl);return t||K(!1),t}function ig(e){let t=og(),n=t.matches[t.matches.length-1];return n.route.id||K(!1),n.route.id}function ag(){var e;let t=R.useContext(tp),n=lg(Oa.UseRouteError),r=ig(Oa.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}const gc={};function ug(e,t,n){!t&&!gc[e]&&(gc[e]=!0)}function sg(e){return Zv(e.context)}function no(e){K(!1)}function cg(e){let{basename:t="/",children:n=null,location:r,navigationType:l=we.Pop,navigator:o,static:i=!1,future:a}=e;Iu()&&K(!1);let u=t.replace(/^\/*/,"/"),s=R.useMemo(()=>({basename:u,navigator:o,static:i,future:Lo({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=Rt(r));let{pathname:c="/",search:m="",hash:p="",state:g=null,key:x="default"}=r,S=R.useMemo(()=>{let E=wl(c,u);return E==null?null:{location:{pathname:E,search:m,hash:p,state:g,key:x},navigationType:l}},[u,c,m,p,g,x,l]);return S==null?null:R.createElement(ep.Provider,{value:s},R.createElement(Xo.Provider,{children:n,value:S}))}new Promise(()=>{});function Ma(e,t){t===void 0&&(t=[]);let n=[];return R.Children.forEach(e,(r,l)=>{if(!R.isValidElement(r))return;let o=[...t,l];if(r.type===R.Fragment){n.push.apply(n,Ma(r.props.children,o));return}r.type!==no&&K(!1),!r.props.index||!r.props.children||K(!1);let i={id:r.props.id||o.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&&(i.children=Ma(r.props.children,o)),n.push(i)}),n}function dg(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:R.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:R.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:R.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.22.0 * * Copyright (c) Remix Software Inc. @@ -65,11 +65,11 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Eg(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=R.useState(n.state),[i,a]=R.useState(),[u,s]=R.useState({isTransitioning:!1}),[c,m]=R.useState(),[p,g]=R.useState(),[x,S]=R.useState(),E=R.useRef(new Map),{v7_startTransition:d}=r||{},f=R.useCallback(P=>{d?xg(P):P()},[d]),v=R.useCallback((P,L)=>{let{deletedFetchers:M,unstable_flushSync:I,unstable_viewTransitionOpts:V}=L;M.forEach(b=>E.current.delete(b)),P.fetchers.forEach((b,re)=>{b.data!==void 0&&E.current.set(re,b.data)});let Z=n.window==null||typeof n.window.document.startViewTransition!="function";if(!V||Z){I?Lr(()=>o(P)):f(()=>o(P));return}if(I){Lr(()=>{p&&(c&&c.resolve(),p.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let b=n.window.document.startViewTransition(()=>{Lr(()=>o(P))});b.finished.finally(()=>{Lr(()=>{m(void 0),g(void 0),a(void 0),s({isTransitioning:!1})})}),Lr(()=>g(b));return}p?(c&&c.resolve(),p.skipTransition(),S({state:P,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(a(P),s({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,p,c,E,f]);R.useLayoutEffect(()=>n.subscribe(v),[n,v]),R.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new Sg)},[u]),R.useEffect(()=>{if(c&&i&&n.window){let P=i,L=c.promise,M=n.window.document.startViewTransition(async()=>{f(()=>o(P)),await L});M.finished.finally(()=>{m(void 0),g(void 0),a(void 0),s({isTransitioning:!1})}),g(M)}},[f,i,c,n.window]),R.useEffect(()=>{c&&i&&l.location.key===i.location.key&&c.resolve()},[c,p,l.location,i]),R.useEffect(()=>{!u.isTransitioning&&x&&(a(x.state),s({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[u.isTransitioning,x]),R.useEffect(()=>{},[]);let C=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,L,M)=>n.navigate(P,{state:L,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(P,L,M)=>n.navigate(P,{replace:!0,state:L,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[n]),N=n.basename||"/",y=R.useMemo(()=>({router:n,navigator:C,static:!1,basename:N}),[n,C,N]);return R.createElement(R.Fragment,null,R.createElement(qf.Provider,{value:y},R.createElement(bf.Provider,{value:l},R.createElement(gg.Provider,{value:E.current},R.createElement(vg.Provider,{value:u},R.createElement(cg,{basename:N,location:l.location,navigationType:l.historyAction,navigator:C,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},l.initialized||n.future.v7_partialHydration?R.createElement(kg,{routes:n.routes,future:n.future,state:l}):t))))),null)}function kg(e){let{routes:t,future:n,state:r}=e;return qv(t,void 0,r,n)}var xc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xc||(xc={}));var Sc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sc||(Sc={}));function np(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Fn=e=>typeof e=="string",Qe=e=>typeof e=="function",ro=e=>Fn(e)||Qe(e)?e:null,Mi=e=>R.isValidElement(e)||Fn(e)||Qe(e)||Yr(e);function Cg(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:l}=e;requestAnimationFrame(()=>{l.minHeight="initial",l.height=r+"px",l.transition=`all ${n}ms`,requestAnimationFrame(()=>{l.height="0",l.padding="0",l.margin="0",setTimeout(t,n)})})}function Jo(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:l=!0,collapseDuration:o=300}=e;return function(i){let{children:a,position:u,preventExitTransition:s,done:c,nodeRef:m,isIn:p}=i;const g=r?`${t}--${u}`:t,x=r?`${n}--${u}`:n,S=R.useRef(0);return R.useLayoutEffect(()=>{const E=m.current,d=g.split(" "),f=v=>{v.target===m.current&&(E.dispatchEvent(new Event("d")),E.removeEventListener("animationend",f),E.removeEventListener("animationcancel",f),S.current===0&&v.type!=="animationcancel"&&E.classList.remove(...d))};E.classList.add(...d),E.addEventListener("animationend",f),E.addEventListener("animationcancel",f)},[]),R.useEffect(()=>{const E=m.current,d=()=>{E.removeEventListener("animationend",d),l?Cg(E,c,o):c()};p||(s?d():(S.current=1,E.className+=` ${x}`,E.addEventListener("animationend",d)))},[p]),ne.createElement(ne.Fragment,null,a)}}function Ec(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const lt={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Hl=e=>{let{theme:t,type:n,...r}=e;return ne.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},Oi={info:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return ne.createElement("div",{className:"Toastify__spinner"})}};function _g(e){const[,t]=R.useReducer(g=>g+1,0),[n,r]=R.useState([]),l=R.useRef(null),o=R.useRef(new Map).current,i=g=>n.indexOf(g)!==-1,a=R.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:i,getToast:g=>o.get(g)}).current;function u(g){let{containerId:x}=g;const{limit:S}=a.props;!S||x&&a.containerId!==x||(a.count-=a.queue.length,a.queue=[])}function s(g){r(x=>g==null?[]:x.filter(S=>S!==g))}function c(){const{toastContent:g,toastProps:x,staleId:S}=a.queue.shift();p(g,x,S)}function m(g,x){let{delay:S,staleId:E,...d}=x;if(!Mi(g)||function(Z){return!l.current||a.props.enableMultiContainer&&Z.containerId!==a.props.containerId||o.has(Z.toastId)&&Z.updateId==null}(d))return;const{toastId:f,updateId:v,data:C}=d,{props:N}=a,y=()=>s(f),P=v==null;P&&a.count++;const L={...N,style:N.toastStyle,key:a.toastKey++,...Object.fromEntries(Object.entries(d).filter(Z=>{let[b,re]=Z;return re!=null})),toastId:f,updateId:v,data:C,closeToast:y,isIn:!1,className:ro(d.className||N.toastClassName),bodyClassName:ro(d.bodyClassName||N.bodyClassName),progressClassName:ro(d.progressClassName||N.progressClassName),autoClose:!d.isLoading&&(M=d.autoClose,I=N.autoClose,M===!1||Yr(M)&&M>0?M:I),deleteToast(){const Z=Ec(o.get(f),"removed");o.delete(f),lt.emit(4,Z);const b=a.queue.length;if(a.count=f==null?a.count-a.displayedToast:a.count-1,a.count<0&&(a.count=0),b>0){const re=f==null?a.props.limit:1;if(b===1||re===1)a.displayedToast++,c();else{const He=re>b?b:re;a.displayedToast=He;for(let me=0;meU in Oi)(re)&&(X=Oi[re](F))),X}(L),Qe(d.onOpen)&&(L.onOpen=d.onOpen),Qe(d.onClose)&&(L.onClose=d.onClose),L.closeButton=N.closeButton,d.closeButton===!1||Mi(d.closeButton)?L.closeButton=d.closeButton:d.closeButton===!0&&(L.closeButton=!Mi(N.closeButton)||N.closeButton);let V=g;R.isValidElement(g)&&!Fn(g.type)?V=R.cloneElement(g,{closeToast:y,toastProps:L,data:C}):Qe(g)&&(V=g({closeToast:y,toastProps:L,data:C})),N.limit&&N.limit>0&&a.count>N.limit&&P?a.queue.push({toastContent:V,toastProps:L,staleId:E}):Yr(S)?setTimeout(()=>{p(V,L,E)},S):p(V,L,E)}function p(g,x,S){const{toastId:E}=x;S&&o.delete(S);const d={content:g,props:x};o.set(E,d),r(f=>[...f,E].filter(v=>v!==S)),lt.emit(4,Ec(d,d.props.updateId==null?"added":"updated"))}return R.useEffect(()=>(a.containerId=e.containerId,lt.cancelEmit(3).on(0,m).on(1,g=>l.current&&s(g)).on(5,u).emit(2,a),()=>{o.clear(),lt.emit(3,a)}),[]),R.useEffect(()=>{a.props=e,a.isToastActive=i,a.displayedToast=n.length}),{getToastToRender:function(g){const x=new Map,S=Array.from(o.values());return e.newestOnTop&&S.reverse(),S.forEach(E=>{const{position:d}=E.props;x.has(d)||x.set(d,[]),x.get(d).push(E)}),Array.from(x,E=>g(E[0],E[1]))},containerRef:l,isToastActive:i}}function kc(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Cc(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Tg(e){const[t,n]=R.useState(!1),[r,l]=R.useState(!1),o=R.useRef(null),i=R.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,a=R.useRef(e),{autoClose:u,pauseOnHover:s,closeToast:c,onClick:m,closeOnClick:p}=e;function g(C){if(e.draggable){C.nativeEvent.type==="touchstart"&&C.nativeEvent.preventDefault(),i.didMove=!1,document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),document.addEventListener("touchmove",d),document.addEventListener("touchend",f);const N=o.current;i.canCloseOnClick=!0,i.canDrag=!0,i.boundingRect=N.getBoundingClientRect(),N.style.transition="",i.x=kc(C.nativeEvent),i.y=Cc(C.nativeEvent),e.draggableDirection==="x"?(i.start=i.x,i.removalDistance=N.offsetWidth*(e.draggablePercent/100)):(i.start=i.y,i.removalDistance=N.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function x(C){if(i.boundingRect){const{top:N,bottom:y,left:P,right:L}=i.boundingRect;C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&i.x>=P&&i.x<=L&&i.y>=N&&i.y<=y?E():S()}}function S(){n(!0)}function E(){n(!1)}function d(C){const N=o.current;i.canDrag&&N&&(i.didMove=!0,t&&E(),i.x=kc(C),i.y=Cc(C),i.delta=e.draggableDirection==="x"?i.x-i.start:i.y-i.start,i.start!==i.x&&(i.canCloseOnClick=!1),N.style.transform=`translate${e.draggableDirection}(${i.delta}px)`,N.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function f(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",d),document.removeEventListener("touchend",f);const C=o.current;if(i.canDrag&&i.didMove&&C){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return l(!0),void e.closeToast();C.style.transition="transform 0.2s, opacity 0.2s",C.style.transform=`translate${e.draggableDirection}(0)`,C.style.opacity="1"}}R.useEffect(()=>{a.current=e}),R.useEffect(()=>(o.current&&o.current.addEventListener("d",S,{once:!0}),Qe(e.onOpen)&&e.onOpen(R.isValidElement(e.children)&&e.children.props),()=>{const C=a.current;Qe(C.onClose)&&C.onClose(R.isValidElement(C.children)&&C.children.props)}),[]),R.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||E(),window.addEventListener("focus",S),window.addEventListener("blur",E)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",S),window.removeEventListener("blur",E))}),[e.pauseOnFocusLoss]);const v={onMouseDown:g,onTouchStart:g,onMouseUp:x,onTouchEnd:x};return u&&s&&(v.onMouseEnter=E,v.onMouseLeave=S),p&&(v.onClick=C=>{m&&m(C),i.canCloseOnClick&&c()}),{playToast:S,pauseToast:E,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:v}}function rp(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return ne.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:l=>{l.stopPropagation(),t(l)},"aria-label":r},ne.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},ne.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Rg(e){let{delay:t,isRunning:n,closeToast:r,type:l="default",hide:o,className:i,style:a,controlledProgress:u,progress:s,rtl:c,isIn:m,theme:p}=e;const g=o||u&&s===0,x={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:g?0:1};u&&(x.transform=`scaleX(${s})`);const S=Jt("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${l}`,{"Toastify__progress-bar--rtl":c}),E=Qe(i)?i({rtl:c,type:l,defaultClassName:S}):Jt(S,i);return ne.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:E,style:x,[u&&s>=1?"onTransitionEnd":"onAnimationEnd"]:u&&s<1?null:()=>{m&&r()}})}const Pg=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:l}=Tg(e),{closeButton:o,children:i,autoClose:a,onClick:u,type:s,hideProgressBar:c,closeToast:m,transition:p,position:g,className:x,style:S,bodyClassName:E,bodyStyle:d,progressClassName:f,progressStyle:v,updateId:C,role:N,progress:y,rtl:P,toastId:L,deleteToast:M,isIn:I,isLoading:V,iconOut:Z,closeOnClick:b,theme:re}=e,He=Jt("Toastify__toast",`Toastify__toast-theme--${re}`,`Toastify__toast--${s}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":b}),me=Qe(x)?x({rtl:P,position:g,type:s,defaultClassName:He}):Jt(He,x),X=!!y||!a,F={closeToast:m,type:s,theme:re};let U=null;return o===!1||(U=Qe(o)?o(F):R.isValidElement(o)?R.cloneElement(o,F):rp(F)),ne.createElement(p,{isIn:I,done:M,position:g,preventExitTransition:n,nodeRef:r},ne.createElement("div",{id:L,onClick:u,className:me,...l,style:S,ref:r},ne.createElement("div",{...I&&{role:N},className:Qe(E)?E({type:s}):Jt("Toastify__toast-body",E),style:d},Z!=null&&ne.createElement("div",{className:Jt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!V})},Z),ne.createElement("div",null,i)),U,ne.createElement(Rg,{...C&&!X?{key:`pb-${C}`}:{},rtl:P,theme:re,delay:a,isRunning:t,isIn:I,closeToast:m,hide:c,type:s,style:v,className:f,controlledProgress:X,progress:y||0})))},Zo=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Ng=Jo(Zo("bounce",!0));Jo(Zo("slide",!0));Jo(Zo("zoom"));Jo(Zo("flip"));const za=R.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:l}=_g(e),{className:o,style:i,rtl:a,containerId:u}=e;function s(c){const m=Jt("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":a});return Qe(o)?o({position:c,rtl:a,defaultClassName:m}):Jt(m,ro(o))}return R.useEffect(()=>{t&&(t.current=r.current)},[]),ne.createElement("div",{ref:r,className:"Toastify",id:u},n((c,m)=>{const p=m.length?{...i}:{...i,pointerEvents:"none"};return ne.createElement("div",{className:s(c),style:p,key:`container-${c}`},m.map((g,x)=>{let{content:S,props:E}=g;return ne.createElement(Pg,{...E,isIn:l(E.toastId),style:{...E.style,"--nth":x+1,"--len":m.length},key:`toast-${E.key}`},S)}))}))});za.displayName="ToastContainer",za.defaultProps={position:"top-right",transition:Ng,autoClose:5e3,closeButton:rp,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let zi,gn=new Map,zr=[],Lg=1;function lp(){return""+Lg++}function jg(e){return e&&(Fn(e.toastId)||Yr(e.toastId))?e.toastId:lp()}function Gr(e,t){return gn.size>0?lt.emit(0,e,t):zr.push({content:e,options:t}),t.toastId}function Fo(e,t){return{...t,type:t&&t.type||e,toastId:jg(t)}}function Vl(e){return(t,n)=>Gr(t,Fo(e,n))}function ce(e,t){return Gr(e,Fo("default",t))}ce.loading=(e,t)=>Gr(e,Fo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ce.promise=function(e,t,n){let r,{pending:l,error:o,success:i}=t;l&&(r=Fn(l)?ce.loading(l,n):ce.loading(l.render,{...n,...l}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(c,m,p)=>{if(m==null)return void ce.dismiss(r);const g={type:c,...a,...n,data:p},x=Fn(m)?{render:m}:m;return r?ce.update(r,{...g,...x}):ce(x.render,{...g,...x}),p},s=Qe(e)?e():e;return s.then(c=>u("success",i,c)).catch(c=>u("error",o,c)),s},ce.success=Vl("success"),ce.info=Vl("info"),ce.error=Vl("error"),ce.warning=Vl("warning"),ce.warn=ce.warning,ce.dark=(e,t)=>Gr(e,Fo("default",{theme:"dark",...t})),ce.dismiss=e=>{gn.size>0?lt.emit(1,e):zr=zr.filter(t=>e!=null&&t.options.toastId!==e)},ce.clearWaitingQueue=function(e){return e===void 0&&(e={}),lt.emit(5,e)},ce.isActive=e=>{let t=!1;return gn.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},ce.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,l){let{containerId:o}=l;const i=gn.get(o||zi);return i&&i.getToast(r)}(e,t);if(n){const{props:r,content:l}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:lp()};o.toastId!==e&&(o.staleId=e);const i=o.render||l;delete o.render,Gr(i,o)}},0)},ce.done=e=>{ce.update(e,{progress:1})},ce.onChange=e=>(lt.on(4,e),()=>{lt.off(4,e)}),ce.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ce.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},lt.on(2,e=>{zi=e.containerId||e,gn.set(zi,e),zr.forEach(t=>{lt.emit(0,t.content,t.options)}),zr=[]}).on(3,e=>{gn.delete(e.containerId||e),gn.size===0&<.off(0).off(1).off(5)});function Fg(){return _.jsx("footer",{className:"fixed bottom-0 p-2 left-0 w-full bg-white",children:_.jsxs("div",{className:"text-center w-full font-bold",children:["Made with ❤️ by"," ",_.jsxs("a",{className:"text-blue-700 hover:underline",href:"https://github.com/TheWilley/text2book",target:"_blank",children:[" ","TheWilley"," "]})]})})}function Dg(){const e=()=>_.jsx(za,{position:"top-right",autoClose:1e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),t=()=>_.jsxs(_.Fragment,{children:[_.jsx(e,{}),_.jsxs("div",{children:[_.jsx("h1",{className:"text-5xl font-mono mb-3",children:" Text2Book "}),_.jsx("p",{className:"mb-3 text-md",children:" Text to Minecraft book generator "})]})]});return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"flex flex-col items-center bg-white",children:[_.jsx(t,{}),_.jsx("div",{className:"max-w-3xl w-full bg-gray-100 p-6 rounded-lg shadow-md",children:_.jsx(sg,{})})]}),_.jsx(Fg,{})]})}const Mg="_fadein_v6jf7_1",Og={fadein:Mg};var op={},Ia=yn&&yn.__assign||function(){return Ia=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u")return t;try{u.current=window.localStorage.getItem(e);var p=u.current?o(u.current):t;return p}catch(g){return i(g),t}}),c=s[0],m=s[1];return(0,jr.useEffect)(function(){if(!(typeof window>"u")){var p=function(){if(c!==void 0){var g=l(c),x=u.current;u.current=g,window.localStorage.setItem(e,g),window.dispatchEvent(new StorageEvent("storage",{storageArea:window.localStorage,url:window.location.href,key:e,newValue:g,oldValue:x}))}else window.localStorage.removeItem(e),window.dispatchEvent(new StorageEvent("storage",{storageArea:window.localStorage,url:window.location.href,key:e}))};try{p()}catch(g){i(g)}}},[c]),(0,jr.useEffect)(function(){if(a){var p=function(g){if(!(g.key!==e||g.storageArea!==window.localStorage))try{g.newValue!==u.current&&(u.current=g.newValue,m(g.newValue?o(g.newValue):void 0))}catch(x){i(x)}};if(!(typeof window>"u"))return window.addEventListener("storage",p),function(){return window.removeEventListener("storage",p)}}},[e,a]),[c,m]}var hn=op.default=zg;function ip(e){const[t,n]=hn("text",""),[r,l]=hn("author",""),[o,i]=hn("title",""),[a,u]=hn("appendIndex",!1),[s,c]=hn("appendIndexFormat","[n]"),[m,p]=hn("inputFormat","text"),[g,x]=hn("outputFormat","commands"),[S,E]=R.useState(!1);return{inputFormat:m,setInputFormat:p,outputFormat:g,setOutputFormat:x,text:t,setText:n,appendIndex:a,setAppendIndex:u,appendIndexFormat:s,setAppendIndexFormat:c,author:r,setAuthor:l,title:o,setTitle:i,handleSubmit:f=>{f.preventDefault();const v=async()=>{await new Promise(C=>{setTimeout(C,500)}),e(t,r,o,g,a,s),E(!1)};E(!0),v()},loading:S}}function Ig(e){return _.jsxs("div",{children:[_.jsx("input",{type:"checkbox",name:e.name||e.id,id:e.id,className:"peer hidden",onChange:e.callback,checked:e.checked}),_.jsx("label",{htmlFor:e.id,className:"block cursor-pointer select-none rounded-xl p-2 text-center bg-red-500 peer-checked:bg-green-500 peer-checked:font-bold text-white peer-checked:hover:bg-green-600 hover:bg-red-600 transition mb-3",children:e.label})]})}function Aa(e){return _.jsxs(_.Fragment,{children:[_.jsx("label",{htmlFor:e.id,className:"block text-gray-700 text-sm font-bold mb-2",children:e.label}),_.jsx("input",{type:"text",id:e.id,placeholder:e.placeholder,className:`w-full border rounded-md py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:ring focus:border-blue-300 ${e.centerText?"text-center":""}`,value:e.value,onChange:t=>e.setter(t.target.value),maxLength:e.maxLength,required:e.required})]})}function Ag(e){const[t,n]=R.useState(!1);return _.jsxs("div",{className:"grid w-full grid-cols-1 gap-2 rounded-xl bg-gray-200 p-2 mt-2",children:[_.jsx("input",{type:"radio",name:e.id,id:e.id,className:"peer hidden",checked:t,onClick:()=>n(!t)}),_.jsx("label",{htmlFor:e.id,className:"block cursor-pointer select-none rounded-xl p-2 text-center peer-checked:bg-blue-500 peer-checked:font-bold peer-checked:text-white hover:bg-blue-200 transition",children:e.label}),t&&e.children]})}function Ug(e){return _.jsx(_.Fragment,{children:_.jsx(Ag,{id:"advanced-settings",label:"Advanced",children:_.jsx("div",{className:"grid grid-cols-1",children:_.jsxs("div",{className:"border bg-gray-300 rounded-xl p-2 relative",children:[_.jsx(Ig,{id:"append-number",label:"Add title suffix",checked:e.appendIndex,callback:()=>e.setAppendIndex(!e.appendIndex)}),_.jsx(Aa,{label:"Format",id:"format",placeholder:"[n]",value:e.appendIndexFormat,setter:e.setAppendIndexFormat,maxLength:15,centerText:!0})]})})})})}function _c(e){return _.jsx("div",{className:"grid w-full grid-cols-1 sm:grid-cols-2 gap-2 rounded-xl bg-gray-200 p-2",children:e.items.map(t=>_.jsxs("div",{children:[_.jsx("input",{type:"radio",name:e.name,id:t.id,className:"peer hidden",onChange:t.callback,checked:t.checked}),_.jsx("label",{htmlFor:t.id,className:"block cursor-pointer select-none rounded-xl p-2 text-center peer-checked:bg-blue-500 peer-checked:font-bold peer-checked:text-white hover:bg-blue-200 transition",children:t.label})]}))})}function $g(e){return _.jsxs(_.Fragment,{children:[_.jsx(_c,{name:"input-method",items:[{id:"use-text-input",label:"Text Input",checked:e.inputFormat==="text",callback:()=>e.setInputFormat("text")},{id:"use-file-input",label:"File Input",checked:e.inputFormat==="file",callback:()=>e.setInputFormat("file")}]}),_.jsx("div",{className:"mb-2"}),_.jsx(_c,{name:"generation_method",items:[{id:"use-command-output",label:"Generate Commands",checked:e.outputFormat==="commands",callback:()=>e.setOutputFormat("commands")},{id:"use-text-output",label:"Generate Text",checked:e.outputFormat==="text",callback:()=>e.setOutputFormat("text")}]}),_.jsx(Ug,{appendIndex:e.appendIndex,setAppendIndex:e.setAppendIndex,appendIndexFormat:e.appendIndexFormat,setAppendIndexFormat:e.setAppendIndexFormat})]})}var ap={exports:{}};/*! + */function jo(){return jo=Object.assign?Object.assign.bind():function(e){for(var t=1;t{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Eg(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=R.useState(n.state),[i,a]=R.useState(),[u,s]=R.useState({isTransitioning:!1}),[c,m]=R.useState(),[p,g]=R.useState(),[x,S]=R.useState(),E=R.useRef(new Map),{v7_startTransition:d}=r||{},f=R.useCallback(P=>{d?xg(P):P()},[d]),v=R.useCallback((P,L)=>{let{deletedFetchers:O,unstable_flushSync:I,unstable_viewTransitionOpts:V}=L;O.forEach(b=>E.current.delete(b)),P.fetchers.forEach((b,re)=>{b.data!==void 0&&E.current.set(re,b.data)});let Z=n.window==null||typeof n.window.document.startViewTransition!="function";if(!V||Z){I?Lr(()=>o(P)):f(()=>o(P));return}if(I){Lr(()=>{p&&(c&&c.resolve(),p.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let b=n.window.document.startViewTransition(()=>{Lr(()=>o(P))});b.finished.finally(()=>{Lr(()=>{m(void 0),g(void 0),a(void 0),s({isTransitioning:!1})})}),Lr(()=>g(b));return}p?(c&&c.resolve(),p.skipTransition(),S({state:P,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(a(P),s({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,p,c,E,f]);R.useLayoutEffect(()=>n.subscribe(v),[n,v]),R.useEffect(()=>{u.isTransitioning&&!u.flushSync&&m(new Sg)},[u]),R.useEffect(()=>{if(c&&i&&n.window){let P=i,L=c.promise,O=n.window.document.startViewTransition(async()=>{f(()=>o(P)),await L});O.finished.finally(()=>{m(void 0),g(void 0),a(void 0),s({isTransitioning:!1})}),g(O)}},[f,i,c,n.window]),R.useEffect(()=>{c&&i&&l.location.key===i.location.key&&c.resolve()},[c,p,l.location,i]),R.useEffect(()=>{!u.isTransitioning&&x&&(a(x.state),s({isTransitioning:!0,flushSync:!1,currentLocation:x.currentLocation,nextLocation:x.nextLocation}),S(void 0))},[u.isTransitioning,x]),R.useEffect(()=>{},[]);let C=R.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:P=>n.navigate(P),push:(P,L,O)=>n.navigate(P,{state:L,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(P,L,O)=>n.navigate(P,{replace:!0,state:L,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),N=n.basename||"/",y=R.useMemo(()=>({router:n,navigator:C,static:!1,basename:N}),[n,C,N]);return R.createElement(R.Fragment,null,R.createElement(qf.Provider,{value:y},R.createElement(bf.Provider,{value:l},R.createElement(gg.Provider,{value:E.current},R.createElement(vg.Provider,{value:u},R.createElement(cg,{basename:N,location:l.location,navigationType:l.historyAction,navigator:C,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},l.initialized||n.future.v7_partialHydration?R.createElement(kg,{routes:n.routes,future:n.future,state:l}):t))))),null)}function kg(e){let{routes:t,future:n,state:r}=e;return qv(t,void 0,r,n)}var xc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xc||(xc={}));var Sc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Sc||(Sc={}));function np(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Fn=e=>typeof e=="string",Qe=e=>typeof e=="function",ro=e=>Fn(e)||Qe(e)?e:null,Oi=e=>R.isValidElement(e)||Fn(e)||Qe(e)||Yr(e);function Cg(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:l}=e;requestAnimationFrame(()=>{l.minHeight="initial",l.height=r+"px",l.transition=`all ${n}ms`,requestAnimationFrame(()=>{l.height="0",l.padding="0",l.margin="0",setTimeout(t,n)})})}function Jo(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:l=!0,collapseDuration:o=300}=e;return function(i){let{children:a,position:u,preventExitTransition:s,done:c,nodeRef:m,isIn:p}=i;const g=r?`${t}--${u}`:t,x=r?`${n}--${u}`:n,S=R.useRef(0);return R.useLayoutEffect(()=>{const E=m.current,d=g.split(" "),f=v=>{v.target===m.current&&(E.dispatchEvent(new Event("d")),E.removeEventListener("animationend",f),E.removeEventListener("animationcancel",f),S.current===0&&v.type!=="animationcancel"&&E.classList.remove(...d))};E.classList.add(...d),E.addEventListener("animationend",f),E.addEventListener("animationcancel",f)},[]),R.useEffect(()=>{const E=m.current,d=()=>{E.removeEventListener("animationend",d),l?Cg(E,c,o):c()};p||(s?d():(S.current=1,E.className+=` ${x}`,E.addEventListener("animationend",d)))},[p]),ne.createElement(ne.Fragment,null,a)}}function Ec(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const lt={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(r=>r!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},Hl=e=>{let{theme:t,type:n,...r}=e;return ne.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...r})},Mi={info:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return ne.createElement(Hl,{...e},ne.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return ne.createElement("div",{className:"Toastify__spinner"})}};function _g(e){const[,t]=R.useReducer(g=>g+1,0),[n,r]=R.useState([]),l=R.useRef(null),o=R.useRef(new Map).current,i=g=>n.indexOf(g)!==-1,a=R.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:i,getToast:g=>o.get(g)}).current;function u(g){let{containerId:x}=g;const{limit:S}=a.props;!S||x&&a.containerId!==x||(a.count-=a.queue.length,a.queue=[])}function s(g){r(x=>g==null?[]:x.filter(S=>S!==g))}function c(){const{toastContent:g,toastProps:x,staleId:S}=a.queue.shift();p(g,x,S)}function m(g,x){let{delay:S,staleId:E,...d}=x;if(!Oi(g)||function(Z){return!l.current||a.props.enableMultiContainer&&Z.containerId!==a.props.containerId||o.has(Z.toastId)&&Z.updateId==null}(d))return;const{toastId:f,updateId:v,data:C}=d,{props:N}=a,y=()=>s(f),P=v==null;P&&a.count++;const L={...N,style:N.toastStyle,key:a.toastKey++,...Object.fromEntries(Object.entries(d).filter(Z=>{let[b,re]=Z;return re!=null})),toastId:f,updateId:v,data:C,closeToast:y,isIn:!1,className:ro(d.className||N.toastClassName),bodyClassName:ro(d.bodyClassName||N.bodyClassName),progressClassName:ro(d.progressClassName||N.progressClassName),autoClose:!d.isLoading&&(O=d.autoClose,I=N.autoClose,O===!1||Yr(O)&&O>0?O:I),deleteToast(){const Z=Ec(o.get(f),"removed");o.delete(f),lt.emit(4,Z);const b=a.queue.length;if(a.count=f==null?a.count-a.displayedToast:a.count-1,a.count<0&&(a.count=0),b>0){const re=f==null?a.props.limit:1;if(b===1||re===1)a.displayedToast++,c();else{const He=re>b?b:re;a.displayedToast=He;for(let me=0;meU in Mi)(re)&&(X=Mi[re](F))),X}(L),Qe(d.onOpen)&&(L.onOpen=d.onOpen),Qe(d.onClose)&&(L.onClose=d.onClose),L.closeButton=N.closeButton,d.closeButton===!1||Oi(d.closeButton)?L.closeButton=d.closeButton:d.closeButton===!0&&(L.closeButton=!Oi(N.closeButton)||N.closeButton);let V=g;R.isValidElement(g)&&!Fn(g.type)?V=R.cloneElement(g,{closeToast:y,toastProps:L,data:C}):Qe(g)&&(V=g({closeToast:y,toastProps:L,data:C})),N.limit&&N.limit>0&&a.count>N.limit&&P?a.queue.push({toastContent:V,toastProps:L,staleId:E}):Yr(S)?setTimeout(()=>{p(V,L,E)},S):p(V,L,E)}function p(g,x,S){const{toastId:E}=x;S&&o.delete(S);const d={content:g,props:x};o.set(E,d),r(f=>[...f,E].filter(v=>v!==S)),lt.emit(4,Ec(d,d.props.updateId==null?"added":"updated"))}return R.useEffect(()=>(a.containerId=e.containerId,lt.cancelEmit(3).on(0,m).on(1,g=>l.current&&s(g)).on(5,u).emit(2,a),()=>{o.clear(),lt.emit(3,a)}),[]),R.useEffect(()=>{a.props=e,a.isToastActive=i,a.displayedToast=n.length}),{getToastToRender:function(g){const x=new Map,S=Array.from(o.values());return e.newestOnTop&&S.reverse(),S.forEach(E=>{const{position:d}=E.props;x.has(d)||x.set(d,[]),x.get(d).push(E)}),Array.from(x,E=>g(E[0],E[1]))},containerRef:l,isToastActive:i}}function kc(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Cc(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Tg(e){const[t,n]=R.useState(!1),[r,l]=R.useState(!1),o=R.useRef(null),i=R.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,a=R.useRef(e),{autoClose:u,pauseOnHover:s,closeToast:c,onClick:m,closeOnClick:p}=e;function g(C){if(e.draggable){C.nativeEvent.type==="touchstart"&&C.nativeEvent.preventDefault(),i.didMove=!1,document.addEventListener("mousemove",d),document.addEventListener("mouseup",f),document.addEventListener("touchmove",d),document.addEventListener("touchend",f);const N=o.current;i.canCloseOnClick=!0,i.canDrag=!0,i.boundingRect=N.getBoundingClientRect(),N.style.transition="",i.x=kc(C.nativeEvent),i.y=Cc(C.nativeEvent),e.draggableDirection==="x"?(i.start=i.x,i.removalDistance=N.offsetWidth*(e.draggablePercent/100)):(i.start=i.y,i.removalDistance=N.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function x(C){if(i.boundingRect){const{top:N,bottom:y,left:P,right:L}=i.boundingRect;C.nativeEvent.type!=="touchend"&&e.pauseOnHover&&i.x>=P&&i.x<=L&&i.y>=N&&i.y<=y?E():S()}}function S(){n(!0)}function E(){n(!1)}function d(C){const N=o.current;i.canDrag&&N&&(i.didMove=!0,t&&E(),i.x=kc(C),i.y=Cc(C),i.delta=e.draggableDirection==="x"?i.x-i.start:i.y-i.start,i.start!==i.x&&(i.canCloseOnClick=!1),N.style.transform=`translate${e.draggableDirection}(${i.delta}px)`,N.style.opacity=""+(1-Math.abs(i.delta/i.removalDistance)))}function f(){document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",f),document.removeEventListener("touchmove",d),document.removeEventListener("touchend",f);const C=o.current;if(i.canDrag&&i.didMove&&C){if(i.canDrag=!1,Math.abs(i.delta)>i.removalDistance)return l(!0),void e.closeToast();C.style.transition="transform 0.2s, opacity 0.2s",C.style.transform=`translate${e.draggableDirection}(0)`,C.style.opacity="1"}}R.useEffect(()=>{a.current=e}),R.useEffect(()=>(o.current&&o.current.addEventListener("d",S,{once:!0}),Qe(e.onOpen)&&e.onOpen(R.isValidElement(e.children)&&e.children.props),()=>{const C=a.current;Qe(C.onClose)&&C.onClose(R.isValidElement(C.children)&&C.children.props)}),[]),R.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||E(),window.addEventListener("focus",S),window.addEventListener("blur",E)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",S),window.removeEventListener("blur",E))}),[e.pauseOnFocusLoss]);const v={onMouseDown:g,onTouchStart:g,onMouseUp:x,onTouchEnd:x};return u&&s&&(v.onMouseEnter=E,v.onMouseLeave=S),p&&(v.onClick=C=>{m&&m(C),i.canCloseOnClick&&c()}),{playToast:S,pauseToast:E,isRunning:t,preventExitTransition:r,toastRef:o,eventHandlers:v}}function rp(e){let{closeToast:t,theme:n,ariaLabel:r="close"}=e;return ne.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:l=>{l.stopPropagation(),t(l)},"aria-label":r},ne.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},ne.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Rg(e){let{delay:t,isRunning:n,closeToast:r,type:l="default",hide:o,className:i,style:a,controlledProgress:u,progress:s,rtl:c,isIn:m,theme:p}=e;const g=o||u&&s===0,x={...a,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:g?0:1};u&&(x.transform=`scaleX(${s})`);const S=Jt("Toastify__progress-bar",u?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${p}`,`Toastify__progress-bar--${l}`,{"Toastify__progress-bar--rtl":c}),E=Qe(i)?i({rtl:c,type:l,defaultClassName:S}):Jt(S,i);return ne.createElement("div",{role:"progressbar","aria-hidden":g?"true":"false","aria-label":"notification timer",className:E,style:x,[u&&s>=1?"onTransitionEnd":"onAnimationEnd"]:u&&s<1?null:()=>{m&&r()}})}const Pg=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:l}=Tg(e),{closeButton:o,children:i,autoClose:a,onClick:u,type:s,hideProgressBar:c,closeToast:m,transition:p,position:g,className:x,style:S,bodyClassName:E,bodyStyle:d,progressClassName:f,progressStyle:v,updateId:C,role:N,progress:y,rtl:P,toastId:L,deleteToast:O,isIn:I,isLoading:V,iconOut:Z,closeOnClick:b,theme:re}=e,He=Jt("Toastify__toast",`Toastify__toast-theme--${re}`,`Toastify__toast--${s}`,{"Toastify__toast--rtl":P},{"Toastify__toast--close-on-click":b}),me=Qe(x)?x({rtl:P,position:g,type:s,defaultClassName:He}):Jt(He,x),X=!!y||!a,F={closeToast:m,type:s,theme:re};let U=null;return o===!1||(U=Qe(o)?o(F):R.isValidElement(o)?R.cloneElement(o,F):rp(F)),ne.createElement(p,{isIn:I,done:O,position:g,preventExitTransition:n,nodeRef:r},ne.createElement("div",{id:L,onClick:u,className:me,...l,style:S,ref:r},ne.createElement("div",{...I&&{role:N},className:Qe(E)?E({type:s}):Jt("Toastify__toast-body",E),style:d},Z!=null&&ne.createElement("div",{className:Jt("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!V})},Z),ne.createElement("div",null,i)),U,ne.createElement(Rg,{...C&&!X?{key:`pb-${C}`}:{},rtl:P,theme:re,delay:a,isRunning:t,isIn:I,closeToast:m,hide:c,type:s,style:v,className:f,controlledProgress:X,progress:y||0})))},Zo=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Ng=Jo(Zo("bounce",!0));Jo(Zo("slide",!0));Jo(Zo("zoom"));Jo(Zo("flip"));const za=R.forwardRef((e,t)=>{const{getToastToRender:n,containerRef:r,isToastActive:l}=_g(e),{className:o,style:i,rtl:a,containerId:u}=e;function s(c){const m=Jt("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":a});return Qe(o)?o({position:c,rtl:a,defaultClassName:m}):Jt(m,ro(o))}return R.useEffect(()=>{t&&(t.current=r.current)},[]),ne.createElement("div",{ref:r,className:"Toastify",id:u},n((c,m)=>{const p=m.length?{...i}:{...i,pointerEvents:"none"};return ne.createElement("div",{className:s(c),style:p,key:`container-${c}`},m.map((g,x)=>{let{content:S,props:E}=g;return ne.createElement(Pg,{...E,isIn:l(E.toastId),style:{...E.style,"--nth":x+1,"--len":m.length},key:`toast-${E.key}`},S)}))}))});za.displayName="ToastContainer",za.defaultProps={position:"top-right",transition:Ng,autoClose:5e3,closeButton:rp,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let zi,gn=new Map,zr=[],Lg=1;function lp(){return""+Lg++}function jg(e){return e&&(Fn(e.toastId)||Yr(e.toastId))?e.toastId:lp()}function Gr(e,t){return gn.size>0?lt.emit(0,e,t):zr.push({content:e,options:t}),t.toastId}function Fo(e,t){return{...t,type:t&&t.type||e,toastId:jg(t)}}function Vl(e){return(t,n)=>Gr(t,Fo(e,n))}function ce(e,t){return Gr(e,Fo("default",t))}ce.loading=(e,t)=>Gr(e,Fo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ce.promise=function(e,t,n){let r,{pending:l,error:o,success:i}=t;l&&(r=Fn(l)?ce.loading(l,n):ce.loading(l.render,{...n,...l}));const a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(c,m,p)=>{if(m==null)return void ce.dismiss(r);const g={type:c,...a,...n,data:p},x=Fn(m)?{render:m}:m;return r?ce.update(r,{...g,...x}):ce(x.render,{...g,...x}),p},s=Qe(e)?e():e;return s.then(c=>u("success",i,c)).catch(c=>u("error",o,c)),s},ce.success=Vl("success"),ce.info=Vl("info"),ce.error=Vl("error"),ce.warning=Vl("warning"),ce.warn=ce.warning,ce.dark=(e,t)=>Gr(e,Fo("default",{theme:"dark",...t})),ce.dismiss=e=>{gn.size>0?lt.emit(1,e):zr=zr.filter(t=>e!=null&&t.options.toastId!==e)},ce.clearWaitingQueue=function(e){return e===void 0&&(e={}),lt.emit(5,e)},ce.isActive=e=>{let t=!1;return gn.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},ce.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const n=function(r,l){let{containerId:o}=l;const i=gn.get(o||zi);return i&&i.getToast(r)}(e,t);if(n){const{props:r,content:l}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:lp()};o.toastId!==e&&(o.staleId=e);const i=o.render||l;delete o.render,Gr(i,o)}},0)},ce.done=e=>{ce.update(e,{progress:1})},ce.onChange=e=>(lt.on(4,e),()=>{lt.off(4,e)}),ce.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ce.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},lt.on(2,e=>{zi=e.containerId||e,gn.set(zi,e),zr.forEach(t=>{lt.emit(0,t.content,t.options)}),zr=[]}).on(3,e=>{gn.delete(e.containerId||e),gn.size===0&<.off(0).off(1).off(5)});function Fg(){return _.jsx("footer",{className:"fixed bottom-0 p-2 left-0 w-full bg-white",children:_.jsxs("div",{className:"text-center w-full font-bold",children:["Made with ❤️ by"," ",_.jsxs("a",{className:"text-blue-700 hover:underline",href:"https://github.com/TheWilley/text2book",target:"_blank",children:[" ","TheWilley"," "]})]})})}function Dg(){const e=()=>_.jsx(za,{position:"top-right",autoClose:1e3,hideProgressBar:!1,newestOnTop:!1,closeOnClick:!0,rtl:!1,pauseOnFocusLoss:!0,draggable:!0,pauseOnHover:!0,theme:"light"}),t=()=>_.jsxs(_.Fragment,{children:[_.jsx(e,{}),_.jsxs("div",{children:[_.jsx("h1",{className:"text-5xl font-mono mb-3",children:" Text2Book "}),_.jsx("p",{className:"mb-3 text-md",children:" Text to Minecraft book generator "})]})]});return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"flex flex-col items-center bg-white",children:[_.jsx(t,{}),_.jsx("div",{className:"max-w-3xl w-full bg-gray-100 p-6 rounded-lg shadow-md",children:_.jsx(sg,{})})]}),_.jsx(Fg,{})]})}const Og="_fadein_v6jf7_1",Mg={fadein:Og};var op={},Ia=yn&&yn.__assign||function(){return Ia=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u")return t;try{u.current=window.localStorage.getItem(e);var p=u.current?o(u.current):t;return p}catch(g){return i(g),t}}),c=s[0],m=s[1];return(0,jr.useEffect)(function(){if(!(typeof window>"u")){var p=function(){if(c!==void 0){var g=l(c),x=u.current;u.current=g,window.localStorage.setItem(e,g),window.dispatchEvent(new StorageEvent("storage",{storageArea:window.localStorage,url:window.location.href,key:e,newValue:g,oldValue:x}))}else window.localStorage.removeItem(e),window.dispatchEvent(new StorageEvent("storage",{storageArea:window.localStorage,url:window.location.href,key:e}))};try{p()}catch(g){i(g)}}},[c]),(0,jr.useEffect)(function(){if(a){var p=function(g){if(!(g.key!==e||g.storageArea!==window.localStorage))try{g.newValue!==u.current&&(u.current=g.newValue,m(g.newValue?o(g.newValue):void 0))}catch(x){i(x)}};if(!(typeof window>"u"))return window.addEventListener("storage",p),function(){return window.removeEventListener("storage",p)}}},[e,a]),[c,m]}var hn=op.default=zg;function ip(e){const[t,n]=hn("text",""),[r,l]=hn("author",""),[o,i]=hn("title",""),[a,u]=hn("appendIndex",!1),[s,c]=hn("appendIndexFormat","[n]"),[m,p]=hn("inputFormat","text"),[g,x]=hn("outputFormat","commands"),[S,E]=R.useState(!1);return{inputFormat:m,setInputFormat:p,outputFormat:g,setOutputFormat:x,text:t,setText:n,appendIndex:a,setAppendIndex:u,appendIndexFormat:s,setAppendIndexFormat:c,author:r,setAuthor:l,title:o,setTitle:i,handleSubmit:f=>{f.preventDefault();const v=async()=>{await new Promise(C=>{setTimeout(C,500)}),e(t,r,o,g,a,s),E(!1)};E(!0),v()},loading:S}}function Ig(e){return _.jsxs("div",{children:[_.jsx("input",{type:"checkbox",name:e.name||e.id,id:e.id,className:"peer hidden",onChange:e.callback,checked:e.checked}),_.jsx("label",{htmlFor:e.id,className:"block cursor-pointer select-none rounded-xl p-2 text-center bg-red-500 peer-checked:bg-green-500 peer-checked:font-bold text-white peer-checked:hover:bg-green-600 hover:bg-red-600 transition mb-3",children:e.label})]})}function Aa(e){return _.jsxs(_.Fragment,{children:[_.jsx("label",{htmlFor:e.id,className:"block text-gray-700 text-sm font-bold mb-2",children:e.label}),_.jsx("input",{type:"text",id:e.id,placeholder:e.placeholder,className:`w-full border rounded-md py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:ring focus:border-blue-300 ${e.centerText?"text-center":""}`,value:e.value,onChange:t=>e.setter(t.target.value),maxLength:e.maxLength,required:e.required})]})}function Ag(e){const[t,n]=R.useState(!1);return _.jsxs("div",{className:"grid w-full grid-cols-1 gap-2 rounded-xl bg-gray-200 p-2 mt-2",children:[_.jsx("input",{type:"radio",name:e.id,id:e.id,className:"peer hidden",checked:t,onClick:()=>n(!t)}),_.jsx("label",{htmlFor:e.id,className:"block cursor-pointer select-none rounded-xl p-2 text-center peer-checked:bg-blue-500 peer-checked:font-bold peer-checked:text-white hover:bg-blue-200 transition",children:e.label}),t&&e.children]})}function Ug(e){return _.jsx(_.Fragment,{children:_.jsx(Ag,{id:"advanced-settings",label:"Advanced",children:_.jsx("div",{className:"grid grid-cols-1",children:_.jsxs("div",{className:"border bg-gray-300 rounded-xl p-2 relative",children:[_.jsx(Ig,{id:"append-number",label:"Add title suffix",checked:e.appendIndex,callback:()=>e.setAppendIndex(!e.appendIndex)}),_.jsx(Aa,{label:"Format",id:"format",placeholder:"[n]",value:e.appendIndexFormat,setter:e.setAppendIndexFormat,maxLength:15,centerText:!0})]})})})})}function _c(e){return _.jsx("div",{className:"grid w-full grid-cols-1 sm:grid-cols-2 gap-2 rounded-xl bg-gray-200 p-2",children:e.items.map(t=>_.jsxs("div",{children:[_.jsx("input",{type:"radio",name:e.name,id:t.id,className:"peer hidden",onChange:t.callback,checked:t.checked}),_.jsx("label",{htmlFor:t.id,className:"block cursor-pointer select-none rounded-xl p-2 text-center peer-checked:bg-blue-500 peer-checked:font-bold peer-checked:text-white hover:bg-blue-200 transition",children:t.label})]}))})}function $g(e){return _.jsxs(_.Fragment,{children:[_.jsx(_c,{name:"input-method",items:[{id:"use-text-input",label:"Text Input",checked:e.inputFormat==="text",callback:()=>e.setInputFormat("text")},{id:"use-file-input",label:"File Input",checked:e.inputFormat==="file",callback:()=>e.setInputFormat("file")}]}),_.jsx("div",{className:"mb-2"}),_.jsx(_c,{name:"generation_method",items:[{id:"use-command-output",label:"Generate Commands",checked:e.outputFormat==="commands",callback:()=>e.setOutputFormat("commands")},{id:"use-text-output",label:"Generate Text",checked:e.outputFormat==="text",callback:()=>e.setOutputFormat("text")}]}),_.jsx(Ug,{appendIndex:e.appendIndex,setAppendIndex:e.setAppendIndex,appendIndexFormat:e.appendIndexFormat,setAppendIndexFormat:e.setAppendIndexFormat})]})}var ap={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",i=0;i{var i;const o=(i=l.target.files)==null?void 0:i.item(0);if((o==null?void 0:o.type)==="text/plain"){const a=new FileReader;a.readAsText(o),n(o.name),a.onload=()=>{e(a.result)}}}}}function Vg(e){const{fileName:t,handleFileChange:n}=Hg(e.callback);return _.jsxs(_.Fragment,{children:[_.jsx("label",{htmlFor:"file-upload",className:"block text-gray-700 text-sm font-bold mb-2",children:"Text"}),_.jsxs("div",{className:"relative mb-3",children:[_.jsx("input",{id:"file-upload",type:"file",onChange:n,accept:".txt",className:"opacity-0 absolute z-0 w-full h-full",required:e.useFileUpload}),_.jsxs("div",{className:"bg-white rounded-md border border-gray-400 px-4 py-2 flex items-center justify-between",children:[_.jsx("span",{className:"text-gray-700",children:t||"Choose a file"}),_.jsx("button",{type:"button",className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline hover:cursor-pointer",children:"Browse"})]})]})]})}const up="/Text2Book/assets/loader-025122ea.svg";function sp(e){return _.jsxs(_.Fragment,{children:[_.jsx("label",{htmlFor:e.id,className:"block text-gray-700 text-sm font-bold mb-2",children:"Text"}),_.jsx("textarea",{id:e.id,placeholder:e.placeholder,className:"w-full min-h-[58px] h-72 border rounded-md py-2 px-3 text-gray-700 leading-tight focus:outline-none focus:ring focus:border-blue-300",value:e.value,onChange:t=>e.setter(t.target.value),required:e.required})]})}function Wg(e){const t=()=>e.loading?_.jsx("div",{className:"flex justify-center text-white",children:_.jsx("img",{className:"h-5 w-5 mr-3",src:up})}):"Generate";return _.jsxs("form",{onSubmit:e.handleSubmit,children:[_.jsxs("div",{className:lo("flex flex-wrap mb-4",{hidden:e.outputFormat==="text"}),children:[_.jsx("div",{className:"w-full sm:w-1/2 px-2",children:_.jsx(Aa,{label:"Author",id:"author",placeholder:"Lewis Carroll",value:e.author,setter:e.setAuthor,maxLength:50,required:e.outputFormat==="commands"})}),_.jsx("div",{className:"w-full sm:w-1/2 px-2",children:_.jsx(Aa,{label:"Title",id:"title",placeholder:"Alice in Wonderland",value:e.title,setter:e.setTitle,maxLength:15,required:e.outputFormat==="commands"})})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("div",{className:lo({hidden:e.inputFormat==="text"}),children:_.jsx(Vg,{label:"Text",callback:n=>e.setText(n),useFileUpload:e.inputFormat==="file"})}),_.jsx("div",{className:lo({hidden:e.inputFormat==="file"}),children:_.jsx(sp,{label:"Text",id:"text",placeholder:"Once upon a time, there was a girl...",value:e.text,setter:e.setText,required:e.inputFormat==="text"})})]}),_.jsx("button",{type:"submit",className:"w-full h-10 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",children:_.jsx(t,{})})]})}function Qg(e){const{inputFormat:t,setInputFormat:n,outputFormat:r,setOutputFormat:l,text:o,setText:i,appendIndex:a,setAppendIndex:u,appendIndexFormat:s,setAppendIndexFormat:c,author:m,setAuthor:p,title:g,setTitle:x,loading:S,handleSubmit:E}=ip(e.showResults);return _.jsxs(_.Fragment,{children:[_.jsx($g,{inputFormat:t,setInputFormat:n,outputFormat:r,setOutputFormat:l,appendIndex:a,setAppendIndex:u,appendIndexFormat:s,setAppendIndexFormat:c}),_.jsx("hr",{className:"mb-4 mt-4"}),_.jsx(Wg,{inputFormat:t,setInputFormat:n,outputFormat:r,setOutputFormat:l,text:o,setText:i,author:m,setAuthor:p,title:g,setTitle:x,loading:S,handleSubmit:E})]})}const Kg="/Text2Book/assets/copy-icon-c3cc64a5.png",Yg="_blink_6oukz_1",Tc={blink:Yg};function Gg(e){const[t,n]=R.useState(0),[r,l]=R.useState([]),o={blink:t};R.useEffect(()=>{m()},[e]);const i=(p,g,x)=>{ce("Copied!",{className:"font-bold text-green-600"});const S=p.target.closest(".listitem");S&&S.classList.remove("noblink"),u(g),n(1),navigator.clipboard.writeText(x)},a=p=>{n(0);const g=p.target.closest(".listitem");g&&g.classList.add("noblink")},u=p=>l([...r,p]),s=p=>l(g=>g.filter(x=>x!==p)),c=p=>r.includes(p),m=()=>l([]);return{blinkProps:o,onAnimationEnd:a,copyAndNotify:i,addCopiedRow:u,removeCopiedRow:s,checkRowIsCopied:c,clearCheckedRows:m}}function Xg(e){const{onAnimationEnd:t,copyAndNotify:n,blinkProps:r,removeCopiedRow:l,checkRowIsCopied:o}=Gg(e.results);return e.results.map((i,a)=>_.jsxs("li",{className:`flex rounded border overflow-hidden h-12 mb-1 listitem noblink ${Tc.blink} ${Tc.noblink}`,...r,onAnimationEnd:t,children:[_.jsx("button",{onClick:u=>n(u,a,i),className:"w-12 bg-gray-300 h-full p-2 border-right group",children:_.jsx("img",{className:"p-1 group-hover:opacity-70 transition",src:Kg})}),_.jsx("input",{className:"w-full p-2 opacity-80 font-mono h-full outline-none",type:"text",value:i,readOnly:!0}),_.jsx("div",{className:"text-xl p-2 bg-gray-300 select-none",children:a+1}),o(a)&&_.jsx("div",{className:"text-xl p-2 bg-green-300 hover:bg-red-300 select-none cursor-pointer",onClick:()=>l(a),children:"✓"})]},a))}class h{constructor(t,n){li(this,"_char");li(this,"_dots");this._char=t,this._dots=n}set letter(t){this._char=t}get letter(){return this._char}set dots(t){this._dots=t}get dots(){return this._dots}}function Jg(){return[new h("À",6),new h("Á",6),new h("Â",6),new h("È",6),new h("Ê",6),new h("Ë",6),new h("Í",4),new h("Ó",6),new h("Ô",6),new h("Õ",6),new h("Ú",6),new h("ß",6),new h("ã",6),new h("õ",6),new h("ğ",6),new h("İ",4),new h("ı",4),new h("Œ",6),new h("œ",7),new h("Ş",6),new h("ş",6),new h("Ŵ",6),new h("ŵ",6),new h("ž",6),new h("ȇ",6),new h("!",2),new h('"',5),new h("#",6),new h("$",6),new h("%",6),new h("&",6),new h("'",3),new h("(",5),new h(")",5),new h("*",5),new h("+",6),new h(",",2),new h("-",6),new h(".",2),new h("/",6),new h("0",6),new h("1",6),new h("2",6),new h("3",6),new h("4",6),new h("5",6),new h("6",6),new h("7",6),new h("8",6),new h("9",6),new h(":",2),new h(";",2),new h("<",5),new h("=",6),new h(">",5),new h("?",6),new h("@",7),new h("A",6),new h("B",6),new h("C",6),new h("D",6),new h("E",6),new h("F",6),new h("G",6),new h("H",6),new h("I",4),new h("J",6),new h("K",6),new h("L",6),new h("M",6),new h("N",6),new h("O",6),new h("P",6),new h("Q",6),new h("R",6),new h("S",6),new h("T",6),new h("U",6),new h("V",6),new h("W",6),new h("X",6),new h("Y",6),new h("Z",6),new h("[",4),new h("]",4),new h("^",6),new h("_",6),new h("`",3),new h("a",6),new h("b",6),new h("c",6),new h("d",6),new h("e",6),new h("f",5),new h("g",6),new h("h",6),new h("i",2),new h("j",6),new h("k",5),new h("l",3),new h("m",6),new h("n",6),new h("o",6),new h("p",6),new h("q",6),new h("r",6),new h("s",6),new h("t",4),new h("u",6),new h("v",6),new h("w",6),new h("x",6),new h("y",6),new h("z",6),new h("‘",3),new h("’",3),new h("{",5),new h("|",2),new h("}",5),new h("~",7),new h("–",7),new h("Ç",6),new h("ü",6),new h("é",6),new h("â",6),new h("ä",6),new h("à",6),new h("å",6),new h("ç",6),new h("ê",6),new h("ë",6),new h("è",6),new h("ï",4),new h("î",6),new h("ì",3),new h("Ä",6),new h("Å",6),new h("É",6),new h("æ",6),new h("Æ",6),new h("ô",6),new h("ö",6),new h("ò",6),new h("û",6),new h("ù",6),new h("ÿ",6),new h("Ö",6),new h("Ü",6),new h("ø",6),new h("£",6),new h("Ø",6),new h("×",4),new h("ƒ",6),new h("á",6),new h("í",3),new h("ó",6),new h("ú",6),new h("ñ",6),new h("Ñ",6),new h("ª",6),new h("º",6),new h("¿",6),new h("®",7),new h("¬",6),new h("½",6),new h("¼",6),new h("¡",2),new h("«",6),new h("»",6),new h("░",8),new h("▒",9),new h("▓",9),new h("│",6),new h("┤",6),new h("╡",6),new h("╢",8),new h("╖",8),new h("╕",6),new h("╣",8),new h("║",8),new h("╗",8),new h("╝",8),new h("╜",8),new h("╛",6),new h("┐",6),new h("└",9),new h("┴",9),new h("┬",9),new h("├",9),new h("─",9),new h("┼",9),new h("╞",9),new h("╟",9),new h("╚",9),new h("╔",9),new h("╩",9),new h("╦",9),new h("╠",9),new h("═",9),new h("╬",9),new h("╧",9),new h("╨",9),new h("╤",9),new h("╥",9),new h("╙",9),new h("╘",9),new h("╒",9),new h("╓",9),new h("╫",9),new h("╪",9),new h("┘",6),new h("┌",9),new h("█",9),new h("▄",9),new h("▌",5),new h("▐",9),new h("▀",9),new h("α",8),new h("β",7),new h("Γ",7),new h("π",8),new h("Σ",7),new h("σ",8),new h("μ",8),new h("τ",8),new h("Φ",7),new h("Θ",8),new h("Ω",8),new h("δ",7),new h("∞",9),new h("∅",9),new h("∈",6),new h("∩",7),new h("≡",7),new h("±",7),new h("≥",7),new h("≤",7),new h("⌠",9),new h("⌡",6),new h("÷",7),new h("≈",8),new h("°",7),new h("∙",6),new h("·",6),new h("√",9),new h("ⁿ",7),new h("²",6),new h("■",7),new h(" ",4),new h(` `,0)]}function Zg(e,t,n){let r="",l=0;const o=()=>r.replace(/"/g,'\\\\"').replace(/'/g,"\\'").trim().replace(/\n/g,"\\\\n"),i=e.map(u=>{if(r+=u,l++,l==14){r=o();const s=`'{"text":"${r}"}'`;return r="",l=0,s}else return null}).filter(u=>u!==null);if(r.length>0){r=o();const u=`'{"text":"${r}"}'`;i.push(u)}const a={id:"minecraft:written_book",author:t,title:n,pages:i};return`/give @p ${a.id}{pages:[${a.pages.toString()}], title: "${a.title}", author: "${a.author}"}`}function qg(e,t,n,r,l){const o=[],i=[...e];let a=0,u=0;for(let s=0;s<=e.length;s++)if(a++,a==1400||s==e.length){const c={lines:i.splice(0,a),author:t,title:(()=>{const p=n,g=r?l?l.replace("n",u.toString()):" [n]".replace("n",u.toString()):"";return`${p}${g}`})()},m=Zg(c.lines,c.author,c.title);a=0,u++,o.push(m)}return o}function bg(e){let t="",n=0;const r=e.map(l=>{if(t+=l,n++,n==14){t=t.trim();const o=t;return t="",n=0,o}else return null}).filter(l=>l!==null);if(t.length>0){t=t.trim();const l=t;r.push(l)}return r.toString()}function e0(e){const t=[],n=[...e];let r=0;for(let l=0;l<=e.length;l++)if(r++,r==14||l==e.length){const o={lines:n.splice(0,r)},i=bg(o.lines);r=0,t.push(i)}return t.filter(l=>l!="")}function t0(e,t,n,r,l,o){const i=r0(e);return r==="text"?e0(i):qg(i,t,n,l,o)}function n0(e){const t=[],n=Jg(),r=114;let l=0,o="";for(let i=0;iu.letter==e.charAt(i));if(!a){e=e.substring(0,i)+e.substring(i+1),i--;continue}l+=a.dots,o=e.substring(0,i+1),l>r&&(o=o.substring(0,o.length-1),t.push({word:o,value:l}),e=e.substring(i),l=0,i=-1)}return t.push({word:e,value:l}),t}function r0(e){let t=[],n=[],r=0;const l=[],o=e.replace(/ +\n/g,` `).split(/(\s)/g);for(let i=0;i114)&&(r=n[a].value,l.push(t.join("")),t=[]),t.push(n[a].word)}return l.push(t.join("").trim()),l.filter(i=>i!="")}function cp(){const[e,t]=R.useState([]),[n,r]=R.useState(0);return{results:e,allowedProps:{fadein:n},showResults:(i,a,u,s,c,m)=>{t(t0(i,a,u,s,c,m)),r(1)},setFadeIn:r}}function l0(){const{results:e,showResults:t,allowedProps:n,setFadeIn:r}=cp();return _.jsxs(_.Fragment,{children:[_.jsx(Qg,{showResults:t}),_.jsx("div",{className:"mt-3",children:_.jsx("ol",{className:`list-decimal ${Og.fadein}`,onAnimationEnd:()=>r(0),...n,children:_.jsx(Xg,{results:e})})})]})}function o0(e){const t=()=>e.loading?_.jsx("div",{className:"flex justify-center text-white",children:_.jsx("img",{className:"h-5 w-5 mr-3",src:up})}):"Generate";return _.jsxs("form",{onSubmit:e.handleSubmit,children:[_.jsx("div",{className:"mb-4",children:_.jsx("div",{className:lo({hidden:e.inputFormat==="file"}),children:_.jsx(sp,{label:"Text",id:"text",placeholder:"Once upon a time, there was a girl...",value:e.text,setter:e.setText,required:e.inputFormat==="text"})})}),_.jsx("button",{type:"submit",className:"w-full h-10 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",children:_.jsx(t,{})})]})}function i0(e){const{text:t,setText:n,loading:r,handleSubmit:l}=ip(e.showResults);return _.jsx(_.Fragment,{children:_.jsx(o0,{inputFormat:"text",text:t,setText:n,loading:r,handleSubmit:l})})}var dp={exports:{}};(function(e,t){(function(n,r){r()})(yn,function(){function n(s,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function r(s,c,m){var p=new XMLHttpRequest;p.open("GET",s),p.responseType="blob",p.onload=function(){u(p.response,c,m)},p.onerror=function(){console.error("could not download file")},p.send()}function l(s){var c=new XMLHttpRequest;c.open("HEAD",s,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(c)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof yn=="object"&&yn.global===yn?yn:void 0,a=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,c,m){var p=i.URL||i.webkitURL,g=document.createElement("a");c=c||s.name||"download",g.download=c,g.rel="noopener",typeof s=="string"?(g.href=s,g.origin===location.origin?o(g):l(g.href)?r(s,c,m):o(g,g.target="_blank")):(g.href=p.createObjectURL(s),setTimeout(function(){p.revokeObjectURL(g.href)},4e4),setTimeout(function(){o(g)},0))}:"msSaveOrOpenBlob"in navigator?function(s,c,m){if(c=c||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(n(s,m),c);else if(l(s))r(s,c,m);else{var p=document.createElement("a");p.href=s,p.target="_blank",setTimeout(function(){o(p)})}}:function(s,c,m,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof s=="string")return r(s,c,m);var g=s.type==="application/octet-stream",x=/constructor/i.test(i.HTMLElement)||i.safari,S=/CriOS\/[\d]+/.test(navigator.userAgent);if((S||g&&x||a)&&typeof FileReader<"u"){var E=new FileReader;E.onloadend=function(){var v=E.result;v=S?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=v:location=v,p=null},E.readAsDataURL(s)}else{var d=i.URL||i.webkitURL,f=d.createObjectURL(s);p?p.location=f:location.href=f,p=null,setTimeout(function(){d.revokeObjectURL(f)},4e4)}});i.saveAs=u.saveAs=u,e.exports=u})})(dp);var a0=dp.exports;function u0(e){R.useEffect(()=>{const t=new Blob([new TextEncoder().encode(JSON.stringify(e))],{type:"application/json;charset=utf-8"});e.length>0&&a0.saveAs(t,"text2book.json")},[JSON.stringify(e)])}function s0(){const{results:e,showResults:t}=cp();return u0(e),_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"text-red-600 bg-gray-200 rounded mb-2 p-2",children:['OBS: This is a debugging page used for validating the output of this app. Clicking the "Generate" button will download a JSON file which is used as an input parameter when running tests. For more info, please have a look at the'," ",_.jsx("a",{href:"https://github.com/TheWilley/Text2Book/blob/master/test/testing.md",className:"underline",children:"testing methodology"})," ","or"," ",_.jsx("a",{href:"https://thewilley.github.io/Text2Book",className:"underline",children:"go home again"}),"."]}),_.jsx(i0,{showResults:t})]})}const c0=()=>_.jsx("div",{className:"flex h-[calc(100vh-4rem)] items-center justify-center",children:_.jsxs("div",{children:[_.jsx("h1",{className:"text-3xl",children:" 404 - This page does not exist"}),_.jsxs("div",{className:"text-md mt-2",children:["Were you looking for the"," ",_.jsx("a",{href:"/",className:"underline text-blue-500",children:"home"})," ","or"," ",_.jsx("a",{href:"/#debug",className:"underline text-blue-500",children:"debug"})," ","page?"]})]})}),d0=pg(Oa(_.jsxs(no,{path:"/",element:_.jsx(Dg,{}),errorElement:_.jsx(c0,{}),children:[_.jsx(no,{index:!0,element:_.jsx(l0,{})}),_.jsx(no,{path:"/debug",element:_.jsx(s0,{})})]})));function f0(){return _.jsx(Eg,{router:d0})}Ii.createRoot(document.getElementById("root")).render(_.jsx(ne.StrictMode,{children:_.jsx(f0,{})})); +`||n[a].word!=" "&&r>114)&&(r=n[a].value,l.push(t.join("")),t=[]),t.push(n[a].word)}return l.push(t.join("").trim()),l.filter(i=>i!="")}function cp(){const[e,t]=R.useState([]),[n,r]=R.useState(0);return{results:e,allowedProps:{fadein:n},showResults:(i,a,u,s,c,m)=>{t(t0(i,a,u,s,c,m)),r(1)},setFadeIn:r}}function l0(){const{results:e,showResults:t,allowedProps:n,setFadeIn:r}=cp();return _.jsxs(_.Fragment,{children:[_.jsx(Qg,{showResults:t}),_.jsx("div",{className:"mt-3",children:_.jsx("ol",{className:`list-decimal ${Mg.fadein}`,onAnimationEnd:()=>r(0),...n,children:_.jsx(Xg,{results:e})})})]})}function o0(e){const t=()=>e.loading?_.jsx("div",{className:"flex justify-center text-white",children:_.jsx("img",{className:"h-5 w-5 mr-3",src:up})}):"Generate";return _.jsxs("form",{onSubmit:e.handleSubmit,children:[_.jsx("div",{className:"mb-4",children:_.jsx("div",{className:lo({hidden:e.inputFormat==="file"}),children:_.jsx(sp,{label:"Text",id:"text",placeholder:"Once upon a time, there was a girl...",value:e.text,setter:e.setText,required:e.inputFormat==="text"})})}),_.jsx("button",{type:"submit",className:"w-full h-10 bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded focus:outline-none focus:shadow-outline",children:_.jsx(t,{})})]})}function i0(e){const{text:t,setText:n,setOutputFormat:r,loading:l,handleSubmit:o}=ip(e.showResults);return r("text"),_.jsx(_.Fragment,{children:_.jsx(o0,{inputFormat:"text",text:t,setText:n,loading:l,handleSubmit:o})})}var dp={exports:{}};(function(e,t){(function(n,r){r()})(yn,function(){function n(s,c){return typeof c>"u"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}function r(s,c,m){var p=new XMLHttpRequest;p.open("GET",s),p.responseType="blob",p.onload=function(){u(p.response,c,m)},p.onerror=function(){console.error("could not download file")},p.send()}function l(s){var c=new XMLHttpRequest;c.open("HEAD",s,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(s){try{s.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),s.dispatchEvent(c)}}var i=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof yn=="object"&&yn.global===yn?yn:void 0,a=i.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),u=i.saveAs||(typeof window!="object"||window!==i?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(s,c,m){var p=i.URL||i.webkitURL,g=document.createElement("a");c=c||s.name||"download",g.download=c,g.rel="noopener",typeof s=="string"?(g.href=s,g.origin===location.origin?o(g):l(g.href)?r(s,c,m):o(g,g.target="_blank")):(g.href=p.createObjectURL(s),setTimeout(function(){p.revokeObjectURL(g.href)},4e4),setTimeout(function(){o(g)},0))}:"msSaveOrOpenBlob"in navigator?function(s,c,m){if(c=c||s.name||"download",typeof s!="string")navigator.msSaveOrOpenBlob(n(s,m),c);else if(l(s))r(s,c,m);else{var p=document.createElement("a");p.href=s,p.target="_blank",setTimeout(function(){o(p)})}}:function(s,c,m,p){if(p=p||open("","_blank"),p&&(p.document.title=p.document.body.innerText="downloading..."),typeof s=="string")return r(s,c,m);var g=s.type==="application/octet-stream",x=/constructor/i.test(i.HTMLElement)||i.safari,S=/CriOS\/[\d]+/.test(navigator.userAgent);if((S||g&&x||a)&&typeof FileReader<"u"){var E=new FileReader;E.onloadend=function(){var v=E.result;v=S?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),p?p.location.href=v:location=v,p=null},E.readAsDataURL(s)}else{var d=i.URL||i.webkitURL,f=d.createObjectURL(s);p?p.location=f:location.href=f,p=null,setTimeout(function(){d.revokeObjectURL(f)},4e4)}});i.saveAs=u.saveAs=u,e.exports=u})})(dp);var a0=dp.exports;function u0(e){R.useEffect(()=>{const t=new Blob([new TextEncoder().encode(JSON.stringify(e))],{type:"application/json;charset=utf-8"});e.length>0&&a0.saveAs(t,"text2book.json")},[JSON.stringify(e)])}function s0(){const{results:e,showResults:t}=cp();return u0(e),_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"text-red-600 bg-gray-200 rounded mb-2 p-2",children:['OBS: This is a debugging page used for validating the output of this app. Clicking the "Generate" button will download a JSON file which is used as an input parameter when running tests. For more info, please have a look at the'," ",_.jsx("a",{href:"https://github.com/TheWilley/Text2Book/blob/master/test/testing.md",className:"underline",children:"testing methodology"})," ","or"," ",_.jsx("a",{href:"https://thewilley.github.io/Text2Book",className:"underline",children:"go home again"}),"."]}),_.jsx(i0,{showResults:t})]})}const c0=()=>_.jsx("div",{className:"flex h-[calc(100vh-4rem)] items-center justify-center",children:_.jsxs("div",{children:[_.jsx("h1",{className:"text-3xl",children:" 404 - This page does not exist"}),_.jsxs("div",{className:"text-md mt-2",children:["Were you looking for the"," ",_.jsx("a",{href:"/",className:"underline text-blue-500",children:"home"})," ","or"," ",_.jsx("a",{href:"/#debug",className:"underline text-blue-500",children:"debug"})," ","page?"]})]})}),d0=pg(Ma(_.jsxs(no,{path:"/",element:_.jsx(Dg,{}),errorElement:_.jsx(c0,{}),children:[_.jsx(no,{index:!0,element:_.jsx(l0,{})}),_.jsx(no,{path:"/debug",element:_.jsx(s0,{})})]})));function f0(){return _.jsx(Eg,{router:d0})}Ii.createRoot(document.getElementById("root")).render(_.jsx(ne.StrictMode,{children:_.jsx(f0,{})})); diff --git a/index.html b/index.html index 38f117f..dc01a10 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Text2Book - +