diff --git a/assets/OfflineBridgeSolver-88949876.js b/assets/OfflineBridgeSolver-08d81071.js similarity index 69% rename from assets/OfflineBridgeSolver-88949876.js rename to assets/OfflineBridgeSolver-08d81071.js index 2798406..1884e8d 100644 --- a/assets/OfflineBridgeSolver-88949876.js +++ b/assets/OfflineBridgeSolver-08d81071.js @@ -1 +1 @@ -import{r as t,a as o,j as f,S as i}from"./index-0f25ba11.js";function l(e){const{allHands:s=[]}=e,[r,a]=t.useState();return t.useEffect(()=>{o(s).then(n=>{a(n)})},[s]),f.jsx(i,{ddtricks:r})}export{l as default}; +import{r as t,a as o,j as f,S as i}from"./index-01c997e9.js";function l(e){const{allHands:s=[]}=e,[r,a]=t.useState();return t.useEffect(()=>{o(s).then(n=>{a(n)})},[s]),f.jsx(i,{ddtricks:r})}export{l as default}; diff --git a/assets/index-0f25ba11.js b/assets/index-01c997e9.js similarity index 80% rename from assets/index-0f25ba11.js rename to assets/index-01c997e9.js index 6734781..88f8891 100644 --- a/assets/index-0f25ba11.js +++ b/assets/index-01c997e9.js @@ -1,4 +1,4 @@ -var Yf=Object.defineProperty;var Xf=(e,t,n)=>t in e?Yf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ne=(e,t,n)=>(Xf(e,typeof t!="symbol"?t+"":t,n),n);function Gf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Jf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc={exports:{}},wo={},rc={exports:{}},W={};/** +var Xf=Object.defineProperty;var Gf=(e,t,n)=>t in e?Xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>(Gf(e,typeof t!="symbol"?t+"":t,n),n);function Jf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const o of l)if(o.type==="childList")for(const i of o.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(l){const o={};return l.integrity&&(o.integrity=l.integrity),l.referrerPolicy&&(o.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?o.credentials="include":l.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(l){if(l.ep)return;l.ep=!0;const o=n(l);fetch(l.href,o)}})();function Zf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nc={exports:{}},wo={},rc={exports:{}},W={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Yf=Object.defineProperty;var Xf=(e,t,n)=>t in e?Yf(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 tl=Symbol.for("react.element"),Zf=Symbol.for("react.portal"),qf=Symbol.for("react.fragment"),bf=Symbol.for("react.strict_mode"),ep=Symbol.for("react.profiler"),tp=Symbol.for("react.provider"),np=Symbol.for("react.context"),rp=Symbol.for("react.forward_ref"),lp=Symbol.for("react.suspense"),op=Symbol.for("react.memo"),ip=Symbol.for("react.lazy"),Pa=Symbol.iterator;function up(e){return e===null||typeof e!="object"?null:(e=Pa&&e[Pa]||e["@@iterator"],typeof e=="function"?e:null)}var lc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oc=Object.assign,ic={};function er(e,t,n){this.props=e,this.context=t,this.refs=ic,this.updater=n||lc}er.prototype.isReactComponent={};er.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")};er.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uc(){}uc.prototype=er.prototype;function yu(e,t,n){this.props=e,this.context=t,this.refs=ic,this.updater=n||lc}var wu=yu.prototype=new uc;wu.constructor=yu;oc(wu,er.prototype);wu.isPureReactComponent=!0;var Na=Array.isArray,ac=Object.prototype.hasOwnProperty,Su={current:null},sc={key:!0,ref:!0,__self:!0,__source:!0};function cc(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)ac.call(t,r)&&!sc.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1t in e?Yf(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 fp=x,pp=Symbol.for("react.element"),hp=Symbol.for("react.fragment"),mp=Object.prototype.hasOwnProperty,vp=fp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gp={key:!0,ref:!0,__self:!0,__source:!0};function dc(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)mp.call(t,r)&&!gp.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:pp,type:e,key:o,ref:i,props:l,_owner:vp.current}}wo.Fragment=hp;wo.jsx=dc;wo.jsxs=dc;nc.exports=wo;var g=nc.exports,Vl={},fc={exports:{}},Ve={},pc={exports:{}},hc={};/** + */var pp=x,hp=Symbol.for("react.element"),mp=Symbol.for("react.fragment"),vp=Object.prototype.hasOwnProperty,gp=pp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,yp={key:!0,ref:!0,__self:!0,__source:!0};function dc(e,t,n){var r,l={},o=null,i=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)vp.call(t,r)&&!yp.hasOwnProperty(r)&&(l[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)l[r]===void 0&&(l[r]=t[r]);return{$$typeof:hp,type:e,key:o,ref:i,props:l,_owner:gp.current}}wo.Fragment=mp;wo.jsx=dc;wo.jsxs=dc;nc.exports=wo;var g=nc.exports,Vl={},fc={exports:{}},Ve={},pc={exports:{}},hc={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var Yf=Object.defineProperty;var Xf=(e,t,n)=>t in e?Yf(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(L,H){var F=L.length;L.push(H);e:for(;0>>1,ue=L[J];if(0>>1;Jl(rr,F))wtl(nn,rr)?(L[J]=nn,L[wt]=F,J=wt):(L[J]=rr,L[Ee]=F,J=Ee);else if(wtl(nn,F))L[J]=nn,L[wt]=F,J=wt;else break e}}return H}function l(L,H){var F=L.sortIndex-H.sortIndex;return F!==0?F:L.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var a=[],s=[],d=1,h=null,m=3,y=!1,E=!1,w=!1,v=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(L){for(var H=n(s);H!==null;){if(H.callback===null)r(s);else if(H.startTime<=L)r(s),H.sortIndex=H.expirationTime,t(a,H);else break;H=n(s)}}function S(L){if(w=!1,p(L),!E)if(n(a)!==null)E=!0,yt(_);else{var H=n(s);H!==null&&Ue(S,H.startTime-L)}}function _(L,H){E=!1,w&&(w=!1,f(P),P=-1),y=!0;var F=m;try{for(p(H),h=n(a);h!==null&&(!(h.expirationTime>H)||L&&!de());){var J=h.callback;if(typeof J=="function"){h.callback=null,m=h.priorityLevel;var ue=J(h.expirationTime<=H);H=e.unstable_now(),typeof ue=="function"?h.callback=ue:h===n(a)&&r(a),p(H)}else r(a);h=n(a)}if(h!==null)var xn=!0;else{var Ee=n(s);Ee!==null&&Ue(S,Ee.startTime-H),xn=!1}return xn}finally{h=null,m=F,y=!1}}var j=!1,R=null,P=-1,Y=5,U=-1;function de(){return!(e.unstable_now()-UL||125J?(L.sortIndex=F,t(s,L),n(a)===null&&L===n(s)&&(w?(f(P),P=-1):w=!0,Ue(S,F-J))):(L.sortIndex=ue,t(a,L),E||y||(E=!0,yt(_))),L},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(L){var H=m;return function(){var F=m;m=H;try{return L.apply(this,arguments)}finally{m=F}}}})(hc);pc.exports=hc;var yp=pc.exports;/** + */(function(e){function t(L,H){var F=L.length;L.push(H);e:for(;0>>1,ue=L[J];if(0>>1;Jl(rr,F))wtl(nn,rr)?(L[J]=nn,L[wt]=F,J=wt):(L[J]=rr,L[Ee]=F,J=Ee);else if(wtl(nn,F))L[J]=nn,L[wt]=F,J=wt;else break e}}return H}function l(L,H){var F=L.sortIndex-H.sortIndex;return F!==0?F:L.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,u=i.now();e.unstable_now=function(){return i.now()-u}}var a=[],s=[],d=1,h=null,m=3,y=!1,E=!1,w=!1,v=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function p(L){for(var H=n(s);H!==null;){if(H.callback===null)r(s);else if(H.startTime<=L)r(s),H.sortIndex=H.expirationTime,t(a,H);else break;H=n(s)}}function S(L){if(w=!1,p(L),!E)if(n(a)!==null)E=!0,yt(_);else{var H=n(s);H!==null&&Ue(S,H.startTime-L)}}function _(L,H){E=!1,w&&(w=!1,f(P),P=-1),y=!0;var F=m;try{for(p(H),h=n(a);h!==null&&(!(h.expirationTime>H)||L&&!de());){var J=h.callback;if(typeof J=="function"){h.callback=null,m=h.priorityLevel;var ue=J(h.expirationTime<=H);H=e.unstable_now(),typeof ue=="function"?h.callback=ue:h===n(a)&&r(a),p(H)}else r(a);h=n(a)}if(h!==null)var xn=!0;else{var Ee=n(s);Ee!==null&&Ue(S,Ee.startTime-H),xn=!1}return xn}finally{h=null,m=F,y=!1}}var j=!1,R=null,P=-1,Y=5,U=-1;function de(){return!(e.unstable_now()-UL||125J?(L.sortIndex=F,t(s,L),n(a)===null&&L===n(s)&&(w?(f(P),P=-1):w=!0,Ue(S,F-J))):(L.sortIndex=ue,t(a,L),E||y||(E=!0,yt(_))),L},e.unstable_shouldYield=de,e.unstable_wrapCallback=function(L){var H=m;return function(){var F=m;m=H;try{return L.apply(this,arguments)}finally{m=F}}}})(hc);pc.exports=hc;var wp=pc.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ var Yf=Object.defineProperty;var Xf=(e,t,n)=>t in e?Yf(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 mc=x,We=yp;function D(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ei=Object.prototype.hasOwnProperty,wp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Da={},Ra={};function Sp(e){return Ei.call(Ra,e)?!0:Ei.call(Da,e)?!1:wp.test(e)?Ra[e]=!0:(Da[e]=!0,!1)}function kp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function xp(e,t,n,r){if(t===null||typeof t>"u"||kp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Eu=/[\-:]([a-z])/g;function Cu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Eu,Cu);xe[t]=new Me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Eu,Cu);xe[t]=new Me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Eu,Cu);xe[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function _u(e,t,n,r){var l=xe.hasOwnProperty(t)?xe[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ei=Object.prototype.hasOwnProperty,Sp=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Da={},Ra={};function kp(e){return Ei.call(Ra,e)?!0:Ei.call(Da,e)?!1:Sp.test(e)?Ra[e]=!0:(Da[e]=!0,!1)}function xp(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Ep(e,t,n,r){if(t===null||typeof t>"u"||xp(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Me(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var xe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xe[e]=new Me(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xe[t]=new Me(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xe[e]=new Me(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xe[e]=new Me(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){xe[e]=new Me(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xe[e]=new Me(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xe[e]=new Me(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xe[e]=new Me(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xe[e]=new Me(e,5,!1,e.toLowerCase(),null,!1,!1)});var Eu=/[\-:]([a-z])/g;function Cu(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Eu,Cu);xe[t]=new Me(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Eu,Cu);xe[t]=new Me(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Eu,Cu);xe[t]=new Me(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xe[e]=new Me(e,1,!1,e.toLowerCase(),null,!1,!1)});xe.xlinkHref=new Me("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xe[e]=new Me(e,1,!1,e.toLowerCase(),null,!0,!0)});function _u(e,t,n,r){var l=xe.hasOwnProperty(t)?xe[t]:null;(l!==null?l.type!==0:r||!(2u||l[i]!==o[u]){var a=` -`+l[i].replace(" at new "," at ");return e.displayName&&a.includes("")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=u);break}}}finally{Go=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wr(e):""}function Ep(e){switch(e.tag){case 5:return wr(e.type);case 16:return wr("Lazy");case 13:return wr("Suspense");case 19:return wr("SuspenseList");case 0:case 2:case 15:return e=Jo(e.type,!1),e;case 11:return e=Jo(e.type.render,!1),e;case 1:return e=Jo(e.type,!0),e;default:return""}}function Ni(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nn:return"Fragment";case Pn:return"Portal";case Ci:return"Profiler";case Pu:return"StrictMode";case _i:return"Suspense";case Pi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yc:return(e.displayName||"Context")+".Consumer";case gc:return(e._context.displayName||"Context")+".Provider";case Nu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:Ni(e.type)||"Memo";case Ft:t=e._payload,e=e._init;try{return Ni(e(t))}catch{}}return null}function Cp(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 Ni(t);case 8:return t===Pu?"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 Zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _p(e){var t=Sc(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 pl(e){e._valueTracker||(e._valueTracker=_p(e))}function kc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ql(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 ji(e,t){var n=t.checked;return oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ta(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zt(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 xc(e,t){t=t.checked,t!=null&&_u(e,"checked",t,!1)}function Di(e,t){xc(e,t);var n=Zt(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")?Ri(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ri(e,t.type,Zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ma(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 Ri(e,t,n){(t!=="number"||Ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Sr=Array.isArray;function Hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=hl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ar(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _r={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},Pp=["Webkit","ms","Moz","O"];Object.keys(_r).forEach(function(e){Pp.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_r[t]=_r[e]})});function Pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_r.hasOwnProperty(e)&&_r[e]?(""+t).trim():t+"px"}function Nc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Np=oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mi(e,t){if(t){if(Np[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function zi(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 Fi=null;function Du(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ai=null,$n=null,Bn=null;function Aa(e){if(e=ll(e)){if(typeof Ai!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Co(t),Ai(e.stateNode,e.type,t))}}function jc(e){$n?Bn?Bn.push(e):Bn=[e]:$n=e}function Dc(){if($n){var e=$n,t=Bn;if(Bn=$n=null,Aa(e),t)for(e=0;e>>=0,e===0?32:31-(Ip(e)/Up|0)|0}var ml=64,vl=4194304;function kr(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 Gl(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 u=i&~l;u!==0?r=kr(u):(o&=i,o!==0&&(r=kr(o)))}else i=n&~l,i!==0?r=kr(i):o!==0&&(r=kr(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 nl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=n}function Wp(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=Nr),Qa=String.fromCharCode(32),Ka=!1;function Gc(e,t){switch(e){case"keyup":return gh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function wh(e,t){switch(e){case"compositionend":return Jc(t);case"keypress":return t.which!==32?null:(Ka=!0,Qa);case"textInput":return e=t.data,e===Qa&&Ka?null:e;default:return null}}function Sh(e,t){if(jn)return e==="compositionend"||!Ou&&Gc(e,t)?(e=Yc(),Fl=zu=Ut=null,jn=!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=Ja(n)}}function ed(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ed(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function td(){for(var e=window,t=Ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ql(e.document)}return t}function Iu(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 Dh(e){var t=td(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ed(n.ownerDocument.documentElement,n)){if(r!==null&&Iu(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=Za(n,o);var i=Za(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,Dn=null,Bi=null,Dr=null,Wi=!1;function qa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wi||Dn==null||Dn!==Ql(r)||(r=Dn,"selectionStart"in r&&Iu(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}),Dr&&Br(Dr,r)||(Dr=r,r=ql(Bi,"onSelect"),0Tn||(e.current=Gi[Tn],Gi[Tn]=null,Tn--)}function q(e,t){Tn++,Gi[Tn]=e.current,e.current=t}var qt={},je=en(qt),Ae=en(!1),pn=qt;function Xn(e,t){var n=e.type.contextTypes;if(!n)return qt;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 Oe(e){return e=e.childContextTypes,e!=null}function eo(){ee(Ae),ee(je)}function os(e,t,n){if(je.current!==qt)throw Error(D(168));q(je,t),q(Ae,n)}function cd(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(D(108,Cp(e)||"Unknown",l));return oe({},n,r)}function to(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,pn=je.current,q(je,e),q(Ae,Ae.current),!0}function is(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=cd(e,t,pn),r.__reactInternalMemoizedMergedChildContext=e,ee(Ae),ee(je),q(je,e)):ee(Ae),q(Ae,n)}var Et=null,_o=!1,ci=!1;function dd(e){Et===null?Et=[e]:Et.push(e)}function $h(e){_o=!0,dd(e)}function tn(){if(!ci&&Et!==null){ci=!0;var e=0,t=G;try{var n=Et;for(G=1;e>=i,l-=i,Ct=1<<32-ut(t)+l|n<P?(Y=R,R=null):Y=R.sibling;var U=m(f,R,p[P],S);if(U===null){R===null&&(R=Y);break}e&&R&&U.alternate===null&&t(f,R),c=o(U,c,P),j===null?_=U:j.sibling=U,j=U,R=Y}if(P===p.length)return n(f,R),te&&ln(f,P),_;if(R===null){for(;PP?(Y=R,R=null):Y=R.sibling;var de=m(f,R,U.value,S);if(de===null){R===null&&(R=Y);break}e&&R&&de.alternate===null&&t(f,R),c=o(de,c,P),j===null?_=de:j.sibling=de,j=de,R=Y}if(U.done)return n(f,R),te&&ln(f,P),_;if(R===null){for(;!U.done;P++,U=p.next())U=h(f,U.value,S),U!==null&&(c=o(U,c,P),j===null?_=U:j.sibling=U,j=U);return te&&ln(f,P),_}for(R=r(f,R);!U.done;P++,U=p.next())U=y(R,f,P,U.value,S),U!==null&&(e&&U.alternate!==null&&R.delete(U.key===null?P:U.key),c=o(U,c,P),j===null?_=U:j.sibling=U,j=U);return e&&R.forEach(function(Ke){return t(f,Ke)}),te&&ln(f,P),_}function v(f,c,p,S){if(typeof p=="object"&&p!==null&&p.type===Nn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case fl:e:{for(var _=p.key,j=c;j!==null;){if(j.key===_){if(_=p.type,_===Nn){if(j.tag===7){n(f,j.sibling),c=l(j,p.props.children),c.return=f,f=c;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ft&&ps(_)===j.type){n(f,j.sibling),c=l(j,p.props),c.ref=hr(f,j,p),c.return=f,f=c;break e}n(f,j);break}else t(f,j);j=j.sibling}p.type===Nn?(c=fn(p.props.children,f.mode,S,p.key),c.return=f,f=c):(S=Wl(p.type,p.key,p.props,null,f.mode,S),S.ref=hr(f,c,p),S.return=f,f=S)}return i(f);case Pn:e:{for(j=p.key;c!==null;){if(c.key===j)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(f,c.sibling),c=l(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=yi(p,f.mode,S),c.return=f,f=c}return i(f);case Ft:return j=p._init,v(f,c,j(p._payload),S)}if(Sr(p))return E(f,c,p,S);if(sr(p))return w(f,c,p,S);El(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,p),c.return=f,f=c):(n(f,c),c=gi(p,f.mode,S),c.return=f,f=c),i(f)):n(f,c)}return v}var Jn=wd(!0),Sd=wd(!1),ol={},mt=en(ol),Kr=en(ol),Yr=en(ol);function sn(e){if(e===ol)throw Error(D(174));return e}function Yu(e,t){switch(q(Yr,t),q(Kr,e),q(mt,ol),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ti(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ti(t,e)}ee(mt),q(mt,t)}function Zn(){ee(mt),ee(Kr),ee(Yr)}function kd(e){sn(Yr.current);var t=sn(mt.current),n=Ti(t,e.type);t!==n&&(q(Kr,e),q(mt,n))}function Xu(e){Kr.current===e&&(ee(mt),ee(Kr))}var re=en(0);function uo(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 di=[];function Gu(){for(var e=0;en?n:4,e(!0);var r=fi.transition;fi.transition={};try{e(!1),t()}finally{G=n,fi.transition=r}}function Od(){return be().memoizedState}function Qh(e,t,n){var r=Gt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Id(e))Ud(t,n);else if(n=md(e,t,n,r),n!==null){var l=Le();at(n,e,r,l),Hd(n,t,r)}}function Kh(e,t,n){var r=Gt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Id(e))Ud(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,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,st(u,i)){var a=t.interleaved;a===null?(l.next=l,Qu(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=md(e,t,l,r),n!==null&&(l=Le(),at(n,e,r,l),Hd(n,t,r))}}function Id(e){var t=e.alternate;return e===le||t!==null&&t===le}function Ud(e,t){Rr=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lu(e,n)}}var so={readContext:qe,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},Yh={readContext:qe,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:qe,useEffect:ms,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ul(4194308,4,Td.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ul(4,2,e,t)},useMemo:function(e,t){var n=dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dt();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=Qh.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:hs,useDebugValue:ea,useDeferredValue:function(e){return dt().memoizedState=e},useTransition:function(){var e=hs(!1),t=e[0];return e=Vh.bind(null,e[1]),dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,l=dt();if(te){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ye===null)throw Error(D(349));mn&30||Cd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,ms(Pd.bind(null,r,o,e),[e]),r.flags|=2048,Jr(9,_d.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=dt(),t=ye.identifierPrefix;if(te){var n=_t,r=Ct;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xr++,0")&&(a=a.replace("",e.displayName)),a}while(1<=i&&0<=u);break}}}finally{Go=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?wr(e):""}function Cp(e){switch(e.tag){case 5:return wr(e.type);case 16:return wr("Lazy");case 13:return wr("Suspense");case 19:return wr("SuspenseList");case 0:case 2:case 15:return e=Jo(e.type,!1),e;case 11:return e=Jo(e.type.render,!1),e;case 1:return e=Jo(e.type,!0),e;default:return""}}function Ni(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Nn:return"Fragment";case Pn:return"Portal";case Ci:return"Profiler";case Pu:return"StrictMode";case _i:return"Suspense";case Pi:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yc:return(e.displayName||"Context")+".Consumer";case gc:return(e._context.displayName||"Context")+".Provider";case Nu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ju:return t=e.displayName||null,t!==null?t:Ni(e.type)||"Memo";case Ft:t=e._payload,e=e._init;try{return Ni(e(t))}catch{}}return null}function _p(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 Ni(t);case 8:return t===Pu?"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 Zt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Pp(e){var t=Sc(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 pl(e){e._valueTracker||(e._valueTracker=Pp(e))}function kc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Ql(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 ji(e,t){var n=t.checked;return oe({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ta(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Zt(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 xc(e,t){t=t.checked,t!=null&&_u(e,"checked",t,!1)}function Di(e,t){xc(e,t);var n=Zt(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")?Ri(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ri(e,t.type,Zt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ma(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 Ri(e,t,n){(t!=="number"||Ql(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Sr=Array.isArray;function Hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=hl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ar(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _r={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},Np=["Webkit","ms","Moz","O"];Object.keys(_r).forEach(function(e){Np.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_r[t]=_r[e]})});function Pc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_r.hasOwnProperty(e)&&_r[e]?(""+t).trim():t+"px"}function Nc(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Pc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var jp=oe({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Mi(e,t){if(t){if(jp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(D(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(D(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(D(61))}if(t.style!=null&&typeof t.style!="object")throw Error(D(62))}}function zi(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 Fi=null;function Du(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ai=null,$n=null,Bn=null;function Aa(e){if(e=ll(e)){if(typeof Ai!="function")throw Error(D(280));var t=e.stateNode;t&&(t=Co(t),Ai(e.stateNode,e.type,t))}}function jc(e){$n?Bn?Bn.push(e):Bn=[e]:$n=e}function Dc(){if($n){var e=$n,t=Bn;if(Bn=$n=null,Aa(e),t)for(e=0;e>>=0,e===0?32:31-(Up(e)/Hp|0)|0}var ml=64,vl=4194304;function kr(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 Gl(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 u=i&~l;u!==0?r=kr(u):(o&=i,o!==0&&(r=kr(o)))}else i=n&~l,i!==0?r=kr(i):o!==0&&(r=kr(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 nl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=n}function Vp(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=Nr),Qa=String.fromCharCode(32),Ka=!1;function Gc(e,t){switch(e){case"keyup":return yh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Jc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jn=!1;function Sh(e,t){switch(e){case"compositionend":return Jc(t);case"keypress":return t.which!==32?null:(Ka=!0,Qa);case"textInput":return e=t.data,e===Qa&&Ka?null:e;default:return null}}function kh(e,t){if(jn)return e==="compositionend"||!Ou&&Gc(e,t)?(e=Yc(),Fl=zu=Ut=null,jn=!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=Ja(n)}}function ed(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ed(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function td(){for(var e=window,t=Ql();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Ql(e.document)}return t}function Iu(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 Rh(e){var t=td(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&ed(n.ownerDocument.documentElement,n)){if(r!==null&&Iu(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=Za(n,o);var i=Za(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,Dn=null,Bi=null,Dr=null,Wi=!1;function qa(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wi||Dn==null||Dn!==Ql(r)||(r=Dn,"selectionStart"in r&&Iu(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}),Dr&&Br(Dr,r)||(Dr=r,r=ql(Bi,"onSelect"),0Tn||(e.current=Gi[Tn],Gi[Tn]=null,Tn--)}function q(e,t){Tn++,Gi[Tn]=e.current,e.current=t}var qt={},je=en(qt),Ae=en(!1),pn=qt;function Xn(e,t){var n=e.type.contextTypes;if(!n)return qt;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 Oe(e){return e=e.childContextTypes,e!=null}function eo(){ee(Ae),ee(je)}function os(e,t,n){if(je.current!==qt)throw Error(D(168));q(je,t),q(Ae,n)}function cd(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(D(108,_p(e)||"Unknown",l));return oe({},n,r)}function to(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,pn=je.current,q(je,e),q(Ae,Ae.current),!0}function is(e,t,n){var r=e.stateNode;if(!r)throw Error(D(169));n?(e=cd(e,t,pn),r.__reactInternalMemoizedMergedChildContext=e,ee(Ae),ee(je),q(je,e)):ee(Ae),q(Ae,n)}var Et=null,_o=!1,ci=!1;function dd(e){Et===null?Et=[e]:Et.push(e)}function Bh(e){_o=!0,dd(e)}function tn(){if(!ci&&Et!==null){ci=!0;var e=0,t=G;try{var n=Et;for(G=1;e>=i,l-=i,Ct=1<<32-ut(t)+l|n<P?(Y=R,R=null):Y=R.sibling;var U=m(f,R,p[P],S);if(U===null){R===null&&(R=Y);break}e&&R&&U.alternate===null&&t(f,R),c=o(U,c,P),j===null?_=U:j.sibling=U,j=U,R=Y}if(P===p.length)return n(f,R),ne&&ln(f,P),_;if(R===null){for(;PP?(Y=R,R=null):Y=R.sibling;var de=m(f,R,U.value,S);if(de===null){R===null&&(R=Y);break}e&&R&&de.alternate===null&&t(f,R),c=o(de,c,P),j===null?_=de:j.sibling=de,j=de,R=Y}if(U.done)return n(f,R),ne&&ln(f,P),_;if(R===null){for(;!U.done;P++,U=p.next())U=h(f,U.value,S),U!==null&&(c=o(U,c,P),j===null?_=U:j.sibling=U,j=U);return ne&&ln(f,P),_}for(R=r(f,R);!U.done;P++,U=p.next())U=y(R,f,P,U.value,S),U!==null&&(e&&U.alternate!==null&&R.delete(U.key===null?P:U.key),c=o(U,c,P),j===null?_=U:j.sibling=U,j=U);return e&&R.forEach(function(Ke){return t(f,Ke)}),ne&&ln(f,P),_}function v(f,c,p,S){if(typeof p=="object"&&p!==null&&p.type===Nn&&p.key===null&&(p=p.props.children),typeof p=="object"&&p!==null){switch(p.$$typeof){case fl:e:{for(var _=p.key,j=c;j!==null;){if(j.key===_){if(_=p.type,_===Nn){if(j.tag===7){n(f,j.sibling),c=l(j,p.props.children),c.return=f,f=c;break e}}else if(j.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Ft&&ps(_)===j.type){n(f,j.sibling),c=l(j,p.props),c.ref=hr(f,j,p),c.return=f,f=c;break e}n(f,j);break}else t(f,j);j=j.sibling}p.type===Nn?(c=fn(p.props.children,f.mode,S,p.key),c.return=f,f=c):(S=Wl(p.type,p.key,p.props,null,f.mode,S),S.ref=hr(f,c,p),S.return=f,f=S)}return i(f);case Pn:e:{for(j=p.key;c!==null;){if(c.key===j)if(c.tag===4&&c.stateNode.containerInfo===p.containerInfo&&c.stateNode.implementation===p.implementation){n(f,c.sibling),c=l(c,p.children||[]),c.return=f,f=c;break e}else{n(f,c);break}else t(f,c);c=c.sibling}c=yi(p,f.mode,S),c.return=f,f=c}return i(f);case Ft:return j=p._init,v(f,c,j(p._payload),S)}if(Sr(p))return E(f,c,p,S);if(sr(p))return w(f,c,p,S);El(f,p)}return typeof p=="string"&&p!==""||typeof p=="number"?(p=""+p,c!==null&&c.tag===6?(n(f,c.sibling),c=l(c,p),c.return=f,f=c):(n(f,c),c=gi(p,f.mode,S),c.return=f,f=c),i(f)):n(f,c)}return v}var Jn=wd(!0),Sd=wd(!1),ol={},mt=en(ol),Kr=en(ol),Yr=en(ol);function sn(e){if(e===ol)throw Error(D(174));return e}function Yu(e,t){switch(q(Yr,t),q(Kr,e),q(mt,ol),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ti(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ti(t,e)}ee(mt),q(mt,t)}function Zn(){ee(mt),ee(Kr),ee(Yr)}function kd(e){sn(Yr.current);var t=sn(mt.current),n=Ti(t,e.type);t!==n&&(q(Kr,e),q(mt,n))}function Xu(e){Kr.current===e&&(ee(mt),ee(Kr))}var re=en(0);function uo(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 di=[];function Gu(){for(var e=0;en?n:4,e(!0);var r=fi.transition;fi.transition={};try{e(!1),t()}finally{G=n,fi.transition=r}}function Od(){return be().memoizedState}function Kh(e,t,n){var r=Gt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Id(e))Ud(t,n);else if(n=md(e,t,n,r),n!==null){var l=Le();at(n,e,r,l),Hd(n,t,r)}}function Yh(e,t,n){var r=Gt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Id(e))Ud(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,u=o(i,n);if(l.hasEagerState=!0,l.eagerState=u,st(u,i)){var a=t.interleaved;a===null?(l.next=l,Qu(t)):(l.next=a.next,a.next=l),t.interleaved=l;return}}catch{}finally{}n=md(e,t,l,r),n!==null&&(l=Le(),at(n,e,r,l),Hd(n,t,r))}}function Id(e){var t=e.alternate;return e===le||t!==null&&t===le}function Ud(e,t){Rr=ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hd(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lu(e,n)}}var so={readContext:qe,useCallback:_e,useContext:_e,useEffect:_e,useImperativeHandle:_e,useInsertionEffect:_e,useLayoutEffect:_e,useMemo:_e,useReducer:_e,useRef:_e,useState:_e,useDebugValue:_e,useDeferredValue:_e,useTransition:_e,useMutableSource:_e,useSyncExternalStore:_e,useId:_e,unstable_isNewReconciler:!1},Xh={readContext:qe,useCallback:function(e,t){return dt().memoizedState=[e,t===void 0?null:t],e},useContext:qe,useEffect:ms,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ul(4194308,4,Td.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ul(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ul(4,2,e,t)},useMemo:function(e,t){var n=dt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=dt();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=Kh.bind(null,le,e),[r.memoizedState,e]},useRef:function(e){var t=dt();return e={current:e},t.memoizedState=e},useState:hs,useDebugValue:ea,useDeferredValue:function(e){return dt().memoizedState=e},useTransition:function(){var e=hs(!1),t=e[0];return e=Qh.bind(null,e[1]),dt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=le,l=dt();if(ne){if(n===void 0)throw Error(D(407));n=n()}else{if(n=t(),ye===null)throw Error(D(349));mn&30||Cd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,ms(Pd.bind(null,r,o,e),[e]),r.flags|=2048,Jr(9,_d.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=dt(),t=ye.identifierPrefix;if(ne){var n=_t,r=Ct;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Xr++,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[pt]=t,e[Qr]=r,Gd(e,t,!1,!1),t.stateNode=e;e:{switch(i=zi(n,r),n){case"dialog":b("cancel",e),b("close",e),l=r;break;case"iframe":case"object":case"embed":b("load",e),l=r;break;case"video":case"audio":for(l=0;lbn&&(t.flags|=128,r=!0,mr(o,!1),t.lanes=4194304)}else{if(!r)if(e=uo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!te)return Pe(t),null}else 2*ae()-o.renderingStartTime>bn&&n!==1073741824&&(t.flags|=128,r=!0,mr(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=ae(),t.sibling=null,n=re.current,q(re,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return ia(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?He&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function tm(e,t){switch(Hu(t),t.tag){case 1:return Oe(t.type)&&eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zn(),ee(Ae),ee(je),Gu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xu(t),null;case 13:if(ee(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Gn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(re),null;case 4:return Zn(),null;case 10:return Vu(t.type._context),null;case 22:case 23:return ia(),null;case 24:return null;default:return null}}var _l=!1,Ne=!1,nm=typeof WeakSet=="function"?WeakSet:Set,T=null;function An(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function uu(e,t,n){try{n()}catch(r){ie(e,t,r)}}var Cs=!1;function rm(e,t){if(Vi=Jl,e=td(),Iu(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,u=-1,a=-1,s=0,d=0,h=e,m=null;t:for(;;){for(var y;h!==n||l!==0&&h.nodeType!==3||(u=i+l),h!==o||r!==0&&h.nodeType!==3||(a=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(y=h.firstChild)!==null;)m=h,h=y;for(;;){if(h===e)break t;if(m===n&&++s===l&&(u=i),m===o&&++d===r&&(a=i),(y=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=y}n=u===-1||a===-1?null:{start:u,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qi={focusedElem:e,selectionRange:n},Jl=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var w=E.memoizedProps,v=E.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:lt(t.type,w),v);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){ie(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return E=Cs,Cs=!1,E}function Lr(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&&uu(t,n,o)}l=l.next}while(l!==r)}}function jo(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 au(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 qd(e){var t=e.alternate;t!==null&&(e.alternate=null,qd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pt],delete t[Qr],delete t[Xi],delete t[Uh],delete t[Hh])),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 bd(e){return e.tag===5||e.tag===3||e.tag===4}function _s(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bd(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 su(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=bl));else if(r!==4&&(e=e.child,e!==null))for(su(e,t,n),e=e.sibling;e!==null;)su(e,t,n),e=e.sibling}function cu(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(cu(e,t,n),e=e.sibling;e!==null;)cu(e,t,n),e=e.sibling}var Se=null,ot=!1;function zt(e,t,n){for(n=n.child;n!==null;)ef(e,t,n),n=n.sibling}function ef(e,t,n){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(So,n)}catch{}switch(n.tag){case 5:Ne||An(n,t);case 6:var r=Se,l=ot;Se=null,zt(e,t,n),Se=r,ot=l,Se!==null&&(ot?(e=Se,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Se.removeChild(n.stateNode));break;case 18:Se!==null&&(ot?(e=Se,n=n.stateNode,e.nodeType===8?si(e.parentNode,n):e.nodeType===1&&si(e,n),Hr(e)):si(Se,n.stateNode));break;case 4:r=Se,l=ot,Se=n.stateNode.containerInfo,ot=!0,zt(e,t,n),Se=r,ot=l;break;case 0:case 11:case 14:case 15:if(!Ne&&(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)&&uu(n,t,i),l=l.next}while(l!==r)}zt(e,t,n);break;case 1:if(!Ne&&(An(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){ie(n,t,u)}zt(e,t,n);break;case 21:zt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,zt(e,t,n),Ne=r):zt(e,t,n);break;default:zt(e,t,n)}}function Ps(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new nm),t.forEach(function(r){var l=fm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function rt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*om(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,po=0,Q&6)throw Error(D(331));var l=Q;for(Q|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var u=o.deletions;if(u!==null){for(var a=0;aae()-la?dn(e,0):ra|=n),Ie(e,t)}function sf(e,t){t===0&&(e.mode&1?(t=vl,vl<<=1,!(vl&130023424)&&(vl=4194304)):t=1);var n=Le();e=Rt(e,t),e!==null&&(nl(e,t,n),Ie(e,n))}function dm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sf(e,n)}function fm(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(D(314))}r!==null&&r.delete(t),sf(e,n)}var cf;cf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,bh(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,te&&t.flags&1048576&&fd(t,ro,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hl(e,t),e=t.pendingProps;var l=Xn(t,je.current);Vn(t,n),l=Zu(null,t,r,e,l,n);var o=qu();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,Oe(r)?(o=!0,to(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ku(t),l.updater=Po,t.stateNode=l,l._reactInternals=t,eu(t,r,e,n),t=ru(null,t,r,!0,o,n)):(t.tag=0,te&&o&&Uu(t),De(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=hm(r),e=lt(r,e),l){case 0:t=nu(null,t,r,e,n);break e;case 1:t=ks(null,t,r,e,n);break e;case 11:t=ws(null,t,r,e,n);break e;case 14:t=Ss(null,t,r,lt(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),nu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),ks(e,t,r,l,n);case 3:e:{if(Kd(t),e===null)throw Error(D(387));r=t.pendingProps,o=t.memoizedState,l=o.element,vd(e,t),io(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=qn(Error(D(423)),t),t=xs(e,t,r,n,l);break e}else if(r!==l){l=qn(Error(D(424)),t),t=xs(e,t,r,n,l);break e}else for($e=Kt(t.stateNode.containerInfo.firstChild),Be=t,te=!0,it=null,n=Sd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gn(),r===l){t=Lt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return kd(t),e===null&&Zi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Ki(r,l)?i=null:o!==null&&Ki(r,o)&&(t.flags|=32),Qd(e,t),De(e,t,i,n),t.child;case 6:return e===null&&Zi(t),null;case 13:return Yd(e,t,n);case 4:return Yu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Jn(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),ws(e,t,r,l,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,q(lo,r._currentValue),r._currentValue=i,o!==null)if(st(o.value,i)){if(o.children===l.children&&!Ae.current){t=Lt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var a=u.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Pt(-1,n&-n),a.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?a.next=a:(a.next=d.next,d.next=a),s.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),qi(o.return,n,t),u.lanes|=n;break}a=a.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(D(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),qi(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}De(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Vn(t,n),l=qe(l),r=r(l),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,l=lt(r,t.pendingProps),l=lt(r.type,l),Ss(e,t,r,l,n);case 15:return Wd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Hl(e,t),t.tag=1,Oe(r)?(e=!0,to(t)):e=!1,Vn(t,n),yd(t,r,l),eu(t,r,l,n),ru(null,t,r,!0,e,n);case 19:return Xd(e,t,n);case 22:return Vd(e,t,n)}throw Error(D(156,t.tag))};function df(e,t){return Ac(e,t)}function pm(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 Je(e,t,n,r){return new pm(e,t,n,r)}function aa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hm(e){if(typeof e=="function")return aa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nu)return 11;if(e===ju)return 14}return 2}function Jt(e,t){var n=e.alternate;return n===null?(n=Je(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 Wl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")aa(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Nn:return fn(n.children,l,o,t);case Pu:i=8,l|=8;break;case Ci:return e=Je(12,n,t,l|2),e.elementType=Ci,e.lanes=o,e;case _i:return e=Je(13,n,t,l),e.elementType=_i,e.lanes=o,e;case Pi:return e=Je(19,n,t,l),e.elementType=Pi,e.lanes=o,e;case wc:return Ro(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gc:i=10;break e;case yc:i=9;break e;case Nu:i=11;break e;case ju:i=14;break e;case Ft:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Je(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function fn(e,t,n,r){return e=Je(7,e,r,t),e.lanes=n,e}function Ro(e,t,n,r){return e=Je(22,e,r,t),e.elementType=wc,e.lanes=n,e.stateNode={isHidden:!1},e}function gi(e,t,n){return e=Je(6,e,null,t),e.lanes=n,e}function yi(e,t,n){return t=Je(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function mm(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=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function sa(e,t,n,r,l,o,i,u,a){return e=new mm(e,t,n,u,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Je(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ku(o),e}function vm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mf)}catch(e){console.error(e)}}mf(),fc.exports=Ve;var km=fc.exports,zs=km;Vl.createRoot=zs.createRoot,Vl.hydrateRoot=zs.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function mi(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function tu(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Zh=typeof WeakMap=="function"?WeakMap:Map;function $d(e,t,n){n=Pt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){fo||(fo=!0,du=r),tu(e,t)},n}function Bd(e,t,n){n=Pt(-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(){tu(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){tu(e,t),typeof r!="function"&&(Xt===null?Xt=new Set([this]):Xt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function vs(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zh;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=dm.bind(null,e,t,n),t.then(e,e))}function gs(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 ys(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=Pt(-1,1),t.tag=2,Yt(n,t,1))),n.lanes|=1),e)}var qh=Mt.ReactCurrentOwner,Fe=!1;function De(e,t,n,r){t.child=e===null?Sd(t,null,n,r):Jn(t,e.child,n,r)}function ws(e,t,n,r,l){n=n.render;var o=t.ref;return Vn(t,l),r=Zu(e,t,n,r,o,l),n=qu(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Lt(e,t,l)):(ne&&n&&Uu(t),t.flags|=1,De(e,t,r,l),t.child)}function Ss(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!aa(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,Wd(e,t,o,r,l)):(e=Wl(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:Br,n(i,r)&&e.ref===t.ref)return Lt(e,t,l)}return t.flags|=1,e=Jt(o,r),e.ref=t.ref,e.return=t,t.child=e}function Wd(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(Br(o,r)&&e.ref===t.ref)if(Fe=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Fe=!0);else return t.lanes=e.lanes,Lt(e,t,l)}return nu(e,t,n,r,l)}function Vd(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},q(On,He),He|=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,q(On,He),He|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,q(On,He),He|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,q(On,He),He|=r;return De(e,t,l,n),t.child}function Qd(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function nu(e,t,n,r,l){var o=Oe(n)?pn:je.current;return o=Xn(t,o),Vn(t,l),n=Zu(e,t,n,r,o,l),r=qu(),e!==null&&!Fe?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Lt(e,t,l)):(ne&&r&&Uu(t),t.flags|=1,De(e,t,n,l),t.child)}function ks(e,t,n,r,l){if(Oe(n)){var o=!0;to(t)}else o=!1;if(Vn(t,l),t.stateNode===null)Hl(e,t),yd(t,n,r),eu(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,u=t.memoizedProps;i.props=u;var a=i.context,s=n.contextType;typeof s=="object"&&s!==null?s=qe(s):(s=Oe(n)?pn:je.current,s=Xn(t,s));var d=n.getDerivedStateFromProps,h=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";h||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==r||a!==s)&&fs(t,i,r,s),At=!1;var m=t.memoizedState;i.state=m,io(t,r,i,l),a=t.memoizedState,u!==r||m!==a||Ae.current||At?(typeof d=="function"&&(bi(t,n,d,r),a=t.memoizedState),(u=At||ds(t,n,u,r,m,a,s))?(h||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=a),i.props=r,i.state=a,i.context=s,r=u):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,vd(e,t),u=t.memoizedProps,s=t.type===t.elementType?u:lt(t.type,u),i.props=s,h=t.pendingProps,m=i.context,a=n.contextType,typeof a=="object"&&a!==null?a=qe(a):(a=Oe(n)?pn:je.current,a=Xn(t,a));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==h||m!==a)&&fs(t,i,r,a),At=!1,m=t.memoizedState,i.state=m,io(t,r,i,l);var E=t.memoizedState;u!==h||m!==E||Ae.current||At?(typeof y=="function"&&(bi(t,n,y,r),E=t.memoizedState),(s=At||ds(t,n,s,r,m,E,a)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,E,a),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,E,a)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=E),i.props=r,i.state=E,i.context=a,r=s):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&m===e.memoizedState||(t.flags|=1024),r=!1)}return ru(e,t,n,r,o,l)}function ru(e,t,n,r,l,o){Qd(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&is(t,n,!1),Lt(e,t,o);r=t.stateNode,qh.current=t;var u=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=Jn(t,e.child,null,o),t.child=Jn(t,null,u,o)):De(e,t,u,o),t.memoizedState=r.state,l&&is(t,n,!0),t.child}function Kd(e){var t=e.stateNode;t.pendingContext?os(e,t.pendingContext,t.pendingContext!==t.context):t.context&&os(e,t.context,!1),Yu(e,t.containerInfo)}function xs(e,t,n,r,l){return Gn(),$u(l),t.flags|=256,De(e,t,n,r),t.child}var lu={dehydrated:null,treeContext:null,retryLane:0};function ou(e){return{baseLanes:e,cachePool:null,transitions:null}}function Yd(e,t,n){var r=t.pendingProps,l=re.current,o=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(l&2)!==0),u?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),q(re,l&1),e===null)return Zi(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=Ro(i,r,0,null),e=fn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=ou(n),t.memoizedState=lu,e):ta(t,i));if(l=e.memoizedState,l!==null&&(u=l.dehydrated,u!==null))return bh(e,t,i,r,u,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,u=l.sibling;var a={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=a,t.deletions=null):(r=Jt(l,a),r.subtreeFlags=l.subtreeFlags&14680064),u!==null?o=Jt(u,o):(o=fn(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?ou(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=lu,r}return o=e.child,e=o.sibling,r=Jt(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 ta(e,t){return t=Ro({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Cl(e,t,n,r){return r!==null&&$u(r),Jn(t,e.child,null,n),e=ta(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bh(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=mi(Error(D(422))),Cl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Ro({mode:"visible",children:r.children},l,0,null),o=fn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Jn(t,e.child,null,i),t.child.memoizedState=ou(i),t.memoizedState=lu,o);if(!(t.mode&1))return Cl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var u=r.dgst;return r=u,o=Error(D(419)),r=mi(o,r,void 0),Cl(e,t,i,r)}if(u=(i&e.childLanes)!==0,Fe||u){if(r=ye,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,Rt(e,l),at(r,e,l,-1))}return ua(),r=mi(Error(D(421))),Cl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=fm.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,$e=Kt(l.nextSibling),Be=t,ne=!0,it=null,e!==null&&(Xe[Ge++]=Ct,Xe[Ge++]=_t,Xe[Ge++]=hn,Ct=e.id,_t=e.overflow,hn=t),t=ta(t,r.children),t.flags|=4096,t)}function Es(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),qi(e.return,t,n)}function vi(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 Xd(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(De(e,t,r.children,n),r=re.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&&Es(e,n,t);else if(e.tag===19)Es(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(q(re,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&&uo(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),vi(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&&uo(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}vi(t,!0,n,null,o);break;case"together":vi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Hl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(D(153));if(t.child!==null){for(e=t.child,n=Jt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Jt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function em(e,t,n){switch(t.tag){case 3:Kd(t),Gn();break;case 5:kd(t);break;case 1:Oe(t.type)&&to(t);break;case 4:Yu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;q(lo,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(q(re,re.current&1),t.flags|=128,null):n&t.child.childLanes?Yd(e,t,n):(q(re,re.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);q(re,re.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Xd(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),q(re,re.current),r)break;return null;case 22:case 23:return t.lanes=0,Vd(e,t,n)}return Lt(e,t,n)}var Gd,iu,Jd,Zd;Gd=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}};iu=function(){};Jd=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,sn(mt.current);var o=null;switch(n){case"input":l=ji(e,l),r=ji(e,r),o=[];break;case"select":l=oe({},l,{value:void 0}),r=oe({},r,{value:void 0}),o=[];break;case"textarea":l=Li(e,l),r=Li(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=bl)}Mi(n,r);var i;n=null;for(s in l)if(!r.hasOwnProperty(s)&&l.hasOwnProperty(s)&&l[s]!=null)if(s==="style"){var u=l[s];for(i in u)u.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else s!=="dangerouslySetInnerHTML"&&s!=="children"&&s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(Fr.hasOwnProperty(s)?o||(o=[]):(o=o||[]).push(s,null));for(s in r){var a=r[s];if(u=l!=null?l[s]:void 0,r.hasOwnProperty(s)&&a!==u&&(a!=null||u!=null))if(s==="style")if(u){for(i in u)!u.hasOwnProperty(i)||a&&a.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in a)a.hasOwnProperty(i)&&u[i]!==a[i]&&(n||(n={}),n[i]=a[i])}else n||(o||(o=[]),o.push(s,n)),n=a;else s==="dangerouslySetInnerHTML"?(a=a?a.__html:void 0,u=u?u.__html:void 0,a!=null&&u!==a&&(o=o||[]).push(s,a)):s==="children"?typeof a!="string"&&typeof a!="number"||(o=o||[]).push(s,""+a):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&(Fr.hasOwnProperty(s)?(a!=null&&s==="onScroll"&&b("scroll",e),o||u===a||(o=[])):(o=o||[]).push(s,a))}n&&(o=o||[]).push("style",n);var s=o;(t.updateQueue=s)&&(t.flags|=4)}};Zd=function(e,t,n,r){n!==r&&(t.flags|=4)};function mr(e,t){if(!ne)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 Pe(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 tm(e,t,n){var r=t.pendingProps;switch(Hu(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pe(t),null;case 1:return Oe(t.type)&&eo(),Pe(t),null;case 3:return r=t.stateNode,Zn(),ee(Ae),ee(je),Gu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(xl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,it!==null&&(hu(it),it=null))),iu(e,t),Pe(t),null;case 5:Xu(t);var l=sn(Yr.current);if(n=t.type,e!==null&&t.stateNode!=null)Jd(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(D(166));return Pe(t),null}if(e=sn(mt.current),xl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[pt]=t,r[Qr]=o,e=(t.mode&1)!==0,n){case"dialog":b("cancel",r),b("close",r);break;case"iframe":case"object":case"embed":b("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[pt]=t,e[Qr]=r,Gd(e,t,!1,!1),t.stateNode=e;e:{switch(i=zi(n,r),n){case"dialog":b("cancel",e),b("close",e),l=r;break;case"iframe":case"object":case"embed":b("load",e),l=r;break;case"video":case"audio":for(l=0;lbn&&(t.flags|=128,r=!0,mr(o,!1),t.lanes=4194304)}else{if(!r)if(e=uo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ne)return Pe(t),null}else 2*ae()-o.renderingStartTime>bn&&n!==1073741824&&(t.flags|=128,r=!0,mr(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=ae(),t.sibling=null,n=re.current,q(re,r?n&1|2:n&1),t):(Pe(t),null);case 22:case 23:return ia(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?He&1073741824&&(Pe(t),t.subtreeFlags&6&&(t.flags|=8192)):Pe(t),null;case 24:return null;case 25:return null}throw Error(D(156,t.tag))}function nm(e,t){switch(Hu(t),t.tag){case 1:return Oe(t.type)&&eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zn(),ee(Ae),ee(je),Gu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xu(t),null;case 13:if(ee(re),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(D(340));Gn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ee(re),null;case 4:return Zn(),null;case 10:return Vu(t.type._context),null;case 22:case 23:return ia(),null;case 24:return null;default:return null}}var _l=!1,Ne=!1,rm=typeof WeakSet=="function"?WeakSet:Set,T=null;function An(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ie(e,t,r)}else n.current=null}function uu(e,t,n){try{n()}catch(r){ie(e,t,r)}}var Cs=!1;function lm(e,t){if(Vi=Jl,e=td(),Iu(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,u=-1,a=-1,s=0,d=0,h=e,m=null;t:for(;;){for(var y;h!==n||l!==0&&h.nodeType!==3||(u=i+l),h!==o||r!==0&&h.nodeType!==3||(a=i+r),h.nodeType===3&&(i+=h.nodeValue.length),(y=h.firstChild)!==null;)m=h,h=y;for(;;){if(h===e)break t;if(m===n&&++s===l&&(u=i),m===o&&++d===r&&(a=i),(y=h.nextSibling)!==null)break;h=m,m=h.parentNode}h=y}n=u===-1||a===-1?null:{start:u,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qi={focusedElem:e,selectionRange:n},Jl=!1,T=t;T!==null;)if(t=T,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,T=e;else for(;T!==null;){t=T;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var w=E.memoizedProps,v=E.memoizedState,f=t.stateNode,c=f.getSnapshotBeforeUpdate(t.elementType===t.type?w:lt(t.type,w),v);f.__reactInternalSnapshotBeforeUpdate=c}break;case 3:var p=t.stateNode.containerInfo;p.nodeType===1?p.textContent="":p.nodeType===9&&p.documentElement&&p.removeChild(p.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(D(163))}}catch(S){ie(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,T=e;break}T=t.return}return E=Cs,Cs=!1,E}function Lr(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&&uu(t,n,o)}l=l.next}while(l!==r)}}function jo(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 au(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 qd(e){var t=e.alternate;t!==null&&(e.alternate=null,qd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pt],delete t[Qr],delete t[Xi],delete t[Hh],delete t[$h])),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 bd(e){return e.tag===5||e.tag===3||e.tag===4}function _s(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bd(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 su(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=bl));else if(r!==4&&(e=e.child,e!==null))for(su(e,t,n),e=e.sibling;e!==null;)su(e,t,n),e=e.sibling}function cu(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(cu(e,t,n),e=e.sibling;e!==null;)cu(e,t,n),e=e.sibling}var Se=null,ot=!1;function zt(e,t,n){for(n=n.child;n!==null;)ef(e,t,n),n=n.sibling}function ef(e,t,n){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(So,n)}catch{}switch(n.tag){case 5:Ne||An(n,t);case 6:var r=Se,l=ot;Se=null,zt(e,t,n),Se=r,ot=l,Se!==null&&(ot?(e=Se,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Se.removeChild(n.stateNode));break;case 18:Se!==null&&(ot?(e=Se,n=n.stateNode,e.nodeType===8?si(e.parentNode,n):e.nodeType===1&&si(e,n),Hr(e)):si(Se,n.stateNode));break;case 4:r=Se,l=ot,Se=n.stateNode.containerInfo,ot=!0,zt(e,t,n),Se=r,ot=l;break;case 0:case 11:case 14:case 15:if(!Ne&&(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)&&uu(n,t,i),l=l.next}while(l!==r)}zt(e,t,n);break;case 1:if(!Ne&&(An(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){ie(n,t,u)}zt(e,t,n);break;case 21:zt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,zt(e,t,n),Ne=r):zt(e,t,n);break;default:zt(e,t,n)}}function Ps(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rm),t.forEach(function(r){var l=pm.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function rt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=ae()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*im(r/1960))-r,10e?16:e,Ht===null)var r=!1;else{if(e=Ht,Ht=null,po=0,Q&6)throw Error(D(331));var l=Q;for(Q|=4,T=e.current;T!==null;){var o=T,i=o.child;if(T.flags&16){var u=o.deletions;if(u!==null){for(var a=0;aae()-la?dn(e,0):ra|=n),Ie(e,t)}function sf(e,t){t===0&&(e.mode&1?(t=vl,vl<<=1,!(vl&130023424)&&(vl=4194304)):t=1);var n=Le();e=Rt(e,t),e!==null&&(nl(e,t,n),Ie(e,n))}function fm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sf(e,n)}function pm(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(D(314))}r!==null&&r.delete(t),sf(e,n)}var cf;cf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ae.current)Fe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Fe=!1,em(e,t,n);Fe=!!(e.flags&131072)}else Fe=!1,ne&&t.flags&1048576&&fd(t,ro,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Hl(e,t),e=t.pendingProps;var l=Xn(t,je.current);Vn(t,n),l=Zu(null,t,r,e,l,n);var o=qu();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,Oe(r)?(o=!0,to(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ku(t),l.updater=Po,t.stateNode=l,l._reactInternals=t,eu(t,r,e,n),t=ru(null,t,r,!0,o,n)):(t.tag=0,ne&&o&&Uu(t),De(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Hl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=mm(r),e=lt(r,e),l){case 0:t=nu(null,t,r,e,n);break e;case 1:t=ks(null,t,r,e,n);break e;case 11:t=ws(null,t,r,e,n);break e;case 14:t=Ss(null,t,r,lt(r.type,e),n);break e}throw Error(D(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),nu(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),ks(e,t,r,l,n);case 3:e:{if(Kd(t),e===null)throw Error(D(387));r=t.pendingProps,o=t.memoizedState,l=o.element,vd(e,t),io(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=qn(Error(D(423)),t),t=xs(e,t,r,n,l);break e}else if(r!==l){l=qn(Error(D(424)),t),t=xs(e,t,r,n,l);break e}else for($e=Kt(t.stateNode.containerInfo.firstChild),Be=t,ne=!0,it=null,n=Sd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gn(),r===l){t=Lt(e,t,n);break e}De(e,t,r,n)}t=t.child}return t;case 5:return kd(t),e===null&&Zi(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Ki(r,l)?i=null:o!==null&&Ki(r,o)&&(t.flags|=32),Qd(e,t),De(e,t,i,n),t.child;case 6:return e===null&&Zi(t),null;case 13:return Yd(e,t,n);case 4:return Yu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Jn(t,null,r,n):De(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),ws(e,t,r,l,n);case 7:return De(e,t,t.pendingProps,n),t.child;case 8:return De(e,t,t.pendingProps.children,n),t.child;case 12:return De(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,q(lo,r._currentValue),r._currentValue=i,o!==null)if(st(o.value,i)){if(o.children===l.children&&!Ae.current){t=Lt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var u=o.dependencies;if(u!==null){i=o.child;for(var a=u.firstContext;a!==null;){if(a.context===r){if(o.tag===1){a=Pt(-1,n&-n),a.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var d=s.pending;d===null?a.next=a:(a.next=d.next,d.next=a),s.pending=a}}o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),qi(o.return,n,t),u.lanes|=n;break}a=a.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(D(341));i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),qi(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}De(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Vn(t,n),l=qe(l),r=r(l),t.flags|=1,De(e,t,r,n),t.child;case 14:return r=t.type,l=lt(r,t.pendingProps),l=lt(r.type,l),Ss(e,t,r,l,n);case 15:return Wd(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:lt(r,l),Hl(e,t),t.tag=1,Oe(r)?(e=!0,to(t)):e=!1,Vn(t,n),yd(t,r,l),eu(t,r,l,n),ru(null,t,r,!0,e,n);case 19:return Xd(e,t,n);case 22:return Vd(e,t,n)}throw Error(D(156,t.tag))};function df(e,t){return Ac(e,t)}function hm(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 Je(e,t,n,r){return new hm(e,t,n,r)}function aa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function mm(e){if(typeof e=="function")return aa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Nu)return 11;if(e===ju)return 14}return 2}function Jt(e,t){var n=e.alternate;return n===null?(n=Je(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 Wl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")aa(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Nn:return fn(n.children,l,o,t);case Pu:i=8,l|=8;break;case Ci:return e=Je(12,n,t,l|2),e.elementType=Ci,e.lanes=o,e;case _i:return e=Je(13,n,t,l),e.elementType=_i,e.lanes=o,e;case Pi:return e=Je(19,n,t,l),e.elementType=Pi,e.lanes=o,e;case wc:return Ro(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gc:i=10;break e;case yc:i=9;break e;case Nu:i=11;break e;case ju:i=14;break e;case Ft:i=16,r=null;break e}throw Error(D(130,e==null?e:typeof e,""))}return t=Je(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function fn(e,t,n,r){return e=Je(7,e,r,t),e.lanes=n,e}function Ro(e,t,n,r){return e=Je(22,e,r,t),e.elementType=wc,e.lanes=n,e.stateNode={isHidden:!1},e}function gi(e,t,n){return e=Je(6,e,null,t),e.lanes=n,e}function yi(e,t,n){return t=Je(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vm(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=qo(0),this.expirationTimes=qo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function sa(e,t,n,r,l,o,i,u,a){return e=new vm(e,t,n,u,a),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Je(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ku(o),e}function gm(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mf)}catch(e){console.error(e)}}mf(),fc.exports=Ve;var xm=fc.exports,zs=xm;Vl.createRoot=zs.createRoot,Vl.hydrateRoot=zs.hydrateRoot;/** * @remix-run/router v1.5.0 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function yn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Em(){return Math.random().toString(36).substr(2,8)}function As(e,t){return{usr:e.state,key:e.key,idx:t}}function qr(e,t,n,r){return n===void 0&&(n=null),V({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?gt(t):t,{state:n,key:t&&t.key||r||Em()})}function Tt(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 gt(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 Cm(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,u=se.Pop,a=null,s=d();s==null&&(s=0,i.replaceState(V({},i.state,{idx:s}),""));function d(){return(i.state||{idx:null}).idx}function h(){u=se.Pop;let v=d(),f=v==null?null:v-s;s=v,a&&a({action:u,location:w.location,delta:f})}function m(v,f){u=se.Push;let c=qr(w.location,v,f);n&&n(c,v),s=d()+1;let p=As(c,s),S=w.createHref(c);try{i.pushState(p,"",S)}catch{l.location.assign(S)}o&&a&&a({action:u,location:w.location,delta:1})}function y(v,f){u=se.Replace;let c=qr(w.location,v,f);n&&n(c,v),s=d();let p=As(c,s),S=w.createHref(c);i.replaceState(p,"",S),o&&a&&a({action:u,location:w.location,delta:0})}function E(v){let f=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof v=="string"?v:Tt(v);return B(f,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,f)}let w={get action(){return u},get location(){return e(l,i)},listen(v){if(a)throw new Error("A history only accepts one active listener");return l.addEventListener(Fs,h),a=v,()=>{l.removeEventListener(Fs,h),a=null}},createHref(v){return t(l,v)},createURL:E,encodeLocation(v){let f=E(v);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:m,replace:y,go(v){return i.go(v)}};return w}var fe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fe||(fe={}));const _m=new Set(["lazy","caseSensitive","path","id","index","children"]);function Pm(e){return e.index===!0}function vf(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],u=typeof l.id=="string"?l.id:i.join("-");if(B(l.index!==!0||!l.children,"Cannot specify children on an index route"),B(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Pm(l)){let a=V({},l,{hasErrorBoundary:t(l),id:u});return r[u]=a,a}else{let a=V({},l,{id:u,hasErrorBoundary:t(l),children:void 0});return r[u]=a,l.children&&(a.children=vf(l.children,t,i,r)),a}})}function In(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?gt(t):t,l=il(r.pathname||"/",n);if(l==null)return null;let o=gf(e);Nm(o);let i=null;for(let u=0;i==null&&u{let a={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};a.relativePath.startsWith("/")&&(B(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let s=Nt([r,a.relativePath]),d=n.concat(a);o.children&&o.children.length>0&&(B(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),gf(o.children,t,d,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:zm(s,o.index),routesMeta:d})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))l(o,i);else for(let a of yf(o.path))l(o,i,a)}),t}function yf(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=yf(r.join("/")),u=[];return u.push(...i.map(a=>a===""?o:[o,a].join("/"))),l&&u.push(...i),u.map(a=>e.startsWith("/")&&a===""?"/":a)}function Nm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Fm(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const jm=/^:\w+$/,Dm=3,Rm=2,Lm=1,Tm=10,Mm=-2,Os=e=>e==="*";function zm(e,t){let n=e.split("/"),r=n.length;return n.some(Os)&&(r+=Mm),t&&(r+=Rm),n.filter(l=>!Os(l)).reduce((l,o)=>l+(jm.test(o)?Dm:o===""?Lm:Tm),r)}function Fm(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 Am(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{if(d==="*"){let m=u[h]||"";i=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}return s[d]=Hm(u[h]||"",d),s},{}),pathname:o,pathnameBase:i,pattern:e}}function Im(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),yn(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,u)=>(r.push(u),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Um(e){try{return decodeURI(e)}catch(t){return yn(!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 Hm(e,t){try{return decodeURIComponent(e)}catch(n){return yn(!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 il(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 $m(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?gt(e):e;return{pathname:n?n.startsWith("/")?n:Bm(n,t):t,search:Vm(r),hash:Qm(l)}}function Bm(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 wi(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 Fo(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function pa(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=gt(e):(l=V({},e),B(!l.pathname||!l.pathname.includes("?"),wi("?","pathname","search",l)),B(!l.pathname||!l.pathname.includes("#"),wi("#","pathname","hash",l)),B(!l.search||!l.search.includes("#"),wi("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,u;if(r||i==null)u=n;else{let h=t.length-1;if(i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),h-=1;l.pathname=m.join("/")}u=h>=0?t[h]:"/"}let a=$m(l,u),s=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(s||d)&&(a.pathname+="/"),a}const Nt=e=>e.join("/").replace(/\/\/+/g,"/"),Wm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Vm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Qm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ha{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 wf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Sf=["post","put","patch","delete"],Km=new Set(Sf),Ym=["get",...Sf],Xm=new Set(Ym),Gm=new Set([301,302,303,307,308]),Jm=new Set([307,308]),Si={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Zm={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Is={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},kf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",qm=!xf,bm=e=>!!e.hasErrorBoundary;function ev(e){B(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=e.detectErrorBoundary||bm,n={},r=vf(e.routes,t,void 0,n),l,o=V({v7_normalizeFormMethod:!1},e.future),i=null,u=new Set,a=null,s=null,d=null,h=e.hydrationData!=null,m=In(r,e.history.location,e.basename),y=null;if(m==null){let k=ft(404,{pathname:e.history.location.pathname}),{matches:C,route:N}=Qs(r);m=C,y={[N.id]:k}}let E=!m.some(k=>k.route.lazy)&&(!m.some(k=>k.route.loader)||e.hydrationData!=null),w,v={historyAction:e.history.action,location:e.history.location,matches:m,initialized:E,navigation:Si,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||y,fetchers:new Map,blockers:new Map},f=se.Pop,c=!1,p,S=!1,_=!1,j=[],R=[],P=new Map,Y=0,U=-1,de=new Map,Ke=new Set,X=new Map,Ye=new Map,me=new Map,yt=!1;function Ue(){return i=e.history.listen(k=>{let{action:C,location:N,delta:M}=k;if(yt){yt=!1;return}yn(me.size===0||M!=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=Ea({currentLocation:v.location,nextLocation:N,historyAction:C});if(z&&M!=null){yt=!0,e.history.go(M*-1),cl(z,{state:"blocked",location:N,proceed(){cl(z,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),e.history.go(M)},reset(){or(z),F({blockers:new Map(w.state.blockers)})}});return}return Ee(C,N)}),v.initialized||Ee(se.Pop,v.location),w}function L(){i&&i(),u.clear(),p&&p.abort(),v.fetchers.forEach((k,C)=>$o(C)),v.blockers.forEach((k,C)=>or(C))}function H(k){return u.add(k),()=>u.delete(k)}function F(k){v=V({},v,k),u.forEach(C=>C(v))}function J(k,C){var N,M;let z=v.actionData!=null&&v.navigation.formMethod!=null&&xt(v.navigation.formMethod)&&v.navigation.state==="loading"&&((N=k.state)==null?void 0:N._isRedirect)!==!0,O;C.actionData?Object.keys(C.actionData).length>0?O=C.actionData:O=null:z?O=v.actionData:O=null;let I=C.loaderData?Vs(v.loaderData,C.loaderData,C.matches||[],C.errors):v.loaderData;for(let[A]of me)or(A);let $=c===!0||v.navigation.formMethod!=null&&xt(v.navigation.formMethod)&&((M=k.state)==null?void 0:M._isRedirect)!==!0;l&&(r=l,l=void 0),F(V({},C,{actionData:O,loaderData:I,historyAction:f,location:k,initialized:!0,navigation:Si,revalidation:"idle",restoreScrollPosition:Ca(k,C.matches||v.matches),preventScrollReset:$,blockers:new Map(v.blockers)})),S||f===se.Pop||(f===se.Push?e.history.push(k,k.state):f===se.Replace&&e.history.replace(k,k.state)),f=se.Pop,c=!1,S=!1,_=!1,j=[],R=[]}async function ue(k,C){if(typeof k=="number"){e.history.go(k);return}let{path:N,submission:M,error:z}=Us(k,o,C),O=v.location,I=qr(v.location,N,C&&C.state);I=V({},I,e.history.encodeLocation(I));let $=C&&C.replace!=null?C.replace:void 0,A=se.Push;$===!0?A=se.Replace:$===!1||M!=null&&xt(M.formMethod)&&M.formAction===v.location.pathname+v.location.search&&(A=se.Replace);let Z=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,K=Ea({currentLocation:O,nextLocation:I,historyAction:A});if(K){cl(K,{state:"blocked",location:I,proceed(){cl(K,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),ue(k,C)},reset(){or(K),F({blockers:new Map(v.blockers)})}});return}return await Ee(A,I,{submission:M,pendingError:z,preventScrollReset:Z,replace:C&&C.replace})}function xn(){if(Uo(),F({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){Ee(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}Ee(f||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function Ee(k,C,N){p&&p.abort(),p=null,f=k,S=(N&&N.startUninterruptedRevalidation)===!0,Bf(v.location,v.matches),c=(N&&N.preventScrollReset)===!0;let M=l||r,z=N&&N.overrideNavigation,O=In(M,C,e.basename);if(!O){let ve=ft(404,{pathname:C.pathname}),{matches:we,route:tt}=Qs(M);Bo(),J(C,{matches:we,loaderData:{},errors:{[tt.id]:ve}});return}if(ov(v.location,C)&&!(N&&N.submission&&xt(N.submission.formMethod))){J(C,{matches:O});return}p=new AbortController;let I=yr(e.history,C,p.signal,N&&N.submission),$,A;if(N&&N.pendingError)A={[Un(O).route.id]:N.pendingError};else if(N&&N.submission&&xt(N.submission.formMethod)){let ve=await rr(I,C,N.submission,O,{replace:N.replace});if(ve.shortCircuited)return;$=ve.pendingActionData,A=ve.pendingActionError,z=V({state:"loading",location:C},N.submission),I=new Request(I.url,{signal:I.signal})}let{shortCircuited:Z,loaderData:K,errors:et}=await wt(I,C,O,z,N&&N.submission,N&&N.fetcherSubmission,N&&N.replace,$,A);Z||(p=null,J(C,V({matches:O},$?{actionData:$}:{},{loaderData:K,errors:et})))}async function rr(k,C,N,M,z){Uo();let O=V({state:"submitting",location:C},N);F({navigation:O});let I,$=mu(M,C);if(!$.route.action&&!$.route.lazy)I={type:fe.error,error:ft(405,{method:k.method,pathname:C.pathname,routeId:$.route.id})};else if(I=await gr("action",k,$,M,n,t,w.basename),k.signal.aborted)return{shortCircuited:!0};if(Kn(I)){let A;return z&&z.replace!=null?A=z.replace:A=I.location===v.location.pathname+v.location.search,await lr(v,I,{submission:N,replace:A}),{shortCircuited:!0}}if(zr(I)){let A=Un(M,$.route.id);return(z&&z.replace)!==!0&&(f=se.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:I.error}}}if(cn(I))throw ft(400,{type:"defer-action"});return{pendingActionData:{[$.route.id]:I.data}}}async function wt(k,C,N,M,z,O,I,$,A){let Z=M;Z||(Z=V({state:"loading",location:C,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},z));let K=z||O?z||O:Z.formMethod&&Z.formAction&&Z.formData&&Z.formEncType?{formMethod:Z.formMethod,formAction:Z.formAction,formData:Z.formData,formEncType:Z.formEncType}:void 0,et=l||r,[ve,we]=Hs(e.history,v,N,K,C,_,j,R,X,et,e.basename,$,A);if(Bo(Ce=>!(N&&N.some(nt=>nt.route.id===Ce))||ve&&ve.some(nt=>nt.route.id===Ce)),ve.length===0&&we.length===0)return J(C,V({matches:N,loaderData:{},errors:A||null},$?{actionData:$}:{})),{shortCircuited:!0};if(!S){we.forEach(nt=>{let rn=v.fetchers.get(nt.key),ar={state:"loading",data:rn&&rn.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(nt.key,ar)});let Ce=$||v.actionData;F(V({navigation:Z},Ce?Object.keys(Ce).length===0?{actionData:null}:{actionData:Ce}:{},we.length>0?{fetchers:new Map(v.fetchers)}:{}))}U=++Y,we.forEach(Ce=>P.set(Ce.key,p));let{results:tt,loaderResults:ir,fetcherResults:Wo}=await Sa(v.matches,N,ve,we,k);if(k.signal.aborted)return{shortCircuited:!0};we.forEach(Ce=>P.delete(Ce.key));let ur=Ks(tt);if(ur)return await lr(v,ur,{replace:I}),{shortCircuited:!0};let{loaderData:En,errors:Vo}=Ws(v,N,ve,ir,A,we,Wo,Ye);Ye.forEach((Ce,nt)=>{Ce.subscribe(rn=>{(rn||Ce.done)&&Ye.delete(nt)})}),Uf();let Qo=xa(U);return V({loaderData:En,errors:Vo},Qo||we.length>0?{fetchers:new Map(v.fetchers)}:{})}function nn(k){return v.fetchers.get(k)||Zm}function Af(k,C,N,M){if(qm)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.");P.has(k)&&sl(k);let O=In(l||r,N,e.basename);if(!O){Ho(k,C,ft(404,{pathname:N}));return}let{path:I,submission:$}=Us(N,o,M,!0),A=mu(O,I);if(c=(M&&M.preventScrollReset)===!0,$&&xt($.formMethod)){Of(k,C,I,A,O,$);return}X.set(k,{routeId:C,path:I}),If(k,C,I,A,O,$)}async function Of(k,C,N,M,z,O){if(Uo(),X.delete(k),!M.route.action&&!M.route.lazy){let St=ft(405,{method:O.formMethod,pathname:N,routeId:C});Ho(k,C,St);return}let I=v.fetchers.get(k),$=V({state:"submitting"},O,{data:I&&I.data," _hasFetcherDoneAnything ":!0});v.fetchers.set(k,$),F({fetchers:new Map(v.fetchers)});let A=new AbortController,Z=yr(e.history,N,A.signal,O);P.set(k,A);let K=await gr("action",Z,M,z,n,t,w.basename);if(Z.signal.aborted){P.get(k)===A&&P.delete(k);return}if(Kn(K)){P.delete(k),Ke.add(k);let St=V({state:"loading"},O,{data:void 0," _hasFetcherDoneAnything ":!0});return v.fetchers.set(k,St),F({fetchers:new Map(v.fetchers)}),lr(v,K,{submission:O,isFetchActionRedirect:!0})}if(zr(K)){Ho(k,C,K.error);return}if(cn(K))throw ft(400,{type:"defer-action"});let et=v.navigation.location||v.location,ve=yr(e.history,et,A.signal),we=l||r,tt=v.navigation.state!=="idle"?In(we,v.navigation.location,e.basename):v.matches;B(tt,"Didn't find any matches after fetcher action");let ir=++Y;de.set(k,ir);let Wo=V({state:"loading",data:K.data},O,{" _hasFetcherDoneAnything ":!0});v.fetchers.set(k,Wo);let[ur,En]=Hs(e.history,v,tt,O,et,_,j,R,X,we,e.basename,{[M.route.id]:K.data},void 0);En.filter(St=>St.key!==k).forEach(St=>{let Ko=St.key,_a=v.fetchers.get(Ko),Kf={state:"loading",data:_a&&_a.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(Ko,Kf),P.set(Ko,A)}),F({fetchers:new Map(v.fetchers)});let{results:Vo,loaderResults:Qo,fetcherResults:Ce}=await Sa(v.matches,tt,ur,En,ve);if(A.signal.aborted)return;de.delete(k),P.delete(k),En.forEach(St=>P.delete(St.key));let nt=Ks(Vo);if(nt)return lr(v,nt);let{loaderData:rn,errors:ar}=Ws(v,v.matches,ur,Qo,void 0,En,Ce,Ye),Vf={state:"idle",data:K.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(k,Vf);let Qf=xa(ir);v.navigation.state==="loading"&&ir>U?(B(f,"Expected pending action"),p&&p.abort(),J(v.navigation.location,{matches:tt,loaderData:rn,errors:ar,fetchers:new Map(v.fetchers)})):(F(V({errors:ar,loaderData:Vs(v.loaderData,rn,tt,ar)},Qf?{fetchers:new Map(v.fetchers)}:{})),_=!1)}async function If(k,C,N,M,z,O){let I=v.fetchers.get(k),$=V({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},O,{data:I&&I.data," _hasFetcherDoneAnything ":!0});v.fetchers.set(k,$),F({fetchers:new Map(v.fetchers)});let A=new AbortController,Z=yr(e.history,N,A.signal);P.set(k,A);let K=await gr("loader",Z,M,z,n,t,w.basename);if(cn(K)&&(K=await Pf(K,Z.signal,!0)||K),P.get(k)===A&&P.delete(k),Z.signal.aborted)return;if(Kn(K)){await lr(v,K);return}if(zr(K)){let ve=Un(v.matches,C);v.fetchers.delete(k),F({fetchers:new Map(v.fetchers),errors:{[ve.route.id]:K.error}});return}B(!cn(K),"Unhandled fetcher deferred data");let et={state:"idle",data:K.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(k,et),F({fetchers:new Map(v.fetchers)})}async function lr(k,C,N){var M;let{submission:z,replace:O,isFetchActionRedirect:I}=N===void 0?{}:N;C.revalidate&&(_=!0);let $=qr(k.location,C.location,V({_isRedirect:!0},I?{_isFetchActionRedirect:!0}:{}));if(B($,"Expected a location on the redirect navigation"),kf.test(C.location)&&xf&&typeof((M=window)==null?void 0:M.location)<"u"){let we=e.history.createURL(C.location),tt=il(we.pathname,e.basename||"/")==null;if(window.location.origin!==we.origin||tt){O?window.location.replace(C.location):window.location.assign(C.location);return}}p=null;let A=O===!0?se.Replace:se.Push,{formMethod:Z,formAction:K,formEncType:et,formData:ve}=k.navigation;!z&&Z&&K&&ve&&et&&(z={formMethod:Z,formAction:K,formEncType:et,formData:ve}),Jm.has(C.status)&&z&&xt(z.formMethod)?await Ee(A,$,{submission:V({},z,{formAction:C.location}),preventScrollReset:c}):I?await Ee(A,$,{overrideNavigation:{state:"loading",location:$,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},fetcherSubmission:z,preventScrollReset:c}):await Ee(A,$,{overrideNavigation:{state:"loading",location:$,formMethod:z?z.formMethod:void 0,formAction:z?z.formAction:void 0,formEncType:z?z.formEncType:void 0,formData:z?z.formData:void 0},preventScrollReset:c})}async function Sa(k,C,N,M,z){let O=await Promise.all([...N.map(A=>gr("loader",z,A,C,n,t,w.basename)),...M.map(A=>A.matches&&A.match?gr("loader",yr(e.history,A.path,z.signal),A.match,A.matches,n,t,w.basename):{type:fe.error,error:ft(404,{pathname:A.path})})]),I=O.slice(0,N.length),$=O.slice(N.length);return await Promise.all([Ys(k,N,I,z.signal,!1,v.loaderData),Ys(k,M.map(A=>A.match),$,z.signal,!0)]),{results:O,loaderResults:I,fetcherResults:$}}function Uo(){_=!0,j.push(...Bo()),X.forEach((k,C)=>{P.has(C)&&(R.push(C),sl(C))})}function Ho(k,C,N){let M=Un(v.matches,C);$o(k),F({errors:{[M.route.id]:N},fetchers:new Map(v.fetchers)})}function $o(k){P.has(k)&&sl(k),X.delete(k),de.delete(k),Ke.delete(k),v.fetchers.delete(k)}function sl(k){let C=P.get(k);B(C,"Expected fetch controller: "+k),C.abort(),P.delete(k)}function ka(k){for(let C of k){let M={state:"idle",data:nn(C).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(C,M)}}function Uf(){let k=[];for(let C of Ke){let N=v.fetchers.get(C);B(N,"Expected fetcher: "+C),N.state==="loading"&&(Ke.delete(C),k.push(C))}ka(k)}function xa(k){let C=[];for(let[N,M]of de)if(M0}function Hf(k,C){let N=v.blockers.get(k)||Is;return me.get(k)!==C&&me.set(k,C),N}function or(k){v.blockers.delete(k),me.delete(k)}function cl(k,C){let N=v.blockers.get(k)||Is;B(N.state==="unblocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="proceeding"||N.state==="blocked"&&C.state==="unblocked"||N.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+N.state+" -> "+C.state),v.blockers.set(k,C),F({blockers:new Map(v.blockers)})}function Ea(k){let{currentLocation:C,nextLocation:N,historyAction:M}=k;if(me.size===0)return;me.size>1&&yn(!1,"A router only supports one blocker at a time");let z=Array.from(me.entries()),[O,I]=z[z.length-1],$=v.blockers.get(O);if(!($&&$.state==="proceeding")&&I({currentLocation:C,nextLocation:N,historyAction:M}))return O}function Bo(k){let C=[];return Ye.forEach((N,M)=>{(!k||k(M))&&(N.cancel(),C.push(M),Ye.delete(M))}),C}function $f(k,C,N){if(a=k,d=C,s=N||(M=>M.key),!h&&v.navigation===Si){h=!0;let M=Ca(v.location,v.matches);M!=null&&F({restoreScrollPosition:M})}return()=>{a=null,d=null,s=null}}function Bf(k,C){if(a&&s&&d){let N=C.map(z=>Xs(z,v.loaderData)),M=s(k,N)||k.key;a[M]=d()}}function Ca(k,C){if(a&&s&&d){let N=C.map(O=>Xs(O,v.loaderData)),M=s(k,N)||k.key,z=a[M];if(typeof z=="number")return z}return null}function Wf(k){l=k}return w={get basename(){return e.basename},get state(){return v},get routes(){return r},initialize:Ue,subscribe:H,enableScrollRestoration:$f,navigate:ue,fetch:Af,revalidate:xn,createHref:k=>e.history.createHref(k),encodeLocation:k=>e.history.encodeLocation(k),getFetcher:nn,deleteFetcher:$o,dispose:L,getBlocker:Hf,deleteBlocker:or,_internalFetchControllers:P,_internalActiveDeferreds:Ye,_internalSetRoutes:Wf},w}function tv(e){return e!=null&&"formData"in e}function Us(e,t,n,r){r===void 0&&(r=!1);let l=typeof e=="string"?e:Tt(e);if(!n||!tv(n))return{path:l};if(n.formMethod&&!av(n.formMethod))return{path:l,error:ft(405,{method:n.formMethod})};let o;if(n.formData){let a=n.formMethod||"get";if(o={formMethod:t.v7_normalizeFormMethod?a.toUpperCase():a.toLowerCase(),formAction:_f(l),formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:n.formData},xt(o.formMethod))return{path:l,submission:o}}let i=gt(l),u=Cf(n.formData);return r&&i.search&&Nf(i.search)&&u.append("index",""),i.search="?"+u,{path:Tt(i),submission:o}}function nv(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 Hs(e,t,n,r,l,o,i,u,a,s,d,h,m){let y=m?Object.values(m)[0]:h?Object.values(h)[0]:void 0,E=e.createURL(t.location),w=e.createURL(l),v=o||E.toString()===w.toString()||E.search!==w.search,f=m?Object.keys(m)[0]:void 0,p=nv(n,f).filter((_,j)=>{if(_.route.lazy)return!0;if(_.route.loader==null)return!1;if(rv(t.loaderData,t.matches[j],_)||i.some(Y=>Y===_.route.id))return!0;let R=t.matches[j],P=_;return $s(_,V({currentUrl:E,currentParams:R.params,nextUrl:w,nextParams:P.params},r,{actionResult:y,defaultShouldRevalidate:v||Ef(R,P)}))}),S=[];return a.forEach((_,j)=>{if(!n.some(U=>U.route.id===_.routeId))return;let R=In(s,_.path,d);if(!R){S.push(V({key:j},_,{matches:null,match:null}));return}let P=mu(R,_.path);if(u.includes(j)){S.push(V({key:j,matches:R,match:P},_));return}$s(P,V({currentUrl:E,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:v}))&&S.push(V({key:j,matches:R,match:P},_))}),[p,S]}function rv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Ef(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function $s(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Bs(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];B(l,"No route found in manifest");let o={};for(let i in r){let a=l[i]!==void 0&&i!=="hasErrorBoundary";yn(!a,'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.')),!a&&!_m.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,{hasErrorBoundary:t(V({},l)),lazy:void 0})}async function gr(e,t,n,r,l,o,i,u,a,s){i===void 0&&(i="/"),u===void 0&&(u=!1),a===void 0&&(a=!1);let d,h,m,y=v=>{let f,c=new Promise((p,S)=>f=S);return m=()=>f(),t.signal.addEventListener("abort",m),Promise.race([v({request:t,params:n.params,context:s}),c])};try{let v=n.route[e];if(n.route.lazy)if(v)h=(await Promise.all([y(v),Bs(n.route,o,l)]))[0];else if(await Bs(n.route,o,l),v=n.route[e],v)h=await y(v);else{if(e==="action")throw ft(405,{method:t.method,pathname:new URL(t.url).pathname,routeId:n.route.id});return{type:fe.data,data:void 0}}else B(v,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),h=await y(v);B(h!==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(v){d=fe.error,h=v}finally{m&&t.signal.removeEventListener("abort",m)}if(uv(h)){let v=h.status;if(Gm.has(v)){let p=h.headers.get("Location");if(B(p,"Redirects returned/thrown from loaders/actions must have a Location header"),kf.test(p)){if(!u){let S=new URL(t.url),_=p.startsWith("//")?new URL(S.protocol+p):new URL(p),j=il(_.pathname,i)!=null;_.origin===S.origin&&j&&(p=_.pathname+_.search+_.hash)}}else{let S=r.slice(0,r.indexOf(n)+1),_=Fo(S).map(R=>R.pathnameBase),j=pa(p,_,new URL(t.url).pathname);if(B(Tt(j),"Unable to resolve redirect location: "+p),i){let R=j.pathname;j.pathname=R==="/"?i:Nt([i,R])}p=Tt(j)}if(u)throw h.headers.set("Location",p),h;return{type:fe.redirect,status:v,location:p,revalidate:h.headers.get("X-Remix-Revalidate")!==null}}if(a)throw{type:d||fe.data,response:h};let f,c=h.headers.get("Content-Type");return c&&/\bapplication\/json\b/.test(c)?f=await h.json():f=await h.text(),d===fe.error?{type:d,error:new ha(v,h.statusText,f),headers:h.headers}:{type:fe.data,data:f,statusCode:h.status,headers:h.headers}}if(d===fe.error)return{type:d,error:h};if(iv(h)){var E,w;return{type:fe.deferred,deferredData:h,statusCode:(E=h.init)==null?void 0:E.status,headers:((w=h.init)==null?void 0:w.headers)&&new Headers(h.init.headers)}}return{type:fe.data,data:h}}function yr(e,t,n,r){let l=e.createURL(_f(t)).toString(),o={signal:n};if(r&&xt(r.formMethod)){let{formMethod:i,formEncType:u,formData:a}=r;o.method=i.toUpperCase(),o.body=u==="application/x-www-form-urlencoded"?Cf(a):a}return new Request(l,o)}function Cf(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,r instanceof File?r.name:r);return t}function lv(e,t,n,r,l){let o={},i=null,u,a=!1,s={};return n.forEach((d,h)=>{let m=t[h].route.id;if(B(!Kn(d),"Cannot handle redirect results in processLoaderData"),zr(d)){let y=Un(e,m),E=d.error;r&&(E=Object.values(r)[0],r=void 0),i=i||{},i[y.route.id]==null&&(i[y.route.id]=E),o[m]=void 0,a||(a=!0,u=wf(d.error)?d.error.status:500),d.headers&&(s[m]=d.headers)}else cn(d)?(l.set(m,d.deferredData),o[m]=d.deferredData.data):o[m]=d.data,d.statusCode!=null&&d.statusCode!==200&&!a&&(u=d.statusCode),d.headers&&(s[m]=d.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:s}}function Ws(e,t,n,r,l,o,i,u){let{loaderData:a,errors:s}=lv(t,n,r,l,u);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Qs(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ft(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?u="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"&&(u="defer() is not supported in actions")):e===403?(i="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",u='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?u="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&&(u='Invalid request method "'+l.toUpperCase()+'"')),new ha(e||500,i,new Error(u),!0)}function Ks(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Kn(n))return n}}function _f(e){let t=typeof e=="string"?gt(e):e;return Tt(V({},t,{hash:""}))}function ov(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function cn(e){return e.type===fe.deferred}function zr(e){return e.type===fe.error}function Kn(e){return(e&&e.type)===fe.redirect}function iv(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 uv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function av(e){return Xm.has(e.toLowerCase())}function xt(e){return Km.has(e.toLowerCase())}async function Ys(e,t,n,r,l,o){for(let i=0;ih.route.id===a.route.id),d=s!=null&&!Ef(s,a)&&(o&&o[a.route.id])!==void 0;cn(u)&&(l||d)&&await Pf(u,r,l).then(h=>{h&&(n[i]=h||n[i])})}}async function Pf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:fe.data,data:e.deferredData.unwrappedData}}catch(l){return{type:fe.error,error:l}}return{type:fe.data,data:e.deferredData.data}}}function Nf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xs(e,t){let{route:n,pathname:r,params:l}=e;return{id:n.id,pathname:r,params:l,data:t[n.id],handle:n.handle}}function mu(e,t){let n=typeof t=="string"?gt(t).search:t.search;if(e[e.length-1].route.index&&Nf(n||""))return e[e.length-1];let r=Fo(e);return r[r.length-1]}/** + */function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function yn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Cm(){return Math.random().toString(36).substr(2,8)}function As(e,t){return{usr:e.state,key:e.key,idx:t}}function qr(e,t,n,r){return n===void 0&&(n=null),V({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?gt(t):t,{state:n,key:t&&t.key||r||Cm()})}function Tt(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 gt(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 _m(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,u=se.Pop,a=null,s=d();s==null&&(s=0,i.replaceState(V({},i.state,{idx:s}),""));function d(){return(i.state||{idx:null}).idx}function h(){u=se.Pop;let v=d(),f=v==null?null:v-s;s=v,a&&a({action:u,location:w.location,delta:f})}function m(v,f){u=se.Push;let c=qr(w.location,v,f);n&&n(c,v),s=d()+1;let p=As(c,s),S=w.createHref(c);try{i.pushState(p,"",S)}catch{l.location.assign(S)}o&&a&&a({action:u,location:w.location,delta:1})}function y(v,f){u=se.Replace;let c=qr(w.location,v,f);n&&n(c,v),s=d();let p=As(c,s),S=w.createHref(c);i.replaceState(p,"",S),o&&a&&a({action:u,location:w.location,delta:0})}function E(v){let f=l.location.origin!=="null"?l.location.origin:l.location.href,c=typeof v=="string"?v:Tt(v);return B(f,"No window.location.(origin|href) available to create URL for href: "+c),new URL(c,f)}let w={get action(){return u},get location(){return e(l,i)},listen(v){if(a)throw new Error("A history only accepts one active listener");return l.addEventListener(Fs,h),a=v,()=>{l.removeEventListener(Fs,h),a=null}},createHref(v){return t(l,v)},createURL:E,encodeLocation(v){let f=E(v);return{pathname:f.pathname,search:f.search,hash:f.hash}},push:m,replace:y,go(v){return i.go(v)}};return w}var fe;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(fe||(fe={}));const Pm=new Set(["lazy","caseSensitive","path","id","index","children"]);function Nm(e){return e.index===!0}function vf(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,o],u=typeof l.id=="string"?l.id:i.join("-");if(B(l.index!==!0||!l.children,"Cannot specify children on an index route"),B(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Nm(l)){let a=V({},l,{hasErrorBoundary:t(l),id:u});return r[u]=a,a}else{let a=V({},l,{id:u,hasErrorBoundary:t(l),children:void 0});return r[u]=a,l.children&&(a.children=vf(l.children,t,i,r)),a}})}function In(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?gt(t):t,l=il(r.pathname||"/",n);if(l==null)return null;let o=gf(e);jm(o);let i=null;for(let u=0;i==null&&u{let a={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};a.relativePath.startsWith("/")&&(B(a.relativePath.startsWith(r),'Absolute route path "'+a.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),a.relativePath=a.relativePath.slice(r.length));let s=Nt([r,a.relativePath]),d=n.concat(a);o.children&&o.children.length>0&&(B(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),gf(o.children,t,d,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:Fm(s,o.index),routesMeta:d})};return e.forEach((o,i)=>{var u;if(o.path===""||!((u=o.path)!=null&&u.includes("?")))l(o,i);else for(let a of yf(o.path))l(o,i,a)}),t}function yf(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=yf(r.join("/")),u=[];return u.push(...i.map(a=>a===""?o:[o,a].join("/"))),l&&u.push(...i),u.map(a=>e.startsWith("/")&&a===""?"/":a)}function jm(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Am(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Dm=/^:\w+$/,Rm=3,Lm=2,Tm=1,Mm=10,zm=-2,Os=e=>e==="*";function Fm(e,t){let n=e.split("/"),r=n.length;return n.some(Os)&&(r+=zm),t&&(r+=Lm),n.filter(l=>!Os(l)).reduce((l,o)=>l+(Dm.test(o)?Rm:o===""?Tm:Mm),r)}function Am(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 Om(e,t){let{routesMeta:n}=e,r={},l="/",o=[];for(let i=0;i{if(d==="*"){let m=u[h]||"";i=o.slice(0,o.length-m.length).replace(/(.)\/+$/,"$1")}return s[d]=$m(u[h]||"",d),s},{}),pathname:o,pathnameBase:i,pattern:e}}function Um(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),yn(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,u)=>(r.push(u),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function Hm(e){try{return decodeURI(e)}catch(t){return yn(!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 $m(e,t){try{return decodeURIComponent(e)}catch(n){return yn(!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 il(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 Bm(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?gt(e):e;return{pathname:n?n.startsWith("/")?n:Wm(n,t):t,search:Qm(r),hash:Km(l)}}function Wm(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 wi(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 Fo(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function pa(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=gt(e):(l=V({},e),B(!l.pathname||!l.pathname.includes("?"),wi("?","pathname","search",l)),B(!l.pathname||!l.pathname.includes("#"),wi("#","pathname","hash",l)),B(!l.search||!l.search.includes("#"),wi("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,u;if(r||i==null)u=n;else{let h=t.length-1;if(i.startsWith("..")){let m=i.split("/");for(;m[0]==="..";)m.shift(),h-=1;l.pathname=m.join("/")}u=h>=0?t[h]:"/"}let a=Bm(l,u),s=i&&i!=="/"&&i.endsWith("/"),d=(o||i===".")&&n.endsWith("/");return!a.pathname.endsWith("/")&&(s||d)&&(a.pathname+="/"),a}const Nt=e=>e.join("/").replace(/\/\/+/g,"/"),Vm=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Qm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Km=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ha{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 wf(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Sf=["post","put","patch","delete"],Ym=new Set(Sf),Xm=["get",...Sf],Gm=new Set(Xm),Jm=new Set([301,302,303,307,308]),Zm=new Set([307,308]),Si={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},qm={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Is={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},kf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",bm=!xf,ev=e=>!!e.hasErrorBoundary;function tv(e){B(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=e.detectErrorBoundary||ev,n={},r=vf(e.routes,t,void 0,n),l,o=V({v7_normalizeFormMethod:!1},e.future),i=null,u=new Set,a=null,s=null,d=null,h=e.hydrationData!=null,m=In(r,e.history.location,e.basename),y=null;if(m==null){let k=ft(404,{pathname:e.history.location.pathname}),{matches:C,route:N}=Qs(r);m=C,y={[N.id]:k}}let E=!m.some(k=>k.route.lazy)&&(!m.some(k=>k.route.loader)||e.hydrationData!=null),w,v={historyAction:e.history.action,location:e.history.location,matches:m,initialized:E,navigation:Si,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||y,fetchers:new Map,blockers:new Map},f=se.Pop,c=!1,p,S=!1,_=!1,j=[],R=[],P=new Map,Y=0,U=-1,de=new Map,Ke=new Set,X=new Map,Ye=new Map,me=new Map,yt=!1;function Ue(){return i=e.history.listen(k=>{let{action:C,location:N,delta:M}=k;if(yt){yt=!1;return}yn(me.size===0||M!=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=Ea({currentLocation:v.location,nextLocation:N,historyAction:C});if(z&&M!=null){yt=!0,e.history.go(M*-1),cl(z,{state:"blocked",location:N,proceed(){cl(z,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),e.history.go(M)},reset(){or(z),F({blockers:new Map(w.state.blockers)})}});return}return Ee(C,N)}),v.initialized||Ee(se.Pop,v.location),w}function L(){i&&i(),u.clear(),p&&p.abort(),v.fetchers.forEach((k,C)=>$o(C)),v.blockers.forEach((k,C)=>or(C))}function H(k){return u.add(k),()=>u.delete(k)}function F(k){v=V({},v,k),u.forEach(C=>C(v))}function J(k,C){var N,M;let z=v.actionData!=null&&v.navigation.formMethod!=null&&xt(v.navigation.formMethod)&&v.navigation.state==="loading"&&((N=k.state)==null?void 0:N._isRedirect)!==!0,O;C.actionData?Object.keys(C.actionData).length>0?O=C.actionData:O=null:z?O=v.actionData:O=null;let I=C.loaderData?Vs(v.loaderData,C.loaderData,C.matches||[],C.errors):v.loaderData;for(let[A]of me)or(A);let $=c===!0||v.navigation.formMethod!=null&&xt(v.navigation.formMethod)&&((M=k.state)==null?void 0:M._isRedirect)!==!0;l&&(r=l,l=void 0),F(V({},C,{actionData:O,loaderData:I,historyAction:f,location:k,initialized:!0,navigation:Si,revalidation:"idle",restoreScrollPosition:Ca(k,C.matches||v.matches),preventScrollReset:$,blockers:new Map(v.blockers)})),S||f===se.Pop||(f===se.Push?e.history.push(k,k.state):f===se.Replace&&e.history.replace(k,k.state)),f=se.Pop,c=!1,S=!1,_=!1,j=[],R=[]}async function ue(k,C){if(typeof k=="number"){e.history.go(k);return}let{path:N,submission:M,error:z}=Us(k,o,C),O=v.location,I=qr(v.location,N,C&&C.state);I=V({},I,e.history.encodeLocation(I));let $=C&&C.replace!=null?C.replace:void 0,A=se.Push;$===!0?A=se.Replace:$===!1||M!=null&&xt(M.formMethod)&&M.formAction===v.location.pathname+v.location.search&&(A=se.Replace);let Z=C&&"preventScrollReset"in C?C.preventScrollReset===!0:void 0,K=Ea({currentLocation:O,nextLocation:I,historyAction:A});if(K){cl(K,{state:"blocked",location:I,proceed(){cl(K,{state:"proceeding",proceed:void 0,reset:void 0,location:I}),ue(k,C)},reset(){or(K),F({blockers:new Map(v.blockers)})}});return}return await Ee(A,I,{submission:M,pendingError:z,preventScrollReset:Z,replace:C&&C.replace})}function xn(){if(Uo(),F({revalidation:"loading"}),v.navigation.state!=="submitting"){if(v.navigation.state==="idle"){Ee(v.historyAction,v.location,{startUninterruptedRevalidation:!0});return}Ee(f||v.historyAction,v.navigation.location,{overrideNavigation:v.navigation})}}async function Ee(k,C,N){p&&p.abort(),p=null,f=k,S=(N&&N.startUninterruptedRevalidation)===!0,Wf(v.location,v.matches),c=(N&&N.preventScrollReset)===!0;let M=l||r,z=N&&N.overrideNavigation,O=In(M,C,e.basename);if(!O){let ve=ft(404,{pathname:C.pathname}),{matches:we,route:tt}=Qs(M);Bo(),J(C,{matches:we,loaderData:{},errors:{[tt.id]:ve}});return}if(iv(v.location,C)&&!(N&&N.submission&&xt(N.submission.formMethod))){J(C,{matches:O});return}p=new AbortController;let I=yr(e.history,C,p.signal,N&&N.submission),$,A;if(N&&N.pendingError)A={[Un(O).route.id]:N.pendingError};else if(N&&N.submission&&xt(N.submission.formMethod)){let ve=await rr(I,C,N.submission,O,{replace:N.replace});if(ve.shortCircuited)return;$=ve.pendingActionData,A=ve.pendingActionError,z=V({state:"loading",location:C},N.submission),I=new Request(I.url,{signal:I.signal})}let{shortCircuited:Z,loaderData:K,errors:et}=await wt(I,C,O,z,N&&N.submission,N&&N.fetcherSubmission,N&&N.replace,$,A);Z||(p=null,J(C,V({matches:O},$?{actionData:$}:{},{loaderData:K,errors:et})))}async function rr(k,C,N,M,z){Uo();let O=V({state:"submitting",location:C},N);F({navigation:O});let I,$=mu(M,C);if(!$.route.action&&!$.route.lazy)I={type:fe.error,error:ft(405,{method:k.method,pathname:C.pathname,routeId:$.route.id})};else if(I=await gr("action",k,$,M,n,t,w.basename),k.signal.aborted)return{shortCircuited:!0};if(Kn(I)){let A;return z&&z.replace!=null?A=z.replace:A=I.location===v.location.pathname+v.location.search,await lr(v,I,{submission:N,replace:A}),{shortCircuited:!0}}if(zr(I)){let A=Un(M,$.route.id);return(z&&z.replace)!==!0&&(f=se.Push),{pendingActionData:{},pendingActionError:{[A.route.id]:I.error}}}if(cn(I))throw ft(400,{type:"defer-action"});return{pendingActionData:{[$.route.id]:I.data}}}async function wt(k,C,N,M,z,O,I,$,A){let Z=M;Z||(Z=V({state:"loading",location:C,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},z));let K=z||O?z||O:Z.formMethod&&Z.formAction&&Z.formData&&Z.formEncType?{formMethod:Z.formMethod,formAction:Z.formAction,formData:Z.formData,formEncType:Z.formEncType}:void 0,et=l||r,[ve,we]=Hs(e.history,v,N,K,C,_,j,R,X,et,e.basename,$,A);if(Bo(Ce=>!(N&&N.some(nt=>nt.route.id===Ce))||ve&&ve.some(nt=>nt.route.id===Ce)),ve.length===0&&we.length===0)return J(C,V({matches:N,loaderData:{},errors:A||null},$?{actionData:$}:{})),{shortCircuited:!0};if(!S){we.forEach(nt=>{let rn=v.fetchers.get(nt.key),ar={state:"loading",data:rn&&rn.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(nt.key,ar)});let Ce=$||v.actionData;F(V({navigation:Z},Ce?Object.keys(Ce).length===0?{actionData:null}:{actionData:Ce}:{},we.length>0?{fetchers:new Map(v.fetchers)}:{}))}U=++Y,we.forEach(Ce=>P.set(Ce.key,p));let{results:tt,loaderResults:ir,fetcherResults:Wo}=await Sa(v.matches,N,ve,we,k);if(k.signal.aborted)return{shortCircuited:!0};we.forEach(Ce=>P.delete(Ce.key));let ur=Ks(tt);if(ur)return await lr(v,ur,{replace:I}),{shortCircuited:!0};let{loaderData:En,errors:Vo}=Ws(v,N,ve,ir,A,we,Wo,Ye);Ye.forEach((Ce,nt)=>{Ce.subscribe(rn=>{(rn||Ce.done)&&Ye.delete(nt)})}),Hf();let Qo=xa(U);return V({loaderData:En,errors:Vo},Qo||we.length>0?{fetchers:new Map(v.fetchers)}:{})}function nn(k){return v.fetchers.get(k)||qm}function Of(k,C,N,M){if(bm)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.");P.has(k)&&sl(k);let O=In(l||r,N,e.basename);if(!O){Ho(k,C,ft(404,{pathname:N}));return}let{path:I,submission:$}=Us(N,o,M,!0),A=mu(O,I);if(c=(M&&M.preventScrollReset)===!0,$&&xt($.formMethod)){If(k,C,I,A,O,$);return}X.set(k,{routeId:C,path:I}),Uf(k,C,I,A,O,$)}async function If(k,C,N,M,z,O){if(Uo(),X.delete(k),!M.route.action&&!M.route.lazy){let St=ft(405,{method:O.formMethod,pathname:N,routeId:C});Ho(k,C,St);return}let I=v.fetchers.get(k),$=V({state:"submitting"},O,{data:I&&I.data," _hasFetcherDoneAnything ":!0});v.fetchers.set(k,$),F({fetchers:new Map(v.fetchers)});let A=new AbortController,Z=yr(e.history,N,A.signal,O);P.set(k,A);let K=await gr("action",Z,M,z,n,t,w.basename);if(Z.signal.aborted){P.get(k)===A&&P.delete(k);return}if(Kn(K)){P.delete(k),Ke.add(k);let St=V({state:"loading"},O,{data:void 0," _hasFetcherDoneAnything ":!0});return v.fetchers.set(k,St),F({fetchers:new Map(v.fetchers)}),lr(v,K,{submission:O,isFetchActionRedirect:!0})}if(zr(K)){Ho(k,C,K.error);return}if(cn(K))throw ft(400,{type:"defer-action"});let et=v.navigation.location||v.location,ve=yr(e.history,et,A.signal),we=l||r,tt=v.navigation.state!=="idle"?In(we,v.navigation.location,e.basename):v.matches;B(tt,"Didn't find any matches after fetcher action");let ir=++Y;de.set(k,ir);let Wo=V({state:"loading",data:K.data},O,{" _hasFetcherDoneAnything ":!0});v.fetchers.set(k,Wo);let[ur,En]=Hs(e.history,v,tt,O,et,_,j,R,X,we,e.basename,{[M.route.id]:K.data},void 0);En.filter(St=>St.key!==k).forEach(St=>{let Ko=St.key,_a=v.fetchers.get(Ko),Yf={state:"loading",data:_a&&_a.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(Ko,Yf),P.set(Ko,A)}),F({fetchers:new Map(v.fetchers)});let{results:Vo,loaderResults:Qo,fetcherResults:Ce}=await Sa(v.matches,tt,ur,En,ve);if(A.signal.aborted)return;de.delete(k),P.delete(k),En.forEach(St=>P.delete(St.key));let nt=Ks(Vo);if(nt)return lr(v,nt);let{loaderData:rn,errors:ar}=Ws(v,v.matches,ur,Qo,void 0,En,Ce,Ye),Qf={state:"idle",data:K.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(k,Qf);let Kf=xa(ir);v.navigation.state==="loading"&&ir>U?(B(f,"Expected pending action"),p&&p.abort(),J(v.navigation.location,{matches:tt,loaderData:rn,errors:ar,fetchers:new Map(v.fetchers)})):(F(V({errors:ar,loaderData:Vs(v.loaderData,rn,tt,ar)},Kf?{fetchers:new Map(v.fetchers)}:{})),_=!1)}async function Uf(k,C,N,M,z,O){let I=v.fetchers.get(k),$=V({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},O,{data:I&&I.data," _hasFetcherDoneAnything ":!0});v.fetchers.set(k,$),F({fetchers:new Map(v.fetchers)});let A=new AbortController,Z=yr(e.history,N,A.signal);P.set(k,A);let K=await gr("loader",Z,M,z,n,t,w.basename);if(cn(K)&&(K=await Pf(K,Z.signal,!0)||K),P.get(k)===A&&P.delete(k),Z.signal.aborted)return;if(Kn(K)){await lr(v,K);return}if(zr(K)){let ve=Un(v.matches,C);v.fetchers.delete(k),F({fetchers:new Map(v.fetchers),errors:{[ve.route.id]:K.error}});return}B(!cn(K),"Unhandled fetcher deferred data");let et={state:"idle",data:K.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(k,et),F({fetchers:new Map(v.fetchers)})}async function lr(k,C,N){var M;let{submission:z,replace:O,isFetchActionRedirect:I}=N===void 0?{}:N;C.revalidate&&(_=!0);let $=qr(k.location,C.location,V({_isRedirect:!0},I?{_isFetchActionRedirect:!0}:{}));if(B($,"Expected a location on the redirect navigation"),kf.test(C.location)&&xf&&typeof((M=window)==null?void 0:M.location)<"u"){let we=e.history.createURL(C.location),tt=il(we.pathname,e.basename||"/")==null;if(window.location.origin!==we.origin||tt){O?window.location.replace(C.location):window.location.assign(C.location);return}}p=null;let A=O===!0?se.Replace:se.Push,{formMethod:Z,formAction:K,formEncType:et,formData:ve}=k.navigation;!z&&Z&&K&&ve&&et&&(z={formMethod:Z,formAction:K,formEncType:et,formData:ve}),Zm.has(C.status)&&z&&xt(z.formMethod)?await Ee(A,$,{submission:V({},z,{formAction:C.location}),preventScrollReset:c}):I?await Ee(A,$,{overrideNavigation:{state:"loading",location:$,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},fetcherSubmission:z,preventScrollReset:c}):await Ee(A,$,{overrideNavigation:{state:"loading",location:$,formMethod:z?z.formMethod:void 0,formAction:z?z.formAction:void 0,formEncType:z?z.formEncType:void 0,formData:z?z.formData:void 0},preventScrollReset:c})}async function Sa(k,C,N,M,z){let O=await Promise.all([...N.map(A=>gr("loader",z,A,C,n,t,w.basename)),...M.map(A=>A.matches&&A.match?gr("loader",yr(e.history,A.path,z.signal),A.match,A.matches,n,t,w.basename):{type:fe.error,error:ft(404,{pathname:A.path})})]),I=O.slice(0,N.length),$=O.slice(N.length);return await Promise.all([Ys(k,N,I,z.signal,!1,v.loaderData),Ys(k,M.map(A=>A.match),$,z.signal,!0)]),{results:O,loaderResults:I,fetcherResults:$}}function Uo(){_=!0,j.push(...Bo()),X.forEach((k,C)=>{P.has(C)&&(R.push(C),sl(C))})}function Ho(k,C,N){let M=Un(v.matches,C);$o(k),F({errors:{[M.route.id]:N},fetchers:new Map(v.fetchers)})}function $o(k){P.has(k)&&sl(k),X.delete(k),de.delete(k),Ke.delete(k),v.fetchers.delete(k)}function sl(k){let C=P.get(k);B(C,"Expected fetch controller: "+k),C.abort(),P.delete(k)}function ka(k){for(let C of k){let M={state:"idle",data:nn(C).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};v.fetchers.set(C,M)}}function Hf(){let k=[];for(let C of Ke){let N=v.fetchers.get(C);B(N,"Expected fetcher: "+C),N.state==="loading"&&(Ke.delete(C),k.push(C))}ka(k)}function xa(k){let C=[];for(let[N,M]of de)if(M0}function $f(k,C){let N=v.blockers.get(k)||Is;return me.get(k)!==C&&me.set(k,C),N}function or(k){v.blockers.delete(k),me.delete(k)}function cl(k,C){let N=v.blockers.get(k)||Is;B(N.state==="unblocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="blocked"||N.state==="blocked"&&C.state==="proceeding"||N.state==="blocked"&&C.state==="unblocked"||N.state==="proceeding"&&C.state==="unblocked","Invalid blocker state transition: "+N.state+" -> "+C.state),v.blockers.set(k,C),F({blockers:new Map(v.blockers)})}function Ea(k){let{currentLocation:C,nextLocation:N,historyAction:M}=k;if(me.size===0)return;me.size>1&&yn(!1,"A router only supports one blocker at a time");let z=Array.from(me.entries()),[O,I]=z[z.length-1],$=v.blockers.get(O);if(!($&&$.state==="proceeding")&&I({currentLocation:C,nextLocation:N,historyAction:M}))return O}function Bo(k){let C=[];return Ye.forEach((N,M)=>{(!k||k(M))&&(N.cancel(),C.push(M),Ye.delete(M))}),C}function Bf(k,C,N){if(a=k,d=C,s=N||(M=>M.key),!h&&v.navigation===Si){h=!0;let M=Ca(v.location,v.matches);M!=null&&F({restoreScrollPosition:M})}return()=>{a=null,d=null,s=null}}function Wf(k,C){if(a&&s&&d){let N=C.map(z=>Xs(z,v.loaderData)),M=s(k,N)||k.key;a[M]=d()}}function Ca(k,C){if(a&&s&&d){let N=C.map(O=>Xs(O,v.loaderData)),M=s(k,N)||k.key,z=a[M];if(typeof z=="number")return z}return null}function Vf(k){l=k}return w={get basename(){return e.basename},get state(){return v},get routes(){return r},initialize:Ue,subscribe:H,enableScrollRestoration:Bf,navigate:ue,fetch:Of,revalidate:xn,createHref:k=>e.history.createHref(k),encodeLocation:k=>e.history.encodeLocation(k),getFetcher:nn,deleteFetcher:$o,dispose:L,getBlocker:$f,deleteBlocker:or,_internalFetchControllers:P,_internalActiveDeferreds:Ye,_internalSetRoutes:Vf},w}function nv(e){return e!=null&&"formData"in e}function Us(e,t,n,r){r===void 0&&(r=!1);let l=typeof e=="string"?e:Tt(e);if(!n||!nv(n))return{path:l};if(n.formMethod&&!sv(n.formMethod))return{path:l,error:ft(405,{method:n.formMethod})};let o;if(n.formData){let a=n.formMethod||"get";if(o={formMethod:t.v7_normalizeFormMethod?a.toUpperCase():a.toLowerCase(),formAction:_f(l),formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:n.formData},xt(o.formMethod))return{path:l,submission:o}}let i=gt(l),u=Cf(n.formData);return r&&i.search&&Nf(i.search)&&u.append("index",""),i.search="?"+u,{path:Tt(i),submission:o}}function rv(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 Hs(e,t,n,r,l,o,i,u,a,s,d,h,m){let y=m?Object.values(m)[0]:h?Object.values(h)[0]:void 0,E=e.createURL(t.location),w=e.createURL(l),v=o||E.toString()===w.toString()||E.search!==w.search,f=m?Object.keys(m)[0]:void 0,p=rv(n,f).filter((_,j)=>{if(_.route.lazy)return!0;if(_.route.loader==null)return!1;if(lv(t.loaderData,t.matches[j],_)||i.some(Y=>Y===_.route.id))return!0;let R=t.matches[j],P=_;return $s(_,V({currentUrl:E,currentParams:R.params,nextUrl:w,nextParams:P.params},r,{actionResult:y,defaultShouldRevalidate:v||Ef(R,P)}))}),S=[];return a.forEach((_,j)=>{if(!n.some(U=>U.route.id===_.routeId))return;let R=In(s,_.path,d);if(!R){S.push(V({key:j},_,{matches:null,match:null}));return}let P=mu(R,_.path);if(u.includes(j)){S.push(V({key:j,matches:R,match:P},_));return}$s(P,V({currentUrl:E,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:n[n.length-1].params},r,{actionResult:y,defaultShouldRevalidate:v}))&&S.push(V({key:j,matches:R,match:P},_))}),[p,S]}function lv(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Ef(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function $s(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function Bs(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];B(l,"No route found in manifest");let o={};for(let i in r){let a=l[i]!==void 0&&i!=="hasErrorBoundary";yn(!a,'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.')),!a&&!Pm.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,{hasErrorBoundary:t(V({},l)),lazy:void 0})}async function gr(e,t,n,r,l,o,i,u,a,s){i===void 0&&(i="/"),u===void 0&&(u=!1),a===void 0&&(a=!1);let d,h,m,y=v=>{let f,c=new Promise((p,S)=>f=S);return m=()=>f(),t.signal.addEventListener("abort",m),Promise.race([v({request:t,params:n.params,context:s}),c])};try{let v=n.route[e];if(n.route.lazy)if(v)h=(await Promise.all([y(v),Bs(n.route,o,l)]))[0];else if(await Bs(n.route,o,l),v=n.route[e],v)h=await y(v);else{if(e==="action")throw ft(405,{method:t.method,pathname:new URL(t.url).pathname,routeId:n.route.id});return{type:fe.data,data:void 0}}else B(v,"Could not find the "+e+' to run on the "'+n.route.id+'" route'),h=await y(v);B(h!==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(v){d=fe.error,h=v}finally{m&&t.signal.removeEventListener("abort",m)}if(av(h)){let v=h.status;if(Jm.has(v)){let p=h.headers.get("Location");if(B(p,"Redirects returned/thrown from loaders/actions must have a Location header"),kf.test(p)){if(!u){let S=new URL(t.url),_=p.startsWith("//")?new URL(S.protocol+p):new URL(p),j=il(_.pathname,i)!=null;_.origin===S.origin&&j&&(p=_.pathname+_.search+_.hash)}}else{let S=r.slice(0,r.indexOf(n)+1),_=Fo(S).map(R=>R.pathnameBase),j=pa(p,_,new URL(t.url).pathname);if(B(Tt(j),"Unable to resolve redirect location: "+p),i){let R=j.pathname;j.pathname=R==="/"?i:Nt([i,R])}p=Tt(j)}if(u)throw h.headers.set("Location",p),h;return{type:fe.redirect,status:v,location:p,revalidate:h.headers.get("X-Remix-Revalidate")!==null}}if(a)throw{type:d||fe.data,response:h};let f,c=h.headers.get("Content-Type");return c&&/\bapplication\/json\b/.test(c)?f=await h.json():f=await h.text(),d===fe.error?{type:d,error:new ha(v,h.statusText,f),headers:h.headers}:{type:fe.data,data:f,statusCode:h.status,headers:h.headers}}if(d===fe.error)return{type:d,error:h};if(uv(h)){var E,w;return{type:fe.deferred,deferredData:h,statusCode:(E=h.init)==null?void 0:E.status,headers:((w=h.init)==null?void 0:w.headers)&&new Headers(h.init.headers)}}return{type:fe.data,data:h}}function yr(e,t,n,r){let l=e.createURL(_f(t)).toString(),o={signal:n};if(r&&xt(r.formMethod)){let{formMethod:i,formEncType:u,formData:a}=r;o.method=i.toUpperCase(),o.body=u==="application/x-www-form-urlencoded"?Cf(a):a}return new Request(l,o)}function Cf(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,r instanceof File?r.name:r);return t}function ov(e,t,n,r,l){let o={},i=null,u,a=!1,s={};return n.forEach((d,h)=>{let m=t[h].route.id;if(B(!Kn(d),"Cannot handle redirect results in processLoaderData"),zr(d)){let y=Un(e,m),E=d.error;r&&(E=Object.values(r)[0],r=void 0),i=i||{},i[y.route.id]==null&&(i[y.route.id]=E),o[m]=void 0,a||(a=!0,u=wf(d.error)?d.error.status:500),d.headers&&(s[m]=d.headers)}else cn(d)?(l.set(m,d.deferredData),o[m]=d.deferredData.data):o[m]=d.data,d.statusCode!=null&&d.statusCode!==200&&!a&&(u=d.statusCode),d.headers&&(s[m]=d.headers)}),r&&(i=r,o[Object.keys(r)[0]]=void 0),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:s}}function Ws(e,t,n,r,l,o,i,u){let{loaderData:a,errors:s}=ov(t,n,r,l,u);for(let d=0;dr.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function Qs(e){let t=e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ft(e,t){let{pathname:n,routeId:r,method:l,type:o}=t===void 0?{}:t,i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",l&&n&&r?u="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"&&(u="defer() is not supported in actions")):e===403?(i="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(i="Not Found",u='No route matches URL "'+n+'"'):e===405&&(i="Method Not Allowed",l&&n&&r?u="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&&(u='Invalid request method "'+l.toUpperCase()+'"')),new ha(e||500,i,new Error(u),!0)}function Ks(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Kn(n))return n}}function _f(e){let t=typeof e=="string"?gt(e):e;return Tt(V({},t,{hash:""}))}function iv(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function cn(e){return e.type===fe.deferred}function zr(e){return e.type===fe.error}function Kn(e){return(e&&e.type)===fe.redirect}function uv(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 av(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function sv(e){return Gm.has(e.toLowerCase())}function xt(e){return Ym.has(e.toLowerCase())}async function Ys(e,t,n,r,l,o){for(let i=0;ih.route.id===a.route.id),d=s!=null&&!Ef(s,a)&&(o&&o[a.route.id])!==void 0;cn(u)&&(l||d)&&await Pf(u,r,l).then(h=>{h&&(n[i]=h||n[i])})}}async function Pf(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:fe.data,data:e.deferredData.unwrappedData}}catch(l){return{type:fe.error,error:l}}return{type:fe.data,data:e.deferredData.data}}}function Nf(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Xs(e,t){let{route:n,pathname:r,params:l}=e;return{id:n.id,pathname:r,params:l,data:t[n.id],handle:n.handle}}function mu(e,t){let n=typeof t=="string"?gt(t).search:t.search;if(e[e.length-1].route.index&&Nf(n||""))return e[e.length-1];let r=Fo(e);return r[r.length-1]}/** * React Router v6.10.0 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function sv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const cv=typeof Object.is=="function"?Object.is:sv,{useState:dv,useEffect:fv,useLayoutEffect:pv,useDebugValue:hv}=xi;function mv(e,t,n){const r=t(),[{inst:l},o]=dv({inst:{value:r,getSnapshot:t}});return pv(()=>{l.value=r,l.getSnapshot=t,ki(l)&&o({inst:l})},[e,r,t]),fv(()=>(ki(l)&&o({inst:l}),e(()=>{ki(l)&&o({inst:l})})),[e]),hv(r),r}function ki(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!cv(n,r)}catch{return!0}}function vv(e,t,n){return t()}const gv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",yv=!gv,wv=yv?vv:mv,Sv="useSyncExternalStore"in xi?(e=>e.useSyncExternalStore)(xi):wv,ma=x.createContext(null),va=x.createContext(null),ul=x.createContext(null),Ao=x.createContext(null),kn=x.createContext({outlet:null,matches:[]}),jf=x.createContext(null);function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;tu.pathnameBase)),o=x.useRef(!1);return x.useEffect(()=>{o.current=!0}),x.useCallback(function(u,a){if(a===void 0&&(a={}),!o.current)return;if(typeof u=="number"){t.go(u);return}let s=pa(u,JSON.parse(l),r,a.relative==="path");e!=="/"&&(s.pathname=s.pathname==="/"?e:Nt([e,s.pathname])),(a.replace?t.replace:t.push)(s,a.state,a)},[e,t,l,r])}const Ev=x.createContext(null);function Cv(e){let t=x.useContext(kn).outlet;return t&&x.createElement(Ev.Provider,{value:e},t)}function Df(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=x.useContext(kn),{pathname:l}=Oo(),o=JSON.stringify(Fo(r).map(i=>i.pathnameBase));return x.useMemo(()=>pa(e,JSON.parse(o),l,n==="path"),[e,o,l,n])}function _v(e,t){al()||B(!1);let{navigator:n}=x.useContext(ul),r=x.useContext(va),{matches:l}=x.useContext(kn),o=l[l.length-1],i=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let a=Oo(),s;if(t){var d;let w=typeof t=="string"?gt(t):t;u==="/"||(d=w.pathname)!=null&&d.startsWith(u)||B(!1),s=w}else s=a;let h=s.pathname||"/",m=u==="/"?h:h.slice(u.length)||"/",y=In(e,{pathname:m}),E=Dv(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Nt([u,n.encodeLocation?n.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:Nt([u,n.encodeLocation?n.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),l,r||void 0);return t&&E?x.createElement(Ao.Provider,{value:{location:vu({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:se.Pop}},E):E}function Pv(){let e=Mv(),t=wf(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:l},n):null,o)}class Nv extends x.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?x.createElement(kn.Provider,{value:this.props.routeContext},x.createElement(jf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function jv(e){let{routeContext:t,match:n,children:r}=e,l=x.useContext(ma);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(kn.Provider,{value:t},r)}function Dv(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,l=n==null?void 0:n.errors;if(l!=null){let o=r.findIndex(i=>i.route.id&&(l==null?void 0:l[i.route.id]));o>=0||B(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,i,u)=>{let a=i.route.id?l==null?void 0:l[i.route.id]:null,s=null;n&&(i.route.ErrorBoundary?s=x.createElement(i.route.ErrorBoundary,null):i.route.errorElement?s=i.route.errorElement:s=x.createElement(Pv,null));let d=t.concat(r.slice(0,u+1)),h=()=>{let m=o;return a?m=s:i.route.Component?m=x.createElement(i.route.Component,null):i.route.element&&(m=i.route.element),x.createElement(jv,{match:i,routeContext:{outlet:o,matches:d},children:m})};return n&&(i.route.ErrorBoundary||i.route.errorElement||u===0)?x.createElement(Nv,{location:n.location,component:s,error:a,children:h(),routeContext:{outlet:null,matches:d}}):h()},null)}var Gs;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(Gs||(Gs={}));var vo;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(vo||(vo={}));function Rv(e){let t=x.useContext(va);return t||B(!1),t}function Lv(e){let t=x.useContext(kn);return t||B(!1),t}function Tv(e){let t=Lv(),n=t.matches[t.matches.length-1];return n.route.id||B(!1),n.route.id}function Mv(){var e;let t=x.useContext(jf),n=Rv(vo.UseRouteError),r=Tv(vo.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function zv(e){let{fallbackElement:t,router:n}=e,r=x.useCallback(()=>n.state,[n]),l=Sv(n.subscribe,r,r),o=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:a=>n.navigate(a),push:(a,s,d)=>n.navigate(a,{state:s,preventScrollReset:d==null?void 0:d.preventScrollReset}),replace:(a,s,d)=>n.navigate(a,{replace:!0,state:s,preventScrollReset:d==null?void 0:d.preventScrollReset})}),[n]),i=n.basename||"/",u=x.useMemo(()=>({router:n,navigator:o,static:!1,basename:i}),[n,o,i]);return x.createElement(x.Fragment,null,x.createElement(ma.Provider,{value:u},x.createElement(va.Provider,{value:l},x.createElement(Ov,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:o},n.state.initialized?x.createElement(Iv,null):t))),null)}function Fv(e){return Cv(e.context)}function Av(e){B(!1)}function Ov(e){let{basename:t="/",children:n=null,location:r,navigationType:l=se.Pop,navigator:o,static:i=!1}=e;al()&&B(!1);let u=t.replace(/^\/*/,"/"),a=x.useMemo(()=>({basename:u,navigator:o,static:i}),[u,o,i]);typeof r=="string"&&(r=gt(r));let{pathname:s="/",search:d="",hash:h="",state:m=null,key:y="default"}=r,E=x.useMemo(()=>{let w=il(s,u);return w==null?null:{location:{pathname:w,search:d,hash:h,state:m,key:y},navigationType:l}},[u,s,d,h,m,y,l]);return E==null?null:x.createElement(ul.Provider,{value:a},x.createElement(Ao.Provider,{children:n,value:E}))}function Iv(e){let{children:t,location:n}=e,r=x.useContext(ma),l=r&&!t?r.router.routes:gu(t);return _v(l,n)}var Js;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Js||(Js={}));new Promise(()=>{});function gu(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,l)=>{if(!x.isValidElement(r))return;let o=[...t,l];if(r.type===x.Fragment){n.push.apply(n,gu(r.props.children,o));return}r.type!==Av&&B(!1),!r.props.index||!r.props.children||B(!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=gu(r.props.children,o)),n.push(i)}),n}function Uv(e){return!!e.ErrorBoundary||!!e.errorElement}/** + */function cv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const dv=typeof Object.is=="function"?Object.is:cv,{useState:fv,useEffect:pv,useLayoutEffect:hv,useDebugValue:mv}=xi;function vv(e,t,n){const r=t(),[{inst:l},o]=fv({inst:{value:r,getSnapshot:t}});return hv(()=>{l.value=r,l.getSnapshot=t,ki(l)&&o({inst:l})},[e,r,t]),pv(()=>(ki(l)&&o({inst:l}),e(()=>{ki(l)&&o({inst:l})})),[e]),mv(r),r}function ki(e){const t=e.getSnapshot,n=e.value;try{const r=t();return!dv(n,r)}catch{return!0}}function gv(e,t,n){return t()}const yv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",wv=!yv,Sv=wv?gv:vv,kv="useSyncExternalStore"in xi?(e=>e.useSyncExternalStore)(xi):Sv,ma=x.createContext(null),va=x.createContext(null),ul=x.createContext(null),Ao=x.createContext(null),kn=x.createContext({outlet:null,matches:[]}),jf=x.createContext(null);function vu(){return vu=Object.assign?Object.assign.bind():function(e){for(var t=1;tu.pathnameBase)),o=x.useRef(!1);return x.useEffect(()=>{o.current=!0}),x.useCallback(function(u,a){if(a===void 0&&(a={}),!o.current)return;if(typeof u=="number"){t.go(u);return}let s=pa(u,JSON.parse(l),r,a.relative==="path");e!=="/"&&(s.pathname=s.pathname==="/"?e:Nt([e,s.pathname])),(a.replace?t.replace:t.push)(s,a.state,a)},[e,t,l,r])}const Cv=x.createContext(null);function _v(e){let t=x.useContext(kn).outlet;return t&&x.createElement(Cv.Provider,{value:e},t)}function Df(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=x.useContext(kn),{pathname:l}=Oo(),o=JSON.stringify(Fo(r).map(i=>i.pathnameBase));return x.useMemo(()=>pa(e,JSON.parse(o),l,n==="path"),[e,o,l,n])}function Pv(e,t){al()||B(!1);let{navigator:n}=x.useContext(ul),r=x.useContext(va),{matches:l}=x.useContext(kn),o=l[l.length-1],i=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let a=Oo(),s;if(t){var d;let w=typeof t=="string"?gt(t):t;u==="/"||(d=w.pathname)!=null&&d.startsWith(u)||B(!1),s=w}else s=a;let h=s.pathname||"/",m=u==="/"?h:h.slice(u.length)||"/",y=In(e,{pathname:m}),E=Rv(y&&y.map(w=>Object.assign({},w,{params:Object.assign({},i,w.params),pathname:Nt([u,n.encodeLocation?n.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:Nt([u,n.encodeLocation?n.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),l,r||void 0);return t&&E?x.createElement(Ao.Provider,{value:{location:vu({pathname:"/",search:"",hash:"",state:null,key:"default"},s),navigationType:se.Pop}},E):E}function Nv(){let e=zv(),t=wf(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:l},n):null,o)}class jv extends x.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location?{error:t.error,location:t.location}:{error:t.error||n.error,location:n.location}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?x.createElement(kn.Provider,{value:this.props.routeContext},x.createElement(jf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Dv(e){let{routeContext:t,match:n,children:r}=e,l=x.useContext(ma);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(kn.Provider,{value:t},r)}function Rv(e,t,n){if(t===void 0&&(t=[]),e==null)if(n!=null&&n.errors)e=n.matches;else return null;let r=e,l=n==null?void 0:n.errors;if(l!=null){let o=r.findIndex(i=>i.route.id&&(l==null?void 0:l[i.route.id]));o>=0||B(!1),r=r.slice(0,Math.min(r.length,o+1))}return r.reduceRight((o,i,u)=>{let a=i.route.id?l==null?void 0:l[i.route.id]:null,s=null;n&&(i.route.ErrorBoundary?s=x.createElement(i.route.ErrorBoundary,null):i.route.errorElement?s=i.route.errorElement:s=x.createElement(Nv,null));let d=t.concat(r.slice(0,u+1)),h=()=>{let m=o;return a?m=s:i.route.Component?m=x.createElement(i.route.Component,null):i.route.element&&(m=i.route.element),x.createElement(Dv,{match:i,routeContext:{outlet:o,matches:d},children:m})};return n&&(i.route.ErrorBoundary||i.route.errorElement||u===0)?x.createElement(jv,{location:n.location,component:s,error:a,children:h(),routeContext:{outlet:null,matches:d}}):h()},null)}var Gs;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(Gs||(Gs={}));var vo;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(vo||(vo={}));function Lv(e){let t=x.useContext(va);return t||B(!1),t}function Tv(e){let t=x.useContext(kn);return t||B(!1),t}function Mv(e){let t=Tv(),n=t.matches[t.matches.length-1];return n.route.id||B(!1),n.route.id}function zv(){var e;let t=x.useContext(jf),n=Lv(vo.UseRouteError),r=Mv(vo.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function Fv(e){let{fallbackElement:t,router:n}=e,r=x.useCallback(()=>n.state,[n]),l=kv(n.subscribe,r,r),o=x.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:a=>n.navigate(a),push:(a,s,d)=>n.navigate(a,{state:s,preventScrollReset:d==null?void 0:d.preventScrollReset}),replace:(a,s,d)=>n.navigate(a,{replace:!0,state:s,preventScrollReset:d==null?void 0:d.preventScrollReset})}),[n]),i=n.basename||"/",u=x.useMemo(()=>({router:n,navigator:o,static:!1,basename:i}),[n,o,i]);return x.createElement(x.Fragment,null,x.createElement(ma.Provider,{value:u},x.createElement(va.Provider,{value:l},x.createElement(Iv,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:o},n.state.initialized?x.createElement(Uv,null):t))),null)}function Av(e){return _v(e.context)}function Ov(e){B(!1)}function Iv(e){let{basename:t="/",children:n=null,location:r,navigationType:l=se.Pop,navigator:o,static:i=!1}=e;al()&&B(!1);let u=t.replace(/^\/*/,"/"),a=x.useMemo(()=>({basename:u,navigator:o,static:i}),[u,o,i]);typeof r=="string"&&(r=gt(r));let{pathname:s="/",search:d="",hash:h="",state:m=null,key:y="default"}=r,E=x.useMemo(()=>{let w=il(s,u);return w==null?null:{location:{pathname:w,search:d,hash:h,state:m,key:y},navigationType:l}},[u,s,d,h,m,y,l]);return E==null?null:x.createElement(ul.Provider,{value:a},x.createElement(Ao.Provider,{children:n,value:E}))}function Uv(e){let{children:t,location:n}=e,r=x.useContext(ma),l=r&&!t?r.router.routes:gu(t);return Pv(l,n)}var Js;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Js||(Js={}));new Promise(()=>{});function gu(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,l)=>{if(!x.isValidElement(r))return;let o=[...t,l];if(r.type===x.Fragment){n.push.apply(n,gu(r.props.children,o));return}r.type!==Ov&&B(!1),!r.props.index||!r.props.children||B(!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=gu(r.props.children,o)),n.push(i)}),n}function Hv(e){return!!e.ErrorBoundary||!!e.errorElement}/** * React Router DOM v6.10.0 * * Copyright (c) Remix Software Inc. @@ -64,9 +64,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function $v(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Bv(e,t){return e.button===0&&(!t||t==="_self")&&!$v(e)}const Wv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function Vv(e,t){return ev({basename:t==null?void 0:t.basename,future:t==null?void 0:t.future,history:xm({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Qv(),routes:e,detectErrorBoundary:Uv}).initialize()}function Qv(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=go({},t,{errors:Kv(t.errors)})),t}function Kv(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new ha(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){let o=new Error(l.message);o.stack="",n[r]=o}else n[r]=l;return n}const Yv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Xv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jl=x.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:u,target:a,to:s,preventScrollReset:d}=t,h=Hv(t,Wv),{basename:m}=x.useContext(ul),y,E=!1;if(typeof s=="string"&&Xv.test(s)&&(y=s,Yv)){let c=new URL(window.location.href),p=s.startsWith("//")?new URL(c.protocol+s):new URL(s),S=il(p.pathname,m);p.origin===c.origin&&S!=null?s=S+p.search+p.hash:E=!0}let w=kv(s,{relative:l}),v=Gv(s,{replace:i,state:u,target:a,preventScrollReset:d,relative:l});function f(c){r&&r(c),c.defaultPrevented||v(c)}return x.createElement("a",go({},h,{href:y||w,onClick:E||o?r:f,ref:n,target:a}))});var Zs;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Zs||(Zs={}));var qs;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qs||(qs={}));function Gv(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i}=t===void 0?{}:t,u=xv(),a=Oo(),s=Df(e,{relative:i});return x.useCallback(d=>{if(Bv(d,n)){d.preventDefault();let h=r!==void 0?r:Tt(a)===Tt(s);u(e,{replace:h,state:l,preventScrollReset:o,relative:i})}},[a,u,s,r,l,n,e,o,i])}function Jv(){return g.jsxs("div",{children:["These are Bridge Tools written by ",g.jsx("a",{href:"https://github.com/S-N-O-R-L-A-X",children:"SNORLAX"})," with the help of ",g.jsx("a",{href:"https://github.com/SixuanMi",children:"小米"}),".",g.jsx("a",{href:"https://S-N-O-R-L-A-X.github.io",target:"_blank",className:"github-corner","aria-label":"Go to his homepage",children:g.jsxs("svg",{viewBox:"0 0 250 250","aria-hidden":"true",children:[g.jsx("path",{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}),g.jsx("path",{d:"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",fill:"currentColor",style:{transformOrigin:"130px 106px"},className:"octo-arm"}),g.jsx("path",{d:"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",fill:"currentColor",className:"octo-body"})]})})]})}function Zv(){return g.jsx("nav",{className:"sidebar",children:g.jsxs("ul",{className:"sidebarMenuInner",children:[g.jsx("li",{children:g.jsx(jl,{to:"/",children:"Home"})}),g.jsx("li",{children:g.jsx(jl,{to:"deal-multi",children:"Deal With Multi Hands Setting"})}),g.jsx("li",{children:g.jsx(jl,{to:"play-board",children:"Play Board"})}),g.jsx("li",{children:g.jsx("a",{href:"https://www.ccba.org.cn/wbf20vp/",target:"_blank",children:"imp to vp"})}),g.jsx("li",{children:g.jsx(jl,{to:"calc-contract",children:"Calculate points of contract"})}),g.jsx("li",{children:g.jsx("a",{href:"http://playbridge.com/pb_shuffle_project.php",target:"_blank",children:"一个其他的发牌网站"})}),g.jsx("li",{children:g.jsx("a",{href:"https://bridge.esmarkkappel.dk/main/main.html",target:"_blank",children:"单套结构打法"})})]})})}function qv(){return g.jsxs("div",{className:"App",children:[g.jsx(Zv,{}),g.jsxs("div",{className:"main",children:[g.jsx(Jv,{}),g.jsx(Fv,{})]})]})}function bv(){const[e,t]=x.useState(!0);function n(){t(!1)}return g.jsxs(g.Fragment,{children:[e&&g.jsx("h3",{children:"Please wait for several seconds..."}),g.jsx("iframe",{onLoad:n,id:"bridgeweb-board",name:"myiframe",src:"https://dds.bridgewebs.com/bridgesolver/upload.htm"}),g.jsxs("p",{children:["This page is from ",g.jsx("a",{href:"https://dds.bridgewebs.com/bridgesolver/upload.htm",children:"https://dds.bridgewebs.com/bridgesolver/upload.htm"})]})]})}var Rf=(e=>(e.N="North",e.S="South",e.E="East",e.W="West",e))(Rf||{}),ga=(e=>(e[e.S=0]="S",e[e.H=1]="H",e[e.D=2]="D",e[e.C=3]="C",e))(ga||{}),br=(e=>(e[e.Spade=0]="Spade",e[e.Heart=1]="Heart",e[e.Diamond=2]="Diamond",e[e.Club=3]="Club",e))(br||{}),Io=(e=>(e[e["♠"]=0]="♠",e[e["♡"]=1]="♡",e[e["♢"]=2]="♢",e[e["♣"]=3]="♣",e))(Io||{});const e0={N:0,S:1,E:2,W:3},el=["N","S","E","W"],Lf=["NT","S","H","D","C"],Tf=["S","H","D","C"],Mf=["A","K","Q","J","10","9","8","7","6","5","4","3","2"];function t0(e){const{ddtricks:t="*".repeat(20)}=e;let n=[];if(typeof t=="string")for(let r=0;r<4;++r){const l=[];for(let o=0;o<5;++o)t[r*5+o]!=="*"?l.push(parseInt(t[r*5+o],16)):l.push("*");n.push(l)}else n=t;return g.jsx("table",{className:"showTricks",children:g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{}),Lf.map(r=>g.jsx("td",{children:r},r))]}),n.map((r,l)=>g.jsxs("tr",{children:[g.jsx("td",{children:el[l]}),r.map((o,i)=>g.jsx("td",{children:o},"row"+l+"col"+i))]},"row"+l))]})})}const wa=class{constructor(t,n){ne(this,"suit");ne(this,"rank");ne(this,"points");this.suit=t,this.rank=n,this.points=wa.POINT[n]}show(){console.log(this.suit+this.rank)}};let Re=wa;ne(Re,"SUIT",["S","H","D","C"]),ne(Re,"RANK",{A:0,K:1,Q:2,J:3,10:4,9:5,8:6,7:7,6:8,5:9,4:10,3:11,2:12}),ne(Re,"POINT",{A:4,K:3,Q:2,J:1,10:0,9:0,8:0,7:0,6:0,5:0,4:0,3:0,2:0});function $t(e){let t="";function n(r){r.forEach(l=>{l==="10"?t+="T":t+=l})}return n(e.hand.S),t+=".",n(e.hand.H),t+=".",n(e.hand.D),t+=".",n(e.hand.C),t}function zf(e){let t="N:";return t+=$t(e[0])+" "+$t(e[2])+" "+$t(e[1])+" "+$t(e[3]),t}function n0(e){const t=new Date,n=`% PBN 2.1 -% EXPORT -%Content-type: text/x-pbn; charset=ISO-8859-1 + */function go(){return go=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[l]=e[l]);return n}function Bv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Wv(e,t){return e.button===0&&(!t||t==="_self")&&!Bv(e)}const Vv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function Qv(e,t){return tv({basename:t==null?void 0:t.basename,future:t==null?void 0:t.future,history:Em({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||Kv(),routes:e,detectErrorBoundary:Hv}).initialize()}function Kv(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=go({},t,{errors:Yv(t.errors)})),t}function Yv(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new ha(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){let o=new Error(l.message);o.stack="",n[r]=o}else n[r]=l;return n}const Xv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jl=x.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:u,target:a,to:s,preventScrollReset:d}=t,h=$v(t,Vv),{basename:m}=x.useContext(ul),y,E=!1;if(typeof s=="string"&&Gv.test(s)&&(y=s,Xv)){let c=new URL(window.location.href),p=s.startsWith("//")?new URL(c.protocol+s):new URL(s),S=il(p.pathname,m);p.origin===c.origin&&S!=null?s=S+p.search+p.hash:E=!0}let w=xv(s,{relative:l}),v=Jv(s,{replace:i,state:u,target:a,preventScrollReset:d,relative:l});function f(c){r&&r(c),c.defaultPrevented||v(c)}return x.createElement("a",go({},h,{href:y||w,onClick:E||o?r:f,ref:n,target:a}))});var Zs;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Zs||(Zs={}));var qs;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(qs||(qs={}));function Jv(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i}=t===void 0?{}:t,u=Ev(),a=Oo(),s=Df(e,{relative:i});return x.useCallback(d=>{if(Wv(d,n)){d.preventDefault();let h=r!==void 0?r:Tt(a)===Tt(s);u(e,{replace:h,state:l,preventScrollReset:o,relative:i})}},[a,u,s,r,l,n,e,o,i])}function Zv(){return g.jsxs("div",{children:["These are Bridge Tools written by ",g.jsx("a",{href:"https://github.com/S-N-O-R-L-A-X",children:"SNORLAX"})," with the help of ",g.jsx("a",{href:"https://github.com/SixuanMi",children:"小米"}),".",g.jsx("a",{href:"https://S-N-O-R-L-A-X.github.io",target:"_blank",className:"github-corner","aria-label":"Go to his homepage",children:g.jsxs("svg",{viewBox:"0 0 250 250","aria-hidden":"true",children:[g.jsx("path",{d:"M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"}),g.jsx("path",{d:"M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2",fill:"currentColor",style:{transformOrigin:"130px 106px"},className:"octo-arm"}),g.jsx("path",{d:"M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z",fill:"currentColor",className:"octo-body"})]})})]})}function qv(){return g.jsx("nav",{className:"sidebar",children:g.jsxs("ul",{className:"sidebarMenuInner",children:[g.jsx("li",{children:g.jsx(jl,{to:"/",children:"Home"})}),g.jsx("li",{children:g.jsx(jl,{to:"deal-multi",children:"Deal With Multi Hands Setting"})}),g.jsx("li",{children:g.jsx(jl,{to:"play-board",children:"Play Board"})}),g.jsx("li",{children:g.jsx("a",{href:"https://www.ccba.org.cn/wbf20vp/",target:"_blank",children:"imp to vp"})}),g.jsx("li",{children:g.jsx(jl,{to:"calc-contract",children:"Calculate points of contract"})}),g.jsx("li",{children:g.jsx("a",{href:"http://playbridge.com/pb_shuffle_project.php",target:"_blank",children:"一个其他的发牌网站"})}),g.jsx("li",{children:g.jsx("a",{href:"https://bridge.esmarkkappel.dk/main/main.html",target:"_blank",children:"单套结构打法"})})]})})}function bv(){return g.jsxs("div",{className:"App",children:[g.jsx(qv,{}),g.jsxs("div",{className:"main",children:[g.jsx(Zv,{}),g.jsx(Av,{})]})]})}function e0(){const[e,t]=x.useState(!0);function n(){t(!1)}return g.jsxs(g.Fragment,{children:[e&&g.jsx("h3",{children:"Please wait for several seconds..."}),g.jsx("iframe",{onLoad:n,id:"bridgeweb-board",name:"myiframe",src:"https://dds.bridgewebs.com/bridgesolver/upload.htm"}),g.jsxs("p",{children:["This page is from ",g.jsx("a",{href:"https://dds.bridgewebs.com/bridgesolver/upload.htm",children:"https://dds.bridgewebs.com/bridgesolver/upload.htm"})]})]})}var Rf=(e=>(e.N="North",e.S="South",e.E="East",e.W="West",e))(Rf||{}),ga=(e=>(e[e.S=0]="S",e[e.H=1]="H",e[e.D=2]="D",e[e.C=3]="C",e))(ga||{}),br=(e=>(e[e.Spade=0]="Spade",e[e.Heart=1]="Heart",e[e.Diamond=2]="Diamond",e[e.Club=3]="Club",e))(br||{}),Io=(e=>(e[e["♠"]=0]="♠",e[e["♡"]=1]="♡",e[e["♢"]=2]="♢",e[e["♣"]=3]="♣",e))(Io||{});const t0={N:0,S:1,E:2,W:3},el=["N","S","E","W"],Lf=["NT","S","H","D","C"],Tf=["S","H","D","C"],Mf=["A","K","Q","J","10","9","8","7","6","5","4","3","2"];function n0(e){const{ddtricks:t="*".repeat(20)}=e;let n=[];if(typeof t=="string")for(let r=0;r<4;++r){const l=[];for(let o=0;o<5;++o)t[r*5+o]!=="*"?l.push(parseInt(t[r*5+o],16)):l.push("*");n.push(l)}else n=t;return g.jsx("table",{className:"showTricks",children:g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{}),Lf.map(r=>g.jsx("td",{children:r},r))]}),n.map((r,l)=>g.jsxs("tr",{children:[g.jsx("td",{children:el[l]}),r.map((o,i)=>g.jsx("td",{children:o},"row"+l+"col"+i))]},"row"+l))]})})}const wa=class{constructor(t,n){te(this,"suit");te(this,"rank");te(this,"points");this.suit=t,this.rank=n,this.points=wa.POINT[n]}show(){console.log(this.suit+this.rank)}};let Re=wa;te(Re,"SUIT",["S","H","D","C"]),te(Re,"RANK",{A:0,K:1,Q:2,J:3,10:4,9:5,8:6,7:7,6:8,5:9,4:10,3:11,2:12}),te(Re,"POINT",{A:4,K:3,Q:2,J:1,10:0,9:0,8:0,7:0,6:0,5:0,4:0,3:0,2:0});function $t(e){let t="";function n(r){r.forEach(l=>{l==="10"?t+="T":t+=l})}return n(e.hand.S),t+=".",n(e.hand.H),t+=".",n(e.hand.D),t+=".",n(e.hand.C),t}function zf(e){let t="N:";return t+=$t(e[0])+" "+$t(e[2])+" "+$t(e[1])+" "+$t(e[3]),t}function r0(e){const t=new Date,n=` [Event ""] [Site ""] [Date "${t.getFullYear()}.${t.getMonth()+1}.${t.getDate()}"] @@ -105,4 +103,7 @@ W H 0 W D 0 W C 0 [OptimumScore ""] -`,r=new Blob([n],{type:"text/plain"}),l=URL.createObjectURL(r),o=document.createElement("a");o.href=l,o.download="test.pbn",document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(l)}function r0(e){const t=Math.floor(e/13),n=e%13;return new Re(Tf[t],Mf[n])}function bs(e){return Re.RANK[e.rank]+13*ga[e.suit]}function l0(e){const t=calcDDTable(zf(e)),n=new Array(4).fill(0).map(()=>new Array(5).fill("*"));return n[0][0]=t.N.N,n[0][1]=t.S.N,n[0][2]=t.H.N,n[0][3]=t.D.N,n[0][4]=t.C.N,n[1][0]=t.N.S,n[1][1]=t.S.S,n[1][2]=t.H.S,n[1][3]=t.D.S,n[1][4]=t.C.S,n[2][0]=t.N.E,n[2][1]=t.S.E,n[2][2]=t.H.E,n[2][3]=t.D.E,n[2][4]=t.C.E,n[3][0]=t.N.W,n[3][1]=t.S.W,n[3][2]=t.H.W,n[3][3]=t.D.W,n[3][4]=t.C.W,Promise.resolve(n)}async function o0(e){await new Promise((t,n)=>{setTimeout(t,e)})}function i0(e,t=1e9+7){return new Promise((n,r)=>{const l=()=>{fetch(e).then(o=>{if(console.log(o),o.ok)n(o);else throw new Error(o)}).catch(async o=>{await o0(1e4),t-- >0?l():r("fail")})};l()})}async function u0(e){const t=new Date().getTime(),n={dealstr:"W:",sockref:0,request:"m",uniqueTID:0};n.sockref=t,n.uniqueTID=t,n.dealstr+=$t(e[3])+"x"+$t(e[0])+"x"+$t(e[2])+"x"+$t(e[1]);let r="https://dds.bridgewebs.com/cgi-bin/bsol2/ddummy?";for(const[o,i]of Object.entries(n))r+=o+"="+i+"&";return r=r.substring(0,r.length-1),(await i0(r)).json()}function a0(e){const{allHands:t=[],boardNumber:n=1}=e,[r,l]=x.useState(),[o,i]=x.useState(),[u,a]=x.useState();async function s(){const d=await u0(t);a(d.sess.ddtricks),l(d.contractsNS.substring(3)),i(d.scoreNS)}return x.useEffect(()=>{s()},[t]),g.jsx(g.Fragment,{})}class Bt{constructor(){ne(this,"cards");ne(this,"hand");ne(this,"points");ne(this,"shape");this.cards=[],this.hand={S:[],H:[],D:[],C:[]},this.points=0,this.shape={S:0,H:0,D:0,C:0}}getMostCards(){const t=Math.max(...Object.values(this.shape)),n=[];for(const[r,l]of Object.entries(this.shape))l===t&&n.push(r);return n}getFewestCards(){const t=Math.min(...Object.values(this.shape)),n=[];for(const[r,l]of Object.entries(this.shape))l===t&&n.push(r);return n}add(t){this.cards.push(t),this.hand[t.suit].push(t.rank),this.points+=t.points,this.shape[t.suit]+=1}addCards(t){t.forEach(n=>{this.cards.push(n),this.hand[n.suit].push(n.rank),this.points+=n.points,this.shape[n.suit]+=1}),this.sortHand()}sortHand(){for(const t in this.hand)this.hand[t].sort((n,r)=>Re.RANK[n]-Re.RANK[r])}showWithColors(){const t=[];this.sortHand();for(const n in this.hand)t.push(n+" "+this.hand[n].join(""));return t}showWithoutColors(){const t=[];this.sortHand();for(const n in this.hand)t.push(this.hand[n].join(""));return t}}function s0(e){let t=e.length,n;for(;t!==0;)n=Math.random()*t-->>>0,[e[t],e[n]]=[e[n],e[t]];return e}const yo=class{constructor(t){ne(this,"all_cards");ne(this,"known_cards");ne(this,"boardnum");ne(this,"vul");ne(this,"dealer");ne(this,"Nhand");ne(this,"Shand");ne(this,"Ehand");ne(this,"Whand");ne(this,"ddsTricks");this.boardnum=t;const n=t%16;this.vul=yo.VUL[n],this.all_cards=[],this.known_cards=new Set;const r=t%4;this.dealer=yo.DEALER[r],this.Nhand=new Bt,this.Shand=new Bt,this.Ehand=new Bt,this.Whand=new Bt}shuffle(){for(const t of Re.SUIT)for(const n in Re.RANK)this.known_cards.has(bs(new Re(t,n)))||this.all_cards.push(new Re(t,n));s0(this.all_cards)}deal(t,n){const r=[0,0,0,0];if(n)for(const l in n){const o=n[l];switch(l){case"N":t[0].addCards(o),r[0]=o.length;break;case"S":t[1].addCards(o),r[1]=o.length;break;case"E":t[2].addCards(o),r[2]=o.length;break;case"W":t[3].addCards(o),r[3]=o.length;break}o.forEach(i=>{this.known_cards.add(bs(i))})}this.shuffle();for(let l=0;l<4;++l)for(let o=r[l];o<13;++o)t[l].add(this.all_cards.pop());[this.Nhand,this.Shand,this.Ehand,this.Whand]=t}getAllHands(){return[this.Nhand,this.Shand,this.Ehand,this.Whand]}};let Er=yo;ne(Er,"VUL",["EW","None","NS","EW","Both","NS","EW","Both","None","EW","Both","None","NS","Both","None","NS","EW"]),ne(Er,"DEALER",["W","N","E","S","W"]);function Dl(e){const{hand:t,points:n=[0,37],shapes:r=null,maxsuit:l=13,minsuit:o=0,havesuit:i=null,solid:u=!1,maxace:a=4,minace:s=0,cards:d=[],ambiguousShape:h}=e;if(t.pointsn[1])return!1;if(r!==null){const[y,E,w,v]=r;if(t.shape.S!==y||t.shape.H!==E||t.shape.D!==w||t.shape.C!==v)return!1}if(h){const[[y,E],[w,v],[f,c],[p,S]]=h;if(t.shape.SE||t.shape.Hv||t.shape.Dc||t.shape.CS)return!1}if(t.shape[t.getMostCards()[0]]>l||t.shape[t.getFewestCards()[0]]a||m{const e=ec;return ec+=1,`MESSAGE_${f0}_${e}`};let Cr;const p0=()=>{const[e,t]=x.useState([]),n=3*1e3,r=10,l=o=>{const{key:i}=o;t(u=>u.filter(({key:a})=>i!==a))};return Cr=o=>{t(i=>[...i,o]),setTimeout(()=>{l(o)},n)},x.useEffect(()=>{if(e.length>r){const[o]=e;l(o)}},[e]),g.jsx("div",{className:"alert-container",children:e.map(({text:o,key:i,type:u})=>g.jsx(d0,{type:u,text:o},i))})};let _n=document.querySelector("#alert-wrapper");_n||(_n=document.createElement("div"),_n.className="alert-wrapper",_n.id="alert-wrapper",document.body.append(_n));Vl.createRoot(_n).render(g.jsx(p0,{}));const h0={info:e=>{Cr({text:e,key:Rl(),type:"info"})},success:e=>{Cr({text:e,key:Rl(),type:"success"})},warning:e=>{Cr({text:e,key:Rl(),type:"warning"})},error:e=>{Cr({text:e,key:Rl(),type:"error"})}};function m0(){const[e,t]=x.useState(0),[n,r]=x.useState(0),[l,o]=x.useState(0),[i,u]=x.useState(0),[a,s]=x.useState(13),[d,h]=x.useState(13),[m,y]=x.useState(13),[E,w]=x.useState(13),v=x.useContext(vt);function f(X){t(Number(X.target.value))}function c(X){r(Number(X.target.value))}function p(X){o(Number(X.target.value))}function S(X){u(Number(X.target.value))}function _(X){s(Number(X.target.value))}function j(X){h(Number(X.target.value))}function R(X){y(Number(X.target.value))}function P(X){w(Number(X.target.value))}const Y=[e,n,l,i],U=[a,d,m,E],de=[f,c,p,S],Ke=[_,j,R,P];return x.useEffect(()=>{v.setAmbiguousShape([[e,a],[n,d],[l,m],[i,E]])},[e,n,l,i,a,d,m,E]),g.jsx(vt.Consumer,{children:X=>g.jsx(g.Fragment,{children:g.jsx("table",{className:"ambiguous-table",children:g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{children:"colors"}),g.jsx("td",{children:"min"}),g.jsx("td",{children:"max"})]}),de.map((Ye,me)=>g.jsxs("tr",{children:[g.jsx("td",{children:Io[me]}),g.jsx("td",{children:g.jsx("select",{name:br[me],defaultValue:Y[me],onChange:Ye,children:new Array(14).fill(0).map((yt,Ue)=>g.jsx("option",{value:Ue,children:Ue},Ue))})}),g.jsx("td",{children:g.jsx("select",{name:br[me],defaultValue:U[me],onChange:Ke[me],children:new Array(14).fill(0).map((yt,Ue)=>g.jsx("option",{value:Ue,children:Ue},Ue))})})]},me))]})})})})}function v0(){const[e,t]=x.useState(4),[n,r]=x.useState(3),[l,o]=x.useState(3),[i,u]=x.useState(3),[a,s]=x.useState(0),d=x.useContext(vt);function h(f){t(Number(f.target.value))}function m(f){r(Number(f.target.value))}function y(f){o(Number(f.target.value))}function E(f){u(Number(f.target.value))}const w=[e,n,l,i],v=[h,m,y,E];return x.useEffect(()=>{s(13-e-n-l-i),d.setShapes([e,n,l,i])},[e,n,l,i,a]),g.jsx(vt.Consumer,{children:f=>g.jsx(g.Fragment,{children:v.map((c,p)=>g.jsxs("span",{children:[Io[p],g.jsx("select",{name:br[p],defaultValue:w[p],onChange:c,children:new Array(w[p]+a+1).fill(0).map((S,_)=>g.jsx("option",{value:_,children:_},_))})]},p))})})}function g0(){const[e,t]=x.useState(!1),[n,r]=x.useState(!0),l=x.useContext(vt);function o(){r(!n),l.setShapeType(!n)}function i(){t(!0)}function u(){l.setShapes(void 0),l.setAmbiguousShape(void 0),t(!1)}return g.jsx(vt.Consumer,{children:a=>g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:i,children:["设置",a.position,"牌型"]}),e&&g.jsxs(g.Fragment,{children:[g.jsxs("span",{onChange:o,children:[g.jsx("input",{type:"radio",name:"shape",id:"specific",defaultChecked:!0}),g.jsx("label",{htmlFor:"specific",children:"精确牌型"}),g.jsx("input",{type:"radio",name:"shape",id:"ambiguous"}),g.jsx("label",{htmlFor:"ambiguous",children:"模糊牌型"})]}),n?g.jsx(v0,{}):g.jsx(m0,{}),g.jsx("button",{onClick:u,children:"取消设置"})]})]})})}function y0(e){const t=x.useContext(vt);function n(r){t.setSolid(r.target.checked)}return g.jsx(vt.Consumer,{children:r=>g.jsxs(g.Fragment,{children:[" ",r.position," 是否有坚固套 ",g.jsx("input",{type:"checkbox",id:"solid",name:"solid",onChange:n})]})})}const Ff=x.createContext({contextType:"analysis",known_cards:new Array(52).fill(-1),changeKnown_cards:()=>{}});function w0(){const[e,t]=x.useState(!1),[n,r]=x.useState(new Set),l=x.useContext(vt),o=x.useContext(Ff),{known_cards:i,changeKnown_cards:u}=o;function a(){t(!0)}function s(m,y){n.has(m)?(n.delete(m),r(new Set(n))):r(new Set(n.add(m)))}function d(){n.forEach(m=>i[m]===-1?i[m]=e0[l.position]:i[m]=-1),u([...i]),n.clear(),r(new Set(n)),t(!1)}function h(){n.clear(),r(new Set(n)),t(!1)}return g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:a,children:["设置",l.position,"的已知牌张信息"]}),e&&g.jsxs("div",{children:[Tf.map((m,y)=>g.jsxs("div",{children:[m," ",Mf.map((E,w)=>g.jsx("button",{onClick:v=>s(13*y+w),disabled:o.known_cards[13*y+w]!==-1&&o.known_cards[13*y+w]!==0,className:(o.known_cards[13*y+w]>=0?"known":"unknown")+" "+(n.has(13*y+w)?"now":""),children:E},y+w))]},y)),g.jsx("button",{onClick:d,children:"确认"})," ",g.jsx("button",{onClick:h,children:"取消"})]})]})}const vt=x.createContext({position:"N",solid:!1,setSolid:()=>{},setShapes:()=>{},setAmbiguousShape:()=>{},setShapeType:()=>{}}),Ll=x.forwardRef((e,t)=>{const{position:n="N",getData:r}=e,[l,o]=x.useState(0),[i,u]=x.useState(37),[a,s]=x.useState(!1),[d,h]=x.useState(),[m,y]=x.useState(!1),[E,w]=x.useState([]),[v,f]=x.useState(),[c,p]=x.useState(!0);function S(){s(!a)}function _(P){o(Number(P.target.value))}function j(P){u(Number(P.target.value))}function R(){const P={points:[l,i],solid:m,cards:E};c?P.shapes=d:P.ambiguousShape=v,r(n,P),S(),h0.success(`成功保存${n}持牌信息!`)}return g.jsxs(vt.Provider,{value:{position:n,setShapes:h,solid:m,setSolid:y,setAmbiguousShape:f,setShapeType:p},children:[g.jsx("button",{onClick:S,children:n}),a&&g.jsxs("div",{ref:t,children:["请输入",n,"点力的下限",g.jsx("input",{value:l,onChange:_,placeholder:"请输入点力的下限",className:"point"}),"请输入",n,"点力的上限",g.jsx("input",{value:i,onChange:j,placeholder:"请输入点力的上限",className:"point"}),g.jsx(y0,{}),g.jsx("br",{}),g.jsx(g0,{}),g.jsx("br",{}),g.jsx(w0,{}),g.jsx("br",{}),g.jsx("button",{onClick:R,children:"保存设置"})]})]})}),S0="modulepreload",k0=function(e){return"/Bridge-Tools/"+e},tc={},x0=function(t,n,r){if(!n||n.length===0)return t();const l=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=k0(o),o in tc)return;tc[o]=!0;const i=o.endsWith(".css"),u=i?'[rel="stylesheet"]':"";if(!!r)for(let d=l.length-1;d>=0;d--){const h=l[d];if(h.href===o&&(!i||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${u}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":S0,i||(s.as="script",s.crossOrigin=""),s.href=o,document.head.appendChild(s),i)return new Promise((d,h)=>{s.addEventListener("load",d),s.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};function E0(e){const{hand:t,position:n,beautify:r=!1,canClick:l=!1}=e;let o=Rf[n];t.sortHand();const i=[t.hand.S,t.hand.H,t.hand.D,t.hand.C];function u(s,d,h){console.log(s),console.log(d)}const a=(s,d)=>s.length>0?l?s.map(h=>g.jsx("button",{onClick:()=>u(d,h),children:h})):s:" —";return g.jsx(g.Fragment,{children:i.map((s,d)=>g.jsxs("div",{className:o+br[d],children:[r?Io[d]+" ":ga[d]+" "," ",a(s,d)]},d))})}const C0=xu.lazy(()=>x0(()=>import("./OfflineBridgeSolver-88949876.js"),[]));function _0(e){const{board:t,children:n,dds:r,...l}=e,o=t.getAllHands();return g.jsxs("div",{className:"board-container",children:[g.jsxs("div",{className:"board-number",children:[g.jsx("div",{children:t.boardnum}),r&&g.jsx("button",{className:"export",onClick:()=>n0(t),children:"export to PBN"})]}),g.jsx("div",{className:"predicted",children:n}),r&&g.jsx("div",{className:"double-dummy",children:g.jsxs(x.Suspense,{fallback:g.jsx("div",{children:"Loading..."}),children:[" ",g.jsx(C0,{allHands:o})," "]})}),o.map((i,u)=>g.jsx("div",{className:el[u]+"hand",children:g.jsx(E0,{position:el[u],hand:i,...l})},u))]})}function P0(e){return g.jsx(ya.Consumer,{children:t=>g.jsx("div",{className:"all-boards",children:t.all_boards.map((n,r)=>g.jsx(_0,{board:n,dds:t.dds,...e},r))})})}function N0(e,t){const n=[];for(let r=0;rnew Array(5).fill(0))),n=x.useContext(ya),{all_boards:r}=n;let l=new Array(4).fill(0).map(()=>new Array(5).fill(0));return x.useMemo(()=>{async function o(){for(const i of r)i.ddsTricks||(i.ddsTricks=await l0(i.getAllHands())),l=N0(l,i.ddsTricks);return Promise.resolve(l)}o().then(i=>{r.length>0&&t(j0(i,r.length))})},[r]),g.jsxs("fieldset",{className:"showStatistics",children:[g.jsx("legend",{children:"The average tricks:"}),g.jsx(t0,{ddtricks:e})]})}const ya=x.createContext({all_boards:[],dds:!1});function R0(e){const{all_boards:t,dds:n,...r}=e;return g.jsxs(ya.Provider,{value:{all_boards:t,dds:n},children:[n&&g.jsx(D0,{}),g.jsx(P0,{...r})]})}function L0(e,t){const n=[];for(let r=1;r<=e;++r)for(;;){const l=new Er(r),o=[new Bt,new Bt,new Bt,new Bt],{N:i,S:u,W:a,E:s}=t;let d;(i!=null&&i.cards||u!=null&&u.cards||a!=null&&a.cards||s!=null&&s.cards)&&(d={}),i!=null&&i.cards&&(d.N=i.cards),u!=null&&u.cards&&(d.S=u.cards),s!=null&&s.cards&&(d.E=s.cards),a!=null&&a.cards&&(d.W=a.cards);const h={N:{hand:o[0],...t.N},S:{hand:o[1],...t.S},E:{hand:o[2],...t.E},W:{hand:o[3],...t.W}};if(l.deal(o,d),c0(h)){n.push(l);break}}return n}function T0(){const[e,t]=x.useState(1),[n,r]=x.useState([]),[l,o]=x.useState(!1),[i,u]=x.useState(!1),[a,s]=x.useState(new Array(52).fill(-1)),[d,h]=x.useState({});function m(j){s(j)}const y=x.useRef(null),E=x.useRef(null),w=x.useRef(null),v=x.useRef(null),f=x.useCallback((j,R)=>{const P=d;P[j]=R,h(P)},[]);function c(){const j=new Array(4).fill(0).map(()=>new Array);a.forEach((R,P)=>{R>-1&&j[R].push(r0(P))}),j.forEach((R,P)=>{R.length>0&&(d[el[P]]={...d[el[P]],cards:R},h(d))}),r(L0(Number(e),d))}function p(j){t(Number(j.target.value))}function S(j){o(j.target.checked)}function _(j){u(j.target.checked)}return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"deal-setting",children:["请输入你需要的牌数",g.jsx("input",{value:e,onChange:p,placeholder:"请输入你需要的牌数"}),g.jsxs("fieldset",{children:[g.jsx("legend",{children:"Choose your deal's features:"}),g.jsxs("div",{children:[g.jsx("input",{type:"checkbox",id:"beautify",name:"beautify",onChange:S}),"是否需要美化?",g.jsx("input",{type:"checkbox",id:"dds",name:"dds",onChange:_}),"是否需要四明手分析?(会更花费时间)"]}),g.jsxs(Ff.Provider,{value:{known_cards:a,changeKnown_cards:m,contextType:"multi"},children:[g.jsx(Ll,{ref:y,position:"N",getData:f}),g.jsx(Ll,{ref:E,position:"S",getData:f}),g.jsx(Ll,{ref:w,position:"E",getData:f}),g.jsx(Ll,{ref:v,position:"W",getData:f})]})]}),g.jsx("br",{}),g.jsx("button",{onClick:c,children:"Get new boards"})]}),x.useMemo(()=>g.jsx(R0,{all_boards:n,beautify:l,dds:i}),[i,l,n])]})}function M0(){const e=["PASS","X","XX"];return g.jsxs(g.Fragment,{children:[new Array(7).fill(0).map((t,n)=>n+1).map(t=>g.jsx("div",{children:Lf.map(n=>g.jsxs("button",{children:[t,n]},t+n))})),e.map(t=>g.jsx("button",{children:t},t))]})}const z0=[{path:"/",element:g.jsx(qv,{}),title:"Home",children:[{path:"/deal-multi",title:"设置多家牌进行发牌",element:g.jsx(T0,{})},{path:"/solver",title:"分析",element:g.jsx(a0,{})},{path:"/play-board",title:"打牌面板",element:g.jsx(bv,{})},{path:"/calc-contract",title:"计算分数",element:g.jsx(M0,{})}]}],F0=Vv(z0);Vl.createRoot(document.getElementById("root")).render(g.jsx(xu.Fragment,{children:g.jsx(zv,{router:F0})}));export{t0 as S,l0 as a,g as j,x as r}; +`;return e.pbn=n,n}function Ff(e){let t=`% PBN 2.1 +% EXPORT +%Content-type: text/x-pbn; charset=ISO-8859-1 + `;e.forEach(o=>{o.pbn||(o.pbn=r0(o)),t+=o.pbn});const n=new Blob([t],{type:"text/plain"}),r=URL.createObjectURL(n),l=document.createElement("a");l.href=r,l.download="test.pbn",document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(r)}function l0(e){const t=Math.floor(e/13),n=e%13;return new Re(Tf[t],Mf[n])}function bs(e){return Re.RANK[e.rank]+13*ga[e.suit]}function o0(e){const t=calcDDTable(zf(e)),n=new Array(4).fill(0).map(()=>new Array(5).fill("*"));return n[0][0]=t.N.N,n[0][1]=t.S.N,n[0][2]=t.H.N,n[0][3]=t.D.N,n[0][4]=t.C.N,n[1][0]=t.N.S,n[1][1]=t.S.S,n[1][2]=t.H.S,n[1][3]=t.D.S,n[1][4]=t.C.S,n[2][0]=t.N.E,n[2][1]=t.S.E,n[2][2]=t.H.E,n[2][3]=t.D.E,n[2][4]=t.C.E,n[3][0]=t.N.W,n[3][1]=t.S.W,n[3][2]=t.H.W,n[3][3]=t.D.W,n[3][4]=t.C.W,Promise.resolve(n)}async function i0(e){await new Promise((t,n)=>{setTimeout(t,e)})}function u0(e,t=1e9+7){return new Promise((n,r)=>{const l=()=>{fetch(e).then(o=>{if(console.log(o),o.ok)n(o);else throw new Error(o)}).catch(async o=>{await i0(1e4),t-- >0?l():r("fail")})};l()})}async function a0(e){const t=new Date().getTime(),n={dealstr:"W:",sockref:0,request:"m",uniqueTID:0};n.sockref=t,n.uniqueTID=t,n.dealstr+=$t(e[3])+"x"+$t(e[0])+"x"+$t(e[2])+"x"+$t(e[1]);let r="https://dds.bridgewebs.com/cgi-bin/bsol2/ddummy?";for(const[o,i]of Object.entries(n))r+=o+"="+i+"&";return r=r.substring(0,r.length-1),(await u0(r)).json()}function s0(e){const{allHands:t=[],boardNumber:n=1}=e,[r,l]=x.useState(),[o,i]=x.useState(),[u,a]=x.useState();async function s(){const d=await a0(t);a(d.sess.ddtricks),l(d.contractsNS.substring(3)),i(d.scoreNS)}return x.useEffect(()=>{s()},[t]),g.jsx(g.Fragment,{})}class Bt{constructor(){te(this,"cards");te(this,"hand");te(this,"points");te(this,"shape");this.cards=[],this.hand={S:[],H:[],D:[],C:[]},this.points=0,this.shape={S:0,H:0,D:0,C:0}}getMostCards(){const t=Math.max(...Object.values(this.shape)),n=[];for(const[r,l]of Object.entries(this.shape))l===t&&n.push(r);return n}getFewestCards(){const t=Math.min(...Object.values(this.shape)),n=[];for(const[r,l]of Object.entries(this.shape))l===t&&n.push(r);return n}add(t){this.cards.push(t),this.hand[t.suit].push(t.rank),this.points+=t.points,this.shape[t.suit]+=1}addCards(t){t.forEach(n=>{this.cards.push(n),this.hand[n.suit].push(n.rank),this.points+=n.points,this.shape[n.suit]+=1}),this.sortHand()}sortHand(){for(const t in this.hand)this.hand[t].sort((n,r)=>Re.RANK[n]-Re.RANK[r])}showWithColors(){const t=[];this.sortHand();for(const n in this.hand)t.push(n+" "+this.hand[n].join(""));return t}showWithoutColors(){const t=[];this.sortHand();for(const n in this.hand)t.push(this.hand[n].join(""));return t}}function c0(e){let t=e.length,n;for(;t!==0;)n=Math.random()*t-->>>0,[e[t],e[n]]=[e[n],e[t]];return e}const yo=class{constructor(t){te(this,"all_cards");te(this,"known_cards");te(this,"boardnum");te(this,"vul");te(this,"dealer");te(this,"Nhand");te(this,"Shand");te(this,"Ehand");te(this,"Whand");te(this,"ddsTricks");te(this,"pbn");this.boardnum=t;const n=t%16;this.vul=yo.VUL[n],this.all_cards=[],this.known_cards=new Set;const r=t%4;this.dealer=yo.DEALER[r],this.Nhand=new Bt,this.Shand=new Bt,this.Ehand=new Bt,this.Whand=new Bt}shuffle(){for(const t of Re.SUIT)for(const n in Re.RANK)this.known_cards.has(bs(new Re(t,n)))||this.all_cards.push(new Re(t,n));c0(this.all_cards)}deal(t,n){const r=[0,0,0,0];if(n)for(const l in n){const o=n[l];switch(l){case"N":t[0].addCards(o),r[0]=o.length;break;case"S":t[1].addCards(o),r[1]=o.length;break;case"E":t[2].addCards(o),r[2]=o.length;break;case"W":t[3].addCards(o),r[3]=o.length;break}o.forEach(i=>{this.known_cards.add(bs(i))})}this.shuffle();for(let l=0;l<4;++l)for(let o=r[l];o<13;++o)t[l].add(this.all_cards.pop());[this.Nhand,this.Shand,this.Ehand,this.Whand]=t}getAllHands(){return[this.Nhand,this.Shand,this.Ehand,this.Whand]}};let Er=yo;te(Er,"VUL",["EW","None","NS","EW","Both","NS","EW","Both","None","EW","Both","None","NS","Both","None","NS","EW"]),te(Er,"DEALER",["W","N","E","S","W"]);function Dl(e){const{hand:t,points:n=[0,37],shapes:r=null,maxsuit:l=13,minsuit:o=0,havesuit:i=null,solid:u=!1,maxace:a=4,minace:s=0,cards:d=[],ambiguousShape:h}=e;if(t.pointsn[1])return!1;if(r!==null){const[y,E,w,v]=r;if(t.shape.S!==y||t.shape.H!==E||t.shape.D!==w||t.shape.C!==v)return!1}if(h){const[[y,E],[w,v],[f,c],[p,S]]=h;if(t.shape.SE||t.shape.Hv||t.shape.Dc||t.shape.CS)return!1}if(t.shape[t.getMostCards()[0]]>l||t.shape[t.getFewestCards()[0]]a||m{const e=ec;return ec+=1,`MESSAGE_${p0}_${e}`};let Cr;const h0=()=>{const[e,t]=x.useState([]),n=3*1e3,r=10,l=o=>{const{key:i}=o;t(u=>u.filter(({key:a})=>i!==a))};return Cr=o=>{t(i=>[...i,o]),setTimeout(()=>{l(o)},n)},x.useEffect(()=>{if(e.length>r){const[o]=e;l(o)}},[e]),g.jsx("div",{className:"alert-container",children:e.map(({text:o,key:i,type:u})=>g.jsx(f0,{type:u,text:o},i))})};let _n=document.querySelector("#alert-wrapper");_n||(_n=document.createElement("div"),_n.className="alert-wrapper",_n.id="alert-wrapper",document.body.append(_n));Vl.createRoot(_n).render(g.jsx(h0,{}));const m0={info:e=>{Cr({text:e,key:Rl(),type:"info"})},success:e=>{Cr({text:e,key:Rl(),type:"success"})},warning:e=>{Cr({text:e,key:Rl(),type:"warning"})},error:e=>{Cr({text:e,key:Rl(),type:"error"})}};function v0(){const[e,t]=x.useState(0),[n,r]=x.useState(0),[l,o]=x.useState(0),[i,u]=x.useState(0),[a,s]=x.useState(13),[d,h]=x.useState(13),[m,y]=x.useState(13),[E,w]=x.useState(13),v=x.useContext(vt);function f(X){t(Number(X.target.value))}function c(X){r(Number(X.target.value))}function p(X){o(Number(X.target.value))}function S(X){u(Number(X.target.value))}function _(X){s(Number(X.target.value))}function j(X){h(Number(X.target.value))}function R(X){y(Number(X.target.value))}function P(X){w(Number(X.target.value))}const Y=[e,n,l,i],U=[a,d,m,E],de=[f,c,p,S],Ke=[_,j,R,P];return x.useEffect(()=>{v.setAmbiguousShape([[e,a],[n,d],[l,m],[i,E]])},[e,n,l,i,a,d,m,E]),g.jsx(vt.Consumer,{children:X=>g.jsx(g.Fragment,{children:g.jsx("table",{className:"ambiguous-table",children:g.jsxs("tbody",{children:[g.jsxs("tr",{children:[g.jsx("td",{children:"colors"}),g.jsx("td",{children:"min"}),g.jsx("td",{children:"max"})]}),de.map((Ye,me)=>g.jsxs("tr",{children:[g.jsx("td",{children:Io[me]}),g.jsx("td",{children:g.jsx("select",{name:br[me],defaultValue:Y[me],onChange:Ye,children:new Array(14).fill(0).map((yt,Ue)=>g.jsx("option",{value:Ue,children:Ue},Ue))})}),g.jsx("td",{children:g.jsx("select",{name:br[me],defaultValue:U[me],onChange:Ke[me],children:new Array(14).fill(0).map((yt,Ue)=>g.jsx("option",{value:Ue,children:Ue},Ue))})})]},me))]})})})})}function g0(){const[e,t]=x.useState(4),[n,r]=x.useState(3),[l,o]=x.useState(3),[i,u]=x.useState(3),[a,s]=x.useState(0),d=x.useContext(vt);function h(f){t(Number(f.target.value))}function m(f){r(Number(f.target.value))}function y(f){o(Number(f.target.value))}function E(f){u(Number(f.target.value))}const w=[e,n,l,i],v=[h,m,y,E];return x.useEffect(()=>{s(13-e-n-l-i),d.setShapes([e,n,l,i])},[e,n,l,i,a]),g.jsx(vt.Consumer,{children:f=>g.jsx(g.Fragment,{children:v.map((c,p)=>g.jsxs("span",{children:[Io[p],g.jsx("select",{name:br[p],defaultValue:w[p],onChange:c,children:new Array(w[p]+a+1).fill(0).map((S,_)=>g.jsx("option",{value:_,children:_},_))})]},p))})})}function y0(){const[e,t]=x.useState(!1),[n,r]=x.useState(!0),l=x.useContext(vt);function o(){r(!n),l.setShapeType(!n)}function i(){t(!0)}function u(){l.setShapes(void 0),l.setAmbiguousShape(void 0),t(!1)}return g.jsx(vt.Consumer,{children:a=>g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:i,children:["设置",a.position,"牌型"]}),e&&g.jsxs(g.Fragment,{children:[g.jsxs("span",{onChange:o,children:[g.jsx("input",{type:"radio",name:"shape",id:"specific",defaultChecked:!0}),g.jsx("label",{htmlFor:"specific",children:"精确牌型"}),g.jsx("input",{type:"radio",name:"shape",id:"ambiguous"}),g.jsx("label",{htmlFor:"ambiguous",children:"模糊牌型"})]}),n?g.jsx(g0,{}):g.jsx(v0,{}),g.jsx("button",{onClick:u,children:"取消设置"})]})]})})}function w0(e){const t=x.useContext(vt);function n(r){t.setSolid(r.target.checked)}return g.jsx(vt.Consumer,{children:r=>g.jsxs(g.Fragment,{children:[" ",r.position," 是否有坚固套 ",g.jsx("input",{type:"checkbox",id:"solid",name:"solid",onChange:n})]})})}const Af=x.createContext({contextType:"analysis",known_cards:new Array(52).fill(-1),changeKnown_cards:()=>{}});function S0(){const[e,t]=x.useState(!1),[n,r]=x.useState(new Set),l=x.useContext(vt),o=x.useContext(Af),{known_cards:i,changeKnown_cards:u}=o;function a(){t(!0)}function s(m,y){n.has(m)?(n.delete(m),r(new Set(n))):r(new Set(n.add(m)))}function d(){n.forEach(m=>i[m]===-1?i[m]=t0[l.position]:i[m]=-1),u([...i]),n.clear(),r(new Set(n)),t(!1)}function h(){n.clear(),r(new Set(n)),t(!1)}return g.jsxs(g.Fragment,{children:[g.jsxs("button",{onClick:a,children:["设置",l.position,"的已知牌张信息"]}),e&&g.jsxs("div",{children:[Tf.map((m,y)=>g.jsxs("div",{children:[m," ",Mf.map((E,w)=>g.jsx("button",{onClick:v=>s(13*y+w),disabled:o.known_cards[13*y+w]!==-1&&o.known_cards[13*y+w]!==0,className:(o.known_cards[13*y+w]>=0?"known":"unknown")+" "+(n.has(13*y+w)?"now":""),children:E},y+w))]},y)),g.jsx("button",{onClick:d,children:"确认"})," ",g.jsx("button",{onClick:h,children:"取消"})]})]})}const vt=x.createContext({position:"N",solid:!1,setSolid:()=>{},setShapes:()=>{},setAmbiguousShape:()=>{},setShapeType:()=>{}}),Ll=x.forwardRef((e,t)=>{const{position:n="N",getData:r}=e,[l,o]=x.useState(0),[i,u]=x.useState(37),[a,s]=x.useState(!1),[d,h]=x.useState(),[m,y]=x.useState(!1),[E,w]=x.useState([]),[v,f]=x.useState(),[c,p]=x.useState(!0);function S(){s(!a)}function _(P){o(Number(P.target.value))}function j(P){u(Number(P.target.value))}function R(){const P={points:[l,i],solid:m,cards:E};c?P.shapes=d:P.ambiguousShape=v,r(n,P),S(),m0.success(`成功保存${n}持牌信息!`)}return g.jsxs(vt.Provider,{value:{position:n,setShapes:h,solid:m,setSolid:y,setAmbiguousShape:f,setShapeType:p},children:[g.jsx("button",{onClick:S,children:n}),a&&g.jsxs("div",{ref:t,children:["请输入",n,"点力的下限",g.jsx("input",{value:l,onChange:_,placeholder:"请输入点力的下限",className:"point"}),"请输入",n,"点力的上限",g.jsx("input",{value:i,onChange:j,placeholder:"请输入点力的上限",className:"point"}),g.jsx(w0,{}),g.jsx("br",{}),g.jsx(y0,{}),g.jsx("br",{}),g.jsx(S0,{}),g.jsx("br",{}),g.jsx("button",{onClick:R,children:"保存设置"})]})]})}),k0="modulepreload",x0=function(e){return"/Bridge-Tools/"+e},tc={},E0=function(t,n,r){if(!n||n.length===0)return t();const l=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=x0(o),o in tc)return;tc[o]=!0;const i=o.endsWith(".css"),u=i?'[rel="stylesheet"]':"";if(!!r)for(let d=l.length-1;d>=0;d--){const h=l[d];if(h.href===o&&(!i||h.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${u}`))return;const s=document.createElement("link");if(s.rel=i?"stylesheet":k0,i||(s.as="script",s.crossOrigin=""),s.href=o,document.head.appendChild(s),i)return new Promise((d,h)=>{s.addEventListener("load",d),s.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>t())};function C0(e){const{hand:t,position:n,beautify:r=!1,canClick:l=!1}=e;let o=Rf[n];t.sortHand();const i=[t.hand.S,t.hand.H,t.hand.D,t.hand.C];function u(s,d,h){console.log(s),console.log(d)}const a=(s,d)=>s.length>0?l?s.map(h=>g.jsx("button",{onClick:()=>u(d,h),children:h})):s:" —";return g.jsx(g.Fragment,{children:i.map((s,d)=>g.jsxs("div",{className:o+br[d],children:[r?Io[d]+" ":ga[d]+" "," ",a(s,d)]},d))})}const _0=xu.lazy(()=>E0(()=>import("./OfflineBridgeSolver-08d81071.js"),[]));function P0(e){const{board:t,children:n,dds:r,...l}=e,o=t.getAllHands();return g.jsxs("div",{className:"board-container",children:[g.jsxs("div",{className:"board-number",children:[g.jsx("div",{children:t.boardnum}),r&&g.jsx("button",{className:"export",onClick:()=>Ff([t]),children:"export to PBN"})]}),g.jsx("div",{className:"predicted",children:n}),r&&g.jsx("div",{className:"double-dummy",children:g.jsxs(x.Suspense,{fallback:g.jsx("div",{children:"Loading..."}),children:[" ",g.jsx(_0,{allHands:o})," "]})}),o.map((i,u)=>g.jsx("div",{className:el[u]+"hand",children:g.jsx(C0,{position:el[u],hand:i,...l})},u))]})}function N0(e){return g.jsx(ya.Consumer,{children:t=>g.jsx("div",{className:"all-boards",children:t.all_boards.map((n,r)=>g.jsx(P0,{board:n,dds:t.dds,...e},r))})})}function j0(e,t){const n=[];for(let r=0;rnew Array(5).fill(0))),n=x.useContext(ya),{all_boards:r}=n;let l=new Array(4).fill(0).map(()=>new Array(5).fill(0));return x.useMemo(()=>{async function o(){for(const i of r)i.ddsTricks||(i.ddsTricks=await o0(i.getAllHands())),l=j0(l,i.ddsTricks);return Promise.resolve(l)}o().then(i=>{r.length>0&&t(D0(i,r.length))})},[r]),g.jsxs("fieldset",{className:"showStatistics",children:[g.jsx("legend",{children:"The average tricks:"}),g.jsx(n0,{ddtricks:e})]})}const ya=x.createContext({all_boards:[],dds:!1});function L0(e){const{all_boards:t,dds:n,...r}=e;return g.jsxs(ya.Provider,{value:{all_boards:t,dds:n},children:[t.length>0&&g.jsx("button",{onClick:()=>Ff(t),children:"export all in pbn format"}),n&&g.jsx(R0,{}),g.jsx(N0,{...r})]})}function T0(e,t){const n=[];for(let r=1;r<=e;++r)for(;;){const l=new Er(r),o=[new Bt,new Bt,new Bt,new Bt],{N:i,S:u,W:a,E:s}=t;let d;(i!=null&&i.cards||u!=null&&u.cards||a!=null&&a.cards||s!=null&&s.cards)&&(d={}),i!=null&&i.cards&&(d.N=i.cards),u!=null&&u.cards&&(d.S=u.cards),s!=null&&s.cards&&(d.E=s.cards),a!=null&&a.cards&&(d.W=a.cards);const h={N:{hand:o[0],...t.N},S:{hand:o[1],...t.S},E:{hand:o[2],...t.E},W:{hand:o[3],...t.W}};if(l.deal(o,d),d0(h)){n.push(l);break}}return n}function M0(){const[e,t]=x.useState(1),[n,r]=x.useState([]),[l,o]=x.useState(!1),[i,u]=x.useState(!1),[a,s]=x.useState(new Array(52).fill(-1)),[d,h]=x.useState({});function m(j){s(j)}const y=x.useRef(null),E=x.useRef(null),w=x.useRef(null),v=x.useRef(null),f=x.useCallback((j,R)=>{const P=d;P[j]=R,h(P)},[]);function c(){const j=new Array(4).fill(0).map(()=>new Array);a.forEach((R,P)=>{R>-1&&j[R].push(l0(P))}),j.forEach((R,P)=>{R.length>0&&(d[el[P]]={...d[el[P]],cards:R},h(d))}),r(T0(Number(e),d))}function p(j){t(Number(j.target.value))}function S(j){o(j.target.checked)}function _(j){u(j.target.checked)}return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"deal-setting",children:["请输入你需要的牌数",g.jsx("input",{value:e,onChange:p,placeholder:"请输入你需要的牌数"}),g.jsxs("fieldset",{children:[g.jsx("legend",{children:"Choose your deal's features:"}),g.jsxs("div",{children:[g.jsx("input",{type:"checkbox",id:"beautify",name:"beautify",onChange:S}),"是否需要美化?",g.jsx("input",{type:"checkbox",id:"dds",name:"dds",onChange:_}),"是否需要四明手分析?(会更花费时间)"]}),g.jsxs(Af.Provider,{value:{known_cards:a,changeKnown_cards:m,contextType:"multi"},children:[g.jsx(Ll,{ref:y,position:"N",getData:f}),g.jsx(Ll,{ref:E,position:"S",getData:f}),g.jsx(Ll,{ref:w,position:"E",getData:f}),g.jsx(Ll,{ref:v,position:"W",getData:f})]})]}),g.jsx("br",{}),g.jsx("button",{onClick:c,children:"Get new boards"})]}),x.useMemo(()=>g.jsx(L0,{all_boards:n,beautify:l,dds:i}),[i,l,n])]})}function z0(){const e=["PASS","X","XX"];return g.jsxs(g.Fragment,{children:[new Array(7).fill(0).map((t,n)=>n+1).map(t=>g.jsx("div",{children:Lf.map(n=>g.jsxs("button",{children:[t,n]},t+n))})),e.map(t=>g.jsx("button",{children:t},t))]})}const F0=[{path:"/",element:g.jsx(bv,{}),title:"Home",children:[{path:"/deal-multi",title:"设置多家牌进行发牌",element:g.jsx(M0,{})},{path:"/solver",title:"分析",element:g.jsx(s0,{})},{path:"/play-board",title:"打牌面板",element:g.jsx(e0,{})},{path:"/calc-contract",title:"计算分数",element:g.jsx(z0,{})}]}],A0=Qv(F0);Vl.createRoot(document.getElementById("root")).render(g.jsx(xu.Fragment,{children:g.jsx(Fv,{router:A0})}));export{n0 as S,o0 as a,g as j,x as r}; diff --git a/index.html b/index.html index 1392e30..d0110e5 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ Bridge - +